diff options
author | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
commit | aae950e69caf1dc3f308b74fe6d066a645a7ed09 (patch) | |
tree | fc657a1fb5e0ceeb952b5e5ad8744fec0332849c /contrib/binutils | |
parent | dcf134d53b2ddea66d0fe9fba4e8950a7c07b312 (diff) | |
download | FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.zip FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.tar.gz |
Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
Diffstat (limited to 'contrib/binutils')
395 files changed, 35149 insertions, 16561 deletions
diff --git a/contrib/binutils/ChangeLog b/contrib/binutils/ChangeLog index 82b0f4d..9f39349 100644 --- a/contrib/binutils/ChangeLog +++ b/contrib/binutils/ChangeLog @@ -1,8 +1,680 @@ +2002-07-11 Nathanael Nerode <neroden@gcc.gnu.org> + + * configure.in: Remove two redundant tests. + +2002-07-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * configure.in (mips*-*-irix6*o32): Enable stabs. + +2002-07-08 Nathanael Nerode <neroden@gcc.gnu.org> + + * configure.in: Don't build grez. + * Makefile.in: Ditto. + + * Makefile.in: Remove references to bsp, cygmon, libstub. + * configure.in: Ditto. + + * configure.in: Remove leftover reference to gdbtest. + +2002-07-08 Phil Edwards <pme@gcc.gnu.org> + + * configure.in (gxx_include_dir): Change to match versioned + C++ headers if --enable-version-specific-runtime-libs is used. + +2002-07-04 Steve Ellcey <sje@cup.hp.com> + + * ltcf-cxx.sh (hpux*): Modify to support ia64-*-hpux*. + +2002-07-03 Nathanael Nerode <neroden@gcc.gnu.org> + + * configure.in: Make --without-x work. + +2002-07-03 Nick Clifton <nickc@cambridge.redhat.com> + + * contrib: New directory. Created to contain a copy of the + texi2pod.pl script so that it is in the same place as the version in + the FSF GCC sources. + +2002-07-02 Nathanael Nerode <neroden@gcc.gnu.org> + + * configure.in: Rearrange target Makefile fragment collection. + + * Makefile.in: Don't try to build gdbtest, tgas, ispell, inet, or + cvs[src]. + * configure.in: Ditto. + +2002-07-01 Nathanael Nerode <neroden@gcc.gnu.org> + + * Makefile.in: Eliminate 'apache' targets. + * configure.in: Eliminate 'apache' targets. + + * configure.in: Eliminate redundant tests. Reorganize. + + * Makefile.in: Eliminate last reference to LIBGCC1_TEST. + + * config-ml.in: Eliminate references to Cygnus configure. + + * Makefile.in: Eliminate references to building emacs. + +2002-07-01 Denis Chertykov <denisc@overta.ru> + + * configure.in: Add support for ip2k. + +2002-06-24 Ben Elliston <bje@redhat.com> + + * configure.in (host_tools): Remove cgen. + + * Makefile.in (all-cgen): Remove; runs from its source directory. + (check-cgen, install-cgen, clean-cgen): Likewise. + (all-opcodes): No not depend on all-cgen. + (all-sim): Likewise. + +2002-06-22 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: Fix AIX configury bug. + +2002-06-19 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: Replace ${topsrcdir} with ${srcdir}. + + * configure.in: Move definition of libstdcxx_flags right above + usage, rather than way earlier. + + * configure.in: Pull definition of is_cross_compiler earlier. + + * configure.in: Rearrange a little. + + * configure.in: Remove references to librx. + * Makefile.in: Remove references to librx. + +2002-06-19 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: Eliminate ${gasdir} variable. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + * configure.in: Add support for frv. + * config.sub: Add support for frv. + +2002-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * Makefile.in (CFLAGS_FOR_TARGET): Add -O2. + +2002-06-08 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in (vax-*-netbsd*): Re-enable gas. + +2002-05-31 Nathanael Nerode <neroden@twcny.rr.com> + + * Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with BUILD_PREFIX, + BUILD_PREFIX_1, to correct nomenclature. + * configure: Likewise. + + * Makefile.in: Eliminate version-specific references to tcl8.1, tk8.1. + * configure.in: Eliminate version-specific references to tcl8.1, tk8.1. + +2002-05-31 Olaf Hering <olh@suse.de> + + * config-ml.in: Propogate DESTDIR also. + +2002-05-29 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in (vax-*-netbsd*): Don't build gas for this + platform. + +2002-05-28 Marek Michalkiewicz <marekm@amelek.gda.pl> + + * configure.in (noconfigdirs): Don't compile libiberty, libstdcxx + and libgcj for AVR. + +2002-05-28 Nick Clifton <nickc@cambridge.redhat.com> + + * config.sub: Add DLX target. + +2002-05-22 Jason Thorpe <thorpej@wasabisystems.com> + + * config.guess: Update to 2002-05-22 version. + * config.sub: Likewise. + +2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * Makefile.in: Allow for PWDCMD to override hardcoded pwd. + * config-ml.in: Likewise. + * configure: Likewise. + * configure.in: Likewise. + +2002-05-13 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: Simplify makefile fragment collection. + + * configure.in: Remove code to build emacs. + + * configure.in : Remove --srcdir argument from targargs and buildargs + (it's always overridden in the Makefile anyway). Rearrange a bit. + + * configure: Move some logic to configure.in. + * configure.in: Move some logic from configure. + +2002-05-07 Jeff Johnston <jjohnstn@redhat.com> + + * COPYING.LIBGLOSS: New file. + +2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br> + + * Makefile.in: Honour DESTDIR. + +2002-05-05 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (noconfigdirs): Don't disable libgcj on + sparc64-*-solaris* and sparcv9-*-solaris*. + +2002-05-03 Alexandre Oliva <aoliva@redhat.com> + + * configure.in: Revert 2002-04-18's patch; fixed in libjava. + +2002-05-03 Thomas Fitzsimmons <fitzsim@redhat.com> + + * configure.in (FLAGS_FOR_TARGET): Do not add + -B$$r/$(TARGET_SUBDIR)/newlib/ when compiling newlib natively + on i[3456]86-*-linux*. + +2002-05-01 Thomas Fitzsimmons <fitzsim@redhat.com> + + * configure.in (noconfigdirs): Replace [ ] with test. + + * configure.in (noconfigdirs): Do not add target-newlib if + target == i[3456]86-*-linux*, and host == target. + +2002-04-29 Mark Mitchell <mark@codesourcery.com> + + * config.guess: Updated to 2002-04-26's version. + * config.sub: Updated to 2002-04-26's version. + +2002-04-29 Nathanael Nerode <neroden@doctormoo.dyndns.org> + + * configure.in: delete reference to absent file + + * configure.in: replace '[' with 'test' + + * configure.in: Eliminate references to gash. + * Makefile.in: Eliminate references to gash. + + * configure.in: remove useless references to 'pic' makefile fragments. + + * configure.in: (*-*-windows*) Finish removing. + + * configure.in: Eliminate redundant test for libgui. + +2002-04-26 Joel Sherrill <joel@OARcorp.com> + + * configure.in (h8300*-*-rtems*): Disable libf2c and libgcj. + (sparc-*-elf*, sparc64-*-elf*): Disable libgcj. + +2002-04-19 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: remove references to dead files + +2002-04-18 Tom Tromey <tromey@redhat.com> + + * configure.in: Disallow configuring libgcj when it is already + installed and we're using Solaris 2.8 linker. Do enable libgcj on + Solaris 2.8 by default. For PR libgcj/6158. + +2002-04-17 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: Move default CC setting out of config/mh-* fragments + directly into here. + +2002-04-17 Nathanael Nerode <neroden@twcny.rr.com> + + * configure.in: don't even try to configure or make a subdirectory + if there's no configure script for it. + +2002-04-15 Mark Mitchell <mark@codesourcery.com> + + * MAINTAINERS: Remove chill maintainers. + * Makefile.in (CHILLFLAGS): Remove. + (CHILL_LIB): Remove. + (TARGET_CONFIGDIRS): Remove libchill. + (CHILL_FOR_TARGET): Remove. + (BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or + CHILL_LIB. + (CONFIGURE_TARGET_MODULES): Remove configure-target-libchill. + (CHECK_TARGET_MODULES): Likewise. + (INSTALL_TARGET_MODULES): Likewise. + (CLEAN_TARGET_MODULES): Likewise. + (configure-target-libchill): Remove. + (all-target-libchill): Remove. + * configure.in (target_libs): Remove target-libchill. + Do not compute CHILL_FOR_TARGET. + * libchill: Remove directory. + +2002-04-15 DJ Delorie <dj@redhat.com> + + * Makefile.in, configure.in, configure: Sync with gcc, entries + follow... + +2002-04-08 Tom Tromey <tromey@redhat.com> + + * configure.in: Add FLAGS_FOR_TARGET to GCJ_FOR_TARGET. + Fixes PR libgcj/6068. + +2002-03-30 Krister Walfridsson <cato@df.lth.se> + + * configure.in (i*86-*-netbsdelf*): Don't disable libgcj. + +2002-03-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * configure.in (alpha*-dec-osf*): Enable libgcj. + +2002-03-24 Nick Clifton <nickc@cambridge.redhat.com> + + Fix for: PR bootstrap/3591, target/5676 + * configure.in (mcore-pe): Disable the configuration of + libstdc++-v3 since exceptions are not supported. + +2002-03-20 Anthony Green <green@redhat.com> + + * configure.in: Enable libgcj for xscale-elf target. + +2002-02-28 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (libstdcxx_flags): Don't add libstdc++-v3 flags for + libjava. + (CXX_FOR_TARGET): Explain why -shared-libgcc here. + +2002-02-22 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (CXX_FOR_TARGET): Add -shared-libgcc for + libstdc++-v3 and libjava. + +2002-02-11 Adam Megacz <adam@xwt.org> + + * gcc/Makefile.in: Removed libstdc++-v3 dependancy for libjava and + boehm-gc + +2002-02-09 Alexandre Oliva <aoliva@redhat.com> + + * config.guess: Updated to 2002-01-30's version. + * config.sub: Updated to 2002-02-01's version. + Contribute sh64-elf. + 2000-12-01 Alexandre Oliva <aoliva@redhat.com> + * configure.in: Added sh64-*-*. + +2002-01-17 H.J. Lu <hjl@gnu.org> + + * Makefile.in (all-fastjar): Also depend on all-libiberty. + (all-target-fastjar): Also depend on all-target-libiberty. + +Wed Dec 5 07:33:45 2001 Douglas B. Rupp <rupp@gnat.com> + + * configure, configure.in: Use temp file for long sed commands. + +2001-11-14 Hans-Peter Nilsson <hp@bitrange.com> + + * configure.in (noconfigdirs) [h8300*-*-*, h8500-*-*]: Disable + libf2c. + +2001-11-03 Hans-Peter Nilsson <hp@bitrange.com> + + * configure.in (noconfigdirs) [mmix-*-*]: Disable libgcj. + +2001-10-11 Hans-Peter Nilsson <hp@axis.com> + + * configure.in (noconfigdirs) [cris-*-*]: Disable libgcj. + +2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> + + * configure: Handle temporary files securely using mkdir. + +2001-09-26 Will Cohen <wcohen@redhat.com> + + * configure.in (*-*-linux*): Disable configuration of target-newlib + and target-libgloss. + +2001-09-26 Alexandre Oliva <aoliva@redhat.com> + + * Makefile.in (EXTRA_TARGET_FLAGS): Pass RANLIB_FOR_TARGET for + RANLIB. + +2001-08-11 Graham Stott <grahams@redhat.com> + + * Makefile.in (check-c++): Add missing semicolon. + +2001-07-25 Andrew Haley <aph@cambridge.redhat.com> + + * configure.in (sh-*-linux*): New. + +2001-07-12 Stephane Carrez <Stephane.Carrez@worldnet.fr> + + * configure.in (noconfigdirs): Don't compile libiberty, libstdcxx + and libgcj on m68hc11/m68hc12. + +2001-06-27 H.J. Lu (hjl@gnu.org) + + * Makefile (CFLAGS_FOR_BUILD): New. + (EXTRA_GCC_FLAGS): Add CFLAGS_FOR_BUILD. + +2001-06-01 Hans-Peter Nilsson <hp@axis.com> + + * configure.in (libstdcxx_flags): Do not try to execute + libstdc++-v3/testsuite_flags until it exists. + +2001-05-18 Benjamin Kosnik <bkoz@redhat.com> + + * configure.in (libstdcxx_flags): Remove reference to libstdc++.INC. + +2001-05-09 Jeffrey Oldham <oldham@codesourcery.com> + + * ltcf-cxx.sh: Add -nostdlib to IRIX 6 archive_cmds. + +Mon Apr 23 09:15:03 2001 Anthony Green <green@redhat.com> + + * configure.in: Move *-chorusos target case to the proper switch. + Disable libgcj. + +2001-04-13 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + + * Makefile.in (STAGE1_CFLAGS): Pass down. + +2001-04-13 Alan Modra <amodra@one.net.au> + + * config.guess: Add hppa64-linux support. Note for next import that + this is already in the master file. + * configure.in: Likewise. Accept `parisc' alias for `hppa'. + +2001-03-22 Colin Howell <chowell@redhat.com> + + * Makefile.in (DO_X): Do not backslash single-quotes in + backquotes (two places). + +2001-03-18 Laurynas Biveinis <lauras@softhome.net> + + * Makefile.in (DO_X): Quote nested quotes. + +2001-03-15 Laurynas Biveinis <lauras@softhome.net> + + * Makefile.in (DO_X): Use double quotes for quoting + "RANLIB=$${RANLIB}". + +2001-03-09 Nicola Pero <n.pero@mi.flashnet.it> + + * configure.in: Only use `lang_requires' for languages athat are + actually enabled. + +2001-03-07 Tom Tromey <tromey@redhat.com> + + * configure.in: Allow config-lang.in to set `lang_requires' to list + of other required languages. + +2001-03-06 Laurynas Biveinis <lauras@softhome.net> + + * Makefile.in: Remove RANLIB definition. Use RANLIB + in RANLIB_FOR_TARGET, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS, + EXTRA_GCC_FLAGS, $(DO_X) targets only when the RANLIB is set. + +2001-02-28 Benjamin Kosnik <bkoz@redhat.com> + Alexandre Oliva <aoliva@redhat.com> + + * Makefile.in (check-c++): Use tabs, not spaces. + +2001-02-19 Benjamin Kosnik <bkoz@redhat.com> + + * Makefile.in (check-c++): New rule. + + * configure.in (target_libs): Remove libg++. + (noconfigdirs): Remove libg++. + (noconfigdirs): Same. + (noconfigdirs): Same. + (noconfigdirs): Same. + + * config-ml.in: Remove libg++ references. + + * Makefile.in (TARGET_CONFIGDIRS): Remove libio, libstdc++, libg++. + (ALL_TARGET_MODULES): Same. + (configure-target-libg++): Remove. + (all-target-libg++): Remove. + (configure-target-libio): Remove. + (all-target-libio): Remove. + (check-target-libio): Remove. + (.PHONY): Remove. + (libg++.tar.bz2): Remove. + (all-target-cygmon): Remove libio. + (all-target-libstdc++): Remove. + (configure-target-libstdc++): Remove. + (TARGET_LIB_PATH): Remove libstdc++. + (ALL_GCC_CXX): Remove libstdc++. + (all-target-gperf): Correct. + +2001-02-15 Anthony Green <green@redhat.com> + + * configure: Introduce GCJ_FOR_TARGET. + * configure.in: Ditto. + * Makefile.in: Ditto. + +2001-02-08 Chandrakala Chavva <cchavva@redhat.com> + + * configure.in: for *-chorusos, don't config target-newlib and + target-libgloss. + +2001-02-04 Mark Mitchell <mark@codesourcery.com> + + Remove V2 C++ library. + * configure.in: Remove --enable-libstdcxx_v3 support. + +2001-01-27 Richard Henderson <rth@redhat.com> + + * configure.in (target_makefile_frag) [alpha*-*]: Use mt-alphaieee. + +2001-01-26 Tom Tromey <tromey@redhat.com> + + * configure.in: Allow libgcj to be built on Sparc Solaris. + +2001-01-23 Bryce McKinlay <bryce@albatross.co.nz> + + * configure.in: Enable libgcj on several additional platforms. + +2001-01-22 Bryce McKinlay <bryce@albatross.co.nz> + + * configure.in: Enable libgcj for linux targets. + +2001-01-09 Mike Stump <mrs@wrs.com> + + * Makefile.in (CONFIGURE_TARGET_MODULES): Pass back configuration + failures of subdirectories. + +2001-01-02 Laurynas Biveinis <lauras@softhome.net> + + * configure: handle DOS-style absolute paths. + +2001-01-02 Laurynas Biveinis <lauras@softhome.net> + + * configure.in: remove supported directories from $noconfigdirs for DJGPP. + +2000-12-18 Benjamin Kosnik <bkoz@redhat.com> + + * Makefile.in (BASE_FLAGS_TO_PASS): Alphabetize. + (libstdcxx_incdir): Pass down. + * config.if: Remove expired bits for cxx_interface, add stub. + (libstdcxx_incdir): Add variable for g++ include directory. + * configure.in (gxx_include_dir): Use it. + +2000-12-15 Andreas Jaeger <aj@suse.de> + + * configure.in: Handle lang_dirs. + +2000-12-13 Anthony Green <green@redhat.com> + + * configure.in: Disable libgcj for any target not specifically + listed. Disable libgcj for x86 and Alpha Linux until compatible + with g++ abi. + +2000-12-13 Mike Stump <mrs@wrs.com> + + * Makefile.in (local-distclean): Also remove fastjar. + +2000-12-10 Anthony Green <green@redhat.com> + + * configure.in: Define libgcj. Disable libgcj target libraries for + most targets. + +2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> + + * configure.in (target_libs): Revert 2000-12-08 patch. + (noconfigdirs): Added target-libjava. + +2000-12-09 Laurynas Biveinis <lauras@softhome.net> + + * Makefile.in: handle DOS-style absolute paths. + +2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com> + + * Makefile.in (TARGET_CONFIGDIRS): Wrong place. Removed note about + libjava. + * configure.in (target_libs): Removed `target-libjava'. + +2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com> + + * Makefile.in (TARGET_CONFIGDIRS): Added note about libjava. + (ALL_MODULES): Added fastjar. + (NATIVE_CHECK_MODULES, INSTALL_MODULES, CLEAN_MODULES): Likewise. + (all-target-libjava): all-fastjar replaces all-zip. + (all-fastjar): Added. + (configure-target-fastjar, all-target-fastjar): Likewise. + * configure.in (host_tools): Added fastjar. + +2000-12-07 Mike Stump <mrs@wrs.com> + + * Makefile.in (local-distclean): Remove leftover built files. + +2000-11-16 Fred Fish <fnf@be.com> + + * configure.in (enable_libstdcxx_v3): Fix typo, + libstd++ -> libstdc++. + +2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> + + * configure: Provide the original toplevel configure arguments + (including $0) to subprocesses in the environment rather than + through gcc/configargs.h. + +2000-11-12 Mark Mitchell <mark@codesourcery.com> + + * configure: Turn on libstdc++ V3 by default. + +2000-10-16 Michael Meissner <meissner@redhat.com> + + * configure (gcc/configargs.h): Only create if there is a build GCC + directory created. + +2000-10-05 Phil Edwards <pme@gcc.gnu.org> + + * configure: Save configure arguments to gcc/configargs.h. + +2000-10-04 Andris Pavenis <pavenis@latnet.lv> + + * Makefile.in (bootstrap): avoid recursion if subdir missing + (cross): ditto + (do-proto-toplev): ditto + +Wed Sep 13 11:11:29 2000 Jeffrey A Law (law@cygnus.com) + + * configure.in: Do not build byacc for hppa64. Provide paths to the + X11 libraries for hppa64. + +2000-09-02 Anthony Green <green@cygnus.com> + + * Makefile.in (all-gcc): Depend on all-zlib. + (CLEAN_MODULES): Add clean-zlib. + (ALL_MODULES): Add all-zlib. + * configure.in (host_libs): Add zlib. + +2000-08-25 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (FLAGS_FOR_TARGET): Use $target_configdirs and + $targargs to tell whether newlib is going to be built. + + * configure.in [disable-libstdcxx-v3] (libstdcxx_flags): Search + $$r/TARGET_SUBDIR/libio for _G_config.h. + +2000-08-14 Zack Weinberg <zack@wolery.cumb.org> + + * configure.in (libstdcxx_flags): Remove -isystem $$s/libio/stdio. + + * configure: Make enable_threads and enable_shared defaults + explicit. Substitute enable_threads into generated Makefiles. + * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. + * libtool.m4: Accept *-*-linux* not just *-*-linux-gnu*. + +2000-08-02 Manfred Hollstein <manfredh@redhat.com> + + * configure.in: Re-enable all references to libg++ and librx. + +2002-04-09 Loren James Rittle <rittle@labs.mot.com> + + * configure.in: Add *-*-freebsd* configurations. + +2002-04-07 Andrew Cagney <ac131313@redhat.com> + + * Makefile.in (do-tar-bz2): Delete rule. Replace with ... + (do-tar, do-bz2): New rules. + (taz): Update. Replace do-tar-bz2 with do-tar and do-bz2. + (gdb-tar): New rule. + (gdb-taz): Rewrite. Use gdb-tar and do-bz2. + (insight_dejagnu.tar): New rule. + (insight.tar): New rule. + (gdb+dejagnu.tar): New rule. + (gdb.tar): New rule. + +2002-04-07 Andrew Cagney <ac131313@redhat.com> + + * MAINTAINERS: Update dejagnu/ + +2002-03-16 Alexandre Oliva <aoliva@redhat.com> + + * ltmain.sh (relink_command): Fix typo in previous change. + +2002-03-15 Alexandre Oliva <aoliva@redhat.com> + + * ltmain.sh (taglist): Initialized. Don't let `CC' tag out of it. + (relink_command): Added --tag flags. + (mode=install): If relinking fails; error out. + +2002-03-12 Richard Henderson <rth@redhat.com> + + * Makefile.in (NOTPARALLEL): New. Use it instead of explicit + .NOTPARALLEL tag. + (do-check): Rename from check. + (check): Allow parallel check. + +2002-03-11 Richard Henderson <rth@redhat.com> + + * Makefile.in (.NOTPARALLEL): Add fake tag. + +2002-03-07 H.J. Lu (hjl@gnu.org) + + * configure.in: Enable gprof for mips*-*-linux*. + +2002-02-28 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (libstdcxx_flags): Don't add libstdc++-v3 flags for + libjava. + (CXX_FOR_TARGET): Add -shared-libgcc for libstdc++-v3 and libjava. + +2002-02-24 Andrew Cagney <ac131313@redhat.com> + + * texinfo/texinfo.tex: Update to version 2002-02-14.08. + 2002-02-23 Daniel Jacobowitz <drow@mvista.com> * config.guess: Import from master sources, rev 1.232. * config.sub: Import from master sources, rev 1.246. +2002-02-23 Alexandre Oliva <aoliva@redhat.com> + + * Makefile.in (MAKEINFO): Don't assume makeinfo will be built just + because its Makefile is there; test for the executable instead. + 2002-02-09 Alexandre Oliva <aoliva@redhat.com> Contribute sh64-elf. @@ -11,8 +683,8 @@ 2002-02-04 Jeff Johnston <jjohnstn@redhat.com> - * COPYING.NEWLIB: Remove advertising clause from - Berkeley and Red Hat licenses. + * COPYING.NEWLIB: Remove advertising clause from + Berkeley and Red Hat licenses. 2002-02-01 Mo DeJong <supermo@bayarea.net> @@ -88,7 +760,7 @@ 2001-12-05 Laurent Guerby <guerby@acm.org> * MAINTAINERS: gcc adopts symlink-tree, refer more to - libiberty. + libiberty. Import this patch from gcc: @@ -154,7 +826,7 @@ 2001-11-12 Hans-Peter Nilsson <hp@bitrange.com> - * COPYING.NEWLIB: Add BSD-style license/copyright blurb for my work. + * COPYING.NEWLIB: Add BSD-style license/copyright blurb for my work. 2001-11-08 Phil Edwards <pedwards@disaster.jaj.com> @@ -442,7 +1114,7 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 2001-01-07 Andreas Jaeger <aj@suse.de> - * config.sub, config.guess: Update from subversions. + * config.sub, config.guess: Update from subversions. 2000-12-12 Alexandre Oliva <aoliva@redhat.com> @@ -486,8 +1158,8 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 2000-10-30 Stephane Carrez <stcarrez@worldnet.fr> - * configure.in (noconfigdirs): Don't compile some - of the libraries for 68HC11 & 68hc12 targets. + * configure.in (noconfigdirs): Don't compile some + of the libraries for 68HC11 & 68hc12 targets. 2000-09-30 Alexandre Oliva <aoliva@redhat.com> @@ -650,7 +1322,7 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 2000-07-01 Koundinya K <kk@ddeorg.soft.net> - * ltconfig: Add support for mips-dde-sysv4.2MP + * ltconfig: Add support for mips-dde-sysv4.2MP 2000-06-28 Corinna Vinschen <vinschen@cygnus.com> @@ -678,12 +1350,12 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 20000-05-21 H.J. Lu (hjl@gnu.org) - * Makefile.in (CC_FOR_TARGET): Make sure as/ld in the gcc - directory are used if they exist. Make sure - $(build_tooldir)/include is searched for header files, - $(build_tooldir)/lib/ for library files. + * Makefile.in (CC_FOR_TARGET): Make sure as/ld in the gcc + directory are used if they exist. Make sure + $(build_tooldir)/include is searched for header files, + $(build_tooldir)/lib/ for library files. (GCC_FOR_TARGET): Likewise. - (CXX_FOR_TARGET): Likewise. + (CXX_FOR_TARGET): Likewise. 2000-05-18 Jeffrey A Law (law@cygnus.com) @@ -731,7 +1403,7 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 2000-05-08 Eli Zaretskii <eliz@is.elta.co.il> * djunpack.bat: Change the Sed script to replace @V@ in fnchange.lst - with the version name. + with the version name. 2000-05-01 Benjamin Kosnik <bkoz@cygnus.com> @@ -750,8 +1422,8 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> 2000-04-16 Dave Pitts <dpitts@cozx.com> - * config.sub (case $basic_machine): Change default for "ibm-*" - to "openedition". + * config.sub (case $basic_machine): Change default for "ibm-*" + to "openedition". 2000-04-12 Andrew Cagney <cagney@b1.cygnus.com> @@ -772,13 +1444,13 @@ Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com> * configure (warn_cflags): Delete. 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com> - Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de> + Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de> - * configure.in (enable_libstdcxx_v3): Add. - (target_libs): Add bits here to switch between libstdc++-v2 and - libstdc++-v3. - * config.if: And this file too. - * Makefile.in: Add libstdc++-v3 targets. + * configure.in (enable_libstdcxx_v3): Add. + (target_libs): Add bits here to switch between libstdc++-v2 and + libstdc++-v3. + * config.if: And this file too. + * Makefile.in: Add libstdc++-v3 targets. 2000-04-05 Michael Meissner <meissner@redhat.com> @@ -959,15 +1631,15 @@ Tue Jun 22 23:45:18 1999 Tom Tromey <tromey@cygnus.com> (configure-target-boehm-gc): New target. (configure-target-qthreads): New target. - * configure.in (target_libs): Added target-qthreads. - * Makefile.in (ALL_TARGET_MODULES): Added qthreads. - (CONFIGURE_TARGET_MODULES): Likewise. - (CHECK_TARGET_MODULES): Likewise. - (INSTALL_TARGET_MODULES): Likewise. - (CLEAN_TARGET_MODULES): Likewise. - (all-target-qthreads): New target. - (configure-target-libjava): Depend on configure-target-qthreads. - (all-target-libjava): Depend on all-target-qthreads. + * configure.in (target_libs): Added target-qthreads. + * Makefile.in (ALL_TARGET_MODULES): Added qthreads. + (CONFIGURE_TARGET_MODULES): Likewise. + (CHECK_TARGET_MODULES): Likewise. + (INSTALL_TARGET_MODULES): Likewise. + (CLEAN_TARGET_MODULES): Likewise. + (all-target-qthreads): New target. + (configure-target-libjava): Depend on configure-target-qthreads. + (all-target-libjava): Depend on all-target-qthreads. * Makefile.in (ALL_TARGET_MODULES): Added libjava, boehm-gc. (CONFIGURE_TARGET_MODULES): Likewise. @@ -1055,7 +1727,7 @@ Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> Bad merge removed these two changes. Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com) - Martin Heller (Ing.-Buero_Heller@t-online.de) + Martin Heller (Ing.-Buero_Heller@t-online.de) * config.guess (interix Alpha): Add. @@ -1112,7 +1784,7 @@ Fri Apr 2 15:11:32 1999 H.J. Lu (hjl@gnu.org) 1999-03-21 Ben Elliston <bje@cygnus.com> - * config.guess: Correct typo for detecting ELF on FreeBSD. + * config.guess: Correct typo for detecting ELF on FreeBSD. Thu Mar 18 00:17:50 1999 Mark Elbrecht <snowball3@usa.net> @@ -1222,8 +1894,8 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com> 1999-02-02 Catherine Moore <clm@cygnus.com> - * config.sub (oabi): Recognize. - * configure.in (arm-*-oabi): Handle. + * config.sub (oabi): Recognize. + * configure.in (arm-*-oabi): Handle. 1999-01-30 Robert Lipe (robertlipe@usa.net) @@ -1311,8 +1983,8 @@ Wed Nov 18 20:13:29 1998 Christopher Faylor <cgf@cygnus.com> 1998-11-17 Geoffrey Noer <noer@cygnus.com> - * Makefile.in: modify CC_FOR_TARGET and CXX_FOR_TARGET so that - they include winsup/include when it's a cygwin target. + * Makefile.in: modify CC_FOR_TARGET and CXX_FOR_TARGET so that + they include winsup/include when it's a cygwin target. 1998-11-12 Tom Tromey <tromey@cygnus.com> @@ -1338,7 +2010,7 @@ Wed Nov 18 20:13:29 1998 Christopher Faylor <cgf@cygnus.com> 1998-11-02 Geoffrey Noer <noer@cygnus.com> - * configure.in: drop "32" from config/mh-cygwin32. Check + * configure.in: drop "32" from config/mh-cygwin32. Check cygwin* instead of cygwin32*. * config.sub: Check cygwin* instead of cygwin32*. @@ -1935,7 +2607,7 @@ Fri Mar 6 00:14:55 1998 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> Mon Feb 23 15:09:18 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de - * config.sub (sco5): Fix typo. + * config.sub (sco5): Fix typo. Mon Feb 23 14:46:06 1998 Ian Lance Taylor <ian@cygnus.com> @@ -2247,10 +2919,10 @@ Sat Nov 8 14:42:59 1997 Michael Meissner <meissner@cygnus.com> Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com> - * include/libiberty.h: Add extern "C" { so it can be used with C++ - progrms. - * include/remote-sim.h: Add extern "C" { so it can be used with C++ - programs. + * include/libiberty.h: Add extern "C" { so it can be used with C++ + progrms. + * include/remote-sim.h: Add extern "C" { so it can be used with C++ + programs. Thu Oct 30 11:09:29 1997 Michael Meissner <meissner@cygnus.com> @@ -2374,7 +3046,7 @@ Sun Sep 7 15:55:28 1997 Gavin Koch <gavin@cygnus.com> Fri Sep 5 16:11:28 1997 Joel Sherrill (joel@OARcorp.com) - * configure.in (*-*-rtems*): Do not build libgloss for rtems. + * configure.in (*-*-rtems*): Do not build libgloss for rtems. Fri Sep 5 12:27:17 1997 Jeffrey A Law (law@cygnus.com) @@ -2442,7 +3114,7 @@ Thu Aug 14 14:42:17 1997 Ian Lance Taylor <ian@cygnus.com> * configure: When handling a Canadian Cross, handle YACC as well as BISON. Just set BISON to bison. When setting YACC, prefer bison. - * Makefile.in (all-bison): Depend upon all-texinfo. + * Makefile.in (all-bison): Depend upon all-texinfo. Tue Aug 12 20:09:48 1997 Jason Merrill <jason@yorick.cygnus.com> @@ -2775,7 +3447,7 @@ Tue Apr 1 16:28:50 1997 Klaus Kaempf <kkaempf@progis.de> Mon Mar 31 16:26:55 1997 Joel Sherrill <joel@oarcorp.com> - * configure.in (hppa1.1-*-rtems*): New target, like hppa-*-*elf*. + * configure.in (hppa1.1-*-rtems*): New target, like hppa-*-*elf*. Sun Mar 30 12:38:27 1997 Fred Fish <fnf@cygnus.com> @@ -3127,11 +3799,11 @@ Wed Oct 9 17:24:59 1996 Per Bothner <bothner@deneb.cygnus.com> * config.guess: Merge from FSF. 1996-09-12 Richard Stallman <rms@ethanol.gnu.ai.mit.edu> - * config.guess: Use pc instead of unknown, for pc clone systems. - Change linux to linux-gnu. + * config.guess: Use pc instead of unknown, for pc clone systems. + Change linux to linux-gnu. Mon Jul 15 23:51:11 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> - * config.guess: Avoid non-portable tr syntax. + * config.guess: Avoid non-portable tr syntax. Wed Oct 9 06:06:46 1996 Jeffrey A Law (law@cygnus.com) @@ -3405,9 +4077,9 @@ Mon Jun 24 15:01:12 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil> Sun Jun 23 22:41:54 1996 Geoffrey Noer <noer@cygnus.com> - * configure.in: enable dosrel for cygwin32-hosted builds, - remove diff from the list of things not buildable - via Canadian Cross + * configure.in: enable dosrel for cygwin32-hosted builds, + remove diff from the list of things not buildable + via Canadian Cross Sat Jun 22 11:39:01 1996 Jason Merrill <jason@yorick.cygnus.com> @@ -3609,8 +4281,8 @@ Thu Mar 28 14:11:11 1996 Tom Tromey <tromey@creche.cygnus.com> Tue Mar 26 21:18:50 1996 Andrew Cagney <cagney@kremvax.highland.com.au> - * configure (--enable-*): Handle quoted option lists such as - --enable-sim-cflags='-g0 -O' better. + * configure (--enable-*): Handle quoted option lists such as + --enable-sim-cflags='-g0 -O' better. Thu Mar 21 11:53:08 1996 Michael Meissner <meissner@tiktok.cygnus.com> @@ -4611,7 +5283,7 @@ Fri Apr 14 15:21:17 1995 Doug Evans <dje@chestnut.cygnus.com> Wed Apr 12 16:06:01 1995 Jason Merrill <jason@phydeaux.cygnus.com> * test-build.mk: Enable building of shared libraries on IRIX 5 and - OSF/1. Fix compiler flags. + OSF/1. Fix compiler flags. * build-all.mk: Support Linux and OSF/1 3.0. Fix compiler flags. Tue Apr 11 18:55:40 1995 Doug Evans <dje@canuck.cygnus.com> @@ -5045,21 +5717,21 @@ Fri Aug 26 13:05:27 1994 Per Bothner (bothner@kalessin.cygnus.com) Thu Aug 25 20:28:51 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> * config.guess (Pyramid*:OSx*:*:*): New case. - (PATH): Add /.attbin at end for finding uname. - (dummy.c): Handle i860-alliant-bsd. Follow whitespace conventions. + (PATH): Add /.attbin at end for finding uname. + (dummy.c): Handle i860-alliant-bsd. Follow whitespace conventions. Wed Aug 17 18:21:02 1994 Tor Egge (tegge@pvv.unit.no) - * config.guess (M88*:DolphinOS:*:*): New case. + * config.guess (M88*:DolphinOS:*:*): New case. Thu Aug 11 17:00:13 1994 Stan Cox (coxs@dg-rtp.dg.com) - * config.guess (AViiON:dgux:*:*): Use TARGET_BINARY_INTERFACE - to select whether to use ELF or COFF. + * config.guess (AViiON:dgux:*:*): Use TARGET_BINARY_INTERFACE + to select whether to use ELF or COFF. Sun Jul 24 16:20:53 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> - * config.guess: Recognize i860-stardent-sysv and i860-unknown-sysv. + * config.guess: Recognize i860-stardent-sysv and i860-unknown-sysv. Sun May 1 10:23:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -5398,7 +6070,7 @@ Thu Apr 14 23:33:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Wed Apr 13 15:14:52 1994 Bill Cox (bill@cygnus.com) * configure: Make file links cleanly even if Lynx fails on - an NFS symlink (at least fail cleanly). + an NFS symlink (at least fail cleanly). Mon Apr 11 10:58:56 1994 Jim Wilson (wilson@sphagnum.cygnus.com) @@ -5551,7 +6223,7 @@ Sat Feb 5 01:00:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Wed Feb 2 13:57:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - * Makefile.in: Avoid bug in losing hpux sed. + * Makefile.in: Avoid bug in losing hpux sed. Wed Feb 2 14:53:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) @@ -6986,8 +7658,8 @@ Thu Oct 29 00:12:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) ranlib. * configure: also define $(host_canonical) and - $(target_canonical), which are the full, canonical names for the - given host and target + $(target_canonical), which are the full, canonical names for the + given host and target Sun Nov 1 16:38:17 1992 Per Bothner (bothner@cygnus.com) @@ -7135,7 +7807,7 @@ Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com) Tue Aug 11 23:13:17 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - * COPYING: new file, GPL v2 + * COPYING: new file, GPL v2 Tue Aug 4 01:12:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) diff --git a/contrib/binutils/MAINTAINERS b/contrib/binutils/MAINTAINERS index 75f3240..104b815 100644 --- a/contrib/binutils/MAINTAINERS +++ b/contrib/binutils/MAINTAINERS @@ -33,9 +33,12 @@ readline/support/config.sub; readline/support/config.guess gdb-patches@sources.redhat.com dejagnu/ - Notify http://dejagnu.sourceforge.net/ of generic changes. - Generic patches to gdb-patches@sources.redhat.com; - Other dependents of dejagnu include sid@, binutils@, gcc@, etc. + Send all patches to: + http://www.gnu.org/software/dejagnu/ + mail:bug-dejagnu@gnu.org + For changes to the local repostory, send them to + gdb-patches@sources.redhat.com when generic; and sid@, + binutils@, gcc@, etc. for sub-components. gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/ gdb: http://sources.redhat.com/gdb/ diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in index 1a1494c..c3caa1d 100644 --- a/contrib/binutils/Makefile.in +++ b/contrib/binutils/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for directory with subdirs to build. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001 Free Software Foundation +# 1999, 2000, 2001, 2002 Free Software Foundation # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,12 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # +# Tell GNU make 3.79 not to run the top level in parallel. This +# prevents contention for $builddir/$target/config.cache, as well +# as minimizing scatter in file system caches. +NOTPARALLEL = .NOTPARALLEL +$(NOTPARALLEL): + srcdir = . prefix = /usr/local @@ -59,6 +65,12 @@ GDB_NLM_DEPS = SHELL = /bin/sh +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +PWD = $${PWDCMD-pwd} + # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a # cygwin host. INSTALL_PROGRAM_ARGS = @@ -78,8 +90,8 @@ CC = cc # Special variables passed down in EXTRA_GCC_FLAGS. They are defined # here so that they can be overridden by Makefile fragments. HOST_CC = $(CC_FOR_BUILD) -HOST_PREFIX = -HOST_PREFIX_1 = loser- +BUILD_PREFIX = +BUILD_PREFIX_1 = loser- # These flag values are normally overridden by the configure script. CFLAGS = -g @@ -87,14 +99,17 @@ CXXFLAGS = -g -O2 LDFLAGS = LIBCFLAGS = $(CFLAGS) -CFLAGS_FOR_TARGET = $(CFLAGS) +CFLAGS_FOR_BUILD = $(CFLAGS) +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) LDFLAGS_FOR_TARGET = LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) PICFLAG = PICFLAG_FOR_TARGET = -CHILLFLAGS = $(CFLAGS) -CHILL_LIB = -lchill CXX = c++ # Use -O2 to stress test the compiler. @@ -102,8 +117,6 @@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates CXXFLAGS_FOR_TARGET = $(CXXFLAGS) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -RANLIB = ranlib - DLLTOOL = dlltool WINDRES = windres @@ -143,7 +156,7 @@ M4 = `if [ -f $$r/m4/m4 ] ; \ # For an installed makeinfo, we require it to be from texinfo 4 or # higher, else we use the "missing" dummy. -MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ +MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ then echo $$r/texinfo/makeinfo/makeinfo ; \ else if (makeinfo --version \ | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \ @@ -173,7 +186,7 @@ OTHERS = # This is set by the configure script to the list of directories which # should be built using the target tools. -TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc +TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes libf2c libobjc # Target libraries are put under this directory: # Changed by configure to $(target_alias) if cross. @@ -204,7 +217,7 @@ HOST_LIB_PATH = $$r/bfd:$$r/opcodes # This is the list of directories that may be needed in RPATH_ENVVAR # so that prorgams built for the target machine work. -TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libstdc++ +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: # configure.in sets SET_LIB_PATH to this if --enable-shared was used. # Some platforms don't like blank entries, so we remove duplicate, @@ -230,9 +243,9 @@ INSTALL_TARGET_CROSS = installdirs \ # Should be substed by configure.in FLAGS_FOR_TARGET = CC_FOR_TARGET = -CHILL_FOR_TARGET = CXX_FOR_TARGET = CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = +GCJ_FOR_TARGET = # If GCC_FOR_TARGET is not overriden on the command line, then this # variable is passed down to the gcc Makefile, where it is used to @@ -353,9 +366,7 @@ BASE_FLAGS_TO_PASS = \ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ "CFLAGS=$(CFLAGS)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "CHILLFLAGS=$(CHILLFLAGS)" \ - "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ - "CHILL_LIB=$(CHILL_LIB)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ "CXXFLAGS=$(CXXFLAGS)" \ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ @@ -393,6 +404,8 @@ BASE_FLAGS_TO_PASS = \ "libdir=$(libdir)" \ "libexecdir=$(libexecdir)" \ "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ "localstatedir=$(localstatedir)" \ "mandir=$(mandir)" \ "oldincludedir=$(oldincludedir)" \ @@ -405,8 +418,7 @@ BASE_FLAGS_TO_PASS = \ "gxx_include_dir=$(gxx_include_dir)" \ "gcc_version=$(gcc_version)" \ "gcc_version_trigger=$(gcc_version_trigger)" \ - "target_alias=$(target_alias)" \ - "libsubdir=$(libsubdir)" + "target_alias=$(target_alias)" # For any flags above that may contain shell code that varies from one # target library to another. When doing recursive invocations of the @@ -427,7 +439,7 @@ EXTRA_HOST_FLAGS = \ 'DLLTOOL=$(DLLTOOL)' \ 'LD=$(LD)' \ 'NM=$(NM)' \ - 'RANLIB=$(RANLIB)' \ + "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ 'WINDRES=$(WINDRES)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) @@ -478,20 +490,21 @@ EXTRA_GCC_FLAGS = \ 'CXX=$(CXX)' \ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ 'HOST_CC=$(CC_FOR_BUILD)' \ - 'HOST_PREFIX=$(HOST_PREFIX)' \ - 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ 'NM=$(NM)' \ - 'RANLIB=$(RANLIB)' \ + "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ 'WINDRES=$$(WINDRES_FOR_TARGET)' \ "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) @@ -511,7 +524,6 @@ CONFIGURE_BUILD_MODULES = \ # This is a list of the targets for all of the modules which are compiled # using $(FLAGS_TO_PASS). ALL_MODULES = \ - all-apache \ all-ash \ all-autoconf \ all-automake \ @@ -521,13 +533,12 @@ ALL_MODULES = \ all-bison \ all-byacc \ all-bzip2 \ - all-cgen \ - all-cvssrc \ all-db \ all-dejagnu \ all-diff \ all-dosutils \ all-etc \ + all-fastjar \ all-fileutils \ all-findutils \ all-find \ @@ -538,13 +549,10 @@ ALL_MODULES = \ all-gnuserv \ all-gprof \ all-grep \ - all-grez \ all-gzip \ all-hello \ all-indent \ - all-inet \ all-intl \ - all-ispell \ all-itcl \ all-ld \ all-libgui \ @@ -569,10 +577,8 @@ ALL_MODULES = \ all-snavigator \ all-tar \ all-tcl \ - all-tcl8.1 \ all-texinfo \ all-textutils \ - all-tgas \ all-time \ all-uudecode \ all-wdiff \ @@ -589,11 +595,11 @@ ALL_MODULES = \ NATIVE_CHECK_MODULES = \ check-bison \ check-byacc \ + check-fastjar \ check-flex \ check-zip CROSS_CHECK_MODULES = \ - check-apache \ check-ash \ check-autoconf \ check-automake \ @@ -601,8 +607,6 @@ CROSS_CHECK_MODULES = \ check-bfd \ check-binutils \ check-bzip2 \ - check-cgen \ - check-cvssrc \ check-db \ check-dejagnu \ check-diff \ @@ -619,9 +623,7 @@ CROSS_CHECK_MODULES = \ check-gzip \ check-hello \ check-indent \ - check-inet \ check-intl \ - check-ispell \ check-itcl \ check-ld \ check-libgui \ @@ -647,7 +649,6 @@ CROSS_CHECK_MODULES = \ check-tcl \ check-texinfo \ check-textutils \ - check-tgas \ check-time \ check-uudecode \ check-wdiff \ @@ -663,7 +664,6 @@ CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) # We put install-tcl before install-itcl because itcl wants to run a # program on installation which uses the Tcl libraries. INSTALL_MODULES = \ - install-apache \ install-ash \ install-autoconf \ install-automake \ @@ -674,13 +674,12 @@ INSTALL_MODULES = \ install-binutils \ install-bison \ install-byacc \ - install-cgen \ - install-cvssrc \ install-db \ install-dejagnu \ install-diff \ install-dosutils \ install-etc \ + install-fastjar \ install-fileutils \ install-findutils \ install-find \ @@ -691,15 +690,11 @@ INSTALL_MODULES = \ install-gnuserv \ install-gprof \ install-grep \ - install-grez \ install-gzip \ install-hello \ install-indent \ - install-inet \ install-intl \ - install-ispell \ install-tcl \ - install-tcl8.1 \ install-itcl \ install-ld \ install-libgui \ @@ -722,7 +717,6 @@ INSTALL_MODULES = \ install-snavigator \ install-tar \ install-textutils \ - install-tgas \ install-time \ install-uudecode \ install-wdiff \ @@ -732,25 +726,19 @@ INSTALL_MODULES = \ # This is a list of the targets for all of the modules which are compiled # using $(X11_FLAGS_TO_PASS). ALL_X11_MODULES = \ - all-emacs \ - all-emacs19 \ all-gdb \ all-expect \ - all-gash \ all-guile \ all-tclX \ all-tk \ - all-tk8.1 \ all-tix # This is a list of the check targets for all of the modules which are # compiled using $(X11_FLAGS_TO_PASS). CHECK_X11_MODULES = \ - check-emacs \ check-gdb \ check-guile \ check-expect \ - check-gash \ check-tclX \ check-tk \ check-tix @@ -758,28 +746,19 @@ CHECK_X11_MODULES = \ # This is a list of the install targets for all the modules which are # compiled using $(X11_FLAGS_TO_PASS). INSTALL_X11_MODULES = \ - install-emacs \ - install-emacs19 \ install-gdb \ install-guile \ install-expect \ - install-gash \ install-tclX \ install-tk \ - install-tk8.1 \ install-tix # This is a list of the targets for all of the modules which are compiled # using $(TARGET_FLAGS_TO_PASS). ALL_TARGET_MODULES = \ - all-target-libio \ - all-target-libstdc++ \ all-target-libstdc++-v3 \ - all-target-librx \ - all-target-libg++ \ all-target-newlib \ all-target-libf2c \ - all-target-libchill \ all-target-libobjc \ all-target-libtermcap \ all-target-winsup \ @@ -787,26 +766,18 @@ ALL_TARGET_MODULES = \ all-target-libiberty \ all-target-gperf \ all-target-examples \ - all-target-libstub \ all-target-libffi \ all-target-libjava \ all-target-zlib \ all-target-boehm-gc \ - all-target-qthreads \ - all-target-bsp \ - all-target-cygmon + all-target-qthreads # This is a list of the configure targets for all of the modules which # are compiled using the target tools. CONFIGURE_TARGET_MODULES = \ - configure-target-libio \ - configure-target-libstdc++ \ configure-target-libstdc++-v3 \ - configure-target-librx \ - configure-target-libg++ \ configure-target-newlib \ configure-target-libf2c \ - configure-target-libchill \ configure-target-libobjc \ configure-target-libtermcap \ configure-target-winsup \ @@ -814,25 +785,18 @@ CONFIGURE_TARGET_MODULES = \ configure-target-libiberty \ configure-target-gperf \ configure-target-examples \ - configure-target-libstub \ configure-target-libffi \ configure-target-libjava \ configure-target-zlib \ configure-target-boehm-gc \ - configure-target-qthreads \ - configure-target-bsp \ - configure-target-cygmon + configure-target-qthreads # This is a list of the check targets for all of the modules which are # compiled using $(TARGET_FLAGS_TO_PASS). CHECK_TARGET_MODULES = \ - check-target-libio \ - check-target-libstdc++ \ check-target-libstdc++-v3 \ - check-target-libg++ \ check-target-newlib \ check-target-libf2c \ - check-target-libchill \ check-target-libobjc \ check-target-winsup \ check-target-libiberty \ @@ -846,19 +810,14 @@ CHECK_TARGET_MODULES = \ # This is a list of the install targets for all of the modules which are # compiled using $(TARGET_FLAGS_TO_PASS). INSTALL_TARGET_MODULES = \ - install-target-libio \ - install-target-libstdc++ \ install-target-libstdc++-v3 \ - install-target-libg++ \ install-target-newlib \ install-target-libf2c \ - install-target-libchill \ install-target-libobjc \ install-target-libtermcap \ install-target-winsup \ install-target-libgloss \ install-target-libiberty \ - install-target-bsp \ install-target-libjava \ install-target-zlib \ install-target-boehm-gc \ @@ -867,7 +826,6 @@ INSTALL_TARGET_MODULES = \ # This is a list of the targets for which we can do a clean-{target}. CLEAN_MODULES = \ - clean-apache \ clean-ash \ clean-autoconf \ clean-automake \ @@ -877,13 +835,12 @@ CLEAN_MODULES = \ clean-bison \ clean-byacc \ clean-bzip2 \ - clean-cgen \ - clean-cvssrc \ clean-db \ clean-dejagnu \ clean-diff \ clean-dosutils \ clean-etc \ + clean-fastjar \ clean-fileutils \ clean-findutils \ clean-find \ @@ -894,13 +851,10 @@ CLEAN_MODULES = \ clean-gnuserv \ clean-gprof \ clean-grep \ - clean-grez \ clean-gzip \ clean-hello \ clean-indent \ - clean-inet \ clean-intl \ - clean-ispell \ clean-itcl \ clean-ld \ clean-libgui \ @@ -927,7 +881,6 @@ CLEAN_MODULES = \ clean-tcl \ clean-texinfo \ clean-textutils \ - clean-tgas \ clean-time \ clean-uudecode \ clean-wdiff \ @@ -936,36 +889,25 @@ CLEAN_MODULES = \ # All of the target modules that can be cleaned CLEAN_TARGET_MODULES = \ - clean-target-libio \ - clean-target-libstdc++ \ clean-target-libstdc++-v3 \ - clean-target-librx \ - clean-target-libg++ \ clean-target-newlib \ clean-target-libf2c \ - clean-target-libchill \ clean-target-libobjc \ clean-target-winsup \ clean-target-libgloss \ clean-target-libiberty \ clean-target-gperf \ clean-target-examples \ - clean-target-libstub \ clean-target-libffi \ clean-target-libjava \ clean-target-zlib \ clean-target-boehm-gc \ - clean-target-qthreads \ - clean-target-bsp \ - clean-target-cygmon + clean-target-qthreads # All of the x11 modules that can be cleaned CLEAN_X11_MODULES = \ - clean-emacs \ - clean-emacs19 \ clean-gdb \ clean-expect \ - clean-gash \ clean-guile \ clean-tclX \ clean-tk \ @@ -1000,8 +942,8 @@ DO_X = \ .PHONY: $(DO_X) $(DO_X): @target=`echo $@ | sed -e 's/^do-//'`; \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ for i in $(SUBDIRS) -dummy-; do \ if [ -f ./$$i/Makefile ]; then \ @@ -1020,15 +962,15 @@ $(DO_X): if (cd ./$$i; \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ $${target}); \ then true; else exit 1; fi; \ else true; fi; \ done @target=`echo $@ | sed -e 's/^do-//'`; \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ for i in $(TARGET_CONFIGDIRS) -dummy-; do \ if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ @@ -1038,7 +980,7 @@ $(DO_X): if (cd $(TARGET_SUBDIR)/$$i; \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ + "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ $${target}); \ then true; else exit 1; fi; \ @@ -1058,7 +1000,7 @@ dvi: do-dvi do-info: all-texinfo install-info: do-install-info dir.info - s=`cd $(srcdir); pwd`; export s; \ + s=`cd $(srcdir); ${PWD}`; export s; \ if [ -f dir.info ] ; then \ $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ else true ; fi @@ -1071,6 +1013,11 @@ local-distclean: -if [ "$(TARGET_SUBDIR)" != "." ]; then \ rm -rf $(TARGET_SUBDIR); \ else true; fi + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null local-maintainer-clean: @echo "This command is intended for maintainers to use;" @@ -1088,8 +1035,8 @@ realclean: maintainer-clean $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: @dir=`echo $@ | sed -e 's/clean-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ else \ @@ -1101,8 +1048,8 @@ $(CLEAN_TARGET_MODULES): @dir=`echo $@ | sed -e 's/clean-target-//'`; \ rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ else \ @@ -1118,8 +1065,11 @@ clean-target-libgcc: # Check target. -.PHONY: check -check: $(CHECK_MODULES) \ +.PHONY: check do-check +check: + $(MAKE) do-check NOTPARALLEL=parallel-ok + +do-check: $(CHECK_MODULES) \ $(CHECK_TARGET_MODULES) \ $(CHECK_X11_MODULES) \ check-gcc @@ -1172,7 +1122,7 @@ vault-install: .PHONY: install.all install.all: install-no-fixedincludes @if [ -f ./gcc/Makefile ] ; then \ - r=`pwd` ; export r ; \ + r=`${PWD}` ; export r ; \ $(SET_LIB_PATH) \ (cd ./gcc; \ $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ @@ -1180,11 +1130,6 @@ install.all: install-no-fixedincludes true ; \ fi -# inet-install is used because the I*Net wants DejaGNU installed but -# not built. Similarly, gzip is built but not installed. -inet-install: - $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install - # install-no-fixedincludes is used because Cygnus can not distribute # the fixed header files. .PHONY: install-no-fixedincludes @@ -1207,8 +1152,8 @@ gcc-no-fixedincludes: cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ touch gcc/stmp-fixinc gcc/include/fixed; \ rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd` ; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}` ; export s; \ $(SET_LIB_PATH) \ (cd ./gcc; \ $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ @@ -1222,8 +1167,8 @@ gcc-no-fixedincludes: $(ALL_BUILD_MODULES): dir=`echo $@ | sed -e 's/all-build-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \ else \ true; \ @@ -1241,8 +1186,8 @@ $(CONFIGURE_BUILD_MODULES): elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ if [ -d $(srcdir)/$${dir} ]; then \ [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ AR="$(AR_FOR_BUILD)"; export AR; \ AS="$(AS_FOR_BUILD)"; export AS; \ CC="$(CC_FOR_BUILD)"; export CC; \ @@ -1326,8 +1271,8 @@ $(CONFIGURE_BUILD_MODULES): $(ALL_MODULES) all-gui all-libproc: @dir=`echo $@ | sed -e 's/all-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ else \ @@ -1343,8 +1288,8 @@ $(NATIVE_CHECK_MODULES): @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ dir=`echo $@ | sed -e 's/check-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ else \ @@ -1355,8 +1300,8 @@ $(NATIVE_CHECK_MODULES): $(CROSS_CHECK_MODULES): @dir=`echo $@ | sed -e 's/check-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ else \ @@ -1369,8 +1314,8 @@ $(CROSS_CHECK_MODULES): $(INSTALL_MODULES): installdirs @dir=`echo $@ | sed -e 's/install-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ else \ @@ -1383,7 +1328,7 @@ $(INSTALL_MODULES): installdirs $(CONFIGURE_TARGET_MODULES): @dir=`echo $@ | sed -e 's/configure-target-//'`; \ if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ - r=`pwd`; export r; \ + r=`${PWD}`; export r; \ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ @@ -1407,8 +1352,8 @@ $(CONFIGURE_TARGET_MODULES): elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ if [ -d $(srcdir)/$${dir} ]; then \ [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ AR="$(AR_FOR_TARGET)"; export AR; \ AS="$(AS_FOR_TARGET)"; export AS; \ @@ -1416,6 +1361,7 @@ $(CONFIGURE_TARGET_MODULES): CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CXX="$(CXX_FOR_TARGET)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ LD="$(LD_FOR_TARGET)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ @@ -1423,9 +1369,9 @@ $(CONFIGURE_TARGET_MODULES): RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ - cd $(TARGET_SUBDIR)/$${dir}; \ + cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \ case $(srcdir) in \ - /*) \ + /* | [A-Za-z]:[\\/]*) \ topdir=$(srcdir) ;; \ *) \ case "$(TARGET_SUBDIR)" in \ @@ -1467,7 +1413,7 @@ $(CONFIGURE_TARGET_MODULES): CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ $(TARGET_CONFIGARGS) $${srcdiroption} \ --with-target-subdir="$(TARGET_SUBDIR)"; \ - fi; \ + fi || exit 1; \ if [ -f skip-this-dir ] ; then \ sh skip-this-dir; \ rm -f skip-this-dir; \ @@ -1488,8 +1434,8 @@ $(CONFIGURE_TARGET_MODULES): $(ALL_TARGET_MODULES): @dir=`echo $@ | sed -e 's/all-target-//'`; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $(TARGET_SUBDIR)/$${dir}; \ $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ @@ -1503,8 +1449,8 @@ $(ALL_TARGET_MODULES): $(CHECK_TARGET_MODULES): @dir=`echo $@ | sed -e 's/check-target-//'`; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $(TARGET_SUBDIR)/$${dir}; \ $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ @@ -1519,8 +1465,8 @@ $(CHECK_TARGET_MODULES): $(INSTALL_TARGET_MODULES): installdirs @dir=`echo $@ | sed -e 's/install-target-//'`; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $(TARGET_SUBDIR)/$${dir}; \ $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ @@ -1534,8 +1480,8 @@ $(INSTALL_TARGET_MODULES): installdirs $(ALL_X11_MODULES): @dir=`echo $@ | sed -e 's/all-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; \ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ @@ -1549,8 +1495,8 @@ $(ALL_X11_MODULES): $(CHECK_X11_MODULES): @dir=`echo $@ | sed -e 's/check-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; \ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ @@ -1564,8 +1510,8 @@ $(CHECK_X11_MODULES): $(INSTALL_X11_MODULES): installdirs @dir=`echo $@ | sed -e 's/install-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; \ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ @@ -1577,8 +1523,8 @@ $(INSTALL_X11_MODULES): installdirs .PHONY: all-gcc all-gcc: @if [ -f ./gcc/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ else \ @@ -1597,13 +1543,13 @@ all-gcc: # .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap - @r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + @r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ echo "Bootstrapping the compiler"; \ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ - @r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + @r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ case "$@" in \ *bootstrap4-lean ) \ msg="Comparing stage3 and stage4 of the compiler"; \ @@ -1618,21 +1564,21 @@ bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean b $(SET_LIB_PATH) \ echo "$$msg"; \ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare - @r=`pwd`; export r; \ - s=`cd $(srcdir); pwd` ; export s; \ + @r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}` ; export s; \ $(SET_LIB_PATH) \ echo "Building runtime libraries"; \ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all .PHONY: cross cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld - @r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + @r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ echo "Building the C and C++ compiler"; \ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" - @r=`pwd`; export r; \ - s=`cd $(srcdir); pwd` ; export s; \ + @r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}` ; export s; \ $(SET_LIB_PATH) \ echo "Building runtime libraries"; \ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ @@ -1641,19 +1587,31 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld .PHONY: check-gcc check-gcc: @if [ -f ./gcc/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ else \ true; \ fi +.PHONY: check-c++ +check-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + $(MAKE) check-target-libstdc++-v3; \ + else \ + true; \ + fi + .PHONY: install-gcc install-gcc: @if [ -f ./gcc/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ else \ @@ -1663,8 +1621,8 @@ install-gcc: .PHONY: install-gcc-cross install-gcc-cross: @if [ -f ./gcc/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \ else \ @@ -1677,8 +1635,8 @@ install-gcc-cross: install-dosrel: installdirs info @dir=`echo $@ | sed -e 's/install-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ - r=`pwd`; export r; \ - s=`cd $(srcdir); pwd`; export s; \ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ else \ @@ -1689,10 +1647,9 @@ install-dosrel-fake: ALL_GCC = all-gcc ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss -ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++ all-target-libstdc++-v3 +ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3 # This is a list of inter-dependencies among modules. -all-apache: all-ash: all-autoconf: all-m4 all-texinfo all-automake: all-m4 all-texinfo @@ -1700,21 +1657,13 @@ all-bash: all-bfd: all-libiberty all-intl all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl all-bison: all-texinfo -configure-target-boehm-gc: $(ALL_GCC_CXX) configure-target-qthreads +configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads all-target-boehm-gc: configure-target-boehm-gc -configure-target-bsp: $(ALL_GCC_C) -all-target-bsp: configure-target-bsp all-byacc: all-bzip2: -all-cgen: all-libiberty -all-cvssrc: -configure-target-cygmon: $(ALL_GCC_C) -all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libio all-target-libstub all-target-bsp all-db: all-dejagnu: all-tcl all-expect all-tk all-diff: all-libiberty -all-emacs: -all-emacs19: all-bison all-byacc all-etc: configure-target-examples: $(ALL_GCC_C) all-target-examples: configure-target-examples @@ -1724,7 +1673,6 @@ all-findutils: all-find: all-flex: all-libiberty all-bison all-byacc all-gas: all-libiberty all-opcodes all-bfd all-intl -all-gash: all-tcl all-gawk: all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib @@ -1736,46 +1684,30 @@ configure-target-gperf: $(ALL_GCC_CXX) all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3 all-gprof: all-libiberty all-bfd all-opcodes all-intl all-grep: all-libiberty -all-grez: all-libiberty all-bfd all-opcodes -all-gui: all-gdb all-libproc all-target-librx +all-gui: all-gdb all-libproc all-guile: all-gzip: all-libiberty all-hello: all-libiberty all-indent: -all-inet: all-tcl all-send-pr all-perl all-intl: -all-ispell: all-emacs19 -all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1 +all-itcl: all-tcl all-tk all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl -configure-target-libg++: $(ALL_GCC_CXX) configure-target-librx -all-target-libg++: configure-target-libg++ all-target-libiberty all-target-librx configure-target-libgloss: $(ALL_GCC) all-target-libgloss: configure-target-libgloss configure-target-newlib -configure-target-libio: $(ALL_GCC_C) -all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib -check-target-libio: all-target-libstdc++ -all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl +all-libgui: all-tcl all-tk all-itcl all-libiberty: all-build-libiberty: configure-build-libiberty configure-target-libffi: $(ALL_GCC_C) all-target-libffi: configure-target-libffi -configure-target-libjava: $(ALL_GCC_CXX) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi -all-target-libjava: configure-target-libjava all-zip all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi -configure-target-librx: $(ALL_GCC_C) -all-target-librx: configure-target-librx -configure-target-libstdc++: $(ALL_GCC_C) -all-target-libstdc++: configure-target-libstdc++ all-target-libiberty all-target-libio +configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi +all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi configure-target-libstdc++-v3: $(ALL_GCC_C) all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty -configure-target-libstub: $(ALL_GCC_C) -all-target-libstub: configure-target-libstub all-libtool: configure-target-libf2c: $(ALL_GCC_C) all-target-libf2c: configure-target-libf2c all-target-libiberty -configure-target-libchill: $(ALL_GCC_C) -all-target-libchill: configure-target-libchill all-target-libiberty configure-target-libobjc: $(ALL_GCC_C) all-target-libobjc: configure-target-libobjc all-target-libiberty all-m4: all-libiberty all-texinfo @@ -1785,7 +1717,7 @@ configure-target-newlib: $(ALL_GCC) all-target-newlib: configure-target-newlib configure-target-libtermcap: $(ALL_GCC_C) all-target-libtermcap: configure-target-libtermcap -all-opcodes: all-bfd all-libiberty all-cgen +all-opcodes: all-bfd all-libiberty all-patch: all-libiberty all-perl: all-prms: all-libiberty @@ -1798,19 +1730,16 @@ all-sed: all-libiberty all-send-pr: all-prms all-shellutils: all-sid: all-tcl all-tk -all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen +all-sim: all-libiberty all-bfd all-opcodes all-readline all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui all-tar: all-libiberty all-tcl: -all-tcl8.1: all-tclX: all-tcl all-tk all-tk: all-tcl -all-tk8.1: all-tcl8.1 all-texinfo: all-libiberty all-textutils: -all-tgas: all-libiberty all-bfd all-opcodes all-time: -all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1 +all-tix: all-tcl all-tk all-wdiff: configure-target-winsup: $(ALL_GCC_C) all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup @@ -1819,6 +1748,9 @@ all-zip: all-zlib: configure-target-zlib: $(ALL_GCC_C) all-target-zlib: configure-target-zlib +all-fastjar: all-zlib all-libiberty +configure-target-fastjar: configure-target-zlib +all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty configure-target-libiberty: $(ALL_GCC_C) all-target-libiberty: configure-target-libiberty all-target: $(ALL_TARGET_MODULES) @@ -1828,8 +1760,8 @@ install-sid: install-tcl install-tk ### other supporting targets MAKEDIRS= \ - $(prefix) \ - $(exec_prefix) + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) .PHONY: installdirs installdirs: mkinstalldirs $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) @@ -1910,13 +1842,17 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f Makefile.in do-tar-bz2 \ + $(MAKE) -f Makefile.in do-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-bz2 \ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(SUPPORT_FILES)" -.PHONY: gdb-taz -gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex +.PHONY: gdb-tar +gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex $(MAKE) -f Makefile.in do-proto-toplev \ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ MD5PROG="$(MD5PROG)" \ @@ -1929,7 +1865,18 @@ gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f Makefile.in do-tar-bz2 \ + $(MAKE) -f Makefile.in do-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: gdb-taz +gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in gdb-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-bz2 \ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(SUPPORT_FILES)" @@ -1996,12 +1943,17 @@ do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex -rm -f $(PACKAGE)-$(VER) ln -s proto-toplev $(PACKAGE)-$(VER) -.PHONY: do-tar-bz2 -do-tar-bz2: - echo "==> Making $(PACKAGE)-$(VER).tar.bz2" - -rm -f $(PACKAGE)-$(VER).tar.bz2 +.PHONY: do-tar +do-tar: + echo "==> Making $(PACKAGE)-$(VER).tar" + -rm -f $(PACKAGE)-$(VER).tar find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ | tar cTfh - $(PACKAGE)-$(VER).tar + +.PHONY: do-bz2 +do-bz2: + echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2" + -rm -f $(PACKAGE)-$(VER).tar.bz2 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar .PHONY: do-md5sum @@ -2046,13 +1998,6 @@ gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" -.PHONY: libg++.tar.bz2 -LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty -libg++.tar.bz2: $(DIST_SUPPORT) libg++ - $(MAKE) -f Makefile.in taz TOOL=libg++ \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" - GNATS_SUPPORT_DIRS=include libiberty send-pr gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats $(MAKE) -f Makefile.in taz TOOL=gnats \ @@ -2065,9 +2010,14 @@ gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" +.PHONY: gdb.tar +gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" -.PHONY: dejagnu.tar.bz2 DEJAGNU_SUPPORT_DIRS= tcl expect libiberty +.PHONY: dejagnu.tar.bz2 dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu $(MAKE) -f Makefile.in taz TOOL=dejagnu \ MD5PROG="$(MD5PROG)" \ @@ -2079,6 +2029,11 @@ gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" +.PHONY: gdb+dejagnu.tar +gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" .PHONY: insight.tar.bz2 INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui @@ -2086,6 +2041,11 @@ insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" +.PHONY: insight.tar +insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=insight \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" .PHONY: insight+dejagnu.tar.bz2 INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu @@ -2093,6 +2053,11 @@ insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" +.PHONY: insight+dejagnu.tar +insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" .PHONY: newlib.tar.bz2 NEWLIB_SUPPORT_DIRS=libgloss diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog index b0c0d9b..1d3c161 100644 --- a/contrib/binutils/bfd/ChangeLog +++ b/contrib/binutils/bfd/ChangeLog @@ -1,32 +1,1994 @@ +2002-10-11 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (edit_opd): Only zero opd syms when function is + completely removed. + +2002-10-08 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (edit_opd): Correct test for discarded sections. + +2002-10-07 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent + code. + + * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx. + +2002-09-28 Alan Modra <amodra@bigpond.net.au> + + * elf.c (map_sections_to_segments): Correct test for start of + writable section in the same page as end of read-only section. + +2002-09-26 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here. + (ppc64_elf_build_stubs): Build them here instead. + +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-09-23 Alan Modra <amodra@bigpond.net.au> + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs + for discarded FDEs. Remove redundant assignment. + * elflink.h (elf_bfd_discard_info): Save edited relocs. + + 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu> + * dwarf2.c (decode_line_info): Update to correctly decode + the (non-standard DWARF2) out-of-order address sequences + generated by the Intel C++ 6.0 compiler for ia64-Linux. + + 2002-09-22 H.J. Lu <hjl@gnu.org> + * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge + the relocation count between different .reloc sections. + + 2002-09-22 Mark Elbrecht <snowball3@softhome.net> + * config.bfd: For DJGPP targets, match with any cpu and any machine. + + 2002-09-21 Alan Modra <amodra@bigpond.net.au> + * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount" + unsigned. Move "symcount" assignment out of loop. + + 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu> + * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is + zero, set it to 8 for (non-standard) 64-bit DWARF2 formats + (e.g. IRIX64). + + 2002-09-19 Jakub Jelinek <jakub@redhat.com> + * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE, + BFD_RELOC_386_TLS_GOTIE): Add. + * bfd-in2.h, libbfd.h: Rebuilt. + * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE + and R_386_TLS_GOTIE. + (elf_i386_reloc_type_lookup): Handle it. + (struct elf_i386_link_hash_entry): Change tls_type type to unsigned + char instead of enum, change GOT_* into defines. + (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define. + (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE. + (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is + accessed both as normal and TLS symbol. Move R_386_TLS_LDM and + R_386_PLT32 cases so that R_386_TLS_IE can fall through. + Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. + (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE. + Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. + (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if + tls_type is GOT_TLS_IE_BOTH. + (elf_i386_size_dynamic_sections): Likewise. + (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE. + Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. + (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch + all 4 GOT_TLS_* TLS types. + + 2002-09-18 Daniel Jacobowitz <drow@mvista.com> + * elfcode.h (elf_slurp_reloc_table_from_section): Check + correct relocation count. + + 2002-09-17 Daniel Jacobowitz <drow@mvista.com> + * bfd-in.h (bfd_get_dynamic_symcount): Define. + * bfd.c (struct _bfd): Add dynsymcount. + * bfd-in2.h: Regenerated. + * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set + abfd->dynsymcount. + * elfcode.h (elf_slurp_reloc_table_from_section): Check + for overflow. + + 2002-09-17 Alan Modra <amodra@bigpond.net.au> + * elf64-alpha.c (alpha_elf_size_info): Make static. + + 2002-09-17 Jakub Jelinek <jakub@redhat.com> + * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word + even if generating R_PPC_RELATIVE reloc. + (ppc_elf_relocate_section): Make sure relocation is performed if + skip == -2. Clear memory at r_offset when creating dynamic + relocation. + + 2002-09-16 David O'Brien <obrien@FreeBSD.org> + * elf32-i386-fbsd.c: Always label using the EI_OSABI method. + It is benign for FreeBSD < 4.1. Minor reformatting. + * elf64-alpha-fbsd.c: Likewise. + + 2002-09-16 Nathan Tallent <eraxxon@alumni.rice.edu> + * ecoff.c (_bfd_ecoff_slurp_symbolic_info) <ioptMax>: Fix error + reading ECOFF information: 'ioptMax' refers to the actual *size* + of the optimization symtab, not the number of entries. + + 2002-09-16 Jakub Jelinek <jakub@redhat.com> + * elf_i386_relocate_section (R_386_TLS_TPOFF32): Negate addend. + + 2002-09-13 Daniel Jacobowitz <drow@mvista.com> + * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update + ELF_LINK_HASH_NEEDS_PLT logic. + + 2002-09-11 Nick Clifton <nickc@redhat.com> + * po/da.po: New Danish translation file. + * configure.in (LINGUAS): Add 'da'. + * configure: Regenerate. + + 2002-09-11 Jakub Jelinek <jakub@redhat.com> + * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is + NULL. + (elf_i386_relocate_section): Return false after printing error about + unresolvable relocation. + + 2002-09-11 Jeffrey Law <law@redhat.com> + * elf32-h8300.c (elf32_h8_relax_section): Fix typo. + + 2002-09-06 Andrew Haley <aph@cambridge.redhat.com> + * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and + line_ptr before deciding we've found a symbol. + + 2002-08-29 John David Anglin <dave@hiauly1.hia.nrc.ca> + * bfd-in.h (align_power): Cast constants to bfd_vma type. + * bfd-in2.h (align_power): Likewise. + + 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp> + * elf32-sh.c (sh_elf_copy_indirect_symbol): New. + (create_got_section, allocate_dynrelocs, readonly_dynrelocs): + Likewise. + (struct elf_sh_pcrel_relocs_copied): Removed. + (struct elf_sh_dyn_relocs): New. + (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied + field with dyn_relocs. + (struct elf_sh_link_hash_table): Add short-cuts to get dynamic + sections and sym_sec. + (sh_elf_link_hash_newfunc): Clear dyn_relocs. + (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec. + (sh_elf_create_dynamic_sections): Use create_got_section instead + of _bfd_elf_create_got_section. + (sh_elf_check_relocs): Likewise. + (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic + sections. + (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections, + sh_elf_relocate_section, sh_elf_check_relocs, + sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections): + Likewise. + (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the + dynamic relocations and avoiding the copy relocation when we + didn't find any dynamic relocations in the section which has + contents or is read-only. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. + (sh_elf_size_dynamic_sections): Don't reset the size of + .rela.got section even if dynamic_sections_created flag is off. + Don't use sh_elf_discard_copies. Scan all input bfd and use + allocate_dynrelocs. Call readonly_dynrelocs to determine + whether we need DT_TEXTREL. + (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine + whether the symbol was never referred to. + (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL. + (sh_elf_gc_sweep_hook): Fill with the real sweep function. + (sh_elf_check_relocs): Call create_got_section if the short-cut + to .got is null. Increment reference counters only instead of + allocating space on dynamic sections here. Don't conditionalize + uninitialized got.offset value when marking the symbol as a + global offset table entry. Keep relocations for symbols satisfied + by a dynamic library to avoid copy relocations for the symbol. + Set dynobj field of an elf hash table if needed. + (sh_elf_finish_dynamic_sections): Handle null section pointer + correctly. + (elf_backend_copy_indirect_symbol): Defined. + (elf_backend_can_refcount): Defined. + + 2002-08-22 Nick Clifton <nickc@redhat.com> + * po/tr.po: Updated Turkish translation. + + 2002-08-21 Stephen Clarke <stephen.clarke@superh.com> + * bfd/elf32-sh.c (sh_elf_size_dynamic_sections): Zero + initialize dynamic section. + * bfd/elf64-sh64.c (sh64_elf64_size_dynamic_sections): + Likewise. + + 2002-08-13 H.J. Lu <hjl@gnu.org> + * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count + definitions in shared objects when checking symbol with + undefined version. + + 2002-08-10 H.J. Lu <hjl@gnu.org> + * elflink.h (elf_add_default_symbol): Preserve section across + elf_merge_symbol. + + 2002-08-09 Nick Clifton <nickc@redhat.com> + * po/sv.po: Updated Swedish translation. + + 2002-08-08 Alan Modra <amodra@bigpond.net.au> + * elflink.h (elf_link_output_extsym): Don't output symbols from + SEC_EXCLUDE sections. + + * aoutx.h (aout_link_write_symbols): Correct handling of warning syms. + + 2002-08-08 H.J. Lu <hjl@gnu.org> + * elflink.h (elf_add_default_symbol): Don't warn a defintion + overrides an indirect versioned symbol. + + 2002-08-07 Alan Modra <amodra@bigpond.net.au> + * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd + entries. + + 2002-08-07 Jakub Jelinek <jakub@redhat.com> + * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend + for R_386_TLS_TPOFF32 relocs against symndx 0. + + 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if + g->global_gotsym is NULL. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries. + + 2002-08-06 H.J. Lu <hjl@gnu.org> + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol + with undefined version if needed. + (elf_link_assign_sym_version): Match a default symbol with a + version without definition. No need to hide the default + definition separately. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * coff-rs6000.c: Formatting fixes. + (xcoff_calculate_relocation): Use PARAMS in declaration. + (xcoff_complain_overflow): Likewise. + (xcoff_ppc_relocate_section): Use old-style function pointer call. + (bfd_xcoff_backend_data): Remove useless comments. + (rs6000coff_vec): Likewise. + (bfd_pmac_xcoff_backend_data): Likewise. + (pmac_xcoff_vec): Likewise. + * coff64-rs6000.c: Formatting fixes. + (xcoff64_calculate_relocation): Use PARAMS in declaration. + (xcoff64_ppc_relocate_section): Use old-style function pointer call. + (bfd_xcoff_backend_data): Remove useless comments. + (rs6000coff64_vec): Likewise. + (bfd_xcoff_aix5_backend_data): Likewise. + (aix5coff64_vec): Likewise. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in + addend. + * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * coff-rs6000.c (xcoff_howto_table): Revert some of last change to + mask entries. Use complain_overflow_dont for R_REF. + (xcoff_reloc_type_ba): Revert last change. + (xcoff_reloc_type_br): Likewise. + (xcoff_reloc_type_crel): Likewise. + (xcoff_ppc_relocate_section): Likewise. + * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise. + (xcoff64_ppc_relocate_section): Likewise. + (xcoff64_howto_table): Revert some of last change to mask entries. + Use complain_overflow_dont for R_REF. + + * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all + relocs with bitsize == 16 have size = 1. + (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment. + (xcoff_reloc_type_br): Likewise. + (xcoff_reloc_type_crel): Likewise. + (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly. + * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and + dst_mask adjustment. + (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly. + (xcoff64_howto_table): Fix src_mask entries. Make all relocs with + bitsize == 16 have size = 1. + + 2002-07-31 Nick Clifton <nickc@redhat.com> + * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to + 'alternative' in order to avoid shadowing global symbol of the + same name. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + + 2002-07-30 Alan Modra <amodra@bigpond.net.au> + * aoutx.h (some_aout_object_p): Clean up tdata properly on error. + * archive.c (bfd_generic_archive_p): Likewise. + * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise. + (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol. + * coff64-rs6000.c (xcoff64_slurp_armap): Likewise. + (xcoff64_archive_p): Likewise. + (xcoff64_openr_next_archived_file): Likewise. + (xcoff64_archive_p): Clean up tdata properly on error. + * coffgen.c (coff_real_object_p): Likewise. + (coff_object_p): Release filehdr and opthdr. + * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error. + * ieee.c (ieee_archive_p): Likewise. + * ihex.c (ihex_object_p): Likewise. + (ihex_mkobject): Always allocate tdata. + * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error. + * srec.c (srec_mkobject): Always allocate tdata. + (srec_object_p): Clean up tdata properly on error. + (symbolsrec_object_p): Likewise. + * versados.c (versados_object_p): Likewise. + * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc, + and bfd_realloc instead of realloc. + (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections. + * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in + place of bfd_malloc, simplifying error freeing. Free hash table too. + (vms_object_p): Clean up tdata on error. + (vms_mkobject): Don't complain on stderr if vms_initialize fails. + (vms_close_and_cleanup): Adjust for bfd_alloc use. + + 2002-07-17 Ian Rickards <irickard@arm.com> + * dwarf2.c (concat_filename): If we can't establish the directory + just return the filename. + + 2002-07-16 Alan Modra <amodra@bigpond.net.au> + * elflink.h: Formatting fixes, tidy prototypes. + (elf_link_assign_sym_version): Move common code out of loop. + + 2002-07-04 Bruno Haible <bruno@clisp.org> + * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included + by a target variant implementation. + * elf64-alpha.c: Likewise. + * elf32-i386-fbsd.c: New file. + * elf64-alpha-fbsd.c: New file. + * targets.c: Support bfd_elf32_i386_freebsd_vec and + bfd_elf64_alpha_freebsd_vec. + * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec, + bfd_elf64_alpha_freebsd_vec. + * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo. + (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c. + (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo. + (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c. + (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies. + * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD + specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate. + +2002-09-21 David O'Brien <obrien@FreeBSD.org> + + Merge from mainline: + 2002-08-17 Andrew Cagney <ac131313@redhat.com> + * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to + `bfd_byte'. + +2002-08-26 Alan Modra <amodra@bigpond.net.au> + + * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC. + +2002-08-22 Alan Modra <amodra@bigpond.net.au> + + * configure.in: Unset is_release. + * configure: Regenerate. + + * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data + param to elf_backend_copy_indirect_symbol. + (_bfd_elf_link_hash_copy_indirect): Likewise. + * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust + calls to copy_indirect_symbol. + * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. + * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. + * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. + * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise. + * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. + * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. + * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise. + * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly + test refcounts for "used" values. + +2002-08-15 Hans-Peter Nilsson <hp@axis.com> + + * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add + missing check for whether the symbol is referenced by DSO before + unexporting it as an unneeded dynamic symbol. + +2002-08-05 Daniel Jacobowitz <drow@mvista.com> + + * configure.in: Bump version, set is_release. + * configure: Regenerated. + +2002-08-01 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-07-31 Jakub Jelinek <jakub@redhat.com> + * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type + if _bfd_elf_link_hash_copy_indirect will swap got.refcount. + +2002-07-30 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-07-30 Nick Clifton <nickc@redhat.com> + * po/sv.po: Updated Swedish translation. + + 2002-07-30 Jakub Jelinek <jakub@redhat.com> + * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type. + + 2002-07-26 Chris Demetriou <cgd@broadcom.com> + * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE + flags into resulting BFD. + + 2002-07-25 Alan Modra <amodra@bigpond.net.au> + * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define + as elf_link_record_local_dynamic_symbol. + (_bfd_elf64_link_record_local_dynamic_symbol): Likewise. + (elf_link_record_local_dynamic_symbol): Declare. Now returns int. + * elflink.h (elf_link_record_local_dynamic_symbol): Move to.. + * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an + attempt is made to record a symbol in a discarded section, and + return `2' in that case. + +2002-07-26 Alan Modra <amodra@bigpond.net.au> + + From John Reiser <jreiser@BitWagon.com> + * elf32-i386.c (elf_i386_link_hash_table_create): Clear + tls_ldm_got.refcount. + +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: Updates Spanish translation. + +2002-07-23 Daniel Jacobowitz <drow@mvista.com> + + * configure.in: Bump version for snapshot. + * configure: Regenerated. + +2002-07-23 Daniel Jacobowitz <drow@mvista.com> + + * po/bfd.pot: Regenerated. + +2002-07-23 Nick Clifton <nickc@redhat.com> + + * elf-bfd.h (struct elf_backend_data): Add new bitfield + 'want_p_paddr_set_to_zero'. + * elfxx-target.h: Set default value for want_p_paddr_set_to_zero + to false; + * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target. + * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero. + +2002-07-23 Gabor Keresztfalvi <keresztg@mail.com> + + * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of + the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to + show the Copyright string. + +2002-07-23 Nick Clifton <nickc@redhat.com> + + * po/fr.po: New French translation. + * po/sv.po: New Swedish translation. + +2002-07-23 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_link_input_bfd): Don't change internal symbols + when outputting relocs. + 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com> * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert DT_PLTGOT into the dynamic section if there is a PLT. -2002-05-14 Daniel Jacobowitz <drow@mvista.com> +2002-07-19 Alan Modra <amodra@bigpond.net.au> + + * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan + PT_IA_64_UNWIND segments for a given section. + +2002-07-16 Moritz Jodeit <moritz@jodeit.org> + + * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args. + +2002-07-16 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when + reloc section size is zero. Correct reloc output location. + + Merge from mainline. + 2002-07-14 H.J. Lu <hjl@gnu.org> + * elflink.h (elf_link_assign_sym_version): Hide the default + definition if there is a hidden versioned definition. + +2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as + the final type for the e_fsel selector when generating PA2.0W code. + (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1 + relocations. + +2002-07-12 Hans-Peter Nilsson <hp@axis.com> + + * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical + dynamic reference test in assertion when initializing GOT with + static contents. Just assert that there are either no dynamic + sections, the symbol is defined in the regular objects or that the + symbol is undef weak. Tweak comment. + (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program + only if the symbol isn't defined in the program and isn't undef + weak. + (elf_cris_adjust_dynamic_symbol): Simplify condition for getting + rid of PLT entry: only do it if the symbol isn't defined in a DSO. + When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments. + (elf_cris_discard_excess_program_dynamics): Don't consider + ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs. + +2002-07-11 Alan Modra <amodra@bigpond.net.au> + + * elf32-i386.c (elf_i386_relocate_section): Don't complain about + unresolved debugging relocs in dynamic applications. + * elf32-s390.c (elf_s390_relocate_section): Likewise. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. + * elf64-s390.c (elf_s390_relocate_section): Likewise. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. + * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. + +2002-07-10 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ONES): Define. + (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in + missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill + in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32. + + * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete. + (ppc64_elf_set_private_flags): Delete. + (ppc64_elf_section_from_shdr): Delete. + (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code. + (ppc64_elf_fake_sections): Delete. + (bfd_elf64_bfd_set_private_flags): Don't define. + (bfd_elf64_get_symbol_info): Likewise. + (elf_backend_section_from_shdr): Likewise. + (elf_backend_fake_sections): Likewise. + +2002-07-10 Marco Walther <Marco.Walther@sun.com> + + * elf.c: (assign_section_numbers) Set sh_entsize for .stab only + when not already set. + * elf64-sparc.c: (sparc64_elf_fake_sections): New function. + (elf_backend_fake_sections): Define. + +2002-07-10 Alan Modra <amodra@bigpond.net.au> + + * merge.c (_bfd_merge_section): Remove redundant output_section check. + Formatting. + (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections. + +2002-07-09 Hans-Peter Nilsson <hp@axis.com> + + * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for + NULL sym_hashes to just before use. + <case R_CRIS_32_GOTREL>: In test for local symbol, accept also + symbol with non-default visibility. + <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto. + <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>: + Ditto. + (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for + symbol with non-default visibility. + (cris_elf_check_relocs): At tests for local symbol before + increasing h->plt.refcount, also check for non-default + visibility. Ditto when checking for local symbol to eliminate + pc-relative runtime relocs. + +2002-07-08 Alan Modra <amodra@bigpond.net.au> + + * elf.c: Formatting. + (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks. + (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP. + (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP + segments. + +2002-07-07 Mark Mitchell <mark@codesourcery.com> + Alan Modra <amodra@bigpond.net.au> + + * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into + account the impact of relocation count overflow when computing + section offsets. + * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether + or not to apply the PE COFF reloc overflow handling. Fix a + fencepost error in deciding whether or not to use that technique. + +2002-07-07 Alan Modra <amodra@bigpond.net.au> + + * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx, + change type of locsyms. + (bfd_elf_get_elf_syms): Declare. + * elf.c (bfd_elf_get_elf_syms): New function. + (group_signature): Use bfd_elf_get_elf_syms. + (bfd_section_from_r_symndx): Likewise. + * elfcode.h (elf_slurp_symbol_table): Likewise. + * elflink.h (elf_link_is_defined_archive_symbol): Likewise. + (elf_link_add_object_symbols): Likewise. Reorganise to increase + locality of various data structures. Properly free internal relocs. + (elf_bfd_final_link): Properly free internal relocs. + (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms. + (elf_link_input_bfd): Likewise. + (elf_gc_mark): Likewise. Properly free internal relocs. + (elf_gc_sweep): Properly free internal relocs. + (elf_reloc_symbol_deleted_p): No need to swap syms in. + (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free + internal relocs. + * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms. + Properly free possibly cached info. + (mn10200_elf_relax_delete_bytes): Remove symbol swapping code. + (mn10200_elf_symbol_address_p): Pass in internal syms. Remove + symbol swapping code. + (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms. + Properly free possibly cached info. + * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c. + (mn10300_elf_relax_delete_bytes): Likewise. + (mn10300_elf_symbol_address_p): Likewise. + (mn10300_elf_get_relocated_section_contents): Likewise. + * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c. + (elf32_h8_relax_delete_bytes): Likewise. + (elf32_h8_symbol_address_p): Likewise. + (elf32_h8_get_relocated_section_contents): Likewise. + * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c. + (m32r_elf_relax_delete_bytes): Likewise. + (m32r_elf_get_relocated_section_contents): Likewise. + * elf32-sh.c (sh_elf_reloc_loop): Free section contents using + elf_section_data to determine whether cached. + (sh_elf_relax_section): As above for elf-m10200.c. + (sh_elf_relax_delete_bytes): Likewise. + (sh_elf_get_relocated_section_contents): Likewise. + * elf32-xstormy16.c (xstormy16_elf_relax_section): As above. + * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay + reading of local syms. + * elf64-mmix.c (mmix_elf_relax_section): Likewise. + * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above. + * elfxx-ia64.c (elfNN_ia64_relax_section): As above. + * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal + relocs. + * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly + free internal relocs and section contents. Don't read symbols. + * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms. + (elf32_hppa_size_stubs): Don't free local syms. + * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay + reading of local syms. Use bfd_elf_get_elf_syms. Properly free + possibly cached info. + * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise. + * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms. + * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and + all_local_syms. + (get_local_syms): Delete function. + (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache + on exit. + (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit. + +2002-07-05 Jim Wilson <wilson@redhat.com> + + * syms.c (decode_section_type): New. + (bfd_decode_symclass): Call decode_section_type. + +2002-07-04 Jakub Jelinek <jakub@redhat.com> + + * merge.c (_bfd_merged_section_offset): Avoid accessing byte before + section content start. + Reported by Michael Schumacher <mike@hightec-rt.com>. + +2002-07-04 Alan Modra <amodra@bigpond.net.au> + + * section.c (_bfd_strip_section_from_output): Remove unnecessary + link order code. Don't actually remove the output section here; + Just set a flag for the linker to do so. + * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed + sections when setting up output section dynsyms. + +2002-07-04 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux + fudge. + * elf.c (bfd_section_from_shdr): Work around broken hpux shared + libs here instead. + +2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * elf64-s390.c (create_got_section): Set .got section alignment to + 8 bytes. + (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes. + +2002-07-02 Alan Modra <amodra@bigpond.net.au> + + * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar. + +2002-07-01 Matt Thomas <matt@3am-software.com> + + * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_* + to EF_VAX_*. + +2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * elfxx-mips.c (ABI_64_P): Fix comment. + (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the + new section names for N64 ABI. + (mips_elf_output_extsym): No special _gp_disp handling for NewABI. + (mips_elf_calculate_relocation): Code formatting. + (mips_elf_create_dynamic_relocation): Likewise. + (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too. + (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI. + (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64 + in any NewABI. + (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling + for NewABI. + (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI. + (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled + here, too. + +2002-07-01 Andreas Schwab <schwab@suse.de> + + * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert + R_X86_64_64 to R_X86_64_RELATIVE. + +2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * vaxbsd.c: New BFD backend for VAX BSD and Ultrix. + * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend. + Run "make dep-am". + * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of + host_aout_vec. + * configure.in (vaxbsd_vec): Add. + * targets.c (vaxbsd_vec): Add. + * Makefile.in: Rebuild. + * configure: Rebuild. + * po/SRC-POTFILES.in: Rebuild. + +2002-07-01 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_gc_mark): Pass in the section whose relocs we are + examining to gc_mark_hook, rather than the bfd. + (elf_gc_sections): Adjust. + * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise. + * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise. + * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise. + * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise. + * elf32-cris.c (cris_elf_gc_mark_hook): Likewise. + * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise. + * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise. + * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise. + * elf32-i386.c (elf_i386_gc_mark_hook): Likewise. + * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise. + * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise. + * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise. + * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise. + * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise. + * elf32-s390.c (elf_s390_gc_mark_hook): Likewise. + * elf32-sh.c (sh_elf_gc_mark_hook): Likewise. + * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise. + * elf32-v850.c (v850_elf_gc_mark_hook): Likewise. + * elf32-vax.c (elf_vax_gc_mark_hook): Likewise. + * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise. + * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise. + * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise. + * elf64-s390.c (elf_s390_gc_mark_hook): Likewise. + * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise. + * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise. + * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise. + * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise. + * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove + redundant local sym tests. + * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry. + (link_hash_newfunc): Init is_entry. + (ppc64_elf_copy_indirect_symbol): Copy is_entry. + (ppc64_elf_link_hash_table_create): Init all_local_syms. + (create_linkage_sections): Use bfd_make_section_anyway rather than + bfd_make_section. + (ppc64_elf_mark_entry_syms): New function. + (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set + up opd entry to function section map. + (ppc64_elf_gc_mark_hook): Special case opd section relocs, and + relocs that reference the opd section. + (edit_opd): New function. + (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd. + (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here. + (get_local_syms): Do so here. Exit if we already have local syms. + Remove bogus comment imported from elf32-hppa.c. Don't attempt to + read local syms on non-ELF input. + (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather + than duplicating it's function here. Adjust free of internal + relocs to suit. + (ppc64_elf_relocate_section): Adjust local syms in opd section. + * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare. + * elf32-hppa.c (elf32_hppa_size_stubs): Call + _bfd_elf32_link_read_relocs rather than duplicating it's function + here. Adjust free of internal relocs to suit. + +2002-07-01 Andreas Jaeger <aj@suse.de> + + * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations + are not allowed in shared libs code, enforce -fPIC. + +2002-06-29 Hans-Peter Nilsson <hp@bitrange.com> + + * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and + trailing zero-sequences when there's previous left-over data. + +2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elf64-hppa.c (elf64_hppa_reloc_type_class): New function. + (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec + and opd_rel_sec in order for starting rela section. Check _raw_size. + (elf_backend_reloc_type_class): Define. + +2002-06-27 Kevin Buettner <kevinb@redhat.com> + + * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit + DWARF2 formats. + +2002-06-27 Alan Modra <amodra@bigpond.net.au> + + * cpu-powerpc.c: Comment on ordering of arch_info. + * elf32-ppc.c (ppc_elf_object_p): New function. + (elf_backend_object_p): Define. + * elf64-ppc.c (ppc64_elf_object_p): New function. + (elf_backend_object_p): Define. + +2002-06-26 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo. + * configure: Regenerate. + +2002-06-25 Jason Eckhardt <jle@rice.edu> + + * dwarf2.c (decode_line_info): Check unit->addr_size + to read in the proper number of prologue bytes. + +2002-06-25 Nick Clifton <nickc@cambridge.redhat.com> + + * config.bfd (powerpc-*-aix5*): Only create a selvecs for + aix5coff64_vec if 64-bit bfd support has been enabled. + (powerpc64-*-aix5*): Only define if 64-bit bfd support has + been enabled. + + * targets.c (_bfd_target_vector[]): Only include + aix5coff64_vec if 64-bit bfd support has been enabled. + +2002-06-25 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy. + * elf32-hppa.c (hppa_add_stub): Likewise. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. + * elflink.h (elf_add_default_symbol): Fix comment typo. + (elf_add_default_symbol): Replace strcpy and strncpy with memcpy. + (elf_link_add_object_symbols): Likewise. + (elf_link_assign_sym_version): Likewise. + * hash.c (bfd_hash_lookup): Likewise. + * linker.c (_bfd_generic_link_add_one_symbol): Likewise. + * section.c (bfd_get_unique_section_name): Likewise. + * syms.c (_bfd_stab_section_find_nearest_line): Likewise. + * elf.c (_bfd_elf_make_section_from_phdr): Likewise. + (assign_section_numbers): Likewise. + (_bfd_elfcore_make_pseudosection): Likewise. + (elfcore_grok_lwpstatus): Likewise. + (elfcore_grok_win32pstatus): Likewise. + (elfcore_write_note): Constify input params. Use PTR instead of + void *. Include terminating NUL in namesz. Correct padding. + Support NULL "name" param. Use memcpy instead of strcpy. + (elfcore_write_prpsinfo): Constify input params. + (elfcore_write_prstatus): Likewise. Use PTR instead of void *. + (elfcore_write_lwpstatus): Likewise. + (elfcore_write_pstatus): Likewise. + (elfcore_write_prfpreg): Likewise. + (elfcore_write_prxfpreg): Likewise. + * elf-bfd.h (elfcore_write_note): Update declaration. + (elfcore_write_prpsinfo): Likewise. + (elfcore_write_prstatus): Likewise. + (elfcore_write_pstatus): Likewise. + (elfcore_write_prfpreg): Likewise. + (elfcore_write_prxfpreg): Likewise. + (elfcore_write_lwpstatus): Likewise. + +2002-06-25 Jason Eckhardt <jle@rice.edu> + + * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for + symbols of type stProc and stStaticProc. + +2002-06-25 Nick Clifton <nickc@redhat.com> + + * ecoff.c: VArious formatting fixes. + +2002-06-25 Alan Modra <amodra@bigpond.net.au> + + * coff-rs6000.c (xcoff_generate_rtinit): Fix typo. + +2002-06-25 Alan Modra <amodra@bigpond.net.au> + + * aout-adobe.c: Don't compare against "true" or "false. + * aout-target.h: Likewise. + * aoutx.h: Likewise. + * archive.c: Likewise. + * bout.c: Likewise. + * cache.c: Likewise. + * coff-a29k.c: Likewise. + * coff-alpha.c: Likewise. + * coff-i386.c: Likewise. + * coff-mips.c: Likewise. + * coff-or32.c: Likewise. + * coff64-rs6000.c: Likewise. + * coffcode.h: Likewise. + * coffgen.c: Likewise. + * cpu-ns32k.c: Likewise. + * ecoff.c: Likewise. + * ecofflink.c: Likewise. + * elf.c: Likewise. + * elf32-arm.h: Likewise. + * elf32-cris.c: Likewise. + * elf32-d30v.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-mcore.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-sh64.c: Likewise. + * elf32-v850.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-sh64.c: Likewise. + * elfcode.h: Likewise. + * elfcore.h: Likewise. + * elflink.h: Likewise. + * elfxx-mips.c: Likewise. + * i386os9k.c: Likewise. + * ieee.c: Likewise. + * libbfd.c: Likewise. + * linker.c: Likewise. + * mmo.c: Likewise. + * nlm32-alpha.c: Likewise. + * nlm32-i386.c: Likewise. + * nlm32-ppc.c: Likewise. + * nlm32-sparc.c: Likewise. + * nlmcode.h: Likewise. + * oasys.c: Likewise. + * pdp11.c: Likewise. + * peicode.h: Likewise. + * reloc.c: Likewise. + * som.c: Likewise. + * srec.c: Likewise. + * tekhex.c: Likewise. + * vms.c: Likewise. + * xcofflink.c: Likewise. + * elf64-sparc.c: Edit comment to not use "== false". + + * aoutf1.h: Don't use "? true : false". + * ecoff.c: Likewise. + * format.c: Likewise. + * ieee.c: Likewise. + * linker.c: Likewise. + * mmo.c: Likewise. + * oasys.c: Likewise. + +2002-06-23 H.J. Lu <hjl@gnu.org> + + * elflink.h (elf_link_add_archive_symbols): For the default + version, check references with only one `@' first. + +2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New + function. + (allocate_global_data_dlt): Don't add millicode symbols to dynamic + symbol table. + (allocate_global_data_opd, allocate_dynrel_entries): Likewise. + (elf64_hppa_size_dynamic_sections): Revise to use + elf64_hppa_mark_milli_and_exported_functions. + (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode + symbols out of dynamic symbol table. + +2002-06-23 Alan Modra <amodra@bigpond.net.au> + + * Makefile.in: Regenerate. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * configure: Regenerate. + * po/SRC-POTFILES.in: Regenerate. + + * elflink.h: Comment typo fixes. + +2002-06-23 H.J. Lu <hjl@gnu.org> + + * elf-bfd.h (elf_link_loaded_list): New structure. + (elf_link_hash_table): Add "loaded". + * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded". + * elflink.h (elf_link_check_versioned_symbol): New function. + (elf_link_output_extsym): Call elf_link_check_versioned_symbol. + +2002-06-19 Nick Clifton <nickc@cambridge.redhat.com> + + * elflink.h (size_dynamic_sections): If the target does not + support an ELF style hash table, return true, indicating that + nothing needed to be done, rather than false, indicating that the + section's size could not be computed. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + From Catherine Moore, Michael Meissner, Dave Brolley: + * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c + * targets.c: Support bfd_elf32_frv_vec. + * reloc.c: Add FRV relocs. + * configure.in: Add support for bfd-elf32-frv-vec. + * config.bfd (targ_cpu): Add support for frv-*-elf. + * archures.c: Add frv arch and machines. + * Makefile.am (ALL_MACHINES): Add cpu-frv.lo. + (ALL_MACHINES_CFILES): Add cpu-frv.c. + (BFD32_BACKENDS): Add elf32-frv.lo. + (BFD32_BACKENDS_CFILES): Add elf32-frv.c + (cpu-frv.lo): New target. + (elf32-frv.lo): New target. + * cpu-frv.c: New file. + * elf32-frv.c: New file. + +2002-06-18 Jakub Jelinek <jakub@redhat.com> + + * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies + e_shnum == 0. + Only read the first section header if e_shoff is non-zero. + Don't consider e_shstrndx if there are no sections. + +2002-06-17 Tom Rix <trix@redhat.com> + + * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R, + R_D10V_10_PCREL_L and R_D10V_18_PCREL to use + complain_overflow_bitfield. + +2002-06-17 Alan Modra <amodra@bigpond.net.au> + + * opncls.c (bfd_openr): Remove redundant bfd_set_error. + (bfd_fdopenr): Likewise. + (bfd_openstreamr): Likewise. + (bfd_openw): Likewise. + + * targets.c: Sort target vecs. + (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec, + bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec, + bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec, + bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec. + * configure.in: Sort target vecs. Add m88kmach3_vec. + * configure: Regenerate. + +2002-06-16 Hans-Peter Nilsson <hp@bitrange.com> + + * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member + bpo_reloc_no to break sort order ties, not address of items. + +2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment. + Skip excluded sections in determing __gp value. + (elf_hppa_final_link_relocate): Use the symbol's address in + R_PARISC_FPTR64 relocations that don't need an opd entry. + * elf64-hppa.c (allocate_dynrel_entries): Simplify code. + (elf64_hppa_finalize_dynreloc): Likewise. + (elf64_hppa_size_dynamic_sections): Move comments and fix typo. + (elf64_hppa_finish_dynamic_symbol): Break up assert. + +2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE> + + * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte + alignment for .bss, .data and .text sections so that sse and sse2 + code will work. + * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise. + +2002-06013 J"orn Rennecke <joern.rennecke@superh.com> + + config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*, + sh[1234]*-elf*. + +2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elflink.h (elf_bfd_final_link): Improve error handling for missing + dynamic sections. + + * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry + for a symbol that has no output section. + (allocate_dynrel_entries): Correct comment. + (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry + unless we want one. + (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL. + (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols + with no section. Remove unnecessary parentheses. - * configure.in: Set is_release=y for 2.12.1 release. - * configure: Likewise. +2002-06-11 Tom Rix <trix@redhat.com> + + * coffcode.h (coff_compute_section_file_positions): Add data + section to AIX loader alignment check. + + * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section + alignment to 4 bytes. + (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment + power accessor macro. + (do_shared_object_padding): Remove invalid assertion. + +2002-06-10 Richard Sandiford <rsandifo@redhat.com> + + * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE + for removed output sections. + +2002-06-10 Geoffrey Keating <geoffk@redhat.com> + + * merge.c (merge_strings): Use htab_create_alloc with calloc, not + htab_alloc. + * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise. + +2002-06-08 H.J. Lu <hjl@gnu.org> + + * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to + work around a long long bug in gcc 2.96 on mips. + +2002-06-08 Jason Thorpe <thorpej@wasabisystems.com> + + * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo. + (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c. + Regenerate dependency lists. + * Makefile.in: Regenerate. + * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add + vax1knetbsd_vec to targ_selvecs. + * configure.in: Add vax1knetbsd_vec. + * configure: Regenerate. + * targets.c (_bfd_target_vector): Add vax1knetbsd_vec. + * vax1knetbsd.c: New file. + * vaxnetbsd.c: Update copyright years. + (TARGET_PAGE_SIZE): Set to 0x1000. + (DEFAULT_MID): Set to M_VAX4K_NETBSD. + +2002-06-08 Matt Thomas <matt@3am-software.com> + + * libaout.h (enum machine_type): Add M_VAX4K_NETBSD. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + * armnetbsd.c: Replace CONST with const. + * corefile.c: Likewise. + * elf32-dlx.c: Likewise. + * elf64-mips.c: Likewise. + * mmo.c: Likewise. + * ns32knetbsd.c: Likewise. + + * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash + table is elf64-sparc. + +2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code. + Fix RELA addends to get not shifted in the result. Don't do special + handling of R_MIPS_64 for NewABI. + +2002-06-07 Alan Modra <amodra@bigpond.net.au> + + * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc. + (NAME(aout,slurp_reloc_table)): Likewise. + * coff-mips.c (mips_relax_section): Use bfd_zalloc. + * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc. + (xcoff_write_archive_contents_big): Likewise. + (xcoff_generate_rtinit): Likewise. + (xcoff_generate_rtinit): Likewise, and check error return. + * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise. + * coffgen.c (coff_section_symbol): Use bfd_zalloc. + (coff_get_normalized_symtab): Likewise. + (coff_make_empty_symbol): Likewise. + (bfd_coff_set_symbol_class): Likewise. + * cofflink.c (coff_link_add_symbols): Likewise. + * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise. + * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc. + (bfd_ecoff_write_accumulated_debug): Likewise. + * elf64-alpha.c (get_got_entry): Use bfd_zalloc. + * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise. + * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc. + * ieee.c (do_with_relocs): Use bfd_zalloc. + * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise. + * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc. + (NAME(aout,slurp_reloc_table)): Likewise. + (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd. + * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc. + * som.c (som_build_and_write_symbol_table): Likewise. + (som_slurp_string_table): Likewise. + (som_slurp_symbol_table): Likewise. + (som_bfd_ar_write_symbol_stuff): Likewise. + * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc. + * sunos.c (bfd_sunos_size_dynamic_sections): Likewise. + * tekhex.c (find_chunk): Likewise. Get rid of unused "sname". + * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc. + * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc. + +2002-06-07 Alan Modra <amodra@bigpond.net.au> + + * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with + "group" union. + (elf_group_name): Update. + (elf_group_id): Define. + (bfd_elf_set_group_contents): Declare. + * elf.c (elf_fake_sections): Qualify use of elf_group_name. + (set_group_contents): Rename to bfd_elf_set_group_contents. Remove + ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use + that sym for the signature. + (_bfd_elf_compute_section_file_positions): Don't call + set_group_contents for "ld -r" case. + (swap_out_syms): Use bfd_zalloc. + * elflink.h (elf_link_add_archive_symbols): Likewise. + (NAME(bfd_elf,size_dynamic_sections)): Likewise. + (elf_bfd_final_link): Call bfd_elf_set_group_contents. + +2002-06-07 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved + relocs in opd for non-shared too. + +2002-06-06 Jeffrey Law <law@redhat.com + + * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting + relocations. + +2002-06-06 Nick Clifton <nickc@cambridge.redhat.com> + + * merge.c: Include libiberty.h. + * elf-strtab.c: Include libiberty.h. + +2002-06-06 Elias Athanasopoulos <eathan@otenet.gr> + + * peXXigen.c (pe_print_idata): Remove unused variable. + +2002-06-06 David Heine <dlheine@tensilica.com> + + * elf.c (assign_file_positions_for_segments): Remove unallocated + sections from the section to segment mapping for PT_LOAD segments. + Update comment about empty loadable segments. + +2002-06-06 Richard Sandiford <rsandifo@redhat.com> + + * stabs.c (_bfd_link_section_stabs): Check that the symbol offset + is within the .stabstr section. + +2002-06-06 Alan Modra <amodra@bigpond.net.au> + + * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args + are "const PTR", not "const PTR *". + (bfd_elf32_swap_symbol_in): Likewise. + (bfd_elf64_swap_symbol_in): Likewise. + * elfcode.h (elf_swap_symbol_in): Change input args to const PTR. + (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in. + * elflink.h (elf_link_is_defined_archive_symbol): Likewise. + (elf_link_add_object_symbols): Likewise. + (elf_link_record_local_dynamic_symbol): Likewise. + (elf_link_input_bfd): Likewise. + (elf_gc_mark): Likewise. + (elf_reloc_symbol_deleted_p): Likewise. + * elf-m10200.c (mn10200_elf_relax_section): Likewise. + (mn10200_elf_relax_delete_bytes): Likewise. + (mn10200_elf_symbol_address_p): Likewise. + (mn10200_elf_get_relocated_section_contents): Likewise. + * elf-m10300.c (mn10300_elf_relax_section): Likewise. + (mn10300_elf_relax_section): Likewise. + (mn10300_elf_relax_delete_bytes): Likewise. + (mn10300_elf_symbol_address_p): Likewise. + (mn10300_elf_get_relocated_section_contents): Likewise. + * elf32-h8300.c (elf32_h8_relax_section): Likewise. + (elf32_h8_relax_delete_bytes): Likewise. + (elf32_h8_symbol_address_p): Likewise. + (elf32_h8_get_relocated_section_contents): Likewise. + * elf32-hppa.c (get_local_syms): Likewise. + * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise. + * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise. + * elf32-sh.c (sh_elf_relax_section): Likewise. + (sh_elf_relax_delete_bytes): Likewise. + (sh_elf_get_relocated_section_contents): Likewise. + * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise. + * elf64-alpha.c (elf64_alpha_relax_section): Likewise. + * elf64-hppa.c (elf64_hppa_check_relocs): Likewise. + * elf64-mmix.c (mmix_elf_relax_section): Likewise. + * elf64-ppc.c (get_local_syms): Likewise. + * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise. + * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. + +2002-06-05 J"orn Rennecke <joern.rennecke@superh.com> + + * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations. + +2002-06-05 Alan Modra <amodra@bigpond.net.au> + + * elf.c (group_signature): Swap in the whole symbol, and handle + extracting section symbol names. + (setup_group): Add comment. + (set_group_contents): When called from objcopy or ld, arrange for + section contents to be written. Write group member output section + indices to allow objcopy to reorganize sections. + (_bfd_elf_copy_private_section_data): Copy group info. + + * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field. + (bfd_elf32_swap_symbol_in): Update prototype. + (bfd_elf64_swap_symbol_in): Likewise. + * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *. + (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in. + * elflink.h (elf_link_is_defined_archive_symbol): Likewise. + (elf_link_add_object_symbols): Likewise. + (elf_link_record_local_dynamic_symbol): Likewise. + (elf_link_input_bfd): Likewise. + (elf_gc_mark): Likewise. + (elf_reloc_symbol_deleted_p): Likewise. + * elf-m10200.c (mn10200_elf_relax_section): Likewise. + (mn10200_elf_relax_delete_bytes): Likewise. + (mn10200_elf_symbol_address_p): Likewise. + (mn10200_elf_get_relocated_section_contents): Likewise. + * elf-m10300.c (mn10300_elf_relax_section): Likewise. + (mn10300_elf_relax_section): Likewise. + (mn10300_elf_relax_delete_bytes): Likewise. + (mn10300_elf_symbol_address_p): Likewise. + (mn10300_elf_get_relocated_section_contents): Likewise. + * elf32-h8300.c (elf32_h8_relax_section): Likewise. + (elf32_h8_relax_delete_bytes): Likewise. + (elf32_h8_symbol_address_p): Likewise. + (elf32_h8_get_relocated_section_contents): Likewise. + * elf32-hppa.c (get_local_syms): Likewise. + * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise. + * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise. + * elf32-sh.c (sh_elf_relax_section): Likewise. + (sh_elf_relax_delete_bytes): Likewise. + (sh_elf_get_relocated_section_contents): Likewise. + * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise. + * elf64-alpha.c (elf64_alpha_relax_section): Likewise. + * elf64-hppa.c (elf64_hppa_check_relocs): Likewise. + * elf64-mmix.c (mmix_elf_relax_section): Likewise. + * elf64-ppc.c (get_local_syms): Likewise. + * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise. + * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. + * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser. + * elf64-alpha.c (alpha_elf_size_info): Likewise. + * elf64-hppa.c (hppa64_elf_size_info): Likewise. + * elf64-mips.c (mips_elf64_size_info): Likewise. + * elf64-s390.c (s390_elf64_size_info): Likewise. + * elf64-sparc.c (sparc64_elf_size_info): Likewise. + +2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to... + elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here. + elf64-mips.c (elf_backend_ignore_discarded_relocs): Use + _bfd_mips_elf_ignore_discarded_relocs. + elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare. + +2002-06-05 H.J. Lu <hjl@gnu.org> + + * elfxx-mips.c (mips_elf_calculate_relocation): Call + _bfd_elf_rel_local_sym for STT_SECTION relocations against + the SEC_MERGE section. + +2002-06-05 Alan Modra <amodra@bigpond.net.au> + + * coff-alpha.c: Update copyright date. + * coff-mips.c: Likewise. + * xcoff-target.h: Likewise. + + * bfd-in.h: Remove "taken from the source" comment. + * libbfd-in.h: Likewise. + * libcoff-in.h: Likewise. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + + * elf.c (bfd_elf_discard_group): Return true. + * elf-bfd.h (bfd_elf_discard_group): Declare. + * bfd-in.h (bfd_elf_discard_group): Don't declare here. + * section.c (bfd_discard_group): Rename to bfd_generic_discard_group. + * bfd.c (bfd_discard_group): Define. + * targets.c (struct bfd_target): Add _bfd_discard_group. + (BFD_JUMP_TABLE_LINK): Here too. + * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define. + * aout-adobe.c (aout_32_bfd_discard_group): Define. + * aout-target.h (MY_bfd_discard_group): Define. + * aout-tic30.c (MY_bfd_discard_group): Define. + * binary.c (binary_bfd_discard_group): Define. + * bout.c (b_out_bfd_discard_group): Define. + * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define. + * coffcode.h (coff_bfd_discard_group): Define. + * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define. + * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define. + * i386msdos.c (msdos_bfd_discard_group): Define. + * i386os9k.c (os9k_bfd_discard_group): Define. + * ieee.c (ieee_bfd_discard_group): Define. + * ihex.c (ihex_bfd_discard_group): Define. + * mmo.c (mmo_bfd_discard_group): Define. + * nlm-target.h (nlm_bfd_discard_group): Define. + * oasys.c (oasys_bfd_discard_group): Define. + * ppcboot.c (ppcboot_bfd_discard_group): Define. + * som.c (som_bfd_discard_group): Define. + * srec.c (srec_bfd_discard_group): Define. + * tekhex.c (tekhex_bfd_discard_group): Define. + * versados.c (versados_bfd_discard_group): Define. + * vms.c (vms_bfd_discard_group): Define. + * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define. + * coff64-rs6000.c (rs6000coff64_vec): Update initialiser. + (aix5coff64_vec): Likewise. + * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo. + (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c. + (elf32-sh64-com.lo): New dependency list. + * Makefile.in: Regenerate. + * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec) + (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add + elf32-sh64-com.lo. + * configure: Regenerate. + * elf32-sh64.c (sh64_address_in_cranges) + (sh64_get_contents_type, sh64_address_is_shmedia): Move to... + (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb): + (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to... + * elf32-sh64-com.c: ...here. New file. + +2002-06-04 Alan Modra <amodra@bigpond.net.au> + + * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove + ATTRIBUTE_UNUSED on used params. + * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks + before calling bfd_section_from_elf_index on local syms. + * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo. + (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c. + (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo. + (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c. + (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules. + * Makefile.in: Regenerate. + * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*) + (sh64-*-netbsd*): New targets. + * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec, + bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec. + * configure: Regenerate. + * elf32-sh64-nbsd.c: New file. + * elf64-sh64-nbsd.c: New file. + * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec, + bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and + bfd_elf64_sh64lnbsd_vec. + +2002-06-04 Alan Modra <amodra@bigpond.net.au> + + * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups. + (bfd_section_from_shdr): Likewise. Set section name of group + sections from signature. + (group_signature): Split out from setup_group. Ensure symbol table + is available. + (bfd_elf_discard_group): New function. + (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on + .gnu.linkonce* sections if they are members of a group. + (set_group_contents): Set GRP_COMDAT flag. + * section.c (bfd_discard_group): New function. + * bfd-in.h (bfd_elf_discard_group): Declare. + * bfd-in2.h: Regenerate. + * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field. + (elf_linkonce_p): Define. + +2002-06-04 Alan Modra <amodra@bigpond.net.au> + + * elf.c (bfd_section_from_shdr): Make "name" const. + * elf-bfd.h (elf_backend_section_from_shdr): Likewise. + * elf32-i370.c (i370_elf_section_from_shdr): Likewise. + * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise. + * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise. + * elf32-v850.c (v850_elf_section_from_shdr): Likewise. + * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise. + * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise. + * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise. + * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise. + * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise. + * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise. + +2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * elfxx-mips.c (ABI_64_P): Use backend's data to determine the + ABI. + +2002-06-02 Kazu Hirata <kazu@cs.umass.edu> + + * elf32-arc.c: Fix formatting. + * elf32-arm.h: Likewise. + * elf32-cris.c: Likewise. + * elf32-dlx.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-i386qnx.c: Likewise. + * elf32-or32.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh64.c: Likewise. + * elf32-vax.c: Likewise. + * elf32-xstormy16.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-mmix.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-sh64.c: Likewise. + * elf64-x86-64.c: Likewise. + +2002-06-02 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference + null when there are no got entries for a symbol. + (elf64_alpha_relax_find_tls_segment): Rearrange to avoid + uninitialized variable warning. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for + undefined symbols here. + (elf64_alpha_relax_section): Do it here. Also test for not + defined in the current module. + (elf64_alpha_relocate_section_r): Split out of ... + (elf64_alpha_relocate_section): ... here. Don't dereference + NULL when looking up local got entries. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined + symbols from JSR relaxation. + (elf64_alpha_size_plt_section_1): New. + (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ... + (elf64_alpha_size_rela_got_1): ... here. + (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ... + (elf64_alpha_size_rela_got_section): ... here. + (elf64_alpha_size_plt_section): New. + (elf64_alpha_relax_section): Call them. + (elf64_alpha_size_got_sections): Remove output_bfd arg. + (elf64_alpha_finish_dynamic_symbol): Check gotent use_count. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New. + (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs + in shared libraries. Fix DTPRELHI and TPRELHI value. + (INSN_ADDQ, INSN_RDUNIQ): New. + (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent. + (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend + argument. Reject dynamic symbols. Use LITUSE symbolic constants. + (elf64_alpha_relax_got_load): Rename from relax_without_lituse. + Handle GOTDTPREL and GOTTPREL relocations. + (elf64_alpha_relax_gprelhilo): New. + (elf64_alpha_relax_tls_get_addr): New. + (elf64_alpha_relax_find_tls_segment): New. + (elf64_alpha_relax_section): Handle TLS relocations. + (ALPHA_ELF_LINK_HASH_TLS_IE): New. + (elf64_alpha_check_relocs): Set it. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp. + + * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic + check; don't suppress dynamic relocs for non-allocated sections. + + * elf64-alpha.c: Remove dead code. + +2002-05-31 Alan Modra <amodra@bigpond.net.au> + + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * po/SRC-POTFILES.in: Regenerate. + + * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate + space for bss .plt. + +2002-05-31 Graeme Peterson <gp@qnx.com> + + * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo. + (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c. + Run "make dep-am". + * Makefile.in: Regenerate. + * config.bfd: Add i[3456]86-*-nto-qnx* support. + * configure.in: Add bfd_elf32_i386qnx_vec support. + * configure: Regenerate. + * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos, + is_contained_by_filepos, and copy_private_bfd_data_p. + * elf.c (assign_file_positions_for_segments): Call backend + set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler. + (IS_CONTAINED_BY_FILEPOS): Define. + (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS. + (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix. + Fix non-K&R call to _bfd_error_handler. + (_bfd_elf_copy_private_section_data): Use backend + copy_private_bfd_data_p. + * elf32-i386.c: Don't include elfxx-target.h when + ELF32_I386_C_INCLUDED is defined. + * elf32-i386qnx.c: New QNX elf backend file. + * elfxx-target.h: Add elf_backend_set_nonloadable_filepos, + elf_backend_is_contained_by_filepos, and + elf_backend_do_copy_private_bfd_data. + * targets.c: Add bfd_target bfd_elf32_i386qnx_vec. + +2002-05-31 Alan Modra <amodra@bigpond.net.au> + + * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define. + Move other similar defines to start of file. + +2002-05-30 Tom Rix <trix@redhat.com> + + * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA. + * coff64-rs6000.c (xcoff64_rtype2howto): Same. + +2002-05-30 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD, + ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New. + (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove. + (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove. + (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated. + (struct alpha_elf_obj_tdata): Rename total_got_entries and + n_local_got_entries to total_got_size and local_got_size. + (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs. + (alpha_got_entry_size): New. + (elf64_alpha_relax_with_lituse): Use it. + (elf64_alpha_relax_without_lituse): Likewise. + (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES. + (get_got_entry): New. + (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize. + (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask. + (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type. + (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise. + (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size. + (elf64_alpha_calc_got_offsets): Likewise. + (alpha_dynamic_entries_for_reloc): New. + (elf64_alpha_calc_dynrel_sizes): Use it. + (elf64_alpha_size_dynamic_sections): Likewise. + (elf64_alpha_relocate_section): Handle TLS relocations. + * reloc.c: Add Alpha TLS relocations. + * bfd-in2.h, libbfd.h: Rebuild. + +2002-05-29 Ralf Habacker <ralf.habacker@freenet.de> + + * peXXigen.c (pe_print_idata): Remove double printed + import table lines; add Bound-To comment. + +2002-05-29 Matt Thomas <matt@3am-software.com> + + * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo. + (BFD32_BACKENDS_CFILES): Add elf32-vax.c. + (elf32-vax.lo): New rule. + * Makefile.in: Regenerate. + * configure.in (bfd_elf32_vax_vec) + (vaxnetbsd_vec): New vectors. + * configure: Regenerate. + * config.bfd (vax-*-netbsdelf*) + (vax-*-netbsdaout*) + (vax-*-netbsd*): New targets. + * elf32-vax.c: New file. + * reloc.c: Add VAX relocations. + * bfd-in2.h: Regenerate. + * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec. + +2002-05-29 Jason Thorpe <thorpej@wasabisystems.com> + + * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec + and bfd_elf32_bigarm_vec to targ_selvecs. + +2002-05-29 Ralf Habacker <ralf.habacker@freenet.de> + + * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables + with auto-imported symbols. + +2002-05-29 Adam Nemet <anemet@lnxw.com> + + * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue + sections only record bfd. + (bfd_elf32_arm_add_glue_sections_to_bfd): New function. + * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it. + * bfd-in2.h: Regenerate. + +2002-05-28 Nick Clifton <nickc@cambridge.redhat.com> + + * syms.c (_bfd_stab_section_find_nearest_line): Move + declaration and initialisation of saw_line and saw_func out of + for loop. + +2002-05-29 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_get_symbol_info): New function. + (bfd_elf64_get_symbol_info): Define. + * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef. + +2002-05-29 Andrey Volkov <avolkov@transas.com> + + * cpu-h8300.c: Make default h8300 machine first in machine list. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * config.bfd: Added DLX configuraton. + * Makefile.am: Added DLX configuraton. + * configure.in: Added DLX configuraton. + * archures.c: Add DLX architecure. + * reloc.c: Add DLX relocs. + * targets.c: Added DLX target vector. + * configure: Regenerate. + * Makefile.in: Regenreate. + * bfd-in2.h: Regenreate. + * elf32-dlx.c: New file: Support DLX target. + * cpu-dlx.c: New file: Support DLX target. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting. + + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change. + (ppc64_elf_check_relocs): Don't set up function descriptor symbol + strings to point inside function code sym string. + (func_desc_adjust): Likewise. + (ppc64_elf_hide_symbol): Rewrite code to look up function code sym. + +2002-05-24 Michal Ludvig <mludvig@suse.cz> + + * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added. + (elf64_x86_64_grok_psinfo): Added. + +2002-05-24 TAMURA Kent <kent@netbsd.org> + + * config.bfd: Add a target for i386-netbsdpe. + +2002-05-24 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func + and is_func_descriptor. + (func_desc_adjust): Hide function code sym in shared libs unless + there is a matching exported function descriptor sym. + +2002-05-23 Jakub Jelinek <jakub@redhat.com> + + * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL + for symbols from SHF_TLS section. + (_bfd_elf_print_private_bfd_data): Add PT_TLS. + (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections. + (map_sections_to_segments): Build PT_TLS segment if necessary. + (assign_file_positions_for_segments): Likewise. + (get_program_header_size): Account for PT_TLS segment. + (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from + SEC_THREAD_LOCAL sections to STT_TLS. + * reloc.c: Add 386 and IA-64 TLS relocs. + * section.c (SEC_THREAD_LOCAL): Define. + (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS): + Remove. + * elflink.h (elf_link_add_object_symbols): Support .tcommon. + (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS + unconditionally. + (struct elf_final_link_info): Add first_tls_sec. + (elf_bfd_final_link): Set first_tls_sec. + Compute elf_hash_table (info)->tls_segment. + (elf_link_output_extsym): Handle STT_TLS symbols. + (elf_link_input_bfd): Likewise. + * syms.c (BSF_THREAD_LOCAL): Define. + * bfd-in2.h: Rebuilt. + * libbfd.h: Rebuilt. + * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff, + elf_i386_mkobject, elf_i386_object_p): New functions. + (elf_howto_table): Add TLS relocs. + (elf_i386_reloc_type_lookup): Support TLS relocs. + (elf_i386_info_to_howto_rel): Likewise. + (struct elf_i386_link_hash_entry): Add tls_type. + (struct elf_i386_obj_tdata): New. + (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type): + New macros. + (struct elf_i386_link_hash_table): Add tls_ldm_got. + (link_hash_newfunc): Clear tls_type. + (elf_i386_check_relocs): Support TLS relocs. + (elf_i386_gc_sweep_hook): Likewise. + (allocate_dynrelocs): Likewise. + (elf_i386_size_dynamic_sections): Likewise. + (elf_i386_relocate_section): Likewise. + (elf_i386_finish_dynamic_symbol): Likewise. + (bfd_elf32_mkobject, elf_backend_object_p): Define. + * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset, + dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done, + want_tprel, want_dtpmod, want_dtprel. + (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions. + (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to + R_IA64_LTOFF_TPREL22. + (elf_code_to_howto_index): Add TLS relocs. + (elfNN_ia64_check_relocs): Support TLS relocs. + (allocate_global_data_got): Account for TLS .got data. + (allocate_dynrel_entries): Account for TLS dynamic relocations. + (elfNN_ia64_install_value): Supprt TLS relocs. + (set_got_entry): Support TLS relocs. + (elfNN_ia64_relocate_section): Likewise. + +2002-05-23 Nick Clifton <nickc@cambridge.redhat.com> + + * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb + BLX reloc round the relocation up rather than down. + * coff-arm.c (coff_arm_relocate_section): Likewise. + +2002-05-21 H.J. Lu (hjl@gnu.org) + + * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple + definition. + +2002-05-22 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt. + (ppc64_elf_relocate_section): Handle unresolved relocs in opd. + +2002-05-22 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_relocate_section): Return false for + unresolved relocs. + (ppc64_elf_size_dynamic_sections): Check for splt NULL. + +2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for + non-ELF targets. + +2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return + an error value. + * elflink.h (elf_link_output_relocs): Likewise. Improve error message. + return with false on error. + (elf_link_input_bfd): Check reloc_emitter return value. + +2002-05-21 Jason Thorpe <thorpej@wasabisystems.com> + + * config.bfd (armeb-*-netbsdelf*): New target. + +2002-05-20 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms + at the plt call stub. + +2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * cpu-mips.c (mips_compatible): Don't try to check machine + compatibility. + +2002-05-18 Tom Rix <trix@redhat.com> + + * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent. + +2002-05-17 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting. + (ppc64_elf_relocate_section): Don't warn about reloc overflow when + we've already warned about an undefined symbol. Report more + detail on reloc errors. + +2002-05-17 Alan Modra <amodra@bigpond.net.au> + + * acinclude.m4 (AM_INSTALL_LIBBFD): New. + * configure.in: Invoke AM_INSTALL_LIBBFD. + * Makefile.am (install-data-local): Revert 2002-05-13. Move to.. + (install_libbfd): .. New target. + (uninstall_libbfd): Likewise. + (install-bfdlibLTLIBRARIES): Likewise. + (uninstall-bfdlibLTLIBRARIES): Likewise. + (bfdlibdir): New. + (bfdincludedir): New. + (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + +2002-05-17 Stuart Balfour <sbalfour@cisco.com> + + * hash.c (bfd_hash_lookup): Remove computation of len from inside + hash loop. + +2002-05-16 Nick Clifton <nickc@cambridge.redhat.com> + + * config.bfd: Add targets for sh64-linux (little endian and + big endian). + +2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be> + + * peXXigen.c (pe_print_idata): Do not assume that the first thunk + is located in the same section as the import table. Instead + check, and if necessary load the section containing the thunk. + +2002-05-15 Nick Clifton <nickc@cambridge.redhat.com> + + * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with + bfd_bread. + (xcoff64_core_file_matches_executable_p): Replace bfd_read + with bfd_bread. + +2002-05-15 Alan Modra <amodra@bigpond.net.au> + + * aix5ppc-core.c: Warning fixes. + * aout-adobe.c (aout_32_bfd_link_just_syms): Define. + * aout-target.h (MY_bfd_link_just_syms): Define. + * aout-tic30.c (MY_bfd_link_just_syms): Define. + * bfd.c (bfd_link_just_syms): Define. + * binary.c (binary_bfd_link_just_syms): Define. + * bout.c (b_out_bfd_link_just_syms): Define. + * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer. + * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise. + * coffcode.h (coff_bfd_link_just_syms): Define. + * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS. + (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS. + (_bfd_elf_link_just_syms): Declare. + * elf.c (_bfd_elf_link_just_syms): New function. + * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that + sections haven't already been discarded by the linker. + * elflink.h (elf_link_add_object_symbols): Likewise for stab + sections and SEC_MERGE sections. + (elf_bfd_discard_info): Similarly here. + * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define. + * i386msdos.c (msdos_bfd_link_just_syms): Define. + * i386os9k.c (os9k_bfd_link_just_syms): Define. + * ieee.c (ieee_bfd_link_just_syms): Define. + * ihex.c (ihex_bfd_link_just_syms): Define. + * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define. + (_bfd_generic_link_just_syms): Declare. + * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define. + * linker.c (_bfd_generic_link_just_syms): New function. + * mmo.c (mmo_bfd_link_just_syms): Define. + * nlm-target.h (nlm_bfd_link_just_syms): Define. + * oasys.c (oasys_bfd_link_just_syms): Define. + * ppcboot.c (ppcboot_bfd_link_just_syms): Define. + * som.c (som_bfd_link_just_syms): Define. + * srec.c (srec_bfd_link_just_syms): Define. + * targets.c (struct bfd_target): Add _bfd_link_just_syms. + (BFD_JUMP_TABLE_LINK): And here. + * tekhex.c (tekhex_bfd_link_just_syms): Define. + * versados.c (versados_bfd_link_just_syms): Define. + * vms.c (vms_bfd_link_just_syms): Define. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * elf32-mips.c: Remove superfluous definitions copied from + elfxx-mips.c. + (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the + SGIish vectors to check the special case. + (mips_elf_hi16_reloc): Fix comment. + (mips_elf_got16_reloc): Likewise. + (_bfd_mips_elf32_gprel16_reloc): Likewise. + (elf_reloc_map): Code cleanup. + (mips_reloc_map): Add comment. + (bfd_elf23_bfd_reloc_type_lookup): Code cleanup. + (mips_elf32_rtype_to_howto): Likewise. + (mips_elf32_discard_info): Likewise. + (elf32_mips_irix_compat): Invert logic: Only SGIish vectors + lead to IRIX compatibility now. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * elfxx-mips.c: Call it IRIX, not Irix in comments. + +2002-05-13 Jason Thorpe <thorpej@wasabisystems.com> + + * config.bfd (shle-*-netbsdelf*): Add target which includes + sh64 support. 2002-05-13 David Edelsohn <edelsohn@gnu.org> - * configure.in: Auto-configure HAVE_ST_C_IMPL. + * configure.in: Revert 2002-04-07. Instead, auto-configure + HAVE_ST_C_IMPL. * configure: Regenerate. * config.in: Regenerate. * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL or AIX_5_CORE. -2002-05-11 Daniel Jacobowitz <drow@mvista.com> +2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br> - Merge from mainline (to elf32-mips.c): - 2002-05-03 H.J. Lu (hjl@gnu.org) + * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd + corefiles as well.2 + * configure: Regenerate. - * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local. - (mips_elf_link_hash_newfunc): Initialize forced_local to false. - (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol - to hide a global symbol. - (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set - forced_local to true. +2002-05-13 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (install-data-local): Install headers to + $(exec_prefix)/include. + * Makefile.in: Regenerate. 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de> Daniel Jacobowitz <drow@mvista.com> @@ -34,19 +1996,48 @@ * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't map BFD_RELOC_RVA. +2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br> + + * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*, + hppa*-*-openbsd*): New targets. + * configure.in (alpha*-*-openbsd*): Set COREFILE. + * configure: Regenerate. + +2002-05-10 Tom Rix <trix@redhat.com> + + * coff64-rs6000.c (xcoff64_reloc_type_br): New function for + xcoff64_ppc_relocate_section. + * coff-rs6000.c : Extern common xcoff_reloc_type functions. + * libxcoff.h: Common xcoff_reloc_type function declaration. + +2002-05-10 Alan Modra <amodra@bigpond.net.au> + + * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks + added in 2002-05-09 commit. + + * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04, + don't look for stubs on all undefined syms. + 2002-05-09 Alan Modra <amodra@bigpond.net.au> * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete. + (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or + pcrel_offset. + + * elf32-i386.c (elf_howto_table): Comments. + (elf_i386_relocate_section): Handle more relocs for relocatable + linking and against SEC_MERGE sections. + +2002-05-08 Alan Modra <amodra@bigpond.net.au> - Merge from mainline - 2002-05-08 Alan Modra <amodra@bigpond.net.au> * elf32-ppc.c (ppc_elf_create_got): New function. (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before - _bfd_elf_create_dynamic_sections. Correct .plt flags. + _bfd_elf_create_dynamic_sections. Correct .plt flags. (ppc_elf_check_relocs): Use ppc_elf_create_got in place of _bfd_elf_create_got_section. - 2002-05-07 Alan Modra <amodra@bigpond.net.au> +2002-05-07 Alan Modra <amodra@bigpond.net.au> + * elf-bfd.h (struct elf_backend_data): Add rela_normal. * elfxx-target.h (elf_backend_rela_normal): Define. (elfNN_bed): Init rela_normal. @@ -88,11 +2079,21 @@ * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL. * elf32-m32r.c (elf_backend_rela_normal): Likewise. - 2002-05-06 Alan Modra <amodra@bigpond.net.au> +2002-05-06 Nick Clifton <nickc@cambridge.redhat.com> + + * elf32-arm.h (elf32_arm_final_link_relocate): Convert + 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets. + +2002-05-06 Alan Modra <amodra@bigpond.net.au> + * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset when not relocatable. Fix reloc_emitter call for K&R. - 2002-05-04 Alan Modra <amodra@bigpond.net.au> +2002-05-04 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code + reloading local sym addend mistakenly removed in 2002-05-01 change. + * dwarf2.c (struct line_head): Make prologue_length a bfd_vma. (read_abbrevs): Change "offset" param to bfd_vma. (parse_comp_unit): Change "version" and addr_size to unsigned ints. @@ -105,11 +2106,66 @@ (scan_unit_for_functions): Likewise. (parse_comp_unit): Likewise. - 2002-05-04 Bob Byrnes <byrnes@curl.com> +2002-05-04 Tom Rix <trix@redhat.com> + + * coffswap.h (coff_swap_reloc_in): Remove XCOFF support. + (coff_swap_reloc_out): Same. + * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h. + (xcoff_swap_reloc_out): Same. + (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special + case some 16 bit relocs. Add reloc value to output. + (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit + R_RBR. Improve names. + (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS. + (bfd_xcoff_backend_data): Update with new reloc swap names. + (bfd_pmac_xcoff_backend_data) : Same. + * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h. + (xcoff64_swap_reloc_out): Same. + (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit + R_POS. Add reloc value to output. + (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16 + bit R_RBR. Improve names, masks. + (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS. + (bfd_xcoff_backend_data): Update with new reloc swap names. + (bfd_xcoff_aix5_backend_data) : Same. + +2002-05-04 Alan Modra <amodra@bigpond.net.au> + + * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add + bfd_count top_index, input_list, all_local_syms. + (elf32_hppa_setup_section_lists): New function, split from + elf32_hppa_size_stubs. + (elf32_hppa_next_input_section): Likewise. + (group_sections): Likewise. + (get_local_syms): Likewise. + (elf32_hppa_size_stubs): Adjust for split out functions. Look for + stubs on undefined syms too. + (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*. + Only access htab elf fields when we have an elf hash table. + * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare. + (elf32_hppa_next_input_section): Declare. + +2002-05-04 Bob Byrnes <byrnes@curl.com> + * opncls.c (_bfd_new_bfd_contained_in): Check return value of _bfd_new_bfd. - 2002-05-02 Alan Modra <amodra@bigpond.net.au> +2002-05-03 H.J. Lu (hjl@gnu.org) + + * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local. + (mips_elf_link_hash_newfunc): Initialize forced_local to false. + (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol + to hide a global symbol. + (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set + forced_local to true. + +2002-05-02 Richard Henderson <rth@redhat.com> + + * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs + vs SHN_UNDEF to zero. + +2002-05-02 Alan Modra <amodra@bigpond.net.au> + * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a 16 bit reloc. <R_PPC64_SECTOFF_DS>: Likewise. @@ -118,6 +2174,7 @@ * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct. (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to SECTOFF reloc. + * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete. (ppc64_elf_ha_reloc): New function. (ppc64_elf_brtaken_reloc): New function. @@ -137,18 +2194,24 @@ (func_desc_adjust): Set have_undefweak. (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only add the .sfpr blr when have_undefweak. + (ppc64_elf_setup_section_lists): Check hash table flavour. + (ppc64_elf_next_input_section): Move output_section->owner test to + ppc64elf.em. (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param and relocatable test. Return TOCstart and don't set elf_gp. (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch offset calculation. Add assert on weak sym branch tweaks. * elf64-ppc.h (ppc64_elf_set_toc): Delete. (ppc64_elf_toc): Declare. + (ppc64_elf_next_input_section): Update. + +2002-05-01 Alan Modra <amodra@bigpond.net.au> - 2002-05-01 Alan Modra <amodra@bigpond.net.au> * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL file_name. - 2002-05-01 Alan Modra <amodra@bigpond.net.au> +2002-05-01 Alan Modra <amodra@bigpond.net.au> + * elf64-ppc.c (CROR_151515, CROR_313131): Define. (ppc64_elf_relocate_section): Use them. Don't look for plt calls on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt @@ -157,92 +2220,116 @@ .sfpr, and correct case where either only savef* or restf* is needed. - 2002-04-09 DJ Delorie <dj@redhat.com> - * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks. + Long branch stubs, multiple stub sections. + * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare. + (ppc64_elf_next_input_section): Declare. + * elf64-ppc.c: Move linker-only prototypes. + (STUB_SUFFIX): Define. + (enum ppc_stub_type): New. + (struct ppc_stub_hash_entry): New. + (struct ppc_branch_hash_entry): New. + (struct ppc_link_hash_entry): Add stub_cache, oh. + (struct ppc_link_hash_table): Add stub_hash_table etc. Remove + sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration. + Rename plt_overflow to stub_error. + (ppc_stub_hash_lookup): Define. + (ppc_branch_hash_lookup): Define. + (stub_hash_newfunc): New function. + (branch_hash_newfunc): New function. + (link_hash_newfunc): Init new fields. + (ppc64_elf_link_hash_table_create): Likewise. + (ppc64_elf_link_hash_table_free): New function. + (ppc_stub_name): New function. + (ppc_get_stub_entry): New function. + (ppc_add_stub): New function. + (create_linkage_sections): Use bfd_make_section_anyway. Create + .branch_lt and .rela.branch_lt sections. Don't create .stub. + (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*, + and set up for plt call stubs. Link func and func desc syms. + (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24. + (func_desc_adjust): Avoid hash lookup when func desc sym available + via shortcut, and set links when processing. + (ppc64_elf_hide_symbol): Likewise. + (allocate_dynrelocs): Don't allocate stub section here. + (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt. + Remove sstub code. + (ppc_type_of_stub): New function. + (build_one_stub): Delete. + (ppc_build_one_stub): New function. + (ppc_size_one_stub): New function. + (ppc64_elf_setup_section_lists): New function. + (ppc64_elf_next_input_section): New function. + (group_sections): New function. + (get_local_syms): New function. + (ppc64_elf_size_stubs): Rewrite. + (ppc64_elf_build_stubs): Rewrite. + (ppc64_elf_relocate_section): Look up stub entry for REL24 + relocs. Don't propagate REL14* to dynamic objects. Look for long + branch stubs if REL14* or REL24 relocs won't reach. + (bfd_elf64_bfd_link_hash_table_free): Define. + +2002-04-30 Mark Mitchell <mark@codesourcery.com> + + * bfd/config.bfd: Add support for powerpc-*-windiss. + +2002-04-30 Tom Rix <trix@redhat.com> + + * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT + symbol names into the hash table. + +2002-04-28 Tom Rix <trix@redhat.com> + + * coff-rs6000.c (xcoff_calculate_relocation) : Function table for + calulating relocations. + (xcoff_complain_overflow) : Function table for relocation errors. + (xcoff_ppc_relocate_section): Use relocation and complain function + tables. + (xcoff_complain_overflow_unsigned_func): New complain function. + (xcoff_complain_overflow_signed_func): Same. + (xcoff_complain_overflow_bitfield_func): Same. + (xcoff_complain_overflow_dont_func): Same. + (xcoff_reloc_type_crel): New recot function. + (xcoff_reloc_type_br): Same. + (xcoff_reloc_type_ba): Same. + (xcoff_reloc_type_toc): Same. + (xcoff_reloc_type_rel): Same. + (xcoff_reloc_type_neg): Same. + (xcoff_reloc_type_pos): Same. + (xcoff_reloc_type_fail): Same. + (xcoff_reloc_type_noop): Same. + * libxcoff.h : Declare common parts for xcoff64. + * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation + and complain function tables. + +2002-04-28 Alan Modra <amodra@bigpond.net.au> + + * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo. + * elf32-hppa.c (elf32_hppa_final_link): Formatting. + +2002-04-26 Alan Modra <amodra@bigpond.net.au> -2002-05-06 Nick Clifton <nickc@cambridge.redhat.com> + * opncls.c (bfd_make_readable): Call bfd_section_list_clear. + * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise. - * elf32-arm.h (elf32_arm_final_link_relocate): Convert - 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets. + * elflink.h (elf_bfd_final_link): Ensure input bfd class is the + same as the output before calling elf_link_input_bfd. -2002-05-02 Richard Henderson <rth@redhat.com> + * coffcode.h (coff_compute_section_file_positions): Set + section_tail after shuffling section list. - * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs - vs SHN_UNDEF to zero. +2002-04-24 Christian Groessler <chris@groessler.org> -2002-04-27 Alan Modra <amodra@bigpond.net.au> + * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The + addresses are 23bit with a special layout, not plain 32bit + values. Prevent relocation of immediate values. - Merge from mainline - 2002-04-12 Alan Modra <amodra@bigpond.net.au> - * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or - header pad. +2002-04-24 Chris G. Demetriou <cgd@broadcom.com> - 2002-02-21 Andreas Jaeger <aj@suse.de> - * elf64-x86-64.c: Major rework that introduces all recent changes - to the x86-64 backend. Get a closer match to elf32-i386. - (struct elf64_x86_64_dyn_relocs): Rename from - elf64_x86_64_pcrel_relocs_copied, add additional fields. Change - all users. - (struct elf64_x86_64_link_hash_table): Add short cuts to some - sections. - (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc, - remove casts, initialize new hash members. - (create_got_section): New. - (elf64_x86_64_create_dynamic_sections): New. - (elf64_x86_64_copy_indirect_symbol): New. - (elf64_x86_64_check_relocs): Don't allocate space for dynamic - relocs, .got or .relgot here but do it in allocate_dynrelocs. - Reference count possible .plt and .got entries. Don't test input - section SEC_READONLY here to try to avoid copy relocs, and keep - dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set - DF_TEXTREL here. Delay setting of variables until needed. Cache - pointer to "sreloc" section in elf_section_data. Tweak condition - under which .got created. Report files with bad relocation - section names. - (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. - Reference count possible .plt entries. Don't deallocate .got and - .relgot space here. - (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't - do copy reloc processing for weakdefs. Remove redundant casts and - aborts. Delay setting of vars until needed. Move creation of - dynamic symbols and allocation of .plt and .rela.plt to - allocate_dynrelocs. Replace BFD_ASSERT with abort. - (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. - (allocate_dynrelocs): New. - (readonly_dynrelocs): New. - (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs. - Allocate space for dyn relocs. Replace BFD_ASSERT with abort. - Zero out the dynamic allocated content space. - (elf64_x86_64_discard_copies): Removed. - (elf64_x86_64_relocate_section): Make use of dynamic section - short-cuts. Localise vars, and delay setting. Better error - reporting, replace BFD_ASSERT with abort. Check - ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the - regular object file and tread the weak definition as the normal - one. Don't discard relocs for undefweak or undefined symbols and - check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy - relocs. - (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for - symbols that have been forced local. Use same test to decide if - we can use a relative reloc for got as relocate_section. Expand - SHN_UNDEF comment. Move expressions out of function calls. - Replace BFD_ASSERT with abort. - (bfd_elf64_bfd_final_link): Removed. - (elf_backend_copy_indirect_symbol): Define. + * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or + MIPS-16 ASE flags are set, print something to indicate that. - * reloc.c: Move sh relocs to where they belong. - * libbfd.h, bfd-in2.h: Regenerate. +2002-04-23 Alan Modra <amodra@bigpond.net.au> - Merge from mainline - 2002-04-26 Alan Modra <amodra@bigpond.net.au> - * opncls.c (bfd_make_readable): Call bfd_section_list_clear. - * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise. - * elflink.h (elf_bfd_final_link): Ensure input bfd class is the - same as the output before calling elf_link_input_bfd. - * coffcode.h (coff_compute_section_file_positions): Set - section_tail after shuffling section list. - - 2002-04-23 Alan Modra <amodra@bigpond.net.au> * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition under which a plt call stub is used. (final_link_relocate): Similarly. @@ -254,35 +2341,17 @@ (BL22_RP): Define. (hppa_build_one_stub): Use BL22_RP if has_22bit_branch. (elf32_hppa_check_relocs): Set has_22bit_branch. + * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message. (final_link_relocate): Likewise. - 2002-04-20 Alan Modra <amodra@bigpond.net.au> - * archures.c (bfd_arch_info): Add comment on list order. - (bfd_default_set_arch_mach): Use bfd_lookup_arch. - * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default - is always at head of list. - * bfd-in2.h: Regenerate. - - 2002-04-16 Alan Modra <amodra@bigpond.net.au> - * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table - type rather than just assuming entries are ELF. - * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise. - * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise. - * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise. - * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry - rather than elf_link_hash_entry. - - 2002-04-15 Alan Modra <amodra@bigpond.net.au> - * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type. +2002-04-22 Jakub Jelinek <jakub@redhat.com> - 2002-04-08 Randolph Chung <tausq@debian.org> - * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h. - (elf32_hppa_final_link): Split out sorting logic to.. - * elf-hppa.h (elf_hppa_sort_unwind): ..here. - (elf_hppa_final_link): Call elf_hppa_sort_unwind. + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build + search table if some FDE is DW_EH_PE_aligned encoded either. + (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially. -2002-04-26 Richard Smith <richard@ex-parrot.com> +2002-04-22 Richard Smith <richard@ex-parrot.com> Jakub Jelinek <jakub@redhat.com> * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative. @@ -291,11 +2360,20 @@ (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality for CIE/FDE removal. -2002-04-26 Jakub Jelinek <jakub@redhat.com> +2002-04-20 Tom Rix <trix@redhat.com> - * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build - search table if some FDE is DW_EH_PE_aligned encoded either. - (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially. + * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent. + +2002-04-20 Alan Modra <amodra@bigpond.net.au> + + * archures.c (bfd_lookup_arch): Move the list order comment.. + (struct bfd_arch_info): ..to where it belongs. + * bfd-in2.h: Regenerate. + + * archures.c (bfd_lookup_arch): Add comment on list order. + (bfd_default_set_arch_mach): Use bfd_lookup_arch. + * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default + is always at head of list. 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com> @@ -303,15 +2381,91 @@ insert_thumb_branch, record_thumb_to_arm_glue): Suppress definition of these functions for ARM_WINCE builds as they are not used. - (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define + (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define for ARM_WINCE builds. +2002-04-18 Nick Clifton <nickc@cambridge.redhat.com> + + * coff-arm.c (bfd_arm_process_before_allocation): + +2002-04-17 J"orn Rennecke <joern.rennecke@superh.com> + + * cpu-sh.c (scan_mach): Delete. + (arch_info_struct): Replace scan_mach with bfd_default_scan. + (bfd_sh_arch): Likewise. + 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com> * ihex.c (ihex_write_object_contents): Fix check for records crossing 64K boundaries. -2002-04-06 Hans-Peter Nilsson <hp@axis.com> +2002-04-16 Alan Modra <amodra@bigpond.net.au> + + * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table + type rather than just assuming entries are ELF. + * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise. + * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise. + * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise. + * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry + rather than elf_link_hash_entry. + +2002-04-15 Richard Henderson <rth@redhat.com> + + * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow + n32 binaries. + +2002-04-15 Michael Snyder <msnyder@redhat.com> + + * opncls.c (bfd_close): Write contents if writeable. + Minor formatting tidy-ups. + +2002-04-15 Alan Modra <amodra@bigpond.net.au> + + * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type. + +2002-04-12 Michael Snyder <msnyder@redhat.com> + + * bfd-in.h (bfd_get_section_lma): New access macro. + Minor white-space fix-up. + +2002-04-12 Alan Modra <amodra@bigpond.net.au> + + * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or + header pad. + +2002-04-09 DJ Delorie <dj@redhat.com> + + * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks. + +2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net> + + * coffcode.h (coff_read_word): New. + (coff_compute_checksum): New. + (coff_apply_checksum): New. + (coff_write_object_contents): Call coff_apply_checksum () to + apply checksum to PE image. + +2002-04-08 Randolph Chung <tausq@debian.org> + + * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h. + (elf32_hppa_final_link): Split out sorting logic to.. + * elf-hppa.h (elf_hppa_sort_unwind): ..here. + (elf_hppa_final_link): Call elf_hppa_sort_unwind. + +2002-04-07 Andrew Cagney <ac131313@redhat.com> + + * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]* + pattern. + * configure: Re-generate. + +2002-04-07 Andrew Cagney <ac131313@redhat.com> + + * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version + is greater or equal to 4.3.3. + * configure: Regenerate. + Fix PR gdb/344. + +2002-04-05 Hans-Peter Nilsson <hp@axis.com> * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL, R_CRIS_32_PCREL>: Fix typo in name. @@ -320,17 +2474,140 @@ (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here; assume it's created. +2002-04-04 Daniel Jacobowitz <drow@mvista.com> + + * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define. + * aout-target.h (MY_bfd_link_hash_table_free): Conditionally + define. + * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise. + * bfd.c (bfd_link_hash_table_free): Define. + * binary.c (binary_bfd_link_hash_table_free): Define. + * bout.c (b_out_bfd_link_hash_table_free): Define. + * coff-rs6000.c (rs6000coff_vec): Include + _bfd_generic_link_hash_table_free. + (pmac_xcoff_vec): Likewise. + * coff64-rs6000.c (rs6000coff64_vec): Likewise. + (aix5coff64_vec): Likewise. + * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define. + * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function. + (bfd_elf32_bfd_link_hash_table_free): Define. + * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function. + (bfd_elf32_bfd_link_hash_table_free): Define. + * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally + define. + * i386msdos.c (msdos_bfd_link_hash_table_free): Define. + * i386os9k.c (os9k_bfd_link_hash_table_free): Define. + * ieee.c (ieee_bfd_link_hash_table_free): Define. + * ihex.c (ihex_bfd_link_hash_table_free): Define. + * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define. + (_bfd_generic_link_hash_table_free): Add prototype. + * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype. + * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define. + * linker.c (_bfd_generic_link_hash_table_free): New function. + * mmo.c (mmo_bfd_link_hash_table_free): Define. + * nlm-target.h (nlm_bfd_link_hash_table_free): Define. + * oasys.c (oasys_bfd_link_hash_table_free): Define. + * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define. + * som.c (som_bfd_link_hash_table_free): Define. + * srec.c (srec_bfd_link_hash_table_free): Define. + * tekhex.c (tekhex_bfd_link_hash_table_free): Define. + * versados.c (versados_bfd_link_hash_table_free): Define. + * vms.c (vms_bfd_link_hash_table_free): New function. + * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function. + + * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc + instead of bfd_alloc. + * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise. + * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise. + * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise. + * cofflink.c (_bfd_coff_link_hash_table_create): Likewise. + * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise. + * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise. + * elf.c (_bfd_elf_link_hash_table_create): Likewise. + * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise. + * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. + * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise. + * elf32-i386.c (elf_i386_link_hash_table_create): Likewise. + * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. + * elf32-s390.c (elf_s390_link_hash_table_create): Likewise. + * elf32-sh.c (sh_elf_link_hash_table_create): Likewise. + * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise. + * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise. + * elf64-s390.c (elf_s390_link_hash_table_create): Likewise. + * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise. + * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise. + * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise. + * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise. + * linker.c (_bfd_generic_link_hash_table_create): Likewise. + * m68klinux.c (linux_link_hash_table_create): Likewise. + * sparclinux.c (linux_link_hash_table_create): Likewise. + * sunos.c (sunos_link_hash_table_create): Likewise. + * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise. + + * targets.c: Add _bfd_link_hash_table_free to xvec. + + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + 2002-04-04 Alan Modra <amodra@bigpond.net.au> - * configure.in: Bump version to 2.12.1 and comment out is_release. - * configure: Regenerate. * dep-in.sed: Cope with absolute paths. * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR. Run "make dep-am". * Makefile.in: Regenerate. + * coff-arm.c: Fix copyright date. + * cpu-h8300.c: Likewise. + * cpu-i370.c: Likewise. + * cpu-s390.c: Likewise. + * cpu-mips.c: Likewise. + * po/SRC-POTFILES.in: Regenerate. + +2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * Makefile.am: Add elfxx-mips.c to the known backends. + (elf32-mips.lo): remove dependency to coff/external.h. + * Makefile.in: Regenerate. + * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo + Remove elf32-mips.lo from 64 bit vectors. Update dependencies + accordingly. + * configure: Regenerate. + * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h. + (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c. + (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New + MIPS specific backend functions. + * elf32-mips.c: Moved most code to elfxx-mips.c. + (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make + static. + (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc. + (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc. + (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc. + (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed + interface to allow selection of the right REL or RELA howto table. + (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made + static. Let it refuse n32 objects. + (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus. + (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo. + (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info. + (elf32_mips_ignore_discarded_relocs): Rename from + _bfd_elf32_mips_ignore_discarded_relocs. + (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section. + (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT. + (elf_mips_howto_table_rela): Remove. + * elf64-mips.c: Moved most code to elfxx-mips.c. + (bfd_elf64_bfd_reloc_type_lookup): Make static. + (mips_elf64_rtype_to_howto): New function. + (mips_elf64_object_p): Likewise. + (elf64_mips_irix_compat): Likewise. + * elfxx-mips.c: New file containing common code merged together from + elf32-mips.c and elf64-mips.c. + * elfxx-mips.h: New file containing MIPS specific prototypes from + elf-bfd.h. + * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and + elf_backend_mips_rtype_to_howto. + +2002-04-04 Alan Modra <amodra@bigpond.net.au> - Merge from mainline - 2002-04-04 Alan Modra <amodra@bigpond.net.au> * srec.c (MAXCHUNK, Chunk): Revise comments. (srec_write_record): Correct buffer size. (srec_write_header): Do without intermediate buffer. @@ -339,21 +2616,37 @@ (srec_write_symbols): Pass file and symbol names directly to bfd_bwrite so sprintf won't overflow buffer. - 2002-04-03 Jakub Jelinek <jakub@redhat.com> +2002-04-03 Jakub Jelinek <jakub@redhat.com> + * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic PC relative relocs against hidden symbols. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - 2002-04-03 Alan Modra <amodra@bigpond.net.au> +2002-04-03 Alan Modra <amodra@bigpond.net.au> + * elf.c (_bfd_elf_make_section_from_shdr): When setting section LMAs, loop over segments until p_vaddr and p_memsz specify an extent enclosing the section. - 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com> +2002-04-02 Nick Clifton <nickc@cambridge.redhat.com> + * ihex.c (ihex_write_object_contents): Do not allow records to cross a 64K boundary - wrap if necessary. - 2002-03-28 Alan Modra <amodra@bigpond.net.au> +2002-04-01 Nathan Williams <nathanw@wasabisystems.com> + + * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error + which caused the returned LWP ID to always be 0. + +2002-04-01 Richard Henderson <rth@redhat.com> + + * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. + (elf32_sparc_relocate_section): Use it to figure out when to + initialize .got entries. + * elf64-sparc.c: Similarly. + +2002-03-28 Alan Modra <amodra@bigpond.net.au> + * linker.c (link_action): Ignore duplicate warning syms. (_bfd_generic_link_write_global_symbol): Follow warning symbol link. * elflink.h (elf_adjust_dynstr_offsets): Likewise. @@ -404,7 +2697,8 @@ * elf64-s390.c (allocate_dynrelocs): Likewise. (readonly_dynrelocs): Likewise. * elf64-sh64.c (sh64_elf64_discard_copies): Likewise. - * elf64-x86-64.c (elf64_x86_64_discard_copies): Likewise. + * elf64-x86-64.c (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise. * aoutx.h (aout_link_write_other_symbol): Likewise. * cofflink.c (_bfd_coff_write_task_globals): Likewise. @@ -416,7 +2710,9 @@ * sunos.c (sunos_scan_dynamic_symbol): Likewise. * xcofflink.c (xcoff_build_ldsyms): Likewise. (xcoff_write_global_symbol): Likewise. + * cofflink.c (_bfd_coff_final_link): Formatting. + * cpu-mips.c (mips_compatible): Make static, prototype. * elf32-i386.c (elf_i386_check_relocs): Formatting. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_output_extsym): Likewise. @@ -425,80 +2721,54 @@ * elflink.h (elf_link_find_version_dependencies): Remove duplicate prototype. - 2002-03-21 Richard Earnshaw <rearnsha@arm.com> - * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>, - <case R_ARM_GOT>): Handle relocations to Thumb functions. +2002-03-27 Nick Clifton <nickc@cambridge.redhat.com> - 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com> - * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set - STT_NOTYPE symbols to STT_OBJECT. + * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define. + (SWAP_OUT_RELOC_OFFSET): Define. - 2002-03-13 Alan Modra <amodra@bigpond.net.au> - * archures.c (bfd_default_compatible): Test bits_per_word. - * cpu-i386.c (i386_compatible): Remove. Replace occurrences with - bfd_default_compatible. - * cpu-i370.c (i370_compatible): Likewise. - * cpu-sparc.c (sparc_compatible): Likewise. - * cpu-h8300.c (compatible): Test in->arch == out->arch. +2002-03-27 Gregory Steuck <greg@nest.cx> - 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> - * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31. - (bfd_mach_s390_esame): Rename to bfd_mach_s390_64. - * bfd-in2.h: Regenerate. - * cpu-s390.c (arch_info_struct): Use renamed architecture defines. - Replace architecture name "s390" with "s390:31-bit" and "s390:esame" - with "s390:64-bit". - * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations. - (elf_s390_reloc_type_lookup): Likewise. - (elf_s390_check_relocs): Likewise. - (elf_s390_gc_sweep_hook): Likewise. - (elf_s390_relocate_section): Likewise. - (elf_s390_object_p): Use renamed architecture define. - * elf64-s390.c (elf_s390_object_p): Use renamed architecture define. + * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for + terminating NULL if empty symbol table. + (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise. -2002-04-03 Alan Modra <amodra@bigpond.net.au> +2002-03-26 H.J. Lu (hjl@gnu.org) - Merge from mainline. - 2002-03-28 Alan Modra <amodra@bigpond.net.au> - * cpu-mips.c (mips_compatible): Make static, prototype. + * elflink.h (elf_link_input_bfd): Revert the last change since + the gcc exception handling isn't fixed yet. - 2002-03-14 Alan Modra <amodra@bigpond.net.au> - * cpu-mips.c (mips_compatible): New. Don't check bits_per_word. - (N): Use the above. +2002-03-26 H.J. Lu (hjl@gnu.org) -2002-04-01 Nathan Williams <nathanw@wasabisystems.com> + * elflink.h (elf_link_input_bfd): Complain about relocations + against local symbols in discarded sections. - * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error - which caused the returned LWP ID to always be 0. +2002-03-26 Alan Modra <amodra@bigpond.net.au> -2002-04-01 Richard Henderson <rth@redhat.com> + * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections. - * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. - (elf32_sparc_relocate_section): Use it to figure out when to - initialize .got entries. - * elf64-sparc.c: Similarly. +2002-03-23 Alan Modra <amodra@bigpond.net.au> -2002-03-28 Alan Modra <amodra@bigpond.net.au> + * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on + section file offset for !SEC_LOAD sections. - * aclocal.m4: Regenerate. - * config.in: Regenerate. - * Makefile.am: Run "make dep-am". - * Makefile.in: Regenerate. +2002-03-21 Richard Earnshaw <rearnsha@arm.com> - Merge from mainline - 2002-03-27 Gregory Steuck <greg@nest.cx> - * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for - terminating NULL if empty symbol table. - (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise. + * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>, + <case R_ARM_GOT>): Handle relocations to Thumb functions. - 2002-03-26 Alan Modra <amodra@bigpond.net.au> - * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections. +2002-03-21 Alan Modra <amodra@bigpond.net.au> - 2002-03-23 Alan Modra <amodra@bigpond.net.au> - * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on - section file offset for !SEC_LOAD sections. + * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype. + Whitespace changes. + * archive.c: Update copyright date. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * Makefile.am: Run "make dep-am" + * Makefile.in: Regenerate. + * po/SRC-POTFILES.in: Regenerate. + +2002-03-20 Daniel Jacobowitz <drow@mvista.com> - 2002-03-20 Daniel Jacobowitz <drow@mvista.com> * dwarf2.c (struct funcinfo): Move up. (lookup_address_in_function_table): New argument function_ptr. Set it. @@ -510,42 +2780,128 @@ * syms.c (_bfd_stab_section_find_nearest_line): Use the first N_SLINE encountered if we see an N_FUN before any N_SLINE. - 2002-03-18 Alan Modra <amodra@bigpond.net.au> +2002-03-20 Tom Rix <trix@redhat.com> + + * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from + _bfd_xcoff_generic_stat_arch_elt. Fix format check. + * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt. + +2002-03-19 Tom Rix <trix@redhat.com> + + * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all + dynamic objects in archives. + +2002-03-19 Hans-Peter Nilsson <hp@bitrange.com> + + * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set + STT_NOTYPE symbols to STT_OBJECT. + +2002-03-18 Jan Hubicka <jh@suse.cz> + + * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64" + +2002-03-18 Tom Rix <trix@redhat.com> + + * aix5ppc.core.c : New file for AIX 5 64 bit core support. + * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration. + * coff-rs6000 (do_pad) : New function for archive padding. + (do_copy) : New function for object file copying in archives. + (do_shared_object_padding) : New function for padding shared + objects to their text section alignment in archives. + (bfd_xcoff_ar_achive_set_magic) : Stub. + (xcoff_write_armap_big) : Use do_copy and do_pad. + (xcoff_write_archive_contents_big) : Use do_shared_object_padding, + do_copy and do_pad. + * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use + bfd_xcoff_magic_number. + (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook + fop. + (xcoff_backend_data_r) : Use xcoff64_bad_format_hook. + (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data. + (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000. + * rs6000-core.c : Update copyright date. + * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL + csectpp. + * coffcode.h (coff_new_section_hook) : Use new accessor macros. + (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #. + (coff_set_flags) : Use bfd_xcoff_magic_number. + * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC. + * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support. + * Makefile.am : Same. + * config.bfd : Same. + * targets.c : Same. + * configure : Regnerate. + * Makefile.in : Same. + * bfd-in2.h : Same. + +2002-03-18 Nick Clifton <nickc@cambridge.redhat.com> + + * po/fr.po: Updated version. + +2002-03-18 Alan Modra <amodra@bigpond.net.au> + * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success. * libbfd.h: Regenerate. * archive.c (coff_write_armap): Pass on failures from bfd_write_bigendian_4byte_int. - 2002-03-14 H.J. Lu <hjl@gnu.org> +2002-03-14 H.J. Lu <hjl@gnu.org> + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD error to bfd_error_nonrepresentable_section for reinit_array section in DSO. - 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com> +2002-03-14 Nick Clifton <nickc@cambridge.redhat.com> + * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag, OR it in rather than replacing previously selected flags. + * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15. (TARGET_LITTLE_SYM): Set ar_max_namelen to 15. - 2002-03-14 Alan Modra <amodra@bigpond.net.au> +2002-03-14 Alan Modra <amodra@bigpond.net.au> + + * cpu-mips.c (mips_compatible): New. Don't check bits_per_word. + (N): Use the above. * elflink.h (elf_bfd_final_link): Revert last change. Instead, ensure reloc size matches before calling elf_link_input_bfd. Add an assert to check reloc size when counting output relocs. - 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com> +2002-03-14 Nick Clifton <nickc@cambridge.redhat.com> + * mmo.c (mmo_get_loc): Return NULL rather than false. - 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> + + * archures.c (bfd_default_compatible): Test bits_per_word. + * cpu-i386.c (i386_compatible): Remove. Replace occurrences with + bfd_default_compatible. + * cpu-i370.c (i370_compatible): Likewise. + * cpu-sparc.c (sparc_compatible): Likewise. + * cpu-h8300.c (compatible): Test in->arch == out->arch. + * elflink.h: Formatting fixes. (elf_link_output_extsym): Merge undefined and undef weak cases. + * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd when word size of input matches output word size. - 2002-03-07 H.J. Lu (hjl@gnu.org) +2002-03-12 Andreas Jaeger <aj@suse.de> + + * cpu-i386.c (i386_compatible): New. Use it instead of + bfd_default_compatible. + +2002-03-07 H.J. Lu (hjl@gnu.org) + * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type as the type for bfd_reloc_val. - 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca> +2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca> + * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function. (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols. (elf_hppa_final_link_relocate): Correct relocations for indirect @@ -558,35 +2914,53 @@ * elf32-hppa.c (final_link_relocate): Revise relocation selectors as per "Processor-Specific ELF for PA_RISC, Version 1.43" document. - 2002-03-05 Jakub Jelinek <jakub@redhat.com> +2002-03-05 Jakub Jelinek <jakub@redhat.com> + * merge.c (_bfd_merge_sections): Don't segfault if there is nothing to merge due to GC. - 2002-03-05 Alan Modra <amodra@bigpond.net.au> +2002-03-05 Alan Modra <amodra@bigpond.net.au> + * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep symbols that have been forced local. + * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym to output forced local syms for non-shared link. (elf_link_output_extsym): Tweak condition for calling backend adjust_dynamic_symbol so that previous behaviour is kept. Whitespace changes throughout file. - 2002-03-04 H.J. Lu <hjl@gnu.org> +2002-03-04 H.J. Lu <hjl@gnu.org> + * elf.c (bfd_section_from_shdr): Handle special sections, .init_array, .fini_array and .preinit_array. (elf_fake_sections): Likewise. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the DT entry only if the section is in output for .init_array, .fini_array and .preinit_array. Complain about .preinit_array section in DSO. (elf_bfd_final_link): Warn zero size for .init_array, .fini_array and .preinit_array sections. + * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY. (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and .preinit_array. - 2002-03-01 David Mosberger <davidm@hpl.hp.com> +2002-03-04 Alan Modra <amodra@bigpond.net.au> + + * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment. + * configure: Regenerate. + +2002-03-02 Tom Rix <trix@redhat.com> + + * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with + symbolic equiv. + * coff-rs6000.c (xcoff_howto_table): Same. + +2002-03-01 David Mosberger <davidm@hpl.hp.com> + * elflink.h (size_dynamic_sections): If section named ".preinit_array" exists, create DT_PREINIT_ARRAY and DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for @@ -595,46 +2969,6 @@ DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and DT_FINI_ARRAY. - 2002-02-19 Frank Ch. Eigler <fche@redhat.com> - * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping. - - 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com> - * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on - non-zero physical addresses when adjusting the LMAs of new - sections. - - 2002-02-11 Michael Snyder <msnyder@redhat.com> - * elf-bfd.h (elfcore_write_lwpstatus): Add prototype. - * elf.c (elfcore_grok_pstatus): Add prototype. - (elfcore_grok_lwpstatus): Add prototype. - (elfcore_write_lwpstatus): New function. - (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy. - -2002-03-20 Tom Rix <trix@redhat.com> - - * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from - _bfd_xcoff_generic_stat_arch_elt. Fix format check. - * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt. - -Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> - - * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64" - -2002-03-07 Daniel Jacobowitz <drow@mvista.com> - - * configure.in: Set is_release=y for 2.12 release. - * configure: Likewise. - -2002-03-07 Daniel Jacobowitz <drow@mvista.com> - - * configure.in: Bump version to 2.12. - * configure: Likewise. - -2002-03-05 Alan Modra <amodra@bigpond.net.au> - - * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment. - * configure: Regenerate. - 2002-02-26 Andrew Macleod <amacleod@cygnus.com> * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local @@ -642,34 +2976,104 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> 2002-02-25 Alan Modra <amodra@bigpond.net.au> + * elf64-hppa.h: Update copyright date. + * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix. (ppc64_elf_relocate_section): Don't generate power4 style branch hints for *_BRTAKEN and *_BRNTAKEN relocs. - * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define. - (struct ppc_link_hash_table): Add sfpr. - (ppc64_elf_link_hash_table_create): Init it. - (ppc64_elf_create_dynamic_sections): Split creation of .stub and - .glink out to.. - (create_linkage_sections): ..here. Make .sfpr too. - (ppc64_elf_check_relocs): Call create_linkage_sections, and set - dynobj early. - (MIN_SAVE_FPR, MAX_SAVE_FPR): Define. - (ppc64_elf_func_desc_adjust): Look for missing ._savef* and - ._restf* functions, and create as needed. - (func_desc_adjust): Only force_local for shared libs. - 2002-02-22 Jakub Jelinek <jakub@redhat.com> * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my last patch. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. +2002-02-21 Andreas Jaeger <aj@suse.de> + + * elf64-x86-64.c: Major rework that introduces all recent changes + to the x86-64 backend. Get a closer match to elf32-i386. + (struct elf64_x86_64_dyn_relocs): Rename from + elf64_x86_64_pcrel_relocs_copied, add additional fields. Change + all users. + (struct elf64_x86_64_link_hash_table): Add short cuts to some + sections. + (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc, + remove casts, initialize new hash members. + (create_got_section): New. + (elf64_x86_64_create_dynamic_sections): New. + (elf64_x86_64_copy_indirect_symbol): New. + (elf64_x86_64_check_relocs): Don't allocate space for dynamic + relocs, .got or .relgot here but do it in allocate_dynrelocs. + Reference count possible .plt and .got entries. Don't test input + section SEC_READONLY here to try to avoid copy relocs, and keep + dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set + DF_TEXTREL here. Delay setting of variables until needed. Cache + pointer to "sreloc" section in elf_section_data. Tweak condition + under which .got created. Report files with bad relocation + section names. + (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. + Reference count possible .plt entries. Don't deallocate .got and + .relgot space here. + (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't + do copy reloc processing for weakdefs. Remove redundant casts and + aborts. Delay setting of vars until needed. Move creation of + dynamic symbols and allocation of .plt and .rela.plt to + allocate_dynrelocs. Replace BFD_ASSERT with abort. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New. + (allocate_dynrelocs): New. + (readonly_dynrelocs): New. + (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs. + Allocate space for dyn relocs. Replace BFD_ASSERT with abort. + Zero out the dynamic allocated content space. + (elf64_x86_64_discard_copies): Removed. + (elf64_x86_64_relocate_section): Make use of dynamic section + short-cuts. Localise vars, and delay setting. Better error + reporting, replace BFD_ASSERT with abort. Check + ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the + regular object file and tread the weak definition as the normal + one. Don't discard relocs for undefweak or undefined symbols and + check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy + relocs. + (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for + symbols that have been forced local. Use same test to decide if + we can use a relative reloc for got as relocate_section. Expand + SHN_UNDEF comment. Move expressions out of function calls. + Replace BFD_ASSERT with abort. + (bfd_elf64_bfd_final_link): Removed. + (elf_backend_copy_indirect_symbol): Define. + +2002-02-20 Tom Rix <trix@redhat.com> + + * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA. + (_bfd_xcoff_reloc_type_lookup): Use it. + * coff64-rs6000.c (xcoff64_howto_table): Same. + (xcoff64_reloc_type_lookup): Same. + 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are little endian. +2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31. + (bfd_mach_s390_esame): Rename to bfd_mach_s390_64. + * bfd-in2.h: Regenerate. + * cpu-s390.c (arch_info_struct): Use renamed architecture defines. + Replace architecture name "s390" with "s390:31-bit" and "s390:esame" + with "s390:64-bit". + * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations. + (elf_s390_reloc_type_lookup): Likewise. + (elf_s390_check_relocs): Likewise. + (elf_s390_gc_sweep_hook): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_object_p): Use renamed architecture define. + * elf64-s390.c (elf_s390_object_p): Use renamed architecture define. + +2002-02-19 Frank Ch. Eigler <fche@redhat.com> + + * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping. + 2002-02-19 Jakub Jelinek <jakub@redhat.com> * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable @@ -702,14 +3106,37 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> and BFD_ASSERT. * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise. -2002-02-18 John David Anglin <dave@hiauly1.hia.nrc.ca> +2002-02-18 Tom Rix <trix@redhat.com> - * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped - from _bfd_elf_hppa_gen_reloc_type. - (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype. - * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype. - * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h. - * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype. + * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support. + (bfd_xcoff_size_dynamic_sections): Same. + * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same. + (bfd_xcoff_size_dynamic_sections): Same. + * coff-rs6000.c (xcoff_generate_rtinit): Same. + * coff-rs646000.c (xcoff64_generate_rtinit): Same. + * libxcoff.h (struct xcoff_backend_data_rec): Same. + * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean. + * bfd-in2.h: Regenerate. + +2002-02-18 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define. + (struct ppc_link_hash_table): Add sfpr. + (ppc64_elf_link_hash_table_create): Init it. + (ppc64_elf_create_dynamic_sections): Split creation of .stub and + .glink out to.. + (create_linkage_sections): ..here. Make .sfpr too. + (ppc64_elf_check_relocs): Call create_linkage_sections, and set + dynobj early. + (MIN_SAVE_FPR, MAX_SAVE_FPR): Define. + (ppc64_elf_func_desc_adjust): Look for missing ._savef* and + ._restf* functions, and create as needed. + (func_desc_adjust): Only force_local for shared libs. + +2002-02-18 David O'Brien <obrien@FreeBSD.org> + + * configure.in: Bump version number post 2.12 branching. + * configure: Regenerate. 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com> @@ -736,22 +3163,51 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target section with no got matches any got. Simplify error generaion. -2002-02-14 Alan Modra <amodra@bigpond.net.au> +2002-02-15 Alan Modra <amodra@bigpond.net.au> + + Support arbitrary length fill patterns. + * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc. + (_bfd_default_link_order): Remove bfd_fill_link_order code. + Call default_data_link_order. + (default_fill_link_order): Delete. + (default_data_link_order): New function. + * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences + of bfd_fill_link_order with bfd_data_link_order. + * elf64-alpha.c (elf64_alpha_final_link): Likewise. + * elf64-mips.c (mips_elf64_final_link): Likewise. - * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD. + * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value. + Correct value returned in "end" for "0x<non-hex>". -2002-02-13 Hans-Peter Nilsson <hp@bitrange.com> +2002-02-14 Nick Clifton <nickc@cambridge.redhat.com> - * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64 - vectors. - (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64 - vectors. + * cpu-arm.c (processors): Replace 'arch' field with 'mach'. + (scan): Test against 'mach' field in info structure. + +2002-02-14 Alan Modra <amodra@bigpond.net.au> + + * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD. -2002-02-13 Matt Fredette <fredette@netbsd.org> +2002-02-14 Matt Fredette <fredette@netbsd.org> * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize EF_M68000. +2002-02-13 Nick Clifton <nickc@cambridge.redhat.com> + + * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on + non-zero physical addresses when adjusting the LMAs of new + sections. + +2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped + from _bfd_elf_hppa_gen_reloc_type. + (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype. + * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype. + * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h. + * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype. + 2002-02-12 Alexandre Oliva <aoliva@redhat.com> * elf-m10300.c (mn10300_elf_relax_section): Skip section before @@ -766,6 +3222,14 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> DT_PPC64_OPD and DT_PPC64_OPDSZ tags. (ppc64_elf_finish_dynamic_sections): Set values for them. +2002-02-11 Michael Snyder <msnyder@redhat.com> + + * elf-bfd.h (elfcore_write_lwpstatus): Add prototype. + * elf.c (elfcore_grok_pstatus): Add prototype. + (elfcore_grok_lwpstatus): Add prototype. + (elfcore_write_lwpstatus): New function. + (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy. + 2002-02-11 Alexandre Oliva <aoliva@redhat.com> * elf32-sh.c: Added missing prototypes. @@ -776,6 +3240,14 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> (sh_elf64_relocate_section): Fix info argument passed to _bfd_elf_section_offset. +2002-02-11 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: "make dep-am". + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + 2002-02-10 Daniel Jacobowitz <drow@mvista.com> * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized @@ -785,6 +3257,13 @@ Mon Mar 18 18:06:54 CET 2002 Jan Hubicka <jh@suse.cz> * trad-core.c (trad_unix_core_file_p): Silence pointer/integer cast warnings for the common case. +2002-02-10 Hans-Peter Nilsson <hp@bitrange.com> + + * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64 + vectors. + (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64 + vectors. + 2002-02-09 Richard Henderson <rth@redhat.com> * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP. diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am index 411351b..f56ceb0 100644 --- a/contrib/binutils/bfd/Makefile.am +++ b/contrib/binutils/bfd/Makefile.am @@ -9,8 +9,10 @@ MKDEP = gcc -MM SUBDIRS = doc po docdir = doc +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ -lib_LTLIBRARIES = libbfd.la +bfdlib_LTLIBRARIES = libbfd.la WARN_CFLAGS = @WARN_CFLAGS@ AM_CFLAGS = $(WARN_CFLAGS) @@ -54,7 +56,9 @@ ALL_MACHINES = \ cpu-cris.lo \ cpu-d10v.lo \ cpu-d30v.lo \ + cpu-dlx.lo \ cpu-fr30.lo \ + cpu-frv.lo \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ @@ -102,7 +106,9 @@ ALL_MACHINES_CFILES = \ cpu-cris.c \ cpu-d10v.c \ cpu-d30v.c \ + cpu-dlx.c \ cpu-fr30.c \ + cpu-frv.c \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ @@ -196,12 +202,16 @@ BFD32_BACKENDS = \ elf32-cris.lo \ elf32-d10v.lo \ elf32-d30v.lo \ + elf32-dlx.lo \ elf32-fr30.lo \ + elf32-frv.lo \ elf32-gen.lo \ elf32-h8300.lo \ elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i386-fbsd.lo \ + elf32-i386qnx.lo \ elf32-i860.lo \ elf32-i960.lo \ elf32-ia64.lo \ @@ -213,6 +223,7 @@ BFD32_BACKENDS = \ elf-m10200.lo \ elf-m10300.lo \ elf32-mcore.lo \ + elfxx-mips.lo \ elf32-mips.lo \ elf32-openrisc.lo \ elf32-or32.lo \ @@ -222,9 +233,12 @@ BFD32_BACKENDS = \ elf32-sh.lo \ elf32-sh-lin.lo \ elf32-sh64.lo \ + elf32-sh64-com.lo \ elf32-sh-nbsd.lo \ + elf32-sh64-nbsd.lo \ elf32-sparc.lo \ elf32-v850.lo \ + elf32-vax.lo \ elf32-xstormy16.lo \ elf32.lo \ elflink.lo \ @@ -283,6 +297,8 @@ BFD32_BACKENDS = \ sparcnetbsd.lo \ sunos.lo \ vaxnetbsd.lo \ + vax1knetbsd.lo \ + vaxbsd.lo \ versados.lo \ vms.lo \ vms-gsd.lo \ @@ -344,12 +360,16 @@ BFD32_BACKENDS_CFILES = \ elf32-cris.c \ elf32-d10v.c \ elf32-d30v.c \ + elf32-dlx.c \ elf32-fr30.c \ + elf32-frv.c \ elf32-gen.c \ elf32-h8300.c \ elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i386-fbsd.c \ + elf32-i386qnx.c \ elf32-i860.c \ elf32-i960.c \ elf32-m32r.c \ @@ -360,18 +380,22 @@ BFD32_BACKENDS_CFILES = \ elf-m10200.c \ elf-m10300.c \ elf32-mcore.c \ + elfxx-mips.c \ elf32-mips.c \ elf32-openrisc.c \ elf32-or32.c \ elf32-pj.c \ elf32-ppc.c \ elf32-sh64.c \ + elf32-sh64-com.c \ elf32-s390.c \ elf32-sh.c \ elf32-sh-lin.c \ elf32-sh-nbsd.c \ + elf32-sh64-nbsd.c \ elf32-sparc.c \ elf32-v850.c \ + elf32-vax.c \ elf32-xstormy16.c \ elf32.c \ elflink.c \ @@ -429,6 +453,8 @@ BFD32_BACKENDS_CFILES = \ sparcnetbsd.c \ sunos.c \ vaxnetbsd.c \ + vax1knetbsd.c \ + vaxbsd.c \ versados.c \ vms.c \ vms-gsd.c \ @@ -441,6 +467,7 @@ BFD32_BACKENDS_CFILES = \ # target_vector in targets.c if configured with --enable-targets=all # and --enable-64-bit-bfd. BFD64_BACKENDS = \ + aix5ppc-core.lo \ aout64.lo \ coff-alpha.lo \ coff64-rs6000.lo \ @@ -448,12 +475,14 @@ BFD64_BACKENDS = \ efi-app-ia64.lo \ elf64-x86-64.lo \ elf64-alpha.lo \ + elf64-alpha-fbsd.lo \ elf64-hppa.lo \ elf64-ia64.lo \ elf64-gen.lo \ elf64-mips.lo \ elf64-mmix.lo \ elf64-sh64.lo \ + elf64-sh64-nbsd.lo \ elf64-ppc.lo \ elf64-s390.lo \ elf64-sparc.lo \ @@ -464,6 +493,7 @@ BFD64_BACKENDS = \ pepigen.lo BFD64_BACKENDS_CFILES = \ + aix5ppc-core.c \ aout64.c \ coff-alpha.c \ coff64-rs6000.c \ @@ -471,6 +501,7 @@ BFD64_BACKENDS_CFILES = \ efi-app-ia64.c \ elf64-x86-64.c \ elf64-alpha.c \ + elf64-alpha-fbsd.c \ elf64-hppa.c \ elf64-gen.c \ elf64-mips.c \ @@ -478,6 +509,7 @@ BFD64_BACKENDS_CFILES = \ elf64-ppc.c \ elf64-s390.c \ elf64-sh64.c \ + elf64-sh64-nbsd.c \ elf64-sparc.c \ elf64.c \ mmo.c \ @@ -668,14 +700,35 @@ $(BFD32_LIBS) \ $(BFD64_BACKENDS) \ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) -# Install BFD include file, and others that it needs. -install-data-local: $(BFD_H) +install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libbfd @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(includedir)/symcat.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h + +uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libbfd + @$(NORMAL_UNINSTALL) + +.PHONY: install_libbfd uninstall_libbfd +install_libbfd: $(bfdlib_LTLIBRARIES) $(BFD_H) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) + $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ + else :; fi; \ + done + $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h + $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(bfdincludedir)/ansidecl.h + $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(bfdincludedir)/symcat.h + $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(bfdincludedir)/bfdlink.h + +uninstall_libbfd: + list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ + done + rm -f $(DESTDIR)$(bfdincludedir)/bfd.h + rm -f $(DESTDIR)$(bfdincludedir)/ansidecl.h + rm -f $(DESTDIR)$(bfdincludedir)/symcat.h + rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h Makefile: $(srcdir)/configure.in @@ -787,7 +840,6 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host $(SHELL) ./config.status --recheck - # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. @@ -827,7 +879,8 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def -merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h +merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ + $(INCDIR)/libiberty.h dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h @@ -840,7 +893,9 @@ cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h +cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h +cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h @@ -1056,10 +1111,18 @@ elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf32-target.h @@ -1078,6 +1141,14 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \ @@ -1116,12 +1187,17 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h elfxx-mips.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h + $(INCDIR)/elf/external.h elfxx-mips.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \ + $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \ @@ -1144,6 +1220,10 @@ elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ @@ -1160,6 +1240,11 @@ elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ @@ -1169,6 +1254,10 @@ elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/libiberty.h elf32-target.h +elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \ @@ -1183,7 +1272,7 @@ elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/elf/external.h elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h + $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h @@ -1353,6 +1442,12 @@ sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ vms.h @@ -1367,6 +1462,7 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \ libxcoff.h +aix5ppc-core.lo: aix5ppc-core.c aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h @@ -1387,8 +1483,8 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/x86-64.h \ $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ @@ -1397,6 +1493,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h +elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ @@ -1407,10 +1510,11 @@ elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/bfdlink.h elf64-target.h elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ - ecoffswap.h elf64-target.h + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ + elf64-target.h elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ @@ -1427,6 +1531,10 @@ elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h +elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \ diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in index 643196a..6744de0 100644 --- a/contrib/binutils/bfd/Makefile.in +++ b/contrib/binutils/bfd/Makefile.in @@ -133,8 +133,10 @@ MKDEP = gcc -MM SUBDIRS = doc po docdir = doc +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ -lib_LTLIBRARIES = libbfd.la +bfdlib_LTLIBRARIES = libbfd.la WARN_CFLAGS = @WARN_CFLAGS@ AM_CFLAGS = $(WARN_CFLAGS) @@ -180,7 +182,9 @@ ALL_MACHINES = \ cpu-cris.lo \ cpu-d10v.lo \ cpu-d30v.lo \ + cpu-dlx.lo \ cpu-fr30.lo \ + cpu-frv.lo \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ @@ -229,7 +233,9 @@ ALL_MACHINES_CFILES = \ cpu-cris.c \ cpu-d10v.c \ cpu-d30v.c \ + cpu-dlx.c \ cpu-fr30.c \ + cpu-frv.c \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ @@ -324,12 +330,16 @@ BFD32_BACKENDS = \ elf32-cris.lo \ elf32-d10v.lo \ elf32-d30v.lo \ + elf32-dlx.lo \ elf32-fr30.lo \ + elf32-frv.lo \ elf32-gen.lo \ elf32-h8300.lo \ elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i386-fbsd.lo \ + elf32-i386qnx.lo \ elf32-i860.lo \ elf32-i960.lo \ elf32-ia64.lo \ @@ -341,6 +351,7 @@ BFD32_BACKENDS = \ elf-m10200.lo \ elf-m10300.lo \ elf32-mcore.lo \ + elfxx-mips.lo \ elf32-mips.lo \ elf32-openrisc.lo \ elf32-or32.lo \ @@ -350,9 +361,12 @@ BFD32_BACKENDS = \ elf32-sh.lo \ elf32-sh-lin.lo \ elf32-sh64.lo \ + elf32-sh64-com.lo \ elf32-sh-nbsd.lo \ + elf32-sh64-nbsd.lo \ elf32-sparc.lo \ elf32-v850.lo \ + elf32-vax.lo \ elf32-xstormy16.lo \ elf32.lo \ elflink.lo \ @@ -411,6 +425,8 @@ BFD32_BACKENDS = \ sparcnetbsd.lo \ sunos.lo \ vaxnetbsd.lo \ + vax1knetbsd.lo \ + vaxbsd.lo \ versados.lo \ vms.lo \ vms-gsd.lo \ @@ -473,12 +489,16 @@ BFD32_BACKENDS_CFILES = \ elf32-cris.c \ elf32-d10v.c \ elf32-d30v.c \ + elf32-dlx.c \ elf32-fr30.c \ + elf32-frv.c \ elf32-gen.c \ elf32-h8300.c \ elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i386-fbsd.c \ + elf32-i386qnx.c \ elf32-i860.c \ elf32-i960.c \ elf32-m32r.c \ @@ -489,18 +509,22 @@ BFD32_BACKENDS_CFILES = \ elf-m10200.c \ elf-m10300.c \ elf32-mcore.c \ + elfxx-mips.c \ elf32-mips.c \ elf32-openrisc.c \ elf32-or32.c \ elf32-pj.c \ elf32-ppc.c \ elf32-sh64.c \ + elf32-sh64-com.c \ elf32-s390.c \ elf32-sh.c \ elf32-sh-lin.c \ elf32-sh-nbsd.c \ + elf32-sh64-nbsd.c \ elf32-sparc.c \ elf32-v850.c \ + elf32-vax.c \ elf32-xstormy16.c \ elf32.c \ elflink.c \ @@ -558,6 +582,8 @@ BFD32_BACKENDS_CFILES = \ sparcnetbsd.c \ sunos.c \ vaxnetbsd.c \ + vax1knetbsd.c \ + vaxbsd.c \ versados.c \ vms.c \ vms-gsd.c \ @@ -571,6 +597,7 @@ BFD32_BACKENDS_CFILES = \ # target_vector in targets.c if configured with --enable-targets=all # and --enable-64-bit-bfd. BFD64_BACKENDS = \ + aix5ppc-core.lo \ aout64.lo \ coff-alpha.lo \ coff64-rs6000.lo \ @@ -578,12 +605,14 @@ BFD64_BACKENDS = \ efi-app-ia64.lo \ elf64-x86-64.lo \ elf64-alpha.lo \ + elf64-alpha-fbsd.lo \ elf64-hppa.lo \ elf64-ia64.lo \ elf64-gen.lo \ elf64-mips.lo \ elf64-mmix.lo \ elf64-sh64.lo \ + elf64-sh64-nbsd.lo \ elf64-ppc.lo \ elf64-s390.lo \ elf64-sparc.lo \ @@ -595,6 +624,7 @@ BFD64_BACKENDS = \ BFD64_BACKENDS_CFILES = \ + aix5ppc-core.c \ aout64.c \ coff-alpha.c \ coff64-rs6000.c \ @@ -602,6 +632,7 @@ BFD64_BACKENDS_CFILES = \ efi-app-ia64.c \ elf64-x86-64.c \ elf64-alpha.c \ + elf64-alpha-fbsd.c \ elf64-hppa.c \ elf64-gen.c \ elf64-mips.c \ @@ -609,6 +640,7 @@ BFD64_BACKENDS_CFILES = \ elf64-ppc.c \ elf64-s390.c \ elf64-sh64.c \ + elf64-sh64-nbsd.c \ elf64-sparc.c \ elf64.c \ mmo.c \ @@ -732,7 +764,7 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libbfd_a_LIBADD = libbfd_a_OBJECTS = -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(bfdlib_LTLIBRARIES) libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \ corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \ @@ -853,33 +885,17 @@ distclean-libtool: maintainer-clean-libtool: -mostlyclean-libLTLIBRARIES: +mostlyclean-bfdlibLTLIBRARIES: -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) +clean-bfdlibLTLIBRARIES: + -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES) -distclean-libLTLIBRARIES: +distclean-bfdlibLTLIBRARIES: -maintainer-clean-libLTLIBRARIES: - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ - done +maintainer-clean-bfdlibLTLIBRARIES: libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS) + $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1041,16 +1057,16 @@ install-info: install-info-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-exec: install-exec-recursive -install-data-am: install-data-local +install-data-am: install-bfdlibLTLIBRARIES install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-libLTLIBRARIES +uninstall-am: uninstall-bfdlibLTLIBRARIES uninstall: uninstall-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h all-redirect: all-recursive-am @@ -1058,7 +1074,7 @@ install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(libdir) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) mostlyclean-generic: @@ -1075,19 +1091,19 @@ distclean-generic: maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \ mostlyclean-compile mostlyclean-libtool \ - mostlyclean-libLTLIBRARIES mostlyclean-tags \ + mostlyclean-bfdlibLTLIBRARIES mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \ - clean-libLTLIBRARIES clean-tags clean-generic \ + clean-bfdlibLTLIBRARIES clean-tags clean-generic \ mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \ - distclean-libtool distclean-libLTLIBRARIES \ + distclean-libtool distclean-bfdlibLTLIBRARIES \ distclean-tags distclean-generic clean-am -rm -f libtool @@ -1097,8 +1113,9 @@ distclean: distclean-recursive maintainer-clean-am: maintainer-clean-hdr \ maintainer-clean-noinstLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-libLTLIBRARIES maintainer-clean-tags \ - maintainer-clean-generic distclean-am + maintainer-clean-bfdlibLTLIBRARIES \ + maintainer-clean-tags maintainer-clean-generic \ + distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." @@ -1110,22 +1127,22 @@ mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ -clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \ -distclean-libLTLIBRARIES clean-libLTLIBRARIES \ -maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \ -install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ +clean-libtool maintainer-clean-libtool mostlyclean-bfdlibLTLIBRARIES \ +distclean-bfdlibLTLIBRARIES clean-bfdlibLTLIBRARIES \ +maintainer-clean-bfdlibLTLIBRARIES uninstall-bfdlibLTLIBRARIES \ +install-bfdlibLTLIBRARIES install-data-recursive \ +uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-info-am \ install-info all-recursive-am install-exec-am install-exec \ -install-data-local install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) @@ -1226,14 +1243,35 @@ $(BFD32_LIBS) \ $(BFD64_BACKENDS) \ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) -# Install BFD include file, and others that it needs. -install-data-local: $(BFD_H) +install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libbfd @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(includedir)/symcat.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h + +uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libbfd + @$(NORMAL_UNINSTALL) + +.PHONY: install_libbfd uninstall_libbfd +install_libbfd: $(bfdlib_LTLIBRARIES) $(BFD_H) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) + $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ + else :; fi; \ + done + $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h + $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(bfdincludedir)/ansidecl.h + $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(bfdincludedir)/symcat.h + $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(bfdincludedir)/bfdlink.h + +uninstall_libbfd: + list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ + done + rm -f $(DESTDIR)$(bfdincludedir)/bfd.h + rm -f $(DESTDIR)$(bfdincludedir)/ansidecl.h + rm -f $(DESTDIR)$(bfdincludedir)/symcat.h + rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h Makefile: $(srcdir)/configure.in @@ -1371,7 +1409,8 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def -merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h +merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ + $(INCDIR)/libiberty.h dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h @@ -1384,7 +1423,9 @@ cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h +cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h +cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h @@ -1600,10 +1641,18 @@ elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf32-target.h @@ -1622,6 +1671,14 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \ @@ -1660,12 +1717,17 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h elfxx-mips.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h + $(INCDIR)/elf/external.h elfxx-mips.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \ + $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \ @@ -1688,6 +1750,10 @@ elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \ @@ -1704,6 +1770,11 @@ elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ @@ -1713,6 +1784,10 @@ elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/libiberty.h elf32-target.h +elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \ @@ -1727,7 +1802,7 @@ elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/elf/external.h elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h + $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h @@ -1897,6 +1972,12 @@ sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ vms.h @@ -1911,6 +1992,7 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \ libxcoff.h +aix5ppc-core.lo: aix5ppc-core.c aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h @@ -1931,8 +2013,8 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/x86-64.h \ $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ @@ -1941,6 +2023,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h +elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ @@ -1951,10 +2040,11 @@ elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/bfdlink.h elf64-target.h elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ - ecoffswap.h elf64-target.h + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ + elf64-target.h elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ @@ -1971,6 +2061,10 @@ elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h +elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \ diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4 index 5391294..b3c6ccff 100644 --- a/contrib/binutils/bfd/acinclude.m4 +++ b/contrib/binutils/bfd/acinclude.m4 @@ -123,3 +123,27 @@ ifelse(yes,no,[ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) + +AC_DEFUN([AM_INSTALL_LIBBFD], +[AC_MSG_CHECKING([whether to install libbfd]) + AC_ARG_ENABLE(install-libbfd, +[ --install-libbfd controls installation of libbfd and related headers], + install_libbfd_p=$enableval, + if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then + install_libbfd_p=yes + else + install_libbfd_p=no + fi) + AC_MSG_RESULT($install_libbfd_p) + AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes) + # libbfd.a is a host library containing target dependent code + bfdlibdir='$(libdir)' + bfdincludedir='$(includedir)' + if test "${host}" != "${target}"; then + bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' + bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' + fi + AC_SUBST(bfdlibdir) + AC_SUBST(bfdincludedir) +] +) diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4 index 4446fc1..b6dfcbe 100644 --- a/contrib/binutils/bfd/aclocal.m4 +++ b/contrib/binutils/bfd/aclocal.m4 @@ -136,6 +136,43 @@ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) +AC_DEFUN([AM_INSTALL_LIBBFD], +[AC_MSG_CHECKING([whether to install libbfd]) + AC_ARG_ENABLE(install-libbfd, +[ --install-libbfd controls installation of libbfd and related headers], + install_libbfd_p=$enableval, + if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then + install_libbfd_p=yes + else + install_libbfd_p=no + fi) + AC_MSG_RESULT($install_libbfd_p) + AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes) + # libbfd.a is a host library containing target dependent code + bfdlibdir='$(libdir)' + bfdincludedir='$(includedir)' + if test "${host}" != "${target}"; then + bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' + bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' + fi + AC_SUBST(bfdlibdir) + AC_SUBST(bfdincludedir) +] +) + +# Define a conditional. + +AC_DEFUN([AM_CONDITIONAL], +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + # 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. @@ -271,16 +308,3 @@ AC_DEFUN([AM_MAINTAINER_MODE], ] ) -# Define a conditional. - -AC_DEFUN([AM_CONDITIONAL], -[AC_SUBST($1_TRUE) -AC_SUBST($1_FALSE) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi]) - diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h index ccedb93..b2acc09 100644 --- a/contrib/binutils/bfd/aout-target.h +++ b/contrib/binutils/bfd/aout-target.h @@ -1,6 +1,6 @@ /* Define a target vector and some small routines for a variant of a.out. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -207,7 +207,7 @@ static boolean MY(mkobject) (abfd) bfd *abfd; { - if (NAME(aout,mkobject) (abfd) == false) + if (! NAME(aout,mkobject) (abfd)) return false; #if 0 /* Sizes get set in set_sizes callback, later, after we know the architecture and machine. */ @@ -513,6 +513,9 @@ MY_bfd_final_link (abfd, info) #ifndef MY_bfd_merge_sections #define MY_bfd_merge_sections bfd_generic_merge_sections #endif +#ifndef MY_bfd_discard_group +#define MY_bfd_discard_group bfd_generic_discard_group +#endif #ifndef MY_bfd_reloc_type_lookup #define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup) #endif @@ -528,9 +531,15 @@ MY_bfd_final_link (abfd, info) #ifndef MY_bfd_link_hash_table_create #define MY_bfd_link_hash_table_create NAME(aout,link_hash_table_create) #endif +#ifndef MY_bfd_link_hash_table_free +#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free +#endif #ifndef MY_bfd_link_add_symbols #define MY_bfd_link_add_symbols NAME(aout,link_add_symbols) #endif +#ifndef MY_bfd_link_just_syms +#define MY_bfd_link_just_syms _bfd_generic_link_just_syms +#endif #ifndef MY_bfd_link_split_section #define MY_bfd_link_split_section _bfd_generic_link_split_section #endif diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h index 0f773a1..80d69d9 100644 --- a/contrib/binutils/bfd/aoutf1.h +++ b/contrib/binutils/bfd/aoutf1.h @@ -748,7 +748,7 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd) return (memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr), (char *) exec_hdr (exec_bfd), - sizeof (struct internal_exec)) == 0) ? true : false; + sizeof (struct internal_exec)) == 0); } #define MY_set_sizes sunos4_set_sizes diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h index 3c9cd4f..83e9732 100644 --- a/contrib/binutils/bfd/aoutx.h +++ b/contrib/binutils/bfd/aoutx.h @@ -533,7 +533,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) obj_aout_sym_hashes (abfd) = NULL; if (! NAME(aout,make_sections) (abfd)) - return NULL; + goto error_ret; obj_datasec (abfd)->_raw_size = execp->a_data; obj_bsssec (abfd)->_raw_size = execp->a_bss; @@ -655,13 +655,13 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) obj_textsec (abfd)->next = obj_datasec (abfd); obj_datasec (abfd)->next = obj_bsssec (abfd); #endif + return result; } - else - { - free (rawptr); - abfd->tdata.aout_data = oldrawptr; - } - return result; + + error_ret: + bfd_release (abfd, rawptr); + abfd->tdata.aout_data = oldrawptr; + return NULL; } /* @@ -1310,9 +1310,9 @@ aout_get_external_symbols (abfd) count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE; #ifdef USE_MMAP - if (bfd_get_file_window (abfd, - obj_sym_filepos (abfd), exec_hdr (abfd)->a_syms, - &obj_aout_sym_window (abfd), true) == false) + if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd), + exec_hdr (abfd)->a_syms, + &obj_aout_sym_window (abfd), true)) return false; syms = (struct external_nlist *) obj_aout_sym_window (abfd).data; #else @@ -1352,8 +1352,8 @@ aout_get_external_symbols (abfd) stringsize = GET_WORD (abfd, string_chars); #ifdef USE_MMAP - if (bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize, - &obj_aout_string_window (abfd), true) == false) + if (! bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize, + &obj_aout_string_window (abfd), true)) return false; strings = (char *) obj_aout_string_window (abfd).data; #else @@ -1837,11 +1837,9 @@ NAME(aout,slurp_symbol_table) (abfd) cached_size = obj_aout_external_sym_count (abfd); cached_size *= sizeof (aout_symbol_type); - cached = (aout_symbol_type *) bfd_malloc (cached_size); + cached = (aout_symbol_type *) bfd_zmalloc (cached_size); if (cached == NULL && cached_size != 0) return false; - if (cached_size != 0) - memset (cached, 0, (size_t) cached_size); /* Convert from external symbol information to internal. */ if (! (NAME(aout,translate_symbol_table) @@ -2411,10 +2409,9 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols) count = reloc_size / each_size; amt = count * sizeof (arelent); - reloc_cache = (arelent *) bfd_malloc (amt); + reloc_cache = (arelent *) bfd_zmalloc (amt); if (reloc_cache == NULL && count != 0) return false; - memset (reloc_cache, 0, (size_t) amt); relocs = bfd_malloc (reloc_size); if (relocs == NULL && reloc_size != 0) @@ -4189,7 +4186,8 @@ aout_link_write_symbols (finfo, input_bfd) /* Use the name from the hash table, in case the symbol was wrapped. */ - if (h != NULL) + if (h != NULL + && h->root.type != bfd_link_hash_warning) name = h->root.root.string; /* If this is an indirect or warning symbol, then change @@ -4211,7 +4209,6 @@ aout_link_write_symbols (finfo, input_bfd) /* If the symbol has already been written out, skip it. */ if (h != (struct aout_link_hash_entry *) NULL - && h->root.type != bfd_link_hash_warning && h->written) { if ((type & N_TYPE) == N_INDR diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c index e9e07c5..d7ac214 100644 --- a/contrib/binutils/bfd/archive.c +++ b/contrib/binutils/bfd/archive.c @@ -603,8 +603,6 @@ bfd_generic_archive_p (abfd) char armag[SARMAG + 1]; bfd_size_type amt; - tdata_hold = abfd->tdata.aout_ar_data; - if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG) { if (bfd_get_error () != bfd_error_system_call) @@ -621,13 +619,15 @@ bfd_generic_archive_p (abfd) return 0; #endif - /* We are setting bfd_ardata(abfd) here, but since bfd_ardata - involves a cast, we can't do it as the left operand of assignment. */ - amt = sizeof (struct artdata); - abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); + tdata_hold = bfd_ardata (abfd); + amt = sizeof (struct artdata); + bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == NULL) - return NULL; + { + bfd_ardata (abfd) = tdata_hold; + return NULL; + } bfd_ardata (abfd)->first_file_filepos = SARMAG; bfd_ardata (abfd)->cache = NULL; @@ -636,21 +636,13 @@ bfd_generic_archive_p (abfd) bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->tdata = NULL; - if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd))) + if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)) + || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd))) { - bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = tdata_hold; if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); - return NULL; - } - - if (!BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd))) - { bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = tdata_hold; - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); + bfd_ardata (abfd) = tdata_hold; return NULL; } @@ -686,9 +678,9 @@ bfd_generic_archive_p (abfd) release bfd_ardata. FIXME. */ (void) bfd_close (first); bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = tdata_hold; #endif bfd_set_error (bfd_error_wrong_object_format); + bfd_ardata (abfd) = tdata_hold; return NULL; } /* And we ought to close `first' here too. */ @@ -1746,7 +1738,7 @@ _bfd_write_archive_contents (arch) if (makemap && hasobjects) { - if (_bfd_compute_and_write_armap (arch, (unsigned int) elength) != true) + if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength)) return false; } @@ -1876,8 +1868,8 @@ _bfd_compute_and_write_armap (arch, elength) current != (bfd *) NULL; current = current->next, elt_no++) { - if ((bfd_check_format (current, bfd_object) == true) - && ((bfd_get_file_flags (current) & HAS_SYMS))) + if (bfd_check_format (current, bfd_object) + && (bfd_get_file_flags (current) & HAS_SYMS) != 0) { long storage; long symcount; diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c index 40102e8..063e4fb 100644 --- a/contrib/binutils/bfd/archures.c +++ b/contrib/binutils/bfd/archures.c @@ -193,6 +193,7 @@ DESCRIPTION .#define bfd_mach_d10v_ts2 2 .#define bfd_mach_d10v_ts3 3 . bfd_arch_d30v, {* Mitsubishi D30V *} +. bfd_arch_dlx, {* DLX *} . bfd_arch_m68hc11, {* Motorola 68HC11 *} . bfd_arch_m68hc12, {* Motorola 68HC12 *} . bfd_arch_z8k, {* Zilog Z8000 *} @@ -246,6 +247,13 @@ DESCRIPTION .#define bfd_mach_am33 330 . bfd_arch_fr30, .#define bfd_mach_fr30 0x46523330 +. bfd_arch_frv, +.#define bfd_mach_frv 0 +.#define bfd_mach_frvsimple 1 +.#define bfd_mach_fr300 300 +.#define bfd_mach_fr400 400 +.#define bfd_mach_frvtomcat 499 {* fr500 prototype *} +.#define bfd_mach_fr500 500 . bfd_arch_mcore, . bfd_arch_ia64, {* HP/Intel ia64 *} .#define bfd_mach_ia64_elf64 0 @@ -312,7 +320,9 @@ extern const bfd_arch_info_type bfd_avr_arch; extern const bfd_arch_info_type bfd_cris_arch; extern const bfd_arch_info_type bfd_d10v_arch; extern const bfd_arch_info_type bfd_d30v_arch; +extern const bfd_arch_info_type bfd_dlx_arch; extern const bfd_arch_info_type bfd_fr30_arch; +extern const bfd_arch_info_type bfd_frv_arch; extern const bfd_arch_info_type bfd_h8300_arch; extern const bfd_arch_info_type bfd_h8500_arch; extern const bfd_arch_info_type bfd_hppa_arch; @@ -365,7 +375,9 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_cris_arch, &bfd_d10v_arch, &bfd_d30v_arch, + &bfd_dlx_arch, &bfd_fr30_arch, + &bfd_frv_arch, &bfd_h8300_arch, &bfd_h8500_arch, &bfd_hppa_arch, diff --git a/contrib/binutils/bfd/armnetbsd.c b/contrib/binutils/bfd/armnetbsd.c index e899adb..d82e98f 100644 --- a/contrib/binutils/bfd/armnetbsd.c +++ b/contrib/binutils/bfd/armnetbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for NetBSD/ARM a.out-ish binaries. - Copyright 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" /* To ensure following declaration is OK */ -CONST struct reloc_howto_struct * +const struct reloc_howto_struct * MY_bfd_reloc_type_lookup PARAMS ((bfd * abfd AND bfd_reloc_code_real_type code)); diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h index bd8a915..807a440 100644 --- a/contrib/binutils/bfd/bfd-in.h +++ b/contrib/binutils/bfd/bfd-in.h @@ -4,21 +4,21 @@ Free Software Foundation, Inc. Contributed by Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -328,12 +328,13 @@ alent; /* Object and core file sections. */ #define align_power(addr, align) \ - ( ((addr) + ((1<<(align))-1)) & (-1 << (align))) + (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) typedef struct sec *sec_ptr; #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) +#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) #define bfd_section_name(bfd, ptr) ((ptr)->name) #define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) @@ -345,7 +346,7 @@ typedef struct sec *sec_ptr; #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma= (val)), ((ptr)->user_set_vma = (boolean)true), true) +#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) @@ -525,6 +526,8 @@ extern void warn_deprecated #define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) #define bfd_count_sections(abfd) ((abfd)->section_count) +#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) + #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) @@ -745,9 +748,12 @@ extern boolean bfd_xcoff_record_link_assignment extern boolean bfd_xcoff_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *, unsigned long, unsigned long, unsigned long, boolean, - int, boolean, boolean, struct sec **)); + int, boolean, boolean, struct sec **, boolean)); extern boolean bfd_xcoff_link_generate_rtinit - PARAMS ((bfd *, const char *, const char *)); + PARAMS ((bfd *, const char *, const char *, boolean)); + +/* XCOFF support routines for ar. */ +extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *)); /* Externally visible COFF routines. */ @@ -799,6 +805,9 @@ extern boolean bfd_elf32_arm_process_before_allocation extern boolean bfd_elf32_arm_get_bfd_for_interworking PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_elf32_arm_add_glue_sections_to_bfd + PARAMS ((bfd *, struct bfd_link_info *)); + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page PARAMS ((struct sec *, int)); @@ -806,4 +815,3 @@ extern void bfd_ticoff_set_section_load_page extern int bfd_ticoff_get_section_load_page PARAMS ((struct sec *)); -/* And more from the source. */ diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h index a69b375..bad4281 100644 --- a/contrib/binutils/bfd/bfd-in2.h +++ b/contrib/binutils/bfd/bfd-in2.h @@ -10,21 +10,21 @@ Free Software Foundation, Inc. Contributed by Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -334,12 +334,13 @@ alent; /* Object and core file sections. */ #define align_power(addr, align) \ - ( ((addr) + ((1<<(align))-1)) & (-1 << (align))) + (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) typedef struct sec *sec_ptr; #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) +#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) #define bfd_section_name(bfd, ptr) ((ptr)->name) #define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) @@ -351,7 +352,7 @@ typedef struct sec *sec_ptr; #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma= (val)), ((ptr)->user_set_vma = (boolean)true), true) +#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) @@ -531,6 +532,8 @@ extern void warn_deprecated #define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) #define bfd_count_sections(abfd) ((abfd)->section_count) +#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) + #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) @@ -751,9 +754,12 @@ extern boolean bfd_xcoff_record_link_assignment extern boolean bfd_xcoff_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *, unsigned long, unsigned long, unsigned long, boolean, - int, boolean, boolean, struct sec **)); + int, boolean, boolean, struct sec **, boolean)); extern boolean bfd_xcoff_link_generate_rtinit - PARAMS ((bfd *, const char *, const char *)); + PARAMS ((bfd *, const char *, const char *, boolean)); + +/* XCOFF support routines for ar. */ +extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *)); /* Externally visible COFF routines. */ @@ -805,6 +811,9 @@ extern boolean bfd_elf32_arm_process_before_allocation extern boolean bfd_elf32_arm_get_bfd_for_interworking PARAMS ((bfd *, struct bfd_link_info *)); +extern boolean bfd_elf32_arm_add_glue_sections_to_bfd + PARAMS ((bfd *, struct bfd_link_info *)); + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page PARAMS ((struct sec *, int)); @@ -812,10 +821,11 @@ extern void bfd_ticoff_set_section_load_page extern int bfd_ticoff_get_section_load_page PARAMS ((struct sec *)); -/* And more from the source. */ +/* Extracted from init.c. */ void bfd_init PARAMS ((void)); +/* Extracted from opncls.c. */ bfd * bfd_openr PARAMS ((const char *filename, const char *target)); @@ -843,6 +853,7 @@ bfd_make_writable PARAMS ((bfd *abfd)); boolean bfd_make_readable PARAMS ((bfd *abfd)); +/* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -983,6 +994,7 @@ bfd_make_readable PARAMS ((bfd *abfd)); #define H_GET_S8 bfd_h_get_signed_8 +/* Extracted from section.c. */ /* This structure is used for a comdat section, as in PE. A comdat section is associated with a particular symbol. When the linker sees a comdat section, it keeps only one of the sections with a @@ -1064,12 +1076,6 @@ typedef struct sec standard data. */ #define SEC_CONSTRUCTOR 0x100 - /* The section is a constructor, and should be placed at the - end of the text, data, or bss section(?). */ -#define SEC_CONSTRUCTOR_TEXT 0x1100 -#define SEC_CONSTRUCTOR_DATA 0x2100 -#define SEC_CONSTRUCTOR_BSS 0x3100 - /* The section has contents - a data section could be <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be <<SEC_HAS_CONTENTS>> */ @@ -1090,6 +1096,9 @@ typedef struct sec sections. */ #define SEC_COFF_SHARED_LIBRARY 0x800 + /* The section contains thread local data. */ +#define SEC_THREAD_LOCAL 0x1000 + /* The section has GOT references. This flag is only for the linker, and is currently only used by the elf32-hppa back end. It will be set if global offset table references were detected @@ -1446,6 +1455,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, void _bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section)); +boolean +bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group)); + +/* Extracted from archures.c. */ enum bfd_architecture { bfd_arch_unknown, /* File arch not known. */ @@ -1572,6 +1585,7 @@ enum bfd_architecture #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 bfd_arch_d30v, /* Mitsubishi D30V */ + bfd_arch_dlx, /* DLX */ bfd_arch_m68hc11, /* Motorola 68HC11 */ bfd_arch_m68hc12, /* Motorola 68HC12 */ bfd_arch_z8k, /* Zilog Z8000 */ @@ -1625,6 +1639,13 @@ enum bfd_architecture #define bfd_mach_am33 330 bfd_arch_fr30, #define bfd_mach_fr30 0x46523330 + bfd_arch_frv, +#define bfd_mach_frv 0 +#define bfd_mach_frvsimple 1 +#define bfd_mach_fr300 300 +#define bfd_mach_fr400 400 +#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_fr500 500 bfd_arch_mcore, bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 0 @@ -1718,6 +1739,7 @@ unsigned int bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, unsigned long machine)); +/* Extracted from reloc.c. */ typedef enum bfd_reloc_status { /* No errors detected. */ @@ -2143,6 +2165,21 @@ share a common GP, and the target address is adjusted for STO_ALPHA_STD_GPLOAD. */ BFD_RELOC_ALPHA_BRSGP, +/* Alpha thread-local storage relocations. */ + BFD_RELOC_ALPHA_TLSGD, + BFD_RELOC_ALPHA_TLSLDM, + BFD_RELOC_ALPHA_DTPMOD64, + BFD_RELOC_ALPHA_GOTDTPREL16, + BFD_RELOC_ALPHA_DTPREL64, + BFD_RELOC_ALPHA_DTPREL_HI16, + BFD_RELOC_ALPHA_DTPREL_LO16, + BFD_RELOC_ALPHA_DTPREL16, + BFD_RELOC_ALPHA_GOTTPREL16, + BFD_RELOC_ALPHA_TPREL64, + BFD_RELOC_ALPHA_TPREL_HI16, + BFD_RELOC_ALPHA_TPREL_LO16, + BFD_RELOC_ALPHA_TPREL16, + /* Bits 27..2 of the relocation address shifted right 2 bits; simple reloc otherwise. */ BFD_RELOC_MIPS_JMP, @@ -2197,6 +2234,17 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_RELGOT, BFD_RELOC_MIPS_JALR, +/* Fujitsu Frv Relocations. */ + BFD_RELOC_FRV_LABEL16, + BFD_RELOC_FRV_LABEL24, + BFD_RELOC_FRV_LO16, + BFD_RELOC_FRV_HI16, + BFD_RELOC_FRV_GPREL12, + BFD_RELOC_FRV_GPRELU12, + BFD_RELOC_FRV_GPREL32, + BFD_RELOC_FRV_GPRELHI, + BFD_RELOC_FRV_GPRELLO, + /* i386/elf relocations */ BFD_RELOC_386_GOT32, @@ -2207,6 +2255,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_386_RELATIVE, BFD_RELOC_386_GOTOFF, BFD_RELOC_386_GOTPC, + BFD_RELOC_386_TLS_TPOFF, + BFD_RELOC_386_TLS_IE, + BFD_RELOC_386_TLS_GOTIE, + BFD_RELOC_386_TLS_LE, + BFD_RELOC_386_TLS_GD, + BFD_RELOC_386_TLS_LDM, + BFD_RELOC_386_TLS_LDO_32, + BFD_RELOC_386_TLS_IE_32, + BFD_RELOC_386_TLS_LE_32, + BFD_RELOC_386_TLS_DTPMOD32, + BFD_RELOC_386_TLS_DTPOFF32, + BFD_RELOC_386_TLS_TPOFF32, /* x86-64/elf relocations */ BFD_RELOC_X86_64_GOT32, @@ -2511,6 +2571,15 @@ of the container. */ /* This is a 32-bit pc-relative reloc. */ BFD_RELOC_D30V_32_PCREL, +/* DLX relocs */ + BFD_RELOC_DLX_HI16_S, + +/* DLX relocs */ + BFD_RELOC_DLX_LO16, + +/* DLX relocs */ + BFD_RELOC_DLX_JMP26, + /* Mitsubishi M32R relocs. This is a 24 bit absolute address. */ BFD_RELOC_M32R_24, @@ -2918,12 +2987,25 @@ this offset in the reloc's section offset. */ BFD_RELOC_IA64_IPLTMSB, BFD_RELOC_IA64_IPLTLSB, BFD_RELOC_IA64_COPY, + BFD_RELOC_IA64_LTOFF22X, + BFD_RELOC_IA64_LDXMOV, + BFD_RELOC_IA64_TPREL14, BFD_RELOC_IA64_TPREL22, + BFD_RELOC_IA64_TPREL64I, BFD_RELOC_IA64_TPREL64MSB, BFD_RELOC_IA64_TPREL64LSB, - BFD_RELOC_IA64_LTOFF_TP22, - BFD_RELOC_IA64_LTOFF22X, - BFD_RELOC_IA64_LDXMOV, + BFD_RELOC_IA64_LTOFF_TPREL22, + BFD_RELOC_IA64_DTPMOD64MSB, + BFD_RELOC_IA64_DTPMOD64LSB, + BFD_RELOC_IA64_LTOFF_DTPMOD22, + BFD_RELOC_IA64_DTPREL14, + BFD_RELOC_IA64_DTPREL22, + BFD_RELOC_IA64_DTPREL64I, + BFD_RELOC_IA64_DTPREL32MSB, + BFD_RELOC_IA64_DTPREL32LSB, + BFD_RELOC_IA64_DTPREL64MSB, + BFD_RELOC_IA64_DTPREL64LSB, + BFD_RELOC_IA64_LTOFF_DTPREL22, /* Motorola 68HC11 reloc. This is the 8 bits high part of an absolute address. */ @@ -3021,6 +3103,11 @@ This is the 3 bits of a value. */ BFD_RELOC_XSTORMY16_REL_12, BFD_RELOC_XSTORMY16_24, BFD_RELOC_XSTORMY16_FPTR16, + +/* Relocations used by VAX ELF. */ + BFD_RELOC_VAX_GLOB_DAT, + BFD_RELOC_VAX_JMP_SLOT, + BFD_RELOC_VAX_RELATIVE, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type * @@ -3029,6 +3116,7 @@ bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); const char * bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code)); +/* Extracted from syms.c. */ typedef struct symbol_cache_entry { @@ -3134,6 +3222,9 @@ typedef struct symbol_cache_entry as well. */ #define BSF_DEBUGGING_RELOC 0x20000 + /* This symbol is thread local. Used in ELF. */ +#define BSF_THREAD_LOCAL 0x40000 + flagword flags; /* A pointer to the section to which this symbol is @@ -3198,6 +3289,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ (ibfd, isymbol, obfd, osymbol)) +/* Extracted from bfd.c. */ struct _bfd { /* The filename the application opened the BFD with. */ @@ -3292,6 +3384,9 @@ struct _bfd /* Symbol table for output BFD (with symcount entries). */ struct symbol_cache_entry **outsymbols; + /* Used for slurped dynamic symbol tables. */ + unsigned int dynsymcount; + /* Pointer to structure which contains architecture information. */ const struct bfd_arch_info *arch_info; @@ -3497,12 +3592,21 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); #define bfd_merge_sections(abfd, link_info) \ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) +#define bfd_discard_group(abfd, sec) \ + BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) + #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) +#define bfd_link_hash_table_free(abfd, hash) \ + BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) + #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) +#define bfd_link_just_syms(sec, info) \ + BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) + #define bfd_final_link(abfd, info) \ BFD_SEND (abfd, _bfd_final_link, (abfd, info)) @@ -3532,6 +3636,7 @@ extern bfd_byte *bfd_get_relocated_section_contents boolean bfd_alt_mach_code PARAMS ((bfd *abfd, int index)); +/* Extracted from archive.c. */ symindex bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym)); @@ -3541,6 +3646,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head)); bfd * bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous)); +/* Extracted from corefile.c. */ const char * bfd_core_file_failing_command PARAMS ((bfd *abfd)); @@ -3550,6 +3656,7 @@ bfd_core_file_failing_signal PARAMS ((bfd *abfd)); boolean core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd)); +/* Extracted from targets.c. */ #define BFD_SEND(bfd, message, arglist) \ ((*((bfd)->xvec->message)) arglist) @@ -3825,11 +3932,14 @@ CONCAT2 (NAME,_sizeof_headers), \ CONCAT2 (NAME,_bfd_get_relocated_section_contents), \ CONCAT2 (NAME,_bfd_relax_section), \ CONCAT2 (NAME,_bfd_link_hash_table_create), \ +CONCAT2 (NAME,_bfd_link_hash_table_free), \ CONCAT2 (NAME,_bfd_link_add_symbols), \ +CONCAT2 (NAME,_bfd_link_just_syms), \ CONCAT2 (NAME,_bfd_final_link), \ CONCAT2 (NAME,_bfd_link_split_section), \ CONCAT2 (NAME,_bfd_gc_sections), \ -CONCAT2 (NAME,_bfd_merge_sections) +CONCAT2 (NAME,_bfd_merge_sections), \ +CONCAT2 (NAME,_bfd_discard_group) int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); bfd_byte *(*_bfd_get_relocated_section_contents) PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, @@ -3842,9 +3952,15 @@ CONCAT2 (NAME,_bfd_merge_sections) different information in this table. */ struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); + /* Release the memory associated with the linker hash table. */ + void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *)); + /* Add symbols from this object file into the hash table. */ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); + /* Indicate that we are only retrieving symbol values from this section. */ + void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *)); + /* Do a link based on the link_order structures attached to each section of the BFD. */ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); @@ -3858,6 +3974,9 @@ CONCAT2 (NAME,_bfd_merge_sections) /* Attempt to merge SEC_MERGE sections. */ boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); + /* Discard members of a group. */ + boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *)); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \ @@ -3896,6 +4015,7 @@ bfd_target_list PARAMS ((void)); const bfd_target * bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *)); +/* Extracted from format.c. */ boolean bfd_check_format PARAMS ((bfd *abfd, bfd_format format)); diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c index 73bb17e..cfd7772 100644 --- a/contrib/binutils/bfd/bfd.c +++ b/contrib/binutils/bfd/bfd.c @@ -128,6 +128,9 @@ CODE_FRAGMENT . {* Symbol table for output BFD (with symcount entries). *} . struct symbol_cache_entry **outsymbols; . +. {* Used for slurped dynamic symbol tables. *} +. unsigned int dynsymcount; +. . {* Pointer to structure which contains architecture information. *} . const struct bfd_arch_info *arch_info; . @@ -749,7 +752,6 @@ bfd_get_arch_size (abfd) if (abfd->xvec->flavour == bfd_target_elf_flavour) return (get_elf_backend_data (abfd))->s->arch_size; - bfd_set_error (bfd_error_wrong_format); return -1; } @@ -1008,7 +1010,8 @@ DESCRIPTION in hex if a leading "0x" or "0X" is found, otherwise in octal if a leading zero is found, otherwise in decimal. - Overflow is not detected. + If the value would overflow, the maximum <<bfd_vma>> value is + returned. */ bfd_vma @@ -1018,48 +1021,64 @@ bfd_scan_vma (string, end, base) int base; { bfd_vma value; - int digit; + bfd_vma cutoff; + unsigned int cutlim; + int overflow; /* Let the host do it if possible. */ if (sizeof (bfd_vma) <= sizeof (unsigned long)) return (bfd_vma) strtoul (string, (char **) end, base); - /* A negative base makes no sense, and we only need to go as high as hex. */ - if ((base < 0) || (base > 16)) - return (bfd_vma) 0; - if (base == 0) { if (string[0] == '0') { if ((string[1] == 'x') || (string[1] == 'X')) base = 16; - /* XXX should we also allow "0b" or "0B" to set base to 2? */ else base = 8; } - else - base = 10; } - if ((base == 16) && - (string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X'))) - string += 2; - /* XXX should we also skip over "0b" or "0B" if base is 2? */ + if ((base < 2) || (base > 36)) + base = 10; + + if (base == 16 + && string[0] == '0' + && (string[1] == 'x' || string[1] == 'X') + && ISXDIGIT (string[2])) + { + string += 2; + } + + cutoff = (~ (bfd_vma) 0) / (bfd_vma) base; + cutlim = (~ (bfd_vma) 0) % (bfd_vma) base; + value = 0; + overflow = 0; + while (1) + { + unsigned int digit; -/* Speed could be improved with a table like hex_value[] in gas. */ -#define HEX_VALUE(c) \ - (ISXDIGIT (c) \ - ? (ISDIGIT (c) \ - ? (c - '0') \ - : (10 + c - (ISLOWER (c) ? 'a' : 'A'))) \ - : 42) + digit = *string; + if (ISDIGIT (digit)) + digit = digit - '0'; + else if (ISALPHA (digit)) + digit = TOUPPER (digit) - 'A' + 10; + else + break; + if (digit >= (unsigned int) base) + break; + if (value > cutoff || (value == cutoff && digit > cutlim)) + overflow = 1; + value = value * base + digit; + ++string; + } - for (value = 0; (digit = HEX_VALUE (* string)) < base; string ++) - value = value * base + digit; + if (overflow) + value = ~ (bfd_vma) 0; - if (end) - * end = string; + if (end != NULL) + *end = string; return value; } @@ -1169,12 +1188,21 @@ DESCRIPTION .#define bfd_merge_sections(abfd, link_info) \ . BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) . +.#define bfd_discard_group(abfd, sec) \ +. BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) +. .#define bfd_link_hash_table_create(abfd) \ . BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) . +.#define bfd_link_hash_table_free(abfd, hash) \ +. BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) +. .#define bfd_link_add_symbols(abfd, info) \ . BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) . +.#define bfd_link_just_syms(sec, info) \ +. BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) +. .#define bfd_final_link(abfd, info) \ . BFD_SEND (abfd, _bfd_final_link, (abfd, info)) . @@ -1309,27 +1337,27 @@ FUNCTION bfd_alt_mach_code SYNOPSIS - boolean bfd_alt_mach_code(bfd *abfd, int index); + boolean bfd_alt_mach_code(bfd *abfd, int alternative); DESCRIPTION When more than one machine code number is available for the same machine type, this function can be used to switch between - the preferred one (index == 0) and any others. Currently, + the preferred one (alternative == 0) and any others. Currently, only ELF supports this feature, with up to two alternate machine codes. */ boolean -bfd_alt_mach_code (abfd, index) +bfd_alt_mach_code (abfd, alternative) bfd *abfd; - int index; + int alternative; { if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) { int code; - switch (index) + switch (alternative) { case 0: code = get_elf_backend_data (abfd)->elf_machine_code; diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c index 705ac8f..fc972b2 100644 --- a/contrib/binutils/bfd/binary.c +++ b/contrib/binutils/bfd/binary.c @@ -1,5 +1,5 @@ /* BFD back-end for binary objects. - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com> @@ -337,7 +337,10 @@ binary_sizeof_headers (abfd, exec) #define binary_bfd_relax_section bfd_generic_relax_section #define binary_bfd_gc_sections bfd_generic_gc_sections #define binary_bfd_merge_sections bfd_generic_merge_sections +#define binary_bfd_discard_group bfd_generic_discard_group #define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free +#define binary_bfd_link_just_syms _bfd_generic_link_just_syms #define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols #define binary_bfd_final_link _bfd_generic_final_link #define binary_bfd_link_split_section _bfd_generic_link_split_section diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c index 4e5ef2e..df01a1f 100644 --- a/contrib/binutils/bfd/cache.c +++ b/contrib/binutils/bfd/cache.c @@ -1,5 +1,5 @@ /* BFD library -- caching of file descriptors. - Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com). @@ -277,7 +277,7 @@ bfd_open_file (abfd) break; case both_direction: case write_direction: - if (abfd->opened_once == true) + if (abfd->opened_once) { abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RUB); if (abfd->iostream == NULL) diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c index 4056e2c..6d5ac17 100644 --- a/contrib/binutils/bfd/coff-alpha.c +++ b/contrib/binutils/bfd/coff-alpha.c @@ -1,5 +1,5 @@ /* BFD back-end for ALPHA Extended-Coff files. - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and Ian Lance Taylor <ian@cygnus.com>. @@ -795,7 +795,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, gp = _bfd_get_gp_value (abfd); if (gp == 0) { - if (relocateable != false) + if (relocateable) { asection *sec; bfd_vma lo; @@ -2356,6 +2356,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = #define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections +#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group const bfd_target ecoffalpha_little_vec = { diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c index c92cbe6..5e7f907 100644 --- a/contrib/binutils/bfd/coff-arm.c +++ b/contrib/binutils/bfd/coff-arm.c @@ -947,14 +947,14 @@ coff_arm_link_hash_table_create (abfd) struct coff_arm_link_hash_table * ret; bfd_size_type amt = sizeof (struct coff_arm_link_hash_table); - ret = (struct coff_arm_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct coff_arm_link_hash_table *) bfd_malloc (amt); if (ret == (struct coff_arm_link_hash_table *) NULL) return NULL; if (! _bfd_coff_link_hash_table_init (& ret->root, abfd, _bfd_coff_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return (struct bfd_link_hash_table *) NULL; } @@ -1701,21 +1701,23 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, || signed_check < reloc_signed_min) overflow = true; - /* For the BLX(1) instruction remove bit 0 of the adjusted offset. - Bit 0 can only be set if the upper insn is at a half-word boundary, - since the destination address, an ARM instruction, must always be - on a word boundary. The semantics of the BLX (1) instruction, - however, are that bit 0 in the offset must always be 0, and the - corresponding bit 1 in the target address will be set from bit - 1 of the source address. */ - if ((x & 0x18000000) == 0x08000000) - relocation &= ~0x2; - - /* Put the relocation into the correct bits. */ + /* Put the relocation into the correct bits. + For a BLX instruction, make sure that the relocation is rounded up + to a word boundary. This follows the semantics of the instruction + which specifies that bit 1 of the target address will come from bit + 1 of the base address. */ if (bfd_big_endian (input_bfd)) - relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); + { + if ((x & 0x1800) == 0x0800 && (relocation & 0x02)) + relocation += 2; + relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); + } else - relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); + { + if ((x & 0x18000000) == 0x08000000 && (relocation & 0x02)) + relocation += 2; + relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); + } /* Add the relocation to the correct bits of X. */ x = ((x & ~howto->dst_mask) | relocation); diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c index 72c58a4..dbeaef1 100644 --- a/contrib/binutils/bfd/coff-i386.c +++ b/contrib/binutils/bfd/coff-i386.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel 386 COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -117,7 +117,7 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, When we link PE and non-PE object files together to generate a non-PE executable, we have to compensate it here. */ - if (howto->pc_relative == true && howto->pcrel_offset == true) + if (howto->pc_relative && howto->pcrel_offset) diff = -(1 << howto->size); else diff = -reloc_entry->addend; diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c index f2bdfe5..4f8b15e 100644 --- a/contrib/binutils/bfd/coff-ppc.c +++ b/contrib/binutils/bfd/coff-ppc.c @@ -1,6 +1,6 @@ /* BFD back-end for PowerPC Microsoft Portable Executable files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Original version pieced together by Kim Knuttila (krk@cygnus.com) @@ -204,13 +204,13 @@ ppc_coff_link_hash_table_create (abfd) struct ppc_coff_link_hash_table *ret; bfd_size_type amt = sizeof (struct ppc_coff_link_hash_table); - ret = (struct ppc_coff_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct ppc_coff_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! ppc_coff_link_hash_table_init (ret, abfd, ppc_coff_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return (struct bfd_link_hash_table *) NULL; } return &ret->root.root; diff --git a/contrib/binutils/bfd/coff-rs6000.c b/contrib/binutils/bfd/coff-rs6000.c index 46ac5c8..5a0b8aa 100644 --- a/contrib/binutils/bfd/coff-rs6000.c +++ b/contrib/binutils/bfd/coff-rs6000.c @@ -1,6 +1,5 @@ /* BFD back-end for IBM RS/6000 "XCOFF" files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + Copyright 1990-1999, 2000, 2001, 2002 Free Software Foundation, Inc. FIXME: Can someone provide a transliteration of this name into ASCII? Using the following chars caused a compiler warning on HIUX (so I replaced @@ -55,9 +54,11 @@ extern void _bfd_xcoff_swap_sym_in PARAMS ((bfd *, PTR, PTR)); extern unsigned int _bfd_xcoff_swap_sym_out PARAMS ((bfd *, PTR, PTR)); extern void _bfd_xcoff_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR)); extern unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR)); +static void xcoff_swap_reloc_in PARAMS ((bfd *, PTR, PTR)); +static unsigned int xcoff_swap_reloc_out PARAMS ((bfd *, PTR, PTR)); -/* Forward declare _bfd_xcoff_rtype2howto for coffcode.h macro. */ -void _bfd_xcoff_rtype2howto PARAMS ((arelent *, struct internal_reloc *)); +/* Forward declare xcoff_rtype2howto for coffcode.h macro. */ +void xcoff_rtype2howto PARAMS ((arelent *, struct internal_reloc *)); /* coffcode.h needs these to be defined. */ #define RS6000COFF_C 1 @@ -75,14 +76,15 @@ void _bfd_xcoff_rtype2howto PARAMS ((arelent *, struct internal_reloc *)); #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3) #define COFF_LONG_FILENAMES #define NO_COFF_SYMBOLS -#define RTYPE2HOWTO(cache_ptr, dst) _bfd_xcoff_rtype2howto (cache_ptr, dst) +#define RTYPE2HOWTO(cache_ptr, dst) xcoff_rtype2howto (cache_ptr, dst) #define coff_mkobject _bfd_xcoff_mkobject #define coff_bfd_copy_private_bfd_data _bfd_xcoff_copy_private_bfd_data #define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name #define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup #ifdef AIX_CORE -extern const bfd_target * rs6000coff_core_p (); -extern boolean rs6000coff_core_file_matches_executable_p (); +extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd)); +extern boolean rs6000coff_core_file_matches_executable_p + PARAMS ((bfd *cbfd, bfd *ebfd)); extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd)); extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd)); #define CORE_FILE_P rs6000coff_core_p @@ -105,6 +107,9 @@ extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd)); #define coff_SWAP_sym_out _bfd_xcoff_swap_sym_out #define coff_SWAP_aux_in _bfd_xcoff_swap_aux_in #define coff_SWAP_aux_out _bfd_xcoff_swap_aux_out +#define coff_swap_reloc_in xcoff_swap_reloc_in +#define coff_swap_reloc_out xcoff_swap_reloc_out +#define NO_COFF_RELOCS #include "coffcode.h" @@ -144,8 +149,64 @@ static bfd_vma xcoff_loader_symbol_offset static bfd_vma xcoff_loader_reloc_offset PARAMS ((bfd *, struct internal_ldhdr *)); static boolean xcoff_generate_rtinit - PARAMS((bfd *, const char *, const char *)); + PARAMS((bfd *, const char *, const char *, boolean)); +static boolean do_pad PARAMS((bfd *, unsigned int)); +static boolean do_copy PARAMS((bfd *, bfd *)); +static boolean do_shared_object_padding PARAMS ((bfd *, bfd *, ufile_ptr *, int)); + +/* Relocation functions */ +static boolean xcoff_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)); + +static boolean xcoff_complain_overflow_dont_func + PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)); +static boolean xcoff_complain_overflow_bitfield_func + PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)); +static boolean xcoff_complain_overflow_signed_func + PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)); +static boolean xcoff_complain_overflow_unsigned_func + PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)); + +boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION]) + PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) = +{ + xcoff_reloc_type_pos, /* R_POS (0x00) */ + xcoff_reloc_type_neg, /* R_NEG (0x01) */ + xcoff_reloc_type_rel, /* R_REL (0x02) */ + xcoff_reloc_type_toc, /* R_TOC (0x03) */ + xcoff_reloc_type_fail, /* R_RTB (0x04) */ + xcoff_reloc_type_toc, /* R_GL (0x05) */ + xcoff_reloc_type_toc, /* R_TCL (0x06) */ + xcoff_reloc_type_fail, /* (0x07) */ + xcoff_reloc_type_ba, /* R_BA (0x08) */ + xcoff_reloc_type_fail, /* (0x09) */ + xcoff_reloc_type_br, /* R_BR (0x0a) */ + xcoff_reloc_type_fail, /* (0x0b) */ + xcoff_reloc_type_pos, /* R_RL (0x0c) */ + xcoff_reloc_type_pos, /* R_RLA (0x0d) */ + xcoff_reloc_type_fail, /* (0x0e) */ + xcoff_reloc_type_noop, /* R_REF (0x0f) */ + xcoff_reloc_type_fail, /* (0x10) */ + xcoff_reloc_type_fail, /* (0x11) */ + xcoff_reloc_type_toc, /* R_TRL (0x12) */ + xcoff_reloc_type_toc, /* R_TRLA (0x13) */ + xcoff_reloc_type_fail, /* R_RRTBI (0x14) */ + xcoff_reloc_type_fail, /* R_RRTBA (0x15) */ + xcoff_reloc_type_ba, /* R_CAI (0x16) */ + xcoff_reloc_type_crel, /* R_CREL (0x17) */ + xcoff_reloc_type_ba, /* R_RBA (0x18) */ + xcoff_reloc_type_ba, /* R_RBAC (0x19) */ + xcoff_reloc_type_br, /* R_RBR (0x1a) */ + xcoff_reloc_type_ba, /* R_RBRC (0x1b) */ +}; +boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW]) + PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)) = +{ + xcoff_complain_overflow_dont_func, + xcoff_complain_overflow_bitfield_func, + xcoff_complain_overflow_signed_func, + xcoff_complain_overflow_unsigned_func, +}; /* We use our own tdata type. Its first field is the COFF tdata type, so the COFF routines are compatible. */ @@ -176,7 +237,7 @@ _bfd_xcoff_mkobject (abfd) xcoff_data (abfd)->debug_indices = NULL; /* text section alignment is different than the default */ - /* xcoff_data (abfd)->text_align_power = 5; */ + bfd_xcoff_text_align_power (abfd) = 2; return true; } @@ -217,8 +278,8 @@ _bfd_xcoff_copy_private_bfd_data (ibfd, obfd) else ox->snentry = sec->output_section->target_index; } - ox->text_align_power = ix->text_align_power; - ox->data_align_power = ix->data_align_power; + bfd_xcoff_text_align_power (obfd) = bfd_xcoff_text_align_power (ibfd); + bfd_xcoff_data_align_power (obfd) = bfd_xcoff_data_align_power (ibfd); ox->modtype = ix->modtype; ox->cputype = ix->cputype; ox->maxdata = ix->maxdata; @@ -517,7 +578,7 @@ end: reloc_howto_type xcoff_howto_table[] = { /* Standard 32 bit relocation. */ - HOWTO (0, /* type */ + HOWTO (R_POS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -532,7 +593,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* 32 bit relocation, but store negative value. */ - HOWTO (1, /* type */ + HOWTO (R_NEG, /* type */ 0, /* rightshift */ -2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -547,7 +608,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* 32 bit PC relative relocation. */ - HOWTO (2, /* type */ + HOWTO (R_REL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -562,7 +623,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* 16 bit TOC relative relocation. */ - HOWTO (3, /* type */ + HOWTO (R_TOC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ @@ -577,7 +638,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* I don't really know what this is. */ - HOWTO (4, /* type */ + HOWTO (R_RTB, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -592,9 +653,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* External TOC relative symbol. */ - HOWTO (5, /* type */ + HOWTO (R_GL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -607,9 +668,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Local TOC relative symbol. */ - HOWTO (6, /* type */ + HOWTO (R_TCL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -624,7 +685,7 @@ reloc_howto_type xcoff_howto_table[] = EMPTY_HOWTO (7), /* Non modifiable absolute branch. */ - HOWTO (8, /* type */ + HOWTO (R_BA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -632,16 +693,16 @@ reloc_howto_type xcoff_howto_table[] = 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ - "R_BA", /* name */ + "R_BA_26", /* name */ true, /* partial_inplace */ - 0x3fffffc, /* src_mask */ - 0x3fffffc, /* dst_mask */ + 0x03fffffc, /* src_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ EMPTY_HOWTO (9), /* Non modifiable relative branch. */ - HOWTO (0xa, /* type */ + HOWTO (R_BR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -658,9 +719,9 @@ reloc_howto_type xcoff_howto_table[] = EMPTY_HOWTO (0xb), /* Indirect load. */ - HOWTO (0xc, /* type */ + HOWTO (R_RL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -673,9 +734,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Load address. */ - HOWTO (0xd, /* type */ + HOWTO (R_RLA, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -690,13 +751,13 @@ reloc_howto_type xcoff_howto_table[] = EMPTY_HOWTO (0xe), /* Non-relocating reference. */ - HOWTO (0xf, /* type */ + HOWTO (R_REF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_REF", /* name */ false, /* partial_inplace */ @@ -708,9 +769,9 @@ reloc_howto_type xcoff_howto_table[] = EMPTY_HOWTO (0x11), /* TOC relative indirect load. */ - HOWTO (0x12, /* type */ + HOWTO (R_TRL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -723,9 +784,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* TOC relative load address. */ - HOWTO (0x13, /* type */ + HOWTO (R_TRLA, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -738,7 +799,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Modifiable relative branch. */ - HOWTO (0x14, /* type */ + HOWTO (R_RRTBI, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -753,7 +814,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Modifiable absolute branch. */ - HOWTO (0x15, /* type */ + HOWTO (R_RRTBA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -768,9 +829,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Modifiable call absolute indirect. */ - HOWTO (0x16, /* type */ + HOWTO (R_CAI, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -783,9 +844,9 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Modifiable call relative. */ - HOWTO (0x17, /* type */ + HOWTO (R_CREL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -798,7 +859,7 @@ reloc_howto_type xcoff_howto_table[] = false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x18, /* type */ + HOWTO (R_RBA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -808,12 +869,12 @@ reloc_howto_type xcoff_howto_table[] = 0, /* special_function */ "R_RBA", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0x03fffffc, /* src_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x19, /* type */ + HOWTO (R_RBAC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -823,12 +884,12 @@ reloc_howto_type xcoff_howto_table[] = 0, /* special_function */ "R_RBAC", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch relative. */ - HOWTO (0x1a, /* type */ + HOWTO (R_RBR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -836,16 +897,16 @@ reloc_howto_type xcoff_howto_table[] = 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ - "R_RBR", /* name */ + "R_RBR_26", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0x03fffffc, /* src_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x1b, /* type */ + HOWTO (R_RBRC, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -857,36 +918,75 @@ reloc_howto_type xcoff_howto_table[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - HOWTO (0, /* type */ - 0, /* rightshift */ - 4, /* size (0 = byte, 1 = short, 2 = long) */ - 64, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ - 0, /* special_function */ - "R_POS", /* name */ - true, /* partial_inplace */ - MINUS_ONE, /* src_mask */ - MINUS_ONE, /* dst_mask */ - false) /* pcrel_offset */ + /* 16 bit Non modifiable absolute branch. */ + HOWTO (R_BA, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "R_BA_16", /* name */ + true, /* partial_inplace */ + 0xfffc, /* src_mask */ + 0xfffc, /* dst_mask */ + false), /* pcrel_offset */ + + /* Modifiable branch relative. */ + HOWTO (R_RBR, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "R_RBR_16", /* name */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* Modifiable branch relative. */ + HOWTO (R_RBA, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "R_RBA_16", /* name */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ }; void -_bfd_xcoff_rtype2howto (relent, internal) +xcoff_rtype2howto (relent, internal) arelent *relent; struct internal_reloc *internal; { - relent->howto = xcoff_howto_table + internal->r_type; - - /* Check for relocs we don't know of. */ - if (internal->r_type - >= sizeof (xcoff_howto_table) / sizeof (xcoff_howto_table[0])) - abort (); - if (internal->r_type != relent->howto->type) + if (internal->r_type > R_RBRC) abort (); + /* Default howto layout works most of the time */ + relent->howto = &xcoff_howto_table[internal->r_type]; + + /* Special case some 16 bit reoloc */ + if (15 == (internal->r_size & 0x1f)) + { + if (R_BA == internal->r_type) + relent->howto = &xcoff_howto_table[0x1c]; + else if (R_RBR == internal->r_type) + relent->howto = &xcoff_howto_table[0x1d]; + else if (R_RBA == internal->r_type) + relent->howto = &xcoff_howto_table[0x1e]; + } + /* The r_size field of an XCOFF reloc encodes the bitsize of the relocation, as well as indicating whether it is signed or not. Doublecheck that the relocation information gathered from the @@ -894,14 +994,8 @@ _bfd_xcoff_rtype2howto (relent, internal) for R_REF relocs. */ if (relent->howto->dst_mask != 0 && (relent->howto->bitsize - != ((unsigned int) internal->r_size & 0x3f) + 1)) + != ((unsigned int) internal->r_size & 0x1f) + 1)) abort (); -#if 0 - if ((internal->r_size & 0x80) != 0 - ? (relent->howto->complain_on_overflow != complain_overflow_signed) - : (relent->howto->complain_on_overflow != complain_overflow_bitfield)) - abort (); -#endif } reloc_howto_type * @@ -913,6 +1007,8 @@ _bfd_xcoff_reloc_type_lookup (abfd, code) { case BFD_RELOC_PPC_B26: return &xcoff_howto_table[0xa]; + case BFD_RELOC_PPC_BA16: + return &xcoff_howto_table[0x1c]; case BFD_RELOC_PPC_BA26: return &xcoff_howto_table[8]; case BFD_RELOC_PPC_TOC16: @@ -920,8 +1016,6 @@ _bfd_xcoff_reloc_type_lookup (abfd, code) case BFD_RELOC_32: case BFD_RELOC_CTOR: return &xcoff_howto_table[0]; - case BFD_RELOC_64: - return &xcoff_howto_table[0x1c]; default: return NULL; } @@ -973,7 +1067,17 @@ _bfd_xcoff_reloc_type_lookup (abfd, code) /* XCOFF archives use this as a magic string. Note that both strings have the same length. */ +/* Set the magic for archive. */ +boolean +bfd_xcoff_ar_archive_set_magic (abfd, magic) + bfd *abfd ATTRIBUTE_UNUSED; + char *magic ATTRIBUTE_UNUSED; +{ + /* Not supported yet. */ + return false; + /* bfd_xcoff_archive_set_magic (abfd, magic); */ +} /* Read in the armap of an XCOFF archive. */ @@ -1135,10 +1239,11 @@ const bfd_target * _bfd_xcoff_archive_p (abfd) bfd *abfd; { + struct artdata *tdata_hold; char magic[SXCOFFARMAG]; - bfd_size_type amt; + bfd_size_type amt = SXCOFFARMAG; - if (bfd_bread ((PTR) magic, (bfd_size_type) SXCOFFARMAG, abfd) != SXCOFFARMAG) + if (bfd_bread ((PTR) magic, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1152,13 +1257,12 @@ _bfd_xcoff_archive_p (abfd) return NULL; } - /* We are setting bfd_ardata(abfd) here, but since bfd_ardata - involves a cast, we can't do it as the left operand of - assignment. */ + tdata_hold = bfd_ardata (abfd); + amt = sizeof (struct artdata); - abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); + bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == (struct artdata *) NULL) - return NULL; + goto error_ret_restore; bfd_ardata (abfd)->cache = NULL; bfd_ardata (abfd)->archive_head = NULL; @@ -1175,13 +1279,12 @@ _bfd_xcoff_archive_p (abfd) memcpy (hdr.magic, magic, SXCOFFARMAG); /* Now read the rest of the file header. */ - if (bfd_bread ((PTR) &hdr.memoff, - (bfd_size_type) SIZEOF_AR_FILE_HDR - SXCOFFARMAG, abfd) - != SIZEOF_AR_FILE_HDR - SXCOFFARMAG) + amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG; + if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); - return NULL; + goto error_ret; } bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff, @@ -1190,7 +1293,7 @@ _bfd_xcoff_archive_p (abfd) amt = SIZEOF_AR_FILE_HDR; bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) - return NULL; + goto error_ret; memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR); } @@ -1203,33 +1306,32 @@ _bfd_xcoff_archive_p (abfd) memcpy (hdr.magic, magic, SXCOFFARMAG); /* Now read the rest of the file header. */ - if (bfd_bread ((PTR) &hdr.memoff, - (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG, abfd) - != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG) + amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG; + if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); - return NULL; + goto error_ret; } - /* XXX This actually has to be a call to strtoll (at least on 32-bit - machines) since the field width is 20 and there numbers with more - than 32 bits can be represented. */ - bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff, - (char **) NULL, 10); + bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff, + (const char **) 0, + 10); amt = SIZEOF_AR_FILE_HDR_BIG; bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) - return NULL; + goto error_ret; memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG); } if (! _bfd_xcoff_slurp_armap (abfd)) { + error_ret: bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = (struct artdata *) NULL; + error_ret_restore: + bfd_ardata (abfd) = tdata_hold; return NULL; } @@ -1558,6 +1660,84 @@ static char buff20[XCOFFARMAGBIG_ELEMENT_SIZE + 1]; (v) = bfd_scan_vma (buff20, (const char **) NULL, 10) static boolean +do_pad (abfd, number) + bfd *abfd; + unsigned int number; +{ + bfd_byte b = 0; + + /* Limit pad to <= 4096. */ + if (number > 4096) + return false; + + while (number--) + if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) + return false; + + return true; +} + +static boolean +do_copy (out_bfd, in_bfd) + bfd *out_bfd; + bfd *in_bfd; +{ + bfd_size_type remaining; + bfd_byte buffer[DEFAULT_BUFFERSIZE]; + + if (bfd_seek (in_bfd, (file_ptr) 0, SEEK_SET) != 0) + return false; + + remaining = arelt_size (in_bfd); + + while (remaining >= DEFAULT_BUFFERSIZE) + { + if (bfd_bread (buffer, DEFAULT_BUFFERSIZE, in_bfd) != DEFAULT_BUFFERSIZE + || bfd_bwrite (buffer, DEFAULT_BUFFERSIZE, out_bfd) != DEFAULT_BUFFERSIZE) + return false; + + remaining -= DEFAULT_BUFFERSIZE; + } + + if (remaining) + { + if (bfd_bread (buffer, remaining, in_bfd) != remaining + || bfd_bwrite (buffer, remaining, out_bfd) != remaining) + return false; + } + + return true; +} + +static boolean +do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size) + bfd *out_bfd; + bfd *in_bfd; + ufile_ptr *offset; + int ar_header_size; +{ + if (bfd_check_format (in_bfd, bfd_object) + && bfd_get_flavour (in_bfd) == bfd_target_xcoff_flavour + && (in_bfd->flags & DYNAMIC) != 0) + { + bfd_size_type pad = 0; + int text_align_power; + + text_align_power = bfd_xcoff_text_align_power (in_bfd); + + pad = 1 << text_align_power; + pad -= (*offset + ar_header_size) & (pad - 1); + + if (! do_pad (out_bfd, pad)) + return false; + + *offset += pad; + } + + return true; +} + +static boolean xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) bfd *abfd; unsigned int elength ATTRIBUTE_UNUSED; @@ -1652,10 +1832,9 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) + str_32 + (str_32 & 1); symbol_table = NULL; - symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size); + symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) return false; - memset (symbol_table, 0, symbol_table_size); hdr = (struct xcoff_ar_hdr_big *) symbol_table; @@ -1756,10 +1935,9 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) + str_64 + (str_64 & 1); symbol_table = NULL; - symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size); + symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) return false; - memset (symbol_table, 0, symbol_table_size); hdr = (struct xcoff_ar_hdr_big *) symbol_table; @@ -1986,28 +2164,12 @@ xcoff_write_archive_contents_old (abfd) if (bfd_seek (sub, (file_ptr) 0, SEEK_SET) != 0) return false; - while (remaining != 0) - { - bfd_size_type amt; - bfd_byte buffer[DEFAULT_BUFFERSIZE]; - - amt = sizeof buffer; - if (amt > remaining) - amt = remaining; - if (bfd_bread (buffer, amt, sub) != amt - || bfd_bwrite (buffer, amt, abfd) != amt) - return false; - remaining -= amt; - } - if ((size & 1) != 0) - { - bfd_byte b; - - b = '\0'; - if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) - return false; - } + if (! do_copy (abfd, sub)) + return false; + + if (! do_pad (abfd, size & 1)) + return false; } sprintf (fhdr.lastmemoff, "%ld", (long) prevoff); @@ -2018,9 +2180,9 @@ xcoff_write_archive_contents_old (abfd) sprintf (fhdr.memoff, "%ld", (long) nextoff); memset (&ahdr, 0, sizeof ahdr); - sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE + - count * XCOFFARMAG_ELEMENT_SIZE + - total_namlen)); + sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE + + count * XCOFFARMAG_ELEMENT_SIZE + + total_namlen)); sprintf (ahdr.prevoff, "%ld", (long) prevoff); sprintf (ahdr.date, "%d", 0); sprintf (ahdr.uid, "%d", 0); @@ -2074,14 +2236,9 @@ xcoff_write_archive_contents_old (abfd) if (bfd_bwrite ((PTR) name, namlen + 1, abfd) != namlen + 1) return false; } - if ((size & 1) != 0) - { - bfd_byte b; - b = '\0'; - if (bfd_bwrite ((PTR) &b, (bfd_size_type) 1, abfd) != 1) - return false; - } + if (! do_pad (abfd, size & 1)) + return false; /* Write out the armap, if appropriate. */ if (! makemap || ! hasobjects) @@ -2128,15 +2285,26 @@ xcoff_write_archive_contents_big (abfd) bfd_byte *member_table, *mt; bfd_vma member_table_size; + memset (&fhdr, 0, SIZEOF_AR_FILE_HDR_BIG); memcpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG); - PRINT20 (fhdr.firstmemoff, SIZEOF_AR_FILE_HDR_BIG); - PRINT20 (fhdr.freeoff, 0); - /* Calculate count and total_namlen */ + if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0) + return false; + + /* Calculate count and total_namlen. */ + makemap = bfd_has_map (abfd); + hasobjects = false; for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0; current_bfd != NULL; current_bfd = current_bfd->next, count++) - total_namlen += strlen (normalize_filename (current_bfd)) + 1; + { + total_namlen += strlen (normalize_filename (current_bfd)) + 1; + + if (makemap + && ! hasobjects + && bfd_check_format (current_bfd, bfd_object)) + hasobjects = true; + } offsets = NULL; if (count) @@ -2145,11 +2313,7 @@ xcoff_write_archive_contents_big (abfd) if (offsets == NULL) return false; } - if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0) - return false; - makemap = bfd_has_map (abfd); - hasobjects = false; prevoff = 0; nextoff = SIZEOF_AR_FILE_HDR_BIG; for (current_bfd = abfd->archive_head, i = 0; @@ -2161,12 +2325,6 @@ xcoff_write_archive_contents_big (abfd) struct xcoff_ar_hdr_big *ahdrp; bfd_size_type remaining; - if (makemap && ! hasobjects) - { - if (bfd_check_format (current_bfd, bfd_object)) - hasobjects = true; - } - name = normalize_filename (current_bfd); namlen = strlen (name); @@ -2221,6 +2379,14 @@ xcoff_write_archive_contents_big (abfd) BFD_ASSERT (nextoff == bfd_tell (abfd)); + /* Check for xcoff shared objects. + Their text section needs to be aligned wrt the archive file position. + This requires extra padding before the archive header. */ + if (! do_shared_object_padding (abfd, current_bfd, & nextoff, + SIZEOF_AR_HDR_BIG + namlen + + SXCOFFARFMAG)) + return false; + offsets[i] = nextoff; prevoff = nextoff; @@ -2237,31 +2403,19 @@ xcoff_write_archive_contents_big (abfd) if (bfd_seek (current_bfd, (file_ptr) 0, SEEK_SET) != 0) return false; - while (remaining != 0) - { - bfd_size_type amt; - bfd_byte buffer[DEFAULT_BUFFERSIZE]; - - amt = sizeof buffer; - if (amt > remaining) - amt = remaining; - if (bfd_bread (buffer, amt, current_bfd) != amt - || bfd_bwrite (buffer, amt, abfd) != amt) - return false; - remaining -= amt; - } - - if ((size & 1) != 0) - { - bfd_byte b; - b = '\0'; - if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) - return false; - } + if (! do_copy (abfd, current_bfd)) + return false; + + if (! do_pad (abfd, size & 1)) + return false; } - PRINT20 (fhdr.lastmemoff, prevoff); + if (count) + { + PRINT20 (fhdr.firstmemoff, offsets[0]); + PRINT20 (fhdr.lastmemoff, prevoff); + } /* Write out the member table. Layout : @@ -2294,16 +2448,15 @@ xcoff_write_archive_contents_big (abfd) member_table_size += member_table_size & 1; member_table = NULL; - member_table = (bfd_byte *) bfd_malloc (member_table_size); + member_table = (bfd_byte *) bfd_zmalloc (member_table_size); if (member_table == NULL) return false; - memset (member_table, 0, member_table_size); hdr = (struct xcoff_ar_hdr_big *) member_table; - PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE + - count * XCOFFARMAGBIG_ELEMENT_SIZE + - total_namlen + (total_namlen & 1))); + PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE + + count * XCOFFARMAGBIG_ELEMENT_SIZE + + total_namlen + (total_namlen & 1))); if (makemap && hasobjects) PRINT20 (hdr->nextoff, nextoff + member_table_size); else @@ -2505,6 +2658,40 @@ xcoff_swap_ldsym_out (abfd, src, d) bfd_put_32 (abfd, src->l_parm, dst->l_parm); } +static void +xcoff_swap_reloc_in (abfd, s, d) + bfd *abfd; + PTR s; + PTR d; +{ + struct external_reloc *src = (struct external_reloc *) s; + struct internal_reloc *dst = (struct internal_reloc *) d; + + memset (dst, 0, sizeof (struct internal_reloc)); + + dst->r_vaddr = bfd_get_32 (abfd, src->r_vaddr); + dst->r_symndx = bfd_get_32 (abfd, src->r_symndx); + dst->r_size = bfd_get_8 (abfd, src->r_size); + dst->r_type = bfd_get_8 (abfd, src->r_type); +} + +static unsigned int +xcoff_swap_reloc_out (abfd, s, d) + bfd *abfd; + PTR s; + PTR d; +{ + struct internal_reloc *src = (struct internal_reloc *) s; + struct external_reloc *dst = (struct external_reloc *) d; + + bfd_put_32 (abfd, src->r_vaddr, dst->r_vaddr); + bfd_put_32 (abfd, src->r_symndx, dst->r_symndx); + bfd_put_8 (abfd, src->r_type, dst->r_type); + bfd_put_8 (abfd, src->r_size, dst->r_size); + + return bfd_coff_relsz (abfd); +} + /* Swap in the ldrel structure. */ static void @@ -2538,12 +2725,578 @@ xcoff_swap_ldrel_out (abfd, src, d) } +boolean +xcoff_reloc_type_noop (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; + bfd_vma val ATTRIBUTE_UNUSED; + bfd_vma addend ATTRIBUTE_UNUSED; + bfd_vma *relocation ATTRIBUTE_UNUSED; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + return true; +} + +boolean +xcoff_reloc_type_fail (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; + bfd_vma val ATTRIBUTE_UNUSED; + bfd_vma addend ATTRIBUTE_UNUSED; + bfd_vma *relocation ATTRIBUTE_UNUSED; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + (*_bfd_error_handler) + (_("%s: unsupported relocation type 0x%02x"), + bfd_get_filename (input_bfd), (unsigned int) rel->r_type); + bfd_set_error (bfd_error_bad_value); + return false; +} + +boolean +xcoff_reloc_type_pos (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + *relocation = val + addend; + return true; +} + +boolean +xcoff_reloc_type_neg (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + *relocation = addend - val; + return true; +} + +boolean +xcoff_reloc_type_rel (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + howto->pc_relative = true; + + /* A PC relative reloc includes the section address. */ + addend += input_section->vma; + + *relocation = val + addend; + *relocation -= (input_section->output_section->vma + + input_section->output_offset); + return true; +} + +boolean +xcoff_reloc_type_toc (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd; + struct internal_reloc *rel; + struct internal_syment *sym; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; + bfd_vma val; + bfd_vma addend ATTRIBUTE_UNUSED; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + struct xcoff_link_hash_entry *h; + + if (0 > rel->r_symndx) + return false; + + h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; + + if (h != NULL && h->smclas != XMC_TD) + { + if (h->toc_section == NULL) + { + (*_bfd_error_handler) + (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"), + bfd_get_filename (input_bfd), rel->r_vaddr, + h->root.root.string); + bfd_set_error (bfd_error_bad_value); + return false; + } + + BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0); + val = (h->toc_section->output_section->vma + + h->toc_section->output_offset); + } + + *relocation = ((val - xcoff_data (output_bfd)->toc) + - (sym->n_value - xcoff_data (input_bfd)->toc)); + return true; +} + +boolean +xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + howto->src_mask &= ~3; + howto->dst_mask = howto->src_mask; + + *relocation = val + addend; + + return true; +} + +static boolean +xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd; + asection *input_section; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents; +{ + struct xcoff_link_hash_entry *h; + + if (0 > rel->r_symndx) + return false; + + h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; + + /* If we see an R_BR or R_RBR reloc which is jumping to global + linkage code, and it is followed by an appropriate cror nop + instruction, we replace the cror with lwz r2,20(r1). This + restores the TOC after the glink code. Contrariwise, if the + call is followed by a lwz r2,20(r1), but the call is not + going to global linkage code, we can replace the load with a + cror. */ + if (NULL != h + && bfd_link_hash_defined == h->root.type + && (rel->r_vaddr - input_section->vma + 8 + <= input_section->_cooked_size)) + { + bfd_byte *pnext; + unsigned long next; + + pnext = contents + (rel->r_vaddr - input_section->vma) + 4; + next = bfd_get_32 (input_bfd, pnext); + + /* The _ptrgl function is magic. It is used by the AIX + compiler to call a function through a pointer. */ + if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0) + { + if (next == 0x4def7b82 /* cror 15,15,15 */ + || next == 0x4ffffb82 /* cror 31,31,31 */ + || next == 0x60000000) /* ori r0,r0,0 */ + bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r1,20(r1) */ + + } + else + { + if (next == 0x80410014) /* lwz r1,20(r1) */ + bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */ + } + } + else if (NULL != h && bfd_link_hash_undefined == h->root.type) + { + /* Normally, this relocation is against a defined symbol. In the + case where this is a partial link and the output section offset + is greater than 2^25, the linker will return an invalid error + message that the relocation has been truncated. Yes it has been + truncated but no it not important. For this case, disable the + overflow checking. */ + + howto->complain_on_overflow = complain_overflow_dont; + } + + howto->pc_relative = true; + howto->src_mask &= ~3; + howto->dst_mask = howto->src_mask; + + /* A PC relative reloc includes the section address. */ + addend += input_section->vma; + + *relocation = val + addend; + *relocation -= (input_section->output_section->vma + + input_section->output_offset); + return true; +} + +boolean +xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd ATTRIBUTE_UNUSED; + asection *input_section; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel ATTRIBUTE_UNUSED; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto; + bfd_vma val ATTRIBUTE_UNUSED; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents ATTRIBUTE_UNUSED; +{ + howto->pc_relative = true; + howto->src_mask &= ~3; + howto->dst_mask = howto->src_mask; + + /* A PC relative reloc includes the section address. */ + addend += input_section->vma; + + *relocation = val + addend; + *relocation -= (input_section->output_section->vma + + input_section->output_offset); + return true; +} + +static boolean +xcoff_complain_overflow_dont_func (input_bfd, val, relocation, howto) + bfd *input_bfd ATTRIBUTE_UNUSED; + bfd_vma val ATTRIBUTE_UNUSED; + bfd_vma relocation ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto ATTRIBUTE_UNUSED; +{ + return false; +} + +static boolean +xcoff_complain_overflow_bitfield_func (input_bfd, val, relocation, howto) + bfd *input_bfd; + bfd_vma val; + bfd_vma relocation; + struct reloc_howto_struct *howto; +{ + bfd_vma addrmask, fieldmask, signmask, ss; + bfd_vma a, b, sum; + + /* Get the values to be added together. For signed and unsigned + relocations, we assume that all values should be truncated to + the size of an address. For bitfields, all the bits matter. + See also bfd_check_overflow. */ + fieldmask = N_ONES (howto->bitsize); + addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask; + a = relocation; + b = val & howto->src_mask; + + /* Much like unsigned, except no trimming with addrmask. In + addition, the sum overflows if there is a carry out of + the bfd_vma, i.e., the sum is less than either input + operand. */ + a >>= howto->rightshift; + b >>= howto->bitpos; + + /* Bitfields are sometimes used for signed numbers; for + example, a 13-bit field sometimes represents values in + 0..8191 and sometimes represents values in -4096..4095. + If the field is signed and a is -4095 (0x1001) and b is + -1 (0x1fff), the sum is -4096 (0x1000), but (0x1001 + + 0x1fff is 0x3000). It's not clear how to handle this + everywhere, since there is not way to know how many bits + are significant in the relocation, but the original code + assumed that it was fully sign extended, and we will keep + that assumption. */ + signmask = (fieldmask >> 1) + 1; + + if ((a & ~ fieldmask) != 0) + { + /* Some bits out of the field are set. This might not + be a problem: if this is a signed bitfield, it is OK + iff all the high bits are set, including the sign + bit. We'll try setting all but the most significant + bit in the original relocation value: if this is all + ones, we are OK, assuming a signed bitfield. */ + ss = (signmask << howto->rightshift) - 1; + if ((ss | relocation) != ~ (bfd_vma) 0) + return true; + a &= fieldmask; + } + + /* We just assume (b & ~ fieldmask) == 0. */ + + /* We explicitly permit wrap around if this relocation + covers the high bit of an address. The Linux kernel + relies on it, and it is the only way to write assembler + code which can run when loaded at a location 0x80000000 + away from the location at which it is linked. */ + if (howto->bitsize + howto->rightshift + == bfd_arch_bits_per_address (input_bfd)) + return false; + + sum = a + b; + if (sum < a || (sum & ~ fieldmask) != 0) + { + /* There was a carry out, or the field overflow. Test + for signed operands again. Here is the overflow test + is as for complain_overflow_signed. */ + if (((~ (a ^ b)) & (a ^ sum)) & signmask) + return true; + } + + return false; +} + +static boolean +xcoff_complain_overflow_signed_func (input_bfd, val, relocation, howto) + bfd *input_bfd; + bfd_vma val; + bfd_vma relocation; + struct reloc_howto_struct *howto; +{ + bfd_vma addrmask, fieldmask, signmask, ss; + bfd_vma a, b, sum; + + /* Get the values to be added together. For signed and unsigned + relocations, we assume that all values should be truncated to + the size of an address. For bitfields, all the bits matter. + See also bfd_check_overflow. */ + fieldmask = N_ONES (howto->bitsize); + addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask; + a = relocation; + b = val & howto->src_mask; + + a = (a & addrmask) >> howto->rightshift; + + /* If any sign bits are set, all sign bits must be set. + That is, A must be a valid negative address after + shifting. */ + signmask = ~ (fieldmask >> 1); + ss = a & signmask; + if (ss != 0 && ss != ((addrmask >> howto->rightshift) & signmask)) + return true; + + /* We only need this next bit of code if the sign bit of B + is below the sign bit of A. This would only happen if + SRC_MASK had fewer bits than BITSIZE. Note that if + SRC_MASK has more bits than BITSIZE, we can get into + trouble; we would need to verify that B is in range, as + we do for A above. */ + signmask = ((~ howto->src_mask) >> 1) & howto->src_mask; + if ((b & signmask) != 0) + { + /* Set all the bits above the sign bit. */ + b -= signmask <<= 1; + } + + b = (b & addrmask) >> howto->bitpos; + + /* Now we can do the addition. */ + sum = a + b; + + /* See if the result has the correct sign. Bits above the + sign bit are junk now; ignore them. If the sum is + positive, make sure we did not have all negative inputs; + if the sum is negative, make sure we did not have all + positive inputs. The test below looks only at the sign + bits, and it really just + SIGN (A) == SIGN (B) && SIGN (A) != SIGN (SUM) + */ + signmask = (fieldmask >> 1) + 1; + if (((~ (a ^ b)) & (a ^ sum)) & signmask) + return true; + + return false; +} + +static boolean +xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto) + bfd *input_bfd; + bfd_vma val; + bfd_vma relocation; + struct reloc_howto_struct *howto; +{ + bfd_vma addrmask, fieldmask; + bfd_vma a, b, sum; + + /* Get the values to be added together. For signed and unsigned + relocations, we assume that all values should be truncated to + the size of an address. For bitfields, all the bits matter. + See also bfd_check_overflow. */ + fieldmask = N_ONES (howto->bitsize); + addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask; + a = relocation; + b = val & howto->src_mask; + + /* Checking for an unsigned overflow is relatively easy: + trim the addresses and add, and trim the result as well. + Overflow is normally indicated when the result does not + fit in the field. However, we also need to consider the + case when, e.g., fieldmask is 0x7fffffff or smaller, an + input is 0x80000000, and bfd_vma is only 32 bits; then we + will get sum == 0, but there is an overflow, since the + inputs did not fit in the field. Instead of doing a + separate test, we can check for this by or-ing in the + operands when testing for the sum overflowing its final + field. */ + a = (a & addrmask) >> howto->rightshift; + b = (b & addrmask) >> howto->bitpos; + sum = (a + b) & addrmask; + if ((a | b | sum) & ~ fieldmask) + return true; + + return false; +} /* This is the relocation function for the RS/6000/POWER/PowerPC. This is currently the only processor which uses XCOFF; I hope that - will never change. */ + will never change. -static boolean + I took the relocation type definitions from two documents: + the PowerPC AIX Version 4 Application Binary Interface, First + Edition (April 1992), and the PowerOpen ABI, Big-Endian + 32-Bit Hardware Implementation (June 30, 1994). Differences + between the documents are noted below. + + Unsupported r_type's + + R_RTB: + R_RRTBI: + R_RRTBA: + + These relocs are defined by the PowerPC ABI to be + relative branches which use half of the difference + between the symbol and the program counter. I can't + quite figure out when this is useful. These relocs are + not defined by the PowerOpen ABI. + + Supported r_type's + + R_POS: + Simple positive relocation. + + R_NEG: + Simple negative relocation. + + R_REL: + Simple PC relative relocation. + + R_TOC: + TOC relative relocation. The value in the instruction in + the input file is the offset from the input file TOC to + the desired location. We want the offset from the final + TOC to the desired location. We have: + isym = iTOC + in + iinsn = in + o + osym = oTOC + on + oinsn = on + o + so we must change insn by on - in. + + R_GL: + GL linkage relocation. The value of this relocation + is the address of the entry in the TOC section. + + R_TCL: + Local object TOC address. I can't figure out the + difference between this and case R_GL. + + R_TRL: + TOC relative relocation. A TOC relative load instruction + which may be changed to a load address instruction. + FIXME: We don't currently implement this optimization. + + R_TRLA: + TOC relative relocation. This is a TOC relative load + address instruction which may be changed to a load + instruction. FIXME: I don't know if this is the correct + implementation. + + R_BA: + Absolute branch. We don't want to mess with the lower + two bits of the instruction. + + R_CAI: + The PowerPC ABI defines this as an absolute call which + may be modified to become a relative call. The PowerOpen + ABI does not define this relocation type. + + R_RBA: + Absolute branch which may be modified to become a + relative branch. + + R_RBAC: + The PowerPC ABI defines this as an absolute branch to a + fixed address which may be modified to an absolute branch + to a symbol. The PowerOpen ABI does not define this + relocation type. + + R_RBRC: + The PowerPC ABI defines this as an absolute branch to a + fixed address which may be modified to a relative branch. + The PowerOpen ABI does not define this relocation type. + + R_BR: + Relative branch. We don't want to mess with the lower + two bits of the instruction. + + R_CREL: + The PowerPC ABI defines this as a relative call which may + be modified to become an absolute call. The PowerOpen + ABI does not define this relocation type. + + R_RBR: + A relative branch which may be modified to become an + absolute branch. FIXME: We don't implement this, + although we should for symbols of storage mapping class + XMC_XO. + + R_RL: + The PowerPC AIX ABI describes this as a load which may be + changed to a load address. The PowerOpen ABI says this + is the same as case R_POS. + + R_RLA: + The PowerPC AIX ABI describes this as a load address + which may be changed to a load. The PowerOpen ABI says + this is the same as R_POS. +*/ + +boolean xcoff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, contents, relocs, syms, sections) @@ -2561,7 +3314,6 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd, rel = relocs; relend = rel + input_section->reloc_count; - for (; rel < relend; rel++) { long symndx; @@ -2570,7 +3322,10 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd, bfd_vma addend; bfd_vma val; struct reloc_howto_struct howto; - bfd_reloc_status_type rstat; + bfd_vma relocation; + bfd_vma value_to_relocate; + bfd_vma address; + bfd_byte *location; /* Relocation type R_REF is a special relocation type which is merely used to prevent garbage collection from occurring for @@ -2578,327 +3333,152 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd, if (rel->r_type == R_REF) continue; - symndx = rel->r_symndx; - - if (symndx == -1) - { - h = NULL; - sym = NULL; - addend = 0; - } - else - { - h = obj_xcoff_sym_hashes (input_bfd)[symndx]; - sym = syms + symndx; - addend = - sym->n_value; - - } - - /* We build the howto information on the fly. */ - + /* howto */ howto.type = rel->r_type; howto.rightshift = 0; - howto.size = 2; howto.bitsize = (rel->r_size & 0x1f) + 1; + howto.size = howto.bitsize > 16 ? 2 : 1; howto.pc_relative = false; howto.bitpos = 0; - if ((rel->r_size & 0x80) != 0) - howto.complain_on_overflow = complain_overflow_signed; - else - howto.complain_on_overflow = complain_overflow_bitfield; + howto.complain_on_overflow = (rel->r_size & 0x80 + ? complain_overflow_signed + : complain_overflow_bitfield); howto.special_function = NULL; howto.name = "internal"; howto.partial_inplace = true; - if (howto.bitsize == 32) - howto.src_mask = howto.dst_mask = 0xffffffff; - else - { - howto.src_mask = howto.dst_mask = (1 << howto.bitsize) - 1; - if (howto.bitsize == 16) - howto.size = 1; - } + howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize); howto.pcrel_offset = false; + /* symbol */ val = 0; + addend = 0; + h = NULL; + sym = NULL; + symndx = rel->r_symndx; - if (h == NULL) + if (-1 != symndx) { asection *sec; - - if (symndx == -1) - { - sec = bfd_abs_section_ptr; - val = 0; - } - else + + h = obj_xcoff_sym_hashes (input_bfd)[symndx]; + sym = syms + symndx; + addend = - sym->n_value; + + if (NULL == h) { sec = sections[symndx]; /* Hack to make sure we use the right TOC anchor value - if this reloc is against the TOC anchor. */ - + if this reloc is against the TOC anchor. */ if (sec->name[3] == '0' - && strcmp (sec->name, ".tc0") == 0) - { - val = xcoff_data (output_bfd)->toc; - } + && strcmp (sec->name, ".tc0") == 0) + val = xcoff_data (output_bfd)->toc; else + val = (sec->output_section->vma + + sec->output_offset + + sym->n_value + - sec->vma); + } + else + { + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + val = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_common) { + sec = h->root.u.c.p->section; val = (sec->output_section->vma - + sec->output_offset - + sym->n_value - - sec->vma); + + sec->output_offset); + + } + else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) + && ! info->relocateable) + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, input_section, + rel->r_vaddr - input_section->vma, true))) + return false; + + /* Don't try to process the reloc. It can't help, and + it may generate another error. */ + continue; } } } - else - { - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - asection *sec; - - sec = h->root.u.def.section; - val = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_common) - { - asection *sec; - - sec = h->root.u.c.p->section; - val = (sec->output_section->vma - + sec->output_offset); - } - else if ((h->flags & XCOFF_DEF_DYNAMIC) != 0 - || (h->flags & XCOFF_IMPORT) != 0) - { - /* Every symbol in a shared object is defined somewhere. */ - val = 0; - } - else if (! info->relocateable) - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, true))) - return false; - - /* Don't try to process the reloc. It can't help, and - it may generate another error. */ - continue; - } - } - /* I took the relocation type definitions from two documents: - the PowerPC AIX Version 4 Application Binary Interface, First - Edition (April 1992), and the PowerOpen ABI, Big-Endian - 32-Bit Hardware Implementation (June 30, 1994). Differences - between the documents are noted below. */ + if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION + || !((*xcoff_calculate_relocation[rel->r_type]) + (input_bfd, input_section, output_bfd, rel, sym, &howto, val, + addend, &relocation, contents))) + return false; + + /* address */ + address = rel->r_vaddr - input_section->vma; + location = contents + address; + + if (address > input_section->_raw_size) + abort(); + + /* Get the value we are going to relocate. */ + if (1 == howto.size) + value_to_relocate = bfd_get_16 (input_bfd, location); + else + value_to_relocate = bfd_get_32 (input_bfd, location); + + /* overflow. + + FIXME: We may drop bits during the addition + which we don't check for. We must either check at every single + operation, which would be tedious, or we must do the computations + in a type larger than bfd_vma, which would be inefficient. */ + + if ((unsigned int) howto.complain_on_overflow + >= XCOFF_MAX_COMPLAIN_OVERFLOW) + abort(); - switch (rel->r_type) + if (((*xcoff_complain_overflow[howto.complain_on_overflow]) + (input_bfd, value_to_relocate, relocation, &howto))) { - case R_RTB: - case R_RRTBI: - case R_RRTBA: - /* These relocs are defined by the PowerPC ABI to be - relative branches which use half of the difference - between the symbol and the program counter. I can't - quite figure out when this is useful. These relocs are - not defined by the PowerOpen ABI. */ - default: - (*_bfd_error_handler) - (_("%s: unsupported relocation type 0x%02x"), - bfd_archive_filename (input_bfd), (unsigned int) rel->r_type); - bfd_set_error (bfd_error_bad_value); - return false; - case R_POS: - /* Simple positive relocation. */ - break; - case R_NEG: - /* Simple negative relocation. */ - val = - val; - break; - case R_REL: - /* Simple PC relative relocation. */ - howto.pc_relative = true; - break; - case R_TOC: - /* TOC relative relocation. The value in the instruction in - the input file is the offset from the input file TOC to - the desired location. We want the offset from the final - TOC to the desired location. We have: - isym = iTOC + in - iinsn = in + o - osym = oTOC + on - oinsn = on + o - so we must change insn by on - in. - */ - case R_GL: - /* Global linkage relocation. The value of this relocation - is the address of the entry in the TOC section. */ - case R_TCL: - /* Local object TOC address. I can't figure out the - difference between this and case R_GL. */ - case R_TRL: - /* TOC relative relocation. A TOC relative load instruction - which may be changed to a load address instruction. - FIXME: We don't currently implement this optimization. */ - case R_TRLA: - /* TOC relative relocation. This is a TOC relative load - address instruction which may be changed to a load - instruction. FIXME: I don't know if this is the correct - implementation. */ - if (h != NULL && h->smclas != XMC_TD) + const char *name; + char buf[SYMNMLEN + 1]; + char reloc_type_name[10]; + + if (symndx == -1) { - if (h->toc_section == NULL) - { - (*_bfd_error_handler) - (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"), - bfd_archive_filename (input_bfd), rel->r_vaddr, - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return false; - } - - BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0); - val = (h->toc_section->output_section->vma - + h->toc_section->output_offset); - } - - val = ((val - xcoff_data (output_bfd)->toc) - - (sym->n_value - xcoff_data (input_bfd)->toc)); - addend = 0; - break; - case R_BA: - /* Absolute branch. We don't want to mess with the lower - two bits of the instruction. */ - case R_CAI: - /* The PowerPC ABI defines this as an absolute call which - may be modified to become a relative call. The PowerOpen - ABI does not define this relocation type. */ - case R_RBA: - /* Absolute branch which may be modified to become a - relative branch. */ - case R_RBAC: - /* The PowerPC ABI defines this as an absolute branch to a - fixed address which may be modified to an absolute branch - to a symbol. The PowerOpen ABI does not define this - relocation type. */ - case R_RBRC: - /* The PowerPC ABI defines this as an absolute branch to a - fixed address which may be modified to a relative branch. - The PowerOpen ABI does not define this relocation type. */ - howto.src_mask &= ~3; - howto.dst_mask = howto.src_mask; - break; - case R_BR: - /* Relative branch. We don't want to mess with the lower - two bits of the instruction. */ - case R_CREL: - /* The PowerPC ABI defines this as a relative call which may - be modified to become an absolute call. The PowerOpen - ABI does not define this relocation type. */ - case R_RBR: - /* A relative branch which may be modified to become an - absolute branch. FIXME: We don't implement this, - although we should for symbols of storage mapping class - XMC_XO. */ - howto.pc_relative = true; - howto.src_mask &= ~3; - howto.dst_mask = howto.src_mask; - break; - case R_RL: - /* The PowerPC AIX ABI describes this as a load which may be - changed to a load address. The PowerOpen ABI says this - is the same as case R_POS. */ - break; - case R_RLA: - /* The PowerPC AIX ABI describes this as a load address - which may be changed to a load. The PowerOpen ABI says - this is the same as R_POS. */ - break; - } - - /* If we see an R_BR or R_RBR reloc which is jumping to global - linkage code, and it is followed by an appropriate cror nop - instruction, we replace the cror with lwz r2,20(r1). This - restores the TOC after the glink code. Contrariwise, if the - call is followed by a lwz r2,20(r1), but the call is not - going to global linkage code, we can replace the load with a - cror. */ - if ((rel->r_type == R_BR || rel->r_type == R_RBR) - && h != NULL - && h->root.type == bfd_link_hash_defined - && (rel->r_vaddr - input_section->vma + 8 - <= input_section->_cooked_size)) - { - bfd_byte *pnext; - unsigned long next; - - pnext = contents + (rel->r_vaddr - input_section->vma) + 4; - next = bfd_get_32 (input_bfd, pnext); - - /* The _ptrgl function is magic. It is used by the AIX - compiler to call a function through a pointer. */ - if (h->smclas == XMC_GL - || strcmp (h->root.root.string, "._ptrgl") == 0) + name = "*ABS*"; + } + else if (h != NULL) { - if (next == 0x4def7b82 /* cror 15,15,15 */ - || next == 0x4ffffb82 /* cror 31,31,31 */ - || next == 0x60000000) /* ori r0,r0,0 */ - bfd_put_32 (input_bfd, - (bfd_vma) 0x80410014, /* lwz r1,20(r1) */ - pnext); - } - else + name = h->root.root.string; + } + else { - if (next == 0x80410014) /* lwz r1,20(r1) */ - bfd_put_32 (input_bfd, - (bfd_vma) 0x60000000, /* ori r0,r0,0 */ - pnext); + name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); + if (name == NULL) + name = "UNKNOWN"; } + sprintf (reloc_type_name, "0x%02x", rel->r_type); + + if (! ((*info->callbacks->reloc_overflow) + (info, name, reloc_type_name, (bfd_vma) 0, input_bfd, + input_section, rel->r_vaddr - input_section->vma))) + return false; } - - /* A PC relative reloc includes the section address. */ - if (howto.pc_relative) - addend += input_section->vma; - - rstat = _bfd_final_link_relocate (&howto, input_bfd, input_section, - contents, - rel->r_vaddr - input_section->vma, - val, addend); - - switch (rstat) - { - default: - abort (); - case bfd_reloc_ok: - break; - case bfd_reloc_overflow: - { - const char *name; - char buf[SYMNMLEN + 1]; - char howto_name[10]; - - if (symndx == -1) - name = "*ABS*"; - else if (h != NULL) - name = h->root.root.string; - else - { - name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); - - if (name == NULL) - return false; - } - sprintf (howto_name, "0x%02x", rel->r_type); - - if (! ((*info->callbacks->reloc_overflow) - (info, name, howto_name, (bfd_vma) 0, input_bfd, - input_section, rel->r_vaddr - input_section->vma))) - return false; - } - } + + /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */ + value_to_relocate = ((value_to_relocate & ~howto.dst_mask) + | (((value_to_relocate & howto.src_mask) + + relocation) & howto.dst_mask)); + + /* Put the value back in the object file. */ + if (1 == howto.size) + bfd_put_16 (input_bfd, value_to_relocate, location); + else + bfd_put_32 (input_bfd, value_to_relocate, location); } return true; @@ -2994,8 +3574,8 @@ xcoff_create_csect_from_smclas (abfd, aux, symbol_name) ".td", NULL, ".sv3264" }; - if ((19 >= aux->x_csect.x_smclas) && - (NULL != names[aux->x_csect.x_smclas])) + if ((19 >= aux->x_csect.x_smclas) + && (NULL != names[aux->x_csect.x_smclas])) { return_value = bfd_make_section_anyway (abfd, names[aux->x_csect.x_smclas]); @@ -3046,20 +3626,20 @@ xcoff_loader_reloc_offset (abfd, ldhdr) bfd *abfd; struct internal_ldhdr *ldhdr; { - return bfd_xcoff_ldhdrsz(abfd) + - (ldhdr->l_nsyms * bfd_xcoff_ldsymsz(abfd)); + return bfd_xcoff_ldhdrsz (abfd) + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (abfd); } static boolean -xcoff_generate_rtinit (abfd, init, fini) +xcoff_generate_rtinit (abfd, init, fini, rtld) bfd *abfd; const char *init; const char *fini; + boolean rtld; { bfd_byte filehdr_ext[FILHSZ]; bfd_byte scnhdr_ext[SCNHSZ]; - bfd_byte syment_ext[SYMESZ * 8]; - bfd_byte reloc_ext[RELSZ * 2]; + bfd_byte syment_ext[SYMESZ * 10]; + bfd_byte reloc_ext[RELSZ * 3]; bfd_byte *data_buffer; bfd_size_type data_buffer_size; bfd_byte *string_table = NULL, *st_tmp = NULL; @@ -3074,9 +3654,9 @@ xcoff_generate_rtinit (abfd, init, fini) char *data_name = ".data"; char *rtinit_name = "__rtinit"; + char *rtld_name = "__rtld"; - if (! bfd_xcoff_rtinit_size (abfd) - || (init == NULL && fini == NULL)) + if (! bfd_xcoff_rtinit_size (abfd)) return false; initsz = (init == NULL ? 0 : 1 + strlen (init)); @@ -3088,7 +3668,7 @@ xcoff_generate_rtinit (abfd, init, fini) filehdr.f_magic = bfd_xcoff_magic_number (abfd); filehdr.f_nscns = 1; filehdr.f_timdat = 0; - filehdr.f_nsyms = 0; /* at least 6, no more than 8 */ + filehdr.f_nsyms = 0; /* at least 6, no more than 10 */ filehdr.f_symptr = 0; /* set below */ filehdr.f_opthdr = 0; filehdr.f_flags = 0; @@ -3130,11 +3710,9 @@ xcoff_generate_rtinit (abfd, init, fini) data_buffer_size = 0x0040 + initsz + finisz; data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0; data_buffer = NULL; - data_buffer = (bfd_byte *) bfd_malloc (data_buffer_size); + data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size); if (data_buffer == NULL) return false; - - memset (data_buffer, 0, data_buffer_size); if (initsz) { @@ -3168,8 +3746,10 @@ xcoff_generate_rtinit (abfd, init, fini) if (string_table_size) { string_table_size += 4; - string_table = (bfd_byte *)bfd_malloc (string_table_size); - memset (string_table, 0, string_table_size); + string_table = (bfd_byte *) bfd_zmalloc (string_table_size); + if (string_table == NULL) + return false; + val = string_table_size; bfd_h_put_32 (abfd, val, &string_table[0]); st_tmp = string_table + 4; @@ -3179,9 +3759,10 @@ xcoff_generate_rtinit (abfd, init, fini) 0. .data csect 2. __rtinit 4. init function - 6. fini function */ - memset (syment_ext, 0, 8 * SYMESZ); - memset (reloc_ext, 0, 2 * RELSZ); + 6. fini function + 8. __rtld */ + memset (syment_ext, 0, 10 * SYMESZ); + memset (reloc_ext, 0, 3 * RELSZ); /* .data csect */ memset (&syment, 0, sizeof (struct internal_syment)); @@ -3287,6 +3868,32 @@ xcoff_generate_rtinit (abfd, init, fini) scnhdr.s_nreloc += 1; } + if (rtld) + { + memset (&syment, 0, sizeof (struct internal_syment)); + memset (&auxent, 0, sizeof (union internal_auxent)); + memcpy (syment._n._n_name, rtld_name, strlen (rtld_name)); + syment.n_sclass = C_EXT; + syment.n_numaux = 1; + bfd_coff_swap_sym_out (abfd, &syment, + &syment_ext[filehdr.f_nsyms * SYMESZ]); + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, + &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); + + /* reloc */ + memset (&reloc, 0, sizeof (struct internal_reloc)); + reloc.r_vaddr = 0x0000; + reloc.r_symndx = filehdr.f_nsyms; + reloc.r_type = R_POS; + reloc.r_size = 31; + bfd_coff_swap_reloc_out (abfd, &reloc, + &reloc_ext[scnhdr.s_nreloc * RELSZ]); + + filehdr.f_nsyms += 2; + scnhdr.s_nreloc += 1; + } + scnhdr.s_relptr = scnhdr.s_scnptr + data_buffer_size; filehdr.f_symptr = scnhdr.s_relptr + scnhdr.s_nreloc * RELSZ; @@ -3343,84 +3950,81 @@ static unsigned long xcoff_glink_code[9] = static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = { { /* COFF backend, defined in libcoff.h. */ - _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */ - _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */ - coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */ - _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */ - _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */ - coff_swap_lineno_out, /* _bfd_swap_lineno_out */ - coff_swap_reloc_out, /* _bfd_swap_reloc_out */ - coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */ - coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */ - coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */ - FILHSZ, /* _bfd_filhsz */ - AOUTSZ, /* _bfd_aoutsz */ - SCNHSZ, /* _bfd_scnhsz */ - SYMESZ, /* _bfd_symesz */ - AUXESZ, /* _bfd_auxesz */ - RELSZ, /* _bfd_relsz */ - LINESZ, /* _bfd_linesz */ - FILNMLEN, /* _bfd_filnmlen */ + _bfd_xcoff_swap_aux_in, + _bfd_xcoff_swap_sym_in, + coff_swap_lineno_in, + _bfd_xcoff_swap_aux_out, + _bfd_xcoff_swap_sym_out, + coff_swap_lineno_out, + xcoff_swap_reloc_out, + coff_swap_filehdr_out, + coff_swap_aouthdr_out, + coff_swap_scnhdr_out, + FILHSZ, + AOUTSZ, + SCNHSZ, + SYMESZ, + AUXESZ, + RELSZ, + LINESZ, + FILNMLEN, true, /* _bfd_coff_long_filenames */ false, /* _bfd_coff_long_section_names */ - (3), /* _bfd_coff_default_section_alignment_power */ + 3, /* _bfd_coff_default_section_alignment_power */ false, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ - coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */ - coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */ - coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */ - coff_swap_reloc_in, /* _bfd_reloc_in */ - coff_bad_format_hook, /* _bfd_bad_format_hook */ - coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */ - coff_mkobject_hook, /* _bfd_mkobject_hook */ - styp_to_sec_flags, /* _bfd_syp_to_sec_flags */ - coff_set_alignment_hook, /* _bfd_set_alignment_hook */ - coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */ - symname_in_debug_hook, /* _coff_symname_in_debug_hook */ - coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */ - coff_print_aux, /* bfd_coff_print_aux */ - dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */ - dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */ + coff_swap_filehdr_in, + coff_swap_aouthdr_in, + coff_swap_scnhdr_in, + xcoff_swap_reloc_in, + coff_bad_format_hook, + coff_set_arch_mach_hook, + coff_mkobject_hook, + styp_to_sec_flags, + coff_set_alignment_hook, + coff_slurp_symbol_table, + symname_in_debug_hook, + coff_pointerize_aux_hook, + coff_print_aux, + dummy_reloc16_extra_cases, + dummy_reloc16_estimate, NULL, /* bfd_coff_sym_is_global */ - coff_compute_section_file_positions, /* _bfd_coff_compute_section_file_positions */ + coff_compute_section_file_positions, NULL, /* _bfd_coff_start_final_link */ - xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */ - coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */ - NULL, /* _bfd_coff_addust_symndx */ - _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */ - coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */ - coff_final_link_postscript /* _bfd_coff_final_link_postscript */ + xcoff_ppc_relocate_section, + coff_rtype_to_howto, + NULL, /* _bfd_coff_adjust_symndx */ + _bfd_generic_link_add_one_symbol, + coff_link_output_has_begun, + coff_final_link_postscript }, 0x01DF, /* magic number */ - bfd_arch_rs6000, /* architecture */ - bfd_mach_rs6k, /* machine */ + bfd_arch_rs6000, + bfd_mach_rs6k, /* Function pointers to xcoff specific swap routines. */ - xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */ - xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */ - xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */ - xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */ - xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */ - xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */ + xcoff_swap_ldhdr_in, + xcoff_swap_ldhdr_out, + xcoff_swap_ldsym_in, + xcoff_swap_ldsym_out, + xcoff_swap_ldrel_in, + xcoff_swap_ldrel_out, /* Sizes. */ - LDHDRSZ, /* _xcoff_ldhdrsz */ - LDSYMSZ, /* _xcoff_ldsymsz */ - LDRELSZ, /* _xcoff_ldrelsz */ + LDHDRSZ, + LDSYMSZ, + LDRELSZ, 12, /* _xcoff_function_descriptor_size */ - SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */ + SMALL_AOUTSZ, /* Versions. */ - 1, /* _xcoff_ldhdr_version */ + 1, /* _xcoff_ldhdr_version */ - /* Xcoff vs xcoff64 putting symbol names. */ - _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */ - _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */ - - & xcoff_dynamic_reloc, /* dynamic reloc howto */ - - xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */ + _bfd_xcoff_put_symbol_name, + _bfd_xcoff_put_ldsymbol_name, + &xcoff_dynamic_reloc, + xcoff_create_csect_from_smclas, /* Lineno and reloc count overflow. */ xcoff_is_lineno_count_overflow, @@ -3431,14 +4035,14 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = /* glink. */ & xcoff_glink_code[0], - (36), /* _xcoff_glink_size */ + 36, /* _xcoff_glink_size */ /* rtinit */ 64, /* _xcoff_rtinit_size */ - xcoff_generate_rtinit, /* _xcoff_generate_rtinit */ + xcoff_generate_rtinit, }; -/* The transfer vector that leads the outside world to all of the above. */ +/* The transfer vector that leads the outside world to all of the above. */ const bfd_target rs6000coff_vec = { "aixcoff-rs6000", @@ -3446,36 +4050,35 @@ const bfd_target rs6000coff_vec = BFD_ENDIAN_BIG, /* data byte order is big */ BFD_ENDIAN_BIG, /* header byte order is big */ - (HAS_RELOC | EXEC_P | /* object flags */ - HAS_LINENO | HAS_DEBUG | DYNAMIC | - HAS_SYMS | HAS_LOCALS | WP_TEXT), + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC + | HAS_SYMS | HAS_LOCALS | WP_TEXT), - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), 0, /* leading char */ '/', /* ar_pad_char */ - 15, /* ar_max_namelen??? FIXMEmgo */ + 15, /* ar_max_namelen */ /* data */ - bfd_getb64, /* bfd_getx64 */ - bfd_getb_signed_64, /* bfd_getx_signed_64 */ - bfd_putb64, /* bfd_putx64 */ - bfd_getb32, /* bfd_getx32 */ - bfd_getb_signed_32, /* bfd_getx_signed_32 */ - bfd_putb32, /* bfd_putx32 */ - bfd_getb16, /* bfd_getx16 */ - bfd_getb_signed_16, /* bfd_getx_signed_16 */ - bfd_putb16, /* bfd_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, /* hdrs */ - bfd_getb64, /* bfd_h_getx64 */ - bfd_getb_signed_64, /* bfd_h_getx_signed_64 */ - bfd_putb64, /* bfd_h_putx64 */ - bfd_getb32, /* bfd_h_getx32 */ - bfd_getb_signed_32, /* bfd_h_getx_signed_32 */ - bfd_putb32, /* bfd_h_putx32 */ - bfd_getb16, /* bfd_h_getx16 */ - bfd_getb_signed_16, /* bfd_h_getx_signed_16 */ - bfd_putb16, /* bfd_h_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, { /* bfd_check_format */ _bfd_dummy_target, @@ -3499,204 +4102,186 @@ const bfd_target rs6000coff_vec = }, /* Generic */ - bfd_true, /* _close_and_cleanup */ - bfd_true, /* _bfd_free_cached_info */ - coff_new_section_hook, /* _new_section_hook */ - _bfd_generic_get_section_contents, /* _bfd_get_section_contents */ - /* _bfd_get_section_contents_in_window */ + bfd_true, + bfd_true, + coff_new_section_hook, + _bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window, /* Copy */ - _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */ - /* _bfd_merge_private_bfd_data */ + _bfd_xcoff_copy_private_bfd_data, ((boolean (*) (bfd *, bfd *)) bfd_true), - /* _bfd_copy_pivate_section_data */ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), - /* _bfd_copy_private_symbol_data */ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), - ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */ - ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */ + ((boolean (*) (bfd *, flagword)) bfd_true), + ((boolean (*) (bfd *, void * )) bfd_true), /* Core */ - coff_core_file_failing_command, /* _core_file_failing_command */ - coff_core_file_failing_signal, /* _core_file_failing_signal */ - /* _core_file_matches_executable_p */ + coff_core_file_failing_command, + coff_core_file_failing_signal, coff_core_file_matches_executable_p, /* Archive */ - _bfd_xcoff_slurp_armap, /* _slurp_armap */ - /* XCOFF archives do not have - anything which corresponds to - an extended name table. */ - bfd_false, /* _slurp_extended_name_table */ - /* _construct_extended_name_table */ + _bfd_xcoff_slurp_armap, + bfd_false, ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), - bfd_dont_truncate_arname, /* _truncate_arname */ - _bfd_xcoff_write_armap, /* _write_armap */ - _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ - _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */ - _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ - /* XCOFF archives do not have - a timestamp. */ - bfd_true, /* _update_armap_timestamp */ + bfd_dont_truncate_arname, + _bfd_xcoff_write_armap, + _bfd_xcoff_read_ar_hdr, + _bfd_xcoff_openr_next_archived_file, + _bfd_generic_get_elt_at_index, + _bfd_xcoff_stat_arch_elt, + bfd_true, /* Symbols */ - coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */ - coff_get_symtab, /* _get_symtab */ - coff_make_empty_symbol, /* _make_empty_symbol */ - coff_print_symbol, /* _print_symbol */ - coff_get_symbol_info, /* _get_symbol_info */ - _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */ - coff_get_lineno, /* _get_lineno */ - coff_find_nearest_line, /* _find_nearest_line */ - coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */ - _bfd_generic_read_minisymbols, /* _read_minisymbols */ - _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */ + coff_get_symtab_upper_bound, + coff_get_symtab, + coff_make_empty_symbol, + coff_print_symbol, + coff_get_symbol_info, + _bfd_xcoff_is_local_label_name, + coff_get_lineno, + coff_find_nearest_line, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, + _bfd_generic_minisymbol_to_symbol, /* Reloc */ - coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */ - coff_canonicalize_reloc, /* _cononicalize_reloc */ - _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */ + coff_get_reloc_upper_bound, + coff_canonicalize_reloc, + _bfd_xcoff_reloc_type_lookup, /* Write */ - coff_set_arch_mach, /* _set_arch_mach */ - coff_set_section_contents, /* _set_section_contents */ + coff_set_arch_mach, + coff_set_section_contents, /* Link */ - _bfd_xcoff_sizeof_headers, /* _sizeof_headers */ - /* _bfd_get_relocated_section_contents */ + _bfd_xcoff_sizeof_headers, bfd_generic_get_relocated_section_contents, - bfd_generic_relax_section, /* _bfd_relax_section */ - _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */ - _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */ - _bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */ - _bfd_generic_link_split_section, /* _bfd_link_split_section */ - bfd_generic_gc_sections, /* _bfd_gc_sections */ - bfd_generic_merge_sections, /* _bfd_merge_sections */ + bfd_generic_relax_section, + _bfd_xcoff_bfd_link_hash_table_create, + _bfd_generic_link_hash_table_free, + _bfd_xcoff_bfd_link_add_symbols, + _bfd_generic_link_just_syms, + _bfd_xcoff_bfd_final_link, + _bfd_generic_link_split_section, + bfd_generic_gc_sections, + bfd_generic_merge_sections, + bfd_generic_discard_group, /* Dynamic */ - /* _get_dynamic_symtab_upper_bound */ _bfd_xcoff_get_dynamic_symtab_upper_bound, - _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */ - _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */ - _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */ + _bfd_xcoff_canonicalize_dynamic_symtab, + _bfd_xcoff_get_dynamic_reloc_upper_bound, + _bfd_xcoff_canonicalize_dynamic_reloc, /* Opposite endian version, none exists */ NULL, - /* back end data */ (void *) &bfd_xcoff_backend_data, }; -/* - * xcoff-powermac target - * Old target. - * Only difference between this target and the rs6000 target is the - * the default architecture and machine type used in coffcode.h - * - * PowerPC Macs use the same magic numbers as RS/6000 - * (because that's how they were bootstrapped originally), - * but they are always PowerPC architecture. - */ +/* xcoff-powermac target + Old target. + Only difference between this target and the rs6000 target is the + the default architecture and machine type used in coffcode.h + + PowerPC Macs use the same magic numbers as RS/6000 + (because that's how they were bootstrapped originally), + but they are always PowerPC architecture. */ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data = { - { /* COFF backend, defined in libcoff.h */ - _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */ - _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */ - coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */ - _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */ - _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */ - coff_swap_lineno_out, /* _bfd_swap_lineno_out */ - coff_swap_reloc_out, /* _bfd_swap_reloc_out */ - coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */ - coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */ - coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */ - FILHSZ, /* _bfd_filhsz */ - AOUTSZ, /* _bfd_aoutsz */ - SCNHSZ, /* _bfd_scnhsz */ - SYMESZ, /* _bfd_symesz */ - AUXESZ, /* _bfd_auxesz */ - RELSZ, /* _bfd_relsz */ - LINESZ, /* _bfd_linesz */ - FILNMLEN, /* _bfd_filnmlen */ + { /* COFF backend, defined in libcoff.h. */ + _bfd_xcoff_swap_aux_in, + _bfd_xcoff_swap_sym_in, + coff_swap_lineno_in, + _bfd_xcoff_swap_aux_out, + _bfd_xcoff_swap_sym_out, + coff_swap_lineno_out, + xcoff_swap_reloc_out, + coff_swap_filehdr_out, + coff_swap_aouthdr_out, + coff_swap_scnhdr_out, + FILHSZ, + AOUTSZ, + SCNHSZ, + SYMESZ, + AUXESZ, + RELSZ, + LINESZ, + FILNMLEN, true, /* _bfd_coff_long_filenames */ false, /* _bfd_coff_long_section_names */ - (3), /* _bfd_coff_default_section_alignment_power */ + 3, /* _bfd_coff_default_section_alignment_power */ false, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ - coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */ - coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */ - coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */ - coff_swap_reloc_in, /* _bfd_reloc_in */ - coff_bad_format_hook, /* _bfd_bad_format_hook */ - coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */ - coff_mkobject_hook, /* _bfd_mkobject_hook */ - styp_to_sec_flags, /* _bfd_syp_to_sec_flags */ - coff_set_alignment_hook, /* _bfd_set_alignment_hook */ - coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */ - symname_in_debug_hook, /* _coff_symname_in_debug_hook */ - coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */ - coff_print_aux, /* bfd_coff_print_aux */ - dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */ - dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */ + coff_swap_filehdr_in, + coff_swap_aouthdr_in, + coff_swap_scnhdr_in, + xcoff_swap_reloc_in, + coff_bad_format_hook, + coff_set_arch_mach_hook, + coff_mkobject_hook, + styp_to_sec_flags, + coff_set_alignment_hook, + coff_slurp_symbol_table, + symname_in_debug_hook, + coff_pointerize_aux_hook, + coff_print_aux, + dummy_reloc16_extra_cases, + dummy_reloc16_estimate, NULL, /* bfd_coff_sym_is_global */ - /* _bfd_coff_compute_section_file_positions */ coff_compute_section_file_positions, NULL, /* _bfd_coff_start_final_link */ - xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */ - coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */ - NULL, /* _bfd_coff_addust_symndx */ - _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */ - coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */ - coff_final_link_postscript /* _bfd_coff_final_link_postscript */ + xcoff_ppc_relocate_section, + coff_rtype_to_howto, + NULL, /* _bfd_coff_adjust_symndx */ + _bfd_generic_link_add_one_symbol, + coff_link_output_has_begun, + coff_final_link_postscript }, 0x01DF, /* magic number */ - bfd_arch_powerpc, /* architecture */ - bfd_mach_ppc, /* machine */ - - /* function pointers to xcoff specific swap routines */ - xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */ - xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */ - xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */ - xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */ - xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */ - xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */ - - /* sizes */ - LDHDRSZ, /* _xcoff_ldhdrsz */ - LDSYMSZ, /* _xcoff_ldsymsz */ - LDRELSZ, /* _xcoff_ldrelsz */ - 12, /* _xcoff_function_descriptor_size */ - SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */ + bfd_arch_powerpc, + bfd_mach_ppc, - /* versions */ - 1, /* _xcoff_ldhdr_version */ + /* Function pointers to xcoff specific swap routines. */ + xcoff_swap_ldhdr_in, + xcoff_swap_ldhdr_out, + xcoff_swap_ldsym_in, + xcoff_swap_ldsym_out, + xcoff_swap_ldrel_in, + xcoff_swap_ldrel_out, - /* xcoff vs xcoff64 putting symbol names */ - _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */ - _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */ + /* Sizes. */ + LDHDRSZ, + LDSYMSZ, + LDRELSZ, + 12, /* _xcoff_function_descriptor_size */ + SMALL_AOUTSZ, - &xcoff_dynamic_reloc, /* dynamic reloc howto */ + /* Versions. */ + 1, /* _xcoff_ldhdr_version */ - xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */ + _bfd_xcoff_put_symbol_name, + _bfd_xcoff_put_ldsymbol_name, + &xcoff_dynamic_reloc, + xcoff_create_csect_from_smclas, - /* lineno and reloc count overflow */ + /* Lineno and reloc count overflow. */ xcoff_is_lineno_count_overflow, xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset, xcoff_loader_reloc_offset, - /* glink */ + /* glink. */ &xcoff_glink_code[0], - (36), /* _xcoff_glink_size */ + 36, /* _xcoff_glink_size */ /* rtinit */ 0, /* _xcoff_rtinit_size */ - xcoff_generate_rtinit, /* _xcoff_generate_rtinit */ - + xcoff_generate_rtinit, }; /* The transfer vector that leads the outside world to all of the above. */ @@ -3707,36 +4292,35 @@ const bfd_target pmac_xcoff_vec = BFD_ENDIAN_BIG, /* data byte order is big */ BFD_ENDIAN_BIG, /* header byte order is big */ - (HAS_RELOC | EXEC_P | /* object flags */ - HAS_LINENO | HAS_DEBUG | DYNAMIC | - HAS_SYMS | HAS_LOCALS | WP_TEXT), + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC + | HAS_SYMS | HAS_LOCALS | WP_TEXT), - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), 0, /* leading char */ '/', /* ar_pad_char */ - 15, /* ar_max_namelen??? FIXMEmgo */ + 15, /* ar_max_namelen */ /* data */ - bfd_getb64, /* bfd_getx64 */ - bfd_getb_signed_64, /* bfd_getx_signed_64 */ - bfd_putb64, /* bfd_putx64 */ - bfd_getb32, /* bfd_getx32 */ - bfd_getb_signed_32, /* bfd_getx_signed_32 */ - bfd_putb32, /* bfd_putx32 */ - bfd_getb16, /* bfd_getx16 */ - bfd_getb_signed_16, /* bfd_getx_signed_16 */ - bfd_putb16, /* bfd_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, /* hdrs */ - bfd_getb64, /* bfd_h_getx64 */ - bfd_getb_signed_64, /* bfd_h_getx_signed_64 */ - bfd_putb64, /* bfd_h_putx64 */ - bfd_getb32, /* bfd_h_getx32 */ - bfd_getb_signed_32, /* bfd_h_getx_signed_32 */ - bfd_putb32, /* bfd_h_putx32 */ - bfd_getb16, /* bfd_h_getx16 */ - bfd_getb_signed_16, /* bfd_h_getx_signed_16 */ - bfd_putb16, /* bfd_h_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, { /* bfd_check_format */ _bfd_dummy_target, @@ -3760,92 +4344,81 @@ const bfd_target pmac_xcoff_vec = }, /* Generic */ - bfd_true, /* _close_and_cleanup */ - bfd_true, /* _bfd_free_cached_info */ - coff_new_section_hook, /* _new_section_hook */ - _bfd_generic_get_section_contents, /* _bfd_get_section_contents */ - /* _bfd_get_section_contents_in_window */ + bfd_true, + bfd_true, + coff_new_section_hook, + _bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window, /* Copy */ - _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */ - /* _bfd_merge_private_bfd_data */ + _bfd_xcoff_copy_private_bfd_data, ((boolean (*) (bfd *, bfd *)) bfd_true), - /* _bfd_copy_pivate_section_data */ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), - /* _bfd_copy_private_symbol_data */ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), - ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */ - ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */ + ((boolean (*) (bfd *, flagword)) bfd_true), + ((boolean (*) (bfd *, void * )) bfd_true), /* Core */ - coff_core_file_failing_command, /* _core_file_failing_command */ - coff_core_file_failing_signal, /* _core_file_failing_signal */ - /* _core_file_matches_executable_p */ + coff_core_file_failing_command, + coff_core_file_failing_signal, coff_core_file_matches_executable_p, /* Archive */ - _bfd_xcoff_slurp_armap, /* _slurp_armap */ - /* XCOFF archives do not have - anything which corresponds to - an extended name table. */ - bfd_false, /* _slurp_extended_name_table */ - /* _construct_extended_name_table */ + _bfd_xcoff_slurp_armap, + bfd_false, ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), - bfd_dont_truncate_arname, /* _truncate_arname */ - _bfd_xcoff_write_armap, /* _write_armap */ - _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ - _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */ - _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ - /* XCOFF archives do not have - a timestamp. */ - bfd_true, /* _update_armap_timestamp */ + bfd_dont_truncate_arname, + _bfd_xcoff_write_armap, + _bfd_xcoff_read_ar_hdr, + _bfd_xcoff_openr_next_archived_file, + _bfd_generic_get_elt_at_index, + _bfd_xcoff_stat_arch_elt, + bfd_true, /* Symbols */ - coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */ - coff_get_symtab, /* _get_symtab */ - coff_make_empty_symbol, /* _make_empty_symbol */ - coff_print_symbol, /* _print_symbol */ - coff_get_symbol_info, /* _get_symbol_info */ - _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */ - coff_get_lineno, /* _get_lineno */ - coff_find_nearest_line, /* _find_nearest_line */ - coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */ - _bfd_generic_read_minisymbols, /* _read_minisymbols */ - _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */ + coff_get_symtab_upper_bound, + coff_get_symtab, + coff_make_empty_symbol, + coff_print_symbol, + coff_get_symbol_info, + _bfd_xcoff_is_local_label_name, + coff_get_lineno, + coff_find_nearest_line, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, + _bfd_generic_minisymbol_to_symbol, /* Reloc */ - coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */ - coff_canonicalize_reloc, /* _cononicalize_reloc */ - _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */ + coff_get_reloc_upper_bound, + coff_canonicalize_reloc, + _bfd_xcoff_reloc_type_lookup, /* Write */ - coff_set_arch_mach, /* _set_arch_mach */ - coff_set_section_contents, /* _set_section_contents */ + coff_set_arch_mach, + coff_set_section_contents, /* Link */ - _bfd_xcoff_sizeof_headers, /* _sizeof_headers */ - /* _bfd_get_relocated_section_contents */ + _bfd_xcoff_sizeof_headers, bfd_generic_get_relocated_section_contents, - bfd_generic_relax_section, /* _bfd_relax_section */ - _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */ - _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */ - _bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */ - _bfd_generic_link_split_section, /* _bfd_link_split_section */ - bfd_generic_gc_sections, /* _bfd_gc_sections */ - bfd_generic_merge_sections, /* _bfd_merge_sections */ + bfd_generic_relax_section, + _bfd_xcoff_bfd_link_hash_table_create, + _bfd_generic_link_hash_table_free, + _bfd_xcoff_bfd_link_add_symbols, + _bfd_generic_link_just_syms, + _bfd_xcoff_bfd_final_link, + _bfd_generic_link_split_section, + bfd_generic_gc_sections, + bfd_generic_merge_sections, + bfd_generic_discard_group, /* Dynamic */ - /* _get_dynamic_symtab_upper_bound */ _bfd_xcoff_get_dynamic_symtab_upper_bound, - _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */ - _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */ - _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */ + _bfd_xcoff_canonicalize_dynamic_symtab, + _bfd_xcoff_get_dynamic_reloc_upper_bound, + _bfd_xcoff_canonicalize_dynamic_reloc, /* Opposite endian version, none exists */ NULL, - /* back end data */ (void *) &bfd_pmac_xcoff_backend_data, }; diff --git a/contrib/binutils/bfd/coff64-rs6000.c b/contrib/binutils/bfd/coff64-rs6000.c index 1e9714f..9372f6b 100644 --- a/contrib/binutils/bfd/coff64-rs6000.c +++ b/contrib/binutils/bfd/coff64-rs6000.c @@ -1,24 +1,24 @@ /* BFD back-end for IBM RS/6000 "XCOFF64" files. - Copyright 2000, 2001 + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Written Clinton Popetz. Contributed by Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -84,6 +84,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static void _bfd_xcoff64_swap_lineno_in PARAMS ((bfd *, PTR, PTR)); static unsigned int _bfd_xcoff64_swap_lineno_out PARAMS ((bfd *, PTR, PTR)); +static boolean _bfd_xcoff64_put_symbol_name + PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *, + const char *)); static boolean _bfd_xcoff64_put_ldsymbol_name PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *)); @@ -93,6 +96,8 @@ static void _bfd_xcoff64_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR)); static unsigned int _bfd_xcoff64_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR)); +static void xcoff64_swap_reloc_in PARAMS ((bfd *, PTR, PTR)); +static unsigned int xcoff64_swap_reloc_out PARAMS ((bfd *, PTR, PTR)); extern boolean _bfd_xcoff_mkobject PARAMS ((bfd *)); extern boolean _bfd_xcoff_copy_private_bfd_data PARAMS ((bfd *, bfd *)); extern boolean _bfd_xcoff_is_local_label_name PARAMS ((bfd *, const char *)); @@ -129,8 +134,8 @@ static void xcoff64_swap_ldrel_out static boolean xcoff64_write_object_contents PARAMS ((bfd *)); static boolean xcoff64_ppc_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, - struct internal_reloc *, struct internal_syment *, - asection **sections)); + struct internal_reloc *, struct internal_syment *, + asection **)); static boolean xcoff64_slurp_armap PARAMS ((bfd *)); static const bfd_target *xcoff64_archive_p PARAMS ((bfd *)); static bfd *xcoff64_openr_next_archived_file PARAMS ((bfd *, bfd *)); @@ -143,11 +148,47 @@ static bfd_vma xcoff64_loader_symbol_offset PARAMS ((bfd *, struct internal_ldhdr *)); static bfd_vma xcoff64_loader_reloc_offset PARAMS ((bfd *, struct internal_ldhdr *)); -static boolean xcoff64_generate_rtinit - PARAMS((bfd *, const char *, const char *)); +static boolean xcoff64_generate_rtinit + PARAMS ((bfd *, const char *, const char *, boolean)); +static boolean xcoff64_bad_format_hook PARAMS ((bfd *, PTR )); + +/* Relocation functions */ +static boolean xcoff64_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)); +boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION]) + PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) = +{ + xcoff_reloc_type_pos, /* R_POS (0x00) */ + xcoff_reloc_type_neg, /* R_NEG (0x01) */ + xcoff_reloc_type_rel, /* R_REL (0x02) */ + xcoff_reloc_type_toc, /* R_TOC (0x03) */ + xcoff_reloc_type_fail, /* R_RTB (0x04) */ + xcoff_reloc_type_toc, /* R_GL (0x05) */ + xcoff_reloc_type_toc, /* R_TCL (0x06) */ + xcoff_reloc_type_fail, /* (0x07) */ + xcoff_reloc_type_ba, /* R_BA (0x08) */ + xcoff_reloc_type_fail, /* (0x09) */ + xcoff64_reloc_type_br, /* R_BR (0x0a) */ + xcoff_reloc_type_fail, /* (0x0b) */ + xcoff_reloc_type_pos, /* R_RL (0x0c) */ + xcoff_reloc_type_pos, /* R_RLA (0x0d) */ + xcoff_reloc_type_fail, /* (0x0e) */ + xcoff_reloc_type_noop, /* R_REF (0x0f) */ + xcoff_reloc_type_fail, /* (0x10) */ + xcoff_reloc_type_fail, /* (0x11) */ + xcoff_reloc_type_toc, /* R_TRL (0x12) */ + xcoff_reloc_type_toc, /* R_TRLA (0x13) */ + xcoff_reloc_type_fail, /* R_RRTBI (0x14) */ + xcoff_reloc_type_fail, /* R_RRTBA (0x15) */ + xcoff_reloc_type_ba, /* R_CAI (0x16) */ + xcoff_reloc_type_crel, /* R_CREL (0x17) */ + xcoff_reloc_type_ba, /* R_RBA (0x18) */ + xcoff_reloc_type_ba, /* R_RBAC (0x19) */ + xcoff64_reloc_type_br, /* R_RBR (0x1a) */ + xcoff_reloc_type_ba, /* R_RBRC (0x1b) */ +}; -/* coffcode.h needs these to be defined */ +/* coffcode.h needs these to be defined. */ /* Internalcoff.h and coffcode.h modify themselves based on these flags. */ #define XCOFF64 #define RS6000COFF_C 1 @@ -171,8 +212,9 @@ static boolean xcoff64_generate_rtinit #define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name #define coff_bfd_reloc_type_lookup xcoff64_reloc_type_lookup #ifdef AIX_CORE -extern const bfd_target * rs6000coff_core_p (); -extern boolean rs6000coff_core_file_matches_executable_p (); +extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd)); +extern boolean rs6000coff_core_file_matches_executable_p + PARAMS((bfd *cbfd, bfd *ebfd)); extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd)); extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd)); #define CORE_FILE_P rs6000coff_core_p @@ -195,7 +237,9 @@ extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd)); #define coff_SWAP_sym_out _bfd_xcoff64_swap_sym_out #define coff_SWAP_aux_in _bfd_xcoff64_swap_aux_in #define coff_SWAP_aux_out _bfd_xcoff64_swap_aux_out - +#define coff_swap_reloc_in xcoff64_swap_reloc_in +#define coff_swap_reloc_out xcoff64_swap_reloc_out +#define NO_COFF_RELOCS #include "coffcode.h" @@ -289,7 +333,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) switch (class) { case C_FILE: - if (ext->x_file.x_n.x_zeroes == 0) + if (ext->x_file.x_n.x_zeroes[0] == 0) { in->x_file.x_n.x_zeroes = 0; in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset); @@ -380,7 +424,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) switch (class) { case C_FILE: - if (ext->x_file.x_n.x_zeroes == 0) + if (in->x_file.x_n.x_zeroes == 0) { H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset); @@ -453,9 +497,12 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) } static boolean -_bfd_xcoff64_put_symbol_name (bfd *abfd, struct bfd_strtab_hash *strtab, - struct internal_syment *sym, - const char *name) { +_bfd_xcoff64_put_symbol_name (abfd, strtab, sym, name) + bfd *abfd; + struct bfd_strtab_hash *strtab; + struct internal_syment *sym; + const char *name; +{ boolean hash; bfd_size_type indx; @@ -482,7 +529,6 @@ _bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name) struct internal_ldsym *ldsym; const char *name; { - size_t len; len = strlen (name); @@ -608,6 +654,40 @@ xcoff64_swap_ldsym_out (abfd, src, d) bfd_put_32 (abfd, src->l_parm, dst->l_parm); } +static void +xcoff64_swap_reloc_in (abfd, s, d) + bfd *abfd; + PTR s; + PTR d; +{ + struct external_reloc *src = (struct external_reloc *) s; + struct internal_reloc *dst = (struct internal_reloc *) d; + + memset (dst, 0, sizeof (struct internal_reloc)); + + dst->r_vaddr = bfd_get_64 (abfd, src->r_vaddr); + dst->r_symndx = bfd_get_32 (abfd, src->r_symndx); + dst->r_size = bfd_get_8 (abfd, src->r_size); + dst->r_type = bfd_get_8 (abfd, src->r_type); +} + +static unsigned int +xcoff64_swap_reloc_out (abfd, s, d) + bfd *abfd; + PTR s; + PTR d; +{ + struct internal_reloc *src = (struct internal_reloc *) s; + struct external_reloc *dst = (struct external_reloc *) d; + + bfd_put_64 (abfd, src->r_vaddr, dst->r_vaddr); + bfd_put_32 (abfd, src->r_symndx, dst->r_symndx); + bfd_put_8 (abfd, src->r_type, dst->r_type); + bfd_put_8 (abfd, src->r_size, dst->r_size); + + return bfd_coff_relsz (abfd); +} + /* Swap in the ldrel structure. */ static void @@ -662,13 +742,13 @@ xcoff64_write_object_contents (abfd) bfd_set_error (bfd_error_system_call); - if (abfd->output_has_begun == false) + if (! abfd->output_has_begun) { if (! bfd_coff_compute_section_file_positions (abfd)) return false; } - /* Work out the size of the reloc and linno areas */ + /* Work out the size of the reloc and linno areas. */ reloc_base = obj_relocbase (abfd); for (current = abfd->sections; current != NULL; current = current->next) @@ -677,12 +757,12 @@ xcoff64_write_object_contents (abfd) lineno_base = reloc_base + reloc_size; /* Make a pass through the symbol table to count line number entries and - put them into the correct asections */ + put them into the correct asections. */ lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd); sym_base = lineno_base + lnno_size; - /* Indicate in each section->line_filepos its actual file address */ + /* Indicate in each section->line_filepos its actual file address. */ for (current = abfd->sections; current != NULL; current = current->next) { if (current->lineno_count) @@ -792,7 +872,7 @@ xcoff64_write_object_contents (abfd) if (abfd->flags & EXEC_P) internal_f.f_flags |= F_EXEC; - /* FIXME: this is wrong for PPC_PE! */ + /* FIXME: this is wrong for PPC_PE! */ if (bfd_little_endian (abfd)) internal_f.f_flags |= F_AR32WR; else @@ -805,19 +885,17 @@ xcoff64_write_object_contents (abfd) memset (&internal_a, 0, sizeof internal_a); - - /* This can only be called from the xcoff64 backend so the magic # - must be for xcoff64. */ - internal_f.f_magic = 0757; - - internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC : - (abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC : - RS6K_AOUTHDR_OMAGIC; + internal_f.f_magic = bfd_xcoff_magic_number (abfd); + internal_a.magic = (abfd->flags & D_PAGED + ? RS6K_AOUTHDR_ZMAGIC + : (abfd->flags & WP_TEXT + ? RS6K_AOUTHDR_NMAGIC + : RS6K_AOUTHDR_OMAGIC)); /* FIXME: Does anybody ever set this to another value? */ internal_a.vstamp = 0; - /* Now should write relocs, strings, syms */ + /* Now should write relocs, strings, syms. */ obj_sym_filepos (abfd) = sym_base; internal_f.f_symptr = 0; @@ -990,11 +1068,88 @@ xcoff64_write_object_contents (abfd) return true; } -/* This is the relocation function for the RS/6000/POWER/PowerPC. - This is currently the only processor which uses XCOFF; I hope that - will never change. */ +static boolean +xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, + val, addend, relocation, contents) + bfd *input_bfd; + asection *input_section; + bfd *output_bfd ATTRIBUTE_UNUSED; + struct internal_reloc *rel; + struct internal_syment *sym ATTRIBUTE_UNUSED; + struct reloc_howto_struct *howto; + bfd_vma val; + bfd_vma addend; + bfd_vma *relocation; + bfd_byte *contents; +{ + struct xcoff_link_hash_entry *h; -static boolean + if (0 > rel->r_symndx) + return false; + + h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; + + /* If we see an R_BR or R_RBR reloc which is jumping to global + linkage code, and it is followed by an appropriate cror nop + instruction, we replace the cror with ld r2,40(r1). This + restores the TOC after the glink code. Contrariwise, if the + call is followed by a ld r2,40(r1), but the call is not + going to global linkage code, we can replace the load with a + cror. */ + if (NULL != h + && bfd_link_hash_defined == h->root.type + && (rel->r_vaddr - input_section->vma + 8 + <= input_section->_cooked_size)) + { + bfd_byte *pnext; + unsigned long next; + + pnext = contents + (rel->r_vaddr - input_section->vma) + 4; + next = bfd_get_32 (input_bfd, pnext); + + /* The _ptrgl function is magic. It is used by the AIX compiler to call + a function through a pointer. */ + if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0) + { + if (next == 0x4def7b82 /* cror 15,15,15 */ + || next == 0x4ffffb82 /* cror 31,31,31 */ + || next == 0x60000000) /* ori r0,r0,0 */ + bfd_put_32 (input_bfd, 0xe8410028, pnext); /* ld r2,40(r1) */ + } + else + { + if (next == 0xe8410028) /* ld r2,40(r1) */ + bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */ + } + } + else if (NULL != h && bfd_link_hash_undefined == h->root.type) + { + /* Normally, this relocation is against a defined symbol. In the + case where this is a partial link and the output section offset + is greater than 2^25, the linker will return an invalid error + message that the relocation has been truncated. Yes it has been + truncated but no it not important. For this case, disable the + overflow checking. */ + howto->complain_on_overflow = complain_overflow_dont; + } + + howto->pc_relative = true; + howto->src_mask &= ~3; + howto->dst_mask = howto->src_mask; + + /* A PC relative reloc includes the section address. */ + addend += input_section->vma; + + *relocation = val + addend; + *relocation -= (input_section->output_section->vma + + input_section->output_offset); + return true; +} + +/* This is the relocation function for the PowerPC64. + See xcoff_ppc_relocation_section for more information. */ + +boolean xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, input_section, contents, relocs, syms, sections) @@ -1020,7 +1175,10 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, bfd_vma addend; bfd_vma val; struct reloc_howto_struct howto; - bfd_reloc_status_type rstat; + bfd_vma relocation; + bfd_vma value_to_relocate; + bfd_vma address; + bfd_byte *location; /* Relocation type R_REF is a special relocation type which is merely used to prevent garbage collection from occurring for @@ -1028,65 +1186,38 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, if (rel->r_type == R_REF) continue; - symndx = rel->r_symndx; - - if (symndx == -1) - { - h = NULL; - sym = NULL; - addend = 0; - } - else - { - h = obj_xcoff_sym_hashes (input_bfd)[symndx]; - sym = syms + symndx; - addend = - sym->n_value; - } - - /* We build the howto information on the fly. */ - + /* howto */ howto.type = rel->r_type; howto.rightshift = 0; - howto.size = 4; howto.bitsize = (rel->r_size & 0x3f) + 1; + howto.size = howto.bitsize > 16 ? (howto.bitsize > 32 ? 4 : 2) : 1; howto.pc_relative = false; howto.bitpos = 0; - if ((rel->r_size & 0x80) != 0) - howto.complain_on_overflow = complain_overflow_signed; - else - howto.complain_on_overflow = complain_overflow_bitfield; + howto.complain_on_overflow = (rel->r_size & 0x80 + ? complain_overflow_signed + : complain_overflow_bitfield); howto.special_function = NULL; howto.name = "internal"; howto.partial_inplace = true; - - if (howto.bitsize == 64) - { - howto.src_mask = howto.dst_mask = MINUS_ONE; - } - else if (howto.bitsize == 32) - { - howto.src_mask = howto.dst_mask = 0xffffffff; - } - else - { - howto.src_mask = howto.dst_mask = (1 << howto.bitsize) - 1; - if (howto.bitsize == 16) - howto.size = 1; - } + howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize); howto.pcrel_offset = false; + /* symbol */ val = 0; + addend = 0; + h = NULL; + sym = NULL; + symndx = rel->r_symndx; - if (h == NULL) + if (-1 != symndx) { asection *sec; - - if (symndx == -1) - { - sec = bfd_abs_section_ptr; - val = 0; - } - else + + h = obj_xcoff_sym_hashes (input_bfd)[symndx]; + sym = syms + symndx; + addend = - sym->n_value; + + if (NULL == h) { sec = sections[symndx]; /* Hack to make sure we use the right TOC anchor value @@ -1099,270 +1230,116 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, + sec->output_offset + sym->n_value - sec->vma); - } - - } - else - { - - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - asection *sec; - - sec = h->root.u.def.section; - val = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - - } - else if (h->root.type == bfd_link_hash_common) - { - asection *sec; - - sec = h->root.u.c.p->section; - val = (sec->output_section->vma - + sec->output_offset); - } - else if ((h->flags & XCOFF_DEF_DYNAMIC) != 0 - || (h->flags & XCOFF_IMPORT) != 0) + } + else { - /* Every symbol in a shared object is defined somewhere. */ - val = 0; - } - else if (! info->relocateable) - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, true))) - return false; - - /* Don't try to process the reloc. It can't help, and - it may generate another error. */ - continue; - } - } - - /* I took the relocation type definitions from two documents: - the PowerPC AIX Version 4 Application Binary Interface, First - Edition (April 1992), and the PowerOpen ABI, Big-Endian - 32-Bit Hardware Implementation (June 30, 1994). Differences - between the documents are noted below. */ - - switch (rel->r_type) - { - case R_RTB: - case R_RRTBI: - case R_RRTBA: - /* These relocs are defined by the PowerPC ABI to be - relative branches which use half of the difference - between the symbol and the program counter. I can't - quite figure out when this is useful. These relocs are - not defined by the PowerOpen ABI. */ - default: - (*_bfd_error_handler) - (_("%s: unsupported relocation type 0x%02x"), - bfd_archive_filename (input_bfd), (unsigned int) rel->r_type); - bfd_set_error (bfd_error_bad_value); - return false; - case R_POS: - /* Simple positive relocation. */ - break; - case R_NEG: - /* Simple negative relocation. */ - val = - val; - break; - case R_REL: - /* Simple PC relative relocation. */ - howto.pc_relative = true; - break; - case R_TOC: - /* TOC relative relocation. The value in the instruction in - the input file is the offset from the input file TOC to - the desired location. We want the offset from the final - TOC to the desired location. We have: - isym = iTOC + in - iinsn = in + o - osym = oTOC + on - oinsn = on + o - so we must change insn by on - in. - */ - case R_GL: - /* Global linkage relocation. The value of this relocation - is the address of the entry in the TOC section. */ - case R_TCL: - /* Local object TOC address. I can't figure out the - difference between this and case R_GL. */ - case R_TRL: - /* TOC relative relocation. A TOC relative load instruction - which may be changed to a load address instruction. - FIXME: We don't currently implement this optimization. */ - case R_TRLA: - /* TOC relative relocation. This is a TOC relative load - address instruction which may be changed to a load - instruction. FIXME: I don't know if this is the correct - implementation. */ - if (h != NULL && h->smclas != XMC_TD) - { - if (h->toc_section == NULL) + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + val = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_common) { - (*_bfd_error_handler) - (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"), - bfd_archive_filename (input_bfd), rel->r_vaddr, - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return false; + sec = h->root.u.c.p->section; + val = (sec->output_section->vma + + sec->output_offset); + } + else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) + && ! info->relocateable) + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, input_section, + rel->r_vaddr - input_section->vma, true))) + return false; + + /* Don't try to process the reloc. It can't help, and + it may generate another error. */ + continue; } - - BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0); - val = (h->toc_section->output_section->vma - + h->toc_section->output_offset); } - - val = ((val - xcoff_data (output_bfd)->toc) - - (sym->n_value - xcoff_data (input_bfd)->toc)); - - addend = 0; - break; - case R_BA: - /* Absolute branch. We don't want to mess with the lower - two bits of the instruction. */ - case R_CAI: - /* The PowerPC ABI defines this as an absolute call which - may be modified to become a relative call. The PowerOpen - ABI does not define this relocation type. */ - case R_RBA: - /* Absolute branch which may be modified to become a - relative branch. */ - case R_RBAC: - /* The PowerPC ABI defines this as an absolute branch to a - fixed address which may be modified to an absolute branch - to a symbol. The PowerOpen ABI does not define this - relocation type. */ - case R_RBRC: - /* The PowerPC ABI defines this as an absolute branch to a - fixed address which may be modified to a relative branch. - The PowerOpen ABI does not define this relocation type. */ - howto.src_mask &= ~3; - howto.dst_mask = howto.src_mask; - break; - case R_BR: - /* Relative branch. We don't want to mess with the lower - two bits of the instruction. */ - case R_CREL: - /* The PowerPC ABI defines this as a relative call which may - be modified to become an absolute call. The PowerOpen - ABI does not define this relocation type. */ - case R_RBR: - /* A relative branch which may be modified to become an - absolute branch. FIXME: We don't implement this, - although we should for symbols of storage mapping class - XMC_XO. */ - howto.pc_relative = true; - howto.src_mask &= ~3; - howto.dst_mask = howto.src_mask; - howto.size = 2; - howto.complain_on_overflow = complain_overflow_bitfield; - break; - case R_RL: - /* The PowerPC AIX ABI describes this as a load which may be - changed to a load address. The PowerOpen ABI says this - is the same as case R_POS. */ - break; - case R_RLA: - /* The PowerPC AIX ABI describes this as a load address - which may be changed to a load. The PowerOpen ABI says - this is the same as R_POS. */ - break; } - - /* If we see an R_BR or R_RBR reloc which is jumping to global - linkage code, and it is followed by an appropriate cror nop - instruction, we replace the cror with ld r2,40(r1). This - restores the TOC after the glink code. Contrariwise, if the - call is followed by a ld r2,40(r1), but the call is not - going to global linkage code, we can replace the load with a - cror. */ - if ((rel->r_type == R_BR || rel->r_type == R_RBR) - && h != NULL - && h->root.type == bfd_link_hash_defined - && (rel->r_vaddr - input_section->vma + 8 - <= input_section->_cooked_size)) + + if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION + || ((*xcoff64_calculate_relocation[rel->r_type]) + (input_bfd, input_section, output_bfd, rel, sym, &howto, val, + addend, &relocation, contents))) + return false; + + /* address */ + address = rel->r_vaddr - input_section->vma; + location = contents + address; + + if (address > input_section->_raw_size) + abort(); + + /* Get the value we are going to relocate. */ + if (1 == howto.size) + value_to_relocate = bfd_get_16 (input_bfd, location); + else if (2 == howto.size) + value_to_relocate = bfd_get_32 (input_bfd, location); + else + value_to_relocate = bfd_get_64 (input_bfd, location); + + /* overflow. + + FIXME: We may drop bits during the addition + which we don't check for. We must either check at every single + operation, which would be tedious, or we must do the computations + in a type larger than bfd_vma, which would be inefficient. */ + + if ((unsigned int) howto.complain_on_overflow + >= XCOFF_MAX_COMPLAIN_OVERFLOW) + abort(); + + if (((*xcoff_complain_overflow[howto.complain_on_overflow]) + (input_bfd, value_to_relocate, relocation, &howto))) { - bfd_byte *pnext; - unsigned long next; - - pnext = contents + (rel->r_vaddr - input_section->vma) + 4; - next = bfd_get_32 (input_bfd, pnext); - - - /* The _ptrgl function is magic. It is used by the AIX - * compiler to call a function through a pointer. - * - * special case XMC_GL, global linkage - */ - if (h->smclas == XMC_GL - || strcmp (h->root.root.string, "._ptrgl") == 0) + const char *name; + char buf[SYMNMLEN + 1]; + char reloc_type_name[10]; + + if (symndx == -1) { - if (next == 0x4def7b82 /* cror 15,15,15 */ - || next == 0x4ffffb82 /* cror 31,31,31 */ - || next == 0x60000000 /* ori r0,r0,0 */) - bfd_put_32 (input_bfd, (bfd_vma) 0xe8410028 /* ld r2,40(r1) */, - pnext); - } - else + name = "*ABS*"; + } + else if (h != NULL) { - if (next == 0xe8410028 /* ld r2,40(r1) */) - bfd_put_32 (input_bfd, (bfd_vma) 0x60000000 /* ori r0,r0,0 */, - pnext); + name = h->root.root.string; + } + else + { + name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); + if (name == NULL) + name = "UNKNOWN"; } + sprintf (reloc_type_name, "0x%02x", rel->r_type); + + if (! ((*info->callbacks->reloc_overflow) + (info, name, reloc_type_name, (bfd_vma) 0, input_bfd, + input_section, rel->r_vaddr - input_section->vma))) + return false; } - /* A PC relative reloc includes the section address. */ - if (howto.pc_relative) - addend += input_section->vma; - - rstat = _bfd_final_link_relocate (&howto, input_bfd, input_section, - contents, - rel->r_vaddr - input_section->vma, - val, addend); - - switch (rstat) - { - default: - abort (); - case bfd_reloc_ok: - break; - case bfd_reloc_overflow: - { - const char *name; - char buf[SYMNMLEN + 1]; - char howto_name[10]; - - if (symndx == -1) - name = "*ABS*"; - else if (h != NULL) - name = h->root.root.string; - else - { - name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); - if (name == NULL) - return false; - } - sprintf (howto_name, "0x%02x", rel->r_type); - - if (! ((*info->callbacks->reloc_overflow) - (info, name, howto_name, (bfd_vma) 0, input_bfd, - input_section, rel->r_vaddr - input_section->vma))) - return false; - } - } + /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */ + value_to_relocate = ((value_to_relocate & ~howto.dst_mask) + | (((value_to_relocate & howto.src_mask) + + relocation) & howto.dst_mask)); + + /* Put the value back in the object file. */ + if (1 == howto.size) + bfd_put_16 (input_bfd, value_to_relocate, location); + else if (2 == howto.size) + bfd_put_32 (input_bfd, value_to_relocate, location); + else + bfd_put_64 (input_bfd, value_to_relocate, location); + } - return true; } - /* The XCOFF reloc table. Actually, XCOFF relocations specify the bitsize and whether they are signed or not, along with a @@ -1370,11 +1347,10 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, different algorithms for putting in the reloc. Many of these relocs need special_function entries, which I have not written. */ - reloc_howto_type xcoff64_howto_table[] = { /* Standard 64 bit relocation. */ - HOWTO (0, /* type */ + HOWTO (R_POS, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ @@ -1382,14 +1358,14 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ - "R_POS", /* name */ + "R_POS_64", /* name */ true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ false), /* pcrel_offset */ /* 64 bit relocation, but store negative value. */ - HOWTO (1, /* type */ + HOWTO (R_NEG, /* type */ 0, /* rightshift */ -4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ @@ -1404,7 +1380,7 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* 32 bit PC relative relocation. */ - HOWTO (2, /* type */ + HOWTO (R_REL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -1419,7 +1395,7 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* 16 bit TOC relative relocation. */ - HOWTO (3, /* type */ + HOWTO (R_TOC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ @@ -1433,8 +1409,8 @@ reloc_howto_type xcoff64_howto_table[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* I don't really know what this is. */ - HOWTO (4, /* type */ + /* I don't really know what this is. */ + HOWTO (R_RTB, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -1449,9 +1425,9 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* External TOC relative symbol. */ - HOWTO (5, /* type */ + HOWTO (R_GL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1464,9 +1440,9 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Local TOC relative symbol. */ - HOWTO (6, /* type */ + HOWTO (R_TCL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1481,7 +1457,7 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (7), /* Non modifiable absolute branch. */ - HOWTO (8, /* type */ + HOWTO (R_BA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -1489,7 +1465,7 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ - "R_BA", /* name */ + "R_BA_26", /* name */ true, /* partial_inplace */ 0x3fffffc, /* src_mask */ 0x3fffffc, /* dst_mask */ @@ -1498,7 +1474,7 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (9), /* Non modifiable relative branch. */ - HOWTO (0xa, /* type */ + HOWTO (R_BR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -1515,9 +1491,9 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (0xb), /* Indirect load. */ - HOWTO (0xc, /* type */ + HOWTO (R_RL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1530,9 +1506,9 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Load address. */ - HOWTO (0xd, /* type */ + HOWTO (R_RLA, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1546,14 +1522,14 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (0xe), - /* Non-relocating reference. */ - HOWTO (0xf, /* type */ + /* Non-relocating reference. */ + HOWTO (R_REF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_REF", /* name */ false, /* partial_inplace */ @@ -1565,9 +1541,9 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (0x11), /* TOC relative indirect load. */ - HOWTO (0x12, /* type */ + HOWTO (R_TRL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1580,9 +1556,9 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* TOC relative load address. */ - HOWTO (0x13, /* type */ + HOWTO (R_TRLA, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1595,7 +1571,7 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Modifiable relative branch. */ - HOWTO (0x14, /* type */ + HOWTO (R_RRTBI, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -1610,7 +1586,7 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Modifiable absolute branch. */ - HOWTO (0x15, /* type */ + HOWTO (R_RRTBA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -1625,9 +1601,9 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Modifiable call absolute indirect. */ - HOWTO (0x16, /* type */ + HOWTO (R_CAI, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1639,10 +1615,10 @@ reloc_howto_type xcoff64_howto_table[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* Modifiable call relative. */ - HOWTO (0x17, /* type */ + /* Modifiable call relative. */ + HOWTO (R_CREL, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1655,7 +1631,7 @@ reloc_howto_type xcoff64_howto_table[] = false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x18, /* type */ + HOWTO (R_RBA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -1665,12 +1641,12 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* special_function */ "R_RBA", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0x03fffffc, /* src_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x19, /* type */ + HOWTO (R_RBAC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ @@ -1680,12 +1656,12 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* special_function */ "R_RBAC", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch relative. */ - HOWTO (0x1a, /* type */ + HOWTO (R_RBR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ @@ -1693,16 +1669,16 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ - "R_RBR", /* name */ + "R_RBR_26", /* name */ true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + 0x03fffffc, /* src_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ /* Modifiable branch absolute. */ - HOWTO (0x1b, /* type */ + HOWTO (R_RBRC, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ @@ -1714,19 +1690,65 @@ reloc_howto_type xcoff64_howto_table[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - HOWTO (0, /* type */ + HOWTO (R_POS, /* type */ 0, /* rightshift */ - 4, /* size (0 = byte, 1 = short, 2 = long) */ - 64, /* bitsize */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ - "R_POS", /* name */ + "R_POS_32", /* name */ true, /* partial_inplace */ - MINUS_ONE, /* src_mask */ - MINUS_ONE, /* dst_mask */ - false) /* pcrel_offset */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 16 bit Non modifiable absolute branch. */ + HOWTO (R_BA, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "R_BA_16", /* name */ + true, /* partial_inplace */ + 0xfffc, /* src_mask */ + 0xfffc, /* dst_mask */ + false), /* pcrel_offset */ + + /* Modifiable branch relative. */ + HOWTO (R_RBR, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "R_RBR_16", /* name */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* Modifiable branch absolute. */ + HOWTO (R_RBA, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "R_RBA_16", /* name */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + }; void @@ -1734,15 +1756,29 @@ xcoff64_rtype2howto (relent, internal) arelent *relent; struct internal_reloc *internal; { - relent->howto = xcoff64_howto_table + internal->r_type; - - /* Check for relocs we don't know of. */ - if (internal->r_type - >= sizeof (xcoff64_howto_table) / sizeof (xcoff64_howto_table[0])) - abort (); - if (internal->r_type != relent->howto->type) + if (internal->r_type > R_RBRC) abort (); + /* Default howto layout works most of the time */ + relent->howto = &xcoff64_howto_table[internal->r_type]; + + /* Special case some 16 bit reoloc */ + if (15 == (internal->r_size & 0x3f)) + { + if (R_BA == internal->r_type) + relent->howto = &xcoff64_howto_table[0x1d]; + else if (R_RBR == internal->r_type) + relent->howto = &xcoff64_howto_table[0x1e]; + else if (R_RBA == internal->r_type) + relent->howto = &xcoff64_howto_table[0x1f]; + } + /* Special case 32 bit */ + else if (31 == (internal->r_size & 0x3f)) + { + if (R_POS == internal->r_type) + relent->howto = &xcoff64_howto_table[0x1c]; + } + /* The r_size field of an XCOFF reloc encodes the bitsize of the relocation, as well as indicating whether it is signed or not. Doublecheck that the relocation information gathered from the @@ -1752,12 +1788,6 @@ xcoff64_rtype2howto (relent, internal) && (relent->howto->bitsize != ((unsigned int) internal->r_size & 0x3f) + 1)) abort (); -#if 0 - if ((internal->r_size & 0x80) != 0 - ? (relent->howto->complain_on_overflow != complain_overflow_signed) - : (relent->howto->complain_on_overflow != complain_overflow_bitfield)) - abort (); -#endif } reloc_howto_type * @@ -1769,22 +1799,22 @@ xcoff64_reloc_type_lookup (abfd, code) { case BFD_RELOC_PPC_B26: return &xcoff64_howto_table[0xa]; + case BFD_RELOC_PPC_BA16: + return &xcoff64_howto_table[0x1d]; case BFD_RELOC_PPC_BA26: return &xcoff64_howto_table[8]; case BFD_RELOC_PPC_TOC16: return &xcoff64_howto_table[3]; case BFD_RELOC_32: case BFD_RELOC_CTOR: - return &xcoff64_howto_table[0]; - case BFD_RELOC_64: return &xcoff64_howto_table[0x1c]; + case BFD_RELOC_64: + return &xcoff64_howto_table[0]; default: return NULL; } } - - /* Read in the armap of an XCOFF archive. */ static boolean @@ -1809,7 +1839,8 @@ xcoff64_slurp_armap (abfd) return true; } - off = strtol (xcoff_ardata_big (abfd)->symoff64, (char **) NULL, 10); + off = bfd_scan_vma (xcoff_ardata_big (abfd)->symoff64, + (const char **) NULL, 10); if (off == 0) { bfd_has_map (abfd) = false; @@ -1830,10 +1861,7 @@ xcoff64_slurp_armap (abfd) if (bfd_seek (abfd, pos, SEEK_CUR) != 0) return false; - /* XXX This actually has to be a call to strtoll (at least on 32-bit - machines) since the field width is 20 and there numbers with more - than 32 bits can be represented. */ - sz = strtol (hdr.size, (char **) NULL, 10); + sz = bfd_scan_vma (hdr.size, (const char **) NULL, 10); /* Read in the entire symbol table. */ contents = (bfd_byte *) bfd_alloc (abfd, sz); @@ -1889,6 +1917,7 @@ static const bfd_target * xcoff64_archive_p (abfd) bfd *abfd; { + struct artdata *tdata_hold; char magic[SXCOFFARMAG]; /* This is the new format. */ struct xcoff_ar_file_hdr_big hdr; @@ -1907,50 +1936,46 @@ xcoff64_archive_p (abfd) return NULL; } - /* We are setting bfd_ardata(abfd) here, but since bfd_ardata - involves a cast, we can't do it as the left operand of - assignment. */ - amt = sizeof (struct artdata); - abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); - - if (bfd_ardata (abfd) == (struct artdata *) NULL) - return NULL; - - bfd_ardata (abfd)->cache = NULL; - bfd_ardata (abfd)->archive_head = NULL; - bfd_ardata (abfd)->symdefs = NULL; - bfd_ardata (abfd)->extended_names = NULL; - /* Copy over the magic string. */ memcpy (hdr.magic, magic, SXCOFFARMAG); /* Now read the rest of the file header. */ - if (bfd_bread ((PTR) &hdr.memoff, - (bfd_size_type) (SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG), - abfd) != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG) + amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG; + if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); return NULL; } - /* XXX This actually has to be a call to strtoll (at least on 32-bit - machines) since the field width is 20 and there numbers with more - than 32 bits can be represented. */ - bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff, - (char **) NULL, 10); + tdata_hold = bfd_ardata (abfd); + + amt = sizeof (struct artdata); + bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt); + if (bfd_ardata (abfd) == (struct artdata *) NULL) + goto error_ret_restore; + + bfd_ardata (abfd)->cache = NULL; + bfd_ardata (abfd)->archive_head = NULL; + bfd_ardata (abfd)->symdefs = NULL; + bfd_ardata (abfd)->extended_names = NULL; + bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff, + (const char **) NULL, + 10); amt = SIZEOF_AR_FILE_HDR_BIG; bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) - return NULL; + goto error_ret; memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG); if (! xcoff64_slurp_armap (abfd)) { + error_ret: bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = (struct artdata *) NULL; + error_ret_restore: + bfd_ardata (abfd) = tdata_hold; return NULL; } @@ -1980,20 +2005,15 @@ xcoff64_openr_next_archived_file (archive, last_file) } else { - /* XXX These actually have to be a calls to strtoll (at least - on 32-bit machines) since the fields's width is 20 and - there numbers with more than 32 bits can be represented. */ - filestart = strtol (arch_xhdr_big (last_file)->nextoff, (char **) NULL, - 10); + filestart = bfd_scan_vma (arch_xhdr_big (last_file)->nextoff, + (const char **) NULL, 10); } - /* XXX These actually have to be calls to strtoll (at least on 32-bit - machines) since the fields's width is 20 and there numbers with more - than 32 bits can be represented. */ + if (filestart == 0 - || filestart == strtol (xcoff_ardata_big (archive)->memoff, - (char **) NULL, 10) - || filestart == strtol (xcoff_ardata_big (archive)->symoff, - (char **) NULL, 10)) + || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->memoff, + (const char **) NULL, 10) + || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->symoff, + (const char **) NULL, 10)) { bfd_set_error (bfd_error_no_more_archived_files); return NULL; @@ -2097,16 +2117,34 @@ xcoff64_loader_reloc_offset (abfd, ldhdr) return (ldhdr->l_rldoff); } -static boolean -xcoff64_generate_rtinit (abfd, init, fini) +static boolean +xcoff64_bad_format_hook (abfd, filehdr) + bfd * abfd; + PTR filehdr; +{ + struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; + + /* Check flavor first. */ + if (bfd_get_flavour (abfd) != bfd_target_xcoff_flavour) + return false; + + if (bfd_xcoff_magic_number (abfd) != internal_f->f_magic) + return false; + + return true; +} + +static boolean +xcoff64_generate_rtinit (abfd, init, fini, rtld) bfd *abfd; const char *init; const char *fini; + boolean rtld; { bfd_byte filehdr_ext[FILHSZ]; - bfd_byte scnhdr_ext[SCNHSZ]; - bfd_byte syment_ext[SYMESZ * 8]; - bfd_byte reloc_ext[RELSZ * 2]; + bfd_byte scnhdr_ext[SCNHSZ * 3]; + bfd_byte syment_ext[SYMESZ * 10]; + bfd_byte reloc_ext[RELSZ * 3]; bfd_byte *data_buffer; bfd_size_type data_buffer_size; bfd_byte *string_table, *st_tmp; @@ -2114,52 +2152,84 @@ xcoff64_generate_rtinit (abfd, init, fini) bfd_vma val; size_t initsz, finisz; struct internal_filehdr filehdr; - struct internal_scnhdr scnhdr; + struct internal_scnhdr text_scnhdr; + struct internal_scnhdr data_scnhdr; + struct internal_scnhdr bss_scnhdr; struct internal_syment syment; union internal_auxent auxent; struct internal_reloc reloc; - + + char *text_name = ".text"; char *data_name = ".data"; + char *bss_name = ".bss"; char *rtinit_name = "__rtinit"; - - if (! bfd_xcoff_rtinit_size (abfd) - || (init == NULL && fini == NULL)) + char *rtld_name = "__rtld"; + + if (! bfd_xcoff_rtinit_size (abfd)) return false; initsz = (init == NULL ? 0 : 1 + strlen (init)); finisz = (fini == NULL ? 0 : 1 + strlen (fini)); - /* file header */ + /* File header. */ memset (filehdr_ext, 0, FILHSZ); memset (&filehdr, 0, sizeof (struct internal_filehdr)); filehdr.f_magic = bfd_xcoff_magic_number (abfd); - filehdr.f_nscns = 1; + filehdr.f_nscns = 3; filehdr.f_timdat = 0; filehdr.f_nsyms = 0; /* at least 6, no more than 8 */ filehdr.f_symptr = 0; /* set below */ filehdr.f_opthdr = 0; filehdr.f_flags = 0; - /* section header */ - memset (scnhdr_ext, 0, SCNHSZ); - memset (&scnhdr, 0, sizeof (struct internal_scnhdr)); - memcpy (scnhdr.s_name, data_name, strlen (data_name)); - scnhdr.s_paddr = 0; - scnhdr.s_vaddr = 0; - scnhdr.s_size = 0; /* set below */ - scnhdr.s_scnptr = FILHSZ + SCNHSZ; - scnhdr.s_relptr = 0; /* set below */ - scnhdr.s_lnnoptr = 0; - scnhdr.s_nreloc = 0; /* either 1 or 2 */ - scnhdr.s_nlnno = 0; - scnhdr.s_flags = STYP_DATA; - - /* .data + /* Section headers. */ + memset (scnhdr_ext, 0, 3 * SCNHSZ); + + /* Text. */ + memset (&text_scnhdr, 0, sizeof (struct internal_scnhdr)); + memcpy (text_scnhdr.s_name, text_name, strlen (text_name)); + text_scnhdr.s_paddr = 0; + text_scnhdr.s_vaddr = 0; + text_scnhdr.s_size = 0; + text_scnhdr.s_scnptr = 0; + text_scnhdr.s_relptr = 0; + text_scnhdr.s_lnnoptr = 0; + text_scnhdr.s_nreloc = 0; + text_scnhdr.s_nlnno = 0; + text_scnhdr.s_flags = STYP_TEXT; + + /* Data. */ + memset (&data_scnhdr, 0, sizeof (struct internal_scnhdr)); + memcpy (data_scnhdr.s_name, data_name, strlen (data_name)); + data_scnhdr.s_paddr = 0; + data_scnhdr.s_vaddr = 0; + data_scnhdr.s_size = 0; /* set below */ + data_scnhdr.s_scnptr = FILHSZ + 3 * SCNHSZ; + data_scnhdr.s_relptr = 0; /* set below */ + data_scnhdr.s_lnnoptr = 0; + data_scnhdr.s_nreloc = 0; /* either 1 or 2 */ + data_scnhdr.s_nlnno = 0; + data_scnhdr.s_flags = STYP_DATA; + + /* Bss. */ + memset (&bss_scnhdr, 0, sizeof (struct internal_scnhdr)); + memcpy (bss_scnhdr.s_name, bss_name, strlen (bss_name)); + bss_scnhdr.s_paddr = 0; /* set below */ + bss_scnhdr.s_vaddr = 0; /* set below */ + bss_scnhdr.s_size = 0; /* set below */ + bss_scnhdr.s_scnptr = 0; + bss_scnhdr.s_relptr = 0; + bss_scnhdr.s_lnnoptr = 0; + bss_scnhdr.s_nreloc = 0; + bss_scnhdr.s_nlnno = 0; + bss_scnhdr.s_flags = STYP_BSS; + + /* .data 0x0000 0x00000000 : rtl 0x0004 0x00000000 : 0x0008 0x00000018 : offset to init, or 0 0x000C 0x00000038 : offset to fini, or 0 - 0x0010 0x00000010 : size of descriptor + 0x0010 0x00000010 : size of descriptor 0x0014 0x00000000 : pad 0x0018 0x00000000 : init, needs a reloc 0x001C 0x00000000 : @@ -2167,29 +2237,27 @@ xcoff64_generate_rtinit (abfd, init, fini) 0x0024 0x00000000 : flags, padded to a word 0x0028 0x00000000 : empty init 0x002C 0x00000000 : - 0x0030 0x00000000 : - 0x0034 0x00000000 : + 0x0030 0x00000000 : + 0x0034 0x00000000 : 0x0038 0x00000000 : fini, needs a reloc 0x003C 0x00000000 : 0x0040 0x00000??? : offset to fini name 0x0044 0x00000000 : flags, padded to a word 0x0048 0x00000000 : empty fini 0x004C 0x00000000 : - 0x0050 0x00000000 : - 0x0054 0x00000000 : + 0x0050 0x00000000 : + 0x0054 0x00000000 : 0x0058 init name 0x0058 + initsz fini name */ data_buffer_size = 0x0058 + initsz + finisz; data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0; data_buffer = NULL; - data_buffer = (bfd_byte *)bfd_malloc (data_buffer_size); + data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size); if (data_buffer == NULL) return false; - - memset (data_buffer, 0, data_buffer_size); - if (initsz) + if (initsz) { val = 0x18; bfd_put_32 (abfd, val, &data_buffer[0x08]); @@ -2198,7 +2266,7 @@ xcoff64_generate_rtinit (abfd, init, fini) memcpy (&data_buffer[val], init, initsz); } - if (finisz) + if (finisz) { val = 0x38; bfd_put_32 (abfd, val, &data_buffer[0x0C]); @@ -2209,28 +2277,34 @@ xcoff64_generate_rtinit (abfd, init, fini) val = 0x10; bfd_put_32 (abfd, val, &data_buffer[0x10]); - scnhdr.s_size = data_buffer_size; + data_scnhdr.s_size = data_buffer_size; + bss_scnhdr.s_paddr = bss_scnhdr.s_vaddr = data_scnhdr.s_size; - /* string table */ + /* String table. */ string_table_size = 4; string_table_size += strlen (data_name) + 1; string_table_size += strlen (rtinit_name) + 1; string_table_size += initsz; string_table_size += finisz; + if (rtld) + string_table_size += strlen (rtld_name) + 1; + + string_table = (bfd_byte *) bfd_zmalloc (string_table_size); + if (string_table == NULL) + return false; - string_table = (bfd_byte *)bfd_malloc (string_table_size); - memset (string_table, 0, string_table_size); val = string_table_size; bfd_put_32 (abfd, val, &string_table[0]); st_tmp = string_table + 4; - - /* symbols + + /* symbols 0. .data csect 2. __rtinit - 4. init function - 6. fini function */ - memset (syment_ext, 0, 8 * SYMESZ); - memset (reloc_ext, 0, 2 * RELSZ); + 4. init function + 6. fini function + 8. __rtld */ + memset (syment_ext, 0, 10 * SYMESZ); + memset (reloc_ext, 0, 3 * RELSZ); /* .data csect */ memset (&syment, 0, sizeof (struct internal_syment)); @@ -2240,16 +2314,16 @@ xcoff64_generate_rtinit (abfd, init, fini) memcpy (st_tmp, data_name, strlen (data_name)); st_tmp += strlen (data_name) + 1; - syment.n_scnum = 1; + syment.n_scnum = 2; syment.n_sclass = C_HIDEXT; syment.n_numaux = 1; auxent.x_csect.x_scnlen.l = data_buffer_size; auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD; auxent.x_csect.x_smclas = XMC_RW; - bfd_coff_swap_sym_out (abfd, &syment, + bfd_coff_swap_sym_out (abfd, &syment, &syment_ext[filehdr.f_nsyms * SYMESZ]); - bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, - syment.n_numaux, + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); filehdr.f_nsyms += 2; @@ -2259,21 +2333,21 @@ xcoff64_generate_rtinit (abfd, init, fini) syment._n._n_n._n_offset = st_tmp - string_table; memcpy (st_tmp, rtinit_name, strlen (rtinit_name)); st_tmp += strlen (rtinit_name) + 1; - - syment.n_scnum = 1; + + syment.n_scnum = 2; syment.n_sclass = C_EXT; syment.n_numaux = 1; auxent.x_csect.x_smtyp = XTY_LD; auxent.x_csect.x_smclas = XMC_RW; - bfd_coff_swap_sym_out (abfd, &syment, + bfd_coff_swap_sym_out (abfd, &syment, &syment_ext[filehdr.f_nsyms * SYMESZ]); - bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, - syment.n_numaux, + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); filehdr.f_nsyms += 2; - /* init */ - if (initsz) + /* Init. */ + if (initsz) { memset (&syment, 0, sizeof (struct internal_syment)); memset (&auxent, 0, sizeof (union internal_auxent)); @@ -2284,12 +2358,12 @@ xcoff64_generate_rtinit (abfd, init, fini) syment.n_sclass = C_EXT; syment.n_numaux = 1; - bfd_coff_swap_sym_out (abfd, &syment, + bfd_coff_swap_sym_out (abfd, &syment, &syment_ext[filehdr.f_nsyms * SYMESZ]); - bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, - syment.n_numaux, + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); - /* reloc */ + /* Reloc. */ memset (&reloc, 0, sizeof (struct internal_reloc)); reloc.r_vaddr = 0x0018; reloc.r_symndx = filehdr.f_nsyms; @@ -2298,11 +2372,11 @@ xcoff64_generate_rtinit (abfd, init, fini) bfd_coff_swap_reloc_out (abfd, &reloc, &reloc_ext[0]); filehdr.f_nsyms += 2; - scnhdr.s_nreloc += 1; + data_scnhdr.s_nreloc += 1; } - /* finit */ - if (finisz) + /* Finit. */ + if (finisz) { memset (&syment, 0, sizeof (struct internal_syment)); memset (&auxent, 0, sizeof (union internal_auxent)); @@ -2313,34 +2387,68 @@ xcoff64_generate_rtinit (abfd, init, fini) syment.n_sclass = C_EXT; syment.n_numaux = 1; - bfd_coff_swap_sym_out (abfd, &syment, + bfd_coff_swap_sym_out (abfd, &syment, &syment_ext[filehdr.f_nsyms * SYMESZ]); - bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, - syment.n_numaux, + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); - /* reloc */ + /* Reloc. */ memset (&reloc, 0, sizeof (struct internal_reloc)); reloc.r_vaddr = 0x0038; reloc.r_symndx = filehdr.f_nsyms; reloc.r_type = R_POS; reloc.r_size = 63; - bfd_coff_swap_reloc_out (abfd, &reloc, - &reloc_ext[scnhdr.s_nreloc * RELSZ]); + bfd_coff_swap_reloc_out (abfd, &reloc, + &reloc_ext[data_scnhdr.s_nreloc * RELSZ]); + + filehdr.f_nsyms += 2; + data_scnhdr.s_nreloc += 1; + } + + if (rtld) + { + memset (&syment, 0, sizeof (struct internal_syment)); + memset (&auxent, 0, sizeof (union internal_auxent)); + + syment._n._n_n._n_offset = st_tmp - string_table; + memcpy (st_tmp, rtld_name, strlen (rtld_name)); + st_tmp += strlen (rtld_name) + 1; + + syment.n_sclass = C_EXT; + syment.n_numaux = 1; + bfd_coff_swap_sym_out (abfd, &syment, + &syment_ext[filehdr.f_nsyms * SYMESZ]); + bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, + syment.n_numaux, + &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]); + + /* Reloc. */ + memset (&reloc, 0, sizeof (struct internal_reloc)); + reloc.r_vaddr = 0x0000; + reloc.r_symndx = filehdr.f_nsyms; + reloc.r_type = R_POS; + reloc.r_size = 63; + bfd_coff_swap_reloc_out (abfd, &reloc, + &reloc_ext[data_scnhdr.s_nreloc * RELSZ]); filehdr.f_nsyms += 2; - scnhdr.s_nreloc += 1; + data_scnhdr.s_nreloc += 1; + + bss_scnhdr.s_size = 0; } - scnhdr.s_relptr = scnhdr.s_scnptr + data_buffer_size; - filehdr.f_symptr = scnhdr.s_relptr + scnhdr.s_nreloc * RELSZ; + data_scnhdr.s_relptr = data_scnhdr.s_scnptr + data_buffer_size; + filehdr.f_symptr = data_scnhdr.s_relptr + data_scnhdr.s_nreloc * RELSZ; bfd_coff_swap_filehdr_out (abfd, &filehdr, filehdr_ext); bfd_bwrite (filehdr_ext, FILHSZ, abfd); - bfd_coff_swap_scnhdr_out (abfd, &scnhdr, scnhdr_ext); - bfd_bwrite (scnhdr_ext, SCNHSZ, abfd); + bfd_coff_swap_scnhdr_out (abfd, &text_scnhdr, &scnhdr_ext[SCNHSZ * 0]); + bfd_coff_swap_scnhdr_out (abfd, &data_scnhdr, &scnhdr_ext[SCNHSZ * 1]); + bfd_coff_swap_scnhdr_out (abfd, &bss_scnhdr, &scnhdr_ext[SCNHSZ * 2]); + bfd_bwrite (scnhdr_ext, 3 * SCNHSZ, abfd); bfd_bwrite (data_buffer, data_buffer_size, abfd); - bfd_bwrite (reloc_ext, scnhdr.s_nreloc * RELSZ, abfd); + bfd_bwrite (reloc_ext, data_scnhdr.s_nreloc * RELSZ, abfd); bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd); bfd_bwrite (string_table, string_table_size, abfd); @@ -2369,119 +2477,114 @@ HOWTO (0, /* type */ static unsigned long xcoff64_glink_code[10] = { - 0xe9820000, /* ld r12,0(r2) */ - 0xf8410028, /* std r2,40(r1) */ - 0xe80c0000, /* ld r0,0(r12) */ - 0xe84c0008, /* ld r0,8(r12) */ - 0x7c0903a6, /* mtctr r0 */ - 0x4e800420, /* bctr */ - 0x00000000, /* start of traceback table */ - 0x000ca000, /* traceback table */ - 0x00000000, /* traceback table */ - 0x00000018, /* ??? */ + 0xe9820000, /* ld r12,0(r2) */ + 0xf8410028, /* std r2,40(r1) */ + 0xe80c0000, /* ld r0,0(r12) */ + 0xe84c0008, /* ld r0,8(r12) */ + 0x7c0903a6, /* mtctr r0 */ + 0x4e800420, /* bctr */ + 0x00000000, /* start of traceback table */ + 0x000ca000, /* traceback table */ + 0x00000000, /* traceback table */ + 0x00000018, /* ??? */ }; static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = { - { /* COFF backend, defined in libcoff.h */ - _bfd_xcoff64_swap_aux_in, /* _bfd_coff_swap_aux_in */ - _bfd_xcoff64_swap_sym_in, /* _bfd_coff_swap_sym_in */ - _bfd_xcoff64_swap_lineno_in, /* _bfd_coff_swap_lineno_in */ - _bfd_xcoff64_swap_aux_out, /* _bfd_swap_aux_out */ - _bfd_xcoff64_swap_sym_out, /* _bfd_swap_sym_out */ - _bfd_xcoff64_swap_lineno_out, /* _bfd_swap_lineno_out */ - coff_swap_reloc_out, /* _bfd_swap_reloc_out */ - coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */ - coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */ - coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */ - FILHSZ, /* _bfd_filhsz */ - AOUTSZ, /* _bfd_aoutsz */ - SCNHSZ, /* _bfd_scnhsz */ - SYMESZ, /* _bfd_symesz */ - AUXESZ, /* _bfd_auxesz */ - RELSZ, /* _bfd_relsz */ - LINESZ, /* _bfd_linesz */ - FILNMLEN, /* _bfd_filnmlen */ - true, /* _bfd_coff_long_filenames */ - false, /* _bfd_coff_long_section_names */ - (3), /* _bfd_coff_default_section_alignment_power */ - true, /* _bfd_coff_force_symnames_in_strings */ - 4, /* _bfd_coff_debug_string_prefix_length */ - coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */ - coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */ - coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */ - coff_swap_reloc_in, /* _bfd_reloc_in */ - coff_bad_format_hook, /* _bfd_bad_format_hook */ - coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */ - coff_mkobject_hook, /* _bfd_mkobject_hook */ - styp_to_sec_flags, /* _bfd_syp_to_sec_flags */ - coff_set_alignment_hook, /* _bfd_set_alignment_hook */ - coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */ - symname_in_debug_hook, /* _coff_symname_in_debug_hook */ - coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */ - coff_print_aux, /* bfd_coff_print_aux */ - dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */ - dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */ - NULL, /* bfd_coff_sym_is_global */ - /* _bfd_coff_compute_section_file_positions */ + { /* COFF backend, defined in libcoff.h. */ + _bfd_xcoff64_swap_aux_in, + _bfd_xcoff64_swap_sym_in, + _bfd_xcoff64_swap_lineno_in, + _bfd_xcoff64_swap_aux_out, + _bfd_xcoff64_swap_sym_out, + _bfd_xcoff64_swap_lineno_out, + xcoff64_swap_reloc_out, + coff_swap_filehdr_out, + coff_swap_aouthdr_out, + coff_swap_scnhdr_out, + FILHSZ, + AOUTSZ, + SCNHSZ, + SYMESZ, + AUXESZ, + RELSZ, + LINESZ, + FILNMLEN, + true, /* _bfd_coff_long_filenames */ + false, /* _bfd_coff_long_section_names */ + 3, /* _bfd_coff_default_section_alignment_power */ + true, /* _bfd_coff_force_symnames_in_strings */ + 4, /* _bfd_coff_debug_string_prefix_length */ + coff_swap_filehdr_in, + coff_swap_aouthdr_in, + coff_swap_scnhdr_in, + xcoff64_swap_reloc_in, + xcoff64_bad_format_hook, + coff_set_arch_mach_hook, + coff_mkobject_hook, + styp_to_sec_flags, + coff_set_alignment_hook, + coff_slurp_symbol_table, + symname_in_debug_hook, + coff_pointerize_aux_hook, + coff_print_aux, + dummy_reloc16_extra_cases, + dummy_reloc16_estimate, + NULL, /* bfd_coff_sym_is_global */ coff_compute_section_file_positions, - NULL , /* _bfd_coff_start_final_link */ - xcoff64_ppc_relocate_section, /* _bfd_coff_relocate_section */ - coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */ - NULL , /* _bfd_coff_addust_symndx */ - _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */ - coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */ - coff_final_link_postscript /* _bfd_coff_final_link_postscript */ + NULL , /* _bfd_coff_start_final_link */ + xcoff64_ppc_relocate_section, + coff_rtype_to_howto, + NULL, /* _bfd_coff_adjust_symndx */ + _bfd_generic_link_add_one_symbol, + coff_link_output_has_begun, + coff_final_link_postscript }, - 0x01EF, /* magic number */ - bfd_arch_powerpc, /* architecture */ - bfd_mach_ppc_620, /* machine */ - - /* function pointers to xcoff specific swap routines */ - xcoff64_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */ - xcoff64_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */ - xcoff64_swap_ldsym_in, /* _xcoff_swap_ldsym_in */ - xcoff64_swap_ldsym_out, /* _xcoff_swap_ldsym_out */ - xcoff64_swap_ldrel_in, /* _xcoff_swap_ldrel_in */ - xcoff64_swap_ldrel_out, /* _xcoff_swap_ldrel_out */ - - /* sizes */ - LDHDRSZ, /* _xcoff_ldhdrsz */ - LDSYMSZ, /* _xcoff_ldsymsz */ - LDRELSZ, /* _xcoff_ldrelsz */ - 24, /* _xcoff_function_descriptor_size */ - 0, /* _xcoff_small_aout_header_size */ - /* versions */ - 2, /* _xcoff_ldhdr_version */ - - /* xcoff vs xcoff64 putting symbol names */ - _bfd_xcoff64_put_symbol_name, /* _xcoff_put_symbol_name */ - _bfd_xcoff64_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */ - - /* dynamic reloc howto */ + 0x01EF, /* magic number */ + bfd_arch_powerpc, + bfd_mach_ppc_620, + + /* Function pointers to xcoff specific swap routines. */ + xcoff64_swap_ldhdr_in, + xcoff64_swap_ldhdr_out, + xcoff64_swap_ldsym_in, + xcoff64_swap_ldsym_out, + xcoff64_swap_ldrel_in, + xcoff64_swap_ldrel_out, + + /* Sizes. */ + LDHDRSZ, + LDSYMSZ, + LDRELSZ, + 24, /* _xcoff_function_descriptor_size */ + 0, /* _xcoff_small_aout_header_size */ + + /* Versions. */ + 2, /* _xcoff_ldhdr_version */ + + _bfd_xcoff64_put_symbol_name, + _bfd_xcoff64_put_ldsymbol_name, &xcoff64_dynamic_reloc, - xcoff64_create_csect_from_smclas, - /* lineno and reloc count overflow */ + /* Lineno and reloc count overflow. */ xcoff64_is_lineno_count_overflow, xcoff64_is_reloc_count_overflow, xcoff64_loader_symbol_offset, xcoff64_loader_reloc_offset, - /* glink */ + /* glink. */ &xcoff64_glink_code[0], - 40, /* _xcoff_glink_size */ - - /* rtinit */ - 88, /* _xcoff_rtinit_size */ - xcoff64_generate_rtinit, /* _xcoff_generate_rtinit */ + 40, /* _xcoff_glink_size */ + /* rtinit. */ + 88, /* _xcoff_rtinit_size */ + xcoff64_generate_rtinit, }; -/* The transfer vector that leads the outside world to all of the above. */ +/* The transfer vector that leads the outside world to all of the above. */ const bfd_target rs6000coff64_vec = { "aixcoff64-rs6000", @@ -2489,36 +2592,35 @@ const bfd_target rs6000coff64_vec = BFD_ENDIAN_BIG, /* data byte order is big */ BFD_ENDIAN_BIG, /* header byte order is big */ - (HAS_RELOC | EXEC_P | /* object flags */ - HAS_LINENO | HAS_DEBUG | DYNAMIC | - HAS_SYMS | HAS_LOCALS | WP_TEXT), + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC + | HAS_SYMS | HAS_LOCALS | WP_TEXT), - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), 0, /* leading char */ '/', /* ar_pad_char */ - 15, /* ar_max_namelen??? FIXMEmgo */ + 15, /* ar_max_namelen */ /* data */ - bfd_getb64, /* bfd_getx64 */ - bfd_getb_signed_64, /* bfd_getx_signed_64 */ - bfd_putb64, /* bfd_putx64 */ - bfd_getb32, /* bfd_getx32 */ - bfd_getb_signed_32, /* bfd_getx_signed_32 */ - bfd_putb32, /* bfd_putx32 */ - bfd_getb16, /* bfd_getx16 */ - bfd_getb_signed_16, /* bfd_getx_signed_16 */ - bfd_putb16, /* bfd_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, /* hdrs */ - bfd_getb64, /* bfd_h_getx64 */ - bfd_getb_signed_64, /* bfd_h_getx_signed_64 */ - bfd_putb64, /* bfd_h_putx64 */ - bfd_getb32, /* bfd_h_getx32 */ - bfd_getb_signed_32, /* bfd_h_getx_signed_32 */ - bfd_putb32, /* bfd_h_putx32 */ - bfd_getb16, /* bfd_h_getx16 */ - bfd_getb_signed_16, /* bfd_h_getx_signed_16 */ - bfd_putb16, /* bfd_h_putx16 */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, { /* bfd_check_format */ _bfd_dummy_target, @@ -2542,92 +2644,320 @@ const bfd_target rs6000coff64_vec = }, /* Generic */ - bfd_true, /* _close_and_cleanup */ - bfd_true, /* _bfd_free_cached_info */ - coff_new_section_hook, /* _new_section_hook */ - _bfd_generic_get_section_contents, /* _bfd_get_section_contents */ - /* _bfd_get_section_contents_in_window */ + bfd_true, + bfd_true, + coff_new_section_hook, + _bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window, /* Copy */ - _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */ - /* _bfd_merge_private_bfd_data */ + _bfd_xcoff_copy_private_bfd_data, ((boolean (*) (bfd *, bfd *)) bfd_true), - /* _bfd_copy_pivate_section_data */ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), - /* _bfd_copy_private_symbol_data */ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), - ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */ - ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */ + ((boolean (*) (bfd *, flagword)) bfd_true), + ((boolean (*) (bfd *, void * )) bfd_true), /* Core */ - coff_core_file_failing_command, /* _core_file_failing_command */ - coff_core_file_failing_signal, /* _core_file_failing_signal */ - /* _core_file_matches_executable_p */ - coff_core_file_matches_executable_p, + coff_core_file_failing_command, + coff_core_file_failing_signal, + coff_core_file_matches_executable_p, /* Archive */ - xcoff64_slurp_armap, /* _slurp_armap */ - /* XCOFF archives do not have - anything which corresponds to - an extended name table. */ - bfd_false, /* _slurp_extended_name_table */ - /* _construct_extended_name_table */ + xcoff64_slurp_armap, + bfd_false, ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), - bfd_dont_truncate_arname, /* _truncate_arname */ - _bfd_xcoff_write_armap, /* _write_armap */ - _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */ - xcoff64_openr_next_archived_file, /* _openr_next_archived_file */ - _bfd_generic_get_elt_at_index, /* _get_elt_at_index */ - _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */ - /* XCOFF archives do not have - a timestamp. */ - bfd_true, /* _update_armap_timestamp */ + bfd_dont_truncate_arname, + _bfd_xcoff_write_armap, + _bfd_xcoff_read_ar_hdr, + xcoff64_openr_next_archived_file, + _bfd_generic_get_elt_at_index, + _bfd_xcoff_stat_arch_elt, + bfd_true, /* Symbols */ - coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */ - coff_get_symtab, /* _get_symtab */ - coff_make_empty_symbol, /* _make_empty_symbol */ - coff_print_symbol, /* _print_symbol */ - coff_get_symbol_info, /* _get_symbol_info */ - _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */ - coff_get_lineno, /* _get_lineno */ - coff_find_nearest_line, /* _find_nearest_line */ - coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */ - _bfd_generic_read_minisymbols, /* _read_minisymbols */ - _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */ + coff_get_symtab_upper_bound, + coff_get_symtab, + coff_make_empty_symbol, + coff_print_symbol, + coff_get_symbol_info, + _bfd_xcoff_is_local_label_name, + coff_get_lineno, + coff_find_nearest_line, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, + _bfd_generic_minisymbol_to_symbol, /* Reloc */ - coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */ - coff_canonicalize_reloc, /* _cononicalize_reloc */ - xcoff64_reloc_type_lookup, /* _bfd_reloc_type_lookup */ + coff_get_reloc_upper_bound, + coff_canonicalize_reloc, + xcoff64_reloc_type_lookup, /* Write */ - coff_set_arch_mach, /* _set_arch_mach */ - coff_set_section_contents, /* _set_section_contents */ + coff_set_arch_mach, + coff_set_section_contents, /* Link */ - xcoff64_sizeof_headers, /* _sizeof_headers */ - /* _bfd_get_relocated_section_contents */ + xcoff64_sizeof_headers, bfd_generic_get_relocated_section_contents, - bfd_generic_relax_section, /* _bfd_relax_section */ - _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */ - _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */ - _bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */ - _bfd_generic_link_split_section, /* _bfd_link_split_section */ - bfd_generic_gc_sections, /* _bfd_gc_sections */ - bfd_generic_merge_sections, /* _bfd_merge_sections */ + bfd_generic_relax_section, + _bfd_xcoff_bfd_link_hash_table_create, + _bfd_generic_link_hash_table_free, + _bfd_xcoff_bfd_link_add_symbols, + _bfd_generic_link_just_syms, + _bfd_xcoff_bfd_final_link, + _bfd_generic_link_split_section, + bfd_generic_gc_sections, + bfd_generic_merge_sections, + bfd_generic_discard_group, /* Dynamic */ - /* _get_dynamic_symtab_upper_bound */ _bfd_xcoff_get_dynamic_symtab_upper_bound, - _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */ - _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */ - _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */ + _bfd_xcoff_canonicalize_dynamic_symtab, + _bfd_xcoff_get_dynamic_reloc_upper_bound, + _bfd_xcoff_canonicalize_dynamic_reloc, /* Opposite endian version, none exists */ NULL, - /* back end data */ (void *) &bfd_xcoff_backend_data, }; + +extern const bfd_target *xcoff64_core_p PARAMS ((bfd *)); +extern boolean xcoff64_core_file_matches_executable_p PARAMS((bfd *, bfd *)); +extern char *xcoff64_core_file_failing_command PARAMS ((bfd *)); +extern int xcoff64_core_file_failing_signal PARAMS ((bfd *)); + +/* AIX 5 */ +static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data = +{ + { /* COFF backend, defined in libcoff.h. */ + _bfd_xcoff64_swap_aux_in, + _bfd_xcoff64_swap_sym_in, + _bfd_xcoff64_swap_lineno_in, + _bfd_xcoff64_swap_aux_out, + _bfd_xcoff64_swap_sym_out, + _bfd_xcoff64_swap_lineno_out, + xcoff64_swap_reloc_out, + coff_swap_filehdr_out, + coff_swap_aouthdr_out, + coff_swap_scnhdr_out, + FILHSZ, + AOUTSZ, + SCNHSZ, + SYMESZ, + AUXESZ, + RELSZ, + LINESZ, + FILNMLEN, + true, /* _bfd_coff_long_filenames */ + false, /* _bfd_coff_long_section_names */ + 3, /* _bfd_coff_default_section_alignment_power */ + true, /* _bfd_coff_force_symnames_in_strings */ + 4, /* _bfd_coff_debug_string_prefix_length */ + coff_swap_filehdr_in, + coff_swap_aouthdr_in, + coff_swap_scnhdr_in, + xcoff64_swap_reloc_in, + xcoff64_bad_format_hook, + coff_set_arch_mach_hook, + coff_mkobject_hook, + styp_to_sec_flags, + coff_set_alignment_hook, + coff_slurp_symbol_table, + symname_in_debug_hook, + coff_pointerize_aux_hook, + coff_print_aux, + dummy_reloc16_extra_cases, + dummy_reloc16_estimate, + NULL, /* bfd_coff_sym_is_global */ + coff_compute_section_file_positions, + NULL , /* _bfd_coff_start_final_link */ + xcoff64_ppc_relocate_section, + coff_rtype_to_howto, + NULL, /* _bfd_coff_adjust_symndx */ + _bfd_generic_link_add_one_symbol, + coff_link_output_has_begun, + coff_final_link_postscript + }, + + U64_TOCMAGIC, /* magic number */ + bfd_arch_powerpc, + bfd_mach_ppc_620, + + /* Function pointers to xcoff specific swap routines. */ + xcoff64_swap_ldhdr_in, + xcoff64_swap_ldhdr_out, + xcoff64_swap_ldsym_in, + xcoff64_swap_ldsym_out, + xcoff64_swap_ldrel_in, + xcoff64_swap_ldrel_out, + + /* Sizes. */ + LDHDRSZ, + LDSYMSZ, + LDRELSZ, + 24, /* _xcoff_function_descriptor_size */ + 0, /* _xcoff_small_aout_header_size */ + /* Versions. */ + 2, /* _xcoff_ldhdr_version */ + + _bfd_xcoff64_put_symbol_name, + _bfd_xcoff64_put_ldsymbol_name, + &xcoff64_dynamic_reloc, + xcoff64_create_csect_from_smclas, + + /* Lineno and reloc count overflow. */ + xcoff64_is_lineno_count_overflow, + xcoff64_is_reloc_count_overflow, + + xcoff64_loader_symbol_offset, + xcoff64_loader_reloc_offset, + + /* glink. */ + &xcoff64_glink_code[0], + 40, /* _xcoff_glink_size */ + + /* rtinit. */ + 88, /* _xcoff_rtinit_size */ + xcoff64_generate_rtinit, +}; + +/* The transfer vector that leads the outside world to all of the above. */ +const bfd_target aix5coff64_vec = +{ + "aix5coff64-rs6000", + bfd_target_xcoff_flavour, + BFD_ENDIAN_BIG, /* data byte order is big */ + BFD_ENDIAN_BIG, /* header byte order is big */ + + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC + | HAS_SYMS | HAS_LOCALS | WP_TEXT), + + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), + 0, /* leading char */ + '/', /* ar_pad_char */ + 15, /* ar_max_namelen */ + + /* data */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, + + /* hdrs */ + bfd_getb64, + bfd_getb_signed_64, + bfd_putb64, + bfd_getb32, + bfd_getb_signed_32, + bfd_putb32, + bfd_getb16, + bfd_getb_signed_16, + bfd_putb16, + + { /* bfd_check_format */ + _bfd_dummy_target, + coff_object_p, + xcoff64_archive_p, + xcoff64_core_p + }, + + { /* bfd_set_format */ + bfd_false, + coff_mkobject, + _bfd_generic_mkarchive, + bfd_false + }, + + {/* bfd_write_contents */ + bfd_false, + xcoff64_write_object_contents, + _bfd_xcoff_write_archive_contents, + bfd_false + }, + + /* Generic */ + bfd_true, + bfd_true, + coff_new_section_hook, + _bfd_generic_get_section_contents, + _bfd_generic_get_section_contents_in_window, + + /* Copy */ + _bfd_xcoff_copy_private_bfd_data, + ((boolean (*) (bfd *, bfd *)) bfd_true), + ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), + ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), + ((boolean (*) (bfd *, flagword)) bfd_true), + ((boolean (*) (bfd *, void * )) bfd_true), + + /* Core */ + xcoff64_core_file_failing_command, + xcoff64_core_file_failing_signal, + xcoff64_core_file_matches_executable_p, + + /* Archive */ + xcoff64_slurp_armap, + bfd_false, + ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), + bfd_dont_truncate_arname, + _bfd_xcoff_write_armap, + _bfd_xcoff_read_ar_hdr, + xcoff64_openr_next_archived_file, + _bfd_generic_get_elt_at_index, + _bfd_xcoff_stat_arch_elt, + bfd_true, + + /* Symbols */ + coff_get_symtab_upper_bound, + coff_get_symtab, + coff_make_empty_symbol, + coff_print_symbol, + coff_get_symbol_info, + _bfd_xcoff_is_local_label_name, + coff_get_lineno, + coff_find_nearest_line, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, + _bfd_generic_minisymbol_to_symbol, + + /* Reloc */ + coff_get_reloc_upper_bound, + coff_canonicalize_reloc, + xcoff64_reloc_type_lookup, + + /* Write */ + coff_set_arch_mach, + coff_set_section_contents, + + /* Link */ + xcoff64_sizeof_headers, + bfd_generic_get_relocated_section_contents, + bfd_generic_relax_section, + _bfd_xcoff_bfd_link_hash_table_create, + _bfd_generic_link_hash_table_free, + _bfd_xcoff_bfd_link_add_symbols, + _bfd_generic_link_just_syms, + _bfd_xcoff_bfd_final_link, + _bfd_generic_link_split_section, + bfd_generic_gc_sections, + bfd_generic_merge_sections, + bfd_generic_discard_group, + + /* Dynamic */ + _bfd_xcoff_get_dynamic_symtab_upper_bound, + _bfd_xcoff_canonicalize_dynamic_symtab, + _bfd_xcoff_get_dynamic_reloc_upper_bound, + _bfd_xcoff_canonicalize_dynamic_reloc, + + /* Opposite endian version, none exists. */ + NULL, + + (void *) & bfd_xcoff_aix5_backend_data, +}; diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h index 5c6704f..212c5c6 100644 --- a/contrib/binutils/bfd/coffcode.h +++ b/contrib/binutils/bfd/coffcode.h @@ -341,6 +341,11 @@ static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR)); #ifdef COFF_WITH_PE static flagword handle_COMDAT PARAMS ((bfd *, flagword, PTR, const char *, asection *)); #endif +#ifdef COFF_IMAGE_WITH_PE +static boolean coff_read_word PARAMS ((bfd *, unsigned int *)); +static unsigned int coff_compute_checksum PARAMS ((bfd *)); +static boolean coff_apply_checksum PARAMS ((bfd *)); +#endif /* void warning(); */ @@ -1493,12 +1498,12 @@ coff_new_section_hook (abfd, section) section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER; #ifdef RS6000COFF_C - if (xcoff_data (abfd)->text_align_power != 0 + if (bfd_xcoff_text_align_power (abfd) != 0 && strcmp (bfd_get_section_name (abfd, section), ".text") == 0) - section->alignment_power = xcoff_data (abfd)->text_align_power; - if (xcoff_data (abfd)->data_align_power != 0 + section->alignment_power = bfd_xcoff_text_align_power (abfd); + if (bfd_xcoff_data_align_power (abfd) != 0 && strcmp (bfd_get_section_name (abfd, section), ".data") == 0) - section->alignment_power = xcoff_data (abfd)->data_align_power; + section->alignment_power = bfd_xcoff_data_align_power (abfd); #endif /* Allocate aux records for section symbols, to store size and @@ -1734,7 +1739,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr) struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; coff_data_type *coff; - if (coff_mkobject (abfd) == false) + if (! coff_mkobject (abfd)) return NULL; coff = coff_data (abfd); @@ -1777,8 +1782,8 @@ coff_mkobject_hook (abfd, filehdr, aouthdr) xcoff->toc = internal_a->o_toc; xcoff->sntoc = internal_a->o_sntoc; xcoff->snentry = internal_a->o_snentry; - xcoff->text_align_power = internal_a->o_algntext; - xcoff->data_align_power = internal_a->o_algndata; + bfd_xcoff_text_align_power (abfd) = internal_a->o_algntext; + bfd_xcoff_data_align_power (abfd) = internal_a->o_algndata; xcoff->modtype = internal_a->o_modtype; xcoff->cputype = internal_a->o_cputype; xcoff->maxdata = internal_a->o_maxdata; @@ -1964,6 +1969,7 @@ coff_set_arch_mach_hook (abfd, filehdr) #ifdef RS6000COFF_C #ifdef XCOFF64 + case U64_TOCMAGIC: case U803XTOCMAGIC: #else case U802ROMAGIC: @@ -2152,6 +2158,13 @@ coff_set_arch_mach_hook (abfd, filehdr) arch = bfd_arch_mcore; break; #endif + +#ifdef W65MAGIC + case W65MAGIC: + arch = bfd_arch_w65; + break; +#endif + default: /* Unreadable input file type */ arch = bfd_arch_obscure; break; @@ -2171,7 +2184,7 @@ symname_in_debug_hook (abfd, sym) bfd * abfd ATTRIBUTE_UNUSED; struct internal_syment *sym; { - return SYMNAME_IN_DEBUG (sym) ? true : false; + return SYMNAME_IN_DEBUG (sym) != 0; } #else @@ -2388,7 +2401,7 @@ coff_write_relocs (abfd, first_undef) return false; #ifdef COFF_WITH_PE - if (s->reloc_count > 0xffff) + if (obj_pe (abfd) && s->reloc_count >= 0xffff) { /* encode real count here as first reloc */ struct internal_reloc n; @@ -2768,14 +2781,8 @@ coff_set_flags (abfd, magicp, flagsp) #ifndef PPCMAGIC case bfd_arch_powerpc: #endif -#ifdef XCOFF64 - if (bfd_get_mach (abfd) == bfd_mach_ppc_620 - && !strncmp (abfd->xvec->name,"aix", 3)) - *magicp = U803XTOCMAGIC; - else -#else - *magicp = U802TOCMAGIC; -#endif + BFD_ASSERT (bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); + *magicp = bfd_xcoff_magic_number (abfd); return true; break; #endif @@ -2822,8 +2829,8 @@ coff_set_arch_mach (abfd, arch, machine) if (! bfd_default_set_arch_mach (abfd, arch, machine)) return false; - if (arch != bfd_arch_unknown && - coff_set_flags (abfd, &dummy1, &dummy2) != true) + if (arch != bfd_arch_unknown + && ! coff_set_flags (abfd, &dummy1, &dummy2)) return false; /* We can't represent this type */ return true; /* We're easy ... */ @@ -3084,8 +3091,10 @@ coff_compute_section_file_positions (abfd) AIX executable is stripped with gnu strip because the default vma of native is 0x10000150 but default for gnu is 0x10000140. Gnu stripped gnu excutable passes this check because the filepos is - 0x0140. */ - if (!strcmp (current->name, _TEXT)) + 0x0140. This problem also show up with 64 bit shared objects. The + data section must also be aligned. */ + if (!strcmp (current->name, _TEXT) + || !strcmp (current->name, _DATA)) { bfd_vma pad; bfd_vma align; @@ -3276,6 +3285,100 @@ coff_add_missing_symbols (abfd) #endif /* 0 */ +#ifdef COFF_IMAGE_WITH_PE + +static unsigned int pelength; +static unsigned int peheader; + +static boolean +coff_read_word (abfd, value) + bfd *abfd; + unsigned int *value; +{ + unsigned char b[2]; + int status; + + status = bfd_bread (b, (bfd_size_type) 2, abfd); + if (status < 1) + { + *value = 0; + return false; + } + + if (status == 1) + *value = (unsigned int) b[0]; + else + *value = (unsigned int) (b[0] + (b[1] << 8)); + + pelength += (unsigned int) status; + + return true; +} + +static unsigned int +coff_compute_checksum (abfd) + bfd *abfd; +{ + boolean more_data; + file_ptr filepos; + unsigned int value; + unsigned int total; + + total = 0; + pelength = 0; + filepos = (file_ptr) 0; + + do + { + if (bfd_seek (abfd, filepos, SEEK_SET) != 0) + return 0; + + more_data = coff_read_word (abfd, &value); + total += value; + total = 0xffff & (total + (total >> 0x10)); + filepos += 2; + } + while (more_data); + + return (0xffff & (total + (total >> 0x10))); +} + +static boolean +coff_apply_checksum (abfd) + bfd *abfd; +{ + unsigned int computed; + unsigned int checksum = 0; + + if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0) + return false; + + if (!coff_read_word (abfd, &peheader)) + return false; + + if (bfd_seek (abfd, peheader + 0x58, SEEK_SET) != 0) + return false; + + checksum = 0; + bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); + + if (bfd_seek (abfd, peheader, SEEK_SET) != 0) + return false; + + computed = coff_compute_checksum (abfd); + + checksum = computed + pelength; + + if (bfd_seek (abfd, peheader + 0x58, SEEK_SET) != 0) + return false; + + bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); + + return true; +} + +#endif /* COFF_IMAGE_WITH_PE */ + /* SUPPRESS 558 */ /* SUPPRESS 529 */ static boolean @@ -3309,7 +3412,7 @@ coff_write_object_contents (abfd) lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd); - if (abfd->output_has_begun == false) + if (! abfd->output_has_begun) { if (! coff_compute_section_file_positions (abfd)) return false; @@ -3324,7 +3427,7 @@ coff_write_object_contents (abfd) { #ifdef COFF_WITH_PE /* we store the actual reloc count in the first reloc's addr */ - if (current->reloc_count > 0xffff) + if (obj_pe (abfd) && current->reloc_count >= 0xffff) reloc_count ++; #endif reloc_count += current->reloc_count; @@ -3355,7 +3458,7 @@ coff_write_object_contents (abfd) reloc_base += current->reloc_count * bfd_coff_relsz (abfd); #ifdef COFF_WITH_PE /* extra reloc to hold real count */ - if (current->reloc_count > 0xffff) + if (obj_pe (abfd) && current->reloc_count >= 0xffff) reloc_base += bfd_coff_relsz (abfd); #endif } @@ -4066,6 +4169,11 @@ coff_write_object_contents (abfd) if (amount != bfd_coff_aoutsz (abfd)) return false; + +#ifdef COFF_IMAGE_WITH_PE + if (! coff_apply_checksum (abfd)) + return false; +#endif } #ifdef RS6000COFF_C else @@ -4095,7 +4203,7 @@ coff_set_section_contents (abfd, section, location, offset, count) file_ptr offset; bfd_size_type count; { - if (abfd->output_has_begun == false) /* set by bfd.c handler */ + if (! abfd->output_has_begun) /* set by bfd.c handler */ { if (! coff_compute_section_file_positions (abfd)) return false; @@ -5049,6 +5157,10 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, } #endif +#ifndef coff_bfd_link_hash_table_free +#define coff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free +#endif + /* If coff_relocate_section is defined, we can use the optimized COFF backend linker. Otherwise we must continue to use the old linker. */ #ifdef coff_relocate_section @@ -5072,6 +5184,7 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, #define coff_bfd_final_link _bfd_generic_final_link #endif /* ! defined (coff_relocate_section) */ +#define coff_bfd_link_just_syms _bfd_generic_link_just_syms #define coff_bfd_link_split_section _bfd_generic_link_split_section #ifndef coff_start_final_link @@ -5268,6 +5381,10 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table = #define coff_bfd_merge_sections bfd_generic_merge_sections #endif +#ifndef coff_bfd_discard_group +#define coff_bfd_discard_group bfd_generic_discard_group +#endif + #define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \ const bfd_target VAR = \ { \ diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c index 88591f1..ee6c8fc 100644 --- a/contrib/binutils/bfd/coffgen.c +++ b/contrib/binutils/bfd/coffgen.c @@ -1,6 +1,6 @@ /* Support for the generic parts of COFF, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -178,6 +178,7 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) flagword oflags = abfd->flags; bfd_vma ostart = bfd_get_start_address (abfd); PTR tdata; + PTR tdata_save; bfd_size_type readsize; /* length of file_info */ unsigned int scnhsz; char *external_sections; @@ -206,9 +207,10 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) /* Set up the tdata area. ECOFF uses its own routine, and overrides abfd->flags. */ + tdata_save = abfd->tdata.any; tdata = bfd_coff_mkobject_hook (abfd, (PTR) internal_f, (PTR) internal_a); if (tdata == NULL) - return 0; + goto fail2; scnhsz = bfd_coff_scnhsz (abfd); readsize = (bfd_size_type) nscns * scnhsz; @@ -221,7 +223,7 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) /* Set the arch/mach *before* swapping in sections; section header swapping may depend on arch/mach info. */ - if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false) + if (! bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f)) goto fail; /* Now copy data as required; construct all asections etc */ @@ -245,6 +247,8 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) fail: bfd_release (abfd, tdata); + fail2: + abfd->tdata.any = tdata_save; abfd->flags = oflags; bfd_get_start_address (abfd) = ostart; return (const bfd_target *) NULL; @@ -270,12 +274,13 @@ coff_object_p (abfd) filehdr = bfd_alloc (abfd, filhsz); if (filehdr == NULL) - return 0; + return NULL; if (bfd_bread (filehdr, filhsz, abfd) != filhsz) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); - return 0; + bfd_release (abfd, filehdr); + return NULL; } bfd_coff_swap_filehdr_in (abfd, filehdr, &internal_f); bfd_release (abfd, filehdr); @@ -288,11 +293,11 @@ coff_object_p (abfd) only read in f_opthdr bytes in the call to bfd_bread. We should also attempt to catch corrupt or non-COFF binaries with a strange value for f_opthdr. */ - if (bfd_coff_bad_format_hook (abfd, &internal_f) == false + if (! bfd_coff_bad_format_hook (abfd, &internal_f) || internal_f.f_opthdr > aoutsz) { bfd_set_error (bfd_error_wrong_format); - return 0; + return NULL; } nscns = internal_f.f_nscns; @@ -302,13 +307,15 @@ coff_object_p (abfd) opthdr = bfd_alloc (abfd, aoutsz); if (opthdr == NULL) - return 0; + return NULL; if (bfd_bread (opthdr, (bfd_size_type) internal_f.f_opthdr, abfd) != internal_f.f_opthdr) { - return 0; + bfd_release (abfd, opthdr); + return NULL; } bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a); + bfd_release (abfd, opthdr); } return coff_real_object_p (abfd, nscns, &internal_f, @@ -1438,13 +1445,13 @@ coff_section_symbol (abfd, name) combined_entry_type e[10]; }; struct foo *f; - f = (struct foo *) bfd_alloc (abfd, (bfd_size_type) sizeof (*f)); + + f = (struct foo *) bfd_zalloc (abfd, (bfd_size_type) sizeof (*f)); if (!f) { bfd_set_error (bfd_error_no_error); return NULL; } - memset ((char *) f, 0, sizeof (*f)); coff_symbol_from (abfd, sym)->native = csym = f->e; } csym[0].u.syment.n_sclass = C_STAT; @@ -1835,10 +1842,9 @@ coff_get_normalized_symtab (abfd) if (internal_ptr->u.syment._n._n_name[i] == '\0') break; - newstring = (PTR) bfd_alloc (abfd, (bfd_size_type) (i + 1)); + newstring = (PTR) bfd_zalloc (abfd, (bfd_size_type) (i + 1)); if (newstring == NULL) return (NULL); - memset (newstring, 0, i + 1); strncpy (newstring, internal_ptr->u.syment._n._n_name, i); internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring; internal_ptr->u.syment._n._n_n._n_zeroes = 0; @@ -1897,10 +1903,9 @@ coff_make_empty_symbol (abfd) bfd *abfd; { bfd_size_type amt = sizeof (coff_symbol_type); - coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt); + coff_symbol_type *new = (coff_symbol_type *) bfd_zalloc (abfd, amt); if (new == NULL) return (NULL); - memset (new, 0, sizeof *new); new->symbol.section = 0; new->native = 0; new->lineno = (alent *) NULL; @@ -2415,7 +2420,7 @@ coff_sizeof_headers (abfd, reloc) { size_t size; - if (reloc == false) + if (! reloc) { size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd); } @@ -2453,12 +2458,10 @@ bfd_coff_set_symbol_class (abfd, symbol, class) combined_entry_type * native; bfd_size_type amt = sizeof (* native); - native = (combined_entry_type *) bfd_alloc (abfd, amt); + native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (native == NULL) return false; - memset (native, 0, sizeof (* native)); - native->u.syment.n_type = T_NULL; native->u.syment.n_sclass = class; diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c index 8a80c14..eb9388f 100644 --- a/contrib/binutils/bfd/cofflink.c +++ b/contrib/binutils/bfd/cofflink.c @@ -119,13 +119,13 @@ _bfd_coff_link_hash_table_create (abfd) struct coff_link_hash_table *ret; bfd_size_type amt = sizeof (struct coff_link_hash_table); - ret = (struct coff_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct coff_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_coff_link_hash_table_init (ret, abfd, _bfd_coff_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return (struct bfd_link_hash_table *) NULL; } return &ret->root; @@ -342,12 +342,10 @@ coff_link_add_symbols (abfd, info) /* We keep a list of the linker hash table entries that correspond to particular symbols. */ amt = symcount * sizeof (struct coff_link_hash_entry *); - sym_hash = (struct coff_link_hash_entry **) bfd_alloc (abfd, amt); + sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt); if (sym_hash == NULL && symcount != 0) goto error_return; obj_coff_sym_hashes (abfd) = sym_hash; - memset (sym_hash, 0, - (size_t) symcount * sizeof (struct coff_link_hash_entry *)); symesz = bfd_coff_symesz (abfd); BFD_ASSERT (symesz == bfd_coff_auxesz (abfd)); @@ -759,6 +757,10 @@ _bfd_coff_final_link (abfd, info) o->flags |= SEC_RELOC; o->rel_filepos = rel_filepos; rel_filepos += o->reloc_count * relsz; + /* In PE COFF, if there are at least 0xffff relocations an + extra relocation will be written out to encode the count. */ + if (obj_pe (abfd) && o->reloc_count >= 0xffff) + rel_filepos += relsz; } if (bfd_coff_long_section_names (abfd) diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h index 454e686..cd147c5 100644 --- a/contrib/binutils/bfd/coffswap.h +++ b/contrib/binutils/bfd/coffswap.h @@ -244,13 +244,7 @@ coff_swap_reloc_in (abfd, src, dst) reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr); reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); - -#ifdef RS6000COFF_C - reloc_dst->r_type = H_GET_8 (abfd, reloc_src->r_type); - reloc_dst->r_size = H_GET_8 (abfd, reloc_src->r_size); -#else reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); -#endif #ifdef SWAP_IN_RELOC_OFFSET reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); @@ -267,13 +261,7 @@ coff_swap_reloc_out (abfd, src, dst) struct external_reloc *reloc_dst = (struct external_reloc *) dst; PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr); H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx); - -#ifdef RS6000COFF_C - H_PUT_8 (abfd, reloc_src->r_type, reloc_dst->r_type); - H_PUT_8 (abfd, reloc_src->r_size, reloc_dst->r_size); -#else H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type); -#endif #ifdef SWAP_OUT_RELOC_OFFSET SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset); diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd index 58c7315..184bbef 100755 --- a/contrib/binutils/bfd/config.bfd +++ b/contrib/binutils/bfd/config.bfd @@ -35,6 +35,7 @@ alpha*) targ_archs=bfd_alpha_arch ;; arm*) targ_archs=bfd_arm_arch ;; c30*) targ_archs=bfd_tic30_arch ;; c54x*) targ_archs=bfd_tic54x_arch ;; +dlx*) targ_archs=bfd_dlx_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; i[3456]86) targ_archs=bfd_i386_arch ;; i370) targ_archs=bfd_i370_arch ;; @@ -57,7 +58,6 @@ v850*) targ_archs=bfd_v850_arch ;; x86_64) targ_archs=bfd_i386_arch ;; xscale*) targ_archs=bfd_arm_arch ;; z8k*) targ_archs=bfd_z8k_arch ;; -sh*) targ_archs=bfd_sh_arch ;; *) targ_archs=bfd_${targ_cpu}_arch ;; esac @@ -70,7 +70,16 @@ esac case "${targ}" in # START OF targmatch.h #ifdef BFD64 - alpha*-*-netbsd* | alpha*-*-freebsd*) + alpha*-*-freebsd*) + targ_defvec=bfd_elf64_alpha_freebsd_vec + targ_selvecs=ecoffalpha_little_vec + # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling. + case "${targ}" in + alpha*-*-freebsd3* | alpha*-*-freebsd4 | alpha*-*-freebsd4.0*) + targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;; + esac + ;; + alpha*-*-netbsd* | alpha*-*-openbsd*) targ_defvec=bfd_elf64_alpha_vec targ_selvecs=ecoffalpha_little_vec ;; @@ -104,7 +113,7 @@ case "${targ}" in targ_defvec=bfd_elf32_ia64_hpux_big_vec targ_selvecs="bfd_elf64_ia64_hpux_big_vec" ;; - sparc64-*-freebsd* | sparc64-*-netbsd*) + sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd*) targ_defvec=bfd_elf64_sparc_vec targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" ;; @@ -115,12 +124,17 @@ case "${targ}" in targ_selvecs=bfd_elf32_bigarc_vec ;; + armeb-*-netbsdelf*) + targ_defvec=bfd_elf32_bigarm_vec + targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec" + ;; arm-*-netbsdelf*) targ_defvec=bfd_elf32_littlearm_vec targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec" ;; arm-*-netbsd* | arm-*-openbsd*) targ_defvec=armnetbsd_vec + targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec" targ_underscore=yes ;; arm-*-riscix*) @@ -263,6 +277,11 @@ case "${targ}" in targ_defvec=bfd_elf32_d10v_vec ;; + dlx-*-elf*) + targ_defvec=bfd_elf32_dlx_big_vec + targ_selvecs="bfd_elf32_dlx_big_vec" + ;; + d30v-*-*) targ_defvec=bfd_elf32_d30v_vec ;; @@ -271,6 +290,10 @@ case "${targ}" in targ_defvec=bfd_elf32_fr30_vec ;; + frv-*-elf) + targ_defvec=bfd_elf32_frv_vec + ;; + h8300*-*-elf) targ_defvec=bfd_elf32_h8300_vec @@ -303,7 +326,7 @@ case "${targ}" in targ_defvec=bfd_elf32_hppa_linux_vec targ_selvecs=bfd_elf32_hppa_vec ;; - hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems*) + hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*) targ_defvec=bfd_elf32_hppa_vec targ_selvecs=bfd_elf32_hppa_linux_vec ;; @@ -336,10 +359,14 @@ case "${targ}" in targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; + i[3456]86-*-nto-qnx*) + targ_defvec=bfd_elf32_i386qnx_vec + targ_selvecs=i386coff_vec + ;; i[3456]86-*-chorus*) targ_defvec=bfd_elf32_i386_vec ;; - i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* ) + *-*-msdosdjgpp* | *-*-go32* | *-go32-rtems* ) targ_defvec=go32coff_vec targ_selvecs="go32stubbedcoff_vec i386aout_vec" ;; @@ -370,13 +397,22 @@ case "${targ}" in targ_underscore=yes ;; i[3456]86-*-freebsd*) - targ_defvec=bfd_elf32_i386_vec + targ_defvec=bfd_elf32_i386_freebsd_vec targ_selvecs=i386coff_vec + # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling. + case "${targ}" in + i[3456]86-*-freebsd3* | i[3456]86-*-freebsd4 | i[3456]86-*-freebsd4.0*) + targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;; + esac ;; i[3456]86-*-netbsdelf*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386netbsd_vec ;; + i[3456]86-*-netbsdpe*) + targ_defvec=i386pe_vec + targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec" + ;; i[3456]86-*-netbsdaout* | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) targ_defvec=i386netbsd_vec targ_selvecs="bfd_elf32_i386_vec i386bsd_vec" @@ -785,11 +821,24 @@ case "${targ}" in targ_selvecs="bfd_elf32_pjl_vec bfd_elf32_pj_vec bfd_elf32_i386_vec" ;; + powerpc-*-aix5*) + targ_defvec=rs6000coff_vec + targ_selvecs="aix5coff64_vec" + want64=true + ;; +#ifdef BFD64 + powerpc64-*-aix5*) + targ_defvec=aix5coff64_vec + targ_selvecs="rs6000coff_vec" + want64=true + ;; +#endif + powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*) targ_defvec=rs6000coff_vec targ64_selvecs=rs6000coff64_vec case "${targ}" in - *-*-aix4.[3456789]* | *-*-aix[56789]*) + *-*-aix4.[3456789]* | *-*-aix[56789]*) want64=true;; *) @@ -812,7 +861,7 @@ case "${targ}" in #endif powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ - powerpc-*-chorus* | powerpc-*-vxworks*) + powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) targ_defvec=bfd_elf32_powerpc_vec targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" @@ -847,11 +896,24 @@ case "${targ}" in #endif #ifdef BFD64 + sh64l*-*-elf*) + targ_defvec=bfd_elf32_sh64l_vec + targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec" + targ_underscore=yes + ;; sh64-*-elf*) targ_defvec=bfd_elf32_sh64_vec targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec" targ_underscore=yes ;; + sh64eb-*-linux*) + targ_defvec=bfd_elf32_shblin_vec + targ_selvecs="bfd_elf32_shblin_vec bfd_elf32_sh64_vec bfd_elf64_sh64_vec bfd_elf32_sh_vec" + ;; + sh64-*-linux*) + targ_defvec=bfd_elf32_shlin_vec + targ_selvecs="bfd_elf32_shlin_vec bfd_elf32_sh64l_vec bfd_elf64_sh64l_vec bfd_elf32_shl_vec" + ;; #endif /* BFD64 */ sh-*-linux*) @@ -868,6 +930,33 @@ case "${targ}" in targ_defvec=bfd_elf32_shlin_vec ;; +#ifdef BFD64 + sh5le-*-netbsd*) + targ_defvec=bfd_elf32_sh64lnbsd_vec + targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" + ;; + sh5-*-netbsd*) + targ_defvec=bfd_elf32_sh64nbsd_vec + targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" + ;; + + sh64le-*-netbsd*) + targ_defvec=bfd_elf64_sh64lnbsd_vec + targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec" + ;; + sh64-*-netbsd*) + targ_defvec=bfd_elf64_sh64nbsd_vec + targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec" + ;; +#endif + + shle-*-netbsdelf*) + targ_defvec=bfd_elf32_shlnbsd_vec + targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec" +#ifdef BFD64 + targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec" +#endif + ;; sh*le-*-netbsdelf*) targ_defvec=bfd_elf32_shlnbsd_vec targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec" @@ -884,7 +973,15 @@ case "${targ}" in targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec" ;; - sh-*-elf* | sh-*-rtemself*) + shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf*) + targ_defvec=bfd_elf32_shl_vec + targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec" +#ifdef BFD64 + targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec" +#endif + targ_underscore=yes + ;; + sh-*-elf* | sh[1234]*-elf* | sh-*-rtemself*) targ_defvec=bfd_elf32_sh_vec targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" #ifdef BFD64 @@ -1014,12 +1111,22 @@ case "${targ}" in v850ea-*-*) targ_defvec=bfd_elf32_v850_vec ;; -#if HAVE_host_aout_vec + + vax-*-netbsdelf*) + targ_defvec=bfd_elf32_vax_vec + targ_selvecs="vaxnetbsd_vec vax1knetbsd_vec" + ;; + + vax-*-netbsdaout* | vax-*-netbsd*) + targ_defvec=vaxnetbsd_vec + targ_selvecs="bfd_elf32_vax_vec vax1knetbsd_vec" + targ_underscore=yes + ;; + vax-*-bsd* | vax-*-ultrix*) - targ_defvec=host_aout_vec + targ_defvec=vaxbsd_vec targ_underscore=yes ;; -#endif vax*-*-*vms*) targ_defvec=vms_vax_vec diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure index 94c88ab..6d12109 100755 --- a/contrib/binutils/bfd/configure +++ b/contrib/binutils/bfd/configure @@ -37,6 +37,8 @@ ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" ac_help="$ac_help + --install-libbfd controls installation of libbfd and related headers" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -550,12 +552,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:554: checking for Cygwin environment" >&5 +echo "configure:556: 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 559 "configure" +#line 561 "configure" #include "confdefs.h" int main() { @@ -566,7 +568,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -583,19 +585,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:587: checking for mingw32 environment" >&5 +echo "configure:589: 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 592 "configure" +#line 594 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -660,7 +662,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:664: checking host system type" >&5 +echo "configure:666: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -681,7 +683,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:685: checking target system type" >&5 +echo "configure:687: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -699,7 +701,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:703: checking build system type" >&5 +echo "configure:705: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -724,7 +726,7 @@ test "$host_alias" != "$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:728: checking for $ac_word" >&5 +echo "configure:730: 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 @@ -754,7 +756,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:758: checking for $ac_word" >&5 +echo "configure:760: 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 @@ -805,7 +807,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:809: checking for $ac_word" >&5 +echo "configure:811: 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 @@ -837,7 +839,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:843: 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. @@ -848,12 +850,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 852 "configure" +#line 854 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:859: \"$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 @@ -879,12 +881,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:883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:885: 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:888: checking whether we are using GNU C" >&5 +echo "configure:890: 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 @@ -893,7 +895,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:897: \"$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:899: \"$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 @@ -912,7 +914,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:916: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:918: 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 @@ -944,7 +946,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:948: checking for POSIXized ISC" >&5 +echo "configure:950: 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 @@ -977,7 +979,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:981: checking for a BSD compatible install" >&5 +echo "configure:983: 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 @@ -1030,7 +1032,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:1034: checking whether build environment is sane" >&5 +echo "configure:1036: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1087,7 +1089,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:1091: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1093: 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 @@ -1116,7 +1118,7 @@ fi PACKAGE=bfd -VERSION=2.12.1 +VERSION=2.13 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1133,7 +1135,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1137: checking for working aclocal" >&5 +echo "configure:1139: 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. @@ -1146,7 +1148,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1150: checking for working autoconf" >&5 +echo "configure:1152: 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. @@ -1159,7 +1161,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1163: checking for working automake" >&5 +echo "configure:1165: 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. @@ -1172,7 +1174,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1176: checking for working autoheader" >&5 +echo "configure:1178: 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. @@ -1185,7 +1187,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1189: checking for working makeinfo" >&5 +echo "configure:1191: 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. @@ -1199,7 +1201,7 @@ fi # Uncomment the next line to remove the date from the reported bfd version -is_release=y +# is_release=y bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'` @@ -1221,7 +1223,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1225: checking for $ac_word" >&5 +echo "configure:1227: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1253,7 +1255,7 @@ fi # 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:1257: checking for $ac_word" >&5 +echo "configure:1259: 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 @@ -1285,7 +1287,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:1289: checking for $ac_word" >&5 +echo "configure:1291: 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 @@ -1400,7 +1402,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:1404: checking for ld used by GCC" >&5 +echo "configure:1406: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1430,10 +1432,10 @@ echo "configure:1404: 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:1434: checking for GNU ld" >&5 +echo "configure:1436: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1437: checking for non-GNU ld" >&5 +echo "configure:1439: 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 @@ -1468,7 +1470,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:1472: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1474: 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 @@ -1485,7 +1487,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:1489: checking for $LD option to reload object files" >&5 +echo "configure:1491: 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 @@ -1497,7 +1499,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:1501: checking for BSD-compatible nm" >&5 +echo "configure:1503: 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 @@ -1535,7 +1537,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:1539: checking whether ln -s works" >&5 +echo "configure:1541: 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 @@ -1556,7 +1558,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1560: checking how to recognise dependant libraries" >&5 +echo "configure:1562: 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 @@ -1729,13 +1731,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:1733: checking for object suffix" >&5 +echo "configure:1735: 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:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1755,7 +1757,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1759: checking for executable suffix" >&5 +echo "configure:1761: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1765,10 +1767,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1792,7 +1794,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:1796: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1798: 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 @@ -1854,7 +1856,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:1858: checking for file" >&5 +echo "configure:1860: 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 @@ -1925,7 +1927,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:1929: checking for $ac_word" >&5 +echo "configure:1931: 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 @@ -1957,7 +1959,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:1961: checking for $ac_word" >&5 +echo "configure:1963: 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 @@ -1992,7 +1994,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:1996: checking for $ac_word" >&5 +echo "configure:1998: 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 @@ -2024,7 +2026,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:2028: checking for $ac_word" >&5 +echo "configure:2030: 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 @@ -2091,8 +2093,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 2095 "configure"' > conftest.$ac_ext - if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2097 "configure"' > conftest.$ac_ext + if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2111,7 +2113,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2129,7 +2131,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:2133: checking whether the C compiler needs -belf" >&5 +echo "configure:2135: 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 @@ -2142,14 +2144,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 2146 "configure" +#line 2148 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2155: \"$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 @@ -2339,7 +2341,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2343: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2345: 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" @@ -2361,10 +2363,45 @@ fi MAINT=$MAINTAINER_MODE_TRUE +echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6 +echo "configure:2368: checking whether to install libbfd" >&5 + # Check whether --enable-install-libbfd or --disable-install-libbfd was given. +if test "${enable_install_libbfd+set}" = set; then + enableval="$enable_install_libbfd" + install_libbfd_p=$enableval +else + if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then + install_libbfd_p=yes + else + install_libbfd_p=no + fi +fi + + echo "$ac_t""$install_libbfd_p" 1>&6 + + +if test $install_libbfd_p = yes; then + INSTALL_LIBBFD_TRUE= + INSTALL_LIBBFD_FALSE='#' +else + INSTALL_LIBBFD_TRUE='#' + INSTALL_LIBBFD_FALSE= +fi + # libbfd.a is a host library containing target dependent code + bfdlibdir='$(libdir)' + bfdincludedir='$(includedir)' + if test "${host}" != "${target}"; then + bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' + bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' + fi + + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2368: checking for executable suffix" >&5 +echo "configure:2405: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2374,10 +2411,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2404,7 +2441,7 @@ bfd_default_target_size=32 # 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:2408: checking for $ac_word" >&5 +echo "configure:2445: 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 @@ -2434,7 +2471,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:2438: checking for $ac_word" >&5 +echo "configure:2475: 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 @@ -2485,7 +2522,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:2489: checking for $ac_word" >&5 +echo "configure:2526: 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 @@ -2517,7 +2554,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2521: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2558: 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. @@ -2528,12 +2565,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2532 "configure" +#line 2569 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2574: \"$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 @@ -2559,12 +2596,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:2563: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2600: 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:2568: checking whether we are using GNU C" >&5 +echo "configure:2605: 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 @@ -2573,7 +2610,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2577: \"$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:2614: \"$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 @@ -2592,7 +2629,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:2596: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2633: 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 @@ -2624,9 +2661,9 @@ else fi -ALL_LINGUAS="fr tr ja es sv" +ALL_LINGUAS="fr tr ja es sv da" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2630: checking how to run the C preprocessor" >&5 +echo "configure:2667: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2641,13 +2678,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 2645 "configure" +#line 2682 "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:2651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2688: \"$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 : @@ -2658,13 +2695,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2662 "configure" +#line 2699 "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:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2705: \"$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 : @@ -2675,13 +2712,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2679 "configure" +#line 2716 "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:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2722: \"$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 : @@ -2708,7 +2745,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:2712: checking for $ac_word" >&5 +echo "configure:2749: 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 @@ -2736,12 +2773,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2740: checking for ANSI C header files" >&5 +echo "configure:2777: 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 2745 "configure" +#line 2782 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2749,7 +2786,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2790: \"$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* @@ -2766,7 +2803,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 2770 "configure" +#line 2807 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2784,7 +2821,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 2788 "configure" +#line 2825 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2805,7 +2842,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2809 "configure" +#line 2846 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2816,7 +2853,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2840,12 +2877,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2844: checking for working const" >&5 +echo "configure:2881: 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 2849 "configure" +#line 2886 "configure" #include "confdefs.h" int main() { @@ -2894,7 +2931,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2915,21 +2952,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2919: checking for inline" >&5 +echo "configure:2956: 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 2926 "configure" +#line 2963 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2955,12 +2992,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2959: checking for off_t" >&5 +echo "configure:2996: 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 2964 "configure" +#line 3001 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2988,12 +3025,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2992: checking for size_t" >&5 +echo "configure:3029: 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 2997 "configure" +#line 3034 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3023,19 +3060,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:3027: checking for working alloca.h" >&5 +echo "configure:3064: 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 3032 "configure" +#line 3069 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3076: \"$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 @@ -3056,12 +3093,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3060: checking for alloca" >&5 +echo "configure:3097: 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 3065 "configure" +#line 3102 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3089,7 +3126,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3130: \"$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 @@ -3121,12 +3158,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3125: checking whether alloca needs Cray hooks" >&5 +echo "configure:3162: 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 3130 "configure" +#line 3167 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3151,12 +3188,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:3155: checking for $ac_func" >&5 +echo "configure:3192: 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 3160 "configure" +#line 3197 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3179,7 +3216,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3220: \"$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 @@ -3206,7 +3243,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3210: checking stack direction for C alloca" >&5 +echo "configure:3247: 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 @@ -3214,7 +3251,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3218 "configure" +#line 3255 "configure" #include "confdefs.h" find_stack_direction () { @@ -3233,7 +3270,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3274: \"$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 @@ -3254,21 +3291,21 @@ EOF fi -for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h +for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3262: checking for $ac_hdr" >&5 +echo "configure:3299: 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 3267 "configure" +#line 3304 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3309: \"$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* @@ -3297,12 +3334,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3301: checking for $ac_func" >&5 +echo "configure:3338: 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 3306 "configure" +#line 3343 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3325,7 +3362,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3366: \"$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 @@ -3350,7 +3387,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3354: checking for working mmap" >&5 +echo "configure:3391: 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 @@ -3358,7 +3395,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3362 "configure" +#line 3399 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3386,24 +3423,11 @@ 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 @@ -3511,7 +3535,7 @@ main() } EOF -if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3539: \"$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 @@ -3539,17 +3563,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:3543: checking for $ac_hdr" >&5 +echo "configure:3567: 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 3548 "configure" +#line 3572 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3577: \"$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* @@ -3579,12 +3603,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3583: checking for $ac_func" >&5 +echo "configure:3607: 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 3588 "configure" +#line 3612 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3607,7 +3631,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3635: \"$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 @@ -3636,12 +3660,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3640: checking for $ac_func" >&5 +echo "configure:3664: 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 3645 "configure" +#line 3669 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3664,7 +3688,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3692: \"$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 @@ -3698,19 +3722,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3702: checking for LC_MESSAGES" >&5 +echo "configure:3726: 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 3707 "configure" +#line 3731 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3738: \"$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 @@ -3731,7 +3755,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3735: checking whether NLS is requested" >&5 +echo "configure:3759: 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" @@ -3751,7 +3775,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3755: checking whether included gettext is requested" >&5 +echo "configure:3779: 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" @@ -3770,17 +3794,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3774: checking for libintl.h" >&5 +echo "configure:3798: 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 3779 "configure" +#line 3803 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3808: \"$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* @@ -3797,19 +3821,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:3801: checking for gettext in libc" >&5 +echo "configure:3825: 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 3806 "configure" +#line 3830 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3837: \"$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 @@ -3825,7 +3849,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:3829: checking for bindtextdomain in -lintl" >&5 +echo "configure:3853: 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 @@ -3833,7 +3857,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3837 "configure" +#line 3861 "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 @@ -3844,7 +3868,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3872: \"$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 @@ -3860,19 +3884,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:3864: checking for gettext in libintl" >&5 +echo "configure:3888: 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 3869 "configure" +#line 3893 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3900: \"$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 @@ -3900,7 +3924,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:3904: checking for $ac_word" >&5 +echo "configure:3928: 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 @@ -3934,12 +3958,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3938: checking for $ac_func" >&5 +echo "configure:3962: 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 3943 "configure" +#line 3967 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3962,7 +3986,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3990: \"$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 @@ -3989,7 +4013,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:3993: checking for $ac_word" >&5 +echo "configure:4017: 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 @@ -4025,7 +4049,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:4029: checking for $ac_word" >&5 +echo "configure:4053: 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 @@ -4057,7 +4081,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4061 "configure" +#line 4085 "configure" #include "confdefs.h" int main() { @@ -4065,7 +4089,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4097,7 +4121,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:4101: checking for $ac_word" >&5 +echo "configure:4125: 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 @@ -4131,7 +4155,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:4135: checking for $ac_word" >&5 +echo "configure:4159: 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 @@ -4167,7 +4191,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:4171: checking for $ac_word" >&5 +echo "configure:4195: 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 @@ -4257,7 +4281,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4261: checking for catalogs to be installed" >&5 +echo "configure:4285: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4285,17 +4309,17 @@ echo "configure:4261: 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:4289: checking for linux/version.h" >&5 +echo "configure:4313: 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 4294 "configure" +#line 4318 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4323: \"$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* @@ -4373,7 +4397,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:4377: checking for a BSD compatible install" >&5 +echo "configure:4401: 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 @@ -4456,7 +4480,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4460: checking for build system executable suffix" >&5 +echo "configure:4484: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4484,17 +4508,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.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:4488: checking for $ac_hdr" >&5 +echo "configure:4512: 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 4493 "configure" +#line 4517 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4522: \"$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* @@ -4524,17 +4548,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4528: checking for $ac_hdr" >&5 +echo "configure:4552: 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 4533 "configure" +#line 4557 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4562: \"$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* @@ -4561,12 +4585,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4565: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4589: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4570 "configure" +#line 4594 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -4575,7 +4599,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4600,12 +4624,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:4604: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4628: 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 4609 "configure" +#line 4633 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4613,7 +4637,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4638,7 +4662,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:4642: checking for opendir in -ldir" >&5 +echo "configure:4666: 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 @@ -4646,7 +4670,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4650 "configure" +#line 4674 "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 @@ -4657,7 +4681,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4685: \"$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 @@ -4679,7 +4703,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4683: checking for opendir in -lx" >&5 +echo "configure:4707: 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 @@ -4687,7 +4711,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4691 "configure" +#line 4715 "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 @@ -4698,7 +4722,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4726: \"$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 @@ -4723,12 +4747,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4727: checking for $ac_func" >&5 +echo "configure:4751: 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 4732 "configure" +#line 4756 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4751,7 +4775,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4779: \"$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 @@ -4786,12 +4810,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4790: checking whether strstr must be declared" >&5 +echo "configure:4814: 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 4795 "configure" +#line 4819 "configure" #include "confdefs.h" #include <stdio.h> @@ -4812,7 +4836,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4833,12 +4857,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4837: checking whether malloc must be declared" >&5 +echo "configure:4861: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4842 "configure" +#line 4866 "configure" #include "confdefs.h" #include <stdio.h> @@ -4859,7 +4883,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4880,12 +4904,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4884: checking whether realloc must be declared" >&5 +echo "configure:4908: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4889 "configure" +#line 4913 "configure" #include "confdefs.h" #include <stdio.h> @@ -4906,7 +4930,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4927,12 +4951,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4931: checking whether free must be declared" >&5 +echo "configure:4955: 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 4936 "configure" +#line 4960 "configure" #include "confdefs.h" #include <stdio.h> @@ -4953,7 +4977,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4974,12 +4998,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4978: checking whether getenv must be declared" >&5 +echo "configure:5002: 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 4983 "configure" +#line 5007 "configure" #include "confdefs.h" #include <stdio.h> @@ -5000,7 +5024,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:5004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5034,7 +5058,9 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; - alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; + alpha*-*-netbsd* | alpha*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; alpha*-*-*) COREFILE=osf-core.lo ;; arm-*-freebsd*) COREFILE='' ;; arm-*-netbsd*) COREFILE=netbsd-core.lo ;; @@ -5156,8 +5182,11 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/m68kaux.h"' ;; - m88*-*-sysv4*) ;; - m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;; + m88*-*-sysv4*) + ;; + m88*-motorola-sysv*) + COREFILE=ptrace-core.lo + ;; m88*-*-mach3*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/m88kmach3.h"' @@ -5169,23 +5198,29 @@ if test "${target}" = "${host}"; then ns32k-*-netbsd* | ns32k-*-openbsd*) COREFILE=netbsd-core.lo ;; - rs6000-*-lynx*) COREFILE=lynx-core.lo ;; + rs6000-*-lynx*) + COREFILE=lynx-core.lo + ;; + rs6000-*-aix5.* | powerpc-*-aix5.*) + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" + ;; rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) COREFILE=rs6000-core.lo COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE # have c_impl as a member of struct core_dumpx echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6 -echo "configure:5180: checking for c_impl in struct core_dumpx" >&5 +echo "configure:5215: checking for c_impl in struct core_dumpx" >&5 cat > conftest.$ac_ext <<EOF -#line 5182 "configure" +#line 5217 "configure" #include "confdefs.h" #include <core.h> int main() { struct core_dumpx c; c.c_impl = 0; ; return 0; } EOF -if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ST_C_IMPL 1 @@ -5210,13 +5245,14 @@ rm -f conftest* powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; s390*-*-*) COREFILE=trad-core.lo ;; sh*-*-netbsd*) COREFILE=netbsd-core.lo ;; - sparc-*-netbsd* | sparc-*-openbsd*) + sparc-*-netbsd* | sparc*-*-openbsd*) COREFILE=netbsd-core.lo ;; tahoe-*-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/tahoe.h"' ;; + vax-*-netbsd*) COREFILE=netbsd-core.lo ;; vax-*-ultrix2*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxult2.h"' @@ -5252,17 +5288,17 @@ rm -f conftest* do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5256: checking for $ac_hdr" >&5 +echo "configure:5292: 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 5261 "configure" +#line 5297 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5302: \"$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* @@ -5290,12 +5326,12 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5294: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5330: checking for prstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5299 "configure" +#line 5335 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5304,7 +5340,7 @@ int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5326,12 +5362,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5330: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5366: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5335 "configure" +#line 5371 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5340,7 +5376,7 @@ int main() { prstatus32_t avar ; return 0; } EOF -if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5362,12 +5398,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5366: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5402: checking for prstatus_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5371 "configure" +#line 5407 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5376,7 +5412,7 @@ int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5398,12 +5434,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5402: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5438: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5407 "configure" +#line 5443 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5412,7 +5448,7 @@ int main() { prstatus32_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5434,12 +5470,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5438: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5474: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5443 "configure" +#line 5479 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5448,7 +5484,7 @@ int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5470,12 +5506,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5474: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5510: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5479 "configure" +#line 5515 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5484,7 +5520,7 @@ int main() { pxstatus_t avar ; return 0; } EOF -if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5506,12 +5542,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5510: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5546: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5515 "configure" +#line 5551 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5520,7 +5556,7 @@ int main() { pstatus32_t avar ; return 0; } EOF -if { (eval echo configure:5524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5542,12 +5578,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5546: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5582: checking for prpsinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5551 "configure" +#line 5587 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5556,7 +5592,7 @@ int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5578,12 +5614,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5582: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5618: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5587 "configure" +#line 5623 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5592,7 +5628,7 @@ int main() { prpsinfo32_t avar ; return 0; } EOF -if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5614,12 +5650,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5618: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5654: checking for psinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5623 "configure" +#line 5659 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5628,7 +5664,7 @@ int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5650,12 +5686,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5654: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5690: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5659 "configure" +#line 5695 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5664,7 +5700,7 @@ int main() { psinfo32_t avar ; return 0; } EOF -if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5686,12 +5722,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5690: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5726: checking for lwpstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5695 "configure" +#line 5731 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5700,7 +5736,7 @@ int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5722,12 +5758,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5726: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5762: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5731 "configure" +#line 5767 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5736,7 +5772,7 @@ int main() { lwpxstatus_t avar ; return 0; } EOF -if { (eval echo configure:5740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -5758,12 +5794,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5762: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5798: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5767 "configure" +#line 5803 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5772,7 +5808,7 @@ int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:5776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5794,12 +5830,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5798: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5834: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5803 "configure" +#line 5839 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5808,7 +5844,7 @@ int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5830,12 +5866,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5834: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5870: checking for win32_pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5839 "configure" +#line 5875 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5844,7 +5880,7 @@ int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5985,19 +6021,9 @@ do # This list is alphabetized to make it easy to compare # with the two vector lists in targets.c. For the same reason, # use one entry per line, even though this leads to long lines. - # FIXME: We include cofflink.lo not because it's needed for - # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec - # which needs it but does not list it. Should be fixed in right place. - bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" - target_size=64 ;; - bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" - target_size=64 ;; - bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" - target_size=64 ;; - bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" - target_size=64 ;; a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; + aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; @@ -6024,16 +6050,20 @@ do bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; - bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; + bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; + bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; + bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -6043,7 +6073,7 @@ do bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; - bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;; bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;; @@ -6060,6 +6090,13 @@ do bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; + # FIXME: We include cofflink.lo not because it's needed for + # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec + # which needs it but does not list it. Should be fixed in right place. + bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; + bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; @@ -6067,14 +6104,16 @@ do bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; - bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; - bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; @@ -6083,22 +6122,24 @@ do bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; - cisco_core_big_vec) tb="$tb cisco-core.lo" ;; - cisco_core_little_vec) tb="$tb cisco-core.lo" ;; cris_aout_vec) tb="$tb aout-cris.lo" ;; demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; @@ -6140,6 +6181,7 @@ do m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; m88kbcs_vec) tb="$tb coff-m88k.lo" ;; + m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; @@ -6158,7 +6200,7 @@ do pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; ppcboot_vec) tb="$tb ppcboot.lo" ;; riscix_vec) tb="$tb aout32.lo riscix.lo" ;; - rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;; + rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; @@ -6173,10 +6215,7 @@ do sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; - srec_vec) tb="$tb srec.lo" ;; sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; - symbolsrec_vec) tb="$tb srec.lo" ;; - tekhex_vec) tb="$tb tekhex.lo" ;; tic30_aout_vec) tb="$tb aout-tic30.lo" ;; tic30_coff_vec) tb="$tb coff-tic30.lo" ;; tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; @@ -6186,6 +6225,9 @@ do tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; + vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; + vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; + vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; versados_vec) tb="$tb versados.lo" ;; vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;; vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; @@ -6193,6 +6235,13 @@ do we32kcoff_vec) tb="$tb coff-we32k.lo" ;; z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; + # These appear out of order in targets.c + srec_vec) tb="$tb srec.lo" ;; + symbolsrec_vec) tb="$tb srec.lo" ;; + tekhex_vec) tb="$tb tekhex.lo" ;; + cisco_core_big_vec) tb="$tb cisco-core.lo" ;; + cisco_core_little_vec) tb="$tb cisco-core.lo" ;; + "") ;; *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; esac @@ -6261,10 +6310,10 @@ case ${host64}-${target64}-${want64} in if test -n "$GCC" ; then bad_64bit_gcc=no; echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 -echo "configure:6265: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6314: checking for gcc version with buggy 64-bit support" >&5 # Add more tests for gcc versions with non-working 64-bit support here. cat > conftest.$ac_ext <<EOF -#line 6268 "configure" +#line 6317 "configure" #include "confdefs.h" :__GNUC__:__GNUC_MINOR__:__i386__: EOF @@ -6305,21 +6354,21 @@ test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selar test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h +for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6313: checking for $ac_hdr" >&5 +echo "configure:6362: 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 6318 "configure" +#line 6367 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6372: \"$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* @@ -6348,12 +6397,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6352: checking for $ac_func" >&5 +echo "configure:6401: 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 6357 "configure" +#line 6406 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6376,7 +6425,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6429: \"$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 @@ -6401,7 +6450,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6405: checking for working mmap" >&5 +echo "configure:6454: 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 @@ -6409,7 +6458,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 6413 "configure" +#line 6462 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -6437,24 +6486,11 @@ 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 @@ -6562,7 +6598,7 @@ main() } EOF -if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6602: \"$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 @@ -6587,12 +6623,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6591: checking for $ac_func" >&5 +echo "configure:6627: 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 6596 "configure" +#line 6632 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6615,7 +6651,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6655: \"$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 @@ -6821,6 +6857,10 @@ s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g +s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g +s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g +s%@bfdlibdir@%$bfdlibdir%g +s%@bfdincludedir@%$bfdincludedir%g s%@CPP@%$CPP%g s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in index defa540..22292f2 100644 --- a/contrib/binutils/bfd/configure.in +++ b/contrib/binutils/bfd/configure.in @@ -7,9 +7,9 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.12.1) +AM_INIT_AUTOMAKE(bfd, 2.13) # Uncomment the next line to remove the date from the reported bfd version -is_release=y +# is_release=y changequote(,)dnl bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'` @@ -98,6 +98,7 @@ if test -z "$target" ; then fi AM_MAINTAINER_MODE +AM_INSTALL_LIBBFD AC_EXEEXT host64=false @@ -108,7 +109,7 @@ bfd_default_target_size=32 AC_PROG_CC -ALL_LINGUAS="fr tr ja es sv" +ALL_LINGUAS="fr tr ja es sv da" CY_GNU_GETTEXT # Permit host specific settings. @@ -162,7 +163,9 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; - alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; + alpha*-*-netbsd* | alpha*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; alpha*-*-*) COREFILE=osf-core.lo ;; arm-*-freebsd*) COREFILE='' ;; arm-*-netbsd*) COREFILE=netbsd-core.lo ;; @@ -308,8 +311,11 @@ changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/m68kaux.h"' ;; - m88*-*-sysv4*) ;; - m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;; + m88*-*-sysv4*) + ;; + m88*-motorola-sysv*) + COREFILE=ptrace-core.lo + ;; m88*-*-mach3*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/m88kmach3.h"' @@ -321,7 +327,13 @@ changequote([,])dnl ns32k-*-netbsd* | ns32k-*-openbsd*) COREFILE=netbsd-core.lo ;; - rs6000-*-lynx*) COREFILE=lynx-core.lo ;; + rs6000-*-lynx*) + COREFILE=lynx-core.lo + ;; + rs6000-*-aix5.* | powerpc-*-aix5.*) + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" + ;; changequote(,)dnl rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) changequote([,])dnl @@ -346,13 +358,14 @@ changequote([,])dnl powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; s390*-*-*) COREFILE=trad-core.lo ;; sh*-*-netbsd*) COREFILE=netbsd-core.lo ;; - sparc-*-netbsd* | sparc-*-openbsd*) + sparc-*-netbsd* | sparc*-*-openbsd*) COREFILE=netbsd-core.lo ;; tahoe-*-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/tahoe.h"' ;; + vax-*-netbsd*) COREFILE=netbsd-core.lo ;; vax-*-ultrix2*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxult2.h"' @@ -522,19 +535,9 @@ do # This list is alphabetized to make it easy to compare # with the two vector lists in targets.c. For the same reason, # use one entry per line, even though this leads to long lines. - # FIXME: We include cofflink.lo not because it's needed for - # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec - # which needs it but does not list it. Should be fixed in right place. - bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" - target_size=64 ;; - bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" - target_size=64 ;; - bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" - target_size=64 ;; - bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" - target_size=64 ;; a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; + aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; @@ -561,16 +564,20 @@ do bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; - bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; + bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; + bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; + bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -580,7 +587,7 @@ do bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; - bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;; bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;; @@ -597,6 +604,13 @@ do bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; + # FIXME: We include cofflink.lo not because it's needed for + # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec + # which needs it but does not list it. Should be fixed in right place. + bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; + bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; @@ -604,14 +618,16 @@ do bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; - bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; - bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; @@ -620,22 +636,24 @@ do bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;; + bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; - cisco_core_big_vec) tb="$tb cisco-core.lo" ;; - cisco_core_little_vec) tb="$tb cisco-core.lo" ;; cris_aout_vec) tb="$tb aout-cris.lo" ;; demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; @@ -677,6 +695,7 @@ do m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; m88kbcs_vec) tb="$tb coff-m88k.lo" ;; + m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; @@ -695,7 +714,7 @@ do pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; ppcboot_vec) tb="$tb ppcboot.lo" ;; riscix_vec) tb="$tb aout32.lo riscix.lo" ;; - rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;; + rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; @@ -710,10 +729,7 @@ do sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; - srec_vec) tb="$tb srec.lo" ;; sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; - symbolsrec_vec) tb="$tb srec.lo" ;; - tekhex_vec) tb="$tb tekhex.lo" ;; tic30_aout_vec) tb="$tb aout-tic30.lo" ;; tic30_coff_vec) tb="$tb coff-tic30.lo" ;; tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; @@ -723,6 +739,9 @@ do tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; + vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; + vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; + vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; versados_vec) tb="$tb versados.lo" ;; vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;; vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; @@ -730,6 +749,13 @@ do we32kcoff_vec) tb="$tb coff-we32k.lo" ;; z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; + # These appear out of order in targets.c + srec_vec) tb="$tb srec.lo" ;; + symbolsrec_vec) tb="$tb srec.lo" ;; + tekhex_vec) tb="$tb tekhex.lo" ;; + cisco_core_big_vec) tb="$tb cisco-core.lo" ;; + cisco_core_little_vec) tb="$tb cisco-core.lo" ;; + "") ;; *) AC_MSG_ERROR(*** unknown target vector $vec) ;; esac diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c index 609c4e6..2414225 100644 --- a/contrib/binutils/bfd/corefile.c +++ b/contrib/binutils/bfd/corefile.c @@ -1,5 +1,5 @@ /* Core file generic interface routines for BFD. - Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -44,7 +44,7 @@ DESCRIPTION */ -CONST char * +const char * bfd_core_file_failing_command (abfd) bfd *abfd; { diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c index 8cd64e9..9faf648 100644 --- a/contrib/binutils/bfd/cpu-arm.c +++ b/contrib/binutils/bfd/cpu-arm.c @@ -1,70 +1,72 @@ /* BFD support for the ARM processor - Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright 1994, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" #include "libbfd.h" -static const bfd_arch_info_type *compatible +static const bfd_arch_info_type * compatible PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); -static boolean scan PARAMS ((const struct bfd_arch_info *, const char *)); +static boolean scan + PARAMS ((const struct bfd_arch_info *, const char *)); /* This routine is provided two arch_infos and works out which ARM machine which would be compatible with both and returns a pointer - to its info structure */ + to its info structure. */ static const bfd_arch_info_type * compatible (a,b) const bfd_arch_info_type * a; const bfd_arch_info_type * b; { - /* If a & b are for different architecture we can do nothing */ + /* If a & b are for different architecture we can do nothing. */ if (a->arch != b->arch) return NULL; - /* If a & b are for the same machine then all is well */ + /* If a & b are for the same machine then all is well. */ if (a->mach == b->mach) return a; - /* Otherwise if either a or b is the 'default' machine then - it can be polymorphed into the other */ + /* Otherwise if either a or b is the 'default' machine + then it can be polymorphed into the other. */ if (a->the_default) return b; if (b->the_default) return a; - /* So far all newer ARM architecture cores are supersets of previous cores */ + /* So far all newer ARM architecture cores are + supersets of previous cores. */ if (a->mach < b->mach) return b; else if (a->mach > b->mach) return a; - /* Never reached! */ + /* Never reached! */ return NULL; } static struct { - enum bfd_architecture arch; - char * name; + unsigned int mach; + char * name; } processors[] = { @@ -103,21 +105,21 @@ scan (info, string) { int i; - /* First test for an exact match */ + /* First test for an exact match. */ if (strcasecmp (string, info->printable_name) == 0) return true; - /* Next check for a processor name instead of an Architecture name */ + /* Next check for a processor name instead of an Architecture name. */ for (i = sizeof (processors) / sizeof (processors[0]); i--;) { - if (strcasecmp (string, processors[ i ].name) == 0) + if (strcasecmp (string, processors [i].name) == 0) break; } - if (i != -1 && info->arch == processors[ i ].arch) + if (i != -1 && info->mach == processors [i].mach) return true; - /* Finally check for the default architecture */ + /* Finally check for the default architecture. */ if (strcasecmp (string, "arm") == 0) return info->the_default; @@ -129,17 +131,17 @@ scan (info, string) static const bfd_arch_info_type arch_info_struct[] = { - N( bfd_mach_arm_2, "armv2", false, & arch_info_struct[1] ), - N( bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2] ), - N( bfd_mach_arm_3, "armv3", false, & arch_info_struct[3] ), - N( bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4] ), - N( bfd_mach_arm_4, "armv4", false, & arch_info_struct[5] ), - N( bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6] ), - N( bfd_mach_arm_5, "armv5", false, & arch_info_struct[7] ), - N( bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8] ), - N( bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9] ), - N( bfd_mach_arm_XScale, "xscale", false, NULL ) + N (bfd_mach_arm_2, "armv2", false, & arch_info_struct[1]), + N (bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2]), + N (bfd_mach_arm_3, "armv3", false, & arch_info_struct[3]), + N (bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4]), + N (bfd_mach_arm_4, "armv4", false, & arch_info_struct[5]), + N (bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6]), + N (bfd_mach_arm_5, "armv5", false, & arch_info_struct[7]), + N (bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8]), + N (bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9]), + N (bfd_mach_arm_XScale, "xscale", false, NULL) }; const bfd_arch_info_type bfd_arm_arch = - N( 0, "arm", true, & arch_info_struct[0] ); + N (0, "arm", true, & arch_info_struct[0]); diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c index d77b426..5523669 100644 --- a/contrib/binutils/bfd/cpu-powerpc.c +++ b/contrib/binutils/bfd/cpu-powerpc.c @@ -50,7 +50,8 @@ powerpc_compatible (a,b) const bfd_arch_info_type bfd_powerpc_archs[] = { -#if BFD_DEFAULT_TARGET_SIZE == 64 /* default arch must come first. */ +#if BFD_DEFAULT_TARGET_SIZE == 64 + /* Default arch must come first. */ { 64, /* 64 bits in a word */ 64, /* 64 bits in an address */ @@ -65,6 +66,8 @@ const bfd_arch_info_type bfd_powerpc_archs[] = bfd_default_scan, &bfd_powerpc_archs[1] }, + /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch + being immediately after the 64 bit default. */ { 32, /* 32 bits in a word */ 32, /* 32 bits in an address */ @@ -80,6 +83,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] = &bfd_powerpc_archs[2], }, #else + /* Default arch must come first. */ { 32, /* 32 bits in a word */ 32, /* 32 bits in an address */ @@ -94,6 +98,8 @@ const bfd_arch_info_type bfd_powerpc_archs[] = bfd_default_scan, &bfd_powerpc_archs[1], }, + /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch + being immediately after the 32 bit default. */ { 64, /* 64 bits in a word */ 64, /* 64 bits in an address */ diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog index 9f69475..3d1e30a 100644 --- a/contrib/binutils/bfd/doc/ChangeLog +++ b/contrib/binutils/bfd/doc/ChangeLog @@ -1,4 +1,44 @@ -2002-03-28 Alan Modra <amodra@bigpond.net.au> +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-08-28 John David Anglin <dave@hiauly1.hia.nrc.ca> + * chew.c (paramstuff, outputdots, perform, bang and usage): Remove + void from function definitions. + +2002-08-13 Alan Modra <amodra@bigpond.net.au> + + * header.sed: Strip tabs. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Fix quote style in last change. + * Makefile.in: Regenerate. + +2002-06-07 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (libbfd.h): Don't use "echo -n". + (libcoff.h, bfd.h): Likewise. + * Makefile.in: Regenerate. + +2002-06-06 Lars Brinkhoff <lars@nocrew.org> + + * bfdint.texi: Change registry@sco.com to registry@caldera.com. + +2002-06-05 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (libbfd.h): Add "Extracted from.." comment. + (libcoff.h, bfd.h): Likewise. + * Makefile.in: Regenerate. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * chew.c: Use #include "" instead of <> for local header files. + +2002-04-20 Alan Modra <amodra@bigpond.net.au> + + * Makefile.in: Regenerate. + +2002-02-11 Alan Modra <amodra@bigpond.net.au> * Makefile.in: Regenerate. diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am index cbfd342..0787143 100644 --- a/contrib/binutils/bfd/doc/Makefile.am +++ b/contrib/binutils/bfd/doc/Makefile.am @@ -209,7 +209,9 @@ libbfd.h: $(LIBBFD_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done @@ -226,7 +228,9 @@ libcoff.h: $(LIBCOFF_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done @@ -255,7 +259,9 @@ bfd.h: $(BFD_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done echo "#ifdef __cplusplus" >> $@ diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in index 0036c0b..8daf537 100644 --- a/contrib/binutils/bfd/doc/Makefile.in +++ b/contrib/binutils/bfd/doc/Makefile.in @@ -121,6 +121,8 @@ bfd_machines = @bfd_machines@ bfd_version = @bfd_version@ bfd_version_date = @bfd_version_date@ bfd_version_string = @bfd_version_string@ +bfdincludedir = @bfdincludedir@ +bfdlibdir = @bfdlibdir@ l = @l@ tdefaults = @tdefaults@ wordsize = @wordsize@ @@ -604,7 +606,9 @@ libbfd.h: $(LIBBFD_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done @@ -614,7 +618,9 @@ libcoff.h: $(LIBCOFF_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done @@ -624,7 +630,9 @@ bfd.h: $(BFD_H_DEP) case $$file in \ *-in.h) cat $$file >> $@ ;; \ */header.sed) break ;; \ - *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ + *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ + -e 's,$$,. */,' >> $@ ; \ + ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ esac; \ done echo "#ifdef __cplusplus" >> $@ diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi index eb4d180..0faf97d 100644 --- a/contrib/binutils/bfd/doc/archures.texi +++ b/contrib/binutils/bfd/doc/archures.texi @@ -159,6 +159,7 @@ enum bfd_architecture #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 bfd_arch_d30v, /* Mitsubishi D30V */ + bfd_arch_dlx, /* DLX */ bfd_arch_m68hc11, /* Motorola 68HC11 */ bfd_arch_m68hc12, /* Motorola 68HC12 */ bfd_arch_z8k, /* Zilog Z8000 */ @@ -212,6 +213,13 @@ enum bfd_architecture #define bfd_mach_am33 330 bfd_arch_fr30, #define bfd_mach_fr30 0x46523330 + bfd_arch_frv, +#define bfd_mach_frv 0 +#define bfd_mach_frvsimple 1 +#define bfd_mach_fr300 300 +#define bfd_mach_fr400 400 +#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_fr500 500 bfd_arch_mcore, bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 0 diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi index 76fd832..d2996dc 100644 --- a/contrib/binutils/bfd/doc/bfdint.texi +++ b/contrib/binutils/bfd/doc/bfdint.texi @@ -1545,9 +1545,9 @@ Define @samp{ELF_ARCH} to the BFD architecture (an element of the @item Define @samp{ELF_MACHINE_CODE} to the magic number which should appear in the @samp{e_machine} field of the ELF header. As of this writing, -these magic numbers are assigned by SCO; if you want to get a magic +these magic numbers are assigned by Caldera; if you want to get a magic number for a particular processor, try sending a note to -@email{registry@@sco.com}. In the BFD sources, the magic numbers are +@email{registry@@caldera.com}. In the BFD sources, the magic numbers are found in @file{include/elf/common.h}; they have names beginning with @samp{EM_}. @item diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi index 0b85d3d..a6e0ad9 100644 --- a/contrib/binutils/bfd/doc/bfdt.texi +++ b/contrib/binutils/bfd/doc/bfdt.texi @@ -502,7 +502,8 @@ A base of 0 causes the function to interpret the string in hex if a leading "0x" or "0X" is found, otherwise in octal if a leading zero is found, otherwise in decimal. -Overflow is not detected. +If the value would overflow, the maximum @code{bfd_vma} value is +returned. @findex bfd_copy_private_bfd_data @subsubsection @code{bfd_copy_private_bfd_data} @@ -613,12 +614,21 @@ Stuff which should be documented: #define bfd_merge_sections(abfd, link_info) \ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) +#define bfd_discard_group(abfd, sec) \ + BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) + #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) +#define bfd_link_hash_table_free(abfd, hash) \ + BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) + #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) +#define bfd_link_just_syms(sec, info) \ + BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) + #define bfd_final_link(abfd, info) \ BFD_SEND (abfd, _bfd_final_link, (abfd, info)) diff --git a/contrib/binutils/bfd/doc/chew.c b/contrib/binutils/bfd/doc/chew.c index 11554eb..bdf76e4 100644 --- a/contrib/binutils/bfd/doc/chew.c +++ b/contrib/binutils/bfd/doc/chew.c @@ -82,7 +82,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foo. */ -#include <ansidecl.h> +#include "ansidecl.h" #include "sysdep.h" #include <assert.h> #include <stdio.h> @@ -485,7 +485,7 @@ print_stack_level () */ static void -paramstuff (void) +paramstuff () { unsigned int openp; unsigned int fname; @@ -626,7 +626,7 @@ manglecomments () /* Mod tos so that only lines with leading dots remain */ static void -outputdots (void) +outputdots () { unsigned int idx = 0; string_type out; @@ -1261,7 +1261,7 @@ lookup_word (word) } static void -perform (void) +perform () { tos = stack; @@ -1412,7 +1412,7 @@ compile (string) } static void -bang (void) +bang () { *(long *) ((isp[0])) = isp[-1]; isp -= 2; @@ -1487,7 +1487,7 @@ read_in (str, file) } static void -usage (void) +usage () { fprintf (stderr, "usage: -[d|i|g] <file >file\n"); exit (33); diff --git a/contrib/binutils/bfd/doc/elf.texi b/contrib/binutils/bfd/doc/elf.texi index 4f9434c..101001c 100644 --- a/contrib/binutils/bfd/doc/elf.texi +++ b/contrib/binutils/bfd/doc/elf.texi @@ -1,4 +1,6 @@ -@section ELF backends +@section +ELF backends + BFD support for ELF formats is being worked on. Currently, the best supported back ends are for sparc and i386 (running svr4 or Solaris 2). diff --git a/contrib/binutils/bfd/doc/header.sed b/contrib/binutils/bfd/doc/header.sed index ed27040..c58dc60 100644 --- a/contrib/binutils/bfd/doc/header.sed +++ b/contrib/binutils/bfd/doc/header.sed @@ -1,3 +1,4 @@ +s|[ ][ ]*| |g s|\(.*\) [^ ]*header.sed.*|\1| s|[^ ]*/||g s|^ *|"| diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi index 2f462fd..456fc29 100644 --- a/contrib/binutils/bfd/doc/reloc.texi +++ b/contrib/binutils/bfd/doc/reloc.texi @@ -716,6 +716,21 @@ Like BFD_RELOC_23_PCREL_S2, except that the source and target must share a common GP, and the target address is adjusted for STO_ALPHA_STD_GPLOAD. @end deffn +@deffn {} BFD_RELOC_ALPHA_TLSGD +@deffnx {} BFD_RELOC_ALPHA_TLSLDM +@deffnx {} BFD_RELOC_ALPHA_DTPMOD64 +@deffnx {} BFD_RELOC_ALPHA_GOTDTPREL16 +@deffnx {} BFD_RELOC_ALPHA_DTPREL64 +@deffnx {} BFD_RELOC_ALPHA_DTPREL_HI16 +@deffnx {} BFD_RELOC_ALPHA_DTPREL_LO16 +@deffnx {} BFD_RELOC_ALPHA_DTPREL16 +@deffnx {} BFD_RELOC_ALPHA_GOTTPREL16 +@deffnx {} BFD_RELOC_ALPHA_TPREL64 +@deffnx {} BFD_RELOC_ALPHA_TPREL_HI16 +@deffnx {} BFD_RELOC_ALPHA_TPREL_LO16 +@deffnx {} BFD_RELOC_ALPHA_TPREL16 +Alpha thread-local storage relocations. +@end deffn @deffn {} BFD_RELOC_MIPS_JMP Bits 27..2 of the relocation address shifted right 2 bits; simple reloc otherwise. @@ -768,6 +783,17 @@ Relocation against a MIPS literal section. @deffnx {} BFD_RELOC_MIPS_REL16 @deffnx {} BFD_RELOC_MIPS_RELGOT @deffnx {} BFD_RELOC_MIPS_JALR +@deffn {} BFD_RELOC_FRV_LABEL16 +@deffnx {} BFD_RELOC_FRV_LABEL24 +@deffnx {} BFD_RELOC_FRV_LO16 +@deffnx {} BFD_RELOC_FRV_HI16 +@deffnx {} BFD_RELOC_FRV_GPREL12 +@deffnx {} BFD_RELOC_FRV_GPRELU12 +@deffnx {} BFD_RELOC_FRV_GPREL32 +@deffnx {} BFD_RELOC_FRV_GPRELHI +@deffnx {} BFD_RELOC_FRV_GPRELLO +Fujitsu Frv Relocations. +@end deffn MIPS ELF relocations. @end deffn @deffn {} BFD_RELOC_386_GOT32 @@ -778,6 +804,15 @@ MIPS ELF relocations. @deffnx {} BFD_RELOC_386_RELATIVE @deffnx {} BFD_RELOC_386_GOTOFF @deffnx {} BFD_RELOC_386_GOTPC +@deffnx {} BFD_RELOC_386_TLS_LE +@deffnx {} BFD_RELOC_386_TLS_GD +@deffnx {} BFD_RELOC_386_TLS_LDM +@deffnx {} BFD_RELOC_386_TLS_LDO_32 +@deffnx {} BFD_RELOC_386_TLS_IE_32 +@deffnx {} BFD_RELOC_386_TLS_LE_32 +@deffnx {} BFD_RELOC_386_TLS_DTPMOD32 +@deffnx {} BFD_RELOC_386_TLS_DTPOFF32 +@deffnx {} BFD_RELOC_386_TLS_TPOFF32 i386/elf relocations @end deffn @deffn {} BFD_RELOC_X86_64_GOT32 @@ -1083,6 +1118,15 @@ This is a 32-bit absolute reloc. @deffn {} BFD_RELOC_D30V_32_PCREL This is a 32-bit pc-relative reloc. @end deffn +@deffn {} BFD_RELOC_DLX_HI16_S +DLX relocs +@end deffn +@deffn {} BFD_RELOC_DLX_LO16 +DLX relocs +@end deffn +@deffn {} BFD_RELOC_DLX_JMP26 +DLX relocs +@end deffn @deffn {} BFD_RELOC_M32R_24 Mitsubishi M32R relocs. This is a 24 bit absolute address. @@ -1488,12 +1532,25 @@ this offset in the reloc's section offset. @deffnx {} BFD_RELOC_IA64_IPLTMSB @deffnx {} BFD_RELOC_IA64_IPLTLSB @deffnx {} BFD_RELOC_IA64_COPY +@deffnx {} BFD_RELOC_IA64_LTOFF22X +@deffnx {} BFD_RELOC_IA64_LDXMOV +@deffnx {} BFD_RELOC_IA64_TPREL14 @deffnx {} BFD_RELOC_IA64_TPREL22 +@deffnx {} BFD_RELOC_IA64_TPREL64I @deffnx {} BFD_RELOC_IA64_TPREL64MSB @deffnx {} BFD_RELOC_IA64_TPREL64LSB -@deffnx {} BFD_RELOC_IA64_LTOFF_TP22 -@deffnx {} BFD_RELOC_IA64_LTOFF22X -@deffnx {} BFD_RELOC_IA64_LDXMOV +@deffnx {} BFD_RELOC_IA64_LTOFF_TPREL22 +@deffnx {} BFD_RELOC_IA64_DTPMOD64MSB +@deffnx {} BFD_RELOC_IA64_DTPMOD64LSB +@deffnx {} BFD_RELOC_IA64_LTOFF_DTPMOD22 +@deffnx {} BFD_RELOC_IA64_DTPREL14 +@deffnx {} BFD_RELOC_IA64_DTPREL22 +@deffnx {} BFD_RELOC_IA64_DTPREL64I +@deffnx {} BFD_RELOC_IA64_DTPREL32MSB +@deffnx {} BFD_RELOC_IA64_DTPREL32LSB +@deffnx {} BFD_RELOC_IA64_DTPREL64MSB +@deffnx {} BFD_RELOC_IA64_DTPREL64LSB +@deffnx {} BFD_RELOC_IA64_LTOFF_DTPREL22 Intel IA64 Relocations. @end deffn @deffn {} BFD_RELOC_M68HC11_HI8 @@ -1593,6 +1650,11 @@ H8 elf Relocations. @deffnx {} BFD_RELOC_XSTORMY16_FPTR16 Sony Xstormy16 Relocations. @end deffn +@deffn {} BFD_RELOC_VAX_GLOB_DAT +@deffnx {} BFD_RELOC_VAX_JMP_SLOT +@deffnx {} BFD_RELOC_VAX_RELATIVE +Relocations used by VAX ELF. +@end deffn @example diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi index 520a296..971fd04 100644 --- a/contrib/binutils/bfd/doc/section.texi +++ b/contrib/binutils/bfd/doc/section.texi @@ -188,12 +188,6 @@ typedef struct sec standard data. */ #define SEC_CONSTRUCTOR 0x100 - /* The section is a constructor, and should be placed at the - end of the text, data, or bss section(?). */ -#define SEC_CONSTRUCTOR_TEXT 0x1100 -#define SEC_CONSTRUCTOR_DATA 0x2100 -#define SEC_CONSTRUCTOR_BSS 0x3100 - /* The section has contents - a data section could be @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be @code{SEC_HAS_CONTENTS} */ @@ -214,6 +208,9 @@ typedef struct sec sections. */ #define SEC_COFF_SHARED_LIBRARY 0x800 + /* The section contains thread local data. */ +#define SEC_THREAD_LOCAL 0x1000 + /* The section has GOT references. This flag is only for the linker, and is currently only used by the elf32-hppa back end. It will be set if global offset table references were detected @@ -771,7 +768,18 @@ void _bfd_strip_section_from_output @end example @strong{Description}@* Remove @var{section} from the output. If the output section -becomes empty, remove it from the output bfd. @var{info} may -be NULL; if it is not, it is used to decide whether the output -section is empty. +becomes empty, remove it from the output bfd. + +This function won't actually do anything except twiddle flags +if called too late in the linking process, when it's not safe +to remove sections. + +@findex bfd_generic_discard_group +@subsubsection @code{bfd_generic_discard_group} +@strong{Synopsis} +@example +boolean bfd_generic_discard_group (bfd *abfd, asection *group); +@end example +@strong{Description}@* +Remove all members of @var{group} from the output. diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi index 1987e23..cb29e7d 100644 --- a/contrib/binutils/bfd/doc/syms.texi +++ b/contrib/binutils/bfd/doc/syms.texi @@ -243,6 +243,9 @@ typedef struct symbol_cache_entry as well. */ #define BSF_DEBUGGING_RELOC 0x20000 + /* This symbol is thread local. Used in ELF. */ +#define BSF_THREAD_LOCAL 0x40000 + flagword flags; /* A pointer to the section to which this symbol is diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi index c45d6b6..5b8d2b8 100644 --- a/contrib/binutils/bfd/doc/targets.texi +++ b/contrib/binutils/bfd/doc/targets.texi @@ -375,11 +375,14 @@ CONCAT2 (NAME,_sizeof_headers), \ CONCAT2 (NAME,_bfd_get_relocated_section_contents), \ CONCAT2 (NAME,_bfd_relax_section), \ CONCAT2 (NAME,_bfd_link_hash_table_create), \ +CONCAT2 (NAME,_bfd_link_hash_table_free), \ CONCAT2 (NAME,_bfd_link_add_symbols), \ +CONCAT2 (NAME,_bfd_link_just_syms), \ CONCAT2 (NAME,_bfd_final_link), \ CONCAT2 (NAME,_bfd_link_split_section), \ CONCAT2 (NAME,_bfd_gc_sections), \ -CONCAT2 (NAME,_bfd_merge_sections) +CONCAT2 (NAME,_bfd_merge_sections), \ +CONCAT2 (NAME,_bfd_discard_group) int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); bfd_byte *(*_bfd_get_relocated_section_contents) PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, @@ -392,9 +395,15 @@ CONCAT2 (NAME,_bfd_merge_sections) different information in this table. */ struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); + /* Release the memory associated with the linker hash table. */ + void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *)); + /* Add symbols from this object file into the hash table. */ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); + /* Indicate that we are only retrieving symbol values from this section. */ + void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *)); + /* Do a link based on the link_order structures attached to each section of the BFD. */ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); @@ -408,6 +417,9 @@ CONCAT2 (NAME,_bfd_merge_sections) /* Attempt to merge SEC_MERGE sections. */ boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); + /* Discard members of a group. */ + boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *)); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \ diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c index e3b8e27..5aadadd 100644 --- a/contrib/binutils/bfd/dwarf2.c +++ b/contrib/binutils/bfd/dwarf2.c @@ -13,21 +13,21 @@ based on Fred Fish's (Cygnus Support) implementation of DWARF 1 support in dwarfread.c -This file is part of BFD. + This file is part of BFD. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -856,13 +856,18 @@ concat_filename (table, file) filename = table->files[file - 1].name; if (IS_ABSOLUTE_PATH(filename)) return filename; - else { char* dirname = (table->files[file - 1].dir ? table->dirs[table->files[file - 1].dir - 1] : table->comp_dir); - return (char*) concat (dirname, "/", filename, NULL); + + /* Not all tools set DW_AT_comp_dir, so dirname may be unknown. The + best we can do is return the filename part. */ + if (dirname == NULL) + return filename; + else + return (char*) concat (dirname, "/", filename, NULL); } } @@ -990,6 +995,13 @@ decode_line_info (unit, stash) line_ptr += 8; offset_size = 8; } + else if (lh.total_length == 0 && unit->addr_size == 8) + { + /* Handle (non-standard) 64-bit DWARF2 formats. */ + lh.total_length = read_4_bytes (abfd, line_ptr); + line_ptr += 4; + offset_size = 8; + } line_end = line_ptr + lh.total_length; lh.version = read_2_bytes (abfd, line_ptr); line_ptr += 2; @@ -1072,13 +1084,19 @@ decode_line_info (unit, stash) { /* State machine registers. */ bfd_vma address = 0; - char* filename = concat_filename (table, 1); + char * filename = concat_filename (table, 1); unsigned int line = 1; unsigned int column = 0; int is_stmt = lh.default_is_stmt; int basic_block = 0; - int end_sequence = 0, need_low_pc = 1; - bfd_vma low_pc = 0; + int end_sequence = 0; + /* eraxxon@alumni.rice.edu: Against the DWARF2 specs, some + compilers generate address sequences that are wildly out of + order using DW_LNE_set_address (e.g. Intel C++ 6.0 compiler + for ia64-Linux). Thus, to determine the low and high + address, we must compare on every DW_LNS_copy, etc. */ + bfd_vma low_pc = 0; + bfd_vma high_pc = 0; /* Decode the table. */ while (! end_sequence) @@ -1087,7 +1105,8 @@ decode_line_info (unit, stash) line_ptr += 1; if (op_code >= lh.opcode_base) - { /* Special operand. */ + { + /* Special operand. */ adj_opcode = op_code - lh.opcode_base; address += (adj_opcode / lh.line_range) * lh.minimum_instruction_length; @@ -1095,29 +1114,30 @@ decode_line_info (unit, stash) /* Append row to matrix using current values. */ add_line_info (table, address, filename, line, column, 0); basic_block = 1; - if (need_low_pc) - { - need_low_pc = 0; - low_pc = address; - } + if (low_pc == 0 || address < low_pc) + low_pc = address; + if (address > high_pc) + high_pc = address; } else switch (op_code) { case DW_LNS_extended_op: - line_ptr += 1; /* Ignore length. */ + /* Ignore length. */ + line_ptr += 1; extended_op = read_1_byte (abfd, line_ptr); line_ptr += 1; + switch (extended_op) { case DW_LNE_end_sequence: end_sequence = 1; add_line_info (table, address, filename, line, column, end_sequence); - if (need_low_pc) - { - need_low_pc = 0; - low_pc = address; - } + arange_add (unit, low_pc, high_pc); + if (low_pc == 0 || address < low_pc) + low_pc = address; + if (address > high_pc) + high_pc = address; arange_add (unit, low_pc, address); break; case DW_LNE_set_address: @@ -1157,11 +1177,10 @@ decode_line_info (unit, stash) case DW_LNS_copy: add_line_info (table, address, filename, line, column, 0); basic_block = 0; - if (need_low_pc) - { - need_low_pc = 0; - low_pc = address; - } + if (low_pc == 0 || address < low_pc) + low_pc = address; + if (address > high_pc) + high_pc = address; break; case DW_LNS_advance_pc: address += lh.minimum_instruction_length @@ -1176,8 +1195,8 @@ decode_line_info (unit, stash) { unsigned int file; - /* The file and directory tables are 0 based, the references - are 1 based. */ + /* The file and directory tables are 0 + based, the references are 1 based. */ file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); line_ptr += bytes_read; filename = concat_filename (table, file); @@ -1202,8 +1221,9 @@ decode_line_info (unit, stash) line_ptr += 2; break; default: - { /* Unknown standard opcode, ignore it. */ + { int i; + /* Unknown standard opcode, ignore it. */ for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++) { (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); @@ -1222,10 +1242,7 @@ decode_line_info (unit, stash) LINENUMBER_PTR, are pointers to the objects to be filled in. */ static boolean -lookup_address_in_line_info_table (table, - addr, - function, - filename_ptr, +lookup_address_in_line_info_table (table, addr, function, filename_ptr, linenumber_ptr) struct line_info_table* table; bfd_vma addr; @@ -1286,9 +1303,7 @@ lookup_address_in_line_info_table (table, /* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true. */ static boolean -lookup_address_in_function_table (table, - addr, - function_ptr, +lookup_address_in_function_table (table, addr, function_ptr, functionname_ptr) struct funcinfo* table; bfd_vma addr; @@ -1654,9 +1669,8 @@ comp_unit_contains_address (unit, addr) false otherwise. */ static boolean -comp_unit_find_nearest_line (unit, addr, - filename_ptr, functionname_ptr, linenumber_ptr, - stash) +comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr, + linenumber_ptr, stash) struct comp_unit* unit; bfd_vma addr; const char **filename_ptr; @@ -1696,26 +1710,23 @@ comp_unit_find_nearest_line (unit, addr, } function = NULL; - func_p = lookup_address_in_function_table (unit->function_table, - addr, - &function, - functionname_ptr); - line_p = lookup_address_in_line_info_table (unit->line_table, - addr, - function, - filename_ptr, + func_p = lookup_address_in_function_table (unit->function_table, addr, + &function, functionname_ptr); + line_p = lookup_address_in_line_info_table (unit->line_table, addr, + function, filename_ptr, linenumber_ptr); return line_p || func_p; } -/* Locate a section in a BFD containing debugging info. The search starts from the - section after AFTER_SEC, or from the first section in the BFD if AFTER_SEC is - NULL. The search works by examining the names of the sections. There are two - permissiable names. The first is .debug_info. This is the standard DWARF2 name. - The second is a prefix .gnu.linkonce.wi. This is a variation on the .debug_info - section which has a checksum describing the contents appended onto the name. This - allows the linker to identify and discard duplicate debugging sections for - different compilation units. */ +/* Locate a section in a BFD containing debugging info. The search starts + from the section after AFTER_SEC, or from the first section in the BFD if + AFTER_SEC is NULL. The search works by examining the names of the + sections. There are two permissiable names. The first is .debug_info. + This is the standard DWARF2 name. The second is a prefix .gnu.linkonce.wi. + This is a variation on the .debug_info section which has a checksum + describing the contents appended onto the name. This allows the linker to + identify and discard duplicate debugging sections for different + compilation units. */ #define DWARF2_DEBUG_INFO ".debug_info" #define GNU_LINKONCE_INFO ".gnu.linkonce.wi." @@ -1754,8 +1765,7 @@ find_debug_info (abfd, after_sec) boolean _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, filename_ptr, functionname_ptr, - linenumber_ptr, - addr_size, pinfo) + linenumber_ptr, addr_size, pinfo) bfd *abfd; asection *section; asymbol **symbols; @@ -1895,6 +1905,13 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, length = read_8_bytes (abfd, stash->info_ptr + 4); stash->info_ptr += 8; } + else if (length == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats. */ + offset_size = 8; + length = read_4_bytes (abfd, stash->info_ptr + 4); + stash->info_ptr += 4; + } } else length = read_8_bytes (abfd, stash->info_ptr); diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c index 70224cb..c8c56f8 100644 --- a/contrib/binutils/bfd/ecoff.c +++ b/contrib/binutils/bfd/ecoff.c @@ -4,21 +4,21 @@ Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -46,29 +46,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Prototypes for static functions. */ -static int ecoff_get_magic PARAMS ((bfd *abfd)); -static long ecoff_sec_to_styp_flags PARAMS ((const char *name, - flagword flags)); -static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *abfd)); -static boolean ecoff_set_symbol_info PARAMS ((bfd *abfd, SYMR *ecoff_sym, - asymbol *asym, int ext, int weak)); -static void ecoff_emit_aggregate PARAMS ((bfd *abfd, FDR *fdr, - char *string, - RNDXR *rndx, long isym, - const char *which)); -static char *ecoff_type_to_string PARAMS ((bfd *abfd, FDR *fdr, - unsigned int indx)); -static boolean ecoff_slurp_reloc_table PARAMS ((bfd *abfd, asection *section, - asymbol **symbols)); +static int ecoff_get_magic PARAMS ((bfd *)); +static long ecoff_sec_to_styp_flags PARAMS ((const char *, flagword)); +static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *)); +static boolean ecoff_set_symbol_info PARAMS ((bfd *, SYMR *, asymbol *, int, int)); +static void ecoff_emit_aggregate PARAMS ((bfd *, FDR *, char *, RNDXR *, long, const char *)); +static char *ecoff_type_to_string PARAMS ((bfd *, FDR *, unsigned int)); +static boolean ecoff_slurp_reloc_table PARAMS ((bfd *, asection *, asymbol **)); static int ecoff_sort_hdrs PARAMS ((const PTR, const PTR)); -static boolean ecoff_compute_section_file_positions PARAMS ((bfd *abfd)); -static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *abfd)); +static boolean ecoff_compute_section_file_positions PARAMS ((bfd *)); +static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *)); static boolean ecoff_get_extr PARAMS ((asymbol *, EXTR *)); static void ecoff_set_index PARAMS ((asymbol *, bfd_size_type)); -static unsigned int ecoff_armap_hash PARAMS ((const char *s, - unsigned int *rehash, - unsigned int size, - unsigned int hlog)); +static unsigned int ecoff_armap_hash PARAMS ((const char *, unsigned int *, unsigned int, unsigned int)); /* This stuff is somewhat copied from coffcode.h. */ @@ -105,6 +95,7 @@ _bfd_ecoff_mkobject (abfd) bfd *abfd; { bfd_size_type amt = sizeof (ecoff_data_type); + abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt); if (abfd->tdata.ecoff_obj_data == NULL) return false; @@ -125,7 +116,7 @@ _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr) struct internal_aouthdr *internal_a = (struct internal_aouthdr *) aouthdr; ecoff_data_type *ecoff; - if (_bfd_ecoff_mkobject (abfd) == false) + if (! _bfd_ecoff_mkobject (abfd)) return NULL; ecoff = ecoff_data (abfd); @@ -184,10 +175,8 @@ _bfd_ecoff_new_section_hook (abfd, section) || strcmp (section->name, _SBSS) == 0) section->flags |= SEC_ALLOC; else if (strcmp (section->name, _LIB) == 0) - { - /* An Irix 4 shared libary. */ - section->flags |= SEC_COFF_SHARED_LIBRARY; - } + /* An Irix 4 shared libary. */ + section->flags |= SEC_COFF_SHARED_LIBRARY; /* Probably any other section name is SEC_NEVER_LOAD, but I'm uncertain about .init on some systems and I don't know how shared @@ -221,14 +210,14 @@ _bfd_ecoff_set_arch_mach_hook (abfd, filehdr) case MIPS_MAGIC_LITTLE2: case MIPS_MAGIC_BIG2: - /* MIPS ISA level 2: the r6000 */ + /* MIPS ISA level 2: the r6000. */ arch = bfd_arch_mips; mach = 6000; break; case MIPS_MAGIC_LITTLE3: case MIPS_MAGIC_BIG3: - /* MIPS ISA level 3: the r4000 */ + /* MIPS ISA level 3: the r4000. */ arch = bfd_arch_mips; mach = 4000; break; @@ -553,7 +542,6 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug) documented section. And the ordering of the sections varies between statically and dynamically linked executables. If bfd supports SEEK_END someday, this code could be simplified. */ - raw_end = 0; #define UPDATE_RAW_END(start, count, size) \ @@ -565,7 +553,9 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug) UPDATE_RAW_END (cbDnOffset, idnMax, backend->debug_swap.external_dnr_size); UPDATE_RAW_END (cbPdOffset, ipdMax, backend->debug_swap.external_pdr_size); UPDATE_RAW_END (cbSymOffset, isymMax, backend->debug_swap.external_sym_size); - UPDATE_RAW_END (cbOptOffset, ioptMax, backend->debug_swap.external_opt_size); + /* eraxxon@alumni.rice.edu: ioptMax refers to the size of the + optimization symtab, not the number of entries */ + UPDATE_RAW_END (cbOptOffset, ioptMax, sizeof (char)); UPDATE_RAW_END (cbAuxOffset, iauxMax, sizeof (union aux_ext)); UPDATE_RAW_END (cbSsOffset, issMax, sizeof (char)); UPDATE_RAW_END (cbSsExtOffset, issExtMax, sizeof (char)); @@ -604,6 +594,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug) debug->off2 = (type) ((char *) raw \ + (internal_symhdr->off1 \ - raw_base)) + FIX (cbLineOffset, line, unsigned char *); FIX (cbDnOffset, external_dnr, PTR); FIX (cbPdOffset, external_pdr, PTR); @@ -661,10 +652,9 @@ _bfd_ecoff_make_empty_symbol (abfd) ecoff_symbol_type *new; bfd_size_type amt = sizeof (ecoff_symbol_type); - new = (ecoff_symbol_type *) bfd_alloc (abfd, amt); + new = (ecoff_symbol_type *) bfd_zalloc (abfd, amt); if (new == (ecoff_symbol_type *) NULL) return (asymbol *) NULL; - memset ((PTR) new, 0, sizeof *new); new->symbol.section = (asection *) NULL; new->fdr = (FDR *) NULL; new->local = false; @@ -727,6 +717,10 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak) || ECOFF_IS_STAB (ecoff_sym)) asym->flags |= BSF_DEBUGGING; } + + if (ecoff_sym->st == stProc || ecoff_sym->st == stStaticProc) + asym->flags |= BSF_FUNCTION; + switch (ecoff_sym->sc) { case scNil: @@ -1057,7 +1051,7 @@ _bfd_ecoff_get_symtab (abfd, alocation) ecoff_symbol_type *symbase; ecoff_symbol_type **location = (ecoff_symbol_type **) alocation; - if (_bfd_ecoff_slurp_symbol_table (abfd) == false) + if (! _bfd_ecoff_slurp_symbol_table (abfd)) return -1; if (bfd_get_symcount (abfd) == 0) return 0; @@ -1187,56 +1181,54 @@ ecoff_type_to_string (abfd, fdr, indx) qualifiers[5].type = u.ti.tq5; qualifiers[6].type = tqNil; - /* - * Go get the basic type. - */ + /* Go get the basic type. */ switch (basic_type) { - case btNil: /* undefined */ + case btNil: /* Undefined. */ strcpy (p1, "nil"); break; - case btAdr: /* address - integer same size as pointer */ + case btAdr: /* Address - integer same size as pointer. */ strcpy (p1, "address"); break; - case btChar: /* character */ + case btChar: /* Character. */ strcpy (p1, "char"); break; - case btUChar: /* unsigned character */ + case btUChar: /* Unsigned character. */ strcpy (p1, "unsigned char"); break; - case btShort: /* short */ + case btShort: /* Short. */ strcpy (p1, "short"); break; - case btUShort: /* unsigned short */ + case btUShort: /* Unsigned short. */ strcpy (p1, "unsigned short"); break; - case btInt: /* int */ + case btInt: /* Int. */ strcpy (p1, "int"); break; - case btUInt: /* unsigned int */ + case btUInt: /* Unsigned int. */ strcpy (p1, "unsigned int"); break; - case btLong: /* long */ + case btLong: /* Long. */ strcpy (p1, "long"); break; - case btULong: /* unsigned long */ + case btULong: /* Unsigned long. */ strcpy (p1, "unsigned long"); break; - case btFloat: /* float (real) */ + case btFloat: /* Float (real). */ strcpy (p1, "float"); break; - case btDouble: /* Double (real) */ + case btDouble: /* Double (real). */ strcpy (p1, "double"); break; @@ -1244,83 +1236,83 @@ ecoff_type_to_string (abfd, fdr, indx) 1st word is [ST_RFDESCAPE, offset] pointer to struct def; 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - case btStruct: /* Structure (Record) */ + case btStruct: /* Structure (Record). */ _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx); ecoff_emit_aggregate (abfd, fdr, p1, &rndx, (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]), "struct"); - indx++; /* skip aux words */ + indx++; /* Skip aux words. */ break; /* Unions add 1-2 aux words: 1st word is [ST_RFDESCAPE, offset] pointer to union def; 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - case btUnion: /* Union */ + case btUnion: /* Union. */ _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx); ecoff_emit_aggregate (abfd, fdr, p1, &rndx, (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]), "union"); - indx++; /* skip aux words */ + indx++; /* Skip aux words. */ break; /* Enumerations add 1-2 aux words: 1st word is [ST_RFDESCAPE, offset] pointer to enum def; 2nd word is file index if 1st word rfd is ST_RFDESCAPE. */ - case btEnum: /* Enumeration */ + case btEnum: /* Enumeration. */ _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx); ecoff_emit_aggregate (abfd, fdr, p1, &rndx, (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]), "enum"); - indx++; /* skip aux words */ + indx++; /* Skip aux words. */ break; - case btTypedef: /* defined via a typedef, isymRef points */ + case btTypedef: /* Defined via a typedef, isymRef points. */ strcpy (p1, "typedef"); break; - case btRange: /* subrange of int */ + case btRange: /* Subrange of int. */ strcpy (p1, "subrange"); break; - case btSet: /* pascal sets */ + case btSet: /* Pascal sets. */ strcpy (p1, "set"); break; - case btComplex: /* fortran complex */ + case btComplex: /* Fortran complex. */ strcpy (p1, "complex"); break; - case btDComplex: /* fortran double complex */ + case btDComplex: /* Fortran double complex. */ strcpy (p1, "double complex"); break; - case btIndirect: /* forward or unnamed typedef */ + case btIndirect: /* Forward or unnamed typedef. */ strcpy (p1, "forward/unamed typedef"); break; - case btFixedDec: /* Fixed Decimal */ + case btFixedDec: /* Fixed Decimal. */ strcpy (p1, "fixed decimal"); break; - case btFloatDec: /* Float Decimal */ + case btFloatDec: /* Float Decimal. */ strcpy (p1, "float decimal"); break; - case btString: /* Varying Length Character String */ + case btString: /* Varying Length Character String. */ strcpy (p1, "string"); break; - case btBit: /* Aligned Bit String */ + case btBit: /* Aligned Bit String. */ strcpy (p1, "bit"); break; - case btPicture: /* Picture */ + case btPicture: /* Picture. */ strcpy (p1, "picture"); break; - case btVoid: /* Void */ + case btVoid: /* Void. */ strcpy (p1, "void"); break; @@ -1331,9 +1323,7 @@ ecoff_type_to_string (abfd, fdr, indx) p1 += strlen (buffer1); - /* - * If this is a bitfield, get the bitsize. - */ + /* If this is a bitfield, get the bitsize. */ if (u.ti.fBitfield) { int bitsize; @@ -1343,20 +1333,16 @@ ecoff_type_to_string (abfd, fdr, indx) p1 += strlen (buffer1); } - /* - * Deal with any qualifiers. - */ + /* Deal with any qualifiers. */ if (qualifiers[0].type != tqNil) { - /* - * Snarf up any array bounds in the correct order. Arrays - * store 5 successive words in the aux. table: - * word 0 RNDXR to type of the bounds (ie, int) - * word 1 Current file descriptor index - * word 2 low bound - * word 3 high bound (or -1 if []) - * word 4 stride size in bits - */ + /* Snarf up any array bounds in the correct order. Arrays + store 5 successive words in the aux. table: + word 0 RNDXR to type of the bounds (ie, int) + word 1 Current file descriptor index + word 2 low bound + word 3 high bound (or -1 if []) + word 4 stride size in bits. */ for (i = 0; i < 7; i++) { if (qualifiers[i].type == tqArray) @@ -1371,9 +1357,7 @@ ecoff_type_to_string (abfd, fdr, indx) } } - /* - * Now print out the qualifiers. - */ + /* Now print out the qualifiers. */ for (i = 0; i < 6; i++) { switch (qualifiers[i].type) @@ -1409,7 +1393,6 @@ ecoff_type_to_string (abfd, fdr, indx) /* Print array bounds reversed (ie, in the order the C programmer writes them). C is such a fun language.... */ - while (i < 5 && qualifiers[i+1].type == tqArray) i++; @@ -1511,7 +1494,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how) } break; case bfd_print_symbol_all: - /* Print out the symbols in a reasonable way */ + /* Print out the symbols in a reasonable way. */ { char type; int pos; @@ -1585,7 +1568,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how) order is indicated by a bit in the fdr. */ bigendian = fdr->fBigendian; - /* This switch is basically from gcc/mips-tdump.c */ + /* This switch is basically from gcc/mips-tdump.c. */ switch (ecoff_ext.asym.st) { case stNil: @@ -1678,7 +1661,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols) || (section->flags & SEC_CONSTRUCTOR) != 0) return true; - if (_bfd_ecoff_slurp_symbol_table (abfd) == false) + if (! _bfd_ecoff_slurp_symbol_table (abfd)) return false; amt = section->reloc_count; @@ -1794,7 +1777,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols) { arelent *tblptr; - if (ecoff_slurp_reloc_table (abfd, section, symbols) == false) + if (! ecoff_slurp_reloc_table (abfd, section, symbols)) return -1; tblptr = section->relocation; @@ -2181,7 +2164,7 @@ ecoff_compute_section_file_positions (abfd) if ((current->flags & SEC_HAS_CONTENTS) != 0) file_sofar += current->_raw_size; - /* make sure that this section is of the right size too */ + /* Make sure that this section is of the right size too. */ old_sofar = sofar; sofar = BFD_ALIGN (sofar, 1 << alignment_power); if ((current->flags & SEC_HAS_CONTENTS) != 0) @@ -2268,7 +2251,7 @@ _bfd_ecoff_set_section_contents (abfd, section, location, offset, count) /* This must be done first, because bfd_set_section_contents is going to set output_has_begun to true. */ - if (abfd->output_has_begun == false) + if (! abfd->output_has_begun) { if (! ecoff_compute_section_file_positions (abfd)) return false; @@ -2363,7 +2346,7 @@ bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask) tdata->fprmask = fprmask; if (cprmask != (unsigned long *) NULL) { - register int i; + int i; for (i = 0; i < 3; i++) tdata->cprmask[i] = cprmask[i]; @@ -2630,13 +2613,12 @@ _bfd_ecoff_write_object_contents (abfd) else if (section.s_flags == 0 || (section.s_flags & STYP_ECOFF_LIB) != 0 || section.s_flags == STYP_COMMENT) - /* Do nothing */ ; + /* Do nothing. */ ; else abort (); } /* Set up the file header. */ - internal_f.f_magic = ecoff_get_magic (abfd); /* We will NOT put a fucking timestamp in the header here. Every @@ -2729,7 +2711,6 @@ _bfd_ecoff_write_object_contents (abfd) } /* Write out the file header and the optional header. */ - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) goto error_return; @@ -2751,11 +2732,9 @@ _bfd_ecoff_write_object_contents (abfd) symhdr->issExtMax = 0; debug->external_ext = debug->external_ext_end = NULL; debug->ssext = debug->ssext_end = NULL; - if (bfd_ecoff_debug_externals (abfd, debug, &backend->debug_swap, - (((abfd->flags & EXEC_P) == 0) - ? true : false), - ecoff_get_extr, ecoff_set_index) - == false) + if (! bfd_ecoff_debug_externals (abfd, debug, &backend->debug_swap, + (abfd->flags & EXEC_P) == 0, + ecoff_get_extr, ecoff_set_index)) goto error_return; /* Write out the relocs. */ @@ -2859,9 +2838,8 @@ _bfd_ecoff_write_object_contents (abfd) if (bfd_get_symcount (abfd) > 0) { /* Write out the debugging information. */ - if (bfd_ecoff_write_debug (abfd, debug, &backend->debug_swap, - ecoff_data (abfd)->sym_filepos) - == false) + if (! bfd_ecoff_write_debug (abfd, debug, &backend->debug_swap, + ecoff_data (abfd)->sym_filepos)) goto error_return; } } @@ -3060,7 +3038,6 @@ _bfd_ecoff_slurp_armap (abfd) /* This code used to overlay the symdefs over the raw archive data, but that doesn't work on a 64 bit host. */ - stringbase = raw_armap + count * 8 + 8; #ifdef CHECK_ARMAP_HASH @@ -3314,8 +3291,6 @@ _bfd_ecoff_archive_p (abfd) char armag[SARMAG + 1]; bfd_size_type amt; - tdata_hold = abfd->tdata.aout_ar_data; - if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG) { if (bfd_get_error () != bfd_error_system_call) @@ -3329,15 +3304,13 @@ _bfd_ecoff_archive_p (abfd) return NULL; } - /* We are setting bfd_ardata(abfd) here, but since bfd_ardata - involves a cast, we can't do it as the left operand of - assignment. */ - amt = sizeof (struct artdata); - abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); + tdata_hold = bfd_ardata (abfd); + amt = sizeof (struct artdata); + bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == (struct artdata *) NULL) { - abfd->tdata.aout_ar_data = tdata_hold; + bfd_ardata (abfd) = tdata_hold; return (const bfd_target *) NULL; } @@ -3348,11 +3321,11 @@ _bfd_ecoff_archive_p (abfd) bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->tdata = NULL; - if (_bfd_ecoff_slurp_armap (abfd) == false - || _bfd_ecoff_slurp_extended_name_table (abfd) == false) + if (! _bfd_ecoff_slurp_armap (abfd) + || ! _bfd_ecoff_slurp_extended_name_table (abfd)) { bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = tdata_hold; + bfd_ardata (abfd) = tdata_hold; return (const bfd_target *) NULL; } @@ -3370,22 +3343,23 @@ _bfd_ecoff_archive_p (abfd) first = bfd_openr_next_archived_file (abfd, (bfd *) NULL); if (first != NULL) { - boolean fail; - first->target_defaulted = false; - fail = false; if (bfd_check_format (first, bfd_object) && first->xvec != abfd->xvec) { +#if 0 + /* We ought to close `first' here, but we can't, because + we have no way to remove it from the archive cache. + It's close to impossible to figure out when we can + release bfd_ardata. FIXME. */ (void) bfd_close (first); bfd_release (abfd, bfd_ardata (abfd)); - abfd->tdata.aout_ar_data = tdata_hold; - bfd_set_error (bfd_error_wrong_format); +#endif + bfd_set_error (bfd_error_wrong_object_format); + bfd_ardata (abfd) = tdata_hold; return NULL; } - - /* We ought to close first here, but we can't, because we - have no way to remove it from the archive cache. FIXME. */ + /* And we ought to close `first' here too. */ } } @@ -3452,7 +3426,7 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd) struct ecoff_link_hash_table *ret; bfd_size_type amt = sizeof (struct ecoff_link_hash_table); - ret = (struct ecoff_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct ecoff_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_link_hash_table_init (&ret->root, abfd, diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c index 53d6544..5b854af 100644 --- a/contrib/binutils/bfd/ecofflink.c +++ b/contrib/binutils/bfd/ecofflink.c @@ -1,5 +1,5 @@ /* Routines to link ECOFF debugging information. - Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>. @@ -1314,12 +1314,12 @@ bfd_ecoff_debug_externals (abfd, debug, swap, relocateable, get_extr, sym_ptr = *sym_ptr_ptr; /* Get the external symbol information. */ - if ((*get_extr) (sym_ptr, &esym) == false) + if (! (*get_extr) (sym_ptr, &esym)) continue; /* If we're producing an executable, move common symbols into bss. */ - if (relocateable == false) + if (! relocateable) { if (esym.asym.sc == scCommon) esym.asym.sc = scBss; @@ -1376,20 +1376,18 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym) if ((size_t) (debug->ssext_end - debug->ssext) < symhdr->issExtMax + namelen + 1) { - if (ecoff_add_bytes ((char **) &debug->ssext, - (char **) &debug->ssext_end, - symhdr->issExtMax + namelen + 1) - == false) + if (! ecoff_add_bytes ((char **) &debug->ssext, + (char **) &debug->ssext_end, + symhdr->issExtMax + namelen + 1)) return false; } if ((size_t) ((char *) debug->external_ext_end - (char *) debug->external_ext) < (symhdr->iextMax + 1) * external_ext_size) { - if (ecoff_add_bytes ((char **) &debug->external_ext, - (char **) &debug->external_ext_end, - (symhdr->iextMax + 1) * (size_t) external_ext_size) - == false) + if (! ecoff_add_bytes ((char **) &debug->external_ext, + (char **) &debug->external_ext_end, + (symhdr->iextMax + 1) * (size_t) external_ext_size)) return false; } @@ -1650,11 +1648,10 @@ ecoff_write_shuffle (abfd, swap, shuffle, space) bfd_byte *s; i = swap->debug_align - (total & (swap->debug_align - 1)); - s = (bfd_byte *) bfd_malloc ((bfd_size_type) i); + s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); if (s == NULL && i != 0) return false; - memset ((PTR) s, 0, i); if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i) { free (s); @@ -1736,10 +1733,10 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where) bfd_byte *s; i = swap->debug_align - (total & (swap->debug_align - 1)); - s = (bfd_byte *) bfd_malloc ((bfd_size_type) i); + s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); if (s == NULL && i != 0) goto error_return; - memset ((PTR) s, 0, i); + if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i) { free (s); @@ -1761,10 +1758,10 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where) i = (swap->debug_align - (debug->symbolic_header.issExtMax & (swap->debug_align - 1))); - s = (bfd_byte *) bfd_malloc ((bfd_size_type) i); + s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); if (s == NULL && i != 0) goto error_return; - memset ((PTR) s, 0, i); + if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i) { free (s); diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h index d10fda9..4c7e2f6 100644 --- a/contrib/binutils/bfd/elf-bfd.h +++ b/contrib/binutils/bfd/elf-bfd.h @@ -223,6 +223,12 @@ struct elf_link_local_dynamic_entry Elf_Internal_Sym isym; }; +struct elf_link_loaded_list +{ + struct elf_link_loaded_list *next; + bfd *abfd; +}; + enum elf_link_info_type { ELF_INFO_TYPE_NONE, @@ -230,9 +236,18 @@ enum elf_link_info_type ELF_INFO_TYPE_MERGE, ELF_INFO_TYPE_EH_FRAME, ELF_INFO_TYPE_EH_FRAME_HDR, + ELF_INFO_TYPE_JUST_SYMS, ELF_INFO_TYPE_LAST }; +/* Cached start, size and alignment of PT_TLS segment. */ +struct elf_link_tls_segment +{ + bfd_vma start; + bfd_size_type size; + unsigned int align; +}; + /* ELF linker hash table. */ struct elf_link_hash_table @@ -285,6 +300,12 @@ struct elf_link_hash_table /* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic objects included in the link. */ struct bfd_link_needed_list *runpath; + + /* Cached start, size and alignment of PT_TLS segment. */ + struct elf_link_tls_segment *tls_segment; + + /* A linked list of BFD's loaded in the link. */ + struct elf_link_loaded_list *loaded; }; /* Look up an entry in an ELF linker hash table. */ @@ -341,6 +362,8 @@ struct elf_size_info { PARAMS ((bfd *)); void (*write_relocs) PARAMS ((bfd *, asection *, PTR)); + void (*swap_symbol_in) + PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *)); void (*swap_symbol_out) PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR)); boolean (*slurp_reloc_table) @@ -394,8 +417,7 @@ enum elf_reloc_type_class { struct elf_reloc_cookie { Elf_Internal_Rela *rels, *rel, *relend; - PTR locsyms; - PTR locsym_shndx; + Elf_Internal_Sym *locsyms; bfd *abfd; size_t locsymcount; size_t extsymoff; @@ -403,6 +425,14 @@ struct elf_reloc_cookie boolean bad_symtab; }; +/* The level of IRIX compatibility we're striving for. */ + +typedef enum { + ict_none, + ict_irix5, + ict_irix6 +} irix_compat_t; + struct elf_backend_data { /* The architecture for this backend. */ @@ -470,7 +500,7 @@ struct elf_backend_data /* A function to handle unusual section types when creating BFD sections from ELF sections. */ boolean (*elf_backend_section_from_shdr) - PARAMS ((bfd *, Elf32_Internal_Shdr *, char *)); + PARAMS ((bfd *, Elf32_Internal_Shdr *, const char *)); /* A function to convert machine dependent section header flags to BFD internal section header flags. */ @@ -649,10 +679,9 @@ struct elf_backend_data PARAMS ((bfd *)); /* This function is called during section gc to discover the section a - particular relocation refers to. It need not be defined for hosts - that have no queer relocation types. */ + particular relocation refers to. */ asection * (*gc_mark_hook) - PARAMS ((bfd *abfd, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *sec, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *h, Elf_Internal_Sym *)); /* This function, if defined, is called during the sweep phase of gc @@ -682,13 +711,14 @@ struct elf_backend_data PARAMS ((bfd *, struct bfd_link_info *, PTR, boolean (*) (PTR, const char *, Elf_Internal_Sym *, asection *))); - /* Copy any information related to dynamic linking from a pre-existing + /* Copy any information related to dynamic linking from a pre-existing symbol to a newly created symbol. Also called to copy flags and other back-end info to a weakdef, in which case the symbol is not newly created and plt/got refcounts and dynamic indices should not be copied. */ void (*elf_backend_copy_indirect_symbol) - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); /* Modify any information related to dynamic linking such that the symbol is not exported. */ @@ -697,7 +727,7 @@ struct elf_backend_data /* Emit relocations. Overrides default routine for emitting relocs, except during a relocatable link, or if all relocs are being emitted. */ - void (*elf_backend_emit_relocs) + boolean (*elf_backend_emit_relocs) PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *)); /* Count relocations. Not called for relocatable links @@ -740,6 +770,30 @@ struct elf_backend_data boolean (*elf_backend_write_section) PARAMS ((bfd *, asection *, bfd_byte *)); + /* This function, if defined, sets up the file positions for non PT_LOAD + segments, especially for segments containing non-allocated sections. */ + void (*set_nonloadable_filepos) + PARAMS ((bfd *, Elf_Internal_Phdr *)); + + /* This function, if defined, returns true if the section is contained + within the segment. File positions are compared. */ + boolean (*is_contained_by_filepos) + PARAMS ((asection *, Elf_Internal_Phdr *)); + + /* This function, if defined, returns true if copy_private_bfd_data + should be called. It provides a way of overriding default + test conditions in _bfd_elf_copy_private_section_data. */ + boolean (*copy_private_bfd_data_p) + PARAMS ((bfd *, asection *, bfd *, asection *)); + + /* The level of IRIX compatibility we're striving for. + MIPS ELF specific function. */ + irix_compat_t (*elf_backend_mips_irix_compat) + PARAMS ((bfd *)); + + reloc_howto_type *(*elf_backend_mips_rtype_to_howto) + PARAMS ((unsigned int, boolean)); + /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap; @@ -806,6 +860,10 @@ struct elf_backend_data unsigned can_refcount : 1; unsigned want_got_sym : 1; unsigned want_dynbss : 1; + /* Targets which do not support physical addressing often require + that the p_paddr field in the section header to be set to zero. + This field indicates whether this behavior is required. */ + unsigned want_p_paddr_set_to_zero : 1; }; /* Information stored for each BFD section in an ELF file. This @@ -870,8 +928,13 @@ struct bfd_elf_section_data /* Type of that information. */ enum elf_link_info_type sec_info_type; - /* Group name, if this section is part of a group. */ - const char *group_name; + union { + /* Group name, if this section is a member of a group. */ + const char *name; + + /* Group signature sym, if this is the SHT_GROUP section. */ + struct symbol_cache_entry *id; + } group; /* A linked list of sections in the group. Circular when used by the linker. */ @@ -882,17 +945,23 @@ struct bfd_elf_section_data /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; + + /* Nonzero when a group is COMDAT. */ + unsigned int linkonce_p:1; }; #define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd) -#define elf_group_name(sec) (elf_section_data(sec)->group_name) +#define elf_group_name(sec) (elf_section_data(sec)->group.name) +#define elf_group_id(sec) (elf_section_data(sec)->group.id) #define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group) +#define elf_linkonce_p(sec) (elf_section_data(sec)->linkonce_p) /* Return true if section has been discarded. */ #define elf_discarded_section(sec) \ (!bfd_is_abs_section(sec) \ && bfd_is_abs_section((sec)->output_section) \ - && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE) + && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \ + && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS) #define get_elf_backend_data(abfd) \ ((struct elf_backend_data *) (abfd)->xvec->backend_data) @@ -1151,6 +1220,9 @@ extern char *bfd_elf_string_from_elf_section PARAMS ((bfd *, unsigned, unsigned)); extern char *bfd_elf_get_str_section PARAMS ((bfd *, unsigned)); +extern Elf_Internal_Sym *bfd_elf_get_elf_syms + PARAMS ((bfd *, Elf_Internal_Shdr *, size_t, size_t, + Elf_Internal_Sym *, PTR, Elf_External_Sym_Shndx *)); extern boolean _bfd_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *)); @@ -1200,7 +1272,8 @@ extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create PARAMS ((bfd *)); extern void _bfd_elf_link_hash_copy_indirect - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); extern void _bfd_elf_link_hash_hide_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean)); extern boolean _bfd_elf_link_hash_table_init @@ -1210,10 +1283,14 @@ extern boolean _bfd_elf_link_hash_table_init const char *))); extern boolean _bfd_elf_slurp_version_tables PARAMS ((bfd *)); - extern boolean _bfd_elf_merge_sections PARAMS ((bfd *, struct bfd_link_info *)); - +extern boolean bfd_elf_discard_group + PARAMS ((bfd *, struct sec *)); +extern void bfd_elf_set_group_contents + PARAMS ((bfd *, asection *, PTR)); +extern void _bfd_elf_link_just_syms + PARAMS ((asection *, struct bfd_link_info *)); extern boolean _bfd_elf_copy_private_symbol_data PARAMS ((bfd *, asymbol *, bfd *, asymbol *)); extern boolean _bfd_elf_copy_private_section_data @@ -1390,8 +1467,7 @@ extern boolean bfd_elf32_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *)); extern void bfd_elf32_swap_symbol_in - PARAMS ((bfd *, const Elf32_External_Sym *, const Elf_External_Sym_Shndx *, - Elf_Internal_Sym *)); + PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *)); extern void bfd_elf32_swap_symbol_out PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR)); extern void bfd_elf32_swap_reloc_in @@ -1443,8 +1519,7 @@ extern boolean bfd_elf64_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *)); extern void bfd_elf64_swap_symbol_in - PARAMS ((bfd *, const Elf64_External_Sym *, const Elf_External_Sym_Shndx *, - Elf_Internal_Sym *)); + PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *)); extern void bfd_elf64_swap_symbol_out PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR)); extern void bfd_elf64_swap_reloc_in @@ -1485,10 +1560,12 @@ extern Elf_Internal_Rela *_bfd_elf64_link_read_relocs #define bfd_elf64_link_record_dynamic_symbol \ _bfd_elf_link_record_dynamic_symbol -extern boolean _bfd_elf32_link_record_local_dynamic_symbol - PARAMS ((struct bfd_link_info *, bfd *, long)); -extern boolean _bfd_elf64_link_record_local_dynamic_symbol +extern int elf_link_record_local_dynamic_symbol PARAMS ((struct bfd_link_info *, bfd *, long)); +#define _bfd_elf32_link_record_local_dynamic_symbol \ + elf_link_record_local_dynamic_symbol +#define _bfd_elf64_link_record_local_dynamic_symbol \ + elf_link_record_local_dynamic_symbol extern boolean _bfd_elf_close_and_cleanup PARAMS ((bfd *)); @@ -1524,99 +1601,20 @@ extern boolean _bfd_elf64_reloc_symbol_deleted_p PARAMS ((bfd_vma, PTR)); /* Exported interface for writing elf corefile notes. */ -extern char *elfcore_write_note - PARAMS ((bfd *, char *, int *, char *, int, void *, int)); -extern char *elfcore_write_prpsinfo - PARAMS ((bfd *, char *, int *, char *, char *)); -extern char *elfcore_write_prstatus - PARAMS ((bfd *, char *, int *, long, int, void *)); -extern char * elfcore_write_pstatus - PARAMS ((bfd *, char *, int *, long, int, void *)); -extern char *elfcore_write_prfpreg - PARAMS ((bfd *, char *, int *, void *, int)); -extern char *elfcore_write_prxfpreg - PARAMS ((bfd *, char *, int *, void *, int)); -extern char *elfcore_write_lwpstatus - PARAMS ((bfd*, char*, int*, long, int, void*)); - -/* MIPS ELF specific routines. */ - -extern boolean _bfd_mips_elf_object_p - PARAMS ((bfd *)); -extern boolean _bfd_mips_elf_section_from_shdr - PARAMS ((bfd *, Elf_Internal_Shdr *, char *)); -extern boolean _bfd_mips_elf_fake_sections - PARAMS ((bfd *, Elf_Internal_Shdr *, asection *)); -extern boolean _bfd_mips_elf_section_from_bfd_section - PARAMS ((bfd *, asection *, int *)); -extern boolean _bfd_mips_elf_section_processing - PARAMS ((bfd *, Elf_Internal_Shdr *)); -extern void _bfd_mips_elf_symbol_processing - PARAMS ((bfd *, asymbol *)); -extern boolean _bfd_mips_elf_read_ecoff_info - PARAMS ((bfd *, asection *, struct ecoff_debug_info *)); -extern void _bfd_mips_elf_final_write_processing - PARAMS ((bfd *, boolean)); -extern bfd_reloc_status_type _bfd_mips_elf_hi16_reloc - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -extern bfd_reloc_status_type _bfd_mips_elf_lo16_reloc - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -extern bfd_reloc_status_type _bfd_mips_elf_gprel16_reloc - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -extern bfd_reloc_status_type _bfd_mips_elf_got16_reloc - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -extern bfd_reloc_status_type _bfd_mips_elf_gprel32_reloc - PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -extern boolean _bfd_mips_elf_set_private_flags - PARAMS ((bfd *, flagword)); -extern boolean _bfd_mips_elf_merge_private_bfd_data - PARAMS ((bfd *, bfd *)); -extern boolean _bfd_mips_elf_find_nearest_line - PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, - const char **, unsigned int *)); -extern boolean _bfd_mips_elf_set_section_contents - PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type)); -extern boolean _bfd_mips_elf_create_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); -extern boolean _bfd_mips_elf_add_symbol_hook - PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, - const char **, flagword *, asection **, bfd_vma *)); -extern boolean _bfd_mips_elf_adjust_dynamic_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); -extern boolean _bfd_mips_elf_finish_dynamic_symbol - PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, - Elf_Internal_Sym *)); -extern boolean _bfd_mips_elf_finish_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); -extern asection * _bfd_mips_elf_gc_mark_hook - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)); -extern boolean _bfd_mips_elf_gc_sweep_hook - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); -extern boolean _bfd_mips_elf_always_size_sections - PARAMS ((bfd *, struct bfd_link_info *)); -extern boolean _bfd_mips_elf_size_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); -extern boolean _bfd_mips_elf_check_relocs - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); -extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create - PARAMS ((bfd *)); -extern boolean _bfd_mips_elf_print_private_bfd_data - PARAMS ((bfd *, PTR)); -extern boolean _bfd_mips_elf_link_output_symbol_hook - PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, - asection *)); -extern boolean _bfd_mips_elf_final_link - PARAMS ((bfd *, struct bfd_link_info *)); -extern int _bfd_mips_elf_additional_program_headers - PARAMS ((bfd *)); -extern boolean _bfd_mips_elf_modify_segment_map - PARAMS ((bfd *)); -extern boolean _bfd_mips_elf_relocate_section - PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); +extern char *elfcore_write_note + PARAMS ((bfd *, char *, int *, const char *, int, const PTR, int)); +extern char *elfcore_write_prpsinfo + PARAMS ((bfd *, char *, int *, const char *, const char *)); +extern char *elfcore_write_prstatus + PARAMS ((bfd *, char *, int *, long, int, const PTR)); +extern char * elfcore_write_pstatus + PARAMS ((bfd *, char *, int *, long, int, const PTR)); +extern char *elfcore_write_prfpreg + PARAMS ((bfd *, char *, int *, const PTR, int)); +extern char *elfcore_write_prxfpreg + PARAMS ((bfd *, char *, int *, const PTR, int)); +extern char *elfcore_write_lwpstatus + PARAMS ((bfd *, char *, int *, long, int, const PTR)); /* SH ELF specific routine. */ diff --git a/contrib/binutils/bfd/elf-eh-frame.c b/contrib/binutils/bfd/elf-eh-frame.c index 6a23edb..713dc8f 100644 --- a/contrib/binutils/bfd/elf-eh-frame.c +++ b/contrib/binutils/bfd/elf-eh-frame.c @@ -627,11 +627,11 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec, goto free_no_table; if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie)) { - cookie->rel = rel; /* This is a FDE against discarded section, it should be deleted. */ new_size -= hdr.length + 4; sec_info->entry[sec_info->count].removed = 1; + memset (rel, 0, sizeof (*rel)); } else { @@ -787,7 +787,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info) struct eh_frame_hdr_info *hdr_info; sec = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr"); - if (sec == NULL) + if (sec == NULL || bfd_is_abs_section (sec->output_section)) return true; hdr_info @@ -805,7 +805,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info) /* Count only sections which have at least a single CIE or FDE. There cannot be any CIE or FDE <= 8 bytes. */ o = bfd_get_section_by_name (abfd, ".eh_frame"); - if (o && o->_raw_size > 8) + if (o && o->_raw_size > 8 && !bfd_is_abs_section (o->output_section)) break; } diff --git a/contrib/binutils/bfd/elf-strtab.c b/contrib/binutils/bfd/elf-strtab.c index ff7d9a4..7a993c2 100644 --- a/contrib/binutils/bfd/elf-strtab.c +++ b/contrib/binutils/bfd/elf-strtab.c @@ -1,28 +1,29 @@ /* ELF strtab with GC and suffix merging support. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2002 Free Software Foundation, Inc. Written by Jakub Jelinek <jakub@redhat.com>. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" #include "libbfd.h" #include "elf-bfd.h" #include "hashtab.h" +#include "libiberty.h" /* An entry in the strtab hash table. */ @@ -351,7 +352,7 @@ _bfd_elf_strtab_finalize (tab) qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry); - last4tab = htab_create (size * 4, NULL, last4_eq, NULL); + last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free); if (last4tab == NULL) goto alloc_failure; diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c index b78eb5f..a7bafb6 100644 --- a/contrib/binutils/bfd/elf.c +++ b/contrib/binutils/bfd/elf.c @@ -2,24 +2,24 @@ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - This file is part of BFD, the Binary File Descriptor library. +This file is part of BFD, the Binary File Descriptor library. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* SECTION - + ELF backends BFD support for ELF formats is being worked on. @@ -50,10 +50,10 @@ static boolean prep_headers PARAMS ((bfd *)); static boolean swap_out_syms PARAMS ((bfd *, struct bfd_strtab_hash **, int)); static boolean copy_private_bfd_data PARAMS ((bfd *, bfd *)); static char *elf_read PARAMS ((bfd *, file_ptr, bfd_size_type)); +static const char *group_signature PARAMS ((bfd *, Elf_Internal_Shdr *)); static boolean setup_group PARAMS ((bfd *, Elf_Internal_Shdr *, asection *)); static void merge_sections_remove_hook PARAMS ((bfd *, asection *)); static void elf_fake_sections PARAMS ((bfd *, asection *, PTR)); -static void set_group_contents PARAMS ((bfd *, asection *, PTR)); static boolean assign_section_numbers PARAMS ((bfd *)); static INLINE int sym_is_global PARAMS ((bfd *, asymbol *)); static boolean elf_map_symbols PARAMS ((bfd *)); @@ -352,6 +352,107 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex) return ((char *) hdr->contents) + strindex; } +/* Read and convert symbols to internal format. + SYMCOUNT specifies the number of symbols to read, starting from + symbol SYMOFFSET. If any of INTSYM_BUF, EXTSYM_BUF or EXTSHNDX_BUF + are non-NULL, they are used to store the internal symbols, external + symbols, and symbol section index extensions, respectively. */ + +Elf_Internal_Sym * +bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset, + intsym_buf, extsym_buf, extshndx_buf) + bfd *ibfd; + Elf_Internal_Shdr *symtab_hdr; + size_t symcount; + size_t symoffset; + Elf_Internal_Sym *intsym_buf; + PTR extsym_buf; + Elf_External_Sym_Shndx *extshndx_buf; +{ + Elf_Internal_Shdr *shndx_hdr; + PTR alloc_ext; + const bfd_byte *esym; + Elf_External_Sym_Shndx *alloc_extshndx; + Elf_External_Sym_Shndx *shndx; + Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; + struct elf_backend_data *bed; + size_t extsym_size; + bfd_size_type amt; + file_ptr pos; + + if (symcount == 0) + return intsym_buf; + + /* Normal syms might have section extension entries. */ + shndx_hdr = NULL; + if (symtab_hdr == &elf_tdata (ibfd)->symtab_hdr) + shndx_hdr = &elf_tdata (ibfd)->symtab_shndx_hdr; + + /* Read the symbols. */ + alloc_ext = NULL; + alloc_extshndx = NULL; + bed = get_elf_backend_data (ibfd); + extsym_size = bed->s->sizeof_sym; + amt = symcount * extsym_size; + pos = symtab_hdr->sh_offset + symoffset * extsym_size; + if (extsym_buf == NULL) + { + alloc_ext = bfd_malloc (amt); + extsym_buf = alloc_ext; + } + if (extsym_buf == NULL + || bfd_seek (ibfd, pos, SEEK_SET) != 0 + || bfd_bread (extsym_buf, amt, ibfd) != amt) + { + intsym_buf = NULL; + goto out; + } + + if (shndx_hdr == NULL || shndx_hdr->sh_size == 0) + extshndx_buf = NULL; + else + { + amt = symcount * sizeof (Elf_External_Sym_Shndx); + pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx); + if (extshndx_buf == NULL) + { + alloc_extshndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt); + extshndx_buf = alloc_extshndx; + } + if (extshndx_buf == NULL + || bfd_seek (ibfd, pos, SEEK_SET) != 0 + || bfd_bread (extshndx_buf, amt, ibfd) != amt) + { + intsym_buf = NULL; + goto out; + } + } + + if (intsym_buf == NULL) + { + bfd_size_type amt = symcount * sizeof (Elf_Internal_Sym); + intsym_buf = (Elf_Internal_Sym *) bfd_malloc (amt); + if (intsym_buf == NULL) + goto out; + } + + /* Convert the symbols to internal form. */ + isymend = intsym_buf + symcount; + for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf; + isym < isymend; + esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL) + (*bed->s->swap_symbol_in) (ibfd, esym, (const PTR) shndx, isym); + + out: + if (alloc_ext != NULL) + free (alloc_ext); + if (alloc_extshndx != NULL) + free (alloc_extshndx); + + return intsym_buf; +} + /* Elf_Internal_Shdr->contents is an array of these for SHT_GROUP sections. The first element is the flags, the rest are section pointers. */ @@ -361,6 +462,43 @@ typedef union elf_internal_group { unsigned int flags; } Elf_Internal_Group; +/* Return the name of the group signature symbol. Why isn't the + signature just a string? */ + +static const char * +group_signature (abfd, ghdr) + bfd *abfd; + Elf_Internal_Shdr *ghdr; +{ + Elf_Internal_Shdr *hdr; + unsigned char esym[sizeof (Elf64_External_Sym)]; + Elf_External_Sym_Shndx eshndx; + Elf_Internal_Sym isym; + unsigned int iname; + unsigned int shindex; + + /* First we need to ensure the symbol table is available. */ + if (! bfd_section_from_shdr (abfd, ghdr->sh_link)) + return NULL; + + /* Go read the symbol. */ + hdr = &elf_tdata (abfd)->symtab_hdr; + if (bfd_elf_get_elf_syms (abfd, hdr, 1, ghdr->sh_info, + &isym, esym, &eshndx) == NULL) + return NULL; + + /* Look up the symbol name. */ + iname = isym.st_name; + shindex = hdr->sh_link; + if (iname == 0 && ELF_ST_TYPE (isym.st_info) == STT_SECTION) + { + iname = elf_elfsections (abfd)[isym.st_shndx]->sh_name; + shindex = elf_elfheader (abfd)->e_shstrndx; + } + + return bfd_elf_string_from_elf_section (abfd, shindex, iname); +} + /* Set next_in_group list pointer, and group name for NEWSECT. */ static boolean @@ -440,6 +578,9 @@ setup_group (abfd, hdr, newsect) if (src == shdr->contents) { dest->flags = idx; + if (shdr->bfd_section != NULL && (idx & GRP_COMDAT)) + shdr->bfd_section->flags + |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; break; } if (idx >= shnum) @@ -492,32 +633,22 @@ setup_group (abfd, hdr, newsect) } else { - struct elf_backend_data *bed; - file_ptr pos; - unsigned char ename[4]; - unsigned long iname; const char *gname; - /* Humbug. Get the name from the group signature - symbol. Why isn't the signature just a string? - Fortunately, the name index is at the same - place in the external symbol for both 32 and 64 - bit ELF. */ - bed = get_elf_backend_data (abfd); - pos = elf_tdata (abfd)->symtab_hdr.sh_offset; - pos += shdr->sh_info * bed->s->sizeof_sym; - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread (ename, (bfd_size_type) 4, abfd) != 4) + gname = group_signature (abfd, shdr); + if (gname == NULL) return false; - iname = H_GET_32 (abfd, ename); - gname = elf_string_from_elf_strtab (abfd, iname); elf_group_name (newsect) = gname; /* Start a circular list with one element. */ elf_next_in_group (newsect) = newsect; } + + /* If the group section has been created, point to the + new member. */ if (shdr->bfd_section != NULL) elf_next_in_group (shdr->bfd_section) = newsect; + i = num_group - 1; break; } @@ -532,6 +663,25 @@ setup_group (abfd, hdr, newsect) return true; } +boolean +bfd_elf_discard_group (abfd, group) + bfd *abfd ATTRIBUTE_UNUSED; + asection *group; +{ + asection *first = elf_next_in_group (group); + asection *s = first; + + while (s != NULL) + { + s->output_section = bfd_abs_section_ptr; + s = elf_next_in_group (s); + /* These lists are circular. */ + if (s == first) + break; + } + return true; +} + /* Make a BFD section from an ELF section. We store a pointer to the BFD section in the bfd_section field of the header. */ @@ -591,6 +741,8 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) if (hdr->sh_flags & SHF_GROUP) if (!setup_group (abfd, hdr, newsect)) return false; + if ((hdr->sh_flags & SHF_TLS) != 0) + flags |= SEC_THREAD_LOCAL; /* The debugging sections appear to be recognized only by name, not any sort of flag. */ @@ -618,7 +770,8 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) The symbols will be defined as weak, so that multiple definitions are permitted. The GNU linker extension is to actually discard all but one of the sections. */ - if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0) + if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0 + && elf_next_in_group (newsect) == NULL) flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; bed = get_elf_backend_data (abfd); @@ -651,7 +804,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) /* This section is part of this segment if its file offset plus size lies within the segment's memory span and, if the section is loaded, the extent of the - loaded data lies within the extent of the segment. + loaded data lies within the extent of the segment. Note - we used to check the p_paddr field as well, and refuse to set the LMA if it was 0. This is wrong @@ -794,7 +947,7 @@ merge_sections_remove_hook (abfd, sec) asection *sec; { struct bfd_elf_section_data *sec_data; - + sec_data = elf_section_data (sec); BFD_ASSERT (sec_data->sec_info_type == ELF_INFO_TYPE_MERGE); sec_data->sec_info_type = ELF_INFO_TYPE_NONE; @@ -814,6 +967,19 @@ _bfd_elf_merge_sections (abfd, info) merge_sections_remove_hook); return true; } + +void +_bfd_elf_link_just_syms (sec, info) + asection *sec; + struct bfd_link_info *info; +{ + sec->output_section = bfd_abs_section_ptr; + sec->output_offset = sec->vma; + if (!is_elf_hash_table (info)) + return; + + elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_JUST_SYMS; +} /* Copy the program header and other data from one object module to another. */ @@ -870,6 +1036,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg) case PT_NOTE: pt = "NOTE"; break; case PT_SHLIB: pt = "SHLIB"; break; case PT_PHDR: pt = "PHDR"; break; + case PT_TLS: pt = "TLS"; break; case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break; default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break; } @@ -1251,10 +1418,12 @@ _bfd_elf_link_hash_newfunc (entry, table, string) old indirect symbol. Also used for copying flags to a weakdef. */ void -_bfd_elf_link_hash_copy_indirect (dir, ind) +_bfd_elf_link_hash_copy_indirect (bed, dir, ind) + struct elf_backend_data *bed; struct elf_link_hash_entry *dir, *ind; { bfd_signed_vma tmp; + bfd_signed_vma lowest_valid = bed->can_refcount; /* Copy down any references that we may have already seen to the symbol which just became indirect. */ @@ -1272,22 +1441,22 @@ _bfd_elf_link_hash_copy_indirect (dir, ind) /* Copy over the global and procedure linkage table refcount entries. These may have been already set up by a check_relocs routine. */ tmp = dir->got.refcount; - if (tmp <= 0) + if (tmp < lowest_valid) { dir->got.refcount = ind->got.refcount; ind->got.refcount = tmp; } else - BFD_ASSERT (ind->got.refcount <= 0); + BFD_ASSERT (ind->got.refcount < lowest_valid); tmp = dir->plt.refcount; - if (tmp <= 0) + if (tmp < lowest_valid) { dir->plt.refcount = ind->plt.refcount; ind->plt.refcount = tmp; } else - BFD_ASSERT (ind->plt.refcount <= 0); + BFD_ASSERT (ind->plt.refcount < lowest_valid); if (dir->dynindx == -1) { @@ -1341,6 +1510,7 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc) table->bucketcount = 0; table->needed = NULL; table->runpath = NULL; + table->loaded = NULL; table->hgot = NULL; table->stab_info = NULL; table->merge_info = NULL; @@ -1360,13 +1530,13 @@ _bfd_elf_link_hash_table_create (abfd) struct elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_link_hash_table); - ret = (struct elf_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct elf_link_hash_table *) bfd_malloc (amt); if (ret == (struct elf_link_hash_table *) NULL) return NULL; if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -1560,7 +1730,7 @@ bfd_section_from_shdr (abfd, shindex) Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[shindex]; Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd); struct elf_backend_data *bed = get_elf_backend_data (abfd); - char *name; + const char *name; name = elf_string_from_elf_strtab (abfd, hdr->sh_name); @@ -1571,7 +1741,6 @@ bfd_section_from_shdr (abfd, shindex) return true; case SHT_PROGBITS: /* Normal section with contents. */ - case SHT_DYNAMIC: /* Dynamic linking information. */ case SHT_NOBITS: /* .bss section. */ case SHT_HASH: /* .hash section. */ case SHT_NOTE: /* .note section. */ @@ -1580,6 +1749,39 @@ bfd_section_from_shdr (abfd, shindex) case SHT_PREINIT_ARRAY: /* .preinit_array section. */ return _bfd_elf_make_section_from_shdr (abfd, hdr, name); + case SHT_DYNAMIC: /* Dynamic linking information. */ + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) + return false; + if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB) + { + Elf_Internal_Shdr *dynsymhdr; + + /* The shared libraries distributed with hpux11 have a bogus + sh_link field for the ".dynamic" section. Find the + string table for the ".dynsym" section instead. */ + if (elf_dynsymtab (abfd) != 0) + { + dynsymhdr = elf_elfsections (abfd)[elf_dynsymtab (abfd)]; + hdr->sh_link = dynsymhdr->sh_link; + } + else + { + unsigned int i, num_sec; + + num_sec = elf_numsections (abfd); + for (i = 1; i < num_sec; i++) + { + dynsymhdr = elf_elfsections (abfd)[i]; + if (dynsymhdr->sh_type == SHT_DYNSYM) + { + hdr->sh_link = dynsymhdr->sh_link; + break; + } + } + } + } + break; + case SHT_SYMTAB: /* A symbol table */ if (elf_onesymtab (abfd) == shindex) return true; @@ -1804,7 +2006,12 @@ bfd_section_from_shdr (abfd, shindex) return true; case SHT_GROUP: - /* Make a section for objcopy and relocatable links. */ + /* We need a BFD section for objcopy and relocatable linking, + and it's handy to have the signature available as the section + name. */ + name = group_signature (abfd, hdr); + if (name == NULL) + return false; if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name)) return false; if (hdr->contents != NULL) @@ -1813,6 +2020,10 @@ bfd_section_from_shdr (abfd, shindex) unsigned int n_elt = hdr->sh_size / 4; asection *s; + if (idx->flags & GRP_COMDAT) + hdr->bfd_section->flags + |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + while (--n_elt != 0) if ((s = (++idx)->shdr->bfd_section) != NULL && elf_next_in_group (s) != NULL) @@ -1845,50 +2056,19 @@ bfd_section_from_r_symndx (abfd, cache, sec, r_symndx) asection *sec; unsigned long r_symndx; { - unsigned char esym_shndx[4]; - unsigned int isym_shndx; Elf_Internal_Shdr *symtab_hdr; - file_ptr pos; - bfd_size_type amt; + unsigned char esym[sizeof (Elf64_External_Sym)]; + Elf_External_Sym_Shndx eshndx; + Elf_Internal_Sym isym; unsigned int ent = r_symndx % LOCAL_SYM_CACHE_SIZE; if (cache->abfd == abfd && cache->indx[ent] == r_symndx) return cache->sec[ent]; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - pos = symtab_hdr->sh_offset; - if (get_elf_backend_data (abfd)->s->sizeof_sym - == sizeof (Elf64_External_Sym)) - { - pos += r_symndx * sizeof (Elf64_External_Sym); - pos += offsetof (Elf64_External_Sym, st_shndx); - amt = sizeof (((Elf64_External_Sym *) 0)->st_shndx); - } - else - { - pos += r_symndx * sizeof (Elf32_External_Sym); - pos += offsetof (Elf32_External_Sym, st_shndx); - amt = sizeof (((Elf32_External_Sym *) 0)->st_shndx); - } - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) esym_shndx, amt, abfd) != amt) + if (bfd_elf_get_elf_syms (abfd, symtab_hdr, 1, r_symndx, + &isym, esym, &eshndx) == NULL) return NULL; - isym_shndx = H_GET_16 (abfd, esym_shndx); - - if (isym_shndx == SHN_XINDEX) - { - Elf_Internal_Shdr *shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - if (shndx_hdr->sh_size != 0) - { - pos = shndx_hdr->sh_offset; - pos += r_symndx * sizeof (Elf_External_Sym_Shndx); - amt = sizeof (Elf_External_Sym_Shndx); - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) esym_shndx, amt, abfd) != amt) - return NULL; - isym_shndx = H_GET_32 (abfd, esym_shndx); - } - } if (cache->abfd != abfd) { @@ -1897,10 +2077,10 @@ bfd_section_from_r_symndx (abfd, cache, sec, r_symndx) } cache->indx[ent] = r_symndx; cache->sec[ent] = sec; - if (isym_shndx < SHN_LORESERVE || isym_shndx > SHN_HIRESERVE) + if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE) { asection *s; - s = bfd_section_from_elf_index (abfd, isym_shndx); + s = bfd_section_from_elf_index (abfd, isym.st_shndx); if (s != NULL) cache->sec[ent] = s; } @@ -1972,16 +2152,18 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename) asection *newsect; char *name; char namebuf[64]; + size_t len; int split; split = ((hdr->p_memsz > 0) && (hdr->p_filesz > 0) && (hdr->p_memsz > hdr->p_filesz)); sprintf (namebuf, "%s%d%s", typename, index, split ? "a" : ""); - name = bfd_alloc (abfd, (bfd_size_type) strlen (namebuf) + 1); + len = strlen (namebuf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (!name) return false; - strcpy (name, namebuf); + memcpy (name, namebuf, len); newsect = bfd_make_section (abfd, name); if (newsect == NULL) return false; @@ -2009,10 +2191,11 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename) if (split) { sprintf (namebuf, "%s%db", typename, index); - name = bfd_alloc (abfd, (bfd_size_type) strlen (namebuf) + 1); + len = strlen (namebuf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (!name) return false; - strcpy (name, namebuf); + memcpy (name, namebuf, len); newsect = bfd_make_section (abfd, name); if (newsect == NULL) return false; @@ -2259,8 +2442,23 @@ elf_fake_sections (abfd, asect, failedptrarg) if ((asect->flags & SEC_STRINGS) != 0) this_hdr->sh_flags |= SHF_STRINGS; } - if (elf_group_name (asect) != NULL) + if ((asect->flags & SEC_GROUP) == 0 && elf_group_name (asect) != NULL) this_hdr->sh_flags |= SHF_GROUP; + if ((asect->flags & SEC_THREAD_LOCAL) != 0) + { + this_hdr->sh_flags |= SHF_TLS; + if (asect->_raw_size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0) + { + struct bfd_link_order *o; + + this_hdr->sh_size = 0; + for (o = asect->link_order_head; o != NULL; o = o->next) + if (this_hdr->sh_size < o->offset + o->size) + this_hdr->sh_size = o->offset + o->size; + if (this_hdr->sh_size) + this_hdr->sh_type = SHT_NOBITS; + } + } /* Check for processor-specific section types. */ if (bed->elf_backend_fake_sections @@ -2281,35 +2479,47 @@ elf_fake_sections (abfd, asect, failedptrarg) /* Fill in the contents of a SHT_GROUP section. */ -static void -set_group_contents (abfd, sec, failedptrarg) +void +bfd_elf_set_group_contents (abfd, sec, failedptrarg) bfd *abfd; asection *sec; - PTR failedptrarg ATTRIBUTE_UNUSED; + PTR failedptrarg; { boolean *failedptr = (boolean *) failedptrarg; unsigned long symindx; - asection *elt; + asection *elt, *first; unsigned char *loc; struct bfd_link_order *l; + boolean gas; if (elf_section_data (sec)->this_hdr.sh_type != SHT_GROUP || *failedptr) return; - /* If called from the assembler, swap_out_syms will have set up - elf_section_syms; If called for "ld -r", the symbols won't yet - be mapped, so emulate elf_bfd_final_link. */ - if (elf_section_syms (abfd) != NULL) - symindx = elf_section_syms (abfd)[sec->index]->udata.i; - else - symindx = elf_section_data (sec)->this_idx; + symindx = 0; + if (elf_group_id (sec) != NULL) + symindx = elf_group_id (sec)->udata.i; + + if (symindx == 0) + { + /* If called from the assembler, swap_out_syms will have set up + elf_section_syms; If called for "ld -r", use target_index. */ + if (elf_section_syms (abfd) != NULL) + symindx = elf_section_syms (abfd)[sec->index]->udata.i; + else + symindx = sec->target_index; + } elf_section_data (sec)->this_hdr.sh_info = symindx; - /* Nor will the contents be allocated for "ld -r". */ + /* The contents won't be allocated for "ld -r" or objcopy. */ + gas = true; if (sec->contents == NULL) { + gas = false; sec->contents = bfd_alloc (abfd, sec->_raw_size); + + /* Arrange for the section to be written out. */ + elf_section_data (sec)->this_hdr.contents = sec->contents; if (sec->contents == NULL) { *failedptr = true; @@ -2319,9 +2529,10 @@ set_group_contents (abfd, sec, failedptrarg) loc = sec->contents + sec->_raw_size; - /* Get the pointer to the first section in the group that we - squirreled away here. */ - elt = elf_next_in_group (sec); + /* Get the pointer to the first section in the group that gas + squirreled away here. objcopy arranges for this to be set to the + start of the input section group. */ + first = elt = elf_next_in_group (sec); /* First element is a flag word. Rest of section is elf section indices for all the sections of the group. Write them backwards @@ -2329,9 +2540,20 @@ set_group_contents (abfd, sec, failedptrarg) directives, not that it matters. */ while (elt != NULL) { + asection *s; + unsigned int idx; + loc -= 4; - H_PUT_32 (abfd, elf_section_data (elt)->this_idx, loc); + s = elt; + if (!gas) + s = s->output_section; + idx = 0; + if (s != NULL) + idx = elf_section_data (s)->this_idx; + H_PUT_32 (abfd, idx, loc); elt = elf_next_in_group (elt); + if (elt == first) + break; } /* If this is a relocatable link, then the above did nothing because @@ -2350,10 +2572,16 @@ set_group_contents (abfd, sec, failedptrarg) } while (elt != elf_next_in_group (l->u.indirect.section)); - loc -= 4; - H_PUT_32 (abfd, 0, loc); + /* With ld -r, merging SHT_GROUP sections results in wasted space + due to allowing for the flag word on each input. We may well + duplicate entries too. */ + while ((loc -= 4) > sec->contents) + H_PUT_32 (abfd, 0, loc); + + if (loc != sec->contents) + abort (); - BFD_ASSERT (loc == sec->contents); + H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc); } /* Assign all ELF section numbers. The dummy first section is handled here @@ -2535,10 +2763,10 @@ assign_section_numbers (abfd) char *alc; len = strlen (sec->name); - alc = (char *) bfd_malloc ((bfd_size_type) len - 2); + alc = (char *) bfd_malloc ((bfd_size_type) (len - 2)); if (alc == NULL) return false; - strncpy (alc, sec->name, len - 3); + memcpy (alc, sec->name, len - 3); alc[len - 3] = '\0'; s = bfd_get_section_by_name (abfd, alc); free (alc); @@ -2547,8 +2775,9 @@ assign_section_numbers (abfd) elf_section_data (s)->this_hdr.sh_link = d->this_idx; /* This is a .stab section. */ - elf_section_data (s)->this_hdr.sh_entsize = - 4 + 2 * bfd_get_arch_size (abfd) / 8; + if (elf_section_data (s)->this_hdr.sh_entsize == 0) + elf_section_data (s)->this_hdr.sh_entsize + = 4 + 2 * bfd_get_arch_size (abfd) / 8; } } break; @@ -2834,9 +3063,9 @@ _bfd_elf_compute_section_file_positions (abfd, link_info) return false; } - if (link_info == NULL || link_info->relocateable) + if (link_info == NULL) { - bfd_map_over_sections (abfd, set_group_contents, &failed); + bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed); if (failed) return false; } @@ -2943,6 +3172,8 @@ map_sections_to_segments (abfd) asection **hdrpp; boolean phdr_in_segment = true; boolean writable; + int tls_count = 0; + asection *first_tls = NULL; asection *dynsec, *eh_frame_hdr; bfd_size_type amt; @@ -3086,8 +3317,9 @@ map_sections_to_segments (abfd) } else if (! writable && (hdr->flags & SEC_READONLY) == 0 - && (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize) - == hdr->lma)) + && (((last_hdr->lma + last_hdr->_raw_size - 1) + & ~(maxpagesize - 1)) + != (hdr->lma & ~(maxpagesize - 1)))) { /* We don't want to put a writable section in a read only segment, unless they are on the same page in memory @@ -3181,6 +3413,39 @@ map_sections_to_segments (abfd) *pm = m; pm = &m->next; } + if (s->flags & SEC_THREAD_LOCAL) + { + if (! tls_count) + first_tls = s; + tls_count++; + } + } + + /* If there are any SHF_TLS output sections, add PT_TLS segment. */ + if (tls_count > 0) + { + int i; + + amt = sizeof (struct elf_segment_map); + amt += (tls_count - 1) * sizeof (asection *); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); + if (m == NULL) + goto error_return; + m->next = NULL; + m->p_type = PT_TLS; + m->count = tls_count; + /* Mandated PF_R. */ + m->p_flags = PF_R; + m->p_flags_valid = 1; + for (i = 0; i < tls_count; ++i) + { + BFD_ASSERT (first_tls->flags & SEC_THREAD_LOCAL); + m->sections[i] = first_tls; + first_tls = first_tls->next; + } + + *pm = m; + pm = &m->next; } /* If there is a .eh_frame_hdr section, throw in a PT_GNU_EH_FRAME @@ -3295,6 +3560,37 @@ assign_file_positions_for_segments (abfd) if (! map_sections_to_segments (abfd)) return false; } + else + { + /* The placement algorithm assumes that non allocated sections are + not in PT_LOAD segments. We ensure this here by removing such + sections from the segment map. */ + for (m = elf_tdata (abfd)->segment_map; + m != NULL; + m = m->next) + { + unsigned int new_count; + unsigned int i; + + if (m->p_type != PT_LOAD) + continue; + + new_count = 0; + for (i = 0; i < m->count; i ++) + { + if ((m->sections[i]->flags & SEC_ALLOC) != 0) + { + if (i != new_count) + m->sections[new_count] = m->sections[i]; + + new_count ++; + } + } + + if (new_count != m->count) + m->count = new_count; + } + } if (bed->elf_backend_modify_segment_map) { @@ -3350,12 +3646,12 @@ assign_file_positions_for_segments (abfd) asection **secpp; /* If elf_segment_map is not from map_sections_to_segments, the - sections may not be correctly ordered. NOTE: sorting should + sections may not be correctly ordered. NOTE: sorting should not be done to the PT_NOTE section of a corefile, which may contain several pseudo-sections artificially created by bfd. Sorting these pseudo-sections breaks things badly. */ - if (m->count > 1 - && !(elf_elfheader (abfd)->e_type == ET_CORE + if (m->count > 1 + && !(elf_elfheader (abfd)->e_type == ET_CORE && m->p_type == PT_NOTE)) qsort (m->sections, (size_t) m->count, sizeof (asection *), elf_sort_sections); @@ -3424,8 +3720,9 @@ assign_file_positions_for_segments (abfd) if (p->p_vaddr < (bfd_vma) off) { - _bfd_error_handler (_("%s: Not enough room for program headers, try linking with -N"), - bfd_get_filename (abfd)); + (*_bfd_error_handler) + (_("%s: Not enough room for program headers, try linking with -N"), + bfd_get_filename (abfd)); bfd_set_error (bfd_error_bad_value); return false; } @@ -3605,6 +3902,20 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a if ((flags & SEC_LOAD) != 0) p->p_filesz += sec->_raw_size; + if (p->p_type == PT_TLS + && sec->_raw_size == 0 + && (sec->flags & SEC_HAS_CONTENTS) == 0) + { + struct bfd_link_order *o; + bfd_vma tbss_size = 0; + + for (o = sec->link_order_head; o != NULL; o = o->next) + if (tbss_size < o->offset + o->size) + tbss_size = o->offset + o->size; + + p->p_memsz += tbss_size; + } + if (align > p->p_align && (p->p_type != PT_LOAD || (abfd->flags & D_PAGED) == 0)) p->p_align = align; @@ -3649,6 +3960,11 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a } } + /* If additional nonloadable filepos adjustments are required, + do them now. */ + if (bed->set_nonloadable_filepos) + (*bed->set_nonloadable_filepos) (abfd, phdrs); + /* Clear out any program headers we allocated but did not use. */ for (; count < alloc; count++, p++) { @@ -3739,6 +4055,16 @@ get_program_header_size (abfd) } } + for (s = abfd->sections; s != NULL; s = s->next) + { + if (s->flags & SEC_THREAD_LOCAL) + { + /* We need a PT_TLS segment. */ + ++segs; + break; + } + } + /* Let the backend count up any program headers it might need. */ if (bed->elf_backend_additional_program_headers) { @@ -4197,6 +4523,7 @@ copy_private_bfd_data (ibfd, obfd) bfd_vma maxpagesize; struct elf_segment_map * phdr_adjust_seg = NULL; unsigned int phdr_adjust_num = 0; + struct elf_backend_data * bed; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) @@ -4205,6 +4532,7 @@ copy_private_bfd_data (ibfd, obfd) if (elf_tdata (ibfd)->phdr == NULL) return true; + bed = get_elf_backend_data (ibfd); iehdr = elf_elfheader (ibfd); map_first = NULL; @@ -4214,44 +4542,53 @@ copy_private_bfd_data (ibfd, obfd) maxpagesize = get_elf_backend_data (obfd)->maxpagesize; /* Returns the end address of the segment + 1. */ -#define SEGMENT_END(segment, start) \ - (start + (segment->p_memsz > segment->p_filesz \ - ? segment->p_memsz : segment->p_filesz)) +#define SEGMENT_END(segment, start) \ + (start + (segment->p_memsz > segment->p_filesz \ + ? segment->p_memsz : segment->p_filesz)) /* Returns true if the given section is contained within the given segment. VMA addresses are compared. */ -#define IS_CONTAINED_BY_VMA(section, segment) \ - (section->vma >= segment->p_vaddr \ - && (section->vma + section->_raw_size) \ - <= (SEGMENT_END (segment, segment->p_vaddr))) +#define IS_CONTAINED_BY_VMA(section, segment) \ + (section->vma >= segment->p_vaddr \ + && (section->vma + section->_raw_size \ + <= (SEGMENT_END (segment, segment->p_vaddr)))) /* Returns true if the given section is contained within the given segment. LMA addresses are compared. */ -#define IS_CONTAINED_BY_LMA(section, segment, base) \ - (section->lma >= base \ - && (section->lma + section->_raw_size) \ - <= SEGMENT_END (segment, base)) +#define IS_CONTAINED_BY_LMA(section, segment, base) \ + (section->lma >= base \ + && (section->lma + section->_raw_size \ + <= SEGMENT_END (segment, base))) + + /* Returns true if the given section is contained within the + given segment. Filepos addresses are compared in an elf + backend function. */ +#define IS_CONTAINED_BY_FILEPOS(sec, seg, bed) \ + (bed->is_contained_by_filepos \ + && (*bed->is_contained_by_filepos) (sec, seg)) /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */ -#define IS_COREFILE_NOTE(p, s) \ - (p->p_type == PT_NOTE \ - && bfd_get_format (ibfd) == bfd_core \ - && s->vma == 0 && s->lma == 0 \ - && (bfd_vma) s->filepos >= p->p_offset \ - && (bfd_vma) s->filepos + s->_raw_size \ - <= p->p_offset + p->p_filesz) +#define IS_COREFILE_NOTE(p, s) \ + (p->p_type == PT_NOTE \ + && bfd_get_format (ibfd) == bfd_core \ + && s->vma == 0 && s->lma == 0 \ + && (bfd_vma) s->filepos >= p->p_offset \ + && ((bfd_vma) s->filepos + s->_raw_size \ + <= p->p_offset + p->p_filesz)) /* The complicated case when p_vaddr is 0 is to handle the Solaris linker, which generates a PT_INTERP section with p_vaddr and p_memsz set to 0. */ -#define IS_SOLARIS_PT_INTERP(p, s) \ - ( p->p_vaddr == 0 \ - && p->p_filesz > 0 \ - && (s->flags & SEC_HAS_CONTENTS) != 0 \ - && s->_raw_size > 0 \ - && (bfd_vma) s->filepos >= p->p_offset \ - && ((bfd_vma) s->filepos + s->_raw_size \ - <= p->p_offset + p->p_filesz)) +#define IS_SOLARIS_PT_INTERP(p, s) \ + (p->p_vaddr == 0 \ + && p->p_paddr == 0 \ + && p->p_memsz == 0 \ + && p->p_filesz > 0 \ + && (s->flags & SEC_HAS_CONTENTS) != 0 \ + && s->_raw_size > 0 \ + && (bfd_vma) s->filepos >= p->p_offset \ + && ((bfd_vma) s->filepos + s->_raw_size \ + <= p->p_offset + p->p_filesz)) /* Decide if the given section should be included in the given segment. A section will be included if: @@ -4260,23 +4597,25 @@ copy_private_bfd_data (ibfd, obfd) 2. It is an allocated segment, 3. There is an output section associated with it, 4. The section has not already been allocated to a previous segment. */ -#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \ - (((((segment->p_paddr \ - ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ - : IS_CONTAINED_BY_VMA (section, segment)) \ - || IS_SOLARIS_PT_INTERP (segment, section)) \ +#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \ + ((((segment->p_paddr \ + ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ + : IS_CONTAINED_BY_VMA (section, segment)) \ && (section->flags & SEC_ALLOC) != 0) \ - || IS_COREFILE_NOTE (segment, section)) \ + || IS_COREFILE_NOTE (segment, section) \ + || (IS_CONTAINED_BY_FILEPOS (section, segment, bed) \ + && (section->flags & SEC_ALLOC) == 0)) \ && section->output_section != NULL \ - && section->segment_mark == false) + && ! section->segment_mark) /* Returns true iff seg1 starts after the end of seg2. */ -#define SEGMENT_AFTER_SEGMENT(seg1, seg2) \ - (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr)) +#define SEGMENT_AFTER_SEGMENT(seg1, seg2) \ + (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr)) /* Returns true iff seg1 and seg2 overlap. */ -#define SEGMENT_OVERLAPS(seg1, seg2) \ - (!(SEGMENT_AFTER_SEGMENT (seg1, seg2) || SEGMENT_AFTER_SEGMENT (seg2, seg1))) +#define SEGMENT_OVERLAPS(seg1, seg2) \ + (!(SEGMENT_AFTER_SEGMENT (seg1, seg2) \ + || SEGMENT_AFTER_SEGMENT (seg2, seg1))) /* Initialise the segment mark field. */ for (section = ibfd->sections; section != NULL; section = section->next) @@ -4285,7 +4624,7 @@ copy_private_bfd_data (ibfd, obfd) /* Scan through the segments specified in the program header of the input BFD. For this first scan we look for overlaps in the loadable segments. These can be created by weird - parameters to objcopy. */ + parameters to objcopy. Also, fix some solaris weirdness. */ for (i = 0, segment = elf_tdata (ibfd)->phdr; i < num_segments; i++, segment++) @@ -4293,6 +4632,16 @@ copy_private_bfd_data (ibfd, obfd) unsigned int j; Elf_Internal_Phdr *segment2; + if (segment->p_type == PT_INTERP) + for (section = ibfd->sections; section; section = section->next) + if (IS_SOLARIS_PT_INTERP (segment, section)) + { + /* Mininal change so that the normal section to segment + assigment code will work. */ + segment->p_vaddr = section->vma; + break; + } + if (segment->p_type != PT_LOAD) continue; @@ -4366,7 +4715,7 @@ copy_private_bfd_data (ibfd, obfd) /* Compute how many sections might be placed into this segment. */ section_count = 0; for (section = ibfd->sections; section != NULL; section = section->next) - if (INCLUDE_SECTION_IN_SEGMENT (section, segment)) + if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed)) ++section_count; /* Allocate a segment map big enough to contain all of the @@ -4409,11 +4758,12 @@ copy_private_bfd_data (ibfd, obfd) { /* Special segments, such as the PT_PHDR segment, may contain no sections, but ordinary, loadable segments should contain - something. */ + something. They are allowed by the ELF spec however, so only + a warning is produced. */ if (segment->p_type == PT_LOAD) - _bfd_error_handler - (_("%s: warning: Empty loadable segment detected\n"), - bfd_archive_filename (ibfd)); + (*_bfd_error_handler) + (_("%s: warning: Empty loadable segment detected, is this intentional ?\n"), + bfd_archive_filename (ibfd)); map->count = 0; *pointer_to_map = map; @@ -4450,7 +4800,9 @@ copy_private_bfd_data (ibfd, obfd) pointers that we are interested in. As these sections get assigned to a segment, they are removed from this array. */ - amt = (bfd_size_type) section_count * sizeof (asection *); + /* Gcc 2.96 miscompiles this code on mips. Don't do casting here + to work around this long long bug. */ + amt = section_count * sizeof (asection *); sections = (asection **) bfd_malloc (amt); if (sections == NULL) return false; @@ -4469,7 +4821,7 @@ copy_private_bfd_data (ibfd, obfd) section != NULL; section = section->next) { - if (INCLUDE_SECTION_IN_SEGMENT (section, segment)) + if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed)) { output_section = section->output_section; @@ -4477,9 +4829,11 @@ copy_private_bfd_data (ibfd, obfd) /* The Solaris native linker always sets p_paddr to 0. We try to catch that case here, and set it to the - correct value. */ + correct value. Note - some backends require that + p_paddr be left as zero. */ if (segment->p_paddr == 0 && segment->p_vaddr != 0 + && (! bed->want_p_paddr_set_to_zero) && isec == 0 && output_section->lma != 0 && (output_section->vma == (segment->p_vaddr @@ -4495,7 +4849,11 @@ copy_private_bfd_data (ibfd, obfd) /* Match up the physical address of the segment with the LMA address of the output section. */ if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr) - || IS_COREFILE_NOTE (segment, section)) + || IS_CONTAINED_BY_FILEPOS (section, segment, bed) + || IS_COREFILE_NOTE (segment, section) + || (bed->want_p_paddr_set_to_zero && + IS_CONTAINED_BY_VMA (output_section, segment)) + ) { if (matching_lma == 0) matching_lma = output_section->lma; @@ -4564,7 +4922,7 @@ copy_private_bfd_data (ibfd, obfd) } /* Step Three: Loop over the sections again, this time assigning - those that fit to the current segment and remvoing them from the + those that fit to the current segment and removing them from the sections array; but making sure not to leave large gaps. Once all possible sections have been assigned to the current segment it is added to the list of built segments and if sections still remain @@ -4615,7 +4973,7 @@ copy_private_bfd_data (ibfd, obfd) maxpagesize then we need to start a new segment. */ if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size, maxpagesize) - < BFD_ALIGN (output_section->lma, maxpagesize)) + < BFD_ALIGN (output_section->lma, maxpagesize)) || ((prev_sec->lma + prev_sec->_raw_size) > output_section->lma)) { @@ -4728,6 +5086,7 @@ copy_private_bfd_data (ibfd, obfd) #undef SEGMENT_END #undef IS_CONTAINED_BY_VMA #undef IS_CONTAINED_BY_LMA +#undef IS_CONTAINED_BY_FILEPOS #undef IS_COREFILE_NOTE #undef IS_SOLARIS_PT_INTERP #undef INCLUDE_SECTION_IN_SEGMENT @@ -4747,6 +5106,7 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec) asection *osec; { Elf_Internal_Shdr *ihdr, *ohdr; + const struct elf_backend_data *bed = get_elf_backend_data (ibfd); if (ibfd->xvec->flavour != bfd_target_elf_flavour || obfd->xvec->flavour != bfd_target_elf_flavour) @@ -4756,24 +5116,31 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec) This must be done here, rather than in the copy_private_bfd_data entry point, because the latter is called after the section contents have been set, which means that the program headers have - already been worked out. */ - if (elf_tdata (obfd)->segment_map == NULL - && elf_tdata (ibfd)->phdr != NULL) + already been worked out. The backend function provides a way to + override the test conditions and code path for the call to + copy_private_bfd_data. */ + if (bed->copy_private_bfd_data_p) { - asection *s; + if ((*bed->copy_private_bfd_data_p) (ibfd, isec, obfd, osec)) + if (! copy_private_bfd_data (ibfd, obfd)) + return false; + } + else if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL) + { + asection *s; - /* Only set up the segments if there are no more SEC_ALLOC - sections. FIXME: This won't do the right thing if objcopy is - used to remove the last SEC_ALLOC section, since objcopy - won't call this routine in that case. */ - for (s = isec->next; s != NULL; s = s->next) - if ((s->flags & SEC_ALLOC) != 0) - break; - if (s == NULL) - { - if (! copy_private_bfd_data (ibfd, obfd)) - return false; - } + /* Only set up the segments if there are no more SEC_ALLOC + sections. FIXME: This won't do the right thing if objcopy is + used to remove the last SEC_ALLOC section, since objcopy + won't call this routine in that case. */ + for (s = isec->next; s != NULL; s = s->next) + if ((s->flags & SEC_ALLOC) != 0) + break; + if (s == NULL) + { + if (! copy_private_bfd_data (ibfd, obfd)) + return false; + } } ihdr = &elf_section_data (isec)->this_hdr; @@ -4787,6 +5154,12 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec) || ihdr->sh_type == SHT_GNU_verdef) ohdr->sh_info = ihdr->sh_info; + /* Set things up for objcopy. The output SHT_GROUP section will + have its elf_next_in_group pointing back to the input group + members. */ + elf_next_in_group (osec) = elf_next_in_group (isec); + elf_group_name (osec) = elf_group_name (isec); + elf_section_data (osec)->use_rela_p = elf_section_data (isec)->use_rela_p; @@ -4895,10 +5268,9 @@ swap_out_syms (abfd, sttp, relocatable_p) if (symtab_shndx_hdr->sh_name != 0) { amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx); - outbound_shndx = bfd_alloc (abfd, amt); + outbound_shndx = bfd_zalloc (abfd, amt); if (outbound_shndx == NULL) return false; - memset (outbound_shndx, 0, (unsigned long) amt); symtab_shndx_hdr->contents = outbound_shndx; symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; symtab_shndx_hdr->sh_size = amt; @@ -5032,13 +5404,18 @@ swap_out_syms (abfd, sttp, relocatable_p) sym.st_shndx = shndx; } - if ((flags & BSF_FUNCTION) != 0) + if ((flags & BSF_THREAD_LOCAL) != 0) + type = STT_TLS; + else if ((flags & BSF_FUNCTION) != 0) type = STT_FUNC; else if ((flags & BSF_OBJECT) != 0) type = STT_OBJECT; else type = STT_NOTYPE; + if (syms[idx]->section->flags & SEC_THREAD_LOCAL) + type = STT_TLS; + /* Processor-specific types */ if (type_ptr != NULL && bed->elf_backend_get_symbol_type) @@ -5196,7 +5573,11 @@ _bfd_elf_canonicalize_dynamic_symtab (abfd, alocation) asymbol **alocation; { struct elf_backend_data *bed = get_elf_backend_data (abfd); - return bed->s->slurp_symbol_table (abfd, alocation, true); + long symcount = bed->s->slurp_symbol_table (abfd, alocation, true); + + if (symcount >= 0) + bfd_get_dynamic_symcount (abfd) = symcount; + return symcount; } /* Return the size required for the dynamic reloc entries. Any @@ -5665,7 +6046,7 @@ _bfd_elf_find_nearest_line (abfd, section, symbols, offset, functionname_ptr, line_ptr, &elf_tdata (abfd)->line_info)) return false; - if (found) + if (found && (*functionname_ptr || *line_ptr)) return true; if (symbols == NULL) @@ -5704,8 +6085,8 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count) bfd_signed_vma pos; if (! abfd->output_has_begun - && ! _bfd_elf_compute_section_file_positions - (abfd, (struct bfd_link_info *) NULL)) + && ! (_bfd_elf_compute_section_file_positions + (abfd, (struct bfd_link_info *) NULL))) return false; hdr = &elf_section_data (section)->this_hdr; @@ -5928,15 +6309,17 @@ _bfd_elfcore_make_pseudosection (abfd, name, size, filepos) { char buf[100]; char *threaded_name; + size_t len; asection *sect; /* Build the section name. */ sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd)); - threaded_name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1); + len = strlen (buf) + 1; + threaded_name = bfd_alloc (abfd, (bfd_size_type) len); if (threaded_name == NULL) return false; - strcpy (threaded_name, buf); + memcpy (threaded_name, buf, len); sect = bfd_make_section (abfd, threaded_name); if (sect == NULL) @@ -6221,6 +6604,7 @@ elfcore_grok_lwpstatus (abfd, note) lwpstatus_t lwpstat; char buf[100]; char *name; + size_t len; asection *sect; if (note->descsz != sizeof (lwpstat) @@ -6238,10 +6622,11 @@ elfcore_grok_lwpstatus (abfd, note) /* Make a ".reg/999" section. */ sprintf (buf, ".reg/%d", elfcore_make_pid (abfd)); - name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1); + len = strlen (buf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (name == NULL) return false; - strcpy (name, buf); + memcpy (name, buf, len); sect = bfd_make_section (abfd, name); if (sect == NULL) @@ -6267,10 +6652,11 @@ elfcore_grok_lwpstatus (abfd, note) /* Make a ".reg2/999" section */ sprintf (buf, ".reg2/%d", elfcore_make_pid (abfd)); - name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1); + len = strlen (buf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (name == NULL) return false; - strcpy (name, buf); + memcpy (name, buf, len); sect = bfd_make_section (abfd, name); if (sect == NULL) @@ -6302,6 +6688,7 @@ elfcore_grok_win32pstatus (abfd, note) { char buf[30]; char *name; + size_t len; asection *sect; win32_pstatus_t pstatus; @@ -6322,11 +6709,12 @@ elfcore_grok_win32pstatus (abfd, note) /* Make a ".reg/999" section. */ sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid); - name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1); + len = strlen (buf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (name == NULL) return false; - strcpy (name, buf); + memcpy (name, buf, len); sect = bfd_make_section (abfd, name); if (sect == NULL) @@ -6348,11 +6736,12 @@ elfcore_grok_win32pstatus (abfd, note) /* Make a ".module/xxxxxxxx" section. */ sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address); - name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1); + len = strlen (buf) + 1; + name = bfd_alloc (abfd, (bfd_size_type) len); if (name == NULL) return false; - strcpy (name, buf); + memcpy (name, buf, len); sect = bfd_make_section (abfd, name); @@ -6486,7 +6875,7 @@ elfcore_grok_netbsd_note (abfd, note) find this note before any of the others, which is fine, since the kernel writes this note out first when it creates a core file. */ - + return elfcore_grok_netbsd_procinfo (abfd, note); } @@ -6494,7 +6883,7 @@ elfcore_grok_netbsd_note (abfd, note) defined for NetBSD core files. If the note type is less than the start of the machine-dependent note types, we don't understand it. */ - + if (note->type < NT_NETBSDCORE_FIRSTMACH) return true; @@ -6539,7 +6928,7 @@ elfcore_grok_netbsd_note (abfd, note) /* Function: elfcore_write_note - Inputs: + Inputs: buffer to hold note name of note type of note @@ -6554,16 +6943,30 @@ elfcore_write_note (abfd, buf, bufsiz, name, type, input, size) bfd *abfd; char *buf; int *bufsiz; - char *name; + const char *name; int type; - void *input; + const PTR input; int size; { Elf_External_Note *xnp; - int namesz = strlen (name); - int newspace = BFD_ALIGN (sizeof (Elf_External_Note) + size + namesz - 1, 4); + size_t namesz; + size_t pad; + size_t newspace; char *p, *dest; + namesz = 0; + pad = 0; + if (name != NULL) + { + struct elf_backend_data *bed; + + namesz = strlen (name) + 1; + bed = get_elf_backend_data (abfd); + pad = -namesz & (bed->s->file_align - 1); + } + + newspace = sizeof (Elf_External_Note) - 1 + namesz + pad + size; + p = realloc (buf, *bufsiz + newspace); dest = p + *bufsiz; *bufsiz += newspace; @@ -6571,8 +6974,18 @@ elfcore_write_note (abfd, buf, bufsiz, name, type, input, size) H_PUT_32 (abfd, namesz, xnp->namesz); H_PUT_32 (abfd, size, xnp->descsz); H_PUT_32 (abfd, type, xnp->type); - strcpy (xnp->name, name); - memcpy (xnp->name + BFD_ALIGN (namesz, 4), input, size); + dest = xnp->name; + if (name != NULL) + { + memcpy (dest, name, namesz); + dest += namesz; + while (pad != 0) + { + *dest++ = '\0'; + --pad; + } + } + memcpy (dest, input, size); return p; } @@ -6582,8 +6995,8 @@ elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs) bfd *abfd; char *buf; int *bufsiz; - char *fname; - char *psargs; + const char *fname; + const char *psargs; { int note_type; char *note_name = "CORE"; @@ -6599,7 +7012,7 @@ elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs) memset (&data, 0, sizeof (data)); strncpy (data.pr_fname, fname, sizeof (data.pr_fname)); strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs)); - return elfcore_write_note (abfd, buf, bufsiz, + return elfcore_write_note (abfd, buf, bufsiz, note_name, note_type, &data, sizeof (data)); } #endif /* PSINFO_T or PRPSINFO_T */ @@ -6612,7 +7025,7 @@ elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs) int *bufsiz; long pid; int cursig; - void *gregs; + const PTR gregs; { prstatus_t prstat; char *note_name = "CORE"; @@ -6621,7 +7034,7 @@ elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs) prstat.pr_pid = pid; prstat.pr_cursig = cursig; memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg)); - return elfcore_write_note (abfd, buf, bufsiz, + return elfcore_write_note (abfd, buf, bufsiz, note_name, NT_PRSTATUS, &prstat, sizeof (prstat)); } #endif /* HAVE_PRSTATUS_T */ @@ -6634,7 +7047,7 @@ elfcore_write_lwpstatus (abfd, buf, bufsiz, pid, cursig, gregs) int *bufsiz; long pid; int cursig; - void *gregs; + const PTR gregs; { lwpstatus_t lwpstat; char *note_name = "CORE"; @@ -6653,7 +7066,7 @@ elfcore_write_lwpstatus (abfd, buf, bufsiz, pid, cursig, gregs) gregs, sizeof (lwpstat.pr_context.uc_mcontext.__gregs)); #endif #endif - return elfcore_write_note (abfd, buf, bufsiz, note_name, + return elfcore_write_note (abfd, buf, bufsiz, note_name, NT_LWPSTATUS, &lwpstat, sizeof (lwpstat)); } #endif /* HAVE_LWPSTATUS_T */ @@ -6666,14 +7079,14 @@ elfcore_write_pstatus (abfd, buf, bufsiz, pid, cursig, gregs) int *bufsiz; long pid; int cursig; - void *gregs; + const PTR gregs; { pstatus_t pstat; char *note_name = "CORE"; memset (&pstat, 0, sizeof (pstat)); pstat.pr_pid = pid & 0xffff; - buf = elfcore_write_note (abfd, buf, bufsiz, note_name, + buf = elfcore_write_note (abfd, buf, bufsiz, note_name, NT_PSTATUS, &pstat, sizeof (pstat)); return buf; } @@ -6684,11 +7097,11 @@ elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size) bfd *abfd; char *buf; int *bufsiz; - void *fpregs; + const PTR fpregs; int size; { char *note_name = "CORE"; - return elfcore_write_note (abfd, buf, bufsiz, + return elfcore_write_note (abfd, buf, bufsiz, note_name, NT_FPREGSET, fpregs, size); } @@ -6697,11 +7110,11 @@ elfcore_write_prxfpreg (abfd, buf, bufsiz, xfpregs, size) bfd *abfd; char *buf; int *bufsiz; - void *xfpregs; + const PTR xfpregs; int size; { char *note_name = "LINUX"; - return elfcore_write_note (abfd, buf, bufsiz, + return elfcore_write_note (abfd, buf, bufsiz, note_name, NT_PRXFPREG, xfpregs, size); } @@ -6882,7 +7295,7 @@ _bfd_elf_reloc_type_class (rela) return reloc_class_normal; } -/* For RELA architectures, return what the relocation value for +/* For RELA architectures, return the relocation value for a relocation against a local symbol. */ bfd_vma @@ -6921,7 +7334,7 @@ _bfd_elf_rel_local_sym (abfd, sym, psec, addend) Elf_Internal_Sym *sym; asection **psec; bfd_vma addend; -{ +{ asection *sec = *psec; if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE) diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c index ad7247a..ff5c5f4 100644 --- a/contrib/binutils/bfd/elf32-arc.c +++ b/contrib/binutils/bfd/elf32-arc.c @@ -235,7 +235,7 @@ arc_elf_b22_pcrel (abfd, reloc_entry, symbol, data, input_section, return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); } - + #define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec #define TARGET_LITTLE_NAME "elf32-littlearc" #define TARGET_BIG_SYM bfd_elf32_bigarc_vec diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h index 7d02127..f41b843 100644 --- a/contrib/binutils/bfd/elf32-arm.h +++ b/contrib/binutils/bfd/elf32-arm.h @@ -58,7 +58,7 @@ static boolean elf32_arm_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static asection * elf32_arm_gc_mark_hook - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); static boolean elf32_arm_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, @@ -236,14 +236,14 @@ elf32_arm_link_hash_table_create (abfd) struct elf32_arm_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table); - ret = (struct elf32_arm_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct elf32_arm_link_hash_table *) bfd_malloc (amt); if (ret == (struct elf32_arm_link_hash_table *) NULL) return NULL; if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, elf32_arm_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -547,31 +547,22 @@ record_thumb_to_arm_glue (link_info, h) return; } -/* Select a BFD to be used to hold the sections used by the glue code. - This function is called from the linker scripts in ld/emultempl/ - {armelf/pe}.em */ +/* Add the glue sections to ABFD. This function is called from the + linker scripts in ld/emultempl/{armelf}.em. */ boolean -bfd_elf32_arm_get_bfd_for_interworking (abfd, info) +bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info) bfd *abfd; struct bfd_link_info *info; { - struct elf32_arm_link_hash_table *globals; flagword flags; asection *sec; - /* If we are only performing a partial link do not bother - getting a bfd to hold the glue. */ + /* If we are only performing a partial + link do not bother adding the glue. */ if (info->relocateable) return true; - globals = elf32_arm_hash_table (info); - - BFD_ASSERT (globals != NULL); - - if (globals->bfd_of_glue_owner != NULL) - return true; - sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME); if (sec == NULL) @@ -609,6 +600,32 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) sec->gc_mark = 1; } + return true; +} + +/* Select a BFD to be used to hold the sections used by the glue code. + This function is called from the linker scripts in ld/emultempl/ + {armelf/pe}.em */ + +boolean +bfd_elf32_arm_get_bfd_for_interworking (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + struct elf32_arm_link_hash_table *globals; + + /* If we are only performing a partial link + do not bother getting a bfd to hold the glue. */ + if (info->relocateable) + return true; + + globals = elf32_arm_hash_table (info); + + BFD_ASSERT (globals != NULL); + + if (globals->bfd_of_glue_owner != NULL) + return true; + /* Save the bfd for later use. */ globals->bfd_of_glue_owner = abfd; @@ -622,12 +639,9 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) int no_pipeline_knowledge; { Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Rela *free_relocs = NULL; + Elf_Internal_Rela *internal_relocs = NULL; Elf_Internal_Rela *irel, *irelend; bfd_byte *contents = NULL; - bfd_byte *free_contents = NULL; - Elf32_External_Sym *extsyms = NULL; - Elf32_External_Sym *free_extsyms = NULL; asection *sec; struct elf32_arm_link_hash_table *globals; @@ -660,13 +674,15 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) symtab_hdr = &elf_tdata (abfd)->symtab_hdr; /* Load the relocs. */ - irel = (_bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL, - (Elf_Internal_Rela *) NULL, false)); + internal_relocs + = _bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL, + (Elf_Internal_Rela *) NULL, false); - BFD_ASSERT (irel != 0); + if (internal_relocs == NULL) + goto error_return; - irelend = irel + sec->reloc_count; - for (; irel < irelend; irel++) + irelend = internal_relocs + sec->reloc_count; + for (irel = internal_relocs; irel < irelend; irel++) { long r_type; unsigned long r_index; @@ -694,37 +710,12 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) if (contents == NULL) goto error_return; - free_contents = contents; - if (!bfd_get_section_contents (abfd, sec, contents, (file_ptr) 0, sec->_raw_size)) goto error_return; } } - /* Read this BFD's symbols if we haven't done so already. */ - if (extsyms == NULL) - { - /* Get cached copy if it exists. */ - if (symtab_hdr->contents != NULL) - extsyms = (Elf32_External_Sym *) symtab_hdr->contents; - else - { - /* Go get them off disk. */ - extsyms = ((Elf32_External_Sym *) - bfd_malloc (symtab_hdr->sh_size)); - if (extsyms == NULL) - goto error_return; - - free_extsyms = extsyms; - - if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || (bfd_bread (extsyms, symtab_hdr->sh_size, abfd) - != symtab_hdr->sh_size)) - goto error_return; - } - } - /* If the relocation is not against a symbol it cannot concern us. */ h = NULL; @@ -764,17 +755,27 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) break; } } + + if (contents != NULL + && elf_section_data (sec)->this_hdr.contents != contents) + free (contents); + contents = NULL; + + if (internal_relocs != NULL + && elf_section_data (sec)->relocs != internal_relocs) + free (internal_relocs); + internal_relocs = NULL; } return true; error_return: - if (free_relocs != NULL) - free (free_relocs); - if (free_contents != NULL) - free (free_contents); - if (free_extsyms != NULL) - free (free_extsyms); + if (contents != NULL + && elf_section_data (sec)->this_hdr.contents != contents) + free (contents); + if (internal_relocs != NULL + && elf_section_data (sec)->relocs != internal_relocs) + free (internal_relocs); return false; } @@ -1471,22 +1472,19 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, if (signed_check > reloc_signed_max || signed_check < reloc_signed_min) overflow = true; - /* Put RELOCATION back into the insn. */ - upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff); - lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff); - #ifndef OLD_ARM_ABI if (r_type == R_ARM_THM_XPC22 && ((lower_insn & 0x1800) == 0x0800)) - /* Remove bit zero of the adjusted offset. Bit zero can only be - set if the upper insn is at a half-word boundary, since the - destination address, an ARM instruction, must always be on a - word boundary. The semantics of the BLX (1) instruction, however, - are that bit zero in the offset must always be zero, and the - corresponding bit one in the target address will be set from bit - one of the source address. */ - lower_insn &= ~1; + /* For a BLX instruction, make sure that the relocation is rounded up + to a word boundary. This follows the semantics of the instruction + which specifies that bit 1 of the target address will come from bit + 1 of the base address. */ + relocation = (relocation + 2) & ~ 3; #endif + /* Put RELOCATION back into the insn. */ + upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff); + lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff); + /* Put the relocated value back in the object file: */ bfd_put_16 (input_bfd, upper_insn, hit_data); bfd_put_16 (input_bfd, lower_insn, hit_data + 2); @@ -1526,7 +1524,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, signed_check = check | ~((bfd_vma) -1 >> howto->rightshift); relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask)); - + bfd_put_16 (input_bfd, relocation, hit_data); /* Assumes two's complement. */ @@ -1535,7 +1533,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; } - + case R_ARM_GNU_VTINHERIT: case R_ARM_GNU_VTENTRY: return bfd_reloc_ok; @@ -1560,7 +1558,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, if (sgot == NULL) return bfd_reloc_notsupported; - /* If we are addressing a Thumb function, we need to adjust the + /* If we are addressing a Thumb function, we need to adjust the address by one, so that attempts to call the function pointer will correctly interpret it as Thumb code. */ if (sym_flags == STT_ARM_TFUNC) @@ -2209,7 +2207,7 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) asection *sec; /* Check if we have the same endianess. */ - if (_bfd_generic_verify_endian_match (ibfd, obfd) == false) + if (! _bfd_generic_verify_endian_match (ibfd, obfd)) return false; if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour @@ -2360,7 +2358,7 @@ ERROR: %s uses hardware FP, whereas %s uses software FP"), _bfd_error_handler (_("\ Warning: %s supports interworking, whereas %s does not"), bfd_archive_filename (ibfd), - bfd_get_filename (obfd)); + bfd_get_filename (obfd)); } else { @@ -2515,8 +2513,8 @@ elf32_arm_get_symbol_type (elf_sym, type) } static asection * -elf32_arm_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +elf32_arm_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; @@ -2546,9 +2544,7 @@ elf32_arm_gc_mark_hook (abfd, info, rel, h, sym) } } else - { - return bfd_section_from_elf_index (abfd, sym->st_shndx); - } + return bfd_section_from_elf_index (sec->owner, sym->st_shndx); return NULL; } @@ -2962,16 +2958,22 @@ elf32_arm_adjust_dynamic_symbol (info, h) if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { + /* If we link a program (not a DSO), we'll get rid of unnecessary + PLT entries; we point to the actual symbols -- even for pic + relocs, because a program built with -fpic should have the same + result as one built without -fpic, specifically considering weak + symbols. + FIXME: m68k and i386 differ here, for unclear reasons. */ if (! info->shared - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0) { /* This case can occur if we saw a PLT32 reloc in an input - file, but the symbol was never referred to by a dynamic - object. In such a case, we don't actually need to build - a procedure linkage table, and we can just do a PC32 - reloc instead. */ + file, but the symbol was not defined by a dynamic object. + In such a case, we don't actually need to build a + procedure linkage table, and we can just do a PC32 reloc + instead. */ BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0); + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; return true; } diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c index d74f6ee..d52d5a7 100644 --- a/contrib/binutils/bfd/elf32-i386.c +++ b/contrib/binutils/bfd/elf32-i386.c @@ -45,12 +45,20 @@ static boolean create_got_section static boolean elf_i386_create_dynamic_sections PARAMS((bfd *, struct bfd_link_info *)); static void elf_i386_copy_indirect_symbol - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); +static int elf_i386_tls_transition + PARAMS ((struct bfd_link_info *, int, int)); + +static boolean elf_i386_mkobject + PARAMS((bfd *)); +static boolean elf_i386_object_p + PARAMS((bfd *)); static boolean elf_i386_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); static asection *elf_i386_gc_mark_hook - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); static boolean elf_i386_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, @@ -65,6 +73,10 @@ static boolean elf_i386_fake_sections PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *)); static boolean elf_i386_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); +static bfd_vma dtpoff_base + PARAMS ((struct bfd_link_info *)); +static bfd_vma tpoff + PARAMS ((struct bfd_link_info *, bfd_vma)); static boolean elf_i386_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); @@ -121,9 +133,27 @@ static reloc_howto_type elf_howto_table[]= R_386_ext_offset is the value to subtract from a reloc type of R_386_16 thru R_386_PC8 to form an index into this table. */ #define R_386_standard ((unsigned int) R_386_GOTPC + 1) -#define R_386_ext_offset ((unsigned int) R_386_16 - R_386_standard) +#define R_386_ext_offset ((unsigned int) R_386_TLS_TPOFF - R_386_standard) - /* The remaining relocs are a GNU extension. */ + /* These relocs are a GNU extension. */ + HOWTO(R_386_TLS_TPOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_TPOFF", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_IE, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_IE", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_GOTIE, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_GOTIE", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LE, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_LE", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_GD, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_GD", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LDM, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_LDM", + true, 0xffffffff, 0xffffffff, false), HOWTO(R_386_16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_16", true, 0xffff, 0xffff, false), @@ -137,9 +167,31 @@ static reloc_howto_type elf_howto_table[]= bfd_elf_generic_reloc, "R_386_PC8", true, 0xff, 0xff, true), - /* Another gap. */ #define R_386_ext ((unsigned int) R_386_PC8 + 1 - R_386_ext_offset) -#define R_386_vt_offset ((unsigned int) R_386_GNU_VTINHERIT - R_386_ext) +#define R_386_tls_offset ((unsigned int) R_386_TLS_LDO_32 - R_386_ext) + /* These are common with Solaris TLS implementation. */ + HOWTO(R_386_TLS_LDO_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_LDO_32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_IE_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_IE_32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LE_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_LE_32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_DTPMOD32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_DTPMOD32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_DTPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_DTPOFF32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_TPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_TLS_TPOFF32", + true, 0xffffffff, 0xffffffff, false), + + /* Another gap. */ +#define R_386_tls ((unsigned int) R_386_TLS_TPOFF32 + 1 - R_386_tls_offset) +#define R_386_vt_offset ((unsigned int) R_386_GNU_VTINHERIT - R_386_tls) /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_386_GNU_VTINHERIT, /* type */ @@ -154,7 +206,7 @@ static reloc_howto_type elf_howto_table[]= false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - false), + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_386_GNU_VTENTRY, /* type */ @@ -169,7 +221,7 @@ static reloc_howto_type elf_howto_table[]= false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - false) + false) /* pcrel_offset */ #define R_386_vt ((unsigned int) R_386_GNU_VTENTRY + 1 - R_386_vt_offset) @@ -236,7 +288,31 @@ elf_i386_reloc_type_lookup (abfd, code) TRACE ("BFD_RELOC_386_GOTPC"); return &elf_howto_table[(unsigned int) R_386_GOTPC ]; - /* The remaining relocs are a GNU extension. */ + /* These relocs are a GNU extension. */ + case BFD_RELOC_386_TLS_TPOFF: + TRACE ("BFD_RELOC_386_TLS_TPOFF"); + return &elf_howto_table[(unsigned int) R_386_TLS_TPOFF - R_386_ext_offset]; + + case BFD_RELOC_386_TLS_IE: + TRACE ("BFD_RELOC_386_TLS_IE"); + return &elf_howto_table[(unsigned int) R_386_TLS_IE - R_386_ext_offset]; + + case BFD_RELOC_386_TLS_GOTIE: + TRACE ("BFD_RELOC_386_TLS_GOTIE"); + return &elf_howto_table[(unsigned int) R_386_TLS_GOTIE - R_386_ext_offset]; + + case BFD_RELOC_386_TLS_LE: + TRACE ("BFD_RELOC_386_TLS_LE"); + return &elf_howto_table[(unsigned int) R_386_TLS_LE - R_386_ext_offset]; + + case BFD_RELOC_386_TLS_GD: + TRACE ("BFD_RELOC_386_TLS_GD"); + return &elf_howto_table[(unsigned int) R_386_TLS_GD - R_386_ext_offset]; + + case BFD_RELOC_386_TLS_LDM: + TRACE ("BFD_RELOC_386_TLS_LDM"); + return &elf_howto_table[(unsigned int) R_386_TLS_LDM - R_386_ext_offset]; + case BFD_RELOC_16: TRACE ("BFD_RELOC_16"); return &elf_howto_table[(unsigned int) R_386_16 - R_386_ext_offset]; @@ -253,6 +329,31 @@ elf_i386_reloc_type_lookup (abfd, code) TRACE ("BFD_RELOC_8_PCREL"); return &elf_howto_table[(unsigned int) R_386_PC8 - R_386_ext_offset]; + /* Common with Sun TLS implementation. */ + case BFD_RELOC_386_TLS_LDO_32: + TRACE ("BFD_RELOC_386_TLS_LDO_32"); + return &elf_howto_table[(unsigned int) R_386_TLS_LDO_32 - R_386_tls_offset]; + + case BFD_RELOC_386_TLS_IE_32: + TRACE ("BFD_RELOC_386_TLS_IE_32"); + return &elf_howto_table[(unsigned int) R_386_TLS_IE_32 - R_386_tls_offset]; + + case BFD_RELOC_386_TLS_LE_32: + TRACE ("BFD_RELOC_386_TLS_LE_32"); + return &elf_howto_table[(unsigned int) R_386_TLS_LE_32 - R_386_tls_offset]; + + case BFD_RELOC_386_TLS_DTPMOD32: + TRACE ("BFD_RELOC_386_TLS_DTPMOD32"); + return &elf_howto_table[(unsigned int) R_386_TLS_DTPMOD32 - R_386_tls_offset]; + + case BFD_RELOC_386_TLS_DTPOFF32: + TRACE ("BFD_RELOC_386_TLS_DTPOFF32"); + return &elf_howto_table[(unsigned int) R_386_TLS_DTPOFF32 - R_386_tls_offset]; + + case BFD_RELOC_386_TLS_TPOFF32: + TRACE ("BFD_RELOC_386_TLS_TPOFF32"); + return &elf_howto_table[(unsigned int) R_386_TLS_TPOFF32 - R_386_tls_offset]; + case BFD_RELOC_VTABLE_INHERIT: TRACE ("BFD_RELOC_VTABLE_INHERIT"); return &elf_howto_table[(unsigned int) R_386_GNU_VTINHERIT @@ -292,8 +393,10 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst) if ((indx = r_type) >= R_386_standard && ((indx = r_type - R_386_ext_offset) - R_386_standard >= R_386_ext - R_386_standard) - && ((indx = r_type - R_386_vt_offset) - R_386_ext - >= R_386_vt - R_386_ext)) + && ((indx = r_type - R_386_tls_offset) - R_386_ext + >= R_386_tls - R_386_ext) + && ((indx = r_type - R_386_vt_offset) - R_386_tls + >= R_386_vt - R_386_tls)) { (*_bfd_error_handler) (_("%s: invalid relocation type %d"), bfd_archive_filename (abfd), (int) r_type); @@ -481,8 +584,59 @@ struct elf_i386_link_hash_entry /* Track dynamic relocs copied for this symbol. */ struct elf_i386_dyn_relocs *dyn_relocs; + +#define GOT_UNKNOWN 0 +#define GOT_NORMAL 1 +#define GOT_TLS_GD 2 +#define GOT_TLS_IE 4 +#define GOT_TLS_IE_POS 5 +#define GOT_TLS_IE_NEG 6 +#define GOT_TLS_IE_BOTH 7 + unsigned char tls_type; }; +#define elf_i386_hash_entry(ent) ((struct elf_i386_link_hash_entry *)(ent)) + +struct elf_i386_obj_tdata +{ + struct elf_obj_tdata root; + + /* tls_type for each local got entry. */ + char *local_got_tls_type; +}; + +#define elf_i386_tdata(abfd) \ + ((struct elf_i386_obj_tdata *) (abfd)->tdata.any) + +#define elf_i386_local_got_tls_type(abfd) \ + (elf_i386_tdata (abfd)->local_got_tls_type) + +static boolean +elf_i386_mkobject (abfd) + bfd *abfd; +{ + bfd_size_type amt = sizeof (struct elf_i386_obj_tdata); + abfd->tdata.any = bfd_zalloc (abfd, amt); + if (abfd->tdata.any == NULL) + return false; + return true; +} + +static boolean +elf_i386_object_p (abfd) + bfd *abfd; +{ + /* Allocate our special target data. */ + struct elf_i386_obj_tdata *new_tdata; + bfd_size_type amt = sizeof (struct elf_i386_obj_tdata); + new_tdata = bfd_zalloc (abfd, amt); + if (new_tdata == NULL) + return false; + new_tdata->root = *abfd->tdata.elf_obj_data; + abfd->tdata.any = new_tdata; + return true; +} + /* i386 ELF linker hash table. */ struct elf_i386_link_hash_table @@ -498,6 +652,11 @@ struct elf_i386_link_hash_table asection *sdynbss; asection *srelbss; + union { + bfd_signed_vma refcount; + bfd_vma offset; + } tls_ldm_got; + /* Small local sym to section mapping cache. */ struct sym_sec_cache sym_sec; }; @@ -533,6 +692,7 @@ link_hash_newfunc (entry, table, string) eh = (struct elf_i386_link_hash_entry *) entry; eh->dyn_relocs = NULL; + eh->tls_type = GOT_UNKNOWN; } return entry; @@ -547,13 +707,13 @@ elf_i386_link_hash_table_create (abfd) struct elf_i386_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_i386_link_hash_table); - ret = (struct elf_i386_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct elf_i386_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -564,6 +724,7 @@ elf_i386_link_hash_table_create (abfd) ret->srelplt = NULL; ret->sdynbss = NULL; ret->srelbss = NULL; + ret->tls_ldm_got.refcount = 0; ret->sym_sec.abfd = NULL; return &ret->elf.root; @@ -633,7 +794,8 @@ elf_i386_create_dynamic_sections (dynobj, info) /* Copy the extra info we tack onto an elf_link_hash_entry. */ static void -elf_i386_copy_indirect_symbol (dir, ind) +elf_i386_copy_indirect_symbol (bed, dir, ind) + struct elf_backend_data *bed; struct elf_link_hash_entry *dir, *ind; { struct elf_i386_link_hash_entry *edir, *eind; @@ -675,7 +837,41 @@ elf_i386_copy_indirect_symbol (dir, ind) eind->dyn_relocs = NULL; } - _bfd_elf_link_hash_copy_indirect (dir, ind); + if (ind->root.type == bfd_link_hash_indirect + && dir->got.refcount <= 0) + { + edir->tls_type = eind->tls_type; + eind->tls_type = GOT_UNKNOWN; + } + _bfd_elf_link_hash_copy_indirect (bed, dir, ind); +} + +static int +elf_i386_tls_transition (info, r_type, is_local) + struct bfd_link_info *info; + int r_type; + int is_local; +{ + if (info->shared) + return r_type; + + switch (r_type) + { + case R_386_TLS_GD: + case R_386_TLS_IE_32: + if (is_local) + return R_386_TLS_LE_32; + return R_386_TLS_IE_32; + case R_386_TLS_IE: + case R_386_TLS_GOTIE: + if (is_local) + return R_386_TLS_LE_32; + return r_type; + case R_386_TLS_LDM: + return R_386_TLS_LE_32; + } + + return r_type; } /* Look through the relocs for a section during the first phase, and @@ -708,10 +904,12 @@ elf_i386_check_relocs (abfd, info, sec, relocs) rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) { + unsigned int r_type; unsigned long r_symndx; struct elf_link_hash_entry *h; r_symndx = ELF32_R_SYM (rel->r_info); + r_type = ELF32_R_TYPE (rel->r_info); if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) { @@ -726,46 +924,13 @@ elf_i386_check_relocs (abfd, info, sec, relocs) else h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - switch (ELF32_R_TYPE (rel->r_info)) - { - case R_386_GOT32: - /* This symbol requires a global offset table entry. */ - if (h != NULL) - { - h->got.refcount += 1; - } - else - { - bfd_signed_vma *local_got_refcounts; - - /* This is a global offset table entry for a local symbol. */ - local_got_refcounts = elf_local_got_refcounts (abfd); - if (local_got_refcounts == NULL) - { - bfd_size_type size; + r_type = elf_i386_tls_transition (info, r_type, h == NULL); - size = symtab_hdr->sh_info; - size *= sizeof (bfd_signed_vma); - local_got_refcounts = ((bfd_signed_vma *) - bfd_zalloc (abfd, size)); - if (local_got_refcounts == NULL) - return false; - elf_local_got_refcounts (abfd) = local_got_refcounts; - } - local_got_refcounts[r_symndx] += 1; - } - /* Fall through */ - - case R_386_GOTOFF: - case R_386_GOTPC: - if (htab->sgot == NULL) - { - if (htab->elf.dynobj == NULL) - htab->elf.dynobj = abfd; - if (!create_got_section (htab->elf.dynobj, info)) - return false; - } - break; + switch (r_type) + { + case R_386_TLS_LDM: + htab->tls_ldm_got.refcount += 1; + goto create_got; case R_386_PLT32: /* This symbol requires a procedure linkage table entry. We @@ -784,6 +949,116 @@ elf_i386_check_relocs (abfd, info, sec, relocs) h->plt.refcount += 1; break; + case R_386_TLS_IE_32: + case R_386_TLS_IE: + case R_386_TLS_GOTIE: + if (info->shared) + info->flags |= DF_STATIC_TLS; + /* Fall through */ + + case R_386_GOT32: + case R_386_TLS_GD: + /* This symbol requires a global offset table entry. */ + { + int tls_type, old_tls_type; + + switch (r_type) + { + default: + case R_386_GOT32: tls_type = GOT_NORMAL; break; + case R_386_TLS_GD: tls_type = GOT_TLS_GD; break; + case R_386_TLS_IE_32: + if (ELF32_R_TYPE (rel->r_info) == r_type) + tls_type = GOT_TLS_IE_NEG; + else + /* If this is a GD->IE transition, we may use either of + R_386_TLS_TPOFF and R_386_TLS_TPOFF32. */ + tls_type = GOT_TLS_IE; + break; + case R_386_TLS_IE: + case R_386_TLS_GOTIE: + tls_type = GOT_TLS_IE_POS; break; + } + + if (h != NULL) + { + h->got.refcount += 1; + old_tls_type = elf_i386_hash_entry(h)->tls_type; + } + else + { + bfd_signed_vma *local_got_refcounts; + + /* This is a global offset table entry for a local symbol. */ + local_got_refcounts = elf_local_got_refcounts (abfd); + if (local_got_refcounts == NULL) + { + bfd_size_type size; + + size = symtab_hdr->sh_info; + size *= (sizeof (bfd_signed_vma) + sizeof(char)); + local_got_refcounts = ((bfd_signed_vma *) + bfd_zalloc (abfd, size)); + if (local_got_refcounts == NULL) + return false; + elf_local_got_refcounts (abfd) = local_got_refcounts; + elf_i386_local_got_tls_type (abfd) + = (char *) (local_got_refcounts + symtab_hdr->sh_info); + } + local_got_refcounts[r_symndx] += 1; + old_tls_type = elf_i386_local_got_tls_type (abfd) [r_symndx]; + } + + if ((old_tls_type & GOT_TLS_IE) && (tls_type & GOT_TLS_IE)) + tls_type |= old_tls_type; + /* If a TLS symbol is accessed using IE at least once, + there is no point to use dynamic model for it. */ + else if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN + && (old_tls_type != GOT_TLS_GD + || (tls_type & GOT_TLS_IE) == 0)) + { + if ((old_tls_type & GOT_TLS_IE) && tls_type == GOT_TLS_GD) + tls_type = old_tls_type; + else + { + (*_bfd_error_handler) + (_("%s: `%s' accessed both as normal and thread local symbol"), + bfd_archive_filename (abfd), + h ? h->root.root.string : "<local>"); + return false; + } + } + + if (old_tls_type != tls_type) + { + if (h != NULL) + elf_i386_hash_entry (h)->tls_type = tls_type; + else + elf_i386_local_got_tls_type (abfd) [r_symndx] = tls_type; + } + } + /* Fall through */ + + case R_386_GOTOFF: + case R_386_GOTPC: + create_got: + if (htab->sgot == NULL) + { + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + if (!create_got_section (htab->elf.dynobj, info)) + return false; + } + if (r_type != R_386_TLS_IE) + break; + /* Fall through */ + + case R_386_TLS_LE_32: + case R_386_TLS_LE: + if (!info->shared) + break; + /* Fall through */ + case R_386_32: case R_386_PC32: if (h != NULL && !info->shared) @@ -824,7 +1099,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs) symbol. */ if ((info->shared && (sec->flags & SEC_ALLOC) != 0 - && (ELF32_R_TYPE (rel->r_info) != R_386_PC32 + && (r_type != R_386_PC32 || (h != NULL && (! info->symbolic || h->root.type == bfd_link_hash_defweak @@ -923,7 +1198,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs) } p->count += 1; - if (ELF32_R_TYPE (rel->r_info) == R_386_PC32) + if (r_type == R_386_PC32) p->pc_count += 1; } break; @@ -954,8 +1229,8 @@ elf_i386_check_relocs (abfd, info, sec, relocs) relocation. */ static asection * -elf_i386_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +elf_i386_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; @@ -985,9 +1260,7 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym) } } else - { - return bfd_section_from_elf_index (abfd, sym->st_shndx); - } + return bfd_section_from_elf_index (sec->owner, sym->st_shndx); return NULL; } @@ -1006,6 +1279,7 @@ elf_i386_gc_sweep_hook (abfd, info, sec, relocs) bfd_signed_vma *local_got_refcounts; const Elf_Internal_Rela *rel, *relend; unsigned long r_symndx; + int r_type; struct elf_link_hash_entry *h; elf_section_data (sec)->local_dynrel = NULL; @@ -1016,11 +1290,21 @@ elf_i386_gc_sweep_hook (abfd, info, sec, relocs) relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; rel++) - switch (ELF32_R_TYPE (rel->r_info)) + switch ((r_type = elf_i386_tls_transition (info, + ELF32_R_TYPE (rel->r_info), + ELF32_R_SYM (rel->r_info) + >= symtab_hdr->sh_info))) { + case R_386_TLS_LDM: + if (elf_i386_hash_table (info)->tls_ldm_got.refcount > 0) + elf_i386_hash_table (info)->tls_ldm_got.refcount -= 1; + break; + + case R_386_TLS_GD: + case R_386_TLS_IE_32: + case R_386_TLS_IE: + case R_386_TLS_GOTIE: case R_386_GOT32: - case R_386_GOTOFF: - case R_386_GOTPC: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) { @@ -1033,7 +1317,15 @@ elf_i386_gc_sweep_hook (abfd, info, sec, relocs) if (local_got_refcounts[r_symndx] > 0) local_got_refcounts[r_symndx] -= 1; } - break; + if (r_type != R_386_TLS_IE) + break; + /* Fall through */ + + case R_386_TLS_LE_32: + case R_386_TLS_LE: + if (!info->shared) + break; + /* Fall through */ case R_386_32: case R_386_PC32: @@ -1173,7 +1465,7 @@ elf_i386_adjust_dynamic_symbol (info, h) } /* If we didn't find any dynamic relocs in read-only sections, then - we'll be keeping the dynamic relocs and avoiding the copy reloc. */ + we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (p == NULL) { h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF; @@ -1319,10 +1611,18 @@ allocate_dynrelocs (h, inf) h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; } - if (h->got.refcount > 0) + /* If R_386_TLS_{IE_32,IE,GOTIE} symbol is now local to the binary, + make it a R_386_TLS_LE_32 requiring no TLS entry. */ + if (h->got.refcount > 0 + && !info->shared + && h->dynindx == -1 + && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE)) + h->got.offset = (bfd_vma) -1; + else if (h->got.refcount > 0) { asection *s; boolean dyn; + int tls_type = elf_i386_hash_entry(h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1336,8 +1636,23 @@ allocate_dynrelocs (h, inf) s = htab->sgot; h->got.offset = s->_raw_size; s->_raw_size += 4; + /* R_386_TLS_GD needs 2 consecutive GOT slots. */ + if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE_BOTH) + s->_raw_size += 4; dyn = htab->elf.dynamic_sections_created; - if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)) + /* R_386_TLS_IE_32 needs one dynamic relocation, + R_386_TLS_IE resp. R_386_TLS_GOTIE needs one dynamic relocation, + (but if both R_386_TLS_IE_32 and R_386_TLS_IE is present, we + need two), R_386_TLS_GD needs one if local symbol and two if + global. */ + if (tls_type == GOT_TLS_IE_BOTH) + htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel); + else if ((tls_type == GOT_TLS_GD && h->dynindx == -1) + || (tls_type & GOT_TLS_IE)) + htab->srelgot->_raw_size += sizeof (Elf32_External_Rel); + else if (tls_type == GOT_TLS_GD) + htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel); + else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)) htab->srelgot->_raw_size += sizeof (Elf32_External_Rel); } else @@ -1483,6 +1798,7 @@ elf_i386_size_dynamic_sections (output_bfd, info) { bfd_signed_vma *local_got; bfd_signed_vma *end_local_got; + char *local_tls_type; bfd_size_type locsymcount; Elf_Internal_Shdr *symtab_hdr; asection *srel; @@ -1524,22 +1840,44 @@ elf_i386_size_dynamic_sections (output_bfd, info) symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; locsymcount = symtab_hdr->sh_info; end_local_got = local_got + locsymcount; + local_tls_type = elf_i386_local_got_tls_type (ibfd); s = htab->sgot; srel = htab->srelgot; - for (; local_got < end_local_got; ++local_got) + for (; local_got < end_local_got; ++local_got, ++local_tls_type) { if (*local_got > 0) { *local_got = s->_raw_size; s->_raw_size += 4; - if (info->shared) - srel->_raw_size += sizeof (Elf32_External_Rel); + if (*local_tls_type == GOT_TLS_GD + || *local_tls_type == GOT_TLS_IE_BOTH) + s->_raw_size += 4; + if (info->shared + || *local_tls_type == GOT_TLS_GD + || (*local_tls_type & GOT_TLS_IE)) + { + if (*local_tls_type == GOT_TLS_IE_BOTH) + srel->_raw_size += 2 * sizeof (Elf32_External_Rel); + else + srel->_raw_size += sizeof (Elf32_External_Rel); + } } else *local_got = (bfd_vma) -1; } } + if (htab->tls_ldm_got.refcount > 0) + { + /* Allocate 2 got entries and 1 dynamic reloc for R_386_TLS_LDM + relocs. */ + htab->tls_ldm_got.offset = htab->sgot->_raw_size; + htab->sgot->_raw_size += 8; + htab->srelgot->_raw_size += sizeof (Elf32_External_Rel); + } + else + htab->tls_ldm_got.offset = -1; + /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info); @@ -1685,6 +2023,38 @@ elf_i386_fake_sections (abfd, hdr, sec) return true; } +/* Return the base VMA address which should be subtracted from real addresses + when resolving @dtpoff relocation. + This is PT_TLS segment p_vaddr. */ + +static bfd_vma +dtpoff_base (info) + struct bfd_link_info *info; +{ + /* If tls_segment is NULL, we should have signalled an error already. */ + if (elf_hash_table (info)->tls_segment == NULL) + return 0; + return elf_hash_table (info)->tls_segment->start; +} + +/* Return the relocation value for @tpoff relocation + if STT_TLS virtual address is ADDRESS. */ + +static bfd_vma +tpoff (info, address) + struct bfd_link_info *info; + bfd_vma address; +{ + struct elf_link_tls_segment *tls_segment + = elf_hash_table (info)->tls_segment; + + /* If tls_segment is NULL, we should have signalled an error already. */ + if (tls_segment == NULL) + return 0; + return (align_power (tls_segment->size, tls_segment->align) + + tls_segment->start - address); +} + /* Relocate an i386 ELF section. */ static boolean @@ -1715,7 +2085,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) { - int r_type; + unsigned int r_type; reloc_howto_type *howto; unsigned long r_symndx; struct elf_link_hash_entry *h; @@ -1726,6 +2096,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, boolean unresolved_reloc; bfd_reloc_status_type r; unsigned int indx; + int tls_type; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == (int) R_386_GNU_VTINHERIT @@ -1733,8 +2104,10 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, continue; if ((indx = (unsigned) r_type) >= R_386_standard - && ((indx = (unsigned) r_type - R_386_ext_offset) - R_386_standard - >= R_386_ext - R_386_standard)) + && ((indx = r_type - R_386_ext_offset) - R_386_standard + >= R_386_ext - R_386_standard) + && ((indx = r_type - R_386_tls_offset) - R_386_ext + >= R_386_tls - R_386_ext)) { bfd_set_error (bfd_error_bad_value); return false; @@ -1745,22 +2118,43 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, if (info->relocateable) { + bfd_vma val; + bfd_byte *where; + /* This is a relocatable link. We don't have to change anything, unless the reloc is against a section symbol, in which case we have to adjust according to where the section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - bfd_vma val; + if (r_symndx >= symtab_hdr->sh_info) + continue; - sec = local_sections[r_symndx]; - val = bfd_get_32 (input_bfd, contents + rel->r_offset); - val += sec->output_offset + sym->st_value; - bfd_put_32 (input_bfd, val, contents + rel->r_offset); - } + sym = local_syms + r_symndx; + if (ELF_ST_TYPE (sym->st_info) != STT_SECTION) + continue; + + sec = local_sections[r_symndx]; + val = sec->output_offset; + if (val == 0) + continue; + + where = contents + rel->r_offset; + switch (howto->size) + { + /* FIXME: overflow checks. */ + case 0: + val += bfd_get_8 (input_bfd, where); + bfd_put_8 (input_bfd, val, where); + break; + case 1: + val += bfd_get_16 (input_bfd, where); + bfd_put_16 (input_bfd, val, where); + break; + case 2: + val += bfd_get_32 (input_bfd, where); + bfd_put_32 (input_bfd, val, where); + break; + default: + abort (); } continue; } @@ -1782,24 +2176,62 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, { asection *msec; bfd_vma addend; + bfd_byte *where = contents + rel->r_offset; - if (howto->src_mask != 0xffffffff) + switch (howto->size) { - (*_bfd_error_handler) - (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"), - bfd_archive_filename (input_bfd), - bfd_get_section_name (input_bfd, input_section), - (long) rel->r_offset, howto->name); - return false; + case 0: + addend = bfd_get_8 (input_bfd, where); + if (howto->pc_relative) + { + addend = (addend ^ 0x80) - 0x80; + addend += 1; + } + break; + case 1: + addend = bfd_get_16 (input_bfd, where); + if (howto->pc_relative) + { + addend = (addend ^ 0x8000) - 0x8000; + addend += 2; + } + break; + case 2: + addend = bfd_get_32 (input_bfd, where); + if (howto->pc_relative) + { + addend = (addend ^ 0x80000000) - 0x80000000; + addend += 4; + } + break; + default: + abort (); } - addend = bfd_get_32 (input_bfd, contents + rel->r_offset); msec = sec; - addend = - _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - - relocation; + addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend); + addend -= relocation; addend += msec->output_section->vma + msec->output_offset; - bfd_put_32 (input_bfd, addend, contents + rel->r_offset); + + switch (howto->size) + { + case 0: + /* FIXME: overflow checks. */ + if (howto->pc_relative) + addend -= 1; + bfd_put_8 (input_bfd, addend, where); + break; + case 1: + if (howto->pc_relative) + addend -= 2; + bfd_put_16 (input_bfd, addend, where); + break; + case 2: + if (howto->pc_relative) + addend -= 4; + bfd_put_32 (input_bfd, addend, where); + break; + } } } else @@ -2059,25 +2491,505 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, } break; + case R_386_TLS_IE: + if (info->shared) + { + Elf_Internal_Rel outrel; + asection *sreloc; + Elf32_External_Rel *loc; + + outrel.r_offset = rel->r_offset + + input_section->output_section->vma + + input_section->output_offset; + outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc == NULL) + abort (); + loc = (Elf32_External_Rel *) sreloc->contents; + loc += sreloc->reloc_count++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + } + /* Fall through */ + + case R_386_TLS_GD: + case R_386_TLS_IE_32: + case R_386_TLS_GOTIE: + r_type = elf_i386_tls_transition (info, r_type, h == NULL); + tls_type = GOT_UNKNOWN; + if (h == NULL && local_got_offsets) + tls_type = elf_i386_local_got_tls_type (input_bfd) [r_symndx]; + else if (h != NULL) + { + tls_type = elf_i386_hash_entry(h)->tls_type; + if (!info->shared && h->dynindx == -1 && (tls_type & GOT_TLS_IE)) + r_type = R_386_TLS_LE_32; + } + if (tls_type == GOT_TLS_IE) + tls_type = GOT_TLS_IE_NEG; + if (r_type == R_386_TLS_GD) + { + if (tls_type == GOT_TLS_IE_POS) + r_type = R_386_TLS_GOTIE; + else if (tls_type & GOT_TLS_IE) + r_type = R_386_TLS_IE_32; + } + + if (r_type == R_386_TLS_LE_32) + { + BFD_ASSERT (! unresolved_reloc); + if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD) + { + unsigned int val, type; + bfd_vma roff; + + /* GD->LE transition. */ + BFD_ASSERT (rel->r_offset >= 2); + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2); + BFD_ASSERT (type == 0x8d || type == 0x04); + BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset + 4) + == 0xe8); + BFD_ASSERT (rel + 1 < relend); + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32); + roff = rel->r_offset + 5; + val = bfd_get_8 (input_bfd, + contents + rel->r_offset - 1); + if (type == 0x04) + { + /* leal foo(,%reg,1), %eax; call ___tls_get_addr + Change it into: + movl %gs:0, %eax; subl $foo@tpoff, %eax + (6 byte form of subl). */ + BFD_ASSERT (rel->r_offset >= 3); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset - 3) + == 0x8d); + BFD_ASSERT ((val & 0xc7) == 0x05 && val != (4 << 3)); + memcpy (contents + rel->r_offset - 3, + "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12); + } + else + { + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4); + if (rel->r_offset + 10 <= input_section->_raw_size + && bfd_get_8 (input_bfd, + contents + rel->r_offset + 9) == 0x90) + { + /* leal foo(%reg), %eax; call ___tls_get_addr; nop + Change it into: + movl %gs:0, %eax; subl $foo@tpoff, %eax + (6 byte form of subl). */ + memcpy (contents + rel->r_offset - 2, + "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12); + roff = rel->r_offset + 6; + } + else + { + /* leal foo(%reg), %eax; call ___tls_get_addr + Change it into: + movl %gs:0, %eax; subl $foo@tpoff, %eax + (5 byte form of subl). */ + memcpy (contents + rel->r_offset - 2, + "\x65\xa1\0\0\0\0\x2d\0\0\0", 11); + } + } + bfd_put_32 (output_bfd, tpoff (info, relocation), + contents + roff); + /* Skip R_386_PLT32. */ + rel++; + continue; + } + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_IE) + { + unsigned int val, type; + + /* IE->LE transition: + Originally it can be one of: + movl foo, %eax + movl foo, %reg + addl foo, %reg + We change it into: + movl $foo, %eax + movl $foo, %reg + addl $foo, %reg. */ + BFD_ASSERT (rel->r_offset >= 1); + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1); + BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size); + if (val != 0xa1) + { + BFD_ASSERT (rel->r_offset >= 2); + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2); + } + if (val == 0xa1) + { + /* movl foo, %eax. */ + bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 2); + } + else if (type == 0x8b) + { + /* movl */ + BFD_ASSERT ((val & 0xc7) == 0x05); + bfd_put_8 (output_bfd, 0xc7, + contents + rel->r_offset - 2); + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7), + contents + rel->r_offset - 1); + } + else if (type == 0x03) + { + /* addl */ + BFD_ASSERT ((val & 0xc7) == 0x05); + bfd_put_8 (output_bfd, 0x81, + contents + rel->r_offset - 2); + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7), + contents + rel->r_offset - 1); + } + else + BFD_FAIL (); + bfd_put_32 (output_bfd, -tpoff (info, relocation), + contents + rel->r_offset); + continue; + } + else + { + unsigned int val, type; + + /* {IE_32,GOTIE}->LE transition: + Originally it can be one of: + subl foo(%reg1), %reg2 + movl foo(%reg1), %reg2 + addl foo(%reg1), %reg2 + We change it into: + subl $foo, %reg2 + movl $foo, %reg2 (6 byte form) + addl $foo, %reg2. */ + BFD_ASSERT (rel->r_offset >= 2); + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2); + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1); + BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size); + BFD_ASSERT ((val & 0xc0) == 0x80 && (val & 7) != 4); + if (type == 0x8b) + { + /* movl */ + bfd_put_8 (output_bfd, 0xc7, + contents + rel->r_offset - 2); + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7), + contents + rel->r_offset - 1); + } + else if (type == 0x2b) + { + /* subl */ + bfd_put_8 (output_bfd, 0x81, + contents + rel->r_offset - 2); + bfd_put_8 (output_bfd, 0xe8 | ((val >> 3) & 7), + contents + rel->r_offset - 1); + } + else if (type == 0x03) + { + /* addl */ + bfd_put_8 (output_bfd, 0x81, + contents + rel->r_offset - 2); + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7), + contents + rel->r_offset - 1); + } + else + BFD_FAIL (); + if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTIE) + bfd_put_32 (output_bfd, -tpoff (info, relocation), + contents + rel->r_offset); + else + bfd_put_32 (output_bfd, tpoff (info, relocation), + contents + rel->r_offset); + continue; + } + } + + if (htab->sgot == NULL) + abort (); + + if (h != NULL) + off = h->got.offset; + else + { + if (local_got_offsets == NULL) + abort (); + + off = local_got_offsets[r_symndx]; + } + + if ((off & 1) != 0) + off &= ~1; + else + { + Elf_Internal_Rel outrel; + Elf32_External_Rel *loc; + int dr_type, indx; + + if (htab->srelgot == NULL) + abort (); + + outrel.r_offset = (htab->sgot->output_section->vma + + htab->sgot->output_offset + off); + + indx = h && h->dynindx != -1 ? h->dynindx : 0; + if (r_type == R_386_TLS_GD) + dr_type = R_386_TLS_DTPMOD32; + else if (tls_type == GOT_TLS_IE_POS) + dr_type = R_386_TLS_TPOFF; + else + dr_type = R_386_TLS_TPOFF32; + if (dr_type == R_386_TLS_TPOFF && indx == 0) + bfd_put_32 (output_bfd, relocation - dtpoff_base (info), + htab->sgot->contents + off); + else if (dr_type == R_386_TLS_TPOFF32 && indx == 0) + bfd_put_32 (output_bfd, dtpoff_base (info) - relocation, + htab->sgot->contents + off); + else + bfd_put_32 (output_bfd, 0, + htab->sgot->contents + off); + outrel.r_info = ELF32_R_INFO (indx, dr_type); + loc = (Elf32_External_Rel *) htab->srelgot->contents; + loc += htab->srelgot->reloc_count++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + + if (r_type == R_386_TLS_GD) + { + if (indx == 0) + { + BFD_ASSERT (! unresolved_reloc); + bfd_put_32 (output_bfd, + relocation - dtpoff_base (info), + htab->sgot->contents + off + 4); + } + else + { + bfd_put_32 (output_bfd, 0, + htab->sgot->contents + off + 4); + outrel.r_info = ELF32_R_INFO (indx, + R_386_TLS_DTPOFF32); + outrel.r_offset += 4; + htab->srelgot->reloc_count++; + loc++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, + loc); + } + } + else if (tls_type == GOT_TLS_IE_BOTH) + { + bfd_put_32 (output_bfd, + indx == 0 ? relocation - dtpoff_base (info) : 0, + htab->sgot->contents + off + 4); + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF); + outrel.r_offset += 4; + htab->srelgot->reloc_count++; + loc++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + } + + if (h != NULL) + h->got.offset |= 1; + else + local_got_offsets[r_symndx] |= 1; + } + + if (off >= (bfd_vma) -2) + abort (); + if (r_type == ELF32_R_TYPE (rel->r_info)) + { + relocation = htab->sgot->output_offset + off; + if ((r_type == R_386_TLS_IE || r_type == R_386_TLS_GOTIE) + && tls_type == GOT_TLS_IE_BOTH) + relocation += 4; + if (r_type == R_386_TLS_IE) + relocation += htab->sgot->output_section->vma; + unresolved_reloc = false; + } + else + { + unsigned int val, type; + bfd_vma roff; + + /* GD->IE transition. */ + BFD_ASSERT (rel->r_offset >= 2); + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2); + BFD_ASSERT (type == 0x8d || type == 0x04); + BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size); + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4) + == 0xe8); + BFD_ASSERT (rel + 1 < relend); + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32); + roff = rel->r_offset - 3; + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1); + if (type == 0x04) + { + /* leal foo(,%reg,1), %eax; call ___tls_get_addr + Change it into: + movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */ + BFD_ASSERT (rel->r_offset >= 3); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset - 3) + == 0x8d); + BFD_ASSERT ((val & 0xc7) == 0x05 && val != (4 << 3)); + val >>= 3; + } + else + { + /* leal foo(%reg), %eax; call ___tls_get_addr; nop + Change it into: + movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */ + BFD_ASSERT (rel->r_offset + 10 <= input_section->_raw_size); + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset + 9) + == 0x90); + roff = rel->r_offset - 2; + } + memcpy (contents + roff, + "\x65\xa1\0\0\0\0\x2b\x80\0\0\0", 12); + contents[roff + 7] = 0x80 | (val & 7); + /* If foo is used only with foo@gotntpoff(%reg) and + foo@indntpoff, but not with foo@gottpoff(%reg), change + subl $foo@gottpoff(%reg), %eax + into: + addl $foo@gotntpoff(%reg), %eax. */ + if (r_type == R_386_TLS_GOTIE) + { + contents[roff + 6] = 0x03; + if (tls_type == GOT_TLS_IE_BOTH) + off += 4; + } + bfd_put_32 (output_bfd, htab->sgot->output_offset + off, + contents + roff + 8); + /* Skip R_386_PLT32. */ + rel++; + continue; + } + break; + + case R_386_TLS_LDM: + if (! info->shared) + { + unsigned int val; + + /* LD->LE transition: + Ensure it is: + leal foo(%reg), %eax; call ___tls_get_addr. + We change it into: + movl %gs:0, %eax; nop; leal 0(%esi,1), %esi. */ + BFD_ASSERT (rel->r_offset >= 2); + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 2) + == 0x8d); + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1); + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4); + BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size); + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4) + == 0xe8); + BFD_ASSERT (rel + 1 < relend); + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32); + memcpy (contents + rel->r_offset - 2, + "\x65\xa1\0\0\0\0\x90\x8d\x74\x26", 11); + /* Skip R_386_PLT32. */ + rel++; + continue; + } + + if (htab->sgot == NULL) + abort (); + + off = htab->tls_ldm_got.offset; + if (off & 1) + off &= ~1; + else + { + Elf_Internal_Rel outrel; + Elf32_External_Rel *loc; + + if (htab->srelgot == NULL) + abort (); + + outrel.r_offset = (htab->sgot->output_section->vma + + htab->sgot->output_offset + off); + + bfd_put_32 (output_bfd, 0, + htab->sgot->contents + off); + bfd_put_32 (output_bfd, 0, + htab->sgot->contents + off + 4); + outrel.r_info = ELF32_R_INFO (0, R_386_TLS_DTPMOD32); + loc = (Elf32_External_Rel *) htab->srelgot->contents; + loc += htab->srelgot->reloc_count++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + htab->tls_ldm_got.offset |= 1; + } + relocation = htab->sgot->output_offset + off; + unresolved_reloc = false; + break; + + case R_386_TLS_LDO_32: + if (info->shared) + relocation -= dtpoff_base (info); + else + /* When converting LDO to LE, we must negate. */ + relocation = -tpoff (info, relocation); + break; + + case R_386_TLS_LE_32: + case R_386_TLS_LE: + if (info->shared) + { + Elf_Internal_Rel outrel; + asection *sreloc; + Elf32_External_Rel *loc; + int indx; + + outrel.r_offset = rel->r_offset + + input_section->output_section->vma + + input_section->output_offset; + if (h != NULL && h->dynindx != -1) + indx = h->dynindx; + else + indx = 0; + if (r_type == R_386_TLS_LE_32) + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF32); + else + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF); + sreloc = elf_section_data (input_section)->sreloc; + if (sreloc == NULL) + abort (); + loc = (Elf32_External_Rel *) sreloc->contents; + loc += sreloc->reloc_count++; + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + if (indx) + continue; + else if (r_type == R_386_TLS_LE_32) + relocation = dtpoff_base (info) - relocation; + else + relocation -= dtpoff_base (info); + } + else if (r_type == R_386_TLS_LE_32) + relocation = tpoff (info, relocation); + else + relocation = -tpoff (info, relocation); + break; + default: break; } - /* FIXME: Why do we allow debugging sections to escape this error? - More importantly, why do we not emit dynamic relocs for - R_386_32 above in debugging sections (which are ! SEC_ALLOC)? - If we had emitted the dynamic reloc, we could remove the - fudge here. */ + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections + because such sections are not SEC_ALLOC and thus ld.so will + not process them. */ if (unresolved_reloc - && !(info->shared - && (input_section->flags & SEC_DEBUGGING) != 0 + && !((input_section->flags & SEC_DEBUGGING) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) - (*_bfd_error_handler) - (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), - bfd_archive_filename (input_bfd), - bfd_get_section_name (input_bfd, input_section), - (long) rel->r_offset, - h->root.root.string); + { + (*_bfd_error_handler) + (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, + h->root.root.string); + return false; + } r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, @@ -2102,7 +3014,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, if (r == bfd_reloc_overflow) { - if (! ((*info->callbacks->reloc_overflow) (info, name, howto->name, (bfd_vma) 0, input_bfd, input_section, rel->r_offset))) @@ -2210,12 +3121,14 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym) the .plt section. Leave the value alone. This is a clue for the dynamic linker, to make function pointer comparisons work between an application and shared - library. */ + library. */ sym->st_shndx = SHN_UNDEF; } } - if (h->got.offset != (bfd_vma) -1) + if (h->got.offset != (bfd_vma) -1 + && elf_i386_hash_entry(h)->tls_type != GOT_TLS_GD + && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE) == 0) { Elf_Internal_Rel rel; Elf32_External_Rel *loc; @@ -2430,11 +3343,13 @@ elf_i386_finish_dynamic_sections (output_bfd, info) return true; } +#ifndef ELF_ARCH #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 #define ELF_MACHINE_CODE EM_386 #define ELF_MAXPAGESIZE 0x1000 +#endif /* ELF_ARCH */ #define elf_backend_can_gc_sections 1 #define elf_backend_can_refcount 1 @@ -2447,6 +3362,9 @@ elf_i386_finish_dynamic_sections (output_bfd, info) #define elf_info_to_howto elf_i386_info_to_howto #define elf_info_to_howto_rel elf_i386_info_to_howto_rel +#define bfd_elf32_mkobject elf_i386_mkobject +#define elf_backend_object_p elf_i386_object_p + #define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name #define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create #define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup @@ -2466,4 +3384,6 @@ elf_i386_finish_dynamic_sections (output_bfd, info) #define elf_backend_relocate_section elf_i386_relocate_section #define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections +#ifndef ELF32_I386_C_INCLUDED #include "elf32-target.h" +#endif diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c index 31d9e0c..9abdf61 100644 --- a/contrib/binutils/bfd/elf32-ppc.c +++ b/contrib/binutils/bfd/elf32-ppc.c @@ -43,6 +43,7 @@ static boolean ppc_elf_relax_section PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *)); static bfd_reloc_status_type ppc_elf_addr16_ha_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static boolean ppc_elf_object_p PARAMS ((bfd *)); static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword)); static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); @@ -56,7 +57,7 @@ static boolean ppc_elf_create_dynamic_sections static boolean ppc_elf_section_from_shdr PARAMS ((bfd *, Elf32_Internal_Shdr *, - char *)); + const char *)); static boolean ppc_elf_fake_sections PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *)); @@ -70,7 +71,7 @@ static boolean ppc_elf_check_relocs PARAMS ((bfd *, asection *, const Elf_Internal_Rela *)); -static asection * ppc_elf_gc_mark_hook PARAMS ((bfd *abfd, +static asection * ppc_elf_gc_mark_hook PARAMS ((asection *sec, struct bfd_link_info *info, Elf_Internal_Rela *rel, struct elf_link_hash_entry *h, @@ -1380,6 +1381,27 @@ ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section, return bfd_reloc_continue; } +/* Fix bad default arch selected for a 32 bit input bfd when the + default is 64 bit. */ + +static boolean +ppc_elf_object_p (abfd) + bfd *abfd; +{ + if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64) + { + Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd); + + if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS32) + { + /* Relies on arch after 64 bit default being 32 bit default. */ + abfd->arch_info = abfd->arch_info->next; + BFD_ASSERT (abfd->arch_info->bits_per_word == 32); + } + } + return true; +} + /* Function to set whether a module needs the -mrelocatable bit set. */ static boolean @@ -1407,7 +1429,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd) boolean error; /* Check if we have the same endianess */ - if (_bfd_generic_verify_endian_match (ibfd, obfd) == false) + if (! _bfd_generic_verify_endian_match (ibfd, obfd)) return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour @@ -1490,7 +1512,7 @@ static boolean ppc_elf_section_from_shdr (abfd, hdr, name) bfd *abfd; Elf32_Internal_Shdr *hdr; - char *name; + const char *name; { asection *newsect; flagword flags; @@ -2459,8 +2481,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) relocation. */ static asection * -ppc_elf_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +ppc_elf_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; @@ -2490,9 +2512,7 @@ ppc_elf_gc_mark_hook (abfd, info, rel, h, sym) } } else - { - return bfd_section_from_elf_index (abfd, sym->st_shndx); - } + return bfd_section_from_elf_index (sec->owner, sym->st_shndx); return NULL; } @@ -2723,11 +2743,11 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym) else { BFD_ASSERT ((h->got.offset & 1) == 0); - bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_GLOB_DAT); rela.r_addend = 0; } + bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); bfd_elf32_swap_reloca_out (output_bfd, &rela, ((Elf32_External_Rela *) srela->contents + srela->reloc_count)); @@ -3267,13 +3287,19 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, + sreloc->reloc_count)); ++sreloc->reloc_count; - /* This reloc will be computed at runtime, so there's no - need to do anything now, unless this is a RELATIVE - reloc in an unallocated section. */ - if (skip != -1 - || (input_section->flags & SEC_ALLOC) != 0 - || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE) + if (skip == -1) continue; + + /* This reloc will be computed at runtime. We clear the memory + so that it contains predictable value. */ + if (! skip + && ((input_section->flags & SEC_ALLOC) != 0 + || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE)) + { + relocation = howto->pc_relative ? outrel.r_offset : 0; + addend = 0; + break; + } } /* Arithmetic adjust relocations that aren't going into a @@ -3370,7 +3396,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, off &= ~1; else { - bfd_put_32 (output_bfd, relocation, sgot->contents + off); if (info->shared) { @@ -3392,8 +3417,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, srelgot->contents) + srelgot->reloc_count)); ++srelgot->reloc_count; + relocation = 0; } + bfd_put_32 (output_bfd, relocation, sgot->contents + off); local_got_offsets[r_symndx] |= 1; } @@ -3797,6 +3824,7 @@ ppc_elf_grok_psinfo (abfd, note) #define bfd_elf32_bfd_set_private_flags ppc_elf_set_private_flags #define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link +#define elf_backend_object_p ppc_elf_object_p #define elf_backend_gc_mark_hook ppc_elf_gc_mark_hook #define elf_backend_gc_sweep_hook ppc_elf_gc_sweep_hook #define elf_backend_section_from_shdr ppc_elf_section_from_shdr diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c index a11db81..38200dc 100644 --- a/contrib/binutils/bfd/elf32-sparc.c +++ b/contrib/binutils/bfd/elf32-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for 32-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -55,7 +55,7 @@ static void elf32_sparc_final_write_processing static enum elf_reloc_type_class elf32_sparc_reloc_type_class PARAMS ((const Elf_Internal_Rela *)); static asection * elf32_sparc_gc_mark_hook - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); static boolean elf32_sparc_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, @@ -637,14 +637,13 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs) } static asection * -elf32_sparc_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +elf32_sparc_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { - if (h != NULL) { switch (ELF32_R_TYPE (rel->r_info)) @@ -669,9 +668,7 @@ elf32_sparc_gc_mark_hook (abfd, info, rel, h, sym) } } else - { - return bfd_section_from_elf_index (abfd, sym->st_shndx); - } + return bfd_section_from_elf_index (sec->owner, sym->st_shndx); return NULL; } @@ -1564,10 +1561,11 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, break; } - /* ??? Copied from elf32-i386.c, debugging section check and all. */ + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections + because such sections are not SEC_ALLOC and thus ld.so will + not process them. */ if (unresolved_reloc - && !(info->shared - && (input_section->flags & SEC_DEBUGGING) != 0 + && !((input_section->flags & SEC_DEBUGGING) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) (*_bfd_error_handler) (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c index a24a70c..e1d095d 100644 --- a/contrib/binutils/bfd/elf64-alpha.c +++ b/contrib/binutils/bfd/elf64-alpha.c @@ -73,7 +73,7 @@ static boolean elf64_alpha_mkobject static boolean elf64_alpha_object_p PARAMS((bfd *)); static boolean elf64_alpha_section_from_shdr - PARAMS((bfd *, Elf64_Internal_Shdr *, char *)); + PARAMS((bfd *, Elf64_Internal_Shdr *, const char *)); static boolean elf64_alpha_section_flags PARAMS((flagword *, Elf64_Internal_Shdr *)); static boolean elf64_alpha_fake_sections @@ -106,14 +106,27 @@ static boolean elf64_alpha_calc_got_offsets_for_symbol PARAMS ((struct alpha_elf_link_hash_entry *, PTR)); static void elf64_alpha_calc_got_offsets PARAMS ((struct bfd_link_info *)); static boolean elf64_alpha_size_got_sections - PARAMS ((bfd *, struct bfd_link_info *)); + PARAMS ((struct bfd_link_info *)); +static boolean elf64_alpha_size_plt_section + PARAMS ((struct bfd_link_info *)); +static boolean elf64_alpha_size_plt_section_1 + PARAMS ((struct alpha_elf_link_hash_entry *, PTR)); static boolean elf64_alpha_always_size_sections PARAMS ((bfd *, struct bfd_link_info *)); +static int alpha_dynamic_entries_for_reloc + PARAMS ((int, int, int)); static boolean elf64_alpha_calc_dynrel_sizes PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *)); +static boolean elf64_alpha_size_rela_got_section + PARAMS ((struct bfd_link_info *)); +static boolean elf64_alpha_size_rela_got_1 + PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *)); static boolean elf64_alpha_add_symbol_hook PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **, flagword *, asection **, bfd_vma *)); +static struct alpha_elf_got_entry *get_got_entry + PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long, + unsigned long, bfd_vma)); static boolean elf64_alpha_check_relocs PARAMS((bfd *, struct bfd_link_info *, asection *sec, const Elf_Internal_Rela *)); @@ -121,6 +134,9 @@ static boolean elf64_alpha_adjust_dynamic_symbol PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *)); static boolean elf64_alpha_size_dynamic_sections PARAMS((bfd *, struct bfd_link_info *)); +static boolean elf64_alpha_relocate_section_r + PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static boolean elf64_alpha_relocate_section PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); @@ -148,11 +164,15 @@ struct alpha_elf_link_hash_entry /* Cumulative flags for all the .got entries. */ int flags; - /* Contexts (LITUSE) in which a literal was referenced. */ -#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01 -#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02 -#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04 -#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x08 + /* Contexts in which a literal was referenced. */ +#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01 +#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02 +#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04 +#define ALPHA_ELF_LINK_HASH_LU_JSR 0x08 +#define ALPHA_ELF_LINK_HASH_LU_TLSGD 0x10 +#define ALPHA_ELF_LINK_HASH_LU_TLSLDM 0x20 +#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x38 +#define ALPHA_ELF_LINK_HASH_TLS_IE 0x40 /* Used to implement multiple .got subsections. */ struct alpha_elf_got_entry @@ -168,13 +188,20 @@ struct alpha_elf_link_hash_entry /* the .got offset for this entry. */ int got_offset; - int flags; + /* How many references to this entry? */ + int use_count; - /* Additional flags. */ -#define ALPHA_ELF_GOT_ENTRY_RELOCS_DONE 0x10 -#define ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED 0x20 + /* The relocation type of this entry. */ + unsigned char reloc_type; - int use_count; + /* How a LITERAL is used. */ + unsigned char flags; + + /* Have we initialized the dynamic relocation for this entry? */ + unsigned char reloc_done; + + /* Have we adjusted this entry for SEC_MERGE? */ + unsigned char reloc_xlated; } *got_entries; /* used to count non-got, non-plt relocations for delayed sizing @@ -324,14 +351,14 @@ elf64_alpha_bfd_link_hash_table_create (abfd) struct alpha_elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct alpha_elf_link_hash_table); - ret = (struct alpha_elf_link_hash_table *) bfd_zalloc (abfd, amt); + ret = (struct alpha_elf_link_hash_table *) bfd_zmalloc (amt); if (ret == (struct alpha_elf_link_hash_table *) NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, elf64_alpha_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -361,12 +388,12 @@ struct alpha_elf_obj_tdata /* For every got, this is the section. */ asection *got; - /* For every got, this is it's total number of *entries*. */ - int total_got_entries; + /* For every got, this is it's total number of words. */ + int total_got_size; - /* For every got, this is the sum of the number of *entries* required + /* For every got, this is the sum of the number of words required to hold all of the member object's local got. */ - int n_local_got_entries; + int local_got_size; }; #define alpha_elf_tdata(abfd) \ @@ -748,6 +775,203 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ + + /* Creates a tls_index for the symbol in the got. */ + HOWTO (R_ALPHA_TLSGD, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "TLSGD", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* Creates a tls_index for the (current) module in the got. */ + HOWTO (R_ALPHA_TLSLDM, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "TLSLDM", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A dynamic relocation for a DTP module entry. */ + HOWTO (R_ALPHA_DTPMOD64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "DTPMOD64", /* name */ + false, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + false), /* pcrel_offset */ + + /* Creates a 64-bit offset in the got for the displacement + from DTP to the target. */ + HOWTO (R_ALPHA_GOTDTPREL, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "GOTDTPREL", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A dynamic relocation for a displacement from DTP to the target. */ + HOWTO (R_ALPHA_DTPREL64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "DTPREL64", /* name */ + false, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + false), /* pcrel_offset */ + + /* The high 16 bits of the displacement from DTP to the target. */ + HOWTO (R_ALPHA_DTPRELHI, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "DTPRELHI", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* The low 16 bits of the displacement from DTP to the target. */ + HOWTO (R_ALPHA_DTPRELLO, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + 0, /* special_function */ + "DTPRELLO", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 16-bit displacement from DTP to the target. */ + HOWTO (R_ALPHA_DTPREL16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "DTPREL16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* Creates a 64-bit offset in the got for the displacement + from TP to the target. */ + HOWTO (R_ALPHA_GOTTPREL, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "GOTTPREL", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A dynamic relocation for a displacement from TP to the target. */ + HOWTO (R_ALPHA_TPREL64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + 0, /* special_function */ + "TPREL64", /* name */ + false, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + false), /* pcrel_offset */ + + /* The high 16 bits of the displacement from TP to the target. */ + HOWTO (R_ALPHA_TPRELHI, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "TPRELHI", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* The low 16 bits of the displacement from TP to the target. */ + HOWTO (R_ALPHA_TPRELLO, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + 0, /* special_function */ + "TPRELLO", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 16-bit displacement from TP to the target. */ + HOWTO (R_ALPHA_TPREL16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + 0, /* special_function */ + "TPREL16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ }; /* A relocation function which doesn't do anything. */ @@ -902,6 +1126,19 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] = {BFD_RELOC_ALPHA_GPREL_LO16, R_ALPHA_GPRELLOW}, {BFD_RELOC_GPREL16, R_ALPHA_GPREL16}, {BFD_RELOC_ALPHA_BRSGP, R_ALPHA_BRSGP}, + {BFD_RELOC_ALPHA_TLSGD, R_ALPHA_TLSGD}, + {BFD_RELOC_ALPHA_TLSLDM, R_ALPHA_TLSLDM}, + {BFD_RELOC_ALPHA_DTPMOD64, R_ALPHA_DTPMOD64}, + {BFD_RELOC_ALPHA_GOTDTPREL16, R_ALPHA_GOTDTPREL}, + {BFD_RELOC_ALPHA_DTPREL64, R_ALPHA_DTPREL64}, + {BFD_RELOC_ALPHA_DTPREL_HI16, R_ALPHA_DTPRELHI}, + {BFD_RELOC_ALPHA_DTPREL_LO16, R_ALPHA_DTPRELLO}, + {BFD_RELOC_ALPHA_DTPREL16, R_ALPHA_DTPREL16}, + {BFD_RELOC_ALPHA_GOTTPREL16, R_ALPHA_GOTTPREL}, + {BFD_RELOC_ALPHA_TPREL64, R_ALPHA_TPREL64}, + {BFD_RELOC_ALPHA_TPREL_HI16, R_ALPHA_TPRELHI}, + {BFD_RELOC_ALPHA_TPREL_LO16, R_ALPHA_TPRELLO}, + {BFD_RELOC_ALPHA_TPREL16, R_ALPHA_TPREL16}, }; /* Given a BFD reloc type, return a HOWTO structure. */ @@ -936,6 +1173,19 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst) BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max); cache_ptr->howto = &elf64_alpha_howto_table[r_type]; } + +/* These two relocations create a two-word entry in the got. */ +#define alpha_got_entry_size(r_type) \ + (r_type == R_ALPHA_TLSGD || r_type == R_ALPHA_TLSLDM ? 16 : 8) + +/* This is PT_TLS segment p_vaddr. */ +#define alpha_get_dtprel_base(tlss) \ + ((tlss)->start) + +/* Main program TLS (whose template starts at PT_TLS p_vaddr) + is assigned offset round(16, PT_TLS p_align). */ +#define alpha_get_tprel_base(tlss) \ + ((tlss)->start - align_power ((bfd_vma) 16, (tlss)->align)) /* These functions do relaxation for Alpha ELF. @@ -958,35 +1208,45 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst) #define OP_BR 0x30 #define OP_BSR 0x34 #define INSN_UNOP 0x2ffe0000 +#define INSN_ADDQ 0x40000400 +#define INSN_RDUNIQ 0x0000009e struct alpha_relax_info { bfd *abfd; asection *sec; bfd_byte *contents; + Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *relocs, *relend; struct bfd_link_info *link_info; - boolean changed_contents; - boolean changed_relocs; + struct elf_link_tls_segment *tls_segment; bfd_vma gp; bfd *gotobj; asection *tsec; struct alpha_elf_link_hash_entry *h; + struct alpha_elf_got_entry **first_gotent; struct alpha_elf_got_entry *gotent; + boolean changed_contents; + boolean changed_relocs; unsigned char other; }; -static Elf_Internal_Rela * elf64_alpha_relax_with_lituse - PARAMS((struct alpha_relax_info *info, bfd_vma symval, - Elf_Internal_Rela *irel, Elf_Internal_Rela *irelend)); - -static boolean elf64_alpha_relax_without_lituse +static boolean elf64_alpha_relax_with_lituse PARAMS((struct alpha_relax_info *info, bfd_vma symval, Elf_Internal_Rela *irel)); - static bfd_vma elf64_alpha_relax_opt_call PARAMS((struct alpha_relax_info *info, bfd_vma symval)); - +static boolean elf64_alpha_relax_got_load + PARAMS((struct alpha_relax_info *info, bfd_vma symval, + Elf_Internal_Rela *irel, unsigned long)); +static boolean elf64_alpha_relax_gprelhilo + PARAMS((struct alpha_relax_info *info, bfd_vma symval, + Elf_Internal_Rela *irel, boolean)); +static boolean elf64_alpha_relax_tls_get_addr + PARAMS((struct alpha_relax_info *info, bfd_vma symval, + Elf_Internal_Rela *irel, boolean)); +static struct elf_link_tls_segment *elf64_alpha_relax_find_tls_segment + PARAMS((struct alpha_relax_info *, struct elf_link_tls_segment *)); static boolean elf64_alpha_relax_section PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info, boolean *again)); @@ -1007,13 +1267,13 @@ elf64_alpha_find_reloc_at_ofs (rel, relend, offset, type) return NULL; } -static Elf_Internal_Rela * -elf64_alpha_relax_with_lituse (info, symval, irel, irelend) +static boolean +elf64_alpha_relax_with_lituse (info, symval, irel) struct alpha_relax_info *info; bfd_vma symval; - Elf_Internal_Rela *irel, *irelend; + Elf_Internal_Rela *irel; { - Elf_Internal_Rela *urel; + Elf_Internal_Rela *urel, *irelend = info->relend; int flags, count, i; bfd_signed_vma disp; boolean fits16; @@ -1029,9 +1289,13 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn", bfd_archive_filename (info->abfd), info->sec->name, (unsigned long) irel->r_offset)); - return irel; + return true; } + /* Can't relax dynamic symbols. */ + if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info)) + return true; + /* Summarize how this particular LITERAL is used. */ for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count) { @@ -1054,25 +1318,27 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) switch (urel->r_addend) { - default: /* 0 = ADDRESS FORMAT */ + case LITUSE_ALPHA_ADDR: + default: /* This type is really just a placeholder to note that all uses cannot be optimized, but to still allow some. */ all_optimized = false; break; - case 1: /* MEM FORMAT */ + case LITUSE_ALPHA_BASE: /* We can always optimize 16-bit displacements. */ /* Extract the displacement from the instruction, sign-extending it if necessary, then test whether it is within 16 or 32 bits displacement from GP. */ insn_disp = insn & 0x0000ffff; - if (insn_disp & 0x00008000) - insn_disp |= 0xffff0000; /* Negative: sign-extend. */ + if (insn_disp & 0x8000) + insn_disp |= ~0xffff; /* Negative: sign-extend. */ xdisp = disp + insn_disp; - fits16 = (xdisp >= - (bfd_signed_vma) 0x00008000 && xdisp < 0x00008000); - fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 && xdisp < 0x7fff8000); + fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000); + fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 + && xdisp < 0x7fff8000); if (fits16) { @@ -1111,7 +1377,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) all_optimized = false; break; - case 2: /* BYTE OFFSET FORMAT */ + case LITUSE_ALPHA_BYTOFF: /* We can always optimize byte instructions. */ /* FIXME: sanity check the insn for byte op. Check that the @@ -1129,16 +1395,20 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) info->changed_contents = true; break; - case 3: /* CALL FORMAT */ + case LITUSE_ALPHA_JSR: + case LITUSE_ALPHA_TLSGD: + case LITUSE_ALPHA_TLSLDM: { - /* If not zero, place to jump without needing pv. */ - bfd_vma optdest = elf64_alpha_relax_opt_call (info, symval); - bfd_vma org = (info->sec->output_section->vma - + info->sec->output_offset - + urel->r_offset + 4); + bfd_vma optdest, org; bfd_signed_vma odisp; + /* If not zero, place to jump without needing pv. */ + optdest = elf64_alpha_relax_opt_call (info, symval); + org = (info->sec->output_section->vma + + info->sec->output_offset + + urel->r_offset + 4); odisp = (optdest ? optdest : symval) - org; + if (odisp >= -0x400000 && odisp < 0x400000) { Elf_Internal_Rela *xrel; @@ -1180,10 +1450,11 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) { Elf_Internal_Rela *gpdisp = (elf64_alpha_find_reloc_at_ofs - (irel, irelend, urel->r_offset + 4, R_ALPHA_GPDISP)); + (info->relocs, irelend, urel->r_offset + 4, + R_ALPHA_GPDISP)); if (gpdisp) { - bfd_byte *p_ldah = info->contents + gpdisp->r_offset; + bfd_byte *p_ldah = info->contents + gpdisp->r_offset; bfd_byte *p_lda = p_ldah + gpdisp->r_addend; unsigned int ldah = bfd_get_32 (info->abfd, p_ldah); unsigned int lda = bfd_get_32 (info->abfd, p_lda); @@ -1213,14 +1484,17 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) got entry by one, possibly eliminating it. */ if (all_optimized) { - info->gotent->use_count -= 1; - alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1; - if (!info->h) - alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1; + if (--info->gotent->use_count == 0) + { + int sz = alpha_got_entry_size (R_ALPHA_LITERAL); + alpha_elf_tdata (info->gotobj)->total_got_size -= sz; + if (!info->h) + alpha_elf_tdata (info->gotobj)->local_got_size -= sz; + } /* If the literal instruction is no longer needed (it may have been - reused. We can eliminate it. - ??? For now, I don't want to deal with compacting the section, + reused. We can eliminate it. */ + /* ??? For now, I don't want to deal with compacting the section, so just nop it out. */ if (!lit_reused) { @@ -1233,7 +1507,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) } } - return irel + count; + return true; } static bfd_vma @@ -1309,10 +1583,11 @@ elf64_alpha_relax_opt_call (info, symval) } static boolean -elf64_alpha_relax_without_lituse (info, symval, irel) +elf64_alpha_relax_got_load (info, symval, irel, r_type) struct alpha_relax_info *info; bfd_vma symval; Elf_Internal_Rela *irel; + unsigned long r_type; { unsigned int insn; bfd_signed_vma disp; @@ -1322,37 +1597,74 @@ elf64_alpha_relax_without_lituse (info, symval, irel) if (insn >> 26 != OP_LDQ) { + reloc_howto_type *howto = elf64_alpha_howto_table + r_type; ((*_bfd_error_handler) - ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn", + ("%s: %s+0x%lx: warning: %s relocation against unexpected insn", bfd_archive_filename (info->abfd), info->sec->name, - (unsigned long) irel->r_offset)); + (unsigned long) irel->r_offset, howto->name)); return true; } - /* So we aren't told much. Do what we can with the address load and - fake the rest. All of the optimizations here require that the - offset from the GP fit in 16 bits. */ + /* Can't relax dynamic symbols. */ + if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info)) + return true; - disp = symval - info->gp; - if (disp < -0x8000 || disp >= 0x8000) + /* Can't use local-exec relocations in shared libraries. */ + if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared) return true; - /* On the LITERAL instruction itself, consider exchanging - `ldq R,X(gp)' for `lda R,Y(gp)'. */ + if (r_type == R_ALPHA_LITERAL) + disp = symval - info->gp; + else + { + bfd_vma dtp_base, tp_base; + + BFD_ASSERT (info->tls_segment != NULL); + dtp_base = alpha_get_dtprel_base (info->tls_segment); + tp_base = alpha_get_tprel_base (info->tls_segment); + disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base); + } - insn = (OP_LDA << 26) | (insn & 0x03ff0000); + if (disp < -0x8000 || disp >= 0x8000) + return true; + + /* Exchange LDQ for LDA. In the case of the TLS relocs, we're loading + a constant, so force the base register to be $31. */ + if (r_type == R_ALPHA_LITERAL) + insn = (OP_LDA << 26) | (insn & 0x03ff0000); + else + insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16); bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset); info->changed_contents = true; - irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPREL16); + switch (r_type) + { + case R_ALPHA_LITERAL: + r_type = R_ALPHA_GPREL16; + break; + case R_ALPHA_GOTDTPREL: + r_type = R_ALPHA_DTPREL16; + break; + case R_ALPHA_GOTTPREL: + r_type = R_ALPHA_TPREL16; + break; + default: + BFD_ASSERT (0); + return false; + } + + irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type); info->changed_relocs = true; /* Reduce the use count on this got entry by one, possibly eliminating it. */ - info->gotent->use_count -= 1; - alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1; - if (!info->h) - alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1; + if (--info->gotent->use_count == 0) + { + int sz = alpha_got_entry_size (r_type); + alpha_elf_tdata (info->gotobj)->total_got_size -= sz; + if (!info->h) + alpha_elf_tdata (info->gotobj)->local_got_size -= sz; + } /* ??? Search forward through this basic block looking for insns that use the target register. Stop after an insn modifying the @@ -1371,6 +1683,353 @@ elf64_alpha_relax_without_lituse (info, symval, irel) } static boolean +elf64_alpha_relax_gprelhilo (info, symval, irel, hi) + struct alpha_relax_info *info; + bfd_vma symval; + Elf_Internal_Rela *irel; + boolean hi; +{ + unsigned int insn; + bfd_signed_vma disp; + bfd_byte *pos = info->contents + irel->r_offset; + + /* ??? This assumes that the compiler doesn't render + + array[i] + as + ldah t, array(gp) !gprelhigh + s8addl i, t, t + ldq r, array(t) !gprellow + + which would indeed be the most efficient way to implement this. */ + + return true; + + disp = symval - info->gp; + if (disp < -0x8000 || disp >= 0x8000) + return true; + + if (hi) + { + /* Nop out the high instruction. */ + + bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos); + info->changed_contents = true; + + irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + irel->r_addend = 0; + info->changed_relocs = true; + } + else + { + /* Adjust the low instruction to reference GP directly. */ + + insn = bfd_get_32 (info->abfd, pos); + insn = (insn & 0xffe00000) | (29 << 16); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos); + info->changed_contents = true; + + irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), + R_ALPHA_GPREL16); + info->changed_relocs = true; + } + + return true; +} + +static boolean +elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd) + struct alpha_relax_info *info; + bfd_vma symval; + Elf_Internal_Rela *irel; + boolean is_gd; +{ + bfd_byte *pos[5]; + unsigned int insn; + Elf_Internal_Rela *gpdisp, *hint; + boolean dynamic, use_gottprel; + + dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info); + + /* ??? For LD relaxation, we need a symbol referencing the beginning + of the TLS segment. */ + if (!is_gd) + return true; + + /* If a TLS symbol is accessed using IE at least once, there is no point + to use dynamic model for it. */ + if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE)) + ; + + /* If the symbol is local, and we've already committed to DF_STATIC_TLS, + then we might as well relax to IE. */ + else if (info->link_info->shared && !dynamic + && (info->link_info->flags & DF_STATIC_TLS)) + ; + + /* Otherwise we must be building an executable to do anything. */ + else if (info->link_info->shared) + return true; + + /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and + the matching LITUSE_TLS relocations. */ + if (irel + 2 >= info->relend) + return true; + if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL + || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE + || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM)) + return true; + + /* There must be a GPDISP relocation positioned immediately after the + LITUSE relocation. */ + gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend, + irel[2].r_offset + 4, R_ALPHA_GPDISP); + if (!gpdisp) + return true; + + pos[0] = info->contents + irel[0].r_offset; + pos[1] = info->contents + irel[1].r_offset; + pos[2] = info->contents + irel[2].r_offset; + pos[3] = info->contents + gpdisp->r_offset; + pos[4] = pos[3] + gpdisp->r_addend; + + /* Only positions 0 and 1 are allowed to be out of order. */ + if (pos[1] < pos[0]) + { + bfd_byte *tmp = pos[0]; + pos[0] = pos[1]; + pos[1] = tmp; + } + if (pos[1] >= pos[2] || pos[2] >= pos[3] || pos[3] >= pos[4]) + return true; + + /* Reduce the use count on the LITERAL relocation. Do this before we + smash the symndx when we adjust the relocations below. */ + { + struct alpha_elf_got_entry *lit_gotent; + struct alpha_elf_link_hash_entry *lit_h; + unsigned long indx; + + BFD_ASSERT (ELF64_R_SYM (irel[1].r_info) >= info->symtab_hdr->sh_info); + indx = ELF64_R_SYM (irel[1].r_info) - info->symtab_hdr->sh_info; + lit_h = alpha_elf_sym_hashes (info->abfd)[indx]; + + while (lit_h->root.root.type == bfd_link_hash_indirect + || lit_h->root.root.type == bfd_link_hash_warning) + lit_h = (struct alpha_elf_link_hash_entry *) lit_h->root.root.u.i.link; + + for (lit_gotent = lit_h->got_entries; lit_gotent ; + lit_gotent = lit_gotent->next) + if (lit_gotent->gotobj == info->gotobj + && lit_gotent->reloc_type == R_ALPHA_LITERAL + && lit_gotent->addend == irel[1].r_addend) + break; + BFD_ASSERT (lit_gotent); + + if (--lit_gotent->use_count == 0) + { + int sz = alpha_got_entry_size (R_ALPHA_LITERAL); + alpha_elf_tdata (info->gotobj)->total_got_size -= sz; + } + } + + /* Change + + lda $16,x($gp) !tlsgd!1 + ldq $27,__tls_get_addr($gp) !literal!1 + jsr $26,($27)__tls_get_addr !lituse_tlsgd!1 + ldah $29,0($26) !gpdisp!2 + lda $29,0($29) !gpdisp!2 + to + ldq $16,x($gp) !gottprel + unop + call_pal rduniq + addq $16,$0,$0 + unop + or the first pair to + lda $16,x($gp) !tprel + unop + or + ldah $16,x($gp) !tprelhi + lda $16,x($16) !tprello + + as appropriate. */ + + use_gottprel = false; + switch (!dynamic && !info->link_info->shared) + { + case 1: + { + bfd_vma tp_base; + bfd_signed_vma disp; + + BFD_ASSERT (info->tls_segment != NULL); + tp_base = alpha_get_tprel_base (info->tls_segment); + disp = symval - tp_base; + + if (disp >= -0x8000 && disp < 0x8000) + { + insn = (OP_LDA << 26) | (16 << 21) | (31 << 16); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]); + bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]); + + irel[0].r_offset = pos[0] - info->contents; + irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), + R_ALPHA_TPREL16); + irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + break; + } + else if (disp >= -(bfd_signed_vma) 0x80000000 + && disp < (bfd_signed_vma) 0x7fff8000) + { + insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]); + insn = (OP_LDA << 26) | (16 << 21) | (16 << 16); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]); + + irel[0].r_offset = pos[0] - info->contents; + irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), + R_ALPHA_TPRELHI); + irel[1].r_offset = pos[1] - info->contents; + irel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), + R_ALPHA_TPRELLO); + break; + } + } + /* FALLTHRU */ + + default: + use_gottprel = true; + + insn = (OP_LDQ << 26) | (16 << 21) | (29 << 16); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]); + bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]); + + irel[0].r_offset = pos[0] - info->contents; + irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), + R_ALPHA_GOTTPREL); + irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + break; + } + + bfd_put_32 (info->abfd, (bfd_vma) INSN_RDUNIQ, pos[2]); + + insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0); + bfd_put_32 (info->abfd, (bfd_vma) insn, pos[3]); + + bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[4]); + + irel[2].r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + + hint = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend, + irel[2].r_offset, R_ALPHA_HINT); + if (hint) + hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); + + info->changed_contents = true; + info->changed_relocs = true; + + /* Reduce the use count on the TLSGD/TLSLDM relocation. */ + if (--info->gotent->use_count == 0) + { + int sz = alpha_got_entry_size (info->gotent->reloc_type); + alpha_elf_tdata (info->gotobj)->total_got_size -= sz; + if (!info->h) + alpha_elf_tdata (info->gotobj)->local_got_size -= sz; + } + + /* If we've switched to a GOTTPREL relocation, increment the reference + count on that got entry. */ + if (use_gottprel) + { + struct alpha_elf_got_entry *tprel_gotent; + + for (tprel_gotent = *info->first_gotent; tprel_gotent ; + tprel_gotent = tprel_gotent->next) + if (tprel_gotent->gotobj == info->gotobj + && tprel_gotent->reloc_type == R_ALPHA_GOTTPREL + && tprel_gotent->addend == irel->r_addend) + break; + if (tprel_gotent) + tprel_gotent->use_count++; + else + { + if (info->gotent->use_count == 0) + tprel_gotent = info->gotent; + else + { + tprel_gotent = (struct alpha_elf_got_entry *) + bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry)); + if (!tprel_gotent) + return false; + + tprel_gotent->next = *info->first_gotent; + *info->first_gotent = tprel_gotent; + + tprel_gotent->gotobj = info->gotobj; + tprel_gotent->addend = irel->r_addend; + tprel_gotent->got_offset = -1; + tprel_gotent->reloc_done = 0; + tprel_gotent->reloc_xlated = 0; + } + + tprel_gotent->use_count = 1; + tprel_gotent->reloc_type = R_ALPHA_GOTTPREL; + } + } + + return true; +} + +static struct elf_link_tls_segment * +elf64_alpha_relax_find_tls_segment (info, seg) + struct alpha_relax_info *info; + struct elf_link_tls_segment *seg; +{ + bfd *output_bfd = info->sec->output_section->owner; + asection *o; + unsigned int align; + bfd_vma base, end; + + for (o = output_bfd->sections; o ; o = o->next) + if ((o->flags & SEC_THREAD_LOCAL) != 0 + && (o->flags & SEC_LOAD) != 0) + break; + if (!o) + return NULL; + + base = o->vma; + align = 0; + + do + { + bfd_vma size; + + if (bfd_get_section_alignment (output_bfd, o) > align) + align = bfd_get_section_alignment (output_bfd, o); + + size = o->_raw_size; + if (size == 0 && (o->flags & SEC_HAS_CONTENTS) == 0) + { + struct bfd_link_order *lo; + for (lo = o->link_order_head; lo ; lo = lo->next) + if (size < lo->offset + lo->size) + size = lo->offset + lo->size; + } + end = o->vma + size; + o = o->next; + } + while (o && (o->flags & SEC_THREAD_LOCAL)); + + seg->start = base; + seg->size = end - base; + seg->align = align; + + return seg; +} + +static boolean elf64_alpha_relax_section (abfd, sec, link_info, again) bfd *abfd; asection *sec; @@ -1378,16 +2037,12 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) boolean *again; { Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Shdr *shndx_hdr; Elf_Internal_Rela *internal_relocs; - Elf_Internal_Rela *free_relocs = NULL; Elf_Internal_Rela *irel, *irelend; - bfd_byte *free_contents = NULL; - Elf64_External_Sym *extsyms = NULL; - Elf64_External_Sym *free_extsyms = NULL; - Elf_External_Sym_Shndx *shndx_buf = NULL; + Elf_Internal_Sym *isymbuf = NULL; struct alpha_elf_got_entry **local_got_entries; struct alpha_relax_info info; + struct elf_link_tls_segment tls_segment; /* We are not currently changing any sizes, so only one pass. */ *again = false; @@ -1410,116 +2065,99 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory)); if (internal_relocs == NULL) - goto error_return; - if (! link_info->keep_memory) - free_relocs = internal_relocs; + return false; memset(&info, 0, sizeof (info)); info.abfd = abfd; info.sec = sec; info.link_info = link_info; + info.symtab_hdr = symtab_hdr; info.relocs = internal_relocs; info.relend = irelend = internal_relocs + sec->reloc_count; - /* Find the GP for this object. */ + /* Find the GP for this object. Do not store the result back via + _bfd_set_gp_value, since this could change again before final. */ info.gotobj = alpha_elf_tdata (abfd)->gotobj; if (info.gotobj) { asection *sgot = alpha_elf_tdata (info.gotobj)->got; - info.gp = _bfd_get_gp_value (info.gotobj); - if (info.gp == 0) - { - info.gp = (sgot->output_section->vma - + sgot->output_offset - + 0x8000); - _bfd_set_gp_value (info.gotobj, info.gp); - } + info.gp = (sgot->output_section->vma + + sgot->output_offset + + 0x8000); + } + + /* Get the section contents. */ + if (elf_section_data (sec)->this_hdr.contents != NULL) + info.contents = elf_section_data (sec)->this_hdr.contents; + else + { + info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size); + if (info.contents == NULL) + goto error_return; + + if (! bfd_get_section_contents (abfd, sec, info.contents, + (file_ptr) 0, sec->_raw_size)) + goto error_return; } + /* Compute the TLS segment information. The version normally found in + elf_hash_table (link_info)->tls_segment isn't built until final_link. + ??? Probably should look into extracting this into a common function. */ + info.tls_segment = elf64_alpha_relax_find_tls_segment (&info, &tls_segment); + for (irel = internal_relocs; irel < irelend; irel++) { bfd_vma symval; - Elf_Internal_Sym isym; struct alpha_elf_got_entry *gotent; + unsigned long r_type = ELF64_R_TYPE (irel->r_info); - if (ELF64_R_TYPE (irel->r_info) != (int) R_ALPHA_LITERAL) - continue; - - /* Get the section contents. */ - if (info.contents == NULL) + /* Early exit for unhandled or unrelaxable relocations. */ + switch (r_type) { - if (elf_section_data (sec)->this_hdr.contents != NULL) - info.contents = elf_section_data (sec)->this_hdr.contents; - else - { - info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size); - if (info.contents == NULL) - goto error_return; - free_contents = info.contents; - - if (! bfd_get_section_contents (abfd, sec, info.contents, - (file_ptr) 0, sec->_raw_size)) - goto error_return; - } + case R_ALPHA_LITERAL: + case R_ALPHA_GPRELHIGH: + case R_ALPHA_GPRELLOW: + case R_ALPHA_GOTDTPREL: + case R_ALPHA_GOTTPREL: + case R_ALPHA_TLSGD: + case R_ALPHA_TLSLDM: + break; + default: + continue; } - /* Read this BFD's symbols if we haven't done so already. */ - if (extsyms == NULL) + /* Get the value of the symbol referred to by the reloc. */ + if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info) { - bfd_size_type amt; - - if (symtab_hdr->contents != NULL) - extsyms = (Elf64_External_Sym *) symtab_hdr->contents; - else - { - amt = symtab_hdr->sh_info; - amt *= sizeof (Elf64_External_Sym); - extsyms = (Elf64_External_Sym *) bfd_malloc (amt); - if (extsyms == NULL) - goto error_return; - free_extsyms = extsyms; - if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread ((PTR) extsyms, amt, abfd) != amt) - goto error_return; - } + /* A local symbol. */ + Elf_Internal_Sym *isym; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - if (shndx_hdr->sh_size != 0) + /* Read this BFD's local symbols. */ + if (isymbuf == NULL) { - amt = symtab_hdr->sh_info; - amt *= sizeof (Elf_External_Sym_Shndx); - shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (shndx_buf == NULL) - goto error_return; - if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt) + isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; + if (isymbuf == NULL) + isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr, + symtab_hdr->sh_info, 0, + NULL, NULL, NULL); + if (isymbuf == NULL) goto error_return; } - } - /* Get the value of the symbol referred to by the reloc. */ - if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info) - { - /* A local symbol. */ - Elf64_External_Sym *esym; - Elf_External_Sym_Shndx *shndx; - - esym = extsyms + ELF64_R_SYM (irel->r_info); - shndx = shndx_buf + (shndx_buf ? ELF64_R_SYM (irel->r_info) : 0); - bfd_elf64_swap_symbol_in (abfd, esym, shndx, &isym); - if (isym.st_shndx == SHN_UNDEF) - info.tsec = bfd_und_section_ptr; - else if (isym.st_shndx == SHN_ABS) + isym = isymbuf + ELF64_R_SYM (irel->r_info); + if (isym->st_shndx == SHN_UNDEF) + continue; + else if (isym->st_shndx == SHN_ABS) info.tsec = bfd_abs_section_ptr; - else if (isym.st_shndx == SHN_COMMON) + else if (isym->st_shndx == SHN_COMMON) info.tsec = bfd_com_section_ptr; else - info.tsec = bfd_section_from_elf_index (abfd, isym.st_shndx); + info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx); info.h = NULL; - info.other = isym.st_other; - gotent = local_got_entries[ELF64_R_SYM(irel->r_info)]; - symval = isym.st_value; + info.other = isym->st_other; + info.first_gotent = &local_got_entries[ELF64_R_SYM(irel->r_info)]; + symval = isym->st_value; } else { @@ -1534,66 +2172,103 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) || h->root.root.type == bfd_link_hash_warning) h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link; - /* We can't do anthing with undefined or dynamic symbols. */ - if (h->root.root.type == bfd_link_hash_undefined - || h->root.root.type == bfd_link_hash_undefweak - || alpha_elf_dynamic_symbol_p (&h->root, link_info)) + /* If the symbol is undefined, we can't do anything with it. */ + if (h->root.root.type == bfd_link_hash_undefweak + || h->root.root.type == bfd_link_hash_undefined) + continue; + + /* If the symbol isn't defined in the current module, again + we can't do anything. */ + if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) continue; info.h = h; info.tsec = h->root.root.u.def.section; info.other = h->root.other; - gotent = h->got_entries; + info.first_gotent = &h->got_entries; symval = h->root.root.u.def.value; } /* Search for the got entry to be used by this relocation. */ - while (gotent->gotobj != info.gotobj || gotent->addend != irel->r_addend) - gotent = gotent->next; + for (gotent = *info.first_gotent; gotent ; gotent = gotent->next) + if (gotent->gotobj == info.gotobj + && gotent->reloc_type == r_type + && gotent->addend == irel->r_addend) + break; info.gotent = gotent; symval += info.tsec->output_section->vma + info.tsec->output_offset; symval += irel->r_addend; - BFD_ASSERT(info.gotent != NULL); + switch (r_type) + { + case R_ALPHA_LITERAL: + BFD_ASSERT(info.gotent != NULL); - /* If there exist LITUSE relocations immediately following, this - opens up all sorts of interesting optimizations, because we - now know every location that this address load is used. */ + /* If there exist LITUSE relocations immediately following, this + opens up all sorts of interesting optimizations, because we + now know every location that this address load is used. */ + if (irel+1 < irelend + && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE) + { + if (!elf64_alpha_relax_with_lituse (&info, symval, irel)) + goto error_return; + } + else + { + if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type)) + goto error_return; + } + break; - if (irel+1 < irelend && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE) - { - irel = elf64_alpha_relax_with_lituse (&info, symval, irel, irelend); - if (irel == NULL) + case R_ALPHA_GPRELHIGH: + case R_ALPHA_GPRELLOW: + if (!elf64_alpha_relax_gprelhilo (&info, symval, irel, + r_type == R_ALPHA_GPRELHIGH)) goto error_return; - } - else - { - if (!elf64_alpha_relax_without_lituse (&info, symval, irel)) + break; + + case R_ALPHA_GOTDTPREL: + case R_ALPHA_GOTTPREL: + BFD_ASSERT(info.gotent != NULL); + if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type)) goto error_return; + break; + + case R_ALPHA_TLSGD: + case R_ALPHA_TLSLDM: + BFD_ASSERT(info.gotent != NULL); + if (!elf64_alpha_relax_tls_get_addr (&info, symval, irel, + r_type == R_ALPHA_TLSGD)) + goto error_return; + break; } } - if (!elf64_alpha_size_got_sections (abfd, link_info)) + if (!elf64_alpha_size_plt_section (link_info)) + return false; + if (!elf64_alpha_size_got_sections (link_info)) + return false; + if (!elf64_alpha_size_rela_got_section (link_info)) return false; - if (info.changed_relocs) - { - elf_section_data (sec)->relocs = internal_relocs; - } - else if (free_relocs != NULL) + if (isymbuf != NULL + && symtab_hdr->contents != (unsigned char *) isymbuf) { - free (free_relocs); + if (!link_info->keep_memory) + free (isymbuf); + else + { + /* Cache the symbols for elf_link_input_bfd. */ + symtab_hdr->contents = (unsigned char *) isymbuf; + } } - if (info.changed_contents) + if (info.contents != NULL + && elf_section_data (sec)->this_hdr.contents != info.contents) { - elf_section_data (sec)->this_hdr.contents = info.contents; - } - else if (free_contents != NULL) - { - if (! link_info->keep_memory) - free (free_contents); + if (!info.changed_contents && !link_info->keep_memory) + free (info.contents); else { /* Cache the section contents for elf_link_input_bfd. */ @@ -1601,18 +2276,12 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) } } - if (shndx_buf != NULL) - free (shndx_buf); - - if (free_extsyms != NULL) + if (elf_section_data (sec)->relocs != internal_relocs) { - if (! link_info->keep_memory) - free (free_extsyms); + if (!info.changed_relocs) + free (internal_relocs); else - { - /* Cache the symbols for elf_link_input_bfd. */ - symtab_hdr->contents = (unsigned char *) extsyms; - } + elf_section_data (sec)->relocs = internal_relocs; } *again = info.changed_contents || info.changed_relocs; @@ -1620,14 +2289,15 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) return true; error_return: - if (free_relocs != NULL) - free (free_relocs); - if (free_contents != NULL) - free (free_contents); - if (shndx_buf != NULL) - free (shndx_buf); - if (free_extsyms != NULL) - free (free_extsyms); + if (isymbuf != NULL + && symtab_hdr->contents != (unsigned char *) isymbuf) + free (isymbuf); + if (info.contents != NULL + && elf_section_data (sec)->this_hdr.contents != info.contents) + free (info.contents); + if (internal_relocs != NULL + && elf_section_data (sec)->relocs != internal_relocs) + free (internal_relocs); return false; } @@ -1643,7 +2313,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) #define PLT_ENTRY_WORD2 0 #define PLT_ENTRY_WORD3 0 -#define MAX_GOT_ENTRIES (64*1024 / 8) +#define MAX_GOT_SIZE (64*1024) #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so" @@ -1656,7 +2326,7 @@ static boolean elf64_alpha_section_from_shdr (abfd, hdr, name) bfd *abfd; Elf64_Internal_Shdr *hdr; - char *name; + const char *name; { asection *newsect; @@ -1908,9 +2578,8 @@ elf64_alpha_read_ecoff_info (abfd, section, debug) if (ext_hdr == NULL && swap->external_hdr_size != 0) goto error_return; - if (bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0, - swap->external_hdr_size) - == false) + if (! bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0, + swap->external_hdr_size)) goto error_return; symhdr = &debug->symbolic_header; @@ -2244,18 +2913,86 @@ elf64_alpha_output_extsym (h, data) return true; } + +/* Search for and possibly create a got entry. */ -/* FIXME: Create a runtime procedure table from the .mdebug section. - -static boolean -mips_elf_create_procedure_table (handle, abfd, info, s, debug) - PTR handle; +static struct alpha_elf_got_entry * +get_got_entry (abfd, h, r_type, r_symndx, r_addend) bfd *abfd; - struct bfd_link_info *info; - asection *s; - struct ecoff_debug_info *debug; -*/ - + struct alpha_elf_link_hash_entry *h; + unsigned long r_type, r_symndx; + bfd_vma r_addend; +{ + struct alpha_elf_got_entry *gotent; + struct alpha_elf_got_entry **slot; + + if (h) + slot = &h->got_entries; + else + { + /* This is a local .got entry -- record for merge. */ + + struct alpha_elf_got_entry **local_got_entries; + + local_got_entries = alpha_elf_tdata(abfd)->local_got_entries; + if (!local_got_entries) + { + bfd_size_type size; + Elf_Internal_Shdr *symtab_hdr; + + symtab_hdr = &elf_tdata(abfd)->symtab_hdr; + size = symtab_hdr->sh_info; + size *= sizeof (struct alpha_elf_got_entry *); + + local_got_entries + = (struct alpha_elf_got_entry **) bfd_zalloc (abfd, size); + if (!local_got_entries) + return NULL; + + alpha_elf_tdata (abfd)->local_got_entries = local_got_entries; + } + + slot = &local_got_entries[r_symndx]; + } + + for (gotent = *slot; gotent ; gotent = gotent->next) + if (gotent->gotobj == abfd + && gotent->reloc_type == r_type + && gotent->addend == r_addend) + break; + + if (!gotent) + { + int entry_size; + bfd_size_type amt; + + amt = sizeof (struct alpha_elf_got_entry); + gotent = (struct alpha_elf_got_entry *) bfd_alloc (abfd, amt); + if (!gotent) + return NULL; + + gotent->gotobj = abfd; + gotent->addend = r_addend; + gotent->got_offset = -1; + gotent->use_count = 1; + gotent->reloc_type = r_type; + gotent->reloc_done = 0; + gotent->reloc_xlated = 0; + + gotent->next = *slot; + *slot = gotent; + + entry_size = alpha_got_entry_size (r_type); + alpha_elf_tdata (abfd)->total_got_size += entry_size; + if (!h) + alpha_elf_tdata(abfd)->local_got_size += entry_size; + } + else + gotent->use_count += 1; + + return gotent; +} + /* Handle dynamic relocations when doing an Alpha ELF link. */ static boolean @@ -2270,9 +3007,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) const char *rel_sec_name; Elf_Internal_Shdr *symtab_hdr; struct alpha_elf_link_hash_entry **sym_hashes; - struct alpha_elf_got_entry **local_got_entries; const Elf_Internal_Rela *rel, *relend; - int got_created; + boolean got_created; bfd_size_type amt; if (info->relocateable) @@ -2286,14 +3022,23 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) rel_sec_name = NULL; symtab_hdr = &elf_tdata(abfd)->symtab_hdr; sym_hashes = alpha_elf_sym_hashes(abfd); - local_got_entries = alpha_elf_tdata(abfd)->local_got_entries; - got_created = 0; + got_created = false; relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; ++rel) { + enum { + NEED_GOT = 1, + NEED_GOT_ENTRY = 2, + NEED_DYNREL = 4 + }; + unsigned long r_symndx, r_type; struct alpha_elf_link_hash_entry *h; + unsigned int gotent_flags; + boolean maybe_dynamic; + unsigned int need; + bfd_vma addend; r_symndx = ELF64_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) @@ -2308,125 +3053,40 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR; } + + /* We can only get preliminary data on whether a symbol is + locally or externally defined, as not all of the input files + have yet been processed. Do something with what we know, as + this may help reduce memory usage and processing time later. */ + maybe_dynamic = false; + if (h && ((info->shared + && (!info->symbolic || info->allow_shlib_undefined)) + || ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) + || h->root.root.type == bfd_link_hash_defweak)) + maybe_dynamic = true; + + need = 0; + gotent_flags = 0; r_type = ELF64_R_TYPE (rel->r_info); + addend = rel->r_addend; switch (r_type) { case R_ALPHA_LITERAL: - { - struct alpha_elf_got_entry *gotent; - int flags = 0; - - if (h) - { - /* Search for and possibly create a got entry. */ - for (gotent = h->got_entries; gotent ; gotent = gotent->next) - if (gotent->gotobj == abfd && - gotent->addend == rel->r_addend) - break; - - if (!gotent) - { - amt = sizeof (struct alpha_elf_got_entry); - gotent = ((struct alpha_elf_got_entry *) - bfd_alloc (abfd, amt)); - if (!gotent) - return false; - - gotent->gotobj = abfd; - gotent->addend = rel->r_addend; - gotent->got_offset = -1; - gotent->flags = 0; - gotent->use_count = 1; - - gotent->next = h->got_entries; - h->got_entries = gotent; - - alpha_elf_tdata (abfd)->total_got_entries++; - } - else - gotent->use_count += 1; - } - else - { - /* This is a local .got entry -- record for merge. */ - if (!local_got_entries) - { - bfd_size_type size; - size = symtab_hdr->sh_info; - size *= sizeof (struct alpha_elf_got_entry *); - - local_got_entries = ((struct alpha_elf_got_entry **) - bfd_alloc (abfd, size)); - if (!local_got_entries) - return false; - - memset (local_got_entries, 0, (size_t) size); - alpha_elf_tdata (abfd)->local_got_entries = - local_got_entries; - } - - for (gotent = local_got_entries[ELF64_R_SYM(rel->r_info)]; - gotent != NULL && gotent->addend != rel->r_addend; - gotent = gotent->next) - continue; - if (!gotent) - { - amt = sizeof (struct alpha_elf_got_entry); - gotent = ((struct alpha_elf_got_entry *) - bfd_alloc (abfd, amt)); - if (!gotent) - return false; - - gotent->gotobj = abfd; - gotent->addend = rel->r_addend; - gotent->got_offset = -1; - gotent->flags = 0; - gotent->use_count = 1; - - gotent->next = local_got_entries[ELF64_R_SYM(rel->r_info)]; - local_got_entries[ELF64_R_SYM(rel->r_info)] = gotent; - - alpha_elf_tdata(abfd)->total_got_entries++; - alpha_elf_tdata(abfd)->n_local_got_entries++; - } - else - gotent->use_count += 1; - } - - /* Remember how this literal is used from its LITUSEs. - This will be important when it comes to decide if we can - create a .plt entry for a function symbol. */ - if (rel+1 < relend - && ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE) - { - do - { - ++rel; - if (rel->r_addend >= 1 && rel->r_addend <= 3) - flags |= 1 << rel->r_addend; - } - while (rel+1 < relend && - ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE); - } - else - { - /* No LITUSEs -- presumably the address is not being - loaded for nothing. */ - flags = ALPHA_ELF_LINK_HASH_LU_ADDR; - } - - gotent->flags |= flags; - if (h) - { - /* Make a guess as to whether a .plt entry will be needed. */ - if ((h->flags |= flags) == ALPHA_ELF_LINK_HASH_LU_FUNC) - h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; - else - h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; - } - } - /* FALLTHRU */ + need = NEED_GOT | NEED_GOT_ENTRY; + + /* Remember how this literal is used from its LITUSEs. + This will be important when it comes to decide if we can + create a .plt entry for a function symbol. */ + while (++rel < relend && ELF64_R_TYPE (rel->r_info) == R_ALPHA_LITUSE) + if (rel->r_addend >= 1 && rel->r_addend <= 5) + gotent_flags |= 1 << rel->r_addend; + --rel; + + /* No LITUSEs -- presumably the address is used somehow. */ + if (gotent_flags == 0) + gotent_flags = ALPHA_ELF_LINK_HASH_LU_ADDR; + break; case R_ALPHA_GPDISP: case R_ALPHA_GPREL16: @@ -2434,9 +3094,38 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) case R_ALPHA_GPRELHIGH: case R_ALPHA_GPRELLOW: case R_ALPHA_BRSGP: - /* We don't actually use the .got here, but the sections must - be created before the linker maps input sections to output - sections. */ + need = NEED_GOT; + break; + + case R_ALPHA_REFLONG: + case R_ALPHA_REFQUAD: + if (info->shared || maybe_dynamic) + need = NEED_DYNREL; + break; + + case R_ALPHA_TLSGD: + case R_ALPHA_TLSLDM: + case R_ALPHA_GOTDTPREL: + need = NEED_GOT | NEED_GOT_ENTRY; + break; + + case R_ALPHA_GOTTPREL: + need = NEED_GOT | NEED_GOT_ENTRY; + gotent_flags = ALPHA_ELF_LINK_HASH_TLS_IE; + if (info->shared) + info->flags |= DF_STATIC_TLS; + break; + + case R_ALPHA_TPREL64: + if (info->shared || maybe_dynamic) + need = NEED_DYNREL; + if (info->shared) + info->flags |= DF_STATIC_TLS; + break; + } + + if (need & NEED_GOT) + { if (!got_created) { if (!elf64_alpha_create_got_section (abfd, info)) @@ -2450,17 +3139,36 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) got_created = 1; } - break; + } - case R_ALPHA_SREL16: - case R_ALPHA_SREL32: - case R_ALPHA_SREL64: - if (h == NULL) - break; - /* FALLTHRU */ + if (need & NEED_GOT_ENTRY) + { + struct alpha_elf_got_entry *gotent; - case R_ALPHA_REFLONG: - case R_ALPHA_REFQUAD: + gotent = get_got_entry (abfd, h, r_type, r_symndx, addend); + if (!gotent) + return false; + + if (gotent_flags) + { + gotent->flags |= gotent_flags; + if (h) + { + gotent_flags |= h->flags; + h->flags = gotent_flags; + + /* Make a guess as to whether a .plt entry is needed. */ + if ((gotent_flags & ALPHA_ELF_LINK_HASH_LU_FUNC) + && !(gotent_flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC)) + h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; + else + h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; + } + } + } + + if (need & NEED_DYNREL) + { if (rel_sec_name == NULL) { rel_sec_name = (bfd_elf_string_from_elf_section @@ -2530,15 +3238,15 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) else rent->count++; } - else if (info->shared && (sec->flags & SEC_ALLOC)) + else if (info->shared) { /* If this is a shared library, and the section is to be loaded into memory, we need a RELATIVE reloc. */ sreloc->_raw_size += sizeof (Elf64_External_Rela); - if (sec->flags & SEC_READONLY) + if ((sec->flags & (SEC_READONLY | SEC_ALLOC)) + == (SEC_READONLY | SEC_ALLOC)) info->flags |= DF_TEXTREL; } - break; } } @@ -2570,7 +3278,8 @@ elf64_alpha_adjust_dynamic_symbol (info, h) && ((h->type == STT_FUNC && !(ah->flags & ALPHA_ELF_LINK_HASH_LU_ADDR)) || (h->type == STT_NOTYPE - && ah->flags == ALPHA_ELF_LINK_HASH_LU_FUNC)) + && (ah->flags & ALPHA_ELF_LINK_HASH_LU_FUNC) + && !(ah->flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC))) /* Don't prevent otherwise valid programs from linking by attempting to create a new .got entry somewhere. A Correct Solution would be to add a new .got section to a new object file and let it be merged @@ -2667,8 +3376,13 @@ elf64_alpha_merge_ind_symbols (hi, dummy) { gin = gi->next; for (gs = gsh; gs ; gs = gs->next) - if (gi->gotobj == gs->gotobj && gi->addend == gs->addend) - goto got_found; + if (gi->gotobj == gs->gotobj + && gi->reloc_type == gs->reloc_type + && gi->addend == gs->addend) + { + gi->use_count += gs->use_count; + goto got_found; + } gi->next = hs->got_entries; hs->got_entries = gi; got_found:; @@ -2689,7 +3403,7 @@ elf64_alpha_merge_ind_symbols (hi, dummy) { rin = ri->next; for (rs = rsh; rs ; rs = rs->next) - if (ri->rtype == rs->rtype) + if (ri->rtype == rs->rtype && ri->srel == rs->srel) { rs->count += ri->count; goto found_reloc; @@ -2710,15 +3424,15 @@ static boolean elf64_alpha_can_merge_gots (a, b) bfd *a, *b; { - int total = alpha_elf_tdata (a)->total_got_entries; + int total = alpha_elf_tdata (a)->total_got_size; bfd *bsub; /* Trivial quick fallout test. */ - if (total + alpha_elf_tdata (b)->total_got_entries <= MAX_GOT_ENTRIES) + if (total + alpha_elf_tdata (b)->total_got_size <= MAX_GOT_SIZE) return true; /* By their nature, local .got entries cannot be merged. */ - if ((total += alpha_elf_tdata (b)->n_local_got_entries) > MAX_GOT_ENTRIES) + if ((total += alpha_elf_tdata (b)->local_got_size) > MAX_GOT_SIZE) return false; /* Failing the common trivial comparison, we must effectively @@ -2749,10 +3463,13 @@ elf64_alpha_can_merge_gots (a, b) continue; for (ae = h->got_entries; ae ; ae = ae->next) - if (ae->gotobj == a && ae->addend == be->addend) + if (ae->gotobj == a + && ae->reloc_type == be->reloc_type + && ae->addend == be->addend) goto global_found; - if (++total > MAX_GOT_ENTRIES) + total += alpha_got_entry_size (be->reloc_type); + if (total > MAX_GOT_SIZE) return false; global_found:; } @@ -2768,14 +3485,14 @@ static void elf64_alpha_merge_gots (a, b) bfd *a, *b; { - int total = alpha_elf_tdata (a)->total_got_entries; + int total = alpha_elf_tdata (a)->total_got_size; bfd *bsub; /* Remember local expansion. */ { - int e = alpha_elf_tdata (b)->n_local_got_entries; + int e = alpha_elf_tdata (b)->local_got_size; total += e; - alpha_elf_tdata (a)->n_local_got_entries += e; + alpha_elf_tdata (a)->local_got_size += e; } for (bsub = b; bsub ; bsub = alpha_elf_tdata (bsub)->in_got_link_next) @@ -2825,7 +3542,9 @@ elf64_alpha_merge_gots (a, b) continue; for (ae = *start; ae ; ae = ae->next) - if (ae->gotobj == a && ae->addend == be->addend) + if (ae->gotobj == a + && ae->reloc_type == be->reloc_type + && ae->addend == be->addend) { ae->flags |= be->flags; ae->use_count += be->use_count; @@ -2833,7 +3552,7 @@ elf64_alpha_merge_gots (a, b) goto global_found; } be->gotobj = a; - total += 1; + total += alpha_got_entry_size (be->reloc_type); global_found:; } @@ -2841,7 +3560,7 @@ elf64_alpha_merge_gots (a, b) alpha_elf_tdata (bsub)->gotobj = a; } - alpha_elf_tdata (a)->total_got_entries = total; + alpha_elf_tdata (a)->total_got_size = total; /* Merge the two in_got chains. */ { @@ -2874,7 +3593,7 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg) = &alpha_elf_tdata (gotent->gotobj)->got->_raw_size; gotent->got_offset = *plge; - *plge += 8; + *plge += alpha_got_entry_size (gotent->reloc_type); } return true; @@ -2916,7 +3635,7 @@ elf64_alpha_calc_got_offsets (info) if (gotent->use_count > 0) { gotent->got_offset = got_offset; - got_offset += 8; + got_offset += alpha_got_entry_size (gotent->reloc_type); } } @@ -2928,8 +3647,7 @@ elf64_alpha_calc_got_offsets (info) /* Constructs the gots. */ static boolean -elf64_alpha_size_got_sections (output_bfd, info) - bfd *output_bfd ATTRIBUTE_UNUSED; +elf64_alpha_size_got_sections (info) struct bfd_link_info *info; { bfd *i, *got_list, *cur_got_obj = NULL; @@ -2950,13 +3668,13 @@ elf64_alpha_size_got_sections (output_bfd, info) /* We are assuming no merging has yet ocurred. */ BFD_ASSERT (this_got == i); - if (alpha_elf_tdata (this_got)->total_got_entries > MAX_GOT_ENTRIES) + if (alpha_elf_tdata (this_got)->total_got_size > MAX_GOT_SIZE) { /* Yikes! A single object file has too many entries. */ (*_bfd_error_handler) (_("%s: .got subsegment exceeds 64K (size %d)"), bfd_archive_filename (i), - alpha_elf_tdata (this_got)->total_got_entries * 8); + alpha_elf_tdata (this_got)->total_got_size); return false; } @@ -3003,9 +3721,80 @@ elf64_alpha_size_got_sections (output_bfd, info) return true; } +/* Called from relax_section to rebuild the PLT in light of + potential changes in the function's status. */ + +static boolean +elf64_alpha_size_plt_section (info) + struct bfd_link_info *info; +{ + asection *splt, *spltrel; + unsigned long entries; + bfd *dynobj; + + dynobj = elf_hash_table(info)->dynobj; + splt = bfd_get_section_by_name(dynobj, ".plt"); + if (splt == NULL) + return true; + + splt->_raw_size = 0; + + alpha_elf_link_hash_traverse (alpha_elf_hash_table (info), + elf64_alpha_size_plt_section_1, splt); + + splt->_cooked_size = splt->_raw_size; + + /* Every plt entry requires a JMP_SLOT relocation. */ + spltrel = bfd_get_section_by_name (dynobj, ".rela.plt"); + if (splt->_raw_size) + entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE; + else + entries = 0; + spltrel->_raw_size = entries * sizeof (Elf64_External_Rela); + spltrel->_cooked_size = spltrel->_raw_size; + + return true; +} + +static boolean +elf64_alpha_size_plt_section_1 (h, data) + struct alpha_elf_link_hash_entry *h; + PTR data; +{ + asection *splt = (asection *) data; + struct alpha_elf_got_entry *gotent; + + /* If we didn't need an entry before, we still don't. */ + if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)) + return true; + + /* There must still be a LITERAL got entry for the function. */ + for (gotent = h->got_entries; gotent ; gotent = gotent->next) + if (gotent->reloc_type == R_ALPHA_LITERAL + && gotent->use_count > 0) + break; + + /* If there is, reset the PLT offset. If not, there's no longer + a need for the PLT entry. */ + if (gotent) + { + if (splt->_raw_size == 0) + splt->_raw_size = PLT_HEADER_SIZE; + h->root.plt.offset = splt->_raw_size; + splt->_raw_size += PLT_ENTRY_SIZE; + } + else + { + h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; + h->root.plt.offset = -1; + } + + return true; +} + static boolean elf64_alpha_always_size_sections (output_bfd, info) - bfd *output_bfd; + bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; { bfd *i; @@ -3018,7 +3807,7 @@ elf64_alpha_always_size_sections (output_bfd, info) elf64_alpha_merge_ind_symbols, NULL); - if (!elf64_alpha_size_got_sections (output_bfd, info)) + if (!elf64_alpha_size_got_sections (info)) return false; /* Allocate space for all of the .got subsections. */ @@ -3037,6 +3826,40 @@ elf64_alpha_always_size_sections (output_bfd, info) return true; } +/* The number of dynamic relocations required by a static relocation. */ + +static int +alpha_dynamic_entries_for_reloc (r_type, dynamic, shared) + int r_type, dynamic, shared; +{ + switch (r_type) + { + /* May appear in GOT entries. */ + case R_ALPHA_TLSGD: + return (dynamic ? 2 : shared ? 1 : 0); + case R_ALPHA_TLSLDM: + return shared; + case R_ALPHA_LITERAL: + return dynamic || shared; + case R_ALPHA_GOTDTPREL: + case R_ALPHA_GOTTPREL: + return dynamic; + + /* May appear in data sections. */ + case R_ALPHA_REFLONG: + case R_ALPHA_REFQUAD: + return dynamic || shared; + case R_ALPHA_SREL64: + case R_ALPHA_TPREL64: + return dynamic; + + /* Everything else is illegal. We'll issue an error during + relocate_section. */ + default: + return 0; + } +} + /* Work out the sizes of the dynamic relocation entries. */ static boolean @@ -3044,6 +3867,10 @@ elf64_alpha_calc_dynrel_sizes (h, info) struct alpha_elf_link_hash_entry *h; struct bfd_link_info *info; { + boolean dynamic; + struct alpha_elf_reloc_entry *relent; + unsigned long entries; + if (h->root.root.type == bfd_link_hash_warning) h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link; @@ -3062,51 +3889,125 @@ elf64_alpha_calc_dynrel_sizes (h, info) && (h->root.root.type == bfd_link_hash_defined || h->root.root.type == bfd_link_hash_defweak) && !(h->root.root.u.def.section->owner->flags & DYNAMIC)) - { - h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; - } + h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; /* If the symbol is dynamic, we'll need all the relocations in their natural form. If this is a shared object, and it has been forced local, we'll need the same number of RELATIVE relocations. */ - if (alpha_elf_dynamic_symbol_p (&h->root, info) || info->shared) + dynamic = alpha_elf_dynamic_symbol_p (&h->root, info); + + for (relent = h->reloc_entries; relent; relent = relent->next) { - struct alpha_elf_reloc_entry *relent; - bfd *dynobj; - struct alpha_elf_got_entry *gotent; - bfd_size_type count; - asection *srel; + entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic, + info->shared); + if (entries) + { + relent->srel->_raw_size += + entries * sizeof (Elf64_External_Rela) * relent->count; + if (relent->reltext) + info->flags |= DT_TEXTREL; + } + } - for (relent = h->reloc_entries; relent; relent = relent->next) - if (relent->rtype == R_ALPHA_REFLONG - || relent->rtype == R_ALPHA_REFQUAD) - { - relent->srel->_raw_size += - sizeof (Elf64_External_Rela) * relent->count; - if (relent->reltext) - info->flags |= DT_TEXTREL; - } + return true; +} + +/* Set the sizes of the dynamic relocation sections. */ - dynobj = elf_hash_table(info)->dynobj; - count = 0; +static boolean +elf64_alpha_size_rela_got_section (info) + struct bfd_link_info *info; +{ + unsigned long entries; + bfd *i, *dynobj; + asection *srel; - for (gotent = h->got_entries; gotent ; gotent = gotent->next) - count++; + /* Shared libraries often require RELATIVE relocs, and some relocs + require attention for the main application as well. */ - /* If we are using a .plt entry, subtract one, as the first - reference uses a .rela.plt entry instead. */ - if (h->root.plt.offset != MINUS_ONE) - count--; + entries = 0; + for (i = alpha_elf_hash_table(info)->got_list; + i ; i = alpha_elf_tdata(i)->got_link_next) + { + bfd *j; - if (count > 0) + for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next) { - srel = bfd_get_section_by_name (dynobj, ".rela.got"); - BFD_ASSERT (srel != NULL); - srel->_raw_size += sizeof (Elf64_External_Rela) * count; + struct alpha_elf_got_entry **local_got_entries, *gotent; + int k, n; + + local_got_entries = alpha_elf_tdata(j)->local_got_entries; + if (!local_got_entries) + continue; + + for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k) + for (gotent = local_got_entries[k]; + gotent ; gotent = gotent->next) + if (gotent->use_count > 0) + entries += (alpha_dynamic_entries_for_reloc + (gotent->reloc_type, 0, info->shared)); } } + dynobj = elf_hash_table(info)->dynobj; + srel = bfd_get_section_by_name (dynobj, ".rela.got"); + if (!srel) + { + BFD_ASSERT (entries == 0); + return true; + } + srel->_raw_size = sizeof (Elf64_External_Rela) * entries; + + /* Now do the non-local symbols. */ + alpha_elf_link_hash_traverse (alpha_elf_hash_table (info), + elf64_alpha_size_rela_got_1, info); + + srel->_cooked_size = srel->_raw_size; + + return true; +} + +/* Subroutine of elf64_alpha_size_rela_got_section for doing the + global symbols. */ + +static boolean +elf64_alpha_size_rela_got_1 (h, info) + struct alpha_elf_link_hash_entry *h; + struct bfd_link_info *info; +{ + boolean dynamic; + struct alpha_elf_got_entry *gotent; + unsigned long entries; + + if (h->root.root.type == bfd_link_hash_warning) + h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link; + + /* If the symbol is dynamic, we'll need all the relocations in their + natural form. If this is a shared object, and it has been forced + local, we'll need the same number of RELATIVE relocations. */ + + dynamic = alpha_elf_dynamic_symbol_p (&h->root, info); + + entries = 0; + for (gotent = h->got_entries; gotent ; gotent = gotent->next) + if (gotent->use_count > 0) + entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type, + dynamic, info->shared); + + /* If we are using a .plt entry, subtract one, as the first + reference uses a .rela.plt entry instead. */ + if (h->root.plt.offset != MINUS_ONE) + entries--; + + if (entries > 0) + { + bfd *dynobj = elf_hash_table(info)->dynobj; + asection *srel = bfd_get_section_by_name (dynobj, ".rela.got"); + BFD_ASSERT (srel != NULL); + srel->_raw_size += sizeof (Elf64_External_Rela) * entries; + } + return true; } @@ -3140,27 +4041,9 @@ elf64_alpha_size_dynamic_sections (output_bfd, info) collected information in check_relocs that we can now apply to size the dynamic relocation sections. */ alpha_elf_link_hash_traverse (alpha_elf_hash_table (info), - elf64_alpha_calc_dynrel_sizes, - info); - - /* When building shared libraries, each local .got entry needs a - RELATIVE reloc. */ - if (info->shared) - { - bfd *i; - asection *srel; - bfd_size_type count; - - srel = bfd_get_section_by_name (dynobj, ".rela.got"); - BFD_ASSERT (srel != NULL); + elf64_alpha_calc_dynrel_sizes, info); - for (i = alpha_elf_hash_table(info)->got_list, count = 0; - i != NULL; - i = alpha_elf_tdata(i)->got_link_next) - count += alpha_elf_tdata(i)->n_local_got_entries; - - srel->_raw_size += count * sizeof (Elf64_External_Rela); - } + elf64_alpha_size_rela_got_section (info); } /* else we're not dynamic and by definition we don't need such things. */ @@ -3262,6 +4145,71 @@ elf64_alpha_size_dynamic_sections (output_bfd, info) return true; } +/* Relocate an Alpha ELF section for a relocatable link. + + We don't have to change anything unless the reloc is against a section + symbol, in which case we have to adjust according to where the section + symbol winds up in the output section. */ + +static boolean +elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd *output_bfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info ATTRIBUTE_UNUSED; + bfd *input_bfd; + asection *input_section; + bfd_byte *contents ATTRIBUTE_UNUSED; + Elf_Internal_Rela *relocs; + Elf_Internal_Sym *local_syms; + asection **local_sections; +{ + unsigned long symtab_hdr_sh_info; + Elf_Internal_Rela *rel; + Elf_Internal_Rela *relend; + boolean ret_val = true; + + symtab_hdr_sh_info = elf_tdata (input_bfd)->symtab_hdr.sh_info; + + relend = relocs + input_section->reloc_count; + for (rel = relocs; rel < relend; rel++) + { + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + unsigned long r_type; + + r_type = ELF64_R_TYPE(rel->r_info); + if (r_type >= R_ALPHA_max) + { + (*_bfd_error_handler) + (_("%s: unknown relocation type %d"), + bfd_archive_filename (input_bfd), (int)r_type); + bfd_set_error (bfd_error_bad_value); + ret_val = false; + continue; + } + + r_symndx = ELF64_R_SYM(rel->r_info); + + /* The symbol associated with GPDISP and LITUSE is + immaterial. Only the addend is significant. */ + if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE) + continue; + + if (r_symndx < symtab_hdr_sh_info) + { + sym = local_syms + r_symndx; + if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) + { + sec = local_sections[r_symndx]; + rel->r_addend += sec->output_offset + sym->st_value; + } + } + } + + return ret_val; +} + /* Relocate an Alpha ELF section. */ static boolean @@ -3279,22 +4227,39 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - asection *sec, *sgot, *srel, *srelgot; + struct elf_link_tls_segment *tls_segment; + asection *sgot, *srel, *srelgot; bfd *dynobj, *gotobj; - bfd_vma gp; - boolean ret_val = true; + bfd_vma gp, tp_base, dtp_base; + struct alpha_elf_got_entry **local_got_entries; + boolean ret_val; + const char *section_name; + + /* Handle relocatable links with a smaller loop. */ + if (info->relocateable) + return elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, + input_section, contents, relocs, + local_syms, local_sections); + + /* This is a final link. */ + + ret_val = true; - srelgot = srel = NULL; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + dynobj = elf_hash_table (info)->dynobj; if (dynobj) - { - srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); - } + srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + else + srelgot = NULL; + + section_name = (bfd_elf_string_from_elf_section + (input_bfd, elf_elfheader(input_bfd)->e_shstrndx, + elf_section_data(input_section)->rel_hdr.sh_name)); + BFD_ASSERT(section_name != NULL); + srel = bfd_get_section_by_name (dynobj, section_name); /* Find the gp value for this input bfd. */ - sgot = NULL; - gp = 0; gotobj = alpha_elf_tdata (input_bfd)->gotobj; if (gotobj) { @@ -3308,66 +4273,97 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, _bfd_set_gp_value (gotobj, gp); } } + else + { + sgot = NULL; + gp = 0; + } + + local_got_entries = alpha_elf_tdata(input_bfd)->local_got_entries; + + tls_segment = elf_hash_table (info)->tls_segment; + if (tls_segment) + { + dtp_base = alpha_get_dtprel_base (tls_segment); + tp_base = alpha_get_tprel_base (tls_segment); + } + else + dtp_base = tp_base = 0; - rel = relocs; relend = relocs + input_section->reloc_count; - for (; rel < relend; rel++) + for (rel = relocs; rel < relend; rel++) { - int r_type; + struct alpha_elf_link_hash_entry *h = NULL; + struct alpha_elf_got_entry *gotent; + bfd_reloc_status_type r; reloc_howto_type *howto; unsigned long r_symndx; - struct alpha_elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - bfd_vma relocation; + Elf_Internal_Sym *sym = NULL; + asection *sec = NULL; + bfd_vma value; bfd_vma addend; - bfd_reloc_status_type r; + boolean dynamic_symbol_p; + boolean undef_weak_ref = false; + unsigned long r_type; r_type = ELF64_R_TYPE(rel->r_info); - if (r_type < 0 || r_type >= (int) R_ALPHA_max) + if (r_type >= R_ALPHA_max) { + (*_bfd_error_handler) + (_("%s: unknown relocation type %d"), + bfd_archive_filename (input_bfd), (int)r_type); bfd_set_error (bfd_error_bad_value); - return false; + ret_val = false; + continue; } - howto = elf64_alpha_howto_table + r_type; + howto = elf64_alpha_howto_table + r_type; r_symndx = ELF64_R_SYM(rel->r_info); - if (info->relocateable) + if (r_symndx < symtab_hdr->sh_info) { - /* This is a relocateable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - - /* The symbol associated with GPDISP and LITUSE is - immaterial. Only the addend is significant. */ - if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE) - continue; + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; + value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); - if (r_symndx < symtab_hdr->sh_info) + if (local_got_entries) + gotent = local_got_entries[r_symndx]; + else + gotent = NULL; + + /* Need to adjust local GOT entries' addends for SEC_MERGE + unless it has been done already. */ + if ((sec->flags & SEC_MERGE) + && ELF_ST_TYPE (sym->st_info) == STT_SECTION + && (elf_section_data (sec)->sec_info_type + == ELF_INFO_TYPE_MERGE) + && gotent + && !gotent->reloc_xlated) { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) + struct alpha_elf_got_entry *ent; + asection *msec; + + for (ent = gotent; ent; ent = ent->next) { - sec = local_sections[r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; + ent->reloc_xlated = 1; + if (ent->use_count == 0) + continue; + msec = sec; + ent->addend = + _bfd_merged_section_offset (output_bfd, &msec, + elf_section_data (sec)-> + sec_info, + sym->st_value + ent->addend, + (bfd_vma) 0); + ent->addend -= sym->st_value; + ent->addend += msec->output_section->vma + + msec->output_offset + - sec->output_section->vma + - sec->output_offset; } } - continue; - } - - /* This is a final link. */ - - h = NULL; - sym = NULL; - sec = NULL; - - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); + dynamic_symbol_p = false; } else { @@ -3377,27 +4373,32 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, || h->root.root.type == bfd_link_hash_warning) h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link; + value = 0; if (h->root.root.type == bfd_link_hash_defined || h->root.root.type == bfd_link_hash_defweak) { sec = h->root.root.u.def.section; - if (sec->output_section == NULL) - relocation = 0; - else - { - relocation = (h->root.root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } + /* Detect the cases that sym_sec->output_section is + expected to be NULL -- all cases in which the symbol + is defined in another shared module. This includes + PLT relocs for which we've created a PLT entry and + other relocs for which we're prepared to create + dynamic relocations. */ + /* ??? Just accept it NULL and continue. */ + + if (sec->output_section != NULL) + value = (h->root.root.u.def.value + + sec->output_section->vma + + sec->output_offset); } else if (h->root.root.type == bfd_link_hash_undefweak) - relocation = 0; + undef_weak_ref = true; else if (info->shared && (!info->symbolic || info->allow_shlib_undefined) && !info->no_undefined && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT) - relocation = 0; + ; else { if (!((*info->callbacks->undefined_symbol) @@ -3405,11 +4406,24 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, input_section, rel->r_offset, (!info->shared || info->no_undefined || ELF_ST_VISIBILITY (h->root.other))))) - ret_val = false; - relocation = 0; + return false; + ret_val = false; + continue; } + + dynamic_symbol_p = alpha_elf_dynamic_symbol_p (&h->root, info); + gotent = h->got_entries; } + addend = rel->r_addend; + value += addend; + + /* Search for the proper got entry. */ + for (; gotent ; gotent = gotent->next) + if (gotent->gotobj == gotobj + && gotent->reloc_type == r_type + && gotent->addend == addend) + break; switch (r_type) { @@ -3419,124 +4433,66 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, BFD_ASSERT(gp != 0); - relocation = (input_section->output_section->vma - + input_section->output_offset - + rel->r_offset); + value = (input_section->output_section->vma + + input_section->output_offset + + rel->r_offset); - p_ldah = contents + rel->r_offset - input_section->vma; + p_ldah = contents + rel->r_offset; p_lda = p_ldah + rel->r_addend; - r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - relocation, + r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - value, p_ldah, p_lda); } break; case R_ALPHA_LITERAL: - { - struct alpha_elf_got_entry *gotent; - boolean dynamic_symbol; - - BFD_ASSERT(sgot != NULL); - BFD_ASSERT(gp != 0); - - if (h != NULL) - { - gotent = h->got_entries; - dynamic_symbol = alpha_elf_dynamic_symbol_p (&h->root, info); - } - else - { - gotent = (alpha_elf_tdata(input_bfd)-> - local_got_entries[r_symndx]); - dynamic_symbol = false; - - /* Need to adjust local GOT entries' addends for SEC_MERGE - unless it has been done already. */ - if ((sec->flags & SEC_MERGE) - && ELF_ST_TYPE (sym->st_info) == STT_SECTION - && (elf_section_data (sec)->sec_info_type - == ELF_INFO_TYPE_MERGE) - && (gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED) == 0) - { - struct alpha_elf_got_entry *ent; - asection *msec; - - for (ent = gotent; ent; ent = ent->next) - { - ent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED; - if (ent->use_count == 0) - continue; - msec = sec; - ent->addend = - _bfd_merged_section_offset (output_bfd, &msec, - elf_section_data (sec)-> - sec_info, - sym->st_value - + ent->addend, - (bfd_vma) 0); - ent->addend -= sym->st_value; - ent->addend += msec->output_section->vma - + msec->output_offset - - sec->output_section->vma - - sec->output_offset; - } - } - } + BFD_ASSERT(sgot != NULL); + BFD_ASSERT(gp != 0); + BFD_ASSERT(gotent != NULL); + BFD_ASSERT(gotent->use_count >= 1); - BFD_ASSERT(gotent != NULL); + if (!gotent->reloc_done) + { + gotent->reloc_done = 1; - while (gotent->gotobj != gotobj || gotent->addend != addend) - gotent = gotent->next; + bfd_put_64 (output_bfd, value, + sgot->contents + gotent->got_offset); - BFD_ASSERT(gotent->use_count >= 1); + /* If the symbol has been forced local, output a + RELATIVE reloc, otherwise it will be handled in + finish_dynamic_symbol. */ + if (info->shared && !dynamic_symbol_p) + { + Elf_Internal_Rela outrel; - /* Initialize the .got entry's value. */ - if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE)) - { - bfd_put_64 (output_bfd, relocation + addend, - sgot->contents + gotent->got_offset); + BFD_ASSERT(srelgot != NULL); - /* If the symbol has been forced local, output a - RELATIVE reloc, otherwise it will be handled in - finish_dynamic_symbol. */ - if (info->shared && !dynamic_symbol) - { - Elf_Internal_Rela outrel; - - BFD_ASSERT(srelgot != NULL); - - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset - + gotent->got_offset); - outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE); - outrel.r_addend = relocation + addend; - - bfd_elf64_swap_reloca_out (output_bfd, &outrel, - ((Elf64_External_Rela *) - srelgot->contents) - + srelgot->reloc_count++); - BFD_ASSERT (sizeof (Elf64_External_Rela) - * srelgot->reloc_count - <= srelgot->_cooked_size); - } + outrel.r_offset = (sgot->output_section->vma + + sgot->output_offset + + gotent->got_offset); + outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE); + outrel.r_addend = value; - gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE; - } + bfd_elf64_swap_reloca_out (output_bfd, &outrel, + ((Elf64_External_Rela *) + srelgot->contents) + + srelgot->reloc_count++); + BFD_ASSERT (sizeof (Elf64_External_Rela) + * srelgot->reloc_count + <= srelgot->_cooked_size); + } + } - /* Figure the gprel relocation. */ - addend = 0; - relocation = (sgot->output_section->vma - + sgot->output_offset - + gotent->got_offset); - relocation -= gp; - } - /* overflow handled by _bfd_final_link_relocate */ + value = (sgot->output_section->vma + + sgot->output_offset + + gotent->got_offset); + value -= gp; goto default_reloc; case R_ALPHA_GPREL16: case R_ALPHA_GPREL32: case R_ALPHA_GPRELLOW: - if (h && alpha_elf_dynamic_symbol_p (&h->root, info)) + if (dynamic_symbol_p) { (*_bfd_error_handler) (_("%s: gp-relative relocation against dynamic symbol %s"), @@ -3544,11 +4500,11 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, ret_val = false; } BFD_ASSERT(gp != 0); - relocation -= gp; + value -= gp; goto default_reloc; case R_ALPHA_GPRELHIGH: - if (h && alpha_elf_dynamic_symbol_p (&h->root, info)) + if (dynamic_symbol_p) { (*_bfd_error_handler) (_("%s: gp-relative relocation against dynamic symbol %s"), @@ -3556,27 +4512,34 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, ret_val = false; } BFD_ASSERT(gp != 0); - relocation -= gp; - relocation += addend; - addend = 0; - relocation = (((bfd_signed_vma) relocation >> 16) - + ((relocation >> 15) & 1)); + value -= gp; + value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1); goto default_reloc; case R_ALPHA_HINT: /* A call to a dynamic symbol is definitely out of range of the 16-bit displacement. Don't bother writing anything. */ - if (h && alpha_elf_dynamic_symbol_p (&h->root, info)) + if (dynamic_symbol_p) { r = bfd_reloc_ok; break; } - /* FALLTHRU */ + /* The regular PC-relative stuff measures from the start of + the instruction rather than the end. */ + value -= 4; + goto default_reloc; case R_ALPHA_BRADDR: + if (dynamic_symbol_p) + { + (*_bfd_error_handler) + (_("%s: pc-relative relocation against dynamic symbol %s"), + bfd_archive_filename (input_bfd), h->root.root.root.string); + ret_val = false; + } /* The regular PC-relative stuff measures from the start of the instruction rather than the end. */ - addend -= 4; + value -= 4; goto default_reloc; case R_ALPHA_BRSGP: @@ -3586,12 +4549,12 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, /* The regular PC-relative stuff measures from the start of the instruction rather than the end. */ - addend -= 4; + value -= 4; /* The source and destination gp must be the same. Note that the source will always have an assigned gp, since we forced one in check_relocs, but that the destination may not, as - it might not have had any relocations at all. Also take + it might not have had any relocations at all. Also take care not to crash if H is an undefined symbol. */ if (h != NULL && sec != NULL && alpha_elf_tdata (sec->owner)->gotobj @@ -3639,41 +4602,52 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, case R_ALPHA_REFLONG: case R_ALPHA_REFQUAD: + case R_ALPHA_DTPREL64: + case R_ALPHA_TPREL64: { Elf_Internal_Rela outrel; /* Careful here to remember RELATIVE relocations for global variables for symbolic shared objects. */ - if (h && alpha_elf_dynamic_symbol_p (&h->root, info)) + if (dynamic_symbol_p) { BFD_ASSERT(h->root.dynindx != -1); - outrel.r_info = ELF64_R_INFO(h->root.dynindx, r_type); + outrel.r_info = ELF64_R_INFO (h->root.dynindx, r_type); outrel.r_addend = addend; - addend = 0, relocation = 0; + addend = 0, value = 0; + } + else if (r_type == R_ALPHA_DTPREL64) + { + BFD_ASSERT(tls_segment != NULL); + value -= dtp_base; + goto default_reloc; + } + else if (r_type == R_ALPHA_TPREL64) + { + BFD_ASSERT(tls_segment != NULL); + value -= dtp_base; + goto default_reloc; } else if (info->shared && r_symndx != 0 && (input_section->flags & SEC_ALLOC)) { - outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE); - outrel.r_addend = relocation + addend; + if (r_type == R_ALPHA_REFLONG) + { + (*_bfd_error_handler) + (_("%s: unhandled dynamic relocation against %s"), + bfd_archive_filename (input_bfd), + h->root.root.root.string); + ret_val = false; + } + outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE); + outrel.r_addend = value; } else goto default_reloc; - if (!srel) - { - const char *name; - - name = (bfd_elf_string_from_elf_section - (input_bfd, elf_elfheader(input_bfd)->e_shstrndx, - elf_section_data(input_section)->rel_hdr.sh_name)); - BFD_ASSERT(name != NULL); - - srel = bfd_get_section_by_name (dynobj, name); - BFD_ASSERT(srel != NULL); - } + BFD_ASSERT(srel != NULL); outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, @@ -3693,8 +4667,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, } goto default_reloc; + case R_ALPHA_SREL16: case R_ALPHA_SREL32: case R_ALPHA_SREL64: + if (dynamic_symbol_p) + { + (*_bfd_error_handler) + (_("%s: pc-relative relocation against dynamic symbol %s"), + bfd_archive_filename (input_bfd), h->root.root.root.string); + ret_val = false; + } + /* ??? .eh_frame references to discarded sections will be smashed to relocations against SHN_UNDEF. The .eh_frame format allows NULL to be encoded as 0 in any format, so this works here. */ @@ -3703,11 +4686,134 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG)); goto default_reloc; + case R_ALPHA_TLSLDM: + /* Ignore the symbol for the relocation. The result is always + the current module. */ + dynamic_symbol_p = 0; + /* FALLTHRU */ + + case R_ALPHA_TLSGD: + if (!gotent->reloc_done) + { + gotent->reloc_done = 1; + + /* Note that the module index for the main program is 1. */ + bfd_put_64 (output_bfd, !info->shared && !dynamic_symbol_p, + sgot->contents + gotent->got_offset); + + /* If the symbol has been forced local, output a + DTPMOD64 reloc, otherwise it will be handled in + finish_dynamic_symbol. */ + if (info->shared && !dynamic_symbol_p) + { + Elf_Internal_Rela outrel; + + BFD_ASSERT(srelgot != NULL); + + outrel.r_offset = (sgot->output_section->vma + + sgot->output_offset + + gotent->got_offset); + /* ??? Proper dynindx here. */ + outrel.r_info = ELF64_R_INFO (0, R_ALPHA_DTPMOD64); + outrel.r_addend = 0; + + bfd_elf64_swap_reloca_out (output_bfd, &outrel, + ((Elf64_External_Rela *) + srelgot->contents) + + srelgot->reloc_count++); + BFD_ASSERT (sizeof (Elf64_External_Rela) + * srelgot->reloc_count + <= srelgot->_cooked_size); + } + + if (dynamic_symbol_p || r_type == R_ALPHA_TLSLDM) + value = 0; + else + { + BFD_ASSERT(tls_segment != NULL); + value -= dtp_base; + } + bfd_put_64 (output_bfd, value, + sgot->contents + gotent->got_offset + 8); + } + + value = (sgot->output_section->vma + + sgot->output_offset + + gotent->got_offset); + value -= gp; + goto default_reloc; + + case R_ALPHA_DTPRELHI: + case R_ALPHA_DTPRELLO: + case R_ALPHA_DTPREL16: + if (dynamic_symbol_p) + { + (*_bfd_error_handler) + (_("%s: dtp-relative relocation against dynamic symbol %s"), + bfd_archive_filename (input_bfd), h->root.root.root.string); + ret_val = false; + } + BFD_ASSERT(tls_segment != NULL); + value -= dtp_base; + if (r_type == R_ALPHA_DTPRELHI) + value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1); + goto default_reloc; + + case R_ALPHA_TPRELHI: + case R_ALPHA_TPRELLO: + case R_ALPHA_TPREL16: + if (info->shared) + { + (*_bfd_error_handler) + (_("%s: TLS local exec code cannot be linked into shared objects"), + bfd_archive_filename (input_bfd)); + ret_val = false; + } + else if (dynamic_symbol_p) + { + (*_bfd_error_handler) + (_("%s: tp-relative relocation against dynamic symbol %s"), + bfd_archive_filename (input_bfd), h->root.root.root.string); + ret_val = false; + } + BFD_ASSERT(tls_segment != NULL); + value -= tp_base; + if (r_type == R_ALPHA_TPRELHI) + value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1); + goto default_reloc; + + case R_ALPHA_GOTDTPREL: + case R_ALPHA_GOTTPREL: + BFD_ASSERT(sgot != NULL); + BFD_ASSERT(gp != 0); + BFD_ASSERT(gotent != NULL); + BFD_ASSERT(gotent->use_count >= 1); + + if (!gotent->reloc_done) + { + gotent->reloc_done = 1; + + if (dynamic_symbol_p) + value = 0; + else + { + BFD_ASSERT(tls_segment != NULL); + value -= (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base); + } + bfd_put_64 (output_bfd, value, + sgot->contents + gotent->got_offset); + } + + value = (sgot->output_section->vma + + sgot->output_offset + + gotent->got_offset); + value -= gp; + goto default_reloc; + default: default_reloc: r = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, rel->r_offset, relocation, - addend); + contents, rel->r_offset, value, 0); break; } @@ -3879,20 +4985,58 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym) srel = bfd_get_section_by_name (dynobj, ".rela.got"); BFD_ASSERT (srel != NULL); - outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_GLOB_DAT); for (gotent = ((struct alpha_elf_link_hash_entry *) h)->got_entries; gotent != NULL; gotent = gotent->next) { - asection *sgot = alpha_elf_tdata (gotent->gotobj)->got; + asection *sgot; + int r_type; + + if (gotent->use_count == 0) + continue; + + sgot = alpha_elf_tdata (gotent->gotobj)->got; outrel.r_offset = (sgot->output_section->vma + sgot->output_offset + gotent->got_offset); + + r_type = gotent->reloc_type; + switch (r_type) + { + case R_ALPHA_LITERAL: + r_type = R_ALPHA_GLOB_DAT; + break; + case R_ALPHA_TLSGD: + r_type = R_ALPHA_DTPMOD64; + break; + case R_ALPHA_GOTDTPREL: + r_type = R_ALPHA_DTPREL64; + break; + case R_ALPHA_GOTTPREL: + r_type = R_ALPHA_TPREL64; + break; + case R_ALPHA_TLSLDM: + default: + abort (); + } + + outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); outrel.r_addend = gotent->addend; bfd_elf64_swap_reloca_out (output_bfd, &outrel, ((Elf64_External_Rela *)srel->contents + srel->reloc_count++)); + + if (gotent->reloc_type == R_ALPHA_TLSGD) + { + outrel.r_offset += 8; + outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_DTPREL64); + + bfd_elf64_swap_reloca_out (output_bfd, &outrel, + ((Elf64_External_Rela *)srel->contents + + srel->reloc_count++)); + } + BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->_cooked_size); } @@ -4116,7 +5260,7 @@ elf64_alpha_final_link (abfd, info) if (p->type != bfd_indirect_link_order) { - if (p->type == bfd_fill_link_order) + if (p->type == bfd_data_link_order) continue; abort (); } @@ -4336,7 +5480,7 @@ elf64_alpha_ecoff_debug_swap = /* Use a non-standard hash bucket size of 8. */ -const struct elf_size_info alpha_elf_size_info = +static const struct elf_size_info alpha_elf_size_info = { sizeof (Elf64_External_Ehdr), sizeof (Elf64_External_Phdr), @@ -4353,6 +5497,7 @@ const struct elf_size_info alpha_elf_size_info = bfd_elf64_write_out_phdrs, bfd_elf64_write_shdrs_and_ehdr, bfd_elf64_write_relocs, + bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out, bfd_elf64_slurp_reloc_table, bfd_elf64_slurp_symbol_table, @@ -4364,11 +5509,13 @@ const struct elf_size_info alpha_elf_size_info = NULL }; +#ifndef ELF_ARCH #define TARGET_LITTLE_SYM bfd_elf64_alpha_vec #define TARGET_LITTLE_NAME "elf64-alpha" #define ELF_ARCH bfd_arch_alpha #define ELF_MACHINE_CODE EM_ALPHA #define ELF_MAXPAGESIZE 0x10000 +#endif /* ELF_ARCH */ #define bfd_elf64_bfd_link_hash_table_create \ elf64_alpha_bfd_link_hash_table_create diff --git a/contrib/binutils/bfd/elf64-ppc.c b/contrib/binutils/bfd/elf64-ppc.c index d25c25f..e431c14 100644 --- a/contrib/binutils/bfd/elf64-ppc.c +++ b/contrib/binutils/bfd/elf64-ppc.c @@ -55,64 +55,10 @@ static bfd_reloc_status_type ppc64_elf_toc64_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type ppc64_elf_unhandled_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); -static boolean ppc64_elf_set_private_flags - PARAMS ((bfd *, flagword)); +static boolean ppc64_elf_object_p + PARAMS ((bfd *)); static boolean ppc64_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); -static boolean ppc64_elf_section_from_shdr - PARAMS ((bfd *, Elf64_Internal_Shdr *, char *)); -static struct bfd_hash_entry *link_hash_newfunc - PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); -static struct bfd_link_hash_table *ppc64_elf_link_hash_table_create - PARAMS ((bfd *)); -static boolean create_linkage_sections - PARAMS ((bfd *, struct bfd_link_info *)); -static boolean create_got_section - PARAMS ((bfd *, struct bfd_link_info *)); -static boolean ppc64_elf_create_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); -static void ppc64_elf_copy_indirect_symbol - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); -static boolean ppc64_elf_check_relocs - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); -static asection * ppc64_elf_gc_mark_hook - PARAMS ((bfd *abfd, struct bfd_link_info *info, Elf_Internal_Rela *rel, - struct elf_link_hash_entry *h, Elf_Internal_Sym *sym)); -static boolean ppc64_elf_gc_sweep_hook - PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec, - const Elf_Internal_Rela *relocs)); -static boolean func_desc_adjust - PARAMS ((struct elf_link_hash_entry *, PTR)); -static boolean ppc64_elf_func_desc_adjust - PARAMS ((bfd *, struct bfd_link_info *)); -static boolean ppc64_elf_adjust_dynamic_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); -static void ppc64_elf_hide_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean)); -static boolean allocate_dynrelocs - PARAMS ((struct elf_link_hash_entry *, PTR)); -static boolean readonly_dynrelocs - PARAMS ((struct elf_link_hash_entry *, PTR)); -static enum elf_reloc_type_class ppc64_elf_reloc_type_class - PARAMS ((const Elf_Internal_Rela *)); -static boolean ppc64_elf_size_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); -static bfd_byte *build_plt_stub - PARAMS ((bfd *, bfd_byte *, int, int)); -static boolean build_one_stub - PARAMS ((struct elf_link_hash_entry *, PTR)); -static boolean ppc64_elf_fake_sections - PARAMS ((bfd *, Elf64_Internal_Shdr *, asection *)); -static boolean ppc64_elf_relocate_section - PARAMS ((bfd *, struct bfd_link_info *info, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms, - asection **)); -static boolean ppc64_elf_finish_dynamic_symbol - PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, - Elf_Internal_Sym *)); -static boolean ppc64_elf_finish_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); /* The name of the dynamic interpreter. This is put in the .interp @@ -158,7 +104,7 @@ static boolean ppc64_elf_finish_dynamic_sections #define CROR_151515 0x4def7b82 #define CROR_313131 0x4ffffb82 -/* .glink entries for the first 32k functions are two instructions. */ +/* .glink entries for the first 32k functions are two instructions. */ #define LI_R0_0 0x38000000 /* li %r0,0 */ #define B_DOT 0x48000000 /* b . */ @@ -175,12 +121,13 @@ static boolean ppc64_elf_finish_dynamic_sections /* Since .opd is an array of descriptors and each entry will end up with identical R_PPC64_RELATIVE relocs, there is really no need to propagate .opd relocs; The dynamic linker should be taught to - relocate .opd without reloc entries. FIXME: .opd should be trimmed - of unused values. */ + relocate .opd without reloc entries. */ #ifndef NO_OPD_RELOCS #define NO_OPD_RELOCS 0 #endif +#define ONES(n) (((bfd_vma) 1 << ((n) - 1) << 1) - 1) + /* Relocation HOWTO's. */ static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC_max]; @@ -188,11 +135,11 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { /* This reloc does nothing. */ HOWTO (R_PPC64_NONE, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC64_NONE", /* name */ false, /* partial_inplace */ @@ -228,7 +175,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_ADDR24", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0x3fffffc, /* dst_mask */ + 0x03fffffc, /* dst_mask */ false), /* pcrel_offset */ /* A standard 16 bit relocation. */ @@ -305,7 +252,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_ADDR14", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ false), /* pcrel_offset */ /* An absolute 16 bit branch, for which bit 10 should be set to @@ -322,7 +269,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_ADDR14_BRTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ false), /* pcrel_offset */ /* An absolute 16 bit branch, for which bit 10 should be set to @@ -339,7 +286,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_ADDR14_BRNTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ false), /* pcrel_offset */ /* A relative 26 bit branch; the lower two bits must be zero. */ @@ -354,7 +301,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_REL24", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0x3fffffc, /* dst_mask */ + 0x03fffffc, /* dst_mask */ true), /* pcrel_offset */ /* A relative 16 bit branch; the lower two bits must be zero. */ @@ -369,7 +316,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_REL14", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ true), /* pcrel_offset */ /* A relative 16 bit branch. Bit 10 should be set to indicate that @@ -386,7 +333,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_REL14_BRTAKEN", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ true), /* pcrel_offset */ /* A relative 16 bit branch. Bit 10 should be set to indicate that @@ -403,7 +350,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_REL14_BRNTAKEN",/* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffc, /* dst_mask */ + 0x0000fffc, /* dst_mask */ true), /* pcrel_offset */ /* Like R_PPC64_ADDR16, but referring to the GOT table entry for the @@ -477,12 +424,12 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { run has to have the data at some particular address. */ HOWTO (R_PPC64_COPY, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 0, /* this one is variable size */ + 0, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ - ppc64_elf_unhandled_reloc, /* special_function */ + complain_overflow_dont, /* complain_on_overflow */ + ppc64_elf_unhandled_reloc, /* special_function */ "R_PPC64_COPY", /* name */ false, /* partial_inplace */ 0, /* src_mask */ @@ -502,7 +449,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_GLOB_DAT", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* Created by the link editor. Marks a procedure linkage table @@ -535,7 +482,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_RELATIVE", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* Like R_PPC64_ADDR32, but may be unaligned. */ @@ -575,7 +522,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 32, /* bitsize */ true, /* pc_relative */ 0, /* bitpos */ - /* FIXME: Verify. Was complain_overflow_bitfield. */ + /* FIXME: Verify. Was complain_overflow_bitfield. */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC64_REL32", /* name */ @@ -596,7 +543,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_PLT32", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* 32-bit PC relative relocation to the symbol's procedure linkage table. @@ -612,7 +559,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_PLTREL32", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ + 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ /* Like R_PPC64_ADDR16_LO, but referring to the PLT table entry for @@ -753,7 +700,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_ADDR64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* The bits 32-47 of an address. */ @@ -830,7 +777,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_UADDR64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* 64-bit relative relocation. */ @@ -845,10 +792,10 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_REL64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ true), /* pcrel_offset */ - /* 64-bit relocation to the symbol's procedure linkage table. */ + /* 64-bit relocation to the symbol's procedure linkage table. */ HOWTO (R_PPC64_PLT64, /* type */ 0, /* rightshift */ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */ @@ -860,7 +807,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_PLT64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* 64-bit PC relative relocation to the symbol's procedure linkage @@ -877,7 +824,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_PLTREL64", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ + ONES (64), /* dst_mask */ true), /* pcrel_offset */ /* 16 bit TOC-relative relocation. */ @@ -964,7 +911,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_TOC", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + ONES (64), /* dst_mask */ false), /* pcrel_offset */ /* Like R_PPC64_GOT16, but also informs the link editor that the @@ -1411,8 +1358,8 @@ ppc64_elf_info_to_howto (abfd, cache_ptr, dst) { unsigned int type; + /* Initialize howto table if needed. */ if (!ppc64_elf_howto_table[R_PPC64_ADDR32]) - /* Initialize howto table if needed. */ ppc_howto_init (); type = ELF64_R_TYPE (dst->r_info); @@ -1438,7 +1385,7 @@ ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Adjust the addend for sign extension of the low 16 bits. @@ -1469,7 +1416,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); octets = reloc_entry->address * bfd_octets_per_byte (abfd); @@ -1478,7 +1425,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data, r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type; if (r_type == R_PPC64_ADDR14_BRTAKEN || r_type == R_PPC64_REL14_BRTAKEN) - insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ + insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ if (is_power4) { @@ -1530,7 +1477,7 @@ ppc64_elf_sectoff_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Subtract the symbol section base address. */ @@ -1553,7 +1500,7 @@ ppc64_elf_sectoff_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); /* Subtract the symbol section base address. */ @@ -1581,7 +1528,7 @@ ppc64_elf_toc_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1610,7 +1557,7 @@ ppc64_elf_toc_ha_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1643,7 +1590,7 @@ ppc64_elf_toc64_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); TOCstart = _bfd_get_gp_value (input_section->output_section->owner); @@ -1670,7 +1617,7 @@ ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data, call the generic function. Any adjustment will be done at final link time. */ if (output_bfd != NULL) - return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, + return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); if (error_message != NULL) @@ -1683,32 +1630,35 @@ ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data, return bfd_reloc_dangerous; } -/* Function to set whether a module needs the -mrelocatable bit set. */ +/* Fix bad default arch selected for a 64 bit input bfd when the + default is 32 bit. */ static boolean -ppc64_elf_set_private_flags (abfd, flags) +ppc64_elf_object_p (abfd) bfd *abfd; - flagword flags; { - BFD_ASSERT (!elf_flags_init (abfd) - || elf_elfheader (abfd)->e_flags == flags); + if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 32) + { + Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd); - elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = true; + if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS64) + { + /* Relies on arch after 32 bit default being 64 bit default. */ + abfd->arch_info = abfd->arch_info->next; + BFD_ASSERT (abfd->arch_info->bits_per_word == 64); + } + } return true; } /* Merge backend specific data from an object file to the output object file when linking. */ + static boolean ppc64_elf_merge_private_bfd_data (ibfd, obfd) bfd *ibfd; bfd *obfd; { - flagword old_flags; - flagword new_flags; - boolean error; - /* Check if we have the same endianess. */ if (ibfd->xvec->byteorder != obfd->xvec->byteorder && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) @@ -1726,106 +1676,6 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd) return false; } - if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour - || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return true; - - new_flags = elf_elfheader (ibfd)->e_flags; - old_flags = elf_elfheader (obfd)->e_flags; - if (!elf_flags_init (obfd)) - { - /* First call, no flags set. */ - elf_flags_init (obfd) = true; - elf_elfheader (obfd)->e_flags = new_flags; - } - - else if (new_flags == old_flags) - /* Compatible flags are ok. */ - ; - - else - { - /* Incompatible flags. Warn about -mrelocatable mismatch. - Allow -mrelocatable-lib to be linked with either. */ - error = false; - if ((new_flags & EF_PPC_RELOCATABLE) != 0 - && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0) - { - error = true; - (*_bfd_error_handler) - (_("%s: compiled with -mrelocatable and linked with modules compiled normally"), - bfd_archive_filename (ibfd)); - } - else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0 - && (old_flags & EF_PPC_RELOCATABLE) != 0) - { - error = true; - (*_bfd_error_handler) - (_("%s: compiled normally and linked with modules compiled with -mrelocatable"), - bfd_archive_filename (ibfd)); - } - - /* The output is -mrelocatable-lib iff both the input files are. */ - if (! (new_flags & EF_PPC_RELOCATABLE_LIB)) - elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB; - - /* The output is -mrelocatable iff it can't be -mrelocatable-lib, - but each input file is either -mrelocatable or -mrelocatable-lib. */ - if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB) - && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)) - && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))) - elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE; - - /* Do not warn about eabi vs. V.4 mismatch, just or in the bit - if any module uses it. */ - elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB); - - new_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB); - old_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB); - - /* Warn about any other mismatches. */ - if (new_flags != old_flags) - { - error = true; - (*_bfd_error_handler) - (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), - bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags); - } - - if (error) - { - bfd_set_error (bfd_error_bad_value); - return false; - } - } - - return true; -} - -/* Handle a PowerPC specific section when reading an object file. This - is called when elfcode.h finds a section with an unknown type. */ - -static boolean -ppc64_elf_section_from_shdr (abfd, hdr, name) - bfd *abfd; - Elf64_Internal_Shdr *hdr; - char *name; -{ - asection *newsect; - flagword flags; - - if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) - return false; - - newsect = hdr->bfd_section; - flags = bfd_get_section_flags (abfd, newsect); - if (hdr->sh_flags & SHF_EXCLUDE) - flags |= SEC_EXCLUDE; - - if (hdr->sh_type == SHT_ORDERED) - flags |= SEC_SORT_ENTRIES; - - bfd_set_section_flags (abfd, newsect, flags); return true; } @@ -1921,25 +1771,102 @@ struct ppc_dyn_relocs selects between relative and absolute types. */ #define IS_ABSOLUTE_RELOC(RTYPE) \ - ((RTYPE) != R_PPC64_REL14 \ - && (RTYPE) != R_PPC64_REL14_BRNTAKEN \ - && (RTYPE) != R_PPC64_REL14_BRTAKEN \ - && (RTYPE) != R_PPC64_REL24 \ - && (RTYPE) != R_PPC64_REL32 \ - && (RTYPE) != R_PPC64_REL64) + ((RTYPE) != R_PPC64_REL32 \ + && (RTYPE) != R_PPC64_REL64 \ + && (RTYPE) != R_PPC64_ADDR30) + +/* Section name for stubs is the associated section name plus this + string. */ +#define STUB_SUFFIX ".stub" + +/* Linker stubs. + ppc_stub_long_branch: + Used when a 14 bit branch (or even a 24 bit branch) can't reach its + destination, but a 24 bit branch in a stub section will reach. + . b dest + + ppc_stub_plt_branch: + Similar to the above, but a 24 bit branch in the stub section won't + reach its destination. + . addis %r12,%r2,xxx@ha + . ld %r11,xxx@l(%r12) + . mtctr %r11 + . bctr + + ppc_stub_plt_call: + Used to call a function in a shared library. + . addis %r12,%r2,xxx@ha + . std %r2,40(%r1) + . ld %r11,xxx+0@l(%r12) + . ld %r2,xxx+8@l(%r12) + . mtctr %r11 + . ld %r11,xxx+16@l(%r12) + . bctr +*/ + +enum ppc_stub_type { + ppc_stub_none, + ppc_stub_long_branch, + ppc_stub_plt_branch, + ppc_stub_plt_call +}; + +struct ppc_stub_hash_entry { + + /* Base hash table entry structure. */ + struct bfd_hash_entry root; -/* ppc64 ELF linker hash entry. */ + /* The stub section. */ + asection *stub_sec; + + /* Offset within stub_sec of the beginning of this stub. */ + bfd_vma stub_offset; + + /* Given the symbol's value and its section we can determine its final + value when building the stubs (so the stub knows where to jump. */ + bfd_vma target_value; + asection *target_section; + + enum ppc_stub_type stub_type; + + /* The symbol table entry, if any, that this was derived from. */ + struct ppc_link_hash_entry *h; + + /* Where this stub is being called from, or, in the case of combined + stub sections, the first input section in the group. */ + asection *id_sec; +}; + +struct ppc_branch_hash_entry { + + /* Base hash table entry structure. */ + struct bfd_hash_entry root; + + /* Offset within .branch_lt. */ + unsigned int offset; + + /* Generation marker. */ + unsigned int iter; +}; struct ppc_link_hash_entry { struct elf_link_hash_entry elf; + /* A pointer to the most recently used stub hash entry against this + symbol. */ + struct ppc_stub_hash_entry *stub_cache; + /* Track dynamic relocs copied for this symbol. */ struct ppc_dyn_relocs *dyn_relocs; + /* Link between function code and descriptor symbols. */ + struct elf_link_hash_entry *oh; + /* Flag function code and descriptor symbols. */ unsigned int is_func:1; unsigned int is_func_descriptor:1; + unsigned int is_entry:1; }; /* ppc64 ELF linker hash table. */ @@ -1948,6 +1875,32 @@ struct ppc_link_hash_table { struct elf_link_hash_table elf; + /* The stub hash table. */ + struct bfd_hash_table stub_hash_table; + + /* Another hash table for plt_branch stubs. */ + struct bfd_hash_table branch_hash_table; + + /* Linker stub bfd. */ + bfd *stub_bfd; + + /* Linker call-backs. */ + asection * (*add_stub_section) PARAMS ((const char *, asection *)); + void (*layout_sections_again) PARAMS ((void)); + + /* Array to keep track of which stub sections have been created, and + information on stub grouping. */ + struct map_stub { + /* This is the section to which stubs in the group will be attached. */ + asection *link_sec; + /* The stub section. */ + asection *stub_sec; + } *stub_group; + + /* Assorted information used by ppc64_elf_size_stubs. */ + int top_index; + asection **input_list; + /* Short-cuts to get to dynamic linker sections. */ asection *sgot; asection *srelgot; @@ -1955,25 +1908,185 @@ struct ppc_link_hash_table asection *srelplt; asection *sdynbss; asection *srelbss; - asection *sstub; asection *sglink; asection *sfpr; + asection *sbrlt; + asection *srelbrlt; /* Set on error. */ - int plt_overflow; + unsigned int stub_error; + + /* Flag set when small branches are detected. Used to + select suitable defaults for the stub group size. */ + unsigned int has_14bit_branch; /* Set if we detect a reference undefined weak symbol. */ unsigned int have_undefweak; + /* Incremented every time we size stubs. */ + unsigned int stub_iteration; + /* Small local sym to section mapping cache. */ struct sym_sec_cache sym_sec; }; +static struct bfd_hash_entry *stub_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); +static struct bfd_hash_entry *branch_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); +static struct bfd_hash_entry *link_hash_newfunc + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); +static struct bfd_link_hash_table *ppc64_elf_link_hash_table_create + PARAMS ((bfd *)); +static void ppc64_elf_link_hash_table_free + PARAMS ((struct bfd_link_hash_table *)); +static char *ppc_stub_name + PARAMS ((const asection *, const asection *, + const struct ppc_link_hash_entry *, const Elf_Internal_Rela *)); +static struct ppc_stub_hash_entry *ppc_get_stub_entry + PARAMS ((const asection *, const asection *, struct elf_link_hash_entry *, + const Elf_Internal_Rela *, struct ppc_link_hash_table *)); +static struct ppc_stub_hash_entry *ppc_add_stub + PARAMS ((const char *, asection *, struct ppc_link_hash_table *)); +static boolean create_linkage_sections + PARAMS ((bfd *, struct bfd_link_info *)); +static boolean create_got_section + PARAMS ((bfd *, struct bfd_link_info *)); +static boolean ppc64_elf_create_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); +static void ppc64_elf_copy_indirect_symbol + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); +static boolean ppc64_elf_check_relocs + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static asection * ppc64_elf_gc_mark_hook + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, + struct elf_link_hash_entry *, Elf_Internal_Sym *)); +static boolean ppc64_elf_gc_sweep_hook + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static boolean func_desc_adjust + PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean ppc64_elf_func_desc_adjust + PARAMS ((bfd *, struct bfd_link_info *)); +static boolean ppc64_elf_adjust_dynamic_symbol + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); +static void ppc64_elf_hide_symbol + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean)); +static boolean edit_opd + PARAMS ((bfd *, struct bfd_link_info *)); +static boolean allocate_dynrelocs + PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean readonly_dynrelocs + PARAMS ((struct elf_link_hash_entry *, PTR)); +static enum elf_reloc_type_class ppc64_elf_reloc_type_class + PARAMS ((const Elf_Internal_Rela *)); +static boolean ppc64_elf_size_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); +static INLINE enum ppc_stub_type ppc_type_of_stub + PARAMS ((asection *, const Elf_Internal_Rela *, + struct ppc_link_hash_entry **, bfd_vma)); +static bfd_byte *build_plt_stub + PARAMS ((bfd *, bfd_byte *, int, int)); +static boolean ppc_build_one_stub + PARAMS ((struct bfd_hash_entry *, PTR)); +static boolean ppc_size_one_stub + PARAMS ((struct bfd_hash_entry *, PTR)); +static void group_sections + PARAMS ((struct ppc_link_hash_table *, bfd_size_type, boolean)); +static boolean ppc64_elf_relocate_section + PARAMS ((bfd *, struct bfd_link_info *info, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms, + asection **)); +static boolean ppc64_elf_finish_dynamic_symbol + PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, + Elf_Internal_Sym *)); +static boolean ppc64_elf_finish_dynamic_sections + PARAMS ((bfd *, struct bfd_link_info *)); + /* Get the ppc64 ELF linker hash table from a link_info structure. */ #define ppc_hash_table(p) \ ((struct ppc_link_hash_table *) ((p)->hash)) +#define ppc_stub_hash_lookup(table, string, create, copy) \ + ((struct ppc_stub_hash_entry *) \ + bfd_hash_lookup ((table), (string), (create), (copy))) + +#define ppc_branch_hash_lookup(table, string, create, copy) \ + ((struct ppc_branch_hash_entry *) \ + bfd_hash_lookup ((table), (string), (create), (copy))) + +/* Create an entry in the stub hash table. */ + +static struct bfd_hash_entry * +stub_hash_newfunc (entry, table, string) + struct bfd_hash_entry *entry; + struct bfd_hash_table *table; + const char *string; +{ + /* Allocate the structure if it has not already been allocated by a + subclass. */ + if (entry == NULL) + { + entry = bfd_hash_allocate (table, sizeof (struct ppc_stub_hash_entry)); + if (entry == NULL) + return entry; + } + + /* Call the allocation method of the superclass. */ + entry = bfd_hash_newfunc (entry, table, string); + if (entry != NULL) + { + struct ppc_stub_hash_entry *eh; + + /* Initialize the local fields. */ + eh = (struct ppc_stub_hash_entry *) entry; + eh->stub_sec = NULL; + eh->stub_offset = 0; + eh->target_value = 0; + eh->target_section = NULL; + eh->stub_type = ppc_stub_none; + eh->h = NULL; + eh->id_sec = NULL; + } + + return entry; +} + +/* Create an entry in the branch hash table. */ + +static struct bfd_hash_entry * +branch_hash_newfunc (entry, table, string) + struct bfd_hash_entry *entry; + struct bfd_hash_table *table; + const char *string; +{ + /* Allocate the structure if it has not already been allocated by a + subclass. */ + if (entry == NULL) + { + entry = bfd_hash_allocate (table, sizeof (struct ppc_branch_hash_entry)); + if (entry == NULL) + return entry; + } + + /* Call the allocation method of the superclass. */ + entry = bfd_hash_newfunc (entry, table, string); + if (entry != NULL) + { + struct ppc_branch_hash_entry *eh; + + /* Initialize the local fields. */ + eh = (struct ppc_branch_hash_entry *) entry; + eh->offset = 0; + eh->iter = 0; + } + + return entry; +} + /* Create an entry in a ppc64 ELF linker hash table. */ static struct bfd_hash_entry * @@ -1997,9 +2110,12 @@ link_hash_newfunc (entry, table, string) { struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) entry; + eh->stub_cache = NULL; eh->dyn_relocs = NULL; + eh->oh = NULL; eh->is_func = 0; eh->is_func_descriptor = 0; + eh->is_entry = 0; } return entry; @@ -2014,32 +2130,209 @@ ppc64_elf_link_hash_table_create (abfd) struct ppc_link_hash_table *htab; bfd_size_type amt = sizeof (struct ppc_link_hash_table); - htab = (struct ppc_link_hash_table *) bfd_alloc (abfd, amt); + htab = (struct ppc_link_hash_table *) bfd_malloc (amt); if (htab == NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc)) { - bfd_release (abfd, htab); + free (htab); return NULL; } + /* Init the stub hash table too. */ + if (!bfd_hash_table_init (&htab->stub_hash_table, stub_hash_newfunc)) + return NULL; + + /* And the branch hash table. */ + if (!bfd_hash_table_init (&htab->branch_hash_table, branch_hash_newfunc)) + return NULL; + + htab->stub_bfd = NULL; + htab->add_stub_section = NULL; + htab->layout_sections_again = NULL; + htab->stub_group = NULL; htab->sgot = NULL; htab->srelgot = NULL; htab->splt = NULL; htab->srelplt = NULL; htab->sdynbss = NULL; htab->srelbss = NULL; - htab->sstub = NULL; htab->sglink = NULL; htab->sfpr = NULL; - htab->plt_overflow = 0; + htab->sbrlt = NULL; + htab->srelbrlt = NULL; + htab->stub_error = 0; + htab->has_14bit_branch = 0; htab->have_undefweak = 0; + htab->stub_iteration = 0; htab->sym_sec.abfd = NULL; return &htab->elf.root; } +/* Free the derived linker hash table. */ + +static void +ppc64_elf_link_hash_table_free (hash) + struct bfd_link_hash_table *hash; +{ + struct ppc_link_hash_table *ret = (struct ppc_link_hash_table *) hash; + + bfd_hash_table_free (&ret->stub_hash_table); + bfd_hash_table_free (&ret->branch_hash_table); + _bfd_generic_link_hash_table_free (hash); +} + +/* Build a name for an entry in the stub hash table. */ + +static char * +ppc_stub_name (input_section, sym_sec, h, rel) + const asection *input_section; + const asection *sym_sec; + const struct ppc_link_hash_entry *h; + const Elf_Internal_Rela *rel; +{ + char *stub_name; + bfd_size_type len; + + /* rel->r_addend is actually 64 bit, but who uses more than +/- 2^31 + offsets from a sym as a branch target? In fact, we could + probably assume the addend is always zero. */ + BFD_ASSERT (((int) rel->r_addend & 0xffffffff) == rel->r_addend); + + if (h) + { + len = 8 + 1 + strlen (h->elf.root.root.string) + 1 + 8 + 1; + stub_name = bfd_malloc (len); + if (stub_name != NULL) + { + sprintf (stub_name, "%08x_%s+%x", + input_section->id & 0xffffffff, + h->elf.root.root.string, + (int) rel->r_addend & 0xffffffff); + } + } + else + { + len = 8 + 1 + 8 + 1 + 8 + 1 + 16 + 1; + stub_name = bfd_malloc (len); + if (stub_name != NULL) + { + sprintf (stub_name, "%08x_%x:%x+%x", + input_section->id & 0xffffffff, + sym_sec->id & 0xffffffff, + (int) ELF64_R_SYM (rel->r_info) & 0xffffffff, + (int) rel->r_addend & 0xffffffff); + } + } + return stub_name; +} + +/* Look up an entry in the stub hash. Stub entries are cached because + creating the stub name takes a bit of time. */ + +static struct ppc_stub_hash_entry * +ppc_get_stub_entry (input_section, sym_sec, hash, rel, htab) + const asection *input_section; + const asection *sym_sec; + struct elf_link_hash_entry *hash; + const Elf_Internal_Rela *rel; + struct ppc_link_hash_table *htab; +{ + struct ppc_stub_hash_entry *stub_entry; + struct ppc_link_hash_entry *h = (struct ppc_link_hash_entry *) hash; + const asection *id_sec; + + /* If this input section is part of a group of sections sharing one + stub section, then use the id of the first section in the group. + Stub names need to include a section id, as there may well be + more than one stub used to reach say, printf, and we need to + distinguish between them. */ + id_sec = htab->stub_group[input_section->id].link_sec; + + if (h != NULL && h->stub_cache != NULL + && h->stub_cache->h == h + && h->stub_cache->id_sec == id_sec) + { + stub_entry = h->stub_cache; + } + else + { + char *stub_name; + + stub_name = ppc_stub_name (id_sec, sym_sec, h, rel); + if (stub_name == NULL) + return NULL; + + stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, + stub_name, false, false); + if (h != NULL) + h->stub_cache = stub_entry; + + free (stub_name); + } + + return stub_entry; +} + +/* Add a new stub entry to the stub hash. Not all fields of the new + stub entry are initialised. */ + +static struct ppc_stub_hash_entry * +ppc_add_stub (stub_name, section, htab) + const char *stub_name; + asection *section; + struct ppc_link_hash_table *htab; +{ + asection *link_sec; + asection *stub_sec; + struct ppc_stub_hash_entry *stub_entry; + + link_sec = htab->stub_group[section->id].link_sec; + stub_sec = htab->stub_group[section->id].stub_sec; + if (stub_sec == NULL) + { + stub_sec = htab->stub_group[link_sec->id].stub_sec; + if (stub_sec == NULL) + { + size_t namelen; + bfd_size_type len; + char *s_name; + + namelen = strlen (link_sec->name); + len = namelen + sizeof (STUB_SUFFIX); + s_name = bfd_alloc (htab->stub_bfd, len); + if (s_name == NULL) + return NULL; + + memcpy (s_name, link_sec->name, namelen); + memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX)); + stub_sec = (*htab->add_stub_section) (s_name, link_sec); + if (stub_sec == NULL) + return NULL; + htab->stub_group[link_sec->id].stub_sec = stub_sec; + } + htab->stub_group[section->id].stub_sec = stub_sec; + } + + /* Enter this entry into the linker stub hash table. */ + stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, stub_name, + true, false); + if (stub_entry == NULL) + { + (*_bfd_error_handler) (_("%s: cannot create stub entry %s"), + bfd_archive_filename (section->owner), + stub_name); + return NULL; + } + + stub_entry->stub_sec = stub_sec; + stub_entry->stub_offset = 0; + stub_entry->id_sec = link_sec; + return stub_entry; +} + /* Create sections for linker generated code. */ static boolean @@ -2055,24 +2348,38 @@ create_linkage_sections (dynobj, info) /* Create .sfpr for code to save and restore fp regs. */ flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); - htab->sfpr = bfd_make_section (dynobj, ".sfpr"); + htab->sfpr = bfd_make_section_anyway (dynobj, ".sfpr"); if (htab->sfpr == NULL || ! bfd_set_section_flags (dynobj, htab->sfpr, flags) || ! bfd_set_section_alignment (dynobj, htab->sfpr, 2)) return false; - /* Create .stub and .glink for global linkage functions. */ - htab->sstub = bfd_make_section (dynobj, ".stub"); - if (htab->sstub == NULL - || ! bfd_set_section_flags (dynobj, htab->sstub, flags) - || ! bfd_set_section_alignment (dynobj, htab->sstub, 2)) - return false; - htab->sglink = bfd_make_section (dynobj, ".glink"); + /* Create .glink for lazy dynamic linking support. */ + htab->sglink = bfd_make_section_anyway (dynobj, ".glink"); if (htab->sglink == NULL || ! bfd_set_section_flags (dynobj, htab->sglink, flags) || ! bfd_set_section_alignment (dynobj, htab->sglink, 2)) return false; + /* Create .branch_lt for plt_branch stubs. */ + flags = (SEC_ALLOC | SEC_LOAD + | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); + htab->sbrlt = bfd_make_section_anyway (dynobj, ".branch_lt"); + if (htab->sbrlt == NULL + || ! bfd_set_section_flags (dynobj, htab->sbrlt, flags) + || ! bfd_set_section_alignment (dynobj, htab->sbrlt, 3)) + return false; + + if (info->shared) + { + flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); + htab->srelbrlt = bfd_make_section_anyway (dynobj, ".rela.branch_lt"); + if (!htab->srelbrlt + || ! bfd_set_section_flags (dynobj, htab->srelbrlt, flags) + || ! bfd_set_section_alignment (dynobj, htab->srelbrlt, 3)) + return false; + } return true; } @@ -2137,7 +2444,8 @@ ppc64_elf_create_dynamic_sections (dynobj, info) /* Copy the extra info we tack onto an elf_link_hash_entry. */ static void -ppc64_elf_copy_indirect_symbol (dir, ind) +ppc64_elf_copy_indirect_symbol (bed, dir, ind) + struct elf_backend_data *bed; struct elf_link_hash_entry *dir, *ind; { struct ppc_link_hash_entry *edir, *eind; @@ -2181,8 +2489,31 @@ ppc64_elf_copy_indirect_symbol (dir, ind) edir->is_func |= eind->is_func; edir->is_func_descriptor |= eind->is_func_descriptor; + edir->is_entry |= eind->is_entry; - _bfd_elf_link_hash_copy_indirect (dir, ind); + _bfd_elf_link_hash_copy_indirect (bed, dir, ind); +} + +/* Set a flag, used by ppc64_elf_gc_mark_hook, on the entry symbol and + symbols undefined on the command-line. */ + +boolean +ppc64_elf_mark_entry_syms (info) + struct bfd_link_info *info; +{ + struct ppc_link_hash_table *htab; + struct bfd_sym_chain *sym; + + htab = ppc_hash_table (info); + for (sym = info->gc_sym_list; sym; sym = sym->next) + { + struct elf_link_hash_entry *h; + + h = elf_link_hash_lookup (&htab->elf, sym->name, false, false, false); + if (h != NULL) + ((struct ppc_link_hash_entry *) h)->is_entry = 1; + } + return true; } /* Look through the relocs for a section during the first phase, and @@ -2202,7 +2533,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; asection *sreloc; - boolean is_opd; + asection **opd_sym_map; if (info->relocateable) return true; @@ -2212,12 +2543,34 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) sym_hashes = elf_sym_hashes (abfd); sym_hashes_end = (sym_hashes - + symtab_hdr->sh_size / sizeof (Elf64_External_Sym)); - if (!elf_bad_symtab (abfd)) - sym_hashes_end -= symtab_hdr->sh_info; + + symtab_hdr->sh_size / sizeof (Elf64_External_Sym) + - symtab_hdr->sh_info); sreloc = NULL; - is_opd = strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0; + opd_sym_map = NULL; + if (strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0) + { + /* Garbage collection needs some extra help with .opd sections. + We don't want to necessarily keep everything referenced by + relocs in .opd, as that would keep all functions. Instead, + if we reference an .opd symbol (a function descriptor), we + want to keep the function code symbol's section. This is + easy for global symbols, but for local syms we need to keep + information about the associated function section. Later, if + edit_opd deletes entries, we'll use this array to adjust + local syms in .opd. */ + union opd_info { + asection *func_section; + long entry_adjust; + }; + bfd_size_type amt; + + amt = sec->_raw_size * sizeof (union opd_info) / 24; + opd_sym_map = (asection **) bfd_zalloc (abfd, amt); + if (opd_sym_map == NULL) + return false; + elf_section_data (sec)->tdata = opd_sym_map; + } if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; @@ -2286,14 +2639,14 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) case R_PPC64_PLT32: case R_PPC64_PLT64: /* This symbol requires a procedure linkage table entry. We - actually build the entry in adjust_dynamic_symbol, - because this might be a case of linking PIC code without - linking in any dynamic objects, in which case we don't - need to generate a procedure linkage table after all. */ + actually build the entry in adjust_dynamic_symbol, + because this might be a case of linking PIC code without + linking in any dynamic objects, in which case we don't + need to generate a procedure linkage table after all. */ if (h == NULL) { /* It does not make sense to have a procedure linkage - table entry for a local symbol. */ + table entry for a local symbol. */ bfd_set_error (bfd_error_bad_value); return false; } @@ -2334,6 +2687,12 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) return false; break; + case R_PPC64_REL14: + case R_PPC64_REL14_BRTAKEN: + case R_PPC64_REL14_BRNTAKEN: + htab->has_14bit_branch = 1; + /* Fall through. */ + case R_PPC64_REL24: if (h != NULL && h->root.root.string[0] == '.' @@ -2348,7 +2707,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) break; case R_PPC64_ADDR64: - if (is_opd + if (opd_sym_map != NULL && h != NULL && h->root.root.string[0] == '.' && h->root.root.string[1] != 0) @@ -2359,22 +2718,31 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) false, false, false); if (fdh != NULL) { - /* Ensure the function descriptor symbol string is - part of the code symbol string. We aren't - changing the name here, just allowing some tricks - in ppc64_elf_hide_symbol. */ - fdh->root.root.string = h->root.root.string + 1; ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1; + ((struct ppc_link_hash_entry *) fdh)->oh = h; ((struct ppc_link_hash_entry *) h)->is_func = 1; + ((struct ppc_link_hash_entry *) h)->oh = fdh; } } + if (opd_sym_map != NULL + && h == NULL + && rel + 1 < rel_end + && ((enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info) + == R_PPC64_TOC)) + { + asection *s; + + s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec, + r_symndx); + if (s == NULL) + return false; + else if (s != sec) + opd_sym_map[rel->r_offset / 24] = s; + } /* Fall through. */ case R_PPC64_REL64: case R_PPC64_REL32: - case R_PPC64_REL14: - case R_PPC64_REL14_BRTAKEN: - case R_PPC64_REL14_BRNTAKEN: case R_PPC64_ADDR14: case R_PPC64_ADDR14_BRNTAKEN: case R_PPC64_ADDR14_BRTAKEN: @@ -2396,7 +2764,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) case R_PPC64_UADDR64: case R_PPC64_TOC: /* Don't propagate .opd relocs. */ - if (NO_OPD_RELOCS && is_opd) + if (NO_OPD_RELOCS && opd_sym_map != NULL) break; /* If we are creating a shared library, and this is a reloc @@ -2537,16 +2905,19 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs) relocation. */ static asection * -ppc64_elf_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +ppc64_elf_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; { + asection *rsec = NULL; + if (h != NULL) { enum elf_ppc_reloc_type r_type; + struct ppc_link_hash_entry *fdh; r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info); switch (r_type) @@ -2560,10 +2931,26 @@ ppc64_elf_gc_mark_hook (abfd, info, rel, h, sym) { case bfd_link_hash_defined: case bfd_link_hash_defweak: - return h->root.u.def.section; + fdh = (struct ppc_link_hash_entry *) h; + + /* Function descriptor syms cause the associated + function code sym section to be marked. */ + if (fdh->is_func_descriptor) + rsec = fdh->oh->root.u.def.section; + + /* Function entry syms return NULL if they are in .opd + and are not ._start (or others undefined on the ld + command line). Thus we avoid marking all function + sections, as all functions are referenced in .opd. */ + else if ((fdh->oh != NULL + && ((struct ppc_link_hash_entry *) fdh->oh)->is_entry) + || elf_section_data (sec)->tdata == NULL) + rsec = h->root.u.def.section; + break; case bfd_link_hash_common: - return h->root.u.c.p->section; + rsec = h->root.u.c.p->section; + break; default: break; @@ -2572,10 +2959,17 @@ ppc64_elf_gc_mark_hook (abfd, info, rel, h, sym) } else { - return bfd_section_from_elf_index (abfd, sym->st_shndx); + asection **opd_sym_section; + + rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx); + opd_sym_section = (asection **) elf_section_data (rsec)->tdata; + if (opd_sym_section != NULL) + rsec = opd_sym_section[sym->st_value / 24]; + else if (elf_section_data (sec)->tdata != NULL) + rsec = NULL; } - return NULL; + return rsec; } /* Update the .got, .plt. and dynamic reloc reference counts for the @@ -2642,6 +3036,9 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs) } break; + case R_PPC64_REL14: + case R_PPC64_REL14_BRNTAKEN: + case R_PPC64_REL14_BRTAKEN: case R_PPC64_REL24: if (r_symndx >= symtab_hdr->sh_info) { @@ -2651,9 +3048,6 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs) } break; - case R_PPC64_REL14: - case R_PPC64_REL14_BRNTAKEN: - case R_PPC64_REL14_BRTAKEN: case R_PPC64_REL32: case R_PPC64_REL64: if (r_symndx >= symtab_hdr->sh_info) @@ -2758,14 +3152,15 @@ func_desc_adjust (h, inf) && h->root.root.string[0] == '.' && h->root.root.string[1] != '\0') { - struct elf_link_hash_entry *fdh; + struct elf_link_hash_entry *fdh = ((struct ppc_link_hash_entry *) h)->oh; boolean force_local; /* Find the corresponding function descriptor symbol. Create it as undefined if necessary. */ - fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1, - false, false, true); + if (fdh == NULL) + fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1, + false, false, true); if (fdh == NULL && info->shared @@ -2814,7 +3209,8 @@ func_desc_adjust (h, inf) fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; } ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1; - fdh->root.root.string = h->root.root.string + 1; + ((struct ppc_link_hash_entry *) fdh)->oh = h; + ((struct ppc_link_hash_entry *) h)->oh = fdh; } /* Now that the info is on the function descriptor, clear the @@ -2824,8 +3220,14 @@ func_desc_adjust (h, inf) been imported from another library. Function code syms that are really in the library we must leave global to prevent the linker dragging in a definition from a static library. */ - force_local = ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 - && info->shared); + force_local = (info->shared + && ((h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0 + || fdh == NULL + || (fdh->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0 + || (fdh->elf_link_hash_flags + & ELF_LINK_FORCED_LOCAL) != 0)); _bfd_elf_link_hash_hide_symbol (info, h, force_local); } @@ -2947,7 +3349,6 @@ ppc64_elf_func_desc_adjust (obfd, info) bfd_put_32 (htab->elf.dynobj, BLR, p); } - elf_link_hash_traverse (&htab->elf, func_desc_adjust, (PTR) info); return true; } @@ -3091,18 +3492,362 @@ ppc64_elf_hide_symbol (info, h, force_local) if (((struct ppc_link_hash_entry *) h)->is_func_descriptor) { - const char *name; - struct elf_link_hash_entry *fh; - struct ppc_link_hash_table *htab; + struct elf_link_hash_entry *fh = ((struct ppc_link_hash_entry *) h)->oh; - name = h->root.root.string - 1; - htab = ppc_hash_table (info); - fh = elf_link_hash_lookup (&htab->elf, name, false, false, false); + if (fh == NULL) + { + const char *p, *q; + struct ppc_link_hash_table *htab; + char save; + + /* We aren't supposed to use alloca in BFD because on + systems which do not have alloca the version in libiberty + calls xmalloc, which might cause the program to crash + when it runs out of memory. This function doesn't have a + return status, so there's no way to gracefully return an + error. So cheat. We know that string[-1] can be safely + dereferenced; It's either a string in an ELF string + table, or allocated in an objalloc structure. */ + + p = h->root.root.string - 1; + save = *p; + *(char *) p = '.'; + htab = ppc_hash_table (info); + fh = elf_link_hash_lookup (&htab->elf, p, false, false, false); + *(char *) p = save; + + /* Unfortunately, if it so happens that the string we were + looking for was allocated immediately before this string, + then we overwrote the string terminator. That's the only + reason the lookup should fail. */ + if (fh == NULL) + { + q = h->root.root.string + strlen (h->root.root.string); + while (q >= h->root.root.string && *q == *p) + --q, --p; + if (q < h->root.root.string && *p == '.') + fh = elf_link_hash_lookup (&htab->elf, p, false, false, false); + } + if (fh != NULL) + { + ((struct ppc_link_hash_entry *) h)->oh = fh; + ((struct ppc_link_hash_entry *) fh)->oh = h; + } + } if (fh != NULL) _bfd_elf_link_hash_hide_symbol (info, fh, force_local); } } +static boolean +edit_opd (obfd, info) + bfd *obfd; + struct bfd_link_info *info; +{ + bfd *ibfd; + unsigned int bfd_indx; + + for (bfd_indx = 0, ibfd = info->input_bfds; + ibfd != NULL; + ibfd = ibfd->link_next, bfd_indx++) + { + asection *sec; + Elf_Internal_Rela *relstart, *rel, *relend; + Elf_Internal_Shdr *symtab_hdr; + Elf_Internal_Sym *local_syms; + struct elf_link_hash_entry **sym_hashes; + bfd_vma offset; + long *adjust; + boolean need_edit; + + sec = bfd_get_section_by_name (ibfd, ".opd"); + if (sec == NULL) + continue; + + adjust = (long *) elf_section_data (sec)->tdata; + BFD_ASSERT (adjust != NULL); + memset (adjust, 0, (size_t) sec->_raw_size * sizeof (long) / 24); + + if (sec->output_section == bfd_abs_section_ptr) + continue; + + /* Look through the section relocs. */ + if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) + continue; + + local_syms = NULL; + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (ibfd); + + /* Read the relocations. */ + relstart = _bfd_elf64_link_read_relocs (obfd, sec, (PTR) NULL, + (Elf_Internal_Rela *) NULL, + info->keep_memory); + if (relstart == NULL) + return false; + + /* First run through the relocs to check they are sane, and to + determine whether we need to edit this opd section. */ + need_edit = false; + offset = 0; + relend = relstart + sec->reloc_count; + for (rel = relstart; rel < relend; rel++) + { + enum elf_ppc_reloc_type r_type; + unsigned long r_symndx; + asection *sym_sec; + struct elf_link_hash_entry *h; + Elf_Internal_Sym *sym; + + /* .opd contains a regular array of 24 byte entries. We're + only interested in the reloc pointing to a function entry + point. */ + r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info); + if (r_type == R_PPC64_TOC) + continue; + + if (r_type != R_PPC64_ADDR64) + { + (*_bfd_error_handler) + (_("%s: unexpected reloc type %u in .opd section"), + bfd_archive_filename (ibfd), r_type); + need_edit = false; + break; + } + + if (rel + 1 >= relend) + continue; + r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info); + if (r_type != R_PPC64_TOC) + continue; + + if (rel->r_offset != offset) + { + /* If someone messes with .opd alignment then after a + "ld -r" we might have padding in the middle of .opd. + Also, there's nothing to prevent someone putting + something silly in .opd with the assembler. No .opd + optimization for them! */ + (*_bfd_error_handler) + (_("%s: .opd is not a regular array of opd entries"), + bfd_archive_filename (ibfd)); + need_edit = false; + break; + } + + r_symndx = ELF64_R_SYM (rel->r_info); + sym_sec = NULL; + h = NULL; + sym = NULL; + if (r_symndx >= symtab_hdr->sh_info) + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + sym_sec = h->root.u.def.section; + } + else + { + if (local_syms == NULL) + { + local_syms = (Elf_Internal_Sym *) symtab_hdr->contents; + if (local_syms == NULL) + local_syms = bfd_elf_get_elf_syms (ibfd, symtab_hdr, + symtab_hdr->sh_info, 0, + NULL, NULL, NULL); + if (local_syms == NULL) + goto error_free_rel; + } + sym = local_syms + r_symndx; + if ((sym->st_shndx != SHN_UNDEF + && sym->st_shndx < SHN_LORESERVE) + || sym->st_shndx > SHN_HIRESERVE) + sym_sec = bfd_section_from_elf_index (ibfd, sym->st_shndx); + } + + if (sym_sec == NULL || sym_sec->owner == NULL) + { + (*_bfd_error_handler) + (_("%s: undefined sym `%s' in .opd section"), + bfd_archive_filename (ibfd), + h != NULL ? h->root.root.string : "<local symbol>"); + need_edit = false; + break; + } + + /* opd entries are always for functions defined in the + current input bfd. If the symbol isn't defined in the + input bfd, then we won't be using the function in this + bfd; It must be defined in a linkonce section in another + bfd, or is weak. It's also possible that we are + discarding the function due to a linker script /DISCARD/, + which we test for via the output_section. */ + if (sym_sec->owner != ibfd + || sym_sec->output_section == bfd_abs_section_ptr) + need_edit = true; + + offset += 24; + } + + if (need_edit) + { + Elf_Internal_Rela *write_rel; + bfd_byte *rptr, *wptr; + boolean skip; + + /* This seems a waste of time as input .opd sections are all + zeros as generated by gcc, but I suppose there's no reason + this will always be so. We might start putting something in + the third word of .opd entries. */ + if ((sec->flags & SEC_IN_MEMORY) == 0) + { + bfd_byte *loc = bfd_alloc (ibfd, sec->_raw_size); + if (loc == NULL + || !bfd_get_section_contents (ibfd, sec, loc, (bfd_vma) 0, + sec->_raw_size)) + { + if (local_syms != NULL + && symtab_hdr->contents != (unsigned char *) local_syms) + free (local_syms); + error_free_rel: + if (elf_section_data (sec)->relocs != relstart) + free (relstart); + return false; + } + sec->contents = loc; + sec->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS); + } + + elf_section_data (sec)->relocs = relstart; + + wptr = sec->contents; + rptr = sec->contents; + write_rel = relstart; + skip = false; + offset = 0; + for (rel = relstart; rel < relend; rel++) + { + if (rel->r_offset == offset) + { + unsigned long r_symndx; + asection *sym_sec; + struct elf_link_hash_entry *h; + Elf_Internal_Sym *sym; + + r_symndx = ELF64_R_SYM (rel->r_info); + sym_sec = NULL; + h = NULL; + sym = NULL; + if (r_symndx >= symtab_hdr->sh_info) + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + sym_sec = h->root.u.def.section; + } + else + { + sym = local_syms + r_symndx; + if ((sym->st_shndx != SHN_UNDEF + && sym->st_shndx < SHN_LORESERVE) + || sym->st_shndx > SHN_HIRESERVE) + sym_sec = bfd_section_from_elf_index (ibfd, + sym->st_shndx); + } + + skip = (sym_sec->owner != ibfd + || sym_sec->output_section == bfd_abs_section_ptr); + if (skip) + { + if (h != NULL && sym_sec->owner == ibfd) + { + /* Arrange for the function descriptor sym + to be dropped. */ + struct elf_link_hash_entry *fdh; + struct ppc_link_hash_entry *fh; + + fh = (struct ppc_link_hash_entry *) h; + BFD_ASSERT (fh->is_func); + fdh = fh->oh; + fdh->root.u.def.value = 0; + fdh->root.u.def.section = sym_sec; + } + } + else + { + /* We'll be keeping this opd entry. */ + + if (h != NULL) + { + /* Redefine the function descriptor symbol + to this location in the opd section. + We've checked above that opd relocs are + ordered. */ + struct elf_link_hash_entry *fdh; + struct ppc_link_hash_entry *fh; + + fh = (struct ppc_link_hash_entry *) h; + BFD_ASSERT (fh->is_func); + fdh = fh->oh; + fdh->root.u.def.value = wptr - sec->contents; + } + else + { + /* Local syms are a bit tricky. We could + tweak them as they can be cached, but + we'd need to look through the local syms + for the function descriptor sym which we + don't have at the moment. So keep an + array of adjustments. */ + adjust[(rel->r_offset + wptr - rptr) / 24] + = wptr - rptr; + } + + if (wptr != rptr) + memcpy (wptr, rptr, 24); + wptr += 24; + } + rptr += 24; + offset += 24; + } + + /* We need to adjust any reloc offsets to point to the + new opd entries. While we're at it, we may as well + remove redundant relocs. */ + if (!skip) + { + rel->r_offset += wptr - rptr; + if (write_rel != rel) + memcpy (write_rel, rel, sizeof (*rel)); + ++write_rel; + } + } + + sec->_cooked_size = wptr - sec->contents; + sec->reloc_count = write_rel - relstart; + } + else if (elf_section_data (sec)->relocs != relstart) + free (relstart); + + if (local_syms != NULL + && symtab_hdr->contents != (unsigned char *) local_syms) + { + if (!info->keep_memory) + free (local_syms); + else + symtab_hdr->contents = (unsigned char *) local_syms; + } + } + + return true; +} + /* This is the condition under which ppc64_elf_finish_dynamic_symbol will be called from elflink.h. If elflink.h doesn't call our finish_dynamic_symbol routine, we'll need to do something about @@ -3156,10 +3901,7 @@ allocate_dynrelocs (h, inf) /* Make room for this entry. */ s->_raw_size += PLT_ENTRY_SIZE; - /* Make room for the .stub and .glink code. */ - s = htab->sstub; - s->_raw_size += PLT_CALL_STUB_SIZE; - + /* Make room for the .glink code. */ s = htab->sglink; if (s->_raw_size == 0) s->_raw_size += GLINK_CALL_STUB_SIZE; @@ -3404,6 +4146,9 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) } } + if (!edit_opd (output_bfd, info)) + return false; + /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info); @@ -3413,15 +4158,15 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { - bfd_vma size; - if ((s->flags & SEC_LINKER_CREATED) == 0) continue; - if (s == htab->splt - || s == htab->sgot - || s == htab->sstub - || s == htab->sglink) + if (s == htab->sbrlt || s == htab->srelbrlt) + /* These haven't been allocated yet; don't strip. */ + continue; + else if (s == htab->splt + || s == htab->sgot + || s == htab->sglink) { /* Strip this section if we don't need it; see the comment below. */ @@ -3462,18 +4207,16 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) continue; } + /* .plt is in the bss section. We don't initialise it. */ + if ((s->flags & SEC_LOAD) == 0) + continue; + /* Allocate memory for the section contents. We use bfd_zalloc here in case unused entries are not reclaimed before the section's contents are written out. This should not happen, but this way if it does, we get a R_PPC64_NONE reloc instead of garbage. */ - size = s->_raw_size; - if (s == htab->sstub) - { - /* .stub may grow. Allocate enough for the maximum growth. */ - size += (size + 65536 + 65535) / 65536 * 4; - } - s->contents = (bfd_byte *) bfd_zalloc (dynobj, size); + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); if (s->contents == NULL) return false; } @@ -3494,7 +4237,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) return false; } - if (htab->splt->_raw_size != 0) + if (htab->splt != NULL && htab->splt->_raw_size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -3536,116 +4279,55 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) return true; } -/* Called after we have determined section placement. If sections - move, we'll be called again. Provide a value for TOCstart. */ +/* Determine the type of stub needed, if any, for a call. */ -bfd_vma -ppc64_elf_toc (obfd) - bfd *obfd; +static INLINE enum ppc_stub_type +ppc_type_of_stub (input_sec, rel, hash, destination) + asection *input_sec; + const Elf_Internal_Rela *rel; + struct ppc_link_hash_entry **hash; + bfd_vma destination; { - asection *s; - bfd_vma TOCstart; + struct ppc_link_hash_entry *h = *hash; + bfd_vma location; + bfd_vma branch_offset; + bfd_vma max_branch_offset; + unsigned int r_type; - /* The TOC consists of sections .got, .toc, .tocbss, .plt in that - order. The TOC starts where the first of these sections starts. */ - s = bfd_get_section_by_name (obfd, ".got"); - if (s == NULL) - s = bfd_get_section_by_name (obfd, ".toc"); - if (s == NULL) - s = bfd_get_section_by_name (obfd, ".tocbss"); - if (s == NULL) - s = bfd_get_section_by_name (obfd, ".plt"); - if (s == NULL) + if (h != NULL) { - /* This may happen for - o references to TOC base (SYM@toc / TOC[tc0]) without a - .toc directive - o bad linker script - o --gc-sections and empty TOC sections - - FIXME: Warn user? */ + if (h->oh != NULL + && h->oh->plt.offset != (bfd_vma) -1 + && h->oh->dynindx != -1) + { + *hash = (struct ppc_link_hash_entry *) h->oh; + return ppc_stub_plt_call; + } - /* Look for a likely section. We probably won't even be - using TOCstart. */ - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY)) - == (SEC_ALLOC | SEC_SMALL_DATA)) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA)) - == (SEC_ALLOC | SEC_SMALL_DATA)) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) - break; - if (s == NULL) - for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & SEC_ALLOC) == SEC_ALLOC) - break; + if (h->elf.root.type == bfd_link_hash_undefweak + || h->elf.root.type == bfd_link_hash_undefined) + return ppc_stub_none; } - TOCstart = 0; - if (s != NULL) - TOCstart = s->output_section->vma + s->output_offset; - - return TOCstart; -} - -/* PowerPC64 .plt entries are 24 bytes long, which doesn't divide - evenly into 64k. Sometimes with a large enough .plt, we'll need to - use offsets differing in the high 16 bits when accessing a .plt - entry from a .plt call stub. This function adjusts the size of - .stub to accommodate the extra stub instruction needed in such - cases. */ - -boolean -ppc64_elf_size_stubs (obfd, info, changed) - bfd *obfd; - struct bfd_link_info *info; - int *changed; -{ - struct ppc_link_hash_table *htab = ppc_hash_table (info); - bfd_vma plt_offset, next_64k; - long base, num, extra; - - /* .plt and .stub should be both present, or both absent. */ - if ((htab->splt == NULL || htab->splt->_raw_size == 0) - != (htab->sstub == NULL || htab->sstub->_raw_size == 0)) - abort (); + /* Determine where the call point is. */ + location = (input_sec->output_offset + + input_sec->output_section->vma + + rel->r_offset); - /* If no .plt, then nothing to do. */ - if (htab->splt == NULL || htab->splt->_raw_size == 0) - return true; + branch_offset = destination - location; + r_type = ELF64_R_TYPE (rel->r_info); - plt_offset = (htab->splt->output_section->vma - + htab->splt->output_offset - - elf_gp (obfd)); - next_64k = (plt_offset + 65535) & -65536; + /* Determine if a long branch stub is needed. */ + max_branch_offset = 1 << 25; + if (r_type != (unsigned int) R_PPC64_REL24) + max_branch_offset = 1 << 15; - /* If the .plt doesn't have any entries crossing a 64k boundary, - then there is no need for bigger stubs. */ - if (plt_offset + htab->splt->_raw_size <= next_64k) - return true; + if (branch_offset + max_branch_offset >= 2 * max_branch_offset) + /* We need a stub. Figure out whether a long_branch or plt_branch + is needed later. */ + return ppc_stub_long_branch; - /* OK, so we have at least one transition. Since .plt entries are - 24 bytes long, we'll strike it lucky every 3*64k, with the 64k - boundary between .plt entries. */ - base = next_64k / 65536; - num = (plt_offset + htab->splt->_raw_size - next_64k) / 65536; - extra = (base % 3 + num + 1) * 2 / 3; - - /* Allow one extra instruction for each EXTRA. The change in .stub - may change the location of .toc and .plt. .toc and .plt ought to - move as a group, but someone might be playing with eg. .plt - alignment, so don't allow .stub size to decrease. */ - if (htab->sstub->_cooked_size < htab->sstub->_raw_size + extra * 4) - { - htab->sstub->_cooked_size = htab->sstub->_raw_size + extra * 4; - *changed = true; - } - return true; + return ppc_stub_none; } /* Build a .plt call stub. */ @@ -3680,158 +4362,848 @@ build_plt_stub (obfd, p, offset, glink) return p; } -/* Build the stubs for one function call. */ - static boolean -build_one_stub (h, inf) - struct elf_link_hash_entry *h; - PTR inf; +ppc_build_one_stub (gen_entry, in_arg) + struct bfd_hash_entry *gen_entry; + PTR in_arg; { + struct ppc_stub_hash_entry *stub_entry; + struct ppc_branch_hash_entry *br_entry; struct bfd_link_info *info; struct ppc_link_hash_table *htab; + asection *stub_sec; + bfd *stub_bfd; + bfd_byte *loc; + bfd_byte *p; + unsigned int indx; + bfd_vma off; + int size; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - return true; + /* Massage our args to the form they really have. */ + stub_entry = (struct ppc_stub_hash_entry *) gen_entry; + info = (struct bfd_link_info *) in_arg; - info = (struct bfd_link_info *) inf; htab = ppc_hash_table (info); + stub_sec = stub_entry->stub_sec; - if (htab->elf.dynamic_sections_created - && h->plt.offset != (bfd_vma) -1 - && ((struct ppc_link_hash_entry *) h)->is_func_descriptor) + /* Make a note of the offset within the stubs for this entry. */ + stub_entry->stub_offset = stub_sec->_cooked_size; + loc = stub_sec->contents + stub_entry->stub_offset; + + stub_bfd = stub_sec->owner; + + switch (stub_entry->stub_type) { - struct elf_link_hash_entry *fh; - asection *s; - bfd_vma plt_r2; - bfd_byte *p; - unsigned int indx; + case ppc_stub_long_branch: + /* Branches are relative. This is where we are going to. */ + off = (stub_entry->target_value + + stub_entry->target_section->output_offset + + stub_entry->target_section->output_section->vma); - fh = elf_link_hash_lookup (&htab->elf, h->root.root.string - 1, - false, false, true); + /* And this is where we are coming from. */ + off -= (stub_entry->stub_offset + + stub_sec->output_offset + + stub_sec->output_section->vma); - if (fh == NULL) - abort (); + BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26)); - BFD_ASSERT (((struct ppc_link_hash_entry *) fh)->is_func); + bfd_put_32 (stub_bfd, (bfd_vma) B_DOT | (off & 0x3fffffc), loc); + size = 4; + break; - /* Build the .plt call stub. */ - plt_r2 = (htab->splt->output_section->vma - + htab->splt->output_offset - + h->plt.offset - - elf_gp (htab->splt->output_section->owner) - - TOC_BASE_OFF); + case ppc_stub_plt_branch: + br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table, + stub_entry->root.string + 9, + false, false); + if (br_entry == NULL) + { + (*_bfd_error_handler) (_("can't find branch stub `%s'"), + stub_entry->root.string + 9); + htab->stub_error = true; + return false; + } + + off = (stub_entry->target_value + + stub_entry->target_section->output_offset + + stub_entry->target_section->output_section->vma); + + bfd_put_64 (htab->sbrlt->owner, off, + htab->sbrlt->contents + br_entry->offset); + + if (info->shared) + { + /* Create a reloc for the branch lookup table entry. */ + Elf_Internal_Rela rela; + Elf64_External_Rela *r; + + rela.r_offset = (br_entry->offset + + htab->sbrlt->output_offset + + htab->sbrlt->output_section->vma); + rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); + rela.r_addend = off; + + r = (Elf64_External_Rela *) htab->srelbrlt->contents; + r += htab->srelbrlt->reloc_count++; + bfd_elf64_swap_reloca_out (htab->srelbrlt->owner, &rela, r); + } + + off = (br_entry->offset + + htab->sbrlt->output_offset + + htab->sbrlt->output_section->vma + - elf_gp (htab->sbrlt->output_section->owner) + - TOC_BASE_OFF); - if (plt_r2 + 0x80000000 > 0xffffffff - || (plt_r2 & 3) != 0) + if (off + 0x80000000 > 0xffffffff || (off & 7) != 0) { (*_bfd_error_handler) (_("linkage table error against `%s'"), - h->root.root.string); + stub_entry->root.string); bfd_set_error (bfd_error_bad_value); - htab->plt_overflow = true; + htab->stub_error = true; return false; } - s = htab->sstub; - /* Steal plt.offset to store the stub offset. */ - fh->plt.offset = s->_cooked_size; - p = s->contents + s->_cooked_size; - p = build_plt_stub (s->owner, p, (int) plt_r2, 0); - s->_cooked_size = p - s->contents; - - /* Build the .glink lazy link call stub. */ - s = htab->sglink; - p = s->contents + s->_cooked_size; - indx = s->reloc_count; - if (indx < 0x8000) + indx = off; + bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R12_R2 | PPC_HA (indx), loc); + bfd_put_32 (stub_bfd, (bfd_vma) LD_R11_0R12 | PPC_LO (indx), loc + 4); + bfd_put_32 (stub_bfd, (bfd_vma) MTCTR_R11, loc + 8); + bfd_put_32 (stub_bfd, (bfd_vma) BCTR, loc + 12); + size = 16; + break; + + case ppc_stub_plt_call: + /* Do the best we can for shared libraries built without + exporting ".foo" for each "foo". This can happen when symbol + versioning scripts strip all bar a subset of symbols. */ + if (stub_entry->h->oh->root.type != bfd_link_hash_defined + && stub_entry->h->oh->root.type != bfd_link_hash_defweak) { - bfd_put_32 (s->owner, LI_R0_0 | indx, p); - p += 4; + /* Point the symbol at the stub. There may be multiple stubs, + we don't really care; The main thing is to make this sym + defined somewhere. */ + stub_entry->h->oh->root.type = bfd_link_hash_defined; + stub_entry->h->oh->root.u.def.section = stub_entry->stub_sec; + stub_entry->h->oh->root.u.def.value = stub_entry->stub_offset; } - else + + /* Now build the stub. */ + off = stub_entry->h->elf.plt.offset; + if (off >= (bfd_vma) -2) + abort (); + + off &= ~ (bfd_vma) 1; + off += (htab->splt->output_offset + + htab->splt->output_section->vma + - elf_gp (htab->splt->output_section->owner) + - TOC_BASE_OFF); + + if (off + 0x80000000 > 0xffffffff || (off & 7) != 0) { - bfd_put_32 (s->owner, LIS_R0_0 | PPC_HI (indx), p); - p += 4; - bfd_put_32 (s->owner, ORI_R0_R0_0 | PPC_LO (indx), p); - p += 4; + (*_bfd_error_handler) + (_("linkage table error against `%s'"), + stub_entry->h->elf.root.root.string); + bfd_set_error (bfd_error_bad_value); + htab->stub_error = true; + return false; } - bfd_put_32 (s->owner, B_DOT | ((s->contents - p) & 0x3fffffc), p); - p += 4; - s->_cooked_size = p - s->contents; - s->reloc_count += 1; + + p = build_plt_stub (stub_bfd, loc, (int) off, 0); + size = p - loc; + break; + + default: + BFD_FAIL (); + return false; } + + stub_sec->_cooked_size += size; return true; } -boolean -ppc64_elf_build_stubs (obfd, info) - bfd *obfd; +/* As above, but don't actually build the stub. Just bump offset so + we know stub section sizes, and select plt_branch stubs where + long_branch stubs won't do. */ + +static boolean +ppc_size_one_stub (gen_entry, in_arg) + struct bfd_hash_entry *gen_entry; + PTR in_arg; +{ + struct ppc_stub_hash_entry *stub_entry; + struct ppc_link_hash_table *htab; + bfd_vma off; + int size; + + /* Massage our args to the form they really have. */ + stub_entry = (struct ppc_stub_hash_entry *) gen_entry; + htab = (struct ppc_link_hash_table *) in_arg; + + if (stub_entry->stub_type == ppc_stub_plt_call) + { + off = stub_entry->h->elf.plt.offset & ~(bfd_vma) 1; + off += (htab->splt->output_offset + + htab->splt->output_section->vma + - elf_gp (htab->splt->output_section->owner) + - TOC_BASE_OFF); + + size = 28; + if (PPC_HA ((int) off + 16) != PPC_HA ((int) off)) + size += 4; + } + else + { + /* ppc_stub_long_branch or ppc_stub_plt_branch. */ + stub_entry->stub_type = ppc_stub_long_branch; + size = 4; + + off = (stub_entry->target_value + + stub_entry->target_section->output_offset + + stub_entry->target_section->output_section->vma); + off -= (stub_entry->stub_sec->_raw_size + + stub_entry->stub_sec->output_offset + + stub_entry->stub_sec->output_section->vma); + + if (off + (1 << 25) >= (bfd_vma) (1 << 26)) + { + struct ppc_branch_hash_entry *br_entry; + + br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table, + stub_entry->root.string + 9, + true, false); + if (br_entry == NULL) + { + (*_bfd_error_handler) (_("can't build branch stub `%s'"), + stub_entry->root.string + 9); + htab->stub_error = true; + return false; + } + + if (br_entry->iter != htab->stub_iteration) + { + br_entry->iter = htab->stub_iteration; + br_entry->offset = htab->sbrlt->_raw_size; + htab->sbrlt->_raw_size += 8; + } + stub_entry->stub_type = ppc_stub_plt_branch; + size = 16; + } + } + + stub_entry->stub_sec->_raw_size += size; + return true; +} + +/* Set up various things so that we can make a list of input sections + for each output section included in the link. Returns -1 on error, + 0 when no stubs will be needed, and 1 on success. */ + +int +ppc64_elf_setup_section_lists (output_bfd, info) + bfd *output_bfd; struct bfd_link_info *info; { + bfd *input_bfd; + int top_id, top_index; + asection *section; + asection **input_list, **list; + bfd_size_type amt; struct ppc_link_hash_table *htab = ppc_hash_table (info); - bfd_vma old_stub_size; - bfd_vma plt_r2; - bfd_byte *p; - /* If no .plt stubs, then nothing to do. */ - if (htab->sstub == NULL || htab->sstub->_raw_size == 0) - return true; + if (htab->elf.root.creator->flavour != bfd_target_elf_flavour + || htab->sbrlt == NULL) + return 0; - old_stub_size = htab->sstub->_cooked_size; - htab->sstub->_cooked_size = 0; - - /* Build the .glink plt call stub. */ - plt_r2 = (htab->splt->output_section->vma - + htab->splt->output_offset - - elf_gp (obfd) - - TOC_BASE_OFF); - p = htab->sglink->contents; - p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1); - while (p - htab->sglink->contents < GLINK_CALL_STUB_SIZE) + /* Find the top input section id. */ + for (input_bfd = info->input_bfds, top_id = 0; + input_bfd != NULL; + input_bfd = input_bfd->link_next) { - bfd_put_32 (htab->sglink->owner, NOP, p); - p += 4; + for (section = input_bfd->sections; + section != NULL; + section = section->next) + { + if (top_id < section->id) + top_id = section->id; + } } - htab->sglink->_cooked_size = p - htab->sglink->contents; - /* Use reloc_count to count entries. */ - htab->sglink->reloc_count = 0; + amt = sizeof (struct map_stub) * (top_id + 1); + htab->stub_group = (struct map_stub *) bfd_zmalloc (amt); + if (htab->stub_group == NULL) + return -1; + + /* We can't use output_bfd->section_count here to find the top output + section index as some sections may have been removed, and + _bfd_strip_section_from_output doesn't renumber the indices. */ + for (section = output_bfd->sections, top_index = 0; + section != NULL; + section = section->next) + { + if (top_index < section->index) + top_index = section->index; + } - elf_link_hash_traverse (&htab->elf, build_one_stub, (PTR) info); - htab->sglink->reloc_count = 0; + htab->top_index = top_index; + amt = sizeof (asection *) * (top_index + 1); + input_list = (asection **) bfd_malloc (amt); + htab->input_list = input_list; + if (input_list == NULL) + return -1; + + /* For sections we aren't interested in, mark their entries with a + value we can check later. */ + list = input_list + top_index; + do + *list = bfd_abs_section_ptr; + while (list-- != input_list); + + for (section = output_bfd->sections; + section != NULL; + section = section->next) + { + if ((section->flags & SEC_CODE) != 0) + input_list[section->index] = NULL; + } - if (htab->plt_overflow) - return false; + return 1; +} - if (old_stub_size != htab->sstub->_cooked_size - || htab->sglink->_raw_size != htab->sglink->_cooked_size) +/* The linker repeatedly calls this function for each input section, + in the order that input sections are linked into output sections. + Build lists of input sections to determine groupings between which + we may insert linker stubs. */ + +void +ppc64_elf_next_input_section (info, isec) + struct bfd_link_info *info; + asection *isec; +{ + struct ppc_link_hash_table *htab = ppc_hash_table (info); + + if (isec->output_section->index <= htab->top_index) { - (*_bfd_error_handler) - (_("stub section size doesn't match calculated size")); - bfd_set_error (bfd_error_bad_value); - return false; + asection **list = htab->input_list + isec->output_section->index; + if (*list != bfd_abs_section_ptr) + { + /* Steal the link_sec pointer for our list. */ +#define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec) + /* This happens to make the list in reverse order, + which is what we want. */ + PREV_SEC (isec) = *list; + *list = isec; + } } - return true; } -/* Set up any other section flags and such that may be necessary. */ +/* See whether we can group stub sections together. Grouping stub + sections may result in fewer stubs. More importantly, we need to + put all .init* and .fini* stubs at the beginning of the .init or + .fini output sections respectively, because glibc splits the + _init and _fini functions into multiple parts. Putting a stub in + the middle of a function is not a good idea. */ -static boolean -ppc64_elf_fake_sections (abfd, shdr, asect) - bfd *abfd ATTRIBUTE_UNUSED; - Elf64_Internal_Shdr *shdr; - asection *asect; +static void +group_sections (htab, stub_group_size, stubs_always_before_branch) + struct ppc_link_hash_table *htab; + bfd_size_type stub_group_size; + boolean stubs_always_before_branch; +{ + asection **list = htab->input_list + htab->top_index; + do + { + asection *tail = *list; + if (tail == bfd_abs_section_ptr) + continue; + while (tail != NULL) + { + asection *curr; + asection *prev; + bfd_size_type total; + + curr = tail; + if (tail->_cooked_size) + total = tail->_cooked_size; + else + total = tail->_raw_size; + while ((prev = PREV_SEC (curr)) != NULL + && ((total += curr->output_offset - prev->output_offset) + < stub_group_size)) + curr = prev; + + /* OK, the size from the start of CURR to the end is less + than stub_group_size and thus can be handled by one stub + section. (or the tail section is itself larger than + stub_group_size, in which case we may be toast.) We + should really be keeping track of the total size of stubs + added here, as stubs contribute to the final output + section size. That's a little tricky, and this way will + only break if stubs added make the total size more than + 2^25, ie. for the default stub_group_size, if stubs total + more than 2834432 bytes, or over 100000 plt call stubs. */ + do + { + prev = PREV_SEC (tail); + /* Set up this stub group. */ + htab->stub_group[tail->id].link_sec = curr; + } + while (tail != curr && (tail = prev) != NULL); + + /* But wait, there's more! Input sections up to stub_group_size + bytes before the stub section can be handled by it too. */ + if (!stubs_always_before_branch) + { + total = 0; + while (prev != NULL + && ((total += tail->output_offset - prev->output_offset) + < stub_group_size)) + { + tail = prev; + prev = PREV_SEC (tail); + htab->stub_group[tail->id].link_sec = curr; + } + } + tail = prev; + } + } + while (list-- != htab->input_list); + free (htab->input_list); +#undef PREV_SEC +} + +/* Determine and set the size of the stub section for a final link. + + The basic idea here is to examine all the relocations looking for + PC-relative calls to a target that is unreachable with a "bl" + instruction. */ + +boolean +ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size, + add_stub_section, layout_sections_again) + bfd *output_bfd; + bfd *stub_bfd; + struct bfd_link_info *info; + bfd_signed_vma group_size; + asection * (*add_stub_section) PARAMS ((const char *, asection *)); + void (*layout_sections_again) PARAMS ((void)); { - if ((asect->flags & SEC_EXCLUDE) != 0) - shdr->sh_flags |= SHF_EXCLUDE; + bfd_size_type stub_group_size; + boolean stubs_always_before_branch; + struct ppc_link_hash_table *htab = ppc_hash_table (info); + + /* Stash our params away. */ + htab->stub_bfd = stub_bfd; + htab->add_stub_section = add_stub_section; + htab->layout_sections_again = layout_sections_again; + stubs_always_before_branch = group_size < 0; + if (group_size < 0) + stub_group_size = -group_size; + else + stub_group_size = group_size; + if (stub_group_size == 1) + { + /* Default values. */ + stub_group_size = 30720000; + if (htab->has_14bit_branch) + stub_group_size = 30000; + } + + group_sections (htab, stub_group_size, stubs_always_before_branch); + + while (1) + { + bfd *input_bfd; + unsigned int bfd_indx; + asection *stub_sec; + boolean stub_changed; + + htab->stub_iteration += 1; + stub_changed = false; + + for (input_bfd = info->input_bfds, bfd_indx = 0; + input_bfd != NULL; + input_bfd = input_bfd->link_next, bfd_indx++) + { + Elf_Internal_Shdr *symtab_hdr; + asection *section; + Elf_Internal_Sym *local_syms = NULL; + + /* We'll need the symbol table in a second. */ + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + if (symtab_hdr->sh_info == 0) + continue; + + /* Walk over each section attached to the input bfd. */ + for (section = input_bfd->sections; + section != NULL; + section = section->next) + { + Elf_Internal_Rela *internal_relocs, *irelaend, *irela; + + /* If there aren't any relocs, then there's nothing more + to do. */ + if ((section->flags & SEC_RELOC) == 0 + || section->reloc_count == 0) + continue; + + /* If this section is a link-once section that will be + discarded, then don't create any stubs. */ + if (section->output_section == NULL + || section->output_section->owner != output_bfd) + continue; + + /* Get the relocs. */ + internal_relocs + = _bfd_elf64_link_read_relocs (input_bfd, section, NULL, + (Elf_Internal_Rela *) NULL, + info->keep_memory); + if (internal_relocs == NULL) + goto error_ret_free_local; + + /* Now examine each relocation. */ + irela = internal_relocs; + irelaend = irela + section->reloc_count; + for (; irela < irelaend; irela++) + { + unsigned int r_type, r_indx; + enum ppc_stub_type stub_type; + struct ppc_stub_hash_entry *stub_entry; + asection *sym_sec; + bfd_vma sym_value; + bfd_vma destination; + struct ppc_link_hash_entry *hash; + char *stub_name; + const asection *id_sec; + + r_type = ELF64_R_TYPE (irela->r_info); + r_indx = ELF64_R_SYM (irela->r_info); + + if (r_type >= (unsigned int) R_PPC_max) + { + bfd_set_error (bfd_error_bad_value); + goto error_ret_free_internal; + } + + /* Only look for stubs on branch instructions. */ + if (r_type != (unsigned int) R_PPC64_REL24 + && r_type != (unsigned int) R_PPC64_REL14 + && r_type != (unsigned int) R_PPC64_REL14_BRTAKEN + && r_type != (unsigned int) R_PPC64_REL14_BRNTAKEN) + continue; + + /* Now determine the call target, its name, value, + section. */ + sym_sec = NULL; + sym_value = 0; + destination = 0; + hash = NULL; + if (r_indx < symtab_hdr->sh_info) + { + /* It's a local symbol. */ + Elf_Internal_Sym *sym; + Elf_Internal_Shdr *hdr; + + if (local_syms == NULL) + { + local_syms + = (Elf_Internal_Sym *) symtab_hdr->contents; + if (local_syms == NULL) + local_syms + = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, + symtab_hdr->sh_info, 0, + NULL, NULL, NULL); + if (local_syms == NULL) + goto error_ret_free_internal; + } + sym = local_syms + r_indx; + hdr = elf_elfsections (input_bfd)[sym->st_shndx]; + sym_sec = hdr->bfd_section; + if (ELF_ST_TYPE (sym->st_info) != STT_SECTION) + sym_value = sym->st_value; + destination = (sym_value + irela->r_addend + + sym_sec->output_offset + + sym_sec->output_section->vma); + } + else + { + /* It's an external symbol. */ + int e_indx; + + e_indx = r_indx - symtab_hdr->sh_info; + hash = ((struct ppc_link_hash_entry *) + elf_sym_hashes (input_bfd)[e_indx]); + + while (hash->elf.root.type == bfd_link_hash_indirect + || hash->elf.root.type == bfd_link_hash_warning) + hash = ((struct ppc_link_hash_entry *) + hash->elf.root.u.i.link); + + if (hash->elf.root.type == bfd_link_hash_defined + || hash->elf.root.type == bfd_link_hash_defweak) + { + sym_sec = hash->elf.root.u.def.section; + sym_value = hash->elf.root.u.def.value; + if (sym_sec->output_section != NULL) + destination = (sym_value + irela->r_addend + + sym_sec->output_offset + + sym_sec->output_section->vma); + } + else if (hash->elf.root.type == bfd_link_hash_undefweak) + ; + else if (hash->elf.root.type == bfd_link_hash_undefined) + ; + else + { + bfd_set_error (bfd_error_bad_value); + goto error_ret_free_internal; + } + } + + /* Determine what (if any) linker stub is needed. */ + stub_type = ppc_type_of_stub (section, irela, &hash, + destination); + if (stub_type == ppc_stub_none) + continue; + + /* Support for grouping stub sections. */ + id_sec = htab->stub_group[section->id].link_sec; + + /* Get the name of this stub. */ + stub_name = ppc_stub_name (id_sec, sym_sec, hash, irela); + if (!stub_name) + goto error_ret_free_internal; + + stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, + stub_name, false, false); + if (stub_entry != NULL) + { + /* The proper stub has already been created. */ + free (stub_name); + continue; + } + + stub_entry = ppc_add_stub (stub_name, section, htab); + if (stub_entry == NULL) + { + free (stub_name); + error_ret_free_internal: + if (elf_section_data (section)->relocs == NULL) + free (internal_relocs); + error_ret_free_local: + if (local_syms != NULL + && (symtab_hdr->contents + != (unsigned char *) local_syms)) + free (local_syms); + return false; + } + + stub_entry->target_value = sym_value; + stub_entry->target_section = sym_sec; + stub_entry->stub_type = stub_type; + stub_entry->h = hash; + stub_changed = true; + } + + /* We're done with the internal relocs, free them. */ + if (elf_section_data (section)->relocs != internal_relocs) + free (internal_relocs); + } + + if (local_syms != NULL + && symtab_hdr->contents != (unsigned char *) local_syms) + { + if (!info->keep_memory) + free (local_syms); + else + symtab_hdr->contents = (unsigned char *) local_syms; + } + } + + if (!stub_changed) + break; + + /* OK, we've added some stubs. Find out the new size of the + stub sections. */ + for (stub_sec = htab->stub_bfd->sections; + stub_sec != NULL; + stub_sec = stub_sec->next) + { + stub_sec->_raw_size = 0; + stub_sec->_cooked_size = 0; + } + htab->sbrlt->_raw_size = 0; + htab->sbrlt->_cooked_size = 0; + + bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, htab); + + /* Ask the linker to do its stuff. */ + (*htab->layout_sections_again) (); + } - if ((asect->flags & SEC_SORT_ENTRIES) != 0) - shdr->sh_type = SHT_ORDERED; + /* It would be nice to strip .branch_lt from the output if the + section is empty, but it's too late. If we strip sections here, + the dynamic symbol table is corrupted since the section symbol + for the stripped section isn't written. */ return true; } +/* Called after we have determined section placement. If sections + move, we'll be called again. Provide a value for TOCstart. */ + +bfd_vma +ppc64_elf_toc (obfd) + bfd *obfd; +{ + asection *s; + bfd_vma TOCstart; + + /* The TOC consists of sections .got, .toc, .tocbss, .plt in that + order. The TOC starts where the first of these sections starts. */ + s = bfd_get_section_by_name (obfd, ".got"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".toc"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".tocbss"); + if (s == NULL) + s = bfd_get_section_by_name (obfd, ".plt"); + if (s == NULL) + { + /* This may happen for + o references to TOC base (SYM@toc / TOC[tc0]) without a + .toc directive + o bad linker script + o --gc-sections and empty TOC sections + + FIXME: Warn user? */ + + /* Look for a likely section. We probably won't even be + using TOCstart. */ + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY)) + == (SEC_ALLOC | SEC_SMALL_DATA)) + break; + if (s == NULL) + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA)) + == (SEC_ALLOC | SEC_SMALL_DATA)) + break; + if (s == NULL) + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) + break; + if (s == NULL) + for (s = obfd->sections; s != NULL; s = s->next) + if ((s->flags & SEC_ALLOC) == SEC_ALLOC) + break; + } + + TOCstart = 0; + if (s != NULL) + TOCstart = s->output_section->vma + s->output_offset; + + return TOCstart; +} + +/* Build all the stubs associated with the current output file. + The stubs are kept in a hash table attached to the main linker + hash table. This function is called via gldelf64ppc_finish. */ + +boolean +ppc64_elf_build_stubs (info) + struct bfd_link_info *info; +{ + struct ppc_link_hash_table *htab = ppc_hash_table (info); + asection *stub_sec; + bfd_vma plt_r2; + bfd_byte *p; + + for (stub_sec = htab->stub_bfd->sections; + stub_sec != NULL; + stub_sec = stub_sec->next) + { + bfd_size_type size; + + /* Allocate memory to hold the linker stubs. */ + size = stub_sec->_raw_size; + if (size != 0) + { + stub_sec->contents = (bfd_byte *) bfd_zalloc (htab->stub_bfd, size); + if (stub_sec->contents == NULL) + return false; + } + stub_sec->_cooked_size = 0; + } + + if (htab->splt != NULL) + { + unsigned int indx; + + /* Build the .glink plt call stub. */ + plt_r2 = (htab->splt->output_offset + + htab->splt->output_section->vma + - elf_gp (htab->splt->output_section->owner) + - TOC_BASE_OFF); + p = htab->sglink->contents; + p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1); + while (p < htab->sglink->contents + GLINK_CALL_STUB_SIZE) + { + bfd_put_32 (htab->sglink->owner, NOP, p); + p += 4; + } + + /* Build the .glink lazy link call stubs. */ + indx = 0; + while (p < htab->sglink->contents + htab->sglink->_raw_size) + { + if (indx < 0x8000) + { + bfd_put_32 (htab->sglink->owner, LI_R0_0 | indx, p); + p += 4; + } + else + { + bfd_put_32 (htab->sglink->owner, LIS_R0_0 | PPC_HI (indx), p); + p += 4; + bfd_put_32 (htab->sglink->owner, ORI_R0_R0_0 | PPC_LO (indx), p); + p += 4; + } + bfd_put_32 (htab->sglink->owner, + B_DOT | ((htab->sglink->contents - p) & 0x3fffffc), p); + indx++; + p += 4; + } + htab->sglink->_cooked_size = p - htab->sglink->contents; + } + + if (htab->sbrlt->_raw_size != 0) + { + htab->sbrlt->contents = (bfd_byte *) bfd_zalloc (htab->sbrlt->owner, + htab->sbrlt->_raw_size); + if (htab->sbrlt->contents == NULL) + return false; + } + + /* Build the stubs as directed by the stub hash table. */ + bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info); + + for (stub_sec = htab->stub_bfd->sections; + stub_sec != NULL; + stub_sec = stub_sec->next) + { + if (stub_sec->_raw_size != stub_sec->_cooked_size) + break; + } + + if (stub_sec != NULL + || htab->sglink->_raw_size != htab->sglink->_cooked_size) + { + htab->stub_error = true; + (*_bfd_error_handler) (_("stubs don't match calculated size")); + } + + return !htab->stub_error; +} + /* The RELOCATE_SECTION function is called by the ELF backend linker to handle the relocations for a section. @@ -3897,7 +5269,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, TOCstart = elf_gp (output_bfd); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); - is_opd = strcmp (bfd_get_section_name (abfd, input_section), ".opd") == 0; + is_opd = elf_section_data (input_section)->tdata != NULL; rel = relocs; relend = relocs + input_section->reloc_count; @@ -3910,11 +5282,15 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, Elf_Internal_Sym *sym; asection *sec; struct elf_link_hash_entry *h; + struct elf_link_hash_entry *fdh; const char *sym_name; unsigned long r_symndx; bfd_vma relocation; boolean unresolved_reloc; + boolean warned; long insn; + struct ppc_stub_hash_entry *stub_entry; + bfd_vma max_br_offset; bfd_vma from; r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info); @@ -3927,6 +5303,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, h = (struct elf_link_hash_entry *) 0; sym_name = (const char *) 0; unresolved_reloc = false; + warned = false; if (r_type == R_PPC64_TOC) { @@ -3943,6 +5320,15 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); /* rel may have changed, update our copy of addend. */ addend = rel->r_addend; + + if (elf_section_data (sec) != NULL) + { + long *opd_sym_adjust; + + opd_sym_adjust = (long *) elf_section_data (sec)->tdata; + if (opd_sym_adjust != NULL && sym->st_value % 24 == 0) + relocation += opd_sym_adjust[sym->st_value / 24]; + } } else { @@ -3983,6 +5369,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, || info->no_undefined || ELF_ST_VISIBILITY (h->other))))) return false; + warned = true; } } @@ -3996,8 +5383,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, /* Branch taken prediction relocations. */ case R_PPC64_ADDR14_BRTAKEN: case R_PPC64_REL14_BRTAKEN: - insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ - /* Fall thru. */ + insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ + /* Fall thru. */ /* Branch not taken prediction relocations. */ case R_PPC64_ADDR14_BRNTAKEN: @@ -4036,8 +5423,10 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, to alter the TOC base. These are recognized by their need for a PLT entry. */ if (h != NULL - && h->plt.offset != (bfd_vma) -1 - && htab->sstub != NULL) + && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL + && fdh->plt.offset != (bfd_vma) -1 + && (stub_entry = ppc_get_stub_entry (input_section, sec, fdh, + rel, htab)) != NULL) { boolean can_plt_call = 0; @@ -4064,10 +5453,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (can_plt_call) { - /* plt.offset here is the offset into the stub section. */ - relocation = (htab->sstub->output_section->vma - + htab->sstub->output_offset - + h->plt.offset); + relocation = (stub_entry->stub_offset + + stub_entry->stub_sec->output_offset + + stub_entry->stub_sec->output_section->vma); addend = 0; unresolved_reloc = false; } @@ -4273,14 +5661,14 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, addend -= sec->output_section->vma; break; + case R_PPC64_REL14: + case R_PPC64_REL14_BRNTAKEN: + case R_PPC64_REL14_BRTAKEN: case R_PPC64_REL24: break; /* Relocations that may need to be propagated if this is a dynamic object. */ - case R_PPC64_REL14: - case R_PPC64_REL14_BRNTAKEN: - case R_PPC64_REL14_BRTAKEN: case R_PPC64_REL32: case R_PPC64_REL64: case R_PPC64_ADDR14: @@ -4378,6 +5766,20 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocate = true; if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC) { + if (is_opd && h != NULL) + { + /* Lie about opd entries. This case occurs + when building shared libraries and we + reference a function in another shared + lib. The same thing happens for a weak + definition in an application that's + overridden by a strong definition in a + shared lib. (I believe this is a generic + bug in binutils handling of weak syms.) + In these cases we won't use the opd + entry in this lib. */ + unresolved_reloc = false; + } outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); } else @@ -4497,22 +5899,51 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, continue; } break; + + case R_PPC64_REL14: + case R_PPC64_REL14_BRNTAKEN: + case R_PPC64_REL14_BRTAKEN: + max_br_offset = 1 << 15; + goto branch_check; + + case R_PPC64_REL24: + max_br_offset = 1 << 25; + + branch_check: + /* If the branch is out of reach, then redirect the + call to the local stub for this function. */ + from = (offset + + input_section->output_offset + + input_section->output_section->vma); + if (relocation + addend - from + max_br_offset >= 2 * max_br_offset + && (stub_entry = ppc_get_stub_entry (input_section, sec, h, + rel, htab)) != NULL) + { + /* Munge up the value and addend so that we call the stub + rather than the procedure directly. */ + relocation = (stub_entry->stub_offset + + stub_entry->stub_sec->output_offset + + stub_entry->stub_sec->output_section->vma); + addend = 0; + } + break; } - /* FIXME: Why do we allow debugging sections to escape this error? - More importantly, why do we not emit dynamic relocs above in - debugging sections (which are ! SEC_ALLOC)? If we had - emitted the dynamic reloc, we could remove the fudge here. */ + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections + because such sections are not SEC_ALLOC and thus ld.so will + not process them. */ if (unresolved_reloc - && !(info->shared - && (input_section->flags & SEC_DEBUGGING) != 0 + && !((input_section->flags & SEC_DEBUGGING) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) - (*_bfd_error_handler) - (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), - bfd_archive_filename (input_bfd), - bfd_get_section_name (input_bfd, input_section), - (long) rel->r_offset, - h->root.root.string); + { + (*_bfd_error_handler) + (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, + h->root.root.string); + ret = false; + } r = _bfd_final_link_relocate (ppc64_elf_howto_table[(int) r_type], input_bfd, @@ -4522,9 +5953,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation, addend); - if (r == bfd_reloc_ok) - ; - else if (r == bfd_reloc_overflow) + if (r != bfd_reloc_ok) { const char *name; @@ -4555,13 +5984,25 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, name = bfd_section_name (input_bfd, sec); } - if (! ((*info->callbacks->reloc_overflow) - (info, name, ppc64_elf_howto_table[(int) r_type]->name, - (bfd_vma) 0, input_bfd, input_section, offset))) - return false; + if (r == bfd_reloc_overflow) + { + if (warned) + continue; + if (!((*info->callbacks->reloc_overflow) + (info, name, ppc64_elf_howto_table[(int) r_type]->name, + rel->r_addend, input_bfd, input_section, offset))) + return false; + } + else + { + (*_bfd_error_handler) + (_("%s(%s+0x%lx): reloc against `%s': error %d"), + bfd_archive_filename (input_bfd), + bfd_get_section_name (input_bfd, input_section), + (long) rel->r_offset, name, (int) r); + ret = false; + } } - else - ret = false; } return ret; @@ -4590,7 +6031,7 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym) Elf64_External_Rela *loc; /* This symbol has an entry in the procedure linkage table. Set - it up. */ + it up. */ if (htab->splt == NULL || htab->srelplt == NULL @@ -4617,7 +6058,7 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym) Elf64_External_Rela *loc; /* This symbol has an entry in the global offset table. Set it - up. */ + up. */ if (htab->sgot == NULL || htab->srelgot == NULL) abort (); @@ -4840,11 +6281,11 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info) #define elf_backend_rela_normal 1 #define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup -#define bfd_elf64_bfd_set_private_flags ppc64_elf_set_private_flags #define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data #define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create +#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free -#define elf_backend_section_from_shdr ppc64_elf_section_from_shdr +#define elf_backend_object_p ppc64_elf_object_p #define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections #define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol #define elf_backend_check_relocs ppc64_elf_check_relocs @@ -4854,7 +6295,6 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info) #define elf_backend_hide_symbol ppc64_elf_hide_symbol #define elf_backend_always_size_sections ppc64_elf_func_desc_adjust #define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections -#define elf_backend_fake_sections ppc64_elf_fake_sections #define elf_backend_relocate_section ppc64_elf_relocate_section #define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol #define elf_backend_reloc_type_class ppc64_elf_reloc_type_class diff --git a/contrib/binutils/bfd/elf64-ppc.h b/contrib/binutils/bfd/elf64-ppc.h index beb637b..cabc388 100644 --- a/contrib/binutils/bfd/elf64-ppc.h +++ b/contrib/binutils/bfd/elf64-ppc.h @@ -17,6 +17,16 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -bfd_vma ppc64_elf_toc PARAMS ((bfd *)); -boolean ppc64_elf_size_stubs PARAMS ((bfd *, struct bfd_link_info *, int *)); -boolean ppc64_elf_build_stubs PARAMS ((bfd *, struct bfd_link_info *)); +boolean ppc64_elf_mark_entry_syms + PARAMS ((struct bfd_link_info *)); +bfd_vma ppc64_elf_toc + PARAMS ((bfd *)); +int ppc64_elf_setup_section_lists + PARAMS ((bfd *, struct bfd_link_info *)); +void ppc64_elf_next_input_section + PARAMS ((struct bfd_link_info *, asection *)); +boolean ppc64_elf_size_stubs + PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, + asection *(*) (const char *, asection *), void (*) (void))); +boolean ppc64_elf_build_stubs + PARAMS ((struct bfd_link_info *)); diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c index d04a1d3..def93c4 100644 --- a/contrib/binutils/bfd/elf64-sparc.c +++ b/contrib/binutils/bfd/elf64-sparc.c @@ -72,6 +72,9 @@ static void sparc64_elf_symbol_processing static boolean sparc64_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); +static boolean sparc64_elf_fake_sections + PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *)); + static const char *sparc64_elf_print_symbol_all PARAMS ((bfd *, PTR, asymbol *)); static boolean sparc64_elf_relax_section @@ -659,14 +662,14 @@ sparc64_elf_bfd_link_hash_table_create (abfd) struct sparc64_elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct sparc64_elf_link_hash_table); - ret = (struct sparc64_elf_link_hash_table *) bfd_zalloc (abfd, amt); + ret = (struct sparc64_elf_link_hash_table *) bfd_zmalloc (amt); if (ret == (struct sparc64_elf_link_hash_table *) NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, _bfd_elf_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -711,7 +714,7 @@ init_insn_reloc (abfd, return bfd_reloc_ok; } - /* This works because partial_inplace == false. */ + /* This works because partial_inplace is false. */ if (output_bfd != NULL) return bfd_reloc_continue; @@ -1386,7 +1389,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) return true; } else if (*namep && **namep - && info->hash->creator->flavour == bfd_target_elf_flavour) + && info->hash->creator == abfd->xvec) { int i; struct sparc64_elf_app_reg *p; @@ -2565,9 +2568,11 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; } + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections + because such sections are not SEC_ALLOC and thus ld.so will + not process them. */ if (unresolved_reloc - && !(info->shared - && (input_section->flags & SEC_DEBUGGING) != 0 + && !((input_section->flags & SEC_DEBUGGING) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) (*_bfd_error_handler) (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), @@ -2995,6 +3000,27 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd) } return true; } + +/* MARCO: Set the correct entry size for the .stab section. */ + +static boolean +sparc64_elf_fake_sections (abfd, hdr, sec) + bfd *abfd ATTRIBUTE_UNUSED; + Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED; + asection *sec; +{ + const char *name; + + name = bfd_get_section_name (abfd, sec); + + if (strcmp (name, ".stab") == 0) + { + /* Even in the 64bit case the stab entries are only 12 bytes long. */ + elf_section_data (sec)->this_hdr.sh_entsize = 12; + } + + return true; +} /* Print a STT_REGISTER symbol to file FILE. */ @@ -3067,6 +3093,7 @@ const struct elf_size_info sparc64_elf_size_info = bfd_elf64_write_out_phdrs, bfd_elf64_write_shdrs_and_ehdr, sparc64_elf_write_relocs, + bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out, sparc64_elf_slurp_reloc_table, bfd_elf64_slurp_symbol_table, @@ -3131,6 +3158,8 @@ const struct elf_size_info sparc64_elf_size_info = sparc64_elf_output_arch_syms #define bfd_elf64_bfd_merge_private_bfd_data \ sparc64_elf_merge_private_bfd_data +#define elf_backend_fake_sections \ + sparc64_elf_fake_sections #define elf_backend_size_info \ sparc64_elf_size_info diff --git a/contrib/binutils/bfd/elf64-x86-64.c b/contrib/binutils/bfd/elf64-x86-64.c index b980344..a7303d0 100644 --- a/contrib/binutils/bfd/elf64-x86-64.c +++ b/contrib/binutils/bfd/elf64-x86-64.c @@ -125,6 +125,10 @@ static reloc_howto_type *elf64_x86_64_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); static void elf64_x86_64_info_to_howto PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *)); +static boolean elf64_x86_64_grok_prstatus + PARAMS ((bfd *, Elf_Internal_Note *)); +static boolean elf64_x86_64_grok_psinfo + PARAMS ((bfd *, Elf_Internal_Note *)); static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create PARAMS ((bfd *)); static boolean elf64_x86_64_elf_object_p PARAMS ((bfd *abfd)); @@ -133,12 +137,13 @@ static boolean create_got_section static boolean elf64_x86_64_create_dynamic_sections PARAMS((bfd *, struct bfd_link_info *)); static void elf64_x86_64_copy_indirect_symbol - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); static boolean elf64_x86_64_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *sec, const Elf_Internal_Rela *)); static asection *elf64_x86_64_gc_mark_hook - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); static boolean elf64_x86_64_gc_sweep_hook @@ -208,6 +213,73 @@ elf64_x86_64_info_to_howto (abfd, cache_ptr, dst) BFD_ASSERT (r_type == cache_ptr->howto->type); } +/* Support for core dump NOTE sections. */ +static boolean +elf64_x86_64_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + size_t raw_size; + + switch (note->descsz) + { + default: + return false; + + case 336: /* sizeof(istruct elf_prstatus) on Linux/x86_64 */ + /* pr_cursig */ + elf_tdata (abfd)->core_signal + = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid + = bfd_get_32 (abfd, note->descdata + 32); + + /* pr_reg */ + offset = 112; + raw_size = 216; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +elf64_x86_64_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 136: /* sizeof(struct elf_prpsinfo) on Linux/x86_64 */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + /* Functions for the x86-64 ELF linker. */ /* The name of the dynamic interpreter. This is put in the .interp @@ -340,13 +412,13 @@ elf64_x86_64_link_hash_table_create (abfd) struct elf64_x86_64_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf64_x86_64_link_hash_table); - ret = (struct elf64_x86_64_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct elf64_x86_64_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -426,7 +498,8 @@ elf64_x86_64_create_dynamic_sections (dynobj, info) /* Copy the extra info we tack onto an elf_link_hash_entry. */ static void -elf64_x86_64_copy_indirect_symbol (dir, ind) +elf64_x86_64_copy_indirect_symbol (bed, dir, ind) + struct elf_backend_data *bed; struct elf_link_hash_entry *dir, *ind; { struct elf64_x86_64_link_hash_entry *edir, *eind; @@ -468,7 +541,7 @@ elf64_x86_64_copy_indirect_symbol (dir, ind) eind->dyn_relocs = NULL; } - _bfd_elf_link_hash_copy_indirect (dir, ind); + _bfd_elf_link_hash_copy_indirect (bed, dir, ind); } static boolean @@ -589,11 +662,28 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs) case R_X86_64_8: case R_X86_64_16: case R_X86_64_32: - case R_X86_64_64: case R_X86_64_32S: + /* Let's help debug shared library creation. These relocs + cannot be used in shared libs. Don't error out for + sections we don't care about, such as debug sections or + non-constant sections. */ + if (info->shared + && (sec->flags & SEC_ALLOC) != 0 + && (sec->flags & SEC_READONLY) != 0) + { + (*_bfd_error_handler) + (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"), + bfd_archive_filename (abfd), + x86_64_elf_howto_table[ELF64_R_TYPE (rel->r_info)].name); + bfd_set_error (bfd_error_bad_value); + return false; + } + /* Fall through. */ + case R_X86_64_PC8: case R_X86_64_PC16: case R_X86_64_PC32: + case R_X86_64_64: if (h != NULL && !info->shared) { /* If this reloc is in a read-only section, we might @@ -768,8 +858,8 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs) relocation. */ static asection * -elf64_x86_64_gc_mark_hook (abfd, info, rel, h, sym) - bfd *abfd; +elf64_x86_64_gc_mark_hook (sec, info, rel, h, sym) + asection *sec; struct bfd_link_info *info ATTRIBUTE_UNUSED; Elf_Internal_Rela *rel; struct elf_link_hash_entry *h; @@ -799,9 +889,7 @@ elf64_x86_64_gc_mark_hook (abfd, info, rel, h, sym) } } else - { - return bfd_section_from_elf_index (abfd, sym->st_shndx); - } + return bfd_section_from_elf_index (sec->owner, sym->st_shndx); return NULL; } @@ -1016,7 +1104,7 @@ elf64_x86_64_adjust_dynamic_symbol (info, h) /* We must generate a R_X86_64_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the - runtime process image. */ + runtime process image. */ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) { htab->srelbss->_raw_size += sizeof (Elf64_External_Rela); @@ -1790,9 +1878,44 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, else { /* This symbol is local, or marked to become local. */ - relocate = true; - outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); - outrel.r_addend = relocation + rel->r_addend; + if (r_type == R_X86_64_64) + { + relocate = true; + outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; + } + else + { + long sindx; + + if (h == NULL) + sec = local_sections[r_symndx]; + else + { + BFD_ASSERT (h->root.type == bfd_link_hash_defined + || (h->root.type + == bfd_link_hash_defweak)); + sec = h->root.u.def.section; + } + if (sec != NULL && bfd_is_abs_section (sec)) + sindx = 0; + else if (sec == NULL || sec->owner == NULL) + { + bfd_set_error (bfd_error_bad_value); + return false; + } + else + { + asection *osec; + + osec = sec->output_section; + sindx = elf_section_data (osec)->dynindx; + BFD_ASSERT (sindx > 0); + } + + outrel.r_info = ELF64_R_INFO (sindx, r_type); + outrel.r_addend = relocation + rel->r_addend; + } } sreloc = elf_section_data (input_section)->sreloc; @@ -1817,14 +1940,11 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, break; } - /* FIXME: Why do we allow debugging sections to escape this error? - More importantly, why do we not emit dynamic relocs for - R_386_32 above in debugging sections (which are ! SEC_ALLOC)? - If we had emitted the dynamic reloc, we could remove the - fudge here. */ + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections + because such sections are not SEC_ALLOC and thus ld.so will + not process them. */ if (unresolved_reloc - && !(info->shared - && (input_section->flags & SEC_DEBUGGING) != 0 + && !((input_section->flags & SEC_DEBUGGING) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) (*_bfd_error_handler) (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), @@ -2228,6 +2348,8 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info) #define elf_backend_finish_dynamic_symbol elf64_x86_64_finish_dynamic_symbol #define elf_backend_gc_mark_hook elf64_x86_64_gc_mark_hook #define elf_backend_gc_sweep_hook elf64_x86_64_gc_sweep_hook +#define elf_backend_grok_prstatus elf64_x86_64_grok_prstatus +#define elf_backend_grok_psinfo elf64_x86_64_grok_psinfo #define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class #define elf_backend_relocate_section elf64_x86_64_relocate_section #define elf_backend_size_dynamic_sections elf64_x86_64_size_dynamic_sections diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c index 25c4d89..c8e3fe6 100644 --- a/contrib/binutils/bfd/elfarm-oabi.c +++ b/contrib/binutils/bfd/elfarm-oabi.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM old abi option. - Copyright 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -18,6 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define OLD_ARM_ABI +#define bfd_elf32_arm_allocate_interworking_sections \ + bfd_elf32_arm_oabi_allocate_interworking_sections +#define bfd_elf32_arm_get_bfd_for_interworking \ + bfd_elf32_arm_oabi_get_bfd_for_interworking +#define bfd_elf32_arm_process_before_allocation \ + bfd_elf32_arm_oabi_process_before_allocation +#define bfd_elf32_arm_add_glue_sections_to_bfd \ + bfd_elf32_arm_oabi_add_glue_sections_to_bfd #include "elf/arm.h" #include "bfd.h" @@ -417,11 +425,4 @@ elf32_arm_reloc_type_lookup (abfd, code) return NULL; } -#define bfd_elf32_arm_allocate_interworking_sections \ - bfd_elf32_arm_oabi_allocate_interworking_sections -#define bfd_elf32_arm_get_bfd_for_interworking \ - bfd_elf32_arm_oabi_get_bfd_for_interworking -#define bfd_elf32_arm_process_before_allocation \ - bfd_elf32_arm_oabi_process_before_allocation - #include "elf32-arm.h" diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h index 203323c..4f54cd3 100644 --- a/contrib/binutils/bfd/elfcode.h +++ b/contrib/binutils/bfd/elfcode.h @@ -1,6 +1,6 @@ /* ELF executable support for BFD. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001 Free Software Foundation, Inc. + 2001, 2002 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -203,12 +203,14 @@ static char *elf_symbol_flags PARAMS ((flagword)); format. */ void -elf_swap_symbol_in (abfd, src, shndx, dst) +elf_swap_symbol_in (abfd, psrc, pshn, dst) bfd *abfd; - const Elf_External_Sym *src; - const Elf_External_Sym_Shndx *shndx; + const PTR psrc; + const PTR pshn; Elf_Internal_Sym *dst; { + const Elf_External_Sym *src = (const Elf_External_Sym *) psrc; + const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn; int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; dst->st_name = H_GET_32 (abfd, src->st_name); @@ -557,9 +559,9 @@ elf_object_p (abfd) section header table (FIXME: See comments re sections at top of this file). */ - if ((elf_file_p (&x_ehdr) == false) || - (x_ehdr.e_ident[EI_VERSION] != EV_CURRENT) || - (x_ehdr.e_ident[EI_CLASS] != ELFCLASS)) + if (! elf_file_p (&x_ehdr) + || x_ehdr.e_ident[EI_VERSION] != EV_CURRENT + || x_ehdr.e_ident[EI_CLASS] != ELFCLASS) goto got_wrong_format_error; /* Check that file's byte order matches xvec's */ @@ -622,6 +624,10 @@ elf_object_p (abfd) if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0) goto got_wrong_format_error; + /* Further sanity check. */ + if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0) + goto got_wrong_format_error; + ebd = get_elf_backend_data (abfd); /* Check that the ELF e_machine field matches what this particular @@ -675,25 +681,28 @@ elf_object_p (abfd) /* Remember the entry point specified in the ELF file header. */ bfd_set_start_address (abfd, i_ehdrp->e_entry); - /* Seek to the section header table in the file. */ - if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0) - goto got_no_match; + if (i_ehdrp->e_shoff != 0) + { + /* Seek to the section header table in the file. */ + if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0) + goto got_no_match; - /* Read the first section header at index 0, and convert to internal - form. */ - if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd) - != sizeof (x_shdr)) - goto got_no_match; - elf_swap_shdr_in (abfd, &x_shdr, &i_shdr); + /* Read the first section header at index 0, and convert to internal + form. */ + if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd) + != sizeof (x_shdr)) + goto got_no_match; + elf_swap_shdr_in (abfd, &x_shdr, &i_shdr); - /* If the section count is zero, the actual count is in the first - section header. */ - if (i_ehdrp->e_shnum == SHN_UNDEF) - i_ehdrp->e_shnum = i_shdr.sh_size; + /* If the section count is zero, the actual count is in the first + section header. */ + if (i_ehdrp->e_shnum == SHN_UNDEF) + i_ehdrp->e_shnum = i_shdr.sh_size; - /* And similarly for the string table index. */ - if (i_ehdrp->e_shstrndx == SHN_XINDEX) - i_ehdrp->e_shstrndx = i_shdr.sh_link; + /* And similarly for the string table index. */ + if (i_ehdrp->e_shstrndx == SHN_XINDEX) + i_ehdrp->e_shstrndx = i_shdr.sh_link; + } /* Allocate space for a copy of the section header table in internal form. */ @@ -749,7 +758,7 @@ elf_object_p (abfd) } } - if (i_ehdrp->e_shstrndx) + if (i_ehdrp->e_shstrndx && i_ehdrp->e_shoff) { if (! bfd_section_from_shdr (abfd, i_ehdrp->e_shstrndx)) goto got_no_match; @@ -787,7 +796,7 @@ elf_object_p (abfd) bfd_section_from_shdr with it (since this particular strtab is used to find all of the ELF section names.) */ - if (i_ehdrp->e_shstrndx != 0) + if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff) { unsigned int num_sec; @@ -812,7 +821,7 @@ elf_object_p (abfd) information. */ if (ebd->elf_backend_object_p) { - if ((*ebd->elf_backend_object_p) (abfd) == false) + if (! (*ebd->elf_backend_object_p) (abfd)) goto got_wrong_format_error; } @@ -1124,10 +1133,12 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) unsigned long symcount; /* Number of external ELF symbols */ elf_symbol_type *sym; /* Pointer to current bfd symbol */ elf_symbol_type *symbase; /* Buffer for generated bfd symbols */ - Elf_Internal_Sym i_sym; - Elf_External_Sym *x_symp = NULL; - Elf_External_Sym_Shndx *x_shndx = NULL; - Elf_External_Versym *x_versymp = NULL; + Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; + Elf_Internal_Sym *isymbuf = NULL; + Elf_External_Versym *xver; + Elf_External_Versym *xverbuf = NULL; + struct elf_backend_data *ebd; bfd_size_type amt; /* Read each raw ELF symbol, converting from external ELF form to @@ -1142,24 +1153,8 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) if (! dynamic) { - Elf_Internal_Shdr *shndx_hdr; - hdr = &elf_tdata (abfd)->symtab_hdr; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; verhdr = NULL; - - /* If we have a SHT_SYMTAB_SHNDX section for the symbol table, - read the raw contents. */ - if (elf_elfsections (abfd) != NULL - && elf_elfsections (abfd)[shndx_hdr->sh_link] == hdr) - { - amt = shndx_hdr->sh_size; - x_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (x_shndx == NULL - || bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread ((PTR) x_shndx, amt, abfd) != amt) - goto error_return; - } } else { @@ -1178,39 +1173,24 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) } } - if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) - goto error_return; - + ebd = get_elf_backend_data (abfd); symcount = hdr->sh_size / sizeof (Elf_External_Sym); - if (symcount == 0) sym = symbase = NULL; else { - unsigned long i; - - if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) - goto error_return; + isymbuf = bfd_elf_get_elf_syms (abfd, hdr, symcount, 0, + NULL, NULL, NULL); + if (isymbuf == NULL) + return -1; amt = symcount; amt *= sizeof (elf_symbol_type); symbase = (elf_symbol_type *) bfd_zalloc (abfd, amt); if (symbase == (elf_symbol_type *) NULL) goto error_return; - sym = symbase; - - /* Temporarily allocate room for the raw ELF symbols. */ - amt = symcount; - amt *= sizeof (Elf_External_Sym); - x_symp = (Elf_External_Sym *) bfd_malloc (amt); - if (x_symp == NULL) - goto error_return; - - if (bfd_bread ((PTR) x_symp, amt, abfd) != amt) - goto error_return; /* Read the raw ELF version symbol information. */ - if (verhdr != NULL && verhdr->sh_size / sizeof (Elf_External_Versym) != symcount) { @@ -1230,41 +1210,40 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) if (bfd_seek (abfd, verhdr->sh_offset, SEEK_SET) != 0) goto error_return; - x_versymp = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size); - if (x_versymp == NULL && verhdr->sh_size != 0) + xverbuf = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size); + if (xverbuf == NULL && verhdr->sh_size != 0) goto error_return; - if (bfd_bread ((PTR) x_versymp, verhdr->sh_size, abfd) + if (bfd_bread ((PTR) xverbuf, verhdr->sh_size, abfd) != verhdr->sh_size) goto error_return; } /* Skip first symbol, which is a null dummy. */ - for (i = 1; i < symcount; i++) + xver = xverbuf; + if (xver != NULL) + ++xver; + isymend = isymbuf + symcount; + for (isym = isymbuf + 1, sym = symbase; isym < isymend; isym++, sym++) { - elf_swap_symbol_in (abfd, x_symp + i, - x_shndx + (x_shndx != NULL ? i : 0), &i_sym); - memcpy (&sym->internal_elf_sym, &i_sym, sizeof (Elf_Internal_Sym)); -#ifdef ELF_KEEP_EXTSYM - memcpy (&sym->native_elf_sym, x_symp + i, sizeof (Elf_External_Sym)); -#endif + memcpy (&sym->internal_elf_sym, isym, sizeof (Elf_Internal_Sym)); sym->symbol.the_bfd = abfd; sym->symbol.name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, - i_sym.st_name); + isym->st_name); - sym->symbol.value = i_sym.st_value; + sym->symbol.value = isym->st_value; - if (i_sym.st_shndx == SHN_UNDEF) + if (isym->st_shndx == SHN_UNDEF) { sym->symbol.section = bfd_und_section_ptr; } - else if (i_sym.st_shndx < SHN_LORESERVE - || i_sym.st_shndx > SHN_HIRESERVE) + else if (isym->st_shndx < SHN_LORESERVE + || isym->st_shndx > SHN_HIRESERVE) { sym->symbol.section = section_from_elf_index (abfd, - i_sym.st_shndx); + isym->st_shndx); if (sym->symbol.section == NULL) { /* This symbol is in a section for which we did not @@ -1273,18 +1252,18 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) sym->symbol.section = bfd_abs_section_ptr; } } - else if (i_sym.st_shndx == SHN_ABS) + else if (isym->st_shndx == SHN_ABS) { sym->symbol.section = bfd_abs_section_ptr; } - else if (i_sym.st_shndx == SHN_COMMON) + else if (isym->st_shndx == SHN_COMMON) { sym->symbol.section = bfd_com_section_ptr; /* Elf puts the alignment into the `value' field, and the size into the `size' field. BFD wants to see the size in the value field, and doesn't care (at the moment) about the alignment. */ - sym->symbol.value = i_sym.st_size; + sym->symbol.value = isym->st_size; } else sym->symbol.section = bfd_abs_section_ptr; @@ -1294,14 +1273,13 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) sym->symbol.value -= sym->symbol.section->vma; - switch (ELF_ST_BIND (i_sym.st_info)) + switch (ELF_ST_BIND (isym->st_info)) { case STB_LOCAL: sym->symbol.flags |= BSF_LOCAL; break; case STB_GLOBAL: - if (i_sym.st_shndx != SHN_UNDEF - && i_sym.st_shndx != SHN_COMMON) + if (isym->st_shndx != SHN_UNDEF && isym->st_shndx != SHN_COMMON) sym->symbol.flags |= BSF_GLOBAL; break; case STB_WEAK: @@ -1309,7 +1287,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) break; } - switch (ELF_ST_TYPE (i_sym.st_info)) + switch (ELF_ST_TYPE (isym->st_info)) { case STT_SECTION: sym->symbol.flags |= BSF_SECTION_SYM | BSF_DEBUGGING; @@ -1328,31 +1306,24 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) if (dynamic) sym->symbol.flags |= BSF_DYNAMIC; - if (x_versymp != NULL) + if (xver != NULL) { Elf_Internal_Versym iversym; - _bfd_elf_swap_versym_in (abfd, x_versymp + i, &iversym); + _bfd_elf_swap_versym_in (abfd, xver, &iversym); sym->version = iversym.vs_vers; + xver++; } /* Do some backend-specific processing on this symbol. */ - { - struct elf_backend_data *ebd = get_elf_backend_data (abfd); - if (ebd->elf_backend_symbol_processing) - (*ebd->elf_backend_symbol_processing) (abfd, &sym->symbol); - } - - sym++; + if (ebd->elf_backend_symbol_processing) + (*ebd->elf_backend_symbol_processing) (abfd, &sym->symbol); } } /* Do some backend-specific processing on this symbol table. */ - { - struct elf_backend_data *ebd = get_elf_backend_data (abfd); - if (ebd->elf_backend_symbol_table_processing) - (*ebd->elf_backend_symbol_table_processing) (abfd, symbase, symcount); - } + if (ebd->elf_backend_symbol_table_processing) + (*ebd->elf_backend_symbol_table_processing) (abfd, symbase, symcount); /* We rely on the zalloc to clear out the final symbol entry. */ @@ -1372,21 +1343,17 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) *symptrs = 0; /* Final null pointer */ } - if (x_shndx != NULL) - free (x_shndx); - if (x_versymp != NULL) - free (x_versymp); - if (x_symp != NULL) - free (x_symp); + if (xverbuf != NULL) + free (xverbuf); + if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf) + free (isymbuf); return symcount; error_return: - if (x_shndx != NULL) - free (x_shndx); - if (x_versymp != NULL) - free (x_versymp); - if (x_symp != NULL) - free (x_symp); + if (xverbuf != NULL) + free (xverbuf); + if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf) + free (isymbuf); return -1; } @@ -1410,6 +1377,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, arelent *relent; unsigned int i; int entsize; + unsigned int symcount; allocated = (PTR) bfd_malloc (rel_hdr->sh_size); if (allocated == NULL) @@ -1426,6 +1394,11 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, BFD_ASSERT (entsize == sizeof (Elf_External_Rel) || entsize == sizeof (Elf_External_Rela)); + if (dynamic) + symcount = bfd_get_dynamic_symcount (abfd); + else + symcount = bfd_get_symcount (abfd); + for (i = 0, relent = relents; i < reloc_count; i++, relent++, native_relocs += entsize) @@ -1454,6 +1427,13 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, if (ELF_R_SYM (rela.r_info) == 0) relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; + else if (ELF_R_SYM (rela.r_info) > symcount) + { + (*_bfd_error_handler) + (_("%s(%s): relocation %d has invalid symbol index %ld"), + abfd->filename, asect->name, i, ELF_R_SYM (rela.r_info)); + relent->sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr; + } else { asymbol **ps, *s; @@ -1695,6 +1675,7 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = { elf_write_out_phdrs, elf_write_shdrs_and_ehdr, elf_write_relocs, + elf_swap_symbol_in, elf_swap_symbol_out, elf_slurp_reloc_table, elf_slurp_symbol_table, diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h index c206af5..7db5f72 100644 --- a/contrib/binutils/bfd/elfcore.h +++ b/contrib/binutils/bfd/elfcore.h @@ -1,5 +1,5 @@ /* ELF core file support for BFD. - Copyright 1995, 1996, 1997, 1998, 2000, 2001 + Copyright 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -100,7 +100,7 @@ elf_core_file_p (abfd) } /* Check the magic number. */ - if (elf_file_p (&x_ehdr) == false) + if (! elf_file_p (&x_ehdr)) goto wrong; /* FIXME: Check EI_VERSION here ! */ @@ -244,7 +244,7 @@ elf_core_file_p (abfd) information. */ if (ebd->elf_backend_object_p) { - if ((*ebd->elf_backend_object_p) (abfd) == false) + if (! (*ebd->elf_backend_object_p) (abfd)) goto wrong; } diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c index e74fae9..f8cc645 100644 --- a/contrib/binutils/bfd/elflink.c +++ b/contrib/binutils/bfd/elflink.c @@ -278,11 +278,13 @@ _bfd_elf_link_record_dynamic_symbol (info, h) } else { - alc = bfd_malloc ((bfd_size_type) (p - name + 1)); + size_t len = p - name + 1; + + alc = bfd_malloc ((bfd_size_type) len); if (alc == NULL) return false; - strncpy (alc, name, (size_t) (p - name)); - alc[p - name] = '\0'; + memcpy (alc, name, len - 1); + alc[len - 1] = '\0'; name = alc; copy = true; } @@ -300,6 +302,98 @@ _bfd_elf_link_record_dynamic_symbol (info, h) return true; } +/* Record a new local dynamic symbol. Returns 0 on failure, 1 on + success, and 2 on a failure caused by attempting to record a symbol + in a discarded section, eg. a discarded link-once section symbol. */ + +int +elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx) + struct bfd_link_info *info; + bfd *input_bfd; + long input_indx; +{ + bfd_size_type amt; + struct elf_link_local_dynamic_entry *entry; + struct elf_link_hash_table *eht; + struct elf_strtab_hash *dynstr; + unsigned long dynstr_index; + char *name; + Elf_External_Sym_Shndx eshndx; + char esym[sizeof (Elf64_External_Sym)]; + + if (! is_elf_hash_table (info)) + return 0; + + /* See if the entry exists already. */ + for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next) + if (entry->input_bfd == input_bfd && entry->input_indx == input_indx) + return 1; + + amt = sizeof (*entry); + entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt); + if (entry == NULL) + return 0; + + /* Go find the symbol, so that we can find it's name. */ + if (!bfd_elf_get_elf_syms (input_bfd, &elf_tdata (input_bfd)->symtab_hdr, + (size_t) 1, (size_t) input_indx, + &entry->isym, esym, &eshndx)) + { + bfd_release (input_bfd, entry); + return 0; + } + + if (entry->isym.st_shndx != SHN_UNDEF + && (entry->isym.st_shndx < SHN_LORESERVE + || entry->isym.st_shndx > SHN_HIRESERVE)) + { + asection *s; + + s = bfd_section_from_elf_index (input_bfd, entry->isym.st_shndx); + if (s == NULL || bfd_is_abs_section (s->output_section)) + { + /* We can still bfd_release here as nothing has done another + bfd_alloc. We can't do this later in this function. */ + bfd_release (input_bfd, entry); + return 2; + } + } + + name = (bfd_elf_string_from_elf_section + (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link, + entry->isym.st_name)); + + dynstr = elf_hash_table (info)->dynstr; + if (dynstr == NULL) + { + /* Create a strtab to hold the dynamic symbol names. */ + elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init (); + if (dynstr == NULL) + return 0; + } + + dynstr_index = _bfd_elf_strtab_add (dynstr, name, false); + if (dynstr_index == (unsigned long) -1) + return 0; + entry->isym.st_name = dynstr_index; + + eht = elf_hash_table (info); + + entry->next = eht->dynlocal; + eht->dynlocal = entry; + entry->input_bfd = input_bfd; + entry->input_indx = input_indx; + eht->dynsymcount++; + + /* Whatever binding the symbol had before, it's now local. */ + entry->isym.st_info + = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info)); + + /* The dynindx will be set at the end of size_dynamic_sections. */ + + return 1; +} + /* Return the dynindex of a local dynamic symbol. */ long @@ -355,7 +449,8 @@ _bfd_elf_link_renumber_dynsyms (output_bfd, info) { asection *p; for (p = output_bfd->sections; p ; p = p->next) - elf_section_data (p)->dynindx = ++dynsymcount; + if ((p->flags & SEC_EXCLUDE) == 0) + elf_section_data (p)->dynindx = ++dynsymcount; } if (elf_hash_table (info)->dynlocal) diff --git a/contrib/binutils/bfd/elflink.h b/contrib/binutils/bfd/elflink.h index bfe6374..25519b1 100644 --- a/contrib/binutils/bfd/elflink.h +++ b/contrib/binutils/bfd/elflink.h @@ -65,7 +65,7 @@ static boolean elf_link_read_relocs_from_section PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *)); static size_t compute_bucket_count PARAMS ((struct bfd_link_info *)); -static void elf_link_output_relocs +static boolean elf_link_output_relocs PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *)); static boolean elf_link_size_reloc_section PARAMS ((bfd *, Elf_Internal_Shdr *, asection *)); @@ -149,18 +149,13 @@ elf_link_is_defined_archive_symbol (abfd, symdef) carsym * symdef; { Elf_Internal_Shdr * hdr; - Elf_Internal_Shdr * shndx_hdr; - Elf_External_Sym * esym; - Elf_External_Sym * esymend; - Elf_External_Sym * buf = NULL; - Elf_External_Sym_Shndx * shndx_buf = NULL; - Elf_External_Sym_Shndx * shndx; bfd_size_type symcount; bfd_size_type extsymcount; bfd_size_type extsymoff; - boolean result = false; - file_ptr pos; - bfd_size_type amt; + Elf_Internal_Sym *isymbuf; + Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; + boolean result; abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset); if (abfd == (bfd *) NULL) @@ -178,15 +173,9 @@ elf_link_is_defined_archive_symbol (abfd, symdef) /* Select the appropriate symbol table. */ if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) - { - hdr = &elf_tdata (abfd)->symtab_hdr; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - } + hdr = &elf_tdata (abfd)->symtab_hdr; else - { - hdr = &elf_tdata (abfd)->dynsymtab_hdr; - shndx_hdr = NULL; - } + hdr = &elf_tdata (abfd)->dynsymtab_hdr; symcount = hdr->sh_size / sizeof (Elf_External_Sym); @@ -203,58 +192,34 @@ elf_link_is_defined_archive_symbol (abfd, symdef) extsymoff = hdr->sh_info; } - amt = extsymcount * sizeof (Elf_External_Sym); - buf = (Elf_External_Sym *) bfd_malloc (amt); - if (buf == NULL && extsymcount != 0) + if (extsymcount == 0) return false; - /* Read in the symbol table. - FIXME: This ought to be cached somewhere. */ - pos = hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym); - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) buf, amt, abfd) != amt) - goto error_exit; - - if (shndx_hdr != NULL && shndx_hdr->sh_size != 0) - { - amt = extsymcount * sizeof (Elf_External_Sym_Shndx); - shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (shndx_buf == NULL && extsymcount != 0) - goto error_exit; - - pos = shndx_hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym_Shndx); - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt) - goto error_exit; - } + /* Read in the symbol table. */ + isymbuf = bfd_elf_get_elf_syms (abfd, hdr, extsymcount, extsymoff, + NULL, NULL, NULL); + if (isymbuf == NULL) + return false; /* Scan the symbol table looking for SYMDEF. */ - esymend = buf + extsymcount; - for (esym = buf, shndx = shndx_buf; - esym < esymend; - esym++, shndx = (shndx != NULL ? shndx + 1 : NULL)) + result = false; + for (isym = isymbuf, isymend = isymbuf + extsymcount; isym < isymend; isym++) { - Elf_Internal_Sym sym; - const char * name; - - elf_swap_symbol_in (abfd, esym, shndx, &sym); + const char *name; - name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name); + name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, + isym->st_name); if (name == (const char *) NULL) break; if (strcmp (name, symdef->name) == 0) { - result = is_global_data_symbol_definition (abfd, & sym); + result = is_global_data_symbol_definition (abfd, isym); break; } } - error_exit: - if (shndx_buf != NULL) - free (shndx_buf); - if (buf != NULL) - free (buf); + free (isymbuf); return result; } @@ -313,12 +278,10 @@ elf_link_add_archive_symbols (abfd, info) return true; amt = c; amt *= sizeof (boolean); - defined = (boolean *) bfd_malloc (amt); - included = (boolean *) bfd_malloc (amt); + defined = (boolean *) bfd_zmalloc (amt); + included = (boolean *) bfd_zmalloc (amt); if (defined == (boolean *) NULL || included == (boolean *) NULL) goto error_return; - memset (defined, 0, (size_t) amt); - memset (included, 0, (size_t) amt); symdefs = bfd_ardata (abfd)->symdefs; @@ -355,26 +318,40 @@ elf_link_add_archive_symbols (abfd, info) if (h == NULL) { char *p, *copy; + size_t len, first; /* If this is a default version (the name contains @@), - look up the symbol again without the version. The - effect is that references to the symbol without the - version will be matched by the default symbol in the - archive. */ + look up the symbol again with only one `@' as well + as without the version. The effect is that references + to the symbol with and without the version will be + matched by the default symbol in the archive. */ p = strchr (symdef->name, ELF_VER_CHR); if (p == NULL || p[1] != ELF_VER_CHR) continue; - copy = bfd_alloc (abfd, (bfd_size_type) (p - symdef->name + 1)); + /* First check with only one `@'. */ + len = strlen (symdef->name); + copy = bfd_alloc (abfd, (bfd_size_type) len); if (copy == NULL) goto error_return; - memcpy (copy, symdef->name, (size_t) (p - symdef->name)); - copy[p - symdef->name] = '\0'; + first = p - symdef->name + 1; + memcpy (copy, symdef->name, first); + memcpy (copy + first, symdef->name + first + 1, len - first); h = elf_link_hash_lookup (elf_hash_table (info), copy, false, false, false); + if (h == NULL) + { + /* We also need to check references to the symbol + without the version. */ + + copy[first - 1] = '\0'; + h = elf_link_hash_lookup (elf_hash_table (info), + copy, false, false, false); + } + bfd_release (abfd, copy); } @@ -922,19 +899,19 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, /* This function is called to create an indirect symbol from the default for the symbol with the default version if needed. The - symbol is described by H, NAME, SYM, SEC, VALUE, and OVERRIDE. We + symbol is described by H, NAME, SYM, PSEC, VALUE, and OVERRIDE. We set DYNSYM if the new indirect symbol is dynamic. DT_NEEDED indicates if it comes from a DT_NEEDED entry of a shared object. */ static boolean -elf_add_default_symbol (abfd, info, h, name, sym, sec, value, +elf_add_default_symbol (abfd, info, h, name, sym, psec, value, dynsym, override, dt_needed) bfd *abfd; struct bfd_link_info *info; struct elf_link_hash_entry *h; const char *name; Elf_Internal_Sym *sym; - asection **sec; + asection **psec; bfd_vma *value; boolean *dynsym; boolean override; @@ -948,6 +925,8 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, boolean collect; boolean dynamic; char *p; + size_t len, shortlen; + asection *sec; /* If this symbol has a version, and it is the default version, we create an indirect symbol from the default name to the fully @@ -960,7 +939,7 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, if (override) { /* We are overridden by an old defition. We need to check if we - need to crreate the indirect symbol from the default name. */ + need to create the indirect symbol from the default name. */ hi = elf_link_hash_lookup (elf_hash_table (info), name, true, false, false); BFD_ASSERT (hi != NULL); @@ -979,12 +958,12 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, collect = bed->collect; dynamic = (abfd->flags & DYNAMIC) != 0; - shortname = bfd_hash_allocate (&info->hash->table, - (size_t) (p - name + 1)); + shortlen = p - name; + shortname = bfd_hash_allocate (&info->hash->table, shortlen + 1); if (shortname == NULL) return false; - strncpy (shortname, name, (size_t) (p - name)); - shortname [p - name] = '\0'; + memcpy (shortname, name, shortlen); + shortname[shortlen] = '\0'; /* We are going to create a new symbol. Merge it with any existing symbol with this name. For the purposes of the merge, act as @@ -992,7 +971,8 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, actually going to define an indirect symbol. */ type_change_ok = false; size_change_ok = false; - if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value, + sec = *psec; + if (! elf_merge_symbol (abfd, info, shortname, sym, &sec, value, &hi, &override, &type_change_ok, &size_change_ok, dt_needed)) return false; @@ -1064,7 +1044,7 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, | ELF_LINK_HASH_DEF_REGULAR)) == 0); ht = (struct elf_link_hash_entry *) hi->root.u.i.link; - (*bed->elf_backend_copy_indirect_symbol) (ht, hi); + (*bed->elf_backend_copy_indirect_symbol) (bed, ht, hi); /* See if the new flags lead us to realize that the symbol must be dynamic. */ @@ -1089,16 +1069,18 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, /* We also need to define an indirection from the nondefault version of the symbol. */ - shortname = bfd_hash_allocate (&info->hash->table, strlen (name)); + len = strlen (name); + shortname = bfd_hash_allocate (&info->hash->table, len); if (shortname == NULL) return false; - strncpy (shortname, name, (size_t) (p - name)); - strcpy (shortname + (p - name), p + 1); + memcpy (shortname, name, shortlen); + memcpy (shortname + shortlen, p + 1, len - shortlen); /* Once again, merge with any existing symbol. */ type_change_ok = false; size_change_ok = false; - if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value, + sec = *psec; + if (! elf_merge_symbol (abfd, info, shortname, sym, &sec, value, &hi, &override, &type_change_ok, &size_change_ok, dt_needed)) return false; @@ -1106,10 +1088,13 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, if (override) { /* Here SHORTNAME is a versioned name, so we don't expect to see - the type of override we do in the case above. */ - (*_bfd_error_handler) - (_("%s: warning: unexpected redefinition of `%s'"), - bfd_archive_filename (abfd), shortname); + the type of override we do in the case above unless it is + overridden by a versioned definiton. */ + if (hi->root.type != bfd_link_hash_defined + && hi->root.type != bfd_link_hash_defweak) + (*_bfd_error_handler) + (_("%s: warning: unexpected redefinition of indirect versioned symbol `%s'"), + bfd_archive_filename (abfd), shortname); } else { @@ -1131,7 +1116,7 @@ elf_add_default_symbol (abfd, info, h, name, sym, sec, value, & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_DEF_REGULAR)) == 0); - (*bed->elf_backend_copy_indirect_symbol) (h, hi); + (*bed->elf_backend_copy_indirect_symbol) (bed, h, hi); /* See if the new flags lead us to realize that the symbol must be dynamic. */ @@ -1172,25 +1157,20 @@ elf_link_add_object_symbols (abfd, info) asection *, const Elf_Internal_Rela *)); boolean collect; Elf_Internal_Shdr *hdr; - Elf_Internal_Shdr *shndx_hdr; bfd_size_type symcount; bfd_size_type extsymcount; bfd_size_type extsymoff; - Elf_External_Sym *buf = NULL; - Elf_External_Sym_Shndx *shndx_buf = NULL; - Elf_External_Sym_Shndx *shndx; struct elf_link_hash_entry **sym_hash; boolean dynamic; Elf_External_Versym *extversym = NULL; Elf_External_Versym *ever; - Elf_External_Dyn *dynbuf = NULL; struct elf_link_hash_entry *weaks; - Elf_External_Sym *esym; - Elf_External_Sym *esymend; + Elf_Internal_Sym *isymbuf = NULL; + Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; struct elf_backend_data *bed; boolean dt_needed; struct elf_link_hash_table * hash_table; - file_ptr pos; bfd_size_type amt; hash_table = elf_hash_table (info); @@ -1289,85 +1269,7 @@ elf_link_add_object_symbols (abfd, info) } } - /* If this is a dynamic object, we always link against the .dynsym - symbol table, not the .symtab symbol table. The dynamic linker - will only see the .dynsym symbol table, so there is no reason to - look at .symtab for a dynamic object. */ - - if (! dynamic || elf_dynsymtab (abfd) == 0) - { - hdr = &elf_tdata (abfd)->symtab_hdr; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - } - else - { - hdr = &elf_tdata (abfd)->dynsymtab_hdr; - shndx_hdr = NULL; - } - - if (dynamic) - { - /* Read in any version definitions. */ - - if (! _bfd_elf_slurp_version_tables (abfd)) - goto error_return; - - /* Read in the symbol versions, but don't bother to convert them - to internal format. */ - if (elf_dynversym (abfd) != 0) - { - Elf_Internal_Shdr *versymhdr; - - versymhdr = &elf_tdata (abfd)->dynversym_hdr; - extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); - if (extversym == NULL) - goto error_return; - amt = versymhdr->sh_size; - if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0 - || bfd_bread ((PTR) extversym, amt, abfd) != amt) - goto error_return; - } - } - - symcount = hdr->sh_size / sizeof (Elf_External_Sym); - - /* The sh_info field of the symtab header tells us where the - external symbols start. We don't care about the local symbols at - this point. */ - if (elf_bad_symtab (abfd)) - { - extsymcount = symcount; - extsymoff = 0; - } - else - { - extsymcount = symcount - hdr->sh_info; - extsymoff = hdr->sh_info; - } - - amt = extsymcount * sizeof (Elf_External_Sym); - buf = (Elf_External_Sym *) bfd_malloc (amt); - if (buf == NULL && extsymcount != 0) - goto error_return; - - if (shndx_hdr != NULL && shndx_hdr->sh_size != 0) - { - amt = extsymcount * sizeof (Elf_External_Sym_Shndx); - shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (shndx_buf == NULL && extsymcount != 0) - goto error_return; - } - - /* We store a pointer to the hash table entry for each external - symbol. */ - amt = extsymcount * sizeof (struct elf_link_hash_entry *); - sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt); - if (sym_hash == NULL) - goto error_return; - elf_sym_hashes (abfd) = sym_hash; - dt_needed = false; - if (! dynamic) { /* If we are creating a shared library, create all the dynamic @@ -1417,6 +1319,7 @@ elf_link_add_object_symbols (abfd, info) s = bfd_get_section_by_name (abfd, ".dynamic"); if (s != NULL) { + Elf_External_Dyn *dynbuf = NULL; Elf_External_Dyn *extdyn; Elf_External_Dyn *extdynend; int elfsec; @@ -1430,30 +1333,13 @@ elf_link_add_object_symbols (abfd, info) if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf, (file_ptr) 0, s->_raw_size)) - goto error_return; + goto error_free_dyn; elfsec = _bfd_elf_section_from_bfd_section (abfd, s); if (elfsec == -1) - goto error_return; + goto error_free_dyn; shlink = elf_elfsections (abfd)[elfsec]->sh_link; - { - /* The shared libraries distributed with hpux11 have a bogus - sh_link field for the ".dynamic" section. This code detects - when SHLINK refers to a section that is not a string table - and tries to find the string table for the ".dynsym" section - instead. */ - Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[shlink]; - if (shdr->sh_type != SHT_STRTAB) - { - asection *ds = bfd_get_section_by_name (abfd, ".dynsym"); - int elfdsec = _bfd_elf_section_from_bfd_section (abfd, ds); - if (elfdsec == -1) - goto error_return; - shlink = elf_elfsections (abfd)[elfdsec]->sh_link; - } - } - extdyn = dynbuf; extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn); rpath = 0; @@ -1468,7 +1354,7 @@ elf_link_add_object_symbols (abfd, info) unsigned int tagv = dyn.d_un.d_val; name = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (name == NULL) - goto error_return; + goto error_free_dyn; } if (dyn.d_tag == DT_NEEDED) { @@ -1480,11 +1366,12 @@ elf_link_add_object_symbols (abfd, info) n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) - goto error_return; - anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1); + goto error_free_dyn; + amt = strlen (fnm) + 1; + anm = bfd_alloc (abfd, amt); if (anm == NULL) - goto error_return; - strcpy (anm, fnm); + goto error_free_dyn; + memcpy (anm, fnm, (size_t) amt); n->name = anm; n->by = abfd; n->next = NULL; @@ -1511,11 +1398,12 @@ elf_link_add_object_symbols (abfd, info) n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) - goto error_return; - anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1); + goto error_free_dyn; + amt = strlen (fnm) + 1; + anm = bfd_alloc (abfd, amt); if (anm == NULL) - goto error_return; - strcpy (anm, fnm); + goto error_free_dyn; + memcpy (anm, fnm, (size_t) amt); n->name = anm; n->by = abfd; n->next = NULL; @@ -1538,11 +1426,16 @@ elf_link_add_object_symbols (abfd, info) n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) - goto error_return; - anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1); + goto error_free_dyn; + amt = strlen (fnm) + 1; + anm = bfd_alloc (abfd, amt); if (anm == NULL) - goto error_return; - strcpy (anm, fnm); + { + error_free_dyn: + free (dynbuf); + goto error_return; + } + memcpy (anm, fnm, (size_t) amt); n->name = anm; n->by = abfd; n->next = NULL; @@ -1556,7 +1449,6 @@ elf_link_add_object_symbols (abfd, info) } free (dynbuf); - dynbuf = NULL; } /* We do not want to include any of the sections in a dynamic @@ -1606,10 +1498,6 @@ elf_link_add_object_symbols (abfd, info) if (dyn.d_tag == DT_NEEDED && dyn.d_un.d_val == strindex) { - if (buf != NULL) - free (buf); - if (extversym != NULL) - free (extversym); _bfd_elf_strtab_delref (hash_table->dynstr, strindex); return true; } @@ -1627,31 +1515,79 @@ elf_link_add_object_symbols (abfd, info) elf_dt_name (abfd) = name; } - pos = hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym); - amt = extsymcount * sizeof (Elf_External_Sym); - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) buf, amt, abfd) != amt) - goto error_return; + /* If this is a dynamic object, we always link against the .dynsym + symbol table, not the .symtab symbol table. The dynamic linker + will only see the .dynsym symbol table, so there is no reason to + look at .symtab for a dynamic object. */ + + if (! dynamic || elf_dynsymtab (abfd) == 0) + hdr = &elf_tdata (abfd)->symtab_hdr; + else + hdr = &elf_tdata (abfd)->dynsymtab_hdr; - if (shndx_hdr != NULL && shndx_hdr->sh_size != 0) + symcount = hdr->sh_size / sizeof (Elf_External_Sym); + + /* The sh_info field of the symtab header tells us where the + external symbols start. We don't care about the local symbols at + this point. */ + if (elf_bad_symtab (abfd)) { - amt = extsymcount * sizeof (Elf_External_Sym_Shndx); - pos = shndx_hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym_Shndx); - if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt) + extsymcount = symcount; + extsymoff = 0; + } + else + { + extsymcount = symcount - hdr->sh_info; + extsymoff = hdr->sh_info; + } + + sym_hash = NULL; + if (extsymcount != 0) + { + isymbuf = bfd_elf_get_elf_syms (abfd, hdr, extsymcount, extsymoff, + NULL, NULL, NULL); + if (isymbuf == NULL) goto error_return; + + /* We store a pointer to the hash table entry for each external + symbol. */ + amt = extsymcount * sizeof (struct elf_link_hash_entry *); + sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt); + if (sym_hash == NULL) + goto error_free_sym; + elf_sym_hashes (abfd) = sym_hash; + } + + if (dynamic) + { + /* Read in any version definitions. */ + if (! _bfd_elf_slurp_version_tables (abfd)) + goto error_free_sym; + + /* Read in the symbol versions, but don't bother to convert them + to internal format. */ + if (elf_dynversym (abfd) != 0) + { + Elf_Internal_Shdr *versymhdr; + + versymhdr = &elf_tdata (abfd)->dynversym_hdr; + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); + if (extversym == NULL) + goto error_free_sym; + amt = versymhdr->sh_size; + if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0 + || bfd_bread ((PTR) extversym, amt, abfd) != amt) + goto error_free_vers; + } } weaks = NULL; ever = extversym != NULL ? extversym + extsymoff : NULL; - esymend = buf + extsymcount; - for (esym = buf, shndx = shndx_buf; - esym < esymend; - esym++, sym_hash++, ever = (ever != NULL ? ever + 1 : NULL), - shndx = (shndx != NULL ? shndx + 1 : NULL)) + for (isym = isymbuf, isymend = isymbuf + extsymcount; + isym < isymend; + isym++, sym_hash++, ever = (ever != NULL ? ever + 1 : NULL)) { - Elf_Internal_Sym sym; int bind; bfd_vma value; asection *sec; @@ -1666,14 +1602,12 @@ elf_link_add_object_symbols (abfd, info) override = false; - elf_swap_symbol_in (abfd, esym, shndx, &sym); - flags = BSF_NO_FLAGS; sec = NULL; - value = sym.st_value; + value = isym->st_value; *sym_hash = NULL; - bind = ELF_ST_BIND (sym.st_info); + bind = ELF_ST_BIND (isym->st_info); if (bind == STB_LOCAL) { /* This should be impossible, since ELF requires that all @@ -1684,8 +1618,8 @@ elf_link_add_object_symbols (abfd, info) } else if (bind == STB_GLOBAL) { - if (sym.st_shndx != SHN_UNDEF - && sym.st_shndx != SHN_COMMON) + if (isym->st_shndx != SHN_UNDEF + && isym->st_shndx != SHN_COMMON) flags = BSF_GLOBAL; } else if (bind == STB_WEAK) @@ -1695,39 +1629,57 @@ elf_link_add_object_symbols (abfd, info) /* Leave it up to the processor backend. */ } - if (sym.st_shndx == SHN_UNDEF) + if (isym->st_shndx == SHN_UNDEF) sec = bfd_und_section_ptr; - else if (sym.st_shndx < SHN_LORESERVE || sym.st_shndx > SHN_HIRESERVE) + else if (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE) { - sec = section_from_elf_index (abfd, sym.st_shndx); + sec = section_from_elf_index (abfd, isym->st_shndx); if (sec == NULL) sec = bfd_abs_section_ptr; else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) value -= sec->vma; } - else if (sym.st_shndx == SHN_ABS) + else if (isym->st_shndx == SHN_ABS) sec = bfd_abs_section_ptr; - else if (sym.st_shndx == SHN_COMMON) + else if (isym->st_shndx == SHN_COMMON) { sec = bfd_com_section_ptr; /* What ELF calls the size we call the value. What ELF calls the value we call the alignment. */ - value = sym.st_size; + value = isym->st_size; } else { /* Leave it up to the processor backend. */ } - name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name); + name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, + isym->st_name); if (name == (const char *) NULL) - goto error_return; + goto error_free_vers; - if (add_symbol_hook) + if (isym->st_shndx == SHN_COMMON + && ELF_ST_TYPE (isym->st_info) == STT_TLS) { - if (! (*add_symbol_hook) (abfd, info, &sym, &name, &flags, &sec, + asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon"); + + if (tcomm == NULL) + { + tcomm = bfd_make_section (abfd, ".tcommon"); + if (tcomm == NULL + || !bfd_set_section_flags (abfd, tcomm, (SEC_ALLOC + | SEC_IS_COMMON + | SEC_LINKER_CREATED + | SEC_THREAD_LOCAL))) + goto error_free_vers; + } + sec = tcomm; + } + else if (add_symbol_hook) + { + if (! (*add_symbol_hook) (abfd, info, isym, &name, &flags, &sec, &value)) - goto error_return; + goto error_free_vers; /* The hook function sets the name to NULL if this symbol should be skipped for some reason. */ @@ -1739,7 +1691,7 @@ elf_link_add_object_symbols (abfd, info) if (sec == (asection *) NULL) { bfd_set_error (bfd_error_bad_value); - goto error_return; + goto error_free_vers; } if (bfd_is_und_section (sec) @@ -1770,11 +1722,10 @@ elf_link_add_object_symbols (abfd, info) || (vernum > 1 && ! bfd_is_abs_section (sec))) { const char *verstr; - unsigned int namelen; - bfd_size_type newlen; + size_t namelen, verlen, newlen; char *newname, *p; - if (sym.st_shndx != SHN_UNDEF) + if (isym->st_shndx != SHN_UNDEF) { if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info) { @@ -1783,7 +1734,7 @@ elf_link_add_object_symbols (abfd, info) bfd_archive_filename (abfd), name, vernum, elf_tdata (abfd)->dynverdef_hdr.sh_info); bfd_set_error (bfd_error_bad_value); - goto error_return; + goto error_free_vers; } else if (vernum > 1) verstr = @@ -1823,37 +1774,39 @@ elf_link_add_object_symbols (abfd, info) (_("%s: %s: invalid needed version %d"), bfd_archive_filename (abfd), name, vernum); bfd_set_error (bfd_error_bad_value); - goto error_return; + goto error_free_vers; } } namelen = strlen (name); - newlen = namelen + strlen (verstr) + 2; - if ((iver.vs_vers & VERSYM_HIDDEN) == 0) + verlen = strlen (verstr); + newlen = namelen + verlen + 2; + if ((iver.vs_vers & VERSYM_HIDDEN) == 0 + && isym->st_shndx != SHN_UNDEF) ++newlen; - newname = (char *) bfd_alloc (abfd, newlen); + newname = (char *) bfd_alloc (abfd, (bfd_size_type) newlen); if (newname == NULL) - goto error_return; - strcpy (newname, name); + goto error_free_vers; + memcpy (newname, name, namelen); p = newname + namelen; *p++ = ELF_VER_CHR; /* If this is a defined non-hidden version symbol, we add another @ to the name. This indicates the default version of the symbol. */ if ((iver.vs_vers & VERSYM_HIDDEN) == 0 - && sym.st_shndx != SHN_UNDEF) + && isym->st_shndx != SHN_UNDEF) *p++ = ELF_VER_CHR; - strcpy (p, verstr); + memcpy (p, verstr, verlen + 1); name = newname; } } - if (! elf_merge_symbol (abfd, info, name, &sym, &sec, &value, + if (! elf_merge_symbol (abfd, info, name, isym, &sec, &value, sym_hash, &override, &type_change_ok, &size_change_ok, dt_needed)) - goto error_return; + goto error_free_vers; if (override) definition = false; @@ -1881,7 +1834,7 @@ elf_link_add_object_symbols (abfd, info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, flags, sec, value, (const char *) NULL, false, collect, (struct bfd_link_hash_entry **) sym_hash))) - goto error_return; + goto error_free_vers; h = *sym_hash; while (h->root.type == bfd_link_hash_indirect @@ -1893,7 +1846,7 @@ elf_link_add_object_symbols (abfd, info) if (dynamic && definition && (flags & BSF_WEAK) != 0 - && ELF_ST_TYPE (sym.st_info) != STT_FUNC + && ELF_ST_TYPE (isym->st_info) != STT_FUNC && info->hash->creator->flavour == bfd_target_elf_flavour && h->weakdef == NULL) { @@ -1915,16 +1868,16 @@ elf_link_add_object_symbols (abfd, info) } /* Set the alignment of a common symbol. */ - if (sym.st_shndx == SHN_COMMON + if (isym->st_shndx == SHN_COMMON && h->root.type == bfd_link_hash_common) { unsigned int align; - align = bfd_log2 (sym.st_value); + align = bfd_log2 (isym->st_value); if (align > old_alignment /* Permit an alignment power of zero if an alignment of one is specified and no other alignments have been specified. */ - || (sym.st_value == 1 && old_alignment == 0)) + || (isym->st_value == 1 && old_alignment == 0)) h->root.u.c.p->alignment_power = align; } @@ -1935,16 +1888,16 @@ elf_link_add_object_symbols (abfd, info) int new_flag; /* Remember the symbol size and type. */ - if (sym.st_size != 0 + if (isym->st_size != 0 && (definition || h->size == 0)) { - if (h->size != 0 && h->size != sym.st_size && ! size_change_ok) + if (h->size != 0 && h->size != isym->st_size && ! size_change_ok) (*_bfd_error_handler) (_("Warning: size of symbol `%s' changed from %lu to %lu in %s"), - name, (unsigned long) h->size, (unsigned long) sym.st_size, - bfd_archive_filename (abfd)); + name, (unsigned long) h->size, + (unsigned long) isym->st_size, bfd_archive_filename (abfd)); - h->size = sym.st_size; + h->size = isym->st_size; } /* If this is a common symbol, then we always want H->SIZE @@ -1955,37 +1908,37 @@ elf_link_add_object_symbols (abfd, info) if (h->root.type == bfd_link_hash_common) h->size = h->root.u.c.size; - if (ELF_ST_TYPE (sym.st_info) != STT_NOTYPE + if (ELF_ST_TYPE (isym->st_info) != STT_NOTYPE && (definition || h->type == STT_NOTYPE)) { if (h->type != STT_NOTYPE - && h->type != ELF_ST_TYPE (sym.st_info) + && h->type != ELF_ST_TYPE (isym->st_info) && ! type_change_ok) (*_bfd_error_handler) (_("Warning: type of symbol `%s' changed from %d to %d in %s"), - name, h->type, ELF_ST_TYPE (sym.st_info), + name, h->type, ELF_ST_TYPE (isym->st_info), bfd_archive_filename (abfd)); - h->type = ELF_ST_TYPE (sym.st_info); + h->type = ELF_ST_TYPE (isym->st_info); } /* If st_other has a processor-specific meaning, specific code might be needed here. */ - if (sym.st_other != 0) + if (isym->st_other != 0) { /* Combine visibilities, using the most constraining one. */ unsigned char hvis = ELF_ST_VISIBILITY (h->other); - unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other); + unsigned char symvis = ELF_ST_VISIBILITY (isym->st_other); if (symvis && (hvis > symvis || hvis == 0)) - h->other = sym.st_other; + h->other = isym->st_other; /* If neither has visibility, use the st_other of the definition. This is an arbitrary choice, since the other bits have no general meaning. */ if (!symvis && !hvis && (definition || h->other == 0)) - h->other = sym.st_other; + h->other = isym->st_other; } /* Set a flag in the hash table entry indicating the type of @@ -2029,21 +1982,21 @@ elf_link_add_object_symbols (abfd, info) /* Check to see if we need to add an indirect symbol for the default name. */ if (definition || h->root.type == bfd_link_hash_common) - if (! elf_add_default_symbol (abfd, info, h, name, &sym, + if (! elf_add_default_symbol (abfd, info, h, name, isym, &sec, &value, &dynsym, override, dt_needed)) - goto error_return; + goto error_free_vers; if (dynsym && h->dynindx == -1) { if (! _bfd_elf_link_record_dynamic_symbol (info, h)) - goto error_return; + goto error_free_vers; if (h->weakdef != NULL && ! new_weakdef && h->weakdef->dynindx == -1) { if (! _bfd_elf_link_record_dynamic_symbol (info, h->weakdef)) - goto error_return; + goto error_free_vers; } } else if (dynsym && h->dynindx != -1) @@ -2066,7 +2019,7 @@ elf_link_add_object_symbols (abfd, info) bfd_size_type strindex; if (! is_elf_hash_table (info)) - goto error_return; + goto error_free_vers; /* The symbol from a DT_NEEDED object is referenced from the regular object to create a dynamic executable. We @@ -2077,7 +2030,7 @@ elf_link_add_object_symbols (abfd, info) strindex = _bfd_elf_strtab_add (hash_table->dynstr, elf_dt_soname (abfd), false); if (strindex == (bfd_size_type) -1) - goto error_return; + goto error_free_vers; if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) { @@ -2103,11 +2056,21 @@ elf_link_add_object_symbols (abfd, info) } if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NEEDED, strindex)) - goto error_return; + goto error_free_vers; } } } + if (extversym != NULL) + { + free (extversym); + extversym = NULL; + } + + if (isymbuf != NULL) + free (isymbuf); + isymbuf = NULL; + /* Now set the weakdefs field correctly for all the weak defined symbols we found. The only way to do this is to search all the symbols. Since we only need the information for non functions in @@ -2175,24 +2138,11 @@ elf_link_add_object_symbols (abfd, info) if (! _bfd_elf_link_record_dynamic_symbol (info, hlook)) goto error_return; } - break; } } } - if (buf != NULL) - { - free (buf); - buf = NULL; - } - - if (extversym != NULL) - { - free (extversym); - extversym = NULL; - } - /* If this object is the same format as the output object, and it is not a shared library, then let the backend look through the relocs. @@ -2238,7 +2188,7 @@ elf_link_add_object_symbols (abfd, info) ok = (*check_relocs) (abfd, info, o, internal_relocs); - if (! info->keep_memory) + if (elf_section_data (o)->relocs != internal_relocs) free (internal_relocs); if (! ok) @@ -2258,7 +2208,9 @@ elf_link_add_object_symbols (abfd, info) asection *stab, *stabstr; stab = bfd_get_section_by_name (abfd, ".stab"); - if (stab != NULL && !(stab->flags & SEC_MERGE)) + if (stab != NULL + && (stab->flags & SEC_MERGE) == 0 + && !bfd_is_abs_section (stab->output_section)) { stabstr = bfd_get_section_by_name (abfd, ".stabstr"); @@ -2284,7 +2236,8 @@ elf_link_add_object_symbols (abfd, info) asection *s; for (s = abfd->sections; s != NULL; s = s->next) - if (s->flags & SEC_MERGE) + if ((s->flags & SEC_MERGE) != 0 + && !bfd_is_abs_section (s->output_section)) { struct bfd_elf_section_data *secdata; @@ -2298,15 +2251,29 @@ elf_link_add_object_symbols (abfd, info) } } + if (is_elf_hash_table (info)) + { + /* Add this bfd to the loaded list. */ + struct elf_link_loaded_list *n; + + n = ((struct elf_link_loaded_list *) + bfd_alloc (abfd, sizeof (struct elf_link_loaded_list))); + if (n == NULL) + goto error_return; + n->abfd = abfd; + n->next = hash_table->loaded; + hash_table->loaded = n; + } + return true; - error_return: - if (buf != NULL) - free (buf); - if (dynbuf != NULL) - free (dynbuf); + error_free_vers: if (extversym != NULL) free (extversym); + error_free_sym: + if (isymbuf != NULL) + free (isymbuf); + error_return: return false; } @@ -2487,92 +2454,6 @@ elf_add_dynamic_entry (info, tag, val) return true; } - -/* Record a new local dynamic symbol. */ - -boolean -elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx) - struct bfd_link_info *info; - bfd *input_bfd; - long input_indx; -{ - struct elf_link_local_dynamic_entry *entry; - struct elf_link_hash_table *eht; - struct elf_strtab_hash *dynstr; - Elf_External_Sym esym; - Elf_External_Sym_Shndx eshndx; - Elf_External_Sym_Shndx *shndx; - unsigned long dynstr_index; - char *name; - file_ptr pos; - bfd_size_type amt; - - if (! is_elf_hash_table (info)) - return false; - - /* See if the entry exists already. */ - for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next) - if (entry->input_bfd == input_bfd && entry->input_indx == input_indx) - return true; - - entry = (struct elf_link_local_dynamic_entry *) - bfd_alloc (input_bfd, (bfd_size_type) sizeof (*entry)); - if (entry == NULL) - return false; - - /* Go find the symbol, so that we can find it's name. */ - amt = sizeof (Elf_External_Sym); - pos = elf_tdata (input_bfd)->symtab_hdr.sh_offset + input_indx * amt; - if (bfd_seek (input_bfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) &esym, amt, input_bfd) != amt) - return false; - shndx = NULL; - if (elf_tdata (input_bfd)->symtab_shndx_hdr.sh_size != 0) - { - amt = sizeof (Elf_External_Sym_Shndx); - pos = elf_tdata (input_bfd)->symtab_shndx_hdr.sh_offset; - pos += input_indx * amt; - shndx = &eshndx; - if (bfd_seek (input_bfd, pos, SEEK_SET) != 0 - || bfd_bread ((PTR) shndx, amt, input_bfd) != amt) - return false; - } - elf_swap_symbol_in (input_bfd, &esym, shndx, &entry->isym); - - name = (bfd_elf_string_from_elf_section - (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link, - entry->isym.st_name)); - - dynstr = elf_hash_table (info)->dynstr; - if (dynstr == NULL) - { - /* Create a strtab to hold the dynamic symbol names. */ - elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init (); - if (dynstr == NULL) - return false; - } - - dynstr_index = _bfd_elf_strtab_add (dynstr, name, false); - if (dynstr_index == (unsigned long) -1) - return false; - entry->isym.st_name = dynstr_index; - - eht = elf_hash_table (info); - - entry->next = eht->dynlocal; - eht->dynlocal = entry; - entry->input_bfd = input_bfd; - entry->input_indx = input_indx; - eht->dynsymcount++; - - /* Whatever binding the symbol had before, it's now local. */ - entry->isym.st_info - = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info)); - - /* The dynindx will be set at the end of size_dynamic_sections. */ - - return true; -} /* Read and swap the relocs from the section indicated by SHDR. This may be either a REL or a RELA section. The relocations are @@ -2890,11 +2771,11 @@ compute_bucket_count (info) elf_link_hash_traverse (elf_hash_table (info), elf_collect_hash_codes, &hashcodesp); -/* We have a problem here. The following code to optimize the table - size requires an integer type with more the 32 bits. If - BFD_HOST_U_64_BIT is set we know about such a type. */ + /* We have a problem here. The following code to optimize the table + size requires an integer type with more the 32 bits. If + BFD_HOST_U_64_BIT is set we know about such a type. */ #ifdef BFD_HOST_U_64_BIT - if (info->optimize == true) + if (info->optimize) { unsigned long int nsyms = hashcodesp - hashcodes; size_t minsize; @@ -3035,7 +2916,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, return true; if (! is_elf_hash_table (info)) - return false; + return true; /* Any syms created from now on start with -1 in got.refcount/offset and plt.refcount/offset. */ @@ -3063,6 +2944,9 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, struct elf_info_failed eif; struct elf_link_hash_entry *h; asection *dynstr; + struct bfd_elf_version_tree *t; + struct bfd_elf_version_expr *d; + boolean all_defined; *sinterpptr = bfd_get_section_by_name (dynobj, ".interp"); BFD_ASSERT (*sinterpptr != NULL || info->shared); @@ -3143,6 +3027,57 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, return false; } + /* Make all global versions with definiton. */ + for (t = verdefs; t != NULL; t = t->next) + for (d = t->globals; d != NULL; d = d->next) + if (!d->symver && strchr (d->pattern, '*') == NULL) + { + const char *verstr, *name; + size_t namelen, verlen, newlen; + char *newname, *p; + struct elf_link_hash_entry *newh; + + name = d->pattern; + namelen = strlen (name); + verstr = t->name; + verlen = strlen (verstr); + newlen = namelen + verlen + 3; + + newname = (char *) bfd_malloc ((bfd_size_type) newlen); + if (newname == NULL) + return false; + memcpy (newname, name, namelen); + + /* Check the hidden versioned definition. */ + p = newname + namelen; + *p++ = ELF_VER_CHR; + memcpy (p, verstr, verlen + 1); + newh = elf_link_hash_lookup (elf_hash_table (info), + newname, false, false, + false); + if (newh == NULL + || (newh->root.type != bfd_link_hash_defined + && newh->root.type != bfd_link_hash_defweak)) + { + /* Check the default versioned definition. */ + *p++ = ELF_VER_CHR; + memcpy (p, verstr, verlen + 1); + newh = elf_link_hash_lookup (elf_hash_table (info), + newname, false, false, + false); + } + free (newname); + + /* Mark this version if there is a definition and it is + not defined in a shared object. */ + if (newh != NULL + && ((newh->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) == 0) + && (newh->root.type == bfd_link_hash_defined + || newh->root.type == bfd_link_hash_defweak)) + d->symver = 1; + } + /* Attach all the symbols to their version information. */ asvinfo.output_bfd = output_bfd; asvinfo.info = info; @@ -3155,6 +3090,28 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, if (asvinfo.failed) return false; + if (!info->allow_undefined_version) + { + /* Check if all global versions have a definiton. */ + all_defined = true; + for (t = verdefs; t != NULL; t = t->next) + for (d = t->globals; d != NULL; d = d->next) + if (!d->symver && !d->script + && strchr (d->pattern, '*') == NULL) + { + (*_bfd_error_handler) + (_("%s: undefined version: %s"), + d->pattern, t->name); + all_defined = false; + } + + if (!all_defined) + { + bfd_set_error (bfd_error_bad_value); + return false; + } + } + /* Find all symbols which were defined in a dynamic object and make the backend pick a reasonable value for them. */ elf_link_hash_traverse (elf_hash_table (info), @@ -3210,7 +3167,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, { (*_bfd_error_handler) (_("%s: .preinit_array section is not allowed in DSO"), - bfd_archive_filename (sub)); + bfd_archive_filename (sub)); break; } @@ -3454,7 +3411,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, elf_tdata (output_bfd)->cverdefs = cdefs; } - if (info->new_dtags && info->flags) + if ((info->new_dtags && info->flags) || (info->flags & DF_STATIC_TLS)) { if (! elf_add_dynamic_entry (info, (bfd_vma) DT_FLAGS, info->flags)) return false; @@ -3645,10 +3602,9 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, BFD_ASSERT (s != NULL); hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize; s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size); - s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size); + s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size); if (s->contents == NULL) return false; - memset (s->contents, 0, (size_t) s->_raw_size); bfd_put (8 * hash_entry_size, output_bfd, (bfd_vma) bucketcount, s->contents); @@ -3947,7 +3903,7 @@ elf_fix_symbol_flags (h, eif) struct elf_backend_data *bed; bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); - (*bed->elf_backend_copy_indirect_symbol) (weakdef, h); + (*bed->elf_backend_copy_indirect_symbol) (bed, weakdef, h); } } @@ -4067,7 +4023,7 @@ elf_adjust_dynamic_symbol (h, data) && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0) (*_bfd_error_handler) (_("warning: type and size of dynamic symbol `%s' are not defined"), - h->root.root.string); + h->root.root.string); dynobj = elf_hash_table (eif->info)->dynobj; bed = get_elf_backend_data (dynobj); @@ -4127,7 +4083,7 @@ elf_export_symbol (h, data) if (!eif->verdefs) { -doit: + doit: if (! _bfd_elf_link_record_dynamic_symbol (eif->info, h)) { eif->failed = true; @@ -4294,7 +4250,7 @@ elf_link_assign_sym_version (h, data) alc = bfd_malloc ((bfd_size_type) len); if (alc == NULL) return false; - strncpy (alc, h->root.root.string, len - 1); + memcpy (alc, h->root.root.string, len - 1); alc[len - 1] = '\0'; if (alc[len - 2] == ELF_VER_CHR) alc[len - 2] = '\0'; @@ -4397,45 +4353,58 @@ elf_link_assign_sym_version (h, data) if (h->verinfo.vertree == NULL && sinfo->verdefs != NULL) { struct bfd_elf_version_tree *t; - struct bfd_elf_version_tree *deflt; + struct bfd_elf_version_tree *local_ver; struct bfd_elf_version_expr *d; /* See if can find what version this symbol is in. If the symbol is supposed to be local, then don't actually register it. */ - deflt = NULL; + local_ver = NULL; for (t = sinfo->verdefs; t != NULL; t = t->next) { if (t->globals != NULL) { + boolean matched; + + matched = false; for (d = t->globals; d != NULL; d = d->next) { if ((*d->match) (d, h->root.root.string)) { - h->verinfo.vertree = t; - break; + if (d->symver) + matched = true; + else + { + /* There is a version without definition. Make + the symbol the default definition for this + version. */ + h->verinfo.vertree = t; + local_ver = NULL; + d->script = 1; + break; + } } } if (d != NULL) break; + else if (matched) + /* There is no undefined version for this symbol. Hide the + default one. */ + (*bed->elf_backend_hide_symbol) (info, h, true); } if (t->locals != NULL) { for (d = t->locals; d != NULL; d = d->next) { + /* If the match is "*", keep looking for a more + explicit, perhaps even global, match. */ if (d->pattern[0] == '*' && d->pattern[1] == '\0') - deflt = t; + local_ver = t; else if ((*d->match) (d, h->root.root.string)) { - h->verinfo.vertree = t; - if (h->dynindx != -1 - && info->shared - && ! info->export_dynamic) - { - (*bed->elf_backend_hide_symbol) (info, h, true); - } + local_ver = t; break; } } @@ -4445,9 +4414,9 @@ elf_link_assign_sym_version (h, data) } } - if (deflt != NULL && h->verinfo.vertree == NULL) + if (local_ver != NULL) { - h->verinfo.vertree = deflt; + h->verinfo.vertree = local_ver; if (h->dynindx != -1 && info->shared && ! info->export_dynamic) @@ -4478,6 +4447,8 @@ struct elf_final_link_info asection *hash_sec; /* symbol version section (.gnu.version). */ asection *symver_sec; + /* first SHF_TLS section (if any). */ + asection *first_tls_sec; /* Buffer large enough to hold contents of any section. */ bfd_byte *contents; /* Buffer large enough to hold external relocs of any section. */ @@ -4517,6 +4488,8 @@ static boolean elf_link_output_extsym PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_link_sec_merge_syms PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean elf_link_check_versioned_symbol + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); static boolean elf_link_input_bfd PARAMS ((struct elf_final_link_info *, bfd *)); static boolean elf_reloc_link_order @@ -4660,7 +4633,7 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) for (j = 0; j < bed->s->int_rels_per_ext_rel; j++) irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx, - ELF_R_TYPE (irela[j].r_info)); + ELF_R_TYPE (irela[j].r_info)); if (bed->s->swap_reloca_out) (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela); @@ -4673,10 +4646,12 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) free (irela); } -struct elf_link_sort_rela { +struct elf_link_sort_rela +{ bfd_vma offset; enum elf_reloc_type_class type; - union { + union + { Elf_Internal_Rel rel; Elf_Internal_Rela rela; } u; @@ -4957,6 +4932,14 @@ elf_bfd_final_link (abfd, info) finfo.symbuf = NULL; finfo.symshndxbuf = NULL; finfo.symbuf_count = 0; + finfo.first_tls_sec = NULL; + for (o = abfd->sections; o != (asection *) NULL; o = o->next) + if ((o->flags & SEC_THREAD_LOCAL) != 0 + && (o->flags & SEC_LOAD) != 0) + { + finfo.first_tls_sec = o; + break; + } /* Count up the number of relocations we will output for each output section, so that we know the sizes of the reloc sections. We @@ -5004,7 +4987,7 @@ elf_bfd_final_link (abfd, info) o->reloc_count += (*bed->elf_backend_count_relocs) (sec, relocs); - if (!info->keep_memory) + if (elf_section_data (o)->relocs != relocs) free (relocs); } @@ -5321,6 +5304,40 @@ elf_bfd_final_link (abfd, info) goto error_return; } + if (finfo.first_tls_sec) + { + unsigned int align = 0; + bfd_vma base = finfo.first_tls_sec->vma, end = 0; + asection *sec; + + for (sec = finfo.first_tls_sec; + sec && (sec->flags & SEC_THREAD_LOCAL); + sec = sec->next) + { + bfd_vma size = sec->_raw_size; + + if (bfd_get_section_alignment (abfd, sec) > align) + align = bfd_get_section_alignment (abfd, sec); + if (sec->_raw_size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0) + { + struct bfd_link_order *o; + + size = 0; + for (o = sec->link_order_head; o != NULL; o = o->next) + if (size < o->offset + o->size) + size = o->offset + o->size; + } + end = sec->vma + size; + } + elf_hash_table (info)->tls_segment + = bfd_zalloc (abfd, sizeof (struct elf_link_tls_segment)); + if (elf_hash_table (info)->tls_segment == NULL) + goto error_return; + elf_hash_table (info)->tls_segment->start = base; + elf_hash_table (info)->tls_segment->size = end - base; + elf_hash_table (info)->tls_segment->align = align; + } + /* Since ELF permits relocations to be against local symbols, we must have the local symbols available when we do the relocations. Since we would rather only read the local symbols once, and we @@ -5447,8 +5464,8 @@ elf_bfd_final_link (abfd, info) sym = e->isym; if (e->isym.st_shndx != SHN_UNDEF - && (e->isym.st_shndx < SHN_LORESERVE - || e->isym.st_shndx > SHN_HIRESERVE)) + && (e->isym.st_shndx < SHN_LORESERVE + || e->isym.st_shndx > SHN_HIRESERVE)) { s = bfd_section_from_elf_index (e->input_bfd, e->isym.st_shndx); @@ -5631,7 +5648,13 @@ elf_bfd_final_link (abfd, info) name = ".fini_array"; get_size: o = bfd_get_section_by_name (abfd, name); - BFD_ASSERT (o != NULL); + if (o == NULL) + { + (*_bfd_error_handler) + (_("%s: could not find output section %s"), + bfd_get_filename (abfd), name); + goto error_return; + } if (o->_raw_size == 0) (*_bfd_error_handler) (_("warning: %s section has zero size"), name); @@ -5668,7 +5691,13 @@ elf_bfd_final_link (abfd, info) name = ".gnu.version"; get_vma: o = bfd_get_section_by_name (abfd, name); - BFD_ASSERT (o != NULL); + if (o == NULL) + { + (*_bfd_error_handler) + (_("%s: could not find output section %s"), + bfd_get_filename (abfd), name); + goto error_return; + } dyn.d_un.d_ptr = o->vma; elf_swap_dyn_out (dynobj, &dyn, dyncon); break; @@ -5747,6 +5776,15 @@ elf_bfd_final_link (abfd, info) } } + if (info->relocateable) + { + boolean failed = false; + + bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed); + if (failed) + goto error_return; + } + /* If we have optimized stabs strings, output them. */ if (elf_hash_table (info)->stab_info != NULL) { @@ -5960,6 +5998,127 @@ elf_link_sec_merge_syms (h, data) return true; } +/* For DSOs loaded in via a DT_NEEDED entry, emulate ld.so in + allowing an unsatisfied unversioned symbol in the DSO to match a + versioned symbol that would normally require an explicit version. */ + +static boolean +elf_link_check_versioned_symbol (info, h) + struct bfd_link_info *info; + struct elf_link_hash_entry *h; +{ + bfd *undef_bfd = h->root.u.undef.abfd; + struct elf_link_loaded_list *loaded; + + if ((undef_bfd->flags & DYNAMIC) == 0 + || info->hash->creator->flavour != bfd_target_elf_flavour + || elf_dt_soname (h->root.u.undef.abfd) == NULL) + return false; + + for (loaded = elf_hash_table (info)->loaded; + loaded != NULL; + loaded = loaded->next) + { + bfd *input; + Elf_Internal_Shdr *hdr; + bfd_size_type symcount; + bfd_size_type extsymcount; + bfd_size_type extsymoff; + Elf_Internal_Shdr *versymhdr; + Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; + Elf_Internal_Sym *isymbuf; + Elf_External_Versym *ever; + Elf_External_Versym *extversym; + + input = loaded->abfd; + + /* We check each DSO for a possible hidden versioned definition. */ + if (input == undef_bfd + || (input->flags & DYNAMIC) == 0 + || elf_dynversym (input) == 0) + continue; + + hdr = &elf_tdata (input)->dynsymtab_hdr; + + symcount = hdr->sh_size / sizeof (Elf_External_Sym); + if (elf_bad_symtab (input)) + { + extsymcount = symcount; + extsymoff = 0; + } + else + { + extsymcount = symcount - hdr->sh_info; + extsymoff = hdr->sh_info; + } + + if (extsymcount == 0) + continue; + + isymbuf = bfd_elf_get_elf_syms (input, hdr, extsymcount, extsymoff, + NULL, NULL, NULL); + if (isymbuf == NULL) + return false; + + /* Read in any version definitions. */ + versymhdr = &elf_tdata (input)->dynversym_hdr; + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); + if (extversym == NULL) + goto error_ret; + + if (bfd_seek (input, versymhdr->sh_offset, SEEK_SET) != 0 + || (bfd_bread ((PTR) extversym, versymhdr->sh_size, input) + != versymhdr->sh_size)) + { + free (extversym); + error_ret: + free (isymbuf); + return false; + } + + ever = extversym + extsymoff; + isymend = isymbuf + extsymcount; + for (isym = isymbuf; isym < isymend; isym++, ever++) + { + const char *name; + Elf_Internal_Versym iver; + + if (ELF_ST_BIND (isym->st_info) == STB_LOCAL + || isym->st_shndx == SHN_UNDEF) + continue; + + name = bfd_elf_string_from_elf_section (input, + hdr->sh_link, + isym->st_name); + if (strcmp (name, h->root.root.string) != 0) + continue; + + _bfd_elf_swap_versym_in (input, ever, &iver); + + if ((iver.vs_vers & VERSYM_HIDDEN) == 0) + { + /* If we have a non-hidden versioned sym, then it should + have provided a definition for the undefined sym. */ + abort (); + } + + if ((iver.vs_vers & VERSYM_VERSION) == 2) + { + /* This is the oldest (default) sym. We can use it. */ + free (extversym); + free (isymbuf); + return true; + } + } + + free (extversym); + free (isymbuf); + } + + return false; +} + /* Add an external symbol to the symbol table. This is called from the hash table traversal routine. When generating a shared object, we go through the symbol table twice. The first time we output @@ -6009,7 +6168,8 @@ elf_link_output_extsym (h, data) && ! finfo->info->shared && h->root.type == bfd_link_hash_undefined && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0 + && ! elf_link_check_versioned_symbol (finfo->info, h)) { if (! ((*finfo->info->callbacks->undefined_symbol) (finfo->info, h->root.root.string, h->root.u.undef.abfd, @@ -6097,7 +6257,16 @@ elf_link_output_extsym (h, data) addresses. */ sym.st_value = h->root.u.def.value + input_sec->output_offset; if (! finfo->info->relocateable) - sym.st_value += input_sec->output_section->vma; + { + sym.st_value += input_sec->output_section->vma; + if (h->type == STT_TLS) + { + /* STT_TLS symbols are relative to PT_TLS segment + base. */ + BFD_ASSERT (finfo->first_tls_sec != NULL); + sym.st_value -= finfo->first_tls_sec->vma; + } + } } else { @@ -6173,8 +6342,8 @@ elf_link_output_extsym (h, data) sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other); /* If this symbol should be put in the .dynsym section, then put it - there now. We have already know the symbol index. We also fill - in the entry in the .hash section. */ + there now. We already know the symbol index. We also fill in + the entry in the .hash section. */ if (h->dynindx != -1 && elf_hash_table (finfo->info)->dynamic_sections_created) { @@ -6233,7 +6402,7 @@ elf_link_output_extsym (h, data) /* If we're stripping it, then it was just a dynamic symbol, and there's nothing else to do. */ - if (strip) + if (strip || (input_sec->flags & SEC_EXCLUDE) != 0) return true; h->indx = bfd_get_symcount (finfo->output_bfd); @@ -6251,7 +6420,7 @@ elf_link_output_extsym (h, data) originated from the section given by INPUT_REL_HDR) to the OUTPUT_BFD. */ -static void +static boolean elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, internal_relocs) bfd *output_bfd; @@ -6283,13 +6452,21 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, output_rel_hdr = elf_section_data (output_section)->rel_hdr2; rel_countp = &elf_section_data (output_section)->rel_count2; } - - BFD_ASSERT (output_rel_hdr != NULL); + else + { + (*_bfd_error_handler) + (_("%s: relocation size mismatch in %s section %s"), + bfd_get_filename (output_bfd), + bfd_archive_filename (input_section->owner), + input_section->name); + bfd_set_error (bfd_error_wrong_object_format); + return false; + } bed = get_elf_backend_data (output_bfd); irela = internal_relocs; - irelaend = irela + NUM_SHDR_ENTRIES (input_rel_hdr) - * bed->s->int_rels_per_ext_rel; + irelaend = irela + (NUM_SHDR_ENTRIES (input_rel_hdr) + * bed->s->int_rels_per_ext_rel); if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel)) { @@ -6341,6 +6518,8 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, /* Bump the counter, so that we know where to add the next set of relocations. */ *rel_countp += NUM_SHDR_ENTRIES (input_rel_hdr); + + return true; } /* Link an input file into the linker output file. This function @@ -6359,15 +6538,11 @@ elf_link_input_bfd (finfo, input_bfd) Elf_Internal_Sym *, asection **)); bfd *output_bfd; Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Shdr *shndx_hdr; size_t locsymcount; size_t extsymoff; - Elf_External_Sym *external_syms; - Elf_External_Sym *esym; - Elf_External_Sym *esymend; - Elf_External_Sym_Shndx *shndx_buf; - Elf_External_Sym_Shndx *shndx; + Elf_Internal_Sym *isymbuf; Elf_Internal_Sym *isym; + Elf_Internal_Sym *isymend; long *pindex; asection **ppsection; asection *o; @@ -6402,44 +6577,29 @@ elf_link_input_bfd (finfo, input_bfd) } /* Read the local symbols. */ - if (symtab_hdr->contents != NULL) - external_syms = (Elf_External_Sym *) symtab_hdr->contents; - else if (locsymcount == 0) - external_syms = NULL; - else - { - bfd_size_type amt = locsymcount * sizeof (Elf_External_Sym); - external_syms = finfo->external_syms; - if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (external_syms, amt, input_bfd) != amt) + isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; + if (isymbuf == NULL && locsymcount != 0) + { + isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0, + finfo->internal_syms, + finfo->external_syms, + finfo->locsym_shndx); + if (isymbuf == NULL) return false; } - shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr; - shndx_buf = NULL; - if (shndx_hdr->sh_size != 0 && locsymcount != 0) - { - bfd_size_type amt = locsymcount * sizeof (Elf_External_Sym_Shndx); - shndx_buf = finfo->locsym_shndx; - if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (shndx_buf, amt, input_bfd) != amt) - return false; - } - - /* Swap in the local symbols and write out the ones which we know - are going into the output file. */ - for (esym = external_syms, esymend = esym + locsymcount, - isym = finfo->internal_syms, pindex = finfo->indices, - ppsection = finfo->sections, shndx = shndx_buf; - esym < esymend; - esym++, isym++, pindex++, ppsection++, - shndx = (shndx != NULL ? shndx + 1 : NULL)) + /* Find local symbol sections and adjust values of symbols in + SEC_MERGE sections. Write out those local symbols we know are + going into the output file. */ + isymend = isymbuf + locsymcount; + for (isym = isymbuf, pindex = finfo->indices, ppsection = finfo->sections; + isym < isymend; + isym++, pindex++, ppsection++) { asection *isec; const char *name; Elf_Internal_Sym osym; - elf_swap_symbol_in (input_bfd, esym, shndx, isym); *pindex = -1; if (elf_bad_symtab (input_bfd)) @@ -6478,7 +6638,7 @@ elf_link_input_bfd (finfo, input_bfd) *ppsection = isec; /* Don't output the first, undefined, symbol. */ - if (esym == external_syms) + if (ppsection == finfo->sections) continue; if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) @@ -6551,7 +6711,15 @@ elf_link_input_bfd (finfo, input_bfd) these requirements. */ osym.st_value += isec->output_offset; if (! finfo->info->relocateable) - osym.st_value += isec->output_section->vma; + { + osym.st_value += isec->output_section->vma; + if (ELF_ST_TYPE (osym.st_info) == STT_TLS) + { + /* STT_TLS symbols are relative to PT_TLS segment base. */ + BFD_ASSERT (finfo->first_tls_sec != NULL); + osym.st_value -= finfo->first_tls_sec->vma; + } + } if (! elf_link_output_sym (finfo, name, &osym, isec)) return false; @@ -6644,20 +6812,12 @@ elf_link_input_bfd (finfo, input_bfd) || h->root.type == bfd_link_hash_defweak) && elf_discarded_section (h->root.u.def.section)) { -#if BFD_VERSION_DATE < 20031005 if ((o->flags & SEC_DEBUGGING) != 0) { -#if BFD_VERSION_DATE > 20021005 - (*finfo->info->callbacks->warning) - (finfo->info, - _("warning: relocation against removed section; zeroing"), - NULL, input_bfd, o, rel->r_offset); -#endif BFD_ASSERT (r_symndx != 0); memset (rel, 0, sizeof (*rel)); } else -#endif { if (! ((*finfo->info->callbacks->undefined_symbol) (finfo->info, h->root.root.string, @@ -6673,23 +6833,15 @@ elf_link_input_bfd (finfo, input_bfd) if (sec != NULL && elf_discarded_section (sec)) { -#if BFD_VERSION_DATE < 20031005 if ((o->flags & SEC_DEBUGGING) != 0 || (sec->flags & SEC_LINK_ONCE) != 0) { -#if BFD_VERSION_DATE > 20021005 - (*finfo->info->callbacks->warning) - (finfo->info, - _("warning: relocation against removed section"), - NULL, input_bfd, o, rel->r_offset); -#endif BFD_ASSERT (r_symndx != 0); rel->r_info = ELF_R_INFO (0, ELF_R_TYPE (rel->r_info)); rel->r_addend = 0; } else -#endif { boolean ok; const char *msg @@ -6740,7 +6892,7 @@ elf_link_input_bfd (finfo, input_bfd) if (! (*relocate_section) (output_bfd, finfo->info, input_bfd, o, contents, internal_relocs, - finfo->internal_syms, + isymbuf, finfo->sections)) return false; @@ -6749,11 +6901,11 @@ elf_link_input_bfd (finfo, input_bfd) Elf_Internal_Rela *irela; Elf_Internal_Rela *irelaend; struct elf_link_hash_entry **rel_hash; - Elf_Internal_Shdr *input_rel_hdr; + Elf_Internal_Shdr *input_rel_hdr, *input_rel_hdr2; unsigned int next_erel; - void (*reloc_emitter) PARAMS ((bfd *, asection *, - Elf_Internal_Shdr *, - Elf_Internal_Rela *)); + boolean (*reloc_emitter) PARAMS ((bfd *, asection *, + Elf_Internal_Shdr *, + Elf_Internal_Rela *)); boolean rela_normal; input_rel_hdr = &elf_section_data (o)->rel_hdr; @@ -6772,6 +6924,7 @@ elf_link_input_bfd (finfo, input_bfd) { unsigned long r_symndx; asection *sec; + Elf_Internal_Sym sym; if (next_erel == bed->s->int_rels_per_ext_rel) { @@ -6824,9 +6977,9 @@ elf_link_input_bfd (finfo, input_bfd) /* This is a reloc against a local symbol. */ *rel_hash = NULL; - isym = finfo->internal_syms + r_symndx; + sym = isymbuf[r_symndx]; sec = finfo->sections[r_symndx]; - if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) + if (ELF_ST_TYPE (sym.st_info) == STT_SECTION) { /* I suppose the backend ought to fill in the section of any STT_SECTION symbol against a @@ -6849,7 +7002,7 @@ elf_link_input_bfd (finfo, input_bfd) } /* Adjust the addend according to where the - section winds up in the output section. */ + section winds up in the output section. */ if (rela_normal) irela->r_addend += sec->output_offset; } @@ -6873,25 +7026,34 @@ elf_link_input_bfd (finfo, input_bfd) must output it now. */ shlink = symtab_hdr->sh_link; name = (bfd_elf_string_from_elf_section - (input_bfd, shlink, isym->st_name)); + (input_bfd, shlink, sym.st_name)); if (name == NULL) return false; osec = sec->output_section; - isym->st_shndx = + sym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd, osec); - if (isym->st_shndx == SHN_BAD) + if (sym.st_shndx == SHN_BAD) return false; - isym->st_value += sec->output_offset; + sym.st_value += sec->output_offset; if (! finfo->info->relocateable) - isym->st_value += osec->vma; + { + sym.st_value += osec->vma; + if (ELF_ST_TYPE (sym.st_info) == STT_TLS) + { + /* STT_TLS symbols are relative to PT_TLS + segment base. */ + BFD_ASSERT (finfo->first_tls_sec != NULL); + sym.st_value -= finfo->first_tls_sec->vma; + } + } finfo->indices[r_symndx] = bfd_get_symcount (output_bfd); - if (! elf_link_output_sym (finfo, name, isym, sec)) + if (! elf_link_output_sym (finfo, name, &sym, sec)) return false; } @@ -6910,17 +7072,20 @@ elf_link_input_bfd (finfo, input_bfd) else reloc_emitter = elf_link_output_relocs; - (*reloc_emitter) (output_bfd, o, input_rel_hdr, internal_relocs); + if (input_rel_hdr->sh_size != 0 + && ! (*reloc_emitter) (output_bfd, o, input_rel_hdr, + internal_relocs)) + return false; - input_rel_hdr = elf_section_data (o)->rel_hdr2; - if (input_rel_hdr) + input_rel_hdr2 = elf_section_data (o)->rel_hdr2; + if (input_rel_hdr2 && input_rel_hdr2->sh_size != 0) { internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr) * bed->s->int_rels_per_ext_rel); - (*reloc_emitter) (output_bfd, o, input_rel_hdr, - internal_relocs); + if (! (*reloc_emitter) (output_bfd, o, input_rel_hdr2, + internal_relocs)) + return false; } - } } @@ -7437,28 +7602,27 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, /* Garbage collect unused sections. */ static boolean elf_gc_mark - PARAMS ((struct bfd_link_info *info, asection *sec, - asection * (*gc_mark_hook) - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)))); + PARAMS ((struct bfd_link_info *, asection *, + asection * (*) (asection *, struct bfd_link_info *, + Elf_Internal_Rela *, struct elf_link_hash_entry *, + Elf_Internal_Sym *))); static boolean elf_gc_sweep - PARAMS ((struct bfd_link_info *info, - boolean (*gc_sweep_hook) - PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o, - const Elf_Internal_Rela *relocs)))); + PARAMS ((struct bfd_link_info *, + boolean (*) (bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *))); static boolean elf_gc_sweep_symbol - PARAMS ((struct elf_link_hash_entry *h, PTR idxptr)); + PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_gc_allocate_got_offsets - PARAMS ((struct elf_link_hash_entry *h, PTR offarg)); + PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_gc_propagate_vtable_entries_used - PARAMS ((struct elf_link_hash_entry *h, PTR dummy)); + PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_gc_smash_unused_vtentry_relocs - PARAMS ((struct elf_link_hash_entry *h, PTR dummy)); + PARAMS ((struct elf_link_hash_entry *, PTR)); /* The mark phase of garbage collection. For a given section, mark it and any sections in this section's group, and all the sections @@ -7468,9 +7632,10 @@ static boolean elf_gc_mark (info, sec, gc_mark_hook) struct bfd_link_info *info; asection *sec; - asection * (*gc_mark_hook) - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)); + asection * (*gc_mark_hook) PARAMS ((asection *, struct bfd_link_info *, + Elf_Internal_Rela *, + struct elf_link_hash_entry *, + Elf_Internal_Sym *)); { boolean ret; asection *group_sec; @@ -7489,17 +7654,12 @@ elf_gc_mark (info, sec, gc_mark_hook) { Elf_Internal_Rela *relstart, *rel, *relend; Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Shdr *shndx_hdr; struct elf_link_hash_entry **sym_hashes; size_t nlocsyms; size_t extsymoff; - Elf_External_Sym *locsyms, *freesyms = NULL; - Elf_External_Sym_Shndx *locsym_shndx; bfd *input_bfd = sec->owner; struct elf_backend_data *bed = get_elf_backend_data (input_bfd); - - /* GCFIXME: how to arrange so that relocs and symbols are not - reread continually? */ + Elf_Internal_Sym *isym = NULL; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -7513,37 +7673,18 @@ elf_gc_mark (info, sec, gc_mark_hook) else extsymoff = nlocsyms = symtab_hdr->sh_info; - if (symtab_hdr->contents) - locsyms = (Elf_External_Sym *) symtab_hdr->contents; - else if (nlocsyms == 0) - locsyms = NULL; - else + isym = (Elf_Internal_Sym *) symtab_hdr->contents; + if (isym == NULL && nlocsyms != 0) { - bfd_size_type amt = nlocsyms * sizeof (Elf_External_Sym); - locsyms = freesyms = bfd_malloc (amt); - if (freesyms == NULL - || bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (locsyms, amt, input_bfd) != amt) - { - ret = false; - goto out1; - } - } - - shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr; - locsym_shndx = NULL; - if (shndx_hdr->sh_size != 0 && nlocsyms != 0) - { - bfd_size_type amt = nlocsyms * sizeof (Elf_External_Sym_Shndx); - locsym_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (locsym_shndx, amt, input_bfd) != amt) + isym = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, nlocsyms, 0, + NULL, NULL, NULL); + if (isym == NULL) return false; } /* Read the relocations. */ relstart = (NAME(_bfd_elf,link_read_relocs) - (sec->owner, sec, NULL, (Elf_Internal_Rela *) NULL, + (input_bfd, sec, NULL, (Elf_Internal_Rela *) NULL, info->keep_memory)); if (relstart == NULL) { @@ -7557,38 +7698,20 @@ elf_gc_mark (info, sec, gc_mark_hook) unsigned long r_symndx; asection *rsec; struct elf_link_hash_entry *h; - Elf_Internal_Sym s; r_symndx = ELF_R_SYM (rel->r_info); if (r_symndx == 0) continue; - if (elf_bad_symtab (sec->owner)) - { - elf_swap_symbol_in (input_bfd, - locsyms + r_symndx, - locsym_shndx + (locsym_shndx ? r_symndx : 0), - &s); - if (ELF_ST_BIND (s.st_info) == STB_LOCAL) - rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); - else - { - h = sym_hashes[r_symndx - extsymoff]; - rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); - } - } - else if (r_symndx >= nlocsyms) + if (r_symndx >= nlocsyms + || ELF_ST_BIND (isym[r_symndx].st_info) != STB_LOCAL) { h = sym_hashes[r_symndx - extsymoff]; - rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); + rsec = (*gc_mark_hook) (sec, info, rel, h, NULL); } else { - elf_swap_symbol_in (input_bfd, - locsyms + r_symndx, - locsym_shndx + (locsym_shndx ? r_symndx : 0), - &s); - rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); + rsec = (*gc_mark_hook) (sec, info, rel, NULL, &isym[r_symndx]); } if (rsec && !rsec->gc_mark) @@ -7604,11 +7727,16 @@ elf_gc_mark (info, sec, gc_mark_hook) } out2: - if (!info->keep_memory) + if (elf_section_data (sec)->relocs != relstart) free (relstart); out1: - if (freesyms) - free (freesyms); + if (isym != NULL && symtab_hdr->contents != (unsigned char *) isym) + { + if (! info->keep_memory) + free (isym); + else + symtab_hdr->contents = (unsigned char *) isym; + } } return ret; @@ -7619,9 +7747,8 @@ elf_gc_mark (info, sec, gc_mark_hook) static boolean elf_gc_sweep (info, gc_sweep_hook) struct bfd_link_info *info; - boolean (*gc_sweep_hook) - PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o, - const Elf_Internal_Rela *relocs)); + boolean (*gc_sweep_hook) PARAMS ((bfd *, struct bfd_link_info *, + asection *, const Elf_Internal_Rela *)); { bfd *sub; @@ -7665,7 +7792,7 @@ elf_gc_sweep (info, gc_sweep_hook) r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs); - if (!info->keep_memory) + if (elf_section_data (o)->relocs != internal_relocs) free (internal_relocs); if (!r) @@ -7836,7 +7963,7 @@ elf_gc_sections (abfd, info) boolean ok = true; bfd *sub; asection * (*gc_mark_hook) - PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *h, Elf_Internal_Sym *)); if (!get_elf_backend_data (abfd)->can_gc_sections @@ -8163,7 +8290,6 @@ elf_reloc_symbol_deleted_p (offset, cookie) for (; rcookie->rel < rcookie->relend; rcookie->rel++) { unsigned long r_symndx = ELF_R_SYM (rcookie->rel->r_info); - Elf_Internal_Sym isym; if (! rcookie->bad_symtab) if (rcookie->rel->r_offset > offset) @@ -8171,21 +8297,8 @@ elf_reloc_symbol_deleted_p (offset, cookie) if (rcookie->rel->r_offset != offset) continue; - if (rcookie->locsyms && r_symndx < rcookie->locsymcount) - { - Elf_External_Sym *lsym; - Elf_External_Sym_Shndx *lshndx; - - lsym = (Elf_External_Sym *) rcookie->locsyms + r_symndx; - lshndx = (Elf_External_Sym_Shndx *) rcookie->locsym_shndx; - if (lshndx != NULL) - lshndx += r_symndx; - elf_swap_symbol_in (rcookie->abfd, lsym, lshndx, &isym); - } - if (r_symndx >= rcookie->locsymcount - || (rcookie->locsyms - && ELF_ST_BIND (isym.st_info) != STB_LOCAL)) + || ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL) { struct elf_link_hash_entry *h; @@ -8202,17 +8315,19 @@ elf_reloc_symbol_deleted_p (offset, cookie) else return false; } - else if (rcookie->locsyms) + else { /* It's not a relocation against a global symbol, but it could be a relocation against a local symbol for a discarded section. */ asection *isec; + Elf_Internal_Sym *isym; /* Need to: get the symbol; get the section. */ - if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE) + isym = &rcookie->locsyms[r_symndx]; + if (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE) { - isec = section_from_elf_index (rcookie->abfd, isym.st_shndx); + isec = section_from_elf_index (rcookie->abfd, isym->st_shndx); if (isec != NULL && elf_discarded_section (isec)) return true; } @@ -8235,8 +8350,6 @@ elf_bfd_discard_info (output_bfd, info) struct elf_reloc_cookie cookie; asection *stab, *eh, *ehdr; Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Shdr *shndx_hdr; - Elf_External_Sym *freesyms; struct elf_backend_data *bed; bfd *abfd; boolean ret = false; @@ -8267,11 +8380,19 @@ elf_bfd_discard_info (output_bfd, info) if (ehdr) { eh = bfd_get_section_by_name (abfd, ".eh_frame"); - if (eh && eh->_raw_size == 0) + if (eh && (eh->_raw_size == 0 + || bfd_is_abs_section (eh->output_section))) eh = NULL; } - stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab"); + stab = NULL; + if (!strip) + { + stab = bfd_get_section_by_name (abfd, ".stab"); + if (stab && (stab->_raw_size == 0 + || bfd_is_abs_section (stab->output_section))) + stab = NULL; + } if ((! stab || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS) && ! eh @@ -8279,8 +8400,6 @@ elf_bfd_discard_info (output_bfd, info) continue; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - cookie.abfd = abfd; cookie.sym_hashes = elf_sym_hashes (abfd); cookie.bad_symtab = elf_bad_symtab (abfd); @@ -8296,48 +8415,20 @@ elf_bfd_discard_info (output_bfd, info) cookie.extsymoff = symtab_hdr->sh_info; } - freesyms = NULL; - if (symtab_hdr->contents) - cookie.locsyms = (void *) symtab_hdr->contents; - else if (cookie.locsymcount == 0) - cookie.locsyms = NULL; - else + cookie.locsyms = (Elf_Internal_Sym *) symtab_hdr->contents; + if (cookie.locsyms == NULL && cookie.locsymcount != 0) { - bfd_size_type amt = cookie.locsymcount * sizeof (Elf_External_Sym); - cookie.locsyms = bfd_malloc (amt); + cookie.locsyms = bfd_elf_get_elf_syms (abfd, symtab_hdr, + cookie.locsymcount, 0, + NULL, NULL, NULL); if (cookie.locsyms == NULL) return false; - freesyms = cookie.locsyms; - if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (cookie.locsyms, amt, abfd) != amt) - { - error_ret_free_loc: - free (cookie.locsyms); - return false; - } - } - - cookie.locsym_shndx = NULL; - if (shndx_hdr->sh_size != 0 && cookie.locsymcount != 0) - { - bfd_size_type amt; - amt = cookie.locsymcount * sizeof (Elf_External_Sym_Shndx); - cookie.locsym_shndx = bfd_malloc (amt); - if (cookie.locsym_shndx == NULL) - goto error_ret_free_loc; - if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (cookie.locsym_shndx, amt, abfd) != amt) - { - free (cookie.locsym_shndx); - goto error_ret_free_loc; - } } if (stab) { cookie.rels = (NAME(_bfd_elf,link_read_relocs) - (abfd, stab, (PTR) NULL, - (Elf_Internal_Rela *) NULL, + (abfd, stab, (PTR) NULL, (Elf_Internal_Rela *) NULL, info->keep_memory)); if (cookie.rels) { @@ -8349,7 +8440,7 @@ elf_bfd_discard_info (output_bfd, info) elf_reloc_symbol_deleted_p, &cookie)) ret = true; - if (! info->keep_memory) + if (elf_section_data (stab)->relocs != cookie.rels) free (cookie.rels); } } @@ -8372,8 +8463,13 @@ elf_bfd_discard_info (output_bfd, info) if (_bfd_elf_discard_section_eh_frame (abfd, info, eh, ehdr, elf_reloc_symbol_deleted_p, &cookie)) - ret = true; - if (! info->keep_memory) + { + /* Relocs have been edited. Ensure edited version is + used later in relocate_section. */ + elf_section_data (eh)->relocs = cookie.rels; + ret = true; + } + if (cookie.rels && elf_section_data (eh)->relocs != cookie.rels) free (cookie.rels); } @@ -8383,11 +8479,14 @@ elf_bfd_discard_info (output_bfd, info) ret = true; } - if (cookie.locsym_shndx != NULL) - free (cookie.locsym_shndx); - - if (freesyms != NULL) - free (freesyms); + if (cookie.locsyms != NULL + && symtab_hdr->contents != (unsigned char *) cookie.locsyms) + { + if (! info->keep_memory) + free (cookie.locsyms); + else + symtab_hdr->contents = (unsigned char *) cookie.locsyms; + } } if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr)) diff --git a/contrib/binutils/bfd/elfxx-ia64.c b/contrib/binutils/bfd/elfxx-ia64.c index f92ab6a..5302bf6 100644 --- a/contrib/binutils/bfd/elfxx-ia64.c +++ b/contrib/binutils/bfd/elfxx-ia64.c @@ -79,6 +79,9 @@ struct elfNN_ia64_dyn_sym_info bfd_vma pltoff_offset; bfd_vma plt_offset; bfd_vma plt2_offset; + bfd_vma tprel_offset; + bfd_vma dtpmod_offset; + bfd_vma dtprel_offset; /* The symbol table entry, if any, that this was derrived from. */ struct elf_link_hash_entry *h; @@ -97,6 +100,9 @@ struct elfNN_ia64_dyn_sym_info unsigned got_done : 1; unsigned fptr_done : 1; unsigned pltoff_done : 1; + unsigned tprel_done : 1; + unsigned dtpmod_done : 1; + unsigned dtprel_done : 1; /* True for the different kinds of linker data we want created. */ unsigned want_got : 1; @@ -105,6 +111,9 @@ struct elfNN_ia64_dyn_sym_info unsigned want_plt : 1; unsigned want_plt2 : 1; unsigned want_pltoff : 1; + unsigned want_tprel : 1; + unsigned want_dtpmod : 1; + unsigned want_dtprel : 1; }; struct elfNN_ia64_local_hash_entry @@ -165,7 +174,7 @@ static boolean elfNN_ia64_relax_section static boolean is_unwind_section_name PARAMS ((bfd *abfd, const char *)); static boolean elfNN_ia64_section_from_shdr - PARAMS ((bfd *, ElfNN_Internal_Shdr *, char *)); + PARAMS ((bfd *, ElfNN_Internal_Shdr *, const char *)); static boolean elfNN_ia64_section_flags PARAMS ((flagword *, ElfNN_Internal_Shdr *)); static boolean elfNN_ia64_fake_sections @@ -202,7 +211,8 @@ static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table, const char *string)); static void elfNN_ia64_hash_copy_indirect - PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); + PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, + struct elf_link_hash_entry *)); static void elfNN_ia64_hash_hide_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean)); static struct bfd_link_hash_table *elfNN_ia64_hash_table_create @@ -285,6 +295,10 @@ static bfd_vma set_pltoff_entry PARAMS ((bfd *abfd, struct bfd_link_info *info, struct elfNN_ia64_dyn_sym_info *dyn_i, bfd_vma value, boolean)); +static bfd_vma elfNN_ia64_tprel_base + PARAMS ((struct bfd_link_info *info)); +static bfd_vma elfNN_ia64_dtprel_base + PARAMS ((struct bfd_link_info *info)); static int elfNN_ia64_unwind_entry_compare PARAMS ((const PTR, const PTR)); static boolean elfNN_ia64_final_link @@ -423,10 +437,25 @@ static reloc_howto_type ia64_howto_table[] = IA64_HOWTO (R_IA64_LTOFF22X, "LTOFF22X", 0, false, true), IA64_HOWTO (R_IA64_LDXMOV, "LDXMOV", 0, false, true), + IA64_HOWTO (R_IA64_TPREL14, "TPREL14", 0, false, false), IA64_HOWTO (R_IA64_TPREL22, "TPREL22", 0, false, false), + IA64_HOWTO (R_IA64_TPREL64I, "TPREL64I", 0, false, false), IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 8, false, false), IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 8, false, false), - IA64_HOWTO (R_IA64_LTOFF_TP22, "LTOFF_TP22", 0, false, false), + IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, false, false), + + IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 8, false, false), + IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 8, false, false), + IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, false, false), + + IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL22, "DTPREL22", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL64I, "DTPREL64I", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 4, false, false), + IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 4, false, false), + IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 8, false, false), + IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 8, false, false), + IA64_HOWTO (R_IA64_LTOFF_DTPREL22, "LTOFF_DTPREL22", 0, false, false), }; static unsigned char elf_code_to_howto_index[R_IA64_MAX_RELOC_CODE + 1]; @@ -541,10 +570,25 @@ elfNN_ia64_reloc_type_lookup (abfd, bfd_code) case BFD_RELOC_IA64_LTOFF22X: rtype = R_IA64_LTOFF22X; break; case BFD_RELOC_IA64_LDXMOV: rtype = R_IA64_LDXMOV; break; + case BFD_RELOC_IA64_TPREL14: rtype = R_IA64_TPREL14; break; case BFD_RELOC_IA64_TPREL22: rtype = R_IA64_TPREL22; break; + case BFD_RELOC_IA64_TPREL64I: rtype = R_IA64_TPREL64I; break; case BFD_RELOC_IA64_TPREL64MSB: rtype = R_IA64_TPREL64MSB; break; case BFD_RELOC_IA64_TPREL64LSB: rtype = R_IA64_TPREL64LSB; break; - case BFD_RELOC_IA64_LTOFF_TP22: rtype = R_IA64_LTOFF_TP22; break; + case BFD_RELOC_IA64_LTOFF_TPREL22: rtype = R_IA64_LTOFF_TPREL22; break; + + case BFD_RELOC_IA64_DTPMOD64MSB: rtype = R_IA64_DTPMOD64MSB; break; + case BFD_RELOC_IA64_DTPMOD64LSB: rtype = R_IA64_DTPMOD64LSB; break; + case BFD_RELOC_IA64_LTOFF_DTPMOD22: rtype = R_IA64_LTOFF_DTPMOD22; break; + + case BFD_RELOC_IA64_DTPREL14: rtype = R_IA64_DTPREL14; break; + case BFD_RELOC_IA64_DTPREL22: rtype = R_IA64_DTPREL22; break; + case BFD_RELOC_IA64_DTPREL64I: rtype = R_IA64_DTPREL64I; break; + case BFD_RELOC_IA64_DTPREL32MSB: rtype = R_IA64_DTPREL32MSB; break; + case BFD_RELOC_IA64_DTPREL32LSB: rtype = R_IA64_DTPREL32LSB; break; + case BFD_RELOC_IA64_DTPREL64MSB: rtype = R_IA64_DTPREL64MSB; break; + case BFD_RELOC_IA64_DTPREL64LSB: rtype = R_IA64_DTPREL64LSB; break; + case BFD_RELOC_IA64_LTOFF_DTPREL22: rtype = R_IA64_LTOFF_DTPREL22; break; default: return 0; } @@ -648,15 +692,10 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) }; Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Shdr *shndx_hdr; Elf_Internal_Rela *internal_relocs; - Elf_Internal_Rela *free_relocs = NULL; Elf_Internal_Rela *irel, *irelend; bfd_byte *contents; - bfd_byte *free_contents = NULL; - ElfNN_External_Sym *extsyms; - ElfNN_External_Sym *free_extsyms = NULL; - Elf_External_Sym_Shndx *shndx_buf = NULL; + Elf_Internal_Sym *isymbuf = NULL; struct elfNN_ia64_link_hash_table *ia64_info; struct one_fixup *fixups = NULL; boolean changed_contents = false; @@ -683,10 +722,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory)); if (internal_relocs == NULL) - goto error_return; - - if (! link_info->keep_memory) - free_relocs = internal_relocs; + return false; ia64_info = elfNN_ia64_hash_table (link_info); irelend = internal_relocs + sec->reloc_count; @@ -698,8 +734,8 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) /* No branch-type relocations. */ if (irel == irelend) { - if (free_relocs != NULL) - free (free_relocs); + if (elf_section_data (sec)->relocs != internal_relocs) + free (internal_relocs); return true; } @@ -711,48 +747,15 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) contents = (bfd_byte *) bfd_malloc (sec->_raw_size); if (contents == NULL) goto error_return; - free_contents = contents; if (! bfd_get_section_contents (abfd, sec, contents, (file_ptr) 0, sec->_raw_size)) goto error_return; } - /* Read this BFD's local symbols. */ - if (symtab_hdr->contents != NULL) - extsyms = (ElfNN_External_Sym *) symtab_hdr->contents; - else - { - bfd_size_type amt; - - amt = symtab_hdr->sh_info * sizeof (ElfNN_External_Sym); - extsyms = (ElfNN_External_Sym *) bfd_malloc (amt); - if (extsyms == NULL) - goto error_return; - free_extsyms = extsyms; - if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (extsyms, amt, abfd) != amt) - goto error_return; - } - - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; - if (shndx_hdr->sh_size != 0) - { - bfd_size_type amt; - - amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx); - shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt); - if (shndx_buf == NULL) - goto error_return; - if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0 - || bfd_bread (shndx_buf, amt, abfd) != amt) - goto error_return; - } - for (; irel < irelend; irel++) { bfd_vma symaddr, reladdr, trampoff, toff, roff; - Elf_Internal_Sym isym; asection *tsec; struct one_fixup *f; bfd_size_type amt; @@ -763,25 +766,34 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) /* Get the value of the symbol referred to by the reloc. */ if (ELFNN_R_SYM (irel->r_info) < symtab_hdr->sh_info) { - ElfNN_External_Sym *esym; - Elf_External_Sym_Shndx *shndx; - /* A local symbol. */ - esym = extsyms + ELFNN_R_SYM (irel->r_info); - shndx = shndx_buf + (shndx_buf ? ELFNN_R_SYM (irel->r_info) : 0); - bfd_elfNN_swap_symbol_in (abfd, esym, shndx, &isym); - if (isym.st_shndx == SHN_UNDEF) + Elf_Internal_Sym *isym; + + /* Read this BFD's local symbols. */ + if (isymbuf == NULL) + { + isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; + if (isymbuf == NULL) + isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr, + symtab_hdr->sh_info, 0, + NULL, NULL, NULL); + if (isymbuf == 0) + goto error_return; + } + + isym = isymbuf + ELF64_R_SYM (irel->r_info); + if (isym->st_shndx == SHN_UNDEF) continue; /* We can't do anthing with undefined symbols. */ - else if (isym.st_shndx == SHN_ABS) + else if (isym->st_shndx == SHN_ABS) tsec = bfd_abs_section_ptr; - else if (isym.st_shndx == SHN_COMMON) + else if (isym->st_shndx == SHN_COMMON) tsec = bfd_com_section_ptr; - else if (isym.st_shndx == SHN_IA_64_ANSI_COMMON) + else if (isym->st_shndx == SHN_IA_64_ANSI_COMMON) tsec = bfd_com_section_ptr; else - tsec = bfd_section_from_elf_index (abfd, isym.st_shndx); + tsec = bfd_section_from_elf_index (abfd, isym->st_shndx); - toff = isym.st_value; + toff = isym->st_value; } else { @@ -929,50 +941,50 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) free (f); } - if (changed_relocs) - elf_section_data (sec)->relocs = internal_relocs; - else if (free_relocs != NULL) - free (free_relocs); - - if (changed_contents) - elf_section_data (sec)->this_hdr.contents = contents; - else if (free_contents != NULL) + if (isymbuf != NULL + && symtab_hdr->contents != (unsigned char *) isymbuf) { if (! link_info->keep_memory) - free (free_contents); + free (isymbuf); else { - /* Cache the section contents for elf_link_input_bfd. */ - elf_section_data (sec)->this_hdr.contents = contents; + /* Cache the symbols for elf_link_input_bfd. */ + symtab_hdr->contents = (unsigned char *) isymbuf; } } - if (shndx_buf != NULL) - free (shndx_buf); - - if (free_extsyms != NULL) + if (contents != NULL + && elf_section_data (sec)->this_hdr.contents != contents) { - if (! link_info->keep_memory) - free (free_extsyms); + if (!changed_contents && !link_info->keep_memory) + free (contents); else { - /* Cache the symbols for elf_link_input_bfd. */ - symtab_hdr->contents = (unsigned char *) extsyms; + /* Cache the section contents for elf_link_input_bfd. */ + elf_section_data (sec)->this_hdr.contents = contents; } } + if (elf_section_data (sec)->relocs != internal_relocs) + { + if (!changed_relocs) + free (internal_relocs); + else + elf_section_data (sec)->relocs = internal_relocs; + } + *again = changed_contents || changed_relocs; return true; error_return: - if (free_relocs != NULL) - free (free_relocs); - if (free_contents != NULL) - free (free_contents); - if (shndx_buf != NULL) - free (shndx_buf); - if (free_extsyms != NULL) - free (free_extsyms); + if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents) + free (isymbuf); + if (contents != NULL + && elf_section_data (sec)->this_hdr.contents != contents) + free (contents); + if (internal_relocs != NULL + && elf_section_data (sec)->relocs != internal_relocs) + free (internal_relocs); return false; } @@ -1004,7 +1016,7 @@ static boolean elfNN_ia64_section_from_shdr (abfd, hdr, name) bfd *abfd; ElfNN_Internal_Shdr *hdr; - char *name; + const char *name; { asection *newsect; @@ -1358,8 +1370,6 @@ elfNN_ia64_modify_segment_map (abfd) struct elf_segment_map *m, **pm; Elf_Internal_Shdr *hdr; asection *s; - boolean unwind_found; - asection *unwind_sec; /* If we need a PT_IA_64_ARCHEXT segment, it must come before all PT_LOAD segments. */ @@ -1404,20 +1414,16 @@ elfNN_ia64_modify_segment_map (abfd) for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next) if (m->p_type == PT_IA_64_UNWIND) { + int i; + /* Look through all sections in the unwind segment for a match since there may be multiple sections to a segment. */ + for (i = m->count - 1; i >= 0; --i) + if (m->sections[i] == s) + break; - unwind_sec = m->sections[0]; - unwind_found = false; - while (unwind_sec != NULL && !unwind_found) - { - if (unwind_sec == s) - unwind_found = true; - else - unwind_sec = unwind_sec -> next; - } - if (unwind_found) + if (i >= 0) break; } @@ -1588,7 +1594,8 @@ elfNN_ia64_new_elf_hash_entry (entry, table, string) } static void -elfNN_ia64_hash_copy_indirect (xdir, xind) +elfNN_ia64_hash_copy_indirect (bed, xdir, xind) + struct elf_backend_data *bed ATTRIBUTE_UNUSED; struct elf_link_hash_entry *xdir, *xind; { struct elfNN_ia64_link_hash_entry *dir, *ind; @@ -2097,6 +2104,9 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs) NEED_FULL_PLT = 16, NEED_DYNREL = 32, NEED_LTOFF_FPTR = 64, + NEED_TPREL = 128, + NEED_DTPMOD = 256, + NEED_DTPREL = 512 }; struct elf_link_hash_entry *h = NULL; @@ -2134,11 +2144,42 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs) need_entry = 0; switch (ELFNN_R_TYPE (rel->r_info)) { - case R_IA64_TPREL22: case R_IA64_TPREL64MSB: case R_IA64_TPREL64LSB: - case R_IA64_LTOFF_TP22: - return false; + if (info->shared || maybe_dynamic) + need_entry = NEED_DYNREL; + dynrel_type = R_IA64_TPREL64LSB; + if (info->shared) + info->flags |= DF_STATIC_TLS; + break; + + case R_IA64_LTOFF_TPREL22: + need_entry = NEED_TPREL; + if (info->shared) + info->flags |= DF_STATIC_TLS; + break; + + case R_IA64_DTPREL64MSB: + case R_IA64_DTPREL64LSB: + if (info->shared || maybe_dynamic) + need_entry = NEED_DYNREL; + dynrel_type = R_IA64_DTPREL64LSB; + break; + + case R_IA64_LTOFF_DTPREL22: + need_entry = NEED_DTPREL; + break; + + case R_IA64_DTPMOD64MSB: + case R_IA64_DTPMOD64LSB: + if (info->shared || maybe_dynamic) + need_entry = NEED_DYNREL; + dynrel_type = R_IA64_DTPMOD64LSB; + break; + + case R_IA64_LTOFF_DTPMOD22: + need_entry = NEED_DTPMOD; + break; case R_IA64_LTOFF_FPTR22: case R_IA64_LTOFF_FPTR64I: @@ -2248,7 +2289,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs) dyn_i->h = h; /* Create what's needed. */ - if (need_entry & NEED_GOT) + if (need_entry & (NEED_GOT | NEED_TPREL | NEED_DTPMOD | NEED_DTPREL)) { if (!got) { @@ -2256,7 +2297,14 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs) if (!got) return false; } - dyn_i->want_got = 1; + if (need_entry & NEED_GOT) + dyn_i->want_got = 1; + if (need_entry & NEED_TPREL) + dyn_i->want_tprel = 1; + if (need_entry & NEED_DTPMOD) + dyn_i->want_dtpmod = 1; + if (need_entry & NEED_DTPREL) + dyn_i->want_dtprel = 1; } if (need_entry & NEED_FPTR) { @@ -2336,6 +2384,21 @@ allocate_global_data_got (dyn_i, data) dyn_i->got_offset = x->ofs; x->ofs += 8; } + if (dyn_i->want_tprel) + { + dyn_i->tprel_offset = x->ofs; + x->ofs += 8; + } + if (dyn_i->want_dtpmod) + { + dyn_i->dtpmod_offset = x->ofs; + x->ofs += 8; + } + if (dyn_i->want_dtprel) + { + dyn_i->dtprel_offset = x->ofs; + x->ofs += 8; + } return true; } @@ -2582,6 +2645,10 @@ allocate_dynrel_entries (dyn_i, data) if (!dynamic_symbol) count *= 2; break; + case R_IA64_TPREL64LSB: + case R_IA64_DTPREL64LSB: + case R_IA64_DTPMOD64LSB: + break; default: abort (); } @@ -2593,6 +2660,12 @@ allocate_dynrel_entries (dyn_i, data) if (((dynamic_symbol || shared) && dyn_i->want_got) || (dyn_i->want_ltoff_fptr && dyn_i->h && dyn_i->h->dynindx != -1)) ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela); + if ((dynamic_symbol || shared) && dyn_i->want_tprel) + ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela); + if ((dynamic_symbol || shared) && dyn_i->want_dtpmod) + ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela); + if (dynamic_symbol && dyn_i->want_dtprel) + ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela); if (dyn_i->want_pltoff) { @@ -2903,7 +2976,11 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) /* Instruction relocations. */ - case R_IA64_IMM14: opnd = IA64_OPND_IMM14; break; + case R_IA64_IMM14: + case R_IA64_TPREL14: + case R_IA64_DTPREL14: + opnd = IA64_OPND_IMM14; + break; case R_IA64_PCREL21F: opnd = IA64_OPND_TGT25; break; case R_IA64_PCREL21M: opnd = IA64_OPND_TGT25b; break; @@ -2920,6 +2997,11 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_PLTOFF22: case R_IA64_PCREL22: case R_IA64_LTOFF_FPTR22: + case R_IA64_TPREL22: + case R_IA64_DTPREL22: + case R_IA64_LTOFF_TPREL22: + case R_IA64_LTOFF_DTPMOD22: + case R_IA64_LTOFF_DTPREL22: opnd = IA64_OPND_IMM22; break; @@ -2930,6 +3012,8 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_PCREL64I: case R_IA64_FPTR64I: case R_IA64_LTOFF_FPTR64I: + case R_IA64_TPREL64I: + case R_IA64_DTPREL64I: opnd = IA64_OPND_IMMU64; break; @@ -2943,6 +3027,7 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_SEGREL32MSB: case R_IA64_SECREL32MSB: case R_IA64_LTV32MSB: + case R_IA64_DTPREL32MSB: size = 4; bigendian = 1; break; @@ -2954,6 +3039,7 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_SEGREL32LSB: case R_IA64_SECREL32LSB: case R_IA64_LTV32LSB: + case R_IA64_DTPREL32LSB: size = 4; bigendian = 0; break; @@ -2966,6 +3052,9 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_SEGREL64MSB: case R_IA64_SECREL64MSB: case R_IA64_LTV64MSB: + case R_IA64_TPREL64MSB: + case R_IA64_DTPMOD64MSB: + case R_IA64_DTPREL64MSB: size = 8; bigendian = 1; break; @@ -2978,6 +3067,9 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type) case R_IA64_SEGREL64LSB: case R_IA64_SECREL64LSB: case R_IA64_LTV64LSB: + case R_IA64_TPREL64LSB: + case R_IA64_DTPMOD64LSB: + case R_IA64_DTPREL64LSB: size = 8; bigendian = 0; break; @@ -3132,26 +3224,53 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type) { struct elfNN_ia64_link_hash_table *ia64_info; asection *got_sec; + boolean done; + bfd_vma got_offset; ia64_info = elfNN_ia64_hash_table (info); got_sec = ia64_info->got_sec; - BFD_ASSERT ((dyn_i->got_offset & 7) == 0); - - if (! dyn_i->got_done) + switch (dyn_r_type) { + case R_IA64_TPREL64LSB: + done = dyn_i->tprel_done; + dyn_i->tprel_done = true; + got_offset = dyn_i->tprel_offset; + break; + case R_IA64_DTPMOD64LSB: + done = dyn_i->dtpmod_done; + dyn_i->dtpmod_done = true; + got_offset = dyn_i->dtpmod_offset; + break; + case R_IA64_DTPREL64LSB: + done = dyn_i->dtprel_done; + dyn_i->dtprel_done = true; + got_offset = dyn_i->dtprel_offset; + break; + default: + done = dyn_i->got_done; dyn_i->got_done = true; + got_offset = dyn_i->got_offset; + break; + } + + BFD_ASSERT ((got_offset & 7) == 0); + if (! done) + { /* Store the target address in the linkage table entry. */ - bfd_put_64 (abfd, value, got_sec->contents + dyn_i->got_offset); + bfd_put_64 (abfd, value, got_sec->contents + got_offset); /* Install a dynamic relocation if needed. */ - if (info->shared + if ((info->shared && dyn_r_type != R_IA64_DTPREL64LSB) || elfNN_ia64_dynamic_symbol_p (dyn_i->h, info) || elfNN_ia64_aix_vec (abfd->xvec) || (dynindx != -1 && dyn_r_type == R_IA64_FPTR64LSB)) { - if (dynindx == -1) + if (dynindx == -1 + && dyn_r_type != R_IA64_TPREL64LSB + && dyn_r_type != R_IA64_DTPMOD64LSB + && dyn_r_type != R_IA64_DTPREL64LSB) { dyn_r_type = R_IA64_REL64LSB; dynindx = 0; @@ -3171,6 +3290,15 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type) case R_IA64_FPTR64LSB: dyn_r_type = R_IA64_FPTR64MSB; break; + case R_IA64_TPREL64LSB: + dyn_r_type = R_IA64_TPREL64MSB; + break; + case R_IA64_DTPMOD64LSB: + dyn_r_type = R_IA64_DTPMOD64MSB; + break; + case R_IA64_DTPREL64LSB: + dyn_r_type = R_IA64_DTPREL64MSB; + break; default: BFD_ASSERT (false); break; @@ -3179,7 +3307,7 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type) elfNN_ia64_install_dyn_reloc (abfd, NULL, got_sec, ia64_info->rel_got_sec, - dyn_i->got_offset, dyn_r_type, + got_offset, dyn_r_type, dynindx, addend); } } @@ -3187,7 +3315,7 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type) /* Return the address of the linkage table entry. */ value = (got_sec->output_section->vma + got_sec->output_offset - + dyn_i->got_offset); + + got_offset); return value; } @@ -3285,6 +3413,35 @@ set_pltoff_entry (abfd, info, dyn_i, value, is_plt) return value; } +/* Return the base VMA address which should be subtracted from real addresses + when resolving @tprel() relocation. + Main program TLS (whose template starts at PT_TLS p_vaddr) + is assigned offset round(16, PT_TLS p_align). */ + +static bfd_vma +elfNN_ia64_tprel_base (info) + struct bfd_link_info *info; +{ + struct elf_link_tls_segment *tls_segment + = elf_hash_table (info)->tls_segment; + + BFD_ASSERT (tls_segment != NULL); + return (tls_segment->start + - align_power ((bfd_vma) 16, tls_segment->align)); +} + +/* Return the base VMA address which should be subtracted from real addresses + when resolving @dtprel() relocation. + This is PT_TLS segment p_vaddr. */ + +static bfd_vma +elfNN_ia64_dtprel_base (info) + struct bfd_link_info *info; +{ + BFD_ASSERT (elf_hash_table (info)->tls_segment != NULL); + return elf_hash_table (info)->tls_segment->start; +} + /* Called through qsort to sort the .IA_64.unwind section during a non-relocatable link. Set elfNN_ia64_unwind_entry_compare_bfd to the output bfd so we can do proper endianness frobbing. */ @@ -4030,6 +4187,55 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section, r_type); break; + case R_IA64_TPREL14: + case R_IA64_TPREL22: + case R_IA64_TPREL64I: + value -= elfNN_ia64_tprel_base (info); + r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type); + break; + + case R_IA64_DTPREL14: + case R_IA64_DTPREL22: + case R_IA64_DTPREL64I: + value -= elfNN_ia64_dtprel_base (info); + r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type); + break; + + case R_IA64_LTOFF_TPREL22: + case R_IA64_LTOFF_DTPMOD22: + case R_IA64_LTOFF_DTPREL22: + { + int got_r_type; + + switch (r_type) + { + default: + case R_IA64_LTOFF_TPREL22: + if (!dynamic_symbol_p && !info->shared) + value -= elfNN_ia64_tprel_base (info); + got_r_type = R_IA64_TPREL64LSB; + break; + case R_IA64_LTOFF_DTPMOD22: + if (!dynamic_symbol_p && !info->shared) + value = 1; + got_r_type = R_IA64_DTPMOD64LSB; + break; + case R_IA64_LTOFF_DTPREL22: + if (!dynamic_symbol_p) + value -= elfNN_ia64_dtprel_base (info); + got_r_type = R_IA64_DTPREL64LSB; + break; + } + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); + value = set_got_entry (input_bfd, info, dyn_i, + (h ? h->dynindx : -1), rel->r_addend, + value, got_r_type); + value -= gp_val; + r = elfNN_ia64_install_value (output_bfd, hit_addr, value, + r_type); + } + break; + default: r = bfd_reloc_notsupported; break; @@ -4592,6 +4798,9 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval) #undef elf_backend_section_from_bfd_section #define elf_backend_section_from_bfd_section elfNN_hpux_backend_section_from_bfd_section +#undef elf_backend_want_p_paddr_set_to_zero +#define elf_backend_want_p_paddr_set_to_zero 1 + #undef ELF_MAXPAGESIZE #define ELF_MAXPAGESIZE 0x1000 /* 1K */ @@ -4599,3 +4808,5 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval) #define elfNN_bed elfNN_ia64_hpux_bed #include "elfNN-target.h" + +#undef elf_backend_want_p_paddr_set_to_zero diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h index e6b63d1..481ba71 100644 --- a/contrib/binutils/bfd/elfxx-target.h +++ b/contrib/binutils/bfd/elfxx-target.h @@ -44,7 +44,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef bfd_elfNN_get_reloc_upper_bound #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound #endif +#ifndef bfd_elfNN_get_symbol_info #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info +#endif #define bfd_elfNN_get_symtab _bfd_elf_get_symtab #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound #if 0 /* done in elf-bfd.h */ @@ -87,6 +89,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef elf_backend_want_dynbss #define elf_backend_want_dynbss 1 #endif +#ifndef elf_backend_want_p_paddr_set_to_zero +#define elf_backend_want_p_paddr_set_to_zero 0 +#endif #define bfd_elfNN_bfd_debug_info_start bfd_void #define bfd_elfNN_bfd_debug_info_end bfd_void @@ -126,6 +131,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ _bfd_elf_merge_sections #endif +#ifndef bfd_elfNN_bfd_discard_group +#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group +#endif + #ifndef bfd_elfNN_bfd_make_debug_symbol #define bfd_elfNN_bfd_make_debug_symbol \ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) @@ -169,6 +178,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ _bfd_elf_canonicalize_dynamic_reloc #endif +#ifndef bfd_elfNN_bfd_link_hash_table_free +#define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free +#endif + #ifdef elf_backend_relocate_section #ifndef bfd_elfNN_bfd_link_hash_table_create #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create @@ -190,6 +203,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define bfd_elfNN_bfd_final_link _bfd_generic_final_link #endif #endif /* ! defined (elf_backend_relocate_section) */ + +#ifndef bfd_elfNN_bfd_link_just_syms +#define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms +#endif + #ifndef bfd_elfNN_bfd_link_split_section #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section #endif @@ -367,6 +385,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef elf_backend_write_section #define elf_backend_write_section NULL #endif +#ifndef elf_backend_set_nonloadable_filepos +#define elf_backend_set_nonloadable_filepos NULL +#endif +#ifndef elf_backend_is_contained_by_filepos +#define elf_backend_is_contained_by_filepos NULL +#endif +#ifndef elf_backend_copy_private_bfd_data_p +#define elf_backend_copy_private_bfd_data_p NULL +#endif +#ifndef elf_backend_mips_irix_compat +#define elf_backend_mips_irix_compat NULL +#endif +#ifndef elf_backend_mips_rtype_to_howto +#define elf_backend_mips_rtype_to_howto NULL +#endif /* Previously, backends could only use SHT_REL or SHT_RELA relocation sections, but not both. They defined USE_REL to indicate SHT_REL @@ -462,6 +495,11 @@ static const struct elf_backend_data elfNN_bed = elf_backend_discard_info, elf_backend_ignore_discarded_relocs, elf_backend_write_section, + elf_backend_set_nonloadable_filepos, + elf_backend_is_contained_by_filepos, + elf_backend_copy_private_bfd_data_p, + elf_backend_mips_irix_compat, + elf_backend_mips_rtype_to_howto, elf_backend_ecoff_debug_swap, ELF_MACHINE_ALT1, ELF_MACHINE_ALT2, @@ -484,7 +522,8 @@ static const struct elf_backend_data elfNN_bed = elf_backend_can_gc_sections, elf_backend_can_refcount, elf_backend_want_got_sym, - elf_backend_want_dynbss + elf_backend_want_dynbss, + elf_backend_want_p_paddr_set_to_zero }; #endif diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c index f60f0ca..1efa9e2 100644 --- a/contrib/binutils/bfd/format.c +++ b/contrib/binutils/bfd/format.c @@ -1,5 +1,5 @@ /* Generic BFD support for file formats. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -355,7 +355,7 @@ bfd_set_format (abfd, format) } if (abfd->format != bfd_unknown) - return (abfd->format == format) ? true : false; + return abfd->format == format; /* Presume the answer is yes. */ abfd->format = format; diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c index 9766eaf..e7c77fe 100644 --- a/contrib/binutils/bfd/hash.c +++ b/contrib/binutils/bfd/hash.c @@ -1,5 +1,5 @@ /* hash.c -- hash table routines for BFD - Copyright 1993, 1994, 1995, 1997, 1999, 2001 + Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> @@ -375,8 +375,8 @@ bfd_hash_lookup (table, string, create, copy) { hash += c + (c << 17); hash ^= hash >> 2; - ++len; } + len = (s - (const unsigned char *) string) - 1; hash += len + (len << 17); hash ^= hash >> 2; @@ -407,7 +407,7 @@ bfd_hash_lookup (table, string, create, copy) bfd_set_error (bfd_error_no_memory); return (struct bfd_hash_entry *) NULL; } - strcpy (new, string); + memcpy (new, string, len + 1); string = new; } hashp->string = string; diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c index 755b456..c144822 100644 --- a/contrib/binutils/bfd/i386linux.c +++ b/contrib/binutils/bfd/i386linux.c @@ -597,10 +597,9 @@ bfd_i386linux_size_dynamic_sections (output_bfd, info) { s->_raw_size = linux_hash_table (info)->fixup_count + 1; s->_raw_size *= 8; - s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size); + s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size); if (s->contents == NULL) return false; - memset (s->contents, 0, (size_t) s->_raw_size); } return true; diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c index df7cfd6..d1c5eb1 100644 --- a/contrib/binutils/bfd/ieee.c +++ b/contrib/binutils/bfd/ieee.c @@ -471,7 +471,7 @@ must_parse_int (ieee) common_header_type *ieee; { bfd_vma result; - BFD_ASSERT (parse_int (ieee, &result) == true); + BFD_ASSERT (parse_int (ieee, &result)); return result; } @@ -983,7 +983,7 @@ ieee_slurp_external_symbols (abfd) /* Fetch the default size if not resolved */ size = must_parse_int (&(ieee->h)); /* Fetch the defautlt value if available */ - if (parse_int (&(ieee->h), &value) == false) + if (! parse_int (&(ieee->h), &value)) { value = 0; } @@ -1058,7 +1058,7 @@ static boolean ieee_slurp_symbol_table (abfd) bfd *abfd; { - if (IEEE_DATA (abfd)->read_symbols == false) + if (! IEEE_DATA (abfd)->read_symbols) { if (! ieee_slurp_external_symbols (abfd)) return false; @@ -1112,7 +1112,7 @@ ieee_get_symtab (abfd, location) if (! ieee_slurp_symbol_table (abfd)) return -1; - if (ieee->symbol_table_full == false) + if (! ieee->symbol_table_full) { /* Arrgh - there are gaps in the table, run through and fill them */ /* up with pointers to a null place */ @@ -1414,7 +1414,7 @@ ieee_archive_p (abfd) abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt); if (!abfd->tdata.ieee_ar_data) - goto error_return; + goto error_ret_restore; ieee = IEEE_AR_DATA (abfd); /* Ignore the return value here. It doesn't matter if we don't read @@ -1530,13 +1530,13 @@ ieee_archive_p (abfd) return abfd->xvec; got_wrong_format_error: - bfd_release (abfd, ieee); - abfd->tdata.ieee_ar_data = save; bfd_set_error (bfd_error_wrong_format); - error_return: if (elts != NULL) free (elts); + bfd_release (abfd, ieee); + error_ret_restore: + abfd->tdata.ieee_ar_data = save; return NULL; } @@ -1663,11 +1663,11 @@ ieee_object_p (abfd) } next_byte (&(ieee->h)); - if (parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau) == false) + if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau)) { goto fail; } - if (parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address) == false) + if (! parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address)) { goto fail; } @@ -1690,7 +1690,7 @@ ieee_object_p (abfd) } ieee->w.offset[part] = parse_i (&(ieee->h), &ok); - if (ok == false) + if (! ok) { goto fail; } @@ -1732,7 +1732,7 @@ ieee_object_p (abfd) got_wrong_format: bfd_set_error (bfd_error_wrong_format); fail: - (void) bfd_release (abfd, ieee); + bfd_release (abfd, ieee); abfd->tdata.ieee_data = save; return (const bfd_target *) NULL; } @@ -1895,7 +1895,7 @@ do_one (ieee, current_map, location_ptr, s, iterations) case 0: case 4: - if (pcrel == true) + if (pcrel) { #if KEEPMINUSPCININST bfd_put_32 (ieee->h.abfd, -current_map->pc, @@ -1917,7 +1917,7 @@ do_one (ieee, current_map, location_ptr, s, iterations) current_map->pc += 4; break; case 2: - if (pcrel == true) + if (pcrel) { #if KEEPMINUSPCININST bfd_put_16 (ieee->h.abfd, (bfd_vma) -current_map->pc, @@ -1941,7 +1941,7 @@ do_one (ieee, current_map, location_ptr, s, iterations) current_map->pc += 2; break; case 1: - if (pcrel == true) + if (pcrel) { #if KEEPMINUSPCININST bfd_put_8 (ieee->h.abfd, (int) (-current_map->pc), location_ptr + current_map->pc); @@ -1969,7 +1969,7 @@ do_one (ieee, current_map, location_ptr, s, iterations) default: { bfd_vma this_size; - if (parse_int (&(ieee->h), &this_size) == true) + if (parse_int (&(ieee->h), &this_size)) { unsigned int i; for (i = 0; i < this_size; i++) @@ -2007,7 +2007,7 @@ ieee_slurp_section_data (abfd) ieee_per_section_type *current_map = (ieee_per_section_type *) NULL; asection *s; /* Seek to the start of the data area */ - if (ieee->read_data == true) + if (ieee->read_data) return true; ieee->read_data = true; ieee_seek (ieee, ieee->w.r.data_part); @@ -2398,10 +2398,9 @@ do_with_relocs (abfd, s) if ((PTR) stream == (PTR) NULL) { /* Outputting a section without data, fill it up */ - stream = (unsigned char *) (bfd_alloc (abfd, s->_raw_size)); + stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size); if (!stream) return false; - memset ((PTR) stream, 0, (size_t) s->_raw_size); } while (current_byte_index < s->_raw_size) { @@ -2626,7 +2625,7 @@ ieee_mkobject (abfd) output_buffer = 0; amt = sizeof (ieee_data_type); abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, amt); - return abfd->tdata.ieee_data ? true : false; + return abfd->tdata.ieee_data != NULL; } static void @@ -3943,7 +3942,7 @@ ieee_bfd_debug_info_accumulate (abfd, section) if (section->owner->xvec != abfd->xvec) return; /* Only bother once per bfd */ - if (ieee->done_debug == true) + if (ieee->done_debug) return; ieee->done_debug = true; @@ -4010,8 +4009,11 @@ ieee_bfd_debug_info_accumulate (abfd, section) #define ieee_bfd_relax_section bfd_generic_relax_section #define ieee_bfd_gc_sections bfd_generic_gc_sections #define ieee_bfd_merge_sections bfd_generic_merge_sections +#define ieee_bfd_discard_group bfd_generic_discard_group #define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms #define ieee_bfd_final_link _bfd_generic_final_link #define ieee_bfd_link_split_section _bfd_generic_link_split_section @@ -4084,6 +4086,7 @@ const bfd_target ieee_vec = /* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents, ieee_bfd_relax_section, ieee_bfd_link_hash_table_create, + _bfd_generic_link_hash_table_free, ieee_bfd_link_add_symbols, ieee_bfd_final_link, ieee_bfd_link_split_section, ieee_bfd_gc_sections, ieee_bfd_merge_sections */ diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c index 2e4494d..8188c01 100644 --- a/contrib/binutils/bfd/ihex.c +++ b/contrib/binutils/bfd/ihex.c @@ -3,21 +3,21 @@ Free Software Foundation, Inc. Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This is what Intel Hex files look like: @@ -147,12 +147,12 @@ static int ihex_sizeof_headers PARAMS ((bfd *, boolean)); #define CHUNK 16 -/* Macros for converting between hex and binary. */ +/* Macros for converting between hex and binary. */ -#define NIBBLE(x) (hex_value (x)) +#define NIBBLE(x) (hex_value (x)) #define HEX2(buffer) ((NIBBLE ((buffer)[0]) << 4) + NIBBLE ((buffer)[1])) #define HEX4(buffer) ((HEX2 (buffer) << 8) + HEX2 ((buffer) + 2)) -#define ISHEX(x) (hex_p (x)) +#define ISHEX(x) (hex_p (x)) /* When we write out an ihex value, the values can not be output as they are seen. Instead, we hold them in memory in this structure. */ @@ -193,19 +193,16 @@ static boolean ihex_mkobject (abfd) bfd *abfd; { - if (abfd->tdata.ihex_data == NULL) - { - struct ihex_data_struct *tdata; - bfd_size_type amt = sizeof (struct ihex_data_struct); + struct ihex_data_struct *tdata; + bfd_size_type amt = sizeof (struct ihex_data_struct); - tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt); - if (tdata == NULL) - return false; - abfd->tdata.ihex_data = tdata; - tdata->head = NULL; - tdata->tail = NULL; - } + tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt); + if (tdata == NULL) + return false; + abfd->tdata.ihex_data = tdata; + tdata->head = NULL; + tdata->tail = NULL; return true; } @@ -288,6 +285,7 @@ ihex_scan (abfd) lineno = 1; error = false; bufsize = 0; + while ((c = ihex_get_byte (abfd, &error)) != EOF) { if (c == '\r') @@ -314,11 +312,9 @@ ihex_scan (abfd) unsigned int chksum; /* This is a data record. */ - pos = bfd_tell (abfd) - 1; /* Read the header bytes. */ - if (bfd_bread (hdr, (bfd_size_type) 8, abfd) != 8) goto error_return; @@ -336,7 +332,6 @@ ihex_scan (abfd) type = HEX2 (hdr + 6); /* Read the data bytes. */ - chars = len * 2 + 2; if (chars >= bufsize) { @@ -515,6 +510,7 @@ static const bfd_target * ihex_object_p (abfd) bfd *abfd; { + PTR tdata_save; bfd_byte b[9]; unsigned int i; unsigned int type; @@ -553,10 +549,14 @@ ihex_object_p (abfd) } /* OK, it looks like it really is an Intel Hex file. */ - - if (! ihex_mkobject (abfd) - || ! ihex_scan (abfd)) - return NULL; + tdata_save = abfd->tdata.any; + if (! ihex_mkobject (abfd) || ! ihex_scan (abfd)) + { + if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL) + bfd_release (abfd, abfd->tdata.any); + abfd->tdata.any = tdata_save; + return NULL; + } return abfd->xvec; } @@ -980,8 +980,11 @@ ihex_sizeof_headers (abfd, exec) #define ihex_bfd_relax_section bfd_generic_relax_section #define ihex_bfd_gc_sections bfd_generic_gc_sections #define ihex_bfd_merge_sections bfd_generic_merge_sections +#define ihex_bfd_discard_group bfd_generic_discard_group #define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define ihex_bfd_link_just_syms _bfd_generic_link_just_syms #define ihex_bfd_final_link _bfd_generic_final_link #define ihex_bfd_link_split_section _bfd_generic_link_split_section diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h index d7e5c71..a76b935 100644 --- a/contrib/binutils/bfd/libaout.h +++ b/contrib/binutils/bfd/libaout.h @@ -302,6 +302,7 @@ enum machine_type { M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */ M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary */ M_SPARCLET_1 = 147, /* 0x93, reserved */ + M_VAX4K_NETBSD = 150, /* NetBSD/vax 4K pages binary */ M_MIPS1 = 151, /* MIPS R2000/R3000 binary */ M_MIPS2 = 152, /* MIPS R4000/R6000 binary */ M_SPARCLET_2 = 163, /* 0xa3, reserved */ diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h index ed417ca..776dcd6 100644 --- a/contrib/binutils/bfd/libbfd-in.h +++ b/contrib/binutils/bfd/libbfd-in.h @@ -1,7 +1,7 @@ /* libbfd.h -- Declarations used by bfd library *implementation*. (This include file is not for users of the library.) Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -322,10 +322,18 @@ extern boolean _bfd_generic_set_section_contents ((boolean (*) \ PARAMS ((bfd *, struct bfd_link_info *))) \ bfd_false) +#define _bfd_nolink_bfd_discard_group \ + ((boolean (*) \ + PARAMS ((bfd *, struct sec *))) \ + bfd_false) #define _bfd_nolink_bfd_link_hash_table_create \ ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr) +#define _bfd_nolink_bfd_link_hash_table_free \ + ((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void) #define _bfd_nolink_bfd_link_add_symbols \ ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) +#define _bfd_nolink_bfd_link_just_syms \ + ((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void) #define _bfd_nolink_bfd_final_link \ ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) #define _bfd_nolink_bfd_link_split_section \ @@ -389,6 +397,10 @@ extern boolean _bfd_link_hash_table_init extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create PARAMS ((bfd *)); +/* Generic link hash table destruction routine. */ +extern void _bfd_generic_link_hash_table_free + PARAMS ((struct bfd_link_hash_table *)); + /* Generic add symbol routine. */ extern boolean _bfd_generic_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); @@ -404,8 +416,6 @@ extern boolean _bfd_generic_link_add_archive_symbols PARAMS ((bfd *, struct bfd_link_info *, boolean (*checkfn) (bfd *, struct bfd_link_info *, boolean *))); - - /* Forward declaration to avoid prototype errors. */ typedef struct bfd_link_hash_entry _bfd_link_hash_entry; @@ -415,6 +425,10 @@ extern boolean _bfd_generic_link_add_one_symbol asection *, bfd_vma, const char *, boolean copy, boolean constructor, struct bfd_link_hash_entry **)); +/* Generic routine to mark section as supplying symbols only. */ +extern void _bfd_generic_link_just_syms + PARAMS ((asection *, struct bfd_link_info *)); + /* Generic link routine. */ extern boolean _bfd_generic_final_link PARAMS ((bfd *, struct bfd_link_info *)); @@ -579,5 +593,3 @@ extern boolean _bfd_sh_align_load_span boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma), PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *)); -/* And more follows */ - diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c index a397d82..29170a0 100644 --- a/contrib/binutils/bfd/libbfd.c +++ b/contrib/binutils/bfd/libbfd.c @@ -1353,8 +1353,8 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count) return bfd_get_section_contents (abfd, section, w->data, offset, count); } if (offset + count > section->_raw_size - || (bfd_get_file_window (abfd, section->filepos + offset, count, w, true) - == false)) + || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, + true)) return false; return true; #else diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h index 55d192c..3480114 100644 --- a/contrib/binutils/bfd/libbfd.h +++ b/contrib/binutils/bfd/libbfd.h @@ -6,7 +6,7 @@ /* libbfd.h -- Declarations used by bfd library *implementation*. (This include file is not for users of the library.) Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -327,10 +327,18 @@ extern boolean _bfd_generic_set_section_contents ((boolean (*) \ PARAMS ((bfd *, struct bfd_link_info *))) \ bfd_false) +#define _bfd_nolink_bfd_discard_group \ + ((boolean (*) \ + PARAMS ((bfd *, struct sec *))) \ + bfd_false) #define _bfd_nolink_bfd_link_hash_table_create \ ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr) +#define _bfd_nolink_bfd_link_hash_table_free \ + ((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void) #define _bfd_nolink_bfd_link_add_symbols \ ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) +#define _bfd_nolink_bfd_link_just_syms \ + ((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void) #define _bfd_nolink_bfd_final_link \ ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) #define _bfd_nolink_bfd_link_split_section \ @@ -394,6 +402,10 @@ extern boolean _bfd_link_hash_table_init extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create PARAMS ((bfd *)); +/* Generic link hash table destruction routine. */ +extern void _bfd_generic_link_hash_table_free + PARAMS ((struct bfd_link_hash_table *)); + /* Generic add symbol routine. */ extern boolean _bfd_generic_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); @@ -409,8 +421,6 @@ extern boolean _bfd_generic_link_add_archive_symbols PARAMS ((bfd *, struct bfd_link_info *, boolean (*checkfn) (bfd *, struct bfd_link_info *, boolean *))); - - /* Forward declaration to avoid prototype errors. */ typedef struct bfd_link_hash_entry _bfd_link_hash_entry; @@ -420,6 +430,10 @@ extern boolean _bfd_generic_link_add_one_symbol asection *, bfd_vma, const char *, boolean copy, boolean constructor, struct bfd_link_hash_entry **)); +/* Generic routine to mark section as supplying symbols only. */ +extern void _bfd_generic_link_just_syms + PARAMS ((asection *, struct bfd_link_info *)); + /* Generic link routine. */ extern boolean _bfd_generic_final_link PARAMS ((bfd *, struct bfd_link_info *)); @@ -584,14 +598,15 @@ extern boolean _bfd_sh_align_load_span boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma), PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *)); -/* And more follows */ - +/* Extracted from init.c. */ +/* Extracted from libbfd.c. */ boolean bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int)); unsigned int bfd_log2 PARAMS ((bfd_vma x)); +/* Extracted from cache.c. */ #define BFD_CACHE_MAX_OPEN 10 extern bfd *bfd_last_cache; @@ -611,6 +626,7 @@ bfd_open_file PARAMS ((bfd *abfd)); FILE * bfd_cache_lookup_worker PARAMS ((bfd *abfd)); +/* Extracted from reloc.c. */ #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", @@ -722,6 +738,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_ALPHA_GPREL_HI16", "BFD_RELOC_ALPHA_GPREL_LO16", "BFD_RELOC_ALPHA_BRSGP", + "BFD_RELOC_ALPHA_TLSGD", + "BFD_RELOC_ALPHA_TLSLDM", + "BFD_RELOC_ALPHA_DTPMOD64", + "BFD_RELOC_ALPHA_GOTDTPREL16", + "BFD_RELOC_ALPHA_DTPREL64", + "BFD_RELOC_ALPHA_DTPREL_HI16", + "BFD_RELOC_ALPHA_DTPREL_LO16", + "BFD_RELOC_ALPHA_DTPREL16", + "BFD_RELOC_ALPHA_GOTTPREL16", + "BFD_RELOC_ALPHA_TPREL64", + "BFD_RELOC_ALPHA_TPREL_HI16", + "BFD_RELOC_ALPHA_TPREL_LO16", + "BFD_RELOC_ALPHA_TPREL16", "BFD_RELOC_MIPS_JMP", "BFD_RELOC_MIPS16_JMP", "BFD_RELOC_MIPS16_GPREL", @@ -752,6 +781,15 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MIPS_REL16", "BFD_RELOC_MIPS_RELGOT", "BFD_RELOC_MIPS_JALR", + "BFD_RELOC_FRV_LABEL16", + "BFD_RELOC_FRV_LABEL24", + "BFD_RELOC_FRV_LO16", + "BFD_RELOC_FRV_HI16", + "BFD_RELOC_FRV_GPREL12", + "BFD_RELOC_FRV_GPRELU12", + "BFD_RELOC_FRV_GPREL32", + "BFD_RELOC_FRV_GPRELHI", + "BFD_RELOC_FRV_GPRELLO", "BFD_RELOC_386_GOT32", "BFD_RELOC_386_PLT32", @@ -761,6 +799,18 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_386_RELATIVE", "BFD_RELOC_386_GOTOFF", "BFD_RELOC_386_GOTPC", + "BFD_RELOC_386_TLS_TPOFF", + "BFD_RELOC_386_TLS_IE", + "BFD_RELOC_386_TLS_GOTIE", + "BFD_RELOC_386_TLS_LE", + "BFD_RELOC_386_TLS_GD", + "BFD_RELOC_386_TLS_LDM", + "BFD_RELOC_386_TLS_LDO_32", + "BFD_RELOC_386_TLS_IE_32", + "BFD_RELOC_386_TLS_LE_32", + "BFD_RELOC_386_TLS_DTPMOD32", + "BFD_RELOC_386_TLS_DTPOFF32", + "BFD_RELOC_386_TLS_TPOFF32", "BFD_RELOC_X86_64_GOT32", "BFD_RELOC_X86_64_PLT32", "BFD_RELOC_X86_64_COPY", @@ -967,6 +1017,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_D30V_21_PCREL_R", "BFD_RELOC_D30V_32", "BFD_RELOC_D30V_32_PCREL", + "BFD_RELOC_DLX_HI16_S", + "BFD_RELOC_DLX_LO16", + "BFD_RELOC_DLX_JMP26", "BFD_RELOC_M32R_24", "BFD_RELOC_M32R_10_PCREL", "BFD_RELOC_M32R_18_PCREL", @@ -1132,12 +1185,25 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_IA64_IPLTMSB", "BFD_RELOC_IA64_IPLTLSB", "BFD_RELOC_IA64_COPY", + "BFD_RELOC_IA64_LTOFF22X", + "BFD_RELOC_IA64_LDXMOV", + "BFD_RELOC_IA64_TPREL14", "BFD_RELOC_IA64_TPREL22", + "BFD_RELOC_IA64_TPREL64I", "BFD_RELOC_IA64_TPREL64MSB", "BFD_RELOC_IA64_TPREL64LSB", - "BFD_RELOC_IA64_LTOFF_TP22", - "BFD_RELOC_IA64_LTOFF22X", - "BFD_RELOC_IA64_LDXMOV", + "BFD_RELOC_IA64_LTOFF_TPREL22", + "BFD_RELOC_IA64_DTPMOD64MSB", + "BFD_RELOC_IA64_DTPMOD64LSB", + "BFD_RELOC_IA64_LTOFF_DTPMOD22", + "BFD_RELOC_IA64_DTPREL14", + "BFD_RELOC_IA64_DTPREL22", + "BFD_RELOC_IA64_DTPREL64I", + "BFD_RELOC_IA64_DTPREL32MSB", + "BFD_RELOC_IA64_DTPREL32LSB", + "BFD_RELOC_IA64_DTPREL64MSB", + "BFD_RELOC_IA64_DTPREL64LSB", + "BFD_RELOC_IA64_LTOFF_DTPREL22", "BFD_RELOC_M68HC11_HI8", "BFD_RELOC_M68HC11_LO8", "BFD_RELOC_M68HC11_3B", @@ -1199,6 +1265,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_XSTORMY16_REL_12", "BFD_RELOC_XSTORMY16_24", "BFD_RELOC_XSTORMY16_FPTR16", + "BFD_RELOC_VAX_GLOB_DAT", + "BFD_RELOC_VAX_JMP_SLOT", + "BFD_RELOC_VAX_RELATIVE", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif @@ -1226,6 +1295,7 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd, boolean relocateable, asymbol **symbols)); +/* Extracted from archures.c. */ extern const bfd_arch_info_type bfd_default_arch_struct; boolean bfd_default_set_arch_mach PARAMS ((bfd *abfd, @@ -1239,6 +1309,7 @@ bfd_default_compatible PARAMS ((const bfd_arch_info_type *a, boolean bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string)); +/* Extracted from elf.c. */ struct elf_internal_shdr * bfd_elf_find_section PARAMS ((bfd *abfd, char *name)); diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h index bbccbba..efc2fee 100644 --- a/contrib/binutils/bfd/libcoff-in.h +++ b/contrib/binutils/bfd/libcoff-in.h @@ -1,6 +1,6 @@ /* BFD COFF object file private structure. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -580,6 +580,8 @@ extern long _bfd_xcoff_canonicalize_dynamic_reloc PARAMS ((bfd *, arelent **, asymbol **)); extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create PARAMS ((bfd *)); +extern void _bfd_xcoff_bfd_link_hash_table_free + PARAMS ((struct bfd_link_hash_table *)); extern boolean _bfd_xcoff_bfd_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); extern boolean _bfd_xcoff_bfd_final_link @@ -596,5 +598,3 @@ extern boolean ppc_allocate_toc_section extern boolean ppc_process_before_allocation PARAMS ((bfd *, struct bfd_link_info *)); -/* And more taken from the source .. */ - diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h index f26a692..88b0909 100644 --- a/contrib/binutils/bfd/libcoff.h +++ b/contrib/binutils/bfd/libcoff.h @@ -4,7 +4,7 @@ /* BFD COFF object file private structure. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. Written by Cygnus Support. @@ -584,6 +584,8 @@ extern long _bfd_xcoff_canonicalize_dynamic_reloc PARAMS ((bfd *, arelent **, asymbol **)); extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create PARAMS ((bfd *)); +extern void _bfd_xcoff_bfd_link_hash_table_free + PARAMS ((struct bfd_link_hash_table *)); extern boolean _bfd_xcoff_bfd_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); extern boolean _bfd_xcoff_bfd_final_link @@ -600,8 +602,7 @@ extern boolean ppc_allocate_toc_section extern boolean ppc_process_before_allocation PARAMS ((bfd *, struct bfd_link_info *)); -/* And more taken from the source .. */ - +/* Extracted from coffcode.h. */ typedef struct coff_ptr_struct { /* Remembers the offset from the first symbol in the file for diff --git a/contrib/binutils/bfd/libecoff.h b/contrib/binutils/bfd/libecoff.h index 5f9e016..eb90a8c 100644 --- a/contrib/binutils/bfd/libecoff.h +++ b/contrib/binutils/bfd/libecoff.h @@ -1,5 +1,5 @@ /* BFD ECOFF object file private structure. - Copyright 1993, 1994, 1995, 1996, 1999, 2001 + Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -330,8 +330,10 @@ extern int _bfd_ecoff_sizeof_headers PARAMS ((bfd *abfd, boolean reloc)); /* ecoff_bfd_relax_section defined by backend. */ extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create PARAMS ((bfd *)); +#define _bfd_ecoff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free extern boolean _bfd_ecoff_bfd_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); +#define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms extern boolean _bfd_ecoff_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *)); diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c index 135f46d..242f8bd 100644 --- a/contrib/binutils/bfd/linker.c +++ b/contrib/binutils/bfd/linker.c @@ -1,5 +1,5 @@ /* linker.c -- BFD linker routines - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support @@ -426,7 +426,7 @@ static void set_symbol_from_hash PARAMS ((asymbol *, struct bfd_link_hash_entry *)); static boolean generic_add_output_symbol PARAMS ((bfd *, size_t *psymalloc, asymbol *)); -static boolean default_fill_link_order +static boolean default_data_link_order PARAMS ((bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)); static boolean default_indirect_link_order @@ -675,7 +675,7 @@ _bfd_generic_link_hash_table_create (abfd) struct generic_link_hash_table *ret; bfd_size_type amt = sizeof (struct generic_link_hash_table); - ret = (struct generic_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct generic_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return (struct bfd_link_hash_table *) NULL; if (! _bfd_link_hash_table_init (&ret->root, abfd, @@ -687,6 +687,17 @@ _bfd_generic_link_hash_table_create (abfd) return &ret->root; } +void +_bfd_generic_link_hash_table_free (hash) + struct bfd_link_hash_table *hash; +{ + struct generic_link_hash_table *ret + = (struct generic_link_hash_table *) hash; + + bfd_hash_table_free (&ret->root.table); + free (ret); +} + /* Grab the symbols for an object file when doing a generic link. We store the symbols in the outsymbols field. We need to keep them around for the entire link to ensure that we only read them once. @@ -746,6 +757,19 @@ _bfd_generic_link_add_symbols_collect (abfd, info) return generic_link_add_symbols (abfd, info, true); } +/* Indicate that we are only retrieving symbol values from this + section. We want the symbols to act as though the values in the + file are absolute. */ + +void +_bfd_generic_link_just_syms (sec, info) + asection *sec; + struct bfd_link_info *info ATTRIBUTE_UNUSED; +{ + sec->output_section = bfd_abs_section_ptr; + sec->output_offset = sec->vma; +} + /* Add symbols from an object file to the global hash table. */ static boolean @@ -1650,8 +1674,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, abort (); if (! ((*info->callbacks->constructor) - (info, - c == 'I' ? true : false, + (info, c == 'I', h->root.string, abfd, section, value))) return false; } @@ -1789,37 +1812,38 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, /* Fall through. */ case MDEF: /* Handle a multiple definition. */ - { - asection *msec = NULL; - bfd_vma mval = 0; + if (!info->allow_multiple_definition) + { + asection *msec = NULL; + bfd_vma mval = 0; - switch (h->type) - { - case bfd_link_hash_defined: - msec = h->u.def.section; - mval = h->u.def.value; - break; - case bfd_link_hash_indirect: - msec = bfd_ind_section_ptr; - mval = 0; - break; - default: - abort (); - } + switch (h->type) + { + case bfd_link_hash_defined: + msec = h->u.def.section; + mval = h->u.def.value; + break; + case bfd_link_hash_indirect: + msec = bfd_ind_section_ptr; + mval = 0; + break; + default: + abort (); + } - /* Ignore a redefinition of an absolute symbol to the same - value; it's harmless. */ - if (h->type == bfd_link_hash_defined - && bfd_is_abs_section (msec) - && bfd_is_abs_section (section) - && value == mval) - break; + /* Ignore a redefinition of an absolute symbol to the + same value; it's harmless. */ + if (h->type == bfd_link_hash_defined + && bfd_is_abs_section (msec) + && bfd_is_abs_section (section) + && value == mval) + break; - if (! ((*info->callbacks->multiple_definition) - (info, h->root.string, msec->owner, msec, mval, abfd, - section, value))) - return false; - } + if (! ((*info->callbacks->multiple_definition) + (info, h->root.string, msec->owner, msec, mval, + abfd, section, value))) + return false; + } break; case CIND: @@ -1950,12 +1974,12 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, else { char *w; + size_t len = strlen (string) + 1; - w = bfd_hash_allocate (&info->hash->table, - strlen (string) + 1); + w = bfd_hash_allocate (&info->hash->table, len); if (w == NULL) return false; - strcpy (w, string); + memcpy (w, string, len); sub->u.i.warning = w; } @@ -2366,7 +2390,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc) Gross. .bss and similar sections won't have the linker_mark field set. */ if ((sym->section->flags & SEC_HAS_CONTENTS) != 0 - && sym->section->linker_mark == false) + && ! sym->section->linker_mark) output = false; if (output) @@ -2611,14 +2635,13 @@ bfd_new_link_order (abfd, section) asection *section; { bfd_size_type amt = sizeof (struct bfd_link_order); - struct bfd_link_order *new = (struct bfd_link_order *) bfd_alloc (abfd, amt); + struct bfd_link_order *new; + + new = (struct bfd_link_order *) bfd_zalloc (abfd, amt); if (!new) return NULL; new->type = bfd_undefined_link_order; - new->offset = 0; - new->size = 0; - new->next = (struct bfd_link_order *) NULL; if (section->link_order_tail != (struct bfd_link_order *) NULL) section->link_order_tail->next = new; @@ -2640,8 +2663,6 @@ _bfd_default_link_order (abfd, info, sec, link_order) asection *sec; struct bfd_link_order *link_order; { - file_ptr loc; - switch (link_order->type) { case bfd_undefined_link_order: @@ -2652,29 +2673,23 @@ _bfd_default_link_order (abfd, info, sec, link_order) case bfd_indirect_link_order: return default_indirect_link_order (abfd, info, sec, link_order, false); - case bfd_fill_link_order: - return default_fill_link_order (abfd, info, sec, link_order); case bfd_data_link_order: - loc = link_order->offset * bfd_octets_per_byte (abfd); - return bfd_set_section_contents (abfd, sec, - (PTR) link_order->u.data.contents, - loc, link_order->size); + return default_data_link_order (abfd, info, sec, link_order); } } -/* Default routine to handle a bfd_fill_link_order. */ +/* Default routine to handle a bfd_data_link_order. */ static boolean -default_fill_link_order (abfd, info, sec, link_order) +default_data_link_order (abfd, info, sec, link_order) bfd *abfd; struct bfd_link_info *info ATTRIBUTE_UNUSED; asection *sec; struct bfd_link_order *link_order; { bfd_size_type size; - unsigned char *space; - size_t i; - unsigned int fill; + size_t fill_size; + bfd_byte *fill; file_ptr loc; boolean result; @@ -2684,24 +2699,37 @@ default_fill_link_order (abfd, info, sec, link_order) if (size == 0) return true; - space = (unsigned char *) bfd_malloc (size); - if (space == NULL) - return false; - - fill = link_order->u.fill.value; - for (i = 0; i < size; i += 4) - space[i] = fill >> 24; - for (i = 1; i < size; i += 4) - space[i] = fill >> 16; - for (i = 2; i < size; i += 4) - space[i] = fill >> 8; - for (i = 3; i < size; i += 4) - space[i] = fill; + fill = link_order->u.data.contents; + fill_size = link_order->u.data.size; + if (fill_size != 0 && fill_size < size) + { + bfd_byte *p; + fill = (bfd_byte *) bfd_malloc (size); + if (fill == NULL) + return false; + p = fill; + if (fill_size == 1) + memset (p, (int) link_order->u.data.contents[0], (size_t) size); + else + { + do + { + memcpy (p, link_order->u.data.contents, fill_size); + p += fill_size; + size -= fill_size; + } + while (size >= fill_size); + if (size != 0) + memcpy (p, link_order->u.data.contents, (size_t) size); + size = link_order->size; + } + } loc = link_order->offset * bfd_octets_per_byte (abfd); - result = bfd_set_section_contents (abfd, sec, space, loc, size); + result = bfd_set_section_contents (abfd, sec, fill, loc, size); - free (space); + if (fill != link_order->u.data.contents) + free (fill); return result; } diff --git a/contrib/binutils/bfd/merge.c b/contrib/binutils/bfd/merge.c index e175efd..ce61207 100644 --- a/contrib/binutils/bfd/merge.c +++ b/contrib/binutils/bfd/merge.c @@ -1,22 +1,22 @@ /* SEC_MERGE support. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2002 Free Software Foundation, Inc. Written by Jakub Jelinek <jakub@redhat.com>. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This file contains support for merging duplicate entities within sections, as used in ELF SHF_MERGE. */ @@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "sysdep.h" #include "libbfd.h" #include "hashtab.h" +#include "libiberty.h" struct sec_merge_sec_info; @@ -38,7 +39,8 @@ struct sec_merge_hash_entry /* Start of this string needs to be aligned to alignment octets (not 1 << align). */ unsigned int alignment; - union { + union + { /* Index within the merged section. */ bfd_size_type index; /* Entity size (if present in suffix hash tables). */ @@ -144,7 +146,7 @@ sec_merge_hash_newfunc (entry, table, string) ret->next = NULL; } - return (struct bfd_hash_entry *)ret; + return (struct bfd_hash_entry *) ret; } /* Look up an entry in a section merge hash table. */ @@ -381,14 +383,6 @@ _bfd_merge_section (abfd, psinfo, sec, psecinfo) return true; } - if (sec->output_section != NULL - && bfd_is_abs_section (sec->output_section)) - { - /* The section is being discarded from the link, so we should - just ignore it. */ - return true; - } - align = bfd_get_section_alignment (sec->owner, sec); if ((sec->entsize < (unsigned int)(1 << align) && ((sec->entsize & (sec->entsize - 1)) @@ -415,15 +409,14 @@ _bfd_merge_section (abfd, psinfo, sec, psecinfo) if (sinfo == NULL) { /* Initialize the information we need to keep track of. */ - sinfo = (struct sec_merge_info *) - bfd_alloc (abfd, (bfd_size_type) sizeof (struct sec_merge_info)); + amt = sizeof (struct sec_merge_info); + sinfo = (struct sec_merge_info *) bfd_alloc (abfd, amt); if (sinfo == NULL) goto error_return; sinfo->next = (struct sec_merge_info *) *psinfo; sinfo->chain = NULL; *psinfo = (PTR) sinfo; - sinfo->htab = - sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS)); + sinfo->htab = sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS)); if (sinfo->htab == NULL) goto error_return; } @@ -650,8 +643,10 @@ merge_strings (sinfo) qsort (array, (size_t) sinfo->htab->size, sizeof (struct sec_merge_hash_entry *), cmplengthentry); - last4tab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last4_eq, NULL); - lasttab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last_eq, NULL); + last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4, + NULL, last4_eq, NULL, calloc, free); + lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4, + NULL, last_eq, NULL, calloc, free); if (lasttab == NULL || last4tab == NULL) goto alloc_failure; @@ -839,10 +834,7 @@ _bfd_merge_sections (abfd, xsinfo, remove_hook) the hash table at all. */ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) if (secinfo->first == NULL) - { - secinfo->sec->_cooked_size = 0; - secinfo->sec->flags |= SEC_EXCLUDE; - } + secinfo->sec->_cooked_size = 0; } return true; @@ -908,7 +900,7 @@ _bfd_merged_section_offset (output_bfd, psec, psecinfo, offset, addend) if (sec->entsize == 1) { p = secinfo->contents + offset + addend - 1; - while (*p && p >= secinfo->contents) + while (p >= secinfo->contents && *p) --p; ++p; } diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c index 200f6c7..cdf08df 100644 --- a/contrib/binutils/bfd/opncls.c +++ b/contrib/binutils/bfd/opncls.c @@ -5,21 +5,21 @@ Written by Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -39,9 +39,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* fdopen is a loser -- we should use stdio exclusively. Unfortunately if we do that we can't use fcntl. */ -/* FIXME: This is no longer used. */ -long _bfd_chunksize = -1; - /* Return a new BFD. All BFD's are allocated through this routine. */ bfd * @@ -155,7 +152,6 @@ bfd_openr (filename, target) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -165,7 +161,7 @@ bfd_openr (filename, target) if (bfd_open_file (nbfd) == NULL) { - /* File didn't exist, or some such */ + /* File didn't exist, or some such. */ bfd_set_error (bfd_error_system_call); _bfd_delete_bfd (nbfd); return NULL; @@ -180,8 +176,7 @@ bfd_openr (filename, target) won't cause a storage leak. o - We open the file stream last, since we don't want to have to close it if anything goes wrong. Closing the stream means closing - the file descriptor too, even though we didn't open it. - */ + the file descriptor too, even though we didn't open it. */ /* FUNCTION bfd_fdopenr @@ -220,11 +215,12 @@ bfd_fdopenr (filename, target, fd) bfd_set_error (bfd_error_system_call); #if ! defined(HAVE_FCNTL) || ! defined(F_GETFL) - fdflags = O_RDWR; /* Assume full access */ + fdflags = O_RDWR; /* Assume full access. */ #else fdflags = fcntl (fd, F_GETFL, NULL); #endif - if (fdflags == -1) return NULL; + if (fdflags == -1) + return NULL; nbfd = _bfd_new_bfd (); if (nbfd == NULL) @@ -233,7 +229,6 @@ bfd_fdopenr (filename, target, fd) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -241,7 +236,7 @@ bfd_fdopenr (filename, target, fd) #ifndef HAVE_FDOPEN nbfd->iostream = (PTR) fopen (filename, FOPEN_RB); #else - /* (O_ACCMODE) parens are to avoid Ultrix header file bug */ + /* (O_ACCMODE) parens are to avoid Ultrix header file bug. */ switch (fdflags & (O_ACCMODE)) { case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB); break; @@ -257,14 +252,13 @@ bfd_fdopenr (filename, target, fd) return NULL; } - /* OK, put everything where it belongs */ - + /* OK, put everything where it belongs. */ nbfd->filename = filename; /* As a special case we allow a FD open for read/write to be written through, although doing so requires that we end the previous clause with a preposition. */ - /* (O_ACCMODE) parens are to avoid Ultrix header file bug */ + /* (O_ACCMODE) parens are to avoid Ultrix header file bug. */ switch (fdflags & (O_ACCMODE)) { case O_RDONLY: nbfd->direction = read_direction; break; @@ -313,7 +307,6 @@ bfd_openstreamr (filename, target, streamarg) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -331,10 +324,10 @@ bfd_openstreamr (filename, target, streamarg) return nbfd; } -/** bfd_openw -- open for writing. - Returns a pointer to a freshly-allocated BFD on success, or NULL. +/* bfd_openw -- open for writing. + Returns a pointer to a freshly-allocated BFD on success, or NULL. - See comment by bfd_fdopenr before you try to modify this function. */ + See comment by bfd_fdopenr before you try to modify this function. */ /* FUNCTION @@ -359,11 +352,8 @@ bfd_openw (filename, target) bfd *nbfd; const bfd_target *target_vec; - bfd_set_error (bfd_error_system_call); - /* nbfd has to point to head of malloc'ed block so that bfd_close may - reclaim it correctly. */ - + reclaim it correctly. */ nbfd = _bfd_new_bfd (); if (nbfd == NULL) return NULL; @@ -380,7 +370,8 @@ bfd_openw (filename, target) if (bfd_open_file (nbfd) == NULL) { - bfd_set_error (bfd_error_system_call); /* File not writeable, etc */ + /* File not writeable, etc. */ + bfd_set_error (bfd_error_system_call); _bfd_delete_bfd (nbfd); return NULL; } @@ -419,7 +410,7 @@ bfd_close (abfd) { boolean ret; - if (!bfd_read_p (abfd)) + if (bfd_write_p (abfd)) { if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd))) return false; @@ -431,7 +422,7 @@ bfd_close (abfd) ret = bfd_cache_close (abfd); /* If the file was open for writing and is now executable, - make it so */ + make it so. */ if (ret && abfd->direction == write_direction && abfd->flags & EXEC_P) @@ -441,6 +432,7 @@ bfd_close (abfd) if (stat (abfd->filename, &buf) == 0) { unsigned int mask = umask (0); + umask (mask); chmod (abfd->filename, (0777 @@ -473,7 +465,6 @@ DESCRIPTION RETURNS <<true>> is returned if all is ok, otherwise <<false>>. - */ boolean @@ -485,7 +476,7 @@ bfd_close_all_done (abfd) ret = bfd_cache_close (abfd); /* If the file was open for writing and is now executable, - make it so */ + make it so. */ if (ret && abfd->direction == write_direction && abfd->flags & EXEC_P) @@ -495,6 +486,7 @@ bfd_close_all_done (abfd) if (stat (abfd->filename, &buf) == 0) { unsigned int mask = umask (0); + umask (mask); chmod (abfd->filename, (0777 @@ -519,7 +511,6 @@ DESCRIPTION <<bfd_openw>>, but without opening a file. The new BFD takes the target from the target used by @var{template}. The format is always set to <<bfd_object>>. - */ bfd * @@ -537,6 +528,7 @@ bfd_create (filename, templ) nbfd->xvec = templ->xvec; nbfd->direction = no_direction; bfd_set_format (nbfd, bfd_object); + return nbfd; } @@ -572,7 +564,7 @@ bfd_make_writable(abfd) bim = ((struct bfd_in_memory *) bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory))); abfd->iostream = (PTR) bim; - /* bfd_bwrite will grow these as needed */ + /* bfd_bwrite will grow these as needed. */ bim->size = 0; bim->buffer = 0; @@ -639,7 +631,7 @@ bfd_make_readable(abfd) abfd->tdata.any = 0; bfd_section_list_clear (abfd); - bfd_check_format(abfd, bfd_object); + bfd_check_format (abfd, bfd_object); return true; } diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c index 7ced147..9c75f95 100644 --- a/contrib/binutils/bfd/pe-i386.c +++ b/contrib/binutils/bfd/pe-i386.c @@ -1,21 +1,21 @@ /* BFD back-end for Intel 386 PECOFF files. - Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc. + Copyright 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -29,6 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define COFF_LONG_FILENAMES #define COFF_SECTION_ALIGNMENT_ENTRIES \ +{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \ + COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ +{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \ + COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ +{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \ + COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \ { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \ diff --git a/contrib/binutils/bfd/peXXigen.c b/contrib/binutils/bfd/peXXigen.c index 04b7419..b643f3c 100644 --- a/contrib/binutils/bfd/peXXigen.c +++ b/contrib/binutils/bfd/peXXigen.c @@ -3,21 +3,21 @@ Free Software Foundation, Inc. Written by Cygnus Solutions. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Most of this hacked by Steve Chamberlain <sac@cygnus.com>. @@ -620,7 +620,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out) extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; /* first null out all data directory entries .. */ - memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); + memset (extra->DataDirectory, 0, sizeof (extra->DataDirectory)); add_data_entry (abfd, extra, 0, ".edata", ib); @@ -1142,6 +1142,7 @@ pe_print_idata (abfd, vfile) adj = section->vma - extra->ImageBase; + /* Print all image import descriptors. */ for (i = 0; i < datasize; i += onaline) { bfd_vma hint_addr; @@ -1153,7 +1154,7 @@ pe_print_idata (abfd, vfile) bfd_size_type j; char *dll; - /* print (i + extra->DataDirectory[1].VirtualAddress) */ + /* Print (i + extra->DataDirectory[1].VirtualAddress). */ fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff)); #if 0 if (i + 20 > datasize) @@ -1181,19 +1182,83 @@ pe_print_idata (abfd, vfile) if (hint_addr != 0) { - fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); + bfd_byte *ft_data; + asection *ft_section; + bfd_vma ft_addr; + bfd_size_type ft_datasize; + int ft_idx; + int ft_allocated = 0; + + fprintf (file, _("\tvma: Hint/Ord Member-Name Bound-To\n")); idx = hint_addr - adj; + + ft_addr = first_thunk + extra->ImageBase; + ft_data = data; + ft_idx = first_thunk - adj; + ft_allocated = 0; + + if (first_thunk != hint_addr) + { + /* Find the section which contains the first thunk. */ + for (ft_section = abfd->sections; + ft_section != NULL; + ft_section = ft_section->next) + { + ft_datasize = bfd_section_size (abfd, ft_section); + if (ft_addr >= ft_section->vma + && ft_addr < ft_section->vma + ft_datasize) + break; + } + + if (ft_section == NULL) + { + fprintf (file, + _("\nThere is a first thunk, but the section containing it could not be found\n")); + continue; + } + + /* Now check to see if this section is the same as our current + section. If it is not then we will have to load its data in. */ + if (ft_section == section) + { + ft_data = data; + ft_idx = first_thunk - adj; + } + else + { + ft_idx = first_thunk - (ft_section->vma - extra->ImageBase); + ft_data = (bfd_byte *) bfd_malloc (datasize); + if (ft_data == NULL) + continue; + + /* Read datasize bfd_bytes starting at offset ft_idx. */ + if (! bfd_get_section_contents (abfd, ft_section, + (PTR) ft_data, + (bfd_vma) ft_idx, + datasize)) + { + free (ft_data); + continue; + } + + ft_idx = 0; + ft_allocated = 1; + } + } + /* Print HintName vector entries. */ for (j = 0; j < datasize; j += 4) { unsigned long member = bfd_get_32 (abfd, data + idx + j); + /* Print single IMAGE_IMPORT_BY_NAME vector. */ if (member == 0) break; + if (member & 0x80000000) - fprintf (file, "\t%04lx\t %4lu", member, - member & 0x7fffffff); + fprintf (file, "\t%04lx\t %4lu <none>", + member, member & 0x7fffffff); else { int ordinal; @@ -1206,69 +1271,18 @@ pe_print_idata (abfd, vfile) } /* If the time stamp is not zero, the import address - table holds actual addresses. */ + table holds actual addresses. */ if (time_stamp != 0 && first_thunk != 0 && first_thunk != hint_addr) fprintf (file, "\t%04lx", - (long) bfd_get_32 (abfd, data + first_thunk - adj + j)); + (long) bfd_get_32 (abfd, ft_data + ft_idx + j)); fprintf (file, "\n"); } - } - - if (hint_addr != first_thunk && time_stamp == 0) - { - int differ = 0; - int idx2; - - idx2 = first_thunk - adj; - - for (j = 0; j < datasize; j += 4) - { - int ordinal; - char *member_name; - bfd_vma hint_member = 0; - bfd_vma iat_member; - - if (hint_addr != 0) - hint_member = bfd_get_32 (abfd, data + idx + j); - iat_member = bfd_get_32 (abfd, data + idx2 + j); - - if (hint_addr == 0 && iat_member == 0) - break; - - if (hint_addr == 0 || hint_member != iat_member) - { - if (differ == 0) - { - fprintf (file, - _("\tThe Import Address Table (difference found)\n")); - fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); - differ = 1; - } - - if (iat_member == 0) - fprintf (file, - _("\t>>> Ran out of IAT members!\n")); - else - { - ordinal = bfd_get_16 (abfd, data + iat_member - adj); - member_name = (char *) data + iat_member - adj + 2; - fprintf (file, "\t%04lx\t %4d %s\n", - (unsigned long) iat_member, - ordinal, - member_name); - } - } - - if (hint_addr != 0 && hint_member == 0) - break; - } - if (differ == 0) - fprintf (file, - _("\tThe Import Address Table is identical\n")); + if (ft_allocated) + free (ft_data); } fprintf (file, "\n"); diff --git a/contrib/binutils/bfd/po/SRC-POTFILES.in b/contrib/binutils/bfd/po/SRC-POTFILES.in index f3f1d26..e448599 100644 --- a/contrib/binutils/bfd/po/SRC-POTFILES.in +++ b/contrib/binutils/bfd/po/SRC-POTFILES.in @@ -1,4 +1,5 @@ aix386-core.c +aix5ppc-core.c aout-adobe.c aout-arm.c aout-cris.c @@ -64,7 +65,9 @@ cpu-avr.c cpu-cris.c cpu-d10v.c cpu-d30v.c +cpu-dlx.c cpu-fr30.c +cpu-frv.c cpu-h8300.c cpu-h8500.c cpu-hppa.c @@ -123,13 +126,16 @@ elf32-avr.c elf32-cris.c elf32-d10v.c elf32-d30v.c +elf32-dlx.c elf32-fr30.c +elf32-frv.c elf32-gen.c elf32-h8300.c elf32-hppa.c elf32-hppa.h elf32-i370.c elf32-i386.c +elf32-i386qnx.c elf32-i860.c elf32-i960.c elf32-m32r.c @@ -147,9 +153,12 @@ elf32-s390.c elf32-sh-lin.c elf32-sh-nbsd.c elf32-sh.c +elf32-sh64-com.c +elf32-sh64-nbsd.c elf32-sh64.c elf32-sparc.c elf32-v850.c +elf32-vax.c elf32-xstormy16.c elf32.c elf64-alpha.c @@ -160,6 +169,7 @@ elf64-mips.c elf64-mmix.c elf64-ppc.c elf64-s390.c +elf64-sh64-nbsd.c elf64-sh64.c elf64-sparc.c elf64-x86-64.c @@ -170,6 +180,7 @@ elfcode.h elfcore.h elflink.c elflink.h +elfxx-mips.c epoc-pe-arm.c epoc-pei-arm.c format.c @@ -266,6 +277,8 @@ syms.c targets.c tekhex.c trad-core.c +vax1knetbsd.c +vaxbsd.c vaxnetbsd.c versados.c version.h diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot index 8471c0c..2b9a34a 100644 --- a/contrib/binutils/bfd/po/bfd.pot +++ b/contrib/binutils/bfd/po/bfd.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-02-08 03:22-0200\n" +"POT-Creation-Date: 2002-07-23 15:55-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" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: aout-adobe.c:196 +#: aout-adobe.c:197 #, c-format msgid "%s: Unknown section type in a.out.adobe file: %x\n" msgstr "" @@ -49,7 +49,7 @@ msgstr "" msgid "*unknown*" msgstr "" -#: aoutx.h:3735 +#: aoutx.h:3732 #, c-format msgid "%s: relocateable link from %s to %s not supported" msgstr "" @@ -179,7 +179,7 @@ msgstr "" msgid "Missing IHIHALF" msgstr "" -#: coff-a29k.c:212 coff-or32.c:228 +#: coff-a29k.c:212 coff-or32.c:229 msgid "Unrecognized reloc" msgstr "" @@ -191,7 +191,7 @@ msgstr "" msgid "missing IHIHALF reloc" msgstr "" -#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433 +#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432 msgid "GP relative relocation used when GP not defined" msgstr "" @@ -199,129 +199,129 @@ msgstr "" msgid "using multiple gp values" msgstr "" -#: coff-arm.c:1051 elf32-arm.h:285 +#: coff-arm.c:1066 elf32-arm.h:285 #, c-format msgid "%s: unable to find THUMB glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1080 elf32-arm.h:320 +#: coff-arm.c:1096 elf32-arm.h:320 #, c-format msgid "%s: unable to find ARM glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990 +#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991 #, c-format msgid "%s(%s): warning: interworking not enabled." msgstr "" -#: coff-arm.c:1379 elf32-arm.h:993 +#: coff-arm.c:1395 elf32-arm.h:994 #, c-format msgid " first occurrence: %s: arm call to thumb" msgstr "" -#: coff-arm.c:1474 elf32-arm.h:889 +#: coff-arm.c:1490 elf32-arm.h:890 #, c-format msgid " first occurrence: %s: thumb call to arm" msgstr "" -#: coff-arm.c:1477 +#: coff-arm.c:1493 msgid " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017 +#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031 #, c-format msgid "%s: bad reloc address 0x%lx in section `%s'" msgstr "" -#: coff-arm.c:2107 +#: coff-arm.c:2127 #, c-format msgid "%s: illegal symbol index in reloc: %d" msgstr "" -#: coff-arm.c:2235 +#: coff-arm.c:2255 #, c-format msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d" msgstr "" -#: coff-arm.c:2250 elf32-arm.h:2287 +#: coff-arm.c:2270 elf32-arm.h:2297 #, c-format msgid "" "ERROR: %s passes floats in float registers, whereas %s passes them in " "integer registers" msgstr "" -#: coff-arm.c:2253 elf32-arm.h:2292 +#: coff-arm.c:2273 elf32-arm.h:2302 #, c-format msgid "" "ERROR: %s passes floats in integer registers, whereas %s passes them in " "float registers" msgstr "" -#: coff-arm.c:2268 +#: coff-arm.c:2288 #, c-format msgid "" "ERROR: %s is compiled as position independent code, whereas target %s is " "absolute position" msgstr "" -#: coff-arm.c:2271 +#: coff-arm.c:2291 #, c-format msgid "" "ERROR: %s is compiled as absolute position code, whereas target %s is " "position independent" msgstr "" -#: coff-arm.c:2300 elf32-arm.h:2348 +#: coff-arm.c:2320 elf32-arm.h:2358 #, c-format msgid "Warning: %s supports interworking, whereas %s does not" msgstr "" -#: coff-arm.c:2303 elf32-arm.h:2355 +#: coff-arm.c:2323 elf32-arm.h:2365 #, c-format msgid "Warning: %s does not support interworking, whereas %s does" msgstr "" -#: coff-arm.c:2330 +#: coff-arm.c:2350 #, c-format msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2338 elf32-arm.h:2408 +#: coff-arm.c:2358 elf32-arm.h:2418 msgid " [floats passed in float registers]" msgstr "" -#: coff-arm.c:2340 +#: coff-arm.c:2360 msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2343 elf32-arm.h:2411 +#: coff-arm.c:2363 elf32-arm.h:2421 msgid " [position independent]" msgstr "" -#: coff-arm.c:2345 +#: coff-arm.c:2365 msgid " [absolute position]" msgstr "" -#: coff-arm.c:2349 +#: coff-arm.c:2369 msgid " [interworking flag not initialised]" msgstr "" -#: coff-arm.c:2351 +#: coff-arm.c:2371 msgid " [interworking supported]" msgstr "" -#: coff-arm.c:2353 +#: coff-arm.c:2373 msgid " [interworking not supported]" msgstr "" -#: coff-arm.c:2401 elf32-arm.h:2114 +#: coff-arm.c:2421 elf32-arm.h:2124 #, c-format msgid "" "Warning: Not setting interworking flag of %s since it has already been " "specified as non-interworking" msgstr "" -#: coff-arm.c:2405 elf32-arm.h:2118 +#: coff-arm.c:2425 elf32-arm.h:2128 #, c-format msgid "Warning: Clearing the interworking flag of %s due to outside request" msgstr "" @@ -330,35 +330,35 @@ msgstr "" msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9967 +#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844 msgid "unsupported reloc type" msgstr "" -#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739 +#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609 msgid "GP relative relocation when _gp not defined" msgstr "" #. No other sections should appear in -membedded-pic #. code. -#: coff-mips.c:2468 +#: coff-mips.c:2466 msgid "reloc against unsupported section" msgstr "" -#: coff-mips.c:2476 +#: coff-mips.c:2474 msgid "reloc not properly aligned" msgstr "" -#: coff-rs6000.c:2710 coff64-rs6000.c:1164 +#: coff-rs6000.c:2766 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "" -#: coff-rs6000.c:2756 coff64-rs6000.c:1210 +#: coff-rs6000.c:2859 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "" -#: coff-rs6000.c:3006 coff64-rs6000.c:2060 +#: coff-rs6000.c:3590 coff64-rs6000.c:2091 #, c-format msgid "%s: symbol `%s' has unrecognized smclas %d" msgstr "" @@ -368,7 +368,7 @@ msgstr "" msgid "Unrecognized reloc type 0x%x" msgstr "" -#: coff-tic54x.c:390 coffcode.h:4874 +#: coff-tic54x.c:390 coffcode.h:4974 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "" @@ -378,37 +378,37 @@ msgstr "" msgid "ignoring reloc %s\n" msgstr "" -#: coffcode.h:1081 +#: coffcode.h:1086 #, c-format msgid "%s (%s): Section flag %s (0x%x) ignored" msgstr "" -#: coffcode.h:2137 +#: coffcode.h:2143 #, c-format msgid "Unrecognized TI COFF target id '0x%x'" msgstr "" -#: coffcode.h:4263 +#: coffcode.h:4365 #, c-format msgid "%s: warning: illegal symbol index %ld in line numbers" msgstr "" -#: coffcode.h:4277 +#: coffcode.h:4379 #, c-format msgid "%s: warning: duplicate line number information for `%s'" msgstr "" -#: coffcode.h:4636 +#: coffcode.h:4736 #, c-format msgid "%s: Unrecognized storage class %d for %s symbol `%s'" msgstr "" -#: coffcode.h:4767 +#: coffcode.h:4867 #, c-format msgid "warning: %s: local symbol `%s' has no section" msgstr "" -#: coffcode.h:4912 +#: coffcode.h:5012 #, c-format msgid "%s: illegal relocation type %d at address 0x%lx" msgstr "" @@ -418,186 +418,187 @@ msgstr "" msgid "%s: bad string table size %lu" msgstr "" -#: cofflink.c:536 elflink.h:1967 +#: cofflink.c:534 elflink.h:1912 #, c-format msgid "Warning: type of symbol `%s' changed from %d to %d in %s" msgstr "" -#: cofflink.c:2317 +#: cofflink.c:2321 #, c-format msgid "%s: relocs in section `%s', but it has no contents" msgstr "" -#: cofflink.c:2653 coffswap.h:889 +#: cofflink.c:2664 coffswap.h:877 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: cofflink.c:2662 coffswap.h:876 +#: cofflink.c:2673 coffswap.h:864 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: dwarf2.c:381 +#: dwarf2.c:382 msgid "Dwarf Error: Can't find .debug_str section." msgstr "" -#: dwarf2.c:398 +#: dwarf2.c:399 #, c-format msgid "" -"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str " -"size (%u)." +"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str " +"size (%lu)." msgstr "" -#: dwarf2.c:542 +#: dwarf2.c:543 msgid "Dwarf Error: Can't find .debug_abbrev section." msgstr "" -#: dwarf2.c:559 +#: dwarf2.c:560 #, c-format msgid "" -"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size " -"(%u)." +"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size " +"(%lu)." msgstr "" -#: dwarf2.c:756 +#: dwarf2.c:757 #, c-format -msgid "Dwarf Error: Invalid or unhandled FORM value: %d." +msgid "Dwarf Error: Invalid or unhandled FORM value: %u." msgstr "" -#: dwarf2.c:843 +#: dwarf2.c:852 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "" -#: dwarf2.c:929 +#: dwarf2.c:938 msgid "Dwarf Error: Can't find .debug_line section." msgstr "" -#: dwarf2.c:952 +#: dwarf2.c:961 #, c-format msgid "" -"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)." +"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%" +"lu)." msgstr "" -#: dwarf2.c:1143 +#: dwarf2.c:1159 msgid "Dwarf Error: mangled line number section." msgstr "" -#: dwarf2.c:1318 dwarf2.c:1529 +#: dwarf2.c:1355 dwarf2.c:1566 #, c-format -msgid "Dwarf Error: Could not find abbrev number %d." +msgid "Dwarf Error: Could not find abbrev number %u." msgstr "" -#: dwarf2.c:1490 +#: dwarf2.c:1527 #, c-format msgid "" -"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 " +"Dwarf Error: found dwarf version '%u', this reader only handles version 2 " "information." msgstr "" -#: dwarf2.c:1497 +#: dwarf2.c:1534 #, c-format msgid "" "Dwarf Error: found address size '%u', this reader can not handle sizes " "greater than '%u'." msgstr "" -#: dwarf2.c:1520 +#: dwarf2.c:1557 #, c-format -msgid "Dwarf Error: Bad abbrev number: %d." +msgid "Dwarf Error: Bad abbrev number: %u." msgstr "" -#: ecoff.c:1328 +#: ecoff.c:1318 #, c-format msgid "Unknown basic type %d" msgstr "" -#: ecoff.c:1597 +#: ecoff.c:1578 #, c-format msgid "" "\n" " End+1 symbol: %ld" msgstr "" -#: ecoff.c:1604 ecoff.c:1607 +#: ecoff.c:1585 ecoff.c:1588 #, c-format msgid "" "\n" " First symbol: %ld" msgstr "" -#: ecoff.c:1619 +#: ecoff.c:1600 #, c-format msgid "" "\n" " End+1 symbol: %-7ld Type: %s" msgstr "" -#: ecoff.c:1626 +#: ecoff.c:1607 #, c-format msgid "" "\n" " Local symbol: %ld" msgstr "" -#: ecoff.c:1634 +#: ecoff.c:1615 #, c-format msgid "" "\n" " struct; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1639 +#: ecoff.c:1620 #, c-format msgid "" "\n" " union; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1644 +#: ecoff.c:1625 #, c-format msgid "" "\n" " enum; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1650 +#: ecoff.c:1631 #, c-format msgid "" "\n" " Type: %s" msgstr "" -#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:4286 -#: elf64-sh64.c:1640 elf64-x86-64.c:1275 +#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213 +#: elf64-sh64.c:1659 #, c-format msgid "" "%s: warning: unresolvable relocation against symbol `%s' from %s section" msgstr "" -#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835 -#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547 -#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691 -#: elf32-xstormy16.c:976 elf64-mmix.c:1302 +#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833 +#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809 +#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439 +#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302 msgid "internal error: out of range error" msgstr "" -#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839 -#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551 -#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7600 elf32-openrisc.c:459 -#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1306 +#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837 +#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813 +#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443 +#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264 msgid "internal error: unsupported relocation error" msgstr "" -#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490 -#: elf32-h8300.c:555 elf32-m32r.c:1288 +#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489 +#: elf32-h8300.c:556 elf32-m32r.c:1286 msgid "internal error: dangerous error" msgstr "" -#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847 -#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559 -#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715 -#: elf32-xstormy16.c:988 elf64-mmix.c:1314 +#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845 +#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821 +#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451 +#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314 msgid "internal error: unknown error" msgstr "" @@ -606,221 +607,222 @@ msgstr "" msgid "%s: invalid string offset %u >= %lu for section `%s'" msgstr "" -#: elf.c:448 +#: elf.c:589 #, c-format msgid "%s: invalid SHT_GROUP entry" msgstr "" -#: elf.c:529 +#: elf.c:660 #, c-format msgid "%s: no group info for section %s" msgstr "" -#: elf.c:840 +#: elf.c:1023 msgid "" "\n" "Program Header:\n" msgstr "" -#: elf.c:889 +#: elf.c:1073 msgid "" "\n" "Dynamic Section:\n" msgstr "" -#: elf.c:1018 +#: elf.c:1202 msgid "" "\n" "Version definitions:\n" msgstr "" -#: elf.c:1041 +#: elf.c:1225 msgid "" "\n" "Version References:\n" msgstr "" -#: elf.c:1046 +#: elf.c:1230 #, c-format msgid " required from %s:\n" msgstr "" -#: elf.c:1682 +#: elf.c:1902 #, c-format msgid "%s: invalid link %lu for reloc section %s (index %u)" msgstr "" -#: elf.c:3296 +#: elf.c:3603 #, c-format msgid "%s: Not enough room for program headers (allocated %u, need %u)" msgstr "" -#: elf.c:3400 +#: elf.c:3708 #, c-format msgid "%s: Not enough room for program headers, try linking with -N" msgstr "" -#: elf.c:3525 +#: elf.c:3833 #, c-format msgid "" "Error: First section in segment (%s) starts at 0x%x whereas the segment " "starts at 0x%x" msgstr "" -#: elf.c:3811 +#: elf.c:4148 #, c-format msgid "%s: warning: allocated section `%s' not in segment" msgstr "" -#: elf.c:4142 +#: elf.c:4472 #, c-format msgid "%s: symbol `%s' required but not present" msgstr "" -#: elf.c:4395 +#: elf.c:4749 #, c-format -msgid "%s: warning: Empty loadable segment detected\n" +msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n" msgstr "" -#: elf.c:5808 +#: elf.c:6193 #, c-format msgid "%s: unsupported relocation type %s" msgstr "" -#: elf32-arm.h:1224 +#: elf32-arm.h:1221 #, c-format msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "" -#: elf32-arm.h:1420 +#: elf32-arm.h:1417 #, c-format msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "" -#: elf32-arm.h:1904 elf32-i386.c:1782 elf32-sh.c:4198 +#: elf32-arm.h:1914 elf32-sh.c:4125 #, c-format msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section" msgstr "" -#: elf32-arm.h:1998 +#: elf32-arm.h:2008 #, c-format msgid "" "%s: warning: unresolvable relocation %d against symbol `%s' from %s section" msgstr "" -#: elf32-arm.h:2166 +#: elf32-arm.h:2176 #, c-format msgid "" "Warning: Clearing the interworking flag of %s because non-interworking code " "in %s has been linked with it" msgstr "" -#: elf32-arm.h:2261 +#: elf32-arm.h:2271 #, c-format msgid "" "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for " "version %d" msgstr "" -#: elf32-arm.h:2275 +#: elf32-arm.h:2285 #, c-format msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d" msgstr "" -#: elf32-arm.h:2303 +#: elf32-arm.h:2313 #, c-format msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions" msgstr "" -#: elf32-arm.h:2308 +#: elf32-arm.h:2318 #, c-format msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions" msgstr "" -#: elf32-arm.h:2328 +#: elf32-arm.h:2338 #, c-format msgid "ERROR: %s uses software FP, whereas %s uses hardware FP" msgstr "" -#: elf32-arm.h:2333 +#: elf32-arm.h:2343 #, c-format msgid "ERROR: %s uses hardware FP, whereas %s uses software FP" msgstr "" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. -#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3255 +#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543 +#: elfxx-mips.c:7756 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.h:2395 +#: elf32-arm.h:2405 msgid " [interworking enabled]" msgstr "" -#: elf32-arm.h:2403 +#: elf32-arm.h:2413 msgid " [VFP float format]" msgstr "" -#: elf32-arm.h:2405 +#: elf32-arm.h:2415 msgid " [FPA float format]" msgstr "" -#: elf32-arm.h:2414 +#: elf32-arm.h:2424 msgid " [new ABI]" msgstr "" -#: elf32-arm.h:2417 +#: elf32-arm.h:2427 msgid " [old ABI]" msgstr "" -#: elf32-arm.h:2420 +#: elf32-arm.h:2430 msgid " [software FP]" msgstr "" -#: elf32-arm.h:2428 +#: elf32-arm.h:2438 msgid " [Version1 EABI]" msgstr "" -#: elf32-arm.h:2431 elf32-arm.h:2442 +#: elf32-arm.h:2441 elf32-arm.h:2452 msgid " [sorted symbol table]" msgstr "" -#: elf32-arm.h:2433 elf32-arm.h:2444 +#: elf32-arm.h:2443 elf32-arm.h:2454 msgid " [unsorted symbol table]" msgstr "" -#: elf32-arm.h:2439 +#: elf32-arm.h:2449 msgid " [Version2 EABI]" msgstr "" -#: elf32-arm.h:2447 +#: elf32-arm.h:2457 msgid " [dynamic symbols use segment index]" msgstr "" -#: elf32-arm.h:2450 +#: elf32-arm.h:2460 msgid " [mapping symbols precede others]" msgstr "" -#: elf32-arm.h:2457 +#: elf32-arm.h:2467 msgid " <EABI version unrecognised>" msgstr "" -#: elf32-arm.h:2464 +#: elf32-arm.h:2474 msgid " [relocatable executable]" msgstr "" -#: elf32-arm.h:2467 +#: elf32-arm.h:2477 msgid " [has entry point]" msgstr "" -#: elf32-arm.h:2472 +#: elf32-arm.h:2482 msgid "<Unrecognised flag bits set>" msgstr "" -#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056 -#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984 -#: elf64-mmix.c:1310 +#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817 +#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699 +#: elf32-xstormy16.c:941 elf64-mmix.c:1310 msgid "internal error: dangerous relocation" msgstr "" @@ -835,95 +837,118 @@ msgid "" "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:1015 elf32-cris.c:1142 +#: elf32-cris.c:1015 elf32-cris.c:1141 msgid "[whose name is lost]" msgstr "" -#: elf32-cris.c:1131 +#: elf32-cris.c:1130 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against local symbol from %s " "section" msgstr "" -#: elf32-cris.c:1138 +#: elf32-cris.c:1137 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:1156 +#: elf32-cris.c:1155 #, c-format msgid "" "%s: relocation %s is not allowed for global symbol: `%s' from %s section" msgstr "" -#: elf32-cris.c:1171 +#: elf32-cris.c:1170 #, c-format msgid "%s: relocation %s in section %s with no GOT created" msgstr "" -#: elf32-cris.c:1289 +#: elf32-cris.c:1288 #, c-format msgid "%s: Internal inconsistency; no relocation section %s" msgstr "" -#: elf32-cris.c:2523 +#: elf32-cris.c:2514 #, c-format msgid "" "%s, section %s:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" msgstr "" -#: elf32-cris.c:2994 +#: elf32-cris.c:2991 msgid " [symbols have a _ prefix]" msgstr "" -#: elf32-cris.c:3033 +#: elf32-cris.c:3030 #, c-format msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols" msgstr "" -#: elf32-cris.c:3034 +#: elf32-cris.c:3031 #, c-format msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols" msgstr "" +#: elf32-frv.c:1217 +#, c-format +msgid "" +"%s: compiled with %s and linked with modules that use non-pic relocations" +msgstr "" + +#: elf32-frv.c:1267 +#, c-format +msgid "%s: compiled with %s and linked with modules compiled with %s" +msgstr "" + +#: elf32-frv.c:1279 +#, c-format +msgid "" +"%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%" +"lx)" +msgstr "" + +#: elf32-frv.c:1315 +#, c-format +msgid "private flags = 0x%lx:" +msgstr "" + #: elf32-gen.c:82 elf64-gen.c:82 #, c-format msgid "%s: Relocations in generic ELF (EM: %d)" msgstr "" -#: elf32-hppa.c:646 +#: elf32-hppa.c:671 elf64-ppc.c:2323 #, c-format msgid "%s: cannot create stub entry %s" msgstr "" -#: elf32-hppa.c:937 elf32-hppa.c:3549 +#: elf32-hppa.c:956 elf32-hppa.c:3555 #, c-format msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "" -#: elf32-hppa.c:1312 +#: elf32-hppa.c:1338 elf64-x86-64.c:673 #, c-format msgid "" "%s: relocation %s can not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1332 +#: elf32-hppa.c:1358 #, c-format msgid "" "%s: relocation %s should not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1525 +#: elf32-hppa.c:1551 #, c-format msgid "Could not find relocation section for %s" msgstr "" -#: elf32-hppa.c:2871 +#: elf32-hppa.c:2855 #, c-format msgid "%s: duplicate export stub %s" msgstr "" @@ -933,69 +958,83 @@ msgstr "" msgid "%s(%s+0x%lx): fixing %s" msgstr "" -#: elf32-hppa.c:4073 +#: elf32-hppa.c:4080 #, c-format msgid "%s(%s+0x%lx): cannot handle %s for %s" msgstr "" -#: elf32-hppa.c:4412 +#: elf32-hppa.c:4393 msgid ".got section not immediately after .plt section" msgstr "" -#: elf32-i386.c:298 +#: elf32-i386.c:379 #, c-format msgid "%s: invalid relocation type %d" msgstr "" -#: elf32-i386.c:718 elf32-s390.c:637 elf64-s390.c:595 +#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591 #, c-format msgid "%s: bad symbol index: %d" msgstr "" -#: elf32-i386.c:863 elf32-s390.c:791 elf64-ppc.c:2198 elf64-s390.c:759 +#: elf32-i386.c:948 +#, c-format +msgid "%s: `%s' accessed both as normal and thread local symbol" +msgstr "" + +#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759 +#: elf64-x86-64.c:761 #, c-format msgid "%s: bad relocation section name `%s'" msgstr "" -#: elf32-i386.c:2073 elf32-s390.c:1956 elf64-ppc.c:4128 elf64-s390.c:1959 +#: elf32-i386.c:1159 elf64-alpha.c:4768 +#, c-format +msgid "%s: TLS local exec code cannot be linked into shared objects" +msgstr "" + +#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918 +#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948 #, c-format msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'" msgstr "" -#: elf32-i386.c:2111 elf32-s390.c:1994 elf64-s390.c:1997 +#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983 +#: elf64-x86-64.c:1986 #, c-format msgid "%s(%s+0x%lx): reloc against `%s': error %d" msgstr "" -#: elf32-m32r.c:923 +#: elf32-m32r.c:924 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "" -#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537 +#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185 +#: elf64-alpha.c:4313 elf64-ia64.c:3687 #, c-format msgid "%s: unknown relocation type %d" msgstr "" -#: elf32-m32r.c:1223 +#: elf32-m32r.c:1221 #, c-format msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" msgstr "" -#: elf32-m32r.c:2000 +#: elf32-m32r.c:1947 #, c-format msgid "%s: Instruction set mismatch with previous modules" msgstr "" -#: elf32-m32r.c:2023 +#: elf32-m32r.c:1970 #, c-format msgid "private flags = %lx" msgstr "" -#: elf32-m32r.c:2028 +#: elf32-m32r.c:1975 msgid ": m32r instructions" msgstr "" -#: elf32-m32r.c:2029 +#: elf32-m32r.c:1976 msgid ": m32rx instructions" msgstr "" @@ -1003,301 +1042,180 @@ msgstr "" msgid " [cpu32]" msgstr "" -#: elf32-mcore.c:353 elf32-mcore.c:479 +#: elf32-m68k.c:416 +msgid " [m68000]" +msgstr "" + +#: elf32-mcore.c:354 elf32-mcore.c:457 #, c-format msgid "%s: Relocation %s (%d) is not currently supported.\n" msgstr "" -#: elf32-mcore.c:438 +#: elf32-mcore.c:442 #, c-format msgid "%s: Unknown relocation type %d\n" msgstr "" -#: elf32-mips.c:2156 elf64-mips.c:1972 +#: elf32-mips.c:1152 elf64-mips.c:1783 msgid "32bits gp relative relocation occurs for an external symbol" msgstr "" -#: elf32-mips.c:2305 +#: elf32-mips.c:1301 #, c-format msgid "Linking mips16 objects into %s format is not supported" msgstr "" -#: elf32-mips.c:3129 -#, c-format -msgid "%s: linking PIC files with non-PIC files" -msgstr "" - -#: elf32-mips.c:3139 -#, c-format -msgid "%s: linking abicalls files with non-abicalls files" -msgstr "" - -#: elf32-mips.c:3168 -#, c-format -msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" -msgstr "" - -#: elf32-mips.c:3190 -#, c-format -msgid "%s: ISA mismatch (%d) with previous modules (%d)" -msgstr "" - -#: elf32-mips.c:3213 -#, c-format -msgid "%s: ABI mismatch: linking %s module with previous %s modules" -msgstr "" - -#: elf32-mips.c:3227 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027 -#, c-format -msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" -msgstr "" - -#: elf32-mips.c:3258 -msgid " [abi=O32]" -msgstr "" - -#: elf32-mips.c:3260 -msgid " [abi=O64]" -msgstr "" - -#: elf32-mips.c:3262 -msgid " [abi=EABI32]" -msgstr "" - -#: elf32-mips.c:3264 -msgid " [abi=EABI64]" -msgstr "" - -#: elf32-mips.c:3266 -msgid " [abi unknown]" -msgstr "" - -#: elf32-mips.c:3268 -msgid " [abi=N32]" -msgstr "" - -#: elf32-mips.c:3270 -msgid " [abi=64]" -msgstr "" - -#: elf32-mips.c:3272 -msgid " [no abi set]" -msgstr "" - -#: elf32-mips.c:3275 -msgid " [mips1]" -msgstr "" - -#: elf32-mips.c:3277 -msgid " [mips2]" -msgstr "" - -#: elf32-mips.c:3279 -msgid " [mips3]" -msgstr "" - -#: elf32-mips.c:3281 -msgid " [mips4]" -msgstr "" - -#: elf32-mips.c:3283 -msgid " [mips5]" -msgstr "" - -#: elf32-mips.c:3285 -msgid " [mips32]" -msgstr "" - -#: elf32-mips.c:3287 -msgid " [mips64]" -msgstr "" - -#: elf32-mips.c:3289 -msgid " [unknown ISA]" -msgstr "" - -#: elf32-mips.c:3292 -msgid " [32bitmode]" -msgstr "" - -#: elf32-mips.c:3294 -msgid " [not 32bitmode]" -msgstr "" - -#: elf32-mips.c:4967 -msgid "static procedure (no name)" -msgstr "" - -#: elf32-mips.c:5585 elf64-mips.c:6694 -#, c-format -msgid "%s: illegal section name `%s'" -msgstr "" - -#: elf32-mips.c:6152 elf64-mips.c:3150 -msgid "not enough GOT space for local GOT entries" -msgstr "" - -#: elf32-mips.c:7263 elf64-mips.c:4203 -#, c-format -msgid "%s: %s+0x%lx: jump to stub routine which is not jal" -msgstr "" - -#: elf32-mips.c:8272 elf64-mips.c:5891 -#, c-format -msgid "%s: Malformed reloc detected for section %s" -msgstr "" - -#: elf32-mips.c:8350 elf64-mips.c:5969 -#, c-format -msgid "%s: CALL16 reloc at 0x%lx not against global symbol" -msgstr "" - -#: elf32-ppc.c:1436 elf64-ppc.c:1521 +#: elf32-ppc.c:1460 #, c-format msgid "" "%s: compiled with -mrelocatable and linked with modules compiled normally" msgstr "" -#: elf32-ppc.c:1444 elf64-ppc.c:1529 +#: elf32-ppc.c:1468 #, c-format msgid "" "%s: compiled normally and linked with modules compiled with -mrelocatable" msgstr "" -#: elf32-ppc.c:1568 +#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713 +#, c-format +msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" +msgstr "" + +#: elf32-ppc.c:1592 #, c-format msgid "%s: Unknown special linker type %d" msgstr "" -#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287 +#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342 #, c-format msgid "%s: relocation %s cannot be used when making a shared object" msgstr "" -#: elf32-ppc.c:3097 elf64-ppc.c:3720 +#: elf32-ppc.c:3126 elf64-ppc.c:5473 #, c-format msgid "%s: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523 +#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553 #, c-format msgid "" "%s: The target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:3589 +#: elf32-ppc.c:3619 #, c-format msgid "%s: Relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-sh.c:1971 +#: elf32-sh.c:1964 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES offset" msgstr "" -#: elf32-sh.c:1983 +#: elf32-sh.c:1976 #, c-format msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" msgstr "" -#: elf32-sh.c:2000 +#: elf32-sh.c:1993 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES load offset" msgstr "" -#: elf32-sh.c:2015 +#: elf32-sh.c:2008 #, c-format msgid "%s: 0x%lx: warning: could not find expected reloc" msgstr "" -#: elf32-sh.c:2072 +#: elf32-sh.c:2036 #, c-format msgid "%s: 0x%lx: warning: symbol in unexpected section" msgstr "" -#: elf32-sh.c:2193 +#: elf32-sh.c:2153 #, c-format msgid "%s: 0x%lx: warning: could not find expected COUNT reloc" msgstr "" -#: elf32-sh.c:2202 +#: elf32-sh.c:2162 #, c-format msgid "%s: 0x%lx: warning: bad count" msgstr "" -#: elf32-sh.c:2611 elf32-sh.c:3002 +#: elf32-sh.c:2550 elf32-sh.c:2926 #, c-format msgid "%s: 0x%lx: fatal: reloc overflow while relaxing" msgstr "" -#: elf32-sh.c:4146 elf64-sh64.c:1557 +#: elf32-sh.c:4073 elf64-sh64.c:1576 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "" -#: elf32-sh.c:4357 +#: elf32-sh.c:4284 #, c-format msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "" -#: elf32-sh64.c:211 elf64-sh64.c:2391 +#: elf32-sh64.c:203 elf64-sh64.c:2364 #, c-format msgid "%s: compiled as 32-bit object and %s is 64-bit" msgstr "" -#: elf32-sh64.c:214 elf64-sh64.c:2394 +#: elf32-sh64.c:206 elf64-sh64.c:2367 #, c-format msgid "%s: compiled as 64-bit object and %s is 32-bit" msgstr "" -#: elf32-sh64.c:216 elf64-sh64.c:2396 +#: elf32-sh64.c:208 elf64-sh64.c:2369 #, c-format msgid "%s: object size does not match that of target %s" msgstr "" -#: elf32-sh64.c:447 elf64-sh64.c:2973 +#: elf32-sh64.c:440 elf64-sh64.c:2941 #, c-format msgid "%s: encountered datalabel symbol in input" msgstr "" -#: elf32-sh64.c:530 +#: elf32-sh64.c:523 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" msgstr "" -#: elf32-sh64.c:533 +#: elf32-sh64.c:526 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" msgstr "" -#: elf32-sh64.c:551 +#: elf32-sh64.c:544 #, c-format msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" msgstr "" -#: elf32-sh64.c:600 elf64-sh64.c:1684 +#: elf32-sh64.c:593 elf64-sh64.c:1703 #, c-format msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" msgstr "" -#: elf32-sh64.c:684 +#: elf32-sh64.c:677 #, c-format msgid "%s: could not write out added .cranges entries" msgstr "" -#: elf32-sh64.c:745 +#: elf32-sh64.c:739 #, c-format msgid "%s: could not write out sorted .cranges entries" msgstr "" -#: elf32-sparc.c:1554 elf64-sparc.c:2280 +#: elf32-sparc.c:1535 elf64-sparc.c:2224 #, c-format msgid "%s: probably compiled without -fPIC?" msgstr "" -#: elf32-sparc.c:2007 +#: elf32-sparc.c:2002 #, c-format msgid "%s: compiled for a 64 bit system and target is 32 bit" msgstr "" -#: elf32-sparc.c:2021 +#: elf32-sparc.c:2016 #, c-format msgid "%s: linking little endian files with big endian files" msgstr "" @@ -1347,47 +1265,115 @@ msgstr "" msgid "could not locate special linker symbol __ctbp" msgstr "" -#: elf32-v850.c:1877 +#: elf32-v850.c:1875 #, c-format msgid "%s: Architecture mismatch with previous modules" msgstr "" -#: elf32-v850.c:1897 +#: elf32-v850.c:1895 #, c-format msgid "private flags = %lx: " msgstr "" -#: elf32-v850.c:1902 +#: elf32-v850.c:1900 msgid "v850 architecture" msgstr "" -#: elf32-v850.c:1903 +#: elf32-v850.c:1901 msgid "v850e architecture" msgstr "" -#: elf32-v850.c:1904 +#: elf32-v850.c:1902 msgid "v850ea architecture" msgstr "" -#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247 +#: elf32-vax.c:546 +msgid " [nonpic]" +msgstr "" + +#: elf32-vax.c:549 +msgid " [d-float]" +msgstr "" + +#: elf32-vax.c:552 +msgid " [g-float]" +msgstr "" + +#: elf32-vax.c:674 +#, c-format +msgid "" +"%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of " +"%ld" +msgstr "" + +#: elf32-vax.c:1679 +#, c-format +msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" +msgstr "" + +#: elf32-vax.c:1814 +#, c-format +msgid "%s: warning: %s relocation against symbol `%s' from %s section" +msgstr "" + +#: elf32-vax.c:1820 +#, c-format +msgid "%s: warning: %s relocation to 0x%x from %s section" +msgstr "" + +#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280 msgid "non-zero addend in @fptr reloc" msgstr "" -#: elf64-alpha.c:858 +#: elf64-alpha.c:1097 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "" -#: elf64-alpha.c:2934 +#: elf64-alpha.c:3675 #, c-format msgid "%s: .got subsegment exceeds 64K (size %d)" msgstr "" -#: elf64-alpha.c:3518 elf64-alpha.c:3530 +#: elf64-alpha.c:4498 elf64-alpha.c:4510 #, c-format msgid "%s: gp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-hppa.c:2070 +#: elf64-alpha.c:4536 elf64-alpha.c:4676 +#, c-format +msgid "%s: pc-relative relocation against dynamic symbol %s" +msgstr "" + +#: elf64-alpha.c:4564 +#, c-format +msgid "%s: change in gp: BRSGP %s" +msgstr "" + +#: elf64-alpha.c:4589 +msgid "<unknown>" +msgstr "" + +#: elf64-alpha.c:4594 +#, c-format +msgid "%s: !samegp reloc against symbol without .prologue: %s" +msgstr "" + +#: elf64-alpha.c:4639 +#, c-format +msgid "%s: unhandled dynamic relocation against %s" +msgstr "" + +#: elf64-alpha.c:4752 +#, c-format +msgid "%s: dtp-relative relocation against dynamic symbol %s" +msgstr "" + +#: elf64-alpha.c:4775 +#, c-format +msgid "%s: tp-relative relocation against dynamic symbol %s" +msgstr "" + +#: elf64-hppa.c:2080 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "" @@ -1433,159 +1419,344 @@ msgid "" "register is $%ld." msgstr "" -#: elf64-mmix.c:1967 +#: elf64-mmix.c:1965 #, c-format msgid "" "%s: Error: multiple definition of `%s'; start of %s is set in a earlier " "linked file\n" msgstr "" -#: elf64-mmix.c:2026 +#: elf64-mmix.c:2024 msgid "Register section has contents\n" msgstr "" -#: elf64-ppc.c:1484 libbfd.c:1436 +#: elf64-mmix.c:2186 +#, c-format +msgid "" +"Internal inconsistency: remaining %u != max %u.\n" +" Please report this bug." +msgstr "" + +#: elf64-ppc.c:1669 libbfd.c:1435 #, c-format msgid "%s: compiled for a big endian system and target is little endian" msgstr "" -#: elf64-ppc.c:1486 libbfd.c:1438 +#: elf64-ppc.c:1671 libbfd.c:1437 #, c-format msgid "%s: compiled for a little endian system and target is big endian" msgstr "" -#: elf64-ppc.c:3354 +#: elf64-ppc.c:3610 +#, c-format +msgid "%s: unexpected reloc type %u in .opd section" +msgstr "" + +#: elf64-ppc.c:3630 +#, c-format +msgid "%s: .opd is not a regular array of opd entries" +msgstr "" + +#: elf64-ppc.c:3672 +#, c-format +msgid "%s: undefined sym `%s' in .opd section" +msgstr "" + +#: elf64-ppc.c:4397 +#, c-format +msgid "can't find branch stub `%s'" +msgstr "" + +#: elf64-ppc.c:4436 elf64-ppc.c:4501 #, c-format msgid "linkage table error against `%s'" msgstr "" -#: elf64-ppc.c:3436 -msgid "stub section size doesn't match calculated size" +#: elf64-ppc.c:4573 +#, c-format +msgid "can't build branch stub `%s'" +msgstr "" + +#: elf64-ppc.c:5179 +msgid "stubs don't match calculated size" msgstr "" -#: elf64-ppc.c:4065 +#: elf64-ppc.c:5828 #, c-format msgid "%s: Relocation %s is not supported for symbol %s." msgstr "" -#: elf64-ppc.c:4109 +#: elf64-ppc.c:5872 #, c-format msgid "%s: error: relocation %s not a multiple of 4" msgstr "" -#: elf64-sparc.c:1277 +#: elf64-sparc.c:1280 #, c-format msgid "%s: check_relocs: unhandled reloc type %d" msgstr "" -#: elf64-sparc.c:1314 +#: elf64-sparc.c:1317 #, c-format msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER" msgstr "" -#: elf64-sparc.c:1334 +#: elf64-sparc.c:1337 #, c-format msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s" msgstr "" -#: elf64-sparc.c:1357 +#: elf64-sparc.c:1360 #, c-format msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s" msgstr "" -#: elf64-sparc.c:1404 +#: elf64-sparc.c:1406 #, c-format msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s" msgstr "" -#: elf64-sparc.c:3008 +#: elf64-sparc.c:2970 #, c-format msgid "%s: linking UltraSPARC specific with HAL specific code" msgstr "" -#: elfcode.h:1218 +#: elfcode.h:1198 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "" -#: elflink.c:434 +#: elflink.c:440 #, c-format msgid "%s: Section %s is too large to add hole of %ld bytes" msgstr "" -#: elflink.h:1113 +#: elflink.h:1090 #, c-format msgid "%s: warning: unexpected redefinition of `%s'" msgstr "" -#: elflink.h:1784 +#: elflink.h:1727 #, c-format msgid "%s: %s: invalid version %u (max %d)" msgstr "" -#: elflink.h:1825 +#: elflink.h:1768 #, c-format msgid "%s: %s: invalid needed version %d" msgstr "" -#: elflink.h:1945 +#: elflink.h:1890 #, c-format msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s" msgstr "" -#: elflink.h:4014 +#: elflink.h:3174 +#, c-format +msgid "%s: .preinit_array section is not allowed in DSO" +msgstr "" + +#: elflink.h:4030 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "" -#: elflink.h:4320 +#: elflink.h:4345 #, c-format msgid "%s: undefined versioned symbol name %s" msgstr "" -#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280 +#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600 msgid "Error: out of memory" msgstr "" -#: elflink.h:4714 +#: elflink.h:4781 msgid "Not enough memory to sort relocations" msgstr "" -#: elflink.h:5980 +#: elflink.h:5682 elflink.h:5725 +#, c-format +msgid "%s: could not find output section %s" +msgstr "" + +#: elflink.h:5688 +#, c-format +msgid "warning: %s section has zero size" +msgstr "" + +#: elflink.h:6275 #, c-format msgid "%s: could not find output section %s for input section %s" msgstr "" -#: elflink.h:6553 +#: elflink.h:6486 +#, c-format +msgid "%s: relocation size mismatch in %s section %s" +msgstr "" + +#: elflink.h:6849 msgid "warning: relocation against removed section; zeroing" msgstr "" -#: elflink.h:6583 +#: elflink.h:6879 msgid "warning: relocation against removed section" msgstr "" -#: elflink.h:6596 +#: elflink.h:6892 #, c-format msgid "local symbols in discarded section %s" msgstr "" -#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456 +#: elfxx-mips.c:734 +msgid "static procedure (no name)" +msgstr "" + +#: elfxx-mips.c:1601 +msgid "not enough GOT space for local GOT entries" +msgstr "" + +#: elfxx-mips.c:2750 +#, c-format +msgid "%s: %s+0x%lx: jump to stub routine which is not jal" +msgstr "" + +#: elfxx-mips.c:4270 +#, c-format +msgid "%s: Malformed reloc detected for section %s" +msgstr "" + +#: elfxx-mips.c:4348 +#, c-format +msgid "%s: CALL16 reloc at 0x%lx not against global symbol" +msgstr "" + +#: elfxx-mips.c:7301 +#, c-format +msgid "%s: illegal section name `%s'" +msgstr "" + +#: elfxx-mips.c:7615 +#, c-format +msgid "%s: linking PIC files with non-PIC files" +msgstr "" + +#: elfxx-mips.c:7625 +#, c-format +msgid "%s: linking abicalls files with non-abicalls files" +msgstr "" + +#: elfxx-mips.c:7654 +#, c-format +msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" +msgstr "" + +#: elfxx-mips.c:7676 +#, c-format +msgid "%s: ISA mismatch (%d) with previous modules (%d)" +msgstr "" + +#: elfxx-mips.c:7699 +#, c-format +msgid "%s: ABI mismatch: linking %s module with previous %s modules" +msgstr "" + +#: elfxx-mips.c:7759 +msgid " [abi=O32]" +msgstr "" + +#: elfxx-mips.c:7761 +msgid " [abi=O64]" +msgstr "" + +#: elfxx-mips.c:7763 +msgid " [abi=EABI32]" +msgstr "" + +#: elfxx-mips.c:7765 +msgid " [abi=EABI64]" +msgstr "" + +#: elfxx-mips.c:7767 +msgid " [abi unknown]" +msgstr "" + +#: elfxx-mips.c:7769 +msgid " [abi=N32]" +msgstr "" + +#: elfxx-mips.c:7771 +msgid " [abi=64]" +msgstr "" + +#: elfxx-mips.c:7773 +msgid " [no abi set]" +msgstr "" + +#: elfxx-mips.c:7776 +msgid " [mips1]" +msgstr "" + +#: elfxx-mips.c:7778 +msgid " [mips2]" +msgstr "" + +#: elfxx-mips.c:7780 +msgid " [mips3]" +msgstr "" + +#: elfxx-mips.c:7782 +msgid " [mips4]" +msgstr "" + +#: elfxx-mips.c:7784 +msgid " [mips5]" +msgstr "" + +#: elfxx-mips.c:7786 +msgid " [mips32]" +msgstr "" + +#: elfxx-mips.c:7788 +msgid " [mips64]" +msgstr "" + +#: elfxx-mips.c:7790 +msgid " [unknown ISA]" +msgstr "" + +#: elfxx-mips.c:7793 +msgid " [mdmx]" +msgstr "" + +#: elfxx-mips.c:7796 +msgid " [mips16]" +msgstr "" + +#: elfxx-mips.c:7799 +msgid " [32bitmode]" +msgstr "" + +#: elfxx-mips.c:7801 +msgid " [not 32bitmode]" +msgstr "" + +#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459 #, c-format msgid "Output file requires shared library `%s'\n" msgstr "" -#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464 +#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467 #, c-format msgid "Output file requires shared library `%s.so.%s'\n" msgstr "" -#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708 -#: sparclinux.c:655 sparclinux.c:705 +#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710 +#: sparclinux.c:657 sparclinux.c:707 #, c-format msgid "Symbol %s not defined for fixups\n" msgstr "" -#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729 +#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731 msgid "Warning: fixup count mismatch\n" msgstr "" @@ -1619,47 +1790,47 @@ msgstr "" msgid "%s:%d: unexpected character `%s' in Intel Hex file\n" msgstr "" -#: ihex.c:368 +#: ihex.c:366 #, c-format msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)" msgstr "" -#: ihex.c:422 +#: ihex.c:420 #, c-format msgid "%s:%u: bad extended address record length in Intel Hex file" msgstr "" -#: ihex.c:439 +#: ihex.c:437 #, c-format msgid "%s:%u: bad extended start address length in Intel Hex file" msgstr "" -#: ihex.c:456 +#: ihex.c:454 #, c-format msgid "%s:%u: bad extended linear address record length in Intel Hex file" msgstr "" -#: ihex.c:473 +#: ihex.c:471 #, c-format msgid "%s:%u: bad extended linear start address length in Intel Hex file" msgstr "" -#: ihex.c:490 +#: ihex.c:488 #, c-format msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n" msgstr "" -#: ihex.c:610 +#: ihex.c:607 #, c-format msgid "%s: internal error in ihex_read_section" msgstr "" -#: ihex.c:645 +#: ihex.c:642 #, c-format msgid "%s: bad section length in ihex_read_section" msgstr "" -#: ihex.c:863 +#: ihex.c:860 #, c-format msgid "%s: address 0x%s out of range for Intel Hex file" msgstr "" @@ -1673,174 +1844,174 @@ msgstr "" msgid "not mapping: env var not set\n" msgstr "" -#: libbfd.c:1467 +#: libbfd.c:1466 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "" -#: libbfd.c:1470 +#: libbfd.c:1469 #, c-format msgid "Deprecated %s called\n" msgstr "" -#: linker.c:1849 +#: linker.c:1873 #, c-format msgid "%s: indirect symbol `%s' to `%s' is a loop" msgstr "" -#: linker.c:2745 +#: linker.c:2776 #, c-format msgid "Attempt to do relocateable link with %s input and %s output" msgstr "" -#: merge.c:897 +#: merge.c:892 #, c-format msgid "%s: access beyond end of merged section (%ld + %ld)" msgstr "" -#: mmo.c:459 +#: mmo.c:460 #, c-format msgid "%s: No core to allocate section name %s\n" msgstr "" -#: mmo.c:535 +#: mmo.c:536 #, c-format msgid "%s: No core to allocate a symbol %d bytes long\n" msgstr "" -#: mmo.c:1188 +#: mmo.c:1245 #, c-format msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n" msgstr "" -#: mmo.c:1334 +#: mmo.c:1391 #, c-format msgid "" "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name " "starting with `%s'\n" msgstr "" -#: mmo.c:1569 +#: mmo.c:1633 #, c-format msgid "%s: invalid mmo file: unsupported lopcode `%d'\n" msgstr "" -#: mmo.c:1579 +#: mmo.c:1643 #, c-format msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n" msgstr "" -#: mmo.c:1615 +#: mmo.c:1679 #, c-format msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n" msgstr "" -#: mmo.c:1661 +#: mmo.c:1725 #, c-format msgid "" "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n" msgstr "" -#: mmo.c:1700 +#: mmo.c:1764 #, c-format msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n" msgstr "" -#: mmo.c:1709 +#: mmo.c:1773 #, c-format msgid "" "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n" msgstr "" -#: mmo.c:1732 +#: mmo.c:1796 #, c-format msgid "" "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d " "for lop_fixrx\n" msgstr "" -#: mmo.c:1755 +#: mmo.c:1819 #, c-format msgid "%s: cannot allocate file name for file number %d, %d bytes\n" msgstr "" -#: mmo.c:1775 +#: mmo.c:1839 #, c-format msgid "" "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n" msgstr "" -#: mmo.c:1788 +#: mmo.c:1852 #, c-format msgid "" "%s: invalid mmo file: file name for number %d was not specified before use\n" msgstr "" -#: mmo.c:1894 +#: mmo.c:1958 #, c-format msgid "" "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n" msgstr "" -#: mmo.c:1930 +#: mmo.c:1994 #, c-format msgid "%s: invalid mmo file: lop_end not last item in file\n" msgstr "" -#: mmo.c:1943 +#: mmo.c:2007 #, c-format msgid "" "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras " "to the preceding lop_stab (%ld)\n" msgstr "" -#: mmo.c:2608 +#: mmo.c:2670 #, c-format msgid "%s: invalid symbol table: duplicate symbol `%s'\n" msgstr "" -#: mmo.c:2896 +#: mmo.c:2921 #, c-format msgid "" "%s: Bad symbol definition: `Main' set to %s rather than the start address %" "s\n" msgstr "" -#: mmo.c:2930 +#: mmo.c:3011 #, c-format msgid "" "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: " "%d. Only `Main' will be emitted.\n" msgstr "" -#: mmo.c:2975 +#: mmo.c:3056 #, c-format msgid "%s: internal error, symbol table changed size from %d to %d words\n" msgstr "" -#: mmo.c:3030 +#: mmo.c:3111 #, c-format msgid "%s: internal error, internal register section %s had contents\n" msgstr "" -#: mmo.c:3082 +#: mmo.c:3163 #, c-format msgid "%s: no initialized registers; section length 0\n" msgstr "" -#: mmo.c:3088 +#: mmo.c:3169 #, c-format msgid "%s: too many initialized registers; section length %ld\n" msgstr "" -#: mmo.c:3093 +#: mmo.c:3174 #, c-format msgid "" "%s: invalid start address for initialized registers of length %ld: 0x%lx%" "08lx\n" msgstr "" -#: oasys.c:1036 +#: oasys.c:1029 #, c-format msgid "%s: can not represent section `%s' in oasys" msgstr "" @@ -1961,7 +2132,7 @@ msgstr "" msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "" -#: som.c:5402 +#: som.c:5398 msgid "som_sizeof_headers unimplemented" msgstr "" @@ -1970,7 +2141,12 @@ msgstr "" msgid "%s:%d: Unexpected character `%s' in S-record file\n" msgstr "" -#: syms.c:998 +#: stabs.c:319 +#, c-format +msgid "%s(%s+0x%lx): Stabs entry has invalid string index." +msgstr "" + +#: syms.c:1044 msgid "Unsupported .stab relocation" msgstr "" @@ -1989,7 +2165,7 @@ msgstr "" msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "" -#: vms-gsd.c:704 +#: vms-gsd.c:702 #, c-format msgid "unknown gsd/egsd subtype %d" msgstr "" @@ -2133,149 +2309,149 @@ msgstr "" msgid "Unhandled relocation %s" msgstr "" -#: xcofflink.c:1241 +#: xcofflink.c:1243 #, c-format msgid "%s: `%s' has line numbers but no enclosing section" msgstr "" -#: xcofflink.c:1294 +#: xcofflink.c:1296 #, c-format msgid "%s: class %d symbol `%s' has no aux entries" msgstr "" -#: xcofflink.c:1317 +#: xcofflink.c:1319 #, c-format msgid "%s: symbol `%s' has unrecognized csect type %d" msgstr "" -#: xcofflink.c:1329 +#: xcofflink.c:1331 #, c-format msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "" -#: xcofflink.c:1365 +#: xcofflink.c:1367 #, c-format msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "" -#: xcofflink.c:1517 +#: xcofflink.c:1519 #, c-format msgid "%s: csect `%s' not in enclosing section" msgstr "" -#: xcofflink.c:1624 +#: xcofflink.c:1626 #, c-format msgid "%s: misplaced XTY_LD `%s'" msgstr "" -#: xcofflink.c:1948 +#: xcofflink.c:1957 #, c-format msgid "%s: reloc %s:%d not in csect" msgstr "" -#: xcofflink.c:2083 +#: xcofflink.c:2092 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "" -#: xcofflink.c:2104 +#: xcofflink.c:2113 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "" -#: xcofflink.c:2749 +#: xcofflink.c:2758 #, c-format msgid "%s: no such symbol" msgstr "" -#: xcofflink.c:2890 +#: xcofflink.c:2891 msgid "error: undefined symbol __rtinit" msgstr "" -#: xcofflink.c:3458 +#: xcofflink.c:3453 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "" -#: xcofflink.c:4452 +#: xcofflink.c:4447 #, c-format msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" msgstr "" -#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117 +#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119 #, c-format msgid "%s: loader reloc in unrecognized section `%s'" msgstr "" -#: xcofflink.c:5314 xcofflink.c:6128 +#: xcofflink.c:5309 xcofflink.c:6130 #, c-format msgid "%s: `%s' in loader reloc but not loader sym" msgstr "" -#: xcofflink.c:5329 +#: xcofflink.c:5324 #, c-format msgid "%s: loader reloc in read-only section %s" msgstr "" -#: elf32-ia64.c:2189 elf64-ia64.c:2189 +#: elf32-ia64.c:2222 elf64-ia64.c:2222 msgid "@pltoff reloc against local symbol" msgstr "" -#: elf32-ia64.c:3413 elf64-ia64.c:3413 +#: elf32-ia64.c:3562 elf64-ia64.c:3562 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "" -#: elf32-ia64.c:3424 elf64-ia64.c:3424 +#: elf32-ia64.c:3573 elf64-ia64.c:3573 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "" -#: elf32-ia64.c:3728 elf64-ia64.c:3728 +#: elf32-ia64.c:3858 elf64-ia64.c:3858 #, c-format msgid "%s: linking non-pic code in a shared library" msgstr "" -#: elf32-ia64.c:3761 elf64-ia64.c:3761 +#: elf32-ia64.c:3891 elf64-ia64.c:3891 #, c-format msgid "%s: @gprel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:3900 elf64-ia64.c:3900 +#: elf32-ia64.c:4030 elf64-ia64.c:4030 #, c-format msgid "%s: dynamic relocation against speculation fixup" msgstr "" -#: elf32-ia64.c:3908 elf64-ia64.c:3908 +#: elf32-ia64.c:4038 elf64-ia64.c:4038 #, c-format msgid "%s: speculation fixup against undefined weak symbol" msgstr "" -#: elf32-ia64.c:4092 elf64-ia64.c:4092 +#: elf32-ia64.c:4271 elf64-ia64.c:4271 msgid "unsupported reloc" msgstr "" -#: elf32-ia64.c:4372 elf64-ia64.c:4372 +#: elf32-ia64.c:4551 elf64-ia64.c:4551 #, c-format msgid "%s: linking trap-on-NULL-dereference with non-trapping files" msgstr "" -#: elf32-ia64.c:4381 elf64-ia64.c:4381 +#: elf32-ia64.c:4560 elf64-ia64.c:4560 #, c-format msgid "%s: linking big-endian files with little-endian files" msgstr "" -#: elf32-ia64.c:4390 elf64-ia64.c:4390 +#: elf32-ia64.c:4569 elf64-ia64.c:4569 #, c-format msgid "%s: linking 64-bit files with 32-bit files" msgstr "" -#: elf32-ia64.c:4399 elf64-ia64.c:4399 +#: elf32-ia64.c:4578 elf64-ia64.c:4578 #, c-format msgid "%s: linking constant-gp files with non-constant-gp files" msgstr "" -#: elf32-ia64.c:4409 elf64-ia64.c:4409 +#: elf32-ia64.c:4588 elf64-ia64.c:4588 #, c-format msgid "%s: linking auto-pic files with non-auto-pic files" msgstr "" @@ -2394,43 +2570,37 @@ msgid "" " Table Stamp Chain Name Thunk\n" msgstr "" -#: peigen.c:1180 pepigen.c:1180 +#: peigen.c:1181 pepigen.c:1181 #, c-format msgid "" "\n" "\tDLL Name: %s\n" msgstr "" -#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247 -msgid "\tvma: Hint/Ord Member-Name\n" -msgstr "" - -#: peigen.c:1246 pepigen.c:1246 -msgid "\tThe Import Address Table (difference found)\n" +#: peigen.c:1192 pepigen.c:1192 +msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "" -#: peigen.c:1253 pepigen.c:1253 -msgid "\t>>> Ran out of IAT members!\n" -msgstr "" - -#: peigen.c:1271 pepigen.c:1271 -msgid "\tThe Import Address Table is identical\n" +#: peigen.c:1217 pepigen.c:1217 +msgid "" +"\n" +"There is a first thunk, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1343 pepigen.c:1343 +#: peigen.c:1357 pepigen.c:1357 msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1348 pepigen.c:1348 +#: peigen.c:1362 pepigen.c:1362 #, c-format msgid "" "\n" "There is an export table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1379 pepigen.c:1379 +#: peigen.c:1393 pepigen.c:1393 #, c-format msgid "" "\n" @@ -2438,129 +2608,129 @@ msgid "" "\n" msgstr "" -#: peigen.c:1383 pepigen.c:1383 +#: peigen.c:1397 pepigen.c:1397 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "" -#: peigen.c:1386 pepigen.c:1386 +#: peigen.c:1400 pepigen.c:1400 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "" -#: peigen.c:1389 pepigen.c:1389 +#: peigen.c:1403 pepigen.c:1403 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "" -#: peigen.c:1392 pepigen.c:1392 +#: peigen.c:1406 pepigen.c:1406 msgid "Name \t\t\t\t" msgstr "" -#: peigen.c:1398 pepigen.c:1398 +#: peigen.c:1412 pepigen.c:1412 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "" -#: peigen.c:1401 pepigen.c:1401 +#: peigen.c:1415 pepigen.c:1415 msgid "Number in:\n" msgstr "" -#: peigen.c:1404 pepigen.c:1404 +#: peigen.c:1418 pepigen.c:1418 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "" -#: peigen.c:1408 pepigen.c:1408 +#: peigen.c:1422 pepigen.c:1422 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "" -#: peigen.c:1411 pepigen.c:1411 +#: peigen.c:1425 pepigen.c:1425 msgid "Table Addresses\n" msgstr "" -#: peigen.c:1414 pepigen.c:1414 +#: peigen.c:1428 pepigen.c:1428 msgid "\tExport Address Table \t\t" msgstr "" -#: peigen.c:1419 pepigen.c:1419 +#: peigen.c:1433 pepigen.c:1433 msgid "\tName Pointer Table \t\t" msgstr "" -#: peigen.c:1424 pepigen.c:1424 +#: peigen.c:1438 pepigen.c:1438 msgid "\tOrdinal Table \t\t\t" msgstr "" -#: peigen.c:1439 pepigen.c:1439 +#: peigen.c:1453 pepigen.c:1453 #, c-format msgid "" "\n" "Export Address Table -- Ordinal Base %ld\n" msgstr "" -#: peigen.c:1458 pepigen.c:1458 +#: peigen.c:1472 pepigen.c:1472 msgid "Forwarder RVA" msgstr "" -#: peigen.c:1469 pepigen.c:1469 +#: peigen.c:1483 pepigen.c:1483 msgid "Export RVA" msgstr "" -#: peigen.c:1476 pepigen.c:1476 +#: peigen.c:1490 pepigen.c:1490 msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" -#: peigen.c:1531 pepigen.c:1531 +#: peigen.c:1545 pepigen.c:1545 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "" -#: peigen.c:1535 pepigen.c:1535 +#: peigen.c:1549 pepigen.c:1549 msgid "" "\n" "The Function Table (interpreted .pdata section contents)\n" msgstr "" -#: peigen.c:1538 pepigen.c:1538 +#: peigen.c:1552 pepigen.c:1552 msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr "" -#: peigen.c:1540 pepigen.c:1540 +#: peigen.c:1554 pepigen.c:1554 msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" " \t\tAddress Address Handler Data Address Mask\n" msgstr "" -#: peigen.c:1610 pepigen.c:1610 +#: peigen.c:1624 pepigen.c:1624 msgid " Register save millicode" msgstr "" -#: peigen.c:1613 pepigen.c:1613 +#: peigen.c:1627 pepigen.c:1627 msgid " Register restore millicode" msgstr "" -#: peigen.c:1616 pepigen.c:1616 +#: peigen.c:1630 pepigen.c:1630 msgid " Glue code sequence" msgstr "" -#: peigen.c:1668 pepigen.c:1668 +#: peigen.c:1682 pepigen.c:1682 msgid "" "\n" "\n" "PE File Base Relocations (interpreted .reloc section contents)\n" msgstr "" -#: peigen.c:1698 pepigen.c:1698 +#: peigen.c:1712 pepigen.c:1712 #, c-format msgid "" "\n" "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" msgstr "" -#: peigen.c:1711 pepigen.c:1711 +#: peigen.c:1725 pepigen.c:1725 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "" @@ -2568,7 +2738,7 @@ msgstr "" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1751 pepigen.c:1751 +#: peigen.c:1765 pepigen.c:1765 #, c-format msgid "" "\n" diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c index 9ac3f31..5b153bd 100644 --- a/contrib/binutils/bfd/ppcboot.c +++ b/contrib/binutils/bfd/ppcboot.c @@ -469,8 +469,11 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg) #define ppcboot_bfd_relax_section bfd_generic_relax_section #define ppcboot_bfd_gc_sections bfd_generic_gc_sections #define ppcboot_bfd_merge_sections bfd_generic_merge_sections +#define ppcboot_bfd_discard_group bfd_generic_discard_group #define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define ppcboot_bfd_link_just_syms _bfd_generic_link_just_syms #define ppcboot_bfd_final_link _bfd_generic_final_link #define ppcboot_bfd_link_split_section _bfd_generic_link_split_section #define ppcboot_get_section_contents_in_window \ diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c index c701fe0..59f7819 100644 --- a/contrib/binutils/bfd/reloc.c +++ b/contrib/binutils/bfd/reloc.c @@ -645,7 +645,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, reloc_target_output_section = symbol->section->output_section; /* Convert input-section-relative symbol value to absolute. */ - if (output_bfd && howto->partial_inplace == false) + if (output_bfd && ! howto->partial_inplace) output_base = 0; else output_base = reloc_target_output_section->vma; @@ -658,7 +658,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, /* Here the variable relocation holds the final address of the symbol we are relocating against, plus any addend. */ - if (howto->pc_relative == true) + if (howto->pc_relative) { /* This is a PC relative relocation. We want to set RELOCATION to the distance between the address of the symbol and the @@ -691,13 +691,13 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, relocation -= input_section->output_section->vma + input_section->output_offset; - if (howto->pcrel_offset == true) + if (howto->pcrel_offset) relocation -= reloc_entry->address; } if (output_bfd != (bfd *) NULL) { - if (howto->partial_inplace == false) + if (! howto->partial_inplace) { /* This is a partial relocation, and we want to apply the relocation to the reloc entry rather than the raw data. Modify the reloc @@ -1037,7 +1037,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, reloc_target_output_section = symbol->section->output_section; /* Convert input-section-relative symbol value to absolute. */ - if (howto->partial_inplace == false) + if (! howto->partial_inplace) output_base = 0; else output_base = reloc_target_output_section->vma; @@ -1050,7 +1050,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, /* Here the variable relocation holds the final address of the symbol we are relocating against, plus any addend. */ - if (howto->pc_relative == true) + if (howto->pc_relative) { /* This is a PC relative relocation. We want to set RELOCATION to the distance between the address of the symbol and the @@ -1083,11 +1083,11 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, relocation -= input_section->output_section->vma + input_section->output_offset; - if (howto->pcrel_offset == true && howto->partial_inplace == true) + if (howto->pcrel_offset && howto->partial_inplace) relocation -= reloc_entry->address; } - if (howto->partial_inplace == false) + if (! howto->partial_inplace) { /* This is a partial relocation, and we want to apply the relocation to the reloc entry rather than the raw data. Modify the reloc @@ -1963,6 +1963,35 @@ ENUMDOC STO_ALPHA_STD_GPLOAD. ENUM + BFD_RELOC_ALPHA_TLSGD +ENUMX + BFD_RELOC_ALPHA_TLSLDM +ENUMX + BFD_RELOC_ALPHA_DTPMOD64 +ENUMX + BFD_RELOC_ALPHA_GOTDTPREL16 +ENUMX + BFD_RELOC_ALPHA_DTPREL64 +ENUMX + BFD_RELOC_ALPHA_DTPREL_HI16 +ENUMX + BFD_RELOC_ALPHA_DTPREL_LO16 +ENUMX + BFD_RELOC_ALPHA_DTPREL16 +ENUMX + BFD_RELOC_ALPHA_GOTTPREL16 +ENUMX + BFD_RELOC_ALPHA_TPREL64 +ENUMX + BFD_RELOC_ALPHA_TPREL_HI16 +ENUMX + BFD_RELOC_ALPHA_TPREL_LO16 +ENUMX + BFD_RELOC_ALPHA_TPREL16 +ENUMDOC + Alpha thread-local storage relocations. + +ENUM BFD_RELOC_MIPS_JMP ENUMDOC Bits 27..2 of the relocation address shifted right 2 bits; @@ -2050,6 +2079,27 @@ ENUMX ENUMX BFD_RELOC_MIPS_JALR COMMENT +ENUM + BFD_RELOC_FRV_LABEL16 +ENUMX + BFD_RELOC_FRV_LABEL24 +ENUMX + BFD_RELOC_FRV_LO16 +ENUMX + BFD_RELOC_FRV_HI16 +ENUMX + BFD_RELOC_FRV_GPREL12 +ENUMX + BFD_RELOC_FRV_GPRELU12 +ENUMX + BFD_RELOC_FRV_GPREL32 +ENUMX + BFD_RELOC_FRV_GPRELHI +ENUMX + BFD_RELOC_FRV_GPRELLO +ENUMDOC + Fujitsu Frv Relocations. +COMMENT COMMENT ENUMDOC MIPS ELF relocations. @@ -2072,6 +2122,30 @@ ENUMX BFD_RELOC_386_GOTOFF ENUMX BFD_RELOC_386_GOTPC +ENUMX + BFD_RELOC_386_TLS_TPOFF +ENUMX + BFD_RELOC_386_TLS_IE +ENUMX + BFD_RELOC_386_TLS_GOTIE +ENUMX + BFD_RELOC_386_TLS_LE +ENUMX + BFD_RELOC_386_TLS_GD +ENUMX + BFD_RELOC_386_TLS_LDM +ENUMX + BFD_RELOC_386_TLS_LDO_32 +ENUMX + BFD_RELOC_386_TLS_IE_32 +ENUMX + BFD_RELOC_386_TLS_LE_32 +ENUMX + BFD_RELOC_386_TLS_DTPMOD32 +ENUMX + BFD_RELOC_386_TLS_DTPOFF32 +ENUMX + BFD_RELOC_386_TLS_TPOFF32 ENUMDOC i386/elf relocations @@ -2598,6 +2672,19 @@ ENUMDOC This is a 32-bit pc-relative reloc. ENUM + BFD_RELOC_DLX_HI16_S +ENUMDOC + DLX relocs +ENUM + BFD_RELOC_DLX_LO16 +ENUMDOC + DLX relocs +ENUM + BFD_RELOC_DLX_JMP26 +ENUMDOC + DLX relocs + +ENUM BFD_RELOC_M32R_24 ENUMDOC Mitsubishi M32R relocs. @@ -3185,17 +3272,43 @@ ENUMX ENUMX BFD_RELOC_IA64_COPY ENUMX + BFD_RELOC_IA64_LTOFF22X +ENUMX + BFD_RELOC_IA64_LDXMOV +ENUMX + BFD_RELOC_IA64_TPREL14 +ENUMX BFD_RELOC_IA64_TPREL22 ENUMX + BFD_RELOC_IA64_TPREL64I +ENUMX BFD_RELOC_IA64_TPREL64MSB ENUMX BFD_RELOC_IA64_TPREL64LSB ENUMX - BFD_RELOC_IA64_LTOFF_TP22 + BFD_RELOC_IA64_LTOFF_TPREL22 ENUMX - BFD_RELOC_IA64_LTOFF22X + BFD_RELOC_IA64_DTPMOD64MSB ENUMX - BFD_RELOC_IA64_LDXMOV + BFD_RELOC_IA64_DTPMOD64LSB +ENUMX + BFD_RELOC_IA64_LTOFF_DTPMOD22 +ENUMX + BFD_RELOC_IA64_DTPREL14 +ENUMX + BFD_RELOC_IA64_DTPREL22 +ENUMX + BFD_RELOC_IA64_DTPREL64I +ENUMX + BFD_RELOC_IA64_DTPREL32MSB +ENUMX + BFD_RELOC_IA64_DTPREL32LSB +ENUMX + BFD_RELOC_IA64_DTPREL64MSB +ENUMX + BFD_RELOC_IA64_DTPREL64LSB +ENUMX + BFD_RELOC_IA64_LTOFF_DTPREL22 ENUMDOC Intel IA64 Relocations. @@ -3363,6 +3476,15 @@ ENUMX ENUMDOC Sony Xstormy16 Relocations. +ENUM + BFD_RELOC_VAX_GLOB_DAT +ENUMX + BFD_RELOC_VAX_JMP_SLOT +ENUMX + BFD_RELOC_VAX_RELATIVE +ENUMDOC + Relocations used by VAX ELF. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c index 1d69a7f..1db8daf 100644 --- a/contrib/binutils/bfd/reloc16.c +++ b/contrib/binutils/bfd/reloc16.c @@ -196,8 +196,7 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again) The last element is used as an accumlator of shrinks. */ amt = reloc_count + 1; amt *= sizeof (unsigned); - shrinks = (unsigned *) bfd_malloc (amt); - memset (shrinks, 0, (size_t) amt); + shrinks = (unsigned *) bfd_zmalloc (amt); /* Loop until nothing changes in this section. */ do { diff --git a/contrib/binutils/bfd/rs6000-core.c b/contrib/binutils/bfd/rs6000-core.c index 6330153..a61f25c 100644 --- a/contrib/binutils/bfd/rs6000-core.c +++ b/contrib/binutils/bfd/rs6000-core.c @@ -11,21 +11,21 @@ Archive support from Damon A. Permezel. Contributed by IBM Corporation and Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This port currently only handles reading object files, except when compiled on an RS/6000 host. -- no archive support, no core files. diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c index 076a012..51b21c7 100644 --- a/contrib/binutils/bfd/section.c +++ b/contrib/binutils/bfd/section.c @@ -230,12 +230,6 @@ CODE_FRAGMENT . standard data. *} .#define SEC_CONSTRUCTOR 0x100 . -. {* The section is a constructor, and should be placed at the -. end of the text, data, or bss section(?). *} -.#define SEC_CONSTRUCTOR_TEXT 0x1100 -.#define SEC_CONSTRUCTOR_DATA 0x2100 -.#define SEC_CONSTRUCTOR_BSS 0x3100 -. . {* The section has contents - a data section could be . <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be . <<SEC_HAS_CONTENTS>> *} @@ -256,6 +250,9 @@ CODE_FRAGMENT . sections. *} .#define SEC_COFF_SHARED_LIBRARY 0x800 . +. {* The section contains thread local data. *} +.#define SEC_THREAD_LOCAL 0x1000 +. . {* The section has GOT references. This flag is only for the . linker, and is currently only used by the elf32-hppa back end. . It will be set if global offset table references were detected @@ -801,7 +798,7 @@ bfd_get_unique_section_name (abfd, templat, count) sname = bfd_malloc ((bfd_size_type) len + 8); if (sname == NULL) return NULL; - strcpy (sname, templat); + memcpy (sname, templat, len); num = 1; if (count != NULL) num = *count; @@ -1304,77 +1301,57 @@ SYNOPSIS DESCRIPTION Remove @var{section} from the output. If the output section - becomes empty, remove it from the output bfd. @var{info} may - be NULL; if it is not, it is used to decide whether the output - section is empty. + becomes empty, remove it from the output bfd. + + This function won't actually do anything except twiddle flags + if called too late in the linking process, when it's not safe + to remove sections. */ void _bfd_strip_section_from_output (info, s) struct bfd_link_info *info; asection *s; { - asection **spp, *os; - struct bfd_link_order *p, *pp; - boolean keep_os; + asection *os; + asection *is; + bfd *abfd; - /* Excise the input section from the link order. + s->flags |= SEC_EXCLUDE; - FIXME: For all calls that I can see to this function, the link - orders have not yet been set up. So why are we checking them? -- - Ian */ + /* If the section wasn't assigned to an output section, or the + section has been discarded by the linker script, there's nothing + more to do. */ os = s->output_section; - - /* Handle a section that wasn't output. */ - if (os == NULL) + if (os == NULL || os->owner == NULL) return; - for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next) - if (p->type == bfd_indirect_link_order - && p->u.indirect.section == s) - { - if (pp) - pp->next = p->next; - else - os->link_order_head = p->next; - if (!p->next) - os->link_order_tail = pp; - break; - } - - keep_os = os->link_order_head != NULL; - - if (! keep_os && info != NULL) - { - bfd *abfd; - for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next) - { - asection *is; - for (is = abfd->sections; is != NULL; is = is->next) - { - if (is != s && is->output_section == os - && (is->flags & SEC_EXCLUDE) == 0) - break; - } - if (is != NULL) - break; - } - if (abfd != NULL) - keep_os = true; - } + /* If the output section has other (non-excluded) input sections, we + can't remove it. */ + for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next) + for (is = abfd->sections; is != NULL; is = is->next) + if (is->output_section == os && (is->flags & SEC_EXCLUDE) == 0) + return; - /* If the output section is empty, remove it too. Careful about sections - that have been discarded in the link script -- they are mapped to - bfd_abs_section, which has no owner. */ - if (!keep_os && os->owner != NULL) - { - for (spp = &os->owner->sections; *spp; spp = &(*spp)->next) - if (*spp == os) - { - bfd_section_list_remove (os->owner, spp); - os->owner->section_count--; - break; - } - } + /* If the output section is empty, flag it for removal too. + See ldlang.c:strip_excluded_output_sections for the action. */ + os->flags |= SEC_EXCLUDE; +} - s->flags |= SEC_EXCLUDE; +/* +FUNCTION + bfd_generic_discard_group + +SYNOPSIS + boolean bfd_generic_discard_group (bfd *abfd, asection *group); + +DESCRIPTION + Remove all members of @var{group} from the output. +*/ + +boolean +bfd_generic_discard_group (abfd, group) + bfd *abfd ATTRIBUTE_UNUSED; + asection *group ATTRIBUTE_UNUSED; +{ + return true; } diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c index a8b4792..e55a4ff 100644 --- a/contrib/binutils/bfd/sparclinux.c +++ b/contrib/binutils/bfd/sparclinux.c @@ -230,7 +230,7 @@ linux_link_hash_table_create (abfd) struct linux_link_hash_table *ret; bfd_size_type amt = sizeof (struct linux_link_hash_table); - ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct linux_link_hash_table *) bfd_malloc (amt); if (ret == (struct linux_link_hash_table *) NULL) return (struct bfd_link_hash_table *) NULL; if (! NAME(aout,link_hash_table_init) (&ret->root, abfd, @@ -599,10 +599,9 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info) { s->_raw_size = linux_hash_table (info)->fixup_count + 1; s->_raw_size *= 8; - s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size); + s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size); if (s->contents == NULL) return false; - memset (s->contents, 0, (size_t) s->_raw_size); } return true; diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c index 41d9871..129b2ba 100644 --- a/contrib/binutils/bfd/srec.c +++ b/contrib/binutils/bfd/srec.c @@ -160,7 +160,7 @@ srec_init () { static boolean inited = false; - if (inited == false) + if (! inited) { inited = true; hex_init (); @@ -230,22 +230,23 @@ static boolean srec_mkobject (abfd) bfd *abfd; { + bfd_size_type amt; + tdata_type *tdata; + srec_init (); - if (abfd->tdata.srec_data == NULL) - { - bfd_size_type amt = sizeof (tdata_type); - tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, amt); - if (tdata == NULL) - return false; - abfd->tdata.srec_data = tdata; - tdata->type = 1; - tdata->head = NULL; - tdata->tail = NULL; - tdata->symbols = NULL; - tdata->symtail = NULL; - tdata->csymbols = NULL; - } + amt = sizeof (tdata_type); + tdata = (tdata_type *) bfd_alloc (abfd, amt); + if (tdata == NULL) + return false; + + abfd->tdata.srec_data = tdata; + tdata->type = 1; + tdata->head = NULL; + tdata->tail = NULL; + tdata->symbols = NULL; + tdata->symtail = NULL; + tdata->csymbols = NULL; return true; } @@ -640,6 +641,7 @@ static const bfd_target * srec_object_p (abfd) bfd *abfd; { + PTR tdata_save; bfd_byte b[4]; srec_init (); @@ -654,9 +656,14 @@ srec_object_p (abfd) return NULL; } - if (! srec_mkobject (abfd) - || ! srec_scan (abfd)) - return NULL; + tdata_save = abfd->tdata.any; + if (! srec_mkobject (abfd) || ! srec_scan (abfd)) + { + if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL) + bfd_release (abfd, abfd->tdata.any); + abfd->tdata.any = tdata_save; + return NULL; + } if (abfd->symcount > 0) abfd->flags |= HAS_SYMS; @@ -670,6 +677,7 @@ static const bfd_target * symbolsrec_object_p (abfd) bfd *abfd; { + PTR tdata_save; char b[2]; srec_init (); @@ -684,9 +692,14 @@ symbolsrec_object_p (abfd) return NULL; } - if (! srec_mkobject (abfd) - || ! srec_scan (abfd)) - return NULL; + tdata_save = abfd->tdata.any; + if (! srec_mkobject (abfd) || ! srec_scan (abfd)) + { + if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL) + bfd_release (abfd, abfd->tdata.any); + abfd->tdata.any = tdata_save; + return NULL; + } if (abfd->symcount > 0) abfd->flags |= HAS_SYMS; @@ -1270,8 +1283,11 @@ srec_print_symbol (abfd, afile, symbol, how) #define srec_bfd_relax_section bfd_generic_relax_section #define srec_bfd_gc_sections bfd_generic_gc_sections #define srec_bfd_merge_sections bfd_generic_merge_sections +#define srec_bfd_discard_group bfd_generic_discard_group #define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define srec_bfd_link_just_syms _bfd_generic_link_just_syms #define srec_bfd_final_link _bfd_generic_final_link #define srec_bfd_link_split_section _bfd_generic_link_split_section diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c index bba4a6d..e225d9c 100644 --- a/contrib/binutils/bfd/stabs.c +++ b/contrib/binutils/bfd/stabs.c @@ -284,6 +284,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo) sym < symend; sym += STABSIZE, ++pstridx) { + bfd_size_type symstroff; int type; const char *string; @@ -311,9 +312,18 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo) } /* Store the string in the hash table, and record the index. */ - string = ((char *) stabstrbuf - + stroff - + bfd_get_32 (abfd, sym + STRDXOFF)); + symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF); + if (symstroff >= stabstrsec->_raw_size) + { + (*_bfd_error_handler) + (_("%s(%s+0x%lx): Stabs entry has invalid string index."), + bfd_archive_filename (abfd), + bfd_get_section_name (abfd, stabsec), + (long) (sym - stabbuf)); + bfd_set_error (bfd_error_bad_value); + goto error_return; + } + string = (char *) stabstrbuf + symstroff; *pstridx = _bfd_stringtab_add (sinfo->strings, string, true, true); /* An N_BINCL symbol indicates the start of the stabs entries diff --git a/contrib/binutils/bfd/sunos.c b/contrib/binutils/bfd/sunos.c index cb23fe1..5fec6f9 100644 --- a/contrib/binutils/bfd/sunos.c +++ b/contrib/binutils/bfd/sunos.c @@ -717,13 +717,13 @@ sunos_link_hash_table_create (abfd) struct sunos_link_hash_table *ret; bfd_size_type amt = sizeof (struct sunos_link_hash_table); - ret = (struct sunos_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct sunos_link_hash_table *) bfd_malloc (amt); if (ret == (struct sunos_link_hash_table *) NULL) return (struct bfd_link_hash_table *) NULL; if (! NAME(aout,link_hash_table_init) (&ret->root, abfd, sunos_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return (struct bfd_link_hash_table *) NULL; } @@ -1434,10 +1434,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr, s = bfd_get_section_by_name (dynobj, ".hash"); BFD_ASSERT (s != NULL); hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE; - s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc); + s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc); if (s->contents == NULL && dynsymcount > 0) return false; - memset (s->contents, 0, (size_t) hashalloc); for (i = 0; i < bucketcount; i++) PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE); s->_raw_size = bucketcount * HASH_ENTRY_SIZE; diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c index 01f7eee..8a8abf4 100644 --- a/contrib/binutils/bfd/syms.c +++ b/contrib/binutils/bfd/syms.c @@ -285,6 +285,9 @@ CODE_FRAGMENT . as well. *} .#define BSF_DEBUGGING_RELOC 0x20000 . +. {* This symbol is thread local. Used in ELF. *} +.#define BSF_THREAD_LOCAL 0x40000 +. . flagword flags; . . {* A pointer to the section to which this symbol is @@ -312,6 +315,7 @@ CODE_FRAGMENT #include "aout/stab_gnu.h" static char coff_section_type PARAMS ((const char *)); +static char decode_section_type PARAMS ((const struct sec *)); static int cmpindexentry PARAMS ((const PTR, const PTR)); /* @@ -586,6 +590,41 @@ coff_section_type (s) return '?'; } +/* Return the single-character symbol type corresponding to section + SECTION, or '?' for an unknown section. This uses section flags to + identify sections. + + FIXME These types are unhandled: c, i, e, p. If we handled these also, + we could perhaps obsolete coff_section_type. */ + +static char +decode_section_type (section) + const struct sec *section; +{ + if (section->flags & SEC_CODE) + return 't'; + if (section->flags & SEC_DATA) + { + if (section->flags & SEC_READONLY) + return 'r'; + else if (section->flags & SEC_SMALL_DATA) + return 'g'; + else + return 'd'; + } + if ((section->flags & SEC_HAS_CONTENTS) == 0) + { + if (section->flags & SEC_SMALL_DATA) + return 's'; + else + return 'b'; + } + if (section->flags & SEC_DEBUGGING) + return 'N'; + + return '?'; +} + /* FUNCTION bfd_decode_symclass @@ -636,7 +675,11 @@ bfd_decode_symclass (symbol) if (bfd_is_abs_section (symbol->section)) c = 'a'; else if (symbol->section) - c = coff_section_type (symbol->section->name); + { + c = coff_section_type (symbol->section->name); + if (c == '?') + c = decode_section_type (symbol->section); + } else return '?'; if (symbol->flags & BSF_GLOBAL) @@ -880,6 +923,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, char *file_name; char *directory_name; int saw_fun; + boolean saw_line, saw_func; *pfound = false; *pfilename = bfd_get_filename (abfd); @@ -1236,13 +1280,13 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, directory_name = indexentry->directory_name; str = indexentry->str; + saw_line = false; + saw_func = false; for (; stab < (indexentry+1)->stab; stab += STABSIZE) { - boolean done, saw_line, saw_func; + boolean done; bfd_vma val; - saw_line = false; - saw_func = false; done = false; switch (stab[TYPEOFF]) @@ -1309,14 +1353,16 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, || strncmp (info->filename, directory_name, dirlen) != 0 || strcmp (info->filename + dirlen, file_name) != 0) { + size_t len; + if (info->filename != NULL) free (info->filename); - info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen - + strlen (file_name) + 1); + len = strlen (file_name) + 1; + info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen + len); if (info->filename == NULL) return false; - strcpy (info->filename, directory_name); - strcpy (info->filename + dirlen, file_name); + memcpy (info->filename, directory_name, dirlen); + memcpy (info->filename + dirlen, file_name, len); } *pfilename = info->filename; diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c index 78b4bbb..d41edf6 100644 --- a/contrib/binutils/bfd/targets.c +++ b/contrib/binutils/bfd/targets.c @@ -394,11 +394,14 @@ the tokens. .CONCAT2 (NAME,_bfd_get_relocated_section_contents), \ .CONCAT2 (NAME,_bfd_relax_section), \ .CONCAT2 (NAME,_bfd_link_hash_table_create), \ +.CONCAT2 (NAME,_bfd_link_hash_table_free), \ .CONCAT2 (NAME,_bfd_link_add_symbols), \ +.CONCAT2 (NAME,_bfd_link_just_syms), \ .CONCAT2 (NAME,_bfd_final_link), \ .CONCAT2 (NAME,_bfd_link_split_section), \ .CONCAT2 (NAME,_bfd_gc_sections), \ -.CONCAT2 (NAME,_bfd_merge_sections) +.CONCAT2 (NAME,_bfd_merge_sections), \ +.CONCAT2 (NAME,_bfd_discard_group) . int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); . bfd_byte *(*_bfd_get_relocated_section_contents) . PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, @@ -411,9 +414,15 @@ the tokens. . different information in this table. *} . struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); . +. {* Release the memory associated with the linker hash table. *} +. void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *)); +. . {* Add symbols from this object file into the hash table. *} . boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); . +. {* Indicate that we are only retrieving symbol values from this section. *} +. void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *)); +. . {* Do a link based on the link_order structures attached to each . section of the BFD. *} . boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); @@ -427,6 +436,9 @@ the tokens. . {* Attempt to merge SEC_MERGE sections. *} . boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); . +. {* Discard members of a group. *} +. boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *)); +. . {* Routines to handle dynamic symbols and relocs. *} .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ .CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \ @@ -469,6 +481,7 @@ to find an alternative output format that is suitable. we can't intermix extern's and initializers. */ extern const bfd_target a29kcoff_big_vec; extern const bfd_target a_out_adobe_vec; +extern const bfd_target aix5coff64_vec; extern const bfd_target aout0_big_vec; extern const bfd_target aout_arm_big_vec; extern const bfd_target aout_arm_little_vec; @@ -499,12 +512,16 @@ extern const bfd_target bfd_elf32_bigmips_vec; extern const bfd_target bfd_elf32_cris_vec; extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; +extern const bfd_target bfd_elf32_dlx_big_vec; extern const bfd_target bfd_elf32_fr30_vec; +extern const bfd_target bfd_elf32_frv_vec; extern const bfd_target bfd_elf32_h8300_vec; extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_vec; extern const bfd_target bfd_elf32_i370_vec; +extern const bfd_target bfd_elf32_i386_freebsd_vec; extern const bfd_target bfd_elf32_i386_vec; +extern const bfd_target bfd_elf32_i386qnx_vec; extern const bfd_target bfd_elf32_i860_little_vec; extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i960_vec; @@ -531,6 +548,10 @@ extern const bfd_target bfd_elf32_pjl_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; extern const bfd_target bfd_elf32_s390_vec; +extern const bfd_target bfd_elf32_sh64_vec; +extern const bfd_target bfd_elf32_sh64l_vec; +extern const bfd_target bfd_elf32_sh64lnbsd_vec; +extern const bfd_target bfd_elf32_sh64nbsd_vec; extern const bfd_target bfd_elf32_sh_vec; extern const bfd_target bfd_elf32_shblin_vec; extern const bfd_target bfd_elf32_shl_vec; @@ -542,7 +563,9 @@ extern const bfd_target bfd_elf32_tradbigmips_vec; extern const bfd_target bfd_elf32_tradlittlemips_vec; extern const bfd_target bfd_elf32_us_cris_vec; extern const bfd_target bfd_elf32_v850_vec; +extern const bfd_target bfd_elf32_vax_vec; extern const bfd_target bfd_elf32_xstormy16_vec; +extern const bfd_target bfd_elf64_alpha_freebsd_vec; extern const bfd_target bfd_elf64_alpha_vec; extern const bfd_target bfd_elf64_big_generic_vec; extern const bfd_target bfd_elf64_bigmips_vec; @@ -559,6 +582,10 @@ extern const bfd_target bfd_elf64_mmix_vec; extern const bfd_target bfd_elf64_powerpc_vec; extern const bfd_target bfd_elf64_powerpcle_vec; extern const bfd_target bfd_elf64_s390_vec; +extern const bfd_target bfd_elf64_sh64_vec; +extern const bfd_target bfd_elf64_sh64l_vec; +extern const bfd_target bfd_elf64_sh64lnbsd_vec; +extern const bfd_target bfd_elf64_sh64nbsd_vec; extern const bfd_target bfd_elf64_sparc_vec; extern const bfd_target bfd_elf64_tradbigmips_vec; extern const bfd_target bfd_elf64_tradlittlemips_vec; @@ -654,7 +681,9 @@ extern const bfd_target tic54x_coff1_vec; extern const bfd_target tic54x_coff2_beh_vec; extern const bfd_target tic54x_coff2_vec; extern const bfd_target tic80coff_vec; +extern const bfd_target vaxbsd_vec; extern const bfd_target vaxnetbsd_vec; +extern const bfd_target vax1knetbsd_vec; extern const bfd_target versados_vec; extern const bfd_target vms_alpha_vec; extern const bfd_target vms_vax_vec; @@ -682,10 +711,6 @@ extern const bfd_target ptrace_core_vec; extern const bfd_target sco5_core_vec; extern const bfd_target trad_core_vec; -extern const bfd_target bfd_elf32_sh64_vec; -extern const bfd_target bfd_elf32_sh64l_vec; -extern const bfd_target bfd_elf64_sh64_vec; -extern const bfd_target bfd_elf64_sh64l_vec; static const bfd_target * const _bfd_target_vector[] = { #ifdef SELECT_VECS @@ -705,6 +730,9 @@ static const bfd_target * const _bfd_target_vector[] = { it wasn't omitted by mistake. */ &a29kcoff_big_vec, &a_out_adobe_vec, +#ifdef BFD64 + &aix5coff64_vec, +#endif &aout0_big_vec, #if 0 /* We have no way of distinguishing these from other a.out variants */ @@ -748,12 +776,16 @@ static const bfd_target * const _bfd_target_vector[] = { &bfd_elf32_cris_vec, &bfd_elf32_d10v_vec, &bfd_elf32_d30v_vec, + &bfd_elf32_dlx_big_vec, &bfd_elf32_fr30_vec, + &bfd_elf32_frv_vec, &bfd_elf32_h8300_vec, &bfd_elf32_hppa_linux_vec, &bfd_elf32_hppa_vec, &bfd_elf32_i370_vec, + &bfd_elf32_i386_freebsd_vec, &bfd_elf32_i386_vec, + &bfd_elf32_i386qnx_vec, &bfd_elf32_i860_little_vec, &bfd_elf32_i860_vec, &bfd_elf32_i960_vec, @@ -788,13 +820,21 @@ static const bfd_target * const _bfd_target_vector[] = { &bfd_elf32_shlin_vec, &bfd_elf32_shlnbsd_vec, &bfd_elf32_shnbsd_vec, +#ifdef BFD64 + &bfd_elf32_sh64_vec, + &bfd_elf32_sh64l_vec, + &bfd_elf32_sh64lnbsd_vec, + &bfd_elf32_sh64nbsd_vec, +#endif &bfd_elf32_sparc_vec, &bfd_elf32_tradbigmips_vec, &bfd_elf32_tradlittlemips_vec, &bfd_elf32_us_cris_vec, &bfd_elf32_v850_vec, + &bfd_elf32_vax_vec, &bfd_elf32_xstormy16_vec, #ifdef BFD64 + &bfd_elf64_alpha_freebsd_vec, &bfd_elf64_alpha_vec, &bfd_elf64_big_generic_vec, &bfd_elf64_bigmips_vec, @@ -811,6 +851,10 @@ static const bfd_target * const _bfd_target_vector[] = { &bfd_elf64_powerpc_vec, &bfd_elf64_powerpcle_vec, &bfd_elf64_s390_vec, + &bfd_elf64_sh64_vec, + &bfd_elf64_sh64l_vec, + &bfd_elf64_sh64lnbsd_vec, + &bfd_elf64_sh64nbsd_vec, #if 0 &bfd_elf64_sparc_vec, #endif @@ -954,7 +998,9 @@ static const bfd_target * const _bfd_target_vector[] = { &tic54x_coff2_beh_vec, &tic54x_coff2_vec, &tic80coff_vec, + &vaxbsd_vec, &vaxnetbsd_vec, + &vax1knetbsd_vec, &versados_vec, #ifdef BFD64 &vms_alpha_vec, diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c index f5d5160..19dcb87 100644 --- a/contrib/binutils/bfd/tekhex.c +++ b/contrib/binutils/bfd/tekhex.c @@ -1,5 +1,5 @@ /* BFD backend for Extended Tektronix Hex Format objects. - Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>. @@ -242,7 +242,7 @@ tekhex_init () static boolean inited = false; int val; - if (inited == false) + if (! inited) { inited = true; hex_init (); @@ -354,17 +354,13 @@ find_chunk (abfd, vma) } if (!d) { - char *sname = bfd_alloc (abfd, (bfd_size_type) 12); - /* No chunk for this address, so make one up */ d = ((struct data_struct *) - bfd_alloc (abfd, (bfd_size_type) sizeof (struct data_struct))); + bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct))); - if (!sname || !d) + if (!d) return NULL; - memset (d->chunk_init, 0, CHUNK_MASK + 1); - memset (d->chunk_data, 0, CHUNK_MASK + 1); d->next = abfd->tdata.tekhex_data->data; d->vma = vma; abfd->tdata.tekhex_data->data = d; @@ -489,7 +485,7 @@ pass_over (abfd, func) /* To the front of the file */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) abort (); - while (eof == false) + while (! eof) { char buffer[MAXCHUNK]; char *src = buffer; @@ -681,7 +677,7 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do) bfd_size_type bytes_to_do; { - if (abfd->output_has_begun == false) + if (! abfd->output_has_begun) { /* The first time around, allocate enough sections to hold all the chunks */ asection *s = abfd->sections; @@ -1005,8 +1001,11 @@ tekhex_print_symbol (abfd, filep, symbol, how) #define tekhex_bfd_relax_section bfd_generic_relax_section #define tekhex_bfd_gc_sections bfd_generic_gc_sections #define tekhex_bfd_merge_sections bfd_generic_merge_sections +#define tekhex_bfd_discard_group bfd_generic_discard_group #define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms #define tekhex_bfd_final_link _bfd_generic_final_link #define tekhex_bfd_link_split_section _bfd_generic_link_split_section diff --git a/contrib/binutils/bfd/version.h b/contrib/binutils/bfd/version.h index 652aeb4..a440678 100644 --- a/contrib/binutils/bfd/version.h +++ b/contrib/binutils/bfd/version.h @@ -1 +1 @@ -#define BFD_VERSION_DATE 20020720 +#define BFD_VERSION_DATE 20021011 diff --git a/contrib/binutils/bfd/xcoff-target.h b/contrib/binutils/bfd/xcoff-target.h index 0787b8d..413511b 100644 --- a/contrib/binutils/bfd/xcoff-target.h +++ b/contrib/binutils/bfd/xcoff-target.h @@ -1,5 +1,5 @@ /* Common definitions for backends based on IBM RS/6000 "XCOFF64" files. - Copyright 2000, 2001 + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -98,6 +98,7 @@ extern int lynx_core_file_failing_signal PARAMS ((bfd *abfd)); #define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section #define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections #define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections +#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group #define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section /* XCOFF archives do not have anything which corresponds to an diff --git a/contrib/binutils/bfd/xcofflink.c b/contrib/binutils/bfd/xcofflink.c index 2e5ca5d..a869d7d 100644 --- a/contrib/binutils/bfd/xcofflink.c +++ b/contrib/binutils/bfd/xcofflink.c @@ -3,21 +3,21 @@ Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -482,12 +482,12 @@ _bfd_xcoff_bfd_link_hash_table_create (abfd) struct xcoff_link_hash_table *ret; bfd_size_type amt = sizeof (struct xcoff_link_hash_table); - ret = (struct xcoff_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct xcoff_link_hash_table *) bfd_malloc (amt); if (ret == (struct xcoff_link_hash_table *) NULL) return (struct bfd_link_hash_table *) NULL; if (! _bfd_link_hash_table_init (&ret->root, abfd, xcoff_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return (struct bfd_link_hash_table *) NULL; } @@ -513,6 +513,18 @@ _bfd_xcoff_bfd_link_hash_table_create (abfd) return &ret->root; } +/* Free a XCOFF link hash table. */ + +void +_bfd_xcoff_bfd_link_hash_table_free (hash) + struct bfd_link_hash_table *hash; +{ + struct xcoff_link_hash_table *ret = (struct xcoff_link_hash_table *) hash; + + _bfd_stringtab_free (ret->debug_strtab); + bfd_hash_table_free (&ret->root.table); + free (ret); +} /* Read internal relocs for an XCOFF csect. This is a wrapper around _bfd_coff_read_internal_relocs which tries to take advantage of any @@ -588,11 +600,11 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info) case bfd_archive: /* If the archive has a map, do the usual search. We then need - to check the archive for stripped dynamic objects, because - they will not appear in the archive map even though they - should, perhaps, be included. If the archive has no map, we - just consider each object file in turn, since that apparently - is what the AIX native linker does. */ + to check the archive for dynamic objects, because they may not + appear in the archive map even though they should, perhaps, be + included. If the archive has no map, we just consider each object + file in turn, since that apparently is what the AIX native linker + does. */ if (bfd_has_map (abfd)) { if (! (_bfd_generic_link_add_archive_symbols @@ -602,18 +614,18 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info) { bfd *member; - + member = bfd_openr_next_archived_file (abfd, (bfd *) NULL); while (member != NULL) { if (bfd_check_format (member, bfd_object) - && (! bfd_has_map (abfd) - || ((member->flags & DYNAMIC) != 0 - && (member->flags & HAS_SYMS) == 0))) + && (info->hash->creator == member->xvec) + && (! bfd_has_map (abfd) || (member->flags & DYNAMIC) != 0)) { boolean needed; - - if (! xcoff_link_check_archive_element (member, info, &needed)) + + if (! xcoff_link_check_archive_element (member, info, + &needed)) return false; if (needed) member->archive_pass = -1; @@ -1046,16 +1058,12 @@ xcoff_link_add_symbols (abfd, info) && ! info->static_link) { if (! xcoff_link_add_dynamic_symbols (abfd, info)) - { - return false; - } + return false; } /* create the loader, toc, gl, ds and debug sections, if needed */ if (false == xcoff_link_create_extra_sections(abfd, info)) - { - goto error_return; - } + goto error_return; if ((abfd->flags & DYNAMIC) != 0 && ! info->static_link) @@ -1078,21 +1086,19 @@ xcoff_link_add_symbols (abfd, info) /* We keep a list of the linker hash table entries that correspond to each external symbol. */ amt = symcount * sizeof (struct xcoff_link_hash_entry *); - sym_hash = (struct xcoff_link_hash_entry **) bfd_alloc (abfd, amt); + sym_hash = (struct xcoff_link_hash_entry **) bfd_zalloc (abfd, amt); if (sym_hash == NULL && symcount != 0) goto error_return; coff_data (abfd)->sym_hashes = (struct coff_link_hash_entry **) sym_hash; - memset (sym_hash, 0, (size_t) amt); /* Because of the weird stuff we are doing with XCOFF csects, we can not easily determine which section a symbol is in, so we store the information in the tdata for the input file. */ amt = symcount * sizeof (asection *); - csect_cache = (asection **) bfd_alloc (abfd, amt); + csect_cache = (asection **) bfd_zalloc (abfd, amt); if (csect_cache == NULL && symcount != 0) goto error_return; xcoff_data (abfd)->csects = csect_cache; - memset (csect_cache, 0, (size_t) amt); /* While splitting sections into csects, we need to assign the relocs correctly. The relocs and the csects must both be in @@ -1101,10 +1107,9 @@ xcoff_link_add_symbols (abfd, info) into reloc_info using the section target_index. */ amt = abfd->section_count + 1; amt *= sizeof (struct reloc_info_struct); - reloc_info = (struct reloc_info_struct *) bfd_malloc (amt); + reloc_info = (struct reloc_info_struct *) bfd_zmalloc (amt); if (reloc_info == NULL) goto error_return; - memset ((PTR) reloc_info, 0, (size_t) amt); /* Read in the relocs and line numbers for each section. */ linesz = bfd_coff_linesz (abfd); @@ -1121,11 +1126,9 @@ xcoff_link_add_symbols (abfd, info) false, (struct internal_reloc *) NULL); amt = o->reloc_count; amt *= sizeof (asection *); - reloc_info[o->target_index].csects = (asection **) bfd_malloc (amt); + reloc_info[o->target_index].csects = (asection **) bfd_zmalloc (amt); if (reloc_info[o->target_index].csects == NULL) goto error_return; - memset (reloc_info[o->target_index].csects, 0, (size_t) amt); - } if ((info->strip == strip_none || info->strip == strip_some) @@ -1146,7 +1149,6 @@ xcoff_link_add_symbols (abfd, info) } } - /* Don't let the linker relocation routines discard the symbols. */ obj_coff_keep_syms (abfd) = true; @@ -1771,12 +1773,19 @@ xcoff_link_add_symbols (abfd, info) if (info->hash->creator == abfd->xvec) { if (! bfd_is_und_section (section)) - *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info), - name, true, copy, false); + { + *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info), + name, true, copy, false); + } else - *sym_hash = ((struct xcoff_link_hash_entry *) - bfd_wrapped_link_hash_lookup (abfd, info, name, - true, copy, false)); + { + /* Make a copy of the symbol name to prevent problems with + merging symbols. */ + *sym_hash = ((struct xcoff_link_hash_entry *) + bfd_wrapped_link_hash_lookup (abfd, info, name, + true, true, + false)); + } if (*sym_hash == NULL) goto error_return; if (((*sym_hash)->root.type == bfd_link_hash_defined @@ -2806,7 +2815,7 @@ boolean bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, file_align, maxstack, maxdata, gc, modtype, textro, export_defineds, - special_sections) + special_sections, rtld) bfd *output_bfd; struct bfd_link_info *info; const char *libpath; @@ -2819,6 +2828,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, boolean textro; boolean export_defineds; asection **special_sections; + boolean rtld; { struct xcoff_link_hash_entry *hentry; asection *lsec; @@ -2837,7 +2847,6 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) { - for (i = 0; i < XCOFF_NUMBER_OF_SPECIAL_SECTIONS; i++) special_sections[i] = NULL; return true; @@ -2859,11 +2868,8 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, xcoff_hash_table (info)->file_align = file_align; xcoff_hash_table (info)->textro = textro; - if (entry == NULL) - { - hentry = NULL; - } - else + hentry = NULL; + if (entry != NULL) { hentry = xcoff_link_hash_lookup (xcoff_hash_table (info), entry, false, false, true); @@ -2872,65 +2878,56 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, } /* __rtinit */ - if (info->init_function || info->fini_function) { - struct xcoff_link_hash_entry *hrtinit; - struct internal_ldsym *ldsym; - - hrtinit = xcoff_link_hash_lookup (xcoff_hash_table (info), - "__rtinit", - false, false, true); - if (hrtinit != NULL) - { - xcoff_mark_symbol (info, hrtinit); - hrtinit->flags |= (XCOFF_DEF_REGULAR | XCOFF_RTINIT); - } - else - { - (*_bfd_error_handler) - (_("error: undefined symbol __rtinit")); - - return false; - } - - /* __rtinit initalized here - Some information, like the location of the .initfini seciton will - be filled in later. - - name or offset taken care of below with bfd_xcoff_put_ldsymbol_name. */ - amt = sizeof (struct internal_ldsym); - ldsym = (struct internal_ldsym *) bfd_malloc (amt); - - ldsym->l_value = 0; /* will be filled in later */ - ldsym->l_scnum = 2; /* data section */ - ldsym->l_smtype = XTY_SD; /* csect section definition */ - ldsym->l_smclas = 5; /* .rw */ - ldsym->l_ifile = 0; /* special system loader symbol */ - ldsym->l_parm = 0; /* NA */ - - /* Force __rtinit to be the first symbol in the loader symbol table - See xcoff_build_ldsyms - - The first 3 symbol table indices are reserved to indicate the data, - text and bss sections. */ - BFD_ASSERT (0 == ldinfo.ldsym_count); - - hrtinit->ldindx = 3; - ldinfo.ldsym_count = 1; - hrtinit->ldsym = ldsym; - - if (false == bfd_xcoff_put_ldsymbol_name (ldinfo.output_bfd, &ldinfo, - hrtinit->ldsym, - hrtinit->root.root.string)) - { + if (info->init_function || info->fini_function || rtld) + { + struct xcoff_link_hash_entry *hsym; + struct internal_ldsym *ldsym; + + hsym = xcoff_link_hash_lookup (xcoff_hash_table (info), + "__rtinit", false, false, true); + if (hsym == NULL) + { + (*_bfd_error_handler) + (_("error: undefined symbol __rtinit")); + return false; + } + + xcoff_mark_symbol (info, hsym); + hsym->flags |= (XCOFF_DEF_REGULAR | XCOFF_RTINIT); + + /* __rtinit initalized */ + amt = sizeof (struct internal_ldsym); + ldsym = (struct internal_ldsym *) bfd_malloc (amt); + + ldsym->l_value = 0; /* will be filled in later */ + ldsym->l_scnum = 2; /* data section */ + ldsym->l_smtype = XTY_SD; /* csect section definition */ + ldsym->l_smclas = 5; /* .rw */ + ldsym->l_ifile = 0; /* special system loader symbol */ + ldsym->l_parm = 0; /* NA */ + + /* Force __rtinit to be the first symbol in the loader symbol table + See xcoff_build_ldsyms + + The first 3 symbol table indices are reserved to indicate the data, + text and bss sections. */ + BFD_ASSERT (0 == ldinfo.ldsym_count); + + hsym->ldindx = 3; + ldinfo.ldsym_count = 1; + hsym->ldsym = ldsym; + + if (false == bfd_xcoff_put_ldsymbol_name (ldinfo.output_bfd, &ldinfo, + hsym->ldsym, + hsym->root.root.string)) return false; - } - - /* This symbol is written out by xcoff_write_global_symbol - Set stuff up so xcoff_write_global_symbol logic works. */ - hrtinit->flags |= XCOFF_DEF_REGULAR | XCOFF_MARK; - hrtinit->root.type = bfd_link_hash_defined; - hrtinit->root.u.def.value = 0; - } + + /* This symbol is written out by xcoff_write_global_symbol + Set stuff up so xcoff_write_global_symbol logic works. */ + hsym->flags |= XCOFF_DEF_REGULAR | XCOFF_MARK; + hsym->root.type = bfd_link_hash_defined; + hsym->root.u.def.value = 0; + } /* Garbage collect unused sections. */ if (info->relocateable @@ -3158,37 +3155,42 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, csectpp = xcoff_data (sub)->csects; - symesz = bfd_coff_symesz (sub); - esym = (bfd_byte *) obj_coff_external_syms (sub); - esymend = esym + symcount * symesz; - while (esym < esymend) + /* Dynamic object do not have csectpp's. */ + if (NULL != csectpp) { - struct internal_syment sym; + symesz = bfd_coff_symesz (sub); + esym = (bfd_byte *) obj_coff_external_syms (sub); + esymend = esym + symcount * symesz; - bfd_coff_swap_sym_in (sub, (PTR) esym, (PTR) &sym); + while (esym < esymend) + { + struct internal_syment sym; - *debug_index = (unsigned long) -1; + bfd_coff_swap_sym_in (sub, (PTR) esym, (PTR) &sym); - if (sym._n._n_n._n_zeroes == 0 - && *csectpp != NULL - && (! gc - || ((*csectpp)->flags & SEC_MARK) != 0 - || *csectpp == bfd_abs_section_ptr) - && bfd_coff_symname_in_debug (sub, &sym)) - { - char *name; - bfd_size_type indx; + *debug_index = (unsigned long) -1; - name = (char *) debug_contents + sym._n._n_n._n_offset; - indx = _bfd_stringtab_add (debug_strtab, name, true, true); - if (indx == (bfd_size_type) -1) - goto error_return; - *debug_index = indx; - } + if (sym._n._n_n._n_zeroes == 0 + && *csectpp != NULL + && (! gc + || ((*csectpp)->flags & SEC_MARK) != 0 + || *csectpp == bfd_abs_section_ptr) + && bfd_coff_symname_in_debug (sub, &sym)) + { + char *name; + bfd_size_type indx; - esym += (sym.n_numaux + 1) * symesz; - csectpp += sym.n_numaux + 1; - debug_index += sym.n_numaux + 1; + name = (char *) debug_contents + sym._n._n_n._n_offset; + indx = _bfd_stringtab_add (debug_strtab, name, true, true); + if (indx == (bfd_size_type) -1) + goto error_return; + *debug_index = indx; + } + + esym += (sym.n_numaux + 1) * symesz; + csectpp += sym.n_numaux + 1; + debug_index += sym.n_numaux + 1; + } } free (debug_contents); @@ -3220,10 +3222,11 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, } boolean -bfd_xcoff_link_generate_rtinit (abfd, init, fini) +bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld) bfd *abfd; const char *init; const char *fini; + boolean rtld; { struct bfd_in_memory *bim; @@ -3242,7 +3245,7 @@ bfd_xcoff_link_generate_rtinit (abfd, init, fini) abfd->direction = write_direction; abfd->where = 0; - if (false == bfd_xcoff_generate_rtinit (abfd, init, fini)) + if (false == bfd_xcoff_generate_rtinit (abfd, init, fini, rtld)) return false; /* need to reset to unknown or it will not be read back in correctly */ @@ -3267,14 +3270,9 @@ xcoff_build_ldsyms (h, p) if (h->root.type == bfd_link_hash_warning) h = (struct xcoff_link_hash_entry *) h->root.u.i.link; - /* __rtinit - Special handling of this symbol to make is the first symbol in - the loader symbol table. Make sure this pass through does not - undo it. */ + /* __rtinit, this symbol has special handling. */ if (h->flags & XCOFF_RTINIT) - { return true; - } /* If this is a final link, and the symbol was defined as a common symbol in a regular object file, and there was no definition in @@ -3389,17 +3387,11 @@ xcoff_build_ldsyms (h, p) xcoff32 uses 4 bytes in the toc. xcoff64 uses 8 bytes in the toc. */ if (bfd_xcoff_is_xcoff64 (ldinfo->output_bfd)) - { - byte_size = 8; - } + byte_size = 8; else if (bfd_xcoff_is_xcoff32 (ldinfo->output_bfd)) - { - byte_size = 4; - } + byte_size = 4; else - { - return false; - } + return false; hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section; hds->u.toc_offset = hds->toc_section->_raw_size; @@ -5895,7 +5887,10 @@ xcoff_write_global_symbol (h, inf) isym.n_value = (h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset + h->root.u.def.value); - isym.n_scnum = h->root.u.def.section->output_section->target_index; + if (bfd_is_abs_section (h->root.u.def.section->output_section)) + isym.n_scnum = N_ABS; + else + isym.n_scnum = h->root.u.def.section->output_section->target_index; isym.n_sclass = C_HIDEXT; aux.x_csect.x_smtyp = XTY_SD; diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog index 91900a4..373b3c9 100644 --- a/contrib/binutils/binutils/ChangeLog +++ b/contrib/binutils/binutils/ChangeLog @@ -1,10 +1,395 @@ +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-09-11 Nick Clifton <nickc@redhat.com> + * po/tr.po: Updated Turkish translation. + + 2002-08-14 Luke Dunstan <infidel@users.sourceforge.net> + * rcparse.y (acc_entry): Don't warn about ALT use with + non-VIRTKEY. + + 2002-08-09 Nick Clifton <nickc@redhat.com> + * po/sv.po: Updated Swedish translation. + + 2002-07-31 Nick Clifton <nickc@redhat.com> + * addr2line.c (process_file): Rename parameter 'filename' to + 'file_name' in order to avoid shadowing global symbol of the + same name. + (main): Likewise. + +2002-07-30 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-07-30 Jakub Jelinek <jakub@redhat.com> + * readelf.c (OPTION_DEBUG_DUMP): Define. + (options): Use it. + (usage): Update help. + (parse_args): Handle --debug-dump separately from -w. + * doc/binutils.texi (readelf): Update documentation. + +2002-07-25 Nick Clifton <nickc@redhat.com> + + * po/es.po: Updated Spanish translation. + * po/fr.po: Updated French translation. + +2002-07-24 Nick Clifton <nickc@redhat.com> + + * po/es.po: Updated Spanish translation. + +2002-07-23 Daniel Jacobowitz <drow@mvista.com> + + * po/binutils.pot: Regenerated. + +2002-07-23 Nick Clifton <nickc@redhat.com> + + * po/fr.po: Updated French translation. + +2002-07-23 Eric S. Raymond <esr@golux.thyrsus.com> + + * doc/binutils.texi (addr2line <man synopsis>): Correct brackets. + +2002-07-20 Alan Modra <amodra@bigpond.net.au> + + * budemang.c: Include config.h and string.h/strings.h. + +2002-07-16 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Add 'Changes in 2.13'. + +2002-07-10 Jakub Jelinek <jakub@redhat.com> + + * readelf.c (get_dynamic_type): Handle DT_GNU_PRELINKED, + DT_GNU_CONFLICT* and DT_GNU_LIBLISZ*. + (get_section_type_name): Handle SHT_GNU_LIBLIST. + (process_dynamic_segment): Handle DT_GNU_CONFLICTSZ, + DT_GNU_LIBLISTSZ and DT_GNU_PRELINKED. + (process_gnu_liblist): New. + (process_file): Call it. + +2002-07-03 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change. + * Makefile.in: Regenerate. + +2002-07-02 Alan Modra <amodra@bigpond.net.au> + + * budemang.c: New file, "demangle" function. + * budemang.h: New file. + * addr2line.c (translate_addresses): Use "demangle". + * nm.c (print_symname): Likewise. + * objdump.c (objdump_print_symname): Likewise. + (dump_symbols): Likewise. Also, don't use bfd_asymbol_name macro + here since that obfuscates. + * rdcoff.c: Don't #include demangle.h. + * Makefile.am (CFILES): Add budemang.c, emul_aix.c, + emul_vanilla.c. Remove emul_$(EMULATION).c. Sort. + (HFILES): Add budemang.h. Sort. + (nm_new_SOURCES, objdump_SOURCES, addr2line_SOURCES): Add budemang.c. + Run "make dep-am". + * Makefile.in: Regenerate. + +2002-07-01 Matt Thomas <matt@3am-software.com> + + * readelf.c: Include "elf/vax.h". + (guess_is_rela): Move EM_VAX from unknown to RELA case. + (dump_relocations): Handle VAX relocations. + (get_machine_flags): Handle VAX machine flags. + +2002-06-29 Stephane Carrez <stcarrez@nerim.fr> + + * readelf.c (dump_relocations): Handle 68HC11/68HC12 relocations. + +2002-06-26 Nick Clifton <nickc@cambridge.redhat.com> + + * MAINTAINERS: Remove Tom Rix from d10v and pcc maintainerships. + +2002-06-26 Alan Modra <amodra@bigpond.net.au> + + * nm.c (print_symname): When demangling, strip leading dots from + symbol names to avoid confusing the demangler. + +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-21 Igor Schein <igor@txc.com> + + * configure.in: Quote bu_cv_have_fopen64. + * configure: Regenerate. + +2002-06-21 Mitsru Chinen <chinen@jp.ibm.com> + + * configure.in: Check for strcoll. + * configure: Regenerate. + * config.in: Regenerate. + * nm.c (main): Set locale for LC_COLLATE category. + (non_numeric_forward): Use strcoll if available. + +2002-06-20 Dave Brolley <brolley@redhat.com> + + * MAINTAINERS: Add self as fr30 and frv maintainer. + +2002-06-18 H.J. Lu (hjl@gnu.org) + + * nm.c: Include "elf/common.h". + (extended_symbol_info): Add elfinfo, a pointer to + elf_symbol_type. + (SYM_SIZE): Use elfinfo if it is not NULL. + (get_symbol_type): New function. + (display_archive): Set print_width for each archive member. + (display_file): Likewise. + (display_rel_file): Don't set print_width here. + (print_object_filename_sysv): Handle print_width. + (print_archive_member_sysv): Likewise. + (print_symbols): Pass (bfd_vma) 0 to print_symbol. + (print_symbol): Set the elfinfo field in extended_symbol_info + for ELF. + (print_object_filename_sysv): Fix the output format. + (print_symbol_info_sysv): Print type and section for ELF. + +2002-06-18 Elias Athanasopoulos <eathan@otenet.gr> + + * nm.c (print_size_symbols): Remove assignment, which makes + the symbol's size equal to its value when --size-sort is + used. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + From Catherine Moore: + * readelf.c (elf/frv.h): #include it. + (guess_is_rela): Support EM_CYGNUS_FRV. + (dump_relocations): Ditto. + (get_machine_name): Ditto. + * Makefile.am (readelf.o): add dependency on $(INCDIR)/elf/frv.h. + +2002-06-18 Jakub Jelinek <jakub@redhat.com> + + * readelf.c (get_file_header): Only read the first section header if + e_shoff is non-zero. + +2002-06-15 H.J. Lu (hjl@gnu.org) + + * nm.c (print_size): New variable. Initialize to 0. + (long_options): Add 'S'/"print-size". + (main): Handle 'S'. + (print_symbol_info_bsd): Print size only if print_size is not + 0. + + * doc/binutils.texi: Document -S/--print-size. + +2002-6-13 Elias Athanasopoulos <eathan@otenet.gr> + + * nm.c (struct extended_symbol_info): New strcuture: Add the size + of the symbols to the information provided by the symbol_info + structure. + (print_symbols): Pass the symbol size to print_symbol. + (print_size_symbols): Pass the symbol size to print_symbol. + (print_symbol): Extra argument: The size of the symbol. Store + this in the extended_symbol_info structure. + (print_symbol_info): Change type of info parameter to + extended_symbol_info. Display the size, if known. + (print_symbol_info_posix): Likewise. + (print_symbol_info_sysv): Likewise. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * doc/Makefile.in: Regnerate. + + * bucomm.c: Replace CONST with const. + * nm.c: Likewise. + * objdump.c: Likewise. + +2002-06-07 H.J. Lu <hjl@gnu.org> + + * readelf.c (DW_CFA_GNU_args_size): Don't define. + (DW_CFA_GNU_negative_offset_extended): Likewise. + (DW_CFA_GNU_window_save): Likewise. + (display_debug_frames): Handle DW_CFA_offset_extended_sf, + DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf. + +2002-06-07 Elias Athanasopoulos <eathan@otenet.gr> + + * nm.c: When computing size of symbols for an ELF target use the + internal size field. + +2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * testsuite/binutils-all/objcopy.exp: clear xfail for + "hppa*64*-*-hpux*". + * testsuite/binutils-all/hppa/objdump.exp: Return if + "*64*-*-*". + +2002-06-05 Alan Modra <amodra@bigpond.net.au> + + * objcopy.c (copy_section): Don't copy SEC_GROUP sections. + +2002-06-03 Elias Athanasopoulos <eathan@otenet.gr> + + * objdump.c: Fix formatting. + +2002-05-29 Ben Elliston <bje@redhat.com> + + * MAINTAINERS: Add self as M68k maintainer. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * readelf.c: Modified/Added DLX elf support. + +2002-05-27 Nick Clifton <nickc@cambridge.redhat.com> + + * arsup.c: Fix formatting. + * debug.c (debug_record_label): Add missing colon to error + message. + * ieee.c (parse_ieee_ty): Fix spelling typo. + * readelf.c (process_program_headers): Remove English assumption + about making a plural word. + (process_section_headers): Likewise. + (process_relocs): Allow quotes to be translated. + (process_unwind): Likewise, + (process_mips_specific): Improve error message. + (get_note_type): Fix spelling typo. + + * configure.in (ALL_LINGUAS): Add sv + * po/sv.po: New file. + +2002-05-27 Alan Modra <amodra@bigpond.net.au> + + * unwind-ia64.c (unw_print_brmask): Don't use sprintf. + (unw_print_grmask): Likewise. + (unw_print_frmask): Likewise. + +2002-05-26 Kazu Hirata <kazu@cs.umass.edu> + + * arsup.c: Remove ARGSUSED. + * debug.c: Likewise. + * ieee.c: Likewise. + * nlmconv.c: Likewise. + * prdbg.c: Likewise. + * stabs.c: Likewise. + * wrstabs.c: Likewise. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * arlex.l: Use #include "" instead of <> for local header files. + * coffdump.c: Likewise. + * coffgrok.c: Likewise. + * nlmconv.c: Likewise. + * nlmheader.y: Likewise. + * srconv.c: Likewise. + * strings.c: Likewise. + * sysdump.c: Likewise. + * unwind-ia64.h: Likewise. + * windres.h: Likewise. + * winduni.h: Likewise. + +2002-05-24 Tom Rix <trix@redhat.com> + + * MAINTAINERS: Add self as the d10v maintainer. + +2002-05-24 TAMURA Kent <kent@netbsd.org> + + * configure.in: Builds dlltool for i386-netbsdpe. + * configure: Regenerate. + +2002-05-23 Kazu Hirata <kazu@cs.umass.edu> + + * size.c: Fix formatting. + * srconv.c: Likewise. + * stabs.c: Likewise. + * sysdump.c: Likewise. + * unwind-ia64.c: Likewise. + * wrstabs.c: Likewise. + +2002-05-23 Jakub Jelinek <jakub@redhat.com> + + * readelf.c (get_segment_type): Add PT_TLS. + (get_elf_section_flags): Add SHF_TLS. + (get_dynamic_flags): Optimize. Add DF_STATIC_TLS. + (process_dynamic_segment): Use puts instead of printf. + (get_symbol_type): Support STT_TLS. + * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT, + SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS. + Add SEC_THREAD_LOCAL. + +2002-05-23 Kazu Hirata <kazu@cs.umass.edu> + + * rdcoff.c: Fix formatting. + * rddbg.c: Likewise. + * readelf.c: Likewise. + * rename.c: Likewise. + * resbin.c: Likewise. + * resrc.c: Likewise. + * resres.c: Likewise. + +2002-05-21 Kazu Hirata <kazu@cs.umass.edu> + + * filemode.c: Fix formatting. + * ieee.c: Likewise. + * is-ranlib.c: Likewise. + * is-strip.c: Likewise. + * maybe-ranlib.c: Likewise. + * maybe-strip.c: Likewise. + * nlmconv.c: Likewise. + * nm.c: Likewise. + * not-ranlib.c: Likewise. + * not-strip.c: Likewise. + * objcopy.c: Likewise. + * objdump.c: Likewise. + +2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * objdump.c (dump_headers): Fix output formatting for ELF32 + architectures in a BFD64 enabled toolchain. + +2002-05-20 Kazu Hirata <kazu@cs.umass.edu> + + * debug.c: Fix formatting. + * debug.h: Likewise. + * dlltool.c: Likewise. + * dllwrap.c: Likewise. + * emul_aix.c: Likewise. + * emul_vanilla.c: Likewise. + +2002-05-19 Kazu Hirata <kazu@cs.umass.edu> + + * addr2line.c: Fix formatting. + * ar.c: Likewise. + * arsup.c: Likewise. + * arsup.h: Likewise. + * binemul.c: Likewise. + * binemul.h: Likewise. + * bucomm.c: Likewise. + * coffdump.c: Likewise. + * coffgrok.c: Likewise. + * coffgrok.h: Likewise. + +2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl> + + * MAINTAINERS: Add myself as the second AVR port maintainer. + +2002-05-16 Stephane Carrez <stcarrez@nerim.fr> + + * MAINTAINERS: Update my email address. + +2002-05-09 Nick Clifton <nickc@cambridge.redhat.com> + + * MAINTAINERS: Add Jason Thorpe as VAX maintainer. + 2002-05-09 Alan Modra <amodra@bigpond.net.au> * configure.in: Replace `*pe' with `pe' throughout. * configure: Regenerate. - Merge from mainline - 2002-05-06 Alan Modra <amodra@bigpond.net.au> +2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br> + + * Makefile.am: Honour DESTDIR. + * Makefile.in: Regenerate. + +2002-05-06 Alan Modra <amodra@bigpond.net.au> + * dlltool.c (process_def_file): Add missing prototype. (new_directive, assemble_file, main): Likewise. (process_def_file, new_directive): Make static. @@ -17,31 +402,59 @@ (strhash): Likewise. * windres.c (define_resource): Use one memset to clear all of struct res_resource. + * rcparse.y: Remove newcmd rule. Move rcparse_discard_strings call to rules that need no lookahead. Check for no lookahead. - 2002-05-06 Borut Razem <borut.razem@siol.net> +2002-05-06 Borut Razem <borut.razem@siol.net> + * rclex.l (get_string): Correct "strings" list handling. * resrc.c (read_rc_file): Discard strings. - 2002-05-04 Bob Byrnes <byrnes@curl.com> +2002-05-04 Alan Modra <amodra@bigpond.net.au> + + * ar.c (replace_members): Remove unused var. Formatting fix. + * binemul.c (ar_emul_default_parse_arg): Add ATTRIBUTE_UNUSED. + + * MAINTAINERS: Sort port maintainers by CPU. + +2002-05-04 Bob Byrnes <byrnes@curl.com> + * size.c (display_archive): Add last_arfile and code to close archives. - 2002-05-01 Alan Modra <amodra@bigpond.net.au> +2002-05-01 Alan Modra <amodra@bigpond.net.au> + * nm.c (print_symbol): Check returned filename from bfd_find_nearest_line is non-NULL. - 2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> +2002-04-25 Elena Zannoni <ezannoni@redhat.com> + + * readelf.c (get_AT_name): Handle DW_AT_GNU_vector. + +2002-04-24 Christian Groessler <chris@groessler.org> + + * MAINTAINERS: Changed my email address. + +2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + * arparse.y: Fix syntax warning. - 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com> +2002-04-16 Nick Clifton <nickc@cambridge.redhat.com> + + * readelf.c (fetch_location_list): Remove unused function. + + * readelf.c (process_corefile_note_segment): Catch corrupt notes + and display a warning message, then exit the loop. + * rcparse.y: Set MEMFLAG_DISCARDABLE by default. - 2002-04-15 Nick Clifton <nickc@cambridge.redhat.com> +2002-04-15 Nick Clifton <nickc@cambridge.redhat.com> + * resrc.c (write_rc_dialog): If charset is non-default value display all of the DIALOGEX parameters. - 2002-04-15 Eric Kohl <ekohl@rz-online.de> +2002-04-15 Eric Kohl <ekohl@rz-online.de> + * rcparse.y: Allow two to five parameter in FONT statement of DIALOGEX resources. * resbin.c (bin_to_res_dialog): Fixed read/write code for dialogex @@ -50,49 +463,62 @@ * windres.h: Added misssing charset variable to dialog_ex structure. - 2002-04-10 Nick Clifton <nickc@cambridge.redhat.com> +2002-04-10 Nick Clifton <nickc@cambridge.redhat.com> + * rcparse.y: Set MEMFLAG_PURE by default. - 2002-04-09 Bernd Herd <info@herdsoft.com> +2002-04-09 Bernd Herd <info@herdsoft.com> + * rcparse.y: CLASS definitions in DIALOG resources are quoted. Fix typo in BEDIT warning. Don't add default dialog style when explicit style specified. Add WS_CAPTION dialog style if CAPTION is specified. + * rclex.l (handle_quotes): "\xhex" encoding in strings corrected. (handle_quotes) "\a" escape (used for right justified key definitions in menus) is encodes as binary 8. + * resrc.c (write_rc_dialog): Print style even if it is 0. (write_rc_directory): Fix overlooked sublang shift bug. (bin_to_res_dialog): Don't print empty dialog caption. + * resbin.c (bin_to_res_dialog): Use signature to identify DIALOGEX. + * windres.c (main): Set default LANGUAGE to english/us. - 2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk> +2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk> + * resrc.c: print CLASS names in quotes -2002-04-27 Alan Modra <amodra@bigpond.net.au> +2002-04-09 J"orn Rennecke <joern.rennecke@superh.com> - Merge from mainline - 2002-04-25 Elena Zannoni <ezannoni@redhat.com> - * readelf.c (get_AT_name): Handle DW_AT_GNU_vector. + * MAINTAINERS: Update my email address. - 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com> - * readelf.c (fetch_location_list): Remove unused function. - * readelf.c (process_corefile_note_segment): Catch corrupt notes - and display a warning message, then exit the loop. +2002-04-04 Alan Modra <amodra@bigpond.net.au> - 2002-04-24 Christian Groessler <chris@groessler.org> - * MAINTAINERS: Changed my email address. + * dep-in.sed: Cope with absolute paths. + * Makefile.am (dep.sed): Subst TOPDIR. + Run "make dep-am". + * Makefile.in: Regenerate. - 2002-04-09 J"orn Rennecke <joern.rennecke@superh.com> - * MAINTAINERS: Update my email address. +2002-03-27 Peter Targett <peter.targett@arc.com> - 2002-03-27 Peter Targett <peter.targett@arc.com> * MAINTAINERS: Update my email address. - 2002-03-20 Daniel Berlin <dan@dberlin.org> +2002-03-21 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. + * po/POTFILES.in: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + +2002-03-20 Daniel Berlin <dan@dberlin.org> + * readelf.c: Add support for displaying dwarf2 location lists. (do_debug_loc, debug_loc_section, debug_loc_size): New. (parse_args): Use 'O' as shorthand for displaying location list @@ -108,35 +534,29 @@ (read_and_display_attr_value): Note location lists, but don't display them inline. - 2002-03-01 Dmitry Timoshkov <dmitry@baikal.ru> - * dlltool.c (gen_exp_file): Take into account --kill-at (-k) while - generating .exp file. - - 2002-02-21 Nick Clifton <nickc@cambridge.redhat.com> - * readelf.c (dump_relocations): Fix typo. - - 2002-02-18 Timothy Daly <remote_bob@yahoo.com> - * readelf.c (dump_relocations): Display 2nd and 3rd reloc - types for 64-bit MIPS. Narrow some fields for 80-char - output. - (dump_relocations): Change spelling from 'unrecognised' - to 'unrecognized'. - (decode_ARM_machine_flags): Likewise. - (parse_args): Likewise. - (read_and_display_attr_value): Likewise. - (display_debug_section): Likewise. +2002-03-18 Tom Rix <trix@redhat.com> + + * Makefile.am: Add binutils emulation support. + * configure.in: Same. + * configure.tgt: New file. Same. + * ar.c (main): Use ar_emul_parse_arg. + (usage): Use ar_emul_usage. + (replace_members): Use ar_emul_replace, ar_emul_append. + * binemul.c: New file. Define the binutils emulation + layer. Define default methods. + * binemul.h: New file. Binutils emulation layer header file. + * emul_aix.c: New file. AIX binutils emulation. + * emul_vanilla.c: New file. Default binutils emulation. + * Makefile.in: Regenerate. + * configure: Same. -2002-04-04 Alan Modra <amodra@bigpond.net.au> +2002-03-18 Nick Clifton <nickc@cambridge.redhat.com> - * dep-in.sed: Cope with absolute paths. - * Makefile.am (dep.sed): Subst TOPDIR. - Run "make dep-am". - * Makefile.in: Regenerate. + * po/fr.po: Updated version. -2002-03-28 Alan Modra <amodra@bigpond.net.au> +2002-03-13 Nick Clifton <nickc@cambridge.redhat.com> - * aclocal.m4: Regenerate. - * configure: Regenerate. + * po/fr.po: Updated version. 2002-03-07 Daniel Jacobowitz <drow@mvista.com> @@ -147,9 +567,30 @@ * doc/binutils.texi (Target Selection): Fix LD crossreferences. (Architecture Selection): Likewise. -2002-03-07 Daniel Jacobowitz <drow@mvista.com> +2002-03-01 Dmitry Timoshkov <dmitry@baikal.ru> + + * dlltool.c (gen_exp_file): Take into account --kill-at (-k) while + generating .exp file. + +2002-02-21 Nick Clifton <nickc@cambridge.redhat.com> + + * readelf.c (dump_relocations): Fix typo. - * NEWS: Mark version 2.12. +2002-02-20 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Mark 2.12 branch. + +2002-02-18 Timothy Daly <remote_bob@yahoo.com> + + * readelf.c (dump_relocations): Display 2nd and 3rd reloc + types for 64-bit MIPS. Narrow some fields for 80-char + output. + (dump_relocations): Change spelling from 'unrecognised' + to 'unrecognized'. + (decode_ARM_machine_flags): Likewise. + (parse_args): Likewise. + (read_and_display_attr_value): Likewise. + (display_debug_section): Likewise. 2002-02-15 Hans-Peter Nilsson <hp@bitrange.com> @@ -174,14 +615,20 @@ 2002-02-11 Alan Modra <amodra@bigpond.net.au> - * objcopy.c (MKDIR): Define. - (copy_archive): Make name_list.name const. Use MKDIR. - Handle duplicate files in archives by making more temp dirs. + * configure: Regenerate. + * objcopy.c: Update copyright date. + * doc/Makefile.in: Regenerate. 2002-02-10 Daniel Jacobowitz <drow@mvista.com> * nlmconv.c: Back out localtime PARAMS change. +2002-02-11 Alan Modra <amodra@bigpond.net.au> + + * objcopy.c (MKDIR): Define. + (copy_archive): Make name_list.name const. Use MKDIR. + Handle duplicate files in archives by making more temp dirs. + 2002-02-10 Daniel Jacobowitz <drow@mvista.com> * coffdump.c: Include "getopt.h" after "bucomm.h" diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS index 24d015b..4ca6ae8 100644 --- a/contrib/binutils/binutils/MAINTAINERS +++ b/contrib/binutils/binutils/MAINTAINERS @@ -54,31 +54,35 @@ responsibility among the other maintainers. ARM Nick Clifton <nickc@redhat.com> ARM Richard Earnshaw <rearnsha@arm.com> AVR Denis Chertykov <denisc@overta.ru> + AVR Marek Michalkiewicz <marekm@amelek.gda.pl> CRIS Hans-Peter Nilsson <hp@axis.com> DWARF2 Jason Merrill <jason@redhat.com> + FR30 Dave Brolley <brolley@redhat.com> + FRV Dave Brolley <brolley@redhat.com> HPPA elf32 Alan Modra <amodra@bigpond.net.au> IA64 Jim Wilson <wilson@redhat.com> - x86_64 Jan Hubicka <jh@suse.cz> - x86_64 Andreas Jaeger <aj@suse.de> i860 Jason Eckhardt <jle@redhat.com> ix86 Alan Modra <amodra@bigpond.net.au> ix86 COFF,PE DJ Delorie <dj@redhat.com> ix86 H.J.Lu <hjl@gnu.org> ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com> - M68HC11 M68HC12 Stephane Carrez <Stephane.Carrez@worldnet.fr> - MN10300 Eric Christopher <echristo@redhat.com> - MN10300 Alexandre Oliva <aoliva@redhat.com> - MIPS Eric Christopher <echristo@redhat.com> + M68HC11 M68HC12 Stephane Carrez <stcarrez@nerim.fr> + M68k Ben Elliston <bje@redhat.com> M88k Ben Elliston <bje@redhat.com> + MIPS Eric Christopher <echristo@redhat.com> MMIX Hans-Peter Nilsson <hp@bitrange.com> + MN10300 Eric Christopher <echristo@redhat.com> + MN10300 Alexandre Oliva <aoliva@redhat.com> PPC Geoff Keating <geoffk@redhat.com> - PPC XCOFF Tom Rix <trix@redhat.com> s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com> - SH Jörn Rennecke <joern.rennecke@superh.com> + SH Jörn Rennecke <joern.rennecke@superh.com> SH Hans-Peter Nilsson <hp@bitrange.com> SH Alexandre Oliva <aoliva@redhat.com> SPARC Jakub Jelinek <jakub@redhat.com> TIC54X Timothy Wall <twall@alum.mit.edu> + VAX Jason R Thorpe <thorpej@wasabisystems.com> + x86_64 Jan Hubicka <jh@suse.cz> + x86_64 Andreas Jaeger <aj@suse.de> z8k Christian Groessler <chris@groessler.org> diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am index ec339b6..1fd97ab 100644 --- a/contrib/binutils/binutils/Makefile.am +++ b/contrib/binutils/binutils/Makefile.am @@ -62,7 +62,7 @@ noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG) EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG) -# Stuff that goes in tooldir/ if appropriate +# Stuff that goes in tooldir/ if appropriate. TOOL_PROGS = nm-new strip-new ar ranlib dlltool BASEDIR = $(srcdir)/.. @@ -71,20 +71,31 @@ INCDIR = $(BASEDIR)/include MKDEP = gcc -MM -INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\"" +INCLUDES = -D_GNU_SOURCE \ + -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \ + @HDEFINES@ \ + -I$(srcdir)/../intl -I../intl \ + -DLOCALEDIR="\"$(prefix)/share/locale\"" \ + -Dbin_dummy_emulation=$(EMULATION_VECTOR) -HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \ +HFILES = \ + arsup.h binemul.h bucomm.h budbg.h budemang.h \ + coffgrok.h debug.h dlltool.h nlmconv.h \ windres.h winduni.h GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h -CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \ - dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \ - maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \ - objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \ - stabs.c strings.c sysdump.c version.c wrstabs.c \ - windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \ - resres.c dllwrap.c rename.c +CFILES = \ + addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \ + coffdump.c coffgrok.c debug.c dlltool.c dllwrap.c \ + emul_aix.c emul_vanilla.c filemode.c \ + ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \ + nlmconv.c nm.c not-ranlib.c not-strip.c \ + objcopy.c objdump.c prdbg.c \ + rdcoff.c rddbg.c readelf.c rename.c \ + resbin.c rescoff.c resrc.c resres.c \ + size.c srconv.c stabs.c strings.c sysdump.c version.c \ + windres.c winduni.c wrstabs.c GENERATED_CFILES = \ underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \ @@ -161,9 +172,9 @@ readelf_LDADD = $(INTLLIBS) $(LIBIBERTY) strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) -nm_new_SOURCES = nm.c $(BULIBS) +nm_new_SOURCES = nm.c budemang.c $(BULIBS) -objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) +objdump_SOURCES = objdump.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS) objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) objdump.o:objdump.c @@ -183,13 +194,15 @@ cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h Makefile cxxfilt_SOURCES = cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS) -ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c $(BULIBS) +ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \ + emul_$(EMULATION).c $(BULIBS) ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c $(BULIBS) +ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \ + binemul.c emul_$(EMULATION).c $(BULIBS) ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -addr2line_SOURCES = addr2line.c $(BULIBS) +addr2line_SOURCES = addr2line.c budemang.c $(BULIBS) # The following is commented out for the conversion to automake. # This rule creates a single binary that switches between ar and ranlib @@ -341,18 +354,18 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) @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//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin for i in $(TOOL_PROGS); do \ if [ -f $$i$(EXEEXT) ]; then \ j=`echo $$i | sed -e 's/-new//'`; \ k=`echo $$j | sed '$(transform)'`; \ - if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/$$j$(EXEEXT); \ - ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \ + if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ + rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ fi; \ else true; \ fi; \ @@ -365,18 +378,25 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ $(INCDIR)/demangle.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h budemang.h ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ $(INCDIR)/libiberty.h $(INCDIR)/progress.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h + $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h \ + binemul.h arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/filenames.h +binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h +budemang.o: budemang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \ + budemang.h coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h @@ -391,6 +411,16 @@ dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h \ $(INCDIR)/dyn-string.h dlltool.h $(INCDIR)/safe-ctype.h +dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h +emul_aix.o: emul_aix.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h $(BFDDIR)/libxcoff.h +emul_vanilla.o: emul_vanilla.c binemul.h ../bfd/bfd.h \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h @@ -409,8 +439,10 @@ nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/nlm/external.h nlmconv.h nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h + $(INCDIR)/fopen-same.h budemang.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h \ + $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h not-ranlib.o: not-ranlib.c not-strip.o: not-strip.c objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ @@ -419,9 +451,9 @@ objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ budbg.h $(INCDIR)/filenames.h objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \ - debug.h budbg.h $(INCDIR)/aout/aout64.h + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h budemang.h \ + $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \ + $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \ @@ -429,12 +461,48 @@ prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \ - budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + $(INCDIR)/libiberty.h debug.h budbg.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \ budbg.h +readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \ + $(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \ + $(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/fr30.h \ + $(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/hppa.h \ + $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h \ + $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \ + $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \ + $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/elf/xstormy16.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h unwind-ia64.h +rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h +resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h +rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ + windres.h winduni.h +resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h @@ -459,57 +527,19 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h -wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windres.h \ winduni.h -resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - windres.h winduni.h -rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h -resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.h -readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \ - $(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \ - $(INCDIR)/elf/d30v.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/h8.h \ - $(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h \ - $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h \ - $(INCDIR)/elf/m68k.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \ - $(INCDIR)/elf/v850.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h \ - bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - unwind-ia64.h -resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h -dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h -rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ +wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ + debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def underscore.o: underscore.c arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in index a3501cc..9208082 100644 --- a/contrib/binutils/binutils/Makefile.in +++ b/contrib/binutils/binutils/Makefile.in @@ -80,6 +80,8 @@ DATADIRNAME = @DATADIRNAME@ DEMANGLER_NAME = @DEMANGLER_NAME@ DLLTOOL = @DLLTOOL@ DLLTOOL_DEFS = @DLLTOOL_DEFS@ +EMULATION = @EMULATION@ +EMULATION_VECTOR = @EMULATION_VECTOR@ EXEEXT = @EXEEXT@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ @@ -111,6 +113,8 @@ UNDERSCORE = @UNDERSCORE@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +bfdincludedir = @bfdincludedir@ +bfdlibdir = @bfdlibdir@ l = @l@ INTLLIBS = @INTLLIBS@ @@ -169,7 +173,7 @@ noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG) EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG) -# Stuff that goes in tooldir/ if appropriate +# Stuff that goes in tooldir/ if appropriate. TOOL_PROGS = nm-new strip-new ar ranlib dlltool BASEDIR = $(srcdir)/.. @@ -178,21 +182,33 @@ INCDIR = $(BASEDIR)/include MKDEP = gcc -MM -INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\"" +INCLUDES = -D_GNU_SOURCE \ + -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \ + @HDEFINES@ \ + -I$(srcdir)/../intl -I../intl \ + -DLOCALEDIR="\"$(prefix)/share/locale\"" \ + -Dbin_dummy_emulation=$(EMULATION_VECTOR) -HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \ + +HFILES = \ + arsup.h binemul.h bucomm.h budbg.h budemang.h \ + coffgrok.h debug.h dlltool.h nlmconv.h \ windres.h winduni.h GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h -CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \ - dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \ - maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \ - objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \ - stabs.c strings.c sysdump.c version.c wrstabs.c \ - windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \ - resres.c dllwrap.c rename.c +CFILES = \ + addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \ + coffdump.c coffgrok.c debug.c dlltool.c dllwrap.c \ + emul_aix.c emul_vanilla.c filemode.c \ + ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \ + nlmconv.c nm.c not-ranlib.c not-strip.c \ + objcopy.c objdump.c prdbg.c \ + rdcoff.c rddbg.c readelf.c rename.c \ + resbin.c rescoff.c resrc.c resres.c \ + size.c srconv.c stabs.c strings.c sysdump.c version.c \ + windres.c winduni.c wrstabs.c GENERATED_CFILES = \ @@ -252,21 +268,25 @@ readelf_LDADD = $(INTLLIBS) $(LIBIBERTY) strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) -nm_new_SOURCES = nm.c $(BULIBS) +nm_new_SOURCES = nm.c budemang.c $(BULIBS) -objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) +objdump_SOURCES = objdump.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS) objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) cxxfilt_SOURCES = cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS) -ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c $(BULIBS) +ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \ + emul_$(EMULATION).c $(BULIBS) + ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c $(BULIBS) +ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \ + binemul.c emul_$(EMULATION).c $(BULIBS) + ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -addr2line_SOURCES = addr2line.c $(BULIBS) +addr2line_SOURCES = addr2line.c budemang.c $(BULIBS) srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) @@ -353,15 +373,16 @@ filemode.$(OBJEXT) size_LDADD = $(LDADD) size_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a size_LDFLAGS = -objdump_OBJECTS = objdump.$(OBJEXT) prdbg.$(OBJEXT) rddbg.$(OBJEXT) \ -debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) rdcoff.$(OBJEXT) \ -bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) +objdump_OBJECTS = objdump.$(OBJEXT) budemang.$(OBJEXT) prdbg.$(OBJEXT) \ +rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) \ +rdcoff.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) objdump_DEPENDENCIES = ../opcodes/libopcodes.la ../bfd/libbfd.la \ ../libiberty/libiberty.a objdump_LDFLAGS = ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \ -not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \ -version.$(OBJEXT) filemode.$(OBJEXT) +not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \ +emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) ar_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a ar_LDFLAGS = strings_OBJECTS = strings.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ @@ -370,8 +391,9 @@ strings_LDADD = $(LDADD) strings_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a strings_LDFLAGS = ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \ -arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \ -version.$(OBJEXT) filemode.$(OBJEXT) +arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \ +emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) ranlib_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a ranlib_LDFLAGS = objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \ @@ -381,8 +403,8 @@ version.$(OBJEXT) filemode.$(OBJEXT) objcopy_LDADD = $(LDADD) objcopy_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a objcopy_LDFLAGS = -addr2line_OBJECTS = addr2line.$(OBJEXT) bucomm.$(OBJEXT) \ -version.$(OBJEXT) filemode.$(OBJEXT) +addr2line_OBJECTS = addr2line.$(OBJEXT) budemang.$(OBJEXT) \ +bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) addr2line_LDADD = $(LDADD) addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a addr2line_LDFLAGS = @@ -390,8 +412,8 @@ readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \ unwind-ia64.$(OBJEXT) readelf_DEPENDENCIES = ../libiberty/libiberty.a readelf_LDFLAGS = -nm_new_OBJECTS = nm.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ -filemode.$(OBJEXT) +nm_new_OBJECTS = nm.$(OBJEXT) budemang.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) nm_new_LDADD = $(LDADD) nm_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a nm_new_LDFLAGS = @@ -1060,18 +1082,18 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) @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//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin for i in $(TOOL_PROGS); do \ if [ -f $$i$(EXEEXT) ]; then \ j=`echo $$i | sed -e 's/-new//'`; \ k=`echo $$j | sed '$(transform)'`; \ - if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/$$j$(EXEEXT); \ - ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \ + if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ + rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ fi; \ else true; \ fi; \ @@ -1084,18 +1106,25 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ $(INCDIR)/demangle.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h budemang.h ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ $(INCDIR)/libiberty.h $(INCDIR)/progress.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h + $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h \ + binemul.h arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/filenames.h +binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h +budemang.o: budemang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \ + budemang.h coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h @@ -1110,6 +1139,16 @@ dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h \ $(INCDIR)/dyn-string.h dlltool.h $(INCDIR)/safe-ctype.h +dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h +emul_aix.o: emul_aix.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h $(BFDDIR)/libxcoff.h +emul_vanilla.o: emul_vanilla.c binemul.h ../bfd/bfd.h \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h config.h \ + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h @@ -1128,8 +1167,10 @@ nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/nlm/external.h nlmconv.h nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h + $(INCDIR)/fopen-same.h budemang.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h \ + $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h not-ranlib.o: not-ranlib.c not-strip.o: not-strip.c objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ @@ -1138,9 +1179,9 @@ objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ budbg.h $(INCDIR)/filenames.h objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \ - debug.h budbg.h $(INCDIR)/aout/aout64.h + $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h budemang.h \ + $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \ + $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \ @@ -1148,12 +1189,48 @@ prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h bucomm.h \ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \ - budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + $(INCDIR)/libiberty.h debug.h budbg.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \ budbg.h +readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \ + $(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \ + $(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/fr30.h \ + $(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/hppa.h \ + $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h \ + $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \ + $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \ + $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/elf/xstormy16.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h unwind-ia64.h +rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h +resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h +rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ + windres.h winduni.h +resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ + winduni.h size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h @@ -1178,57 +1255,19 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h -wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windres.h \ winduni.h -resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - windres.h winduni.h -rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h -resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.h -readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \ - $(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \ - $(INCDIR)/elf/d30v.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/h8.h \ - $(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h \ - $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h \ - $(INCDIR)/elf/m68k.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \ - $(INCDIR)/elf/v850.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h \ - bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - unwind-ia64.h -resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \ - winduni.h -dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h -rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ +wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ + debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def underscore.o: underscore.c arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS index 232bc16..5091e3b 100644 --- a/contrib/binutils/binutils/NEWS +++ b/contrib/binutils/binutils/NEWS @@ -1,6 +1,10 @@ -*- text -*- +Changes in 2.13: -Changes in binutils 2.12: +* Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400 + and FR500 included. + +Changes in version 2.12: * Support for Don Knuth's MMIX, by Hans-Peter Nilsson. diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c index a9ceb91..174a034 100644 --- a/contrib/binutils/binutils/addr2line.c +++ b/contrib/binutils/binutils/addr2line.c @@ -20,10 +20,10 @@ /* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de - Usage: + Usage: addr2line [options] addr addr ... or - addr2line [options] + addr2line [options] both forms write results to stdout, the second form reads addresses to be converted from stdin. */ @@ -35,6 +35,7 @@ #include "libiberty.h" #include "demangle.h" #include "bucomm.h" +#include "budemang.h" static boolean with_functions; /* -f, show function names. */ static boolean do_demangle; /* -C, demangle names. */ @@ -191,23 +192,22 @@ translate_addresses (abfd) { if (with_functions) { - if (functionname == NULL || *functionname == '\0') - printf ("??\n"); - else if (! do_demangle) - printf ("%s\n", functionname); - else + const char *name; + char *alloc = NULL; + + name = functionname; + if (name == NULL || *name == '\0') + name = "??"; + else if (do_demangle) { - char *res; - - res = cplus_demangle (functionname, DMGL_ANSI | DMGL_PARAMS); - if (res == NULL) - printf ("%s\n", functionname); - else - { - printf ("%s\n", res); - free (res); - } + alloc = demangle (abfd, name); + name = alloc; } + + printf ("%s\n", name); + + if (alloc != NULL) + free (alloc); } if (base_names && filename != NULL) @@ -233,19 +233,19 @@ translate_addresses (abfd) /* Process a file. */ static void -process_file (filename, target) - const char *filename; +process_file (file_name, target) + const char *file_name; const char *target; { bfd *abfd; char **matching; - abfd = bfd_openr (filename, target); + abfd = bfd_openr (file_name, target); if (abfd == NULL) - bfd_fatal (filename); + bfd_fatal (file_name); if (bfd_check_format (abfd, bfd_archive)) - fatal (_("%s: can not get addresses from archive"), filename); + fatal (_("%s: can not get addresses from archive"), file_name); if (! bfd_check_format_matches (abfd, bfd_object, &matching)) { @@ -278,7 +278,7 @@ main (argc, argv) int argc; char **argv; { - const char *filename; + const char *file_name; char *target; int c; @@ -297,7 +297,7 @@ main (argc, argv) bfd_init (); set_default_bfd_target (); - filename = NULL; + file_name = NULL; target = NULL; while ((c = getopt_long (argc, argv, "b:Ce:sfHhVv", long_options, (int *) 0)) != EOF) @@ -314,17 +314,17 @@ main (argc, argv) if (optarg != NULL) { enum demangling_styles style; - + style = cplus_demangle_name_to_style (optarg); - if (style == unknown_demangling) + if (style == unknown_demangling) fatal (_("unknown demangling style `%s'"), optarg); - + cplus_demangle_set_style (style); - } + } break; case 'e': - filename = optarg; + file_name = optarg; break; case 's': base_names = true; @@ -346,13 +346,13 @@ main (argc, argv) } } - if (filename == NULL) - filename = "a.out"; + if (file_name == NULL) + file_name = "a.out"; addr = argv + optind; naddr = argc - optind; - process_file (filename, target); + process_file (file_name, target); return 0; } diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c index 92d9b35..ea1b456 100644 --- a/contrib/binutils/binutils/ar.c +++ b/contrib/binutils/binutils/ar.c @@ -3,29 +3,29 @@ 2001, 2002 Free Software Foundation, Inc. -This file is part of GNU Binutils. + This file is part of GNU Binutils. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Bugs: should use getopt the way tar does (complete w/optional -) and should have long options too. GNU ar used to check file against filesystem in quick_update and replace operations (would check mtime). Doesn't warn when name truncated. No way to specify pos_end. Error messages should be - more consistant. -*/ + more consistant. */ + #include "bfd.h" #include "libiberty.h" #include "progress.h" @@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "libbfd.h" #include "arsup.h" #include "filenames.h" +#include "binemul.h" #include <sys/stat.h> #ifdef __GO32___ @@ -221,7 +222,7 @@ map_over_members (arch, function, files, count) { ++match_count; if (counted_name_mode - && match_count != counted_name_counter) + && match_count != counted_name_counter) { /* Counting, and didn't match on count; go on to the next one. */ @@ -247,11 +248,11 @@ usage (help) FILE *s; s = help ? stdout : stderr; - + if (! is_ranlib) { /* xgettext:c-format */ - fprintf (s, _("Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"), + fprintf (s, _("Usage: %s [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"), program_name); /* xgettext:c-format */ fprintf (s, _(" %s -M [<mri-script]\n"), program_name); @@ -277,11 +278,12 @@ usage (help) fprintf (s, _(" [S] - do not build a symbol table\n")); fprintf (s, _(" [v] - be verbose\n")); fprintf (s, _(" [V] - display the version number\n")); - fprintf (s, _(" [-X32_64] - (ignored)\n")); + + ar_emul_usage (s); } else { - /* xgettext:c-format */ + /* xgettext:c-format */ fprintf (s, _("Usage: %s [options] archive\n"), program_name); fprintf (s, _(" Generate an index to speed access to archives\n")); fprintf (s, _(" The options are:\n\ @@ -383,6 +385,7 @@ main (argc, argv) int file_count; char *inarch_filename; int show_version; + int i; #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) setlocale (LC_MESSAGES, ""); @@ -402,14 +405,14 @@ main (argc, argv) temp = strrchr (program_name, '/'); #ifdef HAVE_DOS_BASED_FILE_SYSTEM - { - /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ - char *bslash = strrchr (program_name, '\\'); - if (temp == NULL || (bslash != NULL && bslash > temp)) - temp = bslash; - if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':') - temp = program_name + 1; - } + { + /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ + char *bslash = strrchr (program_name, '\\'); + if (temp == NULL || (bslash != NULL && bslash > temp)) + temp = bslash; + if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':') + temp = program_name + 1; + } #endif if (temp == NULL) temp = program_name; @@ -444,16 +447,11 @@ main (argc, argv) xatexit (remove_output); - /* Ignored for (partial) AIX compatibility. On AIX, - the -X option can be used to ignore certain kinds - of object files in the archive (the 64-bit objects - or the 32-bit objects). GNU ar always looks at all - kinds of objects in an archive. */ - while (argc > 1 && strcmp (argv[1], "-X32_64") == 0) - { - argv++; - argc--; - } + for (i = 1; i < argc; i++) + if (! ar_emul_parse_arg (argv[i])) + break; + argv += (i - 1); + argc -= (i - 1); if (is_ranlib) { @@ -628,12 +626,12 @@ main (argc, argv) if (postype != pos_default) posname = argv[arg_index++]; - if (counted_name_mode) + if (counted_name_mode) { - if (operation != extract && operation != delete) + if (operation != extract && operation != delete) fatal (_("`N' is only meaningful with the `x' and `d' options.")); counted_name_counter = atoi (argv[arg_index++]); - if (counted_name_counter <= 0) + if (counted_name_counter <= 0) fatal (_("Value for `N' must be positive.")); } @@ -669,7 +667,7 @@ main (argc, argv) if (operation == quick_append) { /* Note that quick appending to a non-existent archive creates it, - even if there are no files to append. */ + even if there are no files to append. */ do_quick_append (inarch_filename, files); xexit (0); } @@ -884,7 +882,7 @@ extract_file (abfd) long ncopied = 0; long size; struct stat buf; - + if (bfd_stat_arch_elt (abfd, &buf) != 0) /* xgettext:c-format */ fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); @@ -893,7 +891,7 @@ extract_file (abfd) if (size < 0) /* xgettext:c-format */ fatal (_("stat returns negative size for %s"), bfd_get_filename (abfd)); - + if (verbose) printf ("x - %s\n", bfd_get_filename (abfd)); @@ -1205,11 +1203,11 @@ delete_members (arch, files_to_delete) while (*current_ptr_ptr) { if (FILENAME_CMP (normalize (*files_to_delete, arch), - (*current_ptr_ptr)->filename) == 0) + (*current_ptr_ptr)->filename) == 0) { ++match_count; if (counted_name_mode - && match_count != counted_name_counter) + && match_count != counted_name_counter) { /* Counting, and didn't match on count; go on to the next one. */ @@ -1304,7 +1302,6 @@ replace_members (arch, files_to_move, quick) bfd **after_bfd; /* New entries go after this one */ bfd *current; bfd **current_ptr; - bfd *temp; while (files_to_move && *files_to_move) { @@ -1333,7 +1330,8 @@ replace_members (arch, files_to_move, quick) } if (bfd_stat_arch_elt (current, &asbuf) != 0) /* xgettext:c-format */ - fatal (_("internal stat error on %s"), current->filename); + fatal (_("internal stat error on %s"), + current->filename); if (fsbuf.st_mtime <= asbuf.st_mtime) goto next_file; @@ -1341,24 +1339,13 @@ replace_members (arch, files_to_move, quick) after_bfd = get_pos_bfd (&arch->next, pos_after, current->filename); - temp = *after_bfd; - - *after_bfd = bfd_openr (*files_to_move, NULL); - if (*after_bfd == (bfd *) NULL) + if (ar_emul_replace (after_bfd, *files_to_move, + verbose)) { - bfd_fatal (*files_to_move); + /* Snip out this entry from the chain. */ + *current_ptr = (*current_ptr)->next; + changed = true; } - (*after_bfd)->next = temp; - - /* snip out this entry from the chain */ - *current_ptr = (*current_ptr)->next; - - if (verbose) - { - printf ("r - %s\n", *files_to_move); - } - - changed = true; goto next_file; } @@ -1367,22 +1354,9 @@ replace_members (arch, files_to_move, quick) } /* Add to the end of the archive. */ - after_bfd = get_pos_bfd (&arch->next, pos_end, NULL); - temp = *after_bfd; - *after_bfd = bfd_openr (*files_to_move, NULL); - if (*after_bfd == (bfd *) NULL) - { - bfd_fatal (*files_to_move); - } - if (verbose) - { - printf ("a - %s\n", *files_to_move); - } - - (*after_bfd)->next = temp; - - changed = true; + if (ar_emul_append (after_bfd, *files_to_move, verbose)) + changed = true; next_file:; diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l index 381b177..c1771a5 100644 --- a/contrib/binutils/binutils/arlex.l +++ b/contrib/binutils/binutils/arlex.l @@ -1,7 +1,7 @@ %{ /* arlex.l - Strange script language lexer */ -/* Copyright 1992, 1997, 2000 Free Software Foundation, Inc. +/* Copyright 1992, 1997, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ */ #define DONTDECLARE_MALLOC -#include <ansidecl.h> +#include "ansidecl.h" #include "libiberty.h" #include "arparse.h" diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c index 1e86479..7b01d37 100644 --- a/contrib/binutils/binutils/arsup.c +++ b/contrib/binutils/binutils/arsup.c @@ -1,31 +1,29 @@ /* arsup.c - Archive support for MRI compatibility - Copyright 1992, 1994, 1995, 1996, 1997, 2000 + Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. -This file is part of GNU Binutils. + This file is part of GNU Binutils. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Contributed by Steve Chamberlain - sac@cygnus.com + sac@cygnus.com -This file looks after requests from arparse.y, to provide the MRI -style librarian command syntax + 1 word LIST - -*/ + This file looks after requests from arparse.y, to provide the MRI + style librarian command syntax + 1 word LIST. */ #include "bfd.h" #include "arsup.h" @@ -74,7 +72,7 @@ map_over_list (arch, function, list) boolean found = false; bfd *prev = arch; - for (head = arch->next; head; head = head->next) + for (head = arch->next; head; head = head->next) { if (head->filename != NULL && FILENAME_CMP (ptr->name, head->filename) == 0) @@ -93,13 +91,12 @@ map_over_list (arch, function, list) FILE *outfile; -/*ARGSUSED*/ static void ar_directory_doer (abfd, ignore) bfd *abfd; bfd *ignore ATTRIBUTE_UNUSED; { - print_arelt_descr(outfile, abfd, verbose); + print_arelt_descr(outfile, abfd, verbose); } void @@ -121,7 +118,7 @@ ar_directory (ar_name, list, output) output = 0; } } - else + else outfile = stdout; map_over_list (arch, ar_directory_doer, list); @@ -136,86 +133,100 @@ void DEFUN_VOID(prompt) { extern int interactive; - if (interactive) - { - printf("AR >"); - fflush(stdout); - } + + if (interactive) + { + printf ("AR >"); + fflush (stdout); + } } void maybequit () { - if (! interactive) + if (! interactive) xexit (9); } bfd *obfd; -char *real_name ; -void -DEFUN(ar_open,(name, t), - char *name AND - int t) +char *real_name; +void +ar_open (name, t) + char *name; + int t; { char *tname = (char *) xmalloc (strlen (name) + 10); const char *bname = lbasename (name); real_name = name; + /* Prepend tmp- to the beginning, to avoid file-name clashes after truncation on filesystems with limited namespaces (DOS). */ - sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname); - obfd = bfd_openw(tname, NULL); - - if (!obfd) { - fprintf(stderr,_("%s: Can't open output archive %s\n"), program_name, - tname); - - maybequit(); - } - else { - if (!t) { - bfd **ptr; - bfd *element; - bfd *ibfd; - ibfd = bfd_openr(name, NULL); - if (!ibfd) { - fprintf(stderr,_("%s: Can't open input archive %s\n"), - program_name, name); - maybequit(); - return; - } - if (bfd_check_format(ibfd, bfd_archive) != true) { - fprintf(stderr,_("%s: file %s is not an archive\n"), program_name, - name); - maybequit(); - return; - } - ptr = &(obfd->archive_head); - element = bfd_openr_next_archived_file(ibfd, NULL); - - while (element) { - *ptr = element; - ptr = &element->next; - element = bfd_openr_next_archived_file(ibfd, element); - } + sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname); + obfd = bfd_openw (tname, NULL); + + if (!obfd) + { + fprintf (stderr, + _("%s: Can't open output archive %s\n"), + program_name, tname); + + maybequit (); } + else + { + if (!t) + { + bfd **ptr; + bfd *element; + bfd *ibfd; - bfd_set_format(obfd, bfd_archive); + ibfd = bfd_openr (name, NULL); - obfd->has_armap = 1; - } -} + if (!ibfd) + { + fprintf (stderr,_("%s: Can't open input archive %s\n"), + program_name, name); + maybequit (); + return; + } + + if (bfd_check_format(ibfd, bfd_archive) != true) + { + fprintf (stderr, + _("%s: file %s is not an archive\n"), + program_name, name); + maybequit (); + return; + } + + ptr = &(obfd->archive_head); + element = bfd_openr_next_archived_file (ibfd, NULL); + + while (element) + { + *ptr = element; + ptr = &element->next; + element = bfd_openr_next_archived_file (ibfd, element); + } + } + bfd_set_format (obfd, bfd_archive); + + obfd->has_armap = 1; + } +} static void ar_addlib_doer (abfd, prev) bfd *abfd; bfd *prev; { - /* Add this module to the output bfd */ + /* Add this module to the output bfd. */ if (prev != NULL) prev->next = abfd->next; + abfd->next = obfd->archive_head; obfd->archive_head = abfd; } @@ -238,224 +249,248 @@ ar_addlib (name, list) if (arch != NULL) map_over_list (arch, ar_addlib_doer, list); - /* Don't close the bfd, since it will make the elements disasppear */ + /* Don't close the bfd, since it will make the elements disasppear. */ } } void -DEFUN(ar_addmod, (list), - struct list *list) +ar_addmod (list) + struct list *list; { - if (!obfd) { - fprintf(stderr, _("%s: no open output archive\n"), program_name); - maybequit(); - } - else - { - while (list) { - bfd *abfd = bfd_openr(list->name, NULL); - if (!abfd) { - fprintf(stderr,_("%s: can't open file %s\n"), program_name, - list->name); - maybequit(); - } - else { - abfd->next = obfd->archive_head; - obfd->archive_head = abfd; - } - list = list->next; + if (!obfd) + { + fprintf (stderr, _("%s: no open output archive\n"), program_name); + maybequit (); } - } -} + else + { + while (list) + { + bfd *abfd = bfd_openr (list->name, NULL); + if (!abfd) + { + fprintf (stderr, _("%s: can't open file %s\n"), + program_name, list->name); + maybequit (); + } + else + { + abfd->next = obfd->archive_head; + obfd->archive_head = abfd; + } + list = list->next; + } + } +} void -DEFUN_VOID(ar_clear) +ar_clear () { -if (obfd) - obfd->archive_head = 0; + if (obfd) + obfd->archive_head = 0; } void -DEFUN(ar_delete, (list), - struct list *list) +ar_delete (list) + struct list *list; { - if (!obfd) { - fprintf(stderr, _("%s: no open output archive\n"), program_name); - maybequit(); - } - else - { - while (list) { - /* Find this name in the archive */ - bfd *member = obfd->archive_head; - bfd **prev = &(obfd->archive_head); - int found = 0; - while (member) { - if (FILENAME_CMP(member->filename, list->name) == 0) { - *prev = member->next; - found = 1; - } - else { - prev = &(member->next); + if (!obfd) + { + fprintf (stderr, _("%s: no open output archive\n"), program_name); + maybequit (); + } + else + { + while (list) + { + /* Find this name in the archive. */ + bfd *member = obfd->archive_head; + bfd **prev = &(obfd->archive_head); + int found = 0; + + while (member) + { + if (FILENAME_CMP(member->filename, list->name) == 0) + { + *prev = member->next; + found = 1; + } + else + prev = &(member->next); + + member = member->next; + } + + if (!found) + { + fprintf (stderr, _("%s: can't find module file %s\n"), + program_name, list->name); + maybequit (); + } + + list = list->next; } - member = member->next; - } - if (!found) { - fprintf(stderr,_("%s: can't find module file %s\n"), program_name, - list->name); - maybequit(); - } - list = list->next; } - } } - void -DEFUN_VOID(ar_save) +ar_save () { + if (!obfd) + { + fprintf (stderr, _("%s: no open output archive\n"), program_name); + maybequit (); + } + else + { + char *ofilename = xstrdup (bfd_get_filename (obfd)); - if (!obfd) { - fprintf(stderr, _("%s: no open output archive\n"), program_name); - maybequit(); - } - else { - char *ofilename = xstrdup (bfd_get_filename (obfd)); - bfd_close(obfd); - - rename (ofilename, real_name); - obfd = 0; - free(ofilename); - } -} - + bfd_close (obfd); + rename (ofilename, real_name); + obfd = 0; + free (ofilename); + } +} void -DEFUN(ar_replace, (list), - struct list *list) +ar_replace (list) + struct list *list; { - if (!obfd) { - fprintf(stderr, _("%s: no open output archive\n"), program_name); - maybequit(); - } - else - { - while (list) { - /* Find this name in the archive */ - bfd *member = obfd->archive_head; - bfd **prev = &(obfd->archive_head); - int found = 0; - while (member) - { - if (FILENAME_CMP(member->filename, list->name) == 0) - { - /* Found the one to replace */ - bfd *abfd = bfd_openr(list->name, 0); - if (!abfd) - { - fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name); - maybequit(); - } - else { - *prev = abfd; - abfd->next = member->next; - found = 1; - } - } - else { - prev = &(member->next); - } - member = member->next; - } - if (!found) { - bfd *abfd = bfd_openr(list->name, 0); - fprintf(stderr,_("%s: can't find module file %s\n"), program_name, - list->name); - if (!abfd) - { - fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name); - maybequit(); - } - else + if (!obfd) + { + fprintf (stderr, _("%s: no open output archive\n"), program_name); + maybequit (); + } + else + { + while (list) { - *prev = abfd; - } - } + /* Find this name in the archive. */ + bfd *member = obfd->archive_head; + bfd **prev = &(obfd->archive_head); + int found = 0; + + while (member) + { + if (FILENAME_CMP (member->filename, list->name) == 0) + { + /* Found the one to replace. */ + bfd *abfd = bfd_openr (list->name, 0); + + if (!abfd) + { + fprintf (stderr, _("%s: can't open file %s\n"), + program_name, list->name); + maybequit (); + } + else + { + *prev = abfd; + abfd->next = member->next; + found = 1; + } + } + else + { + prev = &(member->next); + } + member = member->next; + } + + if (!found) + { + bfd *abfd = bfd_openr (list->name, 0); + + fprintf (stderr,_("%s: can't find module file %s\n"), + program_name, list->name); + if (!abfd) + { + fprintf (stderr, _("%s: can't open file %s\n"), + program_name, list->name); + maybequit (); + } + else + *prev = abfd; + } - list = list->next; + list = list->next; + } } - } } -/* And I added this one */ +/* And I added this one. */ void -DEFUN_VOID(ar_list) +ar_list () { - if (!obfd) - { - fprintf(stderr, _("%s: no open output archive\n"), program_name); - maybequit(); - } - else { - bfd *abfd; - outfile = stdout; - verbose =1 ; - printf(_("Current open archive is %s\n"), bfd_get_filename (obfd)); - for (abfd = obfd->archive_head; - abfd != (bfd *)NULL; - abfd = abfd->next) + if (!obfd) { - ar_directory_doer (abfd, (bfd *) NULL); + fprintf (stderr, _("%s: no open output archive\n"), program_name); + maybequit (); } - } -} + else + { + bfd *abfd; + outfile = stdout; + verbose =1 ; + printf (_("Current open archive is %s\n"), bfd_get_filename (obfd)); -void -DEFUN_VOID(ar_end) + for (abfd = obfd->archive_head; + abfd != (bfd *)NULL; + abfd = abfd->next) + ar_directory_doer (abfd, (bfd *) NULL); + } +} + +void +ar_end () { if (obfd) - { - fclose((FILE *)(obfd->iostream)); - unlink(bfd_get_filename (obfd)); - } + { + fclose ((FILE *)(obfd->iostream)); + unlink (bfd_get_filename (obfd)); + } } + void -DEFUN(ar_extract,(list), - struct list *list) +ar_extract (list) + struct list *list; { - if (!obfd) - { - - fprintf(stderr, _("%s: no open archive\n"), program_name); - maybequit(); - } - else - { - while (list) { - /* Find this name in the archive */ - bfd *member = obfd->archive_head; - int found = 0; - while (member && !found) - { - if (FILENAME_CMP(member->filename, list->name) == 0) + if (!obfd) + { + fprintf (stderr, _("%s: no open archive\n"), program_name); + maybequit (); + } + else + { + while (list) { - extract_file(member); - found = 1; - } - - member = member->next; - } - if (!found) { - bfd_openr(list->name, 0); - fprintf(stderr,_("%s: can't find module file %s\n"), program_name, - list->name); - - } - list = list->next; + /* Find this name in the archive. */ + bfd *member = obfd->archive_head; + int found = 0; + + while (member && !found) + { + if (FILENAME_CMP (member->filename, list->name) == 0) + { + extract_file (member); + found = 1; + } + + member = member->next; + } + + if (!found) + { + bfd_openr (list->name, 0); + fprintf (stderr, _("%s: can't find module file %s\n"), + program_name, list->name); + } + + list = list->next; + } } - } } diff --git a/contrib/binutils/binutils/arsup.h b/contrib/binutils/binutils/arsup.h index e875cbf..aeec258 100644 --- a/contrib/binutils/binutils/arsup.h +++ b/contrib/binutils/binutils/arsup.h @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ struct list { - char *name; + char *name; struct list *next; }; diff --git a/contrib/binutils/binutils/binemul.c b/contrib/binutils/binutils/binemul.c new file mode 100644 index 0000000..5144793 --- /dev/null +++ b/contrib/binutils/binutils/binemul.c @@ -0,0 +1,165 @@ +/* Binutils emulation layer. + Copyright (C) 2002 Free Software Foundation, Inc. + Written by Tom Rix, Redhat. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "binemul.h" + +extern bin_emulation_xfer_type bin_dummy_emulation; + +void +ar_emul_usage (fp) + FILE *fp; +{ + if (bin_dummy_emulation.ar_usage) + bin_dummy_emulation.ar_usage (fp); +} + +void +ar_emul_default_usage (fp) + FILE *fp; +{ + AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp); + /* xgettext:c-format */ + fprintf (fp, _(" No emulation specific options\n")); +} + +boolean +ar_emul_append (after_bfd, file_name, verbose) + bfd **after_bfd; + char *file_name; + boolean verbose; +{ + if (bin_dummy_emulation.ar_append) + return bin_dummy_emulation.ar_append (after_bfd, file_name, verbose); + + return false; +} + +boolean +ar_emul_default_append (after_bfd, file_name, verbose) + bfd **after_bfd; + char *file_name; + boolean verbose; +{ + bfd *temp; + + temp = *after_bfd; + *after_bfd = bfd_openr (file_name, NULL); + + AR_EMUL_ELEMENT_CHECK (*after_bfd, file_name); + AR_EMUL_APPEND_PRINT_VERBOSE (verbose, file_name); + + (*after_bfd)->next = temp; + + return true; +} + +boolean +ar_emul_replace (after_bfd, file_name, verbose) + bfd **after_bfd; + char *file_name; + boolean verbose; +{ + if (bin_dummy_emulation.ar_replace) + return bin_dummy_emulation.ar_replace (after_bfd, file_name, verbose); + + return false; +} + +boolean +ar_emul_default_replace (after_bfd, file_name, verbose) + bfd **after_bfd; + char *file_name; + boolean verbose; +{ + bfd *temp; + + temp = *after_bfd; + *after_bfd = bfd_openr (file_name, NULL); + + AR_EMUL_ELEMENT_CHECK (*after_bfd, file_name); + AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, file_name); + + (*after_bfd)->next = temp; + + return true; +} + +boolean +ar_emul_create (abfd_out, archive_file_name, file_name) + bfd **abfd_out; + char *archive_file_name; + char *file_name; +{ + if (bin_dummy_emulation.ar_create) + return bin_dummy_emulation.ar_create (abfd_out, archive_file_name, + file_name); + + return false; +} + +boolean +ar_emul_default_create (abfd_out, archive_file_name, file_name) + bfd **abfd_out; + char *archive_file_name; + char *file_name; +{ + char *target = NULL; + + /* Try to figure out the target to use for the archive from the + first object on the list. */ + if (file_name != NULL) + { + bfd *obj; + + obj = bfd_openr (file_name, NULL); + if (obj != NULL) + { + if (bfd_check_format (obj, bfd_object)) + target = bfd_get_target (obj); + (void) bfd_close (obj); + } + } + + /* Create an empty archive. */ + *abfd_out = bfd_openw (archive_file_name, target); + if (*abfd_out == NULL + || ! bfd_set_format (*abfd_out, bfd_archive) + || ! bfd_close (*abfd_out)) + bfd_fatal (archive_file_name); + + return true; +} + +boolean +ar_emul_parse_arg (arg) + char *arg; +{ + if (bin_dummy_emulation.ar_parse_arg) + return bin_dummy_emulation.ar_parse_arg (arg); + + return false; +} + +boolean +ar_emul_default_parse_arg (arg) + char *arg ATTRIBUTE_UNUSED; +{ + return false; +} diff --git a/contrib/binutils/binutils/binemul.h b/contrib/binutils/binutils/binemul.h new file mode 100644 index 0000000..bbcb16e --- /dev/null +++ b/contrib/binutils/binutils/binemul.h @@ -0,0 +1,64 @@ +/* Binutils emulation layer. + Copyright (C) 2002 Free Software Foundation, Inc. + Written by Tom Rix, Redhat. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef BINEMUL_H +#define BINEMUL_H + +#include "bfd.h" +#include "bucomm.h" + +extern void ar_emul_usage PARAMS ((FILE *)); +extern void ar_emul_default_usage PARAMS ((FILE *)); +extern boolean ar_emul_append PARAMS ((bfd **, char *, boolean)); +extern boolean ar_emul_default_append PARAMS ((bfd **, char *, boolean)); +extern boolean ar_emul_replace PARAMS ((bfd **, char *, boolean)); +extern boolean ar_emul_default_replace PARAMS ((bfd **, char *, boolean)); +extern boolean ar_emul_create PARAMS ((bfd **, char *, char *)); +extern boolean ar_emul_default_create PARAMS ((bfd **, char *, char *)); +extern boolean ar_emul_parse_arg PARAMS ((char *)); +extern boolean ar_emul_default_parse_arg PARAMS ((char *)); + +/* Macros for common output. */ + +#define AR_EMUL_USAGE_PRINT_OPTION_HEADER(fp) \ + /* xgettext:c-format */ \ + fprintf (fp, _(" emulation options: \n")) + +#define AR_EMUL_ELEMENT_CHECK(abfd, file_name) \ + do { if ((abfd) == (bfd *) NULL) bfd_fatal (file_name); } while (0) + +#define AR_EMUL_APPEND_PRINT_VERBOSE(verbose, file_name) \ + do { if (verbose) printf ("a - %s\n", file_name); } while (0) + +#define AR_EMUL_REPLACE_PRINT_VERBOSE(verbose, file_name) \ + do { if (verbose) printf ("r - %s\n", file_name); } while (0) + +typedef struct bin_emulation_xfer_struct +{ + /* Print out the extra options. */ + void (* ar_usage) PARAMS ((FILE *fp)); + boolean (* ar_append) PARAMS ((bfd **, char *, boolean)); + boolean (* ar_replace) PARAMS ((bfd **, char *, boolean)); + boolean (* ar_create) PARAMS ((bfd **, char *, char *)); + boolean (* ar_parse_arg) PARAMS ((char *)); +} +bin_emulation_xfer_type; + +#endif diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c index aa3080f..35112fc 100644 --- a/contrib/binutils/binutils/bucomm.c +++ b/contrib/binutils/binutils/bucomm.c @@ -1,5 +1,5 @@ /* bucomm.c -- Bin Utils COMmon code. - Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001 + Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -42,9 +42,9 @@ char *program_name; void bfd_nonfatal (string) - CONST char *string; + const char *string; { - CONST char *errmsg = bfd_errmsg (bfd_get_error ()); + const char *errmsg = bfd_errmsg (bfd_get_error ()); if (string) fprintf (stderr, "%s: %s: %s\n", program_name, string, errmsg); @@ -54,7 +54,7 @@ bfd_nonfatal (string) void bfd_fatal (string) - CONST char *string; + const char *string; { bfd_nonfatal (string); xexit (1); @@ -178,7 +178,7 @@ print_arelt_descr (file, abfd, verbose) char modebuf[11]; char timebuf[40]; time_t when = buf.st_mtime; - CONST char *ctime_result = (CONST char *) ctime (&when); + const char *ctime_result = (const char *) ctime (&when); /* POSIX format: skip weekday and seconds from ctime output. */ sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20); @@ -257,7 +257,7 @@ parse_vma (s, arg) const char *end; ret = bfd_scan_vma (s, &end, 0); - + if (*end != '\0') fatal (_("%s: bad number: %s"), arg, s); diff --git a/contrib/binutils/binutils/budemang.c b/contrib/binutils/binutils/budemang.c new file mode 100644 index 0000000..3f8d385 --- /dev/null +++ b/contrib/binutils/binutils/budemang.c @@ -0,0 +1,77 @@ +/* demangle.c -- A wrapper calling libiberty cplus_demangle + Copyright 2002 Free Software Foundation, Inc. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#include "config.h" +#include <stdlib.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif +#include "bfd.h" +#include "libiberty.h" +#include "demangle.h" +#include "budemang.h" + +/* Wrapper around cplus_demangle. Strips leading underscores and + other such chars that would otherwise confuse the demangler. */ + +char * +demangle (abfd, name) + bfd *abfd; + const char *name; +{ + char *res; + const char *p; + + if (abfd != NULL && bfd_get_symbol_leading_char (abfd) == 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); +} diff --git a/contrib/binutils/binutils/budemang.h b/contrib/binutils/binutils/budemang.h new file mode 100644 index 0000000..60a3c2d --- /dev/null +++ b/contrib/binutils/binutils/budemang.h @@ -0,0 +1,25 @@ +/* demangle.h -- A wrapper calling libiberty cplus_demangle + Copyright 2002 Free Software Foundation, Inc. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ +#ifndef BUDEMANG_H +#define BUDEMANG_H + +char *demangle PARAMS ((bfd *, const char *)); + +#endif diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c index 065e9e1..8f538e8 100644 --- a/contrib/binutils/binutils/coffdump.c +++ b/contrib/binutils/binutils/coffdump.c @@ -23,8 +23,8 @@ This module reads a type tree generated by coffgrok and prints it out so we can test the grokker. */ -#include <bfd.h> -#include <libiberty.h> +#include "bfd.h" +#include "libiberty.h" #include "coffgrok.h" #include "bucomm.h" @@ -106,7 +106,7 @@ dump_coff_lines (p) tab (1); printf (_("#lines %d "),p->nlines); - for (i = 0; i < p->nlines; i++) + for (i = 0; i < p->nlines; i++) { printf ("(%d 0x%x)", p->lines[i], p->addresses[i]); @@ -133,7 +133,7 @@ dump_coff_type (p) switch (p->type) { case coff_secdef_type: - printf ("section definition at %x size %x\n", + printf ("section definition at %x size %x\n", p->u.asecdef.address, p->u.asecdef.size); nl (); @@ -427,14 +427,14 @@ dump_coff_section(ptr) int i; tab (1); - printf ("section %s %d %d address %x size %x number %d nrelocs %d", + printf ("section %s %d %d address %x size %x number %d nrelocs %d", ptr->name, ptr->code, ptr->data, ptr->address,ptr->size, ptr->number, ptr->nrelocs); nl (); - for (i = 0; i < ptr->nrelocs; i++) + for (i = 0; i < ptr->nrelocs; i++) { - tab (0); + tab (0); printf ("(%x %s %x)", ptr->relocs[i].offset, ptr->relocs[i].symbol->name, diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c index 0194b3f..8cab8d5 100644 --- a/contrib/binutils/binutils/coffgrok.c +++ b/contrib/binutils/binutils/coffgrok.c @@ -1,5 +1,6 @@ /* coffgrok.c - Copyright 1994, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002 + Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -25,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ */ -#include <bfd.h> -#include <libiberty.h> +#include "bfd.h" +#include "libiberty.h" #include "bucomm.h" #include "coff/internal.h" @@ -145,7 +146,7 @@ do_sections_p1 (head) if (relsize < 0) bfd_fatal (bfd_get_filename (abfd)); if (relsize == 0) - continue; + continue; relpp = (arelent **) xmalloc (relsize); relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms); if (relcount < 0) @@ -277,7 +278,7 @@ do_lines (i, name) /* These lines are for this function - so count them and stick them on */ int c = 0; /* Find the linenumber of the top of the function, since coff linenumbers - are relative to the start of the function. */ + are relative to the start of the function. */ int start_line = rawsyms[i + 3].u.auxent.x_sym.x_misc.x_lnsz.x_lnno; l++; @@ -605,7 +606,7 @@ doit () int i; int infile = 0; struct coff_ofile *head = - (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile)); + (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile)); ofile = head; head->source_head = 0; head->source_tail = 0; diff --git a/contrib/binutils/binutils/coffgrok.h b/contrib/binutils/binutils/coffgrok.h index be0bdef..d071d24 100644 --- a/contrib/binutils/binutils/coffgrok.h +++ b/contrib/binutils/binutils/coffgrok.h @@ -1,4 +1,4 @@ -/* coffgrok.h +/* coffgrok.h Copyright 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ int addend; }; - struct coff_section + struct coff_section { char *name; int code; @@ -82,7 +82,7 @@ struct coff_sfile /* Vector which maps where in each output section the input file has it's data */ - struct coff_isection *section; + struct coff_isection *section; }; @@ -97,7 +97,7 @@ struct coff_sfile } type; union { - struct + struct { int address; int size; @@ -147,7 +147,7 @@ struct coff_sfile }; - struct coff_line + struct coff_line { int nlines; int *lines; @@ -188,7 +188,7 @@ struct coff_sfile coff_vis_tag, coff_vis_member_of_struct, coff_vis_member_of_enum, - coff_vis_autoparam, + coff_vis_autoparam, coff_vis_regparam, } type; }; diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in index 02ec0a7..d404762 100644 --- a/contrib/binutils/binutils/config.in +++ b/contrib/binutils/binutils/config.in @@ -97,6 +97,9 @@ /* Define if you have the strchr function. */ #undef HAVE_STRCHR +/* Define if you have the strcoll function. */ +#undef HAVE_STRCOLL + /* Define if you have the utimes function. */ #undef HAVE_UTIMES diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure index 316d09b..dc23ef4 100755 --- a/contrib/binutils/binutils/configure +++ b/contrib/binutils/binutils/configure @@ -2717,7 +2717,7 @@ EOF fi -ALL_LINGUAS="fr tr ja es" +ALL_LINGUAS="fr tr ja es sv" # 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 @@ -4902,7 +4902,7 @@ EOF fi -for ac_func in sbrk utimes setmode getc_unlocked +for ac_func in sbrk utimes setmode getc_unlocked strcoll do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:4909: checking for $ac_func" >&5 @@ -5006,12 +5006,12 @@ rm -f conftest* fi echo "$ac_t""$bu_cv_have_fopen64" 1>&6 -if test $bu_cv_have_fopen64 != no; then +if test "$bu_cv_have_fopen64" != no; then cat >> confdefs.h <<\EOF #define HAVE_FOPEN64 1 EOF - if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then + if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"; then cat >> confdefs.h <<\EOF #define _LARGEFILE64_SOURCE 1 EOF @@ -5508,7 +5508,7 @@ do arm*-* | xscale-* | strongarm-* | d10v-*) OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" ;; - i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) + i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32** | i[3-6]86-*-netbsdpe*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -5574,6 +5574,26 @@ else fi +# Emulation +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi + + . ${srcdir}/configure.tgt + + EMULATION=$targ_emul + EMULATION_VECTOR=$targ_emul_vector +done + + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -5785,6 +5805,8 @@ s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g s%@BUILD_MISC@%$BUILD_MISC%g s%@OBJDUMP_DEFS@%$OBJDUMP_DEFS%g s%@UNDERSCORE@%$UNDERSCORE%g +s%@EMULATION@%$EMULATION%g +s%@EMULATION_VECTOR@%$EMULATION_VECTOR%g CEOF EOF diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in index 03ed567..f2a0482 100644 --- a/contrib/binutils/binutils/configure.in +++ b/contrib/binutils/binutils/configure.in @@ -64,7 +64,7 @@ AC_PROG_CC AC_PROG_YACC AM_PROG_LEX -ALL_LINGUAS="fr tr ja es" +ALL_LINGUAS="fr tr ja es sv" CY_GNU_GETTEXT AM_MAINTAINER_MODE @@ -100,7 +100,7 @@ AC_SUBST(DEMANGLER_NAME) AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h) AC_HEADER_SYS_WAIT AC_FUNC_ALLOCA -AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked) +AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll) # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE # needs to be defined for it @@ -115,10 +115,10 @@ bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE", bu_cv_have_fopen64=no) CPPFLAGS=$saved_CPPFLAGS])]) AC_MSG_RESULT($bu_cv_have_fopen64) -if test $bu_cv_have_fopen64 != no; then +if test "$bu_cv_have_fopen64" != no; then AC_DEFINE([HAVE_FOPEN64], 1, [Is fopen64 available?]) - if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then + if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"; then AC_DEFINE([_LARGEFILE64_SOURCE], 1, [Enable LFS]) fi @@ -249,7 +249,7 @@ changequote([,])dnl OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" ;; changequote(,)dnl - i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) + i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32** | i[3-6]86-*-netbsdpe*) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" @@ -313,6 +313,26 @@ else fi AC_SUBST(UNDERSCORE) +# Emulation +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi + + . ${srcdir}/configure.tgt + + EMULATION=$targ_emul + EMULATION_VECTOR=$targ_emul_vector +done + +AC_SUBST(EMULATION) +AC_SUBST(EMULATION_VECTOR) + AC_OUTPUT(Makefile doc/Makefile po/Makefile.in:po/Make-in, [ case "x$CONFIG_FILES" in diff --git a/contrib/binutils/binutils/configure.tgt b/contrib/binutils/binutils/configure.tgt new file mode 100644 index 0000000..2d5ce2b --- /dev/null +++ b/contrib/binutils/binutils/configure.tgt @@ -0,0 +1,26 @@ +# This is the binutils target specific file. This is invoked by the +# autoconf generated configure script. Putting it in a separate shell +# file lets us skip running autoconf when modifying target specific +# information. + +# This file switches on the shell variable ${targ}, and sets the +# following shell variables: +# targ_emul name of emulation to use +# targ_emul_vector name of vector to use + +case "${targ}" in + powerpc-*-aix5* | rs6000-*-aix5*) + targ_emul=aix + targ_emul_vector=bin_aix5_emulation + ;; + + powerpc-*-aix4.3* | rs6000-*-aix4.3*) + targ_emul=aix + targ_emul_vector=bin_aix_emulation + ;; + + *) + targ_emul=vanilla + targ_emul_vector=bin_vanilla_emulation + ;; +esac diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c index ffdc766..3ce609b 100644 --- a/contrib/binutils/binutils/debug.c +++ b/contrib/binutils/binutils/debug.c @@ -1,5 +1,5 @@ /* debug.c -- Handle generic debugging information. - Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com>. This file is part of GNU Binutils. @@ -1149,7 +1149,7 @@ debug_record_label (handle, name, type, addr) bfd_vma addr ATTRIBUTE_UNUSED; { /* FIXME. */ - debug_error (_("debug_record_label not implemented")); + debug_error (_("debug_record_label: not implemented")); return false; } @@ -1211,12 +1211,11 @@ debug_record_variable (handle, name, type, kind, val) n->u.variable = v; - return true; + return true; } /* Make a type with a given kind and size. */ -/*ARGSUSED*/ static struct debug_type * debug_make_type (info, kind, size) struct debug_handle *info ATTRIBUTE_UNUSED; @@ -1778,7 +1777,6 @@ debug_make_undefined_tagged_type (handle, name, kind) The fourth argument is whether this is a virtual class. The fifth argument is the visibility of the base class. */ -/*ARGSUSED*/ debug_baseclass debug_make_baseclass (handle, type, bitpos, virtual, visibility) PTR handle ATTRIBUTE_UNUSED; @@ -1786,7 +1784,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility) bfd_vma bitpos; boolean virtual; enum debug_visibility visibility; -{ +{ struct debug_baseclass *b; b = (struct debug_baseclass *) xmalloc (sizeof *b); @@ -1806,7 +1804,6 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility) the field (it may be zero). The sixth argument is the visibility of the field. */ -/*ARGSUSED*/ debug_field debug_make_field (handle, name, type, bitpos, bitsize, visibility) PTR handle ATTRIBUTE_UNUSED; @@ -1837,7 +1834,6 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility) global variable). The fifth argument is the visibility of the member. */ -/*ARGSUSED*/ debug_field debug_make_static_member (handle, name, type, physname, visibility) PTR handle ATTRIBUTE_UNUSED; @@ -1863,7 +1859,6 @@ debug_make_static_member (handle, name, type, physname, visibility) /* Make a method. The second argument is the name, and the third argument is a NULL terminated array of method variants. */ -/*ARGSUSED*/ debug_method debug_make_method (handle, name, variants) PTR handle ATTRIBUTE_UNUSED; @@ -1890,7 +1885,6 @@ debug_make_method (handle, name, variants) function context. FIXME: Are the const and volatile arguments necessary? Could we just use debug_make_const_type? */ -/*ARGSUSED*/ debug_method_variant debug_make_method_variant (handle, physname, type, visibility, constp, volatilep, voffset, context) @@ -2055,7 +2049,6 @@ debug_tag_type (handle, name, type) /* Record the size of a given type. */ -/*ARGSUSED*/ boolean debug_record_type_size (handle, type, size) PTR handle ATTRIBUTE_UNUSED; @@ -2123,7 +2116,7 @@ debug_find_named_type (handle, name) } } - return DEBUG_TYPE_NULL; + return DEBUG_TYPE_NULL; } /* Find a tagged type. */ @@ -2304,7 +2297,7 @@ debug_get_return_type (handle, type) case DEBUG_KIND_METHOD: return type->u.kmethod->return_type; } - /*NOTREACHED*/ + /*NOTREACHED*/ } /* Get the parameter types of a function or method type (except that @@ -2391,7 +2384,6 @@ debug_get_fields (handle, type) /* Get the type of a field. */ -/*ARGSUSED*/ debug_type debug_get_field_type (handle, field) PTR handle ATTRIBUTE_UNUSED; @@ -2404,7 +2396,6 @@ debug_get_field_type (handle, field) /* Get the name of a field. */ -/*ARGSUSED*/ const char * debug_get_field_name (handle, field) PTR handle ATTRIBUTE_UNUSED; @@ -2417,7 +2408,6 @@ debug_get_field_name (handle, field) /* Get the bit position of a field. */ -/*ARGSUSED*/ bfd_vma debug_get_field_bitpos (handle, field) PTR handle ATTRIBUTE_UNUSED; @@ -2430,7 +2420,6 @@ debug_get_field_bitpos (handle, field) /* Get the bit size of a field. */ -/*ARGSUSED*/ bfd_vma debug_get_field_bitsize (handle, field) PTR handle ATTRIBUTE_UNUSED; @@ -2443,7 +2432,6 @@ debug_get_field_bitsize (handle, field) /* Get the visibility of a field. */ -/*ARGSUSED*/ enum debug_visibility debug_get_field_visibility (handle, field) PTR handle ATTRIBUTE_UNUSED; @@ -3314,7 +3302,7 @@ debug_type_samep (info, t1, t2) case DEBUG_KIND_POINTER: ret = debug_type_samep (info, t1->u.kpointer, t2->u.kpointer); break; - + case DEBUG_KIND_FUNCTION: if (t1->u.kfunction->varargs != t2->u.kfunction->varargs || ! debug_type_samep (info, t1->u.kfunction->return_type, diff --git a/contrib/binutils/binutils/debug.h b/contrib/binutils/binutils/debug.h index d60285d..c439be3 100644 --- a/contrib/binutils/binutils/debug.h +++ b/contrib/binutils/binutils/debug.h @@ -310,7 +310,7 @@ struct debug_write_fns visibility. The type must be popped off the type stack. */ boolean (*class_static_member) PARAMS ((PTR, const char *, const char *, enum debug_visibility)); - + /* Add a baseclass to the class currently being built. The type of the baseclass must be popped off the type stack. The arguments are the bit position, whether the class is virtual, and the diff --git a/contrib/binutils/binutils/defparse.c b/contrib/binutils/binutils/defparse.c index 840ef9d..f51ee33 100644 --- a/contrib/binutils/binutils/defparse.c +++ b/contrib/binutils/binutils/defparse.c @@ -1,5 +1,5 @@ /* A Bison parser, made from defparse.y - by GNU bison 1.33. */ + by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ @@ -63,6 +63,7 @@ typedef union { int number; } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 @@ -177,7 +178,7 @@ static const char *const yytname[] = "implist", "impline", "seclist", "secline", "attr_list", "opt_comma", "opt_number", "attr", "opt_CONSTANT", "opt_NONAME", "opt_DATA", "opt_name", "opt_ordinal", "opt_equal_name", "opt_base", "option_list", - "option", NULL + "option", 0 }; #endif @@ -323,12 +324,6 @@ static const short yycheck[] = define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -#ifdef __cplusplus -# define YYSTD(x) std::x -#else -# define YYSTD(x) x -#endif - #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -351,18 +346,19 @@ static const short yycheck[] = /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else -# ifdef __cplusplus -# include <cstdlib> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif -# define YYSTACK_ALLOC YYSTD (malloc) -# define YYSTACK_FREE YYSTD (free) +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free # endif +#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -389,24 +385,41 @@ union yyalloc + YYSTACK_GAP_MAX) # endif -/* Relocate the TYPE STACK from its old location to the new one. The +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Type, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - yymemcpy ((char *) yyptr, (char *) (Stack), \ - yysize * (YYSIZE_T) sizeof (Type)); \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ +#endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -416,14 +429,9 @@ union yyalloc # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) -# ifdef __cplusplus -# include <cstddef> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T std::size_t -# else -# ifdef __STDC__ -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) @@ -502,12 +510,8 @@ while (0) #if YYDEBUG # ifndef YYFPRINTF -# ifdef __cplusplus -# include <cstdio> /* INFRINGES ON USER NAME SPACE */ -# else -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYFPRINTF YYSTD (fprintf) +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ @@ -515,10 +519,8 @@ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) -/* Nonzero means print parse trace. [The following comment makes no - sense to me. Could someone clarify it? --akim] Since this is - uninitialized, it does not stop multiple parsers from coexisting. - */ +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) @@ -544,33 +546,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif -#if ! defined (yyoverflow) && ! defined (yymemcpy) -# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -# define yymemcpy __builtin_memcpy -# else /* not GNU C or C++ */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -# if defined (__STDC__) || defined (__cplusplus) -yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) -# else -yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; -# endif -{ - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; -} -# endif -#endif - #ifdef YYERROR_VERBOSE # ifndef yystrlen @@ -623,7 +598,7 @@ yystpcpy (yydest, yysrc) # endif #endif -#line 341 "/usr/share/bison/bison.simple" +#line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed @@ -633,13 +608,13 @@ yystpcpy (yydest, yysrc) to the proper pointer type. */ #ifdef YYPARSE_PARAM -# ifdef __cplusplus +# if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL -# else /* !__cplusplus */ +# else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif /* !__cplusplus */ +# endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL @@ -813,6 +788,9 @@ yyparse (YYPARSE_PARAM_ARG) yyvs = yyvs1; } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; @@ -826,15 +804,16 @@ yyparse (YYPARSE_PARAM_ARG) (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; - YYSTACK_RELOCATE (short, yyss); - YYSTACK_RELOCATE (YYSTYPE, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED - YYSTACK_RELOCATE (YYLTYPE, yyls); + YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } +# endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; @@ -1198,7 +1177,7 @@ case 59: break; } -#line 727 "/usr/share/bison/bison.simple" +#line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; diff --git a/contrib/binutils/binutils/defparse.h b/contrib/binutils/binutils/defparse.h index 73d19b0..ee14652 100644 --- a/contrib/binutils/binutils/defparse.h +++ b/contrib/binutils/binutils/defparse.h @@ -7,6 +7,7 @@ typedef union { int number; } yystype; # define YYSTYPE yystype +# define YYSTYPE_IS_TRIVIAL 1 #endif # define NAME 257 # define LIBRARY 258 diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c index 6864d22..9a1afbc 100644 --- a/contrib/binutils/binutils/dlltool.c +++ b/contrib/binutils/binutils/dlltool.c @@ -115,7 +115,7 @@ asm (".section .drectve"); asm (".ascii \"-export:cdef\""); asm (".ascii \"-export:ddef\""); - + void cdef (char * s) { printf ("hello from the dll %s\n", s); @@ -162,15 +162,15 @@ # Run this tool over the DLL's .def file and generate an exports # file (thedll.o) and an imports file (thedll.a). # (You may have to use -S to tell dlltool where to find the assembler). - + dlltool --def thedll.def --output-exp thedll.o --output-lib thedll.a # Build the dll with the library and the export table - + ld -o thedll.dll thedll.o thedll.in # Link the executable with the import library - + gcc -o themain.exe themain.o thedll.a This example can be extended if relocations are needed in the DLL: @@ -180,21 +180,21 @@ gcc -c file1.c file2.c themain.c # Run this tool over the DLL's .def file and generate an imports file. - + dlltool --def thedll.def --output-lib thedll.lib # Link the executable with the import library and generate a base file # at the same time - + gcc -o themain.exe themain.o thedll.lib -Wl,--base-file -Wl,themain.base # Run this tool over the DLL's .def file and generate an exports file # which includes the relocations from the base file. - + dlltool --def thedll.def --base-file themain.base --output-exp thedll.exp # Build the dll with file1.o, file2.o and the export table - + ld -o thedll.dll thedll.exp file1.o file2.o */ @@ -277,7 +277,7 @@ static char *deduce_name PARAMS ((const char *)); static void mcore_elf_cache_filename (char *); static void mcore_elf_gen_out_file (void); #endif - + #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #else /* ! HAVE_SYS_WAIT_H */ @@ -372,7 +372,7 @@ static boolean do_default_excludes=true; /* Default symbols to exclude when exporting all the symbols. */ static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr"; -/* True if we should add __imp_<SYMBOL> to import libraries for backward +/* True if we should add __imp_<SYMBOL> to import libraries for backward compatibility to old Cygwin releases. */ static boolean create_compat_implib; @@ -437,7 +437,7 @@ static char * mcore_elf_linker_flags = NULL; #define TMP_TAIL_O "dt.o" #define TMP_STUB "ds" -/* This bit of assemly does jmp * .... */ +/* This bit of assemly does jmp * .... */ static const unsigned char i386_jtab[] = { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90 @@ -472,26 +472,26 @@ static const unsigned char thumb_jtab[] = static const unsigned char mcore_be_jtab[] = { 0x71, 0x02, /* lrw r1,2 */ - 0x81, 0x01, /* ld.w r1,(r1,0) */ + 0x81, 0x01, /* ld.w r1,(r1,0) */ 0x00, 0xC1, /* jmp r1 */ 0x12, 0x00, /* nop */ - 0x00, 0x00, 0x00, 0x00 /* <address> */ + 0x00, 0x00, 0x00, 0x00 /* <address> */ }; static const unsigned char mcore_le_jtab[] = { 0x02, 0x71, /* lrw r1,2 */ - 0x01, 0x81, /* ld.w r1,(r1,0) */ + 0x01, 0x81, /* ld.w r1,(r1,0) */ 0xC1, 0x00, /* jmp r1 */ 0x00, 0x12, /* nop */ - 0x00, 0x00, 0x00, 0x00 /* <address> */ + 0x00, 0x00, 0x00, 0x00 /* <address> */ }; /* This is the glue sequence for PowerPC PE. There is a */ -/* tocrel16-tocdefn reloc against the first instruction. */ +/* tocrel16-tocdefn reloc against the first instruction. */ /* We also need a IMGLUE reloc against the glue function */ /* to restore the toc saved by the third instruction in */ -/* the glue. */ +/* the glue. */ static const unsigned char ppc_jtab[] = { 0x00, 0x00, 0x62, 0x81, /* lwz r11,0(r2) */ @@ -646,7 +646,7 @@ typedef struct export export_type; /* A list of symbols which we should not export. */ - + struct string_list { struct string_list *next; @@ -817,7 +817,7 @@ process_def_file (name) const char *name; { FILE *f = fopen (name, FOPEN_RT); - + if (!f) /* xgettext:c-format */ fatal (_("Can't open def file: %s"), name); @@ -826,7 +826,7 @@ process_def_file (name) /* xgettext:c-format */ inform (_("Processing def file: %s"), name); - + yyparse (); inform (_("Processed def file")); @@ -856,7 +856,7 @@ yyerror (err) { /* xgettext:c-format */ non_fatal (_("Syntax error in def file %s:%d"), def_file, linenumber); - + return 0; } @@ -880,8 +880,8 @@ def_exports (name, internal_name, ordinal, noname, constant, data) p->next = d_exports; d_exports = p; d_nfuncs++; - - if ((internal_name != NULL) + + if ((internal_name != NULL) && (strchr (internal_name, '.') != NULL)) p->forward = ++d_nforwards; else @@ -895,10 +895,10 @@ def_name (name, base) { /* xgettext:c-format */ inform (_("NAME: %s base: %x"), name, base); - + if (d_is_dll) non_fatal (_("Can't have LIBRARY and NAME")); - + d_name = name; /* if --dllname not provided, use the one in the DEF file. FIXME: Is this appropriate for executables? */ @@ -914,12 +914,12 @@ def_library (name, base) { /* xgettext:c-format */ inform (_("LIBRARY: %s base: %x"), name, base); - + if (d_is_exe) non_fatal (_("Can't have LIBRARY and NAME")); - + d_name = name; - /* if --dllname not provided, use the one in the DEF file. */ + /* if --dllname not provided, use the one in the DEF file. */ if (! dll_name) dll_name = xstrdup (name); d_is_dll = 1; @@ -1061,7 +1061,7 @@ def_import (app_name, module, dllext, entry, ord_val) else application_name = ""; } - + if (dllext != NULL) { buf = (char *) alloca (strlen (module) + strlen (dllext) + 2); @@ -1162,12 +1162,12 @@ run (what, args) if (pid == -1) { inform (strerror (errno)); - + fatal (errmsg_fmt, errmsg_arg); } pid = pwait (pid, & wait_status, 0); - + if (pid == -1) { /* xgettext:c-format */ @@ -1204,15 +1204,15 @@ scan_drectve_symbols (abfd) /* Look for .drectve's */ s = bfd_get_section_by_name (abfd, DRECTVE_SECTION_NAME); - + if (s == NULL) return; - + size = bfd_get_section_size_before_reloc (s); buf = xmalloc (size); bfd_get_section_contents (abfd, s, buf, 0, size); - + /* xgettext:c-format */ inform (_("Sucking in info from %s section in %s"), DRECTVE_SECTION_NAME, bfd_get_filename (abfd)); @@ -1230,7 +1230,7 @@ scan_drectve_symbols (abfd) char * name; char * c; flagword flags = BSF_FUNCTION; - + p += 8; name = p; while (p < e && *p != ',' && *p != ' ' && *p != '-') @@ -1238,7 +1238,7 @@ scan_drectve_symbols (abfd) c = xmalloc (p - name + 1); memcpy (c, name, p - name); c[p - name] = 0; - if (p < e && *p == ',') /* found type tag. */ + if (p < e && *p == ',') /* found type tag. */ { char *tag_start = ++p; while (p < e && *p != ' ' && *p != '-') @@ -1307,7 +1307,7 @@ scan_filtered_symbols (abfd, minisyms, symcount, size) char *exported_name = xstrdup (symbol_name); char *atsym = strchr (exported_name, '@'); *atsym = '\0'; - /* Note: stdcall alias symbols can never be data. */ + /* Note: stdcall alias symbols can never be data. */ def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, 0); } } @@ -1328,7 +1328,7 @@ add_excludes (new_excludes) for (; exclude_string; exclude_string = strtok (NULL, ",:")) { struct string_list *new_exclude; - + new_exclude = ((struct string_list *) xmalloc (sizeof (struct string_list))); new_exclude->string = (char *) xmalloc (strlen (exclude_string) + 2); @@ -1400,7 +1400,7 @@ filter_symbols (abfd, minisyms, symcount, size) || (sym->flags & BSF_WEAK) != 0 || bfd_is_com_section (sym->section)) && ! bfd_is_und_section (sym->section)); - + keep = keep && ! match_exclude (sym->name); if (keep) @@ -1467,7 +1467,7 @@ scan_open_obj_file (abfd) scan_all_symbols (abfd); else scan_drectve_symbols (abfd); - + /* FIXME: we ought to read in and block out the base relocations */ /* xgettext:c-format */ @@ -1486,7 +1486,7 @@ scan_obj_file (filename) /* xgettext:c-format */ inform (_("Scanning object file %s"), filename); - + if (bfd_check_format (f, bfd_archive)) { bfd *arfile = bfd_openr_next_archived_file (f, 0); @@ -1497,7 +1497,7 @@ scan_obj_file (filename) bfd_close (arfile); arfile = bfd_openr_next_archived_file (f, arfile); } - + #ifdef DLLTOOL_MCORE_ELF if (mcore_elf_out_file) inform (_("Cannot produce mcore-elf dll from archive file: %s"), filename); @@ -1570,17 +1570,17 @@ flush_page (f, need, page_addr, on_page) ASM_LONG, (on_page * 2) + (on_page & 1) * 2 + 8, ASM_C); - + for (i = 0; i < on_page; i++) { long needed = need[i]; - + if (needed) needed = ((needed - page_addr) | 0x3000) & 0xffff; - + fprintf (f, "\t%s\t0x%lx\n", ASM_SHORT, needed); } - + /* And padding */ if (on_page & 1) fprintf (f, "\t%s\t0x%x\n", ASM_SHORT, 0 | 0x0000); @@ -1593,7 +1593,7 @@ gen_def_file () export_type *exp; inform (_("Adding exports to output file")); - + fprintf (output_def, ";"); for (i = 0; oav[i]; i++) fprintf (output_def, " %s", oav[i]); @@ -1606,7 +1606,7 @@ gen_def_file () char *res = cplus_demangle (exp->internal_name, DMGL_ANSI | DMGL_PARAMS); if (strcmp (exp->name, exp->internal_name) == 0) - { + { fprintf (output_def, "\t%s%s%s @ %d%s%s ; %s\n", quote, @@ -1617,9 +1617,9 @@ gen_def_file () exp->data ? " DATA" : "", res ? res : ""); } - else - { - char *quote1 = strchr (exp->internal_name, '.') ? "\"" : ""; + else + { + char *quote1 = strchr (exp->internal_name, '.') ? "\"" : ""; /* char *alias = */ fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s ; %s\n", quote, @@ -1634,9 +1634,9 @@ gen_def_file () res ? res : ""); } if (res) - free (res); + free (res); } - + inform (_("Added exports to output file")); } @@ -1736,14 +1736,14 @@ generate_idata_ofile (filvar) } } -/* Assemble the specified file. */ +/* Assemble the specified file. */ static void assemble_file (source, dest) const char * source; const char * dest; { char * cmd; - + cmd = (char *) alloca (strlen (ASM_SWITCHES) + strlen (as_flags) + strlen (source) + strlen (dest) + 50); @@ -1762,17 +1762,17 @@ gen_exp_file () /* xgettext:c-format */ inform (_("Generating export file: %s"), exp_name); - + f = fopen (TMP_ASM, FOPEN_WT); if (!f) /* xgettext:c-format */ fatal (_("Unable to open temporary assembler file: %s"), TMP_ASM); - + /* xgettext:c-format */ inform (_("Opened temporary file: %s"), TMP_ASM); dump_def_info (f); - + if (d_exports) { fprintf (f, "\t.section .edata\n\n"); @@ -1871,7 +1871,7 @@ gen_exp_file () fprintf (f, "\t%s\t\"%s\"\n", ASM_TEXT, dl->text); } } - + if (d_list) { fprintf (f, "\t.section .rdata\n"); @@ -1879,7 +1879,7 @@ gen_exp_file () { char *p; int l; - + /* We don't output as ascii because there can be quote characters in the string. */ l = 0; @@ -1992,7 +1992,7 @@ gen_exp_file () if (dontdeltemps == 0) unlink (TMP_ASM); - + inform (_("Generated exports file")); } @@ -2089,7 +2089,7 @@ static sinfo secdata[NSECS] = #else /* Sections numbered to make the order the same as other PowerPC NT */ -/* compilers. This also keeps funny alignment thingies from happening. */ +/* compilers. This also keeps funny alignment thingies from happening. */ #define TEXT 0 #define PDATA 1 #define RDATA 2 @@ -2248,18 +2248,18 @@ make_one_lib_file (exp, i) char * outname = xmalloc (10); int oidx = 0; - + sprintf (outname, "%s%05d.o", TMP_STUB, i); - + abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET); - + if (!abfd) /* xgettext:c-format */ fatal (_("bfd_open failed open stub file: %s"), outname); /* xgettext:c-format */ inform (_("Creating stub file: %s"), outname); - + bfd_set_format (abfd, bfd_object); bfd_set_arch_mach (abfd, HOW_BFD_ARCH, 0); @@ -2267,9 +2267,9 @@ make_one_lib_file (exp, i) if (machine == MARM_INTERWORK || machine == MTHUMB) bfd_set_private_flags (abfd, F_INTERWORK); #endif - + applicable = bfd_applicable_section_flags (abfd); - + /* First make symbols for the sections */ for (i = 0; i < NSECS; i++) { @@ -2385,7 +2385,7 @@ make_one_lib_file (exp, i) ptrs[oidx++] = toc_symbol; } #endif - + ptrs[oidx] = 0; for (i = 0; i < NSECS; i++) @@ -2406,11 +2406,11 @@ make_one_lib_file (exp, i) /* add the reloc into idata$5 */ rel = xmalloc (sizeof (arelent)); - + rpp = xmalloc (sizeof (arelent *) * 2); rpp[0] = rel; rpp[1] = 0; - + rel->address = HOW_JTAB_ROFF; rel->addend = 0; @@ -2493,7 +2493,7 @@ make_one_lib_file (exp, i) #ifdef DLLTOOL_PPC case PDATA: { - /* The .pdata section is 5 words long. */ + /* The .pdata section is 5 words long. */ /* Think of it as: */ /* struct */ /* { */ @@ -2650,7 +2650,7 @@ make_head () fatal (_("failed to open temporary head file: %s"), TMP_HEAD_S); return NULL; } - + fprintf (f, "%s IMAGE_IMPORT_DESCRIPTOR\n", ASM_C); fprintf (f, "\t.section .idata$2\n"); @@ -2682,7 +2682,7 @@ make_head () fprintf (f, "\t%s\t0\n", ASM_LONG); fprintf (f, "fthunk:\n"); } - + if (!no_idata4) { fprintf (f, "\t.section\t.idata$4\n"); @@ -2691,7 +2691,7 @@ make_head () fprintf (f, "\t.section .idata$4\n"); fprintf (f, "hname:\n"); } - + fclose (f); assemble_file (TMP_HEAD_S, TMP_HEAD_O); @@ -2709,13 +2709,13 @@ make_tail () fatal (_("failed to open temporary tail file: %s"), TMP_TAIL_S); return NULL; } - + if (!no_idata4) { fprintf (f, "\t.section .idata$4\n"); fprintf (f, "\t%s\t0\n", ASM_LONG); } - + if (!no_idata5) { fprintf (f, "\t.section .idata$5\n"); @@ -2754,7 +2754,7 @@ make_tail () fclose (f); assemble_file (TMP_TAIL_S, TMP_TAIL_O); - + return bfd_openr (TMP_TAIL_O, HOW_BFD_READ_TARGET); } @@ -2778,18 +2778,18 @@ gen_lib_file () /* xgettext:c-format */ inform (_("Creating library file: %s"), imp_name); - + bfd_set_format (outarch, bfd_archive); outarch->has_armap = 1; - /* Work out a reasonable size of things to put onto one line. */ + /* Work out a reasonable size of things to put onto one line. */ ar_head = make_head (); ar_tail = make_tail(); if (ar_head == NULL || ar_tail == NULL) return; - + for (i = 0; (exp = d_exports_lexically[i]); i++) { bfd *n = make_one_lib_file (exp, i); @@ -2805,7 +2805,7 @@ gen_lib_file () if (! bfd_set_archive_head (outarch, head)) bfd_fatal ("bfd_set_archive_head"); - + if (! bfd_close (outarch)) bfd_fatal (imp_name); @@ -2839,7 +2839,7 @@ gen_lib_file () non_fatal (_("cannot delete %s: %s"), name, strerror (errno)); } } - + inform (_("Created lib file")); } @@ -2943,11 +2943,11 @@ process_duplicates (d_export_vec) export_type *b = d_export_vec[i + 1]; more = 1; - + /* xgettext:c-format */ inform (_("Warning, ignoring duplicate EXPORT %s %d,%d"), a->name, a->ordinal, b->ordinal); - + if (a->ordinal != -1 && b->ordinal != -1) /* xgettext:c-format */ @@ -3011,14 +3011,14 @@ fill_ordinals (d_export_vec) if (lowest == -1) lowest = 1; - /* Now fill in ordinals where the user wants us to choose. */ + /* Now fill in ordinals where the user wants us to choose. */ for (i = 0; i < d_nfuncs; i++) { if (d_export_vec[i]->ordinal == -1) { register int j; - /* First try within or after any user supplied range. */ + /* First try within or after any user supplied range. */ for (j = lowest; j < size; j++) if (ptr[j] == 0) { @@ -3027,7 +3027,7 @@ fill_ordinals (d_export_vec) goto done; } - /* Then try before the range. */ + /* Then try before the range. */ for (j = lowest; j >0; j--) if (ptr[j] == 0) { @@ -3079,7 +3079,7 @@ mangle_defs () = (export_type **) xmalloc (sizeof (export_type *) * d_nfuncs); inform (_("Processing definitions")); - + for (i = 0, exp = d_exports; exp; i++, exp = exp->next) { d_export_vec[i] = exp; @@ -3115,7 +3115,7 @@ mangle_defs () if (!d_exports_lexically[i]->noname || show_allnames) d_exports_lexically[i]->hint = hint++; } - + inform (_("Processed definitions")); } @@ -3221,7 +3221,7 @@ main (ac, av) textdomain (PACKAGE); while ((c = getopt_long (ac, av, -#ifdef DLLTOOL_MCORE_ELF +#ifdef DLLTOOL_MCORE_ELF "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHhM:L:F:", #else "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHh", @@ -3304,7 +3304,7 @@ main (ac, av) break; case 'b': base_file = fopen (optarg, FOPEN_RB); - + if (!base_file) /* xgettext:c-format */ fatal (_("Unable to open base-file: %s"), optarg); @@ -3350,13 +3350,13 @@ main (ac, av) if (as_name == NULL) as_name = deduce_name ("as"); - + /* Don't use the default exclude list if we're reading only the symbols in the .drectve section. The default excludes are meant to avoid exporting DLL entry point and Cygwin32 impure_ptr. */ if (! export_all_symbols) do_default_excludes = false; - + if (do_default_excludes) set_default_excludes (); @@ -3375,10 +3375,10 @@ main (ac, av) if (exp_name) gen_exp_file (); - + if (imp_name) { - /* Make imp_name safe for use as a label. */ + /* Make imp_name safe for use as a label. */ char *p; imp_name_lab = xstrdup (imp_name); @@ -3390,15 +3390,15 @@ main (ac, av) head_label = make_label("_head_", imp_name_lab); gen_lib_file (); } - + if (output_def) gen_def_file (); - + #ifdef DLLTOOL_MCORE_ELF if (mcore_elf_out_file) mcore_elf_gen_out_file (); #endif - + return 0; } @@ -3416,10 +3416,10 @@ look_for_prog (prog_name, prefix, end_prefix) struct stat s; char *cmd; - cmd = xmalloc (strlen (prefix) - + strlen (prog_name) + cmd = xmalloc (strlen (prefix) + + strlen (prog_name) #ifdef HAVE_EXECUTABLE_SUFFIX - + strlen (EXECUTABLE_SUFFIX) + + strlen (EXECUTABLE_SUFFIX) #endif + 10); strcpy (cmd, prefix); @@ -3432,12 +3432,12 @@ look_for_prog (prog_name, prefix, end_prefix) found = (stat (cmd, &s) == 0 #ifdef HAVE_EXECUTABLE_SUFFIX - || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0 + || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0 #endif ); if (! found) - { + { /* xgettext:c-format */ inform (_("Tried file: %s"), cmd); free (cmd); @@ -3454,24 +3454,24 @@ look_for_prog (prog_name, prefix, end_prefix) /* Deduce the name of the program we are want to invoke. PROG_NAME is the basic name of the program we want to run, eg "as" or "ld". The catch is that we might want actually - run "i386-pe-as" or "ppc-pe-ld". + run "i386-pe-as" or "ppc-pe-ld". If argv[0] contains the full path, then try to find the program in the same place, with and then without a target-like prefix. Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool, - deduce_name("as") uses the following search order: + deduce_name("as") uses the following search order: /usr/local/bin/i586-cygwin32-as /usr/local/bin/as as - + If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each name, it'll try without and then with EXECUTABLE_SUFFIX. Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as" as the fallback, but rather return i586-cygwin32-as. - + Oh, and given, argv[0] = dlltool, it'll return "as". Returns a dynamically allocated string. */ @@ -3570,7 +3570,7 @@ mcore_elf_gen_out_file (void) if (mcore_elf_linker_flags != NULL) dyn_string_append (ds, mcore_elf_linker_flags); - + while (ptr->next != NULL) { dyn_string_append (ds, ptr->filename); @@ -3584,18 +3584,18 @@ mcore_elf_gen_out_file (void) if (mcore_elf_linker == NULL) mcore_elf_linker = deduce_name ("ld"); - + run (mcore_elf_linker, ds->s); dyn_string_delete (ds); - /* Step two. Create a .exp file and a .lib file from the temporary file. + /* Step two. Create a .exp file and a .lib file from the temporary file. Do this by recursively invoking dlltool....*/ ds = dyn_string_new (100); dyn_string_append (ds, "-S "); dyn_string_append (ds, as_name); - + dyn_string_append (ds, " -e "); dyn_string_append (ds, MCORE_ELF_TMP_EXP); dyn_string_append (ds, " -l "); @@ -3605,17 +3605,17 @@ mcore_elf_gen_out_file (void) if (verbose) dyn_string_append (ds, " -v"); - + if (dontdeltemps) { dyn_string_append (ds, " -n"); - + if (dontdeltemps > 1) dyn_string_append (ds, " -n"); } /* XXX - FIME: ought to check/copy other command line options as well. */ - + run (program_name, ds->s); dyn_string_delete (ds); diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c index 7c9496c..4ca5936 100644 --- a/contrib/binutils/binutils/dllwrap.c +++ b/contrib/binutils/binutils/dllwrap.c @@ -78,7 +78,7 @@ #endif /* ! HAVE_SYS_WAIT_H */ static char *driver_name = NULL; -static char *cygwin_driver_flags = +static char *cygwin_driver_flags = "-Wl,--dll -nostartfiles"; static char *mingw32_driver_flags = "-mdll"; static char *generic_driver_flags = "-Wl,--dll"; @@ -90,10 +90,10 @@ static char *dlltool_name = NULL; static char *target = TARGET; typedef enum { - UNKNOWN_TARGET, - CYGWIN_TARGET, + UNKNOWN_TARGET, + CYGWIN_TARGET, MINGW_TARGET -} +} target_type; static target_type which_target = UNKNOWN_TARGET; @@ -188,10 +188,10 @@ look_for_prog (prog_name, prefix, end_prefix) struct stat s; char *cmd; - cmd = xmalloc (strlen (prefix) - + strlen (prog_name) + cmd = xmalloc (strlen (prefix) + + strlen (prog_name) #ifdef HAVE_EXECUTABLE_SUFFIX - + strlen (EXECUTABLE_SUFFIX) + + strlen (EXECUTABLE_SUFFIX) #endif + 10); strcpy (cmd, prefix); @@ -204,12 +204,12 @@ look_for_prog (prog_name, prefix, end_prefix) found = (stat (cmd, &s) == 0 #ifdef HAVE_EXECUTABLE_SUFFIX - || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0 + || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0 #endif ); if (! found) - { + { /* xgettext:c-format */ inform (_("Tried file: %s"), cmd); free (cmd); @@ -226,24 +226,24 @@ look_for_prog (prog_name, prefix, end_prefix) /* Deduce the name of the program we are want to invoke. PROG_NAME is the basic name of the program we want to run, eg "as" or "ld". The catch is that we might want actually - run "i386-pe-as" or "ppc-pe-ld". + run "i386-pe-as" or "ppc-pe-ld". If argv[0] contains the full path, then try to find the program in the same place, with and then without a target-like prefix. Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool, - deduce_name("as") uses the following search order: + deduce_name("as") uses the following search order: /usr/local/bin/i586-cygwin32-as /usr/local/bin/as as - + If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each name, it'll try without and then with EXECUTABLE_SUFFIX. Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as" as the fallback, but rather return i586-cygwin32-as. - + Oh, and given, argv[0] = dlltool, it'll return "as". Returns a dynamically allocated string. */ @@ -310,12 +310,12 @@ delete_temp_files () warn (_("Deleting temporary base file %s"), base_file_name); } if (! dontdeltemps) - { - unlink (base_file_name); + { + unlink (base_file_name); free (base_file_name); } } - + if (delete_exp_file && exp_file_name) { if (verbose) @@ -326,9 +326,9 @@ delete_temp_files () warn (_("Deleting temporary exp file %s"), exp_file_name); } if (! dontdeltemps) - { - unlink (exp_file_name); - free (exp_file_name); + { + unlink (exp_file_name); + free (exp_file_name); } } if (delete_def_file && def_file_name) @@ -341,21 +341,21 @@ delete_temp_files () warn (_("Deleting temporary def file %s"), def_file_name); } if (! dontdeltemps) - { - unlink (def_file_name); - free (def_file_name); + { + unlink (def_file_name); + free (def_file_name); } } } -static void +static void cleanup_and_exit (status) int status; { delete_temp_files (); exit (status); } - + static int run (what, args) const char *what; @@ -398,7 +398,7 @@ run (what, args) break; *s++ = 0; if (in_quote) - s++; + s++; } argv[i++] = NULL; @@ -440,7 +440,7 @@ run (what, args) } else retcode = 1; - + return retcode; } @@ -461,7 +461,7 @@ mybasename (name) return (char *) base; } -static int +static int strhash (str) const char *str; { @@ -534,12 +534,12 @@ usage (file, status) #define OPTION_START 149 -/* GENERIC options. */ +/* GENERIC options. */ #define OPTION_QUIET (OPTION_START + 1) #define OPTION_VERBOSE (OPTION_QUIET + 1) #define OPTION_VERSION (OPTION_VERBOSE + 1) -/* DLLWRAP options. */ +/* DLLWRAP options. */ #define OPTION_DRY_RUN (OPTION_VERSION + 1) #define OPTION_DRIVER_NAME (OPTION_DRY_RUN + 1) #define OPTION_DRIVER_FLAGS (OPTION_DRIVER_NAME + 1) @@ -549,7 +549,7 @@ usage (file, status) #define OPTION_TARGET (OPTION_IMAGE_BASE + 1) #define OPTION_MNO_CYGWIN (OPTION_TARGET + 1) -/* DLLTOOL options. */ +/* DLLTOOL options. */ #define OPTION_NODELETE (OPTION_MNO_CYGWIN + 1) #define OPTION_DLLNAME (OPTION_NODELETE + 1) #define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1) @@ -572,13 +572,13 @@ usage (file, status) static const struct option long_options[] = { - /* generic options. */ + /* generic options. */ {"quiet", no_argument, NULL, 'q'}, {"verbose", no_argument, NULL, 'v'}, {"version", no_argument, NULL, OPTION_VERSION}, {"implib", required_argument, NULL, OPTION_OUTPUT_LIB}, - /* dllwrap options. */ + /* dllwrap options. */ {"dry-run", no_argument, NULL, OPTION_DRY_RUN}, {"driver-name", required_argument, NULL, OPTION_DRIVER_NAME}, {"driver-flags", required_argument, NULL, OPTION_DRIVER_FLAGS}, @@ -587,7 +587,7 @@ static const struct option long_options[] = {"image-base", required_argument, NULL, OPTION_IMAGE_BASE}, {"target", required_argument, NULL, OPTION_TARGET}, - /* dlltool options. */ + /* dlltool options. */ {"no-delete", no_argument, NULL, 'n'}, {"dllname", required_argument, NULL, OPTION_DLLNAME}, {"no-idata4", no_argument, NULL, OPTION_NO_IDATA4}, @@ -653,7 +653,7 @@ main (argc, argv) saved_argv = (char **) xmalloc (argc * sizeof (char*)); dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int)); driver_arg_indices = (int *) xmalloc (argc * sizeof (int)); - for (i = 0; i < argc; ++i) + for (i = 0; i < argc; ++i) { size_t len = strlen (argv[i]); char *arg = (char *) xmalloc (len + 1); @@ -667,11 +667,11 @@ main (argc, argv) /* We recognize dllwrap and dlltool options, and everything else is passed onto the language driver (eg., to GCC). We collect options - to dlltool and driver in dlltool_args and driver_args. */ - + to dlltool and driver in dlltool_args and driver_args. */ + opterr = 0; - while ((c = getopt_long_only (argc, argv, "nkAqve:Uho:l:L:I:", - long_options, (int *) 0)) != EOF) + while ((c = getopt_long_only (argc, argv, "nkAqve:Uho:l:L:I:", + long_options, (int *) 0)) != EOF) { int dlltool_arg; int driver_arg; @@ -682,15 +682,15 @@ main (argc, argv) single_word_option_value_pair = 0; if (c != '?') - { + { /* We recognize this option, so it has to be either dllwrap or dlltool option. Do not pass to driver unless it's one of the generic options that are passed to all the tools (such as -v) - which are dealt with later. */ + which are dealt with later. */ driver_arg = 0; } - /* deal with generic and dllwrap options first. */ + /* deal with generic and dllwrap options first. */ switch (c) { case 'h': @@ -769,34 +769,34 @@ main (argc, argv) dlltool_arg = 1; break; } - - /* Handle passing through --option=value case. */ - if (optarg - && saved_argv[optind-1][0] == '-' - && saved_argv[optind-1][1] == '-' + + /* Handle passing through --option=value case. */ + if (optarg + && saved_argv[optind-1][0] == '-' + && saved_argv[optind-1][1] == '-' && strchr (saved_argv[optind-1], '=')) single_word_option_value_pair = 1; if (dlltool_arg) - { + { dlltool_arg_indices[optind-1] = 1; if (optarg && ! single_word_option_value_pair) { dlltool_arg_indices[optind-2] = 1; - } + } } if (! driver_arg) - { + { driver_arg_indices[optind-1] = 0; if (optarg && ! single_word_option_value_pair) { driver_arg_indices[optind-2] = 0; - } + } } } - /* sanity checks. */ + /* sanity checks. */ if (! dll_name && ! dll_file_name) { warn (_("Must provide at least one of -o or --dllname options")); @@ -811,7 +811,7 @@ main (argc, argv) dll_file_name = xstrdup (dll_name); } - /* Deduce driver-name and dlltool-name from our own. */ + /* Deduce driver-name and dlltool-name from our own. */ if (driver_name == NULL) driver_name = deduce_name ("gcc"); @@ -822,24 +822,24 @@ main (argc, argv) { char *fileprefix = choose_temp_base (); def_file_name = (char *) xmalloc (strlen (fileprefix) + 5); - sprintf (def_file_name, "%s.def", - (dontdeltemps) ? mybasename (fileprefix) : fileprefix); + sprintf (def_file_name, "%s.def", + (dontdeltemps) ? mybasename (fileprefix) : fileprefix); delete_def_file = 1; free (fileprefix); delete_def_file = 1; warn (_("no export definition file provided.\n\ Creating one, but that may not be what you want")); } - - /* set the target platform. */ + + /* set the target platform. */ if (strstr (target, "cygwin")) which_target = CYGWIN_TARGET; else if (strstr (target, "mingw")) which_target = MINGW_TARGET; - else + else which_target = UNKNOWN_TARGET; - /* re-create the command lines as a string, taking care to quote stuff. */ + /* re-create the command lines as a string, taking care to quote stuff. */ dlltool_cmdline = dyn_string_new (cmdline_len); if (verbose) { @@ -851,13 +851,13 @@ Creating one, but that may not be what you want")); for (i = 1; i < argc; ++i) { if (dlltool_arg_indices[i]) - { + { char *arg = saved_argv[i]; - int quote = (strchr (arg, ' ') || strchr (arg, '\t')); - dyn_string_append_cstr (dlltool_cmdline, + int quote = (strchr (arg, ' ') || strchr (arg, '\t')); + dyn_string_append_cstr (dlltool_cmdline, (quote) ? " \"" : " "); dyn_string_append_cstr (dlltool_cmdline, arg); - dyn_string_append_cstr (dlltool_cmdline, + dyn_string_append_cstr (dlltool_cmdline, (quote) ? "\"" : ""); } } @@ -866,17 +866,17 @@ Creating one, but that may not be what you want")); if (! driver_flags || strlen (driver_flags) == 0) { switch (which_target) - { + { case CYGWIN_TARGET: - driver_flags = cygwin_driver_flags; + driver_flags = cygwin_driver_flags; break; - + case MINGW_TARGET: - driver_flags = mingw32_driver_flags; + driver_flags = mingw32_driver_flags; break; - + default: - driver_flags = generic_driver_flags; + driver_flags = generic_driver_flags; break; } } @@ -887,25 +887,25 @@ Creating one, but that may not be what you want")); if (! entry_point || strlen (entry_point) == 0) { switch (which_target) - { + { case CYGWIN_TARGET: entry_point = "__cygwin_dll_entry@12"; break; - + case MINGW_TARGET: entry_point = "_DllMainCRTStartup@12"; break; - + default: - entry_point = "_DllMain@12"; + entry_point = "_DllMain@12"; break; } } dyn_string_append_cstr (driver_cmdline, " -Wl,-e,"); dyn_string_append_cstr (driver_cmdline, entry_point); dyn_string_append_cstr (dlltool_cmdline, " --exclude-symbol="); - dyn_string_append_cstr (dlltool_cmdline, - (entry_point[0] == '_') ? entry_point+1 : entry_point); + dyn_string_append_cstr (dlltool_cmdline, + (entry_point[0] == '_') ? entry_point+1 : entry_point); if (! image_base_str || strlen (image_base_str) == 0) { @@ -926,23 +926,23 @@ Creating one, but that may not be what you want")); for (i = 1; i < argc; ++i) { if (driver_arg_indices[i]) - { + { char *arg = saved_argv[i]; - int quote = (strchr (arg, ' ') || strchr (arg, '\t')); - dyn_string_append_cstr (driver_cmdline, + int quote = (strchr (arg, ' ') || strchr (arg, '\t')); + dyn_string_append_cstr (driver_cmdline, (quote) ? " \"" : " "); dyn_string_append_cstr (driver_cmdline, arg); - dyn_string_append_cstr (driver_cmdline, + dyn_string_append_cstr (driver_cmdline, (quote) ? "\"" : ""); } } - + /* * Step pre-1. If no --def <EXPORT_DEF> is specified, then create it * and then pass it on. */ - - if (! def_file_seen) + + if (! def_file_seen) { int i; dyn_string_t step_pre1; @@ -952,8 +952,8 @@ Creating one, but that may not be what you want")); dyn_string_append_cstr (step_pre1, dlltool_cmdline->s); if (export_all) { - dyn_string_append_cstr (step_pre1, " --export-all --exclude-symbol="); - dyn_string_append_cstr (step_pre1, + dyn_string_append_cstr (step_pre1, " --export-all --exclude-symbol="); + dyn_string_append_cstr (step_pre1, "_cygwin_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12"); } dyn_string_append_cstr (step_pre1, " --output-def "); @@ -965,7 +965,7 @@ Creating one, but that may not be what you want")); { char *arg = saved_argv[i]; size_t len = strlen (arg); - if (len >= 2 && arg[len-2] == '.' + if (len >= 2 && arg[len-2] == '.' && (arg[len-1] == 'o' || arg[len-1] == 'a')) { int quote = (strchr (arg, ' ') || strchr (arg, '\t')); @@ -980,7 +980,7 @@ Creating one, but that may not be what you want")); if (run (dlltool_name, step_pre1->s)) cleanup_and_exit (1); - + dyn_string_delete (step_pre1); } @@ -994,67 +994,67 @@ Creating one, but that may not be what you want")); fprintf (stderr, _("DRIVER name : %s\n"), driver_name); fprintf (stderr, _("DRIVER options : %s\n"), driver_cmdline->s); } - + /* * Step 1. Call GCC/LD to create base relocation file. If using GCC, the * driver command line will look like the following: - * + * * % gcc -Wl,--dll --Wl,--base-file,foo.base [rest of command line] * * If the user does not specify a base name, create temporary one that * is deleted at exit. * */ - + if (! base_file_name) { char *fileprefix = choose_temp_base (); base_file_name = (char *) xmalloc (strlen (fileprefix) + 6); - sprintf (base_file_name, "%s.base", - (dontdeltemps) ? mybasename (fileprefix) : fileprefix); + sprintf (base_file_name, "%s.base", + (dontdeltemps) ? mybasename (fileprefix) : fileprefix); delete_base_file = 1; free (fileprefix); } - + { int quote; - dyn_string_t step1 = dyn_string_new (driver_cmdline->length - + strlen (base_file_name) - + 20); + dyn_string_t step1 = dyn_string_new (driver_cmdline->length + + strlen (base_file_name) + + 20); dyn_string_append_cstr (step1, "-Wl,--base-file,"); - quote = (strchr (base_file_name, ' ') - || strchr (base_file_name, '\t')); - dyn_string_append_cstr (step1, + quote = (strchr (base_file_name, ' ') + || strchr (base_file_name, '\t')); + dyn_string_append_cstr (step1, (quote) ? "\"" : ""); dyn_string_append_cstr (step1, base_file_name); - dyn_string_append_cstr (step1, + dyn_string_append_cstr (step1, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append_cstr (step1, " "); - dyn_string_append_cstr (step1, driver_cmdline->s); + dyn_string_append_cstr (step1, " "); + dyn_string_append_cstr (step1, driver_cmdline->s); } if (run (driver_name, step1->s)) cleanup_and_exit (1); - + dyn_string_delete (step1); } /* - * Step 2. generate the exp file by running dlltool. + * Step 2. generate the exp file by running dlltool. * dlltool command line will look like the following: - * + * * % dlltool -Wl,--dll --Wl,--base-file,foo.base [rest of command line] * * If the user does not specify a base name, create temporary one that * is deleted at exit. * */ - + if (! exp_file_name) { char *p = strrchr (dll_name, '.'); @@ -1065,84 +1065,84 @@ Creating one, but that may not be what you want")); strcat (exp_file_name, ".exp"); delete_exp_file = 1; } - + { int quote; - dyn_string_t step2 = dyn_string_new (dlltool_cmdline->length - + strlen (base_file_name) - + strlen (exp_file_name) + dyn_string_t step2 = dyn_string_new (dlltool_cmdline->length + + strlen (base_file_name) + + strlen (exp_file_name) + 20); dyn_string_append_cstr (step2, "--base-file "); - quote = (strchr (base_file_name, ' ') - || strchr (base_file_name, '\t')); - dyn_string_append_cstr (step2, + quote = (strchr (base_file_name, ' ') + || strchr (base_file_name, '\t')); + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); dyn_string_append_cstr (step2, base_file_name); - dyn_string_append_cstr (step2, + dyn_string_append_cstr (step2, (quote) ? "\" " : " "); dyn_string_append_cstr (step2, "--output-exp "); - quote = (strchr (exp_file_name, ' ') - || strchr (exp_file_name, '\t')); - dyn_string_append_cstr (step2, + quote = (strchr (exp_file_name, ' ') + || strchr (exp_file_name, '\t')); + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); dyn_string_append_cstr (step2, exp_file_name); - dyn_string_append_cstr (step2, + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); if (dlltool_cmdline->length) { - dyn_string_append_cstr (step2, " "); - dyn_string_append_cstr (step2, dlltool_cmdline->s); + dyn_string_append_cstr (step2, " "); + dyn_string_append_cstr (step2, dlltool_cmdline->s); } if (run (dlltool_name, step2->s)) cleanup_and_exit (1); - + dyn_string_delete (step2); } /* * Step 3. Call GCC/LD to again, adding the exp file this time. * driver command line will look like the following: - * + * * % gcc -Wl,--dll --Wl,--base-file,foo.base foo.exp [rest ...] */ { int quote; - dyn_string_t step3 = dyn_string_new (driver_cmdline->length - + strlen (exp_file_name) - + strlen (base_file_name) + dyn_string_t step3 = dyn_string_new (driver_cmdline->length + + strlen (exp_file_name) + + strlen (base_file_name) + 20); dyn_string_append_cstr (step3, "-Wl,--base-file,"); - quote = (strchr (base_file_name, ' ') - || strchr (base_file_name, '\t')); - dyn_string_append_cstr (step3, + quote = (strchr (base_file_name, ' ') + || strchr (base_file_name, '\t')); + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); dyn_string_append_cstr (step3, base_file_name); - dyn_string_append_cstr (step3, + dyn_string_append_cstr (step3, (quote) ? "\" " : " "); - quote = (strchr (exp_file_name, ' ') - || strchr (exp_file_name, '\t')); - dyn_string_append_cstr (step3, + quote = (strchr (exp_file_name, ' ') + || strchr (exp_file_name, '\t')); + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); dyn_string_append_cstr (step3, exp_file_name); - dyn_string_append_cstr (step3, + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append_cstr (step3, " "); - dyn_string_append_cstr (step3, driver_cmdline->s); + dyn_string_append_cstr (step3, " "); + dyn_string_append_cstr (step3, driver_cmdline->s); } if (run (driver_name, step3->s)) cleanup_and_exit (1); - + dyn_string_delete (step3); } @@ -1153,52 +1153,52 @@ Creating one, but that may not be what you want")); { int quote; - dyn_string_t step4 = dyn_string_new (dlltool_cmdline->length - + strlen (base_file_name) - + strlen (exp_file_name) + dyn_string_t step4 = dyn_string_new (dlltool_cmdline->length + + strlen (base_file_name) + + strlen (exp_file_name) + 20); dyn_string_append_cstr (step4, "--base-file "); - quote = (strchr (base_file_name, ' ') - || strchr (base_file_name, '\t')); - dyn_string_append_cstr (step4, + quote = (strchr (base_file_name, ' ') + || strchr (base_file_name, '\t')); + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); dyn_string_append_cstr (step4, base_file_name); - dyn_string_append_cstr (step4, + dyn_string_append_cstr (step4, (quote) ? "\" " : " "); dyn_string_append_cstr (step4, "--output-exp "); - quote = (strchr (exp_file_name, ' ') - || strchr (exp_file_name, '\t')); - dyn_string_append_cstr (step4, + quote = (strchr (exp_file_name, ' ') + || strchr (exp_file_name, '\t')); + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); dyn_string_append_cstr (step4, exp_file_name); - dyn_string_append_cstr (step4, + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); if (dlltool_cmdline->length) { - dyn_string_append_cstr (step4, " "); - dyn_string_append_cstr (step4, dlltool_cmdline->s); + dyn_string_append_cstr (step4, " "); + dyn_string_append_cstr (step4, dlltool_cmdline->s); } if (output_lib_file_name) { - dyn_string_append_cstr (step4, " --output-lib "); - dyn_string_append_cstr (step4, output_lib_file_name); + dyn_string_append_cstr (step4, " --output-lib "); + dyn_string_append_cstr (step4, output_lib_file_name); } if (run (dlltool_name, step4->s)) cleanup_and_exit (1); - + dyn_string_delete (step4); } - + /* * Step 5. Link it all together and be done with it. * driver command line will look like the following: - * + * * % gcc -Wl,--dll foo.exp [rest ...] * */ @@ -1206,26 +1206,26 @@ Creating one, but that may not be what you want")); { int quote; - dyn_string_t step5 = dyn_string_new (driver_cmdline->length - + strlen (exp_file_name) + dyn_string_t step5 = dyn_string_new (driver_cmdline->length + + strlen (exp_file_name) + 20); - quote = (strchr (exp_file_name, ' ') - || strchr (exp_file_name, '\t')); - dyn_string_append_cstr (step5, + quote = (strchr (exp_file_name, ' ') + || strchr (exp_file_name, '\t')); + dyn_string_append_cstr (step5, (quote) ? "\"" : ""); dyn_string_append_cstr (step5, exp_file_name); - dyn_string_append_cstr (step5, + dyn_string_append_cstr (step5, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append_cstr (step5, " "); - dyn_string_append_cstr (step5, driver_cmdline->s); + dyn_string_append_cstr (step5, " "); + dyn_string_append_cstr (step5, driver_cmdline->s); } if (run (driver_name, step5->s)) cleanup_and_exit (1); - + dyn_string_delete (step5); } diff --git a/contrib/binutils/binutils/doc/Makefile.in b/contrib/binutils/binutils/doc/Makefile.in index 5ac149f..eeef90f 100644 --- a/contrib/binutils/binutils/doc/Makefile.in +++ b/contrib/binutils/binutils/doc/Makefile.in @@ -81,6 +81,8 @@ DATADIRNAME = @DATADIRNAME@ DEMANGLER_NAME = @DEMANGLER_NAME@ DLLTOOL = @DLLTOOL@ DLLTOOL_DEFS = @DLLTOOL_DEFS@ +EMULATION = @EMULATION@ +EMULATION_VECTOR = @EMULATION_VECTOR@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ GCJ = @GCJ@ @@ -117,6 +119,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ YACC = @YACC@ +bfdincludedir = @bfdincludedir@ +bfdlibdir = @bfdlibdir@ l = @l@ AUTOMAKE_OPTIONS = cygnus diff --git a/contrib/binutils/binutils/doc/addr2line.1 b/contrib/binutils/binutils/doc/addr2line.1 index faa5164..f343f5d 100644 --- a/contrib/binutils/binutils/doc/addr2line.1 +++ b/contrib/binutils/binutils/doc/addr2line.1 @@ -129,14 +129,14 @@ .\" ======================================================================== .\" .IX Title "ADDR2LINE 1" -.TH ADDR2LINE 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH ADDR2LINE 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" addr2line \- convert addresses into file names and line numbers. .SH "SYNOPSIS" .IX Header "SYNOPSIS" addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] - [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR] + [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR] [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR] [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] diff --git a/contrib/binutils/binutils/doc/ar.1 b/contrib/binutils/binutils/doc/ar.1 index 21eef42..b17417c 100644 --- a/contrib/binutils/binutils/doc/ar.1 +++ b/contrib/binutils/binutils/doc/ar.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "AR 1" -.TH AR 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH AR 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" ar \- create, modify, and extract from archives diff --git a/contrib/binutils/binutils/doc/binutils.texi b/contrib/binutils/binutils/doc/binutils.texi index 807f43e..3006d9e 100644 --- a/contrib/binutils/binutils/doc/binutils.texi +++ b/contrib/binutils/binutils/doc/binutils.texi @@ -659,7 +659,8 @@ The @sc{gnu} linker @command{ld} is now described in a separate manual. @c man begin SYNOPSIS nm nm [@option{-a}|@option{--debug-syms}] [@option{-g}|@option{--extern-only}] [@option{-B}] [@option{-C}|@option{--demangle}[=@var{style}]] [@option{-D}|@option{--dynamic}] - [@option{-s}|@option{--print-armap}] [@option{-A}|@option{-o}|@option{--print-file-name}] + [@option{-S}|@option{--print-size}] [@option{-s}|@option{--print-armap}] + [@option{-A}|@option{-o}|@option{--print-file-name}] [@option{-n}|@option{-v}|@option{--numeric-sort}] [@option{-p}|@option{--no-sort}] [@option{-r}|@option{--reverse-sort}] [@option{--size-sort}] [@option{-u}|@option{--undefined-only}] [@option{-t} @var{radix}|@option{--radix=}@var{radix}] [@option{-P}|@option{--portability}] @@ -851,6 +852,10 @@ encountered. Use the POSIX.2 standard output format instead of the default format. Equivalent to @samp{-f posix}. +@item -S +@itemx --print-size +Print size of defined symbols for the @code{bsd} output format. + @item -s @itemx --print-armap @cindex symbol index, listing @@ -2221,7 +2226,7 @@ c++filt @var{option} @var{symbol} @smallexample @c man begin SYNOPSIS addr2line addr2line [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}] - [@option{-C}|@option{--demangle}[=@var{style}] + [@option{-C}|@option{--demangle}[=@var{style}]] [@option{-e} @var{filename}|@option{--exe=}@var{filename}] [@option{-f}|@option{--functions}] [@option{-s}|@option{--basename}] [@option{-H}|@option{--help}] [@option{-V}|@option{--version}] @@ -2859,7 +2864,7 @@ readelf [@option{-a}|@option{--all}] [@option{-V}|@option{--version-info}] [@option{-D}|@option{--use-dynamic}] [@option{-x} <number>|@option{--hex-dump=}<number>] - [@option{-w[liaprmfs]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]] + [@option{-w[liaprmfFso]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]] [@option{-histogram}] [@option{-v}|@option{--version}] [@option{-W}|@option{--wide}] @@ -2961,8 +2966,8 @@ symbols section. @itemx --hex-dump=<number> Displays the contents of the indicated section as a hexadecimal dump. -@item -w[liaprmfs] -@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str] +@item -w[liaprmfFso] +@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc] Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. diff --git a/contrib/binutils/binutils/doc/cxxfilt.man b/contrib/binutils/binutils/doc/cxxfilt.man index 903e029..3e95060 100644 --- a/contrib/binutils/binutils/doc/cxxfilt.man +++ b/contrib/binutils/binutils/doc/cxxfilt.man @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "C++FILT 1" -.TH C++FILT 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH C++FILT 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" cxxfilt \- Demangle \*(C+ and Java symbols. @@ -160,7 +160,7 @@ name in the output. You can use \fBc++filt\fR to decipher individual symbols: .PP .Vb 1 -\& c++filt I<symbol> +\& c++filt <symbol> .Ve If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol names from the standard input and writes the demangled names to the diff --git a/contrib/binutils/binutils/doc/dlltool.1 b/contrib/binutils/binutils/doc/dlltool.1 index f347e2a..47539b1 100644 --- a/contrib/binutils/binutils/doc/dlltool.1 +++ b/contrib/binutils/binutils/doc/dlltool.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DLLTOOL 1" -.TH DLLTOOL 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH DLLTOOL 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" dlltool \- Create files needed to build and use DLLs. diff --git a/contrib/binutils/binutils/doc/nm.1 b/contrib/binutils/binutils/doc/nm.1 index 92760ec..5702c4a 100644 --- a/contrib/binutils/binutils/doc/nm.1 +++ b/contrib/binutils/binutils/doc/nm.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "NM 1" -.TH NM 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH NM 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" nm \- list symbols from object files @@ -137,7 +137,8 @@ nm \- list symbols from object files .IX Header "SYNOPSIS" nm [\fB\-a\fR|\fB\-\-debug\-syms\fR] [\fB\-g\fR|\fB\-\-extern\-only\fR] [\fB\-B\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\-\-dynamic\fR] - [\fB\-s\fR|\fB\-\-print\-armap\fR] [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR] + [\fB\-S\fR|\fB\-\-print\-size\fR] [\fB\-s\fR|\fB\-\-print\-armap\fR] + [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR] [\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR] [\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-\-size\-sort\fR] [\fB\-u\fR|\fB\-\-undefined\-only\fR] [\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\-\-portability\fR] @@ -343,6 +344,13 @@ encountered. .PD Use the \s-1POSIX\s0.2 standard output format instead of the default format. Equivalent to \fB\-f posix\fR. +.IP "\fB\-S\fR" 4 +.IX Item "-S" +.PD 0 +.IP "\fB\-\-print\-size\fR" 4 +.IX Item "--print-size" +.PD +Print size of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format. .IP "\fB\-s\fR" 4 .IX Item "-s" .PD 0 diff --git a/contrib/binutils/binutils/doc/objcopy.1 b/contrib/binutils/binutils/doc/objcopy.1 index 44e1a44..a59a47a 100644 --- a/contrib/binutils/binutils/doc/objcopy.1 +++ b/contrib/binutils/binutils/doc/objcopy.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJCOPY 1" -.TH OBJCOPY 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH OBJCOPY 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" objcopy \- copy and translate object files diff --git a/contrib/binutils/binutils/doc/objdump.1 b/contrib/binutils/binutils/doc/objdump.1 index 8dbfefa..24d8951 100644 --- a/contrib/binutils/binutils/doc/objdump.1 +++ b/contrib/binutils/binutils/doc/objdump.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJDUMP 1" -.TH OBJDUMP 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH OBJDUMP 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" objdump \- display information from object files. diff --git a/contrib/binutils/binutils/doc/ranlib.1 b/contrib/binutils/binutils/doc/ranlib.1 index 0cdb70b..5512755 100644 --- a/contrib/binutils/binutils/doc/ranlib.1 +++ b/contrib/binutils/binutils/doc/ranlib.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANLIB 1" -.TH RANLIB 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH RANLIB 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" ranlib \- generate index to archive. diff --git a/contrib/binutils/binutils/doc/readelf.1 b/contrib/binutils/binutils/doc/readelf.1 index a0464d3..81f655d 100644 --- a/contrib/binutils/binutils/doc/readelf.1 +++ b/contrib/binutils/binutils/doc/readelf.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "READELF 1" -.TH READELF 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH READELF 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" readelf \- Displays information about \s-1ELF\s0 files. @@ -148,7 +148,7 @@ readelf [\fB\-a\fR|\fB\-\-all\fR] [\fB\-V\fR|\fB\-\-version\-info\fR] [\fB\-D\fR|\fB\-\-use\-dynamic\fR] [\fB\-x\fR <number>|\fB\-\-hex\-dump=\fR<number>] - [\fB\-w[liaprmfs]\fR|\fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]] + [\fB\-w[liaprmfFso]\fR|\fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]] [\fB\-histogram\fR] [\fB\-v\fR|\fB\-\-version\fR] [\fB\-W\fR|\fB\-\-wide\fR] @@ -274,11 +274,11 @@ symbols section. .IX Item "--hex-dump=<number>" .PD Displays the contents of the indicated section as a hexadecimal dump. -.IP "\fB\-w[liaprmfs]\fR" 4 -.IX Item "-w[liaprmfs]" +.IP "\fB\-w[liaprmfFso]\fR" 4 +.IX Item "-w[liaprmfFso]" .PD 0 -.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]\fR" 4 -.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]" +.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\fR" 4 +.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]" .PD Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch diff --git a/contrib/binutils/binutils/doc/size.1 b/contrib/binutils/binutils/doc/size.1 index 4a2b995..09a8156 100644 --- a/contrib/binutils/binutils/doc/size.1 +++ b/contrib/binutils/binutils/doc/size.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "SIZE 1" -.TH SIZE 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH SIZE 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" size \- list section sizes and total size. diff --git a/contrib/binutils/binutils/doc/strings.1 b/contrib/binutils/binutils/doc/strings.1 index e61a2eb..74d9112 100644 --- a/contrib/binutils/binutils/doc/strings.1 +++ b/contrib/binutils/binutils/doc/strings.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "STRINGS 1" -.TH STRINGS 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH STRINGS 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" strings \- print the strings of printable characters in files. diff --git a/contrib/binutils/binutils/doc/strip.1 b/contrib/binutils/binutils/doc/strip.1 index abd02fc..f8cca3b 100644 --- a/contrib/binutils/binutils/doc/strip.1 +++ b/contrib/binutils/binutils/doc/strip.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "STRIP 1" -.TH STRIP 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH STRIP 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" strip \- Discard symbols from object files. diff --git a/contrib/binutils/binutils/emul_vanilla.c b/contrib/binutils/binutils/emul_vanilla.c new file mode 100644 index 0000000..d6cfebd --- /dev/null +++ b/contrib/binutils/binutils/emul_vanilla.c @@ -0,0 +1,30 @@ +/* Binutils emulation layer. + Copyright (C) 2002 Free Software Foundation, Inc. + Written by Tom Rix, Redhat. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "binemul.h" + +struct bin_emulation_xfer_struct bin_vanilla_emulation = +{ + ar_emul_default_usage, + ar_emul_default_append, + ar_emul_default_replace, + ar_emul_default_create, + ar_emul_default_parse_arg, +}; diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c index 7f9b1b7..ca00694f 100644 --- a/contrib/binutils/binutils/filemode.c +++ b/contrib/binutils/binutils/filemode.c @@ -57,7 +57,7 @@ static void setst PARAMS ((unsigned long, char *)); 9 'x' if any user may execute, 't' if the file is "sticky" (will be retained in swap space after execution), '-' otherwise. - 'T' if the file is sticky but not executable. */ + 'T' if the file is sticky but not executable. */ #if 0 @@ -115,7 +115,7 @@ filemodestring (statp, str) #endif /* Like filemodestring, but only the relevant part of the `struct stat' - is given as an argument. */ + is given as an argument. */ void mode_string (mode, str) @@ -144,7 +144,7 @@ mode_string (mode, str) 'l' for symbolic links 's' for sockets 'p' for fifos - '-' for any other file type. */ + '-' for any other file type. */ #ifndef S_ISDIR #ifdef S_IFDIR @@ -227,7 +227,7 @@ ftypelet (bits) } /* Set the 's' and 't' flags in file attributes string CHARS, - according to the file mode BITS. */ + according to the file mode BITS. */ static void setst (bits, chars) @@ -238,7 +238,7 @@ setst (bits, chars) if (bits & S_ISUID) { if (chars[3] != 'x') - /* Set-uid, but not executable by owner. */ + /* Set-uid, but not executable by owner. */ chars[3] = 'S'; else chars[3] = 's'; @@ -248,7 +248,7 @@ setst (bits, chars) if (bits & S_ISGID) { if (chars[6] != 'x') - /* Set-gid, but not executable by group. */ + /* Set-gid, but not executable by group. */ chars[6] = 'S'; else chars[6] = 's'; @@ -258,7 +258,7 @@ setst (bits, chars) if (bits & S_ISVTX) { if (chars[9] != 'x') - /* Sticky, but not executable by others. */ + /* Sticky, but not executable by others. */ chars[9] = 'T'; else chars[9] = 't'; diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c index ad5ddc7..4735fb3 100644 --- a/contrib/binutils/binutils/ieee.c +++ b/contrib/binutils/binutils/ieee.c @@ -1,5 +1,5 @@ /* ieee.c -- Read and write IEEE-695 debugging information. - Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com>. This file is part of GNU Binutils. @@ -344,7 +344,7 @@ ieee_read_number (info, pp, pv) } /* Read a number in an IEEE file. If ppresent is not NULL, the number - need not be there. */ + need not be there. */ static boolean ieee_read_optional_number (info, pp, pv, ppresent) @@ -1036,7 +1036,7 @@ parse_ieee_bb (info, pp) case 2: /* BB2: Global type definitions. The name is supposed to be - empty, but we don't check. */ + empty, but we don't check. */ if (! debug_set_filename (info->dhandle, "*global*")) return false; info->saw_filename = true; @@ -1916,7 +1916,7 @@ parse_ieee_ty (info, pp) switch (kind) { default: - ieee_error (info, ty_start, _("unsupported qualifer")); + ieee_error (info, ty_start, _("unsupported qualifier")); return false; case 1: @@ -4102,7 +4102,6 @@ static const struct debug_write_fns ieee_fns = /* Initialize a buffer to be empty. */ -/*ARGSUSED*/ static boolean ieee_init_buffer (info, buflist) struct ieee_handle *info ATTRIBUTE_UNUSED; @@ -4143,7 +4142,6 @@ ieee_change_buffer (info, buflist) /* Append a buffer chain. */ -/*ARGSUSED*/ static boolean ieee_append_buffer (info, mainbuf, newbuf) struct ieee_handle *info ATTRIBUTE_UNUSED; @@ -5273,7 +5271,6 @@ ieee_add_bb11 (info, sec, low, high) down the file name anyhow. IEEE debugging information doesn't seem to store this information anywhere. */ -/*ARGSUSED*/ static boolean ieee_start_source (p, filename) PTR p ATTRIBUTE_UNUSED; @@ -5737,7 +5734,6 @@ ieee_range_type (p, low, high) /* Make an array type. */ -/*ARGSUSED*/ static boolean ieee_array_type (p, low, high, stringp) PTR p; @@ -6207,7 +6203,7 @@ ieee_end_struct_type (p) /* If we were ignoring this struct definition because it was a duplicate defintion, just through away whatever bytes we have - accumulated. Leave the type on the stack. */ + accumulated. Leave the type on the stack. */ if (info->type_stack->type.ignorep) return true; @@ -6761,7 +6757,7 @@ ieee_tag_type (p, name, id, kind) if (! nt->type.localp) { /* This is a duplicate of a global type, so it must be - local. */ + local. */ localp = true; } } diff --git a/contrib/binutils/binutils/is-ranlib.c b/contrib/binutils/binutils/is-ranlib.c index fde72a4..22ce3aa 100644 --- a/contrib/binutils/binutils/is-ranlib.c +++ b/contrib/binutils/binutils/is-ranlib.c @@ -1,3 +1,3 @@ -/* Linked with ar.o to flag that this program is 'ranlib' (not 'ar'). */ +/* Linked with ar.o to flag that this program is 'ranlib' (not 'ar'). */ int is_ranlib = 1; diff --git a/contrib/binutils/binutils/is-strip.c b/contrib/binutils/binutils/is-strip.c index 215341a..338245d 100644 --- a/contrib/binutils/binutils/is-strip.c +++ b/contrib/binutils/binutils/is-strip.c @@ -1,4 +1,4 @@ /* Linked with objcopy.o to flag that this program is 'strip' (not - 'objcopy'). */ + 'objcopy'). */ int is_strip = 1; diff --git a/contrib/binutils/binutils/maybe-ranlib.c b/contrib/binutils/binutils/maybe-ranlib.c index f37bc0f..dcaded3 100644 --- a/contrib/binutils/binutils/maybe-ranlib.c +++ b/contrib/binutils/binutils/maybe-ranlib.c @@ -1,4 +1,4 @@ /* Linked with ar.o to flag that this program decides at runtime - (using argv[0] if it is is 'ar' or 'ranlib'. */ + (using argv[0] if it is is 'ar' or 'ranlib'. */ int is_ranlib = -1; diff --git a/contrib/binutils/binutils/maybe-strip.c b/contrib/binutils/binutils/maybe-strip.c index 6467c99..cfcc1ba 100644 --- a/contrib/binutils/binutils/maybe-strip.c +++ b/contrib/binutils/binutils/maybe-strip.c @@ -1,4 +1,4 @@ /* Linked with objcopy.o to flag that this program decides at runtime - (using argv[0] if it is is 'strip' or 'objcopy'. */ + (using argv[0] if it is is 'strip' or 'objcopy'. */ int is_strip = -1; diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c index eb8a55f..b9689b1 100644 --- a/contrib/binutils/binutils/nm.c +++ b/contrib/binutils/binutils/nm.c @@ -1,6 +1,6 @@ /* nm.c -- Describe symbol table of a rel file. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001 + 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -23,11 +23,14 @@ #include "bfd.h" #include "progress.h" #include "bucomm.h" +#include "budemang.h" #include "getopt.h" #include "aout/stab_gnu.h" #include "aout/ranlib.h" #include "demangle.h" #include "libiberty.h" +#include "elf-bfd.h" +#include "elf/common.h" /* When sorting by size, we use this structure to hold the size and a pointer to the minisymbol. */ @@ -49,142 +52,84 @@ struct get_relocs_info asymbol **syms; }; -static void -usage PARAMS ((FILE *, int)); - -static void -set_print_radix PARAMS ((char *)); - -static void -set_output_format PARAMS ((char *)); - -static void -display_archive PARAMS ((bfd *)); - -static boolean -display_file PARAMS ((char *filename)); - -static void -display_rel_file PARAMS ((bfd * file, bfd * archive)); - -static long -filter_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int)); - -static long -sort_symbols_by_size PARAMS ((bfd *, boolean, PTR, long, unsigned int, - struct size_sym **)); - -static void -print_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int, bfd *)); - -static void -print_size_symbols PARAMS ((bfd *, boolean, struct size_sym *, long, bfd *)); - -static void -print_symname PARAMS ((const char *, const char *, bfd *)); - -static void -print_symbol PARAMS ((bfd *, asymbol *, bfd *)); - -static void -print_symdef_entry PARAMS ((bfd * abfd)); +struct extended_symbol_info +{ + symbol_info *sinfo; + bfd_vma ssize; + elf_symbol_type *elfinfo; + /* FIXME: We should add more fields for Type, Line, Section. */ +}; +#define SYM_NAME(sym) (sym->sinfo->name) +#define SYM_VALUE(sym) (sym->sinfo->value) +#define SYM_TYPE(sym) (sym->sinfo->type) +#define SYM_STAB_NAME(sym) (sym->sinfo->stab_name) +#define SYM_STAB_DESC(sym) (sym->sinfo->stab_desc) +#define SYM_STAB_OTHER(sym) (sym->sinfo->stab_other) +#define SYM_SIZE(sym) \ + (sym->elfinfo ? sym->elfinfo->internal_elf_sym.st_size: sym->ssize) + +static void usage PARAMS ((FILE *, int)); +static void set_print_radix PARAMS ((char *)); +static void set_output_format PARAMS ((char *)); +static void display_archive PARAMS ((bfd *)); +static boolean display_file PARAMS ((char *)); +static void display_rel_file PARAMS ((bfd *, bfd *)); +static long filter_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int)); +static long sort_symbols_by_size PARAMS ((bfd *, boolean, PTR, long, unsigned int, struct size_sym **)); +static void print_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int, bfd *)); +static void print_size_symbols PARAMS ((bfd *, boolean, struct size_sym *, long, bfd *)); +static void print_symname PARAMS ((const char *, const char *, bfd *)); +static void print_symbol PARAMS ((bfd *, asymbol *, bfd_vma ssize, bfd *)); +static void print_symdef_entry PARAMS ((bfd *)); /* The sorting functions. */ - -static int -numeric_forward PARAMS ((const PTR, const PTR)); - -static int -numeric_reverse PARAMS ((const PTR, const PTR)); - -static int -non_numeric_forward PARAMS ((const PTR, const PTR)); - -static int -non_numeric_reverse PARAMS ((const PTR, const PTR)); - -static int -size_forward1 PARAMS ((const PTR, const PTR)); - -static int -size_forward2 PARAMS ((const PTR, const PTR)); +static int numeric_forward PARAMS ((const PTR, const PTR)); +static int numeric_reverse PARAMS ((const PTR, const PTR)); +static int non_numeric_forward PARAMS ((const PTR, const PTR)); +static int non_numeric_reverse PARAMS ((const PTR, const PTR)); +static int size_forward1 PARAMS ((const PTR, const PTR)); +static int size_forward2 PARAMS ((const PTR, const PTR)); /* The output formatting functions. */ - -static void -print_object_filename_bsd PARAMS ((char *filename)); - -static void -print_object_filename_sysv PARAMS ((char *filename)); - -static void -print_object_filename_posix PARAMS ((char *filename)); - - -static void -print_archive_filename_bsd PARAMS ((char *filename)); - -static void -print_archive_filename_sysv PARAMS ((char *filename)); - -static void -print_archive_filename_posix PARAMS ((char *filename)); - - -static void -print_archive_member_bsd PARAMS ((char *archive, CONST char *filename)); - -static void -print_archive_member_sysv PARAMS ((char *archive, CONST char *filename)); - -static void -print_archive_member_posix PARAMS ((char *archive, CONST char *filename)); - - -static void -print_symbol_filename_bsd PARAMS ((bfd * archive_bfd, bfd * abfd)); - -static void -print_symbol_filename_sysv PARAMS ((bfd * archive_bfd, bfd * abfd)); - -static void -print_symbol_filename_posix PARAMS ((bfd * archive_bfd, bfd * abfd)); - - -static void -print_value PARAMS ((bfd *, bfd_vma)); - -static void -print_symbol_info_bsd PARAMS ((symbol_info * info, bfd * abfd)); - -static void -print_symbol_info_sysv PARAMS ((symbol_info * info, bfd * abfd)); - -static void -print_symbol_info_posix PARAMS ((symbol_info * info, bfd * abfd)); - -static void -get_relocs PARAMS ((bfd *, asection *, PTR)); +static void print_object_filename_bsd PARAMS ((char *)); +static void print_object_filename_sysv PARAMS ((char *)); +static void print_object_filename_posix PARAMS ((char *)); +static void print_archive_filename_bsd PARAMS ((char *)); +static void print_archive_filename_sysv PARAMS ((char *)); +static void print_archive_filename_posix PARAMS ((char *)); +static void print_archive_member_bsd PARAMS ((char *, const char *)); +static void print_archive_member_sysv PARAMS ((char *, const char *)); +static void print_archive_member_posix PARAMS ((char *, const char *)); +static void print_symbol_filename_bsd PARAMS ((bfd *, bfd *)); +static void print_symbol_filename_sysv PARAMS ((bfd *, bfd *)); +static void print_symbol_filename_posix PARAMS ((bfd *, bfd *)); +static void print_value PARAMS ((bfd *, bfd_vma)); +static void print_symbol_info_bsd PARAMS ((struct extended_symbol_info *, bfd *)); +static void print_symbol_info_sysv PARAMS ((struct extended_symbol_info *, bfd *)); +static void print_symbol_info_posix PARAMS ((struct extended_symbol_info *, bfd *)); +static void get_relocs PARAMS ((bfd *, asection *, PTR)); +static const char * get_symbol_type PARAMS ((unsigned int)); /* Support for different output formats. */ struct output_fns { /* Print the name of an object file given on the command line. */ - void (*print_object_filename) PARAMS ((char *filename)); + void (*print_object_filename) PARAMS ((char *)); /* Print the name of an archive file given on the command line. */ - void (*print_archive_filename) PARAMS ((char *filename)); + void (*print_archive_filename) PARAMS ((char *)); /* Print the name of an archive member file. */ - void (*print_archive_member) PARAMS ((char *archive, CONST char *filename)); + void (*print_archive_member) PARAMS ((char *, const char *)); /* Print the name of the file (and archive, if there is one) containing a symbol. */ - void (*print_symbol_filename) PARAMS ((bfd * archive_bfd, bfd * abfd)); + void (*print_symbol_filename) PARAMS ((bfd *, bfd *)); /* Print a line of information about a symbol. */ - void (*print_symbol_info) PARAMS ((symbol_info * info, bfd * abfd)); + void (*print_symbol_info) PARAMS ((struct extended_symbol_info *, bfd *)); }; + static struct output_fns formats[] = { {print_object_filename_bsd, @@ -213,23 +158,23 @@ static struct output_fns formats[] = /* The output format to use. */ static struct output_fns *format = &formats[FORMAT_DEFAULT]; - /* Command options. */ static int do_demangle = 0; /* Pretty print C++ symbol names. */ -static int external_only = 0; /* print external symbols only */ -static int defined_only = 0; /* Print defined symbols only */ -static int no_sort = 0; /* don't sort; print syms in order found */ -static int print_debug_syms = 0; /* print debugger-only symbols too */ -static int print_armap = 0; /* describe __.SYMDEF data in archive files. */ -static int reverse_sort = 0; /* sort in downward(alpha or numeric) order */ -static int sort_numerically = 0; /* sort in numeric rather than alpha order */ -static int sort_by_size = 0; /* sort by size of symbol */ -static int undefined_only = 0; /* print undefined symbols only */ -static int dynamic = 0; /* print dynamic symbols. */ -static int show_version = 0; /* show the version number */ -static int show_stats = 0; /* show statistics */ -static int line_numbers = 0; /* print line numbers for symbols */ +static int external_only = 0; /* Print external symbols only. */ +static int defined_only = 0; /* Print defined symbols only. */ +static int no_sort = 0; /* Don't sort; print syms in order found. */ +static int print_debug_syms = 0;/* Print debugger-only symbols too. */ +static int print_armap = 0; /* Describe __.SYMDEF data in archive files. */ +static int print_size = 0; /* Print size of defined symbols. */ +static int reverse_sort = 0; /* Sort in downward(alpha or numeric) order. */ +static int sort_numerically = 0;/* Sort in numeric rather than alpha order. */ +static int sort_by_size = 0; /* Sort by size of symbol. */ +static int undefined_only = 0; /* Print undefined symbols only. */ +static int dynamic = 0; /* Print dynamic symbols. */ +static int show_version = 0; /* Show the version number. */ +static int show_stats = 0; /* Show statistics. */ +static int line_numbers = 0; /* Print line numbers for symbols. */ /* When to print the names of files. Not mutually exclusive in SYSV format. */ static int filename_per_file = 0; /* Once per file, on its own line. */ @@ -279,6 +224,7 @@ static struct option long_options[] = {"portability", no_argument, 0, 'P'}, {"print-armap", no_argument, &print_armap, 1}, {"print-file-name", no_argument, 0, 'o'}, + {"print-size", no_argument, 0, 'S'}, {"radix", required_argument, 0, 't'}, {"reverse-sort", no_argument, &reverse_sort, 1}, {"size-sort", no_argument, &sort_by_size, 1}, @@ -290,7 +236,7 @@ static struct option long_options[] = {0, no_argument, 0, 0} }; -/* Some error-reporting functions */ +/* Some error-reporting functions. */ static void usage (stream, status) @@ -320,6 +266,7 @@ usage (stream, status) -p, --no-sort Do not sort the symbols\n\ -P, --portability Same as --format=posix\n\ -r, --reverse-sort Reverse the sense of the sort\n\ + -S, --print-size Print size of defined symbols\n\ -s, --print-armap Include index for symbols from archive members\n\ --size-sort Sort symbols by size\n\ -t, --radix=RADIX Use RADIX for printing symbol values\n\ @@ -409,6 +356,7 @@ main (argc, argv) #endif #if defined (HAVE_SETLOCALE) setlocale (LC_CTYPE, ""); + setlocale (LC_COLLATE, ""); #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); @@ -421,7 +369,7 @@ main (argc, argv) bfd_init (); set_default_bfd_target (); - while ((c = getopt_long (argc, argv, "aABCDef:gHhlnopPrst:uvVvX:", + while ((c = getopt_long (argc, argv, "aABCDef:gHhlnopPrSst:uvVvX:", long_options, (int *) 0)) != EOF) { switch (c) @@ -441,14 +389,14 @@ main (argc, argv) if (optarg != NULL) { enum demangling_styles style; - + style = cplus_demangle_name_to_style (optarg); - if (style == unknown_demangling) + if (style == unknown_demangling) fatal (_("unknown demangling style `%s'"), optarg); - + cplus_demangle_set_style (style); - } + } break; case 'D': dynamic = 1; @@ -484,6 +432,9 @@ main (argc, argv) case 's': print_armap = 1; break; + case 'S': + print_size = 1; + break; case 't': set_print_radix (optarg); break; @@ -552,6 +503,32 @@ main (argc, argv) return retval; } +static const char * +get_symbol_type (type) + unsigned int type; +{ + static char buff [32]; + + switch (type) + { + case STT_NOTYPE: return "NOTYPE"; + case STT_OBJECT: return "OBJECT"; + case STT_FUNC: return "FUNC"; + case STT_SECTION: return "SECTION"; + case STT_FILE: return "FILE"; + case STT_COMMON: return "COMMON"; + case STT_TLS: return "TLS"; + default: + if (type >= STT_LOPROC && type <= STT_HIPROC) + sprintf (buff, _("<processor specific>: %d"), type); + else if (type >= STT_LOOS && type <= STT_HIOS) + sprintf (buff, _("<OS specific>: %d"), type); + else + sprintf (buff, _("<unknown>: %d"), type); + return buff; + } +} + static void display_archive (file) bfd *file; @@ -580,6 +557,10 @@ display_archive (file) if (bfd_check_format_matches (arfile, bfd_object, &matching)) { + char buf[30]; + + bfd_sprintf_vma (arfile, buf, (bfd_vma) -1); + print_width = strlen (buf); (*format->print_archive_member) (bfd_get_filename (file), bfd_get_filename (arfile)); display_rel_file (arfile, file); @@ -632,6 +613,10 @@ display_file (filename) } else if (bfd_check_format_matches (file, bfd_object, &matching)) { + char buf[30]; + + bfd_sprintf_vma (file, buf, (bfd_vma) -1); + print_width = strlen (buf); (*format->print_object_filename) (filename); display_rel_file (file, NULL); } @@ -722,8 +707,23 @@ non_numeric_forward (P_x, P_y) xn = bfd_asymbol_name (x); yn = bfd_asymbol_name (y); - return ((xn == NULL) ? ((yn == NULL) ? 0 : -1) : - ((yn == NULL) ? 1 : strcmp (xn, yn))); + if (yn == NULL) + return xn != NULL; + if (xn == NULL) + return -1; + +#ifdef HAVE_STRCOLL + /* Solaris 2.5 has a bug in strcoll. + strcoll returns invalid values when confronted with empty strings. */ + if (*yn == '\0') + return *xn != '\0'; + if (*xn == '\0') + return -1; + + return strcoll (xn, yn); +#else + return strcmp (xn, yn); +#endif } static int @@ -839,10 +839,10 @@ size_forward2 (P_x, P_y) return sorters[0][reverse_sort] (x->minisym, y->minisym); } -/* Sort the symbols by size. We guess the size by assuming that the - difference between the address of a symbol and the address of the - next higher symbol is the size. FIXME: ELF actually stores a size - with each symbol. We should use it. */ +/* Sort the symbols by size. ELF provides a size but for other formats + we have to make a guess by assuming that the difference between the + address of a symbol and the address of the next higher symbol is the + size. */ static long sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp) @@ -868,7 +868,6 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp) /* Note that filter_symbols has already removed all absolute and undefined symbols. Here we remove all symbols whose size winds up as zero. */ - from = (bfd_byte *) minisyms; fromend = from + symcount * size; @@ -904,7 +903,9 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp) sec = bfd_get_section (sym); - if (bfd_is_com_section (sec)) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + sz = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + else if (bfd_is_com_section (sec)) sz = sym->value; else { @@ -950,7 +951,6 @@ display_rel_file (abfd, archive_bfd) PTR minisyms; unsigned int size; struct size_sym *symsizes; - char buf[30]; if (! dynamic) { @@ -971,9 +971,6 @@ display_rel_file (abfd, archive_bfd) return; } - bfd_sprintf_vma (abfd, buf, (bfd_vma) -1); - print_width = strlen (buf); - /* Discard the symbols we don't want to print. It's OK to do this in place; we'll free the storage anyway (after printing). */ @@ -1035,7 +1032,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size) asymbol *sym; PROGRESS (1); - + sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const PTR) from, store); if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); @@ -1089,21 +1086,11 @@ print_symname (format, name, abfd) { if (do_demangle && *name) { - char *res; + char *res = demangle (abfd, name); - /* In this mode, give a user-level view of the symbol name - even if it's not mangled; strip off any leading - underscore. */ - if (bfd_get_symbol_leading_char (abfd) == name[0]) - name++; - - res = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); - if (res) - { - printf (format, res); - free (res); - return; - } + printf (format, res); + free (res); + return; } printf (format, name); @@ -1138,13 +1125,13 @@ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd) if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); - print_symbol (abfd, sym, archive_bfd); + print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd); } } /* Print the symbols when sorting by size. */ -static void +static void print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd) bfd *abfd; boolean dynamic; @@ -1164,25 +1151,29 @@ print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd) for (; from < fromend; from++) { asymbol *sym; + bfd_vma ssize; sym = bfd_minisymbol_to_symbol (abfd, dynamic, from->minisym, store); if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); - /* Set the symbol value so that we actually display the symbol - size. */ - sym->value = from->size - bfd_section_vma (abfd, bfd_get_section (sym)); + /* For elf we have already computed the correct symbol size. */ + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + ssize = from->size; + else + ssize = from->size - bfd_section_vma (abfd, bfd_get_section (sym)); - print_symbol (abfd, sym, archive_bfd); + print_symbol (abfd, sym, ssize, archive_bfd); } } /* Print a single symbol. */ static void -print_symbol (abfd, sym, archive_bfd) +print_symbol (abfd, sym, ssize, archive_bfd) bfd *abfd; asymbol *sym; + bfd_vma ssize; bfd *archive_bfd; { PROGRESS (1); @@ -1197,9 +1188,16 @@ print_symbol (abfd, sym, archive_bfd) else { symbol_info syminfo; + struct extended_symbol_info info; bfd_get_symbol_info (abfd, sym, &syminfo); - (*format->print_symbol_info) (&syminfo, abfd); + info.sinfo = &syminfo; + info.ssize = ssize; + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + info.elfinfo = (elf_symbol_type *) sym; + else + info.elfinfo = NULL; + (*format->print_symbol_info) (&info, abfd); } if (line_numbers) @@ -1242,7 +1240,6 @@ print_symbol (abfd, sym, archive_bfd) /* For an undefined symbol, we try to find a reloc for the symbol, and print the line number of the reloc. */ - if (abfd != lineno_cache_rel_bfd && relocs != NULL) { for (i = 0; i < seccount; i++) @@ -1342,8 +1339,12 @@ print_object_filename_sysv (filename) printf (_("\n\nUndefined symbols from %s:\n\n"), filename); else printf (_("\n\nSymbols from %s:\n\n"), filename); - printf (_("\ -Name Value Class Type Size Line Section\n\n")); + if (print_width == 8) + printf (_("\ +Name Value Class Type Size Line Section\n\n")); + else + printf (_("\ +Name Value Class Type Size Line Section\n\n")); } static void @@ -1381,7 +1382,7 @@ print_archive_filename_posix (filename) static void print_archive_member_bsd (archive, filename) char *archive ATTRIBUTE_UNUSED; - CONST char *filename; + const char *filename; { if (!filename_per_symbol) printf ("\n%s:\n", filename); @@ -1390,20 +1391,24 @@ print_archive_member_bsd (archive, filename) static void print_archive_member_sysv (archive, filename) char *archive; - CONST char *filename; + const char *filename; { if (undefined_only) printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename); else printf (_("\n\nSymbols from %s[%s]:\n\n"), archive, filename); - printf (_("\ -Name Value Class Type Size Line Section\n\n")); + if (print_width == 8) + printf (_("\ +Name Value Class Type Size Line Section\n\n")); + else + printf (_("\ +Name Value Class Type Size Line Section\n\n")); } static void print_archive_member_posix (archive, filename) char *archive; - CONST char *filename; + const char *filename; { if (!filename_per_symbol) printf ("%s[%s]:\n", archive, filename); @@ -1486,66 +1491,109 @@ print_value (abfd, val) static void print_symbol_info_bsd (info, abfd) - symbol_info *info; + struct extended_symbol_info *info; bfd *abfd; { - if (bfd_is_undefined_symclass (info->type)) + if (bfd_is_undefined_symclass (SYM_TYPE (info))) { if (print_width == 16) printf (" "); printf (" "); } else - print_value (abfd, info->value); - printf (" %c", info->type); - if (info->type == '-') + { + print_value (abfd, SYM_VALUE (info)); + + if (print_size && SYM_SIZE (info)) + { + printf(" "); + print_value (abfd, SYM_SIZE (info)); + } + } + + printf (" %c", SYM_TYPE (info)); + + if (SYM_TYPE (info) == '-') { /* A stab. */ printf (" "); - printf (other_format, info->stab_other); + printf (other_format, SYM_STAB_OTHER (info)); printf (" "); - printf (desc_format, info->stab_desc); - printf (" %5s", info->stab_name); + printf (desc_format, SYM_STAB_DESC (info)); + printf (" %5s", SYM_STAB_NAME (info)); } - print_symname (" %s", info->name, abfd); + print_symname (" %s", SYM_NAME (info), abfd); } static void print_symbol_info_sysv (info, abfd) - symbol_info *info; + struct extended_symbol_info *info; bfd *abfd; { - print_symname ("%-20s|", info->name, abfd); /* Name */ - if (bfd_is_undefined_symclass (info->type)) - printf (" "); /* Value */ + print_symname ("%-20s|", SYM_NAME (info), abfd); + + if (bfd_is_undefined_symclass (SYM_TYPE (info))) + { + if (print_width == 8) + printf (" "); + else + printf (" "); + } else - print_value (abfd, info->value); - printf ("| %c |", info->type); /* Class */ - if (info->type == '-') + print_value (abfd, SYM_VALUE (info)); + + printf ("| %c |", SYM_TYPE (info)); + + if (SYM_TYPE (info) == '-') { /* A stab. */ - printf ("%18s| ", info->stab_name); /* (C) Type */ - printf (desc_format, info->stab_desc); /* Size */ - printf ("| |"); /* Line, Section */ + printf ("%18s| ", SYM_STAB_NAME (info)); /* (C) Type */ + printf (desc_format, SYM_STAB_DESC (info)); /* Size */ + printf ("| |"); /* Line, Section */ } else - printf (" | | |"); /* Type, Size, Line, Section */ + { + /* Type, Size, Line, Section */ + if (info->elfinfo) + printf ("%18s|", + get_symbol_type (ELF_ST_TYPE (info->elfinfo->internal_elf_sym.st_info))); + else + printf (" |"); + + if (SYM_SIZE (info)) + print_value (abfd, SYM_SIZE (info)); + else + { + if (print_width == 8) + printf (" "); + else + printf (" "); + } + + if (info->elfinfo) + printf("| |%s", info->elfinfo->symbol.section->name); + else + printf("| |"); + } } static void print_symbol_info_posix (info, abfd) - symbol_info *info; + struct extended_symbol_info *info; bfd *abfd; { - print_symname ("%s ", info->name, abfd); - printf ("%c ", info->type); - if (bfd_is_undefined_symclass (info->type)) + print_symname ("%s ", SYM_NAME (info), abfd); + printf ("%c ", SYM_TYPE (info)); + + if (bfd_is_undefined_symclass (SYM_TYPE (info))) printf (" "); else - print_value (abfd, info->value); - /* POSIX.2 wants the symbol size printed here, when applicable; - BFD currently doesn't provide it, so we take the easy way out by - considering it to never be applicable. */ + { + print_value (abfd, SYM_VALUE (info)); + printf (" "); + if (SYM_SIZE (info)) + print_value (abfd, SYM_SIZE (info)); + } } static void diff --git a/contrib/binutils/binutils/not-ranlib.c b/contrib/binutils/binutils/not-ranlib.c index afb9ceb..6e61331 100644 --- a/contrib/binutils/binutils/not-ranlib.c +++ b/contrib/binutils/binutils/not-ranlib.c @@ -1,3 +1,3 @@ -/* Linked with ar.o to flag that this program is 'ar' (not 'ranlib'). */ +/* Linked with ar.o to flag that this program is 'ar' (not 'ranlib'). */ int is_ranlib = 0; diff --git a/contrib/binutils/binutils/not-strip.c b/contrib/binutils/binutils/not-strip.c index 98093ce..854a669 100644 --- a/contrib/binutils/binutils/not-strip.c +++ b/contrib/binutils/binutils/not-strip.c @@ -1,4 +1,4 @@ /* Linked with objcopy.o to flag that this program is 'objcopy' (not - 'strip'). */ + 'strip'). */ int is_strip = 0; diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c index 371e337..241a2c6 100644 --- a/contrib/binutils/binutils/objcopy.c +++ b/contrib/binutils/binutils/objcopy.c @@ -32,7 +32,7 @@ /* A list of symbols to explicitly strip out, or to keep. A linked list is good enough for a small number from the command line, but this will slow things down a lot if many symbols are being - deleted. */ + deleted. */ struct symlist { @@ -97,7 +97,7 @@ static asymbol **osympp = NULL; /* Output symbols that survive stripping */ static int copy_byte = -1; static int interleave = 4; -static boolean verbose; /* Print file and target names. */ +static boolean verbose; /* Print file and target names. */ static boolean preserve_dates; /* Preserve input file timestamp. */ static int status = 0; /* Exit status. */ @@ -110,7 +110,7 @@ enum strip_action STRIP_ALL /* strip all symbols */ }; -/* Which symbols to remove. */ +/* Which symbols to remove. */ static enum strip_action strip_symbols; enum locals_action @@ -339,7 +339,7 @@ extern char *program_name; /* This flag distinguishes between strip and objcopy: 1 means this is 'strip'; 0 means this is 'objcopy'. - -1 means if we should use argv[0] to decide. */ + -1 means if we should use argv[0] to decide. */ extern int is_strip; /* The maximum length of an S record. This variable is declared in srec.c @@ -564,7 +564,7 @@ add_specific_symbol (name, list) *list = tmp_list; } -/* Add symbols listed in `filename' to strip_specific_list. */ +/* Add symbols listed in `filename' to strip_specific_list. */ #define IS_WHITESPACE(c) ((c) == ' ' || (c) == '\t') #define IS_LINE_TERMINATOR(c) ((c) == '\n' || (c) == '\r' || (c) == '\0') @@ -579,7 +579,7 @@ add_specific_symbols (filename, list) char * line; char * buffer; unsigned int line_count; - + if (stat (filename, & st) < 0) fatal (_("cannot stat: %s: %s"), filename, strerror (errno)); if (st.st_size == 0) @@ -598,7 +598,7 @@ add_specific_symbols (filename, list) buffer [st.st_size + 1] = '\0'; line_count = 1; - + for (line = buffer; * line != '\0'; line ++) { char * eol; @@ -617,7 +617,7 @@ add_specific_symbols (filename, list) ++ eol; finished = true; break; - + case '\r': * eol = '\0'; /* Cope with \r\n. */ @@ -625,18 +625,18 @@ add_specific_symbols (filename, list) ++ eol; finished = true; break; - + case 0: finished = true; break; - + case '#': /* Line comment, Terminate the line here, in case a name is present and then allow the rest of the loop to find the real end of the line. */ * eol = '\0'; break; - + default: break; } @@ -653,8 +653,8 @@ add_specific_symbols (filename, list) for (name_end = name; (! IS_WHITESPACE (* name_end)) && (! IS_LINE_TERMINATOR (* name_end)); - name_end ++) - ; + name_end ++) + ; if (! IS_LINE_TERMINATOR (* name_end)) { @@ -667,7 +667,7 @@ add_specific_symbols (filename, list) non_fatal (_("Ignoring rubbish found on line %d of %s"), line_count, filename); } - + * name_end = '\0'; if (name_end > name) @@ -797,7 +797,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount) && ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags & BSF_KEEP) != 0)) keep = 1; - else if (relocatable /* Relocatable file. */ + else if (relocatable /* Relocatable file. */ && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0) keep = 1; else if (bfd_decode_symclass (sym) == 'I') @@ -960,8 +960,8 @@ copy_object (ibfd, obfd) start = bfd_get_start_address (ibfd); start += change_start; - /* Neither the start address nor the flags - need to be set for a core file. */ + /* Neither the start address nor the flags + need to be set for a core file. */ if (bfd_get_format (obfd) != bfd_core) { if (!bfd_set_start_address (obfd, start) @@ -1088,8 +1088,8 @@ copy_object (ibfd, obfd) size + (gap_stop - gap_start))) { non_fatal (_("Can't fill gap after %s: %s"), - bfd_get_section_name (obfd, osections[i]), - bfd_errmsg (bfd_get_error ())); + bfd_get_section_name (obfd, osections[i]), + bfd_errmsg (bfd_get_error ())); status = 1; break; } @@ -1113,8 +1113,8 @@ copy_object (ibfd, obfd) pad_to - lma)) { non_fatal (_("Can't add padding to %s: %s"), - bfd_get_section_name (obfd, osections[c - 1]), - bfd_errmsg (bfd_get_error ())); + bfd_get_section_name (obfd, osections[c - 1]), + bfd_errmsg (bfd_get_error ())); status = 1; } else @@ -1363,7 +1363,7 @@ copy_archive (ibfd, obfd, output_target) if (!bfd_close (output_bfd)) { bfd_nonfatal (bfd_get_filename (output_bfd)); - /* Error in new object file. Don't change archive. */ + /* Error in new object file. Don't change archive. */ status = 1; } @@ -1493,7 +1493,7 @@ add_section_rename (old_name, new_name, flags) if (strcmp (rename->new_name, new_name) == 0 && rename->flags == flags) return; - + fatal (_("Multiple renames of section %s"), old_name); } @@ -1503,7 +1503,7 @@ add_section_rename (old_name, new_name, flags) rename->new_name = new_name; rename->flags = flags; rename->next = section_rename_list; - + section_rename_list = rename; } @@ -1553,7 +1553,7 @@ setup_section (ibfd, isection, obfdarg) flagword flags; const char *err; const char * name; - + if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0 && (strip_symbols == STRIP_DEBUG || strip_symbols == STRIP_UNNEEDED @@ -1573,7 +1573,7 @@ setup_section (ibfd, isection, obfdarg) /* Get the, possibly new, name of the output section. */ name = find_section_rename (ibfd, isection, & flags); - + osection = bfd_make_section_anyway (obfd, name); if (osection == NULL) @@ -1684,13 +1684,15 @@ copy_section (ibfd, isection, obfdarg) sec_ptr osection; bfd_size_type size; long relsize; + flagword flags; /* If we have already failed earlier on, do not keep on generating complaints now. */ if (status != 0) return; - if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0 + flags = bfd_get_section_flags (ibfd, isection); + if ((flags & SEC_DEBUGGING) != 0 && (strip_symbols == STRIP_DEBUG || strip_symbols == STRIP_UNNEEDED || strip_symbols == STRIP_ALL @@ -1698,6 +1700,9 @@ copy_section (ibfd, isection, obfdarg) || convert_debugging)) return; + if ((flags & SEC_GROUP) != 0) + return; + p = find_section_list (bfd_section_name (ibfd, isection), false); if (sections_removed && p != NULL && p->remove) @@ -1711,7 +1716,7 @@ copy_section (ibfd, isection, obfdarg) if (size == 0 || osection == 0) return; - /* Core files do not need to be relocated. */ + /* Core files do not need to be relocated. */ if (bfd_get_format (obfd) == bfd_core) relsize = 0; else @@ -1732,7 +1737,7 @@ copy_section (ibfd, isection, obfdarg) if (strip_symbols == STRIP_ALL) { /* Remove relocations which are not in - keep_strip_specific_list. */ + keep_strip_specific_list. */ arelent **temp_relpp; long temp_relcount = 0; long i; @@ -1755,7 +1760,7 @@ copy_section (ibfd, isection, obfdarg) isection->_cooked_size = isection->_raw_size; isection->reloc_done = true; - if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS + if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS && bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS) { PTR memhunk = (PTR) xmalloc ((unsigned) size); @@ -2124,9 +2129,9 @@ copy_main (argc, argv) fatal (_("byte number must be non-negative")); break; - case 'B': - binary_architecture = optarg; - break; + case 'B': + binary_architecture = optarg; + break; case 'i': interleave = atoi (optarg); @@ -2492,13 +2497,13 @@ copy_main (argc, argv) set_start_set = true; break; - case OPTION_SREC_LEN: - Chunk = parse_vma (optarg, "--srec-len"); - break; + case OPTION_SREC_LEN: + Chunk = parse_vma (optarg, "--srec-len"); + break; - case OPTION_SREC_FORCES3: + case OPTION_SREC_FORCES3: S3Forced = true; - break; + break; case OPTION_STRIP_SYMBOLS: add_specific_symbols (optarg, &strip_specific_list); @@ -2561,16 +2566,16 @@ copy_main (argc, argv) if (binary_architecture != (char *) NULL) { if (input_target && strcmp (input_target, "binary") == 0) - { - const bfd_arch_info_type * temp_arch_info; + { + const bfd_arch_info_type * temp_arch_info; temp_arch_info = bfd_scan_arch (binary_architecture); - if (temp_arch_info != NULL) - bfd_external_binary_architecture = temp_arch_info->arch; - else - fatal (_("architecture %s unknown"), binary_architecture); - } + if (temp_arch_info != NULL) + bfd_external_binary_architecture = temp_arch_info->arch; + else + fatal (_("architecture %s unknown"), binary_architecture); + } else { non_fatal (_("Warning: input target 'binary' required for binary architecture parameter.")); diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c index 535e0cd..2687b6e 100644 --- a/contrib/binutils/binutils/objdump.c +++ b/contrib/binutils/binutils/objdump.c @@ -1,6 +1,6 @@ /* objdump.c -- dump information about an object file. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -22,6 +22,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "progress.h" #include "bucomm.h" +#include "budemang.h" #include "getopt.h" #include "safe-ctype.h" #include "dis-asm.h" @@ -299,9 +300,6 @@ dump_section_header (abfd, section, ignored) PF (SEC_HAS_CONTENTS, "CONTENTS"); PF (SEC_ALLOC, "ALLOC"); PF (SEC_CONSTRUCTOR, "CONSTRUCTOR"); - PF (SEC_CONSTRUCTOR_TEXT, "CONSTRUCTOR TEXT"); - PF (SEC_CONSTRUCTOR_DATA, "CONSTRUCTOR DATA"); - PF (SEC_CONSTRUCTOR_BSS, "CONSTRUCTOR BSS"); PF (SEC_LOAD, "LOAD"); PF (SEC_RELOC, "RELOC"); PF (SEC_READONLY, "READONLY"); @@ -317,6 +315,7 @@ dump_section_header (abfd, section, ignored) PF (SEC_SMALL_DATA, "SMALL_DATA"); PF (SEC_SHARED, "SHARED"); PF (SEC_ARCH_BIT_0, "ARCH_BIT_0"); + PF (SEC_THREAD_LOCAL, "THREAD_LOCAL"); if ((section->flags & SEC_LINK_ONCE) != 0) { @@ -361,7 +360,11 @@ dump_headers (abfd) #ifndef BFD64 printf (_("Idx Name Size VMA LMA File off Algn")); #else - printf (_("Idx Name Size VMA LMA File off Algn")); + /* With BFD64, non-ELF returns -1 and wants always 64 bit addresses. */ + if (bfd_get_arch_size (abfd) == 32) + printf (_("Idx Name Size VMA LMA File off Algn")); + else + printf (_("Idx Name Size VMA LMA File off Algn")); #endif if (wide_output) @@ -388,11 +391,9 @@ slurp_symtab (abfd) storage = bfd_get_symtab_upper_bound (abfd); if (storage < 0) bfd_fatal (bfd_get_filename (abfd)); - if (storage) - { - sy = (asymbol **) xmalloc (storage); - } + sy = (asymbol **) xmalloc (storage); + symcount = bfd_canonicalize_symtab (abfd, sy); if (symcount < 0) bfd_fatal (bfd_get_filename (abfd)); @@ -422,11 +423,9 @@ slurp_dynamic_symtab (abfd) bfd_fatal (bfd_get_filename (abfd)); } - if (storage) - { - sy = (asymbol **) xmalloc (storage); - } + sy = (asymbol **) xmalloc (storage); + dynsymcount = bfd_canonicalize_dynamic_symtab (abfd, sy); if (dynsymcount < 0) bfd_fatal (bfd_get_filename (abfd)); @@ -437,7 +436,7 @@ slurp_dynamic_symtab (abfd) /* Filter out (in place) symbols that are useless for disassembly. COUNT is the number of elements in SYMBOLS. - Return the number of useful symbols. */ + Return the number of useful symbols. */ static long remove_useless_symbols (symbols, count) @@ -465,7 +464,7 @@ remove_useless_symbols (symbols, count) /* Sort symbols into value order. */ -static int +static int compare_symbols (ap, bp) const PTR ap; const PTR bp; @@ -632,29 +631,20 @@ objdump_print_symname (abfd, info, sym) { char *alloc; const char *name; - const char *print; alloc = NULL; name = bfd_asymbol_name (sym); - if (! do_demangle || name[0] == '\0') - print = name; - else + if (do_demangle && name[0] != '\0') { /* Demangle the name. */ - if (bfd_get_symbol_leading_char (abfd) == name[0]) - ++name; - - alloc = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); - if (alloc == NULL) - print = name; - else - print = alloc; + alloc = demangle (abfd, name); + name = alloc; } if (info != NULL) - (*info->fprintf_func) (info->stream, "%s", print); + (*info->fprintf_func) (info->stream, "%s", name); else - printf ("%s", print); + printf ("%s", name); if (alloc != NULL) free (alloc); @@ -682,7 +672,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place) long min = 0; long max = sorted_symcount; long thisplace; - unsigned int opb = bfd_octets_per_byte (abfd); + unsigned int opb = bfd_octets_per_byte (abfd); if (sorted_symcount < 1) return NULL; @@ -719,7 +709,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place) /* If the file is relocateable, and the symbol could be from this section, prefer a symbol from this section over symbols from others, even if the other symbol's value might be closer. - + Note that this may be wrong for some symbol references if the sections have overlapping memory ranges, but in that case there's no way to tell what's desired without looking at the relocation @@ -948,7 +938,7 @@ skip_to_line (p, line, show) if (strchr (buf, '\n') != NULL) ++p->line; } -} +} /* Show the line number, or the source line, in a dissassembly listing. */ @@ -959,8 +949,8 @@ show_line (abfd, section, addr_offset) asection *section; bfd_vma addr_offset; { - CONST char *filename; - CONST char *functionname; + const char *filename; + const char *functionname; unsigned int line; if (! with_line_numbers && ! with_source_code) @@ -1069,10 +1059,10 @@ show_line (abfd, section, addr_offset) p->next = print_files; print_files = p; - if (file_start_context) - l = 0; - else - l = line - SHOW_PRECEDING_CONTEXT_LINES; + if (file_start_context) + l = 0; + else + l = line - SHOW_PRECEDING_CONTEXT_LINES; if (l < 0) l = 0; skip_to_line (p, l, false); @@ -1167,8 +1157,8 @@ objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...)) /* Disassemble some data in memory between given values. */ static void -disassemble_bytes (info, disassemble_fn, insns, data, - start_offset, stop_offset, relppp, +disassemble_bytes (info, disassemble_fn, insns, data, + start_offset, stop_offset, relppp, relppend) struct disassemble_info *info; disassembler_ftype disassemble_fn; @@ -1237,8 +1227,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, && (info->insn_info_valid == 0 || info->branch_delay_insns == 0) && (z - addr_offset * opb >= SKIP_ZEROES - || (z == stop_offset * opb && - z - addr_offset * opb < SKIP_ZEROES_AT_END))) + || (z == stop_offset * opb && + z - addr_offset * opb < SKIP_ZEROES_AT_END))) { printf ("\t...\n"); @@ -1444,8 +1434,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, } if ((section->flags & SEC_RELOC) != 0 -#ifndef DISASSEMBLER_NEEDS_RELOCS - && dump_reloc_info +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info #endif ) { @@ -1581,7 +1571,7 @@ disassemble_data (abfd) disasm_info.mach = bfd_get_mach (abfd); disasm_info.disassembler_options = disassembler_options; disasm_info.octets_per_byte = opb; - + if (bfd_big_endian (abfd)) disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG; else if (bfd_little_endian (abfd)) @@ -1613,10 +1603,10 @@ disassemble_data (abfd) continue; if ((section->flags & SEC_RELOC) != 0 -#ifndef DISASSEMBLER_NEEDS_RELOCS +#ifndef DISASSEMBLER_NEEDS_RELOCS && dump_reloc_info #endif - ) + ) { long relsize; @@ -1690,7 +1680,7 @@ disassemble_data (abfd) asymbol *nextsym; unsigned long nextstop_offset; boolean insns; - + if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + addr_offset) { int x; @@ -1715,7 +1705,7 @@ disassemble_data (abfd) false); printf (":\n"); } - + if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset) nextsym = sym; else if (sym == NULL) @@ -1736,7 +1726,7 @@ disassemble_data (abfd) else nextsym = sorted_syms[place]; } - + if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset) { nextstop_offset = bfd_asymbol_value (sym) - section->vma; @@ -1751,7 +1741,7 @@ disassemble_data (abfd) if (nextstop_offset > stop_offset) nextstop_offset = stop_offset; } - + /* If a symbol is explicitly marked as being an object rather than a function, just dump the bytes without disassembling them. */ @@ -1767,14 +1757,14 @@ disassemble_data (abfd) insns = true; else insns = false; - - disassemble_bytes (&disasm_info, disassemble_fn, insns, data, - addr_offset, nextstop_offset, &relpp, relppend); - + + disassemble_bytes (&disasm_info, disassemble_fn, insns, data, + addr_offset, nextstop_offset, &relpp, relppend); + addr_offset = nextstop_offset; sym = nextsym; } - + free (data); if (relbuf != NULL) free (relbuf); @@ -1837,13 +1827,13 @@ read_section_stabs (abfd, stabsect_name, strsect_name) exit_status = 1; return false; } - + stab_size = bfd_section_size (abfd, stabsect); stabstr_size = bfd_section_size (abfd, stabstrsect); stabs = (bfd_byte *) xmalloc (stab_size); strtab = (char *) xmalloc (stabstr_size); - + if (! bfd_get_section_contents (abfd, stabsect, (PTR) stabs, 0, stab_size)) { non_fatal (_("Reading %s section of %s failed: %s"), @@ -1925,7 +1915,7 @@ print_section_stabs (abfd, stabsect_name, strsect_name) printf ("\n%-6d ", i); /* Either print the stab name, or, if unnamed, print its number - again (makes consistent formatting for tools like awk). */ + again (makes consistent formatting for tools like awk). */ name = bfd_get_stab_name (type); if (name != NULL) printf ("%-6s", name); @@ -2246,15 +2236,15 @@ dump_data (abfd) if (stop_offset > bfd_section_size (abfd, section) / opb) stop_offset = bfd_section_size (abfd, section) / opb; } - for (addr_offset = start_offset; - addr_offset < stop_offset; addr_offset += onaline) + for (addr_offset = start_offset; + addr_offset < stop_offset; addr_offset += onaline) { bfd_size_type j; - printf (" %04lx ", (unsigned long int) - (addr_offset + section->vma)); - for (j = addr_offset * opb; - j < addr_offset * opb + onaline; j++) + printf (" %04lx ", (unsigned long int) + (addr_offset + section->vma)); + for (j = addr_offset * opb; + j < addr_offset * opb + onaline; j++) { if (j < stop_offset * opb) printf ("%02x", (unsigned) (data[j])); @@ -2318,24 +2308,16 @@ dump_symbols (abfd, dynamic) const char *name; char *alloc; - name = bfd_asymbol_name (*current); + name = (*current)->name; alloc = NULL; if (do_demangle && name != NULL && *name != '\0') { - const char *n; - /* If we want to demangle the name, we demangle it here, and temporarily clobber it while calling bfd_print_symbol. FIXME: This is a gross hack. */ - n = name; - if (bfd_get_symbol_leading_char (cur_bfd) == *n) - ++n; - alloc = cplus_demangle (n, DMGL_ANSI | DMGL_PARAMS); - if (alloc != NULL) - (*current)->name = alloc; - else - (*current)->name = n; + alloc = demangle (cur_bfd, name); + (*current)->name = alloc; } bfd_print_symbol (cur_bfd, stdout, *current, @@ -2545,7 +2527,7 @@ dump_reloc_set (abfd, sec, relpp, relcount) } else { - if (section_name == (CONST char *) NULL) + if (section_name == (const char *) NULL) section_name = "*unknown*"; bfd_printf_vma (abfd, q->address); printf (" %-16s [%s]", @@ -2796,12 +2778,12 @@ main (argc, argv) enum demangling_styles style; style = cplus_demangle_name_to_style (optarg); - if (style == unknown_demangling) + if (style == unknown_demangling) fatal (_("unknown demangling style `%s'"), optarg); cplus_demangle_set_style (style); - } + } break; case 'w': wide_output = true; @@ -2920,7 +2902,7 @@ main (argc, argv) show_version = true; seenflag = true; break; - + default: usage (stderr, 1); } diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in index 861e0ff..1a3e585 100644 --- a/contrib/binutils/binutils/po/POTFILES.in +++ b/contrib/binutils/binutils/po/POTFILES.in @@ -2,9 +2,13 @@ addr2line.c ar.c arsup.c arsup.h +binemul.c +binemul.h bucomm.c bucomm.h budbg.h +budemang.c +budemang.h coffdump.c coffgrok.c coffgrok.h @@ -14,6 +18,8 @@ debug.h dlltool.c dlltool.h dllwrap.c +emul_aix.c +emul_vanilla.c filemode.c ieee.c ieee.c diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot index ef601f0..4442096 100644 --- a/contrib/binutils/binutils/po/binutils.pot +++ b/contrib/binutils/binutils/po/binutils.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-01-17 13:58+0000\n" +"POT-Creation-Date: 2002-07-23 15:55-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" @@ -14,183 +14,211 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: addr2line.c:73 +#: addr2line.c:74 #, c-format +msgid "Usage: %s [option(s)] [addr(s)]\n" +msgstr "" + +#: addr2line.c:75 +msgid " Convert addresses into line number/file name pairs.\n" +msgstr "" + +#: addr2line.c:76 msgid "" -"Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n" -" [-e executable] [--exe=executable] [--demangle[=style]]\n" -" [--basenames] [--functions] [addr addr ...]\n" +" If no addresses are specified on the command line, they will be read from " +"stdin\n" msgstr "" -#: addr2line.c:80 ar.c:289 nlmconv.c:1121 objcopy.c:423 objcopy.c:455 -#: readelf.c:2181 size.c:91 strings.c:655 windres.c:737 +#: addr2line.c:77 +msgid "" +" The options are:\n" +" -b --target=<bfdname> Set the binary file format\n" +" -e --exe=<executable> Set the input file name (default is a.out)\n" +" -s --basenames Strip directory names\n" +" -f --functions Show function names\n" +" -C --demangle[=style] Demangle function names\n" +" -h --help Display this information\n" +" -v --version Display the program's version\n" +"\n" +msgstr "" + +#: addr2line.c:89 ar.c:297 coffdump.c:479 nlmconv.c:1119 objcopy.c:424 +#: objcopy.c:457 readelf.c:2310 size.c:104 srconv.c:1962 strings.c:666 +#: sysdump.c:774 windres.c:733 #, c-format msgid "Report bugs to %s\n" msgstr "" -#: addr2line.c:240 +#: addr2line.c:248 #, c-format msgid "%s: can not get addresses from archive" msgstr "" -#: addr2line.c:312 nm.c:447 objdump.c:2800 +#: addr2line.c:320 nm.c:395 objdump.c:2782 #, c-format msgid "unknown demangling style `%s'" msgstr "" -#: ar.c:237 +#: ar.c:238 #, c-format msgid "no entry %s in archive\n" msgstr "" -#: ar.c:254 +#: ar.c:255 #, c-format msgid "" -"Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] " -"archive-file file...\n" +"Usage: %s [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] " +"[count] archive-file file...\n" msgstr "" -#: ar.c:257 +#: ar.c:258 #, c-format msgid " %s -M [<mri-script]\n" msgstr "" -#: ar.c:258 +#: ar.c:259 msgid " commands:\n" msgstr "" -#: ar.c:259 +#: ar.c:260 msgid " d - delete file(s) from the archive\n" msgstr "" -#: ar.c:260 +#: ar.c:261 msgid " m[ab] - move file(s) in the archive\n" msgstr "" -#: ar.c:261 +#: ar.c:262 msgid " p - print file(s) found in the archive\n" msgstr "" -#: ar.c:262 +#: ar.c:263 msgid " q[f] - quick append file(s) to the archive\n" msgstr "" -#: ar.c:263 +#: ar.c:264 msgid "" " r[ab][f][u] - replace existing or insert new file(s) into the archive\n" msgstr "" -#: ar.c:264 +#: ar.c:265 msgid " t - display contents of archive\n" msgstr "" -#: ar.c:265 +#: ar.c:266 msgid " x[o] - extract file(s) from the archive\n" msgstr "" -#: ar.c:266 +#: ar.c:267 msgid " command specific modifiers:\n" msgstr "" -#: ar.c:267 +#: ar.c:268 msgid " [a] - put file(s) after [member-name]\n" msgstr "" -#: ar.c:268 +#: ar.c:269 msgid " [b] - put file(s) before [member-name] (same as [i])\n" msgstr "" -#: ar.c:269 +#: ar.c:270 msgid " [N] - use instance [count] of name\n" msgstr "" -#: ar.c:270 +#: ar.c:271 msgid " [f] - truncate inserted file names\n" msgstr "" -#: ar.c:271 +#: ar.c:272 msgid " [P] - use full path names when matching\n" msgstr "" -#: ar.c:272 +#: ar.c:273 msgid " [o] - preserve original dates\n" msgstr "" -#: ar.c:273 +#: ar.c:274 msgid "" " [u] - only replace files that are newer than current archive " "contents\n" msgstr "" -#: ar.c:274 +#: ar.c:275 msgid " generic modifiers:\n" msgstr "" -#: ar.c:275 +#: ar.c:276 msgid " [c] - do not warn if the library had to be created\n" msgstr "" -#: ar.c:276 +#: ar.c:277 msgid " [s] - create an archive index (cf. ranlib)\n" msgstr "" -#: ar.c:277 +#: ar.c:278 msgid " [S] - do not build a symbol table\n" msgstr "" -#: ar.c:278 +#: ar.c:279 msgid " [v] - be verbose\n" msgstr "" -#: ar.c:279 +#: ar.c:280 msgid " [V] - display the version number\n" msgstr "" -#: ar.c:280 -msgid " [-X32_64] - (ignored)\n" +#: ar.c:287 +#, c-format +msgid "Usage: %s [options] archive\n" msgstr "" -#: ar.c:284 -#, c-format -msgid "Usage: %s [-vV] archive\n" +#: ar.c:288 +msgid " Generate an index to speed access to archives\n" +msgstr "" + +#: ar.c:289 +msgid "" +" The options are:\n" +" -h --help Print this help message\n" +" -V --version Print version information\n" msgstr "" -#: ar.c:505 +#: ar.c:512 msgid "two different operation options specified" msgstr "" -#: ar.c:580 +#: ar.c:587 #, c-format msgid "illegal option -- %c" msgstr "" -#: ar.c:612 +#: ar.c:619 msgid "no operation specified" msgstr "" -#: ar.c:615 +#: ar.c:622 msgid "`u' is only meaningful with the `r' option." msgstr "" -#: ar.c:625 +#: ar.c:632 msgid "`N' is only meaningful with the `x' and `d' options." msgstr "" -#: ar.c:628 +#: ar.c:635 msgid "Value for `N' must be positive." msgstr "" -#: ar.c:711 +#: ar.c:718 #, c-format msgid "internal error -- this option not implemented" msgstr "" -#: ar.c:830 ar.c:881 ar.c:1327 objcopy.c:1322 +#: ar.c:837 ar.c:888 ar.c:1333 objcopy.c:1348 #, c-format msgid "internal stat error on %s" msgstr "" -#: ar.c:834 +#: ar.c:841 #, c-format msgid "" "\n" @@ -198,94 +226,105 @@ msgid "" "\n" msgstr "" -#: ar.c:850 ar.c:918 +#: ar.c:857 ar.c:925 #, c-format msgid "%s is not a valid archive" msgstr "" -#: ar.c:886 +#: ar.c:893 #, c-format msgid "stat returns negative size for %s" msgstr "" -#: ar.c:1013 +#: ar.c:1020 #, c-format msgid "%s is not an archive" msgstr "" -#: ar.c:1020 +#: ar.c:1027 #, c-format msgid "creating %s" msgstr "" -#: ar.c:1226 +#: ar.c:1233 #, c-format msgid "No member named `%s'\n" msgstr "" -#: ar.c:1278 +#: ar.c:1285 #, c-format msgid "no entry %s in archive %s!" msgstr "" -#: ar.c:1439 +#: ar.c:1422 #, c-format msgid "%s: no archive map to update" msgstr "" -#: arsup.c:88 +#: arsup.c:86 #, c-format msgid "No entry %s in archive.\n" msgstr "" -#: arsup.c:120 +#: arsup.c:117 #, c-format msgid "Can't open file %s\n" msgstr "" -#: arsup.c:171 +#: arsup.c:172 #, c-format msgid "%s: Can't open output archive %s\n" msgstr "" -#: arsup.c:183 +#: arsup.c:189 #, c-format msgid "%s: Can't open input archive %s\n" msgstr "" -#: arsup.c:189 +#: arsup.c:198 #, c-format msgid "%s: file %s is not an archive\n" msgstr "" -#: arsup.c:230 +#: arsup.c:241 #, c-format msgid "%s: no output archive specified yet\n" msgstr "" -#: arsup.c:250 arsup.c:285 arsup.c:321 arsup.c:341 arsup.c:399 +#: arsup.c:262 arsup.c:301 arsup.c:343 arsup.c:364 arsup.c:430 #, c-format msgid "%s: no open output archive\n" msgstr "" -#: arsup.c:258 arsup.c:359 arsup.c:379 +#: arsup.c:273 arsup.c:385 arsup.c:411 #, c-format msgid "%s: can't open file %s\n" msgstr "" -#: arsup.c:306 arsup.c:375 arsup.c:454 +#: arsup.c:328 arsup.c:407 arsup.c:489 #, c-format msgid "%s: can't find module file %s\n" msgstr "" -#: arsup.c:406 +#: arsup.c:439 #, c-format msgid "Current open archive is %s\n" msgstr "" -#: arsup.c:433 +#: arsup.c:464 +#, c-format +msgid "%s: no open archive\n" +msgstr "" + +#: binemul.c:39 #, c-format -msgid "%s: no open archive\n" +msgid " No emulation specific options\n" +msgstr "" + +#. Macros for common output. +#: binemul.h:42 +#, c-format +msgid " emulation options: \n" msgstr "" #: bucomm.c:106 @@ -321,17 +360,29 @@ msgstr "" msgid "%s: bad number: %s" msgstr "" -#: coffdump.c:106 +#: coffdump.c:107 #, c-format msgid "#lines %d " msgstr "" -#: coffdump.c:468 sysdump.c:740 +#: coffdump.c:471 sysdump.c:767 #, c-format -msgid "%s: Print a human readable interpretation of a SYSROFF object file\n" +msgid "Usage: %s [option(s)] in-file\n" msgstr "" -#: coffdump.c:531 srconv.c:2029 sysdump.c:799 +#: coffdump.c:472 +msgid " Print a human readable interpretation of a SYSROFF object file\n" +msgstr "" + +#: coffdump.c:473 +msgid "" +" The options are:\n" +" -h --help Display this information\n" +" -v --version Display the program's version\n" +"\n" +msgstr "" + +#: coffdump.c:541 srconv.c:2052 sysdump.c:831 msgid "no input file specified" msgstr "" @@ -387,7 +438,7 @@ msgstr "" #. FIXME. #: debug.c:1152 -msgid "debug_record_label not implemented" +msgid "debug_record_label: not implemented" msgstr "" #: debug.c:1178 @@ -398,564 +449,581 @@ msgstr "" msgid "debug_record_variable: no current block" msgstr "" -#: debug.c:1764 +#: debug.c:1763 msgid "debug_make_undefined_type: unsupported kind" msgstr "" -#: debug.c:1970 +#: debug.c:1964 msgid "debug_name_type: no current file" msgstr "" -#: debug.c:2018 +#: debug.c:2012 msgid "debug_tag_type: no current file" msgstr "" -#: debug.c:2026 +#: debug.c:2020 msgid "debug_tag_type: extra tag attempted" msgstr "" -#: debug.c:2066 +#: debug.c:2059 #, c-format msgid "Warning: changing type size from %d to %d\n" msgstr "" -#: debug.c:2090 +#: debug.c:2083 msgid "debug_find_named_type: no current compilation unit" msgstr "" -#: debug.c:2197 +#: debug.c:2190 #, c-format msgid "debug_get_real_type: circular debug information for %s\n" msgstr "" -#: debug.c:2662 +#: debug.c:2650 msgid "debug_write_type: illegal type encountered" msgstr "" -#: dlltool.c:743 dlltool.c:768 dlltool.c:794 +#: dlltool.c:735 dlltool.c:760 dlltool.c:786 #, c-format msgid "Internal error: Unknown machine type: %d" msgstr "" -#: dlltool.c:831 +#: dlltool.c:823 #, c-format msgid "Can't open def file: %s" msgstr "" -#: dlltool.c:836 +#: dlltool.c:828 #, c-format msgid "Processing def file: %s" msgstr "" -#: dlltool.c:840 +#: dlltool.c:832 msgid "Processed def file" msgstr "" -#: dlltool.c:866 +#: dlltool.c:858 #, c-format msgid "Syntax error in def file %s:%d" msgstr "" -#: dlltool.c:905 +#: dlltool.c:897 #, c-format msgid "NAME: %s base: %x" msgstr "" -#: dlltool.c:908 dlltool.c:927 +#: dlltool.c:900 dlltool.c:919 msgid "Can't have LIBRARY and NAME" msgstr "" -#: dlltool.c:924 +#: dlltool.c:916 #, c-format msgid "LIBRARY: %s base: %x" msgstr "" -#: dlltool.c:1182 resrc.c:271 +#: dlltool.c:1174 resrc.c:271 #, c-format msgid "wait: %s" msgstr "" -#: dlltool.c:1187 dllwrap.c:455 resrc.c:276 +#: dlltool.c:1179 dllwrap.c:430 resrc.c:276 #, c-format msgid "subprocess got fatal signal %d" msgstr "" -#: dlltool.c:1193 dllwrap.c:462 resrc.c:283 +#: dlltool.c:1185 dllwrap.c:437 resrc.c:283 #, c-format msgid "%s exited with status %d" msgstr "" -#: dlltool.c:1225 +#: dlltool.c:1217 #, c-format msgid "Sucking in info from %s section in %s" msgstr "" -#: dlltool.c:1349 +#: dlltool.c:1341 #, c-format msgid "Excluding symbol: %s" msgstr "" -#: dlltool.c:1444 dlltool.c:1455 nm.c:958 nm.c:969 objdump.c:383 objdump.c:400 +#: dlltool.c:1436 dlltool.c:1447 nm.c:959 nm.c:970 objdump.c:386 objdump.c:401 #, c-format msgid "%s: no symbols" msgstr "" #. FIXME: we ought to read in and block out the base relocations -#: dlltool.c:1482 +#: dlltool.c:1474 #, c-format msgid "Done reading %s" msgstr "" -#: dlltool.c:1493 +#: dlltool.c:1485 #, c-format msgid "Unable to open object file: %s" msgstr "" -#: dlltool.c:1496 +#: dlltool.c:1488 #, c-format msgid "Scanning object file %s" msgstr "" -#: dlltool.c:1511 +#: dlltool.c:1503 #, c-format msgid "Cannot produce mcore-elf dll from archive file: %s" msgstr "" -#: dlltool.c:1603 +#: dlltool.c:1595 msgid "Adding exports to output file" msgstr "" -#: dlltool.c:1648 +#: dlltool.c:1640 msgid "Added exports to output file" msgstr "" -#: dlltool.c:1772 +#: dlltool.c:1764 #, c-format msgid "Generating export file: %s" msgstr "" -#: dlltool.c:1777 +#: dlltool.c:1769 #, c-format msgid "Unable to open temporary assembler file: %s" msgstr "" -#: dlltool.c:1780 +#: dlltool.c:1772 #, c-format msgid "Opened temporary file: %s" msgstr "" -#: dlltool.c:2004 +#: dlltool.c:1996 msgid "Generated exports file" msgstr "" -#: dlltool.c:2266 +#: dlltool.c:2258 #, c-format msgid "bfd_open failed open stub file: %s" msgstr "" -#: dlltool.c:2269 +#: dlltool.c:2261 #, c-format msgid "Creating stub file: %s" msgstr "" -#: dlltool.c:2658 +#: dlltool.c:2650 #, c-format msgid "failed to open temporary head file: %s" msgstr "" -#: dlltool.c:2717 +#: dlltool.c:2709 #, c-format msgid "failed to open temporary tail file: %s" msgstr "" -#: dlltool.c:2785 +#: dlltool.c:2777 #, c-format msgid "Can't open .lib file: %s" msgstr "" -#: dlltool.c:2788 +#: dlltool.c:2780 #, c-format msgid "Creating library file: %s" msgstr "" -#: dlltool.c:2847 +#: dlltool.c:2839 #, c-format msgid "cannot delete %s: %s" msgstr "" -#: dlltool.c:2851 +#: dlltool.c:2843 msgid "Created lib file" msgstr "" -#: dlltool.c:2956 +#: dlltool.c:2948 #, c-format msgid "Warning, ignoring duplicate EXPORT %s %d,%d" msgstr "" -#: dlltool.c:2962 +#: dlltool.c:2954 #, c-format msgid "Error, duplicate EXPORT with oridinals: %s" msgstr "" -#: dlltool.c:3089 +#: dlltool.c:3081 msgid "Processing definitions" msgstr "" -#: dlltool.c:3127 +#: dlltool.c:3119 msgid "Processed definitions" msgstr "" #. xgetext:c-format -#: dlltool.c:3138 dllwrap.c:519 +#: dlltool.c:3130 dllwrap.c:495 #, c-format -msgid "Usage %s <options> <object-files>\n" +msgid "Usage %s <option(s)> <object-file(s)>\n" msgstr "" #. xgetext:c-format -#: dlltool.c:3140 +#: dlltool.c:3132 #, c-format msgid "" " -m --machine <machine> Create as DLL for <machine>. [default: %s]\n" msgstr "" -#: dlltool.c:3141 +#: dlltool.c:3133 msgid "" " possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, " "ppc, thumb\n" msgstr "" -#: dlltool.c:3142 +#: dlltool.c:3134 msgid " -e --output-exp <outname> Generate an export file.\n" msgstr "" -#: dlltool.c:3143 +#: dlltool.c:3135 msgid " -l --output-lib <outname> Generate an interface library.\n" msgstr "" -#: dlltool.c:3144 +#: dlltool.c:3136 msgid " -a --add-indirect Add dll indirects to export file.\n" msgstr "" -#: dlltool.c:3145 +#: dlltool.c:3137 msgid "" " -D --dllname <name> Name of input dll to put into interface lib.\n" msgstr "" -#: dlltool.c:3146 +#: dlltool.c:3138 msgid " -d --input-def <deffile> Name of .def file to be read in.\n" msgstr "" -#: dlltool.c:3147 +#: dlltool.c:3139 msgid " -z --output-def <deffile> Name of .def file to be created.\n" msgstr "" -#: dlltool.c:3148 +#: dlltool.c:3140 msgid " --export-all-symbols Export all symbols to .def\n" msgstr "" -#: dlltool.c:3149 +#: dlltool.c:3141 msgid " --no-export-all-symbols Only export listed symbols\n" msgstr "" -#: dlltool.c:3150 +#: dlltool.c:3142 msgid " --exclude-symbols <list> Don't export <list>\n" msgstr "" -#: dlltool.c:3151 +#: dlltool.c:3143 msgid " --no-default-excludes Clear default exclude symbols\n" msgstr "" -#: dlltool.c:3152 +#: dlltool.c:3144 msgid " -b --base-file <basefile> Read linker generated base file.\n" msgstr "" -#: dlltool.c:3153 +#: dlltool.c:3145 msgid " -x --no-idata4 Don't generate idata$4 section.\n" msgstr "" -#: dlltool.c:3154 +#: dlltool.c:3146 msgid " -c --no-idata5 Don't generate idata$5 section.\n" msgstr "" -#: dlltool.c:3155 +#: dlltool.c:3147 msgid "" " -U --add-underscore Add underscores to symbols in interface " "library.\n" msgstr "" -#: dlltool.c:3156 +#: dlltool.c:3148 msgid " -k --kill-at Kill @<n> from exported names.\n" msgstr "" -#: dlltool.c:3157 +#: dlltool.c:3149 msgid " -A --add-stdcall-alias Add aliases without @<n>.\n" msgstr "" -#: dlltool.c:3158 +#: dlltool.c:3150 msgid " -S --as <name> Use <name> for assembler.\n" msgstr "" -#: dlltool.c:3159 +#: dlltool.c:3151 msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n" msgstr "" -#: dlltool.c:3160 +#: dlltool.c:3152 msgid "" " -C --compat-implib Create backward compatible import library.\n" msgstr "" -#: dlltool.c:3161 +#: dlltool.c:3153 msgid "" " -n --no-delete Keep temp files (repeat for extra " "preservation).\n" msgstr "" -#: dlltool.c:3162 +#: dlltool.c:3154 msgid " -v --verbose Be verbose.\n" msgstr "" -#: dlltool.c:3163 +#: dlltool.c:3155 msgid " -V --version Display the program version.\n" msgstr "" -#: dlltool.c:3164 +#: dlltool.c:3156 msgid " -h --help Display this information.\n" msgstr "" -#: dlltool.c:3166 +#: dlltool.c:3158 msgid "" " -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n" msgstr "" -#: dlltool.c:3167 +#: dlltool.c:3159 msgid " -L --linker <name> Use <name> as the linker.\n" msgstr "" -#: dlltool.c:3168 +#: dlltool.c:3160 msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n" msgstr "" -#: dlltool.c:3315 +#: dlltool.c:3310 #, c-format msgid "Unable to open base-file: %s" msgstr "" -#: dlltool.c:3344 +#: dlltool.c:3339 #, c-format msgid "Machine '%s' not supported" msgstr "" -#: dlltool.c:3447 dllwrap.c:240 +#: dlltool.c:3442 dllwrap.c:214 #, c-format msgid "Tried file: %s" msgstr "" -#: dlltool.c:3454 dllwrap.c:247 +#: dlltool.c:3449 dllwrap.c:221 #, c-format msgid "Using file: %s" msgstr "" -#: dllwrap.c:334 +#: dllwrap.c:308 #, c-format msgid "Keeping temporary base file %s" msgstr "" -#: dllwrap.c:336 +#: dllwrap.c:310 #, c-format msgid "Deleting temporary base file %s" msgstr "" -#: dllwrap.c:350 +#: dllwrap.c:324 #, c-format msgid "Keeping temporary exp file %s" msgstr "" -#: dllwrap.c:352 +#: dllwrap.c:326 #, c-format msgid "Deleting temporary exp file %s" msgstr "" -#: dllwrap.c:365 +#: dllwrap.c:339 #, c-format msgid "Keeping temporary def file %s" msgstr "" -#: dllwrap.c:367 +#: dllwrap.c:341 #, c-format msgid "Deleting temporary def file %s" msgstr "" -#: dllwrap.c:520 +#: dllwrap.c:496 msgid " Generic options:\n" msgstr "" -#: dllwrap.c:521 +#: dllwrap.c:497 msgid " --quiet, -q Work quietly\n" msgstr "" -#: dllwrap.c:522 +#: dllwrap.c:498 msgid " --verbose, -v Verbose\n" msgstr "" -#: dllwrap.c:523 +#: dllwrap.c:499 msgid " --version Print dllwrap version\n" msgstr "" -#: dllwrap.c:524 +#: dllwrap.c:500 msgid " --implib <outname> Synonym for --output-lib\n" msgstr "" -#: dllwrap.c:525 +#: dllwrap.c:501 #, c-format msgid " Options for %s:\n" msgstr "" -#: dllwrap.c:526 +#: dllwrap.c:502 msgid " --driver-name <driver> Defaults to \"gcc\"\n" msgstr "" -#: dllwrap.c:527 +#: dllwrap.c:503 msgid " --driver-flags <flags> Override default ld flags\n" msgstr "" -#: dllwrap.c:528 +#: dllwrap.c:504 msgid " --dlltool-name <dlltool> Defaults to \"dlltool\"\n" msgstr "" -#: dllwrap.c:529 +#: dllwrap.c:505 msgid " --entry <entry> Specify alternate DLL entry point\n" msgstr "" -#: dllwrap.c:530 +#: dllwrap.c:506 msgid " --image-base <base> Specify image base address\n" msgstr "" -#: dllwrap.c:531 +#: dllwrap.c:507 msgid " --target <machine> i386-cygwin32 or i386-mingw32\n" msgstr "" -#: dllwrap.c:532 +#: dllwrap.c:508 msgid " --dry-run Show what needs to be run\n" msgstr "" -#: dllwrap.c:533 +#: dllwrap.c:509 msgid " --mno-cygwin Create Mingw DLL\n" msgstr "" -#: dllwrap.c:534 +#: dllwrap.c:510 msgid " Options passed to DLLTOOL:\n" msgstr "" -#: dllwrap.c:535 +#: dllwrap.c:511 msgid " --machine <machine>\n" msgstr "" -#: dllwrap.c:536 +#: dllwrap.c:512 msgid " --output-exp <outname> Generate export file.\n" msgstr "" -#: dllwrap.c:537 +#: dllwrap.c:513 msgid " --output-lib <outname> Generate input library.\n" msgstr "" -#: dllwrap.c:538 +#: dllwrap.c:514 msgid " --add-indirect Add dll indirects to export file.\n" msgstr "" -#: dllwrap.c:539 +#: dllwrap.c:515 msgid " --dllname <name> Name of input dll to put into output lib.\n" msgstr "" -#: dllwrap.c:540 +#: dllwrap.c:516 msgid " --def <deffile> Name input .def file\n" msgstr "" -#: dllwrap.c:541 +#: dllwrap.c:517 msgid " --output-def <deffile> Name output .def file\n" msgstr "" -#: dllwrap.c:542 +#: dllwrap.c:518 msgid " --export-all-symbols Export all symbols to .def\n" msgstr "" -#: dllwrap.c:543 +#: dllwrap.c:519 msgid " --no-export-all-symbols Only export .drectve symbols\n" msgstr "" -#: dllwrap.c:544 +#: dllwrap.c:520 msgid " --exclude-symbols <list> Exclude <list> from .def\n" msgstr "" -#: dllwrap.c:545 +#: dllwrap.c:521 msgid " --no-default-excludes Zap default exclude symbols\n" msgstr "" -#: dllwrap.c:546 +#: dllwrap.c:522 msgid " --base-file <basefile> Read linker generated base file\n" msgstr "" -#: dllwrap.c:547 +#: dllwrap.c:523 msgid " --no-idata4 Don't generate idata$4 section\n" msgstr "" -#: dllwrap.c:548 +#: dllwrap.c:524 msgid " --no-idata5 Don't generate idata$5 section\n" msgstr "" -#: dllwrap.c:549 +#: dllwrap.c:525 msgid " -U Add underscores to .lib\n" msgstr "" -#: dllwrap.c:550 +#: dllwrap.c:526 msgid " -k Kill @<n> from exported names\n" msgstr "" -#: dllwrap.c:551 +#: dllwrap.c:527 msgid " --add-stdcall-alias Add aliases without @<n>\n" msgstr "" -#: dllwrap.c:552 +#: dllwrap.c:528 msgid " --as <name> Use <name> for assembler\n" msgstr "" -#: dllwrap.c:553 +#: dllwrap.c:529 msgid " --nodelete Keep temp files.\n" msgstr "" -#: dllwrap.c:554 +#: dllwrap.c:530 msgid " Rest are passed unmodified to the language driver\n" msgstr "" -#: dllwrap.c:824 +#: dllwrap.c:802 msgid "Must provide at least one of -o or --dllname options" msgstr "" -#: dllwrap.c:852 +#: dllwrap.c:830 msgid "" "no export definition file provided.\n" "Creating one, but that may not be what you want" msgstr "" -#: dllwrap.c:1014 +#: dllwrap.c:992 #, c-format msgid "DLLTOOL name : %s\n" msgstr "" -#: dllwrap.c:1015 +#: dllwrap.c:993 #, c-format msgid "DLLTOOL options : %s\n" msgstr "" -#: dllwrap.c:1016 +#: dllwrap.c:994 #, c-format msgid "DRIVER name : %s\n" msgstr "" -#: dllwrap.c:1017 +#: dllwrap.c:995 #, c-format msgid "DRIVER options : %s\n" msgstr "" +#: emul_aix.c:52 +#, c-format +msgid " [-g] - 32 bit small archive\n" +msgstr "" + +#: emul_aix.c:53 +msgid " [-X32] - ignores 64 bit objects\n" +msgstr "" + +#: emul_aix.c:54 +msgid " [-X64] - ignores 32 bit objects\n" +msgstr "" + +#: emul_aix.c:55 +msgid " [-X32_64] - accepts 32 and 64 bit objects\n" +msgstr "" + #: ieee.c:317 msgid "unexpected end of debugging information" msgstr "" @@ -1042,7 +1110,7 @@ msgid "Pascal file name not supported" msgstr "" #: ieee.c:1919 -msgid "unsupported qualifer" +msgid "unsupported qualifier" msgstr "" #: ieee.c:2190 @@ -1167,221 +1235,227 @@ msgstr "" msgid "bad ATN65 record" msgstr "" -#: ieee.c:4236 +#: ieee.c:4234 msgid "IEEE numeric overflow: 0x" msgstr "" -#: ieee.c:4282 +#: ieee.c:4280 #, c-format msgid "IEEE string length overflow: %u\n" msgstr "" -#: ieee.c:5333 +#: ieee.c:5330 #, c-format msgid "IEEE unsupported integer type size %u\n" msgstr "" -#: ieee.c:5369 +#: ieee.c:5366 #, c-format msgid "IEEE unsupported float type size %u\n" msgstr "" -#: ieee.c:5405 +#: ieee.c:5402 #, c-format msgid "IEEE unsupported complex type size %u\n" msgstr "" -#: nlmconv.c:278 srconv.c:2020 +#: nlmconv.c:281 srconv.c:2043 msgid "input and output files must be different" msgstr "" -#: nlmconv.c:325 +#: nlmconv.c:328 msgid "input file named both on command line and with INPUT" msgstr "" -#: nlmconv.c:334 +#: nlmconv.c:337 msgid "no input file" msgstr "" -#: nlmconv.c:364 +#: nlmconv.c:367 msgid "no name for output file" msgstr "" -#: nlmconv.c:377 +#: nlmconv.c:380 msgid "warning: input and output formats are not compatible" msgstr "" -#: nlmconv.c:406 +#: nlmconv.c:409 msgid "make .bss section" msgstr "" -#: nlmconv.c:415 +#: nlmconv.c:418 msgid "make .nlmsections section" msgstr "" -#: nlmconv.c:417 +#: nlmconv.c:420 msgid "set .nlmsections flags" msgstr "" -#: nlmconv.c:445 +#: nlmconv.c:448 msgid "set .bss vma" msgstr "" -#: nlmconv.c:452 +#: nlmconv.c:455 msgid "set .data size" msgstr "" -#: nlmconv.c:632 +#: nlmconv.c:635 #, c-format msgid "warning: symbol %s imported but not in import list" msgstr "" -#: nlmconv.c:652 +#: nlmconv.c:655 msgid "set start address" msgstr "" -#: nlmconv.c:701 +#: nlmconv.c:704 #, c-format msgid "warning: START procedure %s not defined" msgstr "" -#: nlmconv.c:703 +#: nlmconv.c:706 #, c-format msgid "warning: EXIT procedure %s not defined" msgstr "" -#: nlmconv.c:705 +#: nlmconv.c:708 #, c-format msgid "warning: CHECK procedure %s not defined" msgstr "" -#: nlmconv.c:726 nlmconv.c:915 +#: nlmconv.c:729 nlmconv.c:918 msgid "custom section" msgstr "" -#: nlmconv.c:747 nlmconv.c:944 +#: nlmconv.c:750 nlmconv.c:947 msgid "help section" msgstr "" -#: nlmconv.c:769 nlmconv.c:962 +#: nlmconv.c:772 nlmconv.c:965 msgid "message section" msgstr "" -#: nlmconv.c:785 nlmconv.c:995 +#: nlmconv.c:788 nlmconv.c:998 msgid "module section" msgstr "" -#: nlmconv.c:805 nlmconv.c:1011 +#: nlmconv.c:808 nlmconv.c:1014 msgid "rpc section" msgstr "" #. There is no place to record this information. -#: nlmconv.c:841 +#: nlmconv.c:844 #, c-format msgid "%s: warning: shared libraries can not have uninitialized data" msgstr "" -#: nlmconv.c:862 nlmconv.c:1030 +#: nlmconv.c:865 nlmconv.c:1033 msgid "shared section" msgstr "" -#: nlmconv.c:870 +#: nlmconv.c:873 msgid "warning: No version number given" msgstr "" -#: nlmconv.c:910 nlmconv.c:939 nlmconv.c:957 nlmconv.c:1006 nlmconv.c:1025 +#: nlmconv.c:913 nlmconv.c:942 nlmconv.c:960 nlmconv.c:1009 nlmconv.c:1028 #, c-format msgid "%s: read: %s" msgstr "" -#: nlmconv.c:932 +#: nlmconv.c:935 msgid "warning: MAP and FULLMAP are not supported; try ld -M" msgstr "" -#: nlmconv.c:1101 +#: nlmconv.c:1107 #, c-format -msgid "%s: Convert an object file into a NetWare Loadable Module\n" +msgid "Usage: %s [option(s)] [in-file [out-file]]\n" msgstr "" -#: nlmconv.c:1113 -#, c-format +#: nlmconv.c:1108 +msgid " Convert an object file into a NetWare Loadable Module\n" +msgstr "" + +#: nlmconv.c:1109 msgid "" -"Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n" -" [--input-target=bfdname] [--output-target=bfdname]\n" -" [--header-file=file] [--linker=linker] [--debug]\n" -" [--help] [--version]\n" -" [in-file [out-file]]\n" +" The options are:\n" +" -I --input-target=<bfdname> Set the input binary file format\n" +" -O --output-target=<bfdname> Set the output binary file format\n" +" -T --header-file=<file> Read <file> for NLM header information\n" +" -l --linker=<linker> Use <linker> for any linking\n" +" -d --debug Display on stderr the linker command line\n" +" -h --help Display this information\n" +" -v --version Display the program's version\n" msgstr "" -#: nlmconv.c:1153 +#: nlmconv.c:1151 #, c-format msgid "support not compiled in for %s" msgstr "" -#: nlmconv.c:1193 +#: nlmconv.c:1191 msgid "make section" msgstr "" -#: nlmconv.c:1207 +#: nlmconv.c:1205 msgid "set section size" msgstr "" -#: nlmconv.c:1213 +#: nlmconv.c:1211 msgid "set section alignment" msgstr "" -#: nlmconv.c:1217 +#: nlmconv.c:1215 msgid "set section flags" msgstr "" -#: nlmconv.c:1228 +#: nlmconv.c:1226 msgid "set .nlmsections size" msgstr "" -#: nlmconv.c:1316 nlmconv.c:1324 nlmconv.c:1333 nlmconv.c:1338 +#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336 msgid "set .nlmsection contents" msgstr "" -#: nlmconv.c:1841 +#: nlmconv.c:1837 msgid "stub section sizes" msgstr "" -#: nlmconv.c:1890 +#: nlmconv.c:1886 msgid "writing stub" msgstr "" -#: nlmconv.c:1980 +#: nlmconv.c:1975 #, c-format msgid "unresolved PC relative reloc against %s" msgstr "" -#: nlmconv.c:2044 +#: nlmconv.c:2039 #, c-format msgid "overflow when adjusting relocation against %s" msgstr "" -#: nlmconv.c:2161 +#: nlmconv.c:2156 #, c-format msgid "%s: execution of %s failed: " msgstr "" -#: nlmconv.c:2176 +#: nlmconv.c:2171 #, c-format msgid "Execution of %s failed" msgstr "" -#: nm.c:300 +#: nm.c:246 size.c:85 strings.c:650 #, c-format -msgid "Usage: %s [OPTION]... [FILE]...\n" +msgid "Usage: %s [option(s)] [file(s)]\n" msgstr "" -#: nm.c:301 -msgid "List symbols from FILEs (a.out by default).\n" +#: nm.c:247 +msgid " List symbols in [file(s)] (a.out by default).\n" msgstr "" -#: nm.c:302 +#: nm.c:248 msgid "" -"\n" +" The options are:\n" " -a, --debug-syms Display debugger-only symbols\n" " -A, --print-file-name Print name of the input file before every symbol\n" " -B Same as --format=bsd\n" @@ -1399,7 +1473,6 @@ msgid "" "`bsd',\n" " `sysv' or `posix'. The default is `bsd'\n" " -g, --extern-only Display only external symbols\n" -" -h, --help Display this information\n" " -l, --line-numbers Use debugging information to find a filename and\n" " line number for each symbol\n" " -n, --numeric-sort Sort symbols numerically by address\n" @@ -1407,41 +1480,58 @@ msgid "" " -p, --no-sort Do not sort the symbols\n" " -P, --portability Same as --format=posix\n" " -r, --reverse-sort Reverse the sense of the sort\n" +" -S, --print-size Print size of defined symbols\n" " -s, --print-armap Include index for symbols from archive members\n" " --size-sort Sort symbols by size\n" " -t, --radix=RADIX Use RADIX for printing symbol values\n" " --target=BFDNAME Specify the target object format as BFDNAME\n" " -u, --undefined-only Display only undefined symbols\n" -" -V, --version Display this program's version number\n" " -X 32_64 (ignored)\n" +" -h, --help Display this information\n" +" -V, --version Display this program's version number\n" "\n" msgstr "" -#: nm.c:334 objdump.c:216 +#: nm.c:281 objdump.c:217 #, c-format msgid "Report bugs to %s.\n" msgstr "" -#: nm.c:367 +#: nm.c:314 #, c-format msgid "%s: invalid radix" msgstr "" -#: nm.c:392 +#: nm.c:339 #, c-format msgid "%s: invalid output format" msgstr "" -#: nm.c:504 +#: nm.c:456 msgid "Only -X 32_64 is supported" msgstr "" -#: nm.c:546 +#: nm.c:498 #, c-format msgid "data size %ld" msgstr "" -#: nm.c:1340 +#: nm.c:523 readelf.c:5306 readelf.c:5342 +#, c-format +msgid "<processor specific>: %d" +msgstr "" + +#: nm.c:525 readelf.c:5308 readelf.c:5354 +#, c-format +msgid "<OS specific>: %d" +msgstr "" + +#: nm.c:527 readelf.c:5310 readelf.c:5357 +#, c-format +msgid "<unknown>: %d" +msgstr "" + +#: nm.c:1339 #, c-format msgid "" "\n" @@ -1450,7 +1540,7 @@ msgid "" "\n" msgstr "" -#: nm.c:1342 +#: nm.c:1341 #, c-format msgid "" "\n" @@ -1459,14 +1549,21 @@ msgid "" "\n" msgstr "" -#: nm.c:1343 nm.c:1397 +#: nm.c:1343 nm.c:1401 msgid "" -"Name Value Class Type Size Line " +"Name Value Class Type Size Line " "Section\n" "\n" msgstr "" -#: nm.c:1394 +#: nm.c:1346 nm.c:1404 +msgid "" +"Name Value Class Type " +"Size Line Section\n" +"\n" +msgstr "" + +#: nm.c:1397 #, c-format msgid "" "\n" @@ -1475,7 +1572,7 @@ msgid "" "\n" msgstr "" -#: nm.c:1396 +#: nm.c:1399 #, c-format msgid "" "\n" @@ -1484,22 +1581,26 @@ msgid "" "\n" msgstr "" -#: nm.c:1564 +#: nm.c:1614 msgid "" "\n" "Archive index:\n" msgstr "" -#: objcopy.c:363 +#: objcopy.c:363 srconv.c:1952 #, c-format -msgid "Usage: %s <options> in-file [out-file]\n" +msgid "Usage: %s [option(s)] in-file [out-file]\n" msgstr "" -#: objcopy.c:364 objcopy.c:433 +#: objcopy.c:364 +msgid " Copies a binary file, possibly transforming it in the process\n" +msgstr "" + +#: objcopy.c:365 objcopy.c:435 msgid " The options are:\n" msgstr "" -#: objcopy.c:365 +#: objcopy.c:366 msgid "" " -I --input-target <bfdname> Assume input file is in format <bfdname>\n" " -O --output-target <bfdname> Create an output file in format " @@ -1580,28 +1681,32 @@ msgid "" " -h --help Display this output\n" msgstr "" -#: objcopy.c:432 +#: objcopy.c:433 #, c-format -msgid "Usage: %s <options> in-file(s)\n" +msgid "Usage: %s <option(s)> in-file(s)\n" msgstr "" #: objcopy.c:434 +msgid " Removes symbols and sections from files\n" +msgstr "" + +#: objcopy.c:436 msgid "" -" -I --input-target <bfdname> Assume input file is in format <bfdname>\n" -" -O --output-target <bfdname> Create an output file in format " +" -I --input-target=<bfdname> Assume input file is in format <bfdname>\n" +" -O --output-target=<bfdname> Create an output file in format " "<bfdname>\n" -" -F --target <bfdname> Set both input and output format to " +" -F --target=<bfdname> Set both input and output format to " "<bfdname>\n" " -p --preserve-dates Copy modified/access timestamps to the " "output\n" -" -R --remove-section <name> Remove section <name> from the output\n" +" -R --remove-section=<name> Remove section <name> from the output\n" " -s --strip-all Remove all symbol and relocation " "information\n" -" -g -S --strip-debug Remove all debugging symbols\n" +" -g -S -d --strip-debug Remove all debugging symbols\n" " --strip-unneeded Remove all symbols not needed by " "relocations\n" -" -N --strip-symbol <name> Do not copy symbol <name>\n" -" -K --keep-symbol <name> Only copy symbol <name>\n" +" -N --strip-symbol=<name> Do not copy symbol <name>\n" +" -K --keep-symbol=<name> Only copy symbol <name>\n" " -x --discard-all Remove all non-global symbols\n" " -X --discard-locals Remove any compiler-generated symbols\n" " -v --verbose List all object files modified\n" @@ -1610,216 +1715,214 @@ msgid "" " -o <file> Place stripped output into <file>\n" msgstr "" -#: objcopy.c:504 +#: objcopy.c:506 #, c-format msgid "unrecognized section flag `%s'" msgstr "" -#: objcopy.c:505 +#: objcopy.c:507 #, c-format msgid "supported flags: %s" msgstr "" -#: objcopy.c:582 objcopy.c:2206 +#: objcopy.c:584 objcopy.c:2243 #, c-format msgid "cannot stat: %s: %s" msgstr "" -#: objcopy.c:589 objcopy.c:2224 +#: objcopy.c:591 objcopy.c:2261 #, c-format msgid "cannot open: %s: %s" msgstr "" -#: objcopy.c:592 objcopy.c:2228 +#: objcopy.c:594 objcopy.c:2265 #, c-format msgid "%s: fread failed" msgstr "" -#: objcopy.c:665 +#: objcopy.c:667 #, c-format msgid "Ignoring rubbish found on line %d of %s" msgstr "" -#: objcopy.c:886 +#: objcopy.c:888 #, c-format msgid "%s: Multiple redefinition of symbol \"%s\"" msgstr "" -#: objcopy.c:891 +#: objcopy.c:893 #, c-format msgid "%s: Symbol \"%s\" is target of more than one redefinition" msgstr "" -#: objcopy.c:943 +#: objcopy.c:945 msgid "Unable to change endianness of input file(s)" msgstr "" -#: objcopy.c:951 +#: objcopy.c:953 #, c-format msgid "copy from %s(%s) to %s(%s)\n" msgstr "" -#: objcopy.c:975 +#: objcopy.c:977 #, c-format msgid "Warning: Output file cannot represent architecture %s" msgstr "" -#: objcopy.c:1002 +#: objcopy.c:1004 #, c-format msgid "can't create section `%s': %s" msgstr "" -#: objcopy.c:1088 +#: objcopy.c:1090 #, c-format msgid "Can't fill gap after %s: %s" msgstr "" -#: objcopy.c:1113 +#: objcopy.c:1115 #, c-format msgid "Can't add padding to %s: %s" msgstr "" -#: objcopy.c:1252 +#: objcopy.c:1254 #, c-format msgid "%s: error copying private BFD data: %s" msgstr "" -#: objcopy.c:1265 +#: objcopy.c:1267 msgid "unknown alternate machine code, ignored" msgstr "" -#: objcopy.c:1295 +#: objcopy.c:1300 objcopy.c:1330 #, c-format msgid "cannot mkdir %s for archive copying (error: %s)" msgstr "" -#: objcopy.c:1466 +#: objcopy.c:1497 #, c-format msgid "Multiple renames of section %s" msgstr "" -#: objcopy.c:1550 +#: objcopy.c:1581 msgid "making" msgstr "" -#: objcopy.c:1559 +#: objcopy.c:1590 msgid "size" msgstr "" -#: objcopy.c:1573 +#: objcopy.c:1604 msgid "vma" msgstr "" -#: objcopy.c:1599 +#: objcopy.c:1630 msgid "alignment" msgstr "" -#: objcopy.c:1607 +#: objcopy.c:1638 msgid "flags" msgstr "" -#: objcopy.c:1624 +#: objcopy.c:1655 msgid "private data" msgstr "" -#: objcopy.c:1632 +#: objcopy.c:1663 #, c-format msgid "%s: section `%s': error in %s: %s" msgstr "" -#: objcopy.c:1910 +#: objcopy.c:1946 #, c-format msgid "%s: can't create debugging section: %s" msgstr "" -#: objcopy.c:1925 +#: objcopy.c:1961 #, c-format msgid "%s: can't set debugging section contents: %s" msgstr "" -#: objcopy.c:1934 +#: objcopy.c:1970 #, c-format msgid "%s: don't know how to write debugging information for %s" msgstr "" -#: objcopy.c:2041 +#: objcopy.c:2078 #, c-format msgid "%s: cannot stat: %s" msgstr "" -#: objcopy.c:2092 +#: objcopy.c:2129 msgid "byte number must be non-negative" msgstr "" -#: objcopy.c:2102 +#: objcopy.c:2139 msgid "interleave must be positive" msgstr "" -#: objcopy.c:2122 objcopy.c:2130 +#: objcopy.c:2159 objcopy.c:2167 #, c-format msgid "%s both copied and removed" msgstr "" -#: objcopy.c:2203 objcopy.c:2273 objcopy.c:2373 objcopy.c:2400 objcopy.c:2424 -#: objcopy.c:2428 objcopy.c:2448 +#: objcopy.c:2240 objcopy.c:2310 objcopy.c:2410 objcopy.c:2437 objcopy.c:2461 +#: objcopy.c:2465 objcopy.c:2485 #, c-format msgid "bad format for %s" msgstr "" -#: objcopy.c:2342 +#: objcopy.c:2379 #, c-format msgid "Warning: truncating gap-fill from 0x%s to 0x%x" msgstr "" -#: objcopy.c:2494 +#: objcopy.c:2531 msgid "alternate machine code index must be positive" msgstr "" -#: objcopy.c:2512 +#: objcopy.c:2550 msgid "byte number must be less than interleave" msgstr "" -#: objcopy.c:2539 +#: objcopy.c:2577 #, c-format msgid "architecture %s unknown" msgstr "" -#: objcopy.c:2543 +#: objcopy.c:2581 msgid "" "Warning: input target 'binary' required for binary architecture parameter." msgstr "" -#: objcopy.c:2544 +#: objcopy.c:2582 #, c-format msgid " Argument %s ignored" msgstr "" -#: objcopy.c:2550 +#: objcopy.c:2588 #, c-format msgid "Cannot stat: %s: %s" msgstr "" -#: objcopy.c:2590 objcopy.c:2604 +#: objcopy.c:2628 objcopy.c:2642 #, c-format msgid "%s %s%c0x%s never used" msgstr "" -#: objdump.c:164 -#, c-format -msgid "Usage: %s OPTION... FILE...\n" -msgstr "" - #: objdump.c:165 -msgid "Display information from object FILE.\n" +#, c-format +msgid "Usage: %s <option(s)> <file(s)>\n" msgstr "" #: objdump.c:166 -msgid "" -"\n" -" At least one of the following switches must be given:\n" +msgid " Display information from object <file(s)>.\n" msgstr "" #: objdump.c:167 +msgid " At least one of the following switches must be given:\n" +msgstr "" + +#: objdump.c:168 msgid "" " -a, --archive-headers Display archive header information\n" " -f, --file-headers Display the contents of the overall file header\n" @@ -1840,18 +1943,18 @@ msgid "" " -r, --reloc Display the relocation entries in the file\n" " -R, --dynamic-reloc Display the dynamic relocation entries in the " "file\n" -" -V, --version Display this program's version number\n" +" -v, --version Display this program's version number\n" " -i, --info List object formats and architectures supported\n" " -H, --help Display this information\n" msgstr "" -#: objdump.c:189 +#: objdump.c:190 msgid "" "\n" " The following switches are optional:\n" msgstr "" -#: objdump.c:190 +#: objdump.c:191 msgid "" " -b, --target=BFDNAME Specify the target object format as " "BFDNAME\n" @@ -1884,155 +1987,155 @@ msgid "" "\n" msgstr "" -#: objdump.c:359 +#: objdump.c:358 msgid "Sections:\n" msgstr "" -#: objdump.c:362 +#: objdump.c:361 objdump.c:365 msgid "Idx Name Size VMA LMA File off Algn" msgstr "" -#: objdump.c:364 +#: objdump.c:367 msgid "" "Idx Name Size VMA LMA File off " "Algn" msgstr "" -#: objdump.c:368 +#: objdump.c:371 msgid " Flags" msgstr "" -#: objdump.c:418 +#: objdump.c:419 #, c-format msgid "%s: not a dynamic object" msgstr "" -#: objdump.c:434 +#: objdump.c:433 #, c-format msgid "%s: No dynamic symbols" msgstr "" -#: objdump.c:1124 +#: objdump.c:1114 msgid "Out of virtual memory" msgstr "" -#: objdump.c:1553 +#: objdump.c:1543 #, c-format msgid "Can't use supplied machine %s" msgstr "" -#: objdump.c:1571 +#: objdump.c:1561 #, c-format msgid "Can't disassemble for architecture %s\n" msgstr "" -#: objdump.c:1653 +#: objdump.c:1643 #, c-format msgid "Disassembly of section %s:\n" msgstr "" -#: objdump.c:1828 +#: objdump.c:1818 #, c-format msgid "" "No %s section present\n" "\n" msgstr "" -#: objdump.c:1835 +#: objdump.c:1825 #, c-format msgid "%s has no %s section" msgstr "" -#: objdump.c:1849 +#: objdump.c:1839 #, c-format msgid "Reading %s section of %s failed: %s" msgstr "" -#: objdump.c:1861 +#: objdump.c:1851 #, c-format msgid "Reading %s section of %s failed: %s\n" msgstr "" -#: objdump.c:1904 +#: objdump.c:1894 #, c-format msgid "" "Contents of %s section:\n" "\n" msgstr "" -#: objdump.c:2004 +#: objdump.c:1994 #, c-format msgid "architecture: %s, " msgstr "" -#: objdump.c:2007 +#: objdump.c:1997 #, c-format msgid "flags 0x%08x:\n" msgstr "" -#: objdump.c:2020 +#: objdump.c:2010 msgid "" "\n" "start address 0x" msgstr "" -#: objdump.c:2052 +#: objdump.c:2042 #, c-format msgid "" "\n" "%s: file format %s\n" msgstr "" -#: objdump.c:2094 +#: objdump.c:2084 #, c-format msgid "%s: printing debugging information failed" msgstr "" -#: objdump.c:2171 +#: objdump.c:2161 #, c-format msgid "In archive %s:\n" msgstr "" -#: objdump.c:2223 +#: objdump.c:2213 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: objdump.c:2736 +#: objdump.c:2718 #, c-format msgid "BFD header file version %s\n" msgstr "" -#: objdump.c:2825 +#: objdump.c:2807 msgid "unrecognized -E option" msgstr "" -#: objdump.c:2836 +#: objdump.c:2818 #, c-format msgid "unrecognized --endian type `%s'" msgstr "" -#: rdcoff.c:205 +#: rdcoff.c:204 #, c-format msgid "parse_coff_type: Bad type code 0x%x" msgstr "" -#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:730 +#: rdcoff.c:422 rdcoff.c:530 rdcoff.c:729 #, c-format msgid "bfd_coff_get_syment failed: %s" msgstr "" -#: rdcoff.c:439 rdcoff.c:750 +#: rdcoff.c:438 rdcoff.c:749 #, c-format msgid "bfd_coff_get_auxent failed: %s" msgstr "" -#: rdcoff.c:817 +#: rdcoff.c:816 #, c-format msgid "%ld: .bf without preceding function" msgstr "" -#: rdcoff.c:867 +#: rdcoff.c:866 #, c-format msgid "%ld: unexpected .ef\n" msgstr "" @@ -2046,554 +2149,508 @@ msgstr "" msgid "Last stabs entries before error:\n" msgstr "" -#: readelf.c:318 +#: readelf.c:328 #, c-format msgid "%s: Error: " msgstr "" -#: readelf.c:329 +#: readelf.c:339 #, c-format msgid "%s: Warning: " msgstr "" -#: readelf.c:351 +#: readelf.c:361 #, c-format msgid "Unable to seek to %x for %s\n" msgstr "" -#: readelf.c:362 +#: readelf.c:372 #, c-format msgid "Out of memory allocating %d bytes for %s\n" msgstr "" -#: readelf.c:370 +#: readelf.c:380 #, c-format msgid "Unable to read in %d bytes of %s\n" msgstr "" -#: readelf.c:423 readelf.c:581 +#: readelf.c:433 readelf.c:591 #, c-format msgid "Unhandled data length: %d\n" msgstr "" -#: readelf.c:660 +#: readelf.c:675 msgid "Don't know about relocations on this machine architecture\n" msgstr "" -#: readelf.c:682 readelf.c:711 readelf.c:757 readelf.c:784 +#: readelf.c:697 readelf.c:726 readelf.c:772 readelf.c:799 msgid "relocs" msgstr "" -#: readelf.c:693 readelf.c:722 readelf.c:767 readelf.c:794 +#: readelf.c:708 readelf.c:737 readelf.c:782 readelf.c:809 msgid "out of memory parsing relocs" msgstr "" -#: readelf.c:845 +#: readelf.c:861 msgid "" -" Offset Info Type Symbol's Value Symbol's Name " -"Addend\n" +" Offset Info Type Sym. Value Symbol's Name + Addend\n" +msgstr "" + +#: readelf.c:863 +msgid " Offset Info Type Sym.Value Sym. Name + Addend\n" msgstr "" -#: readelf.c:848 -msgid " Offset Info Type Symbol's Value Symbol's Name\n" +#: readelf.c:868 +msgid " Offset Info Type Sym. Value Symbol's Name\n" msgstr "" -#: readelf.c:854 +#: readelf.c:870 +msgid " Offset Info Type Sym.Value Sym. Name\n" +msgstr "" + +#: readelf.c:878 +msgid "" +" Offset Info Type Symbol's Value " +"Symbol's Name + Addend\n" +msgstr "" + +#: readelf.c:880 msgid "" -" Offset Info Type Symbol's Value " -"Symbol's Name Addend\n" +" Offset Info Type Sym. Value Sym. Name + " +"Addend\n" msgstr "" -#: readelf.c:857 +#: readelf.c:885 msgid "" -" Offset Info Type Symbol's Value " +" Offset Info Type Symbol's Value " "Symbol's Name\n" msgstr "" -#: readelf.c:1061 readelf.c:1063 +#: readelf.c:887 +msgid "" +" Offset Info Type Sym. Value Sym. Name\n" +msgstr "" + +#: readelf.c:1134 readelf.c:1136 readelf.c:1184 readelf.c:1186 readelf.c:1195 +#: readelf.c:1197 #, c-format -msgid "unrecognised: %-7lx" +msgid "unrecognized: %-7lx" msgstr "" -#: readelf.c:1085 +#: readelf.c:1158 #, c-format msgid "<string table index %3ld>" msgstr "" -#: readelf.c:1315 +#: readelf.c:1423 #, c-format msgid "Processor Specific: %lx" msgstr "" -#: readelf.c:1334 +#: readelf.c:1442 #, c-format msgid "Operating System specific: %lx" msgstr "" -#: readelf.c:1337 readelf.c:1961 +#: readelf.c:1445 readelf.c:2086 #, c-format msgid "<unknown>: %lx" msgstr "" -#: readelf.c:1351 +#: readelf.c:1459 msgid "NONE (None)" msgstr "" -#: readelf.c:1352 +#: readelf.c:1460 msgid "REL (Relocatable file)" msgstr "" -#: readelf.c:1353 +#: readelf.c:1461 msgid "EXEC (Executable file)" msgstr "" -#: readelf.c:1354 +#: readelf.c:1462 msgid "DYN (Shared object file)" msgstr "" -#: readelf.c:1355 +#: readelf.c:1463 msgid "CORE (Core file)" msgstr "" -#: readelf.c:1359 +#: readelf.c:1467 #, c-format msgid "Processor Specific: (%x)" msgstr "" -#: readelf.c:1361 +#: readelf.c:1469 #, c-format msgid "OS Specific: (%x)" msgstr "" -#: readelf.c:1363 readelf.c:1460 readelf.c:2112 +#: readelf.c:1471 readelf.c:1573 readelf.c:2238 #, c-format msgid "<unknown>: %x" msgstr "" -#: readelf.c:1376 +#: readelf.c:1484 msgid "None" msgstr "" -#: readelf.c:2152 -msgid "Usage: readelf {options} elf-file(s)\n" -msgstr "" - -#: readelf.c:2153 -msgid " Options are:\n" -msgstr "" - -#: readelf.c:2154 -msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" -msgstr "" - -#: readelf.c:2155 -msgid " -h or --file-header Display the ELF file header\n" -msgstr "" - -#: readelf.c:2156 -msgid " -l or --program-headers or --segments\n" -msgstr "" - -#: readelf.c:2157 -msgid " Display the program headers\n" -msgstr "" - -#: readelf.c:2158 -msgid " -S or --section-headers or --sections\n" -msgstr "" - -#: readelf.c:2159 -msgid " Display the sections' header\n" -msgstr "" - -#: readelf.c:2160 -msgid " -e or --headers Equivalent to: -h -l -S\n" -msgstr "" - -#: readelf.c:2161 -msgid " -s or --syms or --symbols Display the symbol table\n" -msgstr "" - -#: readelf.c:2162 -msgid " -n or --notes Display the core notes (if present)\n" -msgstr "" - -#: readelf.c:2163 -msgid " -r or --relocs Display the relocations (if present)\n" -msgstr "" - -#: readelf.c:2164 -msgid " -u or --unwind Display the unwind info (if present)\n" +#: readelf.c:2278 +msgid "Usage: readelf <option(s)> elf-file(s)\n" msgstr "" -#: readelf.c:2165 -msgid " -d or --dynamic Display the dynamic segment (if present)\n" +#: readelf.c:2279 +msgid " Display information about the contents of ELF format files\n" msgstr "" -#: readelf.c:2166 -msgid " -V or --version-info Display the version sections (if present)\n" -msgstr "" - -#: readelf.c:2167 +#: readelf.c:2280 msgid "" -" -A or --arch-specific Display architecture specific information (if " +" Options are:\n" +" -a --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" +" -h --file-header Display the ELF file header\n" +" -l --program-headers Display the program headers\n" +" --segments An alias for --program-headers\n" +" -S --section-headers Display the sections' header\n" +" --sections An alias for --section-headers\n" +" -e --headers Equivalent to: -h -l -S\n" +" -s --syms Display the symbol table\n" +" --symbols An alias for --syms\n" +" -n --notes Display the core notes (if present)\n" +" -r --relocs Display the relocations (if present)\n" +" -u --unwind Display the unwind info (if present)\n" +" -d --dynamic Display the dynamic segment (if present)\n" +" -V --version-info Display the version sections (if present)\n" +" -A --arch-specific Display architecture specific information (if " "any).\n" -msgstr "" - -#: readelf.c:2168 -msgid "" -" -D or --use-dynamic Use the dynamic section info when displaying " +" -D --use-dynamic Use the dynamic section info when displaying " "symbols\n" +" -x --hex-dump=<number> Dump the contents of section <number>\n" +" -w --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str," +"=loc]\n" +" Display the contents of DWARF2 debug sections\n" msgstr "" -#: readelf.c:2169 -msgid " -x <number> or --hex-dump=<number>\n" -msgstr "" - -#: readelf.c:2170 -msgid " Dump the contents of section <number>\n" -msgstr "" - -#: readelf.c:2171 -msgid "" -" -w[liaprmfs] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro," -"=frames,=str]\n" -msgstr "" - -#: readelf.c:2172 +#: readelf.c:2301 msgid "" -" Display the contents of DWARF2 debug sections\n" -msgstr "" - -#: readelf.c:2174 -msgid " -i <number> or --instruction-dump=<number>\n" +" -i --instruction-dump=<number>\n" +" Disassemble the contents of section <number>\n" msgstr "" -#: readelf.c:2175 +#: readelf.c:2305 msgid "" -" Disassemble the contents of section <number>\n" -msgstr "" - -#: readelf.c:2177 -msgid " -I or --histogram Display histogram of bucket list lengths\n" -msgstr "" - -#: readelf.c:2178 -msgid " -v or --version Display the version number of readelf\n" -msgstr "" - -#: readelf.c:2179 -msgid "" -" -W or --wide Don't split lines or truncate symbols to fit " -"into 80 columns\n" -msgstr "" - -#: readelf.c:2180 -msgid " -H or --help Display this information\n" +" -I --histogram Display histogram of bucket list lengths\n" +" -W --wide Allow output width to exceed 80 characters\n" +" -H --help Display this information\n" +" -v --version Display the version number of readelf\n" msgstr "" -#: readelf.c:2198 +#: readelf.c:2327 msgid "Out of memory allocating dump request table." msgstr "" -#: readelf.c:2357 +#: readelf.c:2491 #, c-format -msgid "Unrecognised debug option '%s'\n" +msgid "Unrecognized debug option '%s'\n" msgstr "" -#: readelf.c:2385 +#: readelf.c:2519 #, c-format msgid "Invalid option '-%c'\n" msgstr "" -#: readelf.c:2398 +#: readelf.c:2532 msgid "Nothing to do.\n" msgstr "" -#: readelf.c:2411 readelf.c:2428 readelf.c:4700 +#: readelf.c:2545 readelf.c:2562 readelf.c:4867 msgid "none" msgstr "" -#: readelf.c:2415 readelf.c:2432 readelf.c:2460 +#: readelf.c:2549 readelf.c:2566 readelf.c:2594 #, c-format msgid "<unknown: %x>" msgstr "" -#: readelf.c:2429 +#: readelf.c:2563 msgid "2's complement, little endian" msgstr "" -#: readelf.c:2430 +#: readelf.c:2564 msgid "2's complement, big endian" msgstr "" -#: readelf.c:2457 +#: readelf.c:2591 msgid "Standalone App" msgstr "" -#: readelf.c:2475 +#: readelf.c:2609 msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "" -#: readelf.c:2483 +#: readelf.c:2617 msgid "ELF Header:\n" msgstr "" -#: readelf.c:2484 +#: readelf.c:2618 msgid " Magic: " msgstr "" -#: readelf.c:2488 +#: readelf.c:2622 #, c-format msgid " Class: %s\n" msgstr "" -#: readelf.c:2490 +#: readelf.c:2624 #, c-format msgid " Data: %s\n" msgstr "" -#: readelf.c:2492 +#: readelf.c:2626 #, c-format msgid " Version: %d %s\n" msgstr "" -#: readelf.c:2499 +#: readelf.c:2633 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: readelf.c:2501 +#: readelf.c:2635 #, c-format msgid " ABI Version: %d\n" msgstr "" -#: readelf.c:2503 +#: readelf.c:2637 #, c-format msgid " Type: %s\n" msgstr "" -#: readelf.c:2505 +#: readelf.c:2639 #, c-format msgid " Machine: %s\n" msgstr "" -#: readelf.c:2507 +#: readelf.c:2641 #, c-format msgid " Version: 0x%lx\n" msgstr "" -#: readelf.c:2510 +#: readelf.c:2644 msgid " Entry point address: " msgstr "" -#: readelf.c:2512 +#: readelf.c:2646 msgid "" "\n" " Start of program headers: " msgstr "" -#: readelf.c:2514 +#: readelf.c:2648 msgid "" " (bytes into file)\n" " Start of section headers: " msgstr "" -#: readelf.c:2516 +#: readelf.c:2650 msgid " (bytes into file)\n" msgstr "" -#: readelf.c:2518 +#: readelf.c:2652 #, c-format msgid " Flags: 0x%lx%s\n" msgstr "" -#: readelf.c:2521 +#: readelf.c:2655 #, c-format msgid " Size of this header: %ld (bytes)\n" msgstr "" -#: readelf.c:2523 +#: readelf.c:2657 #, c-format msgid " Size of program headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2525 +#: readelf.c:2659 #, c-format msgid " Number of program headers: %ld\n" msgstr "" -#: readelf.c:2527 +#: readelf.c:2661 #, c-format msgid " Size of section headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2529 +#: readelf.c:2663 #, c-format msgid " Number of section headers: %ld" msgstr "" -#: readelf.c:2534 +#: readelf.c:2668 #, c-format msgid " Section header string table index: %ld" msgstr "" -#: readelf.c:2568 readelf.c:2604 +#: readelf.c:2702 readelf.c:2738 msgid "program headers" msgstr "" -#: readelf.c:2638 +#: readelf.c:2772 msgid "" "\n" "There are no program headers in this file.\n" msgstr "" -#: readelf.c:2644 +#: readelf.c:2778 #, c-format msgid "" "\n" "Elf file type is %s\n" msgstr "" -#: readelf.c:2645 +#: readelf.c:2779 msgid "Entry point " msgstr "" -#: readelf.c:2647 +#: readelf.c:2781 #, c-format msgid "" "\n" "There are %d program headers, starting at offset " msgstr "" -#: readelf.c:2658 readelf.c:2883 readelf.c:2929 readelf.c:2992 readelf.c:3059 -#: readelf.c:4087 readelf.c:4130 readelf.c:4310 readelf.c:5246 readelf.c:5260 -#: readelf.c:9246 readelf.c:9286 +#: readelf.c:2792 readelf.c:3019 readelf.c:3065 readelf.c:3128 readelf.c:3195 +#: readelf.c:4229 readelf.c:4272 readelf.c:4461 readelf.c:5414 readelf.c:5428 +#: readelf.c:9659 readelf.c:9699 msgid "Out of memory\n" msgstr "" -#: readelf.c:2676 -#, c-format +#: readelf.c:2810 readelf.c:2812 msgid "" "\n" -"Program Header%s:\n" +"Program Headers:\n" msgstr "" -#: readelf.c:2680 +#: readelf.c:2816 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n" msgstr "" -#: readelf.c:2683 +#: readelf.c:2819 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align\n" msgstr "" -#: readelf.c:2687 +#: readelf.c:2823 msgid " Type Offset VirtAddr PhysAddr\n" msgstr "" -#: readelf.c:2689 +#: readelf.c:2825 msgid " FileSiz MemSiz Flags Align\n" msgstr "" -#: readelf.c:2789 +#: readelf.c:2925 msgid "more than one dynamic segment\n" msgstr "" -#: readelf.c:2797 +#: readelf.c:2933 msgid "Unable to find program interpreter name\n" msgstr "" -#: readelf.c:2804 +#: readelf.c:2940 #, c-format msgid "" "\n" " [Requesting program interpreter: %s]" msgstr "" -#: readelf.c:2822 +#: readelf.c:2958 msgid "" "\n" " Section to Segment mapping:\n" msgstr "" -#: readelf.c:2823 +#: readelf.c:2959 msgid " Segment Sections...\n" msgstr "" -#: readelf.c:2874 readelf.c:2920 +#: readelf.c:3010 readelf.c:3056 msgid "section headers" msgstr "" -#: readelf.c:2968 readelf.c:3035 +#: readelf.c:3104 readelf.c:3171 msgid "symbols" msgstr "" -#: readelf.c:2979 readelf.c:3046 +#: readelf.c:3115 readelf.c:3182 msgid "symtab shndx" msgstr "" -#: readelf.c:3147 +#: readelf.c:3284 msgid "" "\n" "There are no sections in this file.\n" msgstr "" -#: readelf.c:3153 +#: readelf.c:3290 #, c-format msgid "There are %d section headers, starting at offset 0x%lx:\n" msgstr "" -#: readelf.c:3170 readelf.c:3479 readelf.c:3826 readelf.c:5397 +#: readelf.c:3307 readelf.c:3621 readelf.c:3968 readelf.c:5565 msgid "string table" msgstr "" -#: readelf.c:3191 +#: readelf.c:3328 msgid "File contains multiple dynamic symbol tables\n" msgstr "" -#: readelf.c:3203 +#: readelf.c:3340 msgid "File contains multiple dynamic string tables\n" msgstr "" -#: readelf.c:3209 +#: readelf.c:3346 msgid "dynamic strings" msgstr "" -#: readelf.c:3215 +#: readelf.c:3352 msgid "File contains multiple symtab shndx tables\n" msgstr "" -#: readelf.c:3250 -#, c-format +#: readelf.c:3390 +msgid "" +"\n" +"Section Headers:\n" +msgstr "" + +#: readelf.c:3392 msgid "" "\n" -"Section Header%s:\n" +"Section Header:\n" msgstr "" -#: readelf.c:3254 +#: readelf.c:3396 msgid "" " [Nr] Name Type Addr Off Size ES Flg Lk " "Inf Al\n" msgstr "" -#: readelf.c:3257 +#: readelf.c:3399 msgid "" " [Nr] Name Type Address Off Size ES " "Flg Lk Inf Al\n" msgstr "" -#: readelf.c:3260 +#: readelf.c:3402 msgid " [Nr] Name Type Address Offset\n" msgstr "" -#: readelf.c:3261 +#: readelf.c:3403 msgid " Size EntSize Flags Link Info Align\n" msgstr "" -#: readelf.c:3356 +#: readelf.c:3498 msgid "" "Key to Flags:\n" " W (write), A (alloc), X (execute), M (merge), S (strings)\n" @@ -2601,510 +2658,500 @@ msgid "" " O (extra OS processing required) o (OS specific), p (processor specific)\n" msgstr "" -#: readelf.c:3417 +#: readelf.c:3559 #, c-format msgid "" "\n" "Relocation section at offset 0x%lx contains %ld bytes:\n" msgstr "" -#: readelf.c:3424 +#: readelf.c:3566 msgid "" "\n" "There are no dynamic relocations in this file.\n" msgstr "" -#: readelf.c:3451 +#: readelf.c:3593 msgid "" "\n" "Relocation section " msgstr "" -#: readelf.c:3458 readelf.c:3905 +#: readelf.c:3598 readelf.c:4031 readelf.c:4045 +#, c-format +msgid "'%s'" +msgstr "" + +#: readelf.c:3600 readelf.c:4047 #, c-format msgid " at offset 0x%lx contains %lu entries:\n" msgstr "" -#: readelf.c:3496 +#: readelf.c:3638 msgid "" "\n" "There are no relocations in this file.\n" msgstr "" -#: readelf.c:3692 +#: readelf.c:3834 msgid "unwind table" msgstr "" -#: readelf.c:3743 readelf.c:3755 readelf.c:7608 readelf.c:7619 +#: readelf.c:3885 readelf.c:3897 readelf.c:7890 readelf.c:7901 #, c-format msgid "Skipping unexpected symbol type %u\n" msgstr "" -#: readelf.c:3763 +#: readelf.c:3905 #, c-format msgid "Skipping unexpected relocation type %s\n" msgstr "" -#: readelf.c:3808 readelf.c:3833 +#: readelf.c:3950 readelf.c:3975 msgid "" "\n" "There are no unwind sections in this file.\n" msgstr "" -#: readelf.c:3884 +#: readelf.c:4026 msgid "" "\n" "Could not find unwind info section for " msgstr "" -#: readelf.c:3896 +#: readelf.c:4038 msgid "unwind info" msgstr "" -#: readelf.c:3898 +#: readelf.c:4040 msgid "" "\n" "Unwind section " msgstr "" -#: readelf.c:4071 readelf.c:4114 +#: readelf.c:4213 readelf.c:4256 msgid "dynamic segment" msgstr "" -#: readelf.c:4183 +#: readelf.c:4334 msgid "" "\n" "There is no dynamic segment in this file.\n" msgstr "" -#: readelf.c:4217 +#: readelf.c:4368 msgid "Unable to seek to end of file!" msgstr "" -#: readelf.c:4228 +#: readelf.c:4379 msgid "Unable to determine the number of symbols to load\n" msgstr "" -#: readelf.c:4258 +#: readelf.c:4409 msgid "Unable to seek to end of file\n" msgstr "" -#: readelf.c:4264 +#: readelf.c:4415 msgid "Unable to determine the length of the dynamic string table\n" msgstr "" -#: readelf.c:4269 +#: readelf.c:4420 msgid "dynamic string table" msgstr "" -#: readelf.c:4303 +#: readelf.c:4454 msgid "symbol information" msgstr "" -#: readelf.c:4327 +#: readelf.c:4478 #, c-format msgid "" "\n" "Dynamic segment at offset 0x%x contains %ld entries:\n" msgstr "" -#: readelf.c:4330 +#: readelf.c:4481 msgid " Tag Type Name/Value\n" msgstr "" -#: readelf.c:4366 +#: readelf.c:4517 msgid "Auxiliary library" msgstr "" -#: readelf.c:4370 +#: readelf.c:4521 msgid "Filter library" msgstr "" -#: readelf.c:4374 +#: readelf.c:4525 msgid "Configuration file" msgstr "" -#: readelf.c:4378 +#: readelf.c:4529 msgid "Dependency audit library" msgstr "" -#: readelf.c:4382 +#: readelf.c:4533 msgid "Audit library" msgstr "" -#: readelf.c:4400 readelf.c:4426 readelf.c:4452 +#: readelf.c:4551 readelf.c:4577 readelf.c:4603 msgid "Flags:" msgstr "" -#: readelf.c:4402 readelf.c:4428 readelf.c:4454 +#: readelf.c:4553 readelf.c:4579 readelf.c:4605 msgid " None\n" msgstr "" -#: readelf.c:4573 +#: readelf.c:4724 #, c-format msgid "Shared library: [%s]" msgstr "" -#: readelf.c:4576 +#: readelf.c:4727 msgid " program interpreter" msgstr "" -#: readelf.c:4580 +#: readelf.c:4731 #, c-format msgid "Library soname: [%s]" msgstr "" -#: readelf.c:4584 +#: readelf.c:4735 #, c-format msgid "Library rpath: [%s]" msgstr "" -#: readelf.c:4588 +#: readelf.c:4739 #, c-format msgid "Library runpath: [%s]" msgstr "" -#: readelf.c:4649 +#: readelf.c:4802 #, c-format msgid "Not needed object: [%s]\n" msgstr "" -#: readelf.c:4746 +#: readelf.c:4913 #, c-format msgid "" "\n" "Version definition section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:4749 +#: readelf.c:4916 msgid " Addr: 0x" msgstr "" -#: readelf.c:4751 readelf.c:4946 +#: readelf.c:4918 readelf.c:5113 #, c-format msgid " Offset: %#08lx Link: %lx (%s)\n" msgstr "" -#: readelf.c:4758 +#: readelf.c:4925 msgid "version definition section" msgstr "" -#: readelf.c:4784 +#: readelf.c:4951 #, c-format msgid " %#06x: Rev: %d Flags: %s" msgstr "" -#: readelf.c:4787 +#: readelf.c:4954 #, c-format msgid " Index: %d Cnt: %d " msgstr "" -#: readelf.c:4798 +#: readelf.c:4965 #, c-format msgid "Name: %s\n" msgstr "" -#: readelf.c:4800 +#: readelf.c:4967 #, c-format msgid "Name index: %ld\n" msgstr "" -#: readelf.c:4815 +#: readelf.c:4982 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: readelf.c:4818 +#: readelf.c:4985 #, c-format msgid " %#06x: Parent %d, name index: %ld\n" msgstr "" -#: readelf.c:4837 +#: readelf.c:5004 #, c-format msgid "" "\n" "Version needs section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:4840 +#: readelf.c:5007 msgid " Addr: 0x" msgstr "" -#: readelf.c:4842 +#: readelf.c:5009 #, c-format msgid " Offset: %#08lx Link to section: %ld (%s)\n" msgstr "" -#: readelf.c:4848 +#: readelf.c:5015 msgid "version need section" msgstr "" -#: readelf.c:4870 +#: readelf.c:5037 #, c-format msgid " %#06x: Version: %d" msgstr "" -#: readelf.c:4873 +#: readelf.c:5040 #, c-format msgid " File: %s" msgstr "" -#: readelf.c:4875 +#: readelf.c:5042 #, c-format msgid " File: %lx" msgstr "" -#: readelf.c:4877 +#: readelf.c:5044 #, c-format msgid " Cnt: %d\n" msgstr "" -#: readelf.c:4895 +#: readelf.c:5062 #, c-format msgid " %#06x: Name: %s" msgstr "" -#: readelf.c:4898 +#: readelf.c:5065 #, c-format msgid " %#06x: Name index: %lx" msgstr "" -#: readelf.c:4901 +#: readelf.c:5068 #, c-format msgid " Flags: %s Version: %d\n" msgstr "" -#: readelf.c:4937 +#: readelf.c:5104 msgid "version string table" msgstr "" -#: readelf.c:4941 +#: readelf.c:5108 #, c-format msgid "" "\n" "Version symbols section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:4944 +#: readelf.c:5111 msgid " Addr: " msgstr "" -#: readelf.c:4954 +#: readelf.c:5121 msgid "version symbol data" msgstr "" -#: readelf.c:4981 +#: readelf.c:5148 msgid " 0 (*local*) " msgstr "" -#: readelf.c:4985 +#: readelf.c:5152 msgid " 1 (*global*) " msgstr "" -#: readelf.c:5020 readelf.c:5454 +#: readelf.c:5187 readelf.c:5622 msgid "version need" msgstr "" -#: readelf.c:5030 +#: readelf.c:5197 msgid "version need aux (2)" msgstr "" -#: readelf.c:5071 readelf.c:5516 +#: readelf.c:5238 readelf.c:5684 msgid "version def" msgstr "" -#: readelf.c:5090 readelf.c:5531 +#: readelf.c:5257 readelf.c:5699 msgid "version def aux" msgstr "" -#: readelf.c:5121 +#: readelf.c:5288 msgid "" "\n" "No version information found in this file.\n" msgstr "" -#: readelf.c:5139 readelf.c:5174 -#, c-format -msgid "<processor specific>: %d" -msgstr "" - -#: readelf.c:5141 readelf.c:5186 -#, c-format -msgid "<OS specific>: %d" -msgstr "" - -#: readelf.c:5143 readelf.c:5189 -#, c-format -msgid "<unknown>: %d" -msgstr "" - -#: readelf.c:5252 +#: readelf.c:5420 msgid "Unable to read in dynamic data\n" msgstr "" -#: readelf.c:5294 +#: readelf.c:5462 msgid "Unable to seek to start of dynamic information" msgstr "" -#: readelf.c:5300 +#: readelf.c:5468 msgid "Failed to read in number of buckets\n" msgstr "" -#: readelf.c:5306 +#: readelf.c:5474 msgid "Failed to read in number of chains\n" msgstr "" -#: readelf.c:5326 +#: readelf.c:5494 msgid "" "\n" "Symbol table for image:\n" msgstr "" -#: readelf.c:5328 +#: readelf.c:5496 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:5330 +#: readelf.c:5498 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:5375 +#: readelf.c:5543 #, c-format msgid "" "\n" "Symbol table '%s' contains %lu entries:\n" msgstr "" -#: readelf.c:5379 +#: readelf.c:5547 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:5381 +#: readelf.c:5549 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:5427 +#: readelf.c:5595 msgid "version data" msgstr "" -#: readelf.c:5467 +#: readelf.c:5635 msgid "version need aux (3)" msgstr "" -#: readelf.c:5492 +#: readelf.c:5660 msgid "bad dynamic symbol" msgstr "" -#: readelf.c:5554 +#: readelf.c:5722 msgid "" "\n" "Dynamic symbol information is not available for displaying symbols.\n" msgstr "" -#: readelf.c:5566 +#: readelf.c:5734 #, c-format msgid "" "\n" "Histogram for bucket list length (total of %d buckets):\n" msgstr "" -#: readelf.c:5568 +#: readelf.c:5736 #, c-format msgid " Length Number %% of total Coverage\n" msgstr "" -#: readelf.c:5573 readelf.c:5592 readelf.c:8825 readelf.c:9017 +#: readelf.c:5741 readelf.c:5760 readelf.c:9146 readelf.c:9338 msgid "Out of memory" msgstr "" -#: readelf.c:5641 +#: readelf.c:5809 #, c-format msgid "" "\n" "Dynamic info segment at offset 0x%lx contains %d entries:\n" msgstr "" -#: readelf.c:5644 +#: readelf.c:5812 msgid " Num: Name BoundTo Flags\n" msgstr "" -#: readelf.c:5696 +#: readelf.c:5864 #, c-format msgid "" "\n" "Assembly dump of section %s\n" msgstr "" -#: readelf.c:5719 +#: readelf.c:5887 #, c-format msgid "" "\n" "Section '%s' has no data to dump.\n" msgstr "" -#: readelf.c:5724 +#: readelf.c:5892 #, c-format msgid "" "\n" "Hex dump of section '%s':\n" msgstr "" -#: readelf.c:5729 +#: readelf.c:5897 msgid "section data" msgstr "" -#: readelf.c:5878 +#: readelf.c:6046 msgid "badly formed extended line op encountered!\n" msgstr "" -#: readelf.c:5885 +#: readelf.c:6053 #, c-format msgid " Extended opcode %d: " msgstr "" -#: readelf.c:5890 +#: readelf.c:6058 msgid "" "End of Sequence\n" "\n" msgstr "" -#: readelf.c:5896 +#: readelf.c:6064 #, c-format msgid "set Address to 0x%lx\n" msgstr "" -#: readelf.c:5901 +#: readelf.c:6069 msgid " define new File Table entry\n" msgstr "" -#: readelf.c:5902 readelf.c:6031 +#: readelf.c:6070 readelf.c:6199 msgid " Entry\tDir\tTime\tSize\tName\n" msgstr "" -#: readelf.c:5904 +#: readelf.c:6072 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:5907 readelf.c:5909 readelf.c:5911 readelf.c:6043 readelf.c:6045 -#: readelf.c:6047 +#: readelf.c:6075 readelf.c:6077 readelf.c:6079 readelf.c:6211 readelf.c:6213 +#: readelf.c:6215 #, c-format msgid "%lu\t" msgstr "" -#: readelf.c:5912 +#: readelf.c:6080 #, c-format msgid "" "%s\n" "\n" msgstr "" -#: readelf.c:5916 +#: readelf.c:6084 #, c-format msgid "UNKNOWN: length %d\n" msgstr "" -#: readelf.c:5942 +#: readelf.c:6110 #, c-format msgid "" "\n" @@ -3112,629 +3159,672 @@ msgid "" "\n" msgstr "" -#: readelf.c:5954 +#: readelf.c:6122 msgid "64-bit DWARF line info is not supported yet.\n" msgstr "" -#: readelf.c:5961 +#: readelf.c:6129 msgid "The line info appears to be corrupt - the section is too small\n" msgstr "" -#: readelf.c:5969 +#: readelf.c:6137 msgid "Only DWARF version 2 line info is currently supported.\n" msgstr "" -#: readelf.c:5984 +#: readelf.c:6152 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:5985 +#: readelf.c:6153 #, c-format msgid " DWARF Version: %d\n" msgstr "" -#: readelf.c:5986 +#: readelf.c:6154 #, c-format msgid " Prologue Length: %d\n" msgstr "" -#: readelf.c:5987 +#: readelf.c:6155 #, c-format msgid " Minimum Instruction Length: %d\n" msgstr "" -#: readelf.c:5988 +#: readelf.c:6156 #, c-format msgid " Initial value of 'is_stmt': %d\n" msgstr "" -#: readelf.c:5989 +#: readelf.c:6157 #, c-format msgid " Line Base: %d\n" msgstr "" -#: readelf.c:5990 +#: readelf.c:6158 #, c-format msgid " Line Range: %d\n" msgstr "" -#: readelf.c:5991 +#: readelf.c:6159 #, c-format msgid " Opcode Base: %d\n" msgstr "" -#: readelf.c:6000 +#: readelf.c:6168 msgid "" "\n" " Opcodes:\n" msgstr "" -#: readelf.c:6003 +#: readelf.c:6171 #, c-format msgid " Opcode %d has %d args\n" msgstr "" -#: readelf.c:6009 +#: readelf.c:6177 msgid "" "\n" " The Directory Table is empty.\n" msgstr "" -#: readelf.c:6012 +#: readelf.c:6180 msgid "" "\n" " The Directory Table:\n" msgstr "" -#: readelf.c:6016 +#: readelf.c:6184 #, c-format msgid " %s\n" msgstr "" -#: readelf.c:6027 +#: readelf.c:6195 msgid "" "\n" " The File Name Table is empty.\n" msgstr "" -#: readelf.c:6030 +#: readelf.c:6198 msgid "" "\n" " The File Name Table:\n" msgstr "" -#: readelf.c:6038 +#: readelf.c:6206 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:6049 +#: readelf.c:6217 #, c-format msgid "%s\n" msgstr "" #. Now display the statements. -#: readelf.c:6057 +#: readelf.c:6225 msgid "" "\n" " Line Number Statements:\n" msgstr "" -#: readelf.c:6073 +#: readelf.c:6241 #, c-format msgid " Special opcode %d: advance Address by %d to 0x%lx" msgstr "" -#: readelf.c:6077 +#: readelf.c:6245 #, c-format msgid " and Line by %d to %d\n" msgstr "" -#: readelf.c:6088 +#: readelf.c:6256 msgid " Copy\n" msgstr "" -#: readelf.c:6095 +#: readelf.c:6263 #, c-format msgid " Advance PC by %d to %lx\n" msgstr "" -#: readelf.c:6103 +#: readelf.c:6271 #, c-format msgid " Advance Line by %d to %d\n" msgstr "" -#: readelf.c:6110 +#: readelf.c:6278 #, c-format msgid " Set File Name to entry %d in the File Name Table\n" msgstr "" -#: readelf.c:6118 +#: readelf.c:6286 #, c-format msgid " Set column to %d\n" msgstr "" -#: readelf.c:6125 +#: readelf.c:6293 #, c-format msgid " Set is_stmt to %d\n" msgstr "" -#: readelf.c:6130 +#: readelf.c:6298 msgid " Set basic block\n" msgstr "" -#: readelf.c:6138 +#: readelf.c:6306 #, c-format msgid " Advance PC by constant %d to 0x%lx\n" msgstr "" -#: readelf.c:6146 +#: readelf.c:6314 #, c-format msgid " Advance PC by fixed size amount %d to 0x%lx\n" msgstr "" -#: readelf.c:6151 +#: readelf.c:6319 msgid " Set prologue_end to true\n" msgstr "" -#: readelf.c:6155 +#: readelf.c:6323 msgid " Set epilogue_begin to true\n" msgstr "" -#: readelf.c:6161 +#: readelf.c:6329 #, c-format msgid " Set ISA to %d\n" msgstr "" -#: readelf.c:6165 +#: readelf.c:6333 #, c-format msgid " Unknown opcode %d with operands: " msgstr "" -#: readelf.c:6197 readelf.c:6658 readelf.c:6730 +#: readelf.c:6365 readelf.c:6827 readelf.c:6899 #, c-format msgid "" "Contents of the %s section:\n" "\n" msgstr "" -#: readelf.c:6216 +#: readelf.c:6384 msgid "64-bit DWARF pubnames are not supported yet.\n" msgstr "" -#: readelf.c:6226 +#: readelf.c:6394 msgid "Only DWARF 2 pubnames are currently supported\n" msgstr "" -#: readelf.c:6233 +#: readelf.c:6401 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:6235 +#: readelf.c:6403 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:6237 +#: readelf.c:6405 #, c-format msgid " Offset into .debug_info section: %ld\n" msgstr "" -#: readelf.c:6239 +#: readelf.c:6407 #, c-format msgid " Size of area in .debug_info section: %ld\n" msgstr "" -#: readelf.c:6242 +#: readelf.c:6410 msgid "" "\n" " Offset\tName\n" msgstr "" -#: readelf.c:6333 +#: readelf.c:6501 #, c-format msgid "Unknown TAG value: %lx" msgstr "" -#: readelf.c:6443 +#: readelf.c:6612 #, c-format msgid "Unknown AT value: %lx" msgstr "" -#: readelf.c:6480 +#: readelf.c:6649 #, c-format msgid "Unknown FORM value: %lx" msgstr "" -#: readelf.c:6679 +#: readelf.c:6848 #, c-format msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n" msgstr "" -#: readelf.c:6684 +#: readelf.c:6853 msgid " DW_MACINFO_end_file\n" msgstr "" -#: readelf.c:6692 +#: readelf.c:6861 #, c-format msgid " DW_MACINFO_define - lineno : %d macro : %s\n" msgstr "" -#: readelf.c:6700 +#: readelf.c:6869 #, c-format msgid " DW_MACINFO_undef - lineno : %d macro : %s\n" msgstr "" -#: readelf.c:6711 +#: readelf.c:6880 #, c-format msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n" msgstr "" -#: readelf.c:6739 +#: readelf.c:6908 msgid " Number TAG\n" msgstr "" -#: readelf.c:6745 +#: readelf.c:6914 #, c-format msgid " %ld %s [%s]\n" msgstr "" -#: readelf.c:6748 +#: readelf.c:6917 msgid "has children" msgstr "" -#: readelf.c:6748 +#: readelf.c:6917 msgid "no children" msgstr "" -#: readelf.c:6752 +#: readelf.c:6921 #, c-format msgid " %-18s %s\n" msgstr "" -#: readelf.c:6773 +#: readelf.c:6942 #, c-format msgid " %lu byte block: " msgstr "" -#: readelf.c:7096 +#: readelf.c:7265 msgid "(User defined location op)" msgstr "" -#: readelf.c:7098 +#: readelf.c:7267 msgid "(Unknown location op)" msgstr "" -#: readelf.c:7137 +#: readelf.c:7305 +msgid "debug_loc section data" +msgstr "" + +#: readelf.c:7336 +msgid "" +"\n" +"The .debug_loc section is empty.\n" +msgstr "" + +#: readelf.c:7339 +msgid "" +"Contents of the .debug_loc section:\n" +"\n" +msgstr "" + +#: readelf.c:7340 +msgid "" +"\n" +" Offset Begin End Expression\n" +msgstr "" + +#: readelf.c:7412 msgid "debug_str section data" msgstr "" -#: readelf.c:7156 +#: readelf.c:7431 msgid "<no .debug_str section>" msgstr "" -#: readelf.c:7159 +#: readelf.c:7434 msgid "<offset is too big>" msgstr "" -#: readelf.c:7179 +#: readelf.c:7454 msgid "" "\n" "The .debug_str section is empty.\n" msgstr "" -#: readelf.c:7183 +#: readelf.c:7458 msgid "" "Contents of the .debug_str section:\n" "\n" msgstr "" -#: readelf.c:7354 +#: readelf.c:7629 #, c-format msgid " (indirect string, offset: 0x%lx): " msgstr "" -#: readelf.c:7363 +#: readelf.c:7638 #, c-format -msgid "Unrecognised form: %d\n" +msgid "Unrecognized form: %d\n" msgstr "" -#: readelf.c:7376 +#: readelf.c:7651 msgid "(not inlined)" msgstr "" -#: readelf.c:7377 +#: readelf.c:7652 msgid "(inlined)" msgstr "" -#: readelf.c:7378 +#: readelf.c:7653 msgid "(declared as inline but ignored)" msgstr "" -#: readelf.c:7379 +#: readelf.c:7654 msgid "(declared as inline and inlined)" msgstr "" -#: readelf.c:7380 +#: readelf.c:7655 #, c-format msgid " (Unknown inline attribute value: %lx)" msgstr "" -#: readelf.c:7545 readelf.c:7746 +#: readelf.c:7826 readelf.c:8029 #, c-format msgid "" "The section %s contains:\n" "\n" msgstr "" -#: readelf.c:7568 +#: readelf.c:7850 msgid "64-bit DWARF debug info is not supported yet.\n" msgstr "" -#: readelf.c:7637 +#: readelf.c:7919 #, c-format msgid " Compilation Unit @ %lx:\n" msgstr "" -#: readelf.c:7638 +#: readelf.c:7920 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:7639 +#: readelf.c:7921 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:7640 +#: readelf.c:7922 #, c-format msgid " Abbrev Offset: %ld\n" msgstr "" -#: readelf.c:7641 +#: readelf.c:7923 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:7645 +#: readelf.c:7927 msgid "Only version 2 DWARF debug information is currently supported.\n" msgstr "" -#: readelf.c:7666 +#: readelf.c:7948 msgid "Unable to locate .debug_abbrev section!\n" msgstr "" -#: readelf.c:7672 +#: readelf.c:7954 msgid "debug_abbrev section data" msgstr "" -#: readelf.c:7709 +#: readelf.c:7991 #, c-format msgid "Unable to locate entry %lu in the abbreviation table\n" msgstr "" -#: readelf.c:7714 +#: readelf.c:7996 #, c-format msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n" msgstr "" -#: readelf.c:7767 +#: readelf.c:8050 msgid "64-bit DWARF aranges are not supported yet.\n" msgstr "" -#: readelf.c:7773 +#: readelf.c:8056 msgid "Only DWARF 2 aranges are currently supported.\n" msgstr "" -#: readelf.c:7777 +#: readelf.c:8060 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:7778 +#: readelf.c:8061 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:7779 +#: readelf.c:8062 #, c-format msgid " Offset into .debug_info: %lx\n" msgstr "" -#: readelf.c:7780 +#: readelf.c:8063 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:7781 +#: readelf.c:8064 #, c-format msgid " Segment Size: %d\n" msgstr "" -#: readelf.c:7783 +#: readelf.c:8066 msgid "" "\n" " Address Length\n" msgstr "" -#: readelf.c:7965 +#: readelf.c:8248 #, c-format msgid "The section %s contains:\n" msgstr "" -#: readelf.c:7988 +#: readelf.c:8271 msgid "64-bit DWARF format frames are not supported yet.\n" msgstr "" -#: readelf.c:8499 +#: readelf.c:8820 #, c-format msgid "Displaying the debug contents of section %s is not yet supported.\n" msgstr "" -#: readelf.c:8565 +#: readelf.c:8886 #, c-format msgid "" "\n" "Section '%s' has no debugging data.\n" msgstr "" -#: readelf.c:8570 readelf.c:8632 +#: readelf.c:8891 readelf.c:8953 msgid "debug section data" msgstr "" -#: readelf.c:8586 +#: readelf.c:8907 #, c-format -msgid "Unrecognised debug section: %s\n" +msgid "Unrecognized debug section: %s\n" msgstr "" -#: readelf.c:8660 +#: readelf.c:8981 msgid "Some sections were not dumped because they do not exist!\n" msgstr "" -#: readelf.c:8733 +#: readelf.c:9054 readelf.c:9418 msgid "liblist" msgstr "" -#: readelf.c:8818 +#: readelf.c:9139 msgid "options" msgstr "" -#: readelf.c:8849 +#: readelf.c:9170 #, c-format msgid "" "\n" "Section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:9010 -msgid "conflict list with without table" +#: readelf.c:9331 +msgid "conflict list found without a dynamic symbol table" msgstr "" -#: readelf.c:9028 readelf.c:9044 +#: readelf.c:9349 readelf.c:9365 msgid "conflict" msgstr "" -#: readelf.c:9054 +#: readelf.c:9375 #, c-format msgid "" "\n" "Section '.conflict' contains %ld entries:\n" msgstr "" -#: readelf.c:9056 +#: readelf.c:9377 msgid " Num: Index Value Name" msgstr "" -#: readelf.c:9083 +#: readelf.c:9426 +msgid "liblist string table" +msgstr "" + +#: readelf.c:9435 +#, c-format +msgid "" +"\n" +"Library list section '%s' contains %lu entries:\n" +msgstr "" + +#: readelf.c:9484 msgid "NT_PRSTATUS (prstatus structure)" msgstr "" -#: readelf.c:9084 +#: readelf.c:9485 msgid "NT_FPREGSET (floating point registers)" msgstr "" -#: readelf.c:9085 +#: readelf.c:9486 msgid "NT_PRPSINFO (prpsinfo structure)" msgstr "" -#: readelf.c:9086 +#: readelf.c:9487 msgid "NT_TASKSTRUCT (task structure)" msgstr "" -#: readelf.c:9087 +#: readelf.c:9488 msgid "NT_PRXFPREG (user_xfpregs structure)" msgstr "" -#: readelf.c:9088 +#: readelf.c:9489 msgid "NT_PSTATUS (pstatus structure)" msgstr "" -#: readelf.c:9089 +#: readelf.c:9490 msgid "NT_FPREGS (floating point registers)" msgstr "" -#: readelf.c:9090 +#: readelf.c:9491 msgid "NT_PSINFO (psinfo structure)" msgstr "" -#: readelf.c:9091 +#: readelf.c:9492 msgid "NT_LWPSTATUS (lwpstatus_t structure)" msgstr "" -#: readelf.c:9092 +#: readelf.c:9493 msgid "NT_LWPSINFO (lwpsinfo_t structure)" msgstr "" -#: readelf.c:9093 -msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)" +#: readelf.c:9494 +msgid "NT_WIN32PSTATUS (win32_pstatus structure)" msgstr "" -#: readelf.c:9095 readelf.c:9119 +#: readelf.c:9496 readelf.c:9520 #, c-format msgid "Unknown note type: (0x%08x)" msgstr "" #. NetBSD core "procinfo" structure. -#: readelf.c:9109 +#: readelf.c:9510 msgid "NetBSD procinfo structure" msgstr "" -#: readelf.c:9136 readelf.c:9150 +#: readelf.c:9537 readelf.c:9551 msgid "PT_GETREGS (reg structure)" msgstr "" -#: readelf.c:9138 readelf.c:9152 +#: readelf.c:9539 readelf.c:9553 msgid "PT_GETFPREGS (fpreg structure)" msgstr "" -#: readelf.c:9158 +#: readelf.c:9559 #, c-format msgid "PT_FIRSTMACH+%d" msgstr "" -#: readelf.c:9212 +#: readelf.c:9613 msgid "notes" msgstr "" -#: readelf.c:9218 +#: readelf.c:9619 #, c-format msgid "" "\n" "Notes at offset 0x%08lx with length 0x%08lx:\n" msgstr "" -#: readelf.c:9220 +#: readelf.c:9621 msgid " Owner\t\tData size\tDescription\n" msgstr "" -#: readelf.c:9331 +#: readelf.c:9640 +#, c-format +msgid "corrupt note found at offset %x into core notes\n" +msgstr "" + +#: readelf.c:9642 +#, c-format +msgid " type: %x, namesize: %08lx, descsize: %08lx\n" +msgstr "" + +#: readelf.c:9744 msgid "No note segments present in the core file.\n" msgstr "" -#: readelf.c:9409 +#: readelf.c:9822 msgid "" "This instance of readelf has been built without support for a\n" "64 bit data type and so it cannot read 64 bit ELF files.\n" msgstr "" -#: readelf.c:9452 +#: readelf.c:9868 #, c-format msgid "Cannot stat input file %s.\n" msgstr "" -#: readelf.c:9459 +#: readelf.c:9875 #, c-format msgid "Input file %s not found.\n" msgstr "" -#: readelf.c:9465 +#: readelf.c:9881 #, c-format msgid "%s: Failed to read file header\n" msgstr "" -#: readelf.c:9479 +#: readelf.c:9895 #, c-format msgid "" "\n" @@ -3757,202 +3847,202 @@ msgstr "" msgid "%s: simple_copy: %s" msgstr "" -#: resbin.c:130 +#: resbin.c:134 #, c-format msgid "%s: not enough binary data" msgstr "" -#: resbin.c:149 +#: resbin.c:153 msgid "null terminated unicode string" msgstr "" -#: resbin.c:179 resbin.c:185 +#: resbin.c:183 resbin.c:189 msgid "resource ID" msgstr "" -#: resbin.c:229 +#: resbin.c:233 msgid "cursor" msgstr "" -#: resbin.c:263 resbin.c:270 +#: resbin.c:267 resbin.c:274 msgid "menu header" msgstr "" -#: resbin.c:280 +#: resbin.c:284 msgid "menuex header" msgstr "" -#: resbin.c:284 +#: resbin.c:288 msgid "menuex offset" msgstr "" -#: resbin.c:291 +#: resbin.c:295 #, c-format msgid "unsupported menu version %d" msgstr "" -#: resbin.c:319 resbin.c:334 resbin.c:400 +#: resbin.c:323 resbin.c:338 resbin.c:404 msgid "menuitem header" msgstr "" -#: resbin.c:430 +#: resbin.c:434 msgid "menuitem" msgstr "" -#: resbin.c:471 resbin.c:499 +#: resbin.c:475 resbin.c:503 msgid "dialog header" msgstr "" -#: resbin.c:489 +#: resbin.c:493 #, c-format -msgid "unexpected dialog signature %d" +msgid "unexpected DIALOGEX version %d" msgstr "" -#: resbin.c:531 +#: resbin.c:538 msgid "dialog font point size" msgstr "" -#: resbin.c:539 +#: resbin.c:546 msgid "dialogex font information" msgstr "" -#: resbin.c:564 resbin.c:582 +#: resbin.c:572 resbin.c:590 msgid "dialog control" msgstr "" -#: resbin.c:574 +#: resbin.c:582 msgid "dialogex control" msgstr "" -#: resbin.c:603 +#: resbin.c:611 msgid "dialog control end" msgstr "" -#: resbin.c:615 +#: resbin.c:623 msgid "dialog control data" msgstr "" -#: resbin.c:658 +#: resbin.c:666 msgid "stringtable string length" msgstr "" -#: resbin.c:668 +#: resbin.c:676 msgid "stringtable string" msgstr "" -#: resbin.c:701 +#: resbin.c:709 msgid "fontdir header" msgstr "" -#: resbin.c:714 +#: resbin.c:722 msgid "fontdir" msgstr "" -#: resbin.c:730 +#: resbin.c:738 msgid "fontdir device name" msgstr "" -#: resbin.c:736 +#: resbin.c:744 msgid "fontdir face name" msgstr "" -#: resbin.c:779 +#: resbin.c:787 msgid "accelerator" msgstr "" -#: resbin.c:843 +#: resbin.c:851 msgid "group cursor header" msgstr "" -#: resbin.c:847 +#: resbin.c:855 #, c-format msgid "unexpected group cursor type %d" msgstr "" -#: resbin.c:862 +#: resbin.c:870 msgid "group cursor" msgstr "" -#: resbin.c:901 +#: resbin.c:909 msgid "group icon header" msgstr "" -#: resbin.c:905 +#: resbin.c:913 #, c-format msgid "unexpected group icon type %d" msgstr "" -#: resbin.c:920 +#: resbin.c:928 msgid "group icon" msgstr "" -#: resbin.c:991 resbin.c:1210 +#: resbin.c:999 resbin.c:1218 msgid "unexpected version string" msgstr "" -#: resbin.c:1025 +#: resbin.c:1033 #, c-format msgid "version length %d does not match resource length %lu" msgstr "" -#: resbin.c:1029 +#: resbin.c:1037 #, c-format msgid "unexpected version type %d" msgstr "" -#: resbin.c:1041 +#: resbin.c:1049 #, c-format msgid "unexpected fixed version information length %d" msgstr "" -#: resbin.c:1044 +#: resbin.c:1052 msgid "fixed version info" msgstr "" -#: resbin.c:1048 +#: resbin.c:1056 #, c-format msgid "unexpected fixed version signature %lu" msgstr "" -#: resbin.c:1052 +#: resbin.c:1060 #, c-format msgid "unexpected fixed version info version %lu" msgstr "" -#: resbin.c:1081 +#: resbin.c:1089 msgid "version var info" msgstr "" -#: resbin.c:1098 +#: resbin.c:1106 #, c-format msgid "unexpected stringfileinfo value length %d" msgstr "" -#: resbin.c:1108 +#: resbin.c:1116 #, c-format msgid "unexpected version stringtable value length %d" msgstr "" -#: resbin.c:1142 +#: resbin.c:1150 #, c-format msgid "unexpected version string length %d != %d + %d" msgstr "" -#: resbin.c:1153 +#: resbin.c:1161 #, c-format msgid "unexpected version string length %d < %d" msgstr "" -#: resbin.c:1170 +#: resbin.c:1178 #, c-format msgid "unexpected varfileinfo value length %d" msgstr "" -#: resbin.c:1189 +#: resbin.c:1197 msgid "version varfileinfo" msgstr "" -#: resbin.c:1204 +#: resbin.c:1212 #, c-format msgid "unexpected version value length %d" msgstr "" @@ -4075,96 +4165,107 @@ msgstr "" msgid "Using `%s'\n" msgstr "" -#: resrc.c:541 +#: resrc.c:542 #, c-format msgid "%s:%d: %s\n" msgstr "" -#: resrc.c:550 +#: resrc.c:551 #, c-format msgid "%s: unexpected EOF" msgstr "" -#: resrc.c:607 +#: resrc.c:608 #, c-format msgid "%s: read of %lu returned %lu" msgstr "" -#: resrc.c:649 resrc.c:903 resrc.c:1176 resrc.c:1330 +#: resrc.c:650 resrc.c:904 resrc.c:1177 resrc.c:1331 #, c-format msgid "stat failed on bitmap file `%s': %s" msgstr "" -#: resrc.c:702 +#: resrc.c:703 #, c-format msgid "cursor file `%s' does not contain cursor data" msgstr "" -#: resrc.c:734 resrc.c:1047 +#: resrc.c:735 resrc.c:1048 #, c-format msgid "%s: fseek to %lu failed: %s" msgstr "" -#: resrc.c:871 +#: resrc.c:872 msgid "help ID requires DIALOGEX" msgstr "" -#: resrc.c:873 +#: resrc.c:874 msgid "control data requires DIALOGEX" msgstr "" -#: resrc.c:1016 +#: resrc.c:1017 #, c-format msgid "icon file `%s' does not contain icon data" msgstr "" -#: resrc.c:1535 +#: resrc.c:1536 #, c-format msgid "can't open `%s' for output: %s" msgstr "" -#: size.c:79 -#, c-format -msgid "" -"Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n" -" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" -" [-V | --version] [--target=bfdname] [--help] [file...]\n" +#: size.c:86 +msgid " Displays the sizes of sections inside binary files\n" msgstr "" -#: size.c:85 -msgid "default is --format=berkeley\n" +#: size.c:87 +msgid " If no input file(s) are specified, a.out is assumed\n" msgstr "" -#: size.c:87 -msgid "default is --format=sysv\n" +#: size.c:88 +#, c-format +msgid "" +" The options are:\n" +" -A|-B --format={sysv|berkeley} Select output style (default is %s)\n" +" -o|-d|-h --radix={8|10|16} Display numbers in octal, decimal or " +"hex\n" +" -t --totals Display the total sizes (Berkeley " +"only)\n" +" --target=<bfdname> Set the binary file format\n" +" -h --help Display this information\n" +" -v --version Display the program's version\n" +"\n" msgstr "" -#: size.c:146 +#: size.c:160 #, c-format msgid "invalid argument to --format: %s" msgstr "" -#: size.c:173 +#: size.c:187 #, c-format msgid "Invalid radix: %s\n" msgstr "" -#: srconv.c:1931 -#, c-format -msgid "Usage: %s [-dhVq] in-file [out-file]\n" +#: srconv.c:1953 +msgid "Convert a COFF object file into a SYSROFF object file\n" msgstr "" -#: srconv.c:1938 -#, c-format -msgid "%s: Convert a COFF object file into a SYSROFF object file\n" +#: srconv.c:1954 +msgid "" +" The options are:\n" +" -q --quick (Obsolete - ignoerd)\n" +" -n --noprescan Do not perform a scan to convert commons into defs\n" +" -d --debug Display information about what is being done\n" +" -h --help Display this information\n" +" -v --version Print the program's version number\n" msgstr "" -#: srconv.c:2074 +#: srconv.c:2099 #, c-format msgid "unable to open output file %s" msgstr "" -#: stabs.c:343 stabs.c:1760 +#: stabs.c:343 stabs.c:1759 msgid "numeric overflow" msgstr "" @@ -4178,118 +4279,137 @@ msgstr "" msgid "Warning: %s: %s\n" msgstr "" -#: stabs.c:486 +#: stabs.c:485 msgid "N_LBRAC not within function\n" msgstr "" -#: stabs.c:525 +#: stabs.c:524 msgid "Too many N_RBRACs\n" msgstr "" -#: stabs.c:770 +#: stabs.c:769 msgid "unknown C++ encoded name" msgstr "" #. Complain and keep going, so compilers can invent new #. cross-reference types. -#: stabs.c:1297 +#: stabs.c:1296 msgid "unrecognized cross reference type" msgstr "" #. Does this actually ever happen? Is that why we are worrying #. about dealing with it rather than just calling error_type? -#: stabs.c:1852 +#: stabs.c:1851 msgid "missing index type" msgstr "" -#: stabs.c:2179 +#: stabs.c:2178 msgid "unknown virtual character for baseclass" msgstr "" -#: stabs.c:2197 +#: stabs.c:2196 msgid "unknown visibility character for baseclass" msgstr "" -#: stabs.c:2389 +#: stabs.c:2388 msgid "unnamed $vb type" msgstr "" -#: stabs.c:2395 +#: stabs.c:2394 msgid "unrecognized C++ abbreviation" msgstr "" -#: stabs.c:2475 +#: stabs.c:2474 msgid "unknown visibility character for field" msgstr "" -#: stabs.c:2731 +#: stabs.c:2730 msgid "const/volatile indicator missing" msgstr "" -#: stabs.c:2971 +#: stabs.c:2970 #, c-format msgid "No mangling for \"%s\"\n" msgstr "" -#: stabs.c:3284 +#: stabs.c:3283 msgid "Undefined N_EXCL" msgstr "" -#: stabs.c:3372 +#: stabs.c:3371 #, c-format msgid "Type file number %d out of range\n" msgstr "" -#: stabs.c:3377 +#: stabs.c:3376 #, c-format msgid "Type index number %d out of range\n" msgstr "" -#: stabs.c:3464 +#: stabs.c:3463 #, c-format msgid "Unrecognized XCOFF type %d\n" msgstr "" -#: stabs.c:3763 +#: stabs.c:3762 #, c-format msgid "bad mangled name `%s'\n" msgstr "" -#: stabs.c:3859 +#: stabs.c:3858 msgid "no argument types in mangled string\n" msgstr "" -#: strings.c:199 +#: strings.c:200 #, c-format msgid "invalid number %s" msgstr "" -#: strings.c:638 +#: strings.c:640 #, c-format msgid "invalid integer argument %s" msgstr "" -#: strings.c:648 -#, c-format -msgid "" -"Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-e {s,b,l,B,L}]\n" -" [-] [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n" -" [--target=bfdname] [--encoding {s,b,l,B,L}] [--help] [--version] " -"file...\n" +#: strings.c:651 +msgid " Display printable strings in [file(s)] (stdin by default)\n" msgstr "" -#: sysdump.c:733 -#, c-format -msgid "Usage: %s [-hV] in-file\n" +#: strings.c:652 +msgid "" +" The options are:\n" +" -a - --all Scan the entire file, not just the data section\n" +" -f --print-file-name Print the name of the file before each string\n" +" -n --bytes=[number] Locate & print any NUL-terminated sequence of " +"at\n" +" -<number> least [number] characters (default 4).\n" +" -t --radix={o,x,d} Print the location of the string in base 8, 10 " +"or 16\n" +" -o An alias for --radix=o\n" +" -T --target=<BFDNAME> Specify the binary file format\n" +" -e --encoding={s,b,l,B,L} Select character size and endianness:\n" +" s = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit\n" +" -h --help Display this information\n" +" -v --version Print the program's version number\n" +msgstr "" + +#: sysdump.c:768 +msgid "Print a human readable interpretation of a SYSROFF object file\n" +msgstr "" + +#: sysdump.c:769 +msgid "" +" The options are:\n" +" -h --help Display this information\n" +" -v --version Print the program's version number\n" msgstr "" -#: sysdump.c:805 +#: sysdump.c:836 #, c-format msgid "cannot open input file %s" msgstr "" #: version.c:35 -msgid "Copyright 2001 Free Software Foundation, Inc.\n" +msgid "Copyright 2002 Free Software Foundation, Inc.\n" msgstr "" #: version.c:36 @@ -4298,25 +4418,25 @@ msgid "" "the GNU General Public License. This program has absolutely no warranty.\n" msgstr "" -#: windres.c:237 +#: windres.c:239 #, c-format msgid "can't open %s `%s': %s" msgstr "" -#: windres.c:416 +#: windres.c:418 msgid ": expected to be a directory\n" msgstr "" -#: windres.c:428 +#: windres.c:430 msgid ": expected to be a leaf\n" msgstr "" -#: windres.c:437 +#: windres.c:439 #, c-format msgid "%s: warning: " msgstr "" -#: windres.c:439 +#: windres.c:441 msgid ": duplicate value\n" msgstr "" @@ -4331,59 +4451,57 @@ msgid "%s: supported formats:" msgstr "" #. Otherwise, we give up. -#: windres.c:690 +#: windres.c:688 #, c-format msgid "can not determine type of file `%s'; use the -I option" msgstr "" -#: windres.c:704 +#: windres.c:702 #, c-format -msgid "Usage: %s [options] [input-file] [output-file]\n" +msgid "Usage: %s [option(s)] [input-file] [output-file]\n" msgstr "" -#: windres.c:706 +#: windres.c:704 msgid "" -"Options:\n" -" -i FILE, --input FILE Name input file\n" -" -o FILE, --output FILE Name output file\n" -" -I FORMAT, --input-format FORMAT\n" -" Specify input format\n" -" -O FORMAT, --output-format FORMAT\n" -" Specify output format\n" -" -F TARGET, --target TARGET Specify COFF target\n" -" --preprocessor PROGRAM Program to use to preprocess rc file\n" -" --include-dir DIR Include directory when preprocessing rc file\n" -" -DSYM[=VAL], --define SYM[=VAL]\n" -" Define SYM when preprocessing rc file\n" -" -v Verbose - tells you what it's doing\n" -" --language VAL Set language when reading rc file\n" -" --use-temp-file Use a temporary file instead of popen to read\n" -" the preprocessor output\n" -" --no-use-temp-file Use popen (default)\n" -msgstr "" - -#: windres.c:725 -msgid " --yydebug Turn on parser debugging\n" -msgstr "" - -#: windres.c:728 +" The options are:\n" +" -i --input=<file> Name input file\n" +" -o --output=<file> Name output file\n" +" -I --input-format=<format> Specify input format\n" +" -O --output-format=<format> Specify output format\n" +" -F --target=<target> Specify COFF target\n" +" --preprocessor=<program> Program to use to preprocess rc file\n" +" --include-dir=<dir> Include directory when preprocessing rc file\n" +" -D --define <sym>[=<val>] Define SYM when preprocessing rc file\n" +" -v --verbose Verbose - tells you what it's doing\n" +" --language=<val> Set language when reading rc file\n" +" --use-temp-file Use a temporary file instead of popen to " +"read\n" +" the preprocessor output\n" +" --no-use-temp-file Use popen (default)\n" +msgstr "" + +#: windres.c:719 +msgid " --yydebug Turn on parser debugging\n" +msgstr "" + +#: windres.c:722 msgid "" -" --help Print this help message\n" -" --version Print version information\n" +" -h --help Print this help message\n" +" -V --version Print version information\n" msgstr "" -#: windres.c:731 +#: windres.c:725 msgid "" "FORMAT is one of rc, res, or coff, and is deduced from the file name\n" "extension if not specified. A single file name is an input file.\n" "No input-file is stdin, default rc. No output-file is stdout, default rc.\n" msgstr "" -#: windres.c:983 +#: windres.c:988 msgid "no resources" msgstr "" -#: wrstabs.c:366 wrstabs.c:2027 +#: wrstabs.c:366 wrstabs.c:2026 #, c-format msgid "string_hash_lookup failed: %s" msgstr "" @@ -4393,7 +4511,7 @@ msgstr "" msgid "stab_int_type: bad size %u" msgstr "" -#: wrstabs.c:1467 +#: wrstabs.c:1466 #, c-format msgid "%s: warning: unknown size for field `%s' in struct" msgstr "" diff --git a/contrib/binutils/binutils/prdbg.c b/contrib/binutils/binutils/prdbg.c index 41c78cb..8bb0053 100644 --- a/contrib/binutils/binutils/prdbg.c +++ b/contrib/binutils/binutils/prdbg.c @@ -693,7 +693,6 @@ pr_range_type (p, lower, upper) /* Make an array type. */ -/*ARGSUSED*/ static boolean pr_array_type (p, lower, upper, stringp) PTR p; @@ -747,7 +746,6 @@ pr_array_type (p, lower, upper, stringp) /* Make a set type. */ -/*ARGSUSED*/ static boolean pr_set_type (p, bitstringp) PTR p; @@ -1598,7 +1596,6 @@ pr_typdef (p, name) /* Output a tag. The tag should already be in the string on the stack, so all we have to do here is print it out. */ -/*ARGSUSED*/ static boolean pr_tag (p, name) PTR p; @@ -1853,7 +1850,6 @@ pr_end_block (p, addr) /* Finish writing out a function. */ -/*ARGSUSED*/ static boolean pr_end_function (p) PTR p ATTRIBUTE_UNUSED; diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c index 2a2bd10..bc9e68c 100644 --- a/contrib/binutils/binutils/rclex.c +++ b/contrib/binutils/binutils/rclex.c @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.6.2 2002/05/11 20:00:49 drow Exp $ + * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.8.1 2002/08/05 20:43:45 drow Exp $ */ #define FLEX_SCANNER @@ -24,12 +24,6 @@ #include <stdlib.h> #ifndef _WIN32 #include <unistd.h> -#else -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif #endif /* Use prototypes in function declarations. */ @@ -714,7 +708,7 @@ static void cpp_line PARAMS ((const char *)); static char *handle_quotes PARAMS ((const char *, unsigned long *)); static char *get_string PARAMS ((int)); -#line 718 "lex.yy.c" +#line 712 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -879,7 +873,7 @@ YY_DECL #line 75 "rclex.l" -#line 883 "lex.yy.c" +#line 877 "lex.yy.c" if ( yy_init ) { @@ -1458,7 +1452,7 @@ YY_RULE_SETUP #line 236 "rclex.l" ECHO; YY_BREAK -#line 1462 "lex.yy.c" +#line 1456 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y index 898e99f..1f10da7 100644 --- a/contrib/binutils/binutils/rcparse.y +++ b/contrib/binutils/binutils/rcparse.y @@ -219,7 +219,7 @@ acc_entry: $$.id = $2; $$.flags |= $4; if (($$.flags & ACC_VIRTKEY) == 0 - && ($$.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0) + && ($$.flags & (ACC_SHIFT | ACC_CONTROL)) != 0) rcparse_warning (_("inappropriate modifiers for non-VIRTKEY")); } ; diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c index 0582895..2091964 100644 --- a/contrib/binutils/binutils/rdcoff.c +++ b/contrib/binutils/binutils/rdcoff.c @@ -25,7 +25,6 @@ #include "coff/internal.h" #include "bucomm.h" #include "libiberty.h" -#include "demangle.h" #include "debug.h" #include "budbg.h" @@ -655,7 +654,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type, break; } - return true; + return true; } /* Determine if a symbol has external visibility. */ @@ -666,13 +665,13 @@ external_coff_symbol_p (sym_class) { switch (sym_class) { - case C_EXT: - case C_WEAKEXT: - return true; + case C_EXT: + case C_WEAKEXT: + return true; default: break; } - return false; + return false; } /* This is the main routine. It looks through all the symbols and @@ -786,7 +785,7 @@ parse_coff (abfd, syms, symcount, dhandle) if (syment.n_type == T_NULL) break; /* Fall through. */ - case C_WEAKEXT: + case C_WEAKEXT: case C_EXT: if (ISFCN (syment.n_type)) { diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c index e6ace77..3430c02 100644 --- a/contrib/binutils/binutils/rddbg.c +++ b/contrib/binutils/binutils/rddbg.c @@ -185,7 +185,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound) char *f, *s; f = NULL; - + if (stroff + strx > strsize) { fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n", @@ -193,9 +193,9 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound) (stab - stabs) / 12, strx, type); continue; } - + s = (char *) strings + stroff + strx; - + while (s[strlen (s) - 1] == '\\' && stab + 12 < stabs + stabsize) { diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c index 77694cb..e053cba 100644 --- a/contrib/binutils/binutils/readelf.c +++ b/contrib/binutils/binutils/readelf.c @@ -56,7 +56,9 @@ #include "elf/cris.h" #include "elf/d10v.h" #include "elf/d30v.h" +#include "elf/dlx.h" #include "elf/fr30.h" +#include "elf/frv.h" #include "elf/h8.h" #include "elf/hppa.h" #include "elf/i386.h" @@ -65,6 +67,7 @@ #include "elf/ia64.h" #include "elf/m32r.h" #include "elf/m68k.h" +#include "elf/m68hc11.h" #include "elf/mcore.h" #include "elf/mips.h" #include "elf/mmix.h" @@ -77,6 +80,7 @@ #include "elf/sh.h" #include "elf/sparc.h" #include "elf/v850.h" +#include "elf/vax.h" #include "elf/x86-64.h" #include "elf/xstormy16.h" @@ -260,6 +264,7 @@ static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma)) static int process_corefile_note_segments PARAMS ((FILE *)); static int process_corefile_contents PARAMS ((FILE *)); static int process_arch_specific PARAMS ((FILE *)); +static int process_gnu_liblist PARAMS ((FILE *)); typedef int Elf32_Word; @@ -521,7 +526,7 @@ print_vma (vma, mode) /* Display a symbol on stdout. If do_wide is not true then format the symbol to be at most WIDTH characters, - truhncating as necessary. If WIDTH is negative then + truncating as necessary. If WIDTH is negative then format the string to be exactly - WIDTH characters, truncating or padding as necessary. */ @@ -534,7 +539,7 @@ print_symbol (width, symbol) printf (symbol); else if (width < 0) printf ("%-*.*s", width, width, symbol); - else + else printf ("%-.*s", width, symbol); } @@ -601,6 +606,7 @@ guess_is_rela (e_machine) case EM_386: case EM_486: case EM_960: + case EM_DLX: case EM_OPENRISC: case EM_OR32: case EM_M32R: @@ -631,6 +637,7 @@ guess_is_rela (e_machine) case EM_CYGNUS_MN10300: case EM_FR30: case EM_CYGNUS_FR30: + case EM_CYGNUS_FRV: case EM_SH: case EM_ALPHA: case EM_MCORE: @@ -644,6 +651,7 @@ guess_is_rela (e_machine) case EM_S390_OLD: case EM_MMIX: case EM_XSTORMY16: + case EM_VAX: return TRUE; case EM_MMA: @@ -663,7 +671,6 @@ guess_is_rela (e_machine) case EM_68HC05: case EM_SVX: case EM_ST19: - case EM_VAX: default: warn (_("Don't know about relocations on this machine architecture\n")); return FALSE; @@ -911,7 +918,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) } else { - if (elf_header.e_machine == EM_MIPS) + if (elf_header.e_machine == EM_MIPS) { type = ELF64_MIPS_R_TYPE (info); type2 = ELF64_MIPS_R_TYPE2 (info); @@ -971,6 +978,11 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) rtype = elf_i386_reloc_type (type); break; + case EM_68HC11: + case EM_68HC12: + rtype = elf_m68hc11_reloc_type (type); + break; + case EM_68K: rtype = elf_m68k_reloc_type (type); break; @@ -1006,6 +1018,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) rtype = elf_d30v_reloc_type (type); break; + case EM_DLX: + rtype = elf_dlx_reloc_type (type); + break; + case EM_SH: rtype = elf_sh_reloc_type (type); break; @@ -1025,6 +1041,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) rtype = elf_fr30_reloc_type (type); break; + case EM_CYGNUS_FRV: + rtype = elf_frv_reloc_type (type); + break; + case EM_MCORE: rtype = elf_mcore_reloc_type (type); break; @@ -1041,7 +1061,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) case EM_MIPS: case EM_MIPS_RS3_LE: rtype = elf_mips_reloc_type (type); - if (!is_32bit_elf) + if (!is_32bit_elf) { rtype2 = elf_mips_reloc_type (type2); rtype3 = elf_mips_reloc_type (type3); @@ -1095,14 +1115,18 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) rtype = elf_x86_64_reloc_type (type); break; - case EM_S390_OLD: - case EM_S390: - rtype = elf_s390_reloc_type (type); - break; + case EM_S390_OLD: + case EM_S390: + rtype = elf_s390_reloc_type (type); + break; case EM_XSTORMY16: rtype = elf_xstormy16_reloc_type (type); break; + + case EM_VAX: + rtype = elf_vax_reloc_type (type); + break; } if (rtype == NULL) @@ -1151,7 +1175,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) putchar ('\n'); - if (! is_32bit_elf && elf_header.e_machine == EM_MIPS) + if (! is_32bit_elf && elf_header.e_machine == EM_MIPS) { printf (" Type2: "); @@ -1175,7 +1199,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) else printf ("%-17.17s", rtype3); - putchar ('\n'); + putchar ('\n'); } } @@ -1365,6 +1389,12 @@ get_dynamic_type (type) case DT_USED: return "USED"; case DT_FILTER: return "FILTER"; + case DT_GNU_PRELINKED: return "GNU_PRELINKED"; + case DT_GNU_CONFLICT: return "GNU_CONFLICT"; + case DT_GNU_CONFLICTSZ: return "GNU_CONFLICTSZ"; + case DT_GNU_LIBLIST: return "GNU_LIBLIST"; + case DT_GNU_LIBLISTSZ: return "GNU_LIBLISTSZ"; + default: if ((type >= DT_LOPROC) && (type <= DT_HIPROC)) { @@ -1502,6 +1532,7 @@ get_machine_name (e_machine) case EM_MN10200: return "mn10200"; case EM_CYGNUS_FR30: case EM_FR30: return "Fujitsu FR30"; + case EM_CYGNUS_FRV: return "Fujitsu FR-V"; case EM_PJ_OLD: case EM_PJ: return "picoJava"; case EM_MMA: return "Fujitsu Multimedia Accelerator"; @@ -1537,6 +1568,7 @@ get_machine_name (e_machine) case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core"; case EM_OPENRISC: case EM_OR32: return "OpenRISC"; + case EM_DLX: return "OpenDLX"; default: sprintf (buff, _("<unknown>: %x"), e_machine); return buff; @@ -1705,12 +1737,12 @@ get_machine_flags (e_flags, e_machine) decode_ARM_machine_flags (e_flags, buf); break; - case EM_68K: - if (e_flags & EF_CPU32) - strcat (buf, ", cpu32"); + case EM_68K: + if (e_flags & EF_CPU32) + strcat (buf, ", cpu32"); if (e_flags & EF_M68000) strcat (buf, ", m68000"); - break; + break; case EM_PPC: if (e_flags & EF_PPC_EMB) @@ -1901,6 +1933,15 @@ get_machine_flags (e_flags, e_machine) if ((e_flags & EF_IA_64_ABSOLUTE)) strcat (buf, ", absolute"); break; + + case EM_VAX: + if ((e_flags & EF_VAX_NONPIC)) + strcat (buf, ", non-PIC"); + if ((e_flags & EF_VAX_DFLOAT)) + strcat (buf, ", D-Float"); + if ((e_flags & EF_VAX_GFLOAT)) + strcat (buf, ", G-Float"); + break; } } @@ -1987,6 +2028,7 @@ get_segment_type (p_type) case PT_NOTE: return "NOTE"; case PT_SHLIB: return "SHLIB"; case PT_PHDR: return "PHDR"; + case PT_TLS: return "TLS"; case PT_GNU_EH_FRAME: return "GNU_EH_FRAME"; @@ -2159,6 +2201,7 @@ get_section_type_name (sh_type) case 0x6ffffffc: return "VERDEF"; case 0x7ffffffd: return "AUXILIARY"; case 0x7fffffff: return "FILTER"; + case SHT_GNU_LIBLIST: return "GNU_LIBLIST"; default: if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC)) @@ -2198,6 +2241,8 @@ get_section_type_name (sh_type) } } +#define OPTION_DEBUG_DUMP 512 + struct option options [] = { {"all", no_argument, 0, 'a'}, @@ -2217,7 +2262,7 @@ struct option options [] = {"version-info", no_argument, 0, 'V'}, {"use-dynamic", no_argument, 0, 'D'}, {"hex-dump", required_argument, 0, 'x'}, - {"debug-dump", optional_argument, 0, 'w'}, + {"debug-dump", optional_argument, 0, OPTION_DEBUG_DUMP}, {"unwind", no_argument, 0, 'u'}, #ifdef SUPPORT_DISASSEMBLY {"instruction-dump", required_argument, 0, 'i'}, @@ -2252,7 +2297,8 @@ usage () -A --arch-specific Display architecture specific information (if any).\n\ -D --use-dynamic Use the dynamic section info when displaying symbols\n\ -x --hex-dump=<number> Dump the contents of section <number>\n\ - -w --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\n\ + -w[liaprmfFso] or\n\ + --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\n\ Display the contents of DWARF2 debug sections\n")); #ifdef SUPPORT_DISASSEMBLY fprintf (stdout, _("\ @@ -2392,7 +2438,7 @@ parse_args (argc, argv) else { unsigned int index = 0; - + do_debugging = 0; while (optarg[index]) @@ -2443,13 +2489,95 @@ parse_args (argc, argv) case 'O': do_debug_loc = 1; break; - + default: warn (_("Unrecognized debug option '%s'\n"), optarg); break; } } break; + case OPTION_DEBUG_DUMP: + do_dump ++; + if (optarg == 0) + do_debugging = 1; + else + { + const char *debug_dump_opt[] + = { "line", "info", "abbrev", "pubnames", "ranges", + "macro", "frames", "frames-interp", "str", "loc", NULL }; + unsigned int index; + const char *p; + + do_debugging = 0; + + p = optarg; + while (*p) + { + for (index = 0; debug_dump_opt[index]; index++) + { + size_t len = strlen (debug_dump_opt[index]); + + if (strncmp (p, debug_dump_opt[index], len) == 0 + && (p[len] == ',' || p[len] == '\0')) + { + switch (p[0]) + { + case 'i': + do_debug_info = 1; + break; + + case 'a': + do_debug_abbrevs = 1; + break; + + case 'l': + if (p[1] == 'i') + do_debug_lines = 1; + else + do_debug_loc = 1; + break; + + case 'p': + do_debug_pubnames = 1; + break; + + case 'r': + do_debug_aranges = 1; + break; + + case 'f': + if (len > 6) + do_debug_frames_interp = 1; + do_debug_frames = 1; + break; + + case 'm': + do_debug_macinfo = 1; + break; + + case 's': + do_debug_str = 1; + break; + } + + p += len; + break; + } + } + + if (debug_dump_opt[index] == NULL) + { + warn (_("Unrecognized debug option '%s'\n"), p); + p = strchr (p, ','); + if (p == NULL) + break; + } + + if (*p == ',') + p++; + } + } + break; #ifdef SUPPORT_DISASSEMBLY case 'i': do_dump ++; @@ -2763,8 +2891,10 @@ process_program_headers (file) if (do_segments) { - printf - (_("\nProgram Header%s:\n"), elf_header.e_phnum > 1 ? "s" : ""); + if (elf_header.e_phnum > 1) + printf (_("\nProgram Headers:\n")); + else + printf (_("\nProgram Headers:\n")); if (is_32bit_elf) printf @@ -3202,6 +3332,7 @@ get_elf_section_flags (sh_flags) case SHF_LINK_ORDER: strcat (buff, "L"); break; case SHF_OS_NONCONFORMING: strcat (buff, "O"); break; case SHF_GROUP: strcat (buff, "G"); break; + case SHF_TLS: strcat (buff, "T"); break; default: if (flag & SHF_MASKOS) @@ -3340,7 +3471,10 @@ process_section_headers (file) if (! do_sections) return 1; - printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : ""); + if (elf_header.e_shnum > 1) + printf (_("\nSection Headers:\n")); + else + printf (_("\nSection Header:\n")); if (is_32bit_elf) printf @@ -3425,13 +3559,13 @@ process_section_headers (file) { putchar (' '); print_vma (section->sh_addr, LONG_HEX); - if ((long) section->sh_offset == section->sh_offset) - printf (" %8.8lx", (unsigned long) section->sh_offset); - else - { - printf (" "); - print_vma (section->sh_offset, LONG_HEX); - } + if ((long) section->sh_offset == section->sh_offset) + printf (" %8.8lx", (unsigned long) section->sh_offset); + else + { + printf (" "); + print_vma (section->sh_offset, LONG_HEX); + } printf ("\n "); print_vma (section->sh_size, LONG_HEX); printf (" "); @@ -3546,7 +3680,7 @@ process_relocs (file) if (string_table == NULL) printf ("%d", section->sh_name); else - printf ("'%s'", SECTION_NAME (section)); + printf (_("'%s'"), SECTION_NAME (section)); printf (_(" at offset 0x%lx contains %lu entries:\n"), rel_offset, (unsigned long) (rel_size / section->sh_entsize)); @@ -3979,7 +4113,7 @@ process_unwind (file) if (string_table == NULL) printf ("%d", unwsec->sh_name); else - printf ("'%s'", SECTION_NAME (unwsec)); + printf (_("'%s'"), SECTION_NAME (unwsec)); } else { @@ -3993,7 +4127,7 @@ process_unwind (file) if (string_table == NULL) printf ("%d", unwsec->sh_name); else - printf ("'%s'", SECTION_NAME (unwsec)); + printf (_("'%s'"), SECTION_NAME (unwsec)); printf (_(" at offset 0x%lx contains %lu entries:\n"), (unsigned long) unwsec->sh_offset, @@ -4242,7 +4376,10 @@ static const char * get_dynamic_flags (flags) bfd_vma flags; { - static char buff [64]; + static char buff [128]; + char *p = buff; + + *p = '\0'; while (flags) { bfd_vma flag; @@ -4250,14 +4387,20 @@ get_dynamic_flags (flags) flag = flags & - flags; flags &= ~ flag; + if (p != buff) + *p++ = ' '; + switch (flag) { - case DF_ORIGIN: strcat (buff, "ORIGIN "); break; - case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break; - case DF_TEXTREL: strcat (buff, "TEXTREL "); break; - case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break; - default: strcat (buff, "unknown "); break; + case DF_ORIGIN: strcpy (p, "ORIGIN"); break; + case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break; + case DF_TEXTREL: strcpy (p, "TEXTREL"); break; + case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break; + case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break; + default: strcpy (p, "unknown"); break; } + + p = strchr (p, '\0'); } return buff; } @@ -4443,7 +4586,7 @@ process_dynamic_segment (file) { case DT_FLAGS: if (do_dynamic) - printf ("%s", get_dynamic_flags (entry->d_un.d_val)); + puts (get_dynamic_flags (entry->d_un.d_val)); break; case DT_AUXILIARY: @@ -4705,6 +4848,8 @@ process_dynamic_segment (file) case DT_MOVESZ : case DT_INIT_ARRAYSZ: case DT_FINI_ARRAYSZ: + case DT_GNU_CONFLICTSZ: + case DT_GNU_LIBLISTSZ: if (do_dynamic) { print_vma (entry->d_un.d_val, UNSIGNED); @@ -4753,6 +4898,20 @@ process_dynamic_segment (file) /* The value of this entry is ignored. */ break; + case DT_GNU_PRELINKED: + if (do_dynamic) + { + struct tm * tmp; + time_t time = entry->d_un.d_val; + + tmp = gmtime (&time); + printf ("%04u-%02u-%02uT%02u:%02u:%02u\n", + tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + + } + break; + default: if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM)) version_info [DT_VERSIONTAGIDX (entry->d_tag)] = @@ -5252,6 +5411,7 @@ get_symbol_type (type) case STT_SECTION: return "SECTION"; case STT_FILE: return "FILE"; case STT_COMMON: return "COMMON"; + case STT_TLS: return "TLS"; default: if (type >= STT_LOPROC && type <= STT_HIPROC) { @@ -6169,12 +6329,12 @@ display_debug_lines (section, start, file) state_machine_regs.line += adv; printf (_(" and Line by %d to %d\n"), adv, state_machine_regs.line); - } - else switch (op_code) + } + else switch (op_code) { case DW_LNS_extended_op: data += process_extended_line_op (data, info.li_default_is_stmt, - debug_line_pointer_size); + debug_line_pointer_size); break; case DW_LNS_copy: @@ -6243,17 +6403,17 @@ display_debug_lines (section, start, file) case DW_LNS_set_prologue_end: printf (_(" Set prologue_end to true\n")); break; - + case DW_LNS_set_epilogue_begin: printf (_(" Set epilogue_begin to true\n")); break; - + case DW_LNS_set_isa: adv = read_leb128 (data, & bytes_read, 0); data += bytes_read; printf (_(" Set ISA to %d\n"), adv); break; - + default: printf (_(" Unknown opcode %d with operands: "), op_code); { @@ -7252,7 +7412,7 @@ display_debug_loc (section, start, file) unsigned long bytes; unsigned char *section_begin = start; bfd_vma addr; - + addr = section->sh_addr; bytes = section->sh_size; section_end = start + bytes; @@ -7274,7 +7434,7 @@ display_debug_loc (section, start, file) while (1) { - /* Normally, the lists in the debug_loc section are related to a + /* Normally, the lists in the debug_loc section are related to a given compilation unit, and thus, we would use the pointer size of that compilation unit. However, since we are displaying it seperately here, we either have to store @@ -7285,20 +7445,20 @@ display_debug_loc (section, start, file) start += debug_line_pointer_size; end = byte_get (start, debug_line_pointer_size); start += debug_line_pointer_size; - + if (begin == 0 && end == 0) break; - + begin += addr; end += addr; - + length = byte_get (start, 2); start += 2; - + printf (" %8.8lx %8.8lx %8.8lx (", offset, begin, end); decode_location_expression (start, debug_line_pointer_size, length); printf (")\n"); - + start += length; } printf ("\n"); @@ -7485,7 +7645,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size) data += bytes_read; printf (" %s", get_FORM_name (form)); return read_and_display_attr_value (attribute, form, data, cu_offset, - pointer_size); + pointer_size); } switch (form) @@ -7734,7 +7894,7 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size) { printf (" %-18s:", get_AT_name (attribute)); data = read_and_display_attr_value (attribute, form, data, cu_offset, - pointer_size); + pointer_size); printf ("\n"); return data; } @@ -8373,102 +8533,107 @@ display_debug_frames (section, start, file) about to interpret instructions for the chunk. */ if (do_debug_frames_interp) - { - /* Start by making a pass over the chunk, allocating storage - and taking note of what registers are used. */ - unsigned char * tmp = start; + { + /* Start by making a pass over the chunk, allocating storage + and taking note of what registers are used. */ + unsigned char * tmp = start; - while (start < block_end) - { - unsigned op, opa; - unsigned long reg; + while (start < block_end) + { + unsigned op, opa; + unsigned long reg; - op = * start ++; - opa = op & 0x3f; - if (op & 0xc0) - op &= 0xc0; + op = * start ++; + opa = op & 0x3f; + if (op & 0xc0) + op &= 0xc0; - /* Warning: if you add any more cases to this switch, be - sure to add them to the corresponding switch below. */ - switch (op) - { - case DW_CFA_advance_loc: - break; - case DW_CFA_offset: - LEB (); - frame_need_space (fc, opa); - fc->col_type[opa] = DW_CFA_undefined; - break; - case DW_CFA_restore: - frame_need_space (fc, opa); - fc->col_type[opa] = DW_CFA_undefined; - break; - case DW_CFA_set_loc: - start += encoded_ptr_size; - break; - case DW_CFA_advance_loc1: - start += 1; - break; - case DW_CFA_advance_loc2: - start += 2; - break; - case DW_CFA_advance_loc4: - start += 4; - break; - case DW_CFA_offset_extended: - reg = LEB (); LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; - break; - case DW_CFA_restore_extended: - reg = LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; - break; - case DW_CFA_undefined: - reg = LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; - break; - case DW_CFA_same_value: - reg = LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; - break; - case DW_CFA_register: - reg = LEB (); LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; - break; - case DW_CFA_def_cfa: - LEB (); LEB (); - break; - case DW_CFA_def_cfa_register: - LEB (); - break; - case DW_CFA_def_cfa_offset: - LEB (); - break; -#ifndef DW_CFA_GNU_args_size -#define DW_CFA_GNU_args_size 0x2e -#endif - case DW_CFA_GNU_args_size: - LEB (); - break; -#ifndef DW_CFA_GNU_negative_offset_extended -#define DW_CFA_GNU_negative_offset_extended 0x2f -#endif - case DW_CFA_GNU_negative_offset_extended: - reg = LEB (); LEB (); - frame_need_space (fc, reg); - fc->col_type[reg] = DW_CFA_undefined; + /* Warning: if you add any more cases to this switch, be + sure to add them to the corresponding switch below. */ + switch (op) + { + case DW_CFA_advance_loc: + break; + case DW_CFA_offset: + LEB (); + frame_need_space (fc, opa); + fc->col_type[opa] = DW_CFA_undefined; + break; + case DW_CFA_restore: + frame_need_space (fc, opa); + fc->col_type[opa] = DW_CFA_undefined; + break; + case DW_CFA_set_loc: + start += encoded_ptr_size; + break; + case DW_CFA_advance_loc1: + start += 1; + break; + case DW_CFA_advance_loc2: + start += 2; + break; + case DW_CFA_advance_loc4: + start += 4; + break; + case DW_CFA_offset_extended: + reg = LEB (); LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_restore_extended: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_undefined: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_same_value: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_register: + reg = LEB (); LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_def_cfa: + LEB (); LEB (); + break; + case DW_CFA_def_cfa_register: + LEB (); + break; + case DW_CFA_def_cfa_offset: + LEB (); + break; + case DW_CFA_offset_extended_sf: + reg = LEB (); SLEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_def_cfa_sf: + LEB (); SLEB (); + break; + case DW_CFA_def_cfa_offset_sf: + SLEB (); + break; + case DW_CFA_GNU_args_size: + LEB (); + break; + case DW_CFA_GNU_negative_offset_extended: + reg = LEB (); LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; - default: - break; - } - } - start = tmp; - } + default: + break; + } + } + start = tmp; + } /* Now we know what registers are used, make a second pass over the chunk, this time actually printing out the info. */ @@ -8485,16 +8650,16 @@ display_debug_frames (section, start, file) if (op & 0xc0) op &= 0xc0; - /* Warning: if you add any more cases to this switch, be - sure to add them to the corresponding switch above. */ + /* Warning: if you add any more cases to this switch, be + sure to add them to the corresponding switch above. */ switch (op) { case DW_CFA_advance_loc: if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); else - printf (" DW_CFA_advance_loc: %d to %08lx\n", - opa * fc->code_factor, + printf (" DW_CFA_advance_loc: %d to %08lx\n", + opa * fc->code_factor, fc->pc_begin + opa * fc->code_factor); fc->pc_begin += opa * fc->code_factor; break; @@ -8502,7 +8667,7 @@ display_debug_frames (section, start, file) case DW_CFA_offset: roffs = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_offset: r%d at cfa%+ld\n", + printf (" DW_CFA_offset: r%d at cfa%+ld\n", opa, roffs * fc->data_factor); fc->col_type[opa] = DW_CFA_offset; fc->col_offset[opa] = roffs * fc->data_factor; @@ -8510,7 +8675,7 @@ display_debug_frames (section, start, file) case DW_CFA_restore: if (! do_debug_frames_interp) - printf (" DW_CFA_restore: r%d\n", opa); + printf (" DW_CFA_restore: r%d\n", opa); fc->col_type[opa] = cie->col_type[opa]; fc->col_offset[opa] = cie->col_offset[opa]; break; @@ -8519,19 +8684,19 @@ display_debug_frames (section, start, file) vma = byte_get (start, encoded_ptr_size); start += encoded_ptr_size; if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); else - printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma); + printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma); fc->pc_begin = vma; break; case DW_CFA_advance_loc1: ofs = byte_get (start, 1); start += 1; if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); else - printf (" DW_CFA_advance_loc1: %ld to %08lx\n", - ofs * fc->code_factor, + printf (" DW_CFA_advance_loc1: %ld to %08lx\n", + ofs * fc->code_factor, fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; @@ -8539,10 +8704,10 @@ display_debug_frames (section, start, file) case DW_CFA_advance_loc2: ofs = byte_get (start, 2); start += 2; if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); else - printf (" DW_CFA_advance_loc2: %ld to %08lx\n", - ofs * fc->code_factor, + printf (" DW_CFA_advance_loc2: %ld to %08lx\n", + ofs * fc->code_factor, fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; @@ -8550,10 +8715,10 @@ display_debug_frames (section, start, file) case DW_CFA_advance_loc4: ofs = byte_get (start, 4); start += 4; if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); else - printf (" DW_CFA_advance_loc4: %ld to %08lx\n", - ofs * fc->code_factor, + printf (" DW_CFA_advance_loc4: %ld to %08lx\n", + ofs * fc->code_factor, fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; @@ -8571,7 +8736,7 @@ display_debug_frames (section, start, file) case DW_CFA_restore_extended: reg = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_restore_extended: r%ld\n", reg); + printf (" DW_CFA_restore_extended: r%ld\n", reg); fc->col_type[reg] = cie->col_type[reg]; fc->col_offset[reg] = cie->col_offset[reg]; break; @@ -8579,7 +8744,7 @@ display_debug_frames (section, start, file) case DW_CFA_undefined: reg = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_undefined: r%ld\n", reg); + printf (" DW_CFA_undefined: r%ld\n", reg); fc->col_type[reg] = DW_CFA_undefined; fc->col_offset[reg] = 0; break; @@ -8587,7 +8752,7 @@ display_debug_frames (section, start, file) case DW_CFA_same_value: reg = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_same_value: r%ld\n", reg); + printf (" DW_CFA_same_value: r%ld\n", reg); fc->col_type[reg] = DW_CFA_same_value; fc->col_offset[reg] = 0; break; @@ -8596,14 +8761,14 @@ display_debug_frames (section, start, file) reg = LEB (); roffs = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_register: r%ld\n", reg); + printf (" DW_CFA_register: r%ld\n", reg); fc->col_type[reg] = DW_CFA_register; fc->col_offset[reg] = roffs; break; case DW_CFA_remember_state: if (! do_debug_frames_interp) - printf (" DW_CFA_remember_state\n"); + printf (" DW_CFA_remember_state\n"); rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); rs->ncols = fc->ncols; rs->col_type = (short int *) xmalloc (rs->ncols * sizeof (short int)); @@ -8616,7 +8781,7 @@ display_debug_frames (section, start, file) case DW_CFA_restore_state: if (! do_debug_frames_interp) - printf (" DW_CFA_restore_state\n"); + printf (" DW_CFA_restore_state\n"); rs = remembered_state; remembered_state = rs->next; frame_need_space (fc, rs->ncols-1); @@ -8631,39 +8796,61 @@ display_debug_frames (section, start, file) fc->cfa_reg = LEB (); fc->cfa_offset = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa: r%d ofs %d\n", + printf (" DW_CFA_def_cfa: r%d ofs %d\n", fc->cfa_reg, fc->cfa_offset); break; case DW_CFA_def_cfa_register: fc->cfa_reg = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg); + printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg); break; case DW_CFA_def_cfa_offset: fc->cfa_offset = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); + printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); break; case DW_CFA_nop: if (! do_debug_frames_interp) - printf (" DW_CFA_nop\n"); + printf (" DW_CFA_nop\n"); + break; + + case DW_CFA_offset_extended_sf: + reg = LEB (); + l = SLEB (); + frame_need_space (fc, reg); + if (! do_debug_frames_interp) + printf (" DW_CFA_offset_extended_sf: r%ld at cfa%+ld\n", + reg, l * fc->data_factor); + fc->col_type[reg] = DW_CFA_offset; + fc->col_offset[reg] = l * fc->data_factor; + break; + + case DW_CFA_def_cfa_sf: + fc->cfa_reg = LEB (); + fc->cfa_offset = SLEB (); + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n", + fc->cfa_reg, fc->cfa_offset); + break; + + case DW_CFA_def_cfa_offset_sf: + fc->cfa_offset = SLEB (); + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset); break; -#ifndef DW_CFA_GNU_window_save -#define DW_CFA_GNU_window_save 0x2d -#endif case DW_CFA_GNU_window_save: if (! do_debug_frames_interp) - printf (" DW_CFA_GNU_window_save\n"); + printf (" DW_CFA_GNU_window_save\n"); break; case DW_CFA_GNU_args_size: ul = LEB (); if (! do_debug_frames_interp) - printf (" DW_CFA_GNU_args_size: %ld\n", ul); + printf (" DW_CFA_GNU_args_size: %ld\n", ul); break; case DW_CFA_GNU_negative_offset_extended: @@ -8671,12 +8858,23 @@ display_debug_frames (section, start, file) l = - LEB (); frame_need_space (fc, reg); if (! do_debug_frames_interp) - printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n", + printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n", reg, l * fc->data_factor); fc->col_type[reg] = DW_CFA_offset; fc->col_offset[reg] = l * fc->data_factor; break; + /* FIXME: How do we handle these? */ + case DW_CFA_def_cfa_expression: + fprintf (stderr, "unsupported DW_CFA_def_cfa_expression\n"); + start = block_end; + break; + + case DW_CFA_expression: + fprintf (stderr, "unsupported DW_CFA_expression\n"); + start = block_end; + break; + default: fprintf (stderr, "unsupported or unknown DW_CFA_%d\n", op); start = block_end; @@ -8684,7 +8882,7 @@ display_debug_frames (section, start, file) } if (do_debug_frames_interp) - frame_display_row (fc, &need_col_headers, &max_regs); + frame_display_row (fc, &need_col_headers, &max_regs); start = block_end; } @@ -8823,11 +9021,11 @@ process_section_contents (file) int j; if (section->sh_size == 0) - continue; + continue; /* See if there is some pre-scan operation for this section. */ for (j = NUM_ELEM (debug_displays); j--;) - if (strcmp (debug_displays[j].name, name) == 0) + if (strcmp (debug_displays[j].name, name) == 0) { if (debug_displays[j].prescan != NULL) { @@ -8845,8 +9043,8 @@ process_section_contents (file) free (start); } - break; - } + break; + } } for (i = 0, section = section_headers; @@ -9215,7 +9413,7 @@ process_mips_specific (file) if (dynamic_symbols == NULL) { - error (_("conflict list with without table")); + error (_("conflict list found without a dynamic symbol table")); return 0; } @@ -9280,6 +9478,86 @@ process_mips_specific (file) return 1; } +static int +process_gnu_liblist (file) + FILE * file; +{ + Elf_Internal_Shdr * section, * string_sec; + Elf32_External_Lib * elib; + char * strtab; + size_t cnt; + unsigned i; + + if (! do_arch) + return 0; + + for (i = 0, section = section_headers; + i < elf_header.e_shnum; + i++, section ++) + { + switch (section->sh_type) + { + case SHT_GNU_LIBLIST: + elib = ((Elf32_External_Lib *) + get_data (NULL, file, section->sh_offset, section->sh_size, + _("liblist"))); + + if (elib == NULL) + break; + string_sec = SECTION_HEADER (section->sh_link); + + strtab = (char *) get_data (NULL, file, string_sec->sh_offset, + string_sec->sh_size, + _("liblist string table")); + + if (strtab == NULL + || section->sh_entsize != sizeof (Elf32_External_Lib)) + { + free (elib); + break; + } + + printf (_("\nLibrary list section '%s' contains %lu entries:\n"), + SECTION_NAME (section), + (long) (section->sh_size / sizeof (Elf32_External_Lib))); + + puts (" Library Time Stamp Checksum Version Flags"); + + for (cnt = 0; cnt < section->sh_size / sizeof (Elf32_External_Lib); + ++cnt) + { + Elf32_Lib liblist; + time_t time; + char timebuf[20]; + struct tm * tmp; + + liblist.l_name = BYTE_GET (elib[cnt].l_name); + time = BYTE_GET (elib[cnt].l_time_stamp); + liblist.l_checksum = BYTE_GET (elib[cnt].l_checksum); + liblist.l_version = BYTE_GET (elib[cnt].l_version); + liblist.l_flags = BYTE_GET (elib[cnt].l_flags); + + tmp = gmtime (&time); + sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u", + tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + + printf ("%3lu: ", (unsigned long) cnt); + if (do_wide) + printf ("%-20s", strtab + liblist.l_name); + else + printf ("%-20.20s", strtab + liblist.l_name); + printf (" %s %#010lx %-7ld %-7ld\n", timebuf, liblist.l_checksum, + liblist.l_version, liblist.l_flags); + } + + free (elib); + } + } + + return 1; +} + static const char * get_note_type (e_type) unsigned e_type; @@ -9298,7 +9576,7 @@ get_note_type (e_type) case NT_PSINFO: return _("NT_PSINFO (psinfo structure)"); case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t structure)"); case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)"); - case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus strcuture)"); + case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus structure)"); default: sprintf (buff, _("Unknown note type: (0x%08x)"), e_type); return buff; @@ -9374,7 +9652,7 @@ get_netbsd_elfcore_note_type (e_type) If the value of namesz is zero, there is no name present. */ static int process_note (pnote) - Elf32_Internal_Note * pnote; + Elf32_Internal_Note * pnote; { const char *nt; @@ -9649,12 +9927,15 @@ get_file_header (file) elf_header.e_shstrndx = BYTE_GET (ehdr64.e_shstrndx); } - /* There may be some extensions in the first section header. Don't - bomb if we can't read it. */ - if (is_32bit_elf) - get_32bit_section_headers (file, 1); - else - get_64bit_section_headers (file, 1); + if (elf_header.e_shoff) + { + /* There may be some extensions in the first section header. Don't + bomb if we can't read it. */ + if (is_32bit_elf) + get_32bit_section_headers (file, 1); + else + get_64bit_section_headers (file, 1); + } return 1; } @@ -9724,6 +10005,8 @@ process_file (file_name) process_corefile_contents (file); + process_gnu_liblist (file); + process_arch_specific (file); fclose (file); diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c index a7be2c1..1a6a86b 100644 --- a/contrib/binutils/binutils/rename.c +++ b/contrib/binutils/binutils/rename.c @@ -165,8 +165,8 @@ smart_rename (from, to, preserve_dates) ret = rename (from, to); if (ret != 0) { - /* We have to clean up here. */ - + /* We have to clean up here. */ + non_fatal (_("%s: rename: %s"), to, strerror (errno)); unlink (from); } @@ -199,7 +199,7 @@ smart_rename (from, to, preserve_dates) } else { - /* We have to clean up here. */ + /* We have to clean up here. */ non_fatal (_("%s: rename: %s"), to, strerror (errno)); unlink (from); } diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c index 7ed84f9..079818c 100644 --- a/contrib/binutils/binutils/resbin.c +++ b/contrib/binutils/binutils/resbin.c @@ -518,7 +518,7 @@ bin_to_res_dialog (data, length, big_endian) d->caption = get_unicode (data + off, length - off, big_endian, &sublen); off += sublen * 2 + 2; - if (sublen == 0) + if (sublen == 0) d->caption = NULL; if ((d->style & DS_SETFONT) == 0) @@ -595,9 +595,9 @@ bin_to_res_dialog (data, length, big_endian) dc->height = get_16 (big_endian, data + off + 6); if (d->ex != NULL) - dc->id = get_32 (big_endian, data + off + 8); + dc->id = get_32 (big_endian, data + off + 8); else - dc->id = get_16 (big_endian, data + off + 8); + dc->id = get_16 (big_endian, data + off + 8); off += 10 + (d->ex != NULL ? 2 : 0); @@ -629,7 +629,7 @@ bin_to_res_dialog (data, length, big_endian) dc->data->u.buffer.length = datalen; dc->data->u.buffer.data = data + off; - off += datalen; + off += datalen; } dc->next = NULL; @@ -1219,7 +1219,7 @@ bin_to_res_version (data, length, big_endian) vi->next = NULL; *pp = vi; - pp = &vi->next; + pp = &vi->next; } v = (struct versioninfo *) res_alloc (sizeof *v); @@ -1230,7 +1230,7 @@ bin_to_res_version (data, length, big_endian) r->type = RES_TYPE_VERSIONINFO; r->u.versioninfo = v; - return r; + return r; } /* Convert an arbitrary user defined resource from binary. */ @@ -1685,9 +1685,9 @@ res_to_bin_dialog (dialog, big_endian) put_16 (big_endian, dc->height, d->data + dcoff + 6); if (dialogex) - put_32 (big_endian, dc->id, d->data + dcoff + 8); + put_32 (big_endian, dc->id, d->data + dcoff + 8); else - put_16 (big_endian, dc->id, d->data + dcoff + 8); + put_16 (big_endian, dc->id, d->data + dcoff + 8); *pp = d; pp = &d->next; @@ -1776,12 +1776,12 @@ res_to_bin_fontdir (fontdirs, big_endian) d->next = NULL; *pp = d; - pp = &d->next; + pp = &d->next; } put_16 (big_endian, c, first->data); - return first; + return first; } /* Convert a group icon resource to binary. */ @@ -2093,7 +2093,7 @@ res_to_bin_stringtable (st, big_endian) d->next = NULL; *pp = d; - pp = &d->next; + pp = &d->next; } return first; @@ -2122,7 +2122,7 @@ string_to_unicode_bin (s, big_endian) d->next = NULL; - return d; + return d; } /* Convert a versioninfo resource to binary. */ @@ -2287,7 +2287,7 @@ res_to_bin_versioninfo (versioninfo, big_endian) vsslen += length - hold; *pp = unicode_to_bin (vs->value, big_endian); - put_16 (big_endian, (*pp)->length / 2, vssd->data + 2); + put_16 (big_endian, (*pp)->length / 2, vssd->data + 2); length += (*pp)->length; vilen += (*pp)->length; vslen += (*pp)->length; diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c index fb0d36c..3cf708a 100644 --- a/contrib/binutils/binutils/resrc.c +++ b/contrib/binutils/binutils/resrc.c @@ -70,7 +70,7 @@ #ifndef STDOUT_FILENO #define STDOUT_FILENO 1 #endif - + #if defined (_WIN32) && ! defined (__CYGWIN__) #define popen _popen #define pclose _pclose @@ -193,38 +193,38 @@ run_cmd (cmd, redir) /* Count the args. */ i = 0; - + for (s = cmd; *s; s++) if (*s == ' ') i++; - + i++; argv = alloca (sizeof (char *) * (i + 3)); i = 0; s = cmd; - + while (1) { while (*s == ' ' && *s != 0) s++; - + if (*s == 0) break; - + in_quote = (*s == '\'' || *s == '"'); sep = (in_quote) ? *s++ : ' '; argv[i++] = s; - + while (*s != sep && *s != 0) s++; - + if (*s == 0) break; - + *s++ = 0; - + if (in_quote) - s++; + s++; } argv[i++] = NULL; @@ -237,8 +237,8 @@ run_cmd (cmd, redir) /* Open temporary output file. */ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666); if (redir_handle == -1) - fatal (_("can't open temporary file `%s': %s"), redir, - strerror (errno)); + fatal (_("can't open temporary file `%s': %s"), redir, + strerror (errno)); /* Duplicate the stdout file handle so it can be restored later. */ stdout_save = dup (STDOUT_FILENO); @@ -265,7 +265,7 @@ run_cmd (cmd, redir) retcode = 0; pid = pwait (pid, &wait_status, 0); - + if (pid == -1) { fatal (_("wait: %s"), strerror (errno)); @@ -280,14 +280,14 @@ run_cmd (cmd, redir) { if (WEXITSTATUS (wait_status) != 0) { - fatal (_("%s exited with status %d"), cmd, + fatal (_("%s exited with status %d"), cmd, WEXITSTATUS (wait_status)); retcode = 1; } } else retcode = 1; - + return retcode; } @@ -309,11 +309,11 @@ open_input_stream (cmd) cpp_pipe = fopen (cpp_temp_file, FOPEN_RT);; if (cpp_pipe == NULL) - fatal (_("can't open temporary file `%s': %s"), + fatal (_("can't open temporary file `%s': %s"), cpp_temp_file, strerror (errno)); - + if (verbose) - fprintf (stderr, + fprintf (stderr, _("Using temporary file `%s' to read preprocessor output\n"), cpp_temp_file); } @@ -321,7 +321,7 @@ open_input_stream (cmd) { cpp_pipe = popen (cmd, FOPEN_RT); if (cpp_pipe == NULL) - fatal (_("can't popen `%s': %s"), cmd, strerror (errno)); + fatal (_("can't popen `%s': %s"), cmd, strerror (errno)); if (verbose) fprintf (stderr, _("Using popen to read preprocessor output\n")); } @@ -472,7 +472,7 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file) } } - + free (cmd); rc_filename = xstrdup (filename); @@ -484,7 +484,7 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file) rcparse_discard_strings (); close_input_stream (); - + if (fontdirs != NULL) define_fontdirs (); @@ -507,7 +507,7 @@ close_input_stream () if (cpp_temp_file != NULL) { int errno_save = errno; - + unlink (cpp_temp_file); errno = errno_save; free (cpp_temp_file); @@ -1593,7 +1593,7 @@ write_rc_directory (e, rd, type, name, language, level) && (re->id.u.id & 0xffff) == re->id.u.id) { fprintf (e, "LANGUAGE %lu, %lu\n", - re->id.u.id & ((1 << SUBLANG_SHIFT) - 1), + re->id.u.id & ((1 << SUBLANG_SHIFT) - 1), (re->id.u.id >> SUBLANG_SHIFT) & 0xff); *language = re->id.u.id; } @@ -1699,7 +1699,7 @@ write_rc_subdir (e, re, type, name, language, level) fprintf (e, "// Level %d: ", level); res_id_print (e, re->id, 1); fprintf (e, "\n"); - } + } write_rc_directory (e, re->u.dir, type, name, language, level + 1); } @@ -2167,7 +2167,7 @@ write_rc_dialog_control (e, control) fprintf (e, "%s", ci->name); else fprintf (e, "CONTROL"); - + if (control->text.named || control->text.u.id != 0) { fprintf (e, " "); diff --git a/contrib/binutils/binutils/resres.c b/contrib/binutils/binutils/resres.c index 616772e..ed2714d 100644 --- a/contrib/binutils/binutils/resres.c +++ b/contrib/binutils/binutils/resres.c @@ -211,7 +211,7 @@ write_res_directory (rd, type, name, language, level) case 2: /* If we're at level 2, the key of this resource is the name - we are going to use in the rc printout. */ + we are going to use in the rc printout. */ name = &re->id; break; @@ -457,7 +457,7 @@ write_res_info (info) } /* read a resource identifier */ -void +void read_res_id (id) struct res_id *id; { diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c index 961593b..792cb82 100644 --- a/contrib/binutils/binutils/size.c +++ b/contrib/binutils/binutils/size.c @@ -84,7 +84,7 @@ usage (stream, status) { fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name); fprintf (stream, _(" Displays the sizes of sections inside binary files\n")); - fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n")); + fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n")); fprintf (stream, _(" The options are:\n\ -A|-B --format={sysv|berkeley} Select output style (default is %s)\n\ -o|-d|-h --radix={8|10|16} Display numbers in octal, decimal or hex\n\ @@ -448,7 +448,7 @@ berkeley_sum (abfd, sec, ignore) bsssize += size; } -static void +static void print_berkeley_format (abfd) bfd *abfd; { diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c index 5361420..a45437f 100644 --- a/contrib/binutils/binutils/srconv.c +++ b/contrib/binutils/binutils/srconv.c @@ -26,12 +26,12 @@ All debugging information is preserved */ -#include <bfd.h> +#include "bfd.h" #include "bucomm.h" #include "sysroff.h" #include "coffgrok.h" -#include <libiberty.h> -#include <getopt.h> +#include "libiberty.h" +#include "getopt.h" #include "coff/internal.h" #include "../bfd/libcoff.h" @@ -104,7 +104,7 @@ static int debug = 0; static int quick = 0; static int noprescan = 0; static struct coff_ofile *tree; -/* Obsolete ?? +/* Obsolete ?? static int absolute_p; */ @@ -923,7 +923,7 @@ walk_tree_type_1 (sfile, symbol, type, nest) } } -/* Obsolete ? +/* Obsolete ? static void dty_start () { @@ -1632,17 +1632,17 @@ wr_cs () 0x80, /* IT */ 0x21, /* RL */ 0x00, /* number of chars in variable length part */ - 0x80, /* hd */ - 0x00, /* hs */ - 0x80, /* un */ - 0x00, /* us */ - 0x80, /* sc */ - 0x00, /* ss */ - 0x80, /* er */ - 0x80, /* ed */ - 0x80, /* sh */ - 0x80, /* ob */ - 0x80, /* rl */ + 0x80, /* hd */ + 0x00, /* hs */ + 0x80, /* un */ + 0x00, /* us */ + 0x80, /* sc */ + 0x00, /* ss */ + 0x80, /* er */ + 0x80, /* ed */ + 0x80, /* sh */ + 0x80, /* ob */ + 0x80, /* rl */ 0x80, /* du */ 0x80, /* dps */ 0x80, /* dsy */ @@ -1886,7 +1886,7 @@ wr_unit_info (ptr) p2 = ftell (file); fseek (file, p1, SEEK_SET); wr_un (ptr, sfile, first, nsecs); - fseek (file, p2, SEEK_SET); + fseek (file, p2, SEEK_SET); wr_er (ptr, sfile, first); wr_ed (ptr, sfile, first); first = 0; diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c index bbc0632..0873582 100644 --- a/contrib/binutils/binutils/stabs.c +++ b/contrib/binutils/binutils/stabs.c @@ -366,7 +366,6 @@ warn_stab (p, err) /* Create a handle to parse stabs symbols with. */ -/*ARGSUSED*/ PTR start_stab (dhandle, abfd, sections, syms, symcount) PTR dhandle ATTRIBUTE_UNUSED; @@ -562,7 +561,7 @@ parse_stab (dhandle, handle, type, desc, value, string) f = info->so_string; - if (IS_ABSOLUTE_PATH (string)) + if (IS_ABSOLUTE_PATH (string)) info->so_string = xstrdup (string); else info->so_string = concat (info->so_string, string, @@ -1912,7 +1911,7 @@ parse_stab_sun_builtin_type (dhandle, pp) } ++*pp; - /* The second number is always 0, so ignore it too. */ + /* The second number is always 0, so ignore it too. */ (void) parse_number (pp, (boolean *) NULL); if (**pp != ';') { @@ -1921,7 +1920,7 @@ parse_stab_sun_builtin_type (dhandle, pp) } ++*pp; - /* The third number is the number of bits for this type. */ + /* The third number is the number of bits for this type. */ bits = parse_number (pp, (boolean *) NULL); /* The type *should* end with a semicolon. If it are embedded @@ -1974,7 +1973,7 @@ parse_stab_sun_floating_type (dhandle, pp) || details == NF_COMPLEX32) return debug_make_complex_type (dhandle, bytes); - return debug_make_float_type (dhandle, bytes); + return debug_make_float_type (dhandle, bytes); } /* Handle an enum type. */ @@ -2308,7 +2307,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp) /* Look for the ':' that separates the field name from the field values. Data members are delimited by a single ':', while member functions are delimited by a pair of ':'s. When we hit the member - functions (if any), terminate scan loop and return. */ + functions (if any), terminate scan loop and return. */ p = strchr (p, ':'); if (p == NULL) @@ -2759,27 +2758,27 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp) /* Figure out from whence this virtual function came. It may belong to virtual function table of one of its baseclasses. */ - look_ahead_type = parse_stab_type (dhandle, info, - (const char *) NULL, - pp, - (debug_type **) NULL); - if (**pp == ':') - { - /* g++ version 1 overloaded methods. */ - context = DEBUG_TYPE_NULL; - } - else - { - context = look_ahead_type; - look_ahead_type = DEBUG_TYPE_NULL; - if (**pp != ';') - { - bad_stab (orig); - return false; - } - ++*pp; - } - } + look_ahead_type = parse_stab_type (dhandle, info, + (const char *) NULL, + pp, + (debug_type **) NULL); + if (**pp == ':') + { + /* g++ version 1 overloaded methods. */ + context = DEBUG_TYPE_NULL; + } + else + { + context = look_ahead_type; + look_ahead_type = DEBUG_TYPE_NULL; + if (**pp != ';') + { + bad_stab (orig); + return false; + } + ++*pp; + } + } break; case '?': @@ -3035,7 +3034,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr) orig = *pp; - /* If we are positioned at a ';', then skip it. */ + /* If we are positioned at a ';', then skip it. */ if (**pp == ';') ++*pp; @@ -3047,7 +3046,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr) if (**pp == '=' || **pp == '+' || **pp == '-') { /* Obsolete flags that used to indicate the presence of - constructors and/or destructors. */ + constructors and/or destructors. */ ++*pp; } @@ -3088,7 +3087,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr) *pp = p + 1; } - return true; + return true; } /* Read a definition of an array type. */ diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c index 3507831..dade244 100644 --- a/contrib/binutils/binutils/strings.c +++ b/contrib/binutils/binutils/strings.c @@ -61,7 +61,7 @@ #endif #include "bfd.h" #include <stdio.h> -#include <getopt.h> +#include "getopt.h" #include <errno.h> #include "bucomm.h" #include "libiberty.h" diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c index 8ac0f27..2d0362b 100644 --- a/contrib/binutils/binutils/sysdump.c +++ b/contrib/binutils/binutils/sysdump.c @@ -30,8 +30,8 @@ #include "safe-ctype.h" #include <stdio.h> -#include <libiberty.h> -#include <getopt.h> +#include "libiberty.h" +#include "getopt.h" #include "sysroff.h" static int dump = 1; @@ -107,10 +107,10 @@ dh (ptr, size) { for (j = 0; j < span; j++) { - if (j + i < size) + if (j + i < size) printf ("%02x ", ptr[i + j]); - else - printf (" "); + else + printf (" "); } for (j = 0; j < span && j + i < size; j++) diff --git a/contrib/binutils/binutils/unwind-ia64.c b/contrib/binutils/binutils/unwind-ia64.c index 0873c6f..803a5fa 100644 --- a/contrib/binutils/binutils/unwind-ia64.c +++ b/contrib/binutils/binutils/unwind-ia64.c @@ -44,15 +44,18 @@ unw_print_brmask (cp, mask) char * cp; unsigned int mask; { - char *sep = ""; + int sep = 0; int i; for (i = 0; mask && (i < 5); ++i) { if (mask & 1) { - cp += sprintf (cp, "%sb%u", sep, i + 1); - sep = ","; + if (sep) + *cp++ = ','; + *cp++ = 'b'; + *cp++ = i + 1 + '0'; + sep = 1; } mask >>= 1; } @@ -64,19 +67,22 @@ unw_print_grmask (cp, mask) char * cp; unsigned int mask; { - char *sep = ""; + int sep = 0; int i; - *cp = '\0'; for (i = 0; i < 4; ++i) { if (mask & 1) { - cp += sprintf (cp, "%sr%u", sep, i + 4); - sep = ","; + if (sep) + *cp++ = ','; + *cp++ = 'r'; + *cp++ = i + 4 + '0'; + sep = 1; } mask >>= 1; } + *cp = '\0'; } static void @@ -84,19 +90,28 @@ unw_print_frmask (cp, mask) char * cp; unsigned int mask; { - char *sep = ""; + int sep = 0; int i; - *cp = '\0'; for (i = 0; i < 20; ++i) { if (mask & 1) { - cp += sprintf (cp, "%sf%u", sep, (i < 4) ? (i + 2) : (i + 12)); - sep = ","; + if (sep) + *cp++ = ','; + *cp++ = 'f'; + if (i < 4) + *cp++ = i + 2 + '0'; + else + { + *cp++ = (i + 2) / 10 + 1 + '0'; + *cp++ = (i + 2) % 10 + '0'; + } + sep = 1; } mask >>= 1; } + *cp = '\0'; } static void @@ -475,7 +490,7 @@ typedef bfd_vma unw_word; * macros/constants before including this file: * * Types: - * unw_word Unsigned integer type with at least 64 bits + * unw_word Unsigned integer type with at least 64 bits * * Register names: * UNW_REG_BSP diff --git a/contrib/binutils/binutils/unwind-ia64.h b/contrib/binutils/binutils/unwind-ia64.h index d80e46a..7d5033d 100644 --- a/contrib/binutils/binutils/unwind-ia64.h +++ b/contrib/binutils/binutils/unwind-ia64.h @@ -1,5 +1,5 @@ /* unwind-ia64.h -- dump IA-64 unwind info. - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com> This file is part of GNU Binutils. @@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <elf/ia64.h> -#include <ansidecl.h> +#include "elf/ia64.h" +#include "ansidecl.h" #define UNW_VER(x) ((x) >> 48) #define UNW_FLAG_MASK 0x0000ffff00000000 diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c index 4f10e0d..5d0dc3b 100644 --- a/contrib/binutils/binutils/wrstabs.c +++ b/contrib/binutils/binutils/wrstabs.c @@ -795,7 +795,7 @@ stab_bool_type (p, size) case 2: index = -22; break; - + default: case 4: index = -16; @@ -963,7 +963,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc) } return true; -} +} /* Push a pointer type. */ @@ -1368,7 +1368,6 @@ stab_get_struct_index (info, tag, id, kind, psize) /* Start outputting a struct. We ignore the tag, and handle it in stab_tag. */ -/*ARGSUSED*/ static boolean stab_start_struct_type (p, tag, id, structp, size) PTR p; @@ -2379,7 +2378,6 @@ stab_end_block (p, addr) /* End a function. */ -/*ARGSUSED*/ static boolean stab_end_function (p) PTR p ATTRIBUTE_UNUSED; diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in index c968bf0..aae3f87 100644 --- a/contrib/binutils/config-ml.in +++ b/contrib/binutils/config-ml.in @@ -510,14 +510,16 @@ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ] cat > Multi.tem <<\EOF +PWD=$${PWDCMD-pwd} + # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-do: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ - rootpre=`pwd`/; export rootpre; \ - srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ + rootpre=`${PWD}`/; export rootpre; \ + srcrootpre=`cd $(srcdir); ${PWD}`/; export srcrootpre; \ lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ @@ -535,6 +537,7 @@ multi-do: LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ LDFLAGS="$(LDFLAGS) $${flags}" \ + DESTDIR="$(DESTDIR)" \ $(DO)); then \ true; \ else \ @@ -552,7 +555,7 @@ multi-clean: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ - lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ + lib=`${PWD} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ for dir in Makefile $(MULTIDIRS); do \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ @@ -659,10 +662,10 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdirs ${multidirs}" - echo "pwd: `pwd`" + echo "pwd: `${PWDCMD-pwd}`" fi - ml_origdir=`pwd` + ml_origdir=`${PWDCMD-pwd}` ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` # cd to top-level-build-dir/${with_target_subdir} cd .. @@ -671,7 +674,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdir ${ml_dir}" - echo "pwd: `pwd`" + echo "pwd: `${PWDCMD-pwd}`" fi if [ -d ${ml_dir} ]; then true; else @@ -699,7 +702,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then case ${srcdir} in ".") - echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir} + echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir} if [ "${with_target_subdir}" != "." ]; then ml_unsubdir="../" else diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess index db494f8..fbad77f 100755 --- a/contrib/binutils/config.guess +++ b/contrib/binutils/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2002-02-19' +timestamp='2002-05-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -98,7 +98,7 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do + for c in cc gcc c89 c99 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; @@ -138,9 +138,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \ - UNAME_MACHINE_ARCH=unknown + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; @@ -427,6 +429,9 @@ EOF Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -759,7 +764,7 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -770,15 +775,15 @@ EOF #undef CPU #undef mips #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif - #endif + #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c @@ -957,7 +962,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1058,12 +1063,12 @@ EOF echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc - echo i386-${UNAME_MACHINE}-nto-qnx - else - echo `uname -p`-${UNAME_MACHINE}-nto-qnx fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub index 4ac7ab2..69f444e 100755 --- a/contrib/binutils/config.sub +++ b/contrib/binutils/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2002-02-22' +timestamp='2002-05-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -230,8 +230,8 @@ case $basic_machine in | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ @@ -239,7 +239,7 @@ case $basic_machine in | mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ + | mipsisa32 | mipsisa64 \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc | or32 \ @@ -247,7 +247,7 @@ case $basic_machine in | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ @@ -281,14 +281,14 @@ case $basic_machine in | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cydra-* \ - | d10v-* | d30v-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -306,7 +306,7 @@ case $basic_machine in | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ @@ -1090,7 +1090,7 @@ case $os in | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova*) + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1409,7 +1409,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog index 5a398ec..129ce61 100644 --- a/contrib/binutils/config/ChangeLog +++ b/contrib/binutils/config/ChangeLog @@ -1,3 +1,101 @@ +2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. + +2002-05-13 Nathanael Nerode <neroden@twcny.rr.com> + + * mh-apollo68: remove unused HDEFINES setting. + * mh-dgux: remove unused HDEFINES setting. + * mh-dgux386: remove unused HDEFINES setting, duplicate RANLIB=true. + +2002-04-29 Nathanael Nerode <neroden@twcny.rr.com> + + * config/mh-cxux: remove dead code + * config/mh-dgux386: remove dead code + * config/mh-hp300: remove dead code + * config/mh-hpux: remove dead code + * config/mh-hpux8: remove dead code + * config/mh-irix5: remove dead code + * config/mh-irix6: remove dead code + * config/mh-ncr3000: remove dead code + * config/mh-ncrsvr43: remove dead code + * config/mh-necv4: remove dead code + * config/mh-sco: remove dead code + * config/mh-solaris: remove dead code + * config/mh-sysv: remove dead code + * config/mh-sysv4: remove dead code + * config/mh-sysv5: remove dead code + * config/mh-irix4: remove, contains only dead code + + * config/mt-armpic: Delete. + * config/mt-elfalphapic: Delete. + * config/mt-i370pic: Delete. + * config/mt-ia64pic: Delete. + * config/mt-m68kpic: Delete. + * config/mt-papic: Delete. + * config/mt-ppcpic: Delete. + * config/mt-s390pic: Delete. + * config/mt-sparcpic: Delete. + * config/mt-x86pic: Delete. + +2002-04-19 Nathanael Nerode <neroden@twcny.rr.com> + + * mh-a68bsd: clean out dead code + * mh-apollo68: clean out dead code + * mh-cxux: clean out dead code + * mh-decstation: clean out dead code + * mh-dgux: clean out dead code + * mh-dgux386: clean out dead code + * mh-hp300: clean out dead code + * mh-hpux: clean out dead code + * mh-hpux8: clean out dead code + * mh-interix: clean out dead code + * mh-irix4: clean out dead code + * mh-lynxrs6k: clean out dead code + * mh-mingw32: clean out dead code + * mh-ncr3000: clean out dead code + * mh-ncrsvr43: clean out dead code + * mh-necv4: clean out dead code + * mh-openedition: clean out dead code + * mh-riscos: clean out dead code + * mh-sco: clean out dead code + * mh-sysv4: clean out dead code + * mh-lynxos: removed, contained only dead code + * mh-vaxult2: removed, contained only dead code + * mh-sun3: removed, contained only dead code + +2002-04-15 Keith Seitz <keiths@redhat.com> + + * acinclude.m4 (CYG_AC_PATH_TCLCONFIG): Search the win/ directory, + too. + (CYG_AC_PATH_TKCONFIG): Likewise. + +2001-10-07 Joseph S. Myers <jsm28@cam.ac.uk> + + * acinclude.m4: Fix spelling error of "separate" as "seperate". + +2001-05-22 Jason Merrill <jason_merrill@redhat.com> + + * mt-linux (CXXFLAGS_FOR_TARGET): Lose -fvtable-thunks. + +2001-01-27 Richard Henderson <rth@redhat.com> + + * mt-alphaieee: New file. + +2001-01-02 Laurynas Biveinis <lauras@softhome.net> + + * mh-djgpp: do not set CFLAGS. + +2000-08-04 Mark Elbrecht <snowball3@bigfoot.com> + + * mh-djgpp: Conditionally set 'target_alias' to djgpp. Conditionally + modify 'gcc_version'. + +2000-07-21 Andrew Haley <aph@cygnus.com> + + * mh-ia64pic: New file. + * mt-ia64pic: New file. + 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com> * mh-s390pic: New file. diff --git a/contrib/binutils/config/acinclude.m4 b/contrib/binutils/config/acinclude.m4 index 6187b5a..00887e0 100755 --- a/contrib/binutils/config/acinclude.m4 +++ b/contrib/binutils/config/acinclude.m4 @@ -206,7 +206,7 @@ dnl Look for the header file AC_CACHE_VAL(ac_cv_c_bfdh,[ for i in $dirlist; do if test -f "$i/bfd/bfd.h" ; then - ac_cv_c_bfdh=`(cd $i/bfd; pwd)` + ac_cv_c_bfdh=`(cd $i/bfd; ${PWDCMD-pwd})` break fi done @@ -224,7 +224,7 @@ AC_MSG_CHECKING(for the bfd library in the build tree) AC_CACHE_VAL(ac_cv_c_bfdlib,[ for i in $dirlist; do if test -f "$i/bfd/Makefile" ; then - ac_cv_c_bfdlib=`(cd $i/bfd; pwd)` + ac_cv_c_bfdlib=`(cd $i/bfd; ${PWDCMD-pwd})` fi done ]) @@ -247,7 +247,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_liberty,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then - ac_cv_c_liberty=`(cd $i/libiberty; pwd)` + ac_cv_c_liberty=`(cd $i/libiberty; ${PWDCMD-pwd})` fi done ]) @@ -268,7 +268,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_opc,[ for i in $dirlist; do if test -f "$i/opcodes/Makefile" ; then - ac_cv_c_opc=`(cd $i/opcodes; pwd)` + ac_cv_c_opc=`(cd $i/opcodes; ${PWDCMD-pwd})` fi done ]) @@ -290,7 +290,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_dejagnu,[ for i in $dirlist; do if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then - ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; pwd)` + ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; ${PWDCMD-pwd})` fi done ]) @@ -303,7 +303,7 @@ fi AC_CACHE_VAL(ac_cv_c_dejagnulib,[ for i in $dirlist; do if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then - ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; pwd)` + ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; ${PWDCMD-pwd})` fi done ]) @@ -316,7 +316,7 @@ AC_MSG_CHECKING(for runtest in the source tree) AC_CACHE_VAL(ac_cv_c_runtest,[ for i in $dirlist; do if test -f "$srcdir/$i/dejagnu/runtest" ; then - ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; pwd)` + ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; ${PWDCMD-pwd})` fi done ]) @@ -342,7 +342,7 @@ dnl Look for the header file AC_CACHE_VAL(ac_cv_c_intlh,[ for i in $dirlist; do if test -f "$i/intl/libintl.h" ; then - ac_cv_c_intlh=`(cd $i/intl; pwd)` + ac_cv_c_intlh=`(cd $i/intl; ${PWDCMD-pwd})` break fi done @@ -360,7 +360,7 @@ AC_MSG_CHECKING(for the libintl library in the build tree) AC_CACHE_VAL(ac_cv_c_intllib,[ for i in $dirlist; do if test -f "$i/intl/Makefile" ; then - ac_cv_c_intllib=`(cd $i/intl; pwd)` + ac_cv_c_intllib=`(cd $i/intl; ${PWDCMD-pwd})` fi done ]) @@ -388,7 +388,7 @@ AC_MSG_CHECKING(for the simulator header file) AC_CACHE_VAL(ac_cv_c_simh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then - ac_cv_c_simh=`(cd ${srcdir}/$i/include; pwd)` + ac_cv_c_simh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` break fi done @@ -420,7 +420,7 @@ AC_MSG_CHECKING(for the simulator library) AC_CACHE_VAL(ac_cv_c_simlib,[ for i in $dirlist; do if test -f "$i/sim/$target_dir/Makefile" ; then - ac_cv_c_simlib=`(cd $i/sim/$target_dir; pwd)` + ac_cv_c_simlib=`(cd $i/sim/$target_dir; ${PWDCMD-pwd})` fi done ]) @@ -463,7 +463,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_libib,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then - ac_cv_c_libib=`(cd $i/libiberty/; pwd)` + ac_cv_c_libib=`(cd $i/libiberty/; ${PWDCMD-pwd})` fi done ]) @@ -483,7 +483,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_devoh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then - ac_cv_c_devoh=`(cd ${srcdir}/$i/include; pwd)` + ac_cv_c_devoh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` fi done ]) @@ -506,7 +506,7 @@ IDELIB= AC_CACHE_VAL(ac_cv_c_ideh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libide/src/event.h" ; then - ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; pwd)`; + ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; ${PWDCMD-pwd})`; fi done ]) @@ -521,7 +521,7 @@ AC_MSG_CHECKING(for LIBIDE TCL headers in the source tree) AC_CACHE_VAL(ac_cv_c_idetclh,[ for i in $dirlist; do if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then - ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; pwd)`; + ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; ${PWDCMD-pwd})`; fi done ]) @@ -536,7 +536,7 @@ AC_MSG_CHECKING(for IDE headers in the build tree) AC_CACHE_VAL(ac_cv_c_ideh2,[ for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then - ac_cv_c_ideh2=`(cd $i/libide/src; pwd)`; + ac_cv_c_ideh2=`(cd $i/libide/src; ${PWDCMD-pwd})`; fi done ]) @@ -553,7 +553,7 @@ AC_CACHE_VAL(ac_cv_c_idelib,[ if test x"${ac_cv_c_idelib}" = x ; then for i in $dirlist; do if test -f "$i/libide/src/Makefile" ; then - ac_cv_c_idelib=`(cd $i/libide/src; pwd)` + ac_cv_c_idelib=`(cd $i/libide/src; ${PWDCMD-pwd})` break fi done @@ -571,7 +571,7 @@ AC_CACHE_VAL(ac_cv_c_idetcllib,[ if test x"${ac_cv_c_idetcllib}" = x ; then for i in $dirlist; do if test -f "$i/libidetcl/src/Makefile" ; then - ac_cv_c_idetcllib=`(cd $i/libidetcl/src; pwd)` + ac_cv_c_idetcllib=`(cd $i/libidetcl/src; ${PWDCMD-pwd})` break fi done @@ -597,7 +597,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_iluh,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then - ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; pwd)` + ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) @@ -613,7 +613,7 @@ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ AC_CACHE_VAL(ac_cv_c_iluh5,[ for i in $dirlist; do if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then - ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; pwd)` + ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) @@ -628,7 +628,7 @@ AC_MSG_CHECKING(for ILU C++ headers in the source tree) AC_CACHE_VAL(ac_cv_c_iluh2,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then - ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; pwd)` + ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; ${PWDCMD-pwd})` fi done ]) @@ -643,7 +643,7 @@ AC_MSG_CHECKING(for ILU C headers) AC_CACHE_VAL(ac_cv_c_iluh3,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then - ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; pwd)` + ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; ${PWDCMD-pwd})` fi done ]) @@ -658,7 +658,7 @@ AC_MSG_CHECKING(for ILU C runtime headers) AC_CACHE_VAL(ac_cv_c_iluh4,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then - ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; pwd)` + ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; ${PWDCMD-pwd})` fi done ]) @@ -672,7 +672,7 @@ fi AC_CACHE_VAL(ac_cv_c_ilupath,[ for i in $dirlist; do if test -f "$i/ilu/Makefile" ; then - ac_cv_c_ilupath=`(cd $i/ilu; pwd)` + ac_cv_c_ilupath=`(cd $i/ilu; ${PWDCMD-pwd})` break fi done @@ -682,7 +682,7 @@ ILUTOP=${ac_cv_c_ilupath} AC_MSG_CHECKING(for the ILU library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib,[ if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then - ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; pwd)` + ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a) else AC_MSG_RESULT(no) @@ -691,7 +691,7 @@ fi]) AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib2,[ if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then - ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; pwd)` + ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a) else AC_MSG_RESULT(no) @@ -700,7 +700,7 @@ fi]) AC_MSG_CHECKING(for the ILU C bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib3,[ if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then - ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; pwd)` + ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a) else AC_MSG_RESULT(no) @@ -709,7 +709,7 @@ fi]) AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib4,[ if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then - ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; pwd)` + ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a) else AC_MSG_RESULT(no) @@ -858,9 +858,9 @@ AC_CACHE_VAL(ac_cv_c_tclh,[ dnl first check to see if --with-tclinclude was specified if test x"${with_tclinclude}" != x ; then if test -f ${with_tclinclude}/tcl.h ; then - ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` + ac_cv_c_tclh=`(cd ${with_tclinclude}; ${PWDCMD-pwd})` elif test -f ${with_tclinclude}/generic/tcl.h ; then - ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` + ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers]) fi @@ -870,7 +870,7 @@ dnl next check if it came with Tcl configuration file if test x"${ac_cv_c_tclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then - ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; pwd)` + ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; ${PWDCMD-pwd})` break fi done @@ -891,7 +891,7 @@ if test x"${ac_cv_c_tclh}" = x ; then dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do if test -f $i/generic/tcl.h ; then - ac_cv_c_tclh=`(cd $i/generic; pwd)` + ac_cv_c_tclh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done @@ -950,7 +950,7 @@ if test x"${no_tcl}" = x ; then dnl First check to see if --with-tclconfig was specified. if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi @@ -959,8 +959,15 @@ if test x"${no_tcl}" = x ; then dnl next check if it came with Tcl configuration file in the source tree if test x"${ac_cv_c_tclconfig}" = x ; then for i in $dirlist; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tcl. if test -f $srcdir/$i/unix/tclConfig.sh ; then - ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; pwd)` + ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` + break + fi + if test -f $srcdir/$i/win/tclConfig.sh ; then + ac_cv_c_tclconfig=`(cd $srcdir/$i/win; ${PWDCMD-pwd})` break fi done @@ -978,8 +985,15 @@ if test x"${no_tcl}" = x ; then dnl find the exact Tcl dir. We do it this way, cause there dnl might be multiple version of Tcl, and we want the most recent one. for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do + dnl need to test both unix and win directories, since + dnl cygwin's tclConfig.sh could be in either directory depending + dnl on the cygwin port of tcl. if test -f $i/unix/tclConfig.sh ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + ac_cv_c_tclconfig=`(cd $i/unix; ${PWDCMD-pwd})` + break + fi + if test -f $i/win/tclConfig.sh ; then + ac_cv_c_tclconfig=`(cd $i/win; ${PWDCMD-pwd})` break fi done @@ -1071,7 +1085,7 @@ AC_DEFUN(CYG_AC_PATH_TKH, [ # Note the gross little conversion here of srcdir by cd'ing to the found # directory. This converts the path from a relative to an absolute, so # recursive cache variables for the path will work right. We check all -# the possible paths in one loop rather than many seperate loops to speed +# the possible paths in one loop rather than many separate loops to speed # things up. # the alternative search directory is involked by --with-tkinclude # @@ -1083,9 +1097,9 @@ AC_CACHE_VAL(ac_cv_c_tkh,[ dnl first check to see if --with-tkinclude was specified if test x"${with_tkinclude}" != x ; then if test -f ${with_tkinclude}/tk.h ; then - ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` + ac_cv_c_tkh=`(cd ${with_tkinclude}; ${PWDCMD-pwd})` elif test -f ${with_tkinclude}/generic/tk.h ; then - ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` + ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers]) fi @@ -1095,7 +1109,7 @@ dnl next check if it came with Tk configuration file if test x"${ac_cv_c_tkconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then - ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; pwd)` + ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; ${PWDCMD-pwd})` break fi done @@ -1116,7 +1130,7 @@ if test x"${ac_cv_c_tkh}" = x ; then dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do if test -f $i/generic/tk.h ; then - ac_cv_c_tkh=`(cd $i/generic; pwd)` + ac_cv_c_tkh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done @@ -1169,7 +1183,7 @@ if test x"${no_tk}" = x ; then dnl First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi @@ -1178,8 +1192,15 @@ if test x"${no_tk}" = x ; then dnl next check if it came with Tk configuration file in the source tree if test x"${ac_cv_c_tkconfig}" = x ; then for i in $dirlist; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tk. if test -f $srcdir/$i/unix/tkConfig.sh ; then - ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; pwd)` + ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` + break + fi + if test -f $srcdir/$i/win/tkConfig.sh ; then + ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})` break fi done @@ -1197,8 +1218,15 @@ if test x"${no_tk}" = x ; then dnl find the exact Tk dir. We do it this way, cause there dnl might be multiple version of Tk, and we want the most recent one. for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do + dnl need to test both unix and win directories, since + dnl cygwin's tkConfig.sh could be in either directory depending + dnl on the cygwin port of tk. if test -f $i/unix/tkConfig.sh ; then - ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + ac_cv_c_tkconfig=`(cd $i/unix; ${PWDCMD-pwd})` + break + fi + if test -f $i/win/tkConfig.sh ; then + ac_cv_c_tkconfig=`(cd $i/win; ${PWDCMD-pwd})` break fi done @@ -1274,9 +1302,9 @@ AC_CACHE_VAL(ac_cv_c_itclh,[ dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl.h ; then - ac_cv_c_itclh=`(cd ${with_itclinclude}; pwd)` + ac_cv_c_itclh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl.h ; then - ac_cv_c_itclh=`(cd ${with_itclinclude}/src; pwd)` + ac_cv_c_itclh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain headers]) fi @@ -1286,7 +1314,7 @@ dnl next check if it came with Itcl configuration file if test x"${ac_cv_c_itclconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_itclconfig/$i/src/itcl.h ; then - ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; pwd)` + ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; ${PWDCMD-pwd})` break fi done @@ -1307,7 +1335,7 @@ if test x"${ac_cv_c_itclh}" = x ; then dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl.h ; then - ac_cv_c_itclh=`(cd $i/src; pwd)` + ac_cv_c_itclh=`(cd $i/src; ${PWDCMD-pwd})` break fi done @@ -1352,10 +1380,10 @@ if test x"${no_itcl}" = x ; then dnl First check to see if --with-itcllib was specified. if test x"${with_itcllib}" != x ; then if test -f "${with_itcllib}/libitcl$TCL_SHARED_LIB_SUFFIX" ; then - ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_SHARED_LIB_SUFFIX + ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_SHARED_LIB_SUFFIX else if test -f "${with_itcllib}/libitcl$TCL_UNSHARED_LIB_SUFFIX"; then - ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_UNSHARED_LIB_SUFFIX + ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_UNSHARED_LIB_SUFFIX fi fi fi @@ -1371,9 +1399,9 @@ if test x"${no_itcl}" = x ; then done dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$itclpath/src/libitcl.$TCL_SHLIB_SUFFIX" ; then - ac_cv_c_itcllib=`(cd $itclpath/src; pwd)` + ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})` elif test -f "$itclpath/src/libitcl.a"; then - ac_cv_c_itcllib=`(cd $itclpath/src; pwd)` + ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})` fi fi dnl check in a few other private locations @@ -1387,10 +1415,10 @@ if test x"${no_itcl}" = x ; then for i in `ls -dr ${itclpath}/itcl* 2>/dev/null` ; do dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "$i/src/libitcl$TCL_SHLIB_SUFFIX" ; then - ac_cv_c_itcllib=`(cd $i/src; pwd)` + ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})` break elif test -f "$i/src/libitcl.a"; then - ac_cv_c_itcllib=`(cd $i/src; pwd)` + ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})` break fi done @@ -1402,9 +1430,9 @@ if test x"${no_itcl}" = x ; then ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib dnl Itcl 7.5 and greater puts library in subdir. Look there first. if test -f "${ccpath}/libitcl$TCL_SHLIB_SUFFIX" ; then - ac_cv_c_itcllib=`(cd ${ccpath}; pwd)` + ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})` elif test -f "${ccpath}/libitcl.a"; then - ac_cv_c_itcllib=`(cd ${ccpath}; pwd)` + ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})` fi fi ]) @@ -1435,9 +1463,9 @@ AC_CACHE_VAL(ac_cv_c_itclsh,[ dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then - ac_cv_c_itclsh=`(cd ${with_itclinclude}; pwd)` + ac_cv_c_itclsh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl_sh ; then - ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; pwd)` + ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi @@ -1458,7 +1486,7 @@ if test x"${ac_cv_c_itclsh}" = x ; then dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/src/itcl_sh ; then - ac_cv_c_itclsh=`(cd $i/src; pwd)`/itcl_sh + ac_cv_c_itclsh=`(cd $i/src; ${PWDCMD-pwd})`/itcl_sh break fi done @@ -1497,9 +1525,9 @@ AC_CACHE_VAL(ac_cv_c_itclmkidx,[ dnl first check to see if --with-itclinclude was specified if test x"${with_itclinclude}" != x ; then if test -f ${with_itclinclude}/itcl_sh ; then - ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; pwd)` + ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; ${PWDCMD-pwd})` elif test -f ${with_itclinclude}/src/itcl_sh ; then - ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; pwd)` + ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh]) fi @@ -1520,7 +1548,7 @@ if test x"${ac_cv_c_itclmkidx}" = x ; then dnl might be multiple version of Itcl, and we want the most recent one. for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do if test -f $i/library/itcl_mkindex.tcl ; then - ac_cv_c_itclmkidx=`(cd $i/library; pwd)`/itcl_mkindex.tcl + ac_cv_c_itclmkidx=`(cd $i/library; ${PWDCMD-pwd})`/itcl_mkindex.tcl break fi done @@ -1531,7 +1559,7 @@ if test x"${ac_cv_c_itclmkidx}" = x ; then dnl Itcl 7.5 and greater puts library in subdir. Look there first. for i in `ls -dr $ccpath/itcl* 2>/dev/null ` ; do if test -f $i/itcl_mkindex.tcl ; then - ac_cv_c_itclmkidx=`(cd $i; pwd)`/itcl_mkindex.tcl + ac_cv_c_itclmkidx=`(cd $i; ${PWDCMD-pwd})`/itcl_mkindex.tcl break fi done @@ -1567,9 +1595,9 @@ AC_CACHE_VAL(ac_cv_c_tixh,[ dnl first check to see if --with-tixinclude was specified if test x"${with_tixinclude}" != x ; then if test -f ${with_tixinclude}/tix.h ; then - ac_cv_c_tixh=`(cd ${with_tixinclude}; pwd)` + ac_cv_c_tixh=`(cd ${with_tixinclude}; ${PWDCMD-pwd})` elif test -f ${with_tixinclude}/generic/tix.h ; then - ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; pwd)` + ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tixinclude} directory doesn't contain headers]) fi @@ -1579,7 +1607,7 @@ dnl next check if it came with Tix configuration file if test x"${ac_cv_c_tixconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_tixconfig/$i/generic/tix.h ; then - ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; pwd)` + ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; ${PWDCMD-pwd})` break fi done @@ -1600,7 +1628,7 @@ if test x"${ac_cv_c_tixh}" = x ; then dnl might be multiple version of Tix, and we want the most recent one. for i in `ls -dr $tixpath/tix* 2>/dev/null ` ; do if test -f $i/generic/tix.h ; then - ac_cv_c_tixh=`(cd $i/generic; pwd)` + ac_cv_c_tixh=`(cd $i/generic; ${PWDCMD-pwd})` break fi done @@ -1653,7 +1681,7 @@ if test x"${no_tix}" = x ; then # First check to see if --with-tixconfig was specified. if test x"${with_tixconfig}" != x ; then if test -f "${with_tixconfig}/tixConfig.sh" ; then - ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` + ac_cv_c_tixconfig=`(cd ${with_tixconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh]) fi @@ -1669,7 +1697,7 @@ if test x"${no_tix}" = x ; then ../../../tix \ `ls -dr ../../../tix[[4]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then - ac_cv_c_tixconfig=`(cd $i; pwd)` + ac_cv_c_tixconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1678,7 +1706,7 @@ if test x"${no_tix}" = x ; then if test x"${ac_cv_c_tixconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i; pwd)` + ac_cv_c_tkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1689,7 +1717,7 @@ if test x"${no_tix}" = x ; then ${srcdir}/../tix \ `ls -dr ${srcdir}/../tix[[4-9]]* 2>/dev/null` ; do if test -f "$i/tixConfig.sh" ; then - ac_cv_c_tixconfig=`(cd $i; pwd)` + ac_cv_c_tixconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1736,7 +1764,7 @@ if test x"${no_itcl}" = x ; then # First check to see if --with-itclconfig was specified. if test x"${with_itclconfig}" != x ; then if test -f "${with_itclconfig}/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` + ac_cv_c_itclconfig=`(cd ${with_itclconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh]) fi @@ -1752,7 +1780,7 @@ if test x"${no_itcl}" = x ; then ../../../itcl/itcl \ `ls -dr ../../../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` + ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1761,7 +1789,7 @@ if test x"${no_itcl}" = x ; then if test x"${ac_cv_c_itclconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` + ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1772,7 +1800,7 @@ if test x"${no_itcl}" = x ; then ${srcdir}/../itcl/itcl \ `ls -dr ${srcdir}/../itcl/itcl[[3]]* 2>/dev/null` ; do if test -f "$i/itcl/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` + ac_cv_c_itclconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1823,7 +1851,7 @@ if test x"${no_itk}" = x ; then # First check to see if --with-itkconfig was specified. if test x"${with_itkconfig}" != x ; then if test -f "${with_itkconfig}/itkConfig.sh" ; then - ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` + ac_cv_c_itkconfig=`(cd ${with_itkconfig}; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh]) fi @@ -1839,7 +1867,7 @@ if test x"${no_itk}" = x ; then ../../../itcl/itk \ `ls -dr ../../../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then - ac_cv_c_itkconfig=`(cd $i; pwd)` + ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1848,7 +1876,7 @@ if test x"${no_itk}" = x ; then if test x"${ac_cv_c_itkconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/itcl/itkConfig.sh" ; then - ac_cv_c_itkconfig=`(cd $i; pwd)` + ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1859,7 +1887,7 @@ if test x"${no_itk}" = x ; then ${srcdir}/../itcl/itk \ `ls -dr ${srcdir}/../itcl/itk[[3]]* 2>/dev/null` ; do if test -f "$i/itkConfig.sh" ; then - ac_cv_c_itkconfig=`(cd $i; pwd)` + ac_cv_c_itkconfig=`(cd $i; ${PWDCMD-pwd})` break fi done @@ -1906,9 +1934,9 @@ AC_CACHE_VAL(ac_cv_c_libguih,[ dnl first check to see if --with-libguiinclude was specified if test x"${with_libguiinclude}" != x ; then if test -f ${with_libguiinclude}/guitcl.h ; then - ac_cv_c_libguih=`(cd ${with_libguiinclude}; pwd)` + ac_cv_c_libguih=`(cd ${with_libguiinclude}; ${PWDCMD-pwd})` elif test -f ${with_libguiinclude}/src/guitcl.h ; then - ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; pwd)` + ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; ${PWDCMD-pwd})` else AC_MSG_ERROR([${with_libguiinclude} directory doesn't contain headers]) fi @@ -1918,7 +1946,7 @@ dnl next check if it came with Libgui configuration file if test x"${ac_cv_c_libguiconfig}" != x ; then for i in $dirlist; do if test -f $ac_cv_c_libguiconfig/$i/src/guitcl.h ; then - ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; pwd)` + ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; ${PWDCMD-pwd})` break fi done @@ -1939,7 +1967,7 @@ if test x"${ac_cv_c_libguih}" = x ; then dnl might be multiple version of Libgui, and we want the most recent one. for i in `ls -dr $libguipath/libgui* 2>/dev/null ` ; do if test -f $i/src/guitcl.h ; then - ac_cv_c_libguih=`(cd $i/src; pwd)` + ac_cv_c_libguih=`(cd $i/src; ${PWDCMD-pwd})` break fi done @@ -1976,7 +2004,7 @@ AC_CACHE_VAL(ac_cv_c_libguilib,[ if test x"${ac_cv_c_libguilib}" = x ; then for i in $dirlist; do if test -f "$i/libgui/src/Makefile" ; then - ac_cv_c_libguilib=`(cd $i/libgui/src; pwd)` + ac_cv_c_libguilib=`(cd $i/libgui/src; ${PWDCMD-pwd})` break fi done diff --git a/contrib/binutils/config/mh-cxux b/contrib/binutils/config/mh-cxux index 54b2a16..0a98f11 100644 --- a/contrib/binutils/config/mh-cxux +++ b/contrib/binutils/config/mh-cxux @@ -1,14 +1,7 @@ # Configuration for Harris CX/UX 7 (and maybe 6), based on sysv4 configuration. -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV -DSVR4 RANLIB = true -# C++ debugging is not yet supported under SVR4 (DWARF) -CXXFLAGS=-O - # The l flag generates a warning from the SVR4 archiver, remove it. AR_FLAGS = cq -# Under CX/UX, we want to tell the compiler to use ANSI mode. -CC=cc -Xa diff --git a/contrib/binutils/config/mh-decstation b/contrib/binutils/config/mh-decstation index 3720192..320927c 100644 --- a/contrib/binutils/config/mh-decstation +++ b/contrib/binutils/config/mh-decstation @@ -1,5 +1,3 @@ -CC = cc -Wf,-XNg1000 - # for X11, since the native DECwindows include files are really broken when # it comes to function prototypes. X11_EXTRA_CFLAGS = "-DNeedFunctionPrototypes=0" diff --git a/contrib/binutils/config/mh-mingw32 b/contrib/binutils/config/mh-mingw32 index 8c4839d..f622c8b 100644 --- a/contrib/binutils/config/mh-mingw32 +++ b/contrib/binutils/config/mh-mingw32 @@ -1,8 +1,3 @@ -# We don't want debugging info in Win32-hosted toolchains. -# Accomplish this by overriding CFLAGS. -CFLAGS=-O2 -CXXFLAGS=-O2 - # We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be # built without debugging information diff --git a/contrib/binutils/config/mh-necv4 b/contrib/binutils/config/mh-necv4 index e887736..6845f3c 100644 --- a/contrib/binutils/config/mh-necv4 +++ b/contrib/binutils/config/mh-necv4 @@ -1,10 +1,5 @@ # Host Makefile fragment for NEC MIPS SVR4. -# The C compiler on NEC MIPS SVR4 needs bigger tables. -CC = cc -ZXNd=5000 -ZXNg=1000 - -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV -DSVR4 RANLIB = true # NEC -lX11 needs some other libraries. diff --git a/contrib/binutils/config/mh-openedition b/contrib/binutils/config/mh-openedition index e99ef15..4003002 100644 --- a/contrib/binutils/config/mh-openedition +++ b/contrib/binutils/config/mh-openedition @@ -1,2 +1 @@ RANLIB = true -CC = c89 diff --git a/contrib/binutils/config/mh-sco b/contrib/binutils/config/mh-sco index cc337c9..574b92a 100644 --- a/contrib/binutils/config/mh-sco +++ b/contrib/binutils/config/mh-sco @@ -1,10 +1,5 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV RANLIB = true # You may need this if you don't have bison. # BISON = yacc -Sm10400 -# The native C compiler botches some simple uses of const. Unfortunately, -# it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. -CC = cc -Dconst= X11_EXTRA_LIBS = -lsocket -lm -lintl -lmalloc diff --git a/contrib/binutils/config/mh-solaris b/contrib/binutils/config/mh-solaris index ddbea54..16553c5 100644 --- a/contrib/binutils/config/mh-solaris +++ b/contrib/binutils/config/mh-solaris @@ -1,6 +1,5 @@ # Makefile changes for Suns running Solaris 2 -SYSV = -DSYSV RANLIB = true X11_EXTRA_LIBS = -lnsl -lsocket diff --git a/contrib/binutils/config/mh-sysv b/contrib/binutils/config/mh-sysv index 16b1187..4003002 100644 --- a/contrib/binutils/config/mh-sysv +++ b/contrib/binutils/config/mh-sysv @@ -1,3 +1 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV RANLIB = true diff --git a/contrib/binutils/config/mh-sysv4 b/contrib/binutils/config/mh-sysv4 index 8106651..3634950 100644 --- a/contrib/binutils/config/mh-sysv4 +++ b/contrib/binutils/config/mh-sysv4 @@ -1,10 +1,5 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV -DSVR4 RANLIB = true -# C++ debugging is not yet supported under SVR4 (DWARF) -CXXFLAGS=-O - # The l flag generates a warning from the SVR4 archiver, remove it. AR_FLAGS = cr diff --git a/contrib/binutils/config/mh-sysv5 b/contrib/binutils/config/mh-sysv5 index 1fa38e5..3634950 100644 --- a/contrib/binutils/config/mh-sysv5 +++ b/contrib/binutils/config/mh-sysv5 @@ -1,5 +1,3 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV -DSVR4 -DSVR5 RANLIB = true # The l flag generates a warning from the SVR4 archiver, remove it. diff --git a/contrib/binutils/config/mt-alphaieee b/contrib/binutils/config/mt-alphaieee new file mode 100644 index 0000000..9c20531 --- /dev/null +++ b/contrib/binutils/config/mt-alphaieee @@ -0,0 +1,2 @@ +CFLAGS_FOR_TARGET += -mieee +CXXFLAGS_FOR_TARGET += -mieee diff --git a/contrib/binutils/config/mt-linux b/contrib/binutils/config/mt-linux index a09e6f1..15bf417 100644 --- a/contrib/binutils/config/mt-linux +++ b/contrib/binutils/config/mt-linux @@ -1,2 +1 @@ -# When using glibc 2 on Linux we must always use vtable thunks. -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks -D_GNU_SOURCE +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE diff --git a/contrib/binutils/configure b/contrib/binutils/configure index 477bbe0..0d398f5 100755 --- a/contrib/binutils/configure +++ b/contrib/binutils/configure @@ -3,8 +3,8 @@ ### WARNING: this file contains embedded tabs. Do not run untabify on this file. # Configuration script -# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 -# Free Software Foundation, Inc. +# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, +# 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -53,6 +53,9 @@ cache_file_option= configdirs= extraconfigdirs= diroptions= +enable_threads=no +enable_shared=no +enable_libstdcxx_v3=yes exec_prefix= exec_prefixoption= fatal= @@ -86,7 +89,7 @@ subdirs= target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS -version="$Revision: 1.13 $" +version="$Revision: 1.17 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -149,16 +152,20 @@ NO_EDIT="This file was generated automatically by configure. Do not edit." progname=$0 # if PWD already has a value, it is probably wrong. -if [ -n "$PWD" ]; then PWD=`pwd`; fi +if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi case "${progname}" in -/*) ;; +/* | [A-Za-z]:[\\/]* ) ;; */*) ;; *) - PATH=$PATH:${PWD=`pwd`} ; export PATH + PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH ;; esac +# Export original configure arguments for use by sub-configures. +TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" +export TOPLEVEL_CONFIGURE_ARGUMENTS + # Loop over all args while : @@ -519,7 +526,7 @@ fi configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` ## the sed command below emulates the dirname command -topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` +topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}` # this is a hack. sun4 must always be a valid host alias or this will fail. @@ -559,8 +566,8 @@ case "${srcdir}" in echo "Invalid source directory ${srcdir}" >&2 exit 1 fi - pwd=`pwd` - srcpwd=`cd ${srcdir} ; pwd` + pwd=`${PWDCMD-pwd}` + srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` if [ "${pwd}" = "${srcpwd}" ] ; then srcdir=. fi @@ -572,7 +579,7 @@ case "${srcdir}" in ".") ;; *) if [ -f ${srcdir}/config.status ] ; then - echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2 + echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2 exit 1 fi esac @@ -656,13 +663,15 @@ case "${TMPDIR}" in esac # keep this filename short for &%*%$*# 14 char file names and 8+3 file names -tmpfile=${TMPDIR}/cNf$$ +tmpdir=${TMPDIR}/cNf$$ +mkdir ${tmpdir} || exit 1 +tmpfile=${tmpdir}/cNf$$ # Note that under many versions of sh a trap handler for 0 will *override* any # exit status you explicitly specify! At this point, the only non-error exit # is at the end of the script; these actions are duplicated there, minus # the "exit 1". Don't use "exit 0" anywhere after this without resetting the # trap handler, or you'll lose. -trap "rm -f Makefile.tem ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15 +trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15 # split ${srcdir}/configure.in into common, per-host, per-target, # and post-target parts. Post-target is optional. @@ -689,7 +698,7 @@ if test -f skip-this-dir; then # Perform the same cleanup as the trap handler, minus the "exit 1" of course, # and reset the trap handler. trap 0 - rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos + rm -rf Makefile* ${tmpdir} # Execute the final clean-up actions ${config_shell} skip-this-dir # and stop configuring this directory. @@ -699,7 +708,7 @@ fi # some sanity checks on configure.in case "${srctrigger}" in "") - echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2 + echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in. 1>&2 exit 1 ;; *) ;; @@ -769,8 +778,8 @@ esac if [ ! -r ${srcdir}/${srctrigger} ] ; then case "${srcdirdefaulted}" in - "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;; - *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;; + "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;; + *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;; esac echo '***' \(At least ${srctrigger} is missing.\) 1>&2 @@ -907,9 +916,9 @@ if [ "${build}" != "${host}" ]; then # are not the same, we set reasonable default values for the tools. tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD" - tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET" - tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX" - tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" + tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET" + tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX" + tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" tools="${tools} OBJCOPY OBJDUMP" @@ -942,11 +951,12 @@ t loop CC_FOR_BUILD=${CC_FOR_BUILD-gcc} CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} + GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} DLLTOOL=${DLLTOOL-${host_alias}-dlltool} DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} - HOST_PREFIX=${build_alias}- - HOST_PREFIX_1=${build_alias}- + BUILD_PREFIX=${build_alias}- + BUILD_PREFIX_1=${build_alias}- LD=${LD-${host_alias}-ld} LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld} MAKEINFO=${MAKEINFO-makeinfo} @@ -1062,22 +1072,6 @@ export CXX export CFLAGS export CXXFLAGS -# FIXME: This should be in configure.in, not configure -case "$host" in - *go32*) - enable_gdbtk=no ;; - *msdosdjgpp*) - enable_gdbtk=no ;; -esac - -# FIXME: This should be in configure.in, not configure -# Determine whether gdb needs tk/tcl or not. -if [ "$enable_gdbtk" != "no" ]; then - GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" -else - GDB_TK="" -fi - all_build_modules= if test x"${build_alias}" != x"${host_alias}" then @@ -1095,7 +1089,7 @@ for subdir in . ${subdirs} ; do case "${srcdir}" in ".") # no -srcdir option. We're building in place. makesrcdir=. ;; - /*) # absolute path + /* | [A-Za-z]:[\\/]* ) # absolute path makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'` ;; *) # otherwise relative @@ -1114,7 +1108,7 @@ for subdir in . ${subdirs} ; do if mkdir ${subdir} ; then true else - echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2 + echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2 exit 1 fi fi @@ -1213,7 +1207,7 @@ EOF sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem else echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem fi esac @@ -1249,7 +1243,7 @@ EOF sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac @@ -1285,13 +1279,13 @@ EOF sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac # real copy now in ${subdir}/Makefile.tem - # prepend warning about editting, and a bunch of variables. + # prepend warning about editing, and a bunch of variables. rm -f ${Makefile} cat > ${Makefile} <<EOF # ${NO_EDIT} @@ -1321,19 +1315,19 @@ EOF case "${package_makefile_frag}" in "") ;; - /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;; *) echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;; esac case "${target_makefile_frag}" in "") ;; - /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; *) echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;; esac case "${host_makefile_frag}" in "") ;; - /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; *) echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;; esac @@ -1341,12 +1335,8 @@ EOF echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile} fi - # record if we want to build shared libs. - if test -z "${enable_shared}"; then - echo enable_shared = no >> ${Makefile} - else - echo enable_shared = ${enable_shared} >> ${Makefile} - fi + echo enable_shared = ${enable_shared} >> ${Makefile} + echo enable_threads = ${enable_threads} >> ${Makefile} # record if we want to rumtime library stuff installed in libsubdir. if test -z "${enable_version_specific_runtime_libs}"; then echo enable_version_specific_runtime_libs = no >> ${Makefile} @@ -1364,9 +1354,14 @@ EOF # remove any form feeds. if [ -z "${subdirs}" ]; then rm -f ${subdir}/Makefile.tm2 - sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \ - -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \ + sedtemp=sed.$$ + cat >$sedtemp <<EOF +s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}: +s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}: +EOF + sed -f $sedtemp \ ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2 + rm -f $sedtemp rm -f ${subdir}/Makefile.tem mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem fi @@ -1470,7 +1465,7 @@ EOF newusing=`echo "${using}" | sed 's/and/using/'` using=${newusing} - echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using} + echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using} . ${tmpfile}.pos @@ -1536,24 +1531,20 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then if mkdir ./${bld_dir} ; then true else - echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2 + echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2 exit 1 fi fi ;; esac - POPDIR=${PWD=`pwd`} + POPDIR=${PWD=`${PWDCMD-pwd}`} cd ${bld_dir} ### figure out what to do with srcdir case "${srcdir}" in ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place. - /*) # absolute path - newsrcdir=${srcdir}/${cfg_dir} - srcdiroption="--srcdir=${newsrcdir}" - ;; - ?:*) # absolute path on win32 + /* | [A-Za-z]:[\\/]* ) # absolute path newsrcdir=${srcdir}/${cfg_dir} srcdiroption="--srcdir=${newsrcdir}" ;; @@ -1567,10 +1558,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then case "${cache_file}" in "") # empty ;; - /*) # absolute path - cache_file_option="--cache-file=${cache_file}" - ;; - ?:*) # absolute path on win32 + /* | [A-Za-z]:[\\/]* ) # absolute path cache_file_option="--cache-file=${cache_file}" ;; *) # relative path @@ -1583,9 +1571,8 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then recprog=${newsrcdir}/configure elif [ -f ${newsrcdir}/configure.in ] ; then case "${progname}" in - /*) recprog=${progname} ;; - ?:*) recprog=${progname} ;; - *) recprog=../${progname} ;; + /* | [A-Za-z]:[\\/]* ) recprog=${progname} ;; + *) recprog=../${progname} ;; esac else eval echo No configuration information in ${cfg_dir} ${redirect} @@ -1599,7 +1586,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else - echo Configure in `pwd` failed, exiting. 1>&2 + echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2 exit 1 fi fi @@ -1611,7 +1598,7 @@ fi # Perform the same cleanup as the trap handler, minus the "exit 1" of course, # and reset the trap handler. -rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos +rm -rf ${tmpdir} trap 0 exit 0 diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.in index c533c44..ed4f7a7 100644 --- a/contrib/binutils/configure.in +++ b/contrib/binutils/configure.in @@ -14,7 +14,8 @@ ## For more information on these two systems, check out the documentation ## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi). -# Copyright (C) 1992-99, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -41,26 +42,21 @@ # these libraries are used by various programs built for the host environment # -host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui" +host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib" -if [ "${enable_gdbgui}" = "yes" ] ; then - host_libs="${host_libs} libgui" -fi - -# Set up configure/Makefile variables if libstdc++-v3 is to be built. -if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then - libstdcxx_version="target-libstdc++-v3" - # Don't use libstdc++-v3's flags to configure/build itself. - libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs' -else - libstdcxx_version="target-libio target-libstdc++" - libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++' -fi +libstdcxx_version="target-libstdc++-v3" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to # know that we are building the simulator. -host_tools="texinfo byacc flex bison binutils ld gas gcc cgen sid sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" +host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar" + +# libgcj represents the runtime libraries only used by gcj. +libgcj="target-libffi \ + target-boehm-gc \ + target-zlib \ + target-qthreads \ + target-libjava" # these libraries are built for the target environment, and are built after # the host libraries and the host tools (which may be a cross compiler) @@ -70,12 +66,7 @@ target_libs="target-libiberty \ target-newlib \ ${libstdcxx_version} \ target-libf2c \ - target-libchill \ - target-libffi \ - target-libjava \ - target-zlib \ - target-boehm-gc \ - target-qthreads \ + ${libgcj} target-libobjc" # these tools are built using the target libs, and are intended to run only @@ -99,11 +90,11 @@ target_tools="target-examples target-groff target-gperf" # # This must be a single line because of the way it is searched by grep in # the code below. -native_only="autoconf automake libtool cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf" +native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf" # directories to be built in a cross environment only # -cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub" +cross_only="target-libgloss target-newlib target-opcodes" ## All tools belong in one of the four categories, and are assigned above ## We assign ${configdirs} this way to remove all embedded newlines. This @@ -124,466 +115,143 @@ appdirs="" # per-host: -# Work in distributions that contain no compiler tools, like Autoconf. -if [ -d ${srcdir}/config ]; then -case "${host}" in - m68k-hp-hpux*) - host_makefile_frag="${host_makefile_frag} config/mh-hp300" - ;; - m68k-apollo-sysv*) - host_makefile_frag="${host_makefile_frag} config/mh-apollo68" - ;; - m68k-apollo-bsd*) - host_makefile_frag="${host_makefile_frag} config/mh-a68bsd" - ;; - m88k-dg-dgux*) - host_makefile_frag="${host_makefile_frag} config/mh-dgux" - ;; - m88k-harris-cxux*) - host_makefile_frag="${host_makefile_frag} config/mh-cxux" - ;; - m88k-motorola-sysv*) - host_makefile_frag="${host_makefile_frag} config/mh-delta88" - ;; - mips*-dec-ultrix*) - host_makefile_frag="${host_makefile_frag} config/mh-decstation" - ;; - mips*-nec-sysv4*) - host_makefile_frag="${host_makefile_frag} config/mh-necv4" - ;; - mips*-sgi-irix6*) - host_makefile_frag="${host_makefile_frag} config/mh-irix6" - ;; - mips*-sgi-irix5*) - host_makefile_frag="${host_makefile_frag} config/mh-irix5" - ;; - mips*-sgi-irix4*) - host_makefile_frag="${host_makefile_frag} config/mh-irix4" - ;; - mips*-sgi-irix3*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv" - ;; - mips*-*-sysv4*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv4" - ;; - mips*-*-sysv*) - host_makefile_frag="${host_makefile_frag} config/mh-riscos" - ;; - i370-ibm-opened*) - host_makefile_frag="${host_makefile_frag} config/mh-openedition" - ;; - i[3456]86-*-sysv5*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv5" - ;; - i[3456]86-*-dgux*) - host_makefile_frag="${host_makefile_frag} config/mh-dgux386" - ;; - i[3456]86-ncr-sysv4.3*) - host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43" - ;; - i[3456]86-ncr-sysv4*) - host_makefile_frag="${host_makefile_frag} config/mh-ncr3000" - ;; - i[3456]86-*-sco3.2v5*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv" - ;; - i[3456]86-*-sco*) - host_makefile_frag="${host_makefile_frag} config/mh-sco" - ;; - i[3456]86-*-udk*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv5" - ;; - i[3456]86-*-isc*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv" - ;; - i[3456]86-*-solaris2*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv4" - ;; - i[3456]86-*-aix*) - host_makefile_frag="${host_makefile_frag} config/mh-aix386" - ;; - i[3456]86-*-msdosdjgpp*) - host_makefile_frag="${host_makefile_frag} config/mh-djgpp" - ;; - *-cygwin*) - host_makefile_frag="${host_makefile_frag} config/mh-cygwin" - ;; - *-mingw32*) - host_makefile_frag="${host_makefile_frag} config/mh-mingw32" - ;; - *-interix*) - host_makefile_frag="${host_makefile_frag} config/mh-interix" - ;; - *-windows*) - host_makefile_frag="${host_makefile_frag} config/mh-windows" - ;; - vax-*-ultrix2*) - host_makefile_frag="${host_makefile_frag} config/mh-vaxult2" - ;; - *-*-solaris2*) - host_makefile_frag="${host_makefile_frag} config/mh-solaris" - ;; - m68k-sun-sunos*) - host_makefile_frag="${host_makefile_frag} config/mh-sun3" - ;; - *-hp-hpux[78]*) - host_makefile_frag="${host_makefile_frag} config/mh-hpux8" - ;; - *-hp-hpux*) - host_makefile_frag="${host_makefile_frag} config/mh-hpux" - ;; - *-*-hiux*) - host_makefile_frag="${host_makefile_frag} config/mh-hpux" - ;; - rs6000-*-lynxos*) - host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k" - ;; - *-*-lynxos*) - host_makefile_frag="${host_makefile_frag} config/mh-lynxos" - ;; - *-*-sysv4*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv4" - ;; - *-*-sysv*) - host_makefile_frag="${host_makefile_frag} config/mh-sysv" - ;; -esac -fi - -# If we aren't going to be using gcc, see if we can extract a definition -# of CC from the fragment. -if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - found= - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc; then - found=yes - break - fi - done - IFS="$save_ifs" - if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then - xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}` - if [ -n "${xx}" ] ; then - CC=$xx - fi - fi -fi - -# We default to --with-shared on platforms where -fpic is meaningless. -# Well, we don't yet, but we will. -if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then - case "${target}" in - alpha*-dec-osf*) enable_shared=yes ;; - alpha*-*-linux*) enable_shared=yes ;; - mips-sgi-irix5*) enable_shared=yes ;; - *) enable_shared=no ;; - esac -fi - -case "${enable_shared}" in - yes) shared=yes ;; - no) shared=no ;; - "") shared=no ;; - *) shared=yes ;; -esac - -if [ x${shared} = xyes ]; then - case "${host}" in - alpha*-*-linux*) - host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic" - ;; - arm*-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-armpic" - ;; - hppa*-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-papic" - ;; - i[3456]86-*-cygwin*) - # We don't want -fPIC on Cygwin. - ;; - i[3456]86-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-x86pic" - ;; - i370-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-i370pic" - ;; - ia64-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-ia64pic" - ;; - sparc64-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-sparcpic" - ;; - powerpc*-*-aix*) - # We don't want -fPIC on AIX. - ;; - powerpc*-*-*) - host_makefile_frag="${host_makefile_frag} config/mh-ppcpic" - ;; - s390-* | s390x-*) - host_makefile_frag="${host_makefile_frag} config/mh-s390pic" - ;; - *-*-*) - if test -f ${srcdir}/config/mh-${host_cpu}pic; then - host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic" - fi - ;; - esac -fi - -rm -f mh-frag -if [ -n "${host_makefile_frag}" ] ; then - for f in ${host_makefile_frag} - do - cat ${srcdir}/$f >> mh-frag - done - host_makefile_frag=mh-frag -fi +# There is no longer anything interesting in the per-host section. # per-target: -case "${target}" in - v810*) - target_makefile_frag="${target_makefile_frag} config/mt-v810" - ;; - i[3456]86-*-netware*) - target_makefile_frag="${target_makefile_frag} config/mt-netware" - ;; - powerpc-*-netware*) - target_makefile_frag="${target_makefile_frag} config/mt-netware" - ;; - *-*-linux-gnu*) - target_makefile_frag="${target_makefile_frag} config/mt-linux" - ;; - *-*-aix4.[3456789]* | *-*-aix[56789].*) - target_makefile_frag="${target_makefile_frag} config/mt-aix43" - ;; - mips*-*-pe | sh*-*-pe | *arm-wince-pe) - target_makefile_frag="${target_makefile_frag} config/mt-wince" - ;; -esac - -# If --enable-target-optspace always use -Os instead of -O2 to build -# the target libraries, similarly if it is not specified, use -Os -# on selected platforms. -case "${enable_target_optspace}:${target}" in - yes:*) - target_makefile_frag="${target_makefile_frag} config/mt-ospace" - ;; - :d30v-*) - target_makefile_frag="${target_makefile_frag} config/mt-d30v" - ;; - :m32r-* | :d10v-* | :fr30-*) - target_makefile_frag="${target_makefile_frag} config/mt-ospace" - ;; - no:* | :*) - ;; - *) - echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 - ;; -esac - -skipdirs= -gasdir=gas -use_gnu_ld= -use_gnu_as= - -# some tools are so dependent upon X11 that if we're not building with X, -# it's not even worth trying to configure, much less build, that tool. - -case ${with_x} in - yes | "") # the default value for this tree is that X11 is available - ;; - no) - skipdirs="${skipdirs} tk libgui gash" - ;; - *) - echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 - ;; -esac - -# Some tools are only suitable for building in a "native" situation. -# Those are added when we have a host==target configuration. For cross -# toolchains, we add some directories that should only be useful in a -# cross-compiler. - +# Define is_cross_compiler to save on calls to 'test'. is_cross_compiler= - -if [ x"${host}" = x"${target}" ] ; then - # when doing a native toolchain, don't build the targets - # that are in the 'cross only' list - skipdirs="${skipdirs} ${cross_only}" - is_cross_compiler=no +if test x"${host}" = x"${target}" ; then + is_cross_compiler=no else - # similarly, don't build the targets in the 'native only' - # list when building a cross compiler - skipdirs="${skipdirs} ${native_only}" - is_cross_compiler=yes + is_cross_compiler=yes fi # We always want to use the same name for this directory, so that dejagnu # can reliably find it. target_subdir=${target_alias} -if [ ! -d ${target_subdir} ] ; then +if test ! -d ${target_subdir} ; then if mkdir ${target_subdir} ; then true else - echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2 + echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2 exit 1 fi fi build_subdir=${build_alias} -if [ x"${build_alias}" != x"${host}" ] ; then - if [ ! -d ${build_subdir} ] ; then +if test x"${build_alias}" != x"${host}" ; then + if test ! -d ${build_subdir} ; then if mkdir ${build_subdir} ; then true else - echo "'*** could not make ${PWD=`pwd`}/${build_subdir}" 1>&2 + echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2 exit 1 fi fi fi -copy_dirs= +# Skipdirs are removed silently. +skipdirs= +# Noconfigdirs are removed loudly. +noconfigdirs="" -# Handle --with-headers=XXX. The contents of the named directory are -# copied to $(tooldir)/sys-include. -if [ x"${with_headers}" != x ]; then - if [ x${is_cross_compiler} = xno ]; then - echo 1>&2 '***' --with-headers is only supported when cross compiling - exit 1 - fi - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" +use_gnu_ld= +# Make sure we don't let GNU ld be added if we didn't want it. +if test x$with_gnu_ld = xno ; then + use_gnu_ld=no + noconfigdirs="$noconfigdirs ld" fi -# Handle --with-libs=XXX. Multiple directories are permitted. The -# contents are copied to $(tooldir)/lib. -if [ x"${with_libs}" != x ]; then - if [ x${is_cross_compiler} = xno ]; then - echo 1>&2 '***' --with-libs is only supported when cross compiling - exit 1 - fi - # Copy the libraries in reverse order, so that files in the first named - # library override files in subsequent libraries. - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - for l in ${with_libs}; do - copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" - done +use_gnu_as= +# Make sure we don't let GNU as be added if we didn't want it. +if test x$with_gnu_as = xno ; then + use_gnu_as=no + noconfigdirs="$noconfigdirs gas" fi +# some tools are so dependent upon X11 that if we're not building with X, +# it's not even worth trying to configure, much less build, that tool. + +case ${with_x} in + yes | "") ;; # the default value for this tree is that X11 is available + no) + skipdirs="${skipdirs} tk tix itcl libgui" + # We won't be able to build gdbtk without X. + enable_gdbtk=no + ;; + *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; +esac + +# Some tools are only suitable for building in a "native" situation. +# Remove these if host!=target. Similarly, some are only suitable +# for cross toolchains; remove if host=target. + +case $is_cross_compiler in + no) skipdirs="${skipdirs} ${cross_only}" ;; + yes) skipdirs="${skipdirs} ${native_only}" ;; +esac + # If both --with-headers and --with-libs are specified, default to # --without-newlib. -if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then - if [ x"${with_newlib}" = x ]; then +if test x"${with_headers}" != x && test x"${with_libs}" != x ; then + if test x"${with_newlib}" = x ; then with_newlib=no fi fi # Recognize --with-newlib/--without-newlib. -if [ x${with_newlib} = xno ]; then - skipdirs="${skipdirs} target-newlib" -elif [ x${with_newlib} = xyes ]; then - skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` -fi - -# Default to using --with-stabs for certain targets. -if [ x${with_stabs} = x ]; then - case "${target}" in - mips*-*-irix6*) - ;; - mips*-*-* | alpha*-*-osf*) - with_stabs=yes; - withoptions="${withoptions} --with-stabs" - ;; - esac -fi - -# Handle ${copy_dirs} -set fnord ${copy_dirs} -shift -while [ $# != 0 ]; do - if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then - : - else - echo Copying $1 to $2 - - # Use the install script to create the directory and all required - # parent directories. - if [ -d $2 ]; then - : - else - echo >config.temp - ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED - fi - - # Copy the directory, assuming we have tar. - # FIXME: Should we use B in the second tar? Not all systems support it. - (cd $1; tar -cf - .) | (cd $2; tar -xpf -) - - # It is the responsibility of the user to correctly adjust all - # symlinks. If somebody can figure out how to handle them correctly - # here, feel free to add the code. - - echo $1 > $2/COPIED - fi - shift; shift -done +case ${with_newlib} in + no) skipdirs="${skipdirs} target-newlib" ;; + yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; +esac # Configure extra directories which are host specific case "${host}" in - i[3456]86-*-go32*) - configdirs="$configdirs dosrel" ;; - i[3456]86-*-mingw32*) - configdirs="$configdirs dosrel" ;; - *-cygwin*) - configdirs="$configdirs libtermcap dosrel" ;; + i[3456]86-*-go32*) + configdirs="$configdirs dosrel" ;; + i[3456]86-*-mingw32*) + configdirs="$configdirs dosrel" ;; + *-cygwin*) + configdirs="$configdirs libtermcap dosrel" ;; esac # Remove more programs from consideration, based on the host or # target this usually means that a port of the program doesn't # exist yet. -noconfigdirs="" - case "${host}" in + hppa*64*-*-*) + noconfigdirs="$noconfigdirs byacc" + ;; i[3456]86-*-vsta) - noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext" + noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext" ;; i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) - noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext libffi" + noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi" ;; i[3456]86-*-mingw32*) - # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv" - noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool" + # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv" + noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" ;; *-*-cygwin*) - noconfigdirs="autoconf automake send-pr rcs guile perl apache inet" + noconfigdirs="autoconf automake send-pr rcs guile perl" ;; *-*-netbsd*) noconfigdirs="rcs" ;; ppc*-*-pe) - noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv" + noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv" ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" ;; esac - # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -601,42 +269,65 @@ no) esac case "${target}" in + *-*-chorusos) + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; + *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; *-*-netbsd*) # Skip some stuff on all NetBSD configurations. skipdirs="$skipdirs target-newlib target-libiberty target-libgloss" # Skip some stuff that's unsupported on some NetBSD configurations. case "${target}" in + i*86-*-netbsdelf*) ;; *) - noconfigdirs="$noconfigdirs ${libgcj}" + noconfigdirs="$noconfigdirs ${libgcj}" ;; esac ;; *-*-netware) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}" ;; *-*-rtems*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" + case ${target} in + h8300*-*-* | h8500-*-*) + noconfigdirs="$noconfigdirs target-libf2c" + ;; + *) ;; + esac ;; *-*-vxworks*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; alpha*-dec-osf*) - # ld works, but does not support shared libraries. emacs doesn't - # work. newlib is not 64 bit ready. I'm not sure about fileutils. + # ld works, but does not support shared libraries. + # newlib is not 64 bit ready. I'm not sure about fileutils. # gas doesn't generate exception information. - noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss" + noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) - noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi" + noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" ;; - alpha*-*-*) + alpha*-*-linux*) # newlib is not 64 bit ready noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; + alpha*-*-freebsd*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; + alpha*-*-*) + # newlib is not 64 bit ready + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; + sh-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; sh*-*-pe|mips*-*-pe|*arm-wince-pe) - noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib" - noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples" + noconfigdirs="$noconfigdirs ${libgcj}" + noconfigdirs="$noconfigdirs target-examples" noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim" noconfigdirs="$noconfigdirs expect dejagnu" @@ -650,89 +341,85 @@ case "${target}" in esac ;; arc-*-*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-pe*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-oabi*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-coff) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-elf) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-oabi) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; strongarm-*-elf) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; strongarm-*-coff) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; xscale-*-elf) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + noconfigdirs="$noconfigdirs target-libffi target-qthreads" ;; xscale-*-coff) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; thumb-*-pe) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; arm-*-riscix*) - noconfigdirs="$noconfigdirs ld target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" + ;; + avr-*-*) + noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}" ;; c4x-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" ;; c54x*-*-* | tic54x-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib" + ;; + cris-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" ;; d10v-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" ;; d30v-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" ;; fr30-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" + ;; + frv-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" ;; h8300*-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; h8500-*-*) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c" + ;; + hppa*64*-*-linux* | parisc*64*-*-linux*) + # In this case, it's because the hppa64-linux target is for + # the kernel only at this point and has no libc, and thus no + # headers, crt*.o, etc., all of which are needed by these. + noconfigdirs="$noconfigdirs target-zlib" ;; hppa*-*-*elf* | \ - hppa*-*-linux-gnu* | \ + parisc*-*-linux* | hppa*-*-linux* | \ hppa*-*-lites* | \ hppa*64*-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" # Do configure ld/binutils/gas for this case. ;; hppa*-*-*) - # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach - # cc is gcc, and on any system a user should be able to link cc to - # whatever they want. FIXME, emacs emacs19). - case "${CC}" in - "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; - *) ;; - esac # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't # build on HP-UX 10.20. noconfigdirs="$noconfigdirs ld shellutils ${libgcj}" @@ -746,13 +433,29 @@ case "${target}" in noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld" ;; i[3456]86-*-coff | i[3456]86-*-elf) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" + noconfigdirs="$noconfigdirs ${libgcj}" + ;; + i[34567]86-*-freebsd*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; + s390*-*-linux*) + # The libffi port is not yet in the GCC tree + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; + i[3456]86-*-linux*) + # This section makes it possible to build newlib natively on linux. + # If we are using a cross compiler then don't configure newlib. + if test x${is_cross_compiler} != xno ; then + noconfigdirs="$noconfigdirs target-newlib" fi + noconfigdirs="$noconfigdirs target-libgloss" + # If we are not using a cross compiler, do configure newlib. + # Note however, that newlib will only be configured in this situation + # if the --with-newlib option has been given, because otherwise + # 'target-newlib' will appear in skipdirs. ;; - i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*) - # but don't build gdb - noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi" + *-*-linux*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; i[3456]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" @@ -779,121 +482,109 @@ case "${target}" in esac ;; i[3456]86-*-pe) - noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}" ;; i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, # and is not configured to handle mixed ELF and COFF. - noconfigdirs="$noconfigdirs ld target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" ;; i[3456]86-*-sco*) - noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" + noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" ;; i[3456]86-*-solaris2*) noconfigdirs="$noconfigdirs target-libgloss" ;; i[3456]86-*-sysv4*) - # The SYSV4 C compiler doesn't handle Emacs correctly - case "${CC}" in - "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; - *) ;; - esac - # but that's okay since emacs doesn't work anyway - noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; - m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) - noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc" + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) + noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}" ;; - m68k-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + m68k-*-elf*) + noconfigdirs="$noconfigdirs ${libgcj}" ;; m68k-*-coff*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" + ;; + mcore-*-pe*) + # The EPOC C++ environment does not support exceptions or rtti, + # and so building libstdc++-v3 tends not to always work. + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + mmix-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" ;; mn10200-*-*) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; mn10300-*-*) - noconfigdirs="$noconfigdirs target-libffi" - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; powerpc-*-aix*) # copied from rs6000-*-* entry - use_gnu_ld=yes + noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" ;; powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) target_configdirs="$target_configdirs target-winsup" - noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi" + noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}" # always build newlib. skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; # This is temporary until we can link against shared libraries powerpcle-*-solaris*) - noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi" + noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}" ;; powerpc-*-beos*) - noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" + noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; powerpc-*-eabi) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; rs6000-*-lynxos*) - # The CVS server code doesn't work on the RS/6000 - noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi" + noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" ;; rs6000-*-aix*) - noconfigdirs="$noconfigdirs gprof target-libffi" - use_gnu_ld=yes + noconfigdirs="$noconfigdirs gprof ${libgcj}" ;; rs6000-*-*) - noconfigdirs="$noconfigdirs gprof target-libffi" + noconfigdirs="$noconfigdirs gprof ${libgcj}" ;; m68k-apollo-*) - noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi" + noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}" ;; mips*-*-irix5*) # The GNU linker does not support shared libraries. - # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) - noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss" + noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}" ;; mips*-*-irix6*) # The GNU assembler does not support IRIX 6. - # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) # Linking libjava exceeds command-line length limits on at least # IRIX 6.2, but not on IRIX 6.5. # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham # <oldham@codesourcery.com> - noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}" ;; mips*-dec-bsd*) - noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" + noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" ;; mips*-*-bsd*) - noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" + noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" ;; mipstx39-*-*) - noconfigdirs="$noconfigdirs gprof target-libffi" # same as generic mips - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" + noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips ;; + mips*-*-linux*) + noconfigdirs="$noconfigdirs target-libffi" + ;; mips*-*-*) - noconfigdirs="$noconfigdirs gprof target-libffi" + noconfigdirs="$noconfigdirs gprof ${libgcj}" ;; romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi" + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" ;; sh-*-*) case "${host}" in @@ -902,73 +593,57 @@ case "${target}" in i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;; esac - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; sh64-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; sparc-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi + noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc64-*-elf*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-libstub target-cygmon" - fi - noconfigdirs="$noconfigdirs target-libffi" + noconfigdirs="$noconfigdirs ${libgcj}" ;; sparclite-*-*) - if [ x${is_cross_compiler} != xno ] ; then - target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" - fi - noconfigdirs="$noconfigdirs target-libffi" + noconfigdirs="$noconfigdirs ${libgcj}" ;; sparc-*-sunos4*) - if [ x${is_cross_compiler} != xno ] ; then - noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss" + noconfigdirs="$noconfigdirs ${libgcj}" + if test x${is_cross_compiler} != xno ; then + noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" else use_gnu_ld=no fi ;; - sparc-*-solaris*) - case "${host}" in - sparc-*-solaris2.8) - # According to Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, libjava - # won't build correctly on Solaris 8 if there's a - # previously-installed version of GCC in the configured prefix. - # This problem does not show up on earlier versions of Solaris. - noconfigdirs="$noconfigdirs ${libgcj}" - ;; - esac + sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*) ;; v810-*-*) - noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi" + noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}" ;; v850-*-*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; v850e-*-*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; v850ea-*-*) - noconfigdirs="$noconfigdirs target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; vax-*-vms) - noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi" + noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}" ;; vax-*-*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; + ip2k-*-*) + noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}" ;; *-*-lynxos*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; - *-*-macos* | \ - *-*-mpw*) - # Macs want a resource compiler. - configdirs="$configdirs grez" - noconfigdirs="$noconfigdirs target-libffi" - ;; + *-*-*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; esac # If we aren't building newlib, then don't build libgloss, since libgloss @@ -978,18 +653,6 @@ case "${noconfigdirs}" in *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;; esac -# Make sure we don't let GNU ld be added if we didn't want it. -if [ x$with_gnu_ld = xno ]; then - use_gnu_ld=no - noconfigdirs="$noconfigdirs ld" -fi - -# Make sure we don't let GNU as be added if we didn't want it. -if [ x$with_gnu_as = xno ]; then - use_gnu_as=no - noconfigdirs="$noconfigdirs gas" -fi - # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use # the environment variable $LANGUAGES if defined. $LANGUAGES might @@ -1012,6 +675,38 @@ else fi enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` +# First scan to see if an enabled language requires some other language. +# We assume that a given config-lang.in will list all the language +# front ends it requires, even if some are required indirectly. +for lang in ${srcdir}/gcc/*/config-lang.in .. +do + case $lang in + ..) + ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[*]/config-lang.in) + ;; + *) + lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` + this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` + for other in $this_lang_requires + do + case ,${enable_languages}, in + *,$other,*) + ;; + *,all,*) + ;; + *,$lang_alias,*) + echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2 + enable_languages="$enable_languages,$other" + ;; + esac + done + ;; + esac +done + subdirs= for lang in ${srcdir}/gcc/*/config-lang.in .. do @@ -1023,6 +718,7 @@ do *) lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` + this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang` build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` if test "x$lang_alias" = x then @@ -1038,13 +734,12 @@ do if test x"${add_this_lang}" = xyes; then eval target_libs='"$target_libs "'\"$this_lang_libs\" else - eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\" + eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\" fi ;; esac done - # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and # $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. @@ -1052,10 +747,10 @@ done notsupp="" for dir in . $skipdirs $noconfigdirs ; do dirname=`echo $dir | sed -e s/target-//g` - if [ $dir != . ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` - if [ -r $srcdir/$dirname/configure ] \ - || [ -r $srcdir/$dirname/configure.in ]; then + if test -r $srcdir/$dirname/configure \ + || test -r $srcdir/$dirname/configure.in ; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else @@ -1063,10 +758,10 @@ for dir in . $skipdirs $noconfigdirs ; do fi fi fi - if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` - if [ -r $srcdir/$dirname/configure ] \ - || [ -r $srcdir/$dirname/configure.in ]; then + if test -r $srcdir/$dirname/configure \ + || test -r $srcdir/$dirname/configure.in ; then if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then true else @@ -1078,17 +773,17 @@ done # Sometimes the tools are distributed with libiberty but with no other # libraries. In that case, we don't want to build target-libiberty. -if [ -n "${target_configdirs}" ]; then +if test -n "${target_configdirs}" ; then others= for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do - if [ "$i" != "libiberty" ]; then - if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then + if test "$i" != "libiberty" ; then + if test -r $srcdir/$i/configure || test -r $srcdir/$i/configure.in ; then others=yes; break; fi fi done - if [ -z "${others}" ]; then + if test -z "${others}" ; then target_configdirs= fi fi @@ -1096,30 +791,49 @@ fi # Deconfigure all subdirectories, in case we are changing the # configuration from one where a subdirectory is supported to one where it # is not. -if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then +if test -z "${norecursion}" && test -n "${configdirs}" ; then for i in `echo ${configdirs} | sed -e s/target-//g` ; do rm -f $i/Makefile done fi -if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then +if test -z "${norecursion}" && test -n "${target_configdirs}" ; then for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do rm -f ${target_subdir}/$i/Makefile done fi +# Quietly strip out all directories which aren't configurable in this tree. +# This relies on all configurable subdirectories being autoconfiscated, which +# is now the case. +configdirs_all="$configdirs" +configdirs= +for i in ${configdirs_all} ; do + if test -f ${srcdir}/$i/configure ; then + configdirs="${configdirs} $i" + fi +done +target_configdirs_all="$target_configdirs" +target_configdirs= +for i in ${target_configdirs_all} ; do + j=`echo $i | sed -e s/target-//g` + if test -f ${srcdir}/$j/configure ; then + target_configdirs="${target_configdirs} $i" + fi +done + # Produce a warning message for the subdirs we can't configure. # This isn't especially interesting in the Cygnus tree, but in the individual # FSF releases, it's important to let people know when their machine isn't # supported by the one or two programs in a package. -if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then +if test -n "${notsupp}" && test -z "${norecursion}" ; then # If $appdirs is non-empty, at least one of those directories must still # be configured, or we error out. (E.g., if the gas release supports a # specified target in some subdirs but not the gas subdir, we shouldn't # pretend that all is well.) - if [ -n "$appdirs" ]; then + if test -n "$appdirs" ; then for dir in $appdirs ; do - if [ -r $dir/Makefile.in ]; then + if test -r $dir/Makefile.in ; then if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then appdirs="" break @@ -1130,7 +844,7 @@ if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then fi fi done - if [ -n "$appdirs" ]; then + if test -n "$appdirs" ; then echo "*** This configuration is not supported by this package." 1>&2 exit 1 fi @@ -1142,6 +856,350 @@ if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then echo " (Any other directories should still work fine.)" 1>&2 fi +case "$host" in + *msdosdjgpp*) + enable_gdbtk=no ;; +esac +# Determine whether gdb needs tk/tcl or not. +case "$enable_gdbtk" in + no) + GDB_TK="" ;; + *) + GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;; +esac + +copy_dirs= + +# Handle --with-headers=XXX. The contents of the named directory are +# copied to $(tooldir)/sys-include. +if test x"${with_headers}" != x ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-headers is only supported when cross compiling + exit 1 + fi + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" +fi + +# Handle --with-libs=XXX. Multiple directories are permitted. The +# contents are copied to $(tooldir)/lib. +if test x"${with_libs}" != x ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-libs is only supported when cross compiling + exit 1 + fi + # Copy the libraries in reverse order, so that files in the first named + # library override files in subsequent libraries. + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + for l in ${with_libs}; do + copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" + done +fi + +# Handle ${copy_dirs} +set fnord ${copy_dirs} +shift +while test $# != 0 ; do + if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then + : + else + echo Copying $1 to $2 + + # Use the install script to create the directory and all required + # parent directories. + if test -d $2 ; then + : + else + echo >config.temp + ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED + fi + + # Copy the directory, assuming we have tar. + # FIXME: Should we use B in the second tar? Not all systems support it. + (cd $1; tar -cf - .) | (cd $2; tar -xpf -) + + # It is the responsibility of the user to correctly adjust all + # symlinks. If somebody can figure out how to handle them correctly + # here, feel free to add the code. + + echo $1 > $2/COPIED + fi + shift; shift +done + +# Work in distributions that contain no compiler tools, like Autoconf. +tentative_cc="" +if test -d ${srcdir}/config ; then +case "${host}" in + m68k-hp-hpux*) + # Avoid "too much defining" errors from HPUX compiler. + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hp300" + ;; + m68k-apollo-sysv*) + tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG" + host_makefile_frag="config/mh-apollo68" + ;; + m68k-apollo-bsd*) + #None of the Apollo compilers can compile gas or binutils. The preprocessor + # chokes on bfd, the compiler won't let you assign integers to enums, and + # other problems. Defining CC to gcc is a questionable way to say "don't use + # the apollo compiler" (the preferred version of GCC could be called cc, + # or whatever), but I'm not sure leaving CC as cc is any better... + #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG + tentative_cc=gcc + host_makefile_frag="config/mh-a68bsd" + ;; + m88k-dg-dgux*) + tentative_cc="gcc -Wall -ansi -D__using_DGUX" + host_makefile_frag="config/mh-dgux" + ;; + m88k-harris-cxux*) + # Under CX/UX, we want to tell the compiler to use ANSI mode. + tentative_cc="cc -Xa" + host_makefile_frag="config/mh-cxux" + ;; + m88k-motorola-sysv*) + host_makefile_frag="config/mh-delta88" + ;; + mips*-dec-ultrix*) + tentative_cc="cc -Wf,-XNg1000" + host_makefile_frag="config/mh-decstation" + ;; + mips*-nec-sysv4*) + # The C compiler on NEC MIPS SVR4 needs bigger tables. + tentative_cc="cc -ZXNd=5000 -ZXNg=1000" + host_makefile_frag="config/mh-necv4" + ;; + mips*-sgi-irix6*) + host_makefile_frag="config/mh-irix6" + ;; + mips*-sgi-irix5*) + host_makefile_frag="config/mh-irix5" + ;; + mips*-sgi-irix4*) + # Tell compiler to use K&R C. We can't compile under the SGI Ansi + # environment. Also bump switch table size so that cp-parse will + # compile. Bump string length limit so linker builds. + tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192" + ;; + mips*-sgi-irix3*) + host_makefile_frag="config/mh-sysv" + ;; + mips*-*-sysv4*) + host_makefile_frag="config/mh-sysv4" + ;; + mips*-*-sysv*) + # This is for a MIPS running RISC/os 4.52C. + + # This is needed for GDB, but needs to be in the top-level make because + # if a library is compiled with the bsd headers and gets linked with the + # sysv system libraries all hell can break loose (e.g. a jmp_buf might be + # a different size). + # ptrace(2) apparently has problems in the BSD environment. No workaround is + # known except to select the sysv environment. Could we use /proc instead? + # These "sysv environments" and "bsd environments" often end up being a pain. + # + # This is not part of CFLAGS because perhaps not all C compilers have this + # option. + tentative_cc="cc -systype sysv" + host_makefile_frag="config/mh-riscos" + ;; + i370-ibm-opened*) + tentative_cc="c89" + host_makefile_frag="config/mh-openedition" + ;; + i[3456]86-*-sysv5*) + host_makefile_frag="config/mh-sysv5" + ;; + i[3456]86-*-dgux*) + tentative_cc="gcc -Wall -ansi -D__using_DGUX" + host_makefile_frag="config/mh-dgux386" + ;; + i[3456]86-ncr-sysv4.3*) + # The MetaWare compiler will generate a copyright message unless you + # turn it off by adding the -Hnocopyr flag. + tentative_cc="cc -Hnocopyr" + host_makefile_frag="config/mh-ncrsvr43" + ;; + i[3456]86-ncr-sysv4*) + # for an NCR 3000 (i486/SVR4) system. + # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc. + # This compiler not only emits obnoxious copyright messages every time + # you run it, but it chokes and dies on a whole bunch of GNU source + # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc. + tentative_cc="/usr/ccs/ATT/cc" + host_makefile_frag="config/mh-ncr3000" + ;; + i[3456]86-*-sco3.2v5*) + host_makefile_frag="config/mh-sysv" + ;; + i[3456]86-*-sco*) + # The native C compiler botches some simple uses of const. Unfortunately, + # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. + tentative_cc="cc -Dconst=" + host_makefile_frag="config/mh-sco" + ;; + i[3456]86-*-udk*) + host_makefile_frag="config/mh-sysv5" + ;; + i[3456]86-*-isc*) + host_makefile_frag="config/mh-sysv" + ;; + i[3456]86-*-solaris2*) + host_makefile_frag="config/mh-sysv4" + ;; + i[3456]86-*-aix*) + host_makefile_frag="config/mh-aix386" + ;; + i[3456]86-*-msdosdjgpp*) + host_makefile_frag="config/mh-djgpp" + ;; + *-cygwin*) + host_makefile_frag="config/mh-cygwin" + ;; + *-mingw32*) + host_makefile_frag="config/mh-mingw32" + ;; + *-interix*) + host_makefile_frag="config/mh-interix" + ;; + vax-*-ultrix2*) + # The old BSD pcc isn't up to compiling parts of gdb so use gcc + tentative_cc=gcc + ;; + *-*-solaris2*) + host_makefile_frag="config/mh-solaris" + ;; + m68k-sun-sunos*) + # Sun's C compiler needs the -J flag to be able to compile cp-parse.c + # without overflowing the jump tables (-J says to use a 32 bit table) + tentative_cc="cc -J" + ;; + *-hp-hpux[78]*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux8" + ;; + *-hp-hpux*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux" + ;; + *-*-hiux*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-hpux" + ;; + rs6000-*-lynxos*) + # /bin/cc is less than useful for our purposes. Always use GCC + tentative_cc="/usr/cygnus/progressive/bin/gcc" + host_makefile_frag="config/mh-lynxrs6k" + ;; + *-*-lynxos*) + # /bin/cc is less than useful for our purposes. Always use GCC + tentative_cc="/bin/gcc" + ;; + *-*-sysv4*) + host_makefile_frag="config/mh-sysv4" + ;; + *-*-sysv*) + host_makefile_frag="config/mh-sysv" + ;; +esac +fi + +rm -f mh-frag +if test -n "${host_makefile_frag}" ; then + for f in ${host_makefile_frag} + do + cat ${srcdir}/$f >> mh-frag + done + host_makefile_frag=mh-frag +fi + +# If we aren't going to be using gcc, see if we can extract a definition +# of CC from the fragment. +# Actually, use the 'pre-extracted' version above. +if test -z "${CC}" && test "${build}" = "${host}" ; then + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + found= + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/gcc; then + found=yes + break + fi + done + IFS="$save_ifs" + if test -z "${found}" && test -n "${tentative_cc}" ; then + CC=$tentative_cc + fi +fi + +case "${target}" in + v810*) + target_makefile_frag="config/mt-v810" + ;; + i[3456]86-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + powerpc-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + *-*-linux*) + target_makefile_frag="config/mt-linux" + ;; + *-*-aix4.[3456789]* | *-*-aix[56789].*) + target_makefile_frag="config/mt-aix43" + ;; + mips*-*-pe | sh*-*-pe | *arm-wince-pe) + target_makefile_frag="config/mt-wince" + ;; +esac + +alphaieee_frag= +case $target in + alpha*-*-*) + # This just makes sure to use the -mieee option to build target libs. + # This should probably be set individually by each library. + alphaieee_frag="config/mt-alphaieee" + ;; +esac + +# If --enable-target-optspace always use -Os instead of -O2 to build +# the target libraries, similarly if it is not specified, use -Os +# on selected platforms. +ospace_frag= +case "${enable_target_optspace}:${target}" in + yes:*) + ospace_frag="config/mt-ospace" + ;; + :d30v-*) + ospace_frag="config/mt-d30v" + ;; + :m32r-* | :d10v-* | :fr30-*) + ospace_frag="config/mt-ospace" + ;; + no:* | :*) + ;; + *) + echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 + ;; +esac + +rm -f mt-frag +if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then + for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag} + do + cat ${srcdir}/$f >> mt-frag + done + target_makefile_frag=mt-frag +fi + # Set with_gnu_as and with_gnu_ld as appropriate. # # This is done by determining whether or not the appropriate directory @@ -1155,98 +1213,108 @@ fi # want to do that, then you should use the --without-gnu-as and # --without-gnu-ld options for the configure script. -if [ x${use_gnu_as} = x ] ; then - if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then - with_gnu_as=yes - withoptions="$withoptions --with-gnu-as" - fi +if test x${use_gnu_as} = x && + echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then + with_gnu_as=yes + withoptions="$withoptions --with-gnu-as" fi -if [ x${use_gnu_ld} = x ] ; then - if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then - with_gnu_ld=yes - withoptions="$withoptions --with-gnu-ld" - fi +if test x${use_gnu_ld} = x && + echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then + with_gnu_ld=yes + withoptions="$withoptions --with-gnu-ld" fi # If using newlib, add --with-newlib to the withoptions so that gcc/configure # can detect this case. -if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then with_newlib=yes withoptions="$withoptions --with-newlib" fi -if [ x${shared} = xyes ]; then +# We default to --with-shared on platforms where -fpic is meaningless. +# Well, we don't yet, but we will. +if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then case "${target}" in - hppa*) - target_makefile_frag="${target_makefile_frag} config/mt-papic" - ;; - i[3456]86-*) - target_makefile_frag="${target_makefile_frag} config/mt-x86pic" - ;; - ia64-*) - target_makefile_frag="${target_makefile_frag} config/mt-ia64pic" - ;; - powerpc*-*-aix*) - # We don't want -fPIC on AIX. - ;; - powerpc*-*) - target_makefile_frag="${target_makefile_frag} config/mt-ppcpic" - ;; - alpha*-*-linux*) - target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic" - ;; - *) - if test -f ${srcdir}/config/mt-${target_cpu}pic; then - target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic" - fi - ;; + alpha*-dec-osf*) enable_shared=yes ;; + alpha*-*-linux*) enable_shared=yes ;; + mips-sgi-irix5*) enable_shared=yes ;; + *) enable_shared=no ;; esac fi -rm -f mt-frag -if [ -n "${target_makefile_frag}" ] ; then - for f in ${target_makefile_frag} - do - cat ${srcdir}/$f >> mt-frag - done - target_makefile_frag=mt-frag +case "${enable_shared}" in + yes) shared=yes ;; + no) shared=no ;; + "") shared=no ;; + *) shared=yes ;; +esac + + +# Default to using --with-stabs for certain targets. +if test x${with_stabs} = x ; then + case "${target}" in + mips*-*-irix6*o32) + with_stabs=yes; + withoptions="${withoptions} --with-stabs" + ;; + mips*-*-irix6*) + ;; + mips*-*-* | alpha*-*-osf*) + with_stabs=yes; + withoptions="${withoptions} --with-stabs" + ;; + esac fi +# hpux11 in 64bit mode has libraries in a weird place. Arrange to find +# them automatically. +case "${host}" in + hppa*64*-*-hpux11*) + withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" + ;; +esac + # post-target: # Make sure that the compiler is able to generate an executable. If it # can't, we are probably in trouble. We don't care whether we can run the # executable--we might be using a cross compiler--we only care whether it # can be created. At this point the main configure script has set CC. +we_are_ok=no echo "int main () { return 0; }" > conftest.c ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c -if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then - : -else - echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." - echo 1>&2 "*** You must set the environment variable CC to a working compiler." - rm -f conftest* - exit 1 -fi +if test $? = 0 ; then + if test -s conftest || test -s conftest.exe ; then + we_are_ok=yes + fi +fi +case $we_are_ok in + no) + echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." + echo 1>&2 "*** You must set the environment variable CC to a working compiler." + rm -f conftest* + exit 1 + ;; +esac rm -f conftest* # The Solaris /usr/ucb/cc compiler does not appear to work. case "${host}" in sparc-sun-solaris2*) CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`" - if [ "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ] ; then + if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then could_use= - [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin" - if [ -d /opt/cygnus/bin ] ; then - if [ "$could_use" = "" ] ; then + test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin" + if test -d /opt/cygnus/bin ; then + if test "$could_use" = "" ; then could_use="/opt/cygnus/bin" else could_use="$could_use or /opt/cygnus/bin" fi fi - if [ "$could_use" = "" ] ; then + if test "$could_use" = "" ; then echo "Warning: compilation may fail because you're using" echo "/usr/ucb/cc. You should change your PATH or CC " echo "variable and rerun configure." @@ -1262,7 +1330,7 @@ esac # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. -if [ "${shared}" = "yes" ]; then +if test "${shared}" = "yes" ; then sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \ Makefile > Makefile.tem rm -f Makefile @@ -1278,12 +1346,12 @@ if [ "${shared}" = "yes" ]; then esac fi -# Record target_configdirs and the configure arguments for target and -# build configuration in Makefile. -target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` -targargs=`echo "${arguments}" | \ +# Base args. Strip norecursion, cache-file, srcdir, host, build, target. +# These are the ones we might not want to pass down to subconfigures. +baseargs=`echo "${arguments}" | \ sed -e 's/--no[^ ]*//' \ -e 's/--cache[a-z-]*=[^ ]*//' \ + -e 's/--sr[a-z-]*=[^ ]*//' \ -e 's/--ho[a-z-]*=[^ ]*//' \ -e 's/--bu[a-z-]*=[^ ]*//' \ -e 's/--ta[a-z-]*=[^ ]*//'` @@ -1291,25 +1359,30 @@ targargs=`echo "${arguments}" | \ # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor # desired. -buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}" +buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" + +# Record target_configdirs and the configure arguments for target and +# build configuration in Makefile. +target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` +targargs=${baseargs} # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built # native. However, it would be better to use other mechanisms to make the # sorts of decisions they want to make on this basis. Please consider # this option to be deprecated. FIXME. -if [ x${is_cross_compiler} = xyes ]; then +if test x${is_cross_compiler} = xyes ; then targargs="--with-cross-host=${host_alias} ${targargs}" fi # Default to --enable-multilib. -if [ x${enable_multilib} = x ]; then +if test x${enable_multilib} = x ; then targargs="--enable-multilib ${targargs}" fi # Pass --with-newlib if appropriate. Note that target_configdirs has # changed from the earlier setting of with_newlib. -if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then targargs="--with-newlib ${targargs}" fi @@ -1318,7 +1391,7 @@ targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_al # provide a proper gxx_include_dir. # Note, if you change the default, make sure to fix both here and in -# the gcc, libio, and libstdc++ subdirectories. +# the gcc and libstdc++-v3 subdirectories. # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. gxx_include_dir= if test -n "${with_gxx_include_dir}"; then @@ -1336,26 +1409,27 @@ if test -n "${with_gxx_include_dir}"; then fi if test x${gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then - gxx_include_dir='${libsubdir}/include/g++' + gxx_include_dir='${libsubdir}/include/c++' else - . ${topsrcdir}/config.if - gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface} + . ${srcdir}/config.if + gxx_include_dir='${prefix}/include/${libstdcxx_incdir}' fi else gxx_include_dir=${gxx_include_dir} fi FLAGS_FOR_TARGET= -case " $skipdirs " in -*" target-newlib "*) ;; -*) +case " $target_configdirs " in + *" newlib "*) + case " $targargs " in + *" --with-newlib "*) case "$target" in *-cygwin*) FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;; esac # If we're not building GCC, don't discard standard headers. - if test -d ${topsrcdir}/gcc; then + if test -d ${srcdir}/gcc; then FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' if test "${build}" != "${host}"; then @@ -1378,11 +1452,10 @@ case " $skipdirs " in fi case "${target}-${is_cross_compiler}" in - i[3456]86-pc-linux*-no) + i[3456]86-*-linux*-no) # Here host == target, so we don't need to build gcc, # so we don't want to discard standard headers. FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'` - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/' ;; *) # If we're building newlib, use its generic headers last, but search @@ -1392,27 +1465,28 @@ case " $skipdirs " in ;; esac ;; + esac + ;; esac # On Canadian crosses, we'll be searching the right directories for # the previously-installed cross compiler, so don't bother to add # flags for directories within the install tree of the compiler # being built; programs in there won't even run. -if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then +if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then # Search for pre-installed headers if nothing else fits. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' fi -if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && - echo " ${configdirs} " | grep " ld " > /dev/null && - test -d ${srcdir}/ld; then +if test "x${use_gnu_ld}" = x && + echo " ${configdirs} " | grep " ld " > /dev/null ; then # Arrange for us to find uninstalled linker scripts. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' fi if test "x${CC_FOR_TARGET+set}" = xset; then : -elif test -d ${topsrcdir}/gcc; then +elif test -d ${srcdir}/gcc; then CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' elif test "$host" = "$target"; then CC_FOR_TARGET='$(CC)' @@ -1426,24 +1500,30 @@ case $CC_FOR_TARGET in *) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; esac -if test "x${CHILL_FOR_TARGET+set}" = xset; then +if test "x${GCJ_FOR_TARGET+set}" = xset; then : -elif test -d ${topsrcdir}/gcc; then - CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/' +elif test -d ${srcdir}/gcc; then + GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/' elif test "$host" = "$target"; then - CHILL_FOR_TARGET='$(CC)' + GCJ_FOR_TARGET='gcj' else - CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` + GCJ_FOR_TARGET=`echo gcj | sed -e 's/x/x/' ${program_transform_name}` fi -case $CHILL_FOR_TARGET in +case $GCJ_FOR_TARGET in *' $(FLAGS_FOR_TARGET)') ;; -*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +*) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; esac +# Don't use libstdc++-v3's flags to configure/build itself. +libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' + if test "x${CXX_FOR_TARGET+set}" = xset; then : -elif test -d ${topsrcdir}/gcc; then - CXX_FOR_TARGET='$$r/gcc/`case $$dir in libstdc++-v3) echo xgcc ;; *) echo g++ ;; esac` -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags +elif test -d ${srcdir}/gcc; then + # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead + # of g++ for linking C++ or Java, because g++ has -shared-libgcc by + # default whereas gcc does not. + CXX_FOR_TARGET='$$r/gcc/`case $$dir in libstdc++-v3 | libjava) echo xgcc -shared-libgcc ;; *) echo g++ ;; esac` -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags elif test "$host" = "$target"; then CXX_FOR_TARGET='$(CXX)' else @@ -1463,19 +1543,22 @@ qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'` # macros. qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` -sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ - -e "s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%" \ - -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \ - -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \ - -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \ - -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \ - -e "s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%" \ - -e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \ - -e "s%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}%" \ - -e "s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%" \ - -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ - Makefile > Makefile.tem -rm -f Makefile +sedtemp=sed.$$ +cat >$sedtemp <<EOF +s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}: +s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}% +s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}% +s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}% +s%^GCJ_FOR_TARGET[ ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}% +s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}% +s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}% +s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}% +s%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}% +s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}% +s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}% +EOF +sed -f $sedtemp Makefile > Makefile.tem +rm -f Makefile $sedtemp mv -f Makefile.tem Makefile # diff --git a/contrib/binutils/contrib/ChangeLog b/contrib/binutils/contrib/ChangeLog new file mode 100644 index 0000000..4a0de85 --- /dev/null +++ b/contrib/binutils/contrib/ChangeLog @@ -0,0 +1,7 @@ +2002-07-03 Nick Clifton <nickc@cambridge.redhat.com> + + * ChangeLog: Newly created. + * texi2pod.pl: Imported from FSF GCC sources. + + + diff --git a/contrib/binutils/contrib/texi2pod.pl b/contrib/binutils/contrib/texi2pod.pl new file mode 100755 index 0000000..e5560f3 --- /dev/null +++ b/contrib/binutils/contrib/texi2pod.pl @@ -0,0 +1,431 @@ +#! /usr/bin/perl -w + +# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + +# This file is part of GNU CC. + +# GNU CC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# GNU CC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GNU CC; see the file COPYING. If not, write to +# the Free Software Foundation, 59 Temple Place - Suite 330, +# Boston MA 02111-1307, USA. + +# This does trivial (and I mean _trivial_) conversion of Texinfo +# markup to Perl POD format. It's intended to be used to extract +# something suitable for a manpage from a Texinfo document. + +$output = 0; +$skipping = 0; +%sects = (); +$section = ""; +@icstack = (); +@endwstack = (); +@skstack = (); +@instack = (); +$shift = ""; +%defs = (); +$fnno = 1; +$inf = ""; +$ibase = ""; + +while ($_ = shift) { + if (/^-D(.*)$/) { + if ($1 ne "") { + $flag = $1; + } else { + $flag = shift; + } + $value = ""; + ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/); + die "no flag specified for -D\n" + unless $flag ne ""; + die "flags may only contain letters, digits, hyphens, dashes and underscores\n" + unless $flag =~ /^[a-zA-Z0-9_-]+$/; + $defs{$flag} = $value; + } elsif (/^-/) { + usage(); + } else { + $in = $_, next unless defined $in; + $out = $_, next unless defined $out; + usage(); + } +} + +if (defined $in) { + $inf = gensym(); + open($inf, "<$in") or die "opening \"$in\": $!\n"; + $ibase = $1 if $in =~ m|^(.+)/[^/]+$|; +} else { + $inf = \*STDIN; +} + +if (defined $out) { + open(STDOUT, ">$out") or die "opening \"$out\": $!\n"; +} + +while(defined $inf) { +while(<$inf>) { + # Certain commands are discarded without further processing. + /^\@(?: + [a-z]+index # @*index: useful only in complete manual + |need # @need: useful only in printed manual + |(?:end\s+)?group # @group .. @end group: ditto + |page # @page: ditto + |node # @node: useful only in .info file + |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents + )\b/x and next; + + chomp; + + # Look for filename and title markers. + /^\@setfilename\s+([^.]+)/ and $fn = $1, next; + /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; + + # Identify a man title but keep only the one we are interested in. + /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { + if (exists $defs{$1}) { + $fn = $1; + $tl = postprocess($2); + } + next; + }; + + # Look for blocks surrounded by @c man begin SECTION ... @c man end. + # This really oughta be @ifman ... @end ifman and the like, but such + # would require rev'ing all other Texinfo translators. + /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do { + $output = 1 if exists $defs{$2}; + $sect = $1; + next; + }; + /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next; + /^\@c\s+man\s+end/ and do { + $sects{$sect} = "" unless exists $sects{$sect}; + $sects{$sect} .= postprocess($section); + $section = ""; + $output = 0; + next; + }; + + # handle variables + /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do { + $defs{$1} = $2; + next; + }; + /^\@clear\s+([a-zA-Z0-9_-]+)/ and do { + delete $defs{$1}; + next; + }; + + next unless $output; + + # Discard comments. (Can't do it above, because then we'd never see + # @c man lines.) + /^\@c\b/ and next; + + # End-block handler goes up here because it needs to operate even + # if we are skipping. + /^\@end\s+([a-z]+)/ and do { + # Ignore @end foo, where foo is not an operation which may + # cause us to skip, if we are presently skipping. + my $ended = $1; + next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/; + + die "\@end $ended without \@$ended at line $.\n" unless defined $endw; + die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; + + $endw = pop @endwstack; + + if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) { + $skipping = pop @skstack; + next; + } elsif ($ended =~ /^(?:example|smallexample|display)$/) { + $shift = ""; + $_ = ""; # need a paragraph break + } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) { + $_ = "\n=back\n"; + $ic = pop @icstack; + } else { + die "unknown command \@end $ended at line $.\n"; + } + }; + + # We must handle commands which can cause skipping even while we + # are skipping, otherwise we will not process nested conditionals + # correctly. + /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = "ifset"; + $skipping = 1 unless exists $defs{$1}; + next; + }; + + /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = "ifclear"; + $skipping = 1 if exists $defs{$1}; + next; + }; + + /^\@(ignore|menu|iftex)\b/ and do { + push @endwstack, $endw; + push @skstack, $skipping; + $endw = $1; + $skipping = 1; + next; + }; + + next if $skipping; + + # Character entities. First the ones that can be replaced by raw text + # or discarded outright: + s/\@copyright\{\}/(c)/g; + s/\@dots\{\}/.../g; + s/\@enddots\{\}/..../g; + s/\@([.!? ])/$1/g; + s/\@[:-]//g; + s/\@bullet(?:\{\})?/*/g; + s/\@TeX\{\}/TeX/g; + s/\@pounds\{\}/\#/g; + s/\@minus(?:\{\})?/-/g; + s/\\,/,/g; + + # Now the ones that have to be replaced by special escapes + # (which will be turned back into text by unmunge()) + s/&/&/g; + s/\@\{/{/g; + s/\@\}/}/g; + s/\@\@/&at;/g; + + # Inside a verbatim block, handle @var specially. + if ($shift ne "") { + s/\@var\{([^\}]*)\}/<$1>/g; + } + + # POD doesn't interpret E<> inside a verbatim block. + if ($shift eq "") { + s/</</g; + s/>/>/g; + } else { + s/</</g; + s/>/>/g; + } + + # Single line command handlers. + + /^\@include\s+(.+)$/ and do { + push @instack, $inf; + $inf = gensym(); + + # Try cwd and $ibase. + open($inf, "<" . $1) + or open($inf, "<" . $ibase . "/" . $1) + or die "cannot open $1 or $ibase/$1: $!\n"; + next; + }; + + /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ + and $_ = "\n=head2 $1\n"; + /^\@subsection\s+(.+)$/ + and $_ = "\n=head3 $1\n"; + + # Block command handlers: + /^\@itemize\s+(\@[a-z]+|\*|-)/ and do { + push @endwstack, $endw; + push @icstack, $ic; + $ic = $1; + $_ = "\n=over 4\n"; + $endw = "itemize"; + }; + + /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { + push @endwstack, $endw; + push @icstack, $ic; + if (defined $1) { + $ic = $1 . "."; + } else { + $ic = "1."; + } + $_ = "\n=over 4\n"; + $endw = "enumerate"; + }; + + /^\@([fv]?table)\s+(\@[a-z]+)/ and do { + push @endwstack, $endw; + push @icstack, $ic; + $endw = $1; + $ic = $2; + $ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/; + $ic =~ s/\@(?:code|kbd)/C/; + $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; + $ic =~ s/\@(?:file)/F/; + $_ = "\n=over 4\n"; + }; + + /^\@((?:small)?example|display)/ and do { + push @endwstack, $endw; + $endw = $1; + $shift = "\t"; + $_ = ""; # need a paragraph break + }; + + /^\@itemx?\s*(.+)?$/ and do { + if (defined $1) { + # Entity escapes prevent munging by the <> processing below. + $_ = "\n=item $ic\<$1\>\n"; + } else { + $_ = "\n=item $ic\n"; + $ic =~ y/A-Ya-y/B-Zb-z/; + $ic =~ s/(\d+)/$1 + 1/eg; + } + }; + + $section .= $shift.$_."\n"; +} +# End of current file. +close($inf); +$inf = pop @instack; +} + +die "No filename or title\n" unless defined $fn && defined $tl; + +$sects{NAME} = "$fn \- $tl\n"; +$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; + +for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES + BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { + if(exists $sects{$sect}) { + $head = $sect; + $head =~ s/SEEALSO/SEE ALSO/; + print "=head1 $head\n\n"; + print scalar unmunge ($sects{$sect}); + print "\n"; + } +} + +sub usage +{ + die "usage: $0 [-D toggle...] [infile [outfile]]\n"; +} + +sub postprocess +{ + local $_ = $_[0]; + + # @value{foo} is replaced by whatever 'foo' is defined as. + while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) { + if (! exists $defs{$2}) { + print STDERR "Option $2 not defined\n"; + s/\Q$1\E//; + } else { + $value = $defs{$2}; + s/\Q$1\E/$value/; + } + } + + # Formatting commands. + # Temporary escape for @r. + s/\@r\{([^\}]*)\}/R<$1>/g; + s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; + s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; + s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; + s/\@sc\{([^\}]*)\}/\U$1/g; + s/\@file\{([^\}]*)\}/F<$1>/g; + s/\@w\{([^\}]*)\}/S<$1>/g; + s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; + + # Cross references are thrown away, as are @noindent and @refill. + # (@noindent is impossible in .pod, and @refill is unnecessary.) + # @* is also impossible in .pod; we discard it and any newline that + # follows it. Similarly, our macro @gol must be discarded. + + s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; + s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; + s/;\s+\@pxref\{(?:[^\}]*)\}//g; + s/\@noindent\s*//g; + s/\@refill//g; + s/\@gol//g; + s/\@\*\s*\n?//g; + + # @uref can take one, two, or three arguments, with different + # semantics each time. @url and @email are just like @uref with + # one argument, for our purposes. + s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g; + s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; + s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; + + # Un-escape <> at this point. + s/</</g; + s/>/>/g; + + # Now un-nest all B<>, I<>, R<>. Theoretically we could have + # indefinitely deep nesting; in practice, one level suffices. + 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1</g; + + # Replace R<...> with bare ...; eliminate empty markup, B<>; + # shift white space at the ends of [BI]<...> expressions outside + # the expression. + s/R<([^<>]*)>/$1/g; + s/[BI]<>//g; + s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; + s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; + + # Extract footnotes. This has to be done after all other + # processing because otherwise the regexp will choke on formatting + # inside @footnote. + while (/\@footnote/g) { + s/\@footnote\{([^\}]+)\}/[$fnno]/; + add_footnote($1, $fnno); + $fnno++; + } + + return $_; +} + +sub unmunge +{ + # Replace escaped symbols with their equivalents. + local $_ = $_[0]; + + s/</E<lt>/g; + s/>/E<gt>/g; + s/{/\{/g; + s/}/\}/g; + s/&at;/\@/g; + s/&/&/g; + return $_; +} + +sub add_footnote +{ + unless (exists $sects{FOOTNOTES}) { + $sects{FOOTNOTES} = "\n=over 4\n\n"; + } + + $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++; + $sects{FOOTNOTES} .= $_[0]; + $sects{FOOTNOTES} .= "\n\n"; +} + +# stolen from Symbol.pm +{ + my $genseq = 0; + sub gensym + { + my $name = "GEN" . $genseq++; + my $ref = \*{$name}; + delete $::{$name}; + return $ref; + } +} diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog index d5c95ae..55fe8f2 100644 --- a/contrib/binutils/gas/ChangeLog +++ b/contrib/binutils/gas/ChangeLog @@ -1,17 +1,951 @@ +2002-10-11 Michel Six <msix@ccr.jussieu.fr> + Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (output_jump): Set fx_signed for loop/jcxz. + (md_estimate_size_before_relax): Likewise for 8 bit branches. + +2002-09-24 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (process_operands): Warn about "lea" segment + overrides. + +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-09-22 Mark Elbrecht <snowball3@softhome.net> + * write.c: Delete set_segment_vma and prototype. Update all callers. + + 2002-09-19 Jakub Jelinek <jakub@redhat.com> + * config/tc-i386.c (tc_i386_fix_adjustable): Handle + BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE. + (BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0 + if not defined. + (lex_got): Handle @GOTNTPOFF and @INDNTPOFF. + (md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and + BFD_RELOC_386_TLS_GOTIE. + + 2002-09-16 Chris Demetriou <cgd@broadcom.com> + * config/tc-mips.c (IS_SEXT_32BIT_NUM): Move closer to top of file. + (IS_SEXT_16BIT_NUM): New macro. + (macro_build_ldst_constoffset): New function, to build a set of + instructions to do a load or store from a constant offset relative + to a given register. + (macro, s_cprestore): Use macro_build_ldst_constoffset to implement + .cprestore pseudo-op. + + 2002-09-16 Elias Athanasopoulos <eathan@otenet.gr> + * dwarf2dbg.c (out_debug_abbrev): Add support for the DW_AT_name field. + (out_debug_info): Likewise. + + 2002-09-13 Nick Clifton <nickc@redhat.com> + * config/tc-ppc.c (md_assemble): Do not count FAKE operands + when deciding if any operands have been skipped. + + 2002-09-11 Jakub Jelinek <jakub@redhat.com> + * config/tc-i386.c (md_apply_fix3): Allow addend for + BFD_RELOC_386_TLS_LDO_32, BFD_RELOC_386_TLS_LE and + BFD_RELOC_386_TLS_LE_32. + + 2002-09-11 Nick Clifton <nickc@redhat.com> + * po/tr.po: Updated Turkish translation. + + 2002-09-04 Nick Clifton <nickc@redhat.com> + * config/tc-ppc.c (md_begin): Do not insert non-BookE32 + instructions into the hash table if the target cpu is the BookE32. + + 2002-08-20 Richard Sandiford <rsandifo@redhat.com> + * config/tc-mips.c (macro2): Implement rotates by zero using shifts + by zero. + + 2002-08-15 Alexandre Oliva <aoliva@redhat.com> + * config/tc-mips.c (macro_build_jalr): Make sure we generate + the fix-up against on the right frag. + (s_cpsetup): Likewise. Parse third argument as expression, to + handle global symbols and forward/backward labels correctly. + + 2002-08-14 Nick Clifton <nickc@redhat.com> + * read.c (stringer): Catch attempts to create strings in the abs + section. + + 2002-08-12 Richard Sandiford <rsandifo@redhat.com> + * config/tc-mips.c (mips_ip): Don't work out the value of + constant %hi()s here. + + 2002-08-10 Alan Modra <amodra@bigpond.net.au> + * config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR + for ELF, and don't bother checking ELF relocs when non-ELF. + (i386_immediate): Allow absolute_section expressions for aout. + (i386_displacement): Likewise. Also test bfd_is_com_section. + (md_estimate_size_before_relax): Test OUTPUT_FLAVOR for ELF. + (md_apply_fix3): Hack for bfd_install_relocation when fx_pcrel, + not when fx_addsy. Remove dead code. + + 2002-08-06 George France <france@handhelds.org> + * config/tc-alpha.c (cpu_types): Enabled ev67, ev68, -m21264a + and m21264b processor names and cpu types. + * doc/c-alpha.texi: Documented new types. + + 2002-08-06 Alan Modra <amodra@bigpond.net.au> + * config/tc-ppc.c (md_apply_fix3): Adjust 16 bit XCOFF reloc offset. + + 2002-08-03 Jakub Jelinek <jakub@redhat.com> + * config/tc-i386.c (output_insn): Save frag_now and frag_now_fix () + at start of insn, pass it to output_disp and output_imm. + (output_disp): Added arguments. If _GLOBAL_OFFSET_TABLE_ is seen + in displacement for R_386_32 reloc, use R_386_GOTPC and compute + properly addend. + (output_imm): Added arguments. Compute properly addend for + R_386_GOTPC. + (md_apply_fix3): Remove R_386_GOTPC handling. + + 2002-07-31 Momchil Velikov <velco@fadata.bg> + * config/tc-v850.c (md_assemble): Fix range check for immediate + operand. + + 2002-07-04 Bruno Haible <bruno@clisp.org> + * config/tc-i386.h (ELF_TARGET_FORMAT): New macro. + (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf32-i386". + * config/tc-i386.c (i386_target_format): Likewise. + * config/tc-alpha.h (ELF_TARGET_FORMAT): New macro. + (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf64-alpha". + +2002-08-26 Alan Modra <amodra@bigpond.net.au> + + * config/tc-w65.c (md_section_align): Fix typo. + (md_parse_option): Return 0, not 1. + +2002-08-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * config/tc-mips.c (macro): Handle a register plus a 16-bit + immediate offset in "dla" and "la" expansions. + +2002-08-01 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-08-01 Richard Sandiford <rsandifo@redhat.com> + * config/tc-mips.c (tc_gen_reloc): Extend GP-relative addend + handling to BFD_RELOC_MIPS16_GPREL. + +2002-08-01 H.J. Lu <hjl@gnu.org> + Daniel Jacobowitz <drow@mvista.com> + + * dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced + .debug_line section unless it has line information. + +2002-07-31 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-07-30 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + * tc-mips.c (load_address): Don't clobber $at when loading a + 64-bit address in non-PIC code if noat is in effect. + (macro): Likewise. + + 2002-07-30 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + * config/tc-mips.c (macro): Use codes 6 and 7 in trap instructions + used in division/multiply macro expansions similarly to how they + are used in the variants with break instructions. + (macro2): Likewise. + +2002-07-26 Alan Modra <amodra@bigpond.net.au> + + * config/tc-ppc.c (ppc_set_cpu): Use PPC_OPCODE_64 as the default + rather than PPC_OPCODE_32 for powerpc64*. + +2002-07-25 Nick Clifton <nickc@redhat.com> + + * 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/gas.pot: Regenerated. + +2002-07-23 Nick Clifton <nickc@redhat.com> + + * po/fr.po: Updated French translation. + +2002-07-16 Moritz Jodeit <moritz@jodeit.org> + + * config/tc-z8k.c (build_bytes): Correct order of memset args. + +2002-07-16 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Add 'Changes in 2.13'. + +2002-07-15 Matt Fredette <fredette@netbsd.org> + + * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define if TE_NetBSD. + +2002-07-12 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (process_suffix): Merge CODE_64BIT JumpByte + case with non CODE_64BIT case. Don't warn on "qword ptr" if + not CODE_64BIT. + +2002-07-11 Alan Modra <amodra@bigpond.net.au> + + * config/tc-ppc.c (ppc_elf_frob_symbol): Delete. + (ppc_frob_file_before_adjust): New function. + * config/tc-ppc.h (tc_frob_symbol): Don't define. + (ppc_elf_frob_symbol): Don't declare. + (tc_frob_file_before_adjust): Define. + (ppc_frob_file_before_adjust): Declare. + + * config/tc-ppc.c (md_pseudo_table): Warning fix. + (ppc_cpu): Make it unsigned long to agree with struct powerpc_opcode + flags. + (ppc_size): Delete. + (ppc_xcoff64): Rename to ppc_obj64. + (md_parse_option <m>): Encode old ppc_size value in ppc_cpu. + (ppc_set_cpu): Set PPC_OPCODE_32 too. + (ppc_arch): Use ppc_obj64 instead of ppc_size to select bfd_mach_ppc64 + or bfd_mach_ppc. + (ppc_target_format): Use ppc_obj64 to select format. + (md_begin): Adjust for PPC_OPCODE_32/64 in ppc_cpu. + (ppc_insert_operand): Use ppc_obj64 instead of ppc_size. + (ppc_elf_suffix): Likewise. Don't depend on BFD_DEFAULT_TARGET_SIZE. + (tc_frob_symbol): Likewise. + (md_assemble): Use ppc_obj64 instead of ppc_size. Don't depend on + BFD_DEFAULT_TARGET_SIZE. + (ppc_tc): Likewise. + (ppc_is_toc_sym): Likewise. + (md_apply_fix3): Likewise. + * config/tc-ppc.h (TC_FORCE_RELOCATION): Don't depend on + BFD_DEFAULT_TARGET_SIZE. + (ELF_TC_SPECIAL_SECTIONS): Likewise. + (tc_frob_symbol): Likewise. + +2002-07-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (macro_build): Handle MIPS16 insns. + (mips_ip): Likewise. + +2002-07-09 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (md_pseudo_table <file>): Warning fix. + (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD. + (md_apply_fix3): Formatting. Remove redundant test. + (tc_gen_reloc): Remove redundant code. + (tc_i386_force_relocation): Delete. Movy body of function to.. + * config/tc-i386.h (TC_FORCE_RELOCATION): .. here. + +2002-07-09 Federico G. Schwindt <fgsch@olimpo.com.br> + + * configure.in: Add hppa-*-openbsd* target, change + alpha*-*-openbsd* format to elf, and use elf for sparc-*-openbsd* + with sparc64 cpu. + * configure: Regenerate. + +2002-07-08 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * config/tc-mips.c (macro): Shift the 32-bit address range + accessible with a lone "lui" down by 32768. + +2002-07-08 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * config/tc-mips.c (load_address): Use non-trapping "daddu" + instead of "dadd" in address calculations. + (macro): Likewise. + +2002-07-08 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (process_suffix): Remove intel mode movsx and + movzx fudges. + (md_assemble): Instead, zap the suffix here. + +2002-07-03 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Remove next release number until the release is actually + upon us. + +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 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * config/tc-s390.c (tc_s390_fix_adjustable): Prevent any adjustment + to symbols in merge sections, even non pc-relative ones. + +2002-06-29 Stephane Carrez <stcarrez@nerim.fr> + + * config/tc-m68hc11.h (m68hc11_listing_header): Fix warning. + +2002-06-29 Stephane Carrez <stcarrez@nerim.fr> + + * config/tc-m68hc11.h (ELF_TC_SPECIAL_SECTIONS): New sections + .softregs and .eeprom. + +2002-06-28 David O'Brien <obrien@FreeBSD.org> + + * NEWS: Note the next release is 2.13. + +2002-06-26 Nick Clifton <nickc@cambridge.redhat.com> + + * po/tr.po: New translation imported. + +2002-06-26 Elias Athanasopoulos <eathan@otenet.gr> + + * ecoff.c: (get_tag): Replace strcpy with xstrdup. + (ecoff_directive_def): Likewise. + (ecoff_directive_tag): Likewise. + * listing.c (file_info): Likewise. + * hash.c (what): Likewise. + +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-19 Dhananjay R. Deshpande <dhananjayd@kpit.com> + + * config/tc-sh.c (get_specific): Revert 2002-05-01 change. + (assemble_ppi): Generate warning if the same register is used + twice as destination in the same padd / pmuls instruction. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + From Catherine Moore, Michael Meissner, Richard Sandiford, Dave Brolley + * po/POTFILES.in: Add tc-frv.c, tc-frv.h. + * configure.in: Support frv-*-*. + * Makefile.am (CPU_TYPES): Add frv. + (TARGET_CPU_CFILES): Add tc-frv.c. + (TARGET_CPU_HFILES): Add tc-frv.h. + (DEPTC_frv_coff): New variable. + (DEPTC_frv_elf): New variable. + (DEPOBJ_frv_coff): New variable. + (DEPOBJ_frv_elf): New variable. + (DEP_frv_coff): New variable. + (DEP_frv_elf): New variable. + * tc-frv.c: New file. + * tc-frv.h: New file. + +2002-06-17 Catherine Moore <clm@redhat.com> + + * config/obj-elf.h (TARGET_SYMBOL_FIELDS): Conditionally define. + +2002-06-17 J"orn Rennecke <joern.rennecke@superh.com> + + * config/tc-sh.c (assemble_ppi): Initialize reg_n. + +2002-06-17 Tom Rix <trix@redhat.com> + + * config/tc-i370.h (tc_comment_chars): Define for i370-elf. + +2002-06-14 H.J. Lu <hjl@gnu.org> + Daniel Jacobowitz <drow@mvista.com> + + * dwarf2dbg.h (dwarf2_directive_file): Return char *. + * dwarf2dbg.c (dwarf2_directive_file): Return filename. + * config/tc-mips.c (s_mips_file): Call s_app_file_string + and new_logical_line for the first .file directive. + * read.c (s_app_file_string): New function. + (s_app_file): Call it. + * read.h (s_app_file_string): Add declaration. + +2002-06-14 Daniel Jacobowitz <drow@mvista.com> + + * configure.in: Remove MIPS_STABS_ELF. + * configure: Regenerated. + * config.in: Regenerated. + * config/obj-elf.h (ECOFF_DEBUGGING): Define to mips_flag_mdebug + for MIPS targets. + * config/tc-mips.c (mips_pseudo_table): Remove #ifdef around + ".extern". + (pdr_seg): Declare unconditionally. + (md_begin): Always generate .pdr unless ECOFF_DEBUGGING or not ELF. + (s_mips_end): Likewise. Generate stabs function markers. + (s_mips_ent): Generate stabs function markers. + (s_mips_frame): Always generate .pdr unless ECOFF_DEBUGGING or not + ELF. + (s_mips_mask): Likewise. + (mips_flag_mdebug): New. + (md_longopts): Add "mdebug" and "no-mdebug". + (md_parse_options): Add OPTION_MDEBUG and OPTION_NO_MDEBUG. + (mips_after_parse_args): Set mips_flag_mdebug. + * doc/as.texinfo: Add "-mdebug" and "-no-mdebug" for MIPS. + +2002-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * config/tc-mips.c (md_apply_fix3): Don't subtract the symbol's + value twice for RELA relocations. + +2002-06-12 Ben Elliston <bje@redhat.com> + + * symbols.c (resolve_symbol_value): Initialise final_val. + + * subsegs.c (subsegs_print_statistics): Cast frchp to void *. + +2002-06-11 Tom Rix <trix@redhat.com> + + * config/tc-ppc.c (ppc_subseg_align): Delete. + (ppc_change_csect): Default csect align is 2. + * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Delete + +2002-06-09 Marek Michalkiewicz <marekm@amelek.gda.pl> + + * config/tc-avr.c (mcu_types): Update. + +2002-06-08 Matt Thomas <matt@3am-software.com> + + * configure.in (vax-*-netbsdelf*, vax-*-netbsdaout*) + (vax-*-netbsd*): New targets. + * configure: Regenerate. + * config/aout_gnu.h (enum machine_type): Add M_VAX4K_NETBSD. + * config/tc-vax.c: Add support for ELF and PIC. + (flag_want_pic): New flag. + (float_cons): Fix prototype. + (md_apply_fix3): Adjust for BFD_ASSEMBLER. + (md_assemble): Introduce a new is_absolute local, and use it + rather than repeating the test. Make fatal errors actually + fatal by using as_fatal as appropriate. Adjust for BFD_ASSEMBLER. + Add support for ELF. Add support for PIC. + (md_convert_frag): Adjust for BFD_ASSEMBLER. + (tc_aout_fix_to_chars): Only include if OBJ_AOUT and not + BFD_ASSEMBLER. + (vax_reg_parse): Make the % register prefix mandatory for ELF, + optional for a.out, and not allowed for VMS. Adjust all callers. + (md_create_short_jump): Add ATTRIBUTE_UNUSED to unused arguments. + (md_create_long_jump): Likewise. + (md_undefined_symbol): Likewise. + (md_section_align): Likewise. + (md_shortopts): Allow -k and -K for ELF. + (md_parse_option): Set flag_want_pic if -k or -K. + (tc_headers_hook): New function if OBJ_AOUT and not BFD_ASSEMBLER. + (tc_gen_reloc): New function if BFD_ASSEMBLER. + * config/tc-vax.h (tc_headers_hook): Remove. + (TARGET_FORMAT): Set according to object format and target + environment. + (BFD_ARCH, TARGET_ARCH): Define. + (NO_RELOC): Adjust for BFD_ASSEMBLER. + (TC_RELOC_RTSYM_LOC_FIXUP, TC_FIX_ADJUSTABLE) + (tc_fix_adjustable): Define if BFD_ASSEMBLER. + * config/vax-inst.h (VAX_JSB, VAX_CALLS, VAX_CALLG): Define. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + * as.c: Replace CONST with const. + * write.c: Likewise. + * config/obj-coff.c: Likewise. + * config/tc-a29k.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-dlx.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-h8500.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-pdp11.c: Likewise. + * config/tc-pj.c: Likewise. + * config/tc-s390.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-tic80.c: Likewise. + * config/tc-v850.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. + +2002-06-08 Daniel Jacobowitz <drow@mvista.com> + + Based on patch from Matt Green: + * config/obj-elf.h (ECOFF_DEBUGGING): Make configurable. + * config/tc-mips.c (s_mips_file): Renamed from s_file. + (s_mips_loc): New function. + (mips_nonecoff_pseudo_table): Call them. + (append_insn): Call dwarf2_emit_insn. + +2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (mips_opts): Fix comment, all ASE fields are set + to -1. + (file_ase_mips16): New veriable. + (mips_eabi64): Remove. + (CPU_HAS_MIPS16): New define. + (CPU_HAS_MDMX): Fix data type. + (md_begin): Code cleanup. Use file_ase_mips16. + (mips_elf_final_processing): Handle mips16 header flag. + Handle EABI flag without intermediate variable. + +2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * doc/as.texinfo: Update MIPS documentation. + +2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c: Add define for $zero register. + (md_begin): Add $zero as alias name for $0. + (insn_uses_reg): Use ZERO define. + (mips_ip): Add $zero as alias name for $0. + (mips16_ip): Likewise. + (s_cplocal): Demand empty rest of input line. + (tc_get_register): Likewise. Add support for $kt0, kt1 register + names. Use ZERO define. Fix input_line_pointer progress. + +2002-06-07 Alan Modra <amodra@bigpond.net.au> + + * symbols.c: Replace CONST by const throughout. + (symbol_find_exact): Split out from.. + (symbol_find_base): ..here. + * symbols.h: Replace CONST by const throughout. + (symbol_find_exact): Declare. + * config/obj-elf.c: #include "struc-symbol.h". + (elf_frob_file): If group name matches an exported symbol, use that + symbol for the signature and ".group" as the section name. + +2002-06-06 J"orn Rennecke <joern.rennecke@superh.com> + + * config/tc-sh.c (parse_at): @(symbol,pc) is A_DISP_PC again, + but warn about it. + * testsuite/gas/sh/pcrel.s: Also test @(symbol,pc). + * testsuite/gas/sh/pcrel.d: Update. + * testsuite/gas/sh/pcrel.l: New file. + +2002-06-06 Daniel Jacobowitz <drow@mvista.com> + + * tc-mips.c (mips_after_parse_args): Always set mips_opts.ase_mips3d + and mips_opts.ase_mdmx if they are uninitialized. + +2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * gas/config/tc-hppa.c (pa_ip): Replace "L$0\001" with FAKE_LABEL_NAME. + (hppa_force_relocation): Check if a stub just before the start symbol + of the last call_info is reachable before forcing relocation. Fix + typo. + +2002-06-04 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * config/tc-mips.c (mips_after_parse_args): New function. + (md_begin): Move processing of defaults to mips_after_parse_args. + config/tc-mips.h (md_after_parse_args): Define. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in (sh5*): Set cpu_type to sh64 and endian to big. + (sh5le*, sh64le*): Set cpu_type to sh64 and endian to little. + (sh5*-*-netbsd*, sh64*-*-netbsd*): New targets. + * configure: Regenerate. + * config/tc-sh64.c (sh64_target_format): Add support for NetBSD + environment. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * config/tc-sh64.h (MD_PCREL_FROM_SECTION): Undef before redefining. + +2002-06-04 Alan Modra <amodra@bigpond.net.au> + + * config/obj-elf.c (obj_elf_change_section): Set and check elf + linkonce flag. Print all warnings. + (obj_elf_section): Parse ",comdat" for groups. + (elf_frob_file): Set SEC_LINK_ONCE on COMDAT groups. Check + consistency of comdat flag. + +2002-06-02 Richard Henderson <rth@redhat.com> + + * config/tc-alpha.c (alpha_adjust_symtab_relocs): Fix thinko + with LITERALs without sequence numbers. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * config/tc-alpha.c: Move LITUSE constants to "elf/alpha.h". + Rename them LITUSE_ALPHA_*. + +2002-05-31 Shrinivas Atre <ShrinivasA@kpit.com> + + * config/tc-h8300.c (get_operand): Allow stm.l and ldm.l insns to + accept parentheses enclosed register lists. + +2002-05-31 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * po/POTFILES.in: Regenerate. + +2002-05-31 Graeme Peterson <gp@qnx.com> + + * configure.in: Add i386-*-nto-qnx*. + * configure: Regenerate. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (mips_ip): Use unsigned long values for + warning output. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (s_cpsetup): Fix initialization of + mips_cpreturn_register and mips_cpreturn_offset. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (s_cpsetup): Fix comment. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (md_begin): Add $ra as alias name for $31. + (mips_ip): Likewise. + (mips16_ip): Likewise. + (tc_get_register): Likewise. + +2002-05-30 Chris G. Demetriou <cgd@broadcom.com> + Ed Satterthwaite <ehs@broadcom.com> + + * config/tc-mips.c (mips_set_options): New "ase_mdmx" member. + (mips_opts): Initialize "ase_mdmx" member. + (file_ase_mdmx): New variable. + (CPU_HAS_MDMX): New macro. + (md_begin): Initialize mips_opts.ase_mdmx and file_ase_mdmx + based on command line options and configuration defaults. + (macro_build): Note in comment that use of MDMX in macros is + not currently allowed. + (validate_mips_insn): Add support for the "O", "Q", "X", "Y", and + "Z" MDMX operand types. + (mips_ip): Accept MDMX instructions if mips_opts.ase_mdmx is set, + and add support for the "O", "Q", "X", "Y", and "Z" MDMX operand + types. + (OPTION_MDMX, OPTION_NO_MDMX, md_longopts, md_parse_option): + Add support for "-mdmx" and "-no-mdmx" options. + (OPTION_ELF_BASE): Move to accomodate new options. + (s_mipsset): Support ".set mdmx" and ".set nomdmx". + (mips_elf_final_processing): Set MDMX ASE ELF header flag if + file_ase_mdmx was set. + * doc/as.texinfo: Document -mdmx and -no-mdmx options. + * doc/c-mips.texi: Likewise, and document ".set mdmx" and ".set + nomdmx" directives. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (OPTION_NO_M7000_HILO_FIX): Rename to + OPTION_MNO_7000_HILO_FIX. Add alternate "mno-fix7000" + command line switch conforming to gcc conventions. + * doc/c-mips.texi: Document -mno-fix7000 instead of no-mfix-7000. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (macro_build_jalr): New Function. + (md_begin): NewABI uses big GOTs. + (macro_build): Recognize BFD_RELOC_MIPS_GOT_DISP, + BFD_RELOC_MIPS_GOT_PAGE, BFD_RELOC_MIPS_GOT_OFST as valid. + (load_address): Add some NewABI PIC support. + (macro): Likewise. + (md_apply_fix): Special handling for BFD_RELOC_MIPS_JALR. + (tc_gen_reloc): Don't encode NewABI vtables in REL relocations. + +2002-05-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (load_address): Use mips_gp_register instead + of hardcoded value. Remove dbl parameter, use HAVE_32BIT_ADDRESSES + instead. + (macro): Use mips_gp_register instead of hardcoded value. + +2002-05-30 Richard Henderson <rth@redhat.com> + + * expr.h (operatorT): Add O_md17..O_md32. + * config/tc-alpha.c (O_lituse_tlsgd, O_lituse_tlsldm, O_tlsgd, + O_tlsldm, O_gotdtprel, O_dtprelhi, O_dtprello, O_dtprel, O_gottprel, + O_tprelhi, O_tprello, O_tprel): New. + (USER_RELOC_P, alpha_reloc_op_tag, debug_exp): Include them. + (DUMMY_RELOC_LITUSE_TLSGD, DUMMY_RELOC_LITUSE_TLSLDM): New. + (LITUSE_TLSGD, LITUSE_TLSLDM): New. + (struct alpha_reloc_tag): Add master, saw_tlsgd, saw_tlsld, + saw_lu_tlsgd, saw_lu_tlsldm. Make multi_section_p a bit field. + (md_apply_fix3): Handle TLS relocations. + (alpha_force_relocation, alpha_fix_adjustable): Likewise. + (alpha_adjust_symtab_relocs): Sort LITERAL relocs after the + associated TLS reloc. Check lituse_tls relocs match up. + (emit_insn): Handle TLS relocations. + (ldX_op): Remove. + + * doc/c-alpha.texi: Add docs for tls relocations. + +2002-05-30 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (mips_gprel_offset): New variable. + (s_gpvalue): Use it. + +2002-05-30 Diego Novillo <dnovillo@redhat.com> + + * gas/config/tc-d10v.c (check_resource_conflict): Only check + write-write conflicts. + (md_assemble): Reformat introductory comment. + (parallel_ok): Prevent packing only if the first + instruction cannot be packed. + +2002-05-30 Jason Eckhardt <jle@redhat.com> + Tom Rix <trix@redhat.com> + + * config/tc-d10v.c (build_insn): Check for immediates. + +2002-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c: Replace GP in comments by $gp. + (mips_big_got): Initialize. + (mips_trap): Initialize. + (load_address): Use mips_gp_register instead of hardcoded value. + Remove dbl parameter, use HAVE_32BIT_ADDRESSES instead. + (macro): Use mips_gp_register instead of hardcoded value. + (macro2): Change load_address calls. + (md_pcrel_from): Comment formatting. + (s_cpload): Use mips_gp_register instead of hardcoded value. + (s_cprestore): Likewise. Comment formatting. + (s_gpword): Fix data type. + (s_cpadd): Use mips_gp_register instead of hardcoded value. + (nopic_need_relax): Replace GP in comments by $gp. + (mips_elf_final_processing): Better comment. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * configure.in: Add DLX configuraton + * Makefile.am: Add DLX configuraton + * configure: Regenerate. + * Makefile.in: Regenerate. + * config/tc-dlx.c: New file. + * config/tc-dlx.h: New files. + * NEWS: Mention new support. + +2002-05-27 Nick Clifton <nickc@cambridge.redhat.com> + + * config/obj-coff.c (write_object_file): Add missing semicolon. + +2002-05-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (mips_emit_delays): Replace magic constant for RA + by the define. Remove superfluous check of mips_opts.mips16. + (append_insn): Likewise. Canonicalize variable increments. + (macro_build): Canonicalize variable increments. + (macro_build_lui): Likewise. + (load_register): Likewise. + (load_address): Move pointer initialization. + (macro): Move pointer to a more local scope. Canonicalize variable + increments. Better comments. Replace magic constant for RA by the + define. + (macro2): Replace magic constant for RA by the define. Canonicalize + variable increments. + (mips_ip): Canonicalize variable increments. + (mips16_ip): Replace magic constant for RA by the define. + (my_getSmallParser): Canonicalize variable increments/decrements. + (my_getPercentOp): Likewise. + (my_getSmallExpression): Likewise. + (s_align): Likewise. + (s_mipsset): Likewise. + (s_cpsetup): Likewise. + (s_insn): Remove superfluous check of mips_opts.mips16. + (s_mips_stab): Likewise. + (mips_handle_align): Canonicalize variable increments. + (s_mips_ent): Likewise. + (s_mips_end): Add comment. + +2002-05-26 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*. + * configure: Regenerate. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (OBJS): Depend on ansidecl.h and fopen-same.h. + * Makefile.in: Regenerate. + * dep-in.sed: Reorder to match OBJS in Makefile.am. + * configure.in (ALL_OBJ_DEPS): Add symcat.h when need_bfd. + * configure: Regenerate. + * as.h: Use #include "" instead of <> for local header files. + * flonum-konst.c: Likewise. + * flonum-mult.c: Likewise. + * gasp.c: Likewise. + * listing.c: Likewise. + * config/tc-ia64.h: Likewise. + * config/tc-v850.h: Likewise. + +2002-05-24 TAMURA Kent <kent@netbsd.org> + + * configure.in: Add a target for i386-netbsdpe. + * configure: Regenerate. + +2002-05-23 Jakub Jelinek <jakub@redhat.com> + + * config/obj-elf.c (elf_common): Renamed from obj_elf_common. + (obj_elf_common): Call elf_common. + (obj_elf_tls_common): New function. + (elf_pseudo_tab): Support .tls_common. + (special_sections): Add .tdata and .tbss. + (obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS + sections. + (obj_elf_parse_section_letters): Support T in section flags (SHF_TLS). + (obj_elf_parse_section_letters): Include T in error message. + * config/tc-ppc.c (ppc_section_letter): Likewise. + * config/tc-alpha.c (alpha_elf_section_letter): Likewise. + (tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as + SEC_MERGE. + * config/tc-sparc.c (md_apply_fix3): Likewise. + * config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs. + Define them if not BFD_ASSEMBLER. + (lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF + and @NTPOFF. + (md_apply_fix3): Add TLS relocs. + * config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE, + FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE, + FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE. + (pseudo_func): Support @dtpmod(), @dtprel() and @tprel(). + (ia64_elf_section_letter): Include T in error message. + (md_begin): Support TLS operators. + (md_operand): Likewise. + (ia64_gen_real_reloc_type): Support TLS relocs. + * testsuite/gas/i386/tlspic.s: New file. + * testsuite/gas/i386/tlsd.s: New file. + * testsuite/gas/i386/tlsnopic.s: New file. + * testsuite/gas/i386/tlsd.d: New file. + * testsuite/gas/i386/tlsnopic.d: New file. + * testsuite/gas/i386/tlspic.d: New file. + * testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests. + * testsuite/gas/ia64/tls.s: New file. + * testsuite/gas/ia64/tls.d: New file. + * testsuite/gas/ia64/ia64.exp: Add tls test. + * write.c (adjust_reloc_syms): Don't change symbols in + SEC_THREAD_LOCAL sections to STT_SECTION + addend. + +2002-05-23 Nick Clifton <nickc@cambridge.redhat.com> + + * config/tc-arm.c (md_apply_fix3): For the Thumb BLX reloc + round the relocation up rather than down. + +2002-05-23 Nick Clifton <nickc@cambridge.redhat.com> + + * config/obj-coff.c (obj_coff_section): Silently ignore an 'a' + flag. + * doc/as.texinfo: Document that the COFF version of .section + ignores the 'a' flag. + +2002-05-23 Alan Modra <amodra@bigpond.net.au> + + * config/tc-alpha.c (assemble_tokens): Protect use of + ALPHA_RELOC_TABLE with #ifdef RELOC_OP_P. + + * write.c (size_seg): Check adjustment to last frag. + (SUB_SEGMENT_ALIGN): If HANDLE_ALIGN defined, pad out last frag to + section alignment. + * config/obj-coff.c (SUB_SEGMENT_ALIGN): Likewise. + * config/obj-ieee.c (SUB_SEGMENT_ALIGN): Likewise. + (write_object_file): Invoke md_do_align if available, and use + frag_align_code on text sections. + * config/obj-vms.h (SUB_SEGMENT_ALIGN): Now two args. + * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Likewise. + * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Likewise. + * config/tc-sh.h (SUB_SEGMENT_ALIGN): Likewise. + * config/tc-i386.h (SUB_SEGMENT_ALIGN): Likewise. Define for + BFD_ASSEMBLER too. + +2002-05-22 H.J. Lu <hjl@gnu.org> + + * dwarf2dbg.c (dwarf2_directive_loc): Call listing_source_file + for source file. + +2002-05-22 Nick Clifton <nickc@cambridge.redhat.com> + + * config/tc-arm.c (arm_s_section): Enable for COFF builds as well + as ELF builds. + +2002-05-22 H.J. Lu <hjl@gnu.org> + + * dwarf2dbg.c (dwarf2_emit_insn): Emit only one line symbol + for one .loc for compiler. + +2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (macro): Relax warning, it's toot strict for + embedded-PIC. + +2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (macro2): Add 64 bit drol, dror macros. + Optimize the rotate by zero case. + +2002-05-21 Nick Clifton <nickc@cambridge.redhat.com> + + * configure.in: Remove accidental enabling of bfd_gas=yes for + sh-coff targets. + * configure: Regenerate. + +2002-05-18 Kazu Hirata <kazu@cs.umass.edu> + + * app.c: Fix formatting. + * as.c: Likewise. + * ehopt.c: Likewise. + * expr.c: Likewise. + * input-file.c: Likewise. + * listing.c: Likewise. + * macro.h: Likewise. + * stabs.c: Likewise. + * symbols.c: Likewise. + +2002-05-17 Alan Modra <amodra@bigpond.net.au> + + * config/obj-generic.c: Delete file. + * config/obj-generic.h: Likewise. + +2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl> + + * config/tc-avr.c (mcu_types): Update for new devices. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (macro): Warn about wrong la/dla use. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc_mips.c (s_cpsetup): Fix completely bogus code which had + worked sometimes by accident. Fix copy&paste comment. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (md_begin): Fix .reginfo and .MIPS.option section + alignment for NewABI. Let n32 use .reginfo. Remove useless casts. + (mips_elf_final_processing): Let n32 use .reginfo. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (append_insn): Fix too small range of variable. + +2002-05-14 Nick Clifton <nickc@cambridge.redhat.com> + + * config/tc-arm.c (arm_cleanup): Remove redundant call to + listing_prev_line(). + 2002-05-13 Nick Clifton <nickc@cambridge.redhat.com> + * config/tc-arm.c (md_assemble): Remove redundant call to + listing_prev(). + + * dwarf2dbg.c (dwarf2_emit_insn): Do not reset + loc_directive_seen. + * stabs.c (s_stab_generic): Fix grammatical error in warning message. +2002-05-13 Alan Modra <amodra@bigpond.net.au> + + * write.c (subsegs_finish): Don't specially align last subseg. + 2002-05-11 Nick Clifton <nickc@cambridge.redhat.com> * stabs.c (s_stab_generic): Warn about a description field that is too big. -2002-05-11 Daniel Jacobowitz <drow@mvista.com> - - Merge from mainline: - 2002-05-11 Nick Clifton <nickc@cambridge.redhat.com> * config/obj-coff.c: Fix compile time warnings when compiling without BFD_ASSEMBLER defined. Fix formatting. @@ -20,66 +954,147 @@ target. (md_pcrel_from_section): Use md_pcrel_from(). +2002-05-11 Bruno Haible <bruno@clisp.org> + + * dwarf2dbg.c (dwarf2_emit_insn): Use the 'current' struct filled + by dwarf2_directive_loc, instead of calling dwarf2_where. + +2002-05-11 Kazu Hirata <kazu@cs.umass.edu> + + * config/obj-coff.h: Fix formatting. + * config/tc-mcore.c: Likewise. + * config/tc-mn10300.c: Likewise. + * config/tc-openrisc.c: Likewise. + * config/tc-or32.c: Likewise. + * config/tc-pdp11.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-ppc.h: Likewise. + * config/tc-sh64.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-tic54x.c: Likewise. + * config/tc-xstormy16.c: Likewise. + * config/tc-xstormy16.h: Likewise. + +2002-05-09 Kazu Hirata <kazu@cs.umass.edu> + + * config/obj-coff.c: Fix formatting. + * config/obj-elf.c: Likewise. + * config/tc-alpha.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-d10v.c: Likewise. + * config/tc-d30v.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-hppa.c: Likewise. + 2002-05-09 Alan Modra <amodra@bigpond.net.au> * config/tc-i386.c (md_estimate_size_before_relax) Don't lose reloc when no_cond_jump_promotion. - Merge from mainline - 2002-05-08 Jim Wilson <wilson@redhat.com> +2002-05-08 Jim Wilson <wilson@redhat.com> + * config/tc-i960.c (md_estimate_size_before_relax): Return size of current variable part of frag. - 2002-05-02 Alan Modra <amodra@bigpond.net.au> - * config/tc-ppc.c (mapping): Map sectoff to BFD_RELOC_16_BASEREL. - (ppc_elf_validate_fix): Replace BFD_RELOC_32_BASEREL with - BFD_RELOC_16_BASEREL. - (md_assemble): Likewise. - (md_apply_fix3): Likewise. +2002-05-08 Kazu Hirata <kazu@cs.umass.edu> - 2002-05-01 Andrew Macleod <amacleod@cygnus.com> - * config/tc-i386.c (extra_symbol_chars): Add '[' to the list. + * config/tc-mmix.c: Fix formatting. + * config/tc-mmix.h: Likewise. - 2002-04-28 Alan Modra <amodra@bigpond.net.au> - * config/tc-i386.c: Formatting fixes, add missing space in error - message. +2002-05-08 Alan Modra <amodra@bigpond.net.au> + + * configure: Regenerate. + +2002-05-07 Kazu Hirata <kazu@cs.umass.edu> + + * config/tc-m68k.c: Fix formatting. + +2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br> + + * Makefile.am: Honour DESTDIR. + * Makefile.in: Regenerate. + +2002-05-06 Kazu Hirata <kazu@cs.umass.edu> + + * config/tc-ia64.c: Fix formatting. + * config/tc-ia64.h: Likewise. + +2002-05-04 Kazu Hirata <kazu@cs.umass.edu> + + * config/tc-mips.c: Fix formatting. + * config/tc-s390.c: Likewise. + * config/tc-s390.h: Likewise. 2002-05-03 Alexandre Oliva <aoliva@redhat.com> * config/tc-s390.c (md_gather_operands): Emit dwarf2 line-number information for instructions. +2002-05-02 Kazu Hirata <kazu@cs.umass.edu> + + * as.h: Fix formatting. + * cgen.c: Likewise. + * cgen.h: Likewise. + * dwarf2dbg.c: Likewise. + * frags.h: Likewise. + * gasp.c: Likewise. + * macro.c: Likewise. + * read.c: Likewise. + * stabs.c: Likewise. + * symbols.c: Likewise. + +2002-05-02 Alan Modra <amodra@bigpond.net.au> + + * app.c (mri_pseudo): Only declare for TC_M68K. + + * config/tc-ppc.c (mapping): Map sectoff to BFD_RELOC_16_BASEREL. + (ppc_elf_validate_fix): Replace BFD_RELOC_32_BASEREL with + BFD_RELOC_16_BASEREL. + (md_assemble): Likewise. + (md_apply_fix3): Likewise. + 2002-05-02 Nick Clifton <nickc@cambridge.redhat.com> * config/tc-arm.c (thumb_add_sub): Do not convert a subtract of zero into an add of zero - it is not the same. -2002-04-27 Alan Modra <amodra@bigpond.net.au> +2002-05-01 Arati Dikey <aratid@kpit.com> - Merge from mainline. - 2002-04-17 Martin Schwidefsky <schwidefsky@de.ibm.com> - * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to - symbols in merge sections. + * tc-sh.c (get_specific): Generate warning if the same + destination register is used in parallel instructions. - 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> - * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64. - Make bit size independent of architecture switch. - (md_begin): Add warning for -m64 with -Aesa. - (s390_md_end): Use renamed architecture defines. +2002-05-01 Andrew Macleod <amacleod@cygnus.com> - 2002-02-19 Tom Tromey <tromey@redhat.com> - * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + * config/tc-i386.c (extra_symbol_chars): Add '[' to the list. - Tue Apr 9 16:45:48 2002 J"orn Rennecke <joern.rennecke@superh.com> - * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if - symbol_used_in_reloc_p is true. - * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big - endian hosts. +2002-05-01 Alan Modra <amodra@bigpond.net.au> - 2002-04-03 Alan Modra <amodra@bigpond.net.au> - * symbols.c (resolve_symbol_value <O_uminus, O_bit_not, - O_logical_not>): Derive final_seg from add_symbol. - <O_multiply..O_logical_or>: More final_seg twiddles. + * write.c (cvt_frag_to_fill): Set fr_offset to zero on .org + backwards to prevent cascading errors. + +2002-04-30 Mark Mitchell <mark@codesourcery.com> + + * configure.in: Add support for powerpc-*-windiss. + * configure: Regenerated. + +2002-04-28 Alan Modra <amodra@bigpond.net.au> + + * config/tc-s390.c (md_parse_option): Formatting. + + * config/tc-i386.c: Formatting fixes, add missing space in error + message. + +2002-04-24 Christian Groessler <chris@groessler.org> + + * config/tc-z8k.c (build_bytes): Add support for new cases: + CLASS_IGNORE and ARG_NIM4. + (md_assemble): Prevent destruction of input_line_pointer if + get_operands returns failure. + +2002-04-24 Chris G. Demetriou <cgd@broadcom.com> + + * config/tc-mips.c (macro_build): Do _not_ allow MIPS-3D + instructions to be generated by macros. 2002-04-24 Andreas Schwab <schwab@suse.de> @@ -89,12 +1104,56 @@ (md_apply_fix3): Remember addend value for rela relocations. (tc_gen_reloc): Correctly compute pc-relative relocation addend. +2002-04-22 Chris Demetriou <cgd@broadcom.com> + + * config/tc-mips.c (macro_build): Add close-parenthesis missing + from previous change. + +2002-04-22 Eric Christopher <echristo@redhat.com> + + * config/tc-mips.c (macro_build): Add warning if macro instructions + are expanded into a branch delay slot. + +2002-04-17 Geoffrey Keating <geoffk@redhat.com> + + * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line + numbers, gdb relies on them to detect the start of the prologue. + +2002-04-17 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to + symbols in merge sections. + +2002-04-16 Alan Modra <amodra@bigpond.net.au> + + * as.c (main): Don't reference _bfd_chunksize. + +2002-04-15 Tom Rix <trix@redhat.com> + + * config/tc-d10v.c (d10v_fix_adjustable): Prevent adjustments to + symbols in merge sections. + +2002-04-11 Richard Sandiford <rsandifo@redhat.com> + + * doc/invoke.texi (TC_LARGEST_EXPONENT_IS_NORMAL): Document. + * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): Add an + argument for the precision. + (gen_to_words): Update accordingly. + 2002-04-10 Alan Modra <amodra@bigpond.net.au> * as.c (parse_args <OPTION_VERSION>): Use VERSION is BFD_VERSION_STRING unavailable. * config/tc-i386.c (INLINE): Define (for non-BFD assembler). +2002-04-09 J"orn Rennecke <joern.rennecke@superh.com> + + * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if + symbol_used_in_reloc_p is true. + + * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big + endian hosts. + 2002-04-04 Alan Modra <amodra@bigpond.net.au> * dep-in.sed: Cope with absolute paths. @@ -102,26 +1161,141 @@ Run "make dep-am". * Makefile.in: Regenerate. +2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * config/tc-mips.c (mips16_macro_build): Cast type mismatch. + (mips_ip): Remove unused variable. + (md_apply_fix3): Cast signed/unsignes mismatches. Replace + unsigned char with bfd_byte. + (s_file): Remove unused variable. + (s_mips_ent): Likewise. + +2002-04-03 Tom Rix <trix@redhat.com> + + * config/tc-d10v.c (d10v_insert_operand): Fix warning in as_bad_where. + (build_insn): Same. + (find_opcode): Fix warning in as_warn. + * config/tc-d10v.h: Update Copyright. + +2002-04-03 Alan Matsuoka <alanm@redhat.com> + Tom Rix <trix@redhat.com> + + From Jeff Knaggs <jknaggs@redhat.com> + * config/tc-d10v.c (check_resource_conflict): New function to + check for resource conflicts. + + From Jason Eckhardt <jle@redhat.com> + * config/tc-d10v.c (build_insn): Check for unresolved imm4 or + imm3 fields. + * config/tc-d10v.c (find_opcode): Emit a warning if one of the + reserved control registers is used. + * config/tc-d10v.c (build_insn): Check for unresolved imm4 or + imm3 fields. + + From 2001-03-28 Diego Novillo <dnovillo@redhat.com> + * tc-d10v.c (parallel_ok): Prevent packing only if the first + instruction cannot be packed. + + From 2001-03-30 Diego Novillo <dnovillo@redhat.com> + * gas/config/tc-d10v.c (check_resource_conflict): Only check + write-write conflicts. + (md_assemble): Reformat introductory comment. + * opcodes/d10v-opc.c (d10v_opcodes): `btsti' does not modify its + arguments. + +2002-04-03 Alan Modra <amodra@bigpond.net.au> + + * symbols.c (resolve_symbol_value <O_uminus, O_bit_not, + O_logical_not>): Derive final_seg from add_symbol. + <O_multiply..O_logical_or>: More final_seg twiddles. + 2002-04-01 Jessica Han <jessica@cup.hp.com> * config/tc-ia64.c (ia64_cons_fix_new): Handle 8 byte iplt reloc in 32-bit mode. -2002-03-28 Alan Modra <amodra@bigpond.net.au> +2002-03-27 Andreas Schwab <schwab@suse.de> + + * config/tc-i386.c (output_jump): Set fx_pcrel_adjust to size of + field for pc-relative fixups. + (output_disp): Likewise. + (md_estimate_size_before_relax): Likewise. + (tc_gen_reloc): Subtract fx_pcrel_adjust instead of fx_size for + pc-relative fixups in 64bit mode. + +2002-03-22 Alan Modra <amodra@bigpond.net.au> + + * config/te-aix5.h: Typo fix. + +2002-03-21 Alan Modra <amodra@bigpond.net.au> - * aclocal.m4: Regenerate. - * config.in: Regenerate. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. - Merge from mainline. - 2002-03-12 Andreas Schwab <schwab@suse.de> +2002-03-20 Albert Chin-A-Young <china@thewrittenword.com> + + * config/tc-arm.c (vfp_dp_reg_required_here): Fix typo + (vfp_sp_reg_pos -> vfp_dp_reg_pos). + +2002-03-18 Alexandre Oliva <aoliva@redhat.com> + + * config/tc-mips.c (md_estimate_size_before_relax): Do not modify + the EXTENDED bit here; report the estimate according to the + current size. + +2002-03-18 Tom Rix <trix@redhat.com> + + * configure.in: Add AIX 5 support. + * config/tc-ppc.c (ppc_target_format): Add AIX 5 64 bit target. + * config/te-aix5.h: New file. AIX 5 support. + * configure: Regenerate. + +2002-03-18 Nick Clifton <nickc@cambridge.redhat.com> + + * po/fr.po: Updated version. + +2002-03-16 Andreas Jaeger <aj@suse.de> + + * doc/c-mips.texi (Machine Dependencies): Add new node. + +2002-03-15 Chris G. Demetriou <cgd@broadcom.com> + + * config/tc-mips.c (mips_set_options): New "ase_mips3d" member. + (mips_opts): Initialize "ase_mips3d" member. + (file_ase_mips3d): New variable. + (CPU_HAS_MIPS3D): New macro. + (md_begin): Initialize mips_opts.ase_mips3d and file_ase_mips3d + based on command line options and configuration defaults. + (macro_build, mips_ip): Accept MIPS-3D instructions if + mips_opts.ase_mips3d is set. + (OPTION_MIPS3D, OPTION_NO_MIPS3D, md_longopts, md_parse_option): + Add support for "-mips3d" and "-no-mips3d" options. + (OPTION_ELF_BASE): Move to accomodate new options. + (s_mipsset): Support ".set mips3d" and ".set nomips3d". + (mips_elf_final_processing): Add a comment indicating that a + MIPS-3D ASE ELF header flag should be set, when one exists. + * doc/as.texinfo: Document -mips3d and -no-mips3d options. + * doc/c-mips.texi: Likewise, and document ".set mips3d" and ".set + nomips3d" directives. + +2002-03-14 Hans-Peter Nilsson <hp@bitrange.com> + + * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider + a weak symbol in same section to be within reach. + +2002-03-13 Nick Clifton <nickc@cambridge.redhat.com> + + * po/fr.po: Updated version. + +2002-03-12 Andreas Schwab <schwab@suse.de> + * config/tc-ia64.c (fixup_unw_records): Clear region when seeing a body record so that an error is given for misplaced .save pseudo-ops. - 2002-03-09 Alan Modra <amodra@bigpond.net.au> +2002-03-09 Alan Modra <amodra@bigpond.net.au> + * config/tc-i386.h (REX_OPCODE): Define. (REX_MODE64, REX_EXTX, REX_EXTY, REX_EXTZ): Define. (rex_byte): typedef to int. @@ -162,67 +1336,60 @@ (output_disp): Likewise. (output_imm): Likewise. - 2002-03-06 Alan Modra <amodra@bigpond.net.au> +2002-03-07 Daniel Jacobowitz <drow@mvista.com> + + * doc/as.texinfo: Wrap @menu in @ifnottex, not @ifinfo. + +2002-03-06 Alan Modra <amodra@bigpond.net.au> + * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte relocs except when BFD64. + * write.c (number_to_chars_bigendian): Don't abort when N is larger than sizeof (VAL). (number_to_chars_littleendian): Likewise. - 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca> +2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca> + * config/tc-hppa.c (md_apply_fix3): Add cast. (hppa_fix_adjustable): Adjust list of selectors using e_lrsel and e_rrsel. - 2002-03-04 H.J. Lu <hjl@gnu.org> +2002-03-05 Paul Koning <pkoning@equallogic.com> + + * tc-pdp11.c: Use VAX float format support for PDP-11 target. + (parse_ac5): New function for parsing float regs in float operand. + (parse_expression): Remove attempt to make literals be octal. + (parse_op_no_deferred): Support float literals. + (parse_op): Reject attempts to refer to float regs. + (parse_fop): New function, like parse_op but for float operand. + (md_assemble): Add cases to parse float operands. Also fix + IMM3, IMM6, IMM8 cases to pick up the operand from the right spot. + +2002-03-04 H.J. Lu <hjl@gnu.org> + * config/obj-elf.c (special_section): Add .init_array, .fini_array and .preinit_array. + * config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove .init_array and .fini_array. - 2002-03-01 Jakub Jelinek <jakub@redhat.com> +2002-03-01 Jakub Jelinek <jakub@redhat.com> + * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy visibility. (obj_frob_symbol): Copy visibility. -2002-03-27 Andreas Schwab <schwab@suse.de> - - * config/tc-i386.c (md_assemble): Set fx_pcrel_adjust to size of - field for pc-relative fixups. - (md_estimate_size_before_relax): Likewise. - (tc_gen_reloc): Subtract fx_pcrel_adjust instead of fx_size for - pc-relative fixups in 64bit mode. - -2002-03-20 Albert Chin-A-Young <china@thewrittenword.com> - - * config/tc-arm.c (vfp_dp_reg_required_here): Fix typo - (vfp_sp_reg_pos -> vfp_dp_reg_pos). - -2002-03-19 Alexandre Oliva <aoliva@redhat.com> - - * config/tc-mips.c (md_estimate_size_before_relax): Do not modify - the EXTENDED bit here; report the estimate according to the - current size. - -2002-03-17 Hans-Peter Nilsson <hp@bitrange.com> - - * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider - a weak symbol in same section to be within reach. - -2002-03-07 Daniel Jacobowitz <drow@mvista.com> - - * doc/as.texinfo: Wrap @menu in @ifnottex, not @ifinfo. - -2002-03-07 Daniel Jacobowitz <drow@mvista.com> - - * NEWS: Mark version 2.12. - 2002-02-28 Jakub Jelinek <jakub@redhat.com> * config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not s_text. (s_alpha_data): Use obj_elf_data for OBJ_ELF, not s_data. +2002-02-27 Nick Clifton <nickc@cambridge.redhat.com> + + * po/es.po: Updated. + 2002-02-26 Chris Demetriou <cgd@broadcom.com> * config/tc-mips.c (mips_need_elf_addend_fixup): For embedded-PIC @@ -239,6 +1406,8 @@ 2002-02-26 Nick Clifton <nickc@cambridge.redhat.com> + * doc/as.texinfo (Overview): Add missing @ifset IA64 + * configure.in (LINGUAS): Add es.po. * configure: Regenerate. * po/es.po: New file. @@ -250,9 +1419,16 @@ and NO_PIC cases. Code cleanup. (macro2): Fix handling of 64bit register loads. +2002-02-25 David Mosberger <davidm@hpl.hp.com> + + * doc/as.texinfo: Add entry for IA64. + * doc/c-ia64.texi: New file. + 2002-02-25 Alan Modra <amodra@bigpond.net.au> - * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4, -maltivec and -m7400. + * config/tc-hppa.c: Update copyright date. + + * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4, -maltivec and -m7400 Remove references to chip manufacturers. * config/tc-ppc.c (md_parse_option): Handle -mpower4 option. Correct comments. @@ -278,19 +1454,43 @@ (generate_unwind_image): Free up list of saved prologue counts by calling free_saved_prologue_counts(). -2002-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> +2002-02-22 Nick Clifton <nickc@cambridge.redhat.com> + + * config/tc-tic54x.c: Add missing prototypes and remove ANSI style + function declarations. + +2002-02-21 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Note that GASP is now deprecated. + * Makefile.am: Do not build gasp-new by default. + * Makefile.in: Regenerate. + * doc/Makefile.am: Do not install gasp.info. + * doc/Makefile.in: Regenerate. + * gas/gasp.texi: Note that gasp is now deprecated. + +2002-02-20 Nick Clifton <nickc@cambridge.redhat.com> + + * NEWS: Mark 2.12 branch. + +2002-02-19 Tom Tromey <tromey@redhat.com> + + * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + +2002-02-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> * config/tc-mips.c (md_parse_option): Complain about invalid -mabi option input. -2002-02-18 Daniel Jacobowitz <drow@mvista.com> +2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> - * config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh. + * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64. + Make bit size independent of architecture switch. + (md_begin): Add warning for -m64 with -Aesa. + (s390_md_end): Use renamed architecture defines. -2002-02-18 John David Anglin <dave@hiauly1.hia.nrc.ca> +2002-02-18 Daniel Jacobowitz <drow@mvista.com> - * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types - that implicitly use LR and RR selectors. + * config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh. 2002-02-16 Nick Clifton <nickc@cambridge.redhat.com> @@ -299,7 +1499,7 @@ 2002-02-15 Chris Demetriou <cgd@broadcom.com> - * config/tc-mips.c (md_estimate_size_before_relax): Really + * config/tc-mips.c (md_estimate_size_before_relax): Really make sure we treat weak like extern only for ELF. (Fixes patch from 2001-07-25.) @@ -308,12 +1508,6 @@ * doc/as.texinfo: Add duplicate directory entry so that "info gas" works as expected. -Fri Feb 15 15:18:51 CET 2002 Jan Hubicka <jh@suse.cz> - - * i386.c (md_assemble): Support 32bit address prefix. - (i386_displacement): Likewise. - (i386_index_check): Accept 32bit addressing in 64bit mode. - 2002-02-15 Hans-Peter Nilsson <hp@bitrange.com> * NEWS: Mention support for MMIX. @@ -337,6 +1531,20 @@ Fri Feb 15 15:18:51 CET 2002 Jan Hubicka <jh@suse.cz> * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust pc-relative relocations to merge sections in 64-bit mode. +2002-02-13 Ben Elliston <bje@redhat.com> + + * NEWS: Document floating point number handling in gasp. + * gasp.c: Include <assert.h> and "xregex.h". + (is_flonum): New function. + (chew_flownum): Likewise. + (change_base): Consume flonums from the input, where possible. + * doc/gasp.texi (Constants): Document floating point numbers. + +2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types + that implicitly use LR and RR selectors. + 2002-02-12 Alexandre Oliva <aoliva@redhat.com> * config/tc-mn10300.c (other_registers): Added `epsw'. Mark `pc' @@ -349,15 +1557,30 @@ Fri Feb 15 15:18:51 CET 2002 Jan Hubicka <jh@suse.cz> * config/tc-ppc.c (md_apply_fix3): Check for insert fop invalid for xcoff64. -2002-02-11 Alexandre Oliva <aoliva@redhat.com> +2002-06-11 Alexandre Oliva <aoliva@redhat.com> * config/tc-sparc.c (U0x80000000, U0xffffffff): New constants. Use all over. +2002-02-11 Jan Hubicka <jh@suse.cz> + + * i386.c (md_assemble): Support 32bit address prefix. + (i386_displacement): Likewise. + (i386_index_check): Accept 32bit addressing in 64bit mode. + 2002-02-11 Alexandre Oliva <aoliva@redhat.com> * config/tc-sh.c (dot): Removed unused function. +2002-02-11 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: "make dep-am". + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + * doc/Makefile.in: Regenerate. + 2002-02-10 Richard Henderson <rth@redhat.com> * doc/c-alpha.texi: New file. diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am index 60e0c2c..e8d060f 100644 --- a/contrib/binutils/gas/Makefile.am +++ b/contrib/binutils/gas/Makefile.am @@ -45,7 +45,9 @@ CPU_TYPES = \ cris \ d10v \ d30v \ + dlx \ fr30 \ + frv \ h8300 \ h8500 \ hppa \ @@ -71,6 +73,7 @@ CPU_TYPES = \ ppc \ s390 \ sh \ + sh64 \ sparc \ tahoe \ tic30 \ @@ -79,7 +82,6 @@ CPU_TYPES = \ vax \ w65 \ v850 \ - sh64 \ xstormy16 \ z8k @@ -233,7 +235,9 @@ TARGET_CPU_CFILES = \ config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ + config/tc-dlx.c \ config/tc-fr30.c \ + config/tc-frv.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ @@ -280,7 +284,9 @@ TARGET_CPU_HFILES = \ config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ + config/tc-dlx.h \ config/tc-fr30.h \ + config/tc-frv.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ @@ -437,7 +443,9 @@ po/POTFILES.in: @MAINT@ Makefile for file in $(POTFILES); do echo $$file; done | sort > tmp \ && mv tmp $(srcdir)/po/POTFILES.in -noinst_PROGRAMS = as-new gasp-new +# Note: GASP is now deprecated and will be removed at some point in the future. +# Anything that GASP could do can now be done by GAS. +noinst_PROGRAMS = as-new noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit @@ -492,7 +500,8 @@ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + $(INCDIR)/progress.h $(INCDIR)/fopen-same.h \ $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h @@ -633,7 +642,7 @@ itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y # stand-alone itbl assembler & disassembler -EXTRA_PROGRAMS = itbl-test +EXTRA_PROGRAMS = gasp-new itbl-test itbl_test_SOURCES = itbl-parse.y itbl-lex.l itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@ @@ -666,21 +675,21 @@ CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR install-exec-local: install-exec-bindir @install_tooldir@ install-exec-bindir: $(noinst_PROGRAMS) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @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 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS) - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin n=`echo as | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/as$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ else \ true ; \ fi @@ -1041,6 +1050,14 @@ DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/d30v.h +DEPTC_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \ + $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/dlx.h +DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \ + $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/tc-dlx.h $(INCDIR)/opcode/dlx.h DEPTC_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ @@ -1053,6 +1070,19 @@ DEPTC_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ $(srcdir)/../opcodes/fr30-opc.h cgen.h +DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \ + cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/frv.h \ + $(INCDIR)/elf/reloc-macros.h +DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \ + cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1198,7 +1228,7 @@ DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ DEPTC_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h @@ -1206,7 +1236,7 @@ DEPTC_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h @@ -1214,14 +1244,14 @@ DEPTC_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \ $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/mips.h itbl-ops.h \ - $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h + dwarf2dbg.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h DEPTC_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(INCDIR)/elf/mips.h \ $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h DEPTC_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ @@ -1333,6 +1363,13 @@ DEPTC_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ $(INCDIR)/safe-ctype.h struc-symbol.h $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ + $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ + $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h DEPTC_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ @@ -1392,21 +1429,24 @@ DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h DEPTC_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \ - $(INCDIR)/safe-ctype.h + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \ + $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h DEPTC_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \ + $(INCDIR)/safe-ctype.h DEPTC_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \ + $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h \ $(INCDIR)/safe-ctype.h DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \ + $(INCDIR)/safe-ctype.h DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1426,13 +1466,6 @@ DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ dwarf2dbg.h -DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ - $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ - $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ @@ -1471,7 +1504,7 @@ DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1484,7 +1517,7 @@ DEPOBJ_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h DEPOBJ_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \ @@ -1509,7 +1542,7 @@ DEPOBJ_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1518,7 +1551,7 @@ DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1526,7 +1559,7 @@ DEPOBJ_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1535,7 +1568,7 @@ DEPOBJ_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1544,7 +1577,16 @@ DEPOBJ_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h +DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-dlx.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h +DEPOBJ_dlx_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1553,7 +1595,16 @@ DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h +DEPOBJ_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h +DEPOBJ_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1562,7 +1613,7 @@ DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1571,7 +1622,7 @@ DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1581,16 +1632,18 @@ DEPOBJ_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \ + $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h DEPOBJ_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1599,7 +1652,7 @@ DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h DEPOBJ_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1611,12 +1664,12 @@ DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \ $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h DEPOBJ_i960_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ @@ -1627,7 +1680,7 @@ DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1636,7 +1689,7 @@ DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1645,7 +1698,7 @@ DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1657,7 +1710,7 @@ DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ @@ -1670,7 +1723,7 @@ DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1679,7 +1732,7 @@ DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1695,13 +1748,13 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1710,7 +1763,7 @@ DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1719,7 +1772,7 @@ DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1731,7 +1784,7 @@ DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1740,7 +1793,7 @@ DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ @@ -1749,7 +1802,7 @@ DEPOBJ_or32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1761,7 +1814,7 @@ DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1770,7 +1823,7 @@ DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ @@ -1779,7 +1832,8 @@ DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/aout/aout64.h DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1788,7 +1842,7 @@ DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1797,7 +1851,18 @@ DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h +DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1809,7 +1874,7 @@ DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1821,7 +1886,7 @@ DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1833,7 +1898,7 @@ DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \ @@ -1842,7 +1907,7 @@ DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1851,7 +1916,7 @@ DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h @@ -1863,7 +1928,7 @@ DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h subsegs.h \ @@ -1876,27 +1941,16 @@ DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ - subsegs.h + $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h DEPOBJ_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h -DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ @@ -1905,7 +1959,7 @@ DEPOBJ_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -1914,7 +1968,7 @@ DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def @@ -1977,12 +2031,24 @@ DEP_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ DEP_d30v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h +DEP_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +DEP_dlx_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h DEP_fr30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h +DEP_frv_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-frv.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +DEP_frv_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h DEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h \ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -2004,10 +2070,13 @@ DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \ $(INCDIR)/elf/reloc-macros.h DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + $(INCDIR)/opcode/ia64.h $(INCDIR)/symcat.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2143,6 +2212,14 @@ DEP_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ DEP_sh_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h +DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ + $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h DEP_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h DEP_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ @@ -2196,19 +2273,12 @@ DEP_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/symcat.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h -DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h -DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -2270,7 +2340,7 @@ symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \ output-file.h dwarf2dbg.h gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \ - sb.h macro.h + sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \ emul-target.h diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in index 5c2f439..c411820 100644 --- a/contrib/binutils/gas/Makefile.in +++ b/contrib/binutils/gas/Makefile.in @@ -156,7 +156,9 @@ CPU_TYPES = \ cris \ d10v \ d30v \ + dlx \ fr30 \ + frv \ h8300 \ h8500 \ hppa \ @@ -182,6 +184,7 @@ CPU_TYPES = \ ppc \ s390 \ sh \ + sh64 \ sparc \ tahoe \ tic30 \ @@ -190,7 +193,6 @@ CPU_TYPES = \ vax \ w65 \ v850 \ - sh64 \ xstormy16 \ z8k @@ -350,7 +352,9 @@ TARGET_CPU_CFILES = \ config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ + config/tc-dlx.c \ config/tc-fr30.c \ + config/tc-frv.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ @@ -398,7 +402,9 @@ TARGET_CPU_HFILES = \ config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ + config/tc-dlx.h \ config/tc-fr30.h \ + config/tc-frv.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ @@ -560,7 +566,9 @@ POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \ $(HFILES) $(CFILES) $(GAS_CFILES) -noinst_PROGRAMS = as-new gasp-new +# Note: GASP is now deprecated and will be removed at some point in the future. +# Anything that GASP could do can now be done by GAS. +noinst_PROGRAMS = as-new noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit @@ -628,7 +636,7 @@ EXTRA_as_new_SOURCES = config/m68k-parse.y # stand-alone itbl assembler & disassembler -EXTRA_PROGRAMS = itbl-test +EXTRA_PROGRAMS = gasp-new itbl-test itbl_test_SOURCES = itbl-parse.y itbl-lex.l itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@ @@ -766,6 +774,16 @@ DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/d30v.h +DEPTC_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \ + $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/dlx.h + +DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \ + $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/tc-dlx.h $(INCDIR)/opcode/dlx.h + DEPTC_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \ @@ -780,6 +798,21 @@ DEPTC_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ $(srcdir)/../opcodes/fr30-opc.h cgen.h +DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \ + cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/frv.h \ + $(INCDIR)/elf/reloc-macros.h + +DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \ + cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h + DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ @@ -954,7 +987,7 @@ DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ DEPTC_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h @@ -963,7 +996,7 @@ DEPTC_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h @@ -972,15 +1005,15 @@ DEPTC_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \ $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/mips.h itbl-ops.h \ - $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h + dwarf2dbg.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h DEPTC_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(INCDIR)/elf/mips.h \ $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \ $(INCDIR)/coff/ecoff.h @@ -1116,6 +1149,14 @@ DEPTC_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/safe-ctype.h struc-symbol.h $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ + $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ + $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h + DEPTC_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ @@ -1188,24 +1229,27 @@ DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ DEPTC_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \ - $(INCDIR)/safe-ctype.h + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \ + $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h DEPTC_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \ + $(INCDIR)/safe-ctype.h DEPTC_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \ + $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h \ $(INCDIR)/safe-ctype.h DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \ + $(INCDIR)/safe-ctype.h DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ @@ -1230,14 +1274,6 @@ DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ dwarf2dbg.h -DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \ - $(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \ - $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h - DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ @@ -1285,7 +1321,7 @@ DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ @@ -1301,7 +1337,7 @@ DEPOBJ_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h @@ -1332,7 +1368,7 @@ DEPOBJ_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ @@ -1343,7 +1379,7 @@ DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1353,7 +1389,7 @@ DEPOBJ_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ @@ -1364,7 +1400,7 @@ DEPOBJ_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ @@ -1375,7 +1411,18 @@ DEPOBJ_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h + +DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-dlx.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h + +DEPOBJ_dlx_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ @@ -1386,7 +1433,18 @@ DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h + +DEPOBJ_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h + +DEPOBJ_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ @@ -1397,7 +1455,7 @@ DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ @@ -1408,7 +1466,7 @@ DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ @@ -1420,18 +1478,20 @@ DEPOBJ_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \ + $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \ + $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h DEPOBJ_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ @@ -1442,7 +1502,7 @@ DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h DEPOBJ_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1457,13 +1517,13 @@ DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \ $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h @@ -1477,7 +1537,7 @@ DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ @@ -1488,7 +1548,7 @@ DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \ @@ -1499,7 +1559,7 @@ DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1514,7 +1574,7 @@ DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ @@ -1530,7 +1590,7 @@ DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ @@ -1541,7 +1601,7 @@ DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1561,14 +1621,14 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ @@ -1579,7 +1639,7 @@ DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ @@ -1590,7 +1650,7 @@ DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1605,7 +1665,7 @@ DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \ @@ -1616,7 +1676,7 @@ DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \ @@ -1627,7 +1687,7 @@ DEPOBJ_or32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1642,7 +1702,7 @@ DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ @@ -1653,7 +1713,7 @@ DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ @@ -1664,7 +1724,8 @@ DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/aout/aout64.h DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \ @@ -1675,7 +1736,7 @@ DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ @@ -1686,7 +1747,20 @@ DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h + +DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1701,7 +1775,7 @@ DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1716,7 +1790,7 @@ DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1731,7 +1805,7 @@ DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \ @@ -1742,7 +1816,7 @@ DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ @@ -1753,7 +1827,7 @@ DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ @@ -1768,7 +1842,7 @@ DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ @@ -1784,31 +1858,18 @@ DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ - subsegs.h + $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h DEPOBJ_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h - -DEPOBJ_sh64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h - -DEPOBJ_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \ @@ -1819,7 +1880,7 @@ DEPOBJ_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \ $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ @@ -1830,7 +1891,7 @@ DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/aout/aout64.h + struc-symbol.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ @@ -1916,6 +1977,14 @@ DEP_d30v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h +DEP_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h + +DEP_dlx_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h + DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -1924,6 +1993,14 @@ DEP_fr30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h +DEP_frv_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-frv.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h + +DEP_frv_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h + DEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h \ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -1951,11 +2028,14 @@ DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(INCDIR)/elf/reloc-macros.h DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + $(INCDIR)/opcode/ia64.h $(INCDIR)/symcat.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ @@ -2139,6 +2219,16 @@ DEP_sh_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h +DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ + $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ + $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h + DEP_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h @@ -2211,22 +2301,13 @@ DEP_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ - $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/symcat.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h - -DEP_sh64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h - -DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \ @@ -2257,7 +2338,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = ${GDBINIT} -noinst_PROGRAMS = as-new$(EXEEXT) gasp-new$(EXEEXT) +noinst_PROGRAMS = as-new$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) @@ -2265,6 +2346,9 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \ +hash.$(OBJEXT) +gasp_new_LDFLAGS = itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT) itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o \ ../libiberty/libiberty.a @@ -2279,9 +2363,6 @@ macro.$(OBJEXT) messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \ sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \ write.$(OBJEXT) as_new_LDFLAGS = -gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \ -hash.$(OBJEXT) -gasp_new_LDFLAGS = SCRIPTS = $(noinst_SCRIPTS) LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ @@ -2301,8 +2382,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best -SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES) -OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS) +SOURCES = $(gasp_new_SOURCES) $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) +OBJECTS = $(gasp_new_OBJECTS) $(itbl_test_OBJECTS) $(as_new_OBJECTS) all: all-redirect .SUFFIXES: @@ -2405,6 +2486,10 @@ distclean-libtool: maintainer-clean-libtool: +gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES) + @rm -f gasp-new$(EXEEXT) + $(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS) + itbl-test$(EXEEXT): $(itbl_test_OBJECTS) $(itbl_test_DEPENDENCIES) @rm -f itbl-test$(EXEEXT) $(LINK) $(itbl_test_LDFLAGS) $(itbl_test_OBJECTS) $(itbl_test_LDADD) $(LIBS) @@ -2412,10 +2497,6 @@ itbl-test$(EXEEXT): $(itbl_test_OBJECTS) $(itbl_test_DEPENDENCIES) as-new$(EXEEXT): $(as_new_OBJECTS) $(as_new_DEPENDENCIES) @rm -f as-new$(EXEEXT) $(LINK) $(as_new_LDFLAGS) $(as_new_OBJECTS) $(as_new_LDADD) $(LIBS) - -gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES) - @rm -f gasp-new$(EXEEXT) - $(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS) .l.c: $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ .y.c: @@ -2704,7 +2785,8 @@ $(OBJS): @ALL_OBJ_DEPS@ # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ + $(INCDIR)/progress.h $(INCDIR)/fopen-same.h \ $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h @@ -2843,21 +2925,21 @@ cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \ install-exec-local: install-exec-bindir @install_tooldir@ install-exec-bindir: $(noinst_PROGRAMS) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @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 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS) - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin n=`echo as | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/as$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ else \ true ; \ fi @@ -3159,7 +3241,7 @@ symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \ write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \ output-file.h dwarf2dbg.h gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \ - sb.h macro.h + sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \ emul-target.h diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS index b689527..18482a9 100644 --- a/contrib/binutils/gas/NEWS +++ b/contrib/binutils/gas/NEWS @@ -1,5 +1,19 @@ -*- text -*- +Changes in 2.13: + +Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400 and +FR500 included. + +Support for DLX processor added. + +GASP has now been deprecated and will be removed in a future release. Use the +macro facilities in GAS instead. + +GASP now correctly parses floating point numbers. Unless the base is explicitly +specified, they are interpreted as decimal numbers regardless of the currently +specified base. + Changes in 2.12: Support for Don Knuth's MMIX, by Hans-Peter Nilsson. diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4 index 42b344a..c936be4 100644 --- a/contrib/binutils/gas/aclocal.m4 +++ b/contrib/binutils/gas/aclocal.m4 @@ -203,7 +203,7 @@ dnl AM_PROG_LEX dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT AC_DEFUN([AM_PROG_LEX], [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) -AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") +AC_CHECK_PROGS(LEX, flex lex, $missing_dir/missing flex) AC_PROG_LEX AC_DECL_YYTEXT]) diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c index ba587d4..f9c5c7d 100644 --- a/contrib/binutils/gas/app.c +++ b/contrib/binutils/gas/app.c @@ -40,13 +40,13 @@ flag_m68k_mri, because the two flags will be affected by the .mri pseudo-op at different times. */ static int scrub_m68k_mri; -#else -#define scrub_m68k_mri 0 -#endif /* The pseudo-op which switches in and out of MRI mode. See the comment in do_scrub_chars. */ static const char mri_pseudo[] = ".mri 0"; +#else +#define scrub_m68k_mri 0 +#endif #if defined TC_ARM && defined OBJ_ELF /* The pseudo-op for which we need to special-case `@' characters. @@ -424,13 +424,13 @@ do_scrub_chars (get, tostart, tolen) I don't want to make such a significant change to the assembler's memory usage. */ -#define PUT(pch) \ - do \ - { \ - *to++ = (pch); \ - if (to >= toend) \ - goto tofull; \ - } \ +#define PUT(pch) \ + do \ + { \ + *to++ = (pch); \ + if (to >= toend) \ + goto tofull; \ + } \ while (0) if (saved_input != NULL) diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c index 1a46207..346ecc8 100644 --- a/contrib/binutils/gas/as.c +++ b/contrib/binutils/gas/as.c @@ -350,7 +350,7 @@ parse_args (pargc, pargv) as if it were the argument of an option with character code 1. */ char *shortopts; - extern CONST char *md_shortopts; + extern const char *md_shortopts; static const char std_shortopts[] = { '-', 'J', #ifndef WORKING_DOT_WORD @@ -500,8 +500,8 @@ parse_args (pargc, pargv) break; case OPTION_TARGET_HELP: - md_show_usage (stdout); - exit (EXIT_SUCCESS); + md_show_usage (stdout); + exit (EXIT_SUCCESS); case OPTION_HELP: show_usage (stdout); @@ -797,13 +797,7 @@ main (argc, argv) textdomain (PACKAGE); if (debug_memory) - { -#ifdef BFD_ASSEMBLER - extern long _bfd_chunksize; - _bfd_chunksize = 64; -#endif - chunksize = 64; - } + chunksize = 64; #ifdef HOST_SPECIAL_INIT HOST_SPECIAL_INIT (argc, argv); diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h index ed82574..ff434cb 100644 --- a/contrib/binutils/gas/as.h +++ b/contrib/binutils/gas/as.h @@ -1,6 +1,6 @@ /* as.h - global header file Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001 + 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -91,7 +91,7 @@ extern void *alloca (); #include <sys/types.h> #endif -#include <getopt.h> +#include "getopt.h" /* The first getopt value for machine-independent long options. 150 isn't special; it's just an arbitrary non-ASCII char value. */ #define OPTION_STD_BASE 150 @@ -168,7 +168,7 @@ extern char **environ; /* Hack to make "gcc -Wall" not complain about obstack macros. */ #if !defined (memcpy) && !defined (bcopy) -#define bcopy(src,dest,size) memcpy(dest,src,size) +#define bcopy(src,dest,size) memcpy (dest, src, size) #endif /* Make Saber happier on obstack.h. */ diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c index 75138a45..67b9b16 100644 --- a/contrib/binutils/gas/cgen.c +++ b/contrib/binutils/gas/cgen.c @@ -105,8 +105,8 @@ queue_fixup (opindex, opinfo, expP) to keep track of how many fixup chains have been stored and which elements of the array they are in. - The algorithms used are the same as in the old scheme. Other than the - "array-ness" of the whole thing, the functionality is identical to the + The algorithms used are the same as in the old scheme. Other than the + "array-ness" of the whole thing, the functionality is identical to the old scheme. gas_cgen_initialize_saved_fixups_array(): @@ -173,7 +173,7 @@ gas_cgen_restore_fixups (i) } num_fixups = stored_fixups[i].num_fixups_in_chain; - memcpy (fixups,stored_fixups[i].fixup_chain, + memcpy (fixups, stored_fixups[i].fixup_chain, (sizeof (stored_fixups[i].fixup_chain[0])) * num_fixups); stored_fixups[i].num_fixups_in_chain = 0; } diff --git a/contrib/binutils/gas/cgen.h b/contrib/binutils/gas/cgen.h index 97cd38d..9d814b7 100644 --- a/contrib/binutils/gas/cgen.h +++ b/contrib/binutils/gas/cgen.h @@ -53,7 +53,7 @@ extern const char * gas_cgen_parse_operand /* Call this from md_assemble to initialize the assembler callback. */ extern void gas_cgen_init_parse PARAMS ((void)); -/* Routines and macros for saving fixup chains. */ +/* Routines and macros for saving fixup chains. */ extern void gas_cgen_save_fixups PARAMS ((int)); extern void gas_cgen_restore_fixups PARAMS ((int)); extern void gas_cgen_swap_fixups PARAMS ((int)); diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in index 621bb74..8b8c8b2 100644 --- a/contrib/binutils/gas/config.in +++ b/contrib/binutils/gas/config.in @@ -130,9 +130,6 @@ /* 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 @@ -163,9 +160,6 @@ /* Define as 1 if big endian. */ #undef TARGET_BYTES_BIG_ENDIAN -/* Use ELF stabs for MIPS, not ECOFF stabs */ -#undef MIPS_STABS_ELF - /* Default architecture. */ #undef DEFAULT_ARCH diff --git a/contrib/binutils/gas/config/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h index 82d744b..0942fd3 100644 --- a/contrib/binutils/gas/config/aout_gnu.h +++ b/contrib/binutils/gas/config/aout_gnu.h @@ -119,6 +119,7 @@ enum machine_type M_386 = 100, M_29K = 101, M_RS6000 = 102, /* IBM RS/6000 */ + M_VAX4K_NETBSD = 150, /* HP/BSD formats */ M_HP200 = 200, /* hp200 (68010) BSD binary */ M_HP300 = 300, /* hp300 (68020+68881) BSD binary */ diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c index ce6afbb..0ad39c9 100644 --- a/contrib/binutils/gas/config/atof-ieee.c +++ b/contrib/binutils/gas/config/atof-ieee.c @@ -19,13 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Some float formats are based on the IEEE standard, but use the - largest exponent for normal numbers instead of NaNs and infinites. - The macro TC_LARGEST_EXPONENT_IS_NORMAL should evaluate to true - if the target machine uses such a format. The macro can depend on - command line flags if necessary. There is no need to define the - macro if it would always be 0. */ - #include "as.h" /* Flonums returned here. */ @@ -48,7 +41,7 @@ extern const char EXP_CHARS[]; #define GUARD (2) #ifndef TC_LARGEST_EXPONENT_IS_NORMAL -#define TC_LARGEST_EXPONENT_IS_NORMAL 0 +#define TC_LARGEST_EXPONENT_IS_NORMAL(PRECISION) 0 #endif static const unsigned long mask[] = @@ -302,7 +295,7 @@ gen_to_words (words, precision, exponent_bits) /* NaN: Do the right thing. */ if (generic_floating_point_number.sign == 0) { - if (TC_LARGEST_EXPONENT_IS_NORMAL) + if (TC_LARGEST_EXPONENT_IS_NORMAL (precision)) as_warn ("NaNs are not supported by this target\n"); if (precision == F_PRECISION) { @@ -341,7 +334,7 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'P') { - if (TC_LARGEST_EXPONENT_IS_NORMAL) + if (TC_LARGEST_EXPONENT_IS_NORMAL (precision)) as_warn ("Infinities are not supported by this target\n"); /* +INF: Do the right thing. */ @@ -382,7 +375,7 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'N') { - if (TC_LARGEST_EXPONENT_IS_NORMAL) + if (TC_LARGEST_EXPONENT_IS_NORMAL (precision)) as_warn ("Infinities are not supported by this target\n"); /* Negative INF. */ @@ -598,7 +591,7 @@ gen_to_words (words, precision, exponent_bits) return return_value; } else if ((unsigned long) exponent_4 > mask[exponent_bits] - || (! TC_LARGEST_EXPONENT_IS_NORMAL + || (! TC_LARGEST_EXPONENT_IS_NORMAL (precision) && (unsigned long) exponent_4 == mask[exponent_bits])) { /* Exponent overflow. Lose immediately. */ diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c index 9eb4bdd..eb592aa 100644 --- a/contrib/binutils/gas/config/obj-coff.c +++ b/contrib/binutils/gas/config/obj-coff.c @@ -271,7 +271,7 @@ fetch_coff_debug_section () static segT debug_section; if (!debug_section) { - CONST asymbol *s; + const asymbol *s; s = bfd_make_debug_symbol (stdoutput, (char *) 0, 0); assert (s != 0); debug_section = s->section; @@ -568,7 +568,7 @@ obj_coff_loc (ignore) if (listing) { - lineno += coff_line_base - 1; + lineno += coff_line_base - 1; listing_source_line (lineno); } } @@ -711,12 +711,12 @@ obj_coff_endef (ignore) /* intentional fallthrough */ case C_FCN: { - CONST char *name; + const char *name; S_SET_SEGMENT (def_symbol_in_progress, text_section); name = S_GET_NAME (def_symbol_in_progress); if (name[0] == '.' && name[2] == 'f' && name[3] == '\0') - { + { switch (name[1]) { case 'b': @@ -842,16 +842,16 @@ obj_coff_endef (ignore) || S_GET_SEGMENT (def_symbol_in_progress) == absolute_section || ! symbol_constant_p (def_symbol_in_progress) || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress), - DO_NOT_STRIP)) == NULL + DO_NOT_STRIP)) == NULL || SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP)) { /* If it already is at the end of the symbol list, do nothing */ if (def_symbol_in_progress != symbol_lastP) - { + { symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP); symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP, &symbol_lastP); - } + } } else { @@ -1397,23 +1397,24 @@ coff_frob_file_after_relocs () bfd_map_over_sections (stdoutput, coff_adjust_section_syms, (char*) 0); } -/* - * implement the .section pseudo op: - * .section name {, "flags"} - * ^ ^ - * | +--- optional flags: 'b' for bss - * | 'i' for info - * +-- section name 'l' for lib - * 'n' for noload - * 'o' for over - * 'w' for data - * 'd' (apparently m88k for data) - * 'x' for text - * 'r' for read-only data - * 's' for shared data (PE) - * But if the argument is not a quoted string, treat it as a - * subsegment number. - */ +/* Implement the .section pseudo op: + .section name {, "flags"} + ^ ^ + | +--- optional flags: 'b' for bss + | 'i' for info + +-- section name 'l' for lib + 'n' for noload + 'o' for over + 'w' for data + 'd' (apparently m88k for data) + 'x' for text + 'r' for read-only data + 's' for shared data (PE) + But if the argument is not a quoted string, treat it as a + subsegment number. + + Note the 'a' flag is silently ignored. This allows the same + .section directive to be parsed in both ELF and COFF formats. */ void obj_coff_section (ignore) @@ -1466,6 +1467,7 @@ obj_coff_section (ignore) case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break; case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */ case 'w': flags &=~ SEC_READONLY; break; + case 'a': break; /* For compatability with ELF. */ case 'x': flags |= SEC_CODE | SEC_LOAD; break; case 'r': flags |= SEC_READONLY; break; case 's': flags |= SEC_SHARED; break; @@ -1504,13 +1506,13 @@ obj_coff_section (ignore) sections so adjust_reloc_syms in write.c will correctly handle relocs which refer to non-local symbols in these sections. */ if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0) - flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; #endif if (! bfd_set_section_flags (stdoutput, sec, flags)) - as_warn (_("error setting flags for \"%s\": %s"), - bfd_section_name (stdoutput, sec), - bfd_errmsg (bfd_get_error ())); + as_warn (_("error setting flags for \"%s\": %s"), + bfd_section_name (stdoutput, sec), + bfd_errmsg (bfd_get_error ())); } else if (flags != SEC_NO_FLAGS) { @@ -1564,7 +1566,7 @@ coff_frob_section (sec) fragp = seg_info (sec)->frchainP->frch_root; last = seg_info (sec)->frchainP->frch_last; while (fragp->fr_next != last) - fragp = fragp->fr_next; + fragp = fragp->fr_next; last->fr_address = size; fragp->fr_offset += new_size - size; } @@ -3420,6 +3422,19 @@ remove_subsegs () unsigned long machine; int coff_flags; +#ifndef SUB_SEGMENT_ALIGN +#ifdef HANDLE_ALIGN +/* The last subsegment gets an aligment corresponding to the alignment + of the section. This allows proper nop-filling at the end of + code-bearing sections. */ +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ + (!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \ + ? get_recorded_alignment (SEG) : 0) +#else +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 1 +#endif +#endif + extern void write_object_file () { @@ -3443,28 +3458,27 @@ write_object_file () string_byte_count = 4; + /* Run through all the sub-segments and align them up. Also + close any open frags. We tack a .fill onto the end of the + frag chain so that any .align's size can be worked by looking + at the next frag. */ for (frchain_ptr = frchain_root; frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) { - /* Run through all the sub-segments and align them up. Also - close any open frags. We tack a .fill onto the end of the - frag chain so that any .align's size can be worked by looking - at the next frag. */ + int alignment; subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg); -#ifndef SUB_SEGMENT_ALIGN -#define SUB_SEGMENT_ALIGN(SEG) 1 -#endif + alignment = SUB_SEGMENT_ALIGN (now_seg, frchain_ptr); + #ifdef md_do_align - md_do_align (SUB_SEGMENT_ALIGN (now_seg), (char *) NULL, 0, 0, - alignment_done); + md_do_align (alignment, (char *) NULL, 0, 0, alignment_done); #endif if (subseg_text_p (now_seg)) - frag_align_code (SUB_SEGMENT_ALIGN (now_seg), 0); + frag_align_code (alignment, 0); else - frag_align (SUB_SEGMENT_ALIGN (now_seg), 0, 0); + frag_align (alignment, 0, 0); #ifdef md_do_align alignment_done: diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h index 8d2ae73..56389c9 100644 --- a/contrib/binutils/gas/config/obj-coff.h +++ b/contrib/binutils/gas/config/obj-coff.h @@ -294,9 +294,9 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); #define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v)) /* Internal use only definitions. SF_ stands for symbol flags. - + These values can be assigned to sy_symbol.ost_flags field of a symbolS. - + You'll break i960 if you shift the SYSPROC bits anywhere else. for more on the balname/callname hack, see tc-i960.h. b.out is done differently. */ @@ -582,9 +582,9 @@ typedef struct #define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v)) /* Internal use only definitions. SF_ stands for symbol flags. - + These values can be assigned to sy_symbol.ost_flags field of a symbolS. - + You'll break i960 if you shift the SYSPROC bits anywhere else. for more on the balname/callname hack, see tc-i960.h. b.out is done differently. */ diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c index 0597eb7..2266952 100644 --- a/contrib/binutils/gas/config/obj-elf.c +++ b/contrib/binutils/gas/config/obj-elf.c @@ -1,6 +1,6 @@ /* ELF object file format - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -24,6 +24,7 @@ #include "safe-ctype.h" #include "subsegs.h" #include "obstack.h" +#include "struc-symbol.h" #ifndef ECOFF_DEBUGGING #define ECOFF_DEBUGGING 0 @@ -61,6 +62,7 @@ static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR)); static void build_group_lists PARAMS ((bfd *, asection *, PTR)); static int elf_separate_stab_sections PARAMS ((void)); static void elf_init_stab_section PARAMS ((segT)); +static symbolS *elf_common PARAMS ((int)); #ifdef NEED_ECOFF_DEBUG static boolean elf_get_extr PARAMS ((asymbol *, EXTR *)); @@ -76,7 +78,7 @@ static void obj_elf_weak PARAMS ((int)); static void obj_elf_local PARAMS ((int)); static void obj_elf_visibility PARAMS ((int)); static void obj_elf_change_section - PARAMS ((const char *, int, int, int, const char *, int)); + PARAMS ((const char *, int, int, int, const char *, int, int)); static int obj_elf_parse_section_letters PARAMS ((char *, size_t)); static int obj_elf_section_word PARAMS ((char *, size_t)); static char *obj_elf_section_name PARAMS ((void)); @@ -84,6 +86,7 @@ static int obj_elf_section_type PARAMS ((char *, size_t)); static void obj_elf_symver PARAMS ((int)); static void obj_elf_subsection PARAMS ((int)); static void obj_elf_popsection PARAMS ((int)); +static void obj_elf_tls_common PARAMS ((int)); static const pseudo_typeS elf_pseudo_table[] = { @@ -130,6 +133,8 @@ static const pseudo_typeS elf_pseudo_table[] = {"data", obj_elf_data, 0}, {"text", obj_elf_text, 0}, + {"tls_common", obj_elf_tls_common, 0}, + /* End sentinel. */ {NULL, NULL, 0}, }; @@ -280,8 +285,8 @@ elf_file_symbol (s) #endif } -void -obj_elf_common (is_common) +static symbolS * +elf_common (is_common) int is_common; { char *name; @@ -294,7 +299,7 @@ obj_elf_common (is_common) if (flag_mri && is_common) { s_mri_common (0); - return; + return NULL; } name = input_line_pointer; @@ -307,14 +312,14 @@ obj_elf_common (is_common) { as_bad (_("expected comma after symbol-name")); ignore_rest_of_line (); - return; + return NULL; } input_line_pointer++; /* skip ',' */ if ((temp = get_absolute_expression ()) < 0) { as_bad (_(".COMMon length (%d.) <0! Ignored."), temp); ignore_rest_of_line (); - return; + return NULL; } size = temp; *p = 0; @@ -324,7 +329,7 @@ obj_elf_common (is_common) { as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP)); ignore_rest_of_line (); - return; + return NULL; } if (S_GET_VALUE (symbolP) != 0) { @@ -374,7 +379,7 @@ obj_elf_common (is_common) { as_bad (_("common alignment not a power of 2")); ignore_rest_of_line (); - return; + return NULL; } } else @@ -426,7 +431,7 @@ obj_elf_common (is_common) symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT; demand_empty_rest_of_line (); - return; + return symbolP; { bad_common_segment: @@ -439,10 +444,27 @@ obj_elf_common (is_common) *p = c; input_line_pointer = p; ignore_rest_of_line (); - return; + return NULL; } } +void +obj_elf_common (is_common) + int is_common; +{ + elf_common (is_common); +} + +static void +obj_elf_tls_common (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + symbolS *symbolP = elf_common (0); + + if (symbolP) + symbol_get_bfdsym (symbolP)->flags |= BSF_THREAD_LOCAL; +} + static void obj_elf_local (ignore) int ignore ATTRIBUTE_UNUSED; @@ -594,6 +616,8 @@ static struct special_section const special_sections[] = { ".note", SHT_NOTE, 0 }, { ".rodata", SHT_PROGBITS, SHF_ALLOC }, { ".rodata1", SHT_PROGBITS, SHF_ALLOC }, + { ".tbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, + { ".tdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, { ".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, #if 0 /* FIXME: The current gcc, as of 2002-03-03, will emit @@ -608,13 +632,13 @@ static struct special_section const special_sections[] = .section .init_array */ - { ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, + { ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, { ".fini_array",SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, - { ".preinit_array",SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE }, + { ".preinit_array",SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE }, #else - { ".init_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { ".init_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, { ".fini_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, - { ".preinit_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { ".preinit_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, #endif #ifdef ELF_TC_SPECIAL_SECTIONS @@ -641,12 +665,13 @@ static struct special_section const special_sections[] = }; static void -obj_elf_change_section (name, type, attr, entsize, group_name, push) +obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push) const char *name; int type; int attr; int entsize; const char *group_name; + int linkonce; int push; { asection *old_sec; @@ -717,7 +742,8 @@ obj_elf_change_section (name, type, attr, entsize, group_name, push) | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0) | ((attr & SHF_MERGE) ? SEC_MERGE : 0) - | ((attr & SHF_STRINGS) ? SEC_STRINGS : 0)); + | ((attr & SHF_STRINGS) ? SEC_STRINGS : 0) + | ((attr & SHF_TLS) ? SEC_THREAD_LOCAL : 0)); #ifdef md_elf_section_flags flags = md_elf_section_flags (flags, attr, type); #endif @@ -734,6 +760,7 @@ obj_elf_change_section (name, type, attr, entsize, group_name, push) if (flags & SEC_MERGE) sec->entsize = entsize; elf_group_name (sec) = group_name; + elf_linkonce_p (sec) = linkonce; /* Add a symbol for this section to the symbol table. */ secsym = symbol_find (name); @@ -747,14 +774,16 @@ obj_elf_change_section (name, type, attr, entsize, group_name, push) /* If section attributes are specified the second time we see a particular section, then check that they are the same as we saw the first time. */ - if ((old_sec->flags ^ flags) - & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE - | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS)) + if (((old_sec->flags ^ flags) + & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS + | SEC_THREAD_LOCAL)) + || linkonce != elf_linkonce_p (sec)) as_warn (_("ignoring changed section attributes for %s"), name); - else if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize) + if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize) as_warn (_("ignoring changed section entity size for %s"), name); - else if ((attr & SHF_GROUP) != 0 - && strcmp (elf_group_name (old_sec), group_name) != 0) + if ((attr & SHF_GROUP) != 0 + && strcmp (elf_group_name (old_sec), group_name) != 0) as_warn (_("ignoring new section group for %s"), name); } @@ -792,6 +821,9 @@ obj_elf_parse_section_letters (str, len) case 'G': attr |= SHF_GROUP; break; + case 'T': + attr |= SHF_TLS; + break; /* Compatibility. */ case 'm': if (*(str - 1) == 'a') @@ -806,7 +838,7 @@ obj_elf_parse_section_letters (str, len) } default: { - char *bad_msg = _("unrecognized .section attribute: want a,w,x,M,S,G"); + char *bad_msg = _("unrecognized .section attribute: want a,w,x,M,S,G,T"); #ifdef md_elf_section_letter int md_attr = md_elf_section_letter (*str, &bad_msg); if (md_attr >= 0) @@ -919,6 +951,7 @@ obj_elf_section (push) char *name, *group_name, *beg; int type, attr, dummy; int entsize; + int linkonce; #ifndef TC_I370 if (flag_mri) @@ -949,6 +982,7 @@ obj_elf_section (push) attr = 0; group_name = NULL; entsize = 0; + linkonce = 0; if (*input_line_pointer == ',') { @@ -1022,6 +1056,13 @@ obj_elf_section (push) group_name = obj_elf_section_name (); if (group_name == NULL) attr &= ~SHF_GROUP; + else if (strncmp (input_line_pointer, ",comdat", 7) == 0) + { + input_line_pointer += 7; + linkonce = 1; + } + else if (strncmp (name, ".gnu.linkonce", 13) == 0) + linkonce = 1; } else if ((attr & SHF_GROUP) != 0) { @@ -1057,7 +1098,7 @@ obj_elf_section (push) demand_empty_rest_of_line (); - obj_elf_change_section (name, type, attr, entsize, group_name, push); + obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push); } /* Change to the .data section. */ @@ -1984,11 +2025,37 @@ elf_frob_file () for (i = 0; i < list.num_group; i++) { const char *group_name = elf_group_name (list.head[i]); + const char *sec_name; asection *s; flagword flags; + struct symbol *sy; + int has_sym; - s = subseg_force_new (group_name, 0); flags = SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_GROUP; + for (s = list.head[i]; s != NULL; s = elf_next_in_group (s)) + if (elf_linkonce_p (s) != ((flags & SEC_LINK_ONCE) != 0)) + { + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + if (s != list.head[i]) + { + as_warn (_("assuming all members of group `%s' are COMDAT"), + group_name); + break; + } + } + + sec_name = group_name; + sy = symbol_find_exact (group_name); + has_sym = 0; + if (sy != NULL + && (sy == symbol_lastP + || (sy->sy_next != NULL + && sy->sy_next->sy_previous == sy))) + { + has_sym = 1; + sec_name = ".group"; + } + s = subseg_force_new (sec_name, 0); if (s == NULL || !bfd_set_section_flags (stdoutput, s, flags) || !bfd_set_section_alignment (stdoutput, s, 2)) @@ -1999,6 +2066,8 @@ elf_frob_file () /* Pass a pointer to the first section in this group. */ elf_next_in_group (s) = list.head[i]; + if (has_sym) + elf_group_id (s) = sy->bsym; s->_raw_size = 4 * (list.elt_count[i] + 1); s->contents = frag_more (s->_raw_size); diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h index 33c5f43..6197bf1 100644 --- a/contrib/binutils/gas/config/obj-elf.h +++ b/contrib/binutils/gas/config/obj-elf.h @@ -1,5 +1,5 @@ /* ELF object file format. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -48,11 +48,8 @@ extern int alpha_flag_mdebug; /* For now, always set ECOFF_DEBUGGING for a MIPS target. */ #ifdef TC_MIPS -#ifdef MIPS_STABS_ELF -#define ECOFF_DEBUGGING 0 -#else -#define ECOFF_DEBUGGING 1 -#endif /* MIPS_STABS_ELF */ +#define ECOFF_DEBUGGING mips_flag_mdebug +extern int mips_flag_mdebug; #endif /* TC_MIPS */ #ifdef OBJ_MAYBE_ECOFF @@ -89,7 +86,9 @@ struct elf_obj_sy #define ELF_TARGET_SYMBOL_FIELDS int local:1; /* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead. */ +#ifndef TARGET_SYMBOL_FIELDS #define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS +#endif /* #include "targ-cpu.h" */ diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c index 505bb35..1846a92 100644 --- a/contrib/binutils/gas/config/obj-ieee.c +++ b/contrib/binutils/gas/config/obj-ieee.c @@ -493,6 +493,20 @@ obj_symbol_new_hook (symbolP) } #if 1 + +#ifndef SUB_SEGMENT_ALIGN +#ifdef HANDLE_ALIGN +/* The last subsegment gets an aligment corresponding to the alignment + of the section. This allows proper nop-filling at the end of + code-bearing sections. */ +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ + (!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \ + ? get_recorded_alignment (SEG) : 0) +#else +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 2 +#endif +#endif + extern void write_object_file () { @@ -512,20 +526,33 @@ write_object_file () subseg_set (1, 0); subseg_set (2, 0); subseg_set (3, 0); + + /* Run through all the sub-segments and align them up. Also + close any open frags. We tack a .fill onto the end of the + frag chain so that any .align's size can be worked by looking + at the next frag. */ for (frchain_ptr = frchain_root; frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) { - /* Run through all the sub-segments and align them up. Also - close any open frags. We tack a .fill onto the end of the - frag chain so that any .align's size can be worked by looking - at the next frag. */ + int alignment; subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg); -#ifndef SUB_SEGMENT_ALIGN -#define SUB_SEGMENT_ALIGN(SEG) 2 + + alignment = SUB_SEGMENT_ALIGN (now_seg, frchain_ptr) + +#ifdef md_do_align + md_do_align (alignment, (char *) NULL, 0, 0, alignment_done); +#endif + if (subseg_text_p (now_seg)) + frag_align_code (alignment, 0); + else + frag_align (alignment, 0, 0); + +#ifdef md_do_align + alignment_done: #endif - frag_align (SUB_SEGMENT_ALIGN (now_seg), 0, 0); + frag_wane (frag_now); frag_now->fr_fix = 0; know (frag_now->fr_next == NULL); diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c index acb57c9..6ebd154 100644 --- a/contrib/binutils/gas/config/tc-alpha.c +++ b/contrib/binutils/gas/config/tc-alpha.c @@ -1,6 +1,6 @@ /* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU. - Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. + Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002 Free Software Foundation, Inc. Contributed by Carnegie Mellon University, 1993. Written by Alessandro Forin, based on earlier gas-1.38 target CPU files. Modified by Ken Raeburn for gas-2.x and ECOFF support. @@ -106,30 +106,38 @@ struct alpha_macro { #define O_pregister O_md1 /* O_register, in parentheses */ #define O_cpregister O_md2 /* + a leading comma */ -/* Note, the alpha_reloc_op table below depends on the ordering - of O_literal .. O_gpre16. */ +/* The alpha_reloc_op table below depends on the ordering of these. */ #define O_literal O_md3 /* !literal relocation */ #define O_lituse_addr O_md4 /* !lituse_addr relocation */ #define O_lituse_base O_md5 /* !lituse_base relocation */ #define O_lituse_bytoff O_md6 /* !lituse_bytoff relocation */ #define O_lituse_jsr O_md7 /* !lituse_jsr relocation */ -#define O_gpdisp O_md8 /* !gpdisp relocation */ -#define O_gprelhigh O_md9 /* !gprelhigh relocation */ -#define O_gprellow O_md10 /* !gprellow relocation */ -#define O_gprel O_md11 /* !gprel relocation */ -#define O_samegp O_md12 /* !samegp relocation */ +#define O_lituse_tlsgd O_md8 /* !lituse_tlsgd relocation */ +#define O_lituse_tlsldm O_md9 /* !lituse_tlsldm relocation */ +#define O_gpdisp O_md10 /* !gpdisp relocation */ +#define O_gprelhigh O_md11 /* !gprelhigh relocation */ +#define O_gprellow O_md12 /* !gprellow relocation */ +#define O_gprel O_md13 /* !gprel relocation */ +#define O_samegp O_md14 /* !samegp relocation */ +#define O_tlsgd O_md15 /* !tlsgd relocation */ +#define O_tlsldm O_md16 /* !tlsldm relocation */ +#define O_gotdtprel O_md17 /* !gotdtprel relocation */ +#define O_dtprelhi O_md18 /* !dtprelhi relocation */ +#define O_dtprello O_md19 /* !dtprello relocation */ +#define O_dtprel O_md20 /* !dtprel relocation */ +#define O_gottprel O_md21 /* !gottprel relocation */ +#define O_tprelhi O_md22 /* !tprelhi relocation */ +#define O_tprello O_md23 /* !tprello relocation */ +#define O_tprel O_md24 /* !tprel relocation */ #define DUMMY_RELOC_LITUSE_ADDR (BFD_RELOC_UNUSED + 1) #define DUMMY_RELOC_LITUSE_BASE (BFD_RELOC_UNUSED + 2) #define DUMMY_RELOC_LITUSE_BYTOFF (BFD_RELOC_UNUSED + 3) #define DUMMY_RELOC_LITUSE_JSR (BFD_RELOC_UNUSED + 4) +#define DUMMY_RELOC_LITUSE_TLSGD (BFD_RELOC_UNUSED + 5) +#define DUMMY_RELOC_LITUSE_TLSLDM (BFD_RELOC_UNUSED + 6) -#define LITUSE_ADDR 0 -#define LITUSE_BASE 1 -#define LITUSE_BYTOFF 2 -#define LITUSE_JSR 3 - -#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_samegp) +#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_tprel) /* Macros for extracting the type and number of encoded register tokens */ @@ -496,11 +504,23 @@ static const struct alpha_reloc_op_tag { DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1), DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1), DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1), + DEF(lituse_tlsgd, DUMMY_RELOC_LITUSE_TLSGD, 1, 1), + DEF(lituse_tlsldm, DUMMY_RELOC_LITUSE_TLSLDM, 1, 1), DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1), DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0), DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0), DEF(gprel, BFD_RELOC_GPREL16, 0, 0), - DEF(samegp, BFD_RELOC_ALPHA_BRSGP, 0, 0) + DEF(samegp, BFD_RELOC_ALPHA_BRSGP, 0, 0), + DEF(tlsgd, BFD_RELOC_ALPHA_TLSGD, 0, 1), + DEF(tlsldm, BFD_RELOC_ALPHA_TLSLDM, 0, 1), + DEF(gotdtprel, BFD_RELOC_ALPHA_GOTDTPREL16, 0, 0), + DEF(dtprelhi, BFD_RELOC_ALPHA_DTPREL_HI16, 0, 0), + DEF(dtprello, BFD_RELOC_ALPHA_DTPREL_LO16, 0, 0), + DEF(dtprel, BFD_RELOC_ALPHA_DTPREL16, 0, 0), + DEF(gottprel, BFD_RELOC_ALPHA_GOTTPREL16, 0, 0), + DEF(tprelhi, BFD_RELOC_ALPHA_TPREL_HI16, 0, 0), + DEF(tprello, BFD_RELOC_ALPHA_TPREL_LO16, 0, 0), + DEF(tprel, BFD_RELOC_ALPHA_TPREL16, 0, 0), }; #undef DEF @@ -515,12 +535,17 @@ static const int alpha_num_reloc_op /* Structure to hold explict sequence information. */ struct alpha_reloc_tag { - fixS *slaves; /* head of linked list of !literals */ + fixS *master; /* the literal reloc */ + fixS *slaves; /* head of linked list of lituses */ segT segment; /* segment relocs are in or undefined_section*/ long sequence; /* sequence # */ unsigned n_master; /* # of literals */ unsigned n_slaves; /* # of lituses */ - char multi_section_p; /* True if more than one section was used */ + unsigned saw_tlsgd : 1; /* true if ... */ + unsigned saw_tlsldm : 1; + unsigned saw_lu_tlsgd : 1; + unsigned saw_lu_tlsldm : 1; + unsigned multi_section_p : 1; /* true if more than one section was used */ char string[1]; /* printable form of sequence to hash with */ }; @@ -551,6 +576,10 @@ static const struct cpu_type { |AXP_OPCODE_MAX) }, { "21264", (AXP_OPCODE_BASE|AXP_OPCODE_EV6|AXP_OPCODE_BWX |AXP_OPCODE_MAX|AXP_OPCODE_CIX) }, + { "21264a", (AXP_OPCODE_BASE|AXP_OPCODE_EV6|AXP_OPCODE_BWX + |AXP_OPCODE_MAX|AXP_OPCODE_CIX) }, + { "21264b", (AXP_OPCODE_BASE|AXP_OPCODE_EV6|AXP_OPCODE_BWX + |AXP_OPCODE_MAX|AXP_OPCODE_CIX) }, { "ev4", AXP_OPCODE_BASE }, { "ev45", AXP_OPCODE_BASE }, @@ -559,6 +588,8 @@ static const struct cpu_type { { "ev56", AXP_OPCODE_BASE|AXP_OPCODE_BWX }, { "pca56", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX }, { "ev6", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX|AXP_OPCODE_CIX }, + { "ev67", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX|AXP_OPCODE_CIX }, + { "ev68", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX|AXP_OPCODE_CIX }, { "all", AXP_OPCODE_BASE }, { 0, 0 } @@ -1077,9 +1108,9 @@ md_show_usage (stream) Alpha options:\n\ -32addr treat addresses as 32-bit values\n\ -F lack floating point instructions support\n\ --mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mall\n\ +-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mev67 | -mev68 | -mall\n\ specify variant of Alpha architecture\n\ --m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264\n\ +-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264 | -m21264a | -m21264b\n\ these variants include PALcode opcodes\n"), stream); #ifdef OBJ_EVAX @@ -1223,6 +1254,16 @@ md_apply_fix3 (fixP, valP, seg) #ifdef OBJ_ELF case BFD_RELOC_ALPHA_BRSGP: + case BFD_RELOC_ALPHA_TLSGD: + case BFD_RELOC_ALPHA_TLSLDM: + case BFD_RELOC_ALPHA_GOTDTPREL16: + case BFD_RELOC_ALPHA_DTPREL_HI16: + case BFD_RELOC_ALPHA_DTPREL_LO16: + case BFD_RELOC_ALPHA_DTPREL16: + case BFD_RELOC_ALPHA_GOTTPREL16: + case BFD_RELOC_ALPHA_TPREL_HI16: + case BFD_RELOC_ALPHA_TPREL_LO16: + case BFD_RELOC_ALPHA_TPREL16: return; #endif @@ -1441,6 +1482,16 @@ alpha_force_relocation (f) case BFD_RELOC_ALPHA_BRSGP: case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_ALPHA_TLSGD: + case BFD_RELOC_ALPHA_TLSLDM: + case BFD_RELOC_ALPHA_GOTDTPREL16: + case BFD_RELOC_ALPHA_DTPREL_HI16: + case BFD_RELOC_ALPHA_DTPREL_LO16: + case BFD_RELOC_ALPHA_DTPREL16: + case BFD_RELOC_ALPHA_GOTTPREL16: + case BFD_RELOC_ALPHA_TPREL_HI16: + case BFD_RELOC_ALPHA_TPREL_LO16: + case BFD_RELOC_ALPHA_TPREL16: return 1; case BFD_RELOC_23_PCREL_S2: @@ -1497,6 +1548,20 @@ alpha_fix_adjustable (f) case BFD_RELOC_ALPHA_HINT: return 1; + case BFD_RELOC_ALPHA_TLSGD: + case BFD_RELOC_ALPHA_TLSLDM: + case BFD_RELOC_ALPHA_GOTDTPREL16: + case BFD_RELOC_ALPHA_DTPREL_HI16: + case BFD_RELOC_ALPHA_DTPREL_LO16: + case BFD_RELOC_ALPHA_DTPREL16: + case BFD_RELOC_ALPHA_GOTTPREL16: + case BFD_RELOC_ALPHA_TPREL_HI16: + case BFD_RELOC_ALPHA_TPREL_LO16: + case BFD_RELOC_ALPHA_TPREL16: + /* ??? No idea why we can't return a reference to .tbss+10, but + we're preventing this in the other assemblers. Follow for now. */ + return 0; + default: return 1; } @@ -1556,7 +1621,8 @@ tc_gen_reloc (sec, fixp) * of thing, and as a result we need to fake it out here. */ if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy) - || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE)) + || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE) + || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_THREAD_LOCAL)) && !S_IS_COMMON (fixp->fx_addsy)) reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value; #endif @@ -1665,7 +1731,6 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) fixS *fixp; fixS *next; fixS *slave; - unsigned long n_slaves = 0; /* If seginfo is NULL, we did not create this section; don't do anything with it. By using a pointer to a pointer, we can update @@ -1688,21 +1753,40 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) switch (fixp->fx_r_type) { case BFD_RELOC_ALPHA_LITUSE: - n_slaves++; if (fixp->tc_fix_data.info->n_master == 0) as_bad_where (fixp->fx_file, fixp->fx_line, _("No !literal!%ld was found"), fixp->tc_fix_data.info->sequence); + if (fixp->fx_offset == LITUSE_ALPHA_TLSGD) + { + if (! fixp->tc_fix_data.info->saw_tlsgd) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("No !tlsgd!%ld was found"), + fixp->tc_fix_data.info->sequence); + } + else if (fixp->fx_offset == LITUSE_ALPHA_TLSLDM) + { + if (! fixp->tc_fix_data.info->saw_tlsldm) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("No !tlsldm!%ld was found"), + fixp->tc_fix_data.info->sequence); + } break; case BFD_RELOC_ALPHA_GPDISP_LO16: - n_slaves++; if (fixp->tc_fix_data.info->n_master == 0) as_bad_where (fixp->fx_file, fixp->fx_line, _("No ldah !gpdisp!%ld was found"), fixp->tc_fix_data.info->sequence); break; + case BFD_RELOC_ALPHA_ELF_LITERAL: + if (fixp->tc_fix_data.info + && (fixp->tc_fix_data.info->saw_tlsgd + || fixp->tc_fix_data.info->saw_tlsldm)) + break; + /* FALLTHRU */ + default: *prevP = fixp; prevP = &fixp->fx_next; @@ -1710,10 +1794,10 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) } } - /* If there were any dependent relocations, go and add them back to - the chain. They are linked through the next_reloc field in - reverse order, so as we go through the next_reloc chain, we - effectively reverse the chain once again. + /* Go back and re-chain dependent relocations. They are currently + linked through the next_reloc field in reverse order, so as we + go through the next_reloc chain, we effectively reverse the chain + once again. Except if there is more than one !literal for a given sequence number. In that case, the programmer and/or compiler is not sure @@ -1733,8 +1817,30 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) next = fixp->fx_next; switch (fixp->fx_r_type) { + case BFD_RELOC_ALPHA_TLSGD: + case BFD_RELOC_ALPHA_TLSLDM: + if (!fixp->tc_fix_data.info) + break; + if (fixp->tc_fix_data.info->n_master == 0) + break; + else if (fixp->tc_fix_data.info->n_master > 1) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + _("too many !literal!%ld for %s"), + fixp->tc_fix_data.info->sequence, + (fixp->fx_r_type == BFD_RELOC_ALPHA_TLSGD + ? "!tlsgd" : "!tlsldm")); + break; + } + + fixp->tc_fix_data.info->master->fx_next = fixp->fx_next; + fixp->fx_next = fixp->tc_fix_data.info->master; + fixp = fixp->fx_next; + /* FALLTHRU */ + case BFD_RELOC_ALPHA_ELF_LITERAL: - if (fixp->tc_fix_data.info->n_master == 1 + if (fixp->tc_fix_data.info + && fixp->tc_fix_data.info->n_master == 1 && ! fixp->tc_fix_data.info->multi_section_p) { for (slave = fixp->tc_fix_data.info->slaves; @@ -1819,15 +1925,23 @@ debug_exp (tok, ntok) case O_lituse_base: name = "O_lituse_base"; break; case O_lituse_bytoff: name = "O_lituse_bytoff"; break; case O_lituse_jsr: name = "O_lituse_jsr"; break; + case O_lituse_tlsgd: name = "O_lituse_tlsgd"; break; + case O_lituse_tlsldm: name = "O_lituse_tlsldm"; break; case O_gpdisp: name = "O_gpdisp"; break; case O_gprelhigh: name = "O_gprelhigh"; break; case O_gprellow: name = "O_gprellow"; break; case O_gprel: name = "O_gprel"; break; case O_samegp: name = "O_samegp"; break; - case O_md13: name = "O_md13"; break; - case O_md14: name = "O_md14"; break; - case O_md15: name = "O_md15"; break; - case O_md16: name = "O_md16"; break; + case O_tlsgd: name = "O_tlsgd"; break; + case O_tlsldm: name = "O_tlsldm"; break; + case O_gotdtprel: name = "O_gotdtprel"; break; + case O_dtprelhi: name = "O_dtprelhi"; break; + case O_dtprello: name = "O_dtprello"; break; + case O_dtprel: name = "O_dtprel"; break; + case O_gottprel: name = "O_gottprel"; break; + case O_tprelhi: name = "O_tprelhi"; break; + case O_tprello: name = "O_tprello"; break; + case O_tprel: name = "O_tprel"; break; } fprintf (stderr, ", %s(%s, %s, %d)", name, @@ -1894,7 +2008,7 @@ tokenize_arguments (str, tok, ntok) goto err; ++input_line_pointer; - SKIP_WHITESPACE (); + SKIP_WHITESPACE (); p = input_line_pointer; c = get_symbol_end (); @@ -1917,7 +2031,7 @@ tokenize_arguments (str, tok, ntok) } *input_line_pointer = c; - SKIP_WHITESPACE (); + SKIP_WHITESPACE (); if (*input_line_pointer != '!') { if (r->require_seq) @@ -2377,7 +2491,7 @@ assemble_insn (opcode, tok, ntok, insn, reloc) abort (); /* There is one special case for which an insn receives two - relocations, and thus the user-supplied reloc does not + relocations, and thus the user-supplied reloc does not override the operand reloc. */ if (operand->default_reloc == BFD_RELOC_ALPHA_HINT) { @@ -2478,7 +2592,7 @@ emit_insn (insn) { const struct alpha_operand *operand = (const struct alpha_operand *) 0; struct alpha_fixup *fixup = &insn->fixups[i]; - struct alpha_reloc_tag *info; + struct alpha_reloc_tag *info = NULL; int size, pcrel; fixS *fixP; @@ -2520,6 +2634,14 @@ emit_insn (insn) case BFD_RELOC_GPREL16: case BFD_RELOC_ALPHA_GPREL_HI16: case BFD_RELOC_ALPHA_GPREL_LO16: + case BFD_RELOC_ALPHA_GOTDTPREL16: + case BFD_RELOC_ALPHA_DTPREL_HI16: + case BFD_RELOC_ALPHA_DTPREL_LO16: + case BFD_RELOC_ALPHA_DTPREL16: + case BFD_RELOC_ALPHA_GOTTPREL16: + case BFD_RELOC_ALPHA_TPREL_HI16: + case BFD_RELOC_ALPHA_TPREL_LO16: + case BFD_RELOC_ALPHA_TPREL16: fixP->fx_no_overflow = 1; break; @@ -2554,7 +2676,10 @@ emit_insn (insn) case BFD_RELOC_ALPHA_ELF_LITERAL: fixP->fx_no_overflow = 1; + if (insn->sequence == 0) + break; info = get_alpha_reloc_tag (insn->sequence); + info->master = fixP; info->n_master++; if (info->segment != now_seg) info->multi_section_p = 1; @@ -2562,22 +2687,41 @@ emit_insn (insn) break; case DUMMY_RELOC_LITUSE_ADDR: - fixP->fx_offset = LITUSE_ADDR; + fixP->fx_offset = LITUSE_ALPHA_ADDR; goto do_lituse; case DUMMY_RELOC_LITUSE_BASE: - fixP->fx_offset = LITUSE_BASE; + fixP->fx_offset = LITUSE_ALPHA_BASE; goto do_lituse; case DUMMY_RELOC_LITUSE_BYTOFF: - fixP->fx_offset = LITUSE_BYTOFF; + fixP->fx_offset = LITUSE_ALPHA_BYTOFF; goto do_lituse; case DUMMY_RELOC_LITUSE_JSR: - fixP->fx_offset = LITUSE_JSR; + fixP->fx_offset = LITUSE_ALPHA_JSR; + goto do_lituse; + case DUMMY_RELOC_LITUSE_TLSGD: + fixP->fx_offset = LITUSE_ALPHA_TLSGD; + goto do_lituse; + case DUMMY_RELOC_LITUSE_TLSLDM: + fixP->fx_offset = LITUSE_ALPHA_TLSLDM; + goto do_lituse; do_lituse: fixP->fx_addsy = section_symbol (now_seg); fixP->fx_r_type = BFD_RELOC_ALPHA_LITUSE; info = get_alpha_reloc_tag (insn->sequence); - info->n_slaves++; + if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSGD) + info->saw_lu_tlsgd = 1; + else if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSLDM) + info->saw_lu_tlsldm = 1; + if (++info->n_slaves > 1) + { + if (info->saw_lu_tlsgd) + as_bad (_("too many lituse insns for !lituse_tlsgd!%ld"), + insn->sequence); + else if (info->saw_lu_tlsldm) + as_bad (_("too many lituse insns for !lituse_tlsldm!%ld"), + insn->sequence); + } fixP->tc_fix_data.info = info; fixP->tc_fix_data.next_reloc = info->slaves; info->slaves = fixP; @@ -2585,6 +2729,38 @@ emit_insn (insn) info->multi_section_p = 1; break; + case BFD_RELOC_ALPHA_TLSGD: + fixP->fx_no_overflow = 1; + + if (insn->sequence == 0) + break; + info = get_alpha_reloc_tag (insn->sequence); + if (info->saw_tlsgd) + as_bad (_("duplicate !tlsgd!%ld"), insn->sequence); + else if (info->saw_tlsldm) + as_bad (_("sequence number in use for !tlsldm!%ld"), + insn->sequence); + else + info->saw_tlsgd = 1; + fixP->tc_fix_data.info = info; + break; + + case BFD_RELOC_ALPHA_TLSLDM: + fixP->fx_no_overflow = 1; + + if (insn->sequence == 0) + break; + info = get_alpha_reloc_tag (insn->sequence); + if (info->saw_tlsldm) + as_bad (_("duplicate !tlsldm!%ld"), insn->sequence); + else if (info->saw_tlsgd) + as_bad (_("sequence number in use for !tlsgd!%ld"), + insn->sequence); + else + info->saw_tlsldm = 1; + fixP->tc_fix_data.info = info; + break; + default: if ((int) fixup->reloc < 0) { @@ -2648,13 +2824,16 @@ assemble_tokens (opname, tok, ntok, local_macros_on) int cpumatch = 1; bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED; +#ifdef RELOC_OP_P /* If a user-specified relocation is present, this is not a macro. */ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc; ntok--; } - else if (local_macros_on) + else +#endif + if (local_macros_on) { macro = ((const struct alpha_macro *) hash_find (alpha_macro_hash, opname)); @@ -2711,7 +2890,6 @@ static const char * const extXh_op[] = { NULL, "extwh", "extlh", "extqh" }; static const char * const mskXl_op[] = { "mskbl", "mskwl", "mskll", "mskql" }; static const char * const mskXh_op[] = { NULL, "mskwh", "msklh", "mskqh" }; static const char * const stX_op[] = { "stb", "stw", "stl", "stq" }; -static const char * const ldX_op[] = { "ldb", "ldw", "ldll", "ldq" }; static const char * const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL }; /* Implement the ldgp macro. */ @@ -5464,7 +5642,7 @@ alpha_elf_section_letter (letter, ptr_msg) if (letter == 's') return SHF_ALPHA_GPREL; - *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string"); + *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S,G,T in string"); return 0; } diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h index 5505861..247fea6 100644 --- a/contrib/binutils/gas/config/tc-alpha.h +++ b/contrib/binutils/gas/config/tc-alpha.h @@ -28,10 +28,17 @@ #define TARGET_ARCH bfd_arch_alpha +#ifdef TE_FreeBSD +#define ELF_TARGET_FORMAT "elf64-alpha-freebsd" +#endif +#ifndef ELF_TARGET_FORMAT +#define ELF_TARGET_FORMAT "elf64-alpha" +#endif + #define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \ ? "ecoff-littlealpha" \ : OUTPUT_FLAVOR == bfd_target_elf_flavour \ - ? "elf64-alpha" \ + ? ELF_TARGET_FORMAT \ : OUTPUT_FLAVOR == bfd_target_evax_flavour \ ? "vms-alpha" \ : "unknown-format") diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index 2d8cc7c..a6bbba1 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -2063,8 +2063,8 @@ static void s_thumb_func PARAMS ((int)); static void s_thumb_set PARAMS ((int)); static void arm_s_text PARAMS ((int)); static void arm_s_data PARAMS ((int)); -#ifdef OBJ_ELF static void arm_s_section PARAMS ((int)); +#ifdef OBJ_ELF static void s_arm_elf_cons PARAMS ((int)); #endif @@ -2088,11 +2088,11 @@ const pseudo_typeS md_pseudo_table[] = /* Allow for the effect of section changes. */ { "text", arm_s_text, 0 }, { "data", arm_s_data, 0 }, -#ifdef OBJ_ELF { "section", arm_s_section, 0 }, { "section.s", arm_s_section, 0 }, { "sect", arm_s_section, 0 }, { "sect.s", arm_s_section, 0 }, +#ifdef OBJ_ELF { "word", s_arm_elf_cons, 4 }, { "long", s_arm_elf_cons, 4 }, { "file", dwarf2_directive_file, 0 }, @@ -2165,14 +2165,14 @@ add_to_lit_pool () break; if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op - && inst.reloc.exp.X_op == O_symbol - && (literals[lit_count].exp.X_add_number + && inst.reloc.exp.X_op == O_symbol + && (literals[lit_count].exp.X_add_number == inst.reloc.exp.X_add_number) - && (literals[lit_count].exp.X_add_symbol + && (literals[lit_count].exp.X_add_symbol == inst.reloc.exp.X_add_symbol) - && (literals[lit_count].exp.X_op_symbol + && (literals[lit_count].exp.X_op_symbol == inst.reloc.exp.X_op_symbol)) - break; + break; lit_count++; } @@ -2227,7 +2227,7 @@ symbol_locate (symbolP, name, segment, valu, frag) S_SET_SEGMENT (symbolP, segment); S_SET_VALUE (symbolP, valu); - symbol_clear_list_pointers(symbolP); + symbol_clear_list_pointers (symbolP); symbol_set_frag (symbolP, frag); @@ -2585,16 +2585,19 @@ arm_s_data (ignore) #endif } -#ifdef OBJ_ELF static void arm_s_section (ignore) int ignore; { s_ltorg (0); +#ifdef OBJ_ELF obj_elf_section (ignore); -} #endif +#ifdef OBJ_COFF + obj_coff_section (ignore); +#endif +} static void opcode_select (width) @@ -2624,9 +2627,9 @@ opcode_select (width) thumb_mode = 0; if (!need_pass_2) - frag_align (2, 0, 0); + frag_align (2, 0, 0); - record_alignment (now_seg, 1); + record_alignment (now_seg, 1); } break; @@ -3450,13 +3453,13 @@ ld_mode_required_here (string) } else /* [Rn] */ { - skip_whitespace (str); + skip_whitespace (str); - if (* str == '!') - { - str ++; - inst.instruction |= WRITE_BACK; - } + if (* str == '!') + { + str ++; + inst.instruction |= WRITE_BACK; + } inst.instruction |= INDEX_UP | HWOFFSET_IMM; pre_inc = 1; @@ -4027,10 +4030,10 @@ do_blx (str) { /* This must be is BLX <target address>, no condition allowed. */ if (inst.instruction != COND_ALWAYS) - { - inst.error = BAD_COND; + { + inst.error = BAD_COND; return; - } + } inst.instruction = 0xfafffffe; @@ -4088,7 +4091,7 @@ do_t_blx (str) BKPT <16 bit unsigned immediate> Instruction is not conditional. The bit pattern given in insns[] has the COND_ALWAYS condition, - and it is an error if the caller tried to override that. */ + and it is an error if the caller tried to override that. */ static void do_bkpt (str) @@ -4331,7 +4334,7 @@ do_ldrd (str) || (rn = ld_mode_required_here (& str)) == FAIL) { if (!inst.error) - inst.error = BAD_ARGS; + inst.error = BAD_ARGS; return; } @@ -4514,7 +4517,7 @@ my_get_expression (ep, str) return 0; } -/* We handle all bad expressions here, so that we can report the faulty +/* We handle all bad expressions here, so that we can report the faulty instruction in the error message. */ void md_operand (expr) @@ -5543,7 +5546,7 @@ do_ldstv4 (str) end_of_line (str); return; } - + value = validate_immediate (~ inst.reloc.exp.X_add_number); if (value != FAIL) @@ -6729,7 +6732,7 @@ vfp_psr_parse (str) /* Mark it. */ *--p = 0; - for (vreg = vfp_regs + 0; + for (vreg = vfp_regs + 0; vreg < vfp_regs + sizeof (vfp_regs) / sizeof (struct vfp_reg); vreg++) { @@ -6960,7 +6963,7 @@ vfp_sp_reg_list (str, pos) /* Sanity check -- should have raised a parse error above. */ if (count == 0 || count > 32) - abort(); + abort (); /* Final test -- the registers must be consecutive. */ while (count--) @@ -7073,7 +7076,7 @@ vfp_dp_reg_list (str) /* Sanity check -- should have raised a parse error above. */ if (count == 0 || count > 16) - abort(); + abort (); /* Final test -- the registers must be consecutive. */ while (count--) @@ -7090,7 +7093,7 @@ vfp_dp_reg_list (str) } static void -vfp_sp_ldstm(str, ldstm_type) +vfp_sp_ldstm (str, ldstm_type) char *str; enum vfp_ldstm_type ldstm_type; { @@ -7127,7 +7130,7 @@ vfp_sp_ldstm(str, ldstm_type) } static void -vfp_dp_ldstm(str, ldstm_type) +vfp_dp_ldstm (str, ldstm_type) char *str; enum vfp_ldstm_type ldstm_type; { @@ -7433,11 +7436,11 @@ thumb_add_sub (str, subtract) int offset = inst.reloc.exp.X_add_number; if (subtract) - offset = -offset; + offset = - offset; if (offset < 0) { - offset = -offset; + offset = - offset; subtract = 1; /* Quick check, in case offset is MIN_INT. */ @@ -7933,7 +7936,7 @@ mav_reg_required_here (str, shift, regtype) /* In the few cases where we might be able to accept something else this error can be overridden. */ inst.error = _(all_reg_maps[regtype].expected); - + return FAIL; } @@ -8181,7 +8184,7 @@ do_mav_quad_6b (str) REG_TYPE_MVFX); } -/* cfmvsc32<cond> DSPSC,MVFX[15:0]. */ +/* cfmvsc32<cond> DSPSC,MVFX[15:0]. */ static void do_mav_dspsc_1 (str) char * str; @@ -9095,7 +9098,7 @@ create_register_alias (newname, p) *p = c; return 0; } - + static void set_constant_flonums () { @@ -9936,6 +9939,7 @@ md_apply_fix3 (fixP, valP, seg) value = fixP->fx_offset; #endif value += diff; + if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff)) as_bad_where (fixP->fx_file, fixP->fx_line, _("branch with link out of range")); @@ -9943,14 +9947,11 @@ md_apply_fix3 (fixP, valP, seg) newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX) - /* Remove bit zero of the adjusted offset. Bit zero can only be - set if the upper insn is at a half-word boundary, since the - destination address, an ARM instruction, must always be on a - word boundary. The semantics of the BLX (1) instruction, however, - are that bit zero in the offset must always be zero, and the - corresponding bit one in the target address will be set from bit - one of the source address. */ - newval2 &= ~1; + /* For a BLX instruction, make sure that the relocation is rounded up + to a word boundary. This follows the semantics of the instruction + which specifies that bit 1 of the target address will come from bit + 1 of the base address. */ + newval2 = (newval2 + 1) & ~ 1; md_number_to_chars (buf, newval, THUMB_SIZE); md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); } @@ -10399,7 +10400,6 @@ md_assemble (str) #if 0 arm_align (2, 0); #endif - listing_prev_line (); /* Defined in listing.h. */ /* Align the previous label if needed. */ if (last_label_seen != NULL) @@ -10487,7 +10487,7 @@ md_assemble (str) /* md_parse_option Invocation line includes a switch not recognized by the base assembler. - See if it's a processor-specific option. + See if it's a processor-specific option. This routine is somewhat complicated by the need for backwards compatibility (since older releases of gcc can't be changed). @@ -10505,7 +10505,7 @@ md_assemble (str) -mthumb Start in Thumb mode -mthumb-interwork Code supports ARM/Thumb interworking - For now we will also provide support for + For now we will also provide support for -mapcs-32 32-bit Program counter -mapcs-26 26-bit Program counter @@ -10546,7 +10546,7 @@ md_assemble (str) */ -CONST char * md_shortopts = "m:k"; +const char * md_shortopts = "m:k"; #ifdef ARM_BI_ENDIAN #define OPTION_EB (OPTION_MD_BASE + 0) @@ -10581,7 +10581,7 @@ struct arm_option_table char *deprecated; /* If non-null, print this message. */ }; -struct arm_option_table arm_opts[] = +struct arm_option_table arm_opts[] = { {"k", N_("generate PIC code"), &pic_code, 1, NULL}, {"mthumb", N_("assemble Thumb code"), &thumb_mode, 1, NULL}, @@ -10789,7 +10789,7 @@ static struct arm_cpu_option_table arm_cpus[] = {"ep9312", ARM_ARCH_V4T | ARM_CEXT_MAVERICK, FPU_NONE}, {NULL, 0, 0} }; - + struct arm_arch_option_table { char *name; @@ -11046,7 +11046,7 @@ md_parse_option (c, arg) #endif case 'a': - /* Listing option. Just ignore these, we don't support additional + /* Listing option. Just ignore these, we don't support additional ones. */ return 0; @@ -11073,10 +11073,10 @@ md_parse_option (c, arg) for (lopt = arm_long_opts; lopt->option != NULL; lopt++) { - /* These options are expected to have an argument. */ + /* These options are expected to have an argument. */ if (c == lopt->option[0] && arg != NULL - && strncmp (arg, lopt->option + 1, + && strncmp (arg, lopt->option + 1, strlen (lopt->option + 1)) == 0) { #if WARN_DEPRECATED @@ -11216,7 +11216,6 @@ arm_cleanup () /* Put it at the end of text section. */ subseg_set (text_section, 0); s_ltorg (0); - listing_prev_line (); } void @@ -11248,7 +11247,7 @@ arm_frob_label (sym) lsl r3, r3, #2 ldr r2, [r3, r2] mov pc, r2 - + .Lbbb: .word .Lxxx .Lccc: .word .Lyyy ..etc... @@ -11258,7 +11257,7 @@ arm_frob_label (sym) The second instruction converts a table index into a byte offset. The third instruction gets the jump address out of the table. The fourth instruction performs the jump. - + If the address stored at .Laaa is that of a symbol which has the Thumb_Func bit set, then the linker will arrange for this address to have the bottom bit set, which in turn would mean that the @@ -11307,7 +11306,7 @@ arm_adjust_symtab () as_bad (_("%s: unexpected function type: %d"), S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym)); } - else switch (S_GET_STORAGE_CLASS (sym)) + else switch (S_GET_STORAGE_CLASS (sym)) { case C_EXT: S_SET_STORAGE_CLASS (sym, C_THUMBEXT); @@ -11609,17 +11608,17 @@ arm_handle_align (fragP) int bytes, fix, noop_size; char * p; const char * noop; - + if (fragP->fr_type != rs_align_code) return; bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix; p = fragP->fr_literal + fragP->fr_fix; fix = 0; - + if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE) bytes &= MAX_MEM_FOR_RS_ALIGN_CODE; - + if (fragP->tc_frag_data) { if (target_big_endian) @@ -11636,7 +11635,7 @@ arm_handle_align (fragP) noop = arm_noop; noop_size = sizeof (arm_noop); } - + if (bytes & (noop_size - 1)) { fix = bytes & (noop_size - 1); @@ -11652,7 +11651,7 @@ arm_handle_align (fragP) bytes -= noop_size; fix += noop_size; } - + fragP->fr_fix += fix; fragP->fr_var = noop_size; } @@ -11671,7 +11670,7 @@ arm_frag_align_code (n, max) to support alignments greater than 32 bytes. */ if (max > MAX_MEM_FOR_RS_ALIGN_CODE) as_fatal (_("alignments greater than 32 bytes not supported in .text sections.")); - + p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE, 1, diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index f681014..fc1bd13 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -104,8 +104,10 @@ static void output_insn PARAMS ((void)); static void output_branch PARAMS ((void)); static void output_jump PARAMS ((void)); static void output_interseg_jump PARAMS ((void)); -static void output_imm PARAMS ((void)); -static void output_disp PARAMS ((void)); +static void output_imm PARAMS ((fragS *insn_start_frag, + offsetT insn_start_off)); +static void output_disp PARAMS ((fragS *insn_start_frag, + offsetT insn_start_off)); #ifndef I386COFF static void s_bss PARAMS ((int)); #endif @@ -435,7 +437,7 @@ const pseudo_typeS md_pseudo_table[] = {"code64", set_code_flag, CODE_64BIT}, {"intel_syntax", set_intel_syntax, 1}, {"att_syntax", set_intel_syntax, 0}, - {"file", dwarf2_directive_file, 0}, + {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0}, {"loc", dwarf2_directive_loc, 0}, {0, 0, 0} }; @@ -1130,21 +1132,6 @@ pt (t) #endif /* DEBUG386 */ -int -tc_i386_force_relocation (fixp) - struct fix *fixp; -{ -#ifdef BFD_ASSEMBLER - if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT - || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - return 1; - return 0; -#else - /* For COFF. */ - return fixp->fx_r_type == 7; -#endif -} - #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc PARAMS ((int, int, int, bfd_reloc_code_real_type)); @@ -1201,9 +1188,12 @@ reloc (size, pcrel, sign, other) int tc_i386_fix_adjustable (fixP) - fixS *fixP; + fixS *fixP ATTRIBUTE_UNUSED; { #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) + if (OUTPUT_FLAVOR != bfd_target_elf_flavour) + return 1; + /* Prevent all adjustments to global symbols, or else dynamic linking will not work correctly. */ if (S_IS_EXTERNAL (fixP->fx_addsy) @@ -1214,28 +1204,47 @@ tc_i386_fix_adjustable (fixP) && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0 && fixP->fx_pcrel)) return 0; -#endif + /* adjust_reloc_syms doesn't know about the GOT. */ if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF || fixP->fx_r_type == BFD_RELOC_386_PLT32 || fixP->fx_r_type == BFD_RELOC_386_GOT32 + || fixP->fx_r_type == BFD_RELOC_386_TLS_GD + || fixP->fx_r_type == BFD_RELOC_386_TLS_LDM + || fixP->fx_r_type == BFD_RELOC_386_TLS_LDO_32 + || fixP->fx_r_type == BFD_RELOC_386_TLS_IE_32 + || fixP->fx_r_type == BFD_RELOC_386_TLS_IE + || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTIE + || fixP->fx_r_type == BFD_RELOC_386_TLS_LE_32 + || fixP->fx_r_type == BFD_RELOC_386_TLS_LE || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32 || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; +#endif return 1; } #else #define reloc(SIZE,PCREL,SIGN,OTHER) 0 +#define BFD_RELOC_8 0 #define BFD_RELOC_16 0 #define BFD_RELOC_32 0 +#define BFD_RELOC_8_PCREL 0 #define BFD_RELOC_16_PCREL 0 #define BFD_RELOC_32_PCREL 0 #define BFD_RELOC_386_PLT32 0 #define BFD_RELOC_386_GOT32 0 #define BFD_RELOC_386_GOTOFF 0 +#define BFD_RELOC_386_TLS_GD 0 +#define BFD_RELOC_386_TLS_LDM 0 +#define BFD_RELOC_386_TLS_LDO_32 0 +#define BFD_RELOC_386_TLS_IE_32 0 +#define BFD_RELOC_386_TLS_IE 0 +#define BFD_RELOC_386_TLS_GOTIE 0 +#define BFD_RELOC_386_TLS_LE_32 0 +#define BFD_RELOC_386_TLS_LE 0 #define BFD_RELOC_X86_64_PLT32 0 #define BFD_RELOC_X86_64_GOT32 0 #define BFD_RELOC_X86_64_GOTPCREL 0 @@ -1314,11 +1323,19 @@ md_assemble (line) if (!match_template ()) return; - /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ - if (SYSV386_COMPAT - && intel_syntax - && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) - i.tm.base_opcode ^= FloatR; + if (intel_syntax) + { + /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ + if (SYSV386_COMPAT + && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) + i.tm.base_opcode ^= FloatR; + + /* Zap movzx and movsx suffix. The suffix may have been set from + "word ptr" or "byte ptr" on the source operand, but we'll use + the suffix later to choose the destination register. */ + if ((i.tm.base_opcode & ~9) == 0x0fb6) + i.suffix = 0; + } if (i.tm.opcode_modifier & FWait) if (!add_prefix (FWAIT_OPCODE)) @@ -2206,18 +2223,6 @@ process_suffix () return 0; } - /* For movzx and movsx, need to check the register type. */ - if (intel_syntax - && (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe) - && i.suffix == BYTE_MNEM_SUFFIX) - { - unsigned int prefix = DATA_PREFIX_OPCODE; - - if ((i.op[1].regs->reg_type & Reg16) != 0) - if (!add_prefix (prefix)) - return 0; - } - if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX) { /* It's not a byte, select word/dword operation. */ @@ -2233,8 +2238,10 @@ process_suffix () size prefix, except for instructions that will ignore this prefix anyway. */ if (i.suffix != QWORD_MNEM_SUFFIX - && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) - && !(i.tm.opcode_modifier & IgnoreSize)) + && !(i.tm.opcode_modifier & IgnoreSize) + && ((i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) + || (flag_code == CODE_64BIT + && (i.tm.opcode_modifier & JumpByte)))) { unsigned int prefix = DATA_PREFIX_OPCODE; if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */ @@ -2244,25 +2251,11 @@ process_suffix () return 0; } - if (i.suffix != QWORD_MNEM_SUFFIX && (flag_code == CODE_64BIT) - && !(i.tm.opcode_modifier & IgnoreSize) - && (i.tm.opcode_modifier & JumpByte)) - { - if (!add_prefix (ADDR_PREFIX_OPCODE)) - return 0; - } - /* Set mode64 for an operand. */ if (i.suffix == QWORD_MNEM_SUFFIX + && flag_code == CODE_64BIT && (i.tm.opcode_modifier & NoRex64) == 0) - { - i.rex |= REX_MODE64; - if (flag_code < CODE_64BIT) - { - as_bad (_("64bit operations available only in 64bit modes.")); - return 0; - } - } + i.rex |= REX_MODE64; /* Size floating point instruction. */ if (i.suffix == LONG_MNEM_SUFFIX) @@ -2596,9 +2589,8 @@ process_operands () else if (i.tm.opcode_modifier & Modrm) { /* The opcode is completed (modulo i.tm.extension_opcode which - must be put into the modrm byte). - Now, we make the modrm & index base bytes based on all the - info we've collected. */ + must be put into the modrm byte). Now, we make the modrm and + index base bytes based on all the info we've collected. */ default_seg = build_modrm_byte (); } @@ -2625,12 +2617,14 @@ process_operands () default_seg = &ds; } - /* If a segment was explicitly specified, - and the specified segment is not the default, - use an opcode prefix to select it. - If we never figured out what the default segment is, - then default_seg will be zero at this point, - and the specified segment prefix will always be used. */ + if (i.tm.base_opcode == 0x8d /* lea */ && i.seg[0] && !quiet_warnings) + as_warn (_("segment override on `lea' is ineffectual")); + + /* If a segment was explicitly specified, and the specified segment + is not the default, use an opcode prefix to select it. If we + never figured out what the default segment is, then default_seg + will be zero at this point, and the specified segment prefix will + always be used. */ if ((i.seg[0]) && (i.seg[0] != default_seg)) { if (!add_prefix (i.seg[0]->seg_prefix)) @@ -2981,6 +2975,7 @@ output_jump () { char *p; int size; + fixS *fixP; if (i.tm.opcode_modifier & JumpByte) { @@ -3031,8 +3026,14 @@ output_jump () p = frag_more (1 + size); *p++ = i.tm.base_opcode; - fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); + fixP = fix_new_exp (frag_now, p - frag_now->fr_literal, size, + i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); + + /* All jumps handled here are signed, but don't use a signed limit + check for 32 and 16 bit jumps as we want to allow wrap around at + 4G and 64k respectively. */ + if (size == 1) + fixP->fx_signed = 1; } static void @@ -3099,14 +3100,21 @@ output_interseg_jump () md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2); } + static void output_insn () { + fragS *insn_start_frag; + offsetT insn_start_off; + /* Tie dwarf2 debug info to the address at the start of the insn. We can't do this after the insn has been output as the current frag may have been closed off. eg. by frag_var. */ dwarf2_emit_insn (0); + insn_start_frag = frag_now; + insn_start_off = frag_now_fix (); + /* Output jumps. */ if (i.tm.opcode_modifier & Jump) output_branch (); @@ -3177,10 +3185,10 @@ output_insn () } if (i.disp_operands) - output_disp (); + output_disp (insn_start_frag, insn_start_off); if (i.imm_operands) - output_imm (); + output_imm (insn_start_frag, insn_start_off); } #ifdef DEBUG386 @@ -3192,7 +3200,9 @@ output_insn () } static void -output_disp () +output_disp (insn_start_frag, insn_start_off) + fragS *insn_start_frag; + offsetT insn_start_off; { char *p; unsigned int n; @@ -3222,6 +3232,7 @@ output_disp () } else { + RELOC_ENUM reloc_type; int size = 4; int sign = 0; int pcrel = (i.flags[n] & Operand_PCrel) != 0; @@ -3264,16 +3275,50 @@ output_disp () } p = frag_more (size); + reloc_type = reloc (size, pcrel, sign, i.reloc[n]); +#ifdef BFD_ASSEMBLER + if (reloc_type == BFD_RELOC_32 + && GOT_symbol + && GOT_symbol == i.op[n].disps->X_add_symbol + && (i.op[n].disps->X_op == O_symbol + || (i.op[n].disps->X_op == O_add + && ((symbol_get_value_expression + (i.op[n].disps->X_op_symbol)->X_op) + == O_subtract)))) + { + offsetT add; + + if (insn_start_frag == frag_now) + add = (p - frag_now->fr_literal) - insn_start_off; + else + { + fragS *fr; + + add = insn_start_frag->fr_fix - insn_start_off; + for (fr = insn_start_frag->fr_next; + fr && fr != frag_now; fr = fr->fr_next) + add += fr->fr_fix; + add += p - frag_now->fr_literal; + } + + /* We don't support dynamic linking on x86-64 yet. */ + if (flag_code == CODE_64BIT) + abort (); + reloc_type = BFD_RELOC_386_GOTPC; + i.op[n].disps->X_add_number += add; + } +#endif fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[n].disps, pcrel, - reloc (size, pcrel, sign, i.reloc[n])); + i.op[n].disps, pcrel, reloc_type); } } } } static void -output_imm () +output_imm (insn_start_frag, insn_start_off) + fragS *insn_start_frag; + offsetT insn_start_off; { char *p; unsigned int n; @@ -3326,6 +3371,48 @@ output_imm () p = frag_more (size); reloc_type = reloc (size, 0, sign, i.reloc[n]); #ifdef BFD_ASSEMBLER + /* This is tough to explain. We end up with this one if we + * have operands that look like + * "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal here is to + * obtain the absolute address of the GOT, and it is strongly + * preferable from a performance point of view to avoid using + * a runtime relocation for this. The actual sequence of + * instructions often look something like: + * + * call .L66 + * .L66: + * popl %ebx + * addl $_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx + * + * The call and pop essentially return the absolute address + * of the label .L66 and store it in %ebx. The linker itself + * will ultimately change the first operand of the addl so + * that %ebx points to the GOT, but to keep things simple, the + * .o file must have this operand set so that it generates not + * the absolute address of .L66, but the absolute address of + * itself. This allows the linker itself simply treat a GOTPC + * relocation as asking for a pcrel offset to the GOT to be + * added in, and the addend of the relocation is stored in the + * operand field for the instruction itself. + * + * Our job here is to fix the operand so that it would add + * the correct offset so that %ebx would point to itself. The + * thing that is tricky is that .-.L66 will point to the + * beginning of the instruction, so we need to further modify + * the operand so that it will point to itself. There are + * other cases where you have something like: + * + * .long $_GLOBAL_OFFSET_TABLE_+[.-.L66] + * + * and here no correction would be required. Internally in + * the assembler we treat operands of this form as not being + * pcrel since the '.' is explicitly mentioned, and I wonder + * whether it would simplify matters to do it this way. Who + * knows. In earlier versions of the PIC patches, the + * pcrel_adjust field was used to store the correction, but + * since the expression is not pcrel, I felt it would be + * confusing to do it this way. */ + if (reloc_type == BFD_RELOC_32 && GOT_symbol && GOT_symbol == i.op[n].imms->X_add_symbol @@ -3335,11 +3422,26 @@ output_imm () (i.op[n].imms->X_op_symbol)->X_op) == O_subtract)))) { + offsetT add; + + if (insn_start_frag == frag_now) + add = (p - frag_now->fr_literal) - insn_start_off; + else + { + fragS *fr; + + add = insn_start_frag->fr_fix - insn_start_off; + for (fr = insn_start_frag->fr_next; + fr && fr != frag_now; fr = fr->fr_next) + add += fr->fr_fix; + add += p - frag_now->fr_literal; + } + /* We don't support dynamic linking on x86-64 yet. */ if (flag_code == CODE_64BIT) abort (); reloc_type = BFD_RELOC_386_GOTPC; - i.op[n].imms->X_add_number += 3; + i.op[n].imms->X_add_number += add; } #endif fix_new_exp (frag_now, p - frag_now->fr_literal, size, @@ -3371,10 +3473,18 @@ lex_got (reloc, adjust) const char *str; const RELOC_ENUM rel[NUM_FLAG_CODE]; } gotrel[] = { - { "PLT", { BFD_RELOC_386_PLT32, 0, BFD_RELOC_X86_64_PLT32 } }, - { "GOTOFF", { BFD_RELOC_386_GOTOFF, 0, 0 } }, - { "GOTPCREL", { 0, 0, BFD_RELOC_X86_64_GOTPCREL } }, - { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } } + { "PLT", { BFD_RELOC_386_PLT32, 0, BFD_RELOC_X86_64_PLT32 } }, + { "GOTOFF", { BFD_RELOC_386_GOTOFF, 0, 0 } }, + { "GOTPCREL", { 0, 0, BFD_RELOC_X86_64_GOTPCREL } }, + { "TLSGD", { BFD_RELOC_386_TLS_GD, 0, 0 } }, + { "TLSLDM", { BFD_RELOC_386_TLS_LDM, 0, 0 } }, + { "GOTTPOFF", { BFD_RELOC_386_TLS_IE_32, 0, 0 } }, + { "TPOFF", { BFD_RELOC_386_TLS_LE_32, 0, 0 } }, + { "NTPOFF", { BFD_RELOC_386_TLS_LE, 0, 0 } }, + { "DTPOFF", { BFD_RELOC_386_TLS_LDO_32, 0, 0 } }, + { "GOTNTPOFF",{ BFD_RELOC_386_TLS_GOTIE, 0, 0 } }, + { "INDNTPOFF",{ BFD_RELOC_386_TLS_IE, 0, 0 } }, + { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } } }; char *cp; unsigned int j; @@ -3557,6 +3667,7 @@ i386_immediate (imm_start) #ifdef BFD_ASSEMBLER && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif + && exp_seg != absolute_section && exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section @@ -3771,10 +3882,15 @@ i386_displacement (disp_start, disp_end) #ifdef BFD_ASSEMBLER && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif + && exp_seg != absolute_section && exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section - && exp_seg != undefined_section) + && exp_seg != undefined_section +#ifdef BFD_ASSEMBLER + && !bfd_is_com_section (exp_seg) +#endif + ) { #ifdef BFD_ASSEMBLER as_bad (_("unimplemented segment %s in operand"), exp_seg->name); @@ -4200,8 +4316,9 @@ md_estimate_size_before_relax (fragP, segment) shared library. */ if (S_GET_SEGMENT (fragP->fr_symbol) != segment #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) - || S_IS_EXTERNAL (fragP->fr_symbol) - || S_IS_WEAK (fragP->fr_symbol) + || (OUTPUT_FLAVOR == bfd_target_elf_flavour + && (S_IS_EXTERNAL (fragP->fr_symbol) + || S_IS_WEAK (fragP->fr_symbol))) #endif ) { @@ -4258,11 +4375,14 @@ md_estimate_size_before_relax (fragP, segment) case COND_JUMP: if (no_cond_jump_promotion && fragP->fr_var == NO_RELOC) { + fixS *fixP; + fragP->fr_fix += 1; - fix_new (fragP, old_fr_fix, 1, - fragP->fr_symbol, - fragP->fr_offset, 1, - BFD_RELOC_8_PCREL); + fixP = fix_new (fragP, old_fr_fix, 1, + fragP->fr_symbol, + fragP->fr_offset, 1, + BFD_RELOC_8_PCREL); + fixP->fx_signed = 1; break; } @@ -4448,12 +4568,12 @@ md_apply_fix3 (fixP, valP, seg) /* The fix we're to put in. */ fixS *fixP; /* Pointer to the value of the bits. */ - valueT * valP; + valueT *valP; /* Segment fix is from. */ segT seg ATTRIBUTE_UNUSED; { char *p = fixP->fx_where + fixP->fx_frag->fr_literal; - valueT value = * valP; + valueT value = *valP; #if defined (BFD_ASSEMBLER) && !defined (TE_Mach) if (fixP->fx_pcrel) @@ -4475,15 +4595,16 @@ md_apply_fix3 (fixP, valP, seg) } } - /* This is a hack. There should be a better way to handle this. - This covers for the fact that bfd_install_relocation will - subtract the current location (for partial_inplace, PC relative - relocations); see more below. */ - if ((fixP->fx_r_type == BFD_RELOC_32_PCREL - || fixP->fx_r_type == BFD_RELOC_16_PCREL - || fixP->fx_r_type == BFD_RELOC_8_PCREL) - && fixP->fx_addsy && !use_rela_relocations) + if (fixP->fx_pcrel + && (fixP->fx_r_type == BFD_RELOC_32_PCREL + || fixP->fx_r_type == BFD_RELOC_16_PCREL + || fixP->fx_r_type == BFD_RELOC_8_PCREL) + && !use_rela_relocations) { + /* This is a hack. There should be a better way to handle this. + This covers for the fact that bfd_install_relocation will + subtract the current location (for partial_inplace, PC relative + relocations); see more below. */ #ifndef OBJ_AOUT if (OUTPUT_FLAVOR == bfd_target_elf_flavour #ifdef TE_PE @@ -4534,55 +4655,16 @@ md_apply_fix3 (fixP, valP, seg) runtime we merely add the offset to the actual PLT entry. */ value = -4; break; - case BFD_RELOC_386_GOTPC: - -/* This is tough to explain. We end up with this one if we have - * operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal - * here is to obtain the absolute address of the GOT, and it is strongly - * preferable from a performance point of view to avoid using a runtime - * relocation for this. The actual sequence of instructions often look - * something like: - * - * call .L66 - * .L66: - * popl %ebx - * addl $_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx - * - * The call and pop essentially return the absolute address of - * the label .L66 and store it in %ebx. The linker itself will - * ultimately change the first operand of the addl so that %ebx points to - * the GOT, but to keep things simple, the .o file must have this operand - * set so that it generates not the absolute address of .L66, but the - * absolute address of itself. This allows the linker itself simply - * treat a GOTPC relocation as asking for a pcrel offset to the GOT to be - * added in, and the addend of the relocation is stored in the operand - * field for the instruction itself. - * - * Our job here is to fix the operand so that it would add the correct - * offset so that %ebx would point to itself. The thing that is tricky is - * that .-.L66 will point to the beginning of the instruction, so we need - * to further modify the operand so that it will point to itself. - * There are other cases where you have something like: - * - * .long $_GLOBAL_OFFSET_TABLE_+[.-.L66] - * - * and here no correction would be required. Internally in the assembler - * we treat operands of this form as not being pcrel since the '.' is - * explicitly mentioned, and I wonder whether it would simplify matters - * to do it this way. Who knows. In earlier versions of the PIC patches, - * the pcrel_adjust field was used to store the correction, but since the - * expression is not pcrel, I felt it would be confusing to do it this - * way. */ - - value -= 1; - break; + case BFD_RELOC_386_GOT32: + case BFD_RELOC_386_TLS_GD: + case BFD_RELOC_386_TLS_LDM: + case BFD_RELOC_386_TLS_IE_32: + case BFD_RELOC_386_TLS_IE: + case BFD_RELOC_386_TLS_GOTIE: case BFD_RELOC_X86_64_GOT32: value = 0; /* Fully resolved at runtime. No addend. */ break; - case BFD_RELOC_386_GOTOFF: - case BFD_RELOC_X86_64_GOTPCREL: - break; case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: @@ -4593,11 +4675,11 @@ md_apply_fix3 (fixP, valP, seg) break; } #endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - * valP = value; + *valP = value; #endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ /* Are we finished with this relocation now? */ - if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + if (fixP->fx_addsy == NULL) fixP->fx_done = 1; #ifdef BFD_ASSEMBLER else if (use_rela_relocations) @@ -4875,7 +4957,7 @@ i386_target_format () { if (flag_code == CODE_64BIT) use_rela_relocations = 1; - return flag_code == CODE_64BIT ? "elf64-x86-64" : "elf32-i386"; + return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT; } #endif default: @@ -5045,6 +5127,14 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_386_GOT32: case BFD_RELOC_386_GOTOFF: case BFD_RELOC_386_GOTPC: + case BFD_RELOC_386_TLS_GD: + case BFD_RELOC_386_TLS_LDM: + case BFD_RELOC_386_TLS_LDO_32: + case BFD_RELOC_386_TLS_IE_32: + case BFD_RELOC_386_TLS_IE: + case BFD_RELOC_386_TLS_GOTIE: + case BFD_RELOC_386_TLS_LE_32: + case BFD_RELOC_386_TLS_LE: case BFD_RELOC_X86_64_32S: case BFD_RELOC_RVA: case BFD_RELOC_VTABLE_ENTRY: @@ -5110,10 +5200,7 @@ tc_gen_reloc (section, fixp) if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) rel->address = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend = fixp->fx_addnumber; - else - rel->addend = 0; + rel->addend = 0; } /* Use the rela in 64bit mode. */ else diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h index 61b5bb9..c36fff3 100644 --- a/contrib/binutils/gas/config/tc-i386.h +++ b/contrib/binutils/gas/config/tc-i386.h @@ -98,13 +98,20 @@ extern unsigned long i386_mach PARAMS ((void)); #define AOUT_TARGET_FORMAT "a.out-i386" #endif +#ifdef TE_FreeBSD +#define ELF_TARGET_FORMAT "elf32-i386-freebsd" +#endif +#ifndef ELF_TARGET_FORMAT +#define ELF_TARGET_FORMAT "elf32-i386" +#endif + #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) extern const char *i386_target_format PARAMS ((void)); #define TARGET_FORMAT i386_target_format () #else #ifdef OBJ_ELF -#define TARGET_FORMAT "elf32-i386" +#define TARGET_FORMAT ELF_TARGET_FORMAT #endif #ifdef OBJ_AOUT #define TARGET_FORMAT AOUT_TARGET_FORMAT @@ -116,6 +123,8 @@ extern const char *i386_target_format PARAMS ((void)); extern void i386_elf_emit_arch_note PARAMS ((void)); #endif +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0 + #else /* ! BFD_ASSEMBLER */ /* COFF STUFF */ @@ -131,7 +140,7 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); #ifdef TE_GO32 /* DJGPP now expects some sections to be 2**4 aligned. */ -#define SUB_SEGMENT_ALIGN(SEG) \ +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ ((strcmp (obj_segment_name (SEG), ".text") == 0 \ || strcmp (obj_segment_name (SEG), ".data") == 0 \ || strcmp (obj_segment_name (SEG), ".bss") == 0 \ @@ -141,7 +150,7 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); ? 4 \ : 2) #else -#define SUB_SEGMENT_ALIGN(SEG) 2 +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 2 #endif #define TC_RVA_RELOC 7 @@ -169,8 +178,15 @@ extern void x86_cons_fix_new PARAMS ((fragS *, unsigned int, unsigned int, expressionS *)); #endif -#define TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp) -extern int tc_i386_force_relocation PARAMS ((struct fix *)); +#ifdef BFD_ASSEMBLER +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ + || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) +#else +/* For COFF. */ +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == 7) +#endif #ifdef BFD_ASSEMBLER #define NO_RELOC BFD_RELOC_NONE diff --git a/contrib/binutils/gas/config/tc-ia64.c b/contrib/binutils/gas/config/tc-ia64.c index adffb06..ae26ada 100644 --- a/contrib/binutils/gas/config/tc-ia64.c +++ b/contrib/binutils/gas/config/tc-ia64.c @@ -77,6 +77,8 @@ enum special_section enum reloc_func { + FUNC_DTP_MODULE, + FUNC_DTP_RELATIVE, FUNC_FPTR_RELATIVE, FUNC_GP_RELATIVE, FUNC_LT_RELATIVE, @@ -84,8 +86,12 @@ enum reloc_func FUNC_PLT_RELATIVE, FUNC_SEC_RELATIVE, FUNC_SEG_RELATIVE, + FUNC_TP_RELATIVE, FUNC_LTV_RELATIVE, FUNC_LT_FPTR_RELATIVE, + FUNC_LT_DTP_MODULE, + FUNC_LT_DTP_RELATIVE, + FUNC_LT_TP_RELATIVE, FUNC_IPLT_RELOC, }; @@ -476,6 +482,8 @@ static struct pseudo_func[] = { /* reloc pseudo functions (these must come first!): */ + { "dtpmod", PSEUDO_FUNC_RELOC, { 0 } }, + { "dtprel", PSEUDO_FUNC_RELOC, { 0 } }, { "fptr", PSEUDO_FUNC_RELOC, { 0 } }, { "gprel", PSEUDO_FUNC_RELOC, { 0 } }, { "ltoff", PSEUDO_FUNC_RELOC, { 0 } }, @@ -483,8 +491,12 @@ pseudo_func[] = { "pltoff", PSEUDO_FUNC_RELOC, { 0 } }, { "secrel", PSEUDO_FUNC_RELOC, { 0 } }, { "segrel", PSEUDO_FUNC_RELOC, { 0 } }, + { "tprel", PSEUDO_FUNC_RELOC, { 0 } }, { "ltv", PSEUDO_FUNC_RELOC, { 0 } }, { "", 0, { 0 } }, /* placeholder for FUNC_LT_FPTR_RELATIVE */ + { "", 0, { 0 } }, /* placeholder for FUNC_LT_DTP_MODULE */ + { "", 0, { 0 } }, /* placeholder for FUNC_LT_DTP_RELATIVE */ + { "", 0, { 0 } }, /* placeholder for FUNC_LT_TP_RELATIVE */ { "iplt", PSEUDO_FUNC_RELOC, { 0 } }, /* mbtype4 constants: */ @@ -880,7 +892,7 @@ static void free_saved_prologue_counts PARAMS ((void)); /* Build the unwind section name by appending the (possibly stripped) text section NAME to the unwind PREFIX. The resulting string pointer is assigned to RESULT. The string is allocated on the - stack, so this must be a macro... */ + stack, so this must be a macro... */ #define make_unw_section_name(special, text_name, result) \ { \ const char *_prefix = special_section_name[special]; \ @@ -943,7 +955,7 @@ ia64_elf_section_letter (letter, ptr_msg) if (letter == 's') return SHF_IA_64_SHORT; - *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string"); + *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S,G,T in string"); return 0; } @@ -961,11 +973,11 @@ ia64_elf_section_flags (flags, attr, type) int ia64_elf_section_type (str, len) - const char *str; - size_t len; + const char *str; + size_t len; { #define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0)) - + if (STREQ (ELF_STRING_ia64_unwind_info)) return SHT_PROGBITS; @@ -980,10 +992,10 @@ ia64_elf_section_type (str, len) if (STREQ ("init_array")) return SHT_INIT_ARRAY; - + if (STREQ ("fini_array")) return SHT_FINI_ARRAY; - + return -1; #undef STREQ } @@ -2821,12 +2833,12 @@ setup_unwind_header (int size, unsigned char **mem) if (x != 0) extra = md.pointer_size - x; - /* Add 8 for the header + a pointer for the + /* Add 8 for the header + a pointer for the personality offset. */ *mem = xmalloc (size + extra + 8 + md.pointer_size); /* Clear the padding area and personality. */ - memset (*mem + 8 + size, 0 , extra + md.pointer_size); + memset (*mem + 8 + size, 0, extra + md.pointer_size); /* Initialize the header area. */ if (unwind.personality_routine) @@ -3288,7 +3300,7 @@ generate_unwind_image (text_name) /* Add the personality address to the image. */ if (unwind.personality_routine != 0) { - exp.X_op = O_symbol; + exp.X_op = O_symbol; exp.X_add_symbol = unwind.personality_routine; exp.X_add_number = 0; @@ -3299,7 +3311,7 @@ generate_unwind_image (text_name) else reloc = BFD_RELOC_IA64_LTOFF_FPTR32MSB; } - else + else { if (md.flags & EF_IA_64_ABI64) reloc = BFD_RELOC_IA64_LTOFF_FPTR64LSB; @@ -3308,7 +3320,7 @@ generate_unwind_image (text_name) } fix_new_exp (frag_now, frag_now_fix () - md.pointer_size, - md.pointer_size, & exp, 0, reloc); + md.pointer_size, &exp, 0, reloc); unwind.personality_routine = 0; } } @@ -3771,7 +3783,7 @@ save_prologue_count (lbl, count) lpc->prologue_count = count; else { - label_prologue_count * new_lpc = xmalloc (sizeof (* new_lpc)); + label_prologue_count *new_lpc = xmalloc (sizeof (* new_lpc)); new_lpc->next = unwind.saved_prologue_counts; new_lpc->label_number = lbl; @@ -3783,8 +3795,8 @@ save_prologue_count (lbl, count) static void free_saved_prologue_counts () { - label_prologue_count * lpc = unwind.saved_prologue_counts; - label_prologue_count * next; + label_prologue_count *lpc = unwind.saved_prologue_counts; + label_prologue_count *next; while (lpc != NULL) { @@ -4020,7 +4032,7 @@ dot_endp (dummy) lets GNU ld support programs with multiple segments containing unwind info (as might be the case for certain embedded applications). - + (c) An error is issued if there would be a name clash. */ text_name = segment_name (saved_seg); @@ -4060,7 +4072,7 @@ dot_endp (dummy) where = frag_now_fix () - (3 * md.pointer_size); bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8; - /* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */ + /* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */ e.X_op = O_pseudo_fixup; e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym; e.X_add_number = 0; @@ -5137,7 +5149,7 @@ operand_match (idesc, index, e) case IA64_OPND_R3_2: if (e->X_op == O_register && e->X_add_number >= REG_GR) - { + { if (e->X_add_number < REG_GR + 4) return OPERAND_MATCH; else if (e->X_add_number < REG_GR + 128) @@ -5807,7 +5819,7 @@ errata_nop_necessary_p (slot, insn_unit) && strncmp (idesc->name, "ptr", 3) != 0 && strncmp (idesc->name, "ptc", 3) != 0 && strncmp (idesc->name, "probe", 5) != 0) - return 0; + return 0; } if (prev_group->g_reg_set_conditionally[regno]) return 1; @@ -6199,12 +6211,12 @@ emit_one_bundle () continue; /* try next slot */ } - { - bfd_vma addr; + { + bfd_vma addr; - addr = frag_now->fr_address + frag_now_fix () - 16 + i; - dwarf2_gen_line_info (addr, &md.slot[curr].debug_line); - } + addr = frag_now->fr_address + frag_now_fix () - 16 + i; + dwarf2_gen_line_info (addr, &md.slot[curr].debug_line); + } if (errata_nop_necessary_p (md.slot + curr, insn_unit)) as_warn (_("Additional NOP may be necessary to workaround Itanium processor A/B step errata")); @@ -6494,6 +6506,14 @@ md_begin () bfd_set_section_alignment (stdoutput, text_section, 4); target_big_endian = TARGET_BYTES_BIG_ENDIAN; + pseudo_func[FUNC_DTP_MODULE].u.sym = + symbol_new (".<dtpmod>", undefined_section, FUNC_DTP_MODULE, + &zero_address_frag); + + pseudo_func[FUNC_DTP_RELATIVE].u.sym = + symbol_new (".<dtprel>", undefined_section, FUNC_DTP_RELATIVE, + &zero_address_frag); + pseudo_func[FUNC_FPTR_RELATIVE].u.sym = symbol_new (".<fptr>", undefined_section, FUNC_FPTR_RELATIVE, &zero_address_frag); @@ -6522,6 +6542,10 @@ md_begin () symbol_new (".<segrel>", undefined_section, FUNC_SEG_RELATIVE, &zero_address_frag); + pseudo_func[FUNC_TP_RELATIVE].u.sym = + symbol_new (".<tprel>", undefined_section, FUNC_TP_RELATIVE, + &zero_address_frag); + pseudo_func[FUNC_LTV_RELATIVE].u.sym = symbol_new (".<ltv>", undefined_section, FUNC_LTV_RELATIVE, &zero_address_frag); @@ -6530,6 +6554,18 @@ md_begin () symbol_new (".<ltoff.fptr>", undefined_section, FUNC_LT_FPTR_RELATIVE, &zero_address_frag); + pseudo_func[FUNC_LT_DTP_MODULE].u.sym = + symbol_new (".<ltoff.dtpmod>", undefined_section, FUNC_LT_DTP_MODULE, + &zero_address_frag); + + pseudo_func[FUNC_LT_DTP_RELATIVE].u.sym = + symbol_new (".<ltoff.dptrel>", undefined_section, FUNC_LT_DTP_RELATIVE, + &zero_address_frag); + + pseudo_func[FUNC_LT_TP_RELATIVE].u.sym = + symbol_new (".<ltoff.tprel>", undefined_section, FUNC_LT_TP_RELATIVE, + &zero_address_frag); + pseudo_func[FUNC_IPLT_RELOC].u.sym = symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC, &zero_address_frag); @@ -7459,7 +7495,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) } else { - for (i = idesc->num_outputs;i < NELEMS (idesc->operands); i++) + for (i = idesc->num_outputs; i < NELEMS (idesc->operands); i++) if (idesc->operands[i] == IA64_OPND_B1 || idesc->operands[i] == IA64_OPND_B2) { @@ -7981,7 +8017,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) && idesc->operands[0] == IA64_OPND_PR) { mask = CURR_SLOT.opnd[2].X_add_number; - if (mask & ((valueT) 1<<16)) + if (mask & ((valueT) 1 << 16)) for (i = 16; i < 63; i++) { specs[count] = tmpl; @@ -8472,13 +8508,13 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) specs[count++] = tmpl; } else if (note == 7) - { - valueT mask = 0; - if (idesc->operands[2] == IA64_OPND_IMM17) - mask = CURR_SLOT.opnd[2].X_add_number; - if (mask & ((valueT) 1 << 63)) + { + valueT mask = 0; + if (idesc->operands[2] == IA64_OPND_IMM17) + mask = CURR_SLOT.opnd[2].X_add_number; + if (mask & ((valueT) 1 << 63)) specs[count++] = tmpl; - } + } else if (note == 11) { if ((idesc->operands[0] == IA64_OPND_P1 @@ -8500,8 +8536,8 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) { if (rsrc_write) { - int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P; - int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P; + int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P; + int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P; int or_andcm = strstr (idesc->name, "or.andcm") != NULL; int and_orcm = strstr (idesc->name, "and.orcm") != NULL; @@ -8509,7 +8545,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) && (idesc->operands[0] == IA64_OPND_P1 || idesc->operands[0] == IA64_OPND_P2)) { - specs[count] = tmpl; + specs[count] = tmpl; specs[count++].cmp_type = (or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE)); } @@ -8517,7 +8553,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) && (idesc->operands[1] == IA64_OPND_P1 || idesc->operands[1] == IA64_OPND_P2)) { - specs[count] = tmpl; + specs[count] = tmpl; specs[count++].cmp_type = (or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE)); } @@ -8756,8 +8792,8 @@ add_qp_mutex (mask) static int has_suffix_p (name, suffix) - const char *name; - const char *suffix; + const char *name; + const char *suffix; { size_t namelen = strlen (name); size_t sufflen = strlen (suffix); @@ -9826,11 +9862,22 @@ md_operand (e) as_bad ("Not a symbolic expression"); goto err; } - if (S_GET_VALUE (e->X_op_symbol) == FUNC_FPTR_RELATIVE - && i == FUNC_LT_RELATIVE) - i = FUNC_LT_FPTR_RELATIVE; - else + if (i != FUNC_LT_RELATIVE) + { + as_bad ("Illegal combination of relocation functions"); + goto err; + } + switch (S_GET_VALUE (e->X_op_symbol)) { + case FUNC_FPTR_RELATIVE: + i = FUNC_LT_FPTR_RELATIVE; break; + case FUNC_DTP_MODULE: + i = FUNC_LT_DTP_MODULE; break; + case FUNC_DTP_RELATIVE: + i = FUNC_LT_DTP_RELATIVE; break; + case FUNC_TP_RELATIVE: + i = FUNC_LT_TP_RELATIVE; break; + default: as_bad ("Illegal combination of relocation functions"); goto err; } @@ -9986,26 +10033,27 @@ ia64_cons_fix_new (f, where, nbytes, exp) break; case 8: - /* In 32-bit mode, data8 could mean function descriptors too. */ + /* In 32-bit mode, data8 could mean function descriptors too. */ if (exp->X_op == O_pseudo_fixup - && exp->X_op_symbol - && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC - && !(md.flags & EF_IA_64_ABI64)) - { - if (target_big_endian) - code = BFD_RELOC_IA64_IPLTMSB; - else - code = BFD_RELOC_IA64_IPLTLSB; - exp->X_op = O_symbol; - break; - } - else { - if (target_big_endian) - code = BFD_RELOC_IA64_DIR64MSB; - else - code = BFD_RELOC_IA64_DIR64LSB; - break; - } + && exp->X_op_symbol + && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC + && !(md.flags & EF_IA_64_ABI64)) + { + if (target_big_endian) + code = BFD_RELOC_IA64_IPLTMSB; + else + code = BFD_RELOC_IA64_IPLTLSB; + exp->X_op = O_symbol; + break; + } + else + { + if (target_big_endian) + code = BFD_RELOC_IA64_DIR64MSB; + else + code = BFD_RELOC_IA64_DIR64LSB; + break; + } case 16: if (exp->X_op == O_pseudo_fixup @@ -10162,8 +10210,66 @@ ia64_gen_real_reloc_type (sym, r_type) } break; - case FUNC_IPLT_RELOC: - break; + case FUNC_TP_RELATIVE: + switch (r_type) + { + case BFD_RELOC_IA64_IMM14: + new = BFD_RELOC_IA64_TPREL14; break; + case BFD_RELOC_IA64_IMM22: + new = BFD_RELOC_IA64_TPREL22; break; + case BFD_RELOC_IA64_IMM64: + new = BFD_RELOC_IA64_TPREL64I; break; + default: + break; + } + break; + + case FUNC_LT_TP_RELATIVE: + switch (r_type) + { + case BFD_RELOC_IA64_IMM22: + new = BFD_RELOC_IA64_LTOFF_TPREL22; break; + default: + break; + } + break; + + case FUNC_LT_DTP_MODULE: + switch (r_type) + { + case BFD_RELOC_IA64_IMM22: + new = BFD_RELOC_IA64_LTOFF_DTPMOD22; break; + default: + break; + } + break; + + case FUNC_DTP_RELATIVE: + switch (r_type) + { + case BFD_RELOC_IA64_IMM14: + new = BFD_RELOC_IA64_DTPREL14; break; + case BFD_RELOC_IA64_IMM22: + new = BFD_RELOC_IA64_DTPREL22; break; + case BFD_RELOC_IA64_IMM64: + new = BFD_RELOC_IA64_DTPREL64I; break; + default: + break; + } + break; + + case FUNC_LT_DTP_RELATIVE: + switch (r_type) + { + case BFD_RELOC_IA64_IMM22: + new = BFD_RELOC_IA64_LTOFF_DTPREL22; break; + default: + break; + } + break; + + case FUNC_IPLT_RELOC: + break; default: abort (); @@ -10267,11 +10373,11 @@ fix_insn (fix, odesc, value) void md_apply_fix3 (fix, valP, seg) fixS *fix; - valueT * valP; + valueT *valP; segT seg ATTRIBUTE_UNUSED; { char *fixpos; - valueT value = * valP; + valueT value = *valP; int adjust = 0; fixpos = fix->fx_frag->fr_literal + fix->fx_where; diff --git a/contrib/binutils/gas/config/tc-ia64.h b/contrib/binutils/gas/config/tc-ia64.h index 7b03e26..2da3285 100644 --- a/contrib/binutils/gas/config/tc-ia64.h +++ b/contrib/binutils/gas/config/tc-ia64.h @@ -19,8 +19,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <opcode/ia64.h> -#include <elf/ia64.h> +#include "opcode/ia64.h" +#include "elf/ia64.h" #define TC_IA64 @@ -249,7 +249,7 @@ typedef struct unwind_record } record; } unwind_record; -/* This expression evaluates to false if the relocation is for a local +/* This expression evaluates to false if the relocation is for a local object for which we still want to do the relocation at runtime. True if we are willing to perform this relocation while building the .o file. This is only used for pcrel relocations. */ diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c index f7872a0..c743c54 100644 --- a/contrib/binutils/gas/config/tc-ppc.c +++ b/contrib/binutils/gas/config/tc-ppc.c @@ -232,7 +232,7 @@ const pseudo_typeS md_pseudo_table[] = { "rdata", ppc_elf_rdata, 0 }, { "rodata", ppc_elf_rdata, 0 }, { "lcomm", ppc_elf_lcomm, 0 }, - { "file", dwarf2_directive_file, 0 }, + { "file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 }, { "loc", dwarf2_directive_loc, 0 }, #endif @@ -695,16 +695,10 @@ ppc_parse_name (name, expr) /* The type of processor we are assembling for. This is one or more of the PPC_OPCODE flags defined in opcode/ppc.h. */ -static int ppc_cpu = 0; +static unsigned long ppc_cpu = 0; -/* The size of the processor we are assembling for. This is either - PPC_OPCODE_32 or PPC_OPCODE_64. */ -static unsigned long ppc_size = (BFD_DEFAULT_TARGET_SIZE == 64 - ? PPC_OPCODE_64 - : PPC_OPCODE_32); - -/* Whether to target xcoff64. */ -static int ppc_xcoff64 = 0; +/* Whether to target xcoff64/elf64. */ +static unsigned int ppc_obj64 = BFD_DEFAULT_TARGET_SIZE == 64; /* Opcode hash table. */ static struct hash_control *ppc_hash; @@ -858,44 +852,41 @@ md_parse_option (c, arg) /* a64 and a32 determine whether to use XCOFF64 or XCOFF32. */ case 'a': if (strcmp (arg, "64") == 0) - ppc_xcoff64 = 1; + ppc_obj64 = 1; else if (strcmp (arg, "32") == 0) - ppc_xcoff64 = 0; + ppc_obj64 = 0; else return 0; break; case 'm': - /* Most CPU's are 32 bit. Exceptions are listed below. */ - ppc_size = PPC_OPCODE_32; - /* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2 (RIOS2). */ if (strcmp (arg, "pwrx") == 0 || strcmp (arg, "pwr2") == 0) - ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_POWER2; + ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_32; /* -mpwr means to assemble for the IBM POWER (RIOS1). */ else if (strcmp (arg, "pwr") == 0) - ppc_cpu = PPC_OPCODE_POWER; + ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_32; /* -m601 means to assemble for the PowerPC 601, which includes instructions that are holdovers from the Power. */ else if (strcmp (arg, "601") == 0) - ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601; + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_32; /* -mppc, -mppc32, -m603, and -m604 mean to assemble for the PowerPC 603/604. */ else if (strcmp (arg, "ppc") == 0 || strcmp (arg, "ppc32") == 0 || strcmp (arg, "603") == 0 || strcmp (arg, "604") == 0) - ppc_cpu = PPC_OPCODE_PPC; + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_32; /* -m403 and -m405 mean to assemble for the PowerPC 403/405. */ else if (strcmp (arg, "403") == 0 || strcmp (arg, "405") == 0) - ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_403; + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_403 | PPC_OPCODE_32; else if (strcmp (arg, "7400") == 0 || strcmp (arg, "7410") == 0 || strcmp (arg, "7450") == 0 || strcmp (arg, "7455") == 0) - ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC; + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC | PPC_OPCODE_32; else if (strcmp (arg, "altivec") == 0) { if (ppc_cpu == 0) @@ -908,36 +899,32 @@ md_parse_option (c, arg) else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0) { ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64; - ppc_size = PPC_OPCODE_64; } else if (strcmp (arg, "ppc64bridge") == 0) { ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64_BRIDGE | PPC_OPCODE_64; - ppc_size = PPC_OPCODE_64; } /* -mbooke/-mbooke32 mean enable 32-bit BookE support. */ else if (strcmp (arg, "booke") == 0 || strcmp (arg, "booke32") == 0) - ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE; + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_32; /* -mbooke64 means enable 64-bit BookE support. */ else if (strcmp (arg, "booke64") == 0) { - ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64 | PPC_OPCODE_64; - ppc_size = PPC_OPCODE_64; } else if (strcmp (arg, "power4") == 0) { ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64 | PPC_OPCODE_POWER4; - ppc_size = PPC_OPCODE_64; } /* -mcom means assemble for the common intersection between Power and PowerPC. At present, we just allow the union, rather than the intersection. */ else if (strcmp (arg, "com") == 0) - ppc_cpu = PPC_OPCODE_COMMON; + ppc_cpu = PPC_OPCODE_COMMON | PPC_OPCODE_32; /* -many means to assemble for any architecture (PWR/PWRX/PPC). */ else if (strcmp (arg, "any") == 0) - ppc_cpu = PPC_OPCODE_ANY; + ppc_cpu = PPC_OPCODE_ANY | PPC_OPCODE_32; else if (strcmp (arg, "regnames") == 0) reg_names_p = true; @@ -1077,13 +1064,18 @@ ppc_set_cpu () { if (strncmp (default_os, "aix", 3) == 0 && default_os[3] >= '4' && default_os[3] <= '9') - ppc_cpu = PPC_OPCODE_COMMON; + ppc_cpu = PPC_OPCODE_COMMON | PPC_OPCODE_32; else if (strncmp (default_os, "aix3", 4) == 0) - ppc_cpu = PPC_OPCODE_POWER; + ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_32; else if (strcmp (default_cpu, "rs6000") == 0) - ppc_cpu = PPC_OPCODE_POWER; + ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_32; else if (strncmp (default_cpu, "powerpc", 7) == 0) - ppc_cpu = PPC_OPCODE_PPC; + { + if (default_cpu[7] == '6' && default_cpu[8] == '4') + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64; + else + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_32; + } else as_fatal (_("Unknown default cpu = %s, os = %s"), default_cpu, default_os); @@ -1117,17 +1109,9 @@ ppc_arch () unsigned long ppc_mach () { - return ppc_size == PPC_OPCODE_64 ? 620 : 0; + return ppc_obj64 ? bfd_mach_ppc64 : bfd_mach_ppc; } -#ifdef OBJ_XCOFF -int -ppc_subseg_align () -{ - return ppc_xcoff64 ? 3 : 2; -} -#endif - extern char* ppc_target_format () { @@ -1137,15 +1121,17 @@ ppc_target_format () #elif TE_POWERMAC return "xcoff-powermac"; #else - return ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000"; +# ifdef TE_AIX5 + return (ppc_obj64 ? "aix5coff64-rs6000" : "aixcoff-rs6000"); +# else + return (ppc_obj64 ? "aixcoff64-rs6000" : "aixcoff-rs6000"); +# endif #endif #endif #ifdef OBJ_ELF - boolean is64 = BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64; - return (target_big_endian - ? (is64 ? "elf64-powerpc" : "elf32-powerpc") - : (is64 ? "elf64-powerpcle" : "elf32-powerpcle")); + ? (ppc_obj64 ? "elf64-powerpc" : "elf32-powerpc") + : (ppc_obj64 ? "elf64-powerpcle" : "elf32-powerpcle")); #endif } @@ -1178,10 +1164,19 @@ md_begin () { know ((op->opcode & op->mask) == op->opcode); - if ((op->flags & ppc_cpu) != 0 + if ((op->flags & ppc_cpu & ~(PPC_OPCODE_32 | PPC_OPCODE_64)) != 0 && ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == 0 - || (op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == ppc_size + || ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) + == (ppc_cpu & (PPC_OPCODE_32 | PPC_OPCODE_64))) || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0) + /* Certain instructions (eg: extsw) do not exist in the + 32-bit BookE instruction set, but they do exist in the + 64-bit BookE instruction set, and other PPC instruction + sets. Check to see if the opcode has the BOOKE64 flag set. + If it does make sure that the target CPU is not the BookE32. */ + && ((op->flags & PPC_OPCODE_BOOKE64) == 0 + || (ppc_cpu & PPC_OPCODE_BOOKE64) == PPC_OPCODE_BOOKE64 + || (ppc_cpu & PPC_OPCODE_BOOKE) == 0) && ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0 || ((op->flags & PPC_OPCODE_POWER4) == (ppc_cpu & PPC_OPCODE_POWER4)))) @@ -1276,7 +1271,7 @@ ppc_insert_operand (insn, operand, val, file, line) max = (1 << (operand->bits - 1)) - 1; min = - (1 << (operand->bits - 1)); - if (ppc_size == PPC_OPCODE_32) + if (!ppc_obj64) { /* Some people write 32 bit hex constants with the sign extension done by hand. This shouldn't really be @@ -1318,7 +1313,7 @@ ppc_insert_operand (insn, operand, val, file, line) const char *errmsg; errmsg = NULL; - insn = (*operand->insert) (insn, (long) val, ppc_cpu | ppc_size, &errmsg); + insn = (*operand->insert) (insn, (long) val, ppc_cpu, &errmsg); if (errmsg != (const char *) NULL) as_bad_where (file, line, errmsg); } @@ -1395,7 +1390,8 @@ ppc_elf_suffix (str_p, exp_p) MAP ("bitfld", (int) BFD_RELOC_PPC_EMB_BIT_FLD), MAP ("relsda", (int) BFD_RELOC_PPC_EMB_RELSDA), MAP ("xgot", (int) BFD_RELOC_PPC_TOC16), -#if BFD_DEFAULT_TARGET_SIZE == 64 + /* The following are only valid for ppc64. Negative values are + used instead of a flag. */ MAP ("higher", - (int) BFD_RELOC_PPC64_HIGHER), MAP ("highera", - (int) BFD_RELOC_PPC64_HIGHER_S), MAP ("highest", - (int) BFD_RELOC_PPC64_HIGHEST), @@ -1405,7 +1401,6 @@ ppc_elf_suffix (str_p, exp_p) MAP ("toc@l", - (int) BFD_RELOC_PPC64_TOC16_LO), MAP ("toc@h", - (int) BFD_RELOC_PPC64_TOC16_HI), MAP ("toc@ha", - (int) BFD_RELOC_PPC64_TOC16_HA), -#endif { (char *) 0, 0, (int) BFD_RELOC_UNUSED } }; @@ -1431,9 +1426,9 @@ ppc_elf_suffix (str_p, exp_p) { int reloc = ptr->reloc; - if (BFD_DEFAULT_TARGET_SIZE == 64 && reloc < 0) + if (reloc < 0) { - if (ppc_size != PPC_OPCODE_64) + if (!ppc_obj64) return BFD_RELOC_UNUSED; reloc = -reloc; } @@ -1464,8 +1459,7 @@ ppc_elf_suffix (str_p, exp_p) } *str_p = str; - if (BFD_DEFAULT_TARGET_SIZE == 64 - && reloc == (int) BFD_RELOC_PPC64_TOC + if (reloc == (int) BFD_RELOC_PPC64_TOC && exp_p->X_op == O_symbol) { /* This reloc type ignores the symbol. Change the symbol @@ -1707,24 +1701,50 @@ ppc_elf_validate_fix (fixp, seg) } } -#if BFD_DEFAULT_TARGET_SIZE == 64 -/* Don't emit .TOC. symbol. */ -int -ppc_elf_frob_symbol (sym) - symbolS *sym; +/* Prevent elf_frob_file_before_adjust removing a weak undefined + function descriptor sym if the corresponding code sym is used. */ + +void +ppc_frob_file_before_adjust () { - const char *name; + symbolS *symp; + + if (!ppc_obj64) + return; - name = S_GET_NAME (sym); - if (name != NULL && strcmp (name, ".TOC.") == 0) + for (symp = symbol_rootP; symp; symp = symbol_next (symp)) { - S_CLEAR_EXTERNAL (sym); - return 1; + const char *name; + char *dotname; + symbolS *dotsym; + size_t len; + + name = S_GET_NAME (symp); + if (name[0] == '.') + continue; + + if (! S_IS_WEAK (symp) + || S_IS_DEFINED (symp)) + continue; + + len = strlen (name) + 1; + dotname = xmalloc (len + 1); + dotname[0] = '.'; + memcpy (dotname + 1, name, len); + dotsym = symbol_find (dotname); + free (dotname); + if (dotsym != NULL && (symbol_used_p (dotsym) + || symbol_used_in_reloc_p (dotsym))) + { + symbol_mark_used (symp); + } } - return 0; + /* Don't emit .TOC. symbol. */ + symp = symbol_find (".TOC."); + if (symp != NULL) + symbol_remove (symp, &symbol_rootP, &symbol_lastP); } -#endif #endif /* OBJ_ELF */ #ifdef TE_PE @@ -1904,6 +1924,8 @@ md_assemble (str) if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0) { unsigned int opcount; + unsigned int num_operands_expected; + unsigned int i; /* There is an optional operand. Count the number of commas in the input line. */ @@ -1920,10 +1942,16 @@ md_assemble (str) } } + /* Compute the number of expected operands. + Do not count fake operands. */ + for (num_operands_expected = 0, i = 0; opcode->operands[i]; i ++) + if ((powerpc_operands [opcode->operands[i]].flags & PPC_OPERAND_FAKE) == 0) + ++ num_operands_expected; + /* If there are fewer operands in the line then are called for by the instruction, we want to skip the optional operand. */ - if (opcount < strlen (opcode->operands)) + if (opcount < num_operands_expected) skip_optional = 1; break; @@ -1956,7 +1984,7 @@ md_assemble (str) from the input. */ if ((operand->flags & PPC_OPERAND_FAKE) != 0) { - insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg); + insn = (*operand->insert) (insn, 0L, ppc_cpu, &errmsg); if (errmsg != (const char *) NULL) as_bad (errmsg); continue; @@ -1969,7 +1997,7 @@ md_assemble (str) { if (operand->insert) { - insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg); + insn = (*operand->insert) (insn, 0L, ppc_cpu, &errmsg); if (errmsg != (const char *) NULL) as_bad (errmsg); } @@ -2155,7 +2183,6 @@ md_assemble (str) ex.X_add_number = SEX16 (PPC_HA (ex.X_add_number)); break; -#if BFD_DEFAULT_TARGET_SIZE == 64 case BFD_RELOC_PPC64_HIGHER: if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED)) ex.X_add_number = PPC_HIGHER (ex.X_add_number); @@ -2183,7 +2210,6 @@ md_assemble (str) else ex.X_add_number = SEX16 (PPC_HIGHESTA (ex.X_add_number)); break; -#endif /* BFD_DEFAULT_TARGET_SIZE == 64 */ } #endif /* OBJ_ELF */ insn = ppc_insert_operand (insn, operand, ex.X_add_number, @@ -2215,8 +2241,7 @@ md_assemble (str) } } - if (BFD_DEFAULT_TARGET_SIZE == 64 - && ppc_size == PPC_OPCODE_64 + if (ppc_obj64 && (operand->flags & PPC_OPERAND_DS) != 0) { switch (reloc) @@ -2366,13 +2391,11 @@ md_assemble (str) case BFD_RELOC_HI16: case BFD_RELOC_HI16_S: #ifdef OBJ_ELF -#if BFD_DEFAULT_TARGET_SIZE == 64 case BFD_RELOC_PPC64_HIGHER: case BFD_RELOC_PPC64_HIGHER_S: case BFD_RELOC_PPC64_HIGHEST: case BFD_RELOC_PPC64_HIGHEST_S: #endif -#endif fixP->fx_no_overflow = 1; break; default: @@ -2481,7 +2504,7 @@ ppc_section_letter (letter, ptr_msg) if (letter == 'e') return SHF_EXCLUDE; - *ptr_msg = _("Bad .section directive: want a,e,w,x,M,S in string"); + *ptr_msg = _("Bad .section directive: want a,e,w,x,M,S,G,T in string"); return 0; } @@ -2832,7 +2855,7 @@ ppc_change_csect (sym) symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); - symbol_get_tc (sym)->align = (ppc_xcoff64) ? 3 : 2; + symbol_get_tc (sym)->align = 2; symbol_get_tc (sym)->output = 1; symbol_get_tc (sym)->within = sym; @@ -3210,7 +3233,7 @@ ppc_function (ignore) /* The .bf pseudo-op. This is just like a COFF C_FCN symbol named ".bf". If the pseudo op .bi was seen before .bf, patch the .bi sym with the correct line number */ - + static symbolS *saved_bi_sym = 0; static void @@ -3231,12 +3254,12 @@ ppc_bf (ignore) SA_SET_SYM_LNNO (sym, coff_line_base); /* Line number for bi. */ - if (saved_bi_sym) + if (saved_bi_sym) { S_SET_VALUE (saved_bi_sym, coff_n_line_nos); saved_bi_sym = 0; } - + symbol_get_tc (sym)->output = 1; @@ -3303,7 +3326,7 @@ ppc_biei (ei) symbol_get_tc (sym)->output = 1; /* Save bi. */ - if (ei) + if (ei) saved_bi_sym = 0; else saved_bi_sym = sym; @@ -3656,7 +3679,7 @@ ppc_tc (ignore) ++input_line_pointer; /* Align to a four/eight byte boundary. */ - align = BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64 ? 3 : 2; + align = ppc_obj64 ? 3 : 2; frag_align (align, 0, 0); record_alignment (now_seg, align); #endif /* OBJ_ELF */ @@ -3666,13 +3689,13 @@ ppc_tc (ignore) else { ++input_line_pointer; - cons ((ppc_size == PPC_OPCODE_64) ? 8 : 4); + cons (ppc_obj64 ? 8 : 4); } } /* Pseudo-op .machine. */ /* FIXME: `.machine' is a nop for the moment. It would be nice to - accept this directive on the first line of input and set ppc_size + accept this directive on the first line of input and set ppc_obj64 and the target format accordingly. Unfortunately, the target format is selected in output-file.c:output_file_create before we even get to md_begin, so it's not possible without changing @@ -3696,7 +3719,7 @@ ppc_is_toc_sym (sym) #endif #ifdef OBJ_ELF const char *sname = segment_name (S_GET_SEGMENT (sym)); - if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64) + if (ppc_obj64) return strcmp (sname, ".toc") == 0; else return strcmp (sname, ".got") == 0; @@ -5174,7 +5197,7 @@ md_apply_fix3 (fixP, valP, seg) if ((operand->flags & PPC_OPERAND_PARENS) != 0 && operand->bits == 16 && operand->shift == 0 - && (operand->insert == NULL || ppc_xcoff64) + && (operand->insert == NULL || ppc_obj64) && fixP->fx_addsy != NULL && symbol_get_tc (fixP->fx_addsy)->subseg != 0 && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC @@ -5216,7 +5239,14 @@ md_apply_fix3 (fixP, valP, seg) else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0 && operand->bits == 16 && operand->shift == 0) - fixP->fx_r_type = BFD_RELOC_PPC_B16; + { + fixP->fx_r_type = BFD_RELOC_PPC_B16; +#ifdef OBJ_XCOFF + fixP->fx_size = 2; + if (target_big_endian) + fixP->fx_where += 2; +#endif + } else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0 && operand->bits == 26 && operand->shift == 0) @@ -5224,7 +5254,14 @@ md_apply_fix3 (fixP, valP, seg) else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0 && operand->bits == 16 && operand->shift == 0) - fixP->fx_r_type = BFD_RELOC_PPC_BA16; + { + fixP->fx_r_type = BFD_RELOC_PPC_BA16; +#ifdef OBJ_XCOFF + fixP->fx_size = 2; + if (target_big_endian) + fixP->fx_where += 2; +#endif + } #if defined (OBJ_XCOFF) || defined (OBJ_ELF) else if ((operand->flags & PPC_OPERAND_PARENS) != 0 && operand->bits == 16 @@ -5233,8 +5270,7 @@ md_apply_fix3 (fixP, valP, seg) { fixP->fx_r_type = BFD_RELOC_PPC_TOC16; #ifdef OBJ_ELF - if (BFD_DEFAULT_TARGET_SIZE == 64 - && ppc_size == PPC_OPCODE_64 + if (ppc_obj64 && (operand->flags & PPC_OPERAND_DS) != 0) fixP->fx_r_type = BFD_RELOC_PPC64_TOC16_DS; #endif @@ -5269,7 +5305,7 @@ md_apply_fix3 (fixP, valP, seg) switch (fixP->fx_r_type) { case BFD_RELOC_CTOR: - if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64) + if (ppc_obj64) goto ctor64; /* fall through */ @@ -5322,12 +5358,10 @@ md_apply_fix3 (fixP, valP, seg) case BFD_RELOC_PPC_EMB_RELSDA: case BFD_RELOC_PPC_TOC16: #ifdef OBJ_ELF -#if BFD_DEFAULT_TARGET_SIZE == 64 case BFD_RELOC_PPC64_TOC16_LO: case BFD_RELOC_PPC64_TOC16_HI: case BFD_RELOC_PPC64_TOC16_HA: #endif -#endif if (fixP->fx_pcrel) { if (fixP->fx_addsy != NULL) @@ -5363,7 +5397,6 @@ md_apply_fix3 (fixP, valP, seg) break; #ifdef OBJ_ELF -#if BFD_DEFAULT_TARGET_SIZE == 64 case BFD_RELOC_PPC64_HIGHER: if (fixP->fx_pcrel) abort (); @@ -5421,7 +5454,6 @@ md_apply_fix3 (fixP, valP, seg) } break; #endif -#endif /* Because SDA21 modifies the register field, the size is set to 4 bytes, rather than 2, so offset it here appropriately. */ case BFD_RELOC_PPC_EMB_SDA21: @@ -5487,14 +5519,12 @@ md_apply_fix3 (fixP, valP, seg) break; #ifdef OBJ_ELF -#if BFD_DEFAULT_TARGET_SIZE == 64 /* Generated by reference to `sym@tocbase'. The sym is ignored by the linker. */ case BFD_RELOC_PPC64_TOC: fixP->fx_done = 0; break; #endif -#endif default: fprintf (stderr, _("Gas failure, reloc value %d\n"), fixP->fx_r_type); diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h index f4d2f86..b6dd640 100644 --- a/contrib/binutils/gas/config/tc-ppc.h +++ b/contrib/binutils/gas/config/tc-ppc.h @@ -1,5 +1,5 @@ /* tc-ppc.h -- Header file for tc-ppc.c. - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -196,10 +196,6 @@ extern int ppc_frob_symbol PARAMS ((symbolS *)); #define tc_adjust_symtab() ppc_adjust_symtab () extern void ppc_adjust_symtab PARAMS ((void)); -/* Niclas Andersson <nican@ida.liu.se> says this is needed. */ -extern int ppc_subseg_align PARAMS ((void)); -#define SUB_SEGMENT_ALIGN(SEG) ppc_subseg_align() - /* We also need to copy, in particular, the class of the symbol, over what obj-coff would otherwise have copied. */ #define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \ @@ -223,8 +219,7 @@ do { \ || (FIXP)->fx_r_type == BFD_RELOC_PPC_B16_BRNTAKEN \ || (FIXP)->fx_r_type == BFD_RELOC_PPC_BA16_BRTAKEN \ || (FIXP)->fx_r_type == BFD_RELOC_PPC_BA16_BRNTAKEN \ - || (BFD_DEFAULT_TARGET_SIZE == 64 \ - && (FIXP)->fx_r_type == BFD_RELOC_PPC64_TOC) \ + || (FIXP)->fx_r_type == BFD_RELOC_PPC64_TOC \ || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) @@ -244,24 +239,20 @@ extern int ppc_section_flags PARAMS ((int, int, int)); #define md_elf_section_word(STR, LEN) ppc_section_word (STR, LEN) #define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE) -#if BFD_DEFAULT_TARGET_SIZE == 64 -/* Extra sections for 64-bit ELF PPC. */ -#define ELF_TC_SPECIAL_SECTIONS \ - { ".toc", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE}, \ - { ".tocbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE}, -#else /* Add extra PPC sections -- Note, for now, make .sbss2 and .PPC.EMB.sbss0 a normal section, and not a bss section so that the linker doesn't crater when trying to make more than 2 sections. */ #define ELF_TC_SPECIAL_SECTIONS \ - { ".tags", SHT_ORDERED, SHF_ALLOC }, \ - { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ - { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, \ - { ".sdata2", SHT_PROGBITS, SHF_ALLOC }, \ - { ".sbss2", SHT_PROGBITS, SHF_ALLOC }, \ - { ".PPC.EMB.sdata0", SHT_PROGBITS, SHF_ALLOC }, \ - { ".PPC.EMB.sbss0", SHT_PROGBITS, SHF_ALLOC }, -#endif + { ".tags", SHT_ORDERED, SHF_ALLOC }, \ + { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ + { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, \ + { ".sdata2", SHT_PROGBITS, SHF_ALLOC }, \ + { ".sbss2", SHT_PROGBITS, SHF_ALLOC }, \ + { ".PPC.EMB.sdata0", SHT_PROGBITS, SHF_ALLOC }, \ + { ".PPC.EMB.sbss0", SHT_PROGBITS, SHF_ALLOC }, \ + /* Extra sections for 64-bit ELF PPC. */ \ + { ".toc", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE}, \ + { ".tocbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE}, #define tc_comment_chars ppc_comment_chars extern const char *ppc_comment_chars; @@ -280,11 +271,8 @@ extern int ppc_fix_adjustable PARAMS ((struct fix *)); && S_IS_DEFINED ((FIX)->fx_addsy) \ && ! S_IS_COMMON ((FIX)->fx_addsy))) -#if BFD_DEFAULT_TARGET_SIZE == 64 -/* Finish up the symbol. */ -#define tc_frob_symbol(sym, punt) punt = ppc_elf_frob_symbol (sym) -extern int ppc_elf_frob_symbol PARAMS ((symbolS *)); -#endif +#define tc_frob_file_before_adjust ppc_frob_file_before_adjust +extern void ppc_frob_file_before_adjust PARAMS ((void)); #define DWARF2_LINE_MIN_INSN_LENGTH 4 #endif /* OBJ_ELF */ diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c index 2d75fef..5c610a9 100644 --- a/contrib/binutils/gas/config/tc-sparc.c +++ b/contrib/binutils/gas/config/tc-sparc.c @@ -395,12 +395,12 @@ sparc_target_format () */ #ifdef OBJ_ELF -CONST char *md_shortopts = "A:K:VQ:sq"; +const char *md_shortopts = "A:K:VQ:sq"; #else #ifdef OBJ_AOUT -CONST char *md_shortopts = "A:k"; +const char *md_shortopts = "A:k"; #else -CONST char *md_shortopts = "A:"; +const char *md_shortopts = "A:"; #endif #endif struct option md_longopts[] = { @@ -2916,6 +2916,7 @@ md_apply_fix3 (fixP, valP, segment) && (S_IS_EXTERNAL (sym) || S_IS_WEAK (sym) || (seg->flags & SEC_MERGE) + || (seg->flags & SEC_THREAD_LOCAL) || (sparc_pic_code && ! fixP->fx_pcrel) || (seg != segment && (((bfd_get_section_flags (stdoutput, seg) & SEC_LINK_ONCE) != 0) diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure index 7900e4e..4fcba08 100755 --- a/contrib/binutils/gas/configure +++ b/contrib/binutils/gas/configure @@ -2295,7 +2295,10 @@ for this_target in $target $canon_targets ; do rs6000*) cpu_type=ppc ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; - sh64*) cpu_type=sh64 endian=big;; + sh5*) cpu_type=sh64 endian=big ;; + sh5le*) cpu_type=sh64 endian=little ;; + sh64*) cpu_type=sh64 endian=big ;; + sh64le*) cpu_type=sh64 endian=little ;; sh*le) cpu_type=sh endian=little ;; sh*) cpu_type=sh endian=big ;; sparclite*) cpu_type=sparc arch=sparclite ;; @@ -2317,7 +2320,6 @@ for this_target in $target $canon_targets ; do dev=no bfd_gas=no em=generic - mips_stabs_elf= # assign object format case ${generic_target} in @@ -2330,11 +2332,11 @@ for this_target in $target $canon_targets ; do alpha*-*-*vms*) fmt=evax ;; alpha*-*-netware*) fmt=ecoff ;; - alpha*-*-openbsd*) fmt=ecoff ;; alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; + alpha*-*-openbsd*) fmt=elf em=obsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; @@ -2361,9 +2363,11 @@ for this_target in $target $canon_targets ; do d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; + dlx-*-*) fmt=elf ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + frv-*-*) fmt=elf bfd_gas=yes ;; hppa-*-linux-gnu*) case ${cpu} in hppa*64*) @@ -2374,6 +2378,7 @@ for this_target in $target $canon_targets ; do hppa-*-*elf*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-netbsd*) fmt=elf em=nbsd ;; + hppa-*-openbsd*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; hppa-*-hpux11*) case ${cpu} in @@ -2400,6 +2405,7 @@ for this_target in $target $canon_targets ; do i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;; i386-*-bsd*) fmt=aout em=386bsd ;; i386-*-netbsd0.8) fmt=aout em=386bsd ;; + i386-*-netbsdpe*) fmt=coff em=pe bfd_gas=yes ;; i386-*-netbsd*) em=nbsd bfd_gas=yes case ${cpu} in x86_64) fmt=elf ;; @@ -2451,6 +2457,7 @@ EOF i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-nto-qnx*) fmt=elf ;; i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; i386-*-chaos) fmt=elf ;; @@ -2520,13 +2527,13 @@ EOF mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; - mips*-*-linux*) fmt=elf em=tmips mips_stabs_elf=y ;; + mips*-*-linux*) fmt=elf em=tmips ;; mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-netbsd* | mips-*-openbsd*) fmt=elf ;; - mips-*-vxworks*) fmt=elf mips_stabs_elf=y ;; + mips-*-vxworks*) fmt=elf ;; mmix-*-*) fmt=elf bfd_gas=yes ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; @@ -2537,6 +2544,7 @@ EOF pj*) fmt=elf ;; ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*) fmt=coff em=pe ;; + ppc-*-aix5*) fmt=coff em=aix5 ;; ppc-*-aix*) fmt=coff ;; ppc-*-beos*) fmt=coff ;; ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) @@ -2563,6 +2571,7 @@ EOF fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + ppc-*-windiss*) fmt=elf ;; s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; @@ -2574,16 +2583,18 @@ EOF sh*) endian=little ;; esac ;; + sh5*-*-netbsd*) fmt=elf em=nbsd ;; + sh64*-*-netbsd*) fmt=elf em=nbsd ;; sh*-*-netbsdelf*) fmt=elf em=nbsd ;; sh-*-elf*) fmt=elf ;; - sh-*-coff*) fmt=coff bfd_gas=yes;; + sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtems*) fmt=coff bfd_gas=yes;; + sh-*-rtems*) fmt=coff ;; sh64-*-elf*) fmt=elf ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; - ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; + ns32k-*-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; sparc-*-rtemsaout*) fmt=aout ;; @@ -2608,7 +2619,12 @@ EOF sparc64) fmt=elf ;; esac ;; - sparc-*-openbsd*) fmt=aout em=nbsd ;; + sparc-*-openbsd*) em=nbsd + case ${cpu} in + sparc) fmt=aout ;; + sparc64) fmt=elf ;; + esac + ;; strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; @@ -2625,6 +2641,9 @@ EOF v850e-*-*) fmt=elf bfd_gas=yes ;; v850ea-*-*) fmt=elf bfd_gas=yes ;; + vax-*-netbsdelf*) fmt=elf em=nbsd bfd_gas=yes ;; + vax-*-netbsdaout* | vax-*-netbsd*) + fmt=aout em=nbsd ;; vax-*-bsd* | vax-*-ultrix*) fmt=aout ;; vax-*-vms) fmt=vms ;; @@ -2668,13 +2687,6 @@ EOF fi fi - if test x${mips_stabs_elf} != x; then - cat >> confdefs.h <<\EOF -#define MIPS_STABS_ELF 1 -EOF - - fi - case ${cpu_type}-${fmt} in alpha*-*) bfd_gas=yes ;; arm-*) bfd_gas=yes ;; @@ -2726,6 +2738,9 @@ EOF using_cgen=yes ;; + frv) + using_cgen=yes + ;; m68k) case ${extra_objects} in *m68k-parse.o*) ;; @@ -3107,7 +3122,7 @@ esac case "${need_bfd}" in yes) BFDLIB=../bfd/libbfd.la - ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" + ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h' ;; esac @@ -3140,7 +3155,7 @@ EOF # 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:3144: checking for $ac_word" >&5 +echo "configure:3159: 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 @@ -3170,7 +3185,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:3174: checking for $ac_word" >&5 +echo "configure:3189: 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 @@ -3221,7 +3236,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:3225: checking for $ac_word" >&5 +echo "configure:3240: 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 @@ -3253,7 +3268,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3257: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3272: 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. @@ -3264,12 +3279,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3268 "configure" +#line 3283 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3288: \"$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 @@ -3295,12 +3310,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:3299: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3314: 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:3304: checking whether we are using GNU C" >&5 +echo "configure:3319: 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 @@ -3309,7 +3324,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3313: \"$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:3328: \"$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 @@ -3328,7 +3343,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:3332: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3347: 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 @@ -3365,7 +3380,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:3369: checking for $ac_word" >&5 +echo "configure:3384: 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 @@ -3396,7 +3411,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3400: checking how to run the C preprocessor" >&5 +echo "configure:3415: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3411,13 +3426,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 3415 "configure" +#line 3430 "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:3421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3436: \"$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 : @@ -3428,13 +3443,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 3432 "configure" +#line 3447 "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:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3453: \"$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 : @@ -3445,13 +3460,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 3449 "configure" +#line 3464 "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:3455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3470: \"$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 : @@ -3481,7 +3496,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:3485: checking for $ac_word" >&5 +echo "configure:3500: 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 @@ -3514,7 +3529,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:3518: checking for $ac_word" >&5 +echo "configure:3533: 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 @@ -3548,7 +3563,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3552: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3567: 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 @@ -3556,7 +3571,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 3560 "configure" +#line 3575 "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 @@ -3567,7 +3582,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3586: \"$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 @@ -3590,7 +3605,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3594: checking lex output file root" >&5 +echo "configure:3609: 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 @@ -3611,7 +3626,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:3615: checking whether yytext is a pointer" >&5 +echo "configure:3630: 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 @@ -3623,14 +3638,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 3627 "configure" +#line 3642 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3649: \"$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 @@ -3656,7 +3671,7 @@ ALL_LINGUAS="fr tr es" # 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:3660: checking for $ac_word" >&5 +echo "configure:3675: 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 @@ -3684,12 +3699,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3688: checking for ANSI C header files" >&5 +echo "configure:3703: 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 3693 "configure" +#line 3708 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3697,7 +3712,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3716: \"$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* @@ -3714,7 +3729,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 3718 "configure" +#line 3733 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3732,7 +3747,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 3736 "configure" +#line 3751 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3753,7 +3768,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 3757 "configure" +#line 3772 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3764,7 +3779,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3788,12 +3803,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3792: checking for working const" >&5 +echo "configure:3807: 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 3797 "configure" +#line 3812 "configure" #include "confdefs.h" int main() { @@ -3842,7 +3857,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3863,21 +3878,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3867: checking for inline" >&5 +echo "configure:3882: 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 3874 "configure" +#line 3889 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3903,12 +3918,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3907: checking for off_t" >&5 +echo "configure:3922: 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 3912 "configure" +#line 3927 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3936,12 +3951,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3940: checking for size_t" >&5 +echo "configure:3955: 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 3945 "configure" +#line 3960 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3971,19 +3986,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:3975: checking for working alloca.h" >&5 +echo "configure:3990: 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 3980 "configure" +#line 3995 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4002: \"$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 @@ -4004,12 +4019,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4008: checking for alloca" >&5 +echo "configure:4023: 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 4013 "configure" +#line 4028 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -4037,7 +4052,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4056: \"$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 @@ -4069,12 +4084,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4073: checking whether alloca needs Cray hooks" >&5 +echo "configure:4088: 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 4078 "configure" +#line 4093 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -4099,12 +4114,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:4103: checking for $ac_func" >&5 +echo "configure:4118: 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 4108 "configure" +#line 4123 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4127,7 +4142,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4146: \"$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 @@ -4154,7 +4169,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4158: checking stack direction for C alloca" >&5 +echo "configure:4173: 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 @@ -4162,7 +4177,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 4166 "configure" +#line 4181 "configure" #include "confdefs.h" find_stack_direction () { @@ -4181,7 +4196,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4200: \"$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 @@ -4206,17 +4221,17 @@ 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:4210: checking for $ac_hdr" >&5 +echo "configure:4225: 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 4215 "configure" +#line 4230 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4235: \"$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* @@ -4245,12 +4260,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4249: checking for $ac_func" >&5 +echo "configure:4264: 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 4254 "configure" +#line 4269 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4273,7 +4288,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4292: \"$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 @@ -4298,7 +4313,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4302: checking for working mmap" >&5 +echo "configure:4317: 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 @@ -4306,7 +4321,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 4310 "configure" +#line 4325 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -4459,7 +4474,7 @@ main() } EOF -if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4478: \"$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 @@ -4487,17 +4502,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:4491: checking for $ac_hdr" >&5 +echo "configure:4506: 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 4496 "configure" +#line 4511 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4516: \"$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* @@ -4527,12 +4542,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4531: checking for $ac_func" >&5 +echo "configure:4546: 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 4536 "configure" +#line 4551 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4555,7 +4570,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4574: \"$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 @@ -4584,12 +4599,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4588: checking for $ac_func" >&5 +echo "configure:4603: 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 4593 "configure" +#line 4608 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4612,7 +4627,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4631: \"$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 @@ -4646,19 +4661,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4650: checking for LC_MESSAGES" >&5 +echo "configure:4665: 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 4655 "configure" +#line 4670 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4677: \"$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 @@ -4679,7 +4694,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4683: checking whether NLS is requested" >&5 +echo "configure:4698: 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" @@ -4699,7 +4714,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4703: checking whether included gettext is requested" >&5 +echo "configure:4718: 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" @@ -4718,17 +4733,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4722: checking for libintl.h" >&5 +echo "configure:4737: 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 4727 "configure" +#line 4742 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4747: \"$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* @@ -4745,19 +4760,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:4749: checking for gettext in libc" >&5 +echo "configure:4764: 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 4754 "configure" +#line 4769 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4776: \"$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 @@ -4773,7 +4788,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:4777: checking for bindtextdomain in -lintl" >&5 +echo "configure:4792: 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 @@ -4781,7 +4796,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4785 "configure" +#line 4800 "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 @@ -4792,7 +4807,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4811: \"$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 @@ -4808,19 +4823,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:4812: checking for gettext in libintl" >&5 +echo "configure:4827: 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 4817 "configure" +#line 4832 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4839: \"$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 @@ -4848,7 +4863,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:4852: checking for $ac_word" >&5 +echo "configure:4867: 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 @@ -4882,12 +4897,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4886: checking for $ac_func" >&5 +echo "configure:4901: 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 4891 "configure" +#line 4906 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4910,7 +4925,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4929: \"$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 @@ -4937,7 +4952,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:4941: checking for $ac_word" >&5 +echo "configure:4956: 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 @@ -4973,7 +4988,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:4977: checking for $ac_word" >&5 +echo "configure:4992: 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 @@ -5005,7 +5020,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 5009 "configure" +#line 5024 "configure" #include "confdefs.h" int main() { @@ -5013,7 +5028,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -5045,7 +5060,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:5049: checking for $ac_word" >&5 +echo "configure:5064: 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 @@ -5079,7 +5094,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:5083: checking for $ac_word" >&5 +echo "configure:5098: 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 @@ -5115,7 +5130,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:5119: checking for $ac_word" >&5 +echo "configure:5134: 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 @@ -5205,7 +5220,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5209: checking for catalogs to be installed" >&5 +echo "configure:5224: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -5233,17 +5248,17 @@ echo "configure:5209: 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:5237: checking for linux/version.h" >&5 +echo "configure:5252: 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 5242 "configure" +#line 5257 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5262: \"$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* @@ -5306,7 +5321,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5310: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5325: 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" @@ -5331,7 +5346,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5335: checking for executable suffix" >&5 +echo "configure:5350: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5341,7 +5356,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -5366,17 +5381,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5370: checking for $ac_hdr" >&5 +echo "configure:5385: 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 5375 "configure" +#line 5390 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5395: \"$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* @@ -5406,7 +5421,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:5410: checking whether compiling a cross-assembler" >&5 +echo "configure:5425: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5421,19 +5436,19 @@ echo "$ac_t""$cross_gas" 1>&6 # 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:5425: checking for working alloca.h" >&5 +echo "configure:5440: 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 5430 "configure" +#line 5445 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5452: \"$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 @@ -5454,12 +5469,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5458: checking for alloca" >&5 +echo "configure:5473: 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 5463 "configure" +#line 5478 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -5487,7 +5502,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5506: \"$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 @@ -5519,12 +5534,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5523: checking whether alloca needs Cray hooks" >&5 +echo "configure:5538: 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 5528 "configure" +#line 5543 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -5549,12 +5564,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:5553: checking for $ac_func" >&5 +echo "configure:5568: 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 5558 "configure" +#line 5573 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5577,7 +5592,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5596: \"$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 @@ -5604,7 +5619,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5608: checking stack direction for C alloca" >&5 +echo "configure:5623: 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 @@ -5612,7 +5627,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 5616 "configure" +#line 5631 "configure" #include "confdefs.h" find_stack_direction () { @@ -5631,7 +5646,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5650: \"$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 @@ -5653,21 +5668,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5657: checking for inline" >&5 +echo "configure:5672: 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 5664 "configure" +#line 5679 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5697,12 +5712,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5701: checking for $ac_func" >&5 +echo "configure:5716: 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 5706 "configure" +#line 5721 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5725,7 +5740,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5744: \"$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 @@ -5754,12 +5769,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5758: checking for $ac_func" >&5 +echo "configure:5773: 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 5763 "configure" +#line 5778 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5782,7 +5797,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$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 @@ -5817,7 +5832,7 @@ case $host in ;; *-ncr-sysv4.3*) echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 -echo "configure:5821: checking for _mwvalidcheckl in -lmw" >&5 +echo "configure:5836: checking for _mwvalidcheckl in -lmw" >&5 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5825,7 +5840,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmw $LIBS" cat > conftest.$ac_ext <<EOF -#line 5829 "configure" +#line 5844 "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 @@ -5836,7 +5851,7 @@ int main() { _mwvalidcheckl() ; return 0; } EOF -if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5855: \"$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 @@ -5857,7 +5872,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5861: checking for main in -lm" >&5 +echo "configure:5876: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5865,14 +5880,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 5869 "configure" +#line 5884 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5891: \"$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 @@ -5895,7 +5910,7 @@ fi ;; *) echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5899: checking for main in -lm" >&5 +echo "configure:5914: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5903,14 +5918,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 5907 "configure" +#line 5922 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5929: \"$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 @@ -5941,12 +5956,12 @@ esac # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5945: checking for working assert macro" >&5 +echo "configure:5960: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5950 "configure" +#line 5965 "configure" #include "confdefs.h" #include <assert.h> #include <stdio.h> @@ -5962,7 +5977,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -6003,12 +6018,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:6007: checking whether declaration is required for strstr" >&5 +echo "configure:6022: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6012 "configure" +#line 6027 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -6019,7 +6034,7 @@ x = (f) strstr; ; return 0; } EOF -if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -6040,12 +6055,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:6044: checking whether declaration is required for malloc" >&5 +echo "configure:6059: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6049 "configure" +#line 6064 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -6056,7 +6071,7 @@ x = (f) malloc; ; return 0; } EOF -if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -6077,12 +6092,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:6081: checking whether declaration is required for free" >&5 +echo "configure:6096: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6086 "configure" +#line 6101 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -6093,7 +6108,7 @@ x = (f) free; ; return 0; } EOF -if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -6114,12 +6129,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:6118: checking whether declaration is required for sbrk" >&5 +echo "configure:6133: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6123 "configure" +#line 6138 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -6130,7 +6145,7 @@ x = (f) sbrk; ; return 0; } EOF -if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -6151,12 +6166,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:6155: checking whether declaration is required for environ" >&5 +echo "configure:6170: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6160 "configure" +#line 6175 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -6167,7 +6182,7 @@ x = (f) environ; ; return 0; } EOF -if { (eval echo configure:6171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -6191,12 +6206,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:6195: checking whether declaration is required for errno" >&5 +echo "configure:6210: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6200 "configure" +#line 6215 "configure" #include "confdefs.h" #ifdef HAVE_ERRNO_H @@ -6211,7 +6226,7 @@ x = (f) errno; ; return 0; } EOF -if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in index 4e8b452..8f5ab3c 100644 --- a/contrib/binutils/gas/configure.in +++ b/contrib/binutils/gas/configure.in @@ -145,7 +145,10 @@ changequote([,])dnl rs6000*) cpu_type=ppc ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; - sh64*) cpu_type=sh64 endian=big;; + sh5*) cpu_type=sh64 endian=big ;; + sh5le*) cpu_type=sh64 endian=little ;; + sh64*) cpu_type=sh64 endian=big ;; + sh64le*) cpu_type=sh64 endian=little ;; sh*le) cpu_type=sh endian=little ;; sh*) cpu_type=sh endian=big ;; sparclite*) cpu_type=sparc arch=sparclite ;; @@ -167,7 +170,6 @@ changequote([,])dnl dev=no bfd_gas=no em=generic - mips_stabs_elf= # assign object format case ${generic_target} in @@ -180,11 +182,11 @@ changequote([,])dnl alpha*-*-*vms*) fmt=evax ;; alpha*-*-netware*) fmt=ecoff ;; - alpha*-*-openbsd*) fmt=ecoff ;; alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; + alpha*-*-openbsd*) fmt=elf em=obsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; @@ -211,9 +213,11 @@ changequote([,])dnl d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; + dlx-*-*) fmt=elf ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + frv-*-*) fmt=elf bfd_gas=yes ;; hppa-*-linux-gnu*) case ${cpu} in hppa*64*) @@ -224,6 +228,7 @@ changequote([,])dnl hppa-*-*elf*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-netbsd*) fmt=elf em=nbsd ;; + hppa-*-openbsd*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; hppa-*-hpux11*) case ${cpu} in @@ -250,6 +255,7 @@ changequote([,])dnl i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;; i386-*-bsd*) fmt=aout em=386bsd ;; i386-*-netbsd0.8) fmt=aout em=386bsd ;; + i386-*-netbsdpe*) fmt=coff em=pe bfd_gas=yes ;; i386-*-netbsd*) em=nbsd bfd_gas=yes case ${cpu} in x86_64) fmt=elf ;; @@ -298,6 +304,7 @@ changequote([,])dnl i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-nto-qnx*) fmt=elf ;; i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; i386-*-chaos) fmt=elf ;; @@ -367,13 +374,13 @@ changequote([,])dnl mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; - mips*-*-linux*) fmt=elf em=tmips mips_stabs_elf=y ;; + mips*-*-linux*) fmt=elf em=tmips ;; mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-netbsd* | mips-*-openbsd*) fmt=elf ;; - mips-*-vxworks*) fmt=elf mips_stabs_elf=y ;; + mips-*-vxworks*) fmt=elf ;; mmix-*-*) fmt=elf bfd_gas=yes ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; @@ -384,6 +391,7 @@ changequote([,])dnl pj*) fmt=elf ;; ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*) fmt=coff em=pe ;; + ppc-*-aix5*) fmt=coff em=aix5 ;; ppc-*-aix*) fmt=coff ;; ppc-*-beos*) fmt=coff ;; ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) @@ -408,6 +416,7 @@ changequote([,])dnl fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + ppc-*-windiss*) fmt=elf ;; s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; @@ -419,16 +428,18 @@ changequote([,])dnl sh*) endian=little ;; esac ;; + sh5*-*-netbsd*) fmt=elf em=nbsd ;; + sh64*-*-netbsd*) fmt=elf em=nbsd ;; sh*-*-netbsdelf*) fmt=elf em=nbsd ;; sh-*-elf*) fmt=elf ;; - sh-*-coff*) fmt=coff bfd_gas=yes;; + sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtems*) fmt=coff bfd_gas=yes;; + sh-*-rtems*) fmt=coff ;; sh64-*-elf*) fmt=elf ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; - ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; + ns32k-*-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; sparc-*-rtemsaout*) fmt=aout ;; @@ -453,7 +464,12 @@ changequote([,])dnl sparc64) fmt=elf ;; esac ;; - sparc-*-openbsd*) fmt=aout em=nbsd ;; + sparc-*-openbsd*) em=nbsd + case ${cpu} in + sparc) fmt=aout ;; + sparc64) fmt=elf ;; + esac + ;; strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; @@ -470,6 +486,9 @@ changequote([,])dnl v850e-*-*) fmt=elf bfd_gas=yes ;; v850ea-*-*) fmt=elf bfd_gas=yes ;; + vax-*-netbsdelf*) fmt=elf em=nbsd bfd_gas=yes ;; + vax-*-netbsdaout* | vax-*-netbsd*) + fmt=aout em=nbsd ;; vax-*-bsd* | vax-*-ultrix*) fmt=aout ;; vax-*-vms) fmt=vms ;; @@ -511,11 +530,6 @@ changequote([,])dnl fi fi - if test x${mips_stabs_elf} != x; then - AC_DEFINE(MIPS_STABS_ELF, 1, - [Use ELF stabs for MIPS, not ECOFF stabs]) - fi - case ${cpu_type}-${fmt} in alpha*-*) bfd_gas=yes ;; arm-*) bfd_gas=yes ;; @@ -567,6 +581,9 @@ changequote([,])dnl using_cgen=yes ;; + frv) + using_cgen=yes + ;; m68k) case ${extra_objects} in *m68k-parse.o*) ;; @@ -857,7 +874,7 @@ esac case "${need_bfd}" in yes) BFDLIB=../bfd/libbfd.la - ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" + ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h' ;; esac diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed index 7137574..4894cea 100644 --- a/contrib/binutils/gas/dep-in.sed +++ b/contrib/binutils/gas/dep-in.sed @@ -11,16 +11,16 @@ s!@SRCDIR@/config!$(srcdir)/config!g s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g -s! \$(INCDIR)/ansidecl\.h!!g -s! \$(INCDIR)/fopen-same\.h!!g s! \$(srcdir)/config/te-generic\.h!!g s! \.\./bfd/bfd\.h!!g s! itbl-cpu\.h!!g s! itbl-parse\.h!!g s! \$(INCDIR)/bin-bugs\.h!!g +s! \$(INCDIR)/ansidecl\.h!!g s! \$(INCDIR)/libiberty\.h!!g s! \$(INCDIR)/progress\.h!!g +s! \$(INCDIR)/fopen-same\.h!!g s! obj-format\.h!!g s! targ-cpu\.h!!g s! targ-env\.h!!g diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am index a526dde..cfb8f89 100644 --- a/contrib/binutils/gas/doc/Makefile.am +++ b/contrib/binutils/gas/doc/Makefile.am @@ -15,7 +15,9 @@ POD2MAN = pod2man --center="GNU Development Tools" \ man_MANS = as.1 -info_TEXINFOS = as.texinfo gasp.texi +# The gasp.texi file is now deprecated, as GASP has been deprecated. +# It will disappear in a future release. +info_TEXINFOS = as.texinfo asconfig.texi: $(CONFIG).texi rm -f asconfig.texi @@ -68,7 +70,7 @@ install: install-info # This one isn't ready for prime time yet. Not even a little bit. -noinst_TEXINFOS = internals.texi +noinst_TEXINFOS = internals.texi gasp.texi DISTCLEANFILES = asconfig.texi diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in index d87c923..25daeaf 100644 --- a/contrib/binutils/gas/doc/Makefile.in +++ b/contrib/binutils/gas/doc/Makefile.in @@ -132,7 +132,9 @@ POD2MAN = pod2man --center="GNU Development Tools" \ man_MANS = as.1 -info_TEXINFOS = as.texinfo gasp.texi +# The gasp.texi file is now deprecated, as GASP has been deprecated. +# It will disappear in a future release. +info_TEXINFOS = as.texinfo CPU_DOCS = \ c-a29k.texi \ @@ -169,7 +171,7 @@ CPU_DOCS = \ # This one isn't ready for prime time yet. Not even a little bit. -noinst_TEXINFOS = internals.texi +noinst_TEXINFOS = internals.texi gasp.texi DISTCLEANFILES = asconfig.texi @@ -179,9 +181,9 @@ CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi` TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex -INFO_DEPS = as.info gasp.info -DVIS = as.dvi gasp.dvi -TEXINFOS = as.texinfo gasp.texi +INFO_DEPS = as.info +DVIS = as.dvi +TEXINFOS = as.texinfo man1dir = $(mandir)/man1 MANS = $(man_MANS) @@ -191,7 +193,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: @@ -208,10 +210,6 @@ as.info: as.texinfo as.dvi: as.texinfo -gasp.info: gasp.texi -gasp.dvi: gasp.texi - - DVIPS = dvips .texi.info: @@ -304,10 +302,7 @@ dist-info: $(INFO_DEPS) mostlyclean-aminfo: -rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps \ as.log as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr \ - as.cv as.cn gasp.aux gasp.cp gasp.cps gasp.dvi gasp.fn \ - gasp.fns gasp.ky gasp.kys gasp.ps gasp.log gasp.pg gasp.toc \ - gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op gasp.tr gasp.cv \ - gasp.cn + as.cv as.cn clean-aminfo: diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1 index 99d3284..b0de343 100644 --- a/contrib/binutils/gas/doc/as.1 +++ b/contrib/binutils/gas/doc/as.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "AS 1" -.TH AS 1 "2002-05-14" "binutils-2.12.1" "GNU Development Tools" +.TH AS 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" \&\s-1AS\s0 \- the portable \s-1GNU\s0 assembler. @@ -186,7 +186,7 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f .PP \&\fITarget M32R options:\fR [\fB\-\-m32rx\fR|\fB\-\-[no\-]warn\-explicit\-parallel\-conflicts\fR| - \fB\-\-W[n]p\fR] + \fB\-\-W[n]p\fR] .PP \&\fITarget M680X0 options:\fR [\fB\-l\fR] [\fB\-m68000\fR|\fB\-m68010\fR|\fB\-m68020\fR|...] @@ -202,12 +202,19 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f [\fB\-mcpu=[210|340]\fR] .PP \&\fITarget \s-1MIPS\s0 options:\fR - [\fB\-nocpp\fR] [\fB\-EL\fR] [\fB\-EB\fR] [\fB\-G\fR \fInum\fR] [\fB\-mcpu\fR=\fI\s-1CPU\s0\fR ] - [\fB\-mips1\fR] [\fB\-mips2\fR] [\fB\-mips3\fR] [\fB\-mips4\fR] [\fB\-mips5\fR] - [\fB\-mips32\fR] [\fB\-mips64\fR] - [\fB\-m4650\fR] [\fB\-no\-m4650\fR] - [\fB\-\-trap\fR] [\fB\-\-break\fR] [\fB\-n\fR] - [\fB\-\-emulation\fR=\fIname\fR ] + [\fB\-nocpp\fR] [\fB\-EL\fR] [\fB\-EB\fR] [\fB\-n\fR] [\fB\-O\fR[\fIoptimization level\fR]] + [\fB\-g\fR[\fIdebug level\fR]] [\fB\-G\fR \fInum\fR] [\fB\-KPIC\fR] [\fB\-call_shared\fR] + [\fB\-non_shared\fR] [\fB\-xgot\fR] [\fB\-\-membedded\-pic\fR] + [\fB\-mabi\fR=\fI\s-1ABI\s0\fR] [\fB\-32\fR] [\fB\-n32\fR] [\fB\-64\fR] [\fB\-mfp32\fR] [\fB\-mgp32\fR] + [\fB\-march\fR=\fI\s-1CPU\s0\fR] [\fB\-mtune\fR=\fI\s-1CPU\s0\fR] [\fB\-mips1\fR] [\fB\-mips2\fR] + [\fB\-mips3\fR] [\fB\-mips4\fR] [\fB\-mips5\fR] [\fB\-mips32\fR] [\fB\-mips64\fR] + [\fB\-construct\-floats\fR] [\fB\-no\-construct\-floats\fR] + [\fB\-trap\fR] [\fB\-no\-break\fR] [\fB\-break\fR] [\fB\-no\-trap\fR] + [\fB\-mfix7000\fR] [\fB\-mno\-fix7000\fR] + [\fB\-mips16\fR] [\fB\-no\-mips16\fR] + [\fB\-mips3d\fR] [\fB\-no\-mips3d\fR] + [\fB\-mdmx\fR] [\fB\-no\-mdmx\fR] + [\fB\-mdebug\fR] [\fB\-no\-mdebug\fR] .PP \&\fITarget \s-1MMIX\s0 options:\fR [\fB\-\-fixed\-special\-register\-names\fR] [\fB\-\-globalize\-symbols\fR] @@ -672,33 +679,90 @@ Generate ``little endian'' format output. .IX Item "-mips3" .IP "\fB\-mips4\fR" 4 .IX Item "-mips4" +.IP "\fB\-mips5\fR" 4 +.IX Item "-mips5" .IP "\fB\-mips32\fR" 4 .IX Item "-mips32" .IP "\fB\-mips64\fR" 4 .IX Item "-mips64" .PD Generate code for a particular \s-1MIPS\s0 Instruction Set Architecture level. -\&\fB\-mips1\fR corresponds to the R2000 and R3000 processors, -\&\fB\-mips2\fR to the R6000 processor, and \fB\-mips3\fR to the R4000 -processor. -\&\fB\-mips5\fR, \fB\-mips32\fR, and \fB\-mips64\fR correspond -to generic \s-1MIPS\s0 V, \s-1MIPS32\s0, and \s-1MIPS64\s0 \s-1ISA\s0 -processors, respectively. -.IP "\fB\-m4650\fR" 4 -.IX Item "-m4650" +\&\fB\-mips1\fR is an alias for \fB\-march=r3000\fR, \fB\-mips2\fR is an +alias for \fB\-march=r6000\fR, \fB\-mips3\fR is an alias for +\&\fB\-march=r4000\fR and \fB\-mips4\fR is an alias for \fB\-march=r8000\fR. +\&\fB\-mips5\fR, \fB\-mips32\fR, and \fB\-mips64\fR correspond to generic +\&\fB\s-1MIPS\s0 V\fR, \fB\s-1MIPS32\s0\fR, and \fB\s-1MIPS64\s0\fR \s-1ISA\s0 processors, +respectively. +.IP "\fB\-march=\fR\fI\s-1CPU\s0\fR" 4 +.IX Item "-march=CPU" +Generate code for a particular \s-1MIPS\s0 cpu. +.IP "\fB\-mtune=\fR\fIcpu\fR" 4 +.IX Item "-mtune=cpu" +Schedule and tune for a particular \s-1MIPS\s0 cpu. +.IP "\fB\-mfix7000\fR" 4 +.IX Item "-mfix7000" +.PD 0 +.IP "\fB\-mno\-fix7000\fR" 4 +.IX Item "-mno-fix7000" +.PD +Cause nops to be inserted if the read of the destination register +of an mfhi or mflo instruction occurs in the following two instructions. +.IP "\fB\-mdebug\fR" 4 +.IX Item "-mdebug" +.PD 0 +.IP "\fB\-no\-mdebug\fR" 4 +.IX Item "-no-mdebug" +.PD +Cause stabs-style debugging output to go into an ECOFF-style .mdebug +section instead of the standard \s-1ELF\s0 .stabs sections. +.IP "\fB\-mgp32\fR" 4 +.IX Item "-mgp32" +.PD 0 +.IP "\fB\-mfp32\fR" 4 +.IX Item "-mfp32" +.PD +The register sizes are normally inferred from the \s-1ISA\s0 and \s-1ABI\s0, but these +flags force a certain group of registers to be treated as 32 bits wide at +all times. \fB\-mgp32\fR controls the size of general-purpose registers +and \fB\-mfp32\fR controls the size of floating-point registers. +.IP "\fB\-mips16\fR" 4 +.IX Item "-mips16" +.PD 0 +.IP "\fB\-no\-mips16\fR" 4 +.IX Item "-no-mips16" +.PD +Generate code for the \s-1MIPS\s0 16 processor. This is equivalent to putting +\&\f(CW\*(C`.set mips16\*(C'\fR at the start of the assembly file. \fB\-no\-mips16\fR +turns off this option. +.IP "\fB\-mips3d\fR" 4 +.IX Item "-mips3d" +.PD 0 +.IP "\fB\-no\-mips3d\fR" 4 +.IX Item "-no-mips3d" +.PD +Generate code for the \s-1MIPS\-3D\s0 Application Specific Extension. +This tells the assembler to accept \s-1MIPS\-3D\s0 instructions. +\&\fB\-no\-mips3d\fR turns off this option. +.IP "\fB\-mdmx\fR" 4 +.IX Item "-mdmx" +.PD 0 +.IP "\fB\-no\-mdmx\fR" 4 +.IX Item "-no-mdmx" +.PD +Generate code for the \s-1MDMX\s0 Application Specific Extension. +This tells the assembler to accept \s-1MDMX\s0 instructions. +\&\fB\-no\-mdmx\fR turns off this option. +.IP "\fB\-\-construct\-floats\fR" 4 +.IX Item "--construct-floats" .PD 0 -.IP "\fB\-no\-m4650\fR" 4 -.IX Item "-no-m4650" +.IP "\fB\-\-no\-construct\-floats\fR" 4 +.IX Item "--no-construct-floats" .PD -Generate code for the \s-1MIPS\s0 R4650 chip. This tells the assembler to accept -the \fBmad\fR and \fBmadu\fR instruction, and to not schedule \fBnop\fR -instructions around accesses to the \fB\s-1HI\s0\fR and \fB\s-1LO\s0\fR registers. -\&\fB\-no\-m4650\fR turns off this option. -.IP "\fB\-mcpu=\fR\fI\s-1CPU\s0\fR" 4 -.IX Item "-mcpu=CPU" -Generate code for a particular \s-1MIPS\s0 cpu. It is exactly equivalent to -\&\fB\-m\fR\fIcpu\fR, except that there are more value of \fIcpu\fR -understood. +The \fB\-\-no\-construct\-floats\fR option disables the construction of +double width floating point constants by loading the two halves of the +value into the two single width floating point registers that make up +the double width register. By default \fB\-\-construct\-floats\fR is +selected, allowing construction of these floating point constants. .IP "\fB\-\-emulation=\fR\fIname\fR" 4 .IX Item "--emulation=name" This option causes \fBas\fR to emulate \fBas\fR configured diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo index 59b5f44..f3195a3 100644 --- a/contrib/binutils/gas/doc/as.texinfo +++ b/contrib/binutils/gas/doc/as.texinfo @@ -42,6 +42,7 @@ @set I80386 @set I860 @set I960 +@set IA-64 @set M32R @set M68HC11 @set M680X0 @@ -333,11 +334,19 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. @b{-AKC}|@b{-AMC}] [@b{-b}] [@b{-no-relax}] @end ifset +@ifset IA64 + +@emph{Target IA-64 options:} + [@b{-mconstant-gp}|@b{-mauto-pic}] + [@b{-milp32}|@b{-milp64}|@b{-mlp64}|@b{-mp64}] + [@b{-mle}|@b{mbe}] + [@b{-x}|@b{-xexplicit}] [@b{-xauto}] [@b{-xdebug}] +@end ifset @ifset M32R @emph{Target M32R options:} [@b{--m32rx}|@b{--[no-]warn-explicit-parallel-conflicts}| - @b{--W[n]p}] + @b{--W[n]p}] @end ifset @ifset M680X0 @@ -361,12 +370,19 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. @ifset MIPS @emph{Target MIPS options:} - [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-G} @var{num}] [@b{-mcpu}=@var{CPU} ] - [@b{-mips1}] [@b{-mips2}] [@b{-mips3}] [@b{-mips4}] [@b{-mips5}] - [@b{-mips32}] [@b{-mips64}] - [@b{-m4650}] [@b{-no-m4650}] - [@b{--trap}] [@b{--break}] [@b{-n}] - [@b{--emulation}=@var{name} ] + [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-n}] [@b{-O}[@var{optimization level}]] + [@b{-g}[@var{debug level}]] [@b{-G} @var{num}] [@b{-KPIC}] [@b{-call_shared}] + [@b{-non_shared}] [@b{-xgot}] [@b{--membedded-pic}] + [@b{-mabi}=@var{ABI}] [@b{-32}] [@b{-n32}] [@b{-64}] [@b{-mfp32}] [@b{-mgp32}] + [@b{-march}=@var{CPU}] [@b{-mtune}=@var{CPU}] [@b{-mips1}] [@b{-mips2}] + [@b{-mips3}] [@b{-mips4}] [@b{-mips5}] [@b{-mips32}] [@b{-mips64}] + [@b{-construct-floats}] [@b{-no-construct-floats}] + [@b{-trap}] [@b{-no-break}] [@b{-break}] [@b{-no-trap}] + [@b{-mfix7000}] [@b{-mno-fix7000}] + [@b{-mips16}] [@b{-no-mips16}] + [@b{-mips3d}] [@b{-no-mips3d}] + [@b{-mdmx}] [@b{-no-mdmx}] + [@b{-mdebug}] [@b{-no-mdebug}] @end ifset @ifset MMIX @@ -832,7 +848,7 @@ behaviour in the shell. @ifset MIPS The following options are available when @value{AS} is configured for -a MIPS processor. +a @sc{mips} processor. @table @gcctabopt @item -G @var{num} @@ -855,27 +871,65 @@ Generate ``little endian'' format output. @itemx -mips2 @itemx -mips3 @itemx -mips4 +@itemx -mips5 @itemx -mips32 @itemx -mips64 -Generate code for a particular MIPS Instruction Set Architecture level. -@samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors, -@samp{-mips2} to the @sc{r6000} processor, and @samp{-mips3} to the @sc{r4000} -processor. -@samp{-mips5}, @samp{-mips32}, and @samp{-mips64} correspond -to generic @sc{MIPS V}, @sc{MIPS32}, and @sc{MIPS64} ISA -processors, respectively. - -@item -m4650 -@itemx -no-m4650 -Generate code for the MIPS @sc{r4650} chip. This tells the assembler to accept -the @samp{mad} and @samp{madu} instruction, and to not schedule @samp{nop} -instructions around accesses to the @samp{HI} and @samp{LO} registers. -@samp{-no-m4650} turns off this option. - -@item -mcpu=@var{CPU} -Generate code for a particular MIPS cpu. It is exactly equivalent to -@samp{-m@var{cpu}}, except that there are more value of @var{cpu} -understood. +Generate code for a particular @sc{mips} Instruction Set Architecture level. +@samp{-mips1} is an alias for @samp{-march=r3000}, @samp{-mips2} is an +alias for @samp{-march=r6000}, @samp{-mips3} is an alias for +@samp{-march=r4000} and @samp{-mips4} is an alias for @samp{-march=r8000}. +@samp{-mips5}, @samp{-mips32}, and @samp{-mips64} correspond to generic +@samp{MIPS V}, @samp{MIPS32}, and @samp{MIPS64} ISA processors, +respectively. + +@item -march=@var{CPU} +Generate code for a particular @sc{mips} cpu. + +@item -mtune=@var{cpu} +Schedule and tune for a particular @sc{mips} cpu. + +@item -mfix7000 +@itemx -mno-fix7000 +Cause nops to be inserted if the read of the destination register +of an mfhi or mflo instruction occurs in the following two instructions. + +@item -mdebug +@itemx -no-mdebug +Cause stabs-style debugging output to go into an ECOFF-style .mdebug +section instead of the standard ELF .stabs sections. + +@item -mgp32 +@itemx -mfp32 +The register sizes are normally inferred from the ISA and ABI, but these +flags force a certain group of registers to be treated as 32 bits wide at +all times. @samp{-mgp32} controls the size of general-purpose registers +and @samp{-mfp32} controls the size of floating-point registers. + +@item -mips16 +@itemx -no-mips16 +Generate code for the MIPS 16 processor. This is equivalent to putting +@code{.set mips16} at the start of the assembly file. @samp{-no-mips16} +turns off this option. + +@item -mips3d +@itemx -no-mips3d +Generate code for the MIPS-3D Application Specific Extension. +This tells the assembler to accept MIPS-3D instructions. +@samp{-no-mips3d} turns off this option. + +@item -mdmx +@itemx -no-mdmx +Generate code for the MDMX Application Specific Extension. +This tells the assembler to accept MDMX instructions. +@samp{-no-mdmx} turns off this option. + +@item --construct-floats +@itemx --no-construct-floats +The @samp{--no-construct-floats} option disables the construction of +double width floating point constants by loading the two halves of the +value into the two single width floating point registers that make up +the double width register. By default @samp{--construct-floats} is +selected, allowing construction of these floating point constants. @cindex emulation @item --emulation=@var{name} @@ -892,7 +946,7 @@ in the name. Using @samp{-EB} or @samp{-EL} will override the endianness selection in any case. This option is currently supported only when the primary target -@command{@value{AS}} is configured for is a MIPS ELF or ECOFF target. +@command{@value{AS}} is configured for is a @sc{mips} ELF or ECOFF target. Furthermore, the primary target or others specified with @samp{--enable-targets=@dots{}} at configuration time must include support for the other format, if both are to be available. For example, the Irix 5 @@ -906,7 +960,6 @@ more processors. @command{@value{AS}} ignores this option. It is accepted for compatibility with the native tools. -@need 900 @item --trap @itemx --no-trap @itemx --break @@ -4962,6 +5015,8 @@ read-only section executable section @item s shared section (meaningful for PE targets) +@item a +ignored. (For compatibility with the ELF version) @end table If no flags are specified, the default flags depend upon the section name. If @@ -5769,6 +5824,10 @@ family. @include c-i960.texi @end ifset +@ifset IA64 +@include c-ia64.texi +@end ifset + @ifset M32R @include c-m32r.texi @end ifset diff --git a/contrib/binutils/gas/doc/c-alpha.texi b/contrib/binutils/gas/doc/c-alpha.texi index f3c1888..5b52c5a 100644 --- a/contrib/binutils/gas/doc/c-alpha.texi +++ b/contrib/binutils/gas/doc/c-alpha.texi @@ -55,13 +55,17 @@ The following processor names are recognized: @code{21164a}, @code{21164pc}, @code{21264}, +@code{21264a}, +@code{21264b}, @code{ev4}, @code{ev5}, @code{lca45}, @code{ev5}, @code{ev56}, @code{pca56}, -@code{ev6}. +@code{ev6}, +@code{ev67}, +@code{ev68}. The special name @code{all} may be used to allow the assembler to accept instructions valid for any Alpha processor. @@ -216,6 +220,19 @@ beq $27,is_undef !lituse_addr!1 jsr $26,($27),foo !lituse_jsr!1 @end example +@item !lituse_tlsgd!@var{N} +Used with a register branch format instruction to indicate that the +literal is the call to @code{__tls_get_addr} used to compute the +address of the thread-local storage variable whose descriptor was +loaded with @code{!tlsgd!@var{N}}. + +@item !lituse_tlsldm!@var{N} +Used with a register branch format instruction to indicate that the +literal is the call to @code{__tls_get_addr} used to compute the +address of the base of the thread-local storage block for the current +module. The descriptor for the module must have been loaded with +@code{!tlsldm!@var{N}}. + @item !gpdisp!@var{N} Used with @code{ldah} and @code{lda} to load the GP from the current address, a-la the @code{ldgp} macro. The source register for the @@ -248,6 +265,47 @@ target address. The referenced symbol must have the same GP as the source object file, and it must be declared to either not use @code{$27} or perform a standard GP load in the first two instructions via the @code{.prologue} directive. + +@item !tlsgd +@itemx !tlsgd!@var{N} +Used with an @code{lda} instruction to load the address of a TLS +descriptor for a symbol in the GOT. + +The sequence number @var{N} is optional, and if present it used to +pair the descriptor load with both the @code{literal} loading the +address of the @code{__tls_get_addr} function and the @code{lituse_tlsgd} +marking the call to that function. + +For proper relaxation, both the @code{tlsgd}, @code{literal} and +@code{lituse} relocations must be in the same extended basic block. +That is, the relocation with the lowest address must be executed +first at runtime. + +@item !tlsldm +@itemx !tlsldm!@var{N} +Used with an @code{lda} instruction to load the address of a TLS +descriptor for the current module in the GOT. + +Similar in other respects to @code{tlsgd}. + +@item !gotdtprel +Used with an @code{ldq} instruction to load the offset of the TLS +symbol within its module's thread-local storage block. Also known +as the dynamic thread pointer offset or dtp-relative offset. + +@item !dtprelhi +@itemx !dtprello +@itemx !dtprel +Like @code{gprel} relocations except they compute dtp-relative offsets. + +@item !gottprel +Used with an @code{ldq} instruction to load the offset of the TLS +symbol from the thread pointer. Also known as the tp-relative offset. + +@item !tprelhi +@itemx !tprello +@itemx !tprel +Like @code{gprel} relocations except they compute tp-relative offsets. @end table @node Alpha Floating Point diff --git a/contrib/binutils/gas/doc/c-ia64.texi b/contrib/binutils/gas/doc/c-ia64.texi new file mode 100644 index 0000000..0885f1b --- /dev/null +++ b/contrib/binutils/gas/doc/c-ia64.texi @@ -0,0 +1,157 @@ +@c Copyright 2002 +@c Free Software Foundation, Inc. +@c Contributed by David Mosberger-Tang <davidm@hpl.hp.com> +@c This is part of the GAS manual. +@c For copying conditions, see the file as.texinfo. + +@ifset GENERIC +@page +@node IA-64-Dependent +@chapter IA-64 Dependent Features +@end ifset + +@ifclear GENERIC +@node Machine Dependencies +@chapter IA-64 Dependent Features +@end ifclear + +@cindex IA-64 support +@menu +* IA-64 Options:: Options +* IA-64 Syntax:: Syntax +@c * IA-64 Floating Point:: Floating Point // to be written +@c * IA-64 Directives:: IA-64 Machine Directives // to be written +* IA-64 Opcodes:: Opcodes +@end menu + +@node IA-64 Options +@section Options +@cindex IA-64 options +@cindex options for IA-64 + +@table @option +@cindex @code{-mconstant-gp} command line option, IA-64 + +@item -mconstant-gp +This option instructs the assembler to mark the resulting object file +as using the ``constant GP'' model. With this model, it is assumed +that the entire program uses a single global pointer (GP) value. Note +that this option does not in any fashion affect the machine code +emitted by the assembler. All it does is turn on the EF_IA_64_CONS_GP +flag in the ELF file header. + +@item -mauto-pic +This option instructs the assembler to mark the resulting object file +as using the ``constant GP without function descriptor'' data model. +This model is like the ``constant GP'' model, except that it +additionaly does away with function descriptors. What this means is +that the address of a function refers directly to the function's code +entry-point. Normally, such an address would refer to a function +descriptor, which contains both the code entry-point and the GP-value +needed by the function. Note that this option does not in any fashion +affect the machine code emitted by the assembler. All it does is +turn on the EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header. + +@item -milp32 +@item -milp64 +@item -mlp64 +@item -mp64 +These options select the data model. The assembler defaults to @code{-mlp64} +(LP64 data model). + +@item -mle +@item -mbe +These options select the byte order. The @code{-mle} option selects little-endian +byte order (default) and @code{-mbe} selects big-endian byte order. Note that +IA-64 machine code always uses little-endian byte order. + +@item -x +@item -xexplicit +These options turn on dependency violation checking. This checking is turned on by +default. + +@item -xauto +This option instructs the assembler to automatically insert stop bits where necessary +to remove dependency violations. + +@item -xdebug +This turns on debug output intended to help tracking down bugs in the dependency +violation checker. + +@end table + +@cindex IA-64 Syntax +@node IA-64 Syntax +@section Syntax +The assembler syntax closely follows the IA-64 Assembly Language +Reference Guide. + +@menu +* IA-64-Chars:: Special Characters +* IA-64-Regs:: Register Names +* IA-64-Bits:: Bit Names +* IA-64-Relocs:: Relocations +@end menu + +@node IA-64-Chars +@subsection Special Characters + +@cindex line comment character, IA-64 +@cindex IA-64 line comment character +@samp{//} is the line comment token. + +@cindex line separator, IA-64 +@cindex statement separator, IA-64 +@cindex IA-64 line separator +@samp{;} can be used instead of a newline to separate statements. + +@node IA-64-Regs +@subsection Register Names +@cindex IA-64 registers +@cindex register names, IA-64 + +The 128 integer registers are refered to as @samp{r@var{n}}. +The 128 floating-point registers are refered to as @samp{f@var{n}}. +The 128 application registers are refered to as @samp{ar@var{n}}. +The 128 control registers are refered to as @samp{cr@var{n}}. +The 64 one-bit predicate registers are refered to as @samp{p@var{n}}. +The 8 branch registers are refered to as @samp{b@var{n}}. +In addition, the assembler defines a number of aliases: +@samp{gp} (@samp{r1}), @samp{sp} (@samp{r12}), @samp{rp} (@samp{b0}), +@samp{ret0} (@samp{r8}), @samp{ret1} (@samp{r9}), @samp{ret2} (@samp{r10}), +@samp{ret3} (@samp{r9}), @samp{farg@var{n}} (@samp{f8+@var{n}}), and +@samp{fret@var{n}} (@samp{f8+@var{n}}). + +For convenience, the assembler also defines aliases for all named application +and control registers. For example, @samp{ar.bsp} refers to the register +backing store pointer (@samp{ar17}). Similarly, @samp{cr.eoi} refers to +the end-of-interrupt register (@samp{cr67}). + +@node IA-64-Bits +@subsection IA-64 Processor-Status-Register (PSR) Bit Names +@cindex IA-64 Processor-status-Register bit names +@cindex PSR bits +@cindex bit names, IA-64 + +The assembler defines bit masks for each of the bits in the IA-64 +processor status register. For example, @samp{psr.ic} corresponds to +a value of 0x2000. These masks are primarily intended for use with +the @sample{ssm}/@sample{sum} and @sample{rsm}/@sample{rum} +instructions, but they can be used anywhere else where an integer +constant is expected. + +@node IA-64 Opcodes +@section Opcodes +For detailed information on the IA-64 machine instruction set, see the +@c Attempt to work around a very overfull hbox. +@iftex +IA-64 Assembly Language Reference Guide available at +@smallfonts +@example +http://developer.intel.com/design/itanium/arch_spec.htm +@end example +@textfonts +@end iftex +@ifnottex +@uref{http://developer.intel.com/design/itanium/arch_spec.htm,IA-64 Architecture Handbook}. +@end ifnottex diff --git a/contrib/binutils/gas/doc/gasp.texi b/contrib/binutils/gas/doc/gasp.texi index e5bda63..f526583 100644 --- a/contrib/binutils/gas/doc/gasp.texi +++ b/contrib/binutils/gas/doc/gasp.texi @@ -3,7 +3,7 @@ @c @c This file documents the assembly preprocessor "GASP" @c -@c Copyright 1994, 1995, 2000 Free Software Foundation, Inc. +@c Copyright 1994, 1995, 2000, 2002 Free Software Foundation, Inc. @c @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.1 @@ -41,7 +41,7 @@ END-INFO-DIR-ENTRY @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. +Copyright @copyright{} 1994, 1995, 2000, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -53,7 +53,7 @@ Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. @end titlepage @ifinfo -Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. +Copyright @copyright{} 1994, 1995, 2000, 2002 Free Software Foundation, Inc. @ignore Permission is granted to process this file through TeX and print the @@ -108,6 +108,11 @@ flexibility: you can use it with hand-coded assembly, without paying a penalty of added complexity in the assembler you use for compiler output. +@emph{Note} The use of @sc{gasp} has now been deprecated. Anything +that it could do can now be done by the macro facilities built into +@sc{gas} itself. At some point in the future the @{gasp} sources will +be removed entirely from the binutils distribution. + Here is a small example to give the flavor of @sc{gasp}. This input to @sc{gasp} @@ -943,6 +948,11 @@ character matches those you can specify with @code{.RADIX}: @samp{B} for base 2, @samp{Q} for base 8, @samp{D} for base 10, and @samp{H} for base 16. (You can write this character in lower case if you prefer.) +You can write floating point constants using the same syntax recognised +by GAS @ref{Flonums,,Flonums,as,The GNU Assembler.}. A constraint is +that these constants will be interpreted as decimal values irrespective +of the currently selected base. + @c FIXME! What are rules for recognizing number in deflt base? Whatever @c is left over after parsing other things?? diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi index e7d3009..6bd3277 100644 --- a/contrib/binutils/gas/doc/internals.texi +++ b/contrib/binutils/gas/doc/internals.texi @@ -1151,6 +1151,16 @@ a pointer to a integer that should be filled in with the number of gas/bignum.h). The function should return NULL upon success or an error string upon failure. +@item TC_LARGEST_EXPONENT_IS_NORMAL +@cindex TC_LARGEST_EXPONENT_IS_NORMAL (@var{precision}) +This macro is used only by @file{atof-ieee.c}. It should evaluate to true +if floats of the given precision use the largest exponent for normal numbers +instead of NaNs and infinities. @var{precision} is @samp{F_PRECISION} for +single precision, @samp{D_PRECISION} for double precision, or +@samp{X_PRECISION} for extended double precision. + +The macro has a default definition which returns 0 for all cases. + @item md_reloc_size @cindex md_reloc_size This variable is only used in the original version of gas (not diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c index 6e62206..a5dffab 100644 --- a/contrib/binutils/gas/dwarf2dbg.c +++ b/contrib/binutils/gas/dwarf2dbg.c @@ -237,8 +237,12 @@ dwarf2_gen_line_info (ofs, loc) if (loc->filenum == 0 || loc->line == 0) return; - /* Don't emit sequences of line symbols for the same line. */ - if (line == loc->line && filenum == loc->filenum) + /* Don't emit sequences of line symbols for the same line when the + symbols apply to assembler code. It is necessary to emit + duplicate line symbols when a compiler asks for them, because GDB + uses them to determine the end of the prologue. */ + if (debug_type == DEBUG_DWARF2 + && line == loc->line && filenum == loc->filenum) return; line = loc->line; @@ -282,11 +286,25 @@ dwarf2_emit_insn (size) { struct dwarf2_line_info loc; - if (debug_type != DEBUG_DWARF2 && ! loc_directive_seen) + if (loc_directive_seen) + { + /* Use the last location established by a .loc directive, not + the value returned by dwarf2_where(). That calls as_where() + which will return either the logical input file name (foo.c) + or the physical input file name (foo.s) and not the file name + specified in the most recent .loc directive (eg foo.h). */ + loc = current; + + /* Unless we generate DWARF2 debugging information for each + assembler line, we only emit one line symbol for one LOC. */ + if (debug_type != DEBUG_DWARF2) + loc_directive_seen = false; + } + else if (debug_type != DEBUG_DWARF2) return; - loc_directive_seen = false; + else + dwarf2_where (& loc); - dwarf2_where (&loc); dwarf2_gen_line_info (frag_now_fix () - size, &loc); } @@ -326,9 +344,13 @@ get_filenum (filename) return i; } -/* Handle the .file directive. */ +/* Handle two forms of .file directive: + - Pass .file "source.c" to s_app_file + - Handle .file 1 "source.c" by adding an entry to the DWARF-2 file table -void + If an entry is added to the file table, return a pointer to the filename. */ + +char * dwarf2_directive_file (dummy) int dummy ATTRIBUTE_UNUSED; { @@ -341,7 +363,7 @@ dwarf2_directive_file (dummy) if (*input_line_pointer == '"') { s_app_file (0); - return; + return NULL; } num = get_absolute_expression (); @@ -351,13 +373,13 @@ dwarf2_directive_file (dummy) if (num < 1) { as_bad (_("file number less than one")); - return; + return NULL; } if (num < (int) files_in_use && files[num].filename != 0) { as_bad (_("file number %ld already allocated"), (long) num); - return; + return NULL; } if (num >= (int) files_allocated) @@ -375,6 +397,8 @@ dwarf2_directive_file (dummy) files[num].filename = filename; files[num].dir = 0; files_in_use = num + 1; + + return filename; } void @@ -410,7 +434,10 @@ dwarf2_directive_loc (dummy) #ifndef NO_LISTING if (listing) - listing_source_line (line); + { + listing_source_file (files[filenum].filename); + listing_source_line (line); + } #endif } @@ -1121,6 +1148,7 @@ out_debug_abbrev (abbrev_seg) out_abbrev (DW_AT_low_pc, DW_FORM_addr); out_abbrev (DW_AT_high_pc, DW_FORM_addr); } + out_abbrev (DW_AT_name, DW_FORM_string); out_abbrev (DW_AT_comp_dir, DW_FORM_string); out_abbrev (DW_AT_producer, DW_FORM_string); out_abbrev (DW_AT_language, DW_FORM_data2); @@ -1196,6 +1224,16 @@ out_debug_info (info_seg, abbrev_seg, line_seg) emit_expr (&expr, sizeof_address); } + /* DW_AT_name. We don't have the actual file name that was present + on the command line, so assume files[1] is the main input file. + We're not supposed to get called unless at least one line number + entry was emitted, so this should always be defined. */ + if (!files || files_in_use < 1) + abort (); + len = strlen (files[1].filename) + 1; + p = frag_more (len); + memcpy (p, files[1].filename, len); + /* DW_AT_comp_dir */ comp_dir = getpwd (); len = strlen (comp_dir) + 1; @@ -1221,8 +1259,15 @@ dwarf2_finish () segT line_seg; struct line_seg *s; - /* If no debug information was recorded, nothing to do. */ - if (all_segs == NULL && files_in_use <= 1) + /* We don't need to do anything unless: + - Some debug information was recorded via .file/.loc + - or, we are generating DWARF2 information ourself (--gdwarf2) + - or, there is a user-provided .debug_info section which could + reference the file table in the .debug_line section we generate + below. */ + if (all_segs == NULL + && debug_type != DEBUG_DWARF2 + && bfd_get_section_by_name (stdoutput, ".debug_info") == NULL) return; /* Calculate the size of an address for the target machine. */ diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h index 8087b29..62fc020 100644 --- a/contrib/binutils/gas/dwarf2dbg.h +++ b/contrib/binutils/gas/dwarf2dbg.h @@ -36,7 +36,7 @@ struct dwarf2_line_info { /* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 to indicate that no file number has been assigned. All real file number must be >0. */ -extern void dwarf2_directive_file PARAMS ((int dummy)); +extern char *dwarf2_directive_file PARAMS ((int dummy)); /* Implements the .loc FILENO LINENO [COLUMN] directive. FILENO is the file number, LINENO the line number and the (optional) COLUMN diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c index ed11921..75e0479 100644 --- a/contrib/binutils/gas/ecoff.c +++ b/contrib/binutils/gas/ecoff.c @@ -1,5 +1,5 @@ /* ECOFF debugging support. - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor <ian@cygnus.com>. A @@ -2037,8 +2037,7 @@ get_tag (tag, sym, basic_type) { char *perm; - perm = xmalloc ((unsigned long) (strlen (tag) + 1)); - strcpy (perm, tag); + perm = xstrdup (tag); hash_ptr = allocate_shash (); err = hash_insert (tag_hash, perm, (char *) hash_ptr); if (err) @@ -2545,8 +2544,8 @@ ecoff_directive_def (ignore) free (coff_sym_name); if (coff_tag != (char *) NULL) free (coff_tag); - coff_sym_name = (char *) xmalloc ((unsigned long) (strlen (name) + 1)); - strcpy (coff_sym_name, name); + + coff_sym_name = xstrdup (name); coff_type = type_info_init; coff_storage_class = sc_Nil; coff_symbol_typ = st_Nil; @@ -2778,8 +2777,7 @@ ecoff_directive_tag (ignore) name = input_line_pointer; name_end = get_symbol_end (); - coff_tag = (char *) xmalloc ((unsigned long) (strlen (name) + 1)); - strcpy (coff_tag, name); + coff_tag = xstrdup (name); *input_line_pointer = name_end; diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c index ad6e028..4f5c9b2 100644 --- a/contrib/binutils/gas/ehopt.c +++ b/contrib/binutils/gas/ehopt.c @@ -370,7 +370,7 @@ check_eh_frame (exp, pnbytes) d->state = state_error; else { - int left = (d->aug_size -= *pnbytes); + int left = (d->aug_size -= *pnbytes); if (left == 0) d->state = state_wait_loc4; else if (left < 0) diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c index 74c49d9..13c167a 100644 --- a/contrib/binutils/gas/expr.c +++ b/contrib/binutils/gas/expr.c @@ -803,7 +803,7 @@ operand (expressionP) integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) ? 0 : 10, - expressionP); + expressionP); break; #ifdef LITERAL_PREFIXDOLLAR_HEX diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h index 9483caf..3a4c931 100644 --- a/contrib/binutils/gas/expr.h +++ b/contrib/binutils/gas/expr.h @@ -107,6 +107,8 @@ typedef enum { /* machine dependent operators */ O_md1, O_md2, O_md3, O_md4, O_md5, O_md6, O_md7, O_md8, O_md9, O_md10, O_md11, O_md12, O_md13, O_md14, O_md15, O_md16, + O_md17, O_md18, O_md19, O_md20, O_md21, O_md22, O_md23, O_md24, + O_md25, O_md26, O_md27, O_md28, O_md29, O_md30, O_md31, O_md32, /* this must be the largest value */ O_max } operatorT; diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c index 04fa1f4..3e606fb 100644 --- a/contrib/binutils/gas/flonum-konst.c +++ b/contrib/binutils/gas/flonum-konst.c @@ -1,5 +1,5 @@ /* flonum_const.c - Useful Flonum constants - Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,7 +19,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> +#include "ansidecl.h" #include "flonum.h" /* JF: I added the last entry to this table, and I'm not sure if its right or not. Could go either way. I wish diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c index e2bcffa..e23579a 100644 --- a/contrib/binutils/gas/flonum-mult.c +++ b/contrib/binutils/gas/flonum-mult.c @@ -1,5 +1,5 @@ /* flonum_mult.c - multiply two flonums - Copyright 1987, 1990, 1991, 1992, 1995, 2000 + Copyright 1987, 1990, 1991, 1992, 1995, 2000, 2002 Free Software Foundation, Inc. This file is part of Gas, the GNU Assembler. @@ -19,7 +19,7 @@ in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. */ -#include <ansidecl.h> +#include "ansidecl.h" #include "flonum.h" /* plan for a . b => p(roduct) diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h index df259b8..9d52ae8 100644 --- a/contrib/binutils/gas/frags.h +++ b/contrib/binutils/gas/frags.h @@ -38,7 +38,7 @@ struct obstack; of a particular frag}+offset. BUG: it may be smarter to have a single pointer off to various different - notes for different frag kinds. See how code pans. */ + notes for different frag kinds. See how code pans. */ struct frag { /* Object file address (as an octet offset). */ diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c index 73b4d88..d1e4185 100644 --- a/contrib/binutils/gas/gasp.c +++ b/contrib/binutils/gas/gasp.c @@ -48,9 +48,10 @@ suitable for gas to consume. #include "config.h" #include "bin-bugs.h" +#include <assert.h> #include <stdio.h> #include <string.h> -#include <getopt.h> +#include "getopt.h" #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -66,6 +67,7 @@ extern char *malloc (); #include "sb.h" #include "macro.h" #include "asintl.h" +#include "xregex.h" char *program_version = "1.2"; @@ -227,6 +229,8 @@ static void hash_add_to_string_table PARAMS ((hash_table *, sb *, sb *, int)); static void hash_add_to_int_table PARAMS ((hash_table *, sb *, int)); static hash_entry *hash_lookup PARAMS ((hash_table *, sb *)); static void checkconst PARAMS ((int, exp_t *)); +static int is_flonum PARAMS ((int, sb *)); +static int chew_flonum PARAMS ((int, sb *, sb *)); static int sb_strtol PARAMS ((int, sb *, int, int *)); static int level_0 PARAMS ((int, sb *, exp_t *)); static int level_1 PARAMS ((int, sb *, exp_t *)); @@ -522,6 +526,62 @@ checkconst (op, term) } } +/* Chew the flonum from the string starting at idx. Adjust idx to + point to the next character after the flonum. */ + +static int +chew_flonum (idx, string, out) + int idx; + sb *string; + sb *out; +{ + sb buf; + regex_t reg; + regmatch_t match; + + /* Duplicate and null terminate `string'. */ + sb_new (&buf); + sb_add_sb (&buf, string); + sb_add_char (&buf, '\0'); + + if (regcomp (®, "([0-9]*\\.[0-9]+([eE][+-]?[0-9]+)?)", REG_EXTENDED) != 0) + return idx; + if (regexec (®, &buf.ptr[idx], 1, &match, 0) != 0) + return idx; + + /* Copy the match to the output. */ + assert (match.rm_eo >= match.rm_so); + sb_add_buffer (out, &buf.ptr[idx], match.rm_eo - match.rm_so); + + sb_kill (&buf); + regfree (®); + idx += match.rm_eo; + return idx; +} + +static int +is_flonum (idx, string) + int idx; + sb *string; +{ + sb buf; + regex_t reg; + int rc; + + /* Duplicate and null terminate `string'. */ + sb_new (&buf); + sb_add_sb (&buf, string); + sb_add_char (&buf, '\0'); + + if (regcomp (®, "^[0-9]*\\.[0-9]+([eE][+-]?[0-9]+)?", REG_EXTENDED) != 0) + return 0; + + rc = regexec (®, &buf.ptr[idx], 0, NULL, 0); + sb_kill (&buf); + regfree (®); + return (rc == 0); +} + /* Turn the number in string at idx into a number of base, fill in ptr, and return the index of the first character not in the number. */ @@ -1132,6 +1192,10 @@ change_base (idx, in, out) idx++; } } + else if (is_flonum (idx, in)) + { + idx = chew_flonum (idx, in, out); + } else if (ISDIGIT (in->ptr[idx])) { int value; diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c index e993136..df9101d 100644 --- a/contrib/binutils/gas/hash.c +++ b/contrib/binutils/gas/hash.c @@ -1,6 +1,6 @@ /* hash.c -- gas hash table code Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -546,19 +546,9 @@ char * what (description) char *description; { - char *retval; - char *malloc (); - printf (" %s : ", description); gets (answer); - /* Will one day clean up answer here. */ - retval = malloc (strlen (answer) + 1); - if (!retval) - { - error ("room"); - } - (void) strcpy (retval, answer); - return (retval); + return xstrdup (answer); } void diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c index 798f327..5c23f31 100644 --- a/contrib/binutils/gas/input-file.c +++ b/contrib/binutils/gas/input-file.c @@ -157,29 +157,29 @@ input_file_open (filename, pre) /* Begins with comment, may not want to preprocess. */ c = getc (f_in); if (c == 'N') - { - fgets (buf, 80, f_in); - if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5])) - preprocess = 0; - if (!strchr (buf, '\n')) - ungetc ('#', f_in); /* It was longer. */ - else - ungetc ('\n', f_in); - } + { + fgets (buf, 80, f_in); + if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5])) + preprocess = 0; + if (!strchr (buf, '\n')) + ungetc ('#', f_in); /* It was longer. */ + else + ungetc ('\n', f_in); + } else if (c == 'A') - { - fgets (buf, 80, f_in); - if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2])) - preprocess = 1; - if (!strchr (buf, '\n')) - ungetc ('#', f_in); - else - ungetc ('\n', f_in); - } + { + fgets (buf, 80, f_in); + if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2])) + preprocess = 1; + if (!strchr (buf, '\n')) + ungetc ('#', f_in); + else + ungetc ('\n', f_in); + } else if (c == '\n') - ungetc ('\n', f_in); + ungetc ('\n', f_in); else - ungetc ('#', f_in); + ungetc ('#', f_in); } else ungetc (c, f_in); diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c index c92f2db..7510d85 100644 --- a/contrib/binutils/gas/listing.c +++ b/contrib/binutils/gas/listing.c @@ -1,6 +1,6 @@ /* listing.c - mainting assembly listings Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001 + 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -92,7 +92,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA */ #include "as.h" -#include <obstack.h> +#include "obstack.h" #include "safe-ctype.h" #include "input-file.h" #include "subsegs.h" @@ -269,8 +269,7 @@ file_info (file_name) p = (file_info_type *) xmalloc (sizeof (file_info_type)); p->next = file_info_head; file_info_head = p; - p->filename = xmalloc ((unsigned long) strlen (file_name) + 1); - strcpy (p->filename, file_name); + p->filename = xstrdup (file_name); p->pos = 0; p->linenum = 0; p->at_end = 0; @@ -616,36 +615,36 @@ calc_hex (list) data_buffer_size += 2; octet_in_frag++; } - if (frag_ptr->fr_type == rs_fill) - { - unsigned int var_rep_max = octet_in_frag; - unsigned int var_rep_idx = octet_in_frag; - - /* Print as many bytes from the variable part as is sensible. */ - while (((offsetT) octet_in_frag - < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) - && data_buffer_size < MAX_BYTES - 3) - { - if (address == ~(unsigned int) 0) - { - address = frag_ptr->fr_address / OCTETS_PER_BYTE; - } - sprintf (data_buffer + data_buffer_size, - "%02X", - (frag_ptr->fr_literal[var_rep_idx]) & 0xff); + if (frag_ptr->fr_type == rs_fill) + { + unsigned int var_rep_max = octet_in_frag; + unsigned int var_rep_idx = octet_in_frag; + + /* Print as many bytes from the variable part as is sensible. */ + while (((offsetT) octet_in_frag + < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) + && data_buffer_size < MAX_BYTES - 3) + { + if (address == ~(unsigned int) 0) + { + address = frag_ptr->fr_address / OCTETS_PER_BYTE; + } + sprintf (data_buffer + data_buffer_size, + "%02X", + (frag_ptr->fr_literal[var_rep_idx]) & 0xff); #if 0 - data_buffer[data_buffer_size++] = '*'; - data_buffer[data_buffer_size++] = '*'; + data_buffer[data_buffer_size++] = '*'; + data_buffer[data_buffer_size++] = '*'; #endif - data_buffer_size += 2; + data_buffer_size += 2; - var_rep_idx++; - octet_in_frag++; + var_rep_idx++; + octet_in_frag++; - if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var) - var_rep_idx = var_rep_max; - } - } + if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var) + var_rep_idx = var_rep_max; + } + } frag_ptr = frag_ptr->fr_next; } @@ -1063,7 +1062,7 @@ listing_listing (name) if (!((listing & LISTING_NODEBUG) && debugging_pseudo (list, list->line_contents))) { - print_lines (list, + print_lines (list, list->file->linenum == 0 ? list->line : list->file->linenum, list->line_contents, calc_hex (list)); } diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c index 11d6511..0842431 100644 --- a/contrib/binutils/gas/macro.c +++ b/contrib/binutils/gas/macro.c @@ -383,7 +383,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) idx + 1, in, &val); - sprintf(buf, "%d", val); + sprintf (buf, "%d", val); sb_add_string (out, buf); } else if (in->ptr[idx] == '"' @@ -928,29 +928,29 @@ macro_expand (idx, in, m, out, comment_char) /* The macro may be called with an optional qualifier, which may be referred to in the macro body as \0. */ if (idx < in->len && in->ptr[idx] == '.') - { - /* The Microtec assembler ignores this if followed by a white space. - (Macro invocation with empty extension) */ - idx++; - if ( idx < in->len - && in->ptr[idx] != ' ' - && in->ptr[idx] != '\t') - { - formal_entry *n; - - n = (formal_entry *) xmalloc (sizeof (formal_entry)); - sb_new (&n->name); - sb_new (&n->def); - sb_new (&n->actual); - n->index = QUAL_INDEX; - - n->next = m->formals; - m->formals = n; - - idx = get_any_string (idx, in, &n->actual, 1, 0); - } - } - } + { + /* The Microtec assembler ignores this if followed by a white space. + (Macro invocation with empty extension) */ + idx++; + if ( idx < in->len + && in->ptr[idx] != ' ' + && in->ptr[idx] != '\t') + { + formal_entry *n; + + n = (formal_entry *) xmalloc (sizeof (formal_entry)); + sb_new (&n->name); + sb_new (&n->def); + sb_new (&n->actual); + n->index = QUAL_INDEX; + + n->next = m->formals; + m->formals = n; + + idx = get_any_string (idx, in, &n->actual, 1, 0); + } + } + } /* Peel off the actuals and store them away in the hash tables' actuals. */ idx = sb_skip_white (idx, in); diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h index beff9a8..b9dc2d0 100644 --- a/contrib/binutils/gas/macro.h +++ b/contrib/binutils/gas/macro.h @@ -79,7 +79,7 @@ extern const char *define_macro PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)), const char **namep)); extern int check_macro PARAMS ((const char *, sb *, int, const char **, - macro_entry **)); + macro_entry **)); extern void delete_macro PARAMS ((const char *)); extern const char *expand_irp PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *)), int)); diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in index 9003f27..6f67bf4 100644 --- a/contrib/binutils/gas/po/POTFILES.in +++ b/contrib/binutils/gas/po/POTFILES.in @@ -56,8 +56,12 @@ config/tc-d10v.c config/tc-d10v.h config/tc-d30v.c config/tc-d30v.h +config/tc-dlx.c +config/tc-dlx.h config/tc-fr30.c config/tc-fr30.h +config/tc-frv.c +config/tc-frv.h config/tc-h8300.c config/tc-h8300.h config/tc-h8500.c diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot index cf36185..b13d1da 100644 --- a/contrib/binutils/gas/po/gas.pot +++ b/contrib/binutils/gas/po/gas.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-02-08 04:20-0200\n" +"POT-Creation-Date: 2002-07-23 15:57-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" @@ -246,94 +246,93 @@ msgid "" " for the output data column of the listing\n" msgstr "" -#: as.c:327 gasp.c:3528 +#: as.c:327 gasp.c:3592 #, c-format msgid "Report bugs to %s\n" msgstr "" -#. This output is intended to follow the GNU standards document. -#: as.c:527 +#: as.c:528 as.c:530 #, c-format msgid "GNU assembler %s\n" msgstr "" -#: as.c:528 +#: as.c:532 msgid "Copyright 2002 Free Software Foundation, Inc.\n" msgstr "" -#: as.c:529 gasp.c:3627 +#: as.c:533 gasp.c:3691 msgid "" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty.\n" msgstr "" -#: as.c:532 +#: as.c:536 #, c-format msgid "This assembler was configured for a target of `%s'.\n" msgstr "" -#: as.c:539 +#: as.c:543 msgid "multiple emulation names specified" msgstr "" -#: as.c:541 +#: as.c:545 msgid "emulations not handled in this configuration" msgstr "" -#: as.c:546 +#: as.c:550 #, c-format msgid "alias = %s\n" msgstr "" -#: as.c:547 +#: as.c:551 #, c-format msgid "canonical = %s\n" msgstr "" -#: as.c:548 +#: as.c:552 #, c-format msgid "cpu-type = %s\n" msgstr "" -#: as.c:550 +#: as.c:554 #, c-format msgid "format = %s\n" msgstr "" -#: as.c:553 +#: as.c:557 #, c-format msgid "bfd-target = %s\n" msgstr "" -#: as.c:566 +#: as.c:570 msgid "bad defsym; format is --defsym name=value" msgstr "" -#: as.c:590 +#: as.c:594 msgid "no file name following -t option" msgstr "" -#: as.c:605 +#: as.c:609 #, c-format msgid "failed to read instruction table %s\n" msgstr "" -#: as.c:720 +#: as.c:724 #, c-format msgid "invalid listing option `%c'" msgstr "" -#: as.c:928 +#: as.c:926 #, c-format msgid "%d warnings, treating warnings as errors" msgstr "" -#: as.c:959 +#: as.c:957 #, c-format msgid "%s: total time in assembly: %ld.%06ld\n" msgstr "" -#: as.c:962 +#: as.c:960 #, c-format msgid "%s: data size %ld\n" msgstr "" @@ -430,11 +429,11 @@ msgstr "" msgid "Symbol `%s' can not be both weak and common" msgstr "" -#: config/obj-aout.c:255 config/obj-coff.c:2010 +#: config/obj-aout.c:255 config/obj-coff.c:2018 msgid "unresolved relocation" msgstr "" -#: config/obj-aout.c:257 config/obj-coff.c:2012 +#: config/obj-aout.c:257 config/obj-coff.c:2020 #, c-format msgid "bad relocation: symbol `%s' not in symbol table" msgstr "" @@ -444,7 +443,7 @@ msgstr "" msgid "%s: bad type for weak symbol" msgstr "" -#: config/obj-aout.c:458 config/obj-coff.c:2956 write.c:1933 +#: config/obj-aout.c:458 config/obj-coff.c:2941 write.c:1952 #, c-format msgid "%s: global symbols not supported in common sections" msgstr "" @@ -473,11 +472,12 @@ msgstr "" msgid "Line numbers must be positive integers\n" msgstr "" -#: config/obj-coff.c:503 config/obj-coff.c:2371 +#. Wrong context. +#: config/obj-coff.c:503 config/obj-coff.c:2363 msgid ".ln pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:546 ecoff.c:3280 +#: config/obj-coff.c:546 ecoff.c:3278 msgid ".loc outside of .text" msgstr "" @@ -485,11 +485,11 @@ msgstr "" msgid ".loc pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:641 config/obj-coff.c:2428 +#: config/obj-coff.c:641 config/obj-coff.c:2415 msgid ".def pseudo-op used inside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:687 config/obj-coff.c:2480 +#: config/obj-coff.c:687 config/obj-coff.c:2467 msgid ".endef pseudo-op used outside of .def/.endef: ignored." msgstr "" @@ -498,141 +498,141 @@ msgstr "" msgid "`%s' symbol without preceding function" msgstr "" -#: config/obj-coff.c:812 config/obj-coff.c:2555 +#: config/obj-coff.c:812 config/obj-coff.c:2547 #, c-format msgid "unexpected storage class %d" msgstr "" -#: config/obj-coff.c:925 config/obj-coff.c:2662 +#: config/obj-coff.c:925 config/obj-coff.c:2654 msgid ".dim pseudo-op used outside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:945 config/obj-coff.c:2682 +#: config/obj-coff.c:945 config/obj-coff.c:2674 msgid "badly formed .dim directive ignored" msgstr "" -#: config/obj-coff.c:996 config/obj-coff.c:2745 +#: config/obj-coff.c:996 config/obj-coff.c:2734 msgid ".size pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1012 config/obj-coff.c:2761 +#: config/obj-coff.c:1012 config/obj-coff.c:2750 msgid ".scl pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1030 config/obj-coff.c:2779 +#: config/obj-coff.c:1030 config/obj-coff.c:2768 msgid ".tag pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1049 config/obj-coff.c:2797 +#: config/obj-coff.c:1049 config/obj-coff.c:2785 #, c-format msgid "tag not found for .tag %s" msgstr "" -#: config/obj-coff.c:1064 config/obj-coff.c:2812 +#: config/obj-coff.c:1064 config/obj-coff.c:2799 msgid ".type pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1086 config/obj-coff.c:2834 +#: config/obj-coff.c:1086 config/obj-coff.c:2819 msgid ".val pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1231 config/obj-coff.c:3029 +#: config/obj-coff.c:1231 config/obj-coff.c:3012 msgid "mismatched .eb" msgstr "" -#: config/obj-coff.c:1252 config/obj-coff.c:3069 +#: config/obj-coff.c:1252 config/obj-coff.c:3050 msgid "C_EFCN symbol out of scope" msgstr "" #. STYP_INFO #. STYP_LIB #. STYP_OVER -#: config/obj-coff.c:1476 +#: config/obj-coff.c:1478 #, c-format msgid "unsupported section attribute '%c'" msgstr "" -#: config/obj-coff.c:1481 config/obj-coff.c:3774 config/tc-ppc.c:4211 +#: config/obj-coff.c:1483 config/obj-coff.c:3755 config/tc-ppc.c:4222 #, c-format msgid "unknown section attribute '%c'" msgstr "" -#: config/obj-coff.c:1511 config/tc-ppc.c:4229 config/tc-tic54x.c:4133 -#: read.c:2555 +#: config/obj-coff.c:1513 config/tc-ppc.c:4240 config/tc-tic54x.c:4339 +#: read.c:2560 #, c-format msgid "error setting flags for \"%s\": %s" msgstr "" -#: config/obj-coff.c:1522 +#: config/obj-coff.c:1524 #, c-format msgid "Ignoring changed section attributes for %s" msgstr "" -#: config/obj-coff.c:1658 +#: config/obj-coff.c:1660 #, c-format msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n" msgstr "" -#: config/obj-coff.c:1838 config/obj-ieee.c:69 +#: config/obj-coff.c:1845 config/obj-ieee.c:69 msgid "Out of step\n" msgstr "" -#: config/obj-coff.c:2287 +#: config/obj-coff.c:2282 msgid "bfd_coff_swap_scnhdr_out failed" msgstr "" -#: config/obj-coff.c:2512 +#: config/obj-coff.c:2503 msgid "`.bf' symbol without preceding function\n" msgstr "" -#: config/obj-coff.c:3466 config/obj-ieee.c:507 +#: config/obj-coff.c:3453 config/obj-ieee.c:521 #, c-format msgid "FATAL: Can't create %s" msgstr "" -#: config/obj-coff.c:3648 +#: config/obj-coff.c:3631 #, c-format msgid "Can't close %s: %s" msgstr "" -#: config/obj-coff.c:3682 +#: config/obj-coff.c:3665 #, c-format msgid "Too many new sections; can't add \"%s\"" msgstr "" -#: config/obj-coff.c:4089 config/tc-sparc.c:3537 +#: config/obj-coff.c:4053 config/tc-sparc.c:3544 msgid "Expected comma after name" msgstr "" -#: config/obj-coff.c:4095 +#: config/obj-coff.c:4059 msgid "Missing size expression" msgstr "" -#: config/obj-coff.c:4101 +#: config/obj-coff.c:4065 #, c-format msgid "lcomm length (%d.) <0! Ignored." msgstr "" -#: config/obj-coff.c:4129 +#: config/obj-coff.c:4093 #, c-format msgid "Symbol %s already defined" msgstr "" -#: config/obj-coff.c:4224 config/tc-i960.c:3206 +#: config/obj-coff.c:4189 config/tc-i960.c:3207 #, c-format msgid "No 'bal' entry point for leafproc %s" msgstr "" -#: config/obj-coff.c:4303 +#: config/obj-coff.c:4266 #, c-format msgid "Negative of non-absolute symbol %s" msgstr "" -#: config/obj-coff.c:4324 +#: config/obj-coff.c:4286 msgid "callj to difference of 2 symbols" msgstr "" -#: config/obj-coff.c:4370 +#: config/obj-coff.c:4330 #, c-format msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld." msgstr "" @@ -640,16 +640,16 @@ msgstr "" #. This is a COBR instruction. They have only a 13-bit #. displacement and are only to be used for local branches: #. flag as error, don't generate relocation. -#: config/obj-coff.c:4459 config/tc-i960.c:3226 write.c:2826 +#: config/obj-coff.c:4416 config/tc-i960.c:3227 write.c:2845 msgid "can't use COBR format with external label" msgstr "" -#: config/obj-coff.c:4534 +#: config/obj-coff.c:4489 #, c-format msgid "Value of %ld too large for field of %d bytes at 0x%lx" msgstr "" -#: config/obj-coff.c:4548 +#: config/obj-coff.c:4503 #, c-format msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx" msgstr "" @@ -662,172 +662,177 @@ msgstr "" msgid "Can't set register masks" msgstr "" -#: config/obj-elf.c:308 +#: config/obj-elf.c:313 msgid "expected comma after symbol-name" msgstr "" -#: config/obj-elf.c:315 config/tc-sparc.c:3690 +#: config/obj-elf.c:320 config/tc-sparc.c:3697 #, c-format msgid ".COMMon length (%d.) <0! Ignored." msgstr "" -#: config/obj-elf.c:325 ecoff.c:3399 read.c:1403 read.c:1504 read.c:2137 -#: read.c:2226 read.c:2856 read.c:4937 symbols.c:361 symbols.c:460 +#: config/obj-elf.c:330 ecoff.c:3397 read.c:1403 read.c:1504 read.c:2142 +#: read.c:2231 read.c:2861 read.c:4942 symbols.c:361 symbols.c:460 #, c-format msgid "symbol `%s' is already defined" msgstr "" -#: config/obj-elf.c:333 +#: config/obj-elf.c:338 #, c-format msgid "length of .comm \"%s\" is already %ld; not changed to %d" msgstr "" -#: config/obj-elf.c:356 +#: config/obj-elf.c:361 msgid "common alignment negative; 0 assumed" msgstr "" -#: config/obj-elf.c:375 +#: config/obj-elf.c:380 msgid "common alignment not a power of 2" msgstr "" -#: config/obj-elf.c:438 config/tc-sparc.c:3832 config/tc-v850.c:450 +#: config/obj-elf.c:443 config/tc-sparc.c:3839 config/tc-v850.c:450 #, c-format msgid "bad .common segment %s" msgstr "" -#: config/obj-elf.c:668 +#: config/obj-elf.c:714 #, c-format msgid "setting incorrect section type for %s" msgstr "" -#: config/obj-elf.c:672 +#: config/obj-elf.c:718 #, c-format msgid "ignoring incorrect section type for %s" msgstr "" -#: config/obj-elf.c:685 +#: config/obj-elf.c:731 #, c-format msgid "setting incorrect section attributes for %s" msgstr "" -#: config/obj-elf.c:732 +#: config/obj-elf.c:782 #, c-format msgid "ignoring changed section attributes for %s" msgstr "" -#: config/obj-elf.c:734 +#: config/obj-elf.c:784 #, c-format msgid "ignoring changed section entity size for %s" msgstr "" -#: config/obj-elf.c:737 +#: config/obj-elf.c:787 #, c-format msgid "ignoring new section group for %s" msgstr "" -#: config/obj-elf.c:788 -msgid "unrecognized .section attribute: want a,w,x,M,S,G" +#: config/obj-elf.c:841 +msgid "unrecognized .section attribute: want a,w,x,M,S,G,T" msgstr "" -#: config/obj-elf.c:828 +#: config/obj-elf.c:881 msgid "unrecognized section attribute" msgstr "" -#: config/obj-elf.c:850 read.c:2538 +#: config/obj-elf.c:903 read.c:2543 msgid "unrecognized section type" msgstr "" -#: config/obj-elf.c:880 +#: config/obj-elf.c:933 msgid "missing name" msgstr "" -#: config/obj-elf.c:987 +#: config/obj-elf.c:1042 msgid "invalid merge entity size" msgstr "" -#: config/obj-elf.c:994 +#: config/obj-elf.c:1049 msgid "entity size for SHF_MERGE not specified" msgstr "" -#: config/obj-elf.c:1007 +#: config/obj-elf.c:1069 msgid "group name for SHF_GROUP not specified" msgstr "" -#: config/obj-elf.c:1020 +#: config/obj-elf.c:1082 msgid "character following name is not '#'" msgstr "" -#: config/obj-elf.c:1121 +#: config/obj-elf.c:1183 msgid ".previous without corresponding .section; ignored" msgstr "" -#: config/obj-elf.c:1148 +#: config/obj-elf.c:1210 msgid ".popsection without corresponding .pushsection; ignored" msgstr "" -#: config/obj-elf.c:1202 +#: config/obj-elf.c:1264 msgid "expected comma after name in .symver" msgstr "" -#: config/obj-elf.c:1225 +#: config/obj-elf.c:1287 #, c-format msgid "missing version name in `%s' for symbol `%s'" msgstr "" -#: config/obj-elf.c:1236 +#: config/obj-elf.c:1298 #, c-format msgid "multiple versions [`%s'|`%s'] for symbol `%s'" msgstr "" -#: config/obj-elf.c:1470 +#: config/obj-elf.c:1534 msgid "expected quoted string" msgstr "" -#: config/obj-elf.c:1491 +#: config/obj-elf.c:1555 #, c-format msgid "expected comma after name `%s' in .size directive" msgstr "" -#: config/obj-elf.c:1500 +#: config/obj-elf.c:1564 msgid "missing expression in .size directive" msgstr "" -#: config/obj-elf.c:1583 +#: config/obj-elf.c:1647 #, c-format msgid "unrecognized symbol type \"%s\"" msgstr "" -#: config/obj-elf.c:1764 +#: config/obj-elf.c:1828 msgid ".size expression too complicated to fix up" msgstr "" -#: config/obj-elf.c:1796 +#: config/obj-elf.c:1860 #, c-format msgid "" "invalid attempt to declare external version name as default in symbol `%s'" msgstr "" -#: config/obj-elf.c:1855 ecoff.c:3644 +#: config/obj-elf.c:1921 ecoff.c:3642 #, c-format msgid "symbol `%s' can not be both weak and common" msgstr "" -#: config/obj-elf.c:1971 +#: config/obj-elf.c:2041 +#, c-format +msgid "assuming all members of group `%s' are COMDAT" +msgstr "" + +#: config/obj-elf.c:2063 #, c-format msgid "can't create group: %s" msgstr "" -#: config/obj-elf.c:2076 +#: config/obj-elf.c:2170 #, c-format msgid "failed to set up debugging information: %s" msgstr "" -#: config/obj-elf.c:2096 +#: config/obj-elf.c:2190 #, c-format msgid "can't start writing .mdebug section: %s" msgstr "" -#: config/obj-elf.c:2104 +#: config/obj-elf.c:2198 #, c-format msgid "could not write .mdebug section: %s" msgstr "" @@ -1005,39 +1010,40 @@ msgstr "" msgid "unhandled stab type %d" msgstr "" -#: config/tc-a29k.c:160 config/tc-sparc.c:3884 +#: config/tc-a29k.c:160 config/tc-sparc.c:3891 msgid "Unknown segment type" msgstr "" #. Probably a memory allocation problem? Give up now. -#: config/tc-a29k.c:330 config/tc-hppa.c:1462 config/tc-mips.c:1251 -#: config/tc-mips.c:1293 config/tc-or32.c:230 config/tc-sparc.c:847 +#: config/tc-a29k.c:330 config/tc-dlx.c:369 config/tc-hppa.c:1464 +#: config/tc-mips.c:1063 config/tc-mips.c:1105 config/tc-or32.c:230 +#: config/tc-sparc.c:853 msgid "Broken assembler. No assembly attempted." msgstr "" -#: config/tc-a29k.c:375 config/tc-avr.c:1131 config/tc-d10v.c:540 -#: config/tc-d30v.c:552 config/tc-h8300.c:313 config/tc-h8500.c:284 +#: config/tc-a29k.c:375 config/tc-avr.c:1137 config/tc-d10v.c:545 +#: config/tc-d30v.c:552 config/tc-h8300.c:333 config/tc-h8500.c:284 #: config/tc-mcore.c:655 config/tc-mmix.c:475 config/tc-mn10200.c:940 -#: config/tc-mn10300.c:1311 config/tc-or32.c:336 config/tc-or32.c:392 -#: config/tc-ppc.c:2106 config/tc-s390.c:1054 config/tc-sh.c:1287 +#: config/tc-mn10300.c:1318 config/tc-or32.c:336 config/tc-or32.c:392 +#: config/tc-ppc.c:2122 config/tc-s390.c:1062 config/tc-sh.c:1272 #: config/tc-sh64.c:2228 config/tc-tic80.c:283 config/tc-v850.c:1984 #: config/tc-w65.c:241 config/tc-z8k.c:343 msgid "missing operand" msgstr "" #: config/tc-a29k.c:414 config/tc-cris.c:950 config/tc-cris.c:958 -#: config/tc-hppa.c:1598 config/tc-i860.c:431 config/tc-i860.c:448 -#: config/tc-sparc.c:1409 config/tc-sparc.c:1415 +#: config/tc-dlx.c:834 config/tc-hppa.c:1600 config/tc-i860.c:431 +#: config/tc-i860.c:448 config/tc-sparc.c:1415 config/tc-sparc.c:1421 #, c-format msgid "Unknown opcode: `%s'" msgstr "" -#: config/tc-a29k.c:419 +#: config/tc-a29k.c:419 config/tc-dlx.c:852 #, c-format msgid "Unknown opcode `%s'." msgstr "" -#: config/tc-a29k.c:451 +#: config/tc-a29k.c:451 config/tc-dlx.c:913 #, c-format msgid "Too many operands: %s" msgstr "" @@ -1048,7 +1054,7 @@ msgid "Immediate value of %ld is too large" msgstr "" #: config/tc-a29k.c:543 config/tc-i860.c:340 config/tc-i860.c:832 -#: config/tc-m68k.c:3181 config/tc-m68k.c:3210 config/tc-sparc.c:2544 +#: config/tc-m68k.c:3181 config/tc-m68k.c:3210 config/tc-sparc.c:2550 msgid "failed sanity check." msgstr "" @@ -1070,12 +1076,12 @@ msgstr "" msgid "a29k_estimate_size_before_relax\n" msgstr "" -#: config/tc-a29k.c:1092 config/tc-or32.c:1375 +#: config/tc-a29k.c:1092 config/tc-dlx.c:1295 config/tc-or32.c:1375 #, c-format msgid "label \"$%d\" redefined" msgstr "" -#: config/tc-a29k.c:1165 config/tc-or32.c:1470 +#: config/tc-a29k.c:1165 config/tc-dlx.c:511 config/tc-or32.c:1470 #, c-format msgid "Invalid expression after %%%%\n" msgstr "" @@ -1084,33 +1090,33 @@ msgstr "" msgid "Invalid register in & expression" msgstr "" -#: config/tc-alpha.c:789 +#: config/tc-alpha.c:816 #, c-format msgid "internal error: can't hash opcode `%s': %s" msgstr "" -#: config/tc-alpha.c:824 +#: config/tc-alpha.c:851 #, c-format msgid "internal error: can't hash macro `%s': %s" msgstr "" -#: config/tc-alpha.c:906 config/tc-i960.c:2701 +#: config/tc-alpha.c:933 config/tc-i960.c:2702 msgid "syntax error" msgstr "" -#: config/tc-alpha.c:980 config/tc-h8300.c:1421 config/tc-h8500.c:1187 -#: config/tc-hppa.c:4017 config/tc-i860.c:931 config/tc-m68hc11.c:500 +#: config/tc-alpha.c:1007 config/tc-h8300.c:1426 config/tc-h8500.c:1187 +#: config/tc-hppa.c:4019 config/tc-i860.c:931 config/tc-m68hc11.c:500 #: config/tc-m68k.c:4201 config/tc-m88k.c:1011 config/tc-ns32k.c:1663 -#: config/tc-or32.c:912 config/tc-sparc.c:2831 config/tc-z8k.c:1321 +#: config/tc-or32.c:912 config/tc-sparc.c:2837 config/tc-z8k.c:1328 msgid "Bad call to MD_ATOF()" msgstr "" -#: config/tc-alpha.c:1030 +#: config/tc-alpha.c:1057 #, c-format msgid "Unknown CPU identifier `%s'" msgstr "" -#: config/tc-alpha.c:1074 +#: config/tc-alpha.c:1101 msgid "" "Alpha options:\n" "-32addr\t\t\ttreat addresses as 32-bit values\n" @@ -1121,319 +1127,369 @@ msgid "" "\t\t\tthese variants include PALcode opcodes\n" msgstr "" -#: config/tc-alpha.c:1084 +#: config/tc-alpha.c:1111 msgid "" "VMS options:\n" "-+\t\t\thash encode (don't truncate) names longer than 64 characters\n" "-H\t\t\tshow new symbol after hash truncation\n" msgstr "" -#: config/tc-alpha.c:1242 +#: config/tc-alpha.c:1284 #, c-format msgid "unhandled relocation type %s" msgstr "" -#: config/tc-alpha.c:1255 +#: config/tc-alpha.c:1297 msgid "non-absolute expression in constant field" msgstr "" -#: config/tc-alpha.c:1269 +#: config/tc-alpha.c:1311 #, c-format msgid "type %d reloc done?\n" msgstr "" -#: config/tc-alpha.c:1317 config/tc-alpha.c:1324 config/tc-mips.c:7965 +#: config/tc-alpha.c:1359 config/tc-alpha.c:1366 config/tc-mips.c:8069 msgid "Used $at without \".set noat\"" msgstr "" -#: config/tc-alpha.c:1481 +#: config/tc-alpha.c:1439 +#, c-format +msgid "!samegp reloc against symbol without .prologue: %s" +msgstr "" + +#: config/tc-alpha.c:1588 #, c-format msgid "cannot represent `%s' relocation in object file" msgstr "" -#: config/tc-alpha.c:1488 +#: config/tc-alpha.c:1595 #, c-format msgid "internal error? cannot generate `%s' relocation" msgstr "" -#: config/tc-alpha.c:1543 +#: config/tc-alpha.c:1651 #, c-format msgid "frame reg expected, using $%d." msgstr "" -#: config/tc-alpha.c:1646 +#: config/tc-alpha.c:1752 #, c-format msgid "No !literal!%ld was found" msgstr "" -#: config/tc-alpha.c:1654 +#: config/tc-alpha.c:1758 +#, c-format +msgid "No !tlsgd!%ld was found" +msgstr "" + +#: config/tc-alpha.c:1765 +#, c-format +msgid "No !tlsldm!%ld was found" +msgstr "" + +#: config/tc-alpha.c:1773 #, c-format msgid "No ldah !gpdisp!%ld was found" msgstr "" -#: config/tc-alpha.c:1705 +#: config/tc-alpha.c:1823 +#, c-format +msgid "too many !literal!%ld for %s" +msgstr "" + +#: config/tc-alpha.c:1853 #, c-format msgid "No lda !gpdisp!%ld was found" msgstr "" #. only support one relocation op per insn -#: config/tc-alpha.c:1841 +#: config/tc-alpha.c:1997 msgid "More than one relocation op per insn" msgstr "" -#: config/tc-alpha.c:1857 +#: config/tc-alpha.c:2013 msgid "No relocation operand" msgstr "" -#: config/tc-alpha.c:1867 +#: config/tc-alpha.c:2023 #, c-format msgid "Unknown relocation operand: !%s" msgstr "" -#: config/tc-alpha.c:1877 +#: config/tc-alpha.c:2033 #, c-format msgid "no sequence number after !%s" msgstr "" -#: config/tc-alpha.c:1887 +#: config/tc-alpha.c:2043 #, c-format msgid "!%s does not use a sequence number" msgstr "" -#: config/tc-alpha.c:1897 +#: config/tc-alpha.c:2053 #, c-format msgid "Bad sequence number: !%s!%s" msgstr "" -#: config/tc-alpha.c:2224 +#: config/tc-alpha.c:2381 #, c-format msgid "operand out of range (%s not between %d and %d)" msgstr "" -#: config/tc-alpha.c:2338 config/tc-alpha.c:2362 config/tc-d10v.c:629 -#: config/tc-d30v.c:640 config/tc-mn10200.c:995 config/tc-mn10300.c:1382 -#: config/tc-ppc.c:2072 config/tc-ppc.c:2256 config/tc-ppc.c:2268 -#: config/tc-s390.c:1064 config/tc-s390.c:1121 config/tc-v850.c:1764 +#: config/tc-alpha.c:2495 config/tc-alpha.c:2519 config/tc-d10v.c:634 +#: config/tc-d30v.c:640 config/tc-mn10200.c:995 config/tc-mn10300.c:1389 +#: config/tc-ppc.c:2088 config/tc-ppc.c:2269 config/tc-ppc.c:2281 +#: config/tc-s390.c:1072 config/tc-s390.c:1129 config/tc-v850.c:1764 #: config/tc-v850.c:1787 config/tc-v850.c:2007 msgid "too many fixups" msgstr "" -#: config/tc-alpha.c:2374 +#: config/tc-alpha.c:2531 msgid "invalid relocation for instruction" msgstr "" -#: config/tc-alpha.c:2385 +#: config/tc-alpha.c:2542 msgid "invalid relocation for field" msgstr "" -#: config/tc-alpha.c:2484 +#: config/tc-alpha.c:2649 #, c-format msgid "too many ldah insns for !gpdisp!%ld" msgstr "" -#: config/tc-alpha.c:2486 config/tc-alpha.c:2498 +#: config/tc-alpha.c:2651 config/tc-alpha.c:2663 #, c-format msgid "both insns for !gpdisp!%ld must be in the same section" msgstr "" -#: config/tc-alpha.c:2496 +#: config/tc-alpha.c:2661 #, c-format msgid "too many lda insns for !gpdisp!%ld" msgstr "" -#: config/tc-alpha.c:2577 config/tc-alpha.c:2647 +#: config/tc-alpha.c:2713 +#, c-format +msgid "too many lituse insns for !lituse_tlsgd!%ld" +msgstr "" + +#: config/tc-alpha.c:2716 +#, c-format +msgid "too many lituse insns for !lituse_tlsldm!%ld" +msgstr "" + +#: config/tc-alpha.c:2733 +#, c-format +msgid "duplicate !tlsgd!%ld" +msgstr "" + +#: config/tc-alpha.c:2735 +#, c-format +msgid "sequence number in use for !tlsldm!%ld" +msgstr "" + +#: config/tc-alpha.c:2749 +#, c-format +msgid "duplicate !tlsldm!%ld" +msgstr "" + +#: config/tc-alpha.c:2751 +#, c-format +msgid "sequence number in use for !tlsgd!%ld" +msgstr "" + +#: config/tc-alpha.c:2796 config/tc-alpha.c:2869 #, c-format msgid "inappropriate arguments for opcode `%s'" msgstr "" -#: config/tc-alpha.c:2579 config/tc-alpha.c:2649 +#: config/tc-alpha.c:2798 config/tc-alpha.c:2871 #, c-format msgid "opcode `%s' not supported for target %s" msgstr "" -#: config/tc-alpha.c:2583 config/tc-alpha.c:2653 config/tc-avr.c:1097 +#: config/tc-alpha.c:2802 config/tc-alpha.c:2875 config/tc-avr.c:1103 #, c-format msgid "unknown opcode `%s'" msgstr "" -#: config/tc-alpha.c:2701 +#: config/tc-alpha.c:2922 msgid "can not resolve expression" msgstr "" -#: config/tc-alpha.c:2845 config/tc-alpha.c:3024 +#: config/tc-alpha.c:3066 config/tc-alpha.c:3245 msgid "overflow in literal (.lita) table" msgstr "" -#: config/tc-alpha.c:2852 config/tc-alpha.c:2875 config/tc-alpha.c:3037 -#: config/tc-alpha.c:3252 config/tc-alpha.c:3297 config/tc-alpha.c:3371 -#: config/tc-alpha.c:3463 config/tc-alpha.c:3712 config/tc-alpha.c:3813 +#: config/tc-alpha.c:3073 config/tc-alpha.c:3096 config/tc-alpha.c:3258 +#: config/tc-alpha.c:3473 config/tc-alpha.c:3518 config/tc-alpha.c:3592 +#: config/tc-alpha.c:3684 config/tc-alpha.c:3933 config/tc-alpha.c:4034 msgid "macro requires $at register while noat in effect" msgstr "" -#: config/tc-alpha.c:2854 config/tc-alpha.c:2877 config/tc-alpha.c:3039 +#: config/tc-alpha.c:3075 config/tc-alpha.c:3098 config/tc-alpha.c:3260 msgid "macro requires $at while $at in use" msgstr "" -#: config/tc-alpha.c:2985 +#: config/tc-alpha.c:3206 msgid "bignum invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:2987 +#: config/tc-alpha.c:3208 msgid "floating point number invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:2992 +#: config/tc-alpha.c:3213 msgid "can't handle expression" msgstr "" -#: config/tc-alpha.c:3030 +#: config/tc-alpha.c:3251 msgid "overflow in literal (.lit8) table" msgstr "" -#: config/tc-alpha.c:4042 config/tc-ppc.c:1579 config/tc-ppc.c:3974 +#: config/tc-alpha.c:4271 config/tc-ppc.c:1569 config/tc-ppc.c:3985 #, c-format msgid ".COMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-alpha.c:4071 config/tc-sparc.c:3700 config/tc-v850.c:254 +#: config/tc-alpha.c:4300 config/tc-sparc.c:3707 config/tc-v850.c:254 msgid "Ignoring attempt to re-define symbol" msgstr "" -#: config/tc-alpha.c:4080 config/tc-alpha.c:4089 config/tc-ppc.c:4011 +#: config/tc-alpha.c:4309 config/tc-alpha.c:4318 config/tc-ppc.c:4022 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-alpha.c:4191 ecoff.c:3084 +#: config/tc-alpha.c:4420 ecoff.c:3082 msgid ".ent directive has no name" msgstr "" -#: config/tc-alpha.c:4199 +#: config/tc-alpha.c:4428 msgid "nested .ent directives" msgstr "" -#: config/tc-alpha.c:4235 ecoff.c:3034 +#: config/tc-alpha.c:4464 ecoff.c:3032 msgid ".end directive has no name" msgstr "" -#: config/tc-alpha.c:4244 +#: config/tc-alpha.c:4473 msgid ".end directive names different symbol than .ent" msgstr "" -#: config/tc-alpha.c:4321 +#: config/tc-alpha.c:4550 #, c-format msgid "Invalid argument %d to .prologue." msgstr "" -#: config/tc-alpha.c:4413 +#: config/tc-alpha.c:4642 msgid "ECOFF debugging is disabled." msgstr "" -#: config/tc-alpha.c:4434 +#: config/tc-alpha.c:4663 msgid "Unknown section directive" msgstr "" -#: config/tc-alpha.c:4470 +#: config/tc-alpha.c:4699 msgid ".ent directive has no symbol" msgstr "" -#: config/tc-alpha.c:4497 +#: config/tc-alpha.c:4726 msgid "Bad .frame directive 1./2. param" msgstr "" -#: config/tc-alpha.c:4509 +#: config/tc-alpha.c:4738 msgid "Bad .frame directive 3./4. param" msgstr "" -#: config/tc-alpha.c:4534 +#: config/tc-alpha.c:4763 msgid ".pdesc directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4542 +#: config/tc-alpha.c:4771 msgid ".pdesc has no matching .ent" msgstr "" -#: config/tc-alpha.c:4553 +#: config/tc-alpha.c:4782 msgid ".pdesc directive has no entry symbol" msgstr "" -#: config/tc-alpha.c:4566 +#: config/tc-alpha.c:4795 msgid "No comma after .pdesc <entryname>" msgstr "" -#: config/tc-alpha.c:4589 +#: config/tc-alpha.c:4818 msgid "unknown procedure kind" msgstr "" -#: config/tc-alpha.c:4682 +#: config/tc-alpha.c:4911 msgid ".name directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4690 +#: config/tc-alpha.c:4919 msgid ".name directive has no symbol" msgstr "" -#: config/tc-alpha.c:4724 +#: config/tc-alpha.c:4953 msgid "No symbol after .linkage" msgstr "" -#: config/tc-alpha.c:4752 +#: config/tc-alpha.c:4981 msgid "No symbol after .code_address" msgstr "" -#: config/tc-alpha.c:4785 +#: config/tc-alpha.c:5014 msgid "Bad .mask directive" msgstr "" -#: config/tc-alpha.c:4806 +#: config/tc-alpha.c:5035 msgid "Bad .fmask directive" msgstr "" -#: config/tc-alpha.c:4976 +#: config/tc-alpha.c:5205 #, c-format msgid "Expected comma after name \"%s\"" msgstr "" #. *symbol_get_obj (symbolP) = (signed char) temp; -#: config/tc-alpha.c:4987 +#: config/tc-alpha.c:5216 #, c-format msgid "unhandled: .proc %s,%d" msgstr "" -#: config/tc-alpha.c:5022 +#: config/tc-alpha.c:5251 #, c-format msgid "Tried to .set unrecognized mode `%s'" msgstr "" #. not fatal, but it might not work in the end -#: config/tc-alpha.c:5039 +#: config/tc-alpha.c:5268 msgid "File overrides no-base-register option." msgstr "" -#: config/tc-alpha.c:5056 +#: config/tc-alpha.c:5285 #, c-format msgid "Bad base register, using $%d." msgstr "" -#: config/tc-alpha.c:5078 +#: config/tc-alpha.c:5307 #, c-format msgid "Alignment too large: %d. assumed" msgstr "" -#: config/tc-alpha.c:5082 config/tc-d30v.c:2214 +#: config/tc-alpha.c:5311 config/tc-d30v.c:2214 msgid "Alignment negative: 0 assumed" msgstr "" -#: config/tc-alpha.c:5394 +#: config/tc-alpha.c:5623 #, c-format msgid "Chose GP value of %lx\n" msgstr "" -#: config/tc-alpha.c:5410 config/tc-ia64.c:932 -msgid "Bad .section directive: want a,s,w,x,M,S in string" +#: config/tc-alpha.c:5639 config/tc-ia64.c:958 +msgid "Bad .section directive: want a,s,w,x,M,S,G,T in string" msgstr "" -#: config/tc-arc.c:1616 config/tc-arm.c:10344 +#: config/tc-arc.c:1616 config/tc-arm.c:10347 msgid "md_estimate_size_before_relax\n" msgstr "" @@ -1445,13 +1501,13 @@ msgstr "" msgid "ARM register expected" msgstr "" -#: config/tc-arm.c:682 config/tc-arm.c:2843 +#: config/tc-arm.c:682 config/tc-arm.c:2846 msgid "bad or missing co-processor number" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:683 config/tc-arm.c:2898 +#: config/tc-arm.c:683 config/tc-arm.c:2901 msgid "co-processor register expected" msgstr "" @@ -1530,971 +1586,971 @@ msgstr "" msgid "symbol `%s' already defined" msgstr "" -#: config/tc-arm.c:2609 +#: config/tc-arm.c:2612 msgid "selected processor does not support THUMB opcodes" msgstr "" -#: config/tc-arm.c:2622 +#: config/tc-arm.c:2625 msgid "selected processor does not support ARM opcodes" msgstr "" -#: config/tc-arm.c:2634 +#: config/tc-arm.c:2637 #, c-format msgid "invalid instruction size selected (%d)" msgstr "" -#: config/tc-arm.c:2669 +#: config/tc-arm.c:2672 #, c-format msgid "invalid operand to .code directive (%d) (expecting 16 or 32)" msgstr "" -#: config/tc-arm.c:2680 +#: config/tc-arm.c:2683 msgid "garbage following instruction" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:2730 +#: config/tc-arm.c:2733 #, c-format msgid "register expected, not '%.100s'" msgstr "" #. In the few cases where we might be able to accept #. something else this error can be overridden. -#: config/tc-arm.c:2802 +#: config/tc-arm.c:2805 msgid "flag for {c}psr instruction expected" msgstr "" -#: config/tc-arm.c:2836 +#: config/tc-arm.c:2839 msgid "illegal co-processor number" msgstr "" -#: config/tc-arm.c:2868 config/tc-arm.c:3928 config/tc-arm.c:4110 +#: config/tc-arm.c:2871 config/tc-arm.c:3931 config/tc-arm.c:4113 msgid "bad or missing expression" msgstr "" -#: config/tc-arm.c:2874 +#: config/tc-arm.c:2877 msgid "immediate co-processor expression too large" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:2921 +#: config/tc-arm.c:2924 msgid "floating point register expected" msgstr "" -#: config/tc-arm.c:2938 +#: config/tc-arm.c:2941 msgid "immediate expression expected" msgstr "" -#: config/tc-arm.c:2953 +#: config/tc-arm.c:2956 msgid "co-processor address must be word aligned" msgstr "" -#: config/tc-arm.c:2959 +#: config/tc-arm.c:2962 msgid "offset too large" msgstr "" -#: config/tc-arm.c:3008 +#: config/tc-arm.c:3011 msgid "pc may not be used in post-increment" msgstr "" -#: config/tc-arm.c:3024 config/tc-arm.c:3469 config/tc-arm.c:4279 -#: config/tc-arm.c:5146 config/tc-arm.c:5480 +#: config/tc-arm.c:3027 config/tc-arm.c:3472 config/tc-arm.c:4282 +#: config/tc-arm.c:5149 config/tc-arm.c:5483 msgid "pre-indexed expression expected" msgstr "" -#: config/tc-arm.c:3037 config/tc-arm.c:3482 config/tc-arm.c:4290 -#: config/tc-arm.c:5158 config/tc-arm.c:5492 config/tc-arm.c:5841 -#: config/tc-arm.c:8503 config/tc-arm.c:8518 +#: config/tc-arm.c:3040 config/tc-arm.c:3485 config/tc-arm.c:4293 +#: config/tc-arm.c:5161 config/tc-arm.c:5495 config/tc-arm.c:5844 +#: config/tc-arm.c:8508 config/tc-arm.c:8523 msgid "missing ]" msgstr "" -#: config/tc-arm.c:3047 +#: config/tc-arm.c:3050 msgid "pc may not be used with write-back" msgstr "" -#: config/tc-arm.c:3099 +#: config/tc-arm.c:3102 msgid "comma expected after register name" msgstr "" -#: config/tc-arm.c:3118 +#: config/tc-arm.c:3121 msgid "CPSR or SPSR expected" msgstr "" -#: config/tc-arm.c:3144 +#: config/tc-arm.c:3147 msgid "comma missing after psr flags" msgstr "" -#: config/tc-arm.c:3160 config/tc-arm.c:3170 +#: config/tc-arm.c:3163 config/tc-arm.c:3173 msgid "only a register or immediate value can follow a psr flag" msgstr "" -#: config/tc-arm.c:3181 +#: config/tc-arm.c:3184 msgid "immediate value cannot be used to set this field" msgstr "" -#: config/tc-arm.c:3199 config/tc-arm.c:4506 config/tc-arm.c:4786 -#: config/tc-arm.c:4806 config/tc-i960.c:1924 +#: config/tc-arm.c:3202 config/tc-arm.c:4509 config/tc-arm.c:4789 +#: config/tc-arm.c:4809 config/tc-i960.c:1925 msgid "invalid constant" msgstr "" -#: config/tc-arm.c:3247 +#: config/tc-arm.c:3250 msgid "rdhi, rdlo and rm must all be different" msgstr "" -#: config/tc-arm.c:3301 +#: config/tc-arm.c:3304 msgid "rd and rm should be different in mul" msgstr "" -#: config/tc-arm.c:3355 +#: config/tc-arm.c:3358 msgid "rd and rm should be different in mla" msgstr "" -#: config/tc-arm.c:3403 +#: config/tc-arm.c:3406 #, c-format msgid "acc0 expected, not '%.100s'" msgstr "" -#: config/tc-arm.c:3581 +#: config/tc-arm.c:3584 msgid "rdhi and rdlo must be different" msgstr "" -#: config/tc-arm.c:3689 +#: config/tc-arm.c:3692 msgid "Warning: instruction unpredictable when using r15" msgstr "" -#: config/tc-arm.c:3904 +#: config/tc-arm.c:3907 msgid "use of r15 in bxj is not really useful" msgstr "" -#: config/tc-arm.c:3937 config/tc-arm.c:4119 config/tc-arm.c:7446 -#: config/tc-arm.c:7479 config/tc-arm.c:7489 +#: config/tc-arm.c:3940 config/tc-arm.c:4122 config/tc-arm.c:7449 +#: config/tc-arm.c:7484 config/tc-arm.c:7494 msgid "immediate value out of range" msgstr "" -#: config/tc-arm.c:4242 +#: config/tc-arm.c:4245 msgid "'[' expected after PLD mnemonic" msgstr "" -#: config/tc-arm.c:4264 +#: config/tc-arm.c:4267 msgid "post-indexed expression used in preload instruction" msgstr "" -#: config/tc-arm.c:4269 config/tc-arm.c:4299 +#: config/tc-arm.c:4272 config/tc-arm.c:4302 msgid "writeback used in preload instruction" msgstr "" -#: config/tc-arm.c:4341 +#: config/tc-arm.c:4344 msgid "destination register must be even" msgstr "" -#: config/tc-arm.c:4347 +#: config/tc-arm.c:4350 msgid "r14 not allowed here" msgstr "" -#: config/tc-arm.c:4354 +#: config/tc-arm.c:4357 msgid "pre/post-indexing used when modified address register is destination" msgstr "" -#: config/tc-arm.c:4364 +#: config/tc-arm.c:4367 msgid "ldrd destination registers must not overlap index register" msgstr "" -#: config/tc-arm.c:4490 +#: config/tc-arm.c:4493 msgid "bad_segment" msgstr "" -#: config/tc-arm.c:4527 expr.c:1314 read.c:2198 +#: config/tc-arm.c:4530 expr.c:1314 read.c:2203 msgid "bad expression" msgstr "" -#: config/tc-arm.c:4550 config/tc-arm.c:4561 +#: config/tc-arm.c:4553 config/tc-arm.c:4564 msgid "shift expression expected" msgstr "" -#: config/tc-arm.c:4585 +#: config/tc-arm.c:4588 msgid "shift requires register or #expression" msgstr "" -#: config/tc-arm.c:4586 +#: config/tc-arm.c:4589 msgid "shift requires #expression" msgstr "" -#: config/tc-arm.c:4616 +#: config/tc-arm.c:4619 msgid "shift of 0 ignored." msgstr "" -#: config/tc-arm.c:4622 +#: config/tc-arm.c:4625 msgid "invalid immediate shift" msgstr "" -#: config/tc-arm.c:4777 config/tc-arm.c:5194 config/tc-arm.c:5529 -#: config/tc-arm.c:6138 config/tc-v850.c:1867 config/tc-v850.c:1888 +#: config/tc-arm.c:4780 config/tc-arm.c:5197 config/tc-arm.c:5532 +#: config/tc-arm.c:6141 config/tc-v850.c:1867 config/tc-v850.c:1888 msgid "constant expression expected" msgstr "" -#: config/tc-arm.c:4819 +#: config/tc-arm.c:4822 msgid "register or shift expression expected" msgstr "" -#: config/tc-arm.c:4872 +#: config/tc-arm.c:4875 msgid "invalid floating point immediate expression" msgstr "" -#: config/tc-arm.c:4876 +#: config/tc-arm.c:4879 msgid "floating point register or immediate expression expected" msgstr "" -#: config/tc-arm.c:5030 config/tc-arm.c:5360 +#: config/tc-arm.c:5033 config/tc-arm.c:5363 msgid "address offset too large" msgstr "" -#: config/tc-arm.c:5088 config/tc-arm.c:5278 config/tc-arm.c:5420 +#: config/tc-arm.c:5091 config/tc-arm.c:5281 config/tc-arm.c:5423 msgid "address expected" msgstr "" -#: config/tc-arm.c:5118 config/tc-arm.c:5130 config/tc-arm.c:5167 -#: config/tc-arm.c:5296 config/tc-arm.c:5450 config/tc-arm.c:5464 -#: config/tc-arm.c:5501 +#: config/tc-arm.c:5121 config/tc-arm.c:5133 config/tc-arm.c:5170 +#: config/tc-arm.c:5299 config/tc-arm.c:5453 config/tc-arm.c:5467 +#: config/tc-arm.c:5504 #, c-format msgid "%s register same as write-back base" msgstr "" -#: config/tc-arm.c:5120 config/tc-arm.c:5132 config/tc-arm.c:5169 -#: config/tc-arm.c:5298 config/tc-arm.c:5452 config/tc-arm.c:5466 -#: config/tc-arm.c:5503 +#: config/tc-arm.c:5123 config/tc-arm.c:5135 config/tc-arm.c:5172 +#: config/tc-arm.c:5301 config/tc-arm.c:5455 config/tc-arm.c:5469 +#: config/tc-arm.c:5506 msgid "destination" msgstr "" -#: config/tc-arm.c:5120 config/tc-arm.c:5132 config/tc-arm.c:5169 -#: config/tc-arm.c:5298 config/tc-arm.c:5452 config/tc-arm.c:5466 -#: config/tc-arm.c:5503 +#: config/tc-arm.c:5123 config/tc-arm.c:5135 config/tc-arm.c:5172 +#: config/tc-arm.c:5301 config/tc-arm.c:5455 config/tc-arm.c:5469 +#: config/tc-arm.c:5506 msgid "source" msgstr "" -#: config/tc-arm.c:5179 config/tc-arm.c:5513 config/tc-arm.c:7750 +#: config/tc-arm.c:5182 config/tc-arm.c:5516 config/tc-arm.c:7755 msgid "invalid pseudo operation" msgstr "" -#: config/tc-arm.c:5231 config/tc-arm.c:5564 +#: config/tc-arm.c:5234 config/tc-arm.c:5567 msgid "literal pool insertion failed" msgstr "" -#: config/tc-arm.c:5326 config/tc-arm.c:5332 +#: config/tc-arm.c:5329 config/tc-arm.c:5335 msgid "post-indexed expression expected" msgstr "" -#: config/tc-arm.c:5630 +#: config/tc-arm.c:5633 msgid "bad range in register list" msgstr "" -#: config/tc-arm.c:5638 config/tc-arm.c:5647 config/tc-arm.c:5689 +#: config/tc-arm.c:5641 config/tc-arm.c:5650 config/tc-arm.c:5692 #, c-format msgid "Warning: duplicated register (r%d) in register list" msgstr "" -#: config/tc-arm.c:5650 +#: config/tc-arm.c:5653 msgid "Warning: register range not in ascending order" msgstr "" -#: config/tc-arm.c:5662 +#: config/tc-arm.c:5665 msgid "missing `}'" msgstr "" -#: config/tc-arm.c:5678 +#: config/tc-arm.c:5681 msgid "invalid register mask" msgstr "" -#: config/tc-arm.c:5699 config/tc-arm.c:8760 config/tc-arm.c:8860 -#: config/tc-avr.c:860 config/tc-cris.c:3006 config/tc-d10v.c:1563 -#: config/tc-d30v.c:1863 config/tc-mips.c:3641 config/tc-mips.c:4630 -#: config/tc-mips.c:5486 config/tc-mips.c:6091 config/tc-ppc.c:5143 +#: config/tc-arm.c:5702 config/tc-arm.c:8765 config/tc-arm.c:8865 +#: config/tc-avr.c:866 config/tc-cris.c:3006 config/tc-d10v.c:1724 +#: config/tc-d30v.c:1863 config/tc-mips.c:3509 config/tc-mips.c:4523 +#: config/tc-mips.c:5436 config/tc-mips.c:6090 config/tc-ppc.c:5154 #: config/tc-v850.c:2287 config/tc-xstormy16.c:479 msgid "expression too complex" msgstr "" -#: config/tc-arm.c:5737 +#: config/tc-arm.c:5740 msgid "r15 not allowed as base register" msgstr "" -#: config/tc-arm.c:5801 config/tc-arm.c:5815 +#: config/tc-arm.c:5804 config/tc-arm.c:5818 msgid "r15 not allowed in swap" msgstr "" -#: config/tc-arm.c:5910 +#: config/tc-arm.c:5913 msgid "use of r15 in bx in ARM mode is not really useful" msgstr "" -#: config/tc-arm.c:6144 +#: config/tc-arm.c:6147 msgid "constant value required for number of registers" msgstr "" -#: config/tc-arm.c:6152 +#: config/tc-arm.c:6155 msgid "number of registers must be in the range [1:4]" msgstr "" -#: config/tc-arm.c:6213 +#: config/tc-arm.c:6216 msgid "r15 not allowed as base register with write-back" msgstr "" -#: config/tc-arm.c:6595 +#: config/tc-arm.c:6598 msgid "only two consecutive VFP SP registers allowed here" msgstr "" -#: config/tc-arm.c:6763 +#: config/tc-arm.c:6766 msgid "VFP system register expected" msgstr "" -#: config/tc-arm.c:6901 config/tc-arm.c:6940 config/tc-arm.c:6953 -#: config/tc-arm.c:7014 config/tc-arm.c:7053 config/tc-arm.c:7066 -#: config/tc-mips.c:9060 config/tc-mips.c:9090 +#: config/tc-arm.c:6904 config/tc-arm.c:6943 config/tc-arm.c:6956 +#: config/tc-arm.c:7017 config/tc-arm.c:7056 config/tc-arm.c:7069 +#: config/tc-mips.c:9255 config/tc-mips.c:9285 msgid "invalid register list" msgstr "" -#: config/tc-arm.c:6907 config/tc-arm.c:7020 +#: config/tc-arm.c:6910 config/tc-arm.c:7023 msgid "register list not in ascending order" msgstr "" -#: config/tc-arm.c:6932 config/tc-arm.c:7045 +#: config/tc-arm.c:6935 config/tc-arm.c:7048 msgid "register range not in ascending order" msgstr "" -#: config/tc-arm.c:6970 config/tc-arm.c:7083 +#: config/tc-arm.c:6973 config/tc-arm.c:7086 msgid "non-contiguous register range" msgstr "" -#: config/tc-arm.c:7113 config/tc-arm.c:7150 +#: config/tc-arm.c:7116 config/tc-arm.c:7153 msgid "this addressing mode requires base-register writeback" msgstr "" -#: config/tc-arm.c:7310 +#: config/tc-arm.c:7313 msgid "lo register required" msgstr "" -#: config/tc-arm.c:7318 +#: config/tc-arm.c:7321 msgid "hi register required" msgstr "" -#: config/tc-arm.c:7388 config/tc-arm.c:8592 +#: config/tc-arm.c:7391 config/tc-arm.c:8597 msgid "dest and source1 must be the same register" msgstr "" -#: config/tc-arm.c:7395 +#: config/tc-arm.c:7398 msgid "subtract valid only on lo regs" msgstr "" -#: config/tc-arm.c:7419 +#: config/tc-arm.c:7422 msgid "invalid Hi register with immediate" msgstr "" -#: config/tc-arm.c:7457 +#: config/tc-arm.c:7462 msgid "invalid immediate value for stack adjust" msgstr "" -#: config/tc-arm.c:7468 +#: config/tc-arm.c:7473 msgid "invalid immediate for address calculation" msgstr "" -#: config/tc-arm.c:7555 +#: config/tc-arm.c:7560 msgid "source1 and dest must be same register" msgstr "" -#: config/tc-arm.c:7589 +#: config/tc-arm.c:7594 msgid "invalid immediate for shift" msgstr "" -#: config/tc-arm.c:7668 +#: config/tc-arm.c:7673 msgid "only lo regs allowed with immediate" msgstr "" -#: config/tc-arm.c:7687 +#: config/tc-arm.c:7692 msgid "invalid immediate" msgstr "" -#: config/tc-arm.c:7741 +#: config/tc-arm.c:7746 msgid "expected ']'" msgstr "" -#: config/tc-arm.c:7814 +#: config/tc-arm.c:7819 msgid "byte or halfword not valid for base register" msgstr "" -#: config/tc-arm.c:7819 +#: config/tc-arm.c:7824 msgid "r15 based store not allowed" msgstr "" -#: config/tc-arm.c:7824 +#: config/tc-arm.c:7829 msgid "invalid base register for register offset" msgstr "" -#: config/tc-arm.c:7842 config/tc-arm.c:7877 +#: config/tc-arm.c:7847 config/tc-arm.c:7882 msgid "invalid offset" msgstr "" -#: config/tc-arm.c:7853 +#: config/tc-arm.c:7858 msgid "invalid base register in load/store" msgstr "" -#: config/tc-arm.c:8396 +#: config/tc-arm.c:8401 msgid "expecting immediate, 7bit operand" msgstr "" -#: config/tc-arm.c:8411 +#: config/tc-arm.c:8416 msgid "immediate out of range" msgstr "" -#: config/tc-arm.c:8454 +#: config/tc-arm.c:8459 msgid "offset expected" msgstr "" -#: config/tc-arm.c:8463 config/tc-pj.c:528 config/tc-sh.c:3573 +#: config/tc-arm.c:8468 config/tc-pj.c:528 config/tc-sh.c:3591 msgid "offset out of range" msgstr "" -#: config/tc-arm.c:8600 +#: config/tc-arm.c:8605 msgid "Rs and Rd must be different in MUL" msgstr "" -#: config/tc-arm.c:8744 +#: config/tc-arm.c:8749 msgid "" "inserted missing '!': load/store multiple always writes back base register" msgstr "" -#: config/tc-arm.c:8766 +#: config/tc-arm.c:8771 msgid "only lo-regs valid in load/store multiple" msgstr "" -#: config/tc-arm.c:8812 +#: config/tc-arm.c:8817 msgid "syntax: ldrs[b] Rd, [Rb, Ro]" msgstr "" -#: config/tc-arm.c:8876 +#: config/tc-arm.c:8881 msgid "invalid register list to push/pop instruction" msgstr "" -#: config/tc-arm.c:8988 config/tc-arm.c:9166 +#: config/tc-arm.c:8993 config/tc-arm.c:9171 msgid "virtual memory exhausted" msgstr "" -#: config/tc-arm.c:9069 +#: config/tc-arm.c:9074 #, c-format msgid "register '%s' does not exist\n" msgstr "" -#: config/tc-arm.c:9073 +#: config/tc-arm.c:9078 #, c-format msgid "" "ignoring redefinition of register alias '%s' to non-existant register '%s'" msgstr "" -#: config/tc-arm.c:9082 +#: config/tc-arm.c:9087 #, c-format msgid "ignoring redefinition of register alias '%s'" msgstr "" -#: config/tc-arm.c:9088 +#: config/tc-arm.c:9093 msgid "ignoring incomplete .req pseuso op" msgstr "" -#: config/tc-arm.c:9190 +#: config/tc-arm.c:9195 msgid "use of old and new-style options to set CPU type" msgstr "" -#: config/tc-arm.c:9200 +#: config/tc-arm.c:9205 msgid "use of old and new-style options to set FPU type" msgstr "" -#: config/tc-arm.c:9410 +#: config/tc-arm.c:9415 msgid "bad call to MD_ATOF()" msgstr "" -#: config/tc-arm.c:9640 +#: config/tc-arm.c:9645 #, c-format msgid "invalid constant (%lx) after fixup" msgstr "" -#: config/tc-arm.c:9676 +#: config/tc-arm.c:9681 #, c-format msgid "unable to compute ADRL instructions for PC offset of 0x%lx" msgstr "" -#: config/tc-arm.c:9706 +#: config/tc-arm.c:9711 #, c-format msgid "bad immediate value for offset (%ld)" msgstr "" -#: config/tc-arm.c:9728 config/tc-arm.c:9750 +#: config/tc-arm.c:9733 config/tc-arm.c:9755 msgid "invalid literal constant: pool needs to be closer" msgstr "" -#: config/tc-arm.c:9730 +#: config/tc-arm.c:9735 #, c-format msgid "bad immediate value for half-word offset (%ld)" msgstr "" -#: config/tc-arm.c:9767 +#: config/tc-arm.c:9772 msgid "shift expression is too large" msgstr "" -#: config/tc-arm.c:9786 config/tc-arm.c:9795 +#: config/tc-arm.c:9791 config/tc-arm.c:9800 msgid "invalid swi expression" msgstr "" -#: config/tc-arm.c:9805 +#: config/tc-arm.c:9810 msgid "invalid expression in load/store multiple" msgstr "" -#: config/tc-arm.c:9858 +#: config/tc-arm.c:9863 msgid "GAS can't handle same-section branch dest >= 0x04000000" msgstr "" -#: config/tc-arm.c:9867 +#: config/tc-arm.c:9872 msgid "out of range branch" msgstr "" -#: config/tc-arm.c:9900 config/tc-arm.c:9916 +#: config/tc-arm.c:9905 config/tc-arm.c:9921 msgid "branch out of range" msgstr "" -#: config/tc-arm.c:9939 +#: config/tc-arm.c:9945 msgid "branch with link out of range" msgstr "" -#: config/tc-arm.c:10015 +#: config/tc-arm.c:10018 msgid "illegal value for co-processor offset" msgstr "" -#: config/tc-arm.c:10039 +#: config/tc-arm.c:10042 #, c-format msgid "invalid offset, target not word aligned (0x%08X)" msgstr "" -#: config/tc-arm.c:10045 config/tc-arm.c:10054 config/tc-arm.c:10061 -#: config/tc-arm.c:10068 config/tc-arm.c:10075 +#: config/tc-arm.c:10048 config/tc-arm.c:10057 config/tc-arm.c:10064 +#: config/tc-arm.c:10071 config/tc-arm.c:10078 #, c-format msgid "invalid offset, value too big (0x%08lX)" msgstr "" -#: config/tc-arm.c:10114 +#: config/tc-arm.c:10117 msgid "invalid immediate for stack address calculation" msgstr "" -#: config/tc-arm.c:10123 +#: config/tc-arm.c:10126 #, c-format msgid "invalid immediate for address calculation (value = 0x%08lX)" msgstr "" -#: config/tc-arm.c:10133 +#: config/tc-arm.c:10136 msgid "invalid 8bit immediate" msgstr "" -#: config/tc-arm.c:10141 +#: config/tc-arm.c:10144 msgid "invalid 3bit immediate" msgstr "" -#: config/tc-arm.c:10157 +#: config/tc-arm.c:10160 #, c-format msgid "invalid immediate: %ld is too large" msgstr "" -#: config/tc-arm.c:10172 +#: config/tc-arm.c:10175 #, c-format msgid "illegal Thumb shift value: %ld" msgstr "" -#: config/tc-arm.c:10186 +#: config/tc-arm.c:10189 #, c-format msgid "bad relocation fixup type (%d)" msgstr "" -#: config/tc-arm.c:10257 +#: config/tc-arm.c:10260 msgid "literal referenced across section boundary (Implicit dump?)" msgstr "" -#: config/tc-arm.c:10270 +#: config/tc-arm.c:10273 #, c-format msgid "internal relocation (type %d) not fixed up (IMMEDIATE)" msgstr "" -#: config/tc-arm.c:10276 +#: config/tc-arm.c:10279 msgid "ADRL used for a symbol not defined in the same file" msgstr "" -#: config/tc-arm.c:10281 +#: config/tc-arm.c:10284 #, c-format msgid "internal_relocation (type %d) not fixed up (OFFSET_IMM)" msgstr "" -#: config/tc-arm.c:10302 config/tc-cris.c:2940 config/tc-mcore.c:2104 -#: config/tc-mmix.c:2868 config/tc-ns32k.c:2350 +#: config/tc-arm.c:10305 config/tc-cris.c:2940 config/tc-mcore.c:2104 +#: config/tc-mmix.c:2869 config/tc-ns32k.c:2350 msgid "<unknown>" msgstr "" -#: config/tc-arm.c:10305 config/tc-arm.c:10326 +#: config/tc-arm.c:10308 config/tc-arm.c:10329 #, c-format msgid "cannot represent %s relocation in this object file format" msgstr "" -#: config/tc-arm.c:10423 +#: config/tc-arm.c:10425 #, c-format msgid "no operator -- statement `%s'\n" msgstr "" -#: config/tc-arm.c:10441 config/tc-arm.c:10466 +#: config/tc-arm.c:10443 config/tc-arm.c:10468 #, c-format msgid "selected processor does not support `%s'" msgstr "" -#: config/tc-arm.c:10483 +#: config/tc-arm.c:10485 #, c-format msgid "bad instruction `%s'" msgstr "" -#: config/tc-arm.c:10584 +#: config/tc-arm.c:10586 msgid "generate PIC code" msgstr "" -#: config/tc-arm.c:10585 +#: config/tc-arm.c:10587 msgid "assemble Thumb code" msgstr "" -#: config/tc-arm.c:10586 +#: config/tc-arm.c:10588 msgid "support ARM/Thumb interworking" msgstr "" -#: config/tc-arm.c:10588 +#: config/tc-arm.c:10590 msgid "use old ABI (ELF only)" msgstr "" -#: config/tc-arm.c:10589 +#: config/tc-arm.c:10591 msgid "code uses 32-bit program counter" msgstr "" -#: config/tc-arm.c:10590 +#: config/tc-arm.c:10592 msgid "code uses 26-bit program counter" msgstr "" -#: config/tc-arm.c:10591 +#: config/tc-arm.c:10593 msgid "floating point args are in fp regs" msgstr "" -#: config/tc-arm.c:10593 +#: config/tc-arm.c:10595 msgid "re-entrant code" msgstr "" -#: config/tc-arm.c:10594 +#: config/tc-arm.c:10596 msgid "code is ATPCS conformant" msgstr "" -#: config/tc-arm.c:10595 +#: config/tc-arm.c:10597 msgid "assemble for big-endian" msgstr "" -#: config/tc-arm.c:10596 +#: config/tc-arm.c:10598 msgid "assemble for little-endian" msgstr "" #. These are recognized by the assembler, but have no affect on code. -#: config/tc-arm.c:10600 +#: config/tc-arm.c:10602 msgid "use frame pointer" msgstr "" -#: config/tc-arm.c:10601 +#: config/tc-arm.c:10603 msgid "use stack size checking" msgstr "" #. DON'T add any new processors to this list -- we want the whole list #. to go away... Add them to the processors table instead. -#: config/tc-arm.c:10605 config/tc-arm.c:10606 +#: config/tc-arm.c:10607 config/tc-arm.c:10608 msgid "use -mcpu=arm1" msgstr "" -#: config/tc-arm.c:10607 config/tc-arm.c:10608 +#: config/tc-arm.c:10609 config/tc-arm.c:10610 msgid "use -mcpu=arm2" msgstr "" -#: config/tc-arm.c:10609 config/tc-arm.c:10610 +#: config/tc-arm.c:10611 config/tc-arm.c:10612 msgid "use -mcpu=arm250" msgstr "" -#: config/tc-arm.c:10611 config/tc-arm.c:10612 +#: config/tc-arm.c:10613 config/tc-arm.c:10614 msgid "use -mcpu=arm3" msgstr "" -#: config/tc-arm.c:10613 config/tc-arm.c:10614 +#: config/tc-arm.c:10615 config/tc-arm.c:10616 msgid "use -mcpu=arm6" msgstr "" -#: config/tc-arm.c:10615 config/tc-arm.c:10616 +#: config/tc-arm.c:10617 config/tc-arm.c:10618 msgid "use -mcpu=arm600" msgstr "" -#: config/tc-arm.c:10617 config/tc-arm.c:10618 +#: config/tc-arm.c:10619 config/tc-arm.c:10620 msgid "use -mcpu=arm610" msgstr "" -#: config/tc-arm.c:10619 config/tc-arm.c:10620 +#: config/tc-arm.c:10621 config/tc-arm.c:10622 msgid "use -mcpu=arm620" msgstr "" -#: config/tc-arm.c:10621 config/tc-arm.c:10622 +#: config/tc-arm.c:10623 config/tc-arm.c:10624 msgid "use -mcpu=arm7" msgstr "" -#: config/tc-arm.c:10623 config/tc-arm.c:10624 +#: config/tc-arm.c:10625 config/tc-arm.c:10626 msgid "use -mcpu=arm70" msgstr "" -#: config/tc-arm.c:10625 config/tc-arm.c:10626 +#: config/tc-arm.c:10627 config/tc-arm.c:10628 msgid "use -mcpu=arm700" msgstr "" -#: config/tc-arm.c:10627 config/tc-arm.c:10628 +#: config/tc-arm.c:10629 config/tc-arm.c:10630 msgid "use -mcpu=arm700i" msgstr "" -#: config/tc-arm.c:10629 config/tc-arm.c:10630 +#: config/tc-arm.c:10631 config/tc-arm.c:10632 msgid "use -mcpu=arm710" msgstr "" -#: config/tc-arm.c:10631 config/tc-arm.c:10632 +#: config/tc-arm.c:10633 config/tc-arm.c:10634 msgid "use -mcpu=arm710c" msgstr "" -#: config/tc-arm.c:10633 config/tc-arm.c:10634 +#: config/tc-arm.c:10635 config/tc-arm.c:10636 msgid "use -mcpu=arm720" msgstr "" -#: config/tc-arm.c:10635 config/tc-arm.c:10636 +#: config/tc-arm.c:10637 config/tc-arm.c:10638 msgid "use -mcpu=arm7d" msgstr "" -#: config/tc-arm.c:10637 config/tc-arm.c:10638 +#: config/tc-arm.c:10639 config/tc-arm.c:10640 msgid "use -mcpu=arm7di" msgstr "" -#: config/tc-arm.c:10639 config/tc-arm.c:10640 +#: config/tc-arm.c:10641 config/tc-arm.c:10642 msgid "use -mcpu=arm7m" msgstr "" -#: config/tc-arm.c:10641 config/tc-arm.c:10642 +#: config/tc-arm.c:10643 config/tc-arm.c:10644 msgid "use -mcpu=arm7dm" msgstr "" -#: config/tc-arm.c:10643 config/tc-arm.c:10644 +#: config/tc-arm.c:10645 config/tc-arm.c:10646 msgid "use -mcpu=arm7dmi" msgstr "" -#: config/tc-arm.c:10645 config/tc-arm.c:10646 +#: config/tc-arm.c:10647 config/tc-arm.c:10648 msgid "use -mcpu=arm7100" msgstr "" -#: config/tc-arm.c:10647 config/tc-arm.c:10648 +#: config/tc-arm.c:10649 config/tc-arm.c:10650 msgid "use -mcpu=arm7500" msgstr "" -#: config/tc-arm.c:10649 config/tc-arm.c:10650 +#: config/tc-arm.c:10651 config/tc-arm.c:10652 msgid "use -mcpu=arm7500fe" msgstr "" -#: config/tc-arm.c:10651 config/tc-arm.c:10652 config/tc-arm.c:10653 -#: config/tc-arm.c:10654 +#: config/tc-arm.c:10653 config/tc-arm.c:10654 config/tc-arm.c:10655 +#: config/tc-arm.c:10656 msgid "use -mcpu=arm7tdmi" msgstr "" -#: config/tc-arm.c:10655 config/tc-arm.c:10656 +#: config/tc-arm.c:10657 config/tc-arm.c:10658 msgid "use -mcpu=arm710t" msgstr "" -#: config/tc-arm.c:10657 config/tc-arm.c:10658 +#: config/tc-arm.c:10659 config/tc-arm.c:10660 msgid "use -mcpu=arm720t" msgstr "" -#: config/tc-arm.c:10659 config/tc-arm.c:10660 +#: config/tc-arm.c:10661 config/tc-arm.c:10662 msgid "use -mcpu=arm740t" msgstr "" -#: config/tc-arm.c:10661 config/tc-arm.c:10662 +#: config/tc-arm.c:10663 config/tc-arm.c:10664 msgid "use -mcpu=arm8" msgstr "" -#: config/tc-arm.c:10663 config/tc-arm.c:10664 +#: config/tc-arm.c:10665 config/tc-arm.c:10666 msgid "use -mcpu=arm810" msgstr "" -#: config/tc-arm.c:10665 config/tc-arm.c:10666 +#: config/tc-arm.c:10667 config/tc-arm.c:10668 msgid "use -mcpu=arm9" msgstr "" -#: config/tc-arm.c:10667 config/tc-arm.c:10668 +#: config/tc-arm.c:10669 config/tc-arm.c:10670 msgid "use -mcpu=arm9tdmi" msgstr "" -#: config/tc-arm.c:10669 config/tc-arm.c:10670 +#: config/tc-arm.c:10671 config/tc-arm.c:10672 msgid "use -mcpu=arm920" msgstr "" -#: config/tc-arm.c:10671 config/tc-arm.c:10672 +#: config/tc-arm.c:10673 config/tc-arm.c:10674 msgid "use -mcpu=arm940" msgstr "" -#: config/tc-arm.c:10673 +#: config/tc-arm.c:10675 msgid "use -mcpu=strongarm" msgstr "" -#: config/tc-arm.c:10675 +#: config/tc-arm.c:10677 msgid "use -mcpu=strongarm110" msgstr "" -#: config/tc-arm.c:10677 +#: config/tc-arm.c:10679 msgid "use -mcpu=strongarm1100" msgstr "" -#: config/tc-arm.c:10679 +#: config/tc-arm.c:10681 msgid "use -mcpu=strongarm1110" msgstr "" -#: config/tc-arm.c:10680 +#: config/tc-arm.c:10682 msgid "use -mcpu=xscale" msgstr "" -#: config/tc-arm.c:10681 +#: config/tc-arm.c:10683 msgid "use -mcpu=all" msgstr "" #. Architecture variants -- don't add any more to this list either. -#: config/tc-arm.c:10684 config/tc-arm.c:10685 +#: config/tc-arm.c:10686 config/tc-arm.c:10687 msgid "use -march=armv2" msgstr "" -#: config/tc-arm.c:10686 config/tc-arm.c:10687 +#: config/tc-arm.c:10688 config/tc-arm.c:10689 msgid "use -march=armv2a" msgstr "" -#: config/tc-arm.c:10688 config/tc-arm.c:10689 +#: config/tc-arm.c:10690 config/tc-arm.c:10691 msgid "use -march=armv3" msgstr "" -#: config/tc-arm.c:10690 config/tc-arm.c:10691 +#: config/tc-arm.c:10692 config/tc-arm.c:10693 msgid "use -march=armv3m" msgstr "" -#: config/tc-arm.c:10692 config/tc-arm.c:10693 +#: config/tc-arm.c:10694 config/tc-arm.c:10695 msgid "use -march=armv4" msgstr "" -#: config/tc-arm.c:10694 config/tc-arm.c:10695 +#: config/tc-arm.c:10696 config/tc-arm.c:10697 msgid "use -march=armv4t" msgstr "" -#: config/tc-arm.c:10696 config/tc-arm.c:10697 +#: config/tc-arm.c:10698 config/tc-arm.c:10699 msgid "use -march=armv5" msgstr "" -#: config/tc-arm.c:10698 config/tc-arm.c:10699 +#: config/tc-arm.c:10700 config/tc-arm.c:10701 msgid "use -march=armv5t" msgstr "" -#: config/tc-arm.c:10700 config/tc-arm.c:10701 +#: config/tc-arm.c:10702 config/tc-arm.c:10703 msgid "use -march=armv5te" msgstr "" #. Floating point variants -- don't add any more to this list either. -#: config/tc-arm.c:10704 +#: config/tc-arm.c:10706 msgid "use -mfpu=fpe" msgstr "" -#: config/tc-arm.c:10705 +#: config/tc-arm.c:10707 msgid "use -mfpu=fpa10" msgstr "" -#: config/tc-arm.c:10706 +#: config/tc-arm.c:10708 msgid "use -mfpu=fpa11" msgstr "" -#: config/tc-arm.c:10708 +#: config/tc-arm.c:10710 msgid "use either -mfpu=softfpa or -mfpu=softvfp" msgstr "" -#: config/tc-arm.c:10888 +#: config/tc-arm.c:10890 msgid "invalid architectural extension" msgstr "" -#: config/tc-arm.c:10902 +#: config/tc-arm.c:10904 msgid "missing architectural extension" msgstr "" -#: config/tc-arm.c:10915 +#: config/tc-arm.c:10917 #, c-format msgid "unknown architectural extnsion `%s'" msgstr "" -#: config/tc-arm.c:10940 +#: config/tc-arm.c:10942 #, c-format msgid "missing cpu name `%s'" msgstr "" -#: config/tc-arm.c:10956 +#: config/tc-arm.c:10958 #, c-format msgid "unknown cpu `%s'" msgstr "" -#: config/tc-arm.c:10975 +#: config/tc-arm.c:10977 #, c-format msgid "missing architecture name `%s'" msgstr "" -#: config/tc-arm.c:10992 +#: config/tc-arm.c:10994 #, c-format msgid "unknown architecture `%s'\n" msgstr "" -#: config/tc-arm.c:11009 +#: config/tc-arm.c:11011 #, c-format msgid "unknown floating point format `%s'\n" msgstr "" -#: config/tc-arm.c:11015 +#: config/tc-arm.c:11017 msgid "<cpu name>\t assemble for CPU <cpu name>" msgstr "" -#: config/tc-arm.c:11017 +#: config/tc-arm.c:11019 msgid "<arch name>\t assemble for architecture <arch name>" msgstr "" -#: config/tc-arm.c:11019 +#: config/tc-arm.c:11021 msgid "<fpu name>\t assemble for FPU architecture <fpu name>" msgstr "" -#: config/tc-arm.c:11061 config/tc-arm.c:11083 +#: config/tc-arm.c:11063 config/tc-arm.c:11085 #, c-format msgid "option `-%c%s' is deprecated: %s" msgstr "" -#: config/tc-arm.c:11092 +#: config/tc-arm.c:11094 #, c-format msgid "unrecognized option `-%c%s'" msgstr "" -#: config/tc-arm.c:11106 +#: config/tc-arm.c:11108 msgid " ARM-specific assembler options:\n" msgstr "" -#: config/tc-arm.c:11117 +#: config/tc-arm.c:11119 msgid " -EB assemble code for a big-endian cpu\n" msgstr "" -#: config/tc-arm.c:11122 +#: config/tc-arm.c:11124 msgid " -EL assemble code for a little-endian cpu\n" msgstr "" -#: config/tc-arm.c:11305 +#: config/tc-arm.c:11306 #, c-format msgid "%s: unexpected function type: %d" msgstr "" -#: config/tc-arm.c:11671 +#: config/tc-arm.c:11672 msgid "alignments greater than 32 bytes not supported in .text sections." msgstr "" @@ -2502,11 +2558,11 @@ msgstr "" msgid "arm convert_frag\n" msgstr "" -#: config/tc-avr.c:197 +#: config/tc-avr.c:203 msgid "Known MCU names:" msgstr "" -#: config/tc-avr.c:266 +#: config/tc-avr.c:272 msgid "" "AVR options:\n" " -mmcu=[avr-name] select microcontroller variant\n" @@ -2519,7 +2575,7 @@ msgid "" " or immediate microcontroller name.\n" msgstr "" -#: config/tc-avr.c:276 +#: config/tc-avr.c:282 msgid "" " -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n" " -mno-skip-bug disable warnings for skipping two-word instructions\n" @@ -2528,152 +2584,152 @@ msgid "" " (default for avr3, avr5)\n" msgstr "" -#: config/tc-avr.c:324 +#: config/tc-avr.c:330 #, c-format msgid "unknown MCU: %s\n" msgstr "" -#: config/tc-avr.c:333 +#: config/tc-avr.c:339 #, c-format msgid "redefinition of mcu type `%s' to `%s'" msgstr "" -#: config/tc-avr.c:384 config/tc-d10v.c:314 config/tc-d30v.c:366 -#: config/tc-mips.c:9586 config/tc-mmix.c:2249 config/tc-mn10200.c:361 -#: config/tc-pj.c:357 config/tc-ppc.c:4803 config/tc-sh.c:2518 +#: config/tc-avr.c:390 config/tc-d10v.c:319 config/tc-d30v.c:366 +#: config/tc-mips.c:9781 config/tc-mmix.c:2250 config/tc-mn10200.c:361 +#: config/tc-pj.c:357 config/tc-ppc.c:4814 config/tc-sh.c:2536 #: config/tc-v850.c:1194 msgid "bad call to md_atof" msgstr "" -#: config/tc-avr.c:447 +#: config/tc-avr.c:453 msgid "constant value required" msgstr "" -#: config/tc-avr.c:450 +#: config/tc-avr.c:456 #, c-format msgid "number must be less than %d" msgstr "" -#: config/tc-avr.c:502 +#: config/tc-avr.c:508 msgid "`,' required" msgstr "" -#: config/tc-avr.c:521 +#: config/tc-avr.c:527 msgid "undefined combination of operands" msgstr "" -#: config/tc-avr.c:530 +#: config/tc-avr.c:536 msgid "skipping two-word instruction" msgstr "" -#: config/tc-avr.c:592 +#: config/tc-avr.c:598 msgid "register r16-r23 required" msgstr "" -#: config/tc-avr.c:598 +#: config/tc-avr.c:604 msgid "register number above 15 required" msgstr "" -#: config/tc-avr.c:604 +#: config/tc-avr.c:610 msgid "even register number required" msgstr "" -#: config/tc-avr.c:610 +#: config/tc-avr.c:616 msgid "register r24, r26, r28 or r30 required" msgstr "" -#: config/tc-avr.c:616 +#: config/tc-avr.c:622 msgid "register name or number from 0 to 31 required" msgstr "" -#: config/tc-avr.c:634 +#: config/tc-avr.c:640 msgid "pointer register (X, Y or Z) required" msgstr "" -#: config/tc-avr.c:641 +#: config/tc-avr.c:647 msgid "cannot both predecrement and postincrement" msgstr "" -#: config/tc-avr.c:649 +#: config/tc-avr.c:655 msgid "addressing mode not supported" msgstr "" -#: config/tc-avr.c:655 +#: config/tc-avr.c:661 msgid "can't predecrement" msgstr "" -#: config/tc-avr.c:658 +#: config/tc-avr.c:664 msgid "pointer register Z required" msgstr "" -#: config/tc-avr.c:676 +#: config/tc-avr.c:682 msgid "pointer register (Y or Z) required" msgstr "" -#: config/tc-avr.c:781 +#: config/tc-avr.c:787 #, c-format msgid "unknown constraint `%c'" msgstr "" -#: config/tc-avr.c:890 config/tc-avr.c:906 config/tc-avr.c:1007 +#: config/tc-avr.c:896 config/tc-avr.c:912 config/tc-avr.c:1013 #, c-format msgid "odd address operand: %ld" msgstr "" -#: config/tc-avr.c:898 config/tc-avr.c:917 +#: config/tc-avr.c:904 config/tc-avr.c:923 config/tc-d10v.c:586 #, c-format msgid "operand out of range: %ld" msgstr "" -#: config/tc-avr.c:1016 config/tc-d10v.c:1634 config/tc-d30v.c:1987 +#: config/tc-avr.c:1022 config/tc-d10v.c:1810 config/tc-d30v.c:1987 #, c-format msgid "line %d: unknown relocation type: 0x%x" msgstr "" -#: config/tc-avr.c:1030 +#: config/tc-avr.c:1036 msgid "only constant expression allowed" msgstr "" -#: config/tc-avr.c:1067 config/tc-d10v.c:1498 config/tc-d30v.c:1807 -#: config/tc-mn10200.c:1240 config/tc-mn10300.c:1774 config/tc-or32.c:1622 -#: config/tc-ppc.c:5534 config/tc-v850.c:2207 +#: config/tc-avr.c:1073 config/tc-d10v.c:1659 config/tc-d30v.c:1807 +#: config/tc-mn10200.c:1240 config/tc-mn10300.c:1781 config/tc-or32.c:1622 +#: config/tc-ppc.c:5538 config/tc-v850.c:2207 #, c-format msgid "reloc %d not supported by object file format" msgstr "" -#: config/tc-avr.c:1091 config/tc-d10v.c:1100 config/tc-d10v.c:1114 -#: config/tc-h8300.c:1283 config/tc-h8500.c:1088 config/tc-mcore.c:988 -#: config/tc-pj.c:266 config/tc-sh.c:2096 config/tc-z8k.c:1192 +#: config/tc-avr.c:1097 config/tc-d10v.c:1248 config/tc-d10v.c:1262 +#: config/tc-h8300.c:1289 config/tc-h8500.c:1088 config/tc-mcore.c:988 +#: config/tc-pj.c:266 config/tc-sh.c:2104 config/tc-z8k.c:1196 msgid "can't find opcode " msgstr "" -#: config/tc-avr.c:1108 +#: config/tc-avr.c:1114 #, c-format msgid "illegal opcode %s for mcu %s" msgstr "" -#: config/tc-avr.c:1116 +#: config/tc-avr.c:1122 msgid "garbage at end of line" msgstr "" -#: config/tc-avr.c:1180 read.c:3219 +#: config/tc-avr.c:1186 read.c:3224 msgid "illegal expression" msgstr "" -#: config/tc-avr.c:1206 config/tc-avr.c:1272 +#: config/tc-avr.c:1212 config/tc-avr.c:1278 msgid "`)' required" msgstr "" -#: config/tc-avr.c:1226 +#: config/tc-avr.c:1232 #, c-format msgid "constant out of 8-bit range: %d" msgstr "" -#: config/tc-avr.c:1229 +#: config/tc-avr.c:1235 msgid "expression possibly out of 8-bit range" msgstr "" -#: config/tc-avr.c:1300 config/tc-avr.c:1307 +#: config/tc-avr.c:1306 config/tc-avr.c:1313 #, c-format msgid "illegal %srelocation size: %d" msgstr "" @@ -2880,7 +2936,7 @@ msgstr "" msgid "Pseudodirective .loc is only valid when generating ELF" msgstr "" -#: config/tc-d10v.c:247 +#: config/tc-d10v.c:252 msgid "" "D10V options:\n" "-O Optimize. Will do some operations in parallel.\n" @@ -2890,94 +2946,130 @@ msgid "" " instructions together.\n" msgstr "" -#: config/tc-d10v.c:538 config/tc-d30v.c:550 config/tc-mn10200.c:937 -#: config/tc-mn10300.c:1308 config/tc-ppc.c:2104 config/tc-s390.c:1052 +#: config/tc-d10v.c:543 config/tc-d30v.c:550 config/tc-mn10200.c:937 +#: config/tc-mn10300.c:1315 config/tc-ppc.c:2120 config/tc-s390.c:1060 #: config/tc-tic80.c:279 config/tc-v850.c:1981 msgid "illegal operand" msgstr "" -#: config/tc-d10v.c:581 config/tc-d10v.c:663 config/tc-d30v.c:656 +#: config/tc-d10v.c:657 +msgid "operand is not an immediate" +msgstr "" + +#: config/tc-d10v.c:675 #, c-format -msgid "operand out of range: %d" +msgid "operand out of range: %lu" msgstr "" -#: config/tc-d10v.c:724 +#: config/tc-d10v.c:736 msgid "Instruction must be executed in parallel with another instruction." msgstr "" -#: config/tc-d10v.c:780 +#: config/tc-d10v.c:792 msgid "Instruction must be executed in parallel" msgstr "" -#: config/tc-d10v.c:783 +#: config/tc-d10v.c:795 msgid "Long instructions may not be combined." msgstr "" -#: config/tc-d10v.c:817 +#: config/tc-d10v.c:828 msgid "One of these instructions may not be executed in parallel." msgstr "" -#: config/tc-d10v.c:821 config/tc-d30v.c:877 +#: config/tc-d10v.c:832 config/tc-d30v.c:877 msgid "Two IU instructions may not be executed in parallel" msgstr "" -#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:844 -#: config/tc-d10v.c:859 config/tc-d30v.c:878 config/tc-d30v.c:887 +#: config/tc-d10v.c:834 config/tc-d10v.c:842 config/tc-d10v.c:856 +#: config/tc-d10v.c:871 config/tc-d30v.c:878 config/tc-d30v.c:887 msgid "Swapping instruction order" msgstr "" -#: config/tc-d10v.c:829 config/tc-d30v.c:884 +#: config/tc-d10v.c:840 config/tc-d30v.c:884 msgid "Two MU instructions may not be executed in parallel" msgstr "" -#: config/tc-d10v.c:848 config/tc-d30v.c:904 +#: config/tc-d10v.c:860 config/tc-d30v.c:904 msgid "IU instruction may not be in the left container" msgstr "" -#: config/tc-d10v.c:850 config/tc-d10v.c:865 +#: config/tc-d10v.c:862 config/tc-d10v.c:877 msgid "" "Instruction in R container is squashed by flow control instruction in L " "container." msgstr "" -#: config/tc-d10v.c:863 config/tc-d30v.c:915 +#: config/tc-d10v.c:875 config/tc-d30v.c:915 msgid "MU instruction may not be in the right container" msgstr "" -#: config/tc-d10v.c:869 config/tc-d30v.c:927 +#: config/tc-d10v.c:881 config/tc-d30v.c:927 msgid "unknown execution type passed to write_2_short()" msgstr "" -#: config/tc-d10v.c:1128 config/tc-d10v.c:1149 config/tc-d30v.c:1411 +#: config/tc-d10v.c:1072 config/tc-d10v.c:1080 +#, c-format +msgid "packing conflict: %s must dispatch sequentially" +msgstr "" + +#: config/tc-d10v.c:1179 +#, c-format +msgid "resource conflict (R%d)" +msgstr "" + +#: config/tc-d10v.c:1182 +#, c-format +msgid "resource conflict (A%d)" +msgstr "" + +#: config/tc-d10v.c:1184 +msgid "resource conflict (PSW)" +msgstr "" + +#: config/tc-d10v.c:1186 +msgid "resource conflict (C flag)" +msgstr "" + +#: config/tc-d10v.c:1188 +msgid "resource conflict (F flag)" +msgstr "" + +#: config/tc-d10v.c:1276 config/tc-d10v.c:1298 config/tc-d30v.c:1411 msgid "Unable to mix instructions as specified" msgstr "" -#: config/tc-d10v.c:1196 config/tc-d30v.c:1548 +#: config/tc-d10v.c:1345 config/tc-d30v.c:1548 #, c-format msgid "unknown opcode: %s" msgstr "" -#: config/tc-d10v.c:1279 config/tc-d10v.c:1451 config/tc-tic80.c:536 +#: config/tc-d10v.c:1428 config/tc-d10v.c:1603 config/tc-tic80.c:536 msgid "bad opcode or operands" msgstr "" -#: config/tc-d10v.c:1352 config/tc-m68k.c:4310 +#: config/tc-d10v.c:1503 config/tc-m68k.c:4310 msgid "value out of range" msgstr "" -#: config/tc-d10v.c:1426 +#: config/tc-d10v.c:1579 msgid "illegal operand - register name found where none expected" msgstr "" -#: config/tc-d10v.c:1462 config/tc-tic80.c:547 +#: config/tc-d10v.c:1614 config/tc-tic80.c:547 msgid "Register number must be EVEN" msgstr "" -#: config/tc-d10v.c:1465 +#: config/tc-d10v.c:1617 msgid "Unsupported use of sp" msgstr "" -#: config/tc-d10v.c:1614 +#: config/tc-d10v.c:1636 +#, c-format +msgid "cr%ld is a reserved control register" +msgstr "" + +#: config/tc-d10v.c:1790 #, c-format msgid "line %d: rep or repi must include at least 4 instructions" msgstr "" @@ -3008,6 +3100,11 @@ msgstr "" msgid "unexpected 18-bit reloc type" msgstr "" +#: config/tc-d30v.c:656 +#, c-format +msgid "operand out of range: %d" +msgstr "" + #: config/tc-d30v.c:720 #, c-format msgid "%s NOP inserted" @@ -3124,6 +3221,55 @@ msgstr "" msgid "Alignment too large: %d assumed" msgstr "" +#: config/tc-dlx.c:283 +msgid "missing .proc" +msgstr "" + +#: config/tc-dlx.c:300 +msgid ".endfunc missing for previous .proc" +msgstr "" + +#: config/tc-dlx.c:498 +#, c-format +msgid "Expression Error for operand modifier %%hi/%%lo\n" +msgstr "" + +#: config/tc-dlx.c:552 +#, c-format +msgid "Bad operand for a load instruction: <%s>" +msgstr "" + +#: config/tc-dlx.c:667 +#, c-format +msgid "Bad operand for a store instruction: <%s>" +msgstr "" + +#: config/tc-dlx.c:865 +msgid "Can not set dlx_skip_hi16_flag" +msgstr "" + +#: config/tc-dlx.c:879 +#, c-format +msgid "Missing arguments for opcode <%s>." +msgstr "" + +#: config/tc-dlx.c:950 +#, c-format +msgid "Both the_insn.HI and the_insn.LO are set : %s" +msgstr "" + +#: config/tc-dlx.c:1022 +msgid "failed regnum sanity check." +msgstr "" + +#: config/tc-dlx.c:1035 +msgid "failed general register sanity check." +msgstr "" + +#: config/tc-dlx.c:1336 +msgid "Invalid expression after # number\n" +msgstr "" + #: config/tc-fr30.c:84 msgid " FR30 specific command line options:\n" msgstr "" @@ -3137,128 +3283,225 @@ msgstr "" msgid "Addend to unresolved symbol not on word boundary." msgstr "" -#: config/tc-fr30.c:540 config/tc-i960.c:773 config/tc-m32r.c:1867 -#: config/tc-openrisc.c:468 config/tc-xstormy16.c:635 +#: config/tc-fr30.c:540 config/tc-frv.c:1283 config/tc-i960.c:773 +#: config/tc-m32r.c:1867 config/tc-openrisc.c:468 config/tc-xstormy16.c:635 msgid "Bad call to md_atof()" msgstr "" -#: config/tc-h8300.c:64 config/tc-h8300.c:75 config/tc-h8300.c:134 -#: config/tc-hppa.c:1422 config/tc-hppa.c:6915 config/tc-hppa.c:6921 -#: config/tc-hppa.c:6927 config/tc-hppa.c:6933 config/tc-mn10300.c:900 -#: config/tc-mn10300.c:2164 +#: config/tc-frv.c:416 +msgid "FRV specific command line options:\n" +msgstr "" + +#: config/tc-frv.c:417 +msgid "-G n Data >= n bytes is in small data area\n" +msgstr "" + +#: config/tc-frv.c:418 +msgid "-mgpr-32 Note 32 gprs are used\n" +msgstr "" + +#: config/tc-frv.c:419 +msgid "-mgpr-64 Note 64 gprs are used\n" +msgstr "" + +#: config/tc-frv.c:420 +msgid "-mfpr-32 Note 32 fprs are used\n" +msgstr "" + +#: config/tc-frv.c:421 +msgid "-mfpr-64 Note 64 fprs are used\n" +msgstr "" + +#: config/tc-frv.c:422 +msgid "-msoft-float Note software fp is used\n" +msgstr "" + +#: config/tc-frv.c:423 +msgid "-mdword Note stack is aligned to a 8 byte boundary\n" +msgstr "" + +#: config/tc-frv.c:424 +msgid "-mno-dword Note stack is aligned to a 4 byte boundary\n" +msgstr "" + +#: config/tc-frv.c:425 +msgid "-mdouble Note fp double insns are used\n" +msgstr "" + +#: config/tc-frv.c:426 +msgid "-mmedia Note media insns are used\n" +msgstr "" + +#: config/tc-frv.c:427 +msgid "-mmuladd Note multiply add/subtract insns are used\n" +msgstr "" + +#: config/tc-frv.c:428 +msgid "-mpack Note instructions are packed\n" +msgstr "" + +#: config/tc-frv.c:429 +msgid "-mno-pack Do not allow instructions to be packed\n" +msgstr "" + +#: config/tc-frv.c:430 +msgid "-mpic Note small position independent code\n" +msgstr "" + +#: config/tc-frv.c:431 +msgid "-mPIC Note large position independent code\n" +msgstr "" + +#: config/tc-frv.c:432 +msgid "-mlibrary-pic Compile library for large position indepedent code\n" +msgstr "" + +#: config/tc-frv.c:433 +msgid "-mcpu={fr500|fr400|fr300|frv|simple|tomcat}\n" +msgstr "" + +#: config/tc-frv.c:434 +msgid " Record the cpu type\n" +msgstr "" + +#: config/tc-frv.c:435 +msgid "-mtomcat-stats Print out stats for tomcat workarounds\n" +msgstr "" + +#: config/tc-frv.c:436 +msgid "-mtomcat-debug Debug tomcat workarounds\n" +msgstr "" + +#: config/tc-frv.c:1003 +msgid "VLIW packing used for -mno-pack" +msgstr "" + +#: config/tc-frv.c:1016 +msgid "VLIW packing constraint violation" +msgstr "" + +#: config/tc-frv.c:1544 +#, c-format +msgid "Relocation %s is not safe for %s" +msgstr "" + +#: config/tc-h8300.c:64 config/tc-h8300.c:76 config/tc-h8300.c:143 +#: config/tc-hppa.c:1424 config/tc-hppa.c:6917 config/tc-hppa.c:6923 +#: config/tc-hppa.c:6929 config/tc-hppa.c:6935 config/tc-mn10300.c:907 +#: config/tc-mn10300.c:2171 msgid "could not set architecture and machine" msgstr "" -#: config/tc-h8300.c:262 config/tc-h8300.c:270 +#: config/tc-h8300.c:282 config/tc-h8300.c:290 msgid "Reg not valid for H8/300" msgstr "" -#: config/tc-h8300.c:430 config/tc-h8300.c:433 config/tc-h8300.c:436 -#: config/tc-h8300.c:440 +#: config/tc-h8300.c:451 config/tc-h8300.c:454 config/tc-h8300.c:457 +#: config/tc-h8300.c:461 msgid "Invalid register list for ldm/stm\n" msgstr "" -#: config/tc-h8300.c:492 config/tc-h8300.c:554 config/tc-h8300.c:561 +#: config/tc-h8300.c:516 config/tc-h8300.c:578 config/tc-h8300.c:585 msgid "Wrong size pointer register for architecture." msgstr "" -#: config/tc-h8300.c:519 config/tc-h8300.c:528 config/tc-h8300.c:538 +#: config/tc-h8300.c:543 config/tc-h8300.c:552 config/tc-h8300.c:562 msgid "expected @(exp, reg16)" msgstr "" -#: config/tc-h8300.c:617 +#: config/tc-h8300.c:640 msgid "expect :8 or :16 here" msgstr "" -#: config/tc-h8300.c:826 +#: config/tc-h8300.c:847 #, c-format msgid "operand %s0x%lx out of range." msgstr "" -#: config/tc-h8300.c:914 +#: config/tc-h8300.c:935 msgid "Can't work out size of operand.\n" msgstr "" -#: config/tc-h8300.c:962 +#: config/tc-h8300.c:983 #, c-format msgid "Opcode `%s' with these operand types not available in H8/300 mode" msgstr "" -#: config/tc-h8300.c:1013 config/tc-h8300.c:1033 +#: config/tc-h8300.c:1029 config/tc-h8300.c:1049 msgid "Need #1 or #2 here" msgstr "" -#: config/tc-h8300.c:1028 +#: config/tc-h8300.c:1044 msgid "#4 not valid on H8/300." msgstr "" -#: config/tc-h8300.c:1115 config/tc-h8300.c:1165 +#: config/tc-h8300.c:1122 config/tc-h8300.c:1169 #, c-format msgid "branch operand has odd offset (%lx)\n" msgstr "" -#: config/tc-h8300.c:1203 +#: config/tc-h8300.c:1208 msgid "destination operand must be 16 bit register" msgstr "" -#: config/tc-h8300.c:1212 +#: config/tc-h8300.c:1217 msgid "source operand must be 8 bit register" msgstr "" -#: config/tc-h8300.c:1220 +#: config/tc-h8300.c:1225 msgid "destination operand must be 16bit absolute address" msgstr "" -#: config/tc-h8300.c:1227 +#: config/tc-h8300.c:1232 msgid "destination operand must be 8 bit register" msgstr "" -#: config/tc-h8300.c:1235 +#: config/tc-h8300.c:1240 msgid "source operand must be 16bit absolute address" msgstr "" #. This seems more sane than saying "too many operands". We'll #. get here only if the trailing trash starts with a comma. -#: config/tc-h8300.c:1243 config/tc-mmix.c:459 config/tc-mmix.c:471 -#: config/tc-mmix.c:2501 config/tc-mmix.c:2525 config/tc-mmix.c:2802 +#: config/tc-h8300.c:1248 config/tc-mmix.c:459 config/tc-mmix.c:471 +#: config/tc-mmix.c:2502 config/tc-mmix.c:2526 config/tc-mmix.c:2803 #: config/tc-or32.c:642 config/tc-or32.c:856 msgid "invalid operands" msgstr "" -#: config/tc-h8300.c:1294 config/tc-h8500.c:1094 config/tc-mips.c:8649 -#: config/tc-sh.c:2353 config/tc-sh64.c:2811 config/tc-w65.c:733 -#: config/tc-z8k.c:1202 +#: config/tc-h8300.c:1300 config/tc-h8500.c:1094 config/tc-mips.c:8834 +#: config/tc-sh.c:2371 config/tc-sh64.c:2811 config/tc-w65.c:733 +#: config/tc-z8k.c:1206 msgid "unknown opcode" msgstr "" -#: config/tc-h8300.c:1340 +#: config/tc-h8300.c:1346 msgid "mismatch between opcode size and operand size" msgstr "" -#: config/tc-h8300.c:1352 config/tc-h8500.c:1121 config/tc-sh.c:2473 -#: config/tc-w65.c:763 config/tc-z8k.c:1255 +#: config/tc-h8300.c:1358 config/tc-h8500.c:1121 config/tc-sh.c:2491 +#: config/tc-w65.c:763 config/tc-z8k.c:1262 msgid "call to tc_crawl_symbol_chain \n" msgstr "" -#: config/tc-h8300.c:1368 config/tc-h8500.c:1135 config/tc-sh.c:2480 -#: config/tc-w65.c:777 config/tc-z8k.c:1269 +#: config/tc-h8300.c:1374 config/tc-h8500.c:1135 config/tc-sh.c:2498 +#: config/tc-w65.c:777 config/tc-z8k.c:1276 msgid "call to tc_headers_hook \n" msgstr "" -#: config/tc-h8300.c:1460 config/tc-h8500.c:1225 config/tc-z8k.c:1383 +#: config/tc-h8300.c:1467 config/tc-h8500.c:1225 config/tc-z8k.c:1391 msgid "call to tc_aout_fix_to_chars \n" msgstr "" -#: config/tc-h8300.c:1474 config/tc-z8k.c:1393 +#: config/tc-h8300.c:1481 config/tc-z8k.c:1401 msgid "call to md_convert_frag \n" msgstr "" -#: config/tc-h8300.c:1536 config/tc-z8k.c:1479 +#: config/tc-h8300.c:1543 config/tc-z8k.c:1486 msgid "call tomd_estimate_size_before_relax \n" msgstr "" -#: config/tc-h8300.c:1657 config/tc-mcore.c:2413 config/tc-pj.c:572 -#: config/tc-sh.c:3931 +#: config/tc-h8300.c:1664 config/tc-mcore.c:2413 config/tc-pj.c:572 +#: config/tc-sh.c:3959 #, c-format msgid "Cannot represent relocation type %s" msgstr "" @@ -3291,7 +3534,7 @@ msgstr "" msgid "@Rn needs word register" msgstr "" -#: config/tc-h8500.c:828 config/tc-sh.c:1827 +#: config/tc-h8500.c:828 config/tc-sh.c:1835 #, c-format msgid "unhandled %d\n" msgstr "" @@ -3301,785 +3544,780 @@ msgstr "" msgid "operand must be absolute in range %d..%d" msgstr "" -#: config/tc-h8500.c:945 config/tc-sh.c:2036 +#: config/tc-h8500.c:945 config/tc-sh.c:2044 #, c-format msgid "failed for %d\n" msgstr "" -#: config/tc-h8500.c:1110 config/tc-sh.c:2137 config/tc-sh.c:2402 +#: config/tc-h8500.c:1110 config/tc-sh.c:2146 config/tc-sh.c:2420 #: config/tc-w65.c:752 msgid "invalid operands for opcode" msgstr "" #. Simple range checking for FIELD againt HIGH and LOW bounds. #. IGNORE is used to suppress the error message. -#: config/tc-hppa.c:1155 config/tc-hppa.c:1169 +#: config/tc-hppa.c:1157 config/tc-hppa.c:1171 #, c-format msgid "Field out of range [%d..%d] (%d)." msgstr "" #. Simple alignment checking for FIELD againt ALIGN (a power of two). #. IGNORE is used to suppress the error message. -#: config/tc-hppa.c:1183 +#: config/tc-hppa.c:1185 #, c-format msgid "Field not properly aligned [%d] (%d)." msgstr "" -#: config/tc-hppa.c:1212 +#: config/tc-hppa.c:1214 msgid "Missing .exit\n" msgstr "" -#: config/tc-hppa.c:1215 +#: config/tc-hppa.c:1217 msgid "Missing .procend\n" msgstr "" -#: config/tc-hppa.c:1395 +#: config/tc-hppa.c:1397 #, c-format msgid "Invalid field selector. Assuming F%%." msgstr "" -#: config/tc-hppa.c:1428 +#: config/tc-hppa.c:1430 msgid "-R option not supported on this target." msgstr "" -#: config/tc-hppa.c:1444 config/tc-sparc.c:803 config/tc-sparc.c:839 +#: config/tc-hppa.c:1446 config/tc-sparc.c:809 config/tc-sparc.c:845 #, c-format msgid "Internal error: can't hash `%s': %s\n" msgstr "" -#: config/tc-hppa.c:1452 config/tc-i860.c:190 +#: config/tc-hppa.c:1454 config/tc-i860.c:190 #, c-format msgid "internal error: losing opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-hppa.c:1523 config/tc-hppa.c:7054 config/tc-hppa.c:7111 +#: config/tc-hppa.c:1525 config/tc-hppa.c:7056 config/tc-hppa.c:7113 msgid "Missing function name for .PROC (corrupted label chain)" msgstr "" -#: config/tc-hppa.c:1526 config/tc-hppa.c:7114 +#: config/tc-hppa.c:1528 config/tc-hppa.c:7116 msgid "Missing function name for .PROC" msgstr "" -#: config/tc-hppa.c:1633 config/tc-hppa.c:4911 +#: config/tc-hppa.c:1635 config/tc-hppa.c:4913 msgid "could not update architecture and machine" msgstr "" -#: config/tc-hppa.c:1841 +#: config/tc-hppa.c:1843 msgid "Invalid Indexed Load Completer." msgstr "" -#: config/tc-hppa.c:1846 +#: config/tc-hppa.c:1848 msgid "Invalid Indexed Load Completer Syntax." msgstr "" -#: config/tc-hppa.c:1883 +#: config/tc-hppa.c:1885 msgid "Invalid Short Load/Store Completer." msgstr "" -#: config/tc-hppa.c:1943 config/tc-hppa.c:1948 +#: config/tc-hppa.c:1945 config/tc-hppa.c:1950 msgid "Invalid Store Bytes Short Completer" msgstr "" -#: config/tc-hppa.c:2259 config/tc-hppa.c:2265 +#: config/tc-hppa.c:2261 config/tc-hppa.c:2267 msgid "Invalid left/right combination completer" msgstr "" -#: config/tc-hppa.c:2314 config/tc-hppa.c:2321 +#: config/tc-hppa.c:2316 config/tc-hppa.c:2323 msgid "Invalid permutation completer" msgstr "" -#: config/tc-hppa.c:2422 +#: config/tc-hppa.c:2424 #, c-format msgid "Invalid Add Condition: %s" msgstr "" -#: config/tc-hppa.c:2433 config/tc-hppa.c:2443 +#: config/tc-hppa.c:2435 config/tc-hppa.c:2445 msgid "Invalid Add and Branch Condition" msgstr "" -#: config/tc-hppa.c:2464 config/tc-hppa.c:2602 +#: config/tc-hppa.c:2466 config/tc-hppa.c:2604 msgid "Invalid Compare/Subtract Condition" msgstr "" -#: config/tc-hppa.c:2504 +#: config/tc-hppa.c:2506 #, c-format msgid "Invalid Bit Branch Condition: %c" msgstr "" -#: config/tc-hppa.c:2590 +#: config/tc-hppa.c:2592 #, c-format msgid "Invalid Compare/Subtract Condition: %s" msgstr "" -#: config/tc-hppa.c:2617 +#: config/tc-hppa.c:2619 msgid "Invalid Compare and Branch Condition" msgstr "" -#: config/tc-hppa.c:2713 +#: config/tc-hppa.c:2715 msgid "Invalid Logical Instruction Condition." msgstr "" -#: config/tc-hppa.c:2768 +#: config/tc-hppa.c:2770 msgid "Invalid Shift/Extract/Deposit Condition." msgstr "" -#: config/tc-hppa.c:2880 +#: config/tc-hppa.c:2882 msgid "Invalid Unit Instruction Condition." msgstr "" -#: config/tc-hppa.c:3257 config/tc-hppa.c:3289 config/tc-hppa.c:3320 -#: config/tc-hppa.c:3350 +#: config/tc-hppa.c:3259 config/tc-hppa.c:3291 config/tc-hppa.c:3322 +#: config/tc-hppa.c:3352 msgid "Branch to unaligned address" msgstr "" -#: config/tc-hppa.c:3528 +#: config/tc-hppa.c:3530 msgid "Invalid SFU identifier" msgstr "" -#: config/tc-hppa.c:3578 +#: config/tc-hppa.c:3580 msgid "Invalid COPR identifier" msgstr "" -#: config/tc-hppa.c:3707 +#: config/tc-hppa.c:3709 msgid "Invalid Floating Point Operand Format." msgstr "" -#: config/tc-hppa.c:3824 config/tc-hppa.c:3844 config/tc-hppa.c:3864 -#: config/tc-hppa.c:3884 config/tc-hppa.c:3904 +#: config/tc-hppa.c:3826 config/tc-hppa.c:3846 config/tc-hppa.c:3866 +#: config/tc-hppa.c:3886 config/tc-hppa.c:3906 msgid "Invalid register for single precision fmpyadd or fmpysub" msgstr "" -#: config/tc-hppa.c:3961 +#: config/tc-hppa.c:3963 #, c-format msgid "Invalid operands %s" msgstr "" -#: config/tc-hppa.c:4079 +#: config/tc-hppa.c:4081 msgid "Cannot handle fixup" msgstr "" -#: config/tc-hppa.c:4380 +#: config/tc-hppa.c:4382 msgid " -Q ignored\n" msgstr "" -#: config/tc-hppa.c:4384 +#: config/tc-hppa.c:4386 msgid " -c print a warning if a comment is found\n" msgstr "" -#: config/tc-hppa.c:4455 +#: config/tc-hppa.c:4457 #, c-format msgid "no hppa_fixup entry for fixup type 0x%x" msgstr "" -#: config/tc-hppa.c:4633 +#: config/tc-hppa.c:4635 msgid "Unknown relocation encountered in md_apply_fix." msgstr "" -#: config/tc-hppa.c:4775 config/tc-hppa.c:4800 +#: config/tc-hppa.c:4777 config/tc-hppa.c:4802 #, c-format msgid "Undefined register: '%s'." msgstr "" -#: config/tc-hppa.c:4834 +#: config/tc-hppa.c:4836 #, c-format msgid "Non-absolute symbol: '%s'." msgstr "" -#: config/tc-hppa.c:4849 +#: config/tc-hppa.c:4851 #, c-format msgid "Undefined absolute constant: '%s'." msgstr "" -#: config/tc-hppa.c:4950 +#: config/tc-hppa.c:4952 #, c-format msgid "Invalid FP Compare Condition: %s" msgstr "" -#: config/tc-hppa.c:5006 +#: config/tc-hppa.c:5008 #, c-format msgid "Invalid FTEST completer: %s" msgstr "" -#: config/tc-hppa.c:5073 config/tc-hppa.c:5111 +#: config/tc-hppa.c:5075 config/tc-hppa.c:5113 #, c-format msgid "Invalid FP Operand Format: %3s" msgstr "" -#: config/tc-hppa.c:5190 +#: config/tc-hppa.c:5192 msgid "Bad segment in expression." msgstr "" -#: config/tc-hppa.c:5249 +#: config/tc-hppa.c:5251 msgid "Bad segment (should be absolute)." msgstr "" -#: config/tc-hppa.c:5292 +#: config/tc-hppa.c:5294 #, c-format msgid "Invalid argument location: %s\n" msgstr "" -#: config/tc-hppa.c:5323 +#: config/tc-hppa.c:5325 #, c-format msgid "Invalid argument description: %d" msgstr "" -#: config/tc-hppa.c:5346 +#: config/tc-hppa.c:5348 #, c-format msgid "Invalid Nullification: (%c)" msgstr "" -#: config/tc-hppa.c:6066 +#: config/tc-hppa.c:6068 #, c-format msgid "Invalid .CALL argument: %s" msgstr "" -#: config/tc-hppa.c:6188 +#: config/tc-hppa.c:6190 msgid ".callinfo is not within a procedure definition" msgstr "" -#: config/tc-hppa.c:6208 +#: config/tc-hppa.c:6210 #, c-format msgid "FRAME parameter must be a multiple of 8: %d\n" msgstr "" -#: config/tc-hppa.c:6227 +#: config/tc-hppa.c:6229 msgid "Value for ENTRY_GR must be in the range 3..18\n" msgstr "" -#: config/tc-hppa.c:6239 +#: config/tc-hppa.c:6241 msgid "Value for ENTRY_FR must be in the range 12..21\n" msgstr "" -#: config/tc-hppa.c:6249 +#: config/tc-hppa.c:6251 msgid "Value for ENTRY_SR must be 3\n" msgstr "" -#: config/tc-hppa.c:6305 +#: config/tc-hppa.c:6307 #, c-format msgid "Invalid .CALLINFO argument: %s" msgstr "" -#: config/tc-hppa.c:6416 +#: config/tc-hppa.c:6418 msgid "The .ENTER pseudo-op is not supported" msgstr "" -#: config/tc-hppa.c:6432 +#: config/tc-hppa.c:6434 msgid "Misplaced .entry. Ignored." msgstr "" -#: config/tc-hppa.c:6436 +#: config/tc-hppa.c:6438 msgid "Missing .callinfo." msgstr "" -#: config/tc-hppa.c:6502 +#: config/tc-hppa.c:6504 msgid ".REG expression must be a register" msgstr "" -#: config/tc-hppa.c:6518 +#: config/tc-hppa.c:6520 msgid "bad or irreducible absolute expression; zero assumed" msgstr "" -#: config/tc-hppa.c:6529 +#: config/tc-hppa.c:6531 msgid ".REG must use a label" msgstr "" -#: config/tc-hppa.c:6531 +#: config/tc-hppa.c:6533 msgid ".EQU must use a label" msgstr "" -#: config/tc-hppa.c:6584 +#: config/tc-hppa.c:6586 msgid ".EXIT must appear within a procedure" msgstr "" -#: config/tc-hppa.c:6588 +#: config/tc-hppa.c:6590 msgid "Missing .callinfo" msgstr "" -#: config/tc-hppa.c:6592 +#: config/tc-hppa.c:6594 msgid "No .ENTRY for this .EXIT" msgstr "" -#: config/tc-hppa.c:6619 +#: config/tc-hppa.c:6621 #, c-format msgid "Cannot define export symbol: %s\n" msgstr "" -#: config/tc-hppa.c:6677 +#: config/tc-hppa.c:6679 #, c-format msgid "Using ENTRY rather than CODE in export directive for %s" msgstr "" -#: config/tc-hppa.c:6794 +#: config/tc-hppa.c:6796 #, c-format msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s" msgstr "" -#: config/tc-hppa.c:6876 +#: config/tc-hppa.c:6878 msgid "Missing label name on .LABEL" msgstr "" -#: config/tc-hppa.c:6881 +#: config/tc-hppa.c:6883 msgid "extra .LABEL arguments ignored." msgstr "" -#: config/tc-hppa.c:6898 +#: config/tc-hppa.c:6900 msgid "The .LEAVE pseudo-op is not supported" msgstr "" -#: config/tc-hppa.c:6937 +#: config/tc-hppa.c:6939 msgid "Unrecognized .LEVEL argument\n" msgstr "" -#: config/tc-hppa.c:6973 +#: config/tc-hppa.c:6975 #, c-format msgid "Cannot define static symbol: %s\n" msgstr "" -#: config/tc-hppa.c:7008 +#: config/tc-hppa.c:7010 msgid "Nested procedures" msgstr "" -#: config/tc-hppa.c:7018 +#: config/tc-hppa.c:7020 msgid "Cannot allocate unwind descriptor\n" msgstr "" -#: config/tc-hppa.c:7118 +#: config/tc-hppa.c:7120 msgid "misplaced .procend" msgstr "" -#: config/tc-hppa.c:7121 +#: config/tc-hppa.c:7123 msgid "Missing .callinfo for this procedure" msgstr "" -#: config/tc-hppa.c:7124 +#: config/tc-hppa.c:7126 msgid "Missing .EXIT for a .ENTRY" msgstr "" -#: config/tc-hppa.c:7162 +#: config/tc-hppa.c:7164 msgid "Not in a space.\n" msgstr "" -#: config/tc-hppa.c:7165 +#: config/tc-hppa.c:7167 msgid "Not in a subspace.\n" msgstr "" -#: config/tc-hppa.c:7256 +#: config/tc-hppa.c:7258 msgid "Invalid .SPACE argument" msgstr "" -#: config/tc-hppa.c:7303 +#: config/tc-hppa.c:7305 msgid "Can't change spaces within a procedure definition. Ignored" msgstr "" -#: config/tc-hppa.c:7432 +#: config/tc-hppa.c:7434 #, c-format msgid "Undefined space: '%s' Assuming space number = 0." msgstr "" -#: config/tc-hppa.c:7456 +#: config/tc-hppa.c:7458 msgid "Must be in a space before changing or declaring subspaces.\n" msgstr "" -#: config/tc-hppa.c:7460 +#: config/tc-hppa.c:7462 msgid "Can't change subspaces within a procedure definition. Ignored" msgstr "" -#: config/tc-hppa.c:7495 +#: config/tc-hppa.c:7497 msgid "Parameters of an existing subspace can't be modified" msgstr "" -#: config/tc-hppa.c:7546 +#: config/tc-hppa.c:7548 msgid "Alignment must be a power of 2" msgstr "" -#: config/tc-hppa.c:7588 +#: config/tc-hppa.c:7590 msgid "FIRST not supported as a .SUBSPACE argument" msgstr "" -#: config/tc-hppa.c:7590 +#: config/tc-hppa.c:7592 msgid "Invalid .SUBSPACE argument" msgstr "" -#: config/tc-hppa.c:7770 +#: config/tc-hppa.c:7772 #, c-format msgid "Internal error: Unable to find containing space for %s." msgstr "" -#: config/tc-hppa.c:7809 +#: config/tc-hppa.c:7811 #, c-format msgid "Out of memory: could not allocate new space chain entry: %s\n" msgstr "" -#: config/tc-hppa.c:7895 +#: config/tc-hppa.c:7897 #, c-format msgid "Out of memory: could not allocate new subspace chain entry: %s\n" msgstr "" -#: config/tc-hppa.c:8589 +#: config/tc-hppa.c:8638 #, c-format msgid "Symbol '%s' could not be created." msgstr "" -#: config/tc-hppa.c:8593 +#: config/tc-hppa.c:8642 msgid "No memory for symbol name." msgstr "" -#: config/tc-i386.c:598 +#: config/tc-i386.c:658 #, c-format msgid "%s shortened to %s" msgstr "" -#: config/tc-i386.c:653 +#: config/tc-i386.c:714 msgid "same type of prefix used twice" msgstr "" -#: config/tc-i386.c:671 +#: config/tc-i386.c:732 msgid "64bit mode not supported on this CPU." msgstr "" -#: config/tc-i386.c:675 +#: config/tc-i386.c:736 msgid "32bit mode not supported on this CPU." msgstr "" -#: config/tc-i386.c:708 +#: config/tc-i386.c:769 msgid "bad argument to syntax directive." msgstr "" -#: config/tc-i386.c:752 +#: config/tc-i386.c:813 #, c-format msgid "no such architecture: `%s'" msgstr "" -#: config/tc-i386.c:757 +#: config/tc-i386.c:818 msgid "missing cpu architecture" msgstr "" -#: config/tc-i386.c:771 +#: config/tc-i386.c:832 #, c-format msgid "no such architecture modifier: `%s'" msgstr "" -#: config/tc-i386.c:825 config/tc-i386.c:4632 +#: config/tc-i386.c:849 config/tc-i386.c:4857 msgid "Unknown architecture" msgstr "" -#: config/tc-i386.c:860 config/tc-i386.c:883 config/tc-m68k.c:3826 +#: config/tc-i386.c:884 config/tc-i386.c:907 config/tc-m68k.c:3826 #, c-format msgid "Internal Error: Can't hash %s: %s" msgstr "" -#: config/tc-i386.c:1136 +#: config/tc-i386.c:1150 msgid "There are no unsigned pc-relative relocations" msgstr "" -#: config/tc-i386.c:1143 config/tc-i386.c:4831 +#: config/tc-i386.c:1157 config/tc-i386.c:5062 #, c-format msgid "can not do %d byte pc-relative relocation" msgstr "" -#: config/tc-i386.c:1160 +#: config/tc-i386.c:1174 #, c-format msgid "can not do %s %d byte relocation" msgstr "" -#: config/tc-i386.c:1267 config/tc-i386.c:1361 +#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. +#: config/tc-i386.c:1386 +#, c-format +msgid "translating to `%sp'" +msgstr "" + +#: config/tc-i386.c:1431 +#, c-format +msgid "can't encode register '%%%s' in an instruction requiring REX prefix.\n" +msgstr "" + +#: config/tc-i386.c:1470 config/tc-i386.c:1565 #, c-format msgid "no such instruction: `%s'" msgstr "" -#: config/tc-i386.c:1277 config/tc-i386.c:1393 +#: config/tc-i386.c:1480 config/tc-i386.c:1597 #, c-format msgid "invalid character %s in mnemonic" msgstr "" -#: config/tc-i386.c:1284 +#: config/tc-i386.c:1487 msgid "expecting prefix; got nothing" msgstr "" -#: config/tc-i386.c:1286 +#: config/tc-i386.c:1489 msgid "expecting mnemonic; got nothing" msgstr "" -#: config/tc-i386.c:1304 +#: config/tc-i386.c:1508 #, c-format msgid "redundant %s prefix" msgstr "" -#: config/tc-i386.c:1402 +#: config/tc-i386.c:1606 #, c-format msgid "`%s' is not supported on `%s'" msgstr "" -#: config/tc-i386.c:1407 +#: config/tc-i386.c:1611 msgid "use .code16 to ensure correct addressing mode" msgstr "" -#: config/tc-i386.c:1414 +#: config/tc-i386.c:1618 #, c-format msgid "expecting string instruction after `%s'" msgstr "" -#: config/tc-i386.c:1435 +#: config/tc-i386.c:1646 #, c-format msgid "invalid character %s before operand %d" msgstr "" -#: config/tc-i386.c:1449 +#: config/tc-i386.c:1660 #, c-format msgid "unbalanced parenthesis in operand %d." msgstr "" -#: config/tc-i386.c:1452 +#: config/tc-i386.c:1663 #, c-format msgid "unbalanced brackets in operand %d." msgstr "" -#: config/tc-i386.c:1461 +#: config/tc-i386.c:1672 #, c-format msgid "invalid character %s in operand %d" msgstr "" -#: config/tc-i386.c:1488 +#: config/tc-i386.c:1699 #, c-format msgid "spurious operands; (%d operands/instruction max)" msgstr "" -#: config/tc-i386.c:1511 +#: config/tc-i386.c:1722 msgid "expecting operand after ','; got nothing" msgstr "" -#: config/tc-i386.c:1516 +#: config/tc-i386.c:1727 msgid "expecting operand before ','; got nothing" msgstr "" #. We found no match. -#: config/tc-i386.c:1860 +#: config/tc-i386.c:2069 #, c-format msgid "suffix or operands invalid for `%s'" msgstr "" -#: config/tc-i386.c:1871 +#: config/tc-i386.c:2080 #, c-format msgid "indirect %s without `*'" msgstr "" #. Warn them that a data or address size prefix doesn't #. affect assembly of the next line of code. -#: config/tc-i386.c:1879 +#: config/tc-i386.c:2088 #, c-format msgid "stand-alone `%s' prefix" msgstr "" -#: config/tc-i386.c:1915 config/tc-i386.c:1930 +#: config/tc-i386.c:2117 config/tc-i386.c:2132 #, c-format msgid "`%s' operand %d must use `%%es' segment" msgstr "" -#. Prohibit these changes in the 64bit mode, since -#. the lowering is more complicated. -#: config/tc-i386.c:2003 config/tc-i386.c:2057 config/tc-i386.c:2072 -#: config/tc-i386.c:2100 config/tc-i386.c:2128 +#: config/tc-i386.c:2212 +msgid "" +"no instruction mnemonic suffix given and no register operands; can't size " +"instruction" +msgstr "" + +#. Prohibit these changes in the 64bit mode, since the +#. lowering is more complicated. +#: config/tc-i386.c:2296 config/tc-i386.c:2355 config/tc-i386.c:2372 +#: config/tc-i386.c:2404 config/tc-i386.c:2437 #, c-format -msgid "Incorrect register `%%%s' used with`%c' suffix" +msgid "Incorrect register `%%%s' used with `%c' suffix" msgstr "" -#: config/tc-i386.c:2009 config/tc-i386.c:2062 config/tc-i386.c:2133 +#: config/tc-i386.c:2304 config/tc-i386.c:2362 config/tc-i386.c:2444 #, c-format msgid "using `%%%s' instead of `%%%s' due to `%c' suffix" msgstr "" -#: config/tc-i386.c:2025 config/tc-i386.c:2043 config/tc-i386.c:2087 -#: config/tc-i386.c:2114 +#: config/tc-i386.c:2319 config/tc-i386.c:2340 config/tc-i386.c:2391 +#: config/tc-i386.c:2422 #, c-format msgid "`%%%s' not allowed with `%s%c'" msgstr "" -#: config/tc-i386.c:2174 +#: config/tc-i386.c:2485 msgid "no instruction mnemonic suffix given; can't determine immediate size" msgstr "" -#: config/tc-i386.c:2200 +#: config/tc-i386.c:2518 #, c-format msgid "" "no instruction mnemonic suffix given; can't determine immediate size %x %c" msgstr "" -#: config/tc-i386.c:2225 -msgid "" -"no instruction mnemonic suffix given and no register operands; can't size " -"instruction" -msgstr "" - -#: config/tc-i386.c:2273 -msgid "64bit operations available only in 64bit modes." -msgstr "" - #. Reversed arguments on faddp, fsubp, etc. -#: config/tc-i386.c:2341 +#: config/tc-i386.c:2567 #, c-format msgid "translating to `%s %%%s,%%%s'" msgstr "" #. Extraneous `l' suffix on fp insn. -#: config/tc-i386.c:2348 +#: config/tc-i386.c:2574 #, c-format msgid "translating to `%s %%%s'" msgstr "" -#: config/tc-i386.c:2621 +#: config/tc-i386.c:2593 #, c-format msgid "you can't `pop %%cs'" msgstr "" -#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. -#: config/tc-i386.c:2654 -#, c-format -msgid "translating to `%sp'" -msgstr "" - -#: config/tc-i386.c:2697 -#, c-format -msgid "" -"Can't encode registers '%%%s' in the instruction requiring REX prefix.\n" -msgstr "" - -#: config/tc-i386.c:2759 config/tc-i386.c:2849 config/tc-i386.c:2885 +#: config/tc-i386.c:2919 config/tc-i386.c:3012 config/tc-i386.c:3051 msgid "skipping prefixes on this instruction" msgstr "" -#: config/tc-i386.c:2905 +#: config/tc-i386.c:3071 msgid "16-bit jump out of range" msgstr "" -#: config/tc-i386.c:2914 +#: config/tc-i386.c:3080 #, c-format msgid "can't handle non absolute segment in `%s'" msgstr "" -#: config/tc-i386.c:3221 +#: config/tc-i386.c:3418 #, c-format msgid "@%s reloc is not supported in %s bit mode" msgstr "" -#: config/tc-i386.c:3297 +#: config/tc-i386.c:3494 msgid "only 1 or 2 immediate operands are allowed" msgstr "" -#: config/tc-i386.c:3320 config/tc-i386.c:3508 +#: config/tc-i386.c:3517 config/tc-i386.c:3708 #, c-format msgid "junk `%s' after expression" msgstr "" #. Missing or bad expr becomes absolute 0. -#: config/tc-i386.c:3331 +#: config/tc-i386.c:3528 #, c-format msgid "missing or invalid immediate expression `%s' taken as 0" msgstr "" -#: config/tc-i386.c:3362 config/tc-i386.c:3569 +#: config/tc-i386.c:3559 config/tc-i386.c:3769 #, c-format msgid "unimplemented segment %s in operand" msgstr "" -#: config/tc-i386.c:3364 config/tc-i386.c:3571 +#: config/tc-i386.c:3561 config/tc-i386.c:3771 #, c-format msgid "unimplemented segment type %d in operand" msgstr "" -#: config/tc-i386.c:3408 config/tc-i386.c:5592 +#: config/tc-i386.c:3605 config/tc-i386.c:5836 #, c-format msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'" msgstr "" -#: config/tc-i386.c:3415 +#: config/tc-i386.c:3612 #, c-format msgid "scale factor of %d without an index register" msgstr "" -#: config/tc-i386.c:3528 +#: config/tc-i386.c:3728 #, c-format msgid "bad expression used with @%s" msgstr "" #. Missing or bad expr becomes absolute 0. -#: config/tc-i386.c:3550 +#: config/tc-i386.c:3750 #, c-format msgid "missing or invalid displacement expression `%s' taken as 0" msgstr "" -#: config/tc-i386.c:3656 +#: config/tc-i386.c:3869 #, c-format msgid "`%s' is not a valid base/index expression" msgstr "" -#: config/tc-i386.c:3660 +#: config/tc-i386.c:3873 #, c-format msgid "`%s' is not a valid %s bit base/index expression" msgstr "" -#: config/tc-i386.c:3735 +#: config/tc-i386.c:3948 #, c-format msgid "bad memory operand `%s'" msgstr "" -#: config/tc-i386.c:3750 +#: config/tc-i386.c:3963 #, c-format msgid "junk `%s' after register" msgstr "" -#: config/tc-i386.c:3759 config/tc-i386.c:3874 config/tc-i386.c:3912 +#: config/tc-i386.c:3972 config/tc-i386.c:4087 config/tc-i386.c:4125 #, c-format msgid "bad register name `%s'" msgstr "" -#: config/tc-i386.c:3767 +#: config/tc-i386.c:3980 msgid "immediate operand illegal with absolute jump" msgstr "" -#: config/tc-i386.c:3789 +#: config/tc-i386.c:4002 #, c-format msgid "too many memory references for `%s'" msgstr "" -#: config/tc-i386.c:3867 +#: config/tc-i386.c:4080 #, c-format msgid "expecting `,' or `)' after index register in `%s'" msgstr "" -#: config/tc-i386.c:3891 +#: config/tc-i386.c:4104 #, c-format msgid "expecting `)' after scale factor in `%s'" msgstr "" -#: config/tc-i386.c:3898 +#: config/tc-i386.c:4111 #, c-format msgid "expecting index register or scale factor after `,'; got '%c'" msgstr "" -#: config/tc-i386.c:3905 +#: config/tc-i386.c:4118 #, c-format msgid "expecting `,' or `)' after base register in `%s'" msgstr "" #. It's not a memory operand; argh! -#: config/tc-i386.c:3946 +#: config/tc-i386.c:4159 #, c-format msgid "invalid char %s beginning operand %d `%s'" msgstr "" -#: config/tc-i386.c:4121 +#: config/tc-i386.c:4338 msgid "long jump required" msgstr "" -#: config/tc-i386.c:4421 +#: config/tc-i386.c:4646 msgid "Bad call to md_atof ()" msgstr "" -#: config/tc-i386.c:4585 +#: config/tc-i386.c:4810 msgid "No compiled in support for x86_64" msgstr "" -#: config/tc-i386.c:4606 +#: config/tc-i386.c:4831 msgid "" " -Q ignored\n" " -V print assembler version number\n" @@ -4088,63 +4326,63 @@ msgid "" " -s ignored\n" msgstr "" -#: config/tc-i386.c:4613 +#: config/tc-i386.c:4838 msgid " -q quieten some warnings\n" msgstr "" -#: config/tc-i386.c:4714 config/tc-s390.c:1592 +#: config/tc-i386.c:4939 config/tc-s390.c:1601 msgid "GOT already in symbol table" msgstr "" -#: config/tc-i386.c:4846 +#: config/tc-i386.c:5077 #, c-format msgid "can not do %d byte relocation" msgstr "" -#: config/tc-i386.c:4898 config/tc-s390.c:1957 +#: config/tc-i386.c:5142 config/tc-s390.c:1969 #, c-format msgid "cannot represent relocation type %s" msgstr "" -#: config/tc-i386.c:5194 +#: config/tc-i386.c:5438 #, c-format msgid "too many memory references for '%s'" msgstr "" -#: config/tc-i386.c:5357 +#: config/tc-i386.c:5601 #, c-format msgid "Unknown operand modifier `%s'\n" msgstr "" -#: config/tc-i386.c:5564 +#: config/tc-i386.c:5808 #, c-format msgid "`%s' is not a valid segment register" msgstr "" -#: config/tc-i386.c:5574 config/tc-i386.c:5695 +#: config/tc-i386.c:5818 config/tc-i386.c:5939 msgid "Register scaling only allowed in memory operands." msgstr "" -#: config/tc-i386.c:5605 +#: config/tc-i386.c:5849 msgid "Too many register references in memory operand.\n" msgstr "" -#: config/tc-i386.c:5674 +#: config/tc-i386.c:5918 #, c-format msgid "Syntax error. Expecting a constant. Got `%s'.\n" msgstr "" -#: config/tc-i386.c:5744 +#: config/tc-i386.c:5988 #, c-format msgid "Unrecognized token '%s'" msgstr "" -#: config/tc-i386.c:5761 +#: config/tc-i386.c:6005 #, c-format msgid "Unexpected token `%s'\n" msgstr "" -#: config/tc-i386.c:5905 +#: config/tc-i386.c:6149 #, c-format msgid "Unrecognized token `%s'\n" msgstr "" @@ -4153,7 +4391,7 @@ msgstr "" msgid "Unknown temporary pseudo register" msgstr "" -#: config/tc-i860.c:181 config/tc-mips.c:1248 +#: config/tc-i860.c:181 config/tc-mips.c:1060 #, c-format msgid "internal error: can't hash `%s': %s\n" msgstr "" @@ -4190,7 +4428,7 @@ msgstr "" msgid "Illegal operands for %s" msgstr "" -#: config/tc-i860.c:873 config/tc-sparc.c:2731 +#: config/tc-i860.c:873 config/tc-sparc.c:2737 msgid "bad segment" msgstr "" @@ -4302,210 +4540,215 @@ msgid "" "\t\t\tlong displacements\n" msgstr "" -#: config/tc-i960.c:1404 +#: config/tc-i960.c:1405 msgid "too many operands" msgstr "" -#: config/tc-i960.c:1463 config/tc-i960.c:1690 +#: config/tc-i960.c:1464 config/tc-i960.c:1691 msgid "expression syntax error" msgstr "" -#: config/tc-i960.c:1501 +#: config/tc-i960.c:1502 msgid "attempt to branch into different segment" msgstr "" -#: config/tc-i960.c:1505 +#: config/tc-i960.c:1506 #, c-format msgid "target of %s instruction must be a label" msgstr "" -#: config/tc-i960.c:1544 +#: config/tc-i960.c:1545 msgid "unmatched '['" msgstr "" -#: config/tc-i960.c:1555 +#: config/tc-i960.c:1556 msgid "garbage after index spec ignored" msgstr "" #. We never moved: there was no opcode either! -#: config/tc-i960.c:1621 +#: config/tc-i960.c:1622 msgid "missing opcode" msgstr "" -#: config/tc-i960.c:2036 +#: config/tc-i960.c:2037 msgid "invalid index register" msgstr "" -#: config/tc-i960.c:2059 +#: config/tc-i960.c:2060 msgid "invalid scale factor" msgstr "" -#: config/tc-i960.c:2242 +#: config/tc-i960.c:2243 msgid "unaligned register" msgstr "" -#: config/tc-i960.c:2265 +#: config/tc-i960.c:2266 msgid "no such sfr in this architecture" msgstr "" -#: config/tc-i960.c:2303 +#: config/tc-i960.c:2304 msgid "illegal literal" msgstr "" #. Should not happen: see block comment above -#: config/tc-i960.c:2533 +#: config/tc-i960.c:2534 #, c-format msgid "Trying to 'bal' to %s" msgstr "" -#: config/tc-i960.c:2544 +#: config/tc-i960.c:2545 msgid "Looks like a proc, but can't tell what kind.\n" msgstr "" -#: config/tc-i960.c:2575 +#: config/tc-i960.c:2576 msgid "should have 1 or 2 operands" msgstr "" -#: config/tc-i960.c:2584 config/tc-i960.c:2603 +#: config/tc-i960.c:2585 config/tc-i960.c:2604 #, c-format msgid "Redefining leafproc %s" msgstr "" -#: config/tc-i960.c:2634 +#: config/tc-i960.c:2635 msgid "should have two operands" msgstr "" -#: config/tc-i960.c:2644 +#: config/tc-i960.c:2645 msgid "'entry_num' must be absolute number in [0,31]" msgstr "" -#: config/tc-i960.c:2653 +#: config/tc-i960.c:2654 #, c-format msgid "Redefining entrynum for sysproc %s" msgstr "" -#: config/tc-i960.c:2760 +#: config/tc-i960.c:2761 msgid "architecture of opcode conflicts with that of earlier instruction(s)" msgstr "" -#: config/tc-i960.c:2781 +#: config/tc-i960.c:2782 msgid "big endian mode is not supported" msgstr "" -#: config/tc-i960.c:2783 +#: config/tc-i960.c:2784 #, c-format msgid "ignoring unrecognized .endian type `%s'" msgstr "" -#: config/tc-i960.c:3055 +#: config/tc-i960.c:3056 #, c-format msgid "leafproc symbol '%s' undefined" msgstr "" -#: config/tc-i960.c:3065 +#: config/tc-i960.c:3066 #, c-format msgid "Warning: making leafproc entries %s and %s both global\n" msgstr "" -#: config/tc-i960.c:3174 +#: config/tc-i960.c:3175 msgid "option --link-relax is only supported in b.out format" msgstr "" -#: config/tc-i960.c:3217 write.c:2670 +#: config/tc-i960.c:3218 write.c:2689 msgid "callj to difference of two symbols" msgstr "" -#: config/tc-ia64.c:1052 +#: config/tc-ia64.c:1078 msgid "Unwind directive not followed by an instruction." msgstr "" -#: config/tc-ia64.c:4416 +#: config/tc-ia64.c:4512 msgid "Register name expected" msgstr "" -#: config/tc-ia64.c:4421 config/tc-ia64.c:4707 +#: config/tc-ia64.c:4517 config/tc-ia64.c:4803 msgid "Comma expected" msgstr "" -#: config/tc-ia64.c:4429 +#: config/tc-ia64.c:4525 msgid "Register value annotation ignored" msgstr "" -#: config/tc-ia64.c:4453 +#: config/tc-ia64.c:4549 msgid "Directive invalid within a bundle" msgstr "" -#: config/tc-ia64.c:4520 +#: config/tc-ia64.c:4616 msgid "Missing predicate relation type" msgstr "" -#: config/tc-ia64.c:4536 +#: config/tc-ia64.c:4632 msgid "Unrecognized predicate relation type" msgstr "" -#: config/tc-ia64.c:4556 config/tc-ia64.c:4581 +#: config/tc-ia64.c:4652 config/tc-ia64.c:4677 msgid "Predicate register expected" msgstr "" -#: config/tc-ia64.c:4568 +#: config/tc-ia64.c:4664 msgid "Duplicate predicate register ignored" msgstr "" -#: config/tc-ia64.c:4590 +#: config/tc-ia64.c:4686 msgid "Bad register range" msgstr "" -#: config/tc-ia64.c:4618 +#: config/tc-ia64.c:4714 msgid "Predicate source and target required" msgstr "" -#: config/tc-ia64.c:4620 config/tc-ia64.c:4632 +#: config/tc-ia64.c:4716 config/tc-ia64.c:4728 msgid "Use of p0 is not valid in this context" msgstr "" -#: config/tc-ia64.c:4627 +#: config/tc-ia64.c:4723 msgid "At least two PR arguments expected" msgstr "" -#: config/tc-ia64.c:4641 +#: config/tc-ia64.c:4737 msgid "At least one PR argument expected" msgstr "" -#: config/tc-ia64.c:4677 +#: config/tc-ia64.c:4773 #, c-format msgid "Inserting \"%s\" into entry hint table failed: %s" msgstr "" #. FIXME -- need 62-bit relocation type -#: config/tc-ia64.c:5147 +#: config/tc-ia64.c:5243 msgid "62-bit relocation not yet implemented" msgstr "" #. XXX technically, this is wrong: we should not be issuing warning #. messages until we're sure this instruction pattern is going to #. be used! -#: config/tc-ia64.c:5220 +#: config/tc-ia64.c:5316 msgid "lower 16 bits of mask ignored" msgstr "" -#: config/tc-ia64.c:5775 +#: config/tc-ia64.c:5871 msgid "Value truncated to 62 bits" msgstr "" -#: config/tc-ia64.c:6126 +#: config/tc-ia64.c:6222 msgid "" "Additional NOP may be necessary to workaround Itanium processor A/B step " "errata" msgstr "" -#: config/tc-ia64.c:6309 +#: config/tc-ia64.c:6405 #, c-format msgid "Unrecognized option '-x%s'" msgstr "" -#: config/tc-ia64.c:6337 +#: config/tc-ia64.c:6433 msgid "" "IA-64 options:\n" +" --mconstant-gp\t mark output file as using the constant-GP model\n" +"\t\t\t (sets ELF header flag EF_IA_64_CONS_GP)\n" +" --mauto-pic\t\t mark output file as using the constant-GP model\n" +"\t\t\t without function descriptors (sets ELF header flag\n" +"\t\t\t EF_IA_64_NOFUNCDESC_CONS_GP)\n" " -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n" " -mle | -mbe\t\t select little- or big-endian byte order (default -mle)\n" " -x | -xexplicit\t turn on dependency violation checking (default)\n" @@ -4513,37 +4756,37 @@ msgid "" " -xdebug\t\t debug dependency violation checker\n" msgstr "" -#: config/tc-ia64.c:6351 +#: config/tc-ia64.c:6452 msgid "--gstabs is not supported for ia64" msgstr "" -#: config/tc-ia64.c:6618 config/tc-mips.c:1227 +#: config/tc-ia64.c:6743 config/tc-mips.c:1049 msgid "Could not set architecture and machine" msgstr "" -#: config/tc-ia64.c:6725 +#: config/tc-ia64.c:6850 msgid "Explicit stops are ignored in auto mode" msgstr "" -#: config/tc-ia64.c:6775 +#: config/tc-ia64.c:6900 msgid "Found '{' after explicit switch to automatic mode" msgstr "" -#: config/tc-ia64.c:7222 +#: config/tc-ia64.c:7347 #, c-format msgid "Unhandled dependency %s for %s (%s), note %d" msgstr "" -#: config/tc-ia64.c:8498 +#: config/tc-ia64.c:8623 #, c-format msgid "Unrecognized dependency specifier %d\n" msgstr "" -#: config/tc-ia64.c:9300 +#: config/tc-ia64.c:9425 msgid "Only the first path encountering the conflict is reported" msgstr "" -#: config/tc-ia64.c:9303 +#: config/tc-ia64.c:9428 msgid "This is the location of the conflicting usage" msgstr "" @@ -4678,7 +4921,7 @@ msgid "" "is this intentional ?" msgstr "" -#: config/tc-m32r.c:1252 config/tc-ppc.c:1571 config/tc-ppc.c:3966 +#: config/tc-m32r.c:1252 config/tc-ppc.c:1561 config/tc-ppc.c:3977 msgid "Expected comma after symbol-name: rest of line ignored." msgstr "" @@ -4687,16 +4930,16 @@ msgstr "" msgid ".SCOMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-m32r.c:1276 config/tc-ppc.c:1593 config/tc-ppc.c:2615 -#: config/tc-ppc.c:3990 +#: config/tc-m32r.c:1276 config/tc-ppc.c:1583 config/tc-ppc.c:2626 +#: config/tc-ppc.c:4001 msgid "ignoring bad alignment" msgstr "" -#: config/tc-m32r.c:1288 config/tc-ppc.c:1630 config/tc-v850.c:333 +#: config/tc-m32r.c:1288 config/tc-ppc.c:1620 config/tc-v850.c:333 msgid "Common alignment not a power of 2" msgstr "" -#: config/tc-m32r.c:1303 config/tc-ppc.c:1604 config/tc-ppc.c:4002 +#: config/tc-m32r.c:1303 config/tc-ppc.c:1594 config/tc-ppc.c:4013 #, c-format msgid "Ignoring attempt to re-define symbol `%s'." msgstr "" @@ -5052,16 +5295,16 @@ msgstr "" msgid "Unable to produce reloc against symbol '%s'" msgstr "" -#: config/tc-m68k.c:948 config/tc-mips.c:12440 +#: config/tc-m68k.c:948 config/tc-mips.c:12955 config/tc-vax.c:3442 #, c-format msgid "Cannot make %s relocation PC relative" msgstr "" -#: config/tc-m68k.c:1041 config/tc-tahoe.c:1495 config/tc-vax.c:1762 +#: config/tc-m68k.c:1041 config/tc-tahoe.c:1495 config/tc-vax.c:1890 msgid "No operator" msgstr "" -#: config/tc-m68k.c:1071 config/tc-tahoe.c:1512 config/tc-vax.c:1779 +#: config/tc-m68k.c:1071 config/tc-tahoe.c:1512 config/tc-vax.c:1907 msgid "Unknown operator" msgstr "" @@ -5094,7 +5337,7 @@ msgid "operands mismatch" msgstr "" #: config/tc-m68k.c:1949 config/tc-m68k.c:1955 config/tc-m68k.c:1961 -#: config/tc-mmix.c:2464 config/tc-mmix.c:2488 +#: config/tc-mmix.c:2465 config/tc-mmix.c:2489 msgid "operand out of range" msgstr "" @@ -5298,7 +5541,7 @@ msgstr "" msgid "restore without save" msgstr "" -#: config/tc-m68k.c:5641 config/tc-m68k.c:6026 +#: config/tc-m68k.c:5641 config/tc-m68k.c:6028 msgid "syntax error in structured control directive" msgstr "" @@ -5312,74 +5555,75 @@ msgid "" "Condition <%c%c> in structured control directive can not be encoded correctly" msgstr "" -#: config/tc-m68k.c:6069 +#: config/tc-m68k.c:6071 msgid "missing then" msgstr "" -#: config/tc-m68k.c:6151 +#: config/tc-m68k.c:6153 msgid "else without matching if" msgstr "" -#: config/tc-m68k.c:6185 +#: config/tc-m68k.c:6187 msgid "endi without matching if" msgstr "" -#: config/tc-m68k.c:6226 +#: config/tc-m68k.c:6228 msgid "break outside of structured loop" msgstr "" -#: config/tc-m68k.c:6265 +#: config/tc-m68k.c:6267 msgid "next outside of structured loop" msgstr "" -#: config/tc-m68k.c:6317 +#: config/tc-m68k.c:6319 msgid "missing =" msgstr "" -#: config/tc-m68k.c:6355 +#: config/tc-m68k.c:6357 msgid "missing to or downto" msgstr "" -#: config/tc-m68k.c:6391 config/tc-m68k.c:6425 config/tc-m68k.c:6644 +#: config/tc-m68k.c:6393 config/tc-m68k.c:6427 config/tc-m68k.c:6646 msgid "missing do" msgstr "" -#: config/tc-m68k.c:6528 +#: config/tc-m68k.c:6530 msgid "endf without for" msgstr "" -#: config/tc-m68k.c:6584 +#: config/tc-m68k.c:6586 msgid "until without repeat" msgstr "" -#: config/tc-m68k.c:6680 +#: config/tc-m68k.c:6682 msgid "endw without while" msgstr "" -#: config/tc-m68k.c:6804 +#: config/tc-m68k.c:6806 #, c-format msgid "unrecognized option `%s'" msgstr "" -#: config/tc-m68k.c:6849 +#: config/tc-m68k.c:6851 #, c-format msgid "unrecognized architecture specification `%s'" msgstr "" -#: config/tc-m68k.c:6919 +#: config/tc-m68k.c:6944 +#, c-format msgid "" "680X0 options:\n" "-l\t\t\tuse 1 word for refs to undefined symbols [default 2]\n" "-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060 |\n" "-m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n" "-m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\n" -"\t\t\tspecify variant of 680X0 architecture [default 68020]\n" +"\t\t\tspecify variant of 680X0 architecture [default %s]\n" "-m68881 | -m68882 | -mno-68881 | -mno-68882\n" "\t\t\ttarget has/lacks floating-point coprocessor\n" "\t\t\t[default yes for 68020, 68030, and cpu32]\n" msgstr "" -#: config/tc-m68k.c:6929 +#: config/tc-m68k.c:6955 msgid "" "-m68851 | -mno-68851\n" "\t\t\ttarget has/lacks memory-management unit coprocessor\n" @@ -5392,7 +5636,7 @@ msgid "" "--bitwise-or\t\tdo not treat `|' as a comment character\n" msgstr "" -#: config/tc-m68k.c:6939 +#: config/tc-m68k.c:6965 msgid "" "--base-size-default-16\tbase reg without size is 16 bits\n" "--base-size-default-32\tbase reg without size is 32 bits (default)\n" @@ -5400,12 +5644,12 @@ msgid "" "--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n" msgstr "" -#: config/tc-m68k.c:6974 +#: config/tc-m68k.c:7000 #, c-format msgid "Error %s in %s\n" msgstr "" -#: config/tc-m68k.c:6978 +#: config/tc-m68k.c:7004 #, c-format msgid "Opcode(%d.%s): " msgstr "" @@ -5679,423 +5923,426 @@ msgstr "" msgid "pc-relative" msgstr "" -#: config/tc-mips.c:659 +#: config/tc-mips.c:690 #, c-format msgid "internal Error, line %d, %s" msgstr "" -#: config/tc-mips.c:661 +#: config/tc-mips.c:692 msgid "MIPS internal Error" msgstr "" -#: config/tc-mips.c:1028 -msgid "-G not supported in this configuration." -msgstr "" - -#: config/tc-mips.c:1056 -msgid "" -"The -mcpu option can't be used together with -march. Use -mtune instead of -" -"mcpu." -msgstr "" - -#: config/tc-mips.c:1064 -msgid "" -"The -mcpu option can't be used together with -mtune. Use -march instead of -" -"mcpu." -msgstr "" - -#: config/tc-mips.c:1113 config/tc-mips.c:1138 -msgid "The -mcpu option is deprecated. Please use -march and -mtune instead." -msgstr "" - -#. This really should be an error instead of a warning, but old -#. compilers only have -mcpu which sets both arch and tune. For -#. now, we discard arch and preserve tune. -#: config/tc-mips.c:1158 -msgid "The -march option is incompatible to -mipsN and therefore ignored." -msgstr "" - -#: config/tc-mips.c:1210 -msgid "trap exception not supported at ISA 1" -msgstr "" - -#: config/tc-mips.c:1274 +#: config/tc-mips.c:1086 #, c-format msgid "internal: can't hash `%s': %s" msgstr "" -#: config/tc-mips.c:1282 +#: config/tc-mips.c:1094 #, c-format msgid "internal error: bad mips16 opcode: %s %s\n" msgstr "" -#: config/tc-mips.c:1456 +#: config/tc-mips.c:1275 #, c-format msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n" msgstr "" -#: config/tc-mips.c:2012 config/tc-mips.c:12585 +#: config/tc-mips.c:1830 config/tc-mips.c:13100 msgid "extended instruction in delay slot" msgstr "" -#: config/tc-mips.c:2056 config/tc-mips.c:2067 +#: config/tc-mips.c:1874 config/tc-mips.c:1885 #, c-format msgid "jump to misaligned address (0x%lx)" msgstr "" -#: config/tc-mips.c:2060 config/tc-mips.c:2071 +#: config/tc-mips.c:1878 config/tc-mips.c:1889 #, c-format msgid "jump address range overflow (0x%lx)" msgstr "" -#: config/tc-mips.c:2864 config/tc-mips.c:3222 +#: config/tc-mips.c:2693 config/tc-mips.c:3088 msgid "Macro instruction expanded into multiple instructions" msgstr "" -#: config/tc-mips.c:3275 +#: config/tc-mips.c:2705 +msgid "" +"Macro instruction expanded into multiple instructions in a branch delay slot" +msgstr "" + +#: config/tc-mips.c:3141 msgid "unsupported large constant" msgstr "" -#: config/tc-mips.c:3277 +#: config/tc-mips.c:3143 #, c-format msgid "Instruction %s requires absolute expression" msgstr "" -#: config/tc-mips.c:3423 +#: config/tc-mips.c:3292 #, c-format msgid "Number (0x%lx) larger than 32 bits" msgstr "" -#: config/tc-mips.c:3445 +#: config/tc-mips.c:3314 msgid "Number larger than 64 bits" msgstr "" -#: config/tc-mips.c:3765 config/tc-mips.c:3823 config/tc-mips.c:5671 -#: config/tc-mips.c:5715 config/tc-mips.c:6235 config/tc-mips.c:6293 +#: config/tc-mips.c:3631 config/tc-mips.c:3709 config/tc-mips.c:5637 +#: config/tc-mips.c:5688 config/tc-mips.c:6236 config/tc-mips.c:6295 msgid "PIC code offset overflow (max 16 signed bits)" msgstr "" -#: config/tc-mips.c:4070 +#: config/tc-mips.c:3957 #, c-format msgid "Branch %s is always false (nop)" msgstr "" -#: config/tc-mips.c:4078 +#: config/tc-mips.c:3965 #, c-format msgid "Branch likely %s is always false" msgstr "" -#: config/tc-mips.c:4086 config/tc-mips.c:4155 config/tc-mips.c:4250 -#: config/tc-mips.c:4300 config/tc-mips.c:7343 config/tc-mips.c:7351 -#: config/tc-mips.c:7359 config/tc-mips.c:7468 +#: config/tc-mips.c:3973 config/tc-mips.c:4042 config/tc-mips.c:4137 +#: config/tc-mips.c:4187 config/tc-mips.c:7426 config/tc-mips.c:7434 +#: config/tc-mips.c:7442 config/tc-mips.c:7551 msgid "Unsupported large constant" msgstr "" #. result is always true -#: config/tc-mips.c:4120 +#: config/tc-mips.c:4007 #, c-format msgid "Branch %s is always true" msgstr "" -#: config/tc-mips.c:4372 config/tc-mips.c:4484 +#: config/tc-mips.c:4259 config/tc-mips.c:4371 msgid "Divide by zero." msgstr "" -#: config/tc-mips.c:5112 +#: config/tc-mips.c:4460 +msgid "dla used to load 32-bit register" +msgstr "" + +#: config/tc-mips.c:4463 +msgid "la used to load 64-bit address" +msgstr "" + +#: config/tc-mips.c:5044 msgid "MIPS PIC call to register other than $25" msgstr "" -#: config/tc-mips.c:5119 config/tc-mips.c:5130 config/tc-mips.c:5232 -#: config/tc-mips.c:5243 +#: config/tc-mips.c:5051 config/tc-mips.c:5062 config/tc-mips.c:5181 +#: config/tc-mips.c:5192 msgid "No .cprestore pseudo-op used in PIC code" msgstr "" -#: config/tc-mips.c:5124 config/tc-mips.c:5237 +#: config/tc-mips.c:5056 config/tc-mips.c:5186 msgid "No .frame pseudo-op used in PIC code" msgstr "" -#: config/tc-mips.c:5315 config/tc-mips.c:5404 config/tc-mips.c:5986 -#: config/tc-mips.c:6027 config/tc-mips.c:6045 config/tc-mips.c:6676 +#: config/tc-mips.c:5265 config/tc-mips.c:5354 config/tc-mips.c:5985 +#: config/tc-mips.c:6026 config/tc-mips.c:6044 config/tc-mips.c:6759 msgid "opcode not supported on this processor" msgstr "" -#: config/tc-mips.c:6490 config/tc-mips.c:7234 +#: config/tc-mips.c:6493 config/tc-mips.c:7317 msgid "Macro used $at after \".set noat\"" msgstr "" -#: config/tc-mips.c:6642 config/tc-mips.c:6664 +#: config/tc-mips.c:6660 config/tc-mips.c:6681 config/tc-mips.c:6722 +#: config/tc-mips.c:6743 msgid "rotate count too large" msgstr "" -#: config/tc-mips.c:6716 +#: config/tc-mips.c:6799 #, c-format msgid "Instruction %s: result is always false" msgstr "" -#: config/tc-mips.c:6889 +#: config/tc-mips.c:6972 #, c-format msgid "Instruction %s: result is always true" msgstr "" -#: config/tc-mips.c:7028 config/tc-mips.c:7057 config/tc-mips.c:7127 -#: config/tc-mips.c:7153 +#: config/tc-mips.c:7111 config/tc-mips.c:7140 config/tc-mips.c:7210 +#: config/tc-mips.c:7236 msgid "operand overflow" msgstr "" #. FIXME: Check if this is one of the itbl macros, since they #. are added dynamically. -#: config/tc-mips.c:7230 +#: config/tc-mips.c:7313 #, c-format msgid "Macro %s not implemented yet" msgstr "" -#: config/tc-mips.c:7501 +#: config/tc-mips.c:7584 #, c-format msgid "internal: bad mips opcode (mask error): %s %s" msgstr "" -#: config/tc-mips.c:7557 +#: config/tc-mips.c:7646 #, c-format msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s" msgstr "" -#: config/tc-mips.c:7564 +#: config/tc-mips.c:7653 #, c-format msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s" msgstr "" -#: config/tc-mips.c:7676 +#: config/tc-mips.c:7767 #, c-format msgid "opcode not supported on this processor: %s (%s)" msgstr "" -#: config/tc-mips.c:7753 +#: config/tc-mips.c:7847 #, c-format -msgid "Improper shift amount (%ld)" +msgid "Improper shift amount (%lu)" msgstr "" -#: config/tc-mips.c:7779 config/tc-mips.c:8992 config/tc-mips.c:9107 +#: config/tc-mips.c:7873 config/tc-mips.c:9187 config/tc-mips.c:9302 #, c-format msgid "Invalid value for `%s' (%lu)" msgstr "" -#: config/tc-mips.c:7797 +#: config/tc-mips.c:7891 #, c-format -msgid "Illegal break code (%ld)" +msgid "Illegal break code (%lu)" msgstr "" -#: config/tc-mips.c:7811 +#: config/tc-mips.c:7905 #, c-format -msgid "Illegal lower break code (%ld)" +msgid "Illegal lower break code (%lu)" msgstr "" -#: config/tc-mips.c:7824 +#: config/tc-mips.c:7918 #, c-format -msgid "Illegal 20-bit code (%ld)" +msgid "Illegal 20-bit code (%lu)" msgstr "" -#: config/tc-mips.c:7836 +#: config/tc-mips.c:7930 #, c-format -msgid "Coproccesor code > 25 bits (%ld)" +msgid "Coproccesor code > 25 bits (%lu)" msgstr "" -#: config/tc-mips.c:7849 +#: config/tc-mips.c:7943 #, c-format -msgid "Illegal 19-bit code (%ld)" +msgid "Illegal 19-bit code (%lu)" msgstr "" -#: config/tc-mips.c:7861 +#: config/tc-mips.c:7955 #, c-format -msgid "Invalid performance register (%ld)" +msgid "Invalid performance register (%lu)" msgstr "" -#: config/tc-mips.c:7898 +#: config/tc-mips.c:7992 #, c-format msgid "Invalid register number (%d)" msgstr "" -#: config/tc-mips.c:8063 +#: config/tc-mips.c:8168 +#, c-format +msgid "Invalid MDMX Immediate (%ld)" +msgstr "" + +#: config/tc-mips.c:8211 #, c-format msgid "Invalid float register number (%d)" msgstr "" -#: config/tc-mips.c:8073 +#: config/tc-mips.c:8221 #, c-format msgid "Float register should be even, was %d" msgstr "" -#: config/tc-mips.c:8124 +#: config/tc-mips.c:8260 +#, c-format +msgid "Bad element selector %ld" +msgstr "" + +#: config/tc-mips.c:8267 +#, c-format +msgid "Expecting ']' found '%s'" +msgstr "" + +#: config/tc-mips.c:8309 msgid "absolute expression required" msgstr "" -#: config/tc-mips.c:8192 +#: config/tc-mips.c:8377 #, c-format msgid "Bad floating point constant: %s" msgstr "" -#: config/tc-mips.c:8320 +#: config/tc-mips.c:8505 msgid "Can't use floating point insn in this section" msgstr "" -#: config/tc-mips.c:8361 config/tc-mips.c:8366 config/tc-mips.c:8497 -#: config/tc-mips.c:8502 +#: config/tc-mips.c:8546 config/tc-mips.c:8551 config/tc-mips.c:8682 +#: config/tc-mips.c:8687 msgid "bad composition of relocations" msgstr "" -#: config/tc-mips.c:8399 +#: config/tc-mips.c:8584 msgid "16 bit expression not in range 0..65535" msgstr "" -#: config/tc-mips.c:8436 +#: config/tc-mips.c:8621 msgid "16 bit expression not in range -32768..32767" msgstr "" -#: config/tc-mips.c:8521 +#: config/tc-mips.c:8706 msgid "lui expression not in range 0..65535" msgstr "" -#: config/tc-mips.c:8545 +#: config/tc-mips.c:8730 #, c-format msgid "invalid condition code register $fcc%d" msgstr "" -#: config/tc-mips.c:8570 +#: config/tc-mips.c:8755 msgid "invalid coprocessor sub-selection value (0-7)" msgstr "" -#: config/tc-mips.c:8575 +#: config/tc-mips.c:8760 #, c-format msgid "bad char = '%c'\n" msgstr "" -#: config/tc-mips.c:8586 config/tc-mips.c:8591 config/tc-mips.c:9132 +#: config/tc-mips.c:8771 config/tc-mips.c:8776 config/tc-mips.c:9327 msgid "illegal operands" msgstr "" -#: config/tc-mips.c:8658 +#: config/tc-mips.c:8843 msgid "unrecognized opcode" msgstr "" -#: config/tc-mips.c:8770 +#: config/tc-mips.c:8955 #, c-format msgid "invalid register number (%d)" msgstr "" -#: config/tc-mips.c:8851 +#: config/tc-mips.c:9046 msgid "used $at without \".set noat\"" msgstr "" -#: config/tc-mips.c:9026 +#: config/tc-mips.c:9221 msgid "can't parse register list" msgstr "" -#: config/tc-mips.c:9258 +#: config/tc-mips.c:9453 msgid "extended operand requested but not required" msgstr "" -#: config/tc-mips.c:9260 +#: config/tc-mips.c:9455 msgid "invalid unextended operand value" msgstr "" -#: config/tc-mips.c:9288 +#: config/tc-mips.c:9483 msgid "operand value out of range for instruction" msgstr "" -#: config/tc-mips.c:9520 +#: config/tc-mips.c:9715 msgid "internal error" msgstr "" -#: config/tc-mips.c:9840 +#: config/tc-mips.c:10048 #, c-format msgid "invalid architecture -mtune=%s" msgstr "" -#: config/tc-mips.c:9843 +#: config/tc-mips.c:10051 #, c-format msgid "invalid architecture -march=%s" msgstr "" -#: config/tc-mips.c:9846 +#: config/tc-mips.c:10054 #, c-format msgid "invalid architecture -mcpu=%s" msgstr "" -#: config/tc-mips.c:9858 +#: config/tc-mips.c:10066 #, c-format msgid "A different -mtune= was already specified, is now -mtune=%s" msgstr "" -#: config/tc-mips.c:9864 +#: config/tc-mips.c:10072 #, c-format msgid "A different -march= was already specified, is now -march=%s" msgstr "" -#: config/tc-mips.c:9870 +#: config/tc-mips.c:10078 #, c-format msgid "A different -mcpu= was already specified, is now -mcpu=%s" msgstr "" -#: config/tc-mips.c:9880 +#: config/tc-mips.c:10088 msgid "A different -march= or -mtune= was already specified, is now -m4650" msgstr "" -#: config/tc-mips.c:9892 +#: config/tc-mips.c:10100 msgid "A different -march= or -mtune= was already specified, is now -m4010" msgstr "" -#: config/tc-mips.c:9904 +#: config/tc-mips.c:10112 msgid "A different -march= or -mtune= was already specified, is now -m4100" msgstr "" -#: config/tc-mips.c:9916 +#: config/tc-mips.c:10124 msgid "A different -march= or -mtune= was already specified, is now -m3900" msgstr "" -#: config/tc-mips.c:9939 +#: config/tc-mips.c:10163 msgid "-G may not be used with embedded PIC code" msgstr "" -#: config/tc-mips.c:9952 +#: config/tc-mips.c:10176 msgid "-call_shared is supported only for ELF format" msgstr "" -#: config/tc-mips.c:9958 config/tc-mips.c:11148 config/tc-mips.c:11350 +#: config/tc-mips.c:10182 config/tc-mips.c:11627 config/tc-mips.c:11837 msgid "-G may not be used with SVR4 PIC code" msgstr "" -#: config/tc-mips.c:9967 +#: config/tc-mips.c:10191 msgid "-non_shared is supported only for ELF format" msgstr "" -#: config/tc-mips.c:9984 +#: config/tc-mips.c:10208 msgid "-G is not supported for this configuration" msgstr "" -#: config/tc-mips.c:9989 +#: config/tc-mips.c:10213 msgid "-G may not be used with SVR4 or embedded PIC code" msgstr "" -#: config/tc-mips.c:10003 +#: config/tc-mips.c:10227 msgid "-32 is supported for ELF format only" msgstr "" -#: config/tc-mips.c:10012 +#: config/tc-mips.c:10236 msgid "-n32 is supported for ELF format only" msgstr "" -#: config/tc-mips.c:10021 +#: config/tc-mips.c:10245 msgid "-64 is supported for ELF format only" msgstr "" -#: config/tc-mips.c:10026 config/tc-mips.c:10065 +#: config/tc-mips.c:10250 config/tc-mips.c:10289 msgid "No compiled in support for 64 bit object file format" msgstr "" -#: config/tc-mips.c:10052 +#: config/tc-mips.c:10276 msgid "-mabi is supported for ELF format only" msgstr "" -#: config/tc-mips.c:10126 +#: config/tc-mips.c:10296 +#, c-format +msgid "invalid abi -mabi=%s" +msgstr "" + +#: config/tc-mips.c:10363 msgid "" "MIPS options:\n" "-membedded-pic\t\tgenerate embedded position independent code\n" @@ -6106,7 +6353,7 @@ msgid "" "\t\t\timplicitly with the gp register [default 8]\n" msgstr "" -#: config/tc-mips.c:10134 +#: config/tc-mips.c:10371 msgid "" "-mips1\t\t\tgenerate MIPS ISA I instructions\n" "-mips2\t\t\tgenerate MIPS ISA II instructions\n" @@ -6118,20 +6365,20 @@ msgid "" "-march=CPU/-mtune=CPU\tgenerate code/schedule for CPU, where CPU is one of:\n" msgstr "" -#: config/tc-mips.c:10170 +#: config/tc-mips.c:10407 msgid "" "-mCPU\t\t\tequivalent to -march=CPU -mtune=CPU. Deprecated.\n" "-no-mCPU\t\tdon't generate code specific to CPU.\n" "\t\t\tFor -mCPU and -no-mCPU, CPU must be one of:\n" msgstr "" -#: config/tc-mips.c:10183 +#: config/tc-mips.c:10420 msgid "" "-mips16\t\t\tgenerate mips16 instructions\n" "-no-mips16\t\tdo not generate mips16 instructions\n" msgstr "" -#: config/tc-mips.c:10186 +#: config/tc-mips.c:10423 msgid "" "-mgp32\t\t\tuse 32-bit GPRs, regardless of the chosen ISA\n" "-mfp32\t\t\tuse 32-bit FPRs, regardless of the chosen ISA\n" @@ -6143,7 +6390,7 @@ msgid "" "--break, --no-trap\tbreak exception on div by 0 and mult overflow\n" msgstr "" -#: config/tc-mips.c:10196 +#: config/tc-mips.c:10433 msgid "" "-KPIC, -call_shared\tgenerate SVR4 position independent code\n" "-non_shared\t\tdo not generate position independent code\n" @@ -6151,192 +6398,223 @@ msgid "" "-mabi=ABI\t\tcreate ABI conformant object file for:\n" msgstr "" -#: config/tc-mips.c:10212 +#: config/tc-mips.c:10449 msgid "" "-32\t\t\tcreate o32 ABI object file (default)\n" "-n32\t\t\tcreate n32 ABI object file\n" "-64\t\t\tcreate 64 ABI object file\n" msgstr "" -#: config/tc-mips.c:10342 +#: config/tc-mips.c:10469 +msgid "-G not supported in this configuration." +msgstr "" + +#: config/tc-mips.c:10488 +msgid "" +"The -mcpu option can't be used together with -march. Use -mtune instead of -" +"mcpu." +msgstr "" + +#: config/tc-mips.c:10496 +msgid "" +"The -mcpu option can't be used together with -mtune. Use -march instead of -" +"mcpu." +msgstr "" + +#: config/tc-mips.c:10545 config/tc-mips.c:10570 +msgid "The -mcpu option is deprecated. Please use -march and -mtune instead." +msgstr "" + +#. This really should be an error instead of a warning, but old +#. compilers only have -mcpu which sets both arch and tune. For +#. now, we discard arch and preserve tune. +#: config/tc-mips.c:10590 +msgid "The -march option is incompatible to -mipsN and therefore ignored." +msgstr "" + +#: config/tc-mips.c:10642 +msgid "trap exception not supported at ISA 1" +msgstr "" + +#: config/tc-mips.c:10810 #, c-format msgid "Unmatched %%hi reloc" msgstr "" -#: config/tc-mips.c:10554 +#: config/tc-mips.c:11030 msgid "Invalid PC relative reloc" msgstr "" -#: config/tc-mips.c:10662 config/tc-sparc.c:3106 config/tc-sparc.c:3113 -#: config/tc-sparc.c:3120 config/tc-sparc.c:3127 config/tc-sparc.c:3134 -#: config/tc-sparc.c:3143 config/tc-sparc.c:3154 config/tc-sparc.c:3176 -#: config/tc-sparc.c:3200 write.c:1026 write.c:1089 +#: config/tc-mips.c:11138 config/tc-sparc.c:3113 config/tc-sparc.c:3120 +#: config/tc-sparc.c:3127 config/tc-sparc.c:3134 config/tc-sparc.c:3141 +#: config/tc-sparc.c:3150 config/tc-sparc.c:3161 config/tc-sparc.c:3183 +#: config/tc-sparc.c:3207 write.c:1041 write.c:1104 msgid "relocation overflow" msgstr "" -#: config/tc-mips.c:10673 +#: config/tc-mips.c:11149 #, c-format msgid "Branch to odd address (%lx)" msgstr "" -#: config/tc-mips.c:10735 +#: config/tc-mips.c:11214 msgid "Branch out of range" msgstr "" -#: config/tc-mips.c:10843 +#: config/tc-mips.c:11322 #, c-format msgid "%08lx UNDEFINED\n" msgstr "" -#: config/tc-mips.c:10906 +#: config/tc-mips.c:11385 #, c-format msgid "Alignment too large: %d. assumed." msgstr "" -#: config/tc-mips.c:10909 +#: config/tc-mips.c:11388 msgid "Alignment negative: 0 assumed." msgstr "" -#: config/tc-mips.c:10997 +#: config/tc-mips.c:11476 msgid "No read only data section in this object file format" msgstr "" -#: config/tc-mips.c:11020 +#: config/tc-mips.c:11499 msgid "Global pointers not supported; recompile -G 0" msgstr "" -#: config/tc-mips.c:11106 +#: config/tc-mips.c:11585 #, c-format msgid "%s: no such section" msgstr "" -#: config/tc-mips.c:11143 +#: config/tc-mips.c:11622 #, c-format msgid ".option pic%d not supported" msgstr "" -#: config/tc-mips.c:11154 +#: config/tc-mips.c:11633 #, c-format msgid "Unrecognized option \"%s\"" msgstr "" -#: config/tc-mips.c:11217 +#: config/tc-mips.c:11696 msgid "`noreorder' must be set before `nomacro'" msgstr "" -#: config/tc-mips.c:11273 config/tc-mips.c:11287 +#: config/tc-mips.c:11760 config/tc-mips.c:11774 #, c-format msgid "unknown ISA level %s" msgstr "" -#: config/tc-mips.c:11309 +#: config/tc-mips.c:11796 msgid ".set pop with no .set push" msgstr "" -#: config/tc-mips.c:11333 +#: config/tc-mips.c:11820 #, c-format msgid "Tried to set unrecognized symbol: %s\n" msgstr "" -#: config/tc-mips.c:11384 +#: config/tc-mips.c:11871 msgid ".cpload not in noreorder section" msgstr "" -#: config/tc-mips.c:11441 config/tc-mips.c:11454 +#: config/tc-mips.c:11928 config/tc-mips.c:11947 msgid "missing argument separator ',' for .cpsetup" msgstr "" -#: config/tc-mips.c:11638 +#: config/tc-mips.c:12128 msgid "Unsupported use of .gpword" msgstr "" -#: config/tc-mips.c:11774 +#: config/tc-mips.c:12263 msgid "expected `$'" msgstr "" -#: config/tc-mips.c:11782 +#: config/tc-mips.c:12271 msgid "Bad register number" msgstr "" -#: config/tc-mips.c:11798 +#: config/tc-mips.c:12319 msgid "Unrecognized register name" msgstr "" -#: config/tc-mips.c:11983 +#: config/tc-mips.c:12505 msgid "unsupported PC relative reference to different section" msgstr "" -#: config/tc-mips.c:12096 +#: config/tc-mips.c:12618 msgid "unsupported relocation" msgstr "" -#: config/tc-mips.c:12200 +#: config/tc-mips.c:12714 msgid "AT used after \".set noat\" or macro used after \".set nomacro\"" msgstr "" -#: config/tc-mips.c:12269 +#: config/tc-mips.c:12784 msgid "Double check fx_r_type in tc-mips.c:tc_gen_reloc" msgstr "" -#: config/tc-mips.c:12472 config/tc-sh.c:3771 +#: config/tc-mips.c:12987 config/tc-sh.c:3799 #, c-format msgid "Can not represent %s relocation in this object file format" msgstr "" -#: config/tc-mips.c:12811 +#: config/tc-mips.c:13338 msgid "missing .end at end of assembly" msgstr "" -#: config/tc-mips.c:12826 +#: config/tc-mips.c:13353 msgid "expected simple number" msgstr "" -#: config/tc-mips.c:12852 +#: config/tc-mips.c:13379 #, c-format msgid " *input_line_pointer == '%c' 0x%02x\n" msgstr "" -#: config/tc-mips.c:12854 +#: config/tc-mips.c:13381 msgid "invalid number" msgstr "" -#: config/tc-mips.c:12912 +#: config/tc-mips.c:13470 msgid ".end not in text section" msgstr "" -#: config/tc-mips.c:12916 +#: config/tc-mips.c:13474 msgid ".end directive without a preceding .ent directive." msgstr "" -#: config/tc-mips.c:12925 +#: config/tc-mips.c:13483 msgid ".end symbol does not match .ent symbol." msgstr "" -#: config/tc-mips.c:12928 +#: config/tc-mips.c:13490 msgid ".end directive missing or unknown symbol" msgstr "" -#: config/tc-mips.c:13001 +#: config/tc-mips.c:13564 msgid ".ent or .aent not in text section." msgstr "" -#: config/tc-mips.c:13004 +#: config/tc-mips.c:13567 msgid "missing .end" msgstr "" -#: config/tc-mips.c:13041 ecoff.c:3202 +#: config/tc-mips.c:13609 ecoff.c:3200 msgid ".frame outside of .ent" msgstr "" -#: config/tc-mips.c:13052 +#: config/tc-mips.c:13620 msgid "Bad .frame directive" msgstr "" -#: config/tc-mips.c:13082 +#: config/tc-mips.c:13653 msgid ".mask/.fmask outside of .ent" msgstr "" -#: config/tc-mips.c:13089 +#: config/tc-mips.c:13660 msgid "Bad .mask/.fmask directive" msgstr "" @@ -6403,8 +6681,8 @@ msgstr "" msgid "specified location wasn't TETRA-aligned" msgstr "" -#: config/tc-mmix.c:953 config/tc-mmix.c:968 config/tc-mmix.c:4085 -#: config/tc-mmix.c:4101 +#: config/tc-mmix.c:953 config/tc-mmix.c:968 config/tc-mmix.c:4086 +#: config/tc-mmix.c:4102 msgid "unaligned data at an absolute location is not supported" msgstr "" @@ -6466,119 +6744,119 @@ msgstr "" msgid "missing local expression" msgstr "" -#: config/tc-mmix.c:2362 +#: config/tc-mmix.c:2363 msgid "operand out of range, instruction expanded" msgstr "" #. The BFD_RELOC_MMIX_LOCAL-specific message is supposed to be #. user-friendly, though a little bit non-substantial. -#: config/tc-mmix.c:2620 +#: config/tc-mmix.c:2621 msgid "directive LOCAL must be placed in code or data" msgstr "" -#: config/tc-mmix.c:2621 +#: config/tc-mmix.c:2622 msgid "internal confusion: relocation in a section without contents" msgstr "" -#: config/tc-mmix.c:2734 +#: config/tc-mmix.c:2735 msgid "internal: BFD_RELOC_MMIX_BASE_PLUS_OFFSET not resolved to section" msgstr "" -#: config/tc-mmix.c:2782 +#: config/tc-mmix.c:2783 msgid "no suitable GREG definition for operands" msgstr "" -#: config/tc-mmix.c:2841 +#: config/tc-mmix.c:2842 msgid "operands were not reducible at assembly-time" msgstr "" -#: config/tc-mmix.c:2869 +#: config/tc-mmix.c:2870 #, c-format msgid "cannot generate relocation type for symbol %s, code %s" msgstr "" -#: config/tc-mmix.c:2889 +#: config/tc-mmix.c:2890 #, c-format msgid "internal: unhandled label %s" msgstr "" -#: config/tc-mmix.c:2943 +#: config/tc-mmix.c:2944 msgid "[0-9]H labels may not appear alone on a line" msgstr "" -#: config/tc-mmix.c:2952 +#: config/tc-mmix.c:2953 msgid "[0-9]H labels do not mix with dot-pseudos" msgstr "" -#: config/tc-mmix.c:3016 +#: config/tc-mmix.c:3017 msgid "invalid characters in input" msgstr "" -#: config/tc-mmix.c:3120 +#: config/tc-mmix.c:3121 msgid "empty label field for IS" msgstr "" -#: config/tc-mmix.c:3370 +#: config/tc-mmix.c:3371 #, c-format msgid "internal: unexpected relax type %d:%d" msgstr "" -#: config/tc-mmix.c:3392 +#: config/tc-mmix.c:3393 msgid "BSPEC without ESPEC." msgstr "" -#: config/tc-mmix.c:3594 +#: config/tc-mmix.c:3595 msgid "GREG expression too complicated" msgstr "" -#: config/tc-mmix.c:3609 +#: config/tc-mmix.c:3610 msgid "internal: GREG expression not resolved to section" msgstr "" -#: config/tc-mmix.c:3660 +#: config/tc-mmix.c:3661 msgid "register section has contents\n" msgstr "" -#: config/tc-mmix.c:3838 +#: config/tc-mmix.c:3839 msgid "section change from within a BSPEC/ESPEC pair is not supported" msgstr "" -#: config/tc-mmix.c:3860 +#: config/tc-mmix.c:3861 msgid "directive LOC from within a BSPEC/ESPEC pair is not supported" msgstr "" -#: config/tc-mmix.c:3871 +#: config/tc-mmix.c:3872 msgid "invalid LOC expression" msgstr "" -#: config/tc-mmix.c:3896 config/tc-mmix.c:3922 +#: config/tc-mmix.c:3897 config/tc-mmix.c:3923 msgid "LOC expression stepping backwards is not supported" msgstr "" #. We will only get here in rare cases involving #NO_APP, #. where the unterminated string is not recognized by the #. preformatting pass. -#: config/tc-mmix.c:4006 config/tc-mmix.c:4167 +#: config/tc-mmix.c:4007 config/tc-mmix.c:4168 msgid "unterminated string" msgstr "" -#: config/tc-mmix.c:4023 +#: config/tc-mmix.c:4024 msgid "BYTE expression not a pure number" msgstr "" #. Note that mmixal does not allow negative numbers in #. BYTE sequences, so neither should we. -#: config/tc-mmix.c:4032 +#: config/tc-mmix.c:4033 msgid "BYTE expression not in the range 0..255" msgstr "" -#: config/tc-mmix.c:4083 config/tc-mmix.c:4099 +#: config/tc-mmix.c:4084 config/tc-mmix.c:4100 msgid "data item with alignment larger than location" msgstr "" #. Since integer_constant is local to expr.c, we have to make this a #. macro. FIXME: Do it cleaner. -#: config/tc-mmix.h:103 +#: config/tc-mmix.h:104 msgid "`&' serial number operator is not supported" msgstr "" @@ -6588,39 +6866,39 @@ msgid "" "none yet\n" msgstr "" -#: config/tc-mn10200.c:793 config/tc-mn10300.c:929 config/tc-ppc.c:1867 -#: config/tc-s390.c:1290 config/tc-v850.c:1636 +#: config/tc-mn10200.c:793 config/tc-mn10300.c:936 config/tc-ppc.c:1883 +#: config/tc-s390.c:1299 config/tc-v850.c:1636 #, c-format msgid "Unrecognized opcode: `%s'" msgstr "" -#: config/tc-mn10200.c:1036 config/tc-mn10300.c:1452 config/tc-ppc.c:2305 -#: config/tc-s390.c:1216 config/tc-v850.c:2060 +#: config/tc-mn10200.c:1036 config/tc-mn10300.c:1459 config/tc-ppc.c:2318 +#: config/tc-s390.c:1224 config/tc-v850.c:2060 #, c-format msgid "junk at end of line: `%s'" msgstr "" -#: config/tc-mn10200.c:1349 config/tc-mn10300.c:2076 config/tc-ppc.c:1299 +#: config/tc-mn10200.c:1349 config/tc-mn10300.c:2083 config/tc-ppc.c:1290 #: config/tc-v850.c:1565 #, c-format msgid "operand out of range (%s not between %ld and %ld)" msgstr "" -#: config/tc-mn10300.c:518 +#: config/tc-mn10300.c:525 msgid "" "MN10300 options:\n" "none yet\n" msgstr "" -#: config/tc-mn10300.c:946 +#: config/tc-mn10300.c:953 msgid "Invalid opcode/operands" msgstr "" -#: config/tc-mn10300.c:1423 +#: config/tc-mn10300.c:1430 msgid "Invalid register specification." msgstr "" -#: config/tc-mn10300.c:1976 +#: config/tc-mn10300.c:1983 #, c-format msgid "Bad relocation fixup type (%d)" msgstr "" @@ -6833,6 +7111,15 @@ msgstr "" msgid "invalid register in & expression" msgstr "" +#: config/tc-pdp11.c:454 +msgid "Low order bits truncated in immediate float operand" +msgstr "" + +#: config/tc-pdp11.c:665 +#, c-format +msgid "Unknown instruction '%s'" +msgstr "" + #: config/tc-pj.c:67 config/tc-pj.c:75 msgid "confusing relocation expressions" msgstr "" @@ -6853,8 +7140,8 @@ msgid "" "-big\t\t\tgenerate big endian code\n" msgstr "" -#: config/tc-pj.c:460 config/tc-sh.c:3454 config/tc-sh.c:3461 -#: config/tc-sh.c:3468 config/tc-sh.c:3475 +#: config/tc-pj.c:460 config/tc-sh.c:3472 config/tc-sh.c:3479 +#: config/tc-sh.c:3486 config/tc-sh.c:3493 msgid "pcrel too far" msgstr "" @@ -6866,27 +7153,28 @@ msgstr "" msgid "estimate size\n" msgstr "" -#: config/tc-ppc.c:990 config/tc-s390.c:378 +#: config/tc-ppc.c:982 config/tc-s390.c:384 #, c-format msgid "invalid switch -m%s" msgstr "" -#: config/tc-ppc.c:1027 +#: config/tc-ppc.c:1019 msgid "" "PowerPC options:\n" "-u\t\t\tignored\n" -"-mpwrx, -mpwr2\t\tgenerate code for IBM POWER/2 (RIOS2)\n" -"-mpwr\t\t\tgenerate code for IBM POWER (RIOS1)\n" -"-m601\t\t\tgenerate code for Motorola PowerPC 601\n" +"-mpwrx, -mpwr2\t\tgenerate code for POWER/2 (RIOS2)\n" +"-mpwr\t\t\tgenerate code for POWER (RIOS1)\n" +"-m601\t\t\tgenerate code for PowerPC 601\n" "-mppc, -mppc32, -m603, -m604\n" -"\t\t\tgenerate code for Motorola PowerPC 603/604\n" -"-m403, -m405 generate code for Motorola PowerPC 403/405\n" +"\t\t\tgenerate code for PowerPC 603/604\n" +"-m403, -m405 generate code for PowerPC 403/405\n" "-m7400, -m7410, -m7450, -m7455\n" -"\t\t\tgenerate code For Motorola PowerPC 7400/7410/7450/7455\n" -"-mppc64, -m620\t\tgenerate code for Motorola PowerPC 620\n" +"\t\t\tgenerate code For PowerPC 7400/7410/7450/7455\n" +"-mppc64, -m620\t\tgenerate code for PowerPC 620/625/630\n" "-mppc64bridge\t\tgenerate code for PowerPC 64, including bridge insns\n" "-mbooke64\t\tgenerate code for 64-bit PowerPC BookE\n" "-mbooke, mbooke32\tgenerate code for 32-bit PowerPC BookE\n" +"-mpower4\t\tgenerate code for Power4 architecture\n" "-maltivec\t\tgenerate code for AltiVec\n" "-mcom\t\t\tgenerate code Power/PowerPC common instructions\n" "-many\t\t\tgenerate code for any architecture (PWR/PWRX/PPC)\n" @@ -6894,7 +7182,7 @@ msgid "" "-mno-regnames\t\tDo not allow symbolic names for registers\n" msgstr "" -#: config/tc-ppc.c:1048 +#: config/tc-ppc.c:1041 msgid "" "-mrelocatable\t\tsupport for GCC's -mrelocatble option\n" "-mrelocatable-lib\tsupport for GCC's -mrelocatble-lib option\n" @@ -6908,216 +7196,216 @@ msgid "" "-Qy, -Qn\t\tignored\n" msgstr "" -#: config/tc-ppc.c:1082 +#: config/tc-ppc.c:1075 #, c-format msgid "Unknown default cpu = %s, os = %s" msgstr "" -#: config/tc-ppc.c:1107 +#: config/tc-ppc.c:1100 msgid "Neither Power nor PowerPC opcodes were selected." msgstr "" -#: config/tc-ppc.c:1190 config/tc-s390.c:471 +#: config/tc-ppc.c:1181 config/tc-s390.c:477 #, c-format msgid "Internal assembler error for instruction %s" msgstr "" -#: config/tc-ppc.c:1210 +#: config/tc-ppc.c:1201 #, c-format msgid "Internal assembler error for macro %s" msgstr "" -#: config/tc-ppc.c:1437 +#: config/tc-ppc.c:1428 msgid "identifier+constant@got means identifier@got+constant" msgstr "" -#: config/tc-ppc.c:1505 +#: config/tc-ppc.c:1495 #, c-format msgid "%s relocations do not fit in %d bytes\n" msgstr "" -#: config/tc-ppc.c:1612 +#: config/tc-ppc.c:1602 #, c-format msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-ppc.c:1694 +#: config/tc-ppc.c:1684 msgid "Relocation cannot be done when using -mrelocatable" msgstr "" -#: config/tc-ppc.c:1794 +#: config/tc-ppc.c:1810 #, c-format msgid "syntax error: invalid toc specifier `%s'" msgstr "" -#: config/tc-ppc.c:1808 +#: config/tc-ppc.c:1824 #, c-format msgid "syntax error: expected `]', found `%c'" msgstr "" -#: config/tc-ppc.c:2044 +#: config/tc-ppc.c:2060 msgid "[tocv] symbol is not a toc symbol" msgstr "" -#: config/tc-ppc.c:2055 +#: config/tc-ppc.c:2071 msgid "Unimplemented toc32 expression modifier" msgstr "" -#: config/tc-ppc.c:2060 +#: config/tc-ppc.c:2076 msgid "Unimplemented toc64 expression modifier" msgstr "" -#: config/tc-ppc.c:2064 +#: config/tc-ppc.c:2080 #, c-format msgid "Unexpected return value [%d] from parse_toc_entry!\n" msgstr "" -#: config/tc-ppc.c:2249 +#: config/tc-ppc.c:2262 msgid "unsupported relocation for DS offset field" msgstr "" -#: config/tc-ppc.c:2293 +#: config/tc-ppc.c:2306 #, c-format msgid "syntax error; found `%c' but expected `%c'" msgstr "" -#: config/tc-ppc.c:2419 +#: config/tc-ppc.c:2430 msgid "wrong number of operands" msgstr "" -#: config/tc-ppc.c:2475 -msgid "Bad .section directive: want a,e,w,x,M,S in string" +#: config/tc-ppc.c:2486 +msgid "Bad .section directive: want a,e,w,x,M,S,G,T in string" msgstr "" -#: config/tc-ppc.c:2590 +#: config/tc-ppc.c:2601 msgid "missing size" msgstr "" -#: config/tc-ppc.c:2599 +#: config/tc-ppc.c:2610 msgid "negative size" msgstr "" -#: config/tc-ppc.c:2636 +#: config/tc-ppc.c:2647 msgid "missing real symbol name" msgstr "" -#: config/tc-ppc.c:2657 +#: config/tc-ppc.c:2668 msgid "attempt to redefine symbol" msgstr "" -#: config/tc-ppc.c:2891 +#: config/tc-ppc.c:2902 msgid "The XCOFF file format does not support arbitrary sections" msgstr "" -#: config/tc-ppc.c:2968 +#: config/tc-ppc.c:2979 msgid "missing rename string" msgstr "" -#: config/tc-ppc.c:2999 config/tc-ppc.c:3554 read.c:3053 +#: config/tc-ppc.c:3010 config/tc-ppc.c:3565 read.c:3058 msgid "missing value" msgstr "" -#: config/tc-ppc.c:3017 +#: config/tc-ppc.c:3028 msgid "illegal .stabx expression; zero assumed" msgstr "" -#: config/tc-ppc.c:3049 +#: config/tc-ppc.c:3060 msgid "missing class" msgstr "" -#: config/tc-ppc.c:3058 +#: config/tc-ppc.c:3069 msgid "missing type" msgstr "" -#: config/tc-ppc.c:3139 +#: config/tc-ppc.c:3150 msgid "missing symbol name" msgstr "" -#: config/tc-ppc.c:3333 +#: config/tc-ppc.c:3344 msgid "nested .bs blocks" msgstr "" -#: config/tc-ppc.c:3366 +#: config/tc-ppc.c:3377 msgid ".es without preceding .bs" msgstr "" -#: config/tc-ppc.c:3546 +#: config/tc-ppc.c:3557 msgid "non-constant byte count" msgstr "" -#: config/tc-ppc.c:3594 +#: config/tc-ppc.c:3605 msgid ".tc not in .toc section" msgstr "" -#: config/tc-ppc.c:3613 +#: config/tc-ppc.c:3624 msgid ".tc with no label" msgstr "" -#: config/tc-ppc.c:3724 +#: config/tc-ppc.c:3735 msgid "No previous section to return to. Directive ignored." msgstr "" #. Section Contents #. unknown -#: config/tc-ppc.c:4141 +#: config/tc-ppc.c:4152 msgid "Unsupported section attribute -- 'a'" msgstr "" -#: config/tc-ppc.c:4330 +#: config/tc-ppc.c:4341 msgid "bad symbol suffix" msgstr "" -#: config/tc-ppc.c:4423 +#: config/tc-ppc.c:4434 msgid "Unrecognized symbol suffix" msgstr "" -#: config/tc-ppc.c:4505 +#: config/tc-ppc.c:4516 msgid "two .function pseudo-ops with no intervening .ef" msgstr "" -#: config/tc-ppc.c:4518 +#: config/tc-ppc.c:4529 msgid ".ef with no preceding .function" msgstr "" -#: config/tc-ppc.c:4646 +#: config/tc-ppc.c:4657 #, c-format msgid "warning: symbol %s has no csect" msgstr "" -#: config/tc-ppc.c:4946 +#: config/tc-ppc.c:4957 msgid "symbol in .toc does not match any .tc" msgstr "" -#: config/tc-ppc.c:5246 config/tc-s390.c:1797 config/tc-v850.c:2331 +#: config/tc-ppc.c:5256 config/tc-s390.c:1809 config/tc-v850.c:2331 #: config/tc-xstormy16.c:536 msgid "unresolved expression that must be resolved" msgstr "" -#: config/tc-ppc.c:5249 +#: config/tc-ppc.c:5259 #, c-format msgid "unsupported relocation against %s" msgstr "" -#: config/tc-ppc.c:5326 +#: config/tc-ppc.c:5334 #, c-format msgid "cannot emit PC relative %s relocation against %s" msgstr "" -#: config/tc-ppc.c:5331 +#: config/tc-ppc.c:5339 #, c-format msgid "cannot emit PC relative %s relocation" msgstr "" -#: config/tc-ppc.c:5454 +#: config/tc-ppc.c:5460 msgid "must branch to an address a multiple of 4" msgstr "" -#: config/tc-ppc.c:5458 +#: config/tc-ppc.c:5464 #, c-format msgid "@local or @plt branch destination is too far away, %ld bytes" msgstr "" -#: config/tc-ppc.c:5491 +#: config/tc-ppc.c:5495 #, c-format msgid "Gas failure, reloc value %d\n" msgstr "" @@ -7128,238 +7416,248 @@ msgid "" " -mregnames Allow symbolic names for registers\n" " -mwarn-areg-zero Warn about zero base/index registers\n" " -mno-regnames Do not allow symbolic names for registers\n" +" -m31 Set file format to 31 bit format\n" +" -m64 Set file format to 64 bit format\n" msgstr "" -#: config/tc-s390.c:426 +#: config/tc-s390.c:428 msgid "" " -V print assembler version number\n" " -Qy, -Qn ignored\n" msgstr "" -#: config/tc-s390.c:456 +#: config/tc-s390.c:462 #, c-format msgid "Internal assembler error for instruction format %s" msgstr "" -#: config/tc-s390.c:652 +#: config/tc-s390.c:658 #, c-format msgid "identifier+constant@%s means identifier@%s+constant" msgstr "" -#: config/tc-s390.c:735 +#: config/tc-s390.c:741 msgid "Can't handle O_big in s390_exp_compare" msgstr "" -#: config/tc-s390.c:819 +#: config/tc-s390.c:825 msgid "Invalid suffix for literal pool entry" msgstr "" -#: config/tc-s390.c:876 +#: config/tc-s390.c:882 msgid "Big number is too big" msgstr "" -#: config/tc-s390.c:964 config/tc-s390.c:1473 +#: config/tc-s390.c:970 config/tc-s390.c:1482 #, c-format msgid "%s relocations do not fit in %d bytes" msgstr "" -#: config/tc-s390.c:974 +#: config/tc-s390.c:980 msgid "relocation not applicable" msgstr "" -#: config/tc-s390.c:1117 +#: config/tc-s390.c:1125 msgid "invalid operand suffix" msgstr "" -#: config/tc-s390.c:1140 +#: config/tc-s390.c:1148 msgid "syntax error; missing '(' after displacement" msgstr "" -#: config/tc-s390.c:1150 config/tc-s390.c:1183 config/tc-s390.c:1202 +#: config/tc-s390.c:1158 config/tc-s390.c:1191 config/tc-s390.c:1210 msgid "syntax error; expected ," msgstr "" -#: config/tc-s390.c:1177 +#: config/tc-s390.c:1185 msgid "syntax error; missing ')' after base register" msgstr "" -#: config/tc-s390.c:1195 +#: config/tc-s390.c:1203 msgid "syntax error; ')' not allowed here" msgstr "" -#: config/tc-s390.c:1353 config/tc-s390.c:1373 config/tc-s390.c:1386 +#: config/tc-s390.c:1362 config/tc-s390.c:1382 config/tc-s390.c:1395 msgid "Invalid .insn format\n" msgstr "" -#: config/tc-s390.c:1361 +#: config/tc-s390.c:1370 #, c-format msgid "Unrecognized opcode format: `%s'" msgstr "" -#: config/tc-s390.c:1389 +#: config/tc-s390.c:1398 msgid "second operand of .insn not a constant\n" msgstr "" -#: config/tc-s390.c:1392 +#: config/tc-s390.c:1401 msgid "missing comma after insn constant\n" msgstr "" -#: config/tc-s390.c:1703 +#: config/tc-s390.c:1715 msgid "unresolved fx_subsy symbol that must be resolved" msgstr "" -#: config/tc-s390.c:1800 +#: config/tc-s390.c:1812 msgid "unsupported relocation type" msgstr "" -#: config/tc-sh.c:91 +#: config/tc-sh.c:90 msgid "directive .big encountered when option -big required" msgstr "" -#: config/tc-sh.c:102 +#: config/tc-sh.c:101 msgid "directive .little encountered when option -little required" msgstr "" -#: config/tc-sh.c:780 +#: config/tc-sh.c:779 msgid "Invalid PIC expression." msgstr "" -#: config/tc-sh.c:809 read.c:3749 +#: config/tc-sh.c:808 read.c:3754 #, c-format msgid "unsupported BFD relocation size %u" msgstr "" -#: config/tc-sh.c:1292 +#: config/tc-sh.c:1277 msgid "misplaced PIC operand" msgstr "" -#: config/tc-sh.c:1333 +#: config/tc-sh.c:1318 msgid "illegal register after @-" msgstr "" -#: config/tc-sh.c:1349 +#: config/tc-sh.c:1334 msgid "must be @(r0,...)" msgstr "" -#: config/tc-sh.c:1373 +#: config/tc-sh.c:1358 msgid "syntax error in @(r0,...)" msgstr "" -#: config/tc-sh.c:1378 +#: config/tc-sh.c:1363 msgid "syntax error in @(r0...)" msgstr "" -#: config/tc-sh.c:1408 config/tc-sh.c:1413 +#: config/tc-sh.c:1404 +msgid "Deprecated syntax." +msgstr "" + +#: config/tc-sh.c:1416 config/tc-sh.c:1421 msgid "syntax error in @(disp,[Rn, gbr, pc])" msgstr "" -#: config/tc-sh.c:1418 +#: config/tc-sh.c:1426 msgid "expecting )" msgstr "" -#: config/tc-sh.c:1426 +#: config/tc-sh.c:1434 msgid "illegal register after @" msgstr "" -#: config/tc-sh.c:1977 +#: config/tc-sh.c:1985 #, c-format msgid "Invalid register: 'r%d'" msgstr "" -#: config/tc-sh.c:2142 +#: config/tc-sh.c:2151 msgid "insn can't be combined with parallel processing insn" msgstr "" -#: config/tc-sh.c:2149 config/tc-sh.c:2160 +#: config/tc-sh.c:2158 config/tc-sh.c:2169 msgid "multiple movx specifications" msgstr "" -#: config/tc-sh.c:2154 config/tc-sh.c:2181 +#: config/tc-sh.c:2163 config/tc-sh.c:2190 msgid "multiple movy specifications" msgstr "" -#: config/tc-sh.c:2162 +#: config/tc-sh.c:2171 msgid "invalid movx address register" msgstr "" -#: config/tc-sh.c:2168 config/tc-sh.c:2173 +#: config/tc-sh.c:2177 config/tc-sh.c:2182 msgid "invalid movx dsp register" msgstr "" -#: config/tc-sh.c:2190 config/tc-sh.c:2195 +#: config/tc-sh.c:2199 config/tc-sh.c:2204 msgid "invalid movy dsp register" msgstr "" -#: config/tc-sh.c:2199 +#: config/tc-sh.c:2208 msgid "invalid movy address register" msgstr "" -#: config/tc-sh.c:2205 +#: config/tc-sh.c:2214 msgid "dsp immediate shift value not constant" msgstr "" -#: config/tc-sh.c:2212 config/tc-sh.c:2225 +#: config/tc-sh.c:2221 config/tc-sh.c:2234 msgid "multiple parallel processing specifications" msgstr "" -#: config/tc-sh.c:2218 +#: config/tc-sh.c:2227 msgid "multiple condition specifications" msgstr "" -#: config/tc-sh.c:2234 +#: config/tc-sh.c:2243 msgid "insn cannot be combined with pmuls" msgstr "" -#: config/tc-sh.c:2251 +#: config/tc-sh.c:2260 msgid "bad padd / psub pmuls output operand" msgstr "" -#: config/tc-sh.c:2261 +#: config/tc-sh.c:2270 +msgid "destination register is same for parallel insns" +msgstr "" + +#: config/tc-sh.c:2279 msgid "condition not followed by conditionalizable insn" msgstr "" -#: config/tc-sh.c:2271 +#: config/tc-sh.c:2289 msgid "unrecognized characters at end of parallel processing insn" msgstr "" -#: config/tc-sh.c:2407 +#: config/tc-sh.c:2425 #, c-format msgid "excess operands: '%s'" msgstr "" -#: config/tc-sh.c:2559 +#: config/tc-sh.c:2577 msgid ".uses pseudo-op seen when not relaxing" msgstr "" -#: config/tc-sh.c:2565 +#: config/tc-sh.c:2583 msgid "bad .uses format" msgstr "" -#: config/tc-sh.c:2640 +#: config/tc-sh.c:2658 msgid "Invalid combination: --isa=SHcompact with --isa=SHmedia" msgstr "" -#: config/tc-sh.c:2646 +#: config/tc-sh.c:2664 msgid "Invalid combination: --isa=SHmedia with --isa=SHcompact" msgstr "" -#: config/tc-sh.c:2648 +#: config/tc-sh.c:2666 msgid "Invalid combination: --abi=64 with --isa=SHcompact" msgstr "" -#: config/tc-sh.c:2659 +#: config/tc-sh.c:2677 msgid "Invalid combination: --abi=32 with --abi=64" msgstr "" -#: config/tc-sh.c:2665 +#: config/tc-sh.c:2683 msgid "Invalid combination: --abi=64 with --abi=32" msgstr "" -#: config/tc-sh.c:2667 +#: config/tc-sh.c:2685 msgid "Invalid combination: --isa=SHcompact with --abi=64" msgstr "" -#: config/tc-sh.c:2702 +#: config/tc-sh.c:2720 msgid "" "SH options:\n" "-little\t\t\tgenerate little endian code\n" @@ -7369,7 +7667,7 @@ msgid "" "-dsp\t\t\tenable sh-dsp insns, and disable sh3e / sh4 insns.\n" msgstr "" -#: config/tc-sh.c:2710 +#: config/tc-sh.c:2728 msgid "" "-isa=[shmedia\t\tset default instruction set for SH64\n" " | SHmedia\n" @@ -7386,57 +7684,57 @@ msgid "" "\t\t\tto 32 bits only" msgstr "" -#: config/tc-sh.c:2807 +#: config/tc-sh.c:2825 msgid ".uses does not refer to a local symbol in the same section" msgstr "" -#: config/tc-sh.c:2826 +#: config/tc-sh.c:2844 msgid "can't find fixup pointed to by .uses" msgstr "" -#: config/tc-sh.c:2849 +#: config/tc-sh.c:2867 msgid ".uses target does not refer to a local symbol in the same section" msgstr "" -#: config/tc-sh.c:2951 +#: config/tc-sh.c:2969 msgid "displacement overflows 12-bit field" msgstr "" -#: config/tc-sh.c:2954 +#: config/tc-sh.c:2972 #, c-format msgid "displacement to defined symbol %s overflows 12-bit field" msgstr "" -#: config/tc-sh.c:2958 +#: config/tc-sh.c:2976 #, c-format msgid "displacement to undefined symbol %s overflows 12-bit field" msgstr "" -#: config/tc-sh.c:3036 +#: config/tc-sh.c:3054 msgid "displacement overflows 8-bit field" msgstr "" -#: config/tc-sh.c:3039 +#: config/tc-sh.c:3057 #, c-format msgid "displacement to defined symbol %s overflows 8-bit field" msgstr "" -#: config/tc-sh.c:3043 +#: config/tc-sh.c:3061 #, c-format msgid "displacement to undefined symbol %s overflows 8-bit field " msgstr "" -#: config/tc-sh.c:3060 +#: config/tc-sh.c:3078 #, c-format msgid "overflow in branch to %s; converted into longer instruction sequence" msgstr "" -#: config/tc-sh.c:3135 config/tc-sh.c:3183 config/tc-sparc.c:4093 -#: config/tc-sparc.c:4118 +#: config/tc-sh.c:3153 config/tc-sh.c:3201 config/tc-sparc.c:4100 +#: config/tc-sparc.c:4125 msgid "misaligned data" msgstr "" -#: config/tc-sh.c:3565 +#: config/tc-sh.c:3583 msgid "misaligned offset" msgstr "" @@ -7585,75 +7883,75 @@ msgstr "" msgid "Invalid argument to .abi: %s" msgstr "" -#: config/tc-sh64.c:2966 +#: config/tc-sh64.c:2984 msgid "-no-mix is invalid without specifying SHcompact or SHmedia" msgstr "" -#: config/tc-sh64.c:2971 +#: config/tc-sh64.c:2989 msgid "-shcompact-const-crange is invalid without SHcompact" msgstr "" -#: config/tc-sh64.c:2974 +#: config/tc-sh64.c:2992 msgid "-expand-pt32 only valid with -abi=64" msgstr "" -#: config/tc-sh64.c:2977 +#: config/tc-sh64.c:2995 msgid "-no-expand only valid with SHcompact or SHmedia" msgstr "" -#: config/tc-sh64.c:2980 +#: config/tc-sh64.c:2998 msgid "-expand-pt32 invalid together with -no-expand" msgstr "" -#: config/tc-sh64.c:3190 +#: config/tc-sh64.c:3215 msgid "" "SHmedia code not allowed in same section as constants and SHcompact code" msgstr "" -#: config/tc-sh64.c:3208 +#: config/tc-sh64.c:3233 msgid "No segment info for current section" msgstr "" -#: config/tc-sh64.c:3250 +#: config/tc-sh64.c:3275 msgid "duplicate datalabel operator ignored" msgstr "" -#: config/tc-sh64.c:3320 +#: config/tc-sh64.c:3345 msgid "Invalid DataLabel expression" msgstr "" -#: config/tc-sparc.c:281 +#: config/tc-sparc.c:287 msgid "Invalid default architecture, broken assembler." msgstr "" -#: config/tc-sparc.c:285 config/tc-sparc.c:488 +#: config/tc-sparc.c:291 config/tc-sparc.c:494 msgid "Bad opcode table, broken assembler." msgstr "" -#: config/tc-sparc.c:480 +#: config/tc-sparc.c:486 #, c-format msgid "invalid architecture -xarch=%s" msgstr "" -#: config/tc-sparc.c:482 +#: config/tc-sparc.c:488 #, c-format msgid "invalid architecture -A%s" msgstr "" -#: config/tc-sparc.c:549 +#: config/tc-sparc.c:555 #, c-format msgid "No compiled in support for %d bit object file format" msgstr "" -#: config/tc-sparc.c:586 +#: config/tc-sparc.c:592 msgid "Unrecognized option following -K" msgstr "" -#: config/tc-sparc.c:627 +#: config/tc-sparc.c:633 msgid "SPARC options:\n" msgstr "" -#: config/tc-sparc.c:656 +#: config/tc-sparc.c:662 msgid "" "\n" "\t\t\tspecify variant of SPARC architecture\n" @@ -7664,34 +7962,34 @@ msgid "" "-no-relax\t\tavoid changing any jumps and branches\n" msgstr "" -#: config/tc-sparc.c:664 +#: config/tc-sparc.c:670 msgid "-k\t\t\tgenerate PIC\n" msgstr "" -#: config/tc-sparc.c:668 +#: config/tc-sparc.c:674 msgid "" "-32\t\t\tcreate 32 bit object file\n" "-64\t\t\tcreate 64 bit object file\n" msgstr "" -#: config/tc-sparc.c:671 +#: config/tc-sparc.c:677 #, c-format msgid "\t\t\t[default is %d]\n" msgstr "" -#: config/tc-sparc.c:673 +#: config/tc-sparc.c:679 msgid "" "-TSO\t\t\tuse Total Store Ordering\n" "-PSO\t\t\tuse Partial Store Ordering\n" "-RMO\t\t\tuse Relaxed Memory Ordering\n" msgstr "" -#: config/tc-sparc.c:677 +#: config/tc-sparc.c:683 #, c-format msgid "\t\t\t[default is %s]\n" msgstr "" -#: config/tc-sparc.c:679 +#: config/tc-sparc.c:685 msgid "" "-KPIC\t\t\tgenerate PIC\n" "-V\t\t\tprint assembler version number\n" @@ -7704,7 +8002,7 @@ msgid "" "-s\t\t\tignored\n" msgstr "" -#: config/tc-sparc.c:691 +#: config/tc-sparc.c:697 msgid "" "-EL\t\t\tgenerate code for a little endian machine\n" "-EB\t\t\tgenerate code for a big endian machine\n" @@ -7712,275 +8010,275 @@ msgid "" " instructions and little endian data.\n" msgstr "" -#: config/tc-sparc.c:811 +#: config/tc-sparc.c:817 #, c-format msgid "Internal error: losing opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-sparc.c:830 +#: config/tc-sparc.c:836 #, c-format msgid "Internal error: can't find opcode `%s' for `%s'\n" msgstr "" -#: config/tc-sparc.c:976 +#: config/tc-sparc.c:982 msgid "Support for 64-bit arithmetic not compiled in." msgstr "" -#: config/tc-sparc.c:1023 +#: config/tc-sparc.c:1029 msgid "set: number not in 0..4294967295 range" msgstr "" -#: config/tc-sparc.c:1030 +#: config/tc-sparc.c:1036 msgid "set: number not in -2147483648..4294967295 range" msgstr "" -#: config/tc-sparc.c:1090 +#: config/tc-sparc.c:1096 msgid "setsw: number not in -2147483648..4294967295 range" msgstr "" -#: config/tc-sparc.c:1139 +#: config/tc-sparc.c:1145 msgid "setx: temporary register same as destination register" msgstr "" -#: config/tc-sparc.c:1210 +#: config/tc-sparc.c:1216 msgid "setx: illegal temporary register g0" msgstr "" -#: config/tc-sparc.c:1307 +#: config/tc-sparc.c:1313 msgid "FP branch in delay slot" msgstr "" -#: config/tc-sparc.c:1323 +#: config/tc-sparc.c:1329 msgid "FP branch preceded by FP instruction; NOP inserted" msgstr "" -#: config/tc-sparc.c:1363 +#: config/tc-sparc.c:1369 msgid "failed special case insn sanity check" msgstr "" -#: config/tc-sparc.c:1451 +#: config/tc-sparc.c:1457 msgid ": invalid membar mask name" msgstr "" -#: config/tc-sparc.c:1467 +#: config/tc-sparc.c:1473 msgid ": invalid membar mask expression" msgstr "" -#: config/tc-sparc.c:1472 +#: config/tc-sparc.c:1478 msgid ": invalid membar mask number" msgstr "" -#: config/tc-sparc.c:1487 +#: config/tc-sparc.c:1493 msgid ": invalid siam mode expression" msgstr "" -#: config/tc-sparc.c:1492 +#: config/tc-sparc.c:1498 msgid ": invalid siam mode number" msgstr "" -#: config/tc-sparc.c:1508 +#: config/tc-sparc.c:1514 msgid ": invalid prefetch function name" msgstr "" -#: config/tc-sparc.c:1516 +#: config/tc-sparc.c:1522 msgid ": invalid prefetch function expression" msgstr "" -#: config/tc-sparc.c:1521 +#: config/tc-sparc.c:1527 msgid ": invalid prefetch function number" msgstr "" -#: config/tc-sparc.c:1549 config/tc-sparc.c:1561 +#: config/tc-sparc.c:1555 config/tc-sparc.c:1567 msgid ": unrecognizable privileged register" msgstr "" -#: config/tc-sparc.c:1585 config/tc-sparc.c:1610 +#: config/tc-sparc.c:1591 config/tc-sparc.c:1616 msgid ": unrecognizable v9a or v9b ancillary state register" msgstr "" -#: config/tc-sparc.c:1590 +#: config/tc-sparc.c:1596 msgid ": rd on write only ancillary state register" msgstr "" #. %sys_tick and %sys_tick_cmpr are v9bnotv9a -#: config/tc-sparc.c:1598 +#: config/tc-sparc.c:1604 msgid ": unrecognizable v9a ancillary state register" msgstr "" -#: config/tc-sparc.c:1634 +#: config/tc-sparc.c:1640 msgid ": asr number must be between 16 and 31" msgstr "" -#: config/tc-sparc.c:1642 +#: config/tc-sparc.c:1648 msgid ": asr number must be between 0 and 31" msgstr "" -#: config/tc-sparc.c:1652 +#: config/tc-sparc.c:1658 msgid ": expecting %asrN" msgstr "" -#: config/tc-sparc.c:1980 +#: config/tc-sparc.c:1986 msgid "detected global register use not covered by .register pseudo-op" msgstr "" -#: config/tc-sparc.c:2051 +#: config/tc-sparc.c:2057 msgid ": There are only 64 f registers; [0-63]" msgstr "" -#: config/tc-sparc.c:2053 config/tc-sparc.c:2065 +#: config/tc-sparc.c:2059 config/tc-sparc.c:2071 msgid ": There are only 32 f registers; [0-31]" msgstr "" -#: config/tc-sparc.c:2183 config/tc-sparc.c:2219 +#: config/tc-sparc.c:2189 config/tc-sparc.c:2225 #, c-format msgid "Illegal operands: %%%s requires arguments in ()" msgstr "" -#: config/tc-sparc.c:2231 +#: config/tc-sparc.c:2237 #, c-format msgid "" "Illegal operands: Can't do arithmetics other than + and - involving %%%s()" msgstr "" -#: config/tc-sparc.c:2341 +#: config/tc-sparc.c:2347 #, c-format msgid "Illegal operands: Can't add non-constant expression to %%%s()" msgstr "" -#: config/tc-sparc.c:2351 +#: config/tc-sparc.c:2357 #, c-format msgid "" "Illegal operands: Can't do arithmetics involving %%%s() of a relocatable " "symbol" msgstr "" -#: config/tc-sparc.c:2369 +#: config/tc-sparc.c:2375 msgid ": PC-relative operand can't be a constant" msgstr "" -#: config/tc-sparc.c:2402 +#: config/tc-sparc.c:2408 msgid ": invalid ASI name" msgstr "" -#: config/tc-sparc.c:2410 +#: config/tc-sparc.c:2416 msgid ": invalid ASI expression" msgstr "" -#: config/tc-sparc.c:2415 +#: config/tc-sparc.c:2421 msgid ": invalid ASI number" msgstr "" -#: config/tc-sparc.c:2512 +#: config/tc-sparc.c:2518 msgid "OPF immediate operand out of range (0-0x1ff)" msgstr "" -#: config/tc-sparc.c:2517 +#: config/tc-sparc.c:2523 msgid "non-immediate OPF operand, ignored" msgstr "" -#: config/tc-sparc.c:2536 +#: config/tc-sparc.c:2542 msgid ": invalid cpreg name" msgstr "" -#: config/tc-sparc.c:2565 +#: config/tc-sparc.c:2571 #, c-format msgid "Illegal operands%s" msgstr "" -#: config/tc-sparc.c:2599 +#: config/tc-sparc.c:2605 #, c-format msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\"" msgstr "" -#: config/tc-sparc.c:2635 +#: config/tc-sparc.c:2641 #, c-format msgid "Architecture mismatch on \"%s\"." msgstr "" -#: config/tc-sparc.c:2636 +#: config/tc-sparc.c:2642 #, c-format msgid " (Requires %s; requested architecture is %s.)" msgstr "" -#: config/tc-sparc.c:3246 +#: config/tc-sparc.c:3253 #, c-format msgid "bad or unhandled relocation type: 0x%02x" msgstr "" -#: config/tc-sparc.c:3384 +#: config/tc-sparc.c:3391 #, c-format msgid "internal error: can't export reloc type %d (`%s')" msgstr "" -#: config/tc-sparc.c:3546 +#: config/tc-sparc.c:3553 #, c-format msgid "BSS length (%d.) <0! Ignored." msgstr "" -#: config/tc-sparc.c:3558 +#: config/tc-sparc.c:3565 msgid "bad .reserve segment -- expected BSS segment" msgstr "" -#: config/tc-sparc.c:3575 read.c:2040 +#: config/tc-sparc.c:3582 read.c:2045 msgid "missing alignment" msgstr "" -#: config/tc-sparc.c:3586 config/tc-sparc.c:3736 +#: config/tc-sparc.c:3593 config/tc-sparc.c:3743 #, c-format msgid "alignment too large; assuming %d" msgstr "" -#: config/tc-sparc.c:3592 config/tc-sparc.c:3742 +#: config/tc-sparc.c:3599 config/tc-sparc.c:3749 msgid "negative alignment" msgstr "" -#: config/tc-sparc.c:3602 config/tc-sparc.c:3765 read.c:1249 read.c:2056 +#: config/tc-sparc.c:3609 config/tc-sparc.c:3772 read.c:1249 read.c:2061 msgid "alignment not a power of 2" msgstr "" -#: config/tc-sparc.c:3680 config/tc-v850.c:231 +#: config/tc-sparc.c:3687 config/tc-v850.c:231 msgid "Expected comma after symbol-name" msgstr "" -#: config/tc-sparc.c:3708 config/tc-v850.c:264 +#: config/tc-sparc.c:3715 config/tc-v850.c:264 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %d." msgstr "" -#: config/tc-sparc.c:3722 +#: config/tc-sparc.c:3729 msgid "Expected comma after common length" msgstr "" -#: config/tc-sparc.c:3963 config/tc-sparc.c:3973 +#: config/tc-sparc.c:3970 config/tc-sparc.c:3980 #, c-format msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}" msgstr "" -#: config/tc-sparc.c:3991 +#: config/tc-sparc.c:3998 msgid "redefinition of global register" msgstr "" -#: config/tc-sparc.c:4002 +#: config/tc-sparc.c:4009 #, c-format msgid "Register symbol %s already defined." msgstr "" -#: config/tc-sparc.c:4211 +#: config/tc-sparc.c:4218 #, c-format msgid "Illegal operands: %%r_plt in %d-byte data field" msgstr "" -#: config/tc-sparc.c:4248 +#: config/tc-sparc.c:4255 #, c-format msgid "Illegal operands: Only %%r_%s%d allowed in %d-byte data fields" msgstr "" -#: config/tc-sparc.c:4256 config/tc-sparc.c:4287 config/tc-sparc.c:4296 +#: config/tc-sparc.c:4263 config/tc-sparc.c:4294 config/tc-sparc.c:4303 #, c-format msgid "Illegal operands: %%r_%s%d requires arguments in ()" msgstr "" -#: config/tc-sparc.c:4305 +#: config/tc-sparc.c:4312 #, c-format msgid "Illegal operands: garbage after %%r_%s%d()" msgstr "" @@ -7997,25 +8295,25 @@ msgstr "" msgid "The -a option doesn't exist. (Despite what the man page says!" msgstr "" -#: config/tc-tahoe.c:407 config/tc-vax.c:3125 +#: config/tc-tahoe.c:407 config/tc-vax.c:3286 #, c-format msgid "Displacement length %s ignored!" msgstr "" -#: config/tc-tahoe.c:411 config/tc-vax.c:3117 +#: config/tc-tahoe.c:411 config/tc-vax.c:3278 msgid "SYMBOL TABLE not implemented" msgstr "" -#: config/tc-tahoe.c:415 config/tc-vax.c:3121 +#: config/tc-tahoe.c:415 config/tc-vax.c:3282 msgid "TOKEN TRACE not implemented" msgstr "" -#: config/tc-tahoe.c:419 config/tc-vax.c:3129 +#: config/tc-tahoe.c:419 config/tc-vax.c:3290 #, c-format msgid "I don't need or use temp. file \"%s\"." msgstr "" -#: config/tc-tahoe.c:423 config/tc-vax.c:3133 +#: config/tc-tahoe.c:423 config/tc-vax.c:3294 msgid "I don't use an interpass file! -V ignored" msgstr "" @@ -8183,15 +8481,15 @@ msgstr "" msgid "Compiler bug: ODD number of bytes in arg structure %s." msgstr "" -#: config/tc-tahoe.c:1567 config/tc-vax.c:1835 +#: config/tc-tahoe.c:1567 config/tc-vax.c:1963 msgid "Not enough operands" msgstr "" -#: config/tc-tahoe.c:1577 config/tc-vax.c:1842 +#: config/tc-tahoe.c:1577 config/tc-vax.c:1970 msgid "Too many operands" msgstr "" -#: config/tc-tahoe.c:1628 config/tc-vax.c:378 +#: config/tc-tahoe.c:1628 config/tc-vax.c:403 #, c-format msgid "Ignoring statement due to \"%s\"" msgstr "" @@ -8217,461 +8515,461 @@ msgstr "" #. Only word (et al.), align, or conditionals are allowed within #. .struct/.union. -#: config/tc-tic54x.c:80 +#: config/tc-tic54x.c:224 msgid "pseudo-op illegal within .struct/.union" msgstr "" -#: config/tc-tic54x.c:89 +#: config/tc-tic54x.c:349 msgid "C54x-specific command line options:\n" msgstr "" -#: config/tc-tic54x.c:90 +#: config/tc-tic54x.c:350 msgid "-mfar-mode | -mf Use extended addressing\n" msgstr "" -#: config/tc-tic54x.c:91 +#: config/tc-tic54x.c:351 msgid "-mcpu=<CPU version> Specify the CPU version\n" msgstr "" -#: config/tc-tic54x.c:93 +#: config/tc-tic54x.c:353 msgid "-mcoff-version={0|1|2} Select COFF version\n" msgstr "" -#: config/tc-tic54x.c:95 +#: config/tc-tic54x.c:355 msgid "-merrors-to-file <filename>\n" msgstr "" -#: config/tc-tic54x.c:96 +#: config/tc-tic54x.c:356 msgid "-me <filename> Redirect errors to a file\n" msgstr "" -#: config/tc-tic54x.c:348 +#: config/tc-tic54x.c:478 msgid "Comma and symbol expected for '.asg STRING, SYMBOL'" msgstr "" -#: config/tc-tic54x.c:401 +#: config/tc-tic54x.c:532 msgid "Unterminated string after absolute expression" msgstr "" -#: config/tc-tic54x.c:409 +#: config/tc-tic54x.c:540 msgid "Comma and symbol expected for '.eval EXPR, SYMBOL'" msgstr "" -#: config/tc-tic54x.c:421 +#: config/tc-tic54x.c:552 msgid "symbols assigned with .eval must begin with a letter" msgstr "" -#: config/tc-tic54x.c:675 +#: config/tc-tic54x.c:810 msgid "Offset on nested structures is ignored" msgstr "" -#: config/tc-tic54x.c:725 +#: config/tc-tic54x.c:861 #, c-format msgid ".end%s without preceding .%s" msgstr "" -#: config/tc-tic54x.c:791 +#: config/tc-tic54x.c:928 #, c-format msgid "Unrecognized struct/union tag '%s'" msgstr "" -#: config/tc-tic54x.c:793 +#: config/tc-tic54x.c:930 msgid ".tag requires a structure tag" msgstr "" -#: config/tc-tic54x.c:799 +#: config/tc-tic54x.c:936 msgid "Label required for .tag" msgstr "" -#: config/tc-tic54x.c:817 +#: config/tc-tic54x.c:955 #, c-format msgid ".tag target '%s' undefined" msgstr "" -#: config/tc-tic54x.c:879 +#: config/tc-tic54x.c:1018 #, c-format msgid ".field count '%d' out of range (1 <= X <= 32)" msgstr "" -#: config/tc-tic54x.c:909 +#: config/tc-tic54x.c:1046 #, c-format msgid "Unrecognized field type '%c'" msgstr "" #. Disallow .byte with a non constant expression that will #. require relocation. -#: config/tc-tic54x.c:1044 +#: config/tc-tic54x.c:1183 msgid "Relocatable values require at least WORD storage" msgstr "" -#: config/tc-tic54x.c:1105 +#: config/tc-tic54x.c:1245 msgid "Use of .def/.ref is deprecated. Use .global instead" msgstr "" -#: config/tc-tic54x.c:1298 +#: config/tc-tic54x.c:1444 msgid ".space/.bes repeat count is negative, ignored" msgstr "" -#: config/tc-tic54x.c:1303 +#: config/tc-tic54x.c:1449 msgid ".space/.bes repeat count is zero, ignored" msgstr "" -#: config/tc-tic54x.c:1380 +#: config/tc-tic54x.c:1527 msgid "Missing size argument" msgstr "" -#: config/tc-tic54x.c:1514 +#: config/tc-tic54x.c:1664 msgid "CPU version has already been set" msgstr "" -#: config/tc-tic54x.c:1518 +#: config/tc-tic54x.c:1668 #, c-format msgid "Unrecognized version '%s'" msgstr "" -#: config/tc-tic54x.c:1524 +#: config/tc-tic54x.c:1674 msgid "Changing of CPU version on the fly not supported" msgstr "" -#: config/tc-tic54x.c:1657 +#: config/tc-tic54x.c:1810 msgid "p2align not supported on this target" msgstr "" -#: config/tc-tic54x.c:1669 +#: config/tc-tic54x.c:1823 msgid "Argument to .even ignored" msgstr "" -#: config/tc-tic54x.c:1715 +#: config/tc-tic54x.c:1870 msgid "Invalid field size, must be from 1 to 32" msgstr "" -#: config/tc-tic54x.c:1728 +#: config/tc-tic54x.c:1883 msgid "field size must be 16 when value is relocatable" msgstr "" -#: config/tc-tic54x.c:1742 +#: config/tc-tic54x.c:1898 msgid "field value truncated" msgstr "" -#: config/tc-tic54x.c:1846 config/tc-tic54x.c:2148 +#: config/tc-tic54x.c:2007 config/tc-tic54x.c:2324 #, c-format msgid "Unrecognized section '%s'" msgstr "" -#: config/tc-tic54x.c:1855 +#: config/tc-tic54x.c:2016 msgid "Current section is unitialized, section name required for .clink" msgstr "" -#: config/tc-tic54x.c:2061 +#: config/tc-tic54x.c:2230 msgid "ENDLOOP without corresponding LOOP" msgstr "" -#: config/tc-tic54x.c:2101 +#: config/tc-tic54x.c:2274 msgid "Mixing of normal and extended addressing not supported" msgstr "" -#: config/tc-tic54x.c:2107 +#: config/tc-tic54x.c:2280 msgid "Extended addressing not supported on the specified CPU" msgstr "" -#: config/tc-tic54x.c:2154 +#: config/tc-tic54x.c:2330 msgid ".sblock may be used for initialized sections only" msgstr "" -#: config/tc-tic54x.c:2184 +#: config/tc-tic54x.c:2361 msgid "Symbol missing for .set/.equ" msgstr "" -#: config/tc-tic54x.c:2240 +#: config/tc-tic54x.c:2420 msgid ".var may only be used within a macro definition" msgstr "" -#: config/tc-tic54x.c:2248 +#: config/tc-tic54x.c:2428 msgid "Substitution symbols must begin with a letter" msgstr "" -#: config/tc-tic54x.c:2338 +#: config/tc-tic54x.c:2522 #, c-format msgid "Can't open macro library file '%s' for reading." msgstr "" -#: config/tc-tic54x.c:2345 +#: config/tc-tic54x.c:2529 #, c-format msgid "File '%s' not in macro archive format" msgstr "" -#: config/tc-tic54x.c:2504 +#: config/tc-tic54x.c:2689 #, c-format msgid "Bad COFF version '%s'" msgstr "" -#: config/tc-tic54x.c:2513 +#: config/tc-tic54x.c:2698 #, c-format msgid "Bad CPU version '%s'" msgstr "" -#: config/tc-tic54x.c:2525 config/tc-tic54x.c:2528 +#: config/tc-tic54x.c:2711 config/tc-tic54x.c:2714 #, c-format msgid "Can't redirect stderr to the file '%s'" msgstr "" -#: config/tc-tic54x.c:2662 +#: config/tc-tic54x.c:2861 #, c-format msgid "Undefined substitution symbol '%s'" msgstr "" -#: config/tc-tic54x.c:3335 +#: config/tc-tic54x.c:3518 msgid "Badly formed address expression" msgstr "" -#: config/tc-tic54x.c:3593 +#: config/tc-tic54x.c:3782 #, c-format msgid "Invalid dmad syntax '%s'" msgstr "" -#: config/tc-tic54x.c:3658 +#: config/tc-tic54x.c:3848 #, c-format msgid "" "Use the .mmregs directive to use memory-mapped register names such as '%s'" msgstr "" -#: config/tc-tic54x.c:3710 +#: config/tc-tic54x.c:3901 msgid "Address mode *+ARx is write-only. Results of reading are undefined." msgstr "" -#: config/tc-tic54x.c:3730 +#: config/tc-tic54x.c:3921 #, c-format msgid "Unrecognized indirect address format \"%s\"" msgstr "" -#: config/tc-tic54x.c:3765 +#: config/tc-tic54x.c:3960 #, c-format msgid "Operand '%s' out of range (%d <= x <= %d)" msgstr "" -#: config/tc-tic54x.c:3785 +#: config/tc-tic54x.c:3980 msgid "Error in relocation handling" msgstr "" -#: config/tc-tic54x.c:3804 config/tc-tic54x.c:3866 config/tc-tic54x.c:3892 +#: config/tc-tic54x.c:4001 config/tc-tic54x.c:4065 config/tc-tic54x.c:4097 #, c-format msgid "Unrecognized condition code \"%s\"" msgstr "" -#: config/tc-tic54x.c:3821 +#: config/tc-tic54x.c:4018 #, c-format msgid "Condition \"%s\" does not match preceding group" msgstr "" -#: config/tc-tic54x.c:3829 +#: config/tc-tic54x.c:4026 #, c-format msgid "" "Condition \"%s\" uses a different accumulator from a preceding condition" msgstr "" -#: config/tc-tic54x.c:3836 +#: config/tc-tic54x.c:4033 msgid "Only one comparison conditional allowed" msgstr "" -#: config/tc-tic54x.c:3841 +#: config/tc-tic54x.c:4038 msgid "Only one overflow conditional allowed" msgstr "" -#: config/tc-tic54x.c:3849 +#: config/tc-tic54x.c:4046 #, c-format msgid "Duplicate %s conditional" msgstr "" -#: config/tc-tic54x.c:3879 +#: config/tc-tic54x.c:4081 msgid "Invalid auxiliary register (use AR0-AR7)" msgstr "" -#: config/tc-tic54x.c:3912 +#: config/tc-tic54x.c:4117 msgid "lk addressing modes are invalid for memory-mapped register addressing" msgstr "" -#: config/tc-tic54x.c:3920 +#: config/tc-tic54x.c:4125 msgid "" "Address mode *+ARx is not allowed in memory-mapped register addressing. " "Resulting behavior is undefined." msgstr "" -#: config/tc-tic54x.c:3946 +#: config/tc-tic54x.c:4151 msgid "" "Destination accumulator for each part of this parallel instruction must be " "different" msgstr "" -#: config/tc-tic54x.c:3995 +#: config/tc-tic54x.c:4200 #, c-format msgid "Memory mapped register \"%s\" out of range" msgstr "" -#: config/tc-tic54x.c:4034 +#: config/tc-tic54x.c:4239 msgid "Invalid operand (use 1, 2, or 3)" msgstr "" -#: config/tc-tic54x.c:4059 +#: config/tc-tic54x.c:4264 msgid "A status register or status bit name is required" msgstr "" -#: config/tc-tic54x.c:4069 +#: config/tc-tic54x.c:4274 #, c-format msgid "Unrecognized status bit \"%s\"" msgstr "" -#: config/tc-tic54x.c:4092 +#: config/tc-tic54x.c:4297 #, c-format msgid "Invalid status register \"%s\"" msgstr "" -#: config/tc-tic54x.c:4104 +#: config/tc-tic54x.c:4309 #, c-format msgid "Operand \"%s\" out of range (use 1 or 2)" msgstr "" -#: config/tc-tic54x.c:4305 +#: config/tc-tic54x.c:4517 #, c-format msgid "Unrecognized instruction \"%s\"" msgstr "" -#: config/tc-tic54x.c:4334 +#: config/tc-tic54x.c:4546 #, c-format msgid "Unrecognized operand list '%s' for instruction '%s'" msgstr "" -#: config/tc-tic54x.c:4363 +#: config/tc-tic54x.c:4578 #, c-format msgid "Unrecognized parallel instruction \"%s\"" msgstr "" -#: config/tc-tic54x.c:4413 +#: config/tc-tic54x.c:4629 #, c-format msgid "Invalid operand (s) for parallel instruction \"%s\"" msgstr "" -#: config/tc-tic54x.c:4416 +#: config/tc-tic54x.c:4632 #, c-format msgid "Unrecognized parallel instruction combination \"%s || %s\"" msgstr "" -#: config/tc-tic54x.c:4648 +#: config/tc-tic54x.c:4869 #, c-format msgid "%s symbol recursion stopped at second appearance of '%s'" msgstr "" -#: config/tc-tic54x.c:4687 +#: config/tc-tic54x.c:4909 msgid "Unrecognized substitution symbol function" msgstr "" -#: config/tc-tic54x.c:4692 +#: config/tc-tic54x.c:4914 msgid "Missing '(' after substitution symbol function" msgstr "" -#: config/tc-tic54x.c:4706 +#: config/tc-tic54x.c:4928 msgid "Expecting second argument" msgstr "" -#: config/tc-tic54x.c:4719 config/tc-tic54x.c:4768 +#: config/tc-tic54x.c:4941 config/tc-tic54x.c:4991 msgid "Extra junk in function call, expecting ')'" msgstr "" -#: config/tc-tic54x.c:4744 +#: config/tc-tic54x.c:4967 msgid "Function expects two arguments" msgstr "" -#: config/tc-tic54x.c:4757 +#: config/tc-tic54x.c:4980 msgid "Expecting character constant argument" msgstr "" -#: config/tc-tic54x.c:4763 +#: config/tc-tic54x.c:4986 msgid "Both arguments must be substitution symbols" msgstr "" -#: config/tc-tic54x.c:4816 +#: config/tc-tic54x.c:5039 #, c-format msgid "Invalid subscript (use 1 to %d)" msgstr "" -#: config/tc-tic54x.c:4826 +#: config/tc-tic54x.c:5049 #, c-format msgid "Invalid length (use 0 to %d" msgstr "" -#: config/tc-tic54x.c:4836 +#: config/tc-tic54x.c:5059 msgid "Missing ')' in subscripted substitution symbol expression" msgstr "" -#: config/tc-tic54x.c:4856 +#: config/tc-tic54x.c:5079 msgid "Missing forced substitution terminator ':'" msgstr "" -#: config/tc-tic54x.c:5029 +#: config/tc-tic54x.c:5252 #, c-format msgid "" "Instruction does not fit in available delay slots (%d-word insn, %d slots " "left)" msgstr "" -#: config/tc-tic54x.c:5070 +#: config/tc-tic54x.c:5293 #, c-format msgid "Unrecognized parallel instruction '%s'" msgstr "" -#: config/tc-tic54x.c:5082 +#: config/tc-tic54x.c:5305 #, c-format msgid "Instruction '%s' requires an LP cpu version" msgstr "" -#: config/tc-tic54x.c:5089 +#: config/tc-tic54x.c:5312 #, c-format msgid "Instruction '%s' requires far mode addressing" msgstr "" -#: config/tc-tic54x.c:5101 +#: config/tc-tic54x.c:5324 #, c-format msgid "" "Instruction does not fit in available delay slots (%d-word insn, %d slots " "left). Resulting behavior is undefined." msgstr "" -#: config/tc-tic54x.c:5111 +#: config/tc-tic54x.c:5334 msgid "" "Instructions which cause PC discontinuity are not allowed in a delay slot. " "Resulting behavior is undefined." msgstr "" -#: config/tc-tic54x.c:5122 +#: config/tc-tic54x.c:5345 #, c-format msgid "'%s' is not repeatable. Resulting behavior is undefined." msgstr "" -#: config/tc-tic54x.c:5126 +#: config/tc-tic54x.c:5349 msgid "" "Instructions using long offset modifiers or absolute addresses are not " "repeatable. Resulting behavior is undefined." msgstr "" -#: config/tc-tic54x.c:5317 +#: config/tc-tic54x.c:5545 #, c-format msgid "Unsupported relocation size %d" msgstr "" -#: config/tc-tic54x.c:5471 +#: config/tc-tic54x.c:5699 msgid "non-absolute value used with .space/.bes" msgstr "" -#: config/tc-tic54x.c:5475 +#: config/tc-tic54x.c:5703 #, c-format msgid "negative value ignored in %s" msgstr "" -#: config/tc-tic54x.c:5562 +#: config/tc-tic54x.c:5792 #, c-format msgid "attempt to .space/.bes backwards? (%ld)" msgstr "" -#: config/tc-tic54x.c:5595 +#: config/tc-tic54x.c:5826 #, c-format msgid "Invalid label '%s'" msgstr "" @@ -8908,180 +9206,184 @@ msgstr "" msgid "invalid operand" msgstr "" -#: config/tc-vax.c:267 +#: config/tc-vax.c:285 #, c-format msgid "VIP_BEGIN error:%s" msgstr "" -#: config/tc-vax.c:397 +#: config/tc-vax.c:422 #, c-format -msgid "Ignoring statement because \"%s\"" +msgid "Aborting because statement has \"%s\"" msgstr "" -#: config/tc-vax.c:444 +#: config/tc-vax.c:469 msgid "Can't relocate expression" msgstr "" -#: config/tc-vax.c:547 +#: config/tc-vax.c:572 msgid "Bignum not permitted in short literal. Immediate mode assumed." msgstr "" -#: config/tc-vax.c:556 +#: config/tc-vax.c:581 msgid "Can't do flonum short literal: immediate mode used." msgstr "" -#: config/tc-vax.c:601 +#: config/tc-vax.c:626 #, c-format msgid "A bignum/flonum may not be a displacement: 0x%lx used" msgstr "" -#: config/tc-vax.c:922 +#: config/tc-vax.c:961 #, c-format msgid "Short literal overflow(%ld.), immediate mode assumed." msgstr "" -#: config/tc-vax.c:931 +#: config/tc-vax.c:970 #, c-format msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s" msgstr "" -#: config/tc-vax.c:990 +#: config/tc-vax.c:1035 msgid "Length specification ignored. Address mode 9F used" msgstr "" -#: config/tc-vax.c:1039 +#: config/tc-vax.c:1096 msgid "Invalid operand: immediate value used as base address." msgstr "" -#: config/tc-vax.c:1041 +#: config/tc-vax.c:1098 msgid "Invalid operand: immediate value used as address." msgstr "" -#: config/tc-vax.c:1814 +#: config/tc-vax.c:1123 +msgid "Symbol used as immediate operand in PIC mode." +msgstr "" + +#: config/tc-vax.c:1942 msgid "odd number of bytes in operand description" msgstr "" -#: config/tc-vax.c:1830 +#: config/tc-vax.c:1958 msgid "Bad operand" msgstr "" -#: config/tc-vax.c:2383 +#: config/tc-vax.c:2533 msgid "no '[' to match ']'" msgstr "" -#: config/tc-vax.c:2401 +#: config/tc-vax.c:2553 msgid "bad register in []" msgstr "" -#: config/tc-vax.c:2403 +#: config/tc-vax.c:2555 msgid "[PC] index banned" msgstr "" -#: config/tc-vax.c:2438 +#: config/tc-vax.c:2590 msgid "no '(' to match ')'" msgstr "" -#: config/tc-vax.c:2573 +#: config/tc-vax.c:2730 msgid "invalid branch operand" msgstr "" -#: config/tc-vax.c:2602 +#: config/tc-vax.c:2759 msgid "address prohibits @" msgstr "" -#: config/tc-vax.c:2604 +#: config/tc-vax.c:2761 msgid "address prohibits #" msgstr "" -#: config/tc-vax.c:2608 +#: config/tc-vax.c:2765 msgid "address prohibits -()" msgstr "" -#: config/tc-vax.c:2610 +#: config/tc-vax.c:2767 msgid "address prohibits ()+" msgstr "" -#: config/tc-vax.c:2613 +#: config/tc-vax.c:2770 msgid "address prohibits ()" msgstr "" -#: config/tc-vax.c:2615 +#: config/tc-vax.c:2772 msgid "address prohibits []" msgstr "" -#: config/tc-vax.c:2617 +#: config/tc-vax.c:2774 msgid "address prohibits register" msgstr "" -#: config/tc-vax.c:2619 +#: config/tc-vax.c:2776 msgid "address prohibits displacement length specifier" msgstr "" -#: config/tc-vax.c:2649 +#: config/tc-vax.c:2806 msgid "invalid operand of S^#" msgstr "" -#: config/tc-vax.c:2666 +#: config/tc-vax.c:2823 msgid "S^# needs expression" msgstr "" -#: config/tc-vax.c:2673 +#: config/tc-vax.c:2830 msgid "S^# may only read-access" msgstr "" -#: config/tc-vax.c:2698 +#: config/tc-vax.c:2855 msgid "invalid operand of -()" msgstr "" -#: config/tc-vax.c:2704 +#: config/tc-vax.c:2861 msgid "-(PC) unpredictable" msgstr "" -#: config/tc-vax.c:2706 +#: config/tc-vax.c:2863 msgid "[]index same as -()register: unpredictable" msgstr "" -#: config/tc-vax.c:2742 +#: config/tc-vax.c:2899 msgid "invalid operand of ()+" msgstr "" -#: config/tc-vax.c:2748 +#: config/tc-vax.c:2905 msgid "(PC)+ unpredictable" msgstr "" -#: config/tc-vax.c:2750 +#: config/tc-vax.c:2907 msgid "[]index same as ()+register: unpredictable" msgstr "" -#: config/tc-vax.c:2775 +#: config/tc-vax.c:2932 msgid "# conflicts length" msgstr "" -#: config/tc-vax.c:2777 +#: config/tc-vax.c:2934 msgid "# bars register" msgstr "" -#: config/tc-vax.c:2799 +#: config/tc-vax.c:2956 msgid "writing or modifying # is unpredictable" msgstr "" -#: config/tc-vax.c:2829 +#: config/tc-vax.c:2986 msgid "length not needed" msgstr "" -#: config/tc-vax.c:2836 +#: config/tc-vax.c:2993 msgid "can't []index a register, because it has no address" msgstr "" -#: config/tc-vax.c:2838 +#: config/tc-vax.c:2995 msgid "a register has no address" msgstr "" -#: config/tc-vax.c:2849 +#: config/tc-vax.c:3006 msgid "PC part of operand unpredictable" msgstr "" -#: config/tc-vax.c:3178 +#: config/tc-vax.c:3346 msgid "" "VAX options:\n" "-d LENGTH\t\tignored\n" @@ -9092,7 +9394,7 @@ msgid "" "-V\t\t\tignored\n" msgstr "" -#: config/tc-vax.c:3187 +#: config/tc-vax.c:3355 msgid "" "VMS options:\n" "-+\t\t\thash encode names longer than 31 characters\n" @@ -9181,27 +9483,27 @@ msgstr "" msgid "immediate 1 or 2 expected" msgstr "" -#: config/tc-z8k.c:1089 +#: config/tc-z8k.c:1090 msgid "can't use R0 here" msgstr "" -#: config/tc-z8k.c:1243 +#: config/tc-z8k.c:1250 msgid "Can't find opcode to match operands" msgstr "" -#: config/tc-z8k.c:1358 +#: config/tc-z8k.c:1366 #, c-format msgid "invalid architecture -z%s" msgstr "" -#: config/tc-z8k.c:1374 +#: config/tc-z8k.c:1382 msgid "" "Z8K options:\n" "-z8001\t\t\tgenerate segmented code\n" "-z8002\t\t\tgenerate unsegmented code\n" msgstr "" -#: config/tc-z8k.c:1523 +#: config/tc-z8k.c:1530 #, c-format msgid "Can't subtract symbols in different sections %s %s" msgstr "" @@ -9216,21 +9518,21 @@ msgstr "" msgid "can't close `%s'" msgstr "" -#: dwarf2dbg.c:353 dwarf2dbg.c:395 +#: dwarf2dbg.c:375 dwarf2dbg.c:419 msgid "file number less than one" msgstr "" -#: dwarf2dbg.c:359 +#: dwarf2dbg.c:381 #, c-format msgid "file number %ld already allocated" msgstr "" -#: dwarf2dbg.c:400 dwarf2dbg.c:946 +#: dwarf2dbg.c:424 dwarf2dbg.c:973 #, c-format msgid "unassigned file number %ld" msgstr "" -#: dwarf2dbg.c:1284 dwarf2dbg.c:1292 dwarf2dbg.c:1300 dwarf2dbg.c:1320 +#: dwarf2dbg.c:1311 dwarf2dbg.c:1319 dwarf2dbg.c:1327 dwarf2dbg.c:1347 msgid "dwarf2 is not supported for this object file format" msgstr "" @@ -9245,7 +9547,7 @@ msgid "inserting \"%s\" into string hash table: %s" msgstr "" #: ecoff.c:1614 ecoff.c:1808 ecoff.c:1833 ecoff.c:1865 ecoff.c:2019 -#: ecoff.c:2133 +#: ecoff.c:2132 msgid "no current file pointer" msgstr "" @@ -9253,202 +9555,202 @@ msgstr "" msgid "too many st_End's" msgstr "" -#: ecoff.c:2045 +#: ecoff.c:2044 #, c-format msgid "inserting \"%s\" into tag hash table: %s" msgstr "" -#: ecoff.c:2211 +#: ecoff.c:2210 msgid "fake .file after real one" msgstr "" -#: ecoff.c:2301 +#: ecoff.c:2300 msgid "filename goes over one page boundary" msgstr "" -#: ecoff.c:2436 +#: ecoff.c:2435 msgid ".begin directive without a preceding .file directive" msgstr "" -#: ecoff.c:2443 +#: ecoff.c:2442 msgid ".begin directive without a preceding .ent directive" msgstr "" -#: ecoff.c:2475 +#: ecoff.c:2474 msgid ".bend directive without a preceding .file directive" msgstr "" -#: ecoff.c:2482 +#: ecoff.c:2481 msgid ".bend directive without a preceding .ent directive" msgstr "" -#: ecoff.c:2495 +#: ecoff.c:2494 msgid ".bend directive names unknown symbol" msgstr "" -#: ecoff.c:2539 +#: ecoff.c:2538 msgid ".def pseudo-op used inside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2541 +#: ecoff.c:2540 msgid "empty symbol name in .def; ignored" msgstr "" -#: ecoff.c:2579 +#: ecoff.c:2578 msgid ".dim pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2594 +#: ecoff.c:2593 msgid "badly formed .dim directive" msgstr "" -#: ecoff.c:2607 +#: ecoff.c:2606 msgid "too many .dim entries" msgstr "" -#: ecoff.c:2628 +#: ecoff.c:2627 msgid ".scl pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2654 +#: ecoff.c:2653 msgid ".size pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2669 +#: ecoff.c:2668 msgid "badly formed .size directive" msgstr "" -#: ecoff.c:2682 +#: ecoff.c:2681 msgid "too many .size entries" msgstr "" -#: ecoff.c:2705 +#: ecoff.c:2704 msgid ".type pseudo-op used outside of .def/.endef; ignored" msgstr "" #. FIXME: We could handle this by setting the continued bit. #. There would still be a limit: the .type argument can not #. be infinite. -#: ecoff.c:2723 +#: ecoff.c:2722 #, c-format msgid "the type of %s is too complex; it will be simplified" msgstr "" -#: ecoff.c:2734 +#: ecoff.c:2733 msgid "Unrecognized .type argument" msgstr "" -#: ecoff.c:2773 +#: ecoff.c:2772 msgid ".tag pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2800 +#: ecoff.c:2798 msgid ".val pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2808 +#: ecoff.c:2806 msgid ".val expression is too copmlex" msgstr "" -#: ecoff.c:2839 +#: ecoff.c:2837 msgid ".endef pseudo-op used before .def; ignored" msgstr "" -#: ecoff.c:2865 ecoff.c:2946 +#: ecoff.c:2863 ecoff.c:2944 msgid "bad COFF debugging information" msgstr "" -#: ecoff.c:2914 +#: ecoff.c:2912 #, c-format msgid "no tag specified for %s" msgstr "" -#: ecoff.c:3017 +#: ecoff.c:3015 msgid ".end directive without a preceding .file directive" msgstr "" -#: ecoff.c:3024 +#: ecoff.c:3022 msgid ".end directive without a preceding .ent directive" msgstr "" -#: ecoff.c:3046 +#: ecoff.c:3044 msgid ".end directive names unknown symbol" msgstr "" -#: ecoff.c:3074 +#: ecoff.c:3072 msgid "second .ent directive found before .end directive" msgstr "" -#: ecoff.c:3148 +#: ecoff.c:3146 msgid "no way to handle .file within .ent/.end section" msgstr "" -#: ecoff.c:3173 +#: ecoff.c:3171 msgid ".fmask outside of .ent" msgstr "" -#: ecoff.c:3180 +#: ecoff.c:3178 msgid "bad .fmask directive" msgstr "" -#: ecoff.c:3213 +#: ecoff.c:3211 msgid "bad .frame directive" msgstr "" -#: ecoff.c:3243 +#: ecoff.c:3241 msgid ".mask outside of .ent" msgstr "" -#: ecoff.c:3250 +#: ecoff.c:3248 msgid "bad .mask directive" msgstr "" -#: ecoff.c:3273 +#: ecoff.c:3271 msgid ".loc before .file" msgstr "" -#: ecoff.c:3412 +#: ecoff.c:3410 msgid "bad .weakext directive" msgstr "" -#: ecoff.c:3481 +#: ecoff.c:3479 #, c-format msgid ".stab%c is not supported" msgstr "" -#: ecoff.c:3491 +#: ecoff.c:3489 #, c-format msgid ".stab%c: ignoring non-zero other field" msgstr "" -#: ecoff.c:3525 +#: ecoff.c:3523 #, c-format msgid "" "line number (%d) for .stab%c directive cannot fit in index field (20 bits)" msgstr "" -#: ecoff.c:3561 +#: ecoff.c:3559 #, c-format msgid "illegal .stab%c directive, bad character" msgstr "" -#: ecoff.c:4023 ecoff.c:4212 ecoff.c:4237 +#: ecoff.c:4021 ecoff.c:4210 ecoff.c:4235 msgid ".begin/.bend in different segments" msgstr "" -#: ecoff.c:4739 +#: ecoff.c:4737 msgid "missing .end or .bend at end of file" msgstr "" -#: ecoff.c:5229 +#: ecoff.c:5227 msgid "GP prologue size exceeds field size, using 0 instead" msgstr "" -#: expr.c:84 read.c:3225 +#: expr.c:84 read.c:3230 msgid "bignum invalid" msgstr "" -#: expr.c:86 read.c:3227 read.c:3560 read.c:4459 +#: expr.c:86 read.c:3232 read.c:3565 read.c:4464 msgid "floating point number invalid" msgstr "" @@ -9492,7 +9794,7 @@ msgstr "" msgid "missing '%c'" msgstr "" -#: expr.c:1024 read.c:3930 +#: expr.c:1024 read.c:3935 msgid "EBCDIC constants are not supported" msgstr "" @@ -9525,7 +9827,7 @@ msgstr "" msgid "right operand is a float; integer 0 assumed" msgstr "" -#: expr.c:1780 symbols.c:1121 +#: expr.c:1780 symbols.c:1136 msgid "division by zero" msgstr "" @@ -9546,273 +9848,273 @@ msgstr "" msgid "attempt to allocate data in common section" msgstr "" -#: gasp.c:452 +#: gasp.c:456 msgid "redefinition not allowed\n" msgstr "" -#: gasp.c:521 +#: gasp.c:525 #, c-format msgid "the %c operator cannot take non-absolute arguments.\n" msgstr "" -#: gasp.c:596 +#: gasp.c:656 msgid "string where expression expected.\n" msgstr "" -#: gasp.c:602 +#: gasp.c:662 msgid "can't find primary in expression.\n" msgstr "" -#: gasp.c:640 +#: gasp.c:700 msgid "misplaced closing parens.\n" msgstr "" -#: gasp.c:677 +#: gasp.c:737 msgid "attempt to divide by zero.\n" msgstr "" -#: gasp.c:708 +#: gasp.c:768 msgid "can't add two relocatable expressions\n" msgstr "" -#: gasp.c:916 +#: gasp.c:976 msgid "unreasonable nesting.\n" msgstr "" -#: gasp.c:994 +#: gasp.c:1054 msgid "End of file not at start of line.\n" msgstr "" -#: gasp.c:1115 +#: gasp.c:1175 #, c-format msgid "Illegal base character %c.\n" msgstr "" -#: gasp.c:1229 +#: gasp.c:1293 #, c-format msgid "radix is %c must be one of b, q, d or h" msgstr "" -#: gasp.c:1264 +#: gasp.c:1328 #, c-format msgid "size must be one of b, w or l, is %c.\n" msgstr "" -#: gasp.c:1372 +#: gasp.c:1436 msgid "datab repeat must be constant.\n" msgstr "" -#: gasp.c:1374 +#: gasp.c:1438 msgid "datab data must be absolute.\n" msgstr "" -#: gasp.c:1388 +#: gasp.c:1452 msgid "align needs absolute expression.\n" msgstr "" -#: gasp.c:1395 +#: gasp.c:1459 msgid ".align needs absolute fill value.\n" msgstr "" -#: gasp.c:1423 +#: gasp.c:1487 msgid "res needs absolute expression for fill count.\n" msgstr "" -#: gasp.c:1504 +#: gasp.c:1568 msgid "form LIN= needs absolute expresssion.\n" msgstr "" -#: gasp.c:1507 +#: gasp.c:1571 msgid "COL=" msgstr "" -#: gasp.c:1510 +#: gasp.c:1574 msgid "form COL= needs absolute expresssion.\n" msgstr "" #. Turns the next expression into a string. -#: gasp.c:1553 macro.c:382 +#: gasp.c:1617 macro.c:382 #, no-c-format msgid "% operator needs absolute expression" msgstr "" -#: gasp.c:1615 +#: gasp.c:1679 msgid "misplaced ( .\n" msgstr "" -#: gasp.c:1630 +#: gasp.c:1694 msgid "misplaced ).\n" msgstr "" -#: gasp.c:1682 +#: gasp.c:1746 msgid ".instr needs absolute expresson.\n" msgstr "" -#: gasp.c:1719 +#: gasp.c:1783 msgid "need absolute position.\n" msgstr "" -#: gasp.c:1721 +#: gasp.c:1785 msgid "need absolute length.\n" msgstr "" -#: gasp.c:1967 +#: gasp.c:2031 msgid "END missing from end of file.\n" msgstr "" -#: gasp.c:1993 +#: gasp.c:2057 msgid ".ASSIGNA needs constant expression argument.\n" msgstr "" -#: gasp.c:1997 +#: gasp.c:2061 msgid ".ASSIGNA without label.\n" msgstr "" -#: gasp.c:2022 +#: gasp.c:2086 msgid ".ASSIGNS without label.\n" msgstr "" -#: gasp.c:2086 +#: gasp.c:2150 #, c-format msgid "Can't find preprocessor variable %s.\n" msgstr "" -#: gasp.c:2151 +#: gasp.c:2215 msgid "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n" msgstr "" -#: gasp.c:2186 +#: gasp.c:2250 msgid "Comparison operator for strings must be EQ or NE\n" msgstr "" -#: gasp.c:2198 gasp.c:2208 gasp.c:2311 +#: gasp.c:2262 gasp.c:2272 gasp.c:2375 msgid "Conditional operator must have absolute operands.\n" msgstr "" -#: gasp.c:2203 +#: gasp.c:2267 msgid "String compared against expression.\n" msgstr "" -#: gasp.c:2254 +#: gasp.c:2318 msgid "AIF nesting unreasonable.\n" msgstr "" -#: gasp.c:2269 +#: gasp.c:2333 msgid "Multiple AELSEs in AIF.\n" msgstr "" -#: gasp.c:2285 +#: gasp.c:2349 msgid "AENDI without AIF.\n" msgstr "" -#: gasp.c:2308 gasp.c:2390 +#: gasp.c:2372 gasp.c:2454 msgid "IF nesting unreasonable.\n" msgstr "" -#: gasp.c:2400 +#: gasp.c:2464 msgid "Bad format for IF or IFNC.\n" msgstr "" -#: gasp.c:2421 +#: gasp.c:2485 msgid "AENDR without a AREPEAT.\n" msgstr "" -#: gasp.c:2423 +#: gasp.c:2487 msgid "ENDR without a REPT.\n" msgstr "" -#: gasp.c:2445 +#: gasp.c:2509 #, c-format msgid "AWHILE without a AENDW at %d.\n" msgstr "" -#: gasp.c:2482 +#: gasp.c:2546 msgid "AENDW without a AENDW.\n" msgstr "" -#: gasp.c:2526 +#: gasp.c:2590 msgid "AREPEAT must have absolute operand.\n" msgstr "" -#: gasp.c:2532 +#: gasp.c:2596 #, c-format msgid "AREPEAT without a AENDR at %d.\n" msgstr "" -#: gasp.c:2574 +#: gasp.c:2638 msgid ".ENDM without a matching .MACRO.\n" msgstr "" -#: gasp.c:2608 +#: gasp.c:2672 msgid "LOCAL outside of MACRO" msgstr "" -#: gasp.c:2621 +#: gasp.c:2685 #, c-format msgid "macro at line %d: %s\n" msgstr "" -#: gasp.c:2644 +#: gasp.c:2708 msgid "macro expansion" msgstr "" -#: gasp.c:2698 +#: gasp.c:2762 msgid "Character code in string must be absolute expression.\n" msgstr "" -#: gasp.c:2703 +#: gasp.c:2767 msgid "Missing > for character code.\n" msgstr "" -#: gasp.c:2762 +#: gasp.c:2826 #, c-format msgid "string for SDATAC longer than 255 characters (%d).\n" msgstr "" -#: gasp.c:2791 +#: gasp.c:2855 #, c-format msgid "illegal character in SDATA line (0x%x).\n" msgstr "" -#: gasp.c:2813 +#: gasp.c:2877 msgid "Must have absolute SDATAB repeat count.\n" msgstr "" -#: gasp.c:2816 +#: gasp.c:2880 #, c-format msgid "Must have positive SDATAB repeat count (%d).\n" msgstr "" -#: gasp.c:2844 +#: gasp.c:2908 #, c-format msgid "Unreasonable include depth (%ld).\n" msgstr "" -#: gasp.c:2898 +#: gasp.c:2962 #, c-format msgid "Can't open include file `%s'.\n" msgstr "" -#: gasp.c:2972 +#: gasp.c:3036 msgid "Unreasonable expansion (-u turns off check).\n" msgstr "" #. This one causes lots of pain when trying to preprocess #. ordinary code. -#: gasp.c:3186 +#: gasp.c:3250 #, c-format msgid "Unrecognised pseudo op `%s'.\n" msgstr "" -#: gasp.c:3255 +#: gasp.c:3319 msgid "ORG command not allowed.\n" msgstr "" -#: gasp.c:3468 +#: gasp.c:3532 msgid "Invalid expression on command line.\n" msgstr "" -#: gasp.c:3511 +#: gasp.c:3575 #, c-format msgid "" "Usage: %s \n" @@ -9825,7 +10127,7 @@ msgid "" " [-p] [--print] print line numbers\n" msgstr "" -#: gasp.c:3520 +#: gasp.c:3584 msgid "" " [-s] [--copysource] copy source through as comments \n" " [-u] [--unreasonable] allow unreasonable nesting\n" @@ -9836,37 +10138,37 @@ msgid "" " [in-file]\n" msgstr "" -#: gasp.c:3537 +#: gasp.c:3601 #, c-format msgid "%s: Gnu Assembler Macro Preprocessor\n" msgstr "" #. This output is intended to follow the GNU standards document. -#: gasp.c:3625 +#: gasp.c:3689 #, c-format msgid "GNU assembler pre-processor %s\n" msgstr "" -#: gasp.c:3626 +#: gasp.c:3690 msgid "Copyright 1996 Free Software Foundation, Inc.\n" msgstr "" -#: gasp.c:3649 +#: gasp.c:3713 #, c-format msgid "%s: Can't open output file `%s'.\n" msgstr "" -#: gasp.c:3673 +#: gasp.c:3737 #, c-format msgid "%s: Can't open input file `%s'.\n" msgstr "" -#: gasp.c:3692 +#: gasp.c:3756 #, c-format msgid "Internal error, aborting at %s line %d" msgstr "" -#: gasp.c:3695 +#: gasp.c:3759 msgid "" "\n" "Please report this bug.\n" @@ -9883,7 +10185,7 @@ msgstr "" #. line here (assuming of course that we actually have a line of #. input to read), so that it can be displayed in the listing #. that is produced at the end of the assembly. -#: input-file.c:145 input-scrub.c:242 listing.c:344 +#: input-file.c:145 input-scrub.c:242 listing.c:343 msgid "{standard input}" msgstr "" @@ -9922,21 +10224,21 @@ msgstr "" msgid "Error:" msgstr "" -#: listing.c:1131 +#: listing.c:1130 #, c-format msgid "can't open list file: %s" msgstr "" -#: listing.c:1155 +#: listing.c:1154 #, c-format msgid "error closing list file: %s" msgstr "" -#: listing.c:1234 +#: listing.c:1233 msgid "strange paper height, set to no form" msgstr "" -#: listing.c:1300 +#: listing.c:1299 msgid "new line in title" msgstr "" @@ -10067,7 +10369,7 @@ msgstr "" msgid ".abort detected. Abandoning ship." msgstr "" -#: read.c:1172 read.c:2406 +#: read.c:1172 read.c:2411 msgid "ignoring fill value in absolute section" msgstr "" @@ -10080,11 +10382,11 @@ msgstr "" msgid "expected fill pattern missing" msgstr "" -#: read.c:1368 read.c:1968 read.c:2176 read.c:2788 +#: read.c:1368 read.c:1973 read.c:2181 read.c:2793 msgid "expected symbol name" msgstr "" -#: read.c:1378 read.c:2186 read.c:2798 stabs.c:472 +#: read.c:1378 read.c:2191 read.c:2803 stabs.c:480 #, c-format msgid "expected comma after \"%s\"" msgstr "" @@ -10101,299 +10403,307 @@ msgstr "" #. Some of the back ends can't deal with non-positive line numbers. #. Besides, it's silly. -#: read.c:1628 +#: read.c:1633 #, c-format msgid "line numbers must be positive; line number %d rejected" msgstr "" -#: read.c:1656 +#: read.c:1661 msgid "start address not supported" msgstr "" -#: read.c:1666 +#: read.c:1671 msgid ".err encountered" msgstr "" -#: read.c:1685 read.c:1687 +#: read.c:1690 read.c:1692 #, c-format msgid ".fail %ld encountered" msgstr "" -#: read.c:1724 +#: read.c:1729 #, c-format msgid ".fill size clamped to %d" msgstr "" -#: read.c:1729 +#: read.c:1734 msgid "size negative; .fill ignored" msgstr "" -#: read.c:1735 +#: read.c:1740 msgid "repeat < 0; .fill ignored" msgstr "" -#: read.c:1895 +#: read.c:1900 #, c-format msgid "unrecognized .linkonce type `%s'" msgstr "" -#: read.c:1908 read.c:1934 +#: read.c:1913 read.c:1939 msgid ".linkonce is not supported for this object file format" msgstr "" -#: read.c:1930 +#: read.c:1935 #, c-format msgid "bfd_set_section_flags: %s" msgstr "" -#: read.c:1985 +#: read.c:1990 msgid "missing size expression" msgstr "" -#: read.c:1991 +#: read.c:1996 #, c-format msgid "BSS length (%d) < 0 ignored" msgstr "" -#: read.c:2007 +#: read.c:2012 #, c-format msgid "error setting flags for \".sbss\": %s" msgstr "" -#: read.c:2030 +#: read.c:2035 msgid "expected comma after size" msgstr "" -#: read.c:2064 +#: read.c:2069 #, c-format msgid "alignment too large; %d assumed" msgstr "" -#: read.c:2069 +#: read.c:2074 msgid "alignment negative; 0 assumed" msgstr "" -#: read.c:2335 +#: read.c:2340 #, c-format msgid "attempt to redefine pseudo-op `%s' ignored" msgstr "" -#: read.c:2401 +#: read.c:2406 #, c-format msgid "invalid segment \"%s\"" msgstr "" -#: read.c:2409 +#: read.c:2414 msgid "only constant offsets supported in absolute section" msgstr "" -#: read.c:2449 +#: read.c:2454 msgid "MRI style ORG pseudo-op not supported" msgstr "" -#: read.c:2606 +#: read.c:2611 #, c-format msgid "unrecognized section type `%s'" msgstr "" -#: read.c:2620 +#: read.c:2625 msgid "absolute sections are not supported" msgstr "" -#: read.c:2635 +#: read.c:2640 #, c-format msgid "unrecognized section command `%s'" msgstr "" -#: read.c:2701 +#: read.c:2706 msgid ".endr encountered without preceeding .rept, .irc, or .irp" msgstr "" -#: read.c:2733 +#: read.c:2738 #, c-format msgid "%s without %s" msgstr "" -#: read.c:2942 +#: read.c:2947 msgid "unsupported variable size or fill value" msgstr "" -#: read.c:2967 +#: read.c:2972 msgid ".space repeat count is zero, ignored" msgstr "" -#: read.c:2969 +#: read.c:2974 msgid ".space repeat count is negative, ignored" msgstr "" -#: read.c:2998 +#: read.c:3003 msgid "space allocation too complex in absolute section" msgstr "" -#: read.c:3004 +#: read.c:3009 msgid "space allocation too complex in common section" msgstr "" -#: read.c:3092 read.c:4175 +#: read.c:3097 read.c:4180 #, c-format msgid "bad floating literal: %s" msgstr "" -#: read.c:3165 +#: read.c:3170 #, c-format msgid "rest of line ignored; first ignored character is `%c'" msgstr "" -#: read.c:3168 +#: read.c:3173 #, c-format msgid "rest of line ignored; first ignored character valued 0x%x" msgstr "" -#: read.c:3221 +#: read.c:3226 msgid "missing expression" msgstr "" -#: read.c:3392 +#: read.c:3397 msgid "rva without symbol" msgstr "" -#: read.c:3516 +#: read.c:3521 msgid "attempt to store value in absolute section" msgstr "" -#: read.c:3554 read.c:4453 +#: read.c:3559 read.c:4458 msgid "zero assumed for missing expression" msgstr "" -#: read.c:3566 read.c:4465 write.c:293 +#: read.c:3571 read.c:4470 write.c:293 msgid "register value used as expression" msgstr "" #. Leading bits contain both 0s & 1s. -#: read.c:3656 +#: read.c:3661 #, c-format msgid "value 0x%lx truncated to 0x%lx" msgstr "" -#: read.c:3672 +#: read.c:3677 #, c-format msgid "bignum truncated to %d bytes" msgstr "" -#: read.c:3839 +#: read.c:3844 msgid "using a bit field width of zero" msgstr "" -#: read.c:3847 +#: read.c:3852 #, c-format msgid "field width \"%s\" too complex for a bitfield" msgstr "" -#: read.c:3855 +#: read.c:3860 #, c-format msgid "field width %lu too big to fit in %d bytes: truncated to %d bits" msgstr "" -#: read.c:3877 +#: read.c:3882 #, c-format msgid "field value \"%s\" too complex for a bitfield" msgstr "" -#: read.c:4003 read.c:4197 +#: read.c:4008 read.c:4202 msgid "unresolvable or nonpositive repeat count; using 1" msgstr "" -#: read.c:4054 +#: read.c:4059 #, c-format msgid "unknown floating type type '%c'" msgstr "" -#: read.c:4076 +#: read.c:4081 msgid "floating point constant too large" msgstr "" -#: read.c:4607 +#: read.c:4612 msgid "expected <nn>" msgstr "" #. To be compatible with BSD 4.2 as: give the luser a linefeed!! -#: read.c:4640 read.c:4726 +#: read.c:4645 read.c:4731 msgid "unterminated string; newline inserted" msgstr "" -#: read.c:4734 +#: read.c:4739 msgid "bad escaped character in string" msgstr "" -#: read.c:4760 +#: read.c:4765 msgid "expected address expression" msgstr "" -#: read.c:4780 +#: read.c:4785 #, c-format msgid "symbol \"%s\" undefined; zero assumed" msgstr "" -#: read.c:4783 +#: read.c:4788 msgid "some symbol undefined; zero assumed" msgstr "" -#: read.c:4801 +#: read.c:4806 msgid "bad or irreducible absolute expression" msgstr "" -#: read.c:4836 +#: read.c:4841 msgid "this string may not contain '\\0'" msgstr "" -#: read.c:4873 +#: read.c:4878 msgid "missing string" msgstr "" -#: read.c:4996 +#: read.c:5001 #, c-format msgid ".incbin count zero, ignoring `%s'" msgstr "" -#: read.c:5022 +#: read.c:5027 #, c-format msgid "file not found: %s" msgstr "" -#: read.c:5036 +#: read.c:5041 #, c-format msgid "seek to end of .incbin file failed `%s'" msgstr "" -#: read.c:5047 +#: read.c:5052 #, c-format msgid "skip (%ld) + count (%ld) larger than file size (%ld)" msgstr "" -#: read.c:5054 +#: read.c:5059 #, c-format msgid "could not skip to %ld in file `%s'" msgstr "" -#: read.c:5063 +#: read.c:5068 #, c-format msgid "truncated file `%s', %ld of %ld bytes read" msgstr "" -#: read.c:5226 +#: read.c:5231 msgid "missing .func" msgstr "" -#: read.c:5243 +#: read.c:5248 msgid ".endfunc missing for previous .func" msgstr "" -#: stabs.c:220 stabs.c:228 stabs.c:236 stabs.c:247 +#: stabs.c:220 stabs.c:228 stabs.c:236 stabs.c:255 #, c-format msgid ".stab%c: missing comma" msgstr "" -#: stabs.c:427 +#. This could happen for example with a source file with a huge +#. number of lines. The only cure is to use a different debug +#. format, probably DWARF. +#: stabs.c:248 +#, c-format +msgid ".stab%c: description field '%x' too big, try a different debug format" +msgstr "" + +#: stabs.c:435 msgid "comma missing in .xstabs" msgstr "" @@ -10412,51 +10722,51 @@ msgstr "" msgid "inserting \"%s\" into symbol table failed: %s" msgstr "" -#: symbols.c:873 +#: symbols.c:880 #, c-format msgid "symbol definition loop encountered at `%s'" msgstr "" -#: symbols.c:1082 symbols.c:1086 +#: symbols.c:1094 symbols.c:1098 #, c-format msgid "undefined symbol `%s' in operation" msgstr "" -#: symbols.c:1091 +#: symbols.c:1103 msgid "invalid section for operation" msgstr "" -#: symbols.c:1096 symbols.c:1100 +#: symbols.c:1108 symbols.c:1112 #, c-format msgid "undefined symbol `%s' in operation setting `%s'" msgstr "" -#: symbols.c:1105 +#: symbols.c:1117 #, c-format msgid "invalid section for operation setting `%s'" msgstr "" -#: symbols.c:1123 +#: symbols.c:1138 #, c-format msgid "division by zero when setting `%s'" msgstr "" -#: symbols.c:1202 write.c:2009 +#: symbols.c:1225 write.c:2028 #, c-format msgid "can't resolve value for symbol `%s'" msgstr "" -#: symbols.c:1596 +#: symbols.c:1619 #, c-format msgid "\"%d\" (instance number %d of a %s label)" msgstr "" -#: symbols.c:1633 +#: symbols.c:1656 #, c-format msgid "attempt to get value of unresolved symbol `%s'" msgstr "" -#: symbols.c:1869 +#: symbols.c:1892 msgid "section symbols are already global" msgstr "" @@ -10474,88 +10784,88 @@ msgstr "" msgid "attempt to .org/.space backwards? (%ld)" msgstr "" -#: write.c:1029 +#: write.c:1044 msgid "relocation out of range" msgstr "" -#: write.c:1032 +#: write.c:1047 #, c-format msgid "%s:%u: bad return from bfd_install_relocation: %x" msgstr "" -#: write.c:1076 +#: write.c:1091 msgid "internal error: fixup not contained within frag" msgstr "" -#: write.c:1092 +#: write.c:1107 #, c-format msgid "%s:%u: bad return from bfd_install_relocation" msgstr "" -#: write.c:1179 write.c:1203 +#: write.c:1194 write.c:1218 #, c-format msgid "FATAL: Can't write %s" msgstr "" -#: write.c:1235 +#: write.c:1250 msgid "cannot write to output file" msgstr "" -#: write.c:1484 +#: write.c:1503 #, c-format msgid "%d error%s, %d warning%s, generating bad object file" msgstr "" -#: write.c:1491 +#: write.c:1510 #, c-format msgid "%d error%s, %d warning%s, no object file generated" msgstr "" -#: write.c:1947 +#: write.c:1966 #, c-format msgid "local label `%s' is not defined" msgstr "" -#: write.c:2245 +#: write.c:2264 #, c-format msgid "alignment padding (%lu bytes) not a multiple of %ld" msgstr "" -#: write.c:2362 +#: write.c:2381 #, c-format msgid ".word %s-%s+%s didn't fit" msgstr "" -#: write.c:2447 +#: write.c:2466 msgid "attempt to .org backwards" msgstr "" -#: write.c:2475 +#: write.c:2494 msgid ".space specifies non-absolute value" msgstr "" -#: write.c:2482 +#: write.c:2501 msgid ".space or .fill with negative value, ignored" msgstr "" -#: write.c:2656 +#: write.c:2675 #, c-format msgid "negative of non-absolute symbol `%s'" msgstr "" -#: write.c:2750 +#: write.c:2769 #, c-format msgid "" "subtraction of two symbols in different sections `%s' {%s section} - `%s' {%" "s section} at file address %s" msgstr "" -#: write.c:2886 +#: write.c:2905 #, c-format msgid "value of %s too large for field of %d bytes at %s" msgstr "" -#: write.c:2898 +#: write.c:2917 #, c-format msgid "signed .word overflow; switch may be too large; %ld at 0x%lx" msgstr "" diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c index b0446c8d..934d270 100644 --- a/contrib/binutils/gas/read.c +++ b/contrib/binutils/gas/read.c @@ -45,7 +45,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ecoff.h" #ifndef TC_START_LABEL -#define TC_START_LABEL(x,y) (x==':') +#define TC_START_LABEL(x,y) (x == ':') #endif /* Set by the object-format or the target. */ @@ -1572,6 +1572,20 @@ s_data (ignore) .file. */ void +s_app_file_string (file) + char *file; +{ +#ifdef LISTING + if (listing) + listing_source_file (file); +#endif + register_dependency (file); +#ifdef obj_app_file + obj_app_file (file); +#endif +} + +void s_app_file (appfile) int appfile; { @@ -1596,16 +1610,7 @@ s_app_file (appfile) demand_empty_rest_of_line (); if (!may_omit) - { -#ifdef LISTING - if (listing) - listing_source_file (s); -#endif - register_dependency (s); -#ifdef obj_app_file - obj_app_file (s); -#endif - } + s_app_file_string (s); } } @@ -4559,6 +4564,15 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */ { c = ','; /* Do loop. */ } + /* If we have been switched into the abs_section then we + will not have an obstack onto which we can hang strings. */ + if (now_seg == absolute_section) + { + as_bad (_("strings must be placed into a section")); + c = 0; + ignore_rest_of_line (); + } + while (c == ',' || c == '<' || c == '"') { SKIP_WHITESPACE (); diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h index 60b4bed..f57126d 100644 --- a/contrib/binutils/gas/read.h +++ b/contrib/binutils/gas/read.h @@ -137,6 +137,7 @@ extern void generate_lineno_debug PARAMS ((void)); extern void s_abort PARAMS ((int)) ATTRIBUTE_NORETURN; extern void s_align_bytes PARAMS ((int arg)); extern void s_align_ptwo PARAMS ((int)); +extern void s_app_file_string PARAMS ((char *)); extern void s_app_file PARAMS ((int)); extern void s_app_line PARAMS ((int)); extern void s_bad_endr PARAMS ((int)); diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c index c692c2c..38bbc24 100644 --- a/contrib/binutils/gas/stabs.c +++ b/contrib/binutils/gas/stabs.c @@ -247,7 +247,7 @@ s_stab_generic (what, stab_secname, stabstr_secname) format, probably DWARF. */ as_warn (_(".stab%c: description field '%x' too big, try a different debug format"), what, desc); - + if (what == 's' || what == 'n') { if (*input_line_pointer != ',') @@ -351,7 +351,7 @@ s_stab_generic (what, stab_secname, stabstr_secname) if (what == 's') { /* Release the string, if nobody else has used the obstack. */ - if (saved_string_obstack_end == notes.next_free) + if (saved_string_obstack_end == notes.next_free) obstack_free (¬es, string); } @@ -588,7 +588,7 @@ stabs_generate_asm_lineno () unsigned int lineno; char *buf; char sym[30]; - /* Remember the last file/line and avoid duplicates. */ + /* Remember the last file/line and avoid duplicates. */ static unsigned int prev_lineno = -1; static char *prev_file = NULL; @@ -601,22 +601,22 @@ stabs_generate_asm_lineno () as_where (&file, &lineno); - /* Don't emit sequences of stabs for the same line. */ + /* Don't emit sequences of stabs for the same line. */ if (prev_file == NULL) { - /* First time thru. */ + /* First time thru. */ prev_file = xstrdup (file); prev_lineno = lineno; } else if (lineno == prev_lineno && strcmp (file, prev_file) == 0) { - /* Same file/line as last time. */ + /* Same file/line as last time. */ return; } else { - /* Remember file/line for next time. */ + /* Remember file/line for next time. */ prev_lineno = lineno; if (strcmp (file, prev_file) != 0) { diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c index c815953..99d2a8b 100644 --- a/contrib/binutils/gas/subsegs.c +++ b/contrib/binutils/gas/subsegs.c @@ -652,7 +652,7 @@ subsegs_print_statistics (file) count++; } fprintf (file, "\n"); - fprintf (file, "\t%p %-10s\t%10d frags\n", frchp, + fprintf (file, "\t%p %-10s\t%10d frags\n", (void *) frchp, segment_name (frchp->frch_seg), count); } } diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c index 5a55fca..63b4d47 100644 --- a/contrib/binutils/gas/symbols.c +++ b/contrib/binutils/gas/symbols.c @@ -1,6 +1,6 @@ /* symbols.c -symbol table- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001 + 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -439,9 +439,9 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */ #ifdef BFD_ASSEMBLER if (OUTPUT_FLAVOR == bfd_target_aout_flavour) #endif - sprintf(od_buf, "%d.%d.", - S_GET_OTHER (symbolP), - S_GET_DESC (symbolP)); + sprintf (od_buf, "%d.%d.", + S_GET_OTHER (symbolP), + S_GET_DESC (symbolP)); #endif as_bad (_("symbol `%s' is already defined as \"%s\"/%s%ld"), sym_name, @@ -569,7 +569,7 @@ symbol_find_or_make (name) symbolS * symbol_make (name) - CONST char *name; + const char *name; { symbolS *symbolP; @@ -589,7 +589,7 @@ symbol_make (name) symbolS * symbol_find (name) - CONST char *name; + const char *name; { #ifdef STRIP_UNDERSCORE return (symbol_find_base (name, 1)); @@ -599,8 +599,25 @@ symbol_find (name) } symbolS * +symbol_find_exact (name) + const char *name; +{ +#ifdef BFD_ASSEMBLER + { + struct local_symbol *locsym; + + locsym = (struct local_symbol *) hash_find (local_hash, name); + if (locsym != NULL) + return (symbolS *) locsym; + } +#endif + + return ((symbolS *) hash_find (sy_hash, name)); +} + +symbolS * symbol_find_base (name, strip_underscore) - CONST char *name; + const char *name; int strip_underscore; { if (strip_underscore && *name == '_') @@ -633,17 +650,7 @@ symbol_find_base (name, strip_underscore) *copy = '\0'; } -#ifdef BFD_ASSEMBLER - { - struct local_symbol *locsym; - - locsym = (struct local_symbol *) hash_find (local_hash, name); - if (locsym != NULL) - return (symbolS *) locsym; - } -#endif - - return ((symbolS *) hash_find (sy_hash, name)); + return symbol_find_exact (name); } /* Once upon a time, symbols were kept in a singly linked list. At @@ -832,7 +839,7 @@ resolve_symbol_value (symp) symbolS *symp; { int resolved; - valueT final_val; + valueT final_val = 0; segT final_seg; #ifdef BFD_ASSEMBLER @@ -1816,7 +1823,7 @@ S_IS_STABD (s) return S_GET_NAME (s) == 0; } -CONST char * +const char * S_GET_NAME (s) symbolS *s; { @@ -1878,7 +1885,7 @@ S_SET_EXTERNAL (s) { char * file; unsigned int line; - + /* Do not reassign section symbols. */ as_where (& file, & line); as_warn_where (file, line, @@ -2398,7 +2405,7 @@ print_symbol_value_1 (file, sym) segT s = S_GET_SEGMENT (sym); if (s != undefined_section - && s != expr_section) + && s != expr_section) fprintf (file, " %lx", (long) S_GET_VALUE (sym)); } else if (indent_level < max_indent_level diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h index a80ca8c..2fb0439 100644 --- a/contrib/binutils/gas/symbols.h +++ b/contrib/binutils/gas/symbols.h @@ -1,6 +1,6 @@ /* symbols.h - - Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001 - Free Software Foundation, Inc. + Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, + 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -48,13 +48,14 @@ extern int symbol_table_frozen; extern int symbols_case_sensitive; char *decode_local_label_name PARAMS ((char *s)); -symbolS *symbol_find PARAMS ((CONST char *name)); -symbolS *symbol_find_base PARAMS ((CONST char *name, int strip_underscore)); +symbolS *symbol_find PARAMS ((const char *name)); +symbolS *symbol_find_exact PARAMS ((const char *name)); +symbolS *symbol_find_base PARAMS ((const char *name, int strip_underscore)); symbolS *symbol_find_or_make PARAMS ((const char *name)); -symbolS *symbol_make PARAMS ((CONST char *name)); -symbolS *symbol_new PARAMS ((CONST char *name, segT segment, valueT value, +symbolS *symbol_make PARAMS ((const char *name)); +symbolS *symbol_new PARAMS ((const char *name, segT segment, valueT value, fragS * frag)); -symbolS *symbol_create PARAMS ((CONST char *name, segT segment, valueT value, +symbolS *symbol_create PARAMS ((const char *name, segT segment, valueT value, fragS * frag)); symbolS *colon PARAMS ((const char *sym_name)); void local_colon PARAMS ((int n)); @@ -93,7 +94,7 @@ extern int S_IS_DEBUG PARAMS ((symbolS *)); extern int S_IS_LOCAL PARAMS ((symbolS *)); extern int S_IS_EXTERN PARAMS ((symbolS *)); extern int S_IS_STABD PARAMS ((symbolS *)); -extern CONST char *S_GET_NAME PARAMS ((symbolS *)); +extern const char *S_GET_NAME PARAMS ((symbolS *)); extern segT S_GET_SEGMENT PARAMS ((symbolS *)); extern void S_SET_SEGMENT PARAMS ((symbolS *, segT)); extern void S_SET_EXTERNAL PARAMS ((symbolS *)); diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c index f4dc2ae..323b95f 100644 --- a/contrib/binutils/gas/write.c +++ b/contrib/binutils/gas/write.c @@ -1,6 +1,6 @@ /* write.c - emit .o file Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001 + 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -61,8 +61,8 @@ #endif #ifndef WORKING_DOT_WORD -extern CONST int md_short_jump_size; -extern CONST int md_long_jump_size; +extern const int md_short_jump_size; +extern const int md_long_jump_size; #endif /* Used to control final evaluation of expressions. */ @@ -142,9 +142,6 @@ static void cvt_frag_to_fill PARAMS ((object_headers *, segT, fragS *)); static void remove_subsegs PARAMS ((frchainS *, int, fragS **, fragS **)); static void relax_and_size_all_segments PARAMS ((void)); #endif -#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) -static void set_segment_vma PARAMS ((bfd *, asection *, PTR)); -#endif /* Create a fixS in obstack 'notes'. */ @@ -527,6 +524,7 @@ cvt_frag_to_fill (headersP, sec, fragP) as_bad_where (fragP->fr_file, fragP->fr_line, _("attempt to .org/.space backwards? (%ld)"), (long) fragP->fr_offset); + fragP->fr_offset = 0; } fragP->fr_type = rs_fill; break; @@ -677,7 +675,14 @@ size_seg (abfd, sec, xxx) while (fragp->fr_next != last) fragp = fragp->fr_next; last->fr_address = size; - fragp->fr_offset += newsize - size; + if ((newsize - size) % fragp->fr_var == 0) + fragp->fr_offset += (newsize - size) / fragp->fr_var; + else + /* If we hit this abort, it's likely due to subsegs_finish not + providing sufficient alignment on the last frag, and the + machine dependent code using alignment frags with fr_var + greater than 1. */ + abort (); } #ifdef tc_frob_section @@ -881,6 +886,13 @@ adjust_reloc_syms (abfd, sec, xxx) symbol_mark_used_in_reloc (fixp->fx_addsy); goto done; } + + /* Never adjust a reloc against TLS local symbol. */ + if (symsec->flags & SEC_THREAD_LOCAL) + { + symbol_mark_used_in_reloc (fixp->fx_addsy); + goto done; + } #endif /* Is there some other reason we can't adjust this one? (E.g., @@ -1396,20 +1408,6 @@ set_symtab () } #endif -#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) -static void -set_segment_vma (abfd, sec, xxx) - bfd *abfd; - asection *sec; - PTR xxx ATTRIBUTE_UNUSED; -{ - static bfd_vma addr = 0; - - bfd_set_section_vma (abfd, sec, addr); - addr += bfd_section_size (abfd, sec); -} -#endif /* BFD_ASSEMBLER && OBJ_COFF && !TE_PE */ - /* Finish the subsegments. After every sub-segment, we fake an ".align ...". This conforms to BSD4.2 brane-damage. We then fake ".fill 0" because that is the kind of frag that requires least @@ -1417,10 +1415,19 @@ set_segment_vma (abfd, sec, xxx) makes calculating their intended length trivial. */ #ifndef SUB_SEGMENT_ALIGN +#ifdef HANDLE_ALIGN +/* The last subsegment gets an aligment corresponding to the alignment + of the section. This allows proper nop-filling at the end of + code-bearing sections. */ +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ + (!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \ + ? get_recorded_alignment (SEG) : 0) +#else #ifdef BFD_ASSEMBLER -#define SUB_SEGMENT_ALIGN(SEG) (0) +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0 #else -#define SUB_SEGMENT_ALIGN(SEG) (2) +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 2 +#endif #endif #endif @@ -1431,20 +1438,15 @@ subsegs_finish () for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next) { - int alignment; + int alignment = 0; subseg_set (frchainP->frch_seg, frchainP->frch_subseg); /* This now gets called even if we had errors. In that case, any alignment is meaningless, and, moreover, will look weird if we are generating a listing. */ - alignment = had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg); - - /* The last subsegment gets an aligment corresponding to the - alignment of the section. This allows proper nop-filling - at the end of code-bearing sections. */ - if (!frchainP->frch_next || frchainP->frch_next->frch_seg != now_seg) - alignment = get_recorded_alignment (now_seg); + if (!had_errors ()) + alignment = SUB_SEGMENT_ALIGN (now_seg, frchainP); if (subseg_text_p (now_seg)) frag_align_code (alignment, 0); @@ -1590,14 +1592,6 @@ write_object_file () /* Relaxation has completed. Freeze all syms. */ finalize_syms = 1; -#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) - /* Now that the segments have their final sizes, run through the - sections and set their vma and lma. !BFD gas sets them, and BFD gas - should too. Currently, only DJGPP uses this code, but other - COFF targets may need to execute this too. */ - bfd_map_over_sections (stdoutput, set_segment_vma, (char *) 0); -#endif - #ifndef BFD_ASSEMBLER /* Crawl the symbol chain. diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog index c0fd95b..786e08b 100644 --- a/contrib/binutils/include/ChangeLog +++ b/contrib/binutils/include/ChangeLog @@ -1,3 +1,148 @@ +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-09-19 Jakub Jelinek <jakub@redhat.com> + * elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE): + Define. + + 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu> + * dis-asm.h: Remove (errant) trailing semicolon (;) from the + extern "C" { } declaration. + + 2002-09-04 Nick Clifton <nickc@redhat.com> + * dis-asm.h (print_ppc_disassembler_options): Prototype. + + 2002-08-06 H.J. Lu <hjl@gnu.org> + * bfdlink.h (bfd_link_info): Add allow_undefined_version. + (bfd_elf_version_expr): Add symver and script. + +2002-07-10 Jakub Jelinek <jakub@redhat.com> + + * elf/common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED, + DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define. + +2002-07-01 Alan Modra <amodra@bigpond.net.au> + + * bfdlink.h (struct bfd_sym_chain): Declare. + (struct bfd_link_info): Add gc_sym_list. Formatting fixes. + +2002-06-25 Alan Modra <amodra@bigpond.net.au> + + * demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>. + * fibheap.h: Likewise. + * hashtab.h: Likewise. + * partition.h: Likewise. + * sort.h: Likewise. + * splay-tree.h: Likewise. + +2002-06-24 Alan Modra <amodra@bigpond.net.au> + + * libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME. + * getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + From Catherine Moore: + * dis-asm.h (print_insn_frv): New prototype. + +2002-06-09 Andrew Cagney <cagney@redhat.com> + + * remote-sim.h: Move to directory gdb/. + * callback.h: Move to directory gdb/. + +2002-06-07 Charles Wilson <cwilson@ece.gatech.edu> + + * bfdlink.h (struct bfd_link_info): Change type of + pei386_auto_import field to int so that -1 can mean enabled by + default and 1 can mean enabled by command line switch. + +2002-06-06 DJ Delorie <dj@redhat.com> + + * hashtab.h (htab): Rearrange new members for backward + compatibility. + (htab_create): Don't use a macro that requires other headers. + +2002-06-05 Geoffrey Keating <geoffk@redhat.com> + + * hashtab.h (htab_create): Restore prototype for backward + compatibility. + (htab_try_create): Likewise. + +2002-05-22 Geoffrey Keating <geoffk@redhat.com> + + * hashtab.h (struct htab): Update for change to length specifier. + +2002-05-10 Geoffrey Keating <geoffk@redhat.com> + + * hashtab.h (GTY): Define if undefined. + (htab_alloc): New typedef. + (htab_free): New typedef. + (struct htab): Support gengtype; allow user-specified memory + allocation. + (htab_create_alloc): New. + (htab_create): Replace with #define. + (htab_try_create): Delete. + +2002-05-31 Michal Ludvig <mludvig@suse.cz> + + * elf/dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed + to DW_CFA_lo_user, DW_CFA_hi_user respectively. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * dis-asm.h: Prototype print_insn_dlx. + +2002-05-23 Andrew Cagney <ac131313@redhat.com> + + * sim-d10v.h: Delete file. Moved to include/gdb/. + +2002-05-23 Jakub Jelinek <jakub@redhat.com> + + * elf/common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define. + * elf/ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22. + * elf/i386.h: Add TLS relocs. + +2002-05-21 H.J. Lu (hjl@gnu.org) + + * bfdlink.h (bfd_link_info): Add allow_multiple_definition. + +2002-05-17 J"orn Rennecke <joern.rennecke@superh.com> + + * dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype. + +2002-04-16 David S. Miller <davem@redhat.com> + + * xregex2.h (__restrict_arr): Define to __restrict on GCC + 3.1 and later. Do not redefine. + +2002-04-01 Phil Edwards <pme@gcc.gnu.org> + + * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names. + +2002-03-10 Daniel Jacobowitz <drow@mvista.com> + + * gdb: New directory. + +2002-03-06 Andrew Cagney <ac131313@redhat.com> + + * floatformat.h (floatformat_arm_ext): Delete declaration. + +2002-02-21 Jim Blandy <jimb@redhat.com> + + Allow the user to specify functions for allocating memory for + splay tree roots and nodes. + * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn): + New types. + (splay_tree): New fields: `allocate', `deallocate', and + `allocate_data'. + (splay_tree_new_with_allocator): New function declaration. + +2002-02-15 Alan Modra <amodra@bigpond.net.au> + + Support arbitrary length fill patterns. + * bfdlink.h (enum bfd_link_order_type): Remove bfd_fill_link_order. + (struct bfd_link_order): Remove fill. Add data.size. + 2002-02-08 Alexandre Oliva <aoliva@redhat.com> Contribute sh64-elf. diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h index c02a1e8..d83ff94 100644 --- a/contrib/binutils/include/bfdlink.h +++ b/contrib/binutils/include/bfdlink.h @@ -1,23 +1,23 @@ /* bfdlink.h -- header file for BFD link routines - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BFDLINK_H #define BFDLINK_H @@ -183,6 +183,12 @@ extern void bfd_link_hash_traverse /* Add an entry to the undefs list. */ extern void bfd_link_add_undef PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *)); + +struct bfd_sym_chain +{ + struct bfd_sym_chain *next; + const char *name; +}; /* This structure holds all the information needed to communicate between BFD and the linker when doing a link. */ @@ -191,33 +197,46 @@ struct bfd_link_info { /* Function callbacks. */ const struct bfd_link_callbacks *callbacks; + /* true if BFD should generate a relocateable object file. */ boolean relocateable; - /* true if BFD should generate relocation information in the final executable. */ + + /* true if BFD should generate relocation information in the final + executable. */ boolean emitrelocations; + /* true if BFD should generate a "task linked" object file, - similar to relocatable but also with globals converted to statics. */ + similar to relocatable but also with globals converted to + statics. */ boolean task_link; + /* true if BFD should generate a shared object. */ boolean shared; + /* true if BFD should pre-bind symbols in a shared object. */ boolean symbolic; + /* true if BFD should export all symbols in the dynamic symbol table of an executable, rather than only those used. */ boolean export_dynamic; + /* true if shared objects should be linked directly, not shared. */ boolean static_link; + /* true if the output file should be in a traditional format. This is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag on the output file, but may be checked when reading the input files. */ boolean traditional_format; + /* true if we want to produced optimized output files. This might need much more time and therefore must be explicitly selected. */ boolean optimize; + /* true if BFD should generate errors for undefined symbols even if generating a shared object. */ boolean no_undefined; + /* true if BFD should allow undefined symbols in shared objects even when no_undefined is set to disallow undefined symbols. The net result will be that undefined symbols in regular objects will @@ -231,37 +250,58 @@ struct bfd_link_info select an appropriate memset function. Apparently it is also normal for HPPA shared libraries to have undefined symbols. */ boolean allow_shlib_undefined; + + /* true if ok to have multiple definition. */ + boolean allow_multiple_definition; + + /* true if ok to have version with no definition. */ + boolean allow_undefined_version; + /* Which symbols to strip. */ enum bfd_link_strip strip; + /* Which local symbols to discard. */ enum bfd_link_discard discard; + /* true if symbols should be retained in memory, false if they should be freed and reread. */ boolean keep_memory; + /* The list of input BFD's involved in the link. These are chained together via the link_next field. */ bfd *input_bfds; + /* If a symbol should be created for each input BFD, this is section where those symbols should be placed. It must be a section in the output BFD. It may be NULL, in which case no such symbols will be created. This is to support CREATE_OBJECT_SYMBOLS in the linker command language. */ asection *create_object_symbols_section; + + /* List of global symbol names that are starting points for marking + sections against garbage collection. */ + struct bfd_sym_chain *gc_sym_list; + /* Hash table handled by BFD. */ struct bfd_link_hash_table *hash; + /* Hash table of symbols to keep. This is NULL unless strip is strip_some. */ struct bfd_hash_table *keep_hash; + /* true if every symbol should be reported back via the notice callback. */ boolean notice_all; + /* Hash table of symbols to report back via the notice callback. If this is NULL, and notice_all is false, then no symbols are reported back. */ struct bfd_hash_table *notice_hash; + /* Hash table of symbols which are being wrapped (the --wrap linker option). If this is NULL, no symbols are being wrapped. */ struct bfd_hash_table *wrap_hash; + /* If a base output file is wanted, then this points to it */ PTR base_file; @@ -273,6 +313,7 @@ struct bfd_link_info /* The function to call when the executable or shared object is loaded. */ const char *init_function; + /* The function to call when the executable or shared object is unloaded. */ const char *fini_function; @@ -286,9 +327,10 @@ struct bfd_link_info /* May be used to set DT_FLAGS_1 for ELF. */ bfd_vma flags_1; - /* True if auto-import thunks for DATA items in pei386 DLLs - should be generated/linked against. */ - boolean pei386_auto_import; + /* Non-zero if auto-import thunks for DATA items in pei386 DLLs + should be generated/linked against. Set to 1 if this feature + is explicitly requested by the user, -1 if enabled by default. */ + int pei386_auto_import; /* True if non-PLT relocs should be merged into one reloc section and sorted so that relocs against the same symbol come together. */ @@ -446,7 +488,6 @@ enum bfd_link_order_type { bfd_undefined_link_order, /* Undefined. */ bfd_indirect_link_order, /* Built from a section. */ - bfd_fill_link_order, /* Fill with a 16 bit constant. */ bfd_data_link_order, /* Set to explicit data. */ bfd_section_reloc_link_order, /* Relocate against a section. */ bfd_symbol_reloc_link_order /* Relocate against a symbol. */ @@ -480,13 +521,12 @@ struct bfd_link_order } indirect; struct { - /* Value to fill with. */ - unsigned int value; - } fill; - struct - { - /* Data to put into file. The size field gives the number - of bytes which this field points to. */ + /* Size of contents, or zero when contents size == size + within output section. + A non-zero value allows filling of the output section + with an arbitrary repeated pattern. */ + unsigned int size; + /* Data to put into file. */ bfd_byte *contents; } data; struct @@ -553,6 +593,10 @@ struct bfd_elf_version_expr const char *pattern; /* Matching function. */ int (*match) PARAMS((struct bfd_elf_version_expr *, const char *)); + /* Defined by ".symver". */ + unsigned int symver: 1; + /* Defined by version script. */ + unsigned int script : 1; }; /* Version dependencies. */ diff --git a/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog index 79e8e18..23b0627 100644 --- a/contrib/binutils/include/coff/ChangeLog +++ b/contrib/binutils/include/coff/ChangeLog @@ -1,3 +1,7 @@ +2002-03-18 Tom Rix <trix@redhat.com> + + * rs6k64.h: Add U64_TOCMAGIC, AIX 5 64 bit magic number. + 2002-02-01 Tom Rix <trix@redhat.com> * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3. diff --git a/contrib/binutils/include/coff/rs6k64.h b/contrib/binutils/include/coff/rs6k64.h index c9dd29f..47d0802 100644 --- a/contrib/binutils/include/coff/rs6k64.h +++ b/contrib/binutils/include/coff/rs6k64.h @@ -1,5 +1,5 @@ /* IBM RS/6000 "XCOFF64" file definitions for BFD. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,40 +13,39 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /********************** FILE HEADER **********************/ -struct external_filehdr { - char f_magic[2]; /* magic number */ - char f_nscns[2]; /* number of sections */ - char f_timdat[4]; /* time & date stamp */ - char f_symptr[8];/* file pointer to symtab */ - char f_opthdr[2]; /* sizeof(optional hdr) */ - char f_flags[2]; /* flags */ - char f_nsyms[4]; /* number of symtab entries */ +struct external_filehdr +{ + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[8]; /* file pointer to symtab */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + char f_nsyms[4]; /* number of symtab entries */ }; - /* IBM RS/6000 */ -#define U803XTOCMAGIC 0757 /* readonly text segments and TOC, XCOFF64 */ - -#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC) +/* IBM RS/6000. */ +#define U803XTOCMAGIC 0757 /* Aix 4.3 64-bit XCOFF */ +#define U64_TOCMAGIC 0767 /* AIX 5+ 64-bit XCOFF */ +#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC && (x).f_magic != U64_TOCMAGIC) #define FILHDR struct external_filehdr #define FILHSZ 24 /********************** AOUT "OPTIONAL HEADER" **********************/ - typedef struct { unsigned char magic[2]; /* type of file */ unsigned char vstamp[2]; /* version stamp */ unsigned char o_debugger[4]; /* reserved */ - unsigned char text_start[8]; /* base of text used for this file */ - unsigned char data_start[8]; /* base of data used for this file */ - unsigned char o_toc[8]; /* address of TOC */ + unsigned char text_start[8]; /* base of text used for this file */ + unsigned char data_start[8]; /* base of data used for this file */ + unsigned char o_toc[8]; /* address of TOC */ unsigned char o_snentry[2]; /* section number of entry point */ unsigned char o_sntext[2]; /* section number of .text section */ unsigned char o_sndata[2]; /* section number of .data section */ @@ -62,8 +61,8 @@ typedef struct unsigned char dsize[8]; /* initialized data " " */ unsigned char bsize[8]; /* uninitialized data " " */ unsigned char entry[8]; /* entry pt. */ - unsigned char o_maxstack[8]; /* max stack size (??) */ - unsigned char o_maxdata[8]; /* max data size (??) */ + unsigned char o_maxstack[8]; /* max stack size (??) */ + unsigned char o_maxdata[8]; /* max data size (??) */ unsigned char o_resv3[16]; /* reserved */ } AOUTHDR; @@ -74,22 +73,21 @@ AOUTHDR; /********************** SECTION HEADER **********************/ - -struct external_scnhdr { - char s_name[8]; /* section name */ - char s_paddr[8]; /* physical address, aliased s_nlib */ - char s_vaddr[8]; /* virtual address */ - char s_size[8]; /* section size */ - char s_scnptr[8]; /* file ptr to raw data for section */ - char s_relptr[8]; /* file ptr to relocation */ - char s_lnnoptr[8]; /* file ptr to line numbers */ - char s_nreloc[4]; /* number of relocation entries */ - char s_nlnno[4]; /* number of line number entries*/ - char s_flags[4]; /* flags */ - char s_pad[4]; /* padding */ +struct external_scnhdr +{ + char s_name[8]; /* section name */ + char s_paddr[8]; /* physical address, aliased s_nlib */ + char s_vaddr[8]; /* virtual address */ + char s_size[8]; /* section size */ + char s_scnptr[8]; /* file ptr to raw data for section */ + char s_relptr[8]; /* file ptr to relocation */ + char s_lnnoptr[8]; /* file ptr to line numbers */ + char s_nreloc[4]; /* number of relocation entries */ + char s_nlnno[4]; /* number of line number entries*/ + char s_flags[4]; /* flags */ + char s_pad[4]; /* padding */ }; - #define SCNHDR struct external_scnhdr #define SCNHSZ 72 @@ -97,24 +95,25 @@ struct external_scnhdr { /********************** LINE NUMBERS **********************/ /* 1 line number entry for every "breakpointable" source line in a section. - * Line numbers are grouped on a per function basis; first entry in a function - * grouping will have l_lnno = 0 and in place of physical address will be the - * symbol table index of the function name. - */ -struct external_lineno { - union { - char l_symndx[4];/* function name symbol index, iff l_lnno == 0*/ - char l_paddr[8]; /* (physical) address of line number */ - } l_addr; - char l_lnno[4]; /* line number */ -}; + Line numbers are grouped on a per function basis; first entry in a function + grouping will have l_lnno = 0 and in place of physical address will be the + symbol table index of the function name. */ +struct external_lineno +{ + union + { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[8]; /* (physical) address of line number */ + } l_addr; + + char l_lnno[4]; /* line number */ +}; #define LINENO struct external_lineno #define LINESZ 12 - /********************** SYMBOLS **********************/ #define E_SYMNMLEN 8 /* # characters in a symbol name */ @@ -131,16 +130,13 @@ struct external_syment char e_numaux[1]; }; - - #define N_BTMASK (017) #define N_TMASK (060) #define N_BTSHFT (4) #define N_TSHIFT (2) - - -union external_auxent { +union external_auxent +{ struct { union { struct { @@ -196,26 +192,23 @@ union external_auxent { #define DBXMASK 0x80 /* for dbx storage mask */ #define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK) -/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h */ +/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h. */ #define _AUX_EXCEPT 255 #define _AUX_FCN 254 #define _AUX_SYM 253 #define _AUX_FILE 252 #define _AUX_CSECT 251 - - /********************** RELOCATION DIRECTIVES **********************/ - -struct external_reloc { +struct external_reloc +{ char r_vaddr[8]; char r_symndx[4]; char r_size[1]; char r_type[1]; }; - #define RELOC struct external_reloc #define RELSZ 14 diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h index ad0569a..21e9dd3 100644 --- a/contrib/binutils/include/demangle.h +++ b/contrib/binutils/include/demangle.h @@ -1,5 +1,5 @@ /* Defs for interface to demanglers. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ #if !defined (DEMANGLE_H) #define DEMANGLE_H -#include <ansidecl.h> +#include "ansidecl.h" /* Options passed to cplus_demangle (in 2nd parameter). */ diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h index decc863..fa72608 100644 --- a/contrib/binutils/include/dis-asm.h +++ b/contrib/binutils/include/dis-asm.h @@ -205,6 +205,7 @@ extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*)); +extern int print_insn_dlx PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*)); @@ -226,7 +227,6 @@ extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*)); -extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*)); @@ -235,12 +235,13 @@ extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *)); -extern int print_insn_sh64l PARAMS ((bfd_vma, disassemble_info *)); extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *)); +extern int print_insn_frv PARAMS ((bfd_vma, disassemble_info *)); extern disassembler_ftype arc_get_disassembler PARAMS ((void *)); extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *)); +extern void print_ppc_disassembler_options PARAMS ((FILE *)); extern void print_arm_disassembler_options PARAMS ((FILE *)); extern void parse_arm_disassembler_option PARAMS ((char *)); extern int get_arm_regname_num_options PARAMS ((void)); @@ -315,7 +316,7 @@ extern int generic_symbol_at_address (INFO).insn_info_valid = 0 #ifdef __cplusplus -}; +} #endif #endif /* ! defined (DIS_ASM_H) */ diff --git a/contrib/binutils/include/dyn-string.h b/contrib/binutils/include/dyn-string.h index 315f63f..2a771c7 100644 --- a/contrib/binutils/include/dyn-string.h +++ b/contrib/binutils/include/dyn-string.h @@ -1,5 +1,5 @@ /* An abstract string datatype. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GCC. @@ -45,7 +45,7 @@ typedef struct dyn_string names in user programs, the functions that are used in the demangler are given implementation-reserved names. */ -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) #define dyn_string_init __cxa_dyn_string_init #define dyn_string_new __cxa_dyn_string_new @@ -66,7 +66,7 @@ typedef struct dyn_string #define dyn_string_substring __cxa_dyn_string_substring #define dyn_string_eq __cxa_dyn_string_eq -#endif /* IN_LIBGCC2 */ +#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ extern int dyn_string_init PARAMS ((struct dyn_string *, int)); diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog index 20e8096..3e64a32 100644 --- a/contrib/binutils/include/elf/ChangeLog +++ b/contrib/binutils/include/elf/ChangeLog @@ -1,7 +1,56 @@ -2002-04-2 Alan Modra <amodra@bigpond.net.au> +2002-07-01 Matt Thomas <matt@3am-software.com> + + * vax.h: Rename EF_* to EF_VAX_*. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + From Catherine Moore, Michael Meissner, Dave Brolley: + * common.h (EM_CYGNUS_FRV): New macro. + * frv.h: New file. + +2002-06-06 Lars Brinkhoff <lars@nocrew.org> + + * common.h: Change registry@sco.com to registry@caldera.com. + (EM_PDP10, EM_PDP11): Define. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl) + (_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New + prototypes. + +2002-06-01 Richard Henderson <rth@redhat.com> + + * alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF, + LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New. + +2002-05-30 Richard Henderson <rth@redhat.com> + + * alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64, + R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI, + R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64, + R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New. + +2002-05-29 Matt Thomas <matt@3am-software.com> + + * vax.h: New file + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * common.h (EM_DLX): Define. + * dlx.h: New file. + +2002-05-08 Jason Thorpe <thorpej@wasabisystems.com> + + * common.h (NT_GNU_ABI_TAG): Define. + (GNU_ABI_TAG_LINUX): Define. + (GNU_ABI_TAG_HURD): Define. + (GNU_ABI_TAG_SOLARIS): Define. + (NT_NETBSD_IDENT): Define. + (NT_FREEBSD_ABI_TAG): Define. + +2002-04-24 Elena Zannoni <ezannoni@redhat.com> - Merge from mainline. - 2002-04-24 Elena Zannoni <ezannoni@redhat.com> * dwarf2.h: Add DW_AT_GNU_vector. 2002-02-13 Matt Fredette <fredette@netbsd.org> @@ -96,7 +145,7 @@ * common.h: Update copyright years. (NT_NETBSDCORE_PROCINFO): Define. - (NT_NETBSDCORE_FIRSTMACH): Define. + (NT_NETBSDCORE_FIRSTMACH): Define. 2002-01-06 Steve Ellcey <sje@cup.hp.com> @@ -290,18 +339,18 @@ 2000-10-16 Chris Demetriou <cgd@sibyte.com> - * mips.h (E_MIPS_ARCH_32): New constant. - (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the - former with the latter. + * mips.h (E_MIPS_ARCH_32): New constant. + (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the + former with the latter. - * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions. + * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions. - * mips.h (E_MIPS_MACH_SB1): New constant. + * mips.h (E_MIPS_MACH_SB1): New constant. 2000-11-30 Jan Hubicka <jh@suse.cz> - * common.h (EM_X86_64): New macro. - * x86-64.h: New file. + * common.h (EM_X86_64): New macro. + * x86-64.h: New file. 2000-11-27 Hans-Peter Nilsson <hp@axis.com> diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h index e937b81..0313b5b 100644 --- a/contrib/binutils/include/elf/alpha.h +++ b/contrib/binutils/include/elf/alpha.h @@ -99,6 +99,28 @@ START_RELOC_NUMBERS (elf_alpha_reloc_type) STO_ALPHA_STD_GPLOAD. */ RELOC_NUMBER (R_ALPHA_BRSGP, 28) + /* Thread-Local Storage. */ + RELOC_NUMBER (R_ALPHA_TLSGD, 29) + RELOC_NUMBER (R_ALPHA_TLSLDM, 30) + RELOC_NUMBER (R_ALPHA_DTPMOD64, 31) + RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32) + RELOC_NUMBER (R_ALPHA_DTPREL64, 33) + RELOC_NUMBER (R_ALPHA_DTPRELHI, 34) + RELOC_NUMBER (R_ALPHA_DTPRELLO, 35) + RELOC_NUMBER (R_ALPHA_DTPREL16, 36) + RELOC_NUMBER (R_ALPHA_GOTTPREL, 37) + RELOC_NUMBER (R_ALPHA_TPREL64, 38) + RELOC_NUMBER (R_ALPHA_TPRELHI, 39) + RELOC_NUMBER (R_ALPHA_TPRELLO, 40) + RELOC_NUMBER (R_ALPHA_TPREL16, 41) + END_RELOC_NUMBERS (R_ALPHA_max) +#define LITUSE_ALPHA_ADDR 0 +#define LITUSE_ALPHA_BASE 1 +#define LITUSE_ALPHA_BYTOFF 2 +#define LITUSE_ALPHA_JSR 3 +#define LITUSE_ALPHA_TLSGD 4 +#define LITUSE_ALPHA_TLSLDM 5 + #endif /* _ELF_ALPHA_H */ diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h index d6e45fc..4e1b502 100644 --- a/contrib/binutils/include/elf/common.h +++ b/contrib/binutils/include/elf/common.h @@ -92,7 +92,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ET_HIPROC 0xFFFF /* Processor-specific */ /* Values for e_machine, which identifies the architecture. These numbers - are officially assigned by registry@sco.com. See below for a list of + are officially assigned by registry@caldera.com. See below for a list of ad-hoc numbers used during initial development. */ #define EM_NONE 0 /* No machine */ @@ -145,6 +145,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ #define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */ +#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ +#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ #define EM_FX66 66 /* Siemens FX66 microcontroller */ #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ #define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */ @@ -184,7 +186,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ will have a collision. Instead, pick a random number. Normally, each entity or maintainer responsible for a machine with an - unofficial e_machine number should eventually ask registry@sco.com for + unofficial e_machine number should eventually ask registry@caldera.com for an officially blessed number to be added to the list above. */ #define EM_PJ_OLD 99 /* picoJava */ @@ -236,8 +238,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Written in the absense of an ABI. */ #define EM_OPENRISC_OLD 0x3426 +/* DLX magic number + Written in the absense of an ABI. */ +#define EM_DLX 0x5aa5 + #define EM_XSTORMY16 0xad45 +/* FRV magic number - no EABI available??. */ +#define EM_CYGNUS_FRV 0x5441 /* See the above comment before you add a new EM_* value here. */ /* Values for e_version. */ @@ -254,6 +262,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PT_NOTE 4 /* Auxiliary information */ #define PT_SHLIB 5 /* Reserved, unspecified semantics */ #define PT_PHDR 6 /* Entry for header table itself */ +#define PT_TLS 7 /* Thread local storage segment */ #define PT_LOOS 0x60000000 /* OS-specific */ #define PT_HIOS 0x6fffffff /* OS-specific */ #define PT_LOPROC 0x70000000 /* Processor-specific */ @@ -294,6 +303,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHT_LOOS 0x60000000 /* First of OS specific semantics */ #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ +#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */ + /* The next three section types are defined by Solaris, and are named SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU* versions. */ @@ -322,6 +333,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ #define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */ #define SHF_GROUP (1 << 9) /* Member of a section group */ +#define SHF_TLS (1 << 10) /* Thread local storage section */ /* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ #define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ @@ -358,6 +370,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NT_VERSION 1 /* Contains a version string. */ #define NT_ARCH 2 /* Contains an architecture string. */ +/* Values for GNU .note.ABI-tag notes. Note name is "GNU". */ + +#define NT_GNU_ABI_TAG 1 +#define GNU_ABI_TAG_LINUX 0 +#define GNU_ABI_TAG_HURD 1 +#define GNU_ABI_TAG_SOLARIS 2 + +/* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */ + +#define NT_NETBSD_IDENT 1 + +/* Values for FreeBSD .note.ABI-tag notes. Note name is "FreeBSD". */ + +#define NT_FREEBSD_ABI_TAG 1 + /* These three macros disassemble and assemble a symbol table st_info field, which contains the symbol binding and symbol type. The STB_ and STT_ defines identify the binding and type. */ @@ -402,6 +429,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define STT_SECTION 3 /* Symbol associated with a section */ #define STT_FILE 4 /* Symbol gives a file name */ #define STT_COMMON 5 /* An uninitialised common block */ +#define STT_TLS 6 /* Thread local data object */ #define STT_LOOS 10 /* OS-specific semantics */ #define STT_HIOS 12 /* OS-specific semantics */ #define STT_LOPROC 13 /* Application-specific semantics */ @@ -494,6 +522,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ OS specific values. This is a deliberate special case and we maintain it for backwards compatability. */ #define DT_VALRNGLO 0x6ffffd00 +#define DT_GNU_PRELINKED 0x6ffffdf5 +#define DT_GNU_CONFLICTSZ 0x6ffffdf6 +#define DT_GNU_LIBLISTSZ 0x6ffffdf7 #define DT_CHECKSUM 0x6ffffdf8 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa @@ -505,6 +536,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DT_VALRNGHI 0x6ffffdff #define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_CONFLICT 0x6ffffef8 +#define DT_GNU_LIBLIST 0x6ffffef9 #define DT_CONFIG 0x6ffffefa #define DT_DEPAUDIT 0x6ffffefb #define DT_AUDIT 0x6ffffefc @@ -570,6 +603,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DF_SYMBOLIC (1 << 1) #define DF_TEXTREL (1 << 2) #define DF_BIND_NOW (1 << 3) +#define DF_STATIC_TLS (1 << 4) /* These constants are used for the version number of a Elf32_Verdef structure. */ diff --git a/contrib/binutils/include/elf/dlx.h b/contrib/binutils/include/elf/dlx.h new file mode 100644 index 0000000..562f600 --- /dev/null +++ b/contrib/binutils/include/elf/dlx.h @@ -0,0 +1,53 @@ +/* DLX support for BFD. + Copyright 2002 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_DLX_H +#define _ELF_DLX_H + +#include "elf/reloc-macros.h" + +#if 0 +START_RELOC_NUMBERS (elf_dlx_reloc_type) + RELOC_NUMBER (R_DLX_NONE, 0) + RELOC_NUMBER (R_DLX_RELOC_16, 1) + RELOC_NUMBER (R_DLX_RELOC_26, 2) + RELOC_NUMBER (R_DLX_RELOC_32, 3) + RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4) + RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5) + RELOC_NUMBER (R_DLX_RELOC_16_HI, 6) + RELOC_NUMBER (R_DLX_RELOC_16_LO, 7) + RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8) + RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9) +END_RELOC_NUMBERS (R_DLX_max) +#else +START_RELOC_NUMBERS (elf_dlx_reloc_type) + RELOC_NUMBER (R_DLX_NONE, 0) + RELOC_NUMBER (R_DLX_RELOC_8, 1) + RELOC_NUMBER (R_DLX_RELOC_16, 2) + RELOC_NUMBER (R_DLX_RELOC_32, 3) + RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4) + RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5) + RELOC_NUMBER (R_DLX_RELOC_16_HI, 6) + RELOC_NUMBER (R_DLX_RELOC_16_LO, 7) + RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8) + RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9) +END_RELOC_NUMBERS (R_DLX_max) +#endif /* 0 */ + +#endif /* _ELF_DLX_H */ diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h index 750a720..0e78310 100644 --- a/contrib/binutils/include/elf/dwarf2.h +++ b/contrib/binutils/include/elf/dwarf2.h @@ -649,8 +649,8 @@ enum dwarf_call_frame_info #define DW_CIE_VERSION 1 #define DW_CFA_extended 0 -#define DW_CFA_low_user 0x1c -#define DW_CFA_high_user 0x3f +#define DW_CFA_lo_user 0x1c +#define DW_CFA_hi_user 0x3f #define DW_CHILDREN_no 0x00 #define DW_CHILDREN_yes 0x01 diff --git a/contrib/binutils/include/elf/frv.h b/contrib/binutils/include/elf/frv.h new file mode 100644 index 0000000..65ce97d --- /dev/null +++ b/contrib/binutils/include/elf/frv.h @@ -0,0 +1,95 @@ +/* FRV ELF support for BFD. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_FRV_H +#define _ELF_FRV_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_frv_reloc_type) + RELOC_NUMBER (R_FRV_NONE, 0) + RELOC_NUMBER (R_FRV_32, 1) + RELOC_NUMBER (R_FRV_LABEL16, 2) + RELOC_NUMBER (R_FRV_LABEL24, 3) + RELOC_NUMBER (R_FRV_LO16, 4) + RELOC_NUMBER (R_FRV_HI16, 5) + RELOC_NUMBER (R_FRV_GPREL12, 6) + RELOC_NUMBER (R_FRV_GPRELU12, 7) + RELOC_NUMBER (R_FRV_GPREL32, 8) + RELOC_NUMBER (R_FRV_GPRELHI, 9) + RELOC_NUMBER (R_FRV_GPRELLO, 10) + RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200) + RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201) +END_RELOC_NUMBERS(R_FRV_max) + +/* Processor specific flags for the ELF header e_flags field. */ + /* gpr support */ +#define EF_FRV_GPR_MASK 0x00000003 /* mask for # of gprs */ +#define EF_FRV_GPR_32 0x00000001 /* -mgpr-32 */ +#define EF_FRV_GPR_64 0x00000002 /* -mgpr-64 */ + + /* fpr support */ +#define EF_FRV_FPR_MASK 0x0000000c /* mask for # of fprs */ +#define EF_FRV_FPR_32 0x00000004 /* -mfpr-32 */ +#define EF_FRV_FPR_64 0x00000008 /* -mfpr-64 */ +#define EF_FRV_FPR_NONE 0x0000000c /* -msoft-float */ + + /* double word support */ +#define EF_FRV_DWORD_MASK 0x00000030 /* mask for dword support */ +#define EF_FRV_DWORD_YES 0x00000010 /* use double word insns */ +#define EF_FRV_DWORD_NO 0x00000020 /* don't use double word insn*/ + +#define EF_FRV_DOUBLE 0x00000040 /* -mdouble */ +#define EF_FRV_MEDIA 0x00000080 /* -mmedia */ + +#define EF_FRV_PIC 0x00000100 /* -fpic */ +#define EF_FRV_NON_PIC_RELOCS 0x00000200 /* used non pic safe relocs */ + +#define EF_FRV_MULADD 0x00000400 /* -mmuladd */ +#define EF_FRV_BIGPIC 0x00000800 /* -fPIC */ +#define EF_FRV_LIBPIC 0x00001000 /* -mlibrary-pic */ +#define EF_FRV_G0 0x00002000 /* -G 0, no small data ptr */ +#define EF_FRV_NOPACK 0x00004000 /* -mnopack */ + +#define EF_FRV_CPU_MASK 0xff000000 /* specific cpu bits */ +#define EF_FRV_CPU_GENERIC 0x00000000 /* generic FRV */ +#define EF_FRV_CPU_FR500 0x01000000 /* FRV500 */ +#define EF_FRV_CPU_FR300 0x02000000 /* FRV300 */ +#define EF_FRV_CPU_SIMPLE 0x03000000 /* SIMPLE */ +#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */ +#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */ + + /* Mask of PIC related bits */ +#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC) + + /* Mask of all flags */ +#define EF_FRV_ALL_FLAGS (EF_FRV_GPR_MASK | \ + EF_FRV_FPR_MASK | \ + EF_FRV_DWORD_MASK | \ + EF_FRV_DOUBLE | \ + EF_FRV_MEDIA | \ + EF_FRV_PIC_FLAGS | \ + EF_FRV_NON_PIC_RELOCS | \ + EF_FRV_MULADD | \ + EF_FRV_G0 | \ + EF_FRV_NOPACK | \ + EF_FRV_CPU_MASK) + +#endif /* _ELF_FRV_H */ diff --git a/contrib/binutils/include/elf/i386.h b/contrib/binutils/include/elf/i386.h index 4a15efc..9594119 100644 --- a/contrib/binutils/include/elf/i386.h +++ b/contrib/binutils/include/elf/i386.h @@ -34,12 +34,34 @@ START_RELOC_NUMBERS (elf_i386_reloc_type) RELOC_NUMBER (R_386_RELATIVE, 8) /* Adjust by program base */ RELOC_NUMBER (R_386_GOTOFF, 9) /* 32 bit offset to GOT */ RELOC_NUMBER (R_386_GOTPC, 10) /* 32 bit PC relative offset to GOT */ - FAKE_RELOC (FIRST_INVALID_RELOC, 11) - FAKE_RELOC (LAST_INVALID_RELOC, 19) + RELOC_NUMBER (R_386_32PLT, 11) /* Used by Sun */ + FAKE_RELOC (FIRST_INVALID_RELOC, 12) + FAKE_RELOC (LAST_INVALID_RELOC, 13) + RELOC_NUMBER (R_386_TLS_TPOFF,14) + RELOC_NUMBER (R_386_TLS_IE, 15) + RELOC_NUMBER (R_386_TLS_GOTIE,16) + RELOC_NUMBER (R_386_TLS_LE, 17) + RELOC_NUMBER (R_386_TLS_GD, 18) + RELOC_NUMBER (R_386_TLS_LDM, 19) RELOC_NUMBER (R_386_16, 20) RELOC_NUMBER (R_386_PC16, 21) RELOC_NUMBER (R_386_8, 22) RELOC_NUMBER (R_386_PC8, 23) + RELOC_NUMBER (R_386_TLS_GD_32, 24) + RELOC_NUMBER (R_386_TLS_GD_PUSH, 25) + RELOC_NUMBER (R_386_TLS_GD_CALL, 26) + RELOC_NUMBER (R_386_TLS_GD_POP, 27) + RELOC_NUMBER (R_386_TLS_LDM_32, 28) + RELOC_NUMBER (R_386_TLS_LDM_PUSH, 29) + RELOC_NUMBER (R_386_TLS_LDM_CALL, 30) + RELOC_NUMBER (R_386_TLS_LDM_POP, 31) + RELOC_NUMBER (R_386_TLS_LDO_32, 32) + RELOC_NUMBER (R_386_TLS_IE_32, 33) + RELOC_NUMBER (R_386_TLS_LE_32, 34) + RELOC_NUMBER (R_386_TLS_DTPMOD32, 35) + RELOC_NUMBER (R_386_TLS_DTPOFF32, 36) + RELOC_NUMBER (R_386_TLS_TPOFF32, 37) + /* These are GNU extensions to enable C++ vtable garbage collection. */ RELOC_NUMBER (R_386_GNU_VTINHERIT, 250) RELOC_NUMBER (R_386_GNU_VTENTRY, 251) diff --git a/contrib/binutils/include/elf/ia64.h b/contrib/binutils/include/elf/ia64.h index 5e632ed..310a7f7 100644 --- a/contrib/binutils/include/elf/ia64.h +++ b/contrib/binutils/include/elf/ia64.h @@ -192,7 +192,7 @@ START_RELOC_NUMBERS (elf_ia64_reloc_type) RELOC_NUMBER (R_IA64_TPREL64MSB, 0x96) /* @tprel(sym+add), data8 MSB */ RELOC_NUMBER (R_IA64_TPREL64LSB, 0x97) /* @tprel(sym+add), data8 LSB */ - RELOC_NUMBER (R_IA64_LTOFF_TP22, 0x9a) /* @ltoff(@tprel(s+a)), add imm22 */ + RELOC_NUMBER (R_IA64_LTOFF_TPREL22, 0x9a) /* @ltoff(@tprel(s+a)), add imm22 */ RELOC_NUMBER (R_IA64_DTPMOD64MSB, 0xa6) /* @dtpmod(sym+add), data8 MSB */ RELOC_NUMBER (R_IA64_DTPMOD64LSB, 0xa7) /* @dtpmod(sym+add), data8 LSB */ diff --git a/contrib/binutils/include/elf/sh.h b/contrib/binutils/include/elf/sh.h index 1480f49..af78c9b 100644 --- a/contrib/binutils/include/elf/sh.h +++ b/contrib/binutils/include/elf/sh.h @@ -108,6 +108,11 @@ extern enum sh64_elf_cr_type sh64_get_contents_type FIXME: This seems redundant now that we export the interface above. */ extern boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma)); +extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *)); +extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *)); +extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *)); +extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *)); + /* We put this in elf_section_data (section)->tdata. */ struct sh64_section_data { diff --git a/contrib/binutils/include/elf/vax.h b/contrib/binutils/include/elf/vax.h new file mode 100644 index 0000000..c1b5c2b --- /dev/null +++ b/contrib/binutils/include/elf/vax.h @@ -0,0 +1,51 @@ +/* VAX ELF support for BFD. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Matt Thomas <matt@3am-software.com>. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_VAX_H +#define _ELF_VAX_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_vax_reloc_type) + RELOC_NUMBER (R_VAX_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_VAX_32, 1) /* Direct 32 bit */ + RELOC_NUMBER (R_VAX_16, 2) /* Direct 16 bit */ + RELOC_NUMBER (R_VAX_8, 3) /* Direct 8 bit */ + RELOC_NUMBER (R_VAX_PC32, 4) /* PC relative 32 bit */ + RELOC_NUMBER (R_VAX_PC16, 5) /* PC relative 16 bit */ + RELOC_NUMBER (R_VAX_PC8, 6) /* PC relative 8 bit */ + RELOC_NUMBER (R_VAX_GOT32, 7) /* 32 bit PC relative GOT entry */ + RELOC_NUMBER (R_VAX_PLT32, 13) /* 32 bit PC relative PLT address */ + RELOC_NUMBER (R_VAX_COPY, 19) /* Copy symbol at runtime */ + RELOC_NUMBER (R_VAX_GLOB_DAT, 20) /* Create GOT entry */ + RELOC_NUMBER (R_VAX_JMP_SLOT, 21) /* Create PLT entry */ + RELOC_NUMBER (R_VAX_RELATIVE, 22) /* Adjust by program base */ + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_VAX_GNU_VTINHERIT, 23) + RELOC_NUMBER (R_VAX_GNU_VTENTRY, 24) +END_RELOC_NUMBERS (R_VAX_max) + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_VAX_NONPIC 0x0001 /* Object contains non-PIC code */ +#define EF_VAX_DFLOAT 0x0100 /* Object contains D-Float insn. */ +#define EF_VAX_GFLOAT 0x0200 /* Object contains G-Float insn. */ + +#endif diff --git a/contrib/binutils/include/fibheap.h b/contrib/binutils/include/fibheap.h index d109e4a..fc37f9e 100644 --- a/contrib/binutils/include/fibheap.h +++ b/contrib/binutils/include/fibheap.h @@ -1,5 +1,5 @@ /* A Fibonacci heap datatype. - Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Daniel Berlin (dan@cgsoftware.com). This file is part of GCC. @@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */ #ifndef _FIBHEAP_H_ #define _FIBHEAP_H_ -#include <ansidecl.h> +#include "ansidecl.h" typedef long fibheapkey_t; diff --git a/contrib/binutils/include/floatformat.h b/contrib/binutils/include/floatformat.h index 0cd09be..53ead3e 100644 --- a/contrib/binutils/include/floatformat.h +++ b/contrib/binutils/include/floatformat.h @@ -96,7 +96,6 @@ extern const struct floatformat floatformat_m68881_ext; extern const struct floatformat floatformat_i960_ext; extern const struct floatformat floatformat_m88110_ext; extern const struct floatformat floatformat_m88110_harris_ext; -extern const struct floatformat floatformat_arm_ext; /* deprecated. */ extern const struct floatformat floatformat_arm_ext_big; extern const struct floatformat floatformat_arm_ext_littlebyte_bigword; /* IA-64 Floating Point register spilt into memory. */ diff --git a/contrib/binutils/include/getopt.h b/contrib/binutils/include/getopt.h index cb5feba..0c6470b 100644 --- a/contrib/binutils/include/getopt.h +++ b/contrib/binutils/include/getopt.h @@ -105,16 +105,17 @@ struct option declaration without arguments. If it is 0, we checked and failed to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ -#if defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT) +#if !HAVE_DECL_GETOPT +#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -# if !defined (HAVE_DECL_GETOPT) +#else extern int getopt (); -# endif -#endif /* __GNU_LIBRARY__ */ +#endif +#endif /* !HAVE_DECL_GETOPT */ + extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, diff --git a/contrib/binutils/include/hashtab.h b/contrib/binutils/include/hashtab.h index 8871710..be866b5 100644 --- a/contrib/binutils/include/hashtab.h +++ b/contrib/binutils/include/hashtab.h @@ -1,5 +1,5 @@ /* An expandable hash tables datatype. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Vladimir Makarov (vmakarov@cygnus.com). This program is free software; you can redistribute it and/or modify @@ -36,7 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { #endif /* __cplusplus */ -#include <ansidecl.h> +#include "ansidecl.h" + +#ifndef GTY +#define GTY(X) +#endif /* The type for a hash code. */ typedef unsigned int hashval_t; @@ -63,12 +67,21 @@ typedef void (*htab_del) PARAMS ((void *)); htab_traverse. Return 1 to continue scan, 0 to stop. */ typedef int (*htab_trav) PARAMS ((void **, void *)); +/* Memory-allocation function, with the same functionality as calloc(). + Iff it returns NULL, the hash table implementation will pass an error + code back to the user, so if your code doesn't handle errors, + best if you use xcalloc instead. */ +typedef PTR (*htab_alloc) PARAMS ((size_t, size_t)); + +/* We also need a free() routine. */ +typedef void (*htab_free) PARAMS ((PTR)); + /* Hash tables are of the following type. The structure (implementation) of this type is not needed for using the hash tables. All work with hash table should be executed only through functions mentioned below. */ -struct htab +struct htab GTY(()) { /* Pointer to hash function. */ htab_hash hash_f; @@ -80,7 +93,7 @@ struct htab htab_del del_f; /* Table itself. */ - PTR *entries; + PTR * GTY ((use_param (""), length ("%h.size"))) entries; /* Current size (in entries) of the hash table */ size_t size; @@ -99,9 +112,9 @@ struct htab of collisions fixed for time of work with the hash table. */ unsigned int collisions; - /* This is non-zero if we are allowed to return NULL for function calls - that allocate memory. */ - int return_allocation_failure; + /* Pointers to allocate/free functions. */ + htab_alloc alloc_f; + htab_free free_f; }; typedef struct htab *htab_t; @@ -111,14 +124,14 @@ enum insert_option {NO_INSERT, INSERT}; /* The prototypes of the package functions. */ -extern htab_t htab_create PARAMS ((size_t, htab_hash, - htab_eq, htab_del)); +extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash, + htab_eq, htab_del, + htab_alloc, htab_free)); + +/* Backward-compatibility functions. */ +extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del)); +extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del)); -/* This function is like htab_create, but may return NULL if memory - allocation fails, and also signals that htab_find_slot_with_hash and - htab_find_slot are allowed to return NULL when inserting. */ -extern htab_t htab_try_create PARAMS ((size_t, htab_hash, - htab_eq, htab_del)); extern void htab_delete PARAMS ((htab_t)); extern void htab_empty PARAMS ((htab_t)); diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h index 3e0ca09..0463301 100644 --- a/contrib/binutils/include/libiberty.h +++ b/contrib/binutils/include/libiberty.h @@ -73,12 +73,12 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC; declaration without arguments. If it is 0, we checked and failed to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ -#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME) +#if !HAVE_DECL_BASENAME +#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME) extern char *basename PARAMS ((const char *)); #else -# if !defined (HAVE_DECL_BASENAME) extern char *basename (); -# endif +#endif #endif /* A well-defined basename () that is always compiled in. */ diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog index d7b0582..385b191 100644 --- a/contrib/binutils/include/opcode/ChangeLog +++ b/contrib/binutils/include/opcode/ChangeLog @@ -1,19 +1,71 @@ -2002-04-27 Alan Modra <amodra@bigpond.net.au> +2002-07-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * mips.h (INSN_MIPS16): New define. + +2002-07-08 Alan Modra <amodra@bigpond.net.au> + + * i386.h: Remove IgnoreSize from movsx and movzx. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * a29k.h: Replace CONST with const. + (CONST): Don't define. + * convex.h: Replace CONST with const. + (CONST): Don't define. + * dlx.h: Replace CONST with const. + * or32.h (CONST): Don't define. + +2002-05-30 Chris G. Demetriou <cgd@broadcom.com> + + * mips.h (OP_SH_ALN, OP_MASK_ALN, OP_SH_VSEL, OP_MASK_VSEL) + (MDMX_FMTSEL_IMM_QH, MDMX_FMTSEL_IMM_OB, MDMX_FMTSEL_VEC_QH) + (MDMX_FMTSEL_VEC_OB, INSN_READ_MDMX_ACC, INSN_WRITE_MDMX_ACC) + (INSN_MDMX): New constants, for MDMX support. + (opcode character list): Add "O", "Q", "X", "Y", and "Z" for MDMX. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * dlx.h: New file. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * ia64.h: Use #include "" instead of <> for local header files. + * sparc.h: Likewise. + +2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * mips.h: Add M_DROL, M_DROL_I, M_DROR, M_DROR_I macro cases. + +2002-05-17 Andrey Volkov <avolkov@sources.redhat.com> + + * h8300.h: Corrected defs of all control regs + and eepmov instr. + +2002-04-11 Alan Modra <amodra@bigpond.net.au> - Merge from mainline - 2002-04-11 Alan Modra <amodra@bigpond.net.au> * i386.h: Add intel mode cmpsd and movsd. Put them before SSE2 insns, so that rep prefix works. +2002-03-15 Chris G. Demetriou <cgd@broadcom.com> + + * mips.h (INSN_MIPS3D): New definition used to mark MIPS-3D + instructions. + (OPCODE_IS_MEMBER): Adjust comments to indicate that ASE bit masks + may be passed along with the ISA bitmask. + +2002-03-05 Paul Koning <pkoning@equallogic.com> + + * pdp11.h: Add format codes for float instruction formats. + 2002-02-25 Alan Modra <amodra@bigpond.net.au> * ppc.h (PPC_OPCODE_POWER4, PPC_OPCODE_NOPOWER4): Define. -Mon Feb 18 17:26:10 CET 2002 Jan Hubicka <jh@suse.cz> +Mon Feb 18 17:31:48 CET 2002 Jan Hubicka <jh@suse.cz> * i386.h (push,pop): Fix Reg64 to WordReg to allow 16bit operands. -Fri Feb 15 15:16:40 CET 2002 Jan Hubicka <jh@suse.cz> +Mon Feb 11 12:53:19 CET 2002 Jan Hubicka <jh@suse.cz> * i386.h (push,pop): Allow 16bit operands in 64bit mode. (xchg): Fix. diff --git a/contrib/binutils/include/opcode/convex.h b/contrib/binutils/include/opcode/convex.h index 780b12d..ccf5568 100644 --- a/contrib/binutils/include/opcode/convex.h +++ b/contrib/binutils/include/opcode/convex.h @@ -1,5 +1,5 @@ /* Information for instruction disassembly on the Convex. - Copyright 1989, 1993 Free Software Foundation, Inc. + Copyright 1989, 1993, 2002 Free Software Foundation, Inc. This file is part of GDB. @@ -17,10 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef CONST -#define CONST -#endif /* CONST */ - #define xxx 0 #define rrr 1 #define rr 2 @@ -67,7 +63,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define CPUID 20 #define TID 21 -CONST char *op[] = { +const char *op[] = { "", "v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7", "s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7", @@ -92,7 +88,7 @@ CONST char *op[] = { "tid", }; -CONST struct formstr format0[] = { +const struct formstr format0[] = { {0,0,rrr,V,S,S}, /* mov */ {0,0,rrr,S,S,V}, /* mov */ {1,1,rrr,V,V,V}, /* merg.t */ @@ -159,7 +155,7 @@ CONST struct formstr format0[] = { {4,8,rrr,V,S,V}, /* div.l */ }; -CONST struct formstr format1[] = { +const struct formstr format1[] = { {11,0,xxx,0,0,0}, /* exit */ {12,0,a3,0,0,0}, /* jmp */ {13,2,a3,0,0,0}, /* jmpi.f */ @@ -226,7 +222,7 @@ CONST struct formstr format1[] = { {21,8,a2r,V,0,0}, /* st.l */ }; -CONST struct formstr format2[] = { +const struct formstr format2[] = { {28,5,rr,A,A,0}, /* cvtw.b */ {28,6,rr,A,A,0}, /* cvtw.h */ {29,7,rr,A,A,0}, /* cvtb.w */ @@ -357,7 +353,7 @@ CONST struct formstr format2[] = { {4,8,rr,S,S,0}, /* div.l */ }; -CONST struct formstr format3[] = { +const struct formstr format3[] = { {32,3,rr,V,V,0}, /* cvtd.s */ {31,4,rr,V,V,0}, /* cvts.d */ {33,4,rr,V,V,0}, /* cvtl.d */ @@ -424,7 +420,7 @@ CONST struct formstr format3[] = { {43,8,rr,S,S,0}, /* neg.l */ }; -CONST struct formstr format4[] = { +const struct formstr format4[] = { {46,0,nops,0,0,0}, /* nop */ {47,0,pcrel,0,0,0}, /* br */ {48,2,pcrel,0,0,0}, /* bri.f */ @@ -435,7 +431,7 @@ CONST struct formstr format4[] = { {50,1,pcrel,0,0,0}, /* brs.t */ }; -CONST struct formstr format5[] = { +const struct formstr format5[] = { {51,5,rr,V,V,0}, /* ldvi.b */ {51,6,rr,V,V,0}, /* ldvi.h */ {51,7,rr,V,V,0}, /* ldvi.w */ @@ -454,7 +450,7 @@ CONST struct formstr format5[] = { {52,8,rxr,S,V,0}, /* stvi.l */ }; -CONST struct formstr format6[] = { +const struct formstr format6[] = { {53,0,r,A,0,0}, /* ldsdr */ {54,0,r,A,0,0}, /* ldkdr */ {55,3,r,S,0,0}, /* ln.s */ @@ -521,7 +517,7 @@ CONST struct formstr format6[] = { {83,4,r,S,0,0}, /* atan.d */ }; -CONST struct formstr format7[] = { +const struct formstr format7[] = { {84,5,r,V,0,0}, /* sum.b */ {84,6,r,V,0,0}, /* sum.h */ {84,7,r,V,0,0}, /* sum.w */ @@ -556,11 +552,11 @@ CONST struct formstr format7[] = { {0,0,0,0,0,0}, }; -CONST struct formstr formatx[] = { +const struct formstr formatx[] = { {0,0,0,0,0,0}, }; -CONST struct formstr format1a[] = { +const struct formstr format1a[] = { {91,0,imr,A,0,0}, /* halt */ {92,0,a4,0,0,0}, /* sysc */ {18,6,imr,A,0,0}, /* ld.h */ @@ -595,7 +591,7 @@ CONST struct formstr format1a[] = { {41,7,imr,A,0,0}, /* lt.w */ }; -CONST struct formstr format1b[] = { +const struct formstr format1b[] = { {18,4,imr,S,0,0}, /* ld.d */ {18,10,imr,S,0,0}, /* ld.u */ {18,8,imr,S,0,0}, /* ld.l */ @@ -630,7 +626,7 @@ CONST struct formstr format1b[] = { {41,7,imr,S,0,0}, /* lt.w */ }; -CONST struct formstr e0_format0[] = { +const struct formstr e0_format0[] = { {10,3,rrr,S,V,V}, /* sub.s */ {10,4,rrr,S,V,V}, /* sub.d */ {4,3,rrr,S,V,V}, /* div.s */ @@ -697,7 +693,7 @@ CONST struct formstr e0_format0[] = { {4,16,rrr,V,S,V}, /* div.l.f */ }; -CONST struct formstr e0_format1[] = { +const struct formstr e0_format1[] = { {0,0,0,0,0,0}, {94,0,a3,0,0,0}, /* tst */ {95,0,a3,0,0,0}, /* lck */ @@ -764,7 +760,7 @@ CONST struct formstr e0_format1[] = { {21,16,a2r,V,0,0}, /* st.l.f */ }; -CONST struct formstr e0_format2[] = { +const struct formstr e0_format2[] = { {28,5,rr,V,V,0}, /* cvtw.b */ {28,6,rr,V,V,0}, /* cvtw.h */ {29,7,rr,V,V,0}, /* cvtb.w */ @@ -895,7 +891,7 @@ CONST struct formstr e0_format2[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e0_format3[] = { +const struct formstr e0_format3[] = { {32,11,rr,V,V,0}, /* cvtd.s.f */ {31,12,rr,V,V,0}, /* cvts.d.f */ {33,12,rr,V,V,0}, /* cvtl.d.f */ @@ -962,7 +958,7 @@ CONST struct formstr e0_format3[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e0_format4[] = { +const struct formstr e0_format4[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -973,7 +969,7 @@ CONST struct formstr e0_format4[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e0_format5[] = { +const struct formstr e0_format5[] = { {51,13,rr,V,V,0}, /* ldvi.b.f */ {51,14,rr,V,V,0}, /* ldvi.h.f */ {51,15,rr,V,V,0}, /* ldvi.w.f */ @@ -992,7 +988,7 @@ CONST struct formstr e0_format5[] = { {52,16,rxr,S,V,0}, /* stvi.l.f */ }; -CONST struct formstr e0_format6[] = { +const struct formstr e0_format6[] = { {0,0,rxl,S,CIR,0}, /* mov */ {0,0,lr,CIR,S,0}, /* mov */ {0,0,lr,TOC,S,0}, /* mov */ @@ -1059,7 +1055,7 @@ CONST struct formstr e0_format6[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e0_format7[] = { +const struct formstr e0_format7[] = { {84,13,r,V,0,0}, /* sum.b.f */ {84,14,r,V,0,0}, /* sum.h.f */ {84,15,r,V,0,0}, /* sum.w.f */ @@ -1094,7 +1090,7 @@ CONST struct formstr e0_format7[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e1_format0[] = { +const struct formstr e1_format0[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -1161,7 +1157,7 @@ CONST struct formstr e1_format0[] = { {4,23,rrr,V,S,V}, /* div.l.t */ }; -CONST struct formstr e1_format1[] = { +const struct formstr e1_format1[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -1228,7 +1224,7 @@ CONST struct formstr e1_format1[] = { {21,23,a2r,V,0,0}, /* st.l.t */ }; -CONST struct formstr e1_format2[] = { +const struct formstr e1_format2[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -1359,7 +1355,7 @@ CONST struct formstr e1_format2[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e1_format3[] = { +const struct formstr e1_format3[] = { {32,18,rr,V,V,0}, /* cvtd.s.t */ {31,19,rr,V,V,0}, /* cvts.d.t */ {33,19,rr,V,V,0}, /* cvtl.d.t */ @@ -1426,7 +1422,7 @@ CONST struct formstr e1_format3[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e1_format4[] = { +const struct formstr e1_format4[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -1437,7 +1433,7 @@ CONST struct formstr e1_format4[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e1_format5[] = { +const struct formstr e1_format5[] = { {51,20,rr,V,V,0}, /* ldvi.b.t */ {51,21,rr,V,V,0}, /* ldvi.h.t */ {51,22,rr,V,V,0}, /* ldvi.w.t */ @@ -1456,7 +1452,7 @@ CONST struct formstr e1_format5[] = { {52,23,rxr,S,V,0}, /* stvi.l.t */ }; -CONST struct formstr e1_format6[] = { +const struct formstr e1_format6[] = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, @@ -1523,7 +1519,7 @@ CONST struct formstr e1_format6[] = { {0,0,0,0,0,0}, }; -CONST struct formstr e1_format7[] = { +const struct formstr e1_format7[] = { {84,20,r,V,0,0}, /* sum.b.t */ {84,21,r,V,0,0}, /* sum.h.t */ {84,22,r,V,0,0}, /* sum.w.t */ diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h index 0171f62..71c204c 100644 --- a/contrib/binutils/include/opcode/i386.h +++ b/contrib/binutils/include/opcode/i386.h @@ -121,9 +121,9 @@ static const template i386_optab[] = { {"movslq", 2, 0x63, X, Cpu64, NoSuf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} }, /* Intel Syntax next 5 insns */ {"movsx", 2, 0x0fbe, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} }, -{"movsx", 2, 0x0fbf, X, Cpu386, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} }, +{"movsx", 2, 0x0fbf, X, Cpu386, w_Suf|Modrm, { Reg16|ShortMem, Reg32, 0} }, {"movsx", 2, 0x0fbe, X, Cpu64, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} }, -{"movsx", 2, 0x0fbf, X, Cpu64, w_Suf|Modrm|IgnoreSize|Rex64, { Reg16|ShortMem, Reg64, 0} }, +{"movsx", 2, 0x0fbf, X, Cpu64, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} }, {"movsx", 2, 0x63, X, Cpu64, l_Suf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} }, /* Move with zero extend. */ @@ -135,11 +135,11 @@ static const template i386_optab[] = { {"movzwq", 2, 0x0fb7, X, Cpu64, NoSuf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} }, /* Intel Syntax next 4 insns */ {"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} }, -{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} }, +{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm, { Reg16|ShortMem, Reg32, 0} }, /* These instructions are not particulary usefull, since the zero extend 32->64 is implicit, but we can encode them. */ {"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} }, -{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize|Rex64, { Reg16|ShortMem, Reg64, 0} }, +{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} }, /* Push instructions. */ {"push", 1, 0x50, X, CpuNo64, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } }, diff --git a/contrib/binutils/include/opcode/ia64.h b/contrib/binutils/include/opcode/ia64.h index 642330c..d4e6d10 100644 --- a/contrib/binutils/include/opcode/ia64.h +++ b/contrib/binutils/include/opcode/ia64.h @@ -1,5 +1,5 @@ /* ia64.h -- Header file for ia64 opcode table - Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com> + Copyright (C) 1998, 1999, 2002 David Mosberger-Tang <davidm@hpl.hp.com> See the file HP-COPYRIGHT for additional information. */ @@ -8,7 +8,7 @@ #include <sys/types.h> -#include <bfd.h> +#include "bfd.h" typedef BFD_HOST_U_64_BIT ia64_insn; diff --git a/contrib/binutils/include/opcode/sparc.h b/contrib/binutils/include/opcode/sparc.h index 5b6b5d1..c412923 100644 --- a/contrib/binutils/include/opcode/sparc.h +++ b/contrib/binutils/include/opcode/sparc.h @@ -1,5 +1,5 @@ /* Definitions for opcode table for the sparc. - Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 + Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and @@ -20,7 +20,7 @@ along with GAS or GDB; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> +#include "ansidecl.h" /* The SPARC opcode table (and other related data) is defined in the opcodes library in sparc-opc.c. If you change anything here, make diff --git a/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h index 851422a..885a79b 100644 --- a/contrib/binutils/include/partition.h +++ b/contrib/binutils/include/partition.h @@ -1,5 +1,5 @@ /* List implementation of a partition of consecutive integers. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC. This file is part of GCC. @@ -40,7 +40,7 @@ extern "C" { #endif /* __cplusplus */ -#include <ansidecl.h> +#include "ansidecl.h" #include <stdio.h> struct partition_elem diff --git a/contrib/binutils/include/sort.h b/contrib/binutils/include/sort.h index b974059..3f3a92f 100644 --- a/contrib/binutils/include/sort.h +++ b/contrib/binutils/include/sort.h @@ -1,5 +1,5 @@ /* Sorting algorithms. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. Contributed by Mark Mitchell <mark@codesourcery.com>. This file is part of GCC. @@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */ extern "C" { #endif /* __cplusplus */ -#include <ansidecl.h> +#include "ansidecl.h" /* Sort an array of pointers. */ diff --git a/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h index 6903969..23f7ac6 100644 --- a/contrib/binutils/include/splay-tree.h +++ b/contrib/binutils/include/splay-tree.h @@ -1,5 +1,5 @@ /* A splay-tree datatype. - Copyright 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GCC. @@ -34,7 +34,7 @@ Boston, MA 02111-1307, USA. */ extern "C" { #endif /* __cplusplus */ -#include <ansidecl.h> +#include "ansidecl.h" /* Use typedefs for the key and data types to facilitate changing these types, if necessary. These types should be sufficiently wide @@ -61,6 +61,18 @@ typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value)); /* The type of a function used to iterate over the tree. */ typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*)); +/* The type of a function used to allocate memory for tree root and + node structures. The first argument is the number of bytes needed; + the second is a data pointer the splay tree functions pass through + to the allocator. This function must never return zero. */ +typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *)); + +/* The type of a function used to free memory allocated using the + corresponding splay_tree_allocate_fn. The first argument is the + memory to be freed; the latter is a data pointer the splay tree + functions pass through to the freer. */ +typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *)); + /* The nodes in the splay tree. */ struct splay_tree_node_s { @@ -89,11 +101,24 @@ typedef struct splay_tree_s /* The deallocate-value function. NULL if no cleanup is necessary. */ splay_tree_delete_value_fn delete_value; + + /* Allocate/free functions, and a data pointer to pass to them. */ + splay_tree_allocate_fn allocate; + splay_tree_deallocate_fn deallocate; + void *allocate_data; + } *splay_tree; extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn, splay_tree_delete_key_fn, splay_tree_delete_value_fn)); +extern splay_tree splay_tree_new_with_allocator + PARAMS((splay_tree_compare_fn, + splay_tree_delete_key_fn, + splay_tree_delete_value_fn, + splay_tree_allocate_fn, + splay_tree_deallocate_fn, + void *)); extern void splay_tree_delete PARAMS((splay_tree)); extern splay_tree_node splay_tree_insert PARAMS((splay_tree, diff --git a/contrib/binutils/include/xregex2.h b/contrib/binutils/include/xregex2.h index b9c2d97..2991daf 100644 --- a/contrib/binutils/include/xregex2.h +++ b/contrib/binutils/include/xregex2.h @@ -529,10 +529,16 @@ extern int re_exec _RE_ARGS ((const char *)); # endif # endif #endif -/* For now unconditionally define __restrict_arr to expand to nothing. - Ideally we would have a test for the compiler which allows defining - it to restrict. */ -#define __restrict_arr + +/* GCC 3.1 and later support declaring arrays as non-overlapping + using the syntax array_name[restrict] */ +#ifndef __restrict_arr +# if ! (3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) || defined (__GNUG__) +# define __restrict_arr +# else +# define __restrict_arr __restrict +# endif +#endif /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, 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/Makefile.in b/contrib/binutils/ld/Makefile.in index 3a652fe..f9d9fa4 100644 --- a/contrib/binutils/ld/Makefile.in +++ b/contrib/binutils/ld/Makefile.in @@ -103,6 +103,8 @@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +bfdincludedir = @bfdincludedir@ +bfdlibdir = @bfdlibdir@ l = @l@ INTLLIBS = @INTLLIBS@ @@ -229,6 +231,7 @@ ALL_EMULATIONS = \ earmelf_fbsd.o \ earmelf_linux.o \ earmelf_nbsd.o \ + earmelfb_nbsd.o \ earmelf_oabi.o \ earmnbsd.o \ earmpe.o \ @@ -240,6 +243,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 \ @@ -249,6 +257,7 @@ ALL_EMULATIONS = \ ed30v_o.o \ ed30velf.o \ edelta68.o \ + eelf32_dlx.o \ eebmon29k.o \ eelf32_i960.o \ eelf32_i860.o \ @@ -261,6 +270,7 @@ ALL_EMULATIONS = \ eelf32ebmip.o \ eelf32elmip.o \ eelf32fr30.o \ + eelf32frv.o \ eelf32i370.o \ eelf32l4300.o \ eelf32lmip.o \ @@ -272,6 +282,8 @@ ALL_EMULATIONS = \ eelf32ppc_fbsd.o \ eelf32ppclinux.o \ eelf32ppcsim.o \ + eelf32ppcwindiss.o \ + eelf32vax.o \ eelf32xstormy16.o \ eelf_i386.o \ eelf_i386_be.o \ @@ -297,6 +309,7 @@ ALL_EMULATIONS = \ ehppaelf.o \ ehppalinux.o \ ehppanbsd.o \ + ehppaobsd.o \ ei386aout.o \ ei386beos.o \ ei386bsd.o \ @@ -308,6 +321,7 @@ ALL_EMULATIONS = \ ei386moss.o \ ei386msdos.o \ ei386nbsd.o \ + ei386nto.o \ ei386nw.o \ ei386pe.o \ ei386pe_posix.o \ @@ -351,6 +365,8 @@ ALL_EMULATIONS = \ esh.o \ eshelf32.o \ eshlelf32.o \ + eshelf32_nbsd.o \ + eshlelf32_nbsd.o \ eshelf.o \ eshelf_linux.o \ eshlelf_linux.o \ @@ -372,6 +388,7 @@ ALL_EMULATIONS = \ etic80coff.o \ evanilla.o \ evax.o \ + evaxnbsd.o \ evsta.o \ ew65.o \ ez8001.o \ @@ -384,6 +401,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 \ @@ -1074,6 +1093,12 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY) 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)" @@ -1107,6 +1132,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)" @@ -1157,6 +1188,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)" @@ -1184,6 +1235,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)" @@ -1191,9 +1245,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)" @@ -1255,6 +1315,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} @@ -1358,7 +1420,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 \ @@ -1430,6 +1492,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)" @@ -1466,6 +1532,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)" @@ -1607,9 +1676,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} @@ -1635,10 +1714,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} @@ -1685,6 +1775,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)" @@ -1819,24 +1912,24 @@ mostlyclean-local: .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 @@ -1929,7 +2022,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 \ @@ -1939,13 +2033,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 \ @@ -1986,9 +2080,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.host b/contrib/binutils/ld/configure.host index 65c2fc7..56ed187 100644 --- a/contrib/binutils/ld/configure.host +++ b/contrib/binutils/ld/configure.host @@ -12,7 +12,7 @@ HDEFINES= HOSTING_CRT0=/lib/crt0.o HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo $libgcc -lc $libgcc`' -NATIVE_LIB_DIRS= +NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib' # # Generic configurations: @@ -21,7 +21,7 @@ NATIVE_LIB_DIRS= case "${host}" in *-*-freebsd*) - NATIVE_LIB_DIRS=/usr/lib + NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib' # Older versions of gcc do not use a specs file. In those cases, # gcc -print-file-name=specs will simply print specs. We create a # dummy specs files to handle this. @@ -57,11 +57,6 @@ case "${host}" in ;; alpha*-*-netbsd*) - # The new BSD `make' has a bug: it doesn't pass empty arguments in - # shell commands. So we need to make this value non-empty in order - # for the genscripts.sh call to work. There's nothing magic about - # the value `/lib'; it's just a dummy. - NATIVE_LIB_DIRS=/lib HOSTING_CRT0=/usr/lib/crt0.o ;; @@ -69,19 +64,21 @@ arm*-*-linux-gnu*) HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"` ;; +hppa*64*-*-hpux11*) + NATIVE_LIB_DIRS=/usr/lib/pa20_64 + HOSTING_CRT0=/usr/ccs/lib/pa20_64/crt0.o + # Even if CC is not gcc, the tests use gcc. + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a' + ;; + i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*) - # The new BSD `make' has a bug: it doesn't pass empty arguments in - # shell commands. So we need to make this value non-empty in order - # for the genscripts.sh call to work. There's nothing magic about - # the value `/lib'; it's just a dummy. - NATIVE_LIB_DIRS=/lib HOSTING_CRT0=/usr/lib/crt0.o ;; i[3456]86-*-sysv4*) HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o' - NATIVE_LIB_DIRS=/usr/ccs/lib + NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' ;; i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*) @@ -97,7 +94,7 @@ i[3456]86-*-sysv*) i[3456]86-*-solaris*) HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' - NATIVE_LIB_DIRS=/usr/ccs/lib + NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' ;; i[3456]86-*-sco* | i[3456]86-*-isc*) @@ -122,7 +119,7 @@ i[3456]86-*-lynxos*) i[3456]86-pc-interix*) HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o' - NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/' + NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib' HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a' ;; @@ -137,7 +134,7 @@ ia64-*-linux-gnu*) ia64-*-aix*) HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' - NATIVE_LIB_DIRS=/usr/lib/ia64l64 + NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib' ;; mips*-dec-bsd*) @@ -202,7 +199,7 @@ s390-*-linux-gnu*) sparc*-*-solaris2*) HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`' HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`' - NATIVE_LIB_DIRS=/usr/ccs/lib + NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' ;; sparc-*-linux-gnu*) @@ -224,7 +221,6 @@ x86_64-*-linux-gnu*) ;; *-*-netbsd*) - NATIVE_LIB_DIRS=/usr/lib # NetBSD typically does not use the GCC crtstuff, so ignore it. HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o' HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o' @@ -232,11 +228,7 @@ x86_64-*-linux-gnu*) alpha*-*-*) HOSTING_CRT0=/usr/ccs/lib/crt0.o - NATIVE_LIB_DIRS=/usr/ccs/lib - ;; - -romp-*-*) - HDEFINES=-DNO_VARARGS + NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib' ;; esac 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/configure.tgt b/contrib/binutils/ld/configure.tgt index 08f5cbe..c1d7620 100644 --- a/contrib/binutils/ld/configure.tgt +++ b/contrib/binutils/ld/configure.tgt @@ -22,7 +22,7 @@ arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; arc-*-elf*) targ_emul=arcelf ;; avr-*-*) targ_emul=avr85xx - targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;; + targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161 avr1 avr2 avr3 avr4 avr5" ;; cris-*-*aout*) targ_emul=crisaout targ_extra_emuls="criself crislinux" targ_extra_libpath=$targ_extra_emuls ;; @@ -33,6 +33,7 @@ d10v-*-*) targ_emul=d10velf ;; d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;; d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;; d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;; +dlx-*-elf*) targ_emul=elf32_dlx ;; sparc64-*-aout*) targ_emul=sparcaout ;; sparc64-*-elf*) targ_emul=elf64_sparc ;; sparc-sun-sunos4*) targ_emul=sun4 ;; @@ -69,7 +70,8 @@ sparc*-*-linux-gnu*) targ_emul=elf32_sparc tdir_sun4=sparc-sun-sunos4 ;; sparc*-*-lynxos*) targ_emul=sparclynx ;; -sparc64-*-netbsd*) targ_emul=elf64_sparc +sparc64-*-netbsd* | sparc64-*-openbsd*) + targ_emul=elf64_sparc targ_extra_emuls="elf32_sparc" ;; sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;; @@ -118,6 +120,7 @@ m68*-ericsson-ose) targ_emul=sun3 ;; m68*-apple-aux*) targ_emul=m68kaux ;; *-tandem-none) targ_emul=st2000 ;; i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; +i[3456]86-*-nto-qnx*) targ_emul=i386nto ;; i[3456]86-*-vsta) targ_emul=vsta ;; i[3456]86-go32-rtems*) targ_emul=i386go32 ;; i[3456]86-*-go32) targ_emul=i386go32 ;; @@ -160,6 +163,9 @@ i[3456]86-*-solaris*) targ_emul=elf_i386_ldso i[3456]86-*-netbsdelf*) targ_emul=elf_i386 targ_extra_emuls=i386nbsd ;; +i[3456]86-*-netbsdpe*) targ_emul=i386pe + targ_extra_ofiles="deffilep.o pe-dll.o" + ;; i[3456]86-*-netbsd*) targ_emul=i386nbsd targ_extra_emuls=elf_i386 ;; @@ -217,10 +223,12 @@ arm-*-coff) targ_emul=armcoff ;; arm-*-vxworks) targ_emul=armcoff ;; arm-*-freebsd*) targ_emul=armelf_fbsd targ_extra_emuls="armelf" ;; +armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; + targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; arm-*-netbsdelf*) targ_emul=armelf_nbsd; - targ_extra_emuls="armelf armnbsd" ;; + targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;; arm-*-netbsd*) targ_emul=armnbsd; - targ_extra_emuls="armelf armelf_nbsd" ;; + targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;; arm-*-openbsd*) targ_emul=armnbsd ;; arm-*-rtems*) targ_emul=armelf ;; arm-*-elf) targ_emul=armelf ;; @@ -263,6 +271,22 @@ sh*eb-*-linux*) sh*-*-linux*) targ_emul=shlelf_linux ;; +sh5le-*-netbsd*) + targ_emul=shlelf32_nbsd + targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" + ;; +sh5-*-netbsd*) + targ_emul=shelf32_nbsd + targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" + ;; +sh64le-*-netbsd*) + targ_emul=shlelf64_nbsd + targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" + ;; +sh64-*-netbsd*) + targ_emul=shelf64_nbsd + targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" + ;; sh*le-*-netbsdelf*) targ_emul=shlelf_nbsd targ_extra_emuls=shelf_nbsd @@ -271,13 +295,22 @@ sh*-*-netbsdelf*) targ_emul=shelf_nbsd targ_extra_emuls=shlelf_nbsd ;; -sh-*-elf* | sh-*-rtemself*) +shle*-*-elf* | sh[1234]*le*-*-elf) + targ_emul=shlelf + targ_extra_emuls="shelf shl sh" + ;; +sh-*-elf* | sh[1234]*-*-elf | sh-*-rtemself*) targ_emul=shelf targ_extra_emuls="shlelf sh shl" ;; sh-*-pe) targ_emul=shpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;; +sh64le-*-elf*) + targ_emul=shlelf + targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64" + targ_extra_libpath=$targ_extra_emuls + ;; sh64-*-elf*) targ_emul=shelf targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64" @@ -316,8 +349,14 @@ hppa*-*-linux-gnu*) targ_emul=hppalinux ;; hppa*-*-*elf*) targ_emul=hppaelf ;; hppa*-*-lites*) targ_emul=hppaelf ;; hppa*-*-netbsd*) targ_emul=hppanbsd ;; +hppa*-*-openbsd*) targ_emul=hppaobsd ;; hppa*-*-rtems*) targ_emul=hppaelf ;; vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;; +vax-*-netbsdelf*) targ_emul=elf32vax + targ_extra_emuls=vaxnbsd ;; +vax-*-netbsdaout* | vax-*-netbsd*) + targ_emul=vaxnbsd + targ_extra_emuls=elf32vax ;; mips*-*-pe) targ_emul=mipspe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; mips*-dec-ultrix*) targ_emul=mipslit ;; @@ -376,9 +415,10 @@ alpha*-*-osf*) targ_emul=alpha ;; alpha*-*-gnu*) targ_emul=elf64alpha ;; alpha*-*-netware*) targ_emul=alpha ;; alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;; +alpha*-*-openbsd*) targ_emul=elf64alpha ;; z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;; ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; -ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;; +ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;; openrisc-*-*) targ_emul=elf32openrisc ;; or32-*-coff) targ_emul=or32 ;; or32-*-elf) targ_emul=or32elf ;; @@ -394,7 +434,11 @@ powerpc-*-freebsd*) targ_emul=elf32ppc_fbsd; powerpc*-*-linux*) case "${targ}" in *64*) targ_emul=elf64ppc - targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim" ;; + targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim" + targ_extra_libpath=elf32ppclinux + tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` + tdir_elf32ppclinux=$tdir_elf32ppc + tdir_elf32ppcsim=$tdir_elf32ppc ;; *) targ_emul=elf32ppclinux targ_extra_emuls="elf32ppc elf32ppcsim" targ_extra_libpath=elf32ppc ;; @@ -403,15 +447,20 @@ powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \ | powerpc*le-*-sysv* | powerpc*le-*-vxworks*) case "${targ}" in *64*) targ_emul=elf64lppc - targ_extra_emuls="elf32lppc elf32ppcsim" ;; + targ_extra_emuls="elf32lppc elf32lppcsim" + tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'` + tdir_elf32lppcsim=$tdir_elf32lppc ;; *) targ_emul=elf32lppc targ_extra_emuls="elf32ppcsim" ;; esac ;; powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ - | powerpc*-*-netbsd* | powerpc*-*-vxworks*) + | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-vxworks*) case "${targ}" in *64*) targ_emul=elf64ppc - targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;; + targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" + tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` + tdir_elf32ppclinux=$tdir_elf32ppc + tdir_elf32ppcsim=$tdir_elf32ppc ;; *) targ_emul=elf32ppc targ_extra_emuls="elf32ppclinux elf32ppcsim" ;; esac ;; @@ -422,8 +471,11 @@ powerpc-*-netware*) targ_emul=ppcnw ;; powerpcle-*-pe) targ_emul=ppcpe ;; powerpcle-*-winnt*) targ_emul=ppcpe ;; powerpcle-*-cygwin*) targ_emul=ppcpe ;; +powerpc-*-aix5*) targ_emul=aix5ppc ;; powerpc-*-aix*) targ_emul=aixppc ;; powerpc-*-beos*) targ_emul=aixppc ;; +powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;; +rs6000-*-aix5*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; tic30-*-*aout*) targ_emul=tic30aout ;; tic30-*-*coff*) targ_emul=tic30coff ;; @@ -432,6 +484,7 @@ tic80-*-*) targ_emul=tic80coff ;; v850-*-*) targ_emul=v850 ;; v850e-*-*) targ_emul=v850 ;; v850ea-*-*) targ_emul=v850 ;; +frv-*-*) targ_emul=elf32frv ;; w65-*-*) targ_emul=w65 ;; xstormy16-*-*) targ_emul=elf32xstormy16 ;; fr30-*-*) targ_emul=elf32fr30 ;; 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.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh index 9f42fd9..3dd28ef 100644 --- a/contrib/binutils/ld/emulparams/elf64alpha.sh +++ b/contrib/binutils/ld/emulparams/elf64alpha.sh @@ -5,13 +5,15 @@ TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-alpha" TEXT_START_ADDR="0x120000000" MAXPAGESIZE=0x10000 +COMMONPAGESIZE=0x2000 NONPAGED_TEXT_START_ADDR="0x120000000" ARCH=alpha MACHINE= GENERATE_SHLIB_SCRIPT=yes DATA_PLT= -# Note that the string of digits is little-endian. -NOP=0x0000fe2f # unop +# Note that the number is always big-endian, thus we have to +# reverse the digit string. +NOP=0x0000fe2f1f04ff47 # unop; nop OTHER_READONLY_SECTIONS=" .reginfo ${RELOCATING-0} : { *(.reginfo) }" diff --git a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh 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/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index b2fe3d7..26e4c46 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -281,6 +281,13 @@ gld${EMULATION_NAME}_try_needed (name, force) return false; } + /* For DT_NEEDED, they have to match. */ + if (abfd->xvec != output_bfd->xvec) + { + bfd_close (abfd); + return false; + } + /* Check whether this object would include any conflicting library versions. If FORCE is set, then we skip this check; we use this the second time around, if we couldn't find any compatible @@ -1107,7 +1114,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) #define HAVE_SECTION(hold, name) \ (hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL) - if (s->flags & SEC_EXCLUDE) + if ((s->flags & SEC_EXCLUDE) != 0 && !link_info.relocateable) { if (s->output_section == NULL) s->output_section = bfd_abs_section_ptr; @@ -1222,7 +1229,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') { @@ -1242,7 +1249,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) /* Restore the global list pointer. */ stat_ptr = old; - if (place != NULL) + if (place != NULL && os->bfd_section != NULL) { asection *snew, **pps; @@ -1338,7 +1345,7 @@ gld${EMULATION_NAME}_finish () /* 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); } } EOF @@ -1376,13 +1383,17 @@ echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME} sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c fi if test -n "$GENERATE_SHLIB_SCRIPT" ; then +if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c +fi echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c fi +if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c +fi echo ' ; else return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c echo '; }' >> e${EMULATION_NAME}.c @@ -1541,6 +1552,8 @@ cat >>e${EMULATION_NAME}.c <<EOF } else if (strcmp (optarg, "defs") == 0) link_info.no_undefined = true; + else if (strcmp (optarg, "muldefs") == 0) + link_info.allow_multiple_definition = true; else if (strcmp (optarg, "combreloc") == 0) link_info.combreloc = true; else if (strcmp (optarg, "nocombreloc") == 0) @@ -1589,6 +1602,7 @@ cat >>e${EMULATION_NAME}.c <<EOF fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n")); fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n")); fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n")); + fprintf (file, _(" -z muldefs\t\tAllow multiple definitions\n")); fprintf (file, _(" -z nocombreloc\tDon't merge dynamic relocs into one section\n")); fprintf (file, _(" -z nocopyreloc\tDon't create copy relocs\n")); fprintf (file, _(" -z nodefaultlib\tMark object not to use default search paths\n")); @@ -1656,5 +1670,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = ${LDEMUL_LIST_OPTIONS-gld${EMULATION_NAME}_list_options}, ${LDEMUL_RECOGNIZED_FILE-NULL}, ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL}, + ${LDEMUL_NEW_VERS_PATTERN-NULL} }; EOF diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em 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.1 b/contrib/binutils/ld/ld.1 index 272a133..79d5d65 100644 --- a/contrib/binutils/ld/ld.1 +++ b/contrib/binutils/ld/ld.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "LD 1" -.TH LD 1 "2002-05-11" "binutils-2.12.1" "GNU Development Tools" +.TH LD 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools" .UC .SH "NAME" ld \- Using \s-1LD\s0, the \s-1GNU\s0 linker @@ -175,7 +175,7 @@ object files on a standard, supported Unix system. On such a system, to link a file \f(CW\*(C`hello.o\*(C'\fR: .PP .Vb 1 -\& ld -o I<output> /lib/crt0.o hello.o -lc +\& ld -o <output> /lib/crt0.o hello.o -lc .Ve This tells \fBld\fR to produce a file called \fIoutput\fR as the result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and @@ -737,6 +737,7 @@ of this object will ignore any default library search paths. \&\f(CW\*(C`now\*(C'\fR marks the object with the non-lazy runtime binding. \&\f(CW\*(C`origin\*(C'\fR marks the object may contain \f(CW$ORIGIN\fR. \&\f(CW\*(C`defs\*(C'\fR disallows undefined symbols. +\&\f(CW\*(C`muldefs\*(C'\fR allows multiple definitions. \&\f(CW\*(C`combreloc\*(C'\fR combines multiple reloc sections and sorts them to make dynamic symbol lookup caching possible. \&\f(CW\*(C`nocombreloc\*(C'\fR disables multiple reloc sections combining. @@ -936,6 +937,15 @@ while linking a large executable. 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. +.IP "\fB\-\-allow\-multiple\-definition\fR" 4 +.IX Item "--allow-multiple-definition" +.PD 0 +.IP "\fB\-z muldefs\fR" 4 +.IX Item "-z muldefs" +.PD +Normally when a symbol is defined multiple times, the linker will +report a fatal error. These options allow multiple definitions and the +first definition will be used. .IP "\fB\-\-allow\-shlib\-undefined\fR" 4 .IX Item "--allow-shlib-undefined" Allow undefined symbols in shared objects even when \-\-no\-undefined is @@ -1232,9 +1242,9 @@ Turning a common symbol into a reference, because there is already a definition for the symbol. .Sp .Vb 3 -\& I<file>(I<section>): warning: common of `I<symbol>' +\& <file>(<section>): warning: common of `<symbol>' \& overridden by definition -\& I<file>(I<section>): warning: defined here +\& <file>(<section>): warning: defined here .Ve .IP "2." 4 Turning a common symbol into a reference, because a later definition for @@ -1242,25 +1252,25 @@ the symbol is encountered. This is the same as the previous case, except that the symbols are encountered in a different order. .Sp .Vb 3 -\& I<file>(I<section>): warning: definition of `I<symbol>' +\& <file>(<section>): warning: definition of `<symbol>' \& overriding common -\& I<file>(I<section>): warning: common is here +\& <file>(<section>): warning: common is here .Ve .IP "3." 4 Merging a common symbol with a previous same-sized common symbol. .Sp .Vb 3 -\& I<file>(I<section>): warning: multiple common -\& of `I<symbol>' -\& I<file>(I<section>): warning: previous common is here +\& <file>(<section>): warning: multiple common +\& of `<symbol>' +\& <file>(<section>): warning: previous common is here .Ve .IP "4." 4 Merging a common symbol with a previous larger common symbol. .Sp .Vb 3 -\& I<file>(I<section>): warning: common of `I<symbol>' +\& <file>(<section>): warning: common of `<symbol>' \& overridden by larger common -\& I<file>(I<section>): warning: larger common is here +\& <file>(<section>): warning: larger common is here .Ve .IP "5." 4 Merging a common symbol with a previous smaller common symbol. This is @@ -1268,9 +1278,9 @@ the same as the previous case, except that the symbols are encountered in a different order. .Sp .Vb 3 -\& I<file>(I<section>): warning: common of `I<symbol>' +\& <file>(<section>): warning: common of `<symbol>' \& overriding smaller common -\& I<file>(I<section>): warning: smaller common is here +\& <file>(<section>): warning: smaller common is here .Ve .RE .RS 4 @@ -1437,6 +1447,13 @@ These cygwin-excludes are: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR, .IX Item "--exclude-symbols symbol,symbol,..." Specifies a list of symbols which should not be automatically exported. The symbol names may be delimited by commas or colons. +.IP "\fB\-\-exclude\-libs\fR \fIlib\fR\fB,\fR\fIlib\fR\fB,...\fR" 4 +.IX Item "--exclude-libs lib,lib,..." +Specifies a list of archive libraries from which symbols should not be automatically +exported. The library names may be delimited by commas or colons. Specifying +\&\f(CW\*(C`\-\-exclude\-libs ALL\*(C'\fR excludes symbols in all archive libraries from +automatic export. Symbols explicitly listed in a .def file are still exported, +regardless of this option. .IP "\fB\-\-file\-alignment\fR" 4 .IX Item "--file-alignment" Specify the file alignment. Sections in the file will always begin at 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 (¤t_section->region, + ¤t_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 (®ion, &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 : diff --git a/contrib/binutils/libiberty/ChangeLog b/contrib/binutils/libiberty/ChangeLog index 08cf00d..47eca16 100644 --- a/contrib/binutils/libiberty/ChangeLog +++ b/contrib/binutils/libiberty/ChangeLog @@ -1,3 +1,174 @@ +2002-07-10 Jason Merrill <jason@redhat.com> + + * cp-demangle.c (demangle_identifier): Support extended Unicode + characters. + +2002-07-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * cp-demangle.c (demangle_v3_with_details): Wrap in + !defined IN_GLIBCPP_V3. + +2002-07-01 Mark Mitchell <mark@codesourcery.com> + + * cp-demangle.c (demangle_operator_name): Add type_arg parameter. + Set it for the "st" operator. + (demangle_expression): Handle expressions with types as arguments. + +2002-06-30 Douglas Rupp <rupp@gnat.com> + + * configure.in (OUTPUT_OPTION,NO_MINUS_C_MINUS_O): Configure. + * Makefile.in (OUTPUT_OPTION): Use. + +2002-06-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.in (install_to_libdir): Add $(DESTDIR). + (install_to_tooldir): Likewise. + +2002-06-17 Douglas Rupp <rupp@gnat.com> + + * lbasename.c: Add 2002 to copyright. + (IS_DIR_SEPARATOR): Remove VMS junk. + +2002-06-05 Geoffrey Keating <geoffk@redhat.com> + + * hashtab.c (htab_create): New stub function for backward + compatibility. + (htab_try_create): Likewise. + +2002-06-03 Geoffrey Keating <geoffk@redhat.com> + + * hashtab.c (htab_create): Delete. + (htab_try_create): Delete. + (htab_create_alloc): New. + (htab_delete): Support user-specified memory allocation. + (htab_expand): Likewise. + +2002-05-22 Roman Lechtchinsky <rl@cs.tu-berlin.de> + + * configure.in: Fix typo in the code checking for sys_errlist. + * configure: Regenerated. + +2002-05-13 Andreas Schwab <schwab@suse.de> + + * config.table: Use mh-x86pic also for x86-64. + +2002-05-08 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at + script entry, and set LD to it when configuring multilibs. + * configure: Rebuilt. + +2002-05-07 Mark Mitchell <mark@codesourcery.com> + + * configure.in (AC_TYPE_PID_T): Use it. + * configure: Regenerated. + * getruntime.c: Include <sys/types.h>. + * waitpid.c: Likewise. Use pid_t, not int, as the type of "pid". + +2002-04-09 Richard Henderson <rth@redhat.com> + + * hashtab.c (higher_prime_number): Use 7 as minimum. + (find_empty_slot_for_expand): Don't compute hash2 unless needed. + (htab_find_slot_with_hash): Likewise. + +2002-04-01 Phil Edwards <pme@gcc.gnu.org> + + * cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3. + (is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_ctor): Conditionally + not compile if IN_GLIBCPP_V3 defined. + * dyn-string.c: Also allow IN_GLIBCPP_V3 to change allocation scheme. + +2002-03-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * cp-demangle.c (java_demangle_v3): Don't try to release "demangled" + if it is NULL. + +2002-03-27 DJ Delorie <dj@redhat.com> + + * hex.c: Add documentation. + (_hex_value): Provide non-ASCII empty table. + (hex_init): Initialize the non-ASCII table. + * functions.texi: Regenerate. + +2002-03-27 Mark Mitchell <mark@codesourcery.com> + + * dyn-string.c: Add libgcc exception to copyright notice. + +2002-03-26 H.J. Lu (hjl@gnu.org) + + * config.table: Support --with-build-subdir. + * configure.in: Likewise. + * configure: Rebuild. + +2002-03-18 Stuart Griffith <Stuart_Griffith@credence.com> + + * strtod.c (strtod): Increment 8 chars, not 7, when `infinity' + seen. + +2002-03-12 Mark Mitchell <mark@codesourcery.com> + + * cp-demangle.c: Add libgcc exception to cp-demangle.c copyright + notice. + +2002-03-11 Douglas B Rupp <rupp@gnat.com> + + * xatexit.c [VMS]: Include stdlib.h and unixlib.h. + +2002-03-06 Jim Blandy <jimb@redhat.com> + + * splay-tree.c (splay_tree_xmalloc_allocate, + splay_tree_xmalloc_deallocate): Use K&R-style definitions, not + prototyped definitions. Mark `data' arguments as unused. + +2002-03-06 Andrew Cagney <ac131313@redhat.com> + + * floatformat.c (floatformat_arm_ext_big): Delete definition. + +2002-03-04 Phil Edwards <pme@gcc.gnu.org> + + * configure.in: Add --enable-install-libiberty option. + * Makefile.in (INSTALLED_HEADERS): New variable. + (install_to_libdir): Possibly also copy headers. + * configure: Regenerated. + +2002-03-04 Neil Booth <neil@daikokuya.demon.co.uk> + + * xmalloc.c (xmalloc_fail): Clarify error message further. + +2002-03-03 Neil Booth <neil@daikokuya.demon.co.uk> + + * xmalloc.c (xmalloc_fail): Clarify error message. + +2002-02-22 Jim Blandy <jimb@redhat.com> + + * splay-tree.c (splay_tree_xmalloc_allocate, + splay_tree_xmalloc_deallocate): New functions. + (splay_tree_new): Call splay_tree_new_with_allocator, passing the + above functions and a dummy data pointer. + (splay_tree_new_with_allocator): New function. + (splay_tree_delete_helper, splay_tree_delete, splay_tree_insert, + splay_tree_remove): Use the splay tree's allocation and + deallocation functions. + +2002-02-19 Scott Snyder <snyder@fnal.gov> + + * testsuite/demangle-expected: Add test case for infinite loop in + demangler. + * cplus-dem.c (demangle_arm_hp_template): Stop trying to demangle + if do_type() doesn't make any progress --- prevents an infinite + loop. + +2002-02-18 Carlo Wood <carlo@gnu.org> + + PR c++/5390 + * cplus-dem.c (demangle_integral_value): Accept multi-digit + numbers that do not start with an underscore; This is needed + for integer template parameters. This doesn't break anything + because multi-digit numbers are never followed by a digit. + * testsuite/demangle-expected: Corrected all mangled test + cases with multi-digit template parameters: g++ 2.95.x does + not generate underscores around these parameters. + 2002-02-05 Jason Merrill <jason@redhat.com> * cplus-dem.c (flags): Add DMGL_VERBOSE diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in index 5fa9630..5a25987 100644 --- a/contrib/binutils/libiberty/Makefile.in +++ b/contrib/binutils/libiberty/Makefile.in @@ -1,6 +1,6 @@ # # Makefile -# Copyright (C) 1990, 91-99, 2000, 2001 +# Copyright (C) 1990, 91-99, 2000, 2001, 2002 # Free Software Foundation # # This file is part of the libiberty library. @@ -34,6 +34,8 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ +includedir = @includedir@ +target_header_dir = @target_header_dir@ SHELL = @SHELL@ @@ -48,6 +50,10 @@ MULTICLEAN = true INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs + +# Some compilers can't handle cc -c blah.c -o foo/blah.o. +OUTPUT_OPTION = @OUTPUT_OPTION@ AR = @AR@ AR_FLAGS = rc @@ -114,7 +120,7 @@ COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiber if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $< -o pic/$@; \ else true; fi - $(COMPILE.c) $< + $(COMPILE.c) $< $(OUTPUT_OPTION) # NOTE: If you add new files to the library, add them to this list # (alphabetical), and add them to REQUIRED_OFILES, or @@ -181,6 +187,22 @@ CONFIGURED_OFILES = asprintf.o atexit.o \ vasprintf.o vfork.o vfprintf.o vprintf.o vsprintf.o \ waitpid.o +# These files are installed if the library has been configured to do so. +INSTALLED_HEADERS = \ + $(INCDIR)/ansidecl.h \ + $(INCDIR)/demangle.h \ + $(INCDIR)/dyn-string.h \ + $(INCDIR)/fibheap.h \ + $(INCDIR)/floatformat.h \ + $(INCDIR)/hashtab.h \ + $(INCDIR)/libiberty.h \ + $(INCDIR)/objalloc.h \ + $(INCDIR)/partition.h \ + $(INCDIR)/safe-ctype.h \ + $(INCDIR)/sort.h \ + $(INCDIR)/splay-tree.h \ + $(INCDIR)/ternary.h + $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) -rm -f $(TARGETLIB) pic/$(TARGETLIB) $(AR) $(AR_FLAGS) $(TARGETLIB) \ @@ -237,15 +259,25 @@ INSTALL_DEST = @INSTALL_DEST@ install: install_to_$(INSTALL_DEST) install-subdir install_to_libdir: all - $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n - ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) - mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n + ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) + mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ + case "${target_header_dir}" in \ + /*) thd=${target_header_dir};; \ + *) thd=${includedir}${MULTISUBDIR}/${target_header_dir};; \ + esac; \ + ${mkinstalldirs} $(DESTDIR)$${thd}; \ + for h in ${INSTALLED_HEADERS}; do \ + ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ + done; \ + fi @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install install_to_tooldir: all - $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n - ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) - mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n + ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) + mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB) @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install # needed-list is used by libstdc++. NEEDED is the list of functions diff --git a/contrib/binutils/libiberty/config.table b/contrib/binutils/libiberty/config.table index fa892c0..b9a2479 100644 --- a/contrib/binutils/libiberty/config.table +++ b/contrib/binutils/libiberty/config.table @@ -1,3 +1,9 @@ +# Don't build the shared library for build. +if [ -n "${with_build_subdir}" ]; then + enable_shared=no +fi + +frag= case "${host}" in rs6000-ibm-aix3.1 | rs6000-ibm-aix) frag=mh-aix ;; @@ -8,7 +14,11 @@ case "${host}" in i[345]86-*-windows*) frag=mh-windows ;; esac -frags=$frag +if [ -n "${frag}" ]; then + frags=${libiberty_topdir}/libiberty/config/$frag +else + frags= +fi # If they didn't specify --enable-shared, don't generate shared libs. case "${enable_shared}" in @@ -18,31 +28,27 @@ case "${enable_shared}" in *) shared=yes ;; esac if [ "${shared}" = "yes" ]; then + frag= case "${host}" in *-*-cygwin*) ;; - alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;; - arm*-*-*) frags="${frags} ../../config/mh-armpic" ;; - hppa*-*-*) frags="${frags} ../../config/mh-papic" ;; - i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;; + alpha*-*-linux*) frag=mh-elfalphapic ;; + arm*-*-*) frag=mh-armpic ;; + hppa*-*-*) frag=mh-papic ;; + i[3456]86-*-* | x86_64-*-*) + frag=mh-x86pic ;; powerpc*-*-aix*) ;; - powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;; - sparc*-*-*) frags="${frags} ../../config/mh-sparcpic" ;; - *-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;; + powerpc*-*-*) frag=mh-ppcpic ;; + sparc*-*-*) frag=mh-sparcpic ;; + *) frag=mh-${host_cpu}pic ;; esac + if [ -n "${frag}" ]; then + frags="${frags} ${libiberty_topdir}/config/${frag}" + fi fi echo "# Warning: this fragment is automatically generated" > temp-frag for frag in ${frags}; do - case ${frag} in - ../* ) - if [ ${srcdir} = . ]; then - [ -n "${with_target_subdir}" ] && frag=../${frag} - [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag} - fi - ;; - esac - frag=${srcdir}/${xsrcdir}config/$frag if [ -f ${frag} ]; then echo "Appending ${frag} to xhost-mkfrag" echo "# Following fragment copied from ${frag}" >> temp-frag diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure index 84c10ad..cac9f56 100755 --- a/contrib/binutils/libiberty/configure +++ b/contrib/binutils/libiberty/configure @@ -12,7 +12,9 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-target-subdir=SUBDIR Configuring in a subdirectory" + --with-target-subdir=SUBDIR Configuring in a subdirectory for target" +ac_help="$ac_help + --with-build-subdir=SUBDIR Configuring in a subdirectory for build" ac_help="$ac_help --with-cross-host=HOST Configuring with a cross compiler" ac_help="$ac_help @@ -21,6 +23,8 @@ ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" +ac_help="$ac_help + --enable-install-libiberty Install headers for end users" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -532,12 +536,24 @@ fi +# This works around the fact that libtool configuration may change LD +# for this particular configuration, but some shells, instead of +# keeping the changes in LD private, export them just because LD is +# exported. We don't use libtool yet, but some day we might, so... +ORIGINAL_LD_FOR_MULTILIBS=$LD + # Check whether --with-target-subdir or --without-target-subdir was given. if test "${with_target_subdir+set}" = set; then withval="$with_target_subdir" : fi +# Check whether --with-build-subdir or --without-build-subdir was given. +if test "${with_build_subdir+set}" = set; then + withval="$with_build_subdir" + : +fi + # Check whether --with-cross-host or --without-cross-host was given. if test "${with_cross_host+set}" = set; then withval="$with_cross_host" @@ -552,7 +568,10 @@ fi if test "${srcdir}" = "."; then - if test -z "${with_target_subdir}"; then + if test -n "${with_build_subdir}"; then + libiberty_topdir="${srcdir}/../.." + with_target_subdir= + elif test -z "${with_target_subdir}"; then libiberty_topdir="${srcdir}/.." else if test "${with_target_subdir}" != "."; then @@ -586,7 +605,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:590: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:609: 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" @@ -611,7 +630,7 @@ fi # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:615: checking for $ac_word" >&5 +echo "configure:634: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -657,7 +676,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:661: checking for $ac_word" >&5 +echo "configure:680: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -697,7 +716,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:701: checking host system type" >&5 +echo "configure:720: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -720,7 +739,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:724: checking build system type" >&5 +echo "configure:743: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -746,7 +765,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:750: checking for $ac_word" >&5 +echo "configure:769: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -778,7 +797,7 @@ fi # 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:782: checking for $ac_word" >&5 +echo "configure:801: 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 @@ -810,7 +829,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:814: checking for $ac_word" >&5 +echo "configure:833: 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 @@ -847,7 +866,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:851: checking for $ac_word" >&5 +echo "configure:870: 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 @@ -877,7 +896,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:881: checking for $ac_word" >&5 +echo "configure:900: 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 @@ -926,7 +945,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:930: checking whether we are using GNU C" >&5 +echo "configure:949: 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 @@ -935,7 +954,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:939: \"$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:958: \"$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 @@ -951,7 +970,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:955: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:974: 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 @@ -981,8 +1000,69 @@ fi +if test "x$CC" != xcc; then + echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 +echo "configure:1006: checking whether $CC and cc understand -c and -o together" >&5 +else + echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 +echo "configure:1009: checking whether cc understands -c and -o together" >&5 +fi +set dummy $CC; ac_cc="`echo $2 | + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'foo(){}' > conftest.c +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' +if { (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + ac_try='cc -c conftest.c -o conftest.o 1>&5' + if { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<\EOF +#define NO_MINUS_C_MINUS_O 1 +EOF + +fi + +# autoconf is lame and doesn't give us any substitution variable for this. +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then + NO_MINUS_C_MINUS_O=yes +else + OUTPUT_OPTION='-o $@' +fi + + + echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:986: checking for POSIXized ISC" >&5 +echo "configure:1066: 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 @@ -1003,12 +1083,12 @@ else fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1007: checking for working const" >&5 +echo "configure:1087: 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 1012 "configure" +#line 1092 "configure" #include "confdefs.h" int main() { @@ -1057,7 +1137,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1078,21 +1158,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1082: checking for inline" >&5 +echo "configure:1162: 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 1089 "configure" +#line 1169 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:1096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1135,7 +1215,7 @@ esac # 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:1139: checking for a BSD compatible install" >&5 +echo "configure:1219: 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 @@ -1196,7 +1276,7 @@ host_makefile_frag=${frag} # able to link anything, it had better be able to at least compile # something. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1200: checking how to run the C preprocessor" >&5 +echo "configure:1280: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1211,13 +1291,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 1215 "configure" +#line 1295 "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:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1301: \"$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 : @@ -1228,13 +1308,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1232 "configure" +#line 1312 "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:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1318: \"$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 : @@ -1245,13 +1325,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1249 "configure" +#line 1329 "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:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1335: \"$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 : @@ -1279,17 +1359,17 @@ for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1283: checking for $ac_hdr" >&5 +echo "configure:1363: 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 1288 "configure" +#line 1368 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1373: \"$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* @@ -1316,12 +1396,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1320: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1400: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1325 "configure" +#line 1405 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -1337,7 +1417,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1358,12 +1438,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1362: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1442: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1367 "configure" +#line 1447 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -1372,7 +1452,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1394,19 +1474,19 @@ fi echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6 -echo "configure:1398: checking whether errno must be declared" >&5 +echo "configure:1478: checking whether errno must be declared" >&5 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1403 "configure" +#line 1483 "configure" #include "confdefs.h" #include <errno.h> int main() { int x = errno; ; return 0; } EOF -if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libiberty_cv_declare_errno=no else @@ -1428,12 +1508,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1432: checking for ANSI C header files" >&5 +echo "configure:1512: 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 1437 "configure" +#line 1517 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1441,7 +1521,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1525: \"$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* @@ -1458,7 +1538,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 1462 "configure" +#line 1542 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1476,7 +1556,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 1480 "configure" +#line 1560 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1497,7 +1577,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1501 "configure" +#line 1581 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1508,7 +1588,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1532,12 +1612,12 @@ EOF fi echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6 -echo "configure:1536: checking for uintptr_t" >&5 +echo "configure:1616: checking for uintptr_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1541 "configure" +#line 1621 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1573,6 +1653,40 @@ EOF fi +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:1658: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1663 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + + # This is the list of functions which libiberty will provide if they # are not available on the host. @@ -1630,12 +1744,12 @@ if test "x" = "y"; then for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1634: checking for $ac_func" >&5 +echo "configure:1748: 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 1639 "configure" +#line 1753 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1658,7 +1772,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1776: \"$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 @@ -1685,12 +1799,12 @@ done for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1689: checking for $ac_func" >&5 +echo "configure:1803: 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 1694 "configure" +#line 1808 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1713,7 +1827,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1831: \"$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 @@ -1740,12 +1854,12 @@ done for ac_func in memmove memset putenv random rename rindex sigsetmask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1744: checking for $ac_func" >&5 +echo "configure:1858: 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 1749 "configure" +#line 1863 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1768,7 +1882,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1886: \"$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 @@ -1795,12 +1909,12 @@ done for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1799: checking for $ac_func" >&5 +echo "configure:1913: 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 1804 "configure" +#line 1918 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1823,7 +1937,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1941: \"$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 @@ -1850,12 +1964,12 @@ done for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1854: checking for $ac_func" >&5 +echo "configure:1968: 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 1859 "configure" +#line 1973 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1878,7 +1992,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1996: \"$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 @@ -1905,12 +2019,12 @@ done for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1909: checking for $ac_func" >&5 +echo "configure:2023: 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 1914 "configure" +#line 2028 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1933,7 +2047,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2051: \"$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 @@ -1960,12 +2074,12 @@ done for ac_func in sysconf times sbrk gettimeofday ffs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1964: checking for $ac_func" >&5 +echo "configure:2078: 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 1969 "configure" +#line 2083 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1988,7 +2102,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2106: \"$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 @@ -2032,6 +2146,7 @@ fi setobjs= CHECK= +target_header_dir= if test -n "${with_target_subdir}"; then # We are being configured as a target library. AC_REPLACE_FUNCS @@ -2072,6 +2187,30 @@ EOF fi + # We may wish to install the target headers somewhere. + # Check whether --enable-install-libiberty or --disable-install-libiberty was given. +if test "${enable_install_libiberty+set}" = set; then + enableval="$enable_install_libiberty" + enable_install_libiberty=$enableval +else + enable_install_libiberty=no +fi + + # Option parsed, now set things appropriately. + case x"$enable_install_libiberty" in + xyes|x) + target_header_dir=libiberty + ;; + xno) + target_header_dir= + ;; + *) + # This could be sanity-checked in various ways... + target_header_dir="${enable_install_libiberty}" + ;; + esac + + else # Not a target library, so we set things up to run the test suite. @@ -2081,6 +2220,7 @@ fi + case "${host}" in *-*-cygwin* | *-*-mingw*) cat >> confdefs.h <<\EOF @@ -2192,7 +2332,7 @@ if test -z "${setobjs}"; then # We haven't set the list of objects yet. Use the standard autoconf # tests. This will only work if the compiler works. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2336: 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. @@ -2203,12 +2343,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2207 "configure" +#line 2347 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2352: \"$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 @@ -2234,19 +2374,19 @@ 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:2238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2378: 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 for ac_func in $funcs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2245: checking for $ac_func" >&5 +echo "configure:2385: 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 2250 "configure" +#line 2390 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2269,7 +2409,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2413: \"$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 @@ -2296,12 +2436,12 @@ done echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2300: checking whether alloca needs Cray hooks" >&5 +echo "configure:2440: 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 2305 "configure" +#line 2445 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2326,12 +2466,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:2330: checking for $ac_func" >&5 +echo "configure:2470: 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 2335 "configure" +#line 2475 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2354,7 +2494,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2498: \"$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 @@ -2380,7 +2520,7 @@ fi fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2384: checking stack direction for C alloca" >&5 +echo "configure:2524: 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 @@ -2388,7 +2528,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2392 "configure" +#line 2532 "configure" #include "confdefs.h" find_stack_direction () { @@ -2407,7 +2547,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2551: \"$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 @@ -2427,52 +2567,19 @@ cat >> confdefs.h <<EOF EOF - echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2432: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2437 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#include <stddef.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` + ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2466: checking for vfork.h" >&5 +echo "configure:2573: checking for vfork.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 2471 "configure" +#line 2578 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2583: \"$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* @@ -2497,18 +2604,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2501: checking for working vfork" >&5 +echo "configure:2608: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2507: checking for vfork" >&5 +echo "configure:2614: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2512 "configure" +#line 2619 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -2531,7 +2638,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2553,7 +2660,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 2557 "configure" +#line 2664 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -2648,7 +2755,7 @@ main() { } } EOF -if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2680,12 +2787,12 @@ fi for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2684: checking for $ac_func" >&5 +echo "configure:2791: 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 2689 "configure" +#line 2796 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2708,7 +2815,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2819: \"$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 @@ -2738,12 +2845,12 @@ done for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2742: checking for $ac_func" >&5 +echo "configure:2849: 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 2747 "configure" +#line 2854 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2766,7 +2873,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2877: \"$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 @@ -2794,19 +2901,19 @@ done for v in $vars; do echo $ac_n "checking for $v""... $ac_c" 1>&6 -echo "configure:2798: checking for $v" >&5 +echo "configure:2905: checking for $v" >&5 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2803 "configure" +#line 2910 "configure" #include "confdefs.h" int *p; int main() { -extern int $v []; p = &$v; +extern int $v []; p = $v; ; return 0; } EOF -if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "libiberty_cv_var_$v=yes" else @@ -2832,12 +2939,12 @@ EOF for ac_func in $checkfuncs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2836: checking for $ac_func" >&5 +echo "configure:2943: 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 2841 "configure" +#line 2948 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2860,7 +2967,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2971: \"$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 @@ -2890,17 +2997,17 @@ 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:2894: checking for $ac_hdr" >&5 +echo "configure:3001: 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 2899 "configure" +#line 3006 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3011: \"$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* @@ -2929,12 +3036,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2933: checking for $ac_func" >&5 +echo "configure:3040: 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 2938 "configure" +#line 3045 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2957,7 +3064,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3068: \"$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 @@ -2982,7 +3089,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2986: checking for working mmap" >&5 +echo "configure:3093: 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 @@ -2990,7 +3097,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2994 "configure" +#line 3101 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3143,7 +3250,7 @@ main() } EOF -if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3254: \"$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 @@ -3167,7 +3274,7 @@ fi echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 -echo "configure:3171: checking for working strncmp" >&5 +echo "configure:3278: checking for working strncmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3175,7 +3282,7 @@ else ac_cv_func_strncmp_works=no else cat > conftest.$ac_ext <<EOF -#line 3179 "configure" +#line 3286 "configure" #include "confdefs.h" /* Test by Jim Wilson and Kaveh Ghazi. @@ -3239,7 +3346,7 @@ main () } EOF -if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else @@ -3423,6 +3530,8 @@ s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g +s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g +s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -3430,6 +3539,7 @@ s%@INSTALL_DATA@%$INSTALL_DATA%g s%@host_makefile_frag@%%g s%@CPP@%$CPP%g s%@CHECK@%$CHECK%g +s%@target_header_dir@%$target_header_dir%g s%@LIBOBJS@%$LIBOBJS%g s%@INSTALL_DEST@%$INSTALL_DEST%g @@ -3645,6 +3755,7 @@ srcdir=${srcdir} host=${host} target=${target} with_target_subdir=${with_target_subdir} +with_build_subdir=${with_build_subdir} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} @@ -3654,9 +3765,10 @@ EOF cat >> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h if test -n "$CONFIG_FILES"; then - if test -n "${with_target_subdir}"; then + if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file ac_file=Makefile + LD="${ORIGINAL_LD_FOR_MULTILIBS}" . ${libiberty_topdir}/config-ml.in fi fi diff --git a/contrib/binutils/libiberty/configure.in b/contrib/binutils/libiberty/configure.in index fb930e4..a8dc66fa 100644 --- a/contrib/binutils/libiberty/configure.in +++ b/contrib/binutils/libiberty/configure.in @@ -3,16 +3,27 @@ dnl Process this file with autoconf to produce a configure script AC_PREREQ(2.13) AC_INIT(pexecute.c) +# This works around the fact that libtool configuration may change LD +# for this particular configuration, but some shells, instead of +# keeping the changes in LD private, export them just because LD is +# exported. We don't use libtool yet, but some day we might, so... +ORIGINAL_LD_FOR_MULTILIBS=$LD + dnl We use these options to decide which functions to include. AC_ARG_WITH(target-subdir, -[ --with-target-subdir=SUBDIR Configuring in a subdirectory]) +[ --with-target-subdir=SUBDIR Configuring in a subdirectory for target]) +AC_ARG_WITH(build-subdir, +[ --with-build-subdir=SUBDIR Configuring in a subdirectory for build]) AC_ARG_WITH(cross-host, [ --with-cross-host=HOST Configuring with a cross compiler]) AC_ARG_WITH(newlib, [ --with-newlib Configuring with newlib]) if test "${srcdir}" = "."; then - if test -z "${with_target_subdir}"; then + if test -n "${with_build_subdir}"; then + libiberty_topdir="${srcdir}/../.." + with_target_subdir= + elif test -z "${with_target_subdir}"; then libiberty_topdir="${srcdir}/.." else if test "${with_target_subdir}" != "."; then @@ -89,6 +100,16 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) LIB_AC_PROG_CC +AC_PROG_CC_C_O +# autoconf is lame and doesn't give us any substitution variable for this. +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then + NO_MINUS_C_MINUS_O=yes +else + OUTPUT_OPTION='-o $@' +fi +AC_SUBST(NO_MINUS_C_MINUS_O) +AC_SUBST(OUTPUT_OPTION) + AC_ISC_POSIX AC_C_CONST AC_C_INLINE @@ -133,6 +154,8 @@ then AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.]) fi +AC_TYPE_PID_T + # This is the list of functions which libiberty will provide if they # are not available on the host. @@ -205,6 +228,7 @@ fi setobjs= CHECK= +target_header_dir= if test -n "${with_target_subdir}"; then # We are being configured as a target library. AC_REPLACE_FUNCS @@ -239,6 +263,27 @@ if test -n "${with_target_subdir}"; then fi + # We may wish to install the target headers somewhere. + AC_ARG_ENABLE(install-libiberty, + [ --enable-install-libiberty Install headers for end users], + enable_install_libiberty=$enableval, + enable_install_libiberty=no)dnl + + # Option parsed, now set things appropriately. + case x"$enable_install_libiberty" in + xyes|x) + target_header_dir=libiberty + ;; + xno) + target_header_dir= + ;; + *) + # This could be sanity-checked in various ways... + target_header_dir="${enable_install_libiberty}" + ;; + esac + + else # Not a target library, so we set things up to run the test suite. @@ -247,6 +292,7 @@ else fi AC_SUBST(CHECK) +AC_SUBST(target_header_dir) case "${host}" in *-*-cygwin* | *-*-mingw*) @@ -365,7 +411,7 @@ if test -z "${setobjs}"; then for v in $vars; do AC_MSG_CHECKING([for $v]) AC_CACHE_VAL(libiberty_cv_var_$v, - [AC_TRY_LINK([int *p;], [extern int $v []; p = &$v;], + [AC_TRY_LINK([int *p;], [extern int $v []; p = $v;], [eval "libiberty_cv_var_$v=yes"], [eval "libiberty_cv_var_$v=no"])]) if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then @@ -394,9 +440,10 @@ AC_SUBST(INSTALL_DEST) AC_OUTPUT(Makefile testsuite/Makefile, [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h if test -n "$CONFIG_FILES"; then - if test -n "${with_target_subdir}"; then + if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file ac_file=Makefile + LD="${ORIGINAL_LD_FOR_MULTILIBS}" . ${libiberty_topdir}/config-ml.in fi fi], @@ -404,6 +451,7 @@ srcdir=${srcdir} host=${host} target=${target} with_target_subdir=${with_target_subdir} +with_build_subdir=${with_build_subdir} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} diff --git a/contrib/binutils/libiberty/cp-demangle.c b/contrib/binutils/libiberty/cp-demangle.c index 136dc72..eece533 100644 --- a/contrib/binutils/libiberty/cp-demangle.c +++ b/contrib/binutils/libiberty/cp-demangle.c @@ -1,5 +1,5 @@ /* Demangler for IA64 / g++ V3 ABI. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Written by Alex Samuel <samuel@codesourcery.com>. This file is part of GNU CC. @@ -9,6 +9,15 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combined + executable.) + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -42,6 +51,8 @@ #include <string.h> #endif +#include <ctype.h> + #include "ansidecl.h" #include "libiberty.h" #include "dyn-string.h" @@ -889,7 +900,7 @@ static status_t demangle_number_literally static status_t demangle_identifier PARAMS ((demangling_t, int, dyn_string_t)); static status_t demangle_operator_name - PARAMS ((demangling_t, int, int *)); + PARAMS ((demangling_t, int, int *, int *)); static status_t demangle_nv_offset PARAMS ((demangling_t)); static status_t demangle_v_offset @@ -1316,7 +1327,7 @@ demangle_unqualified_name (dm, suppress_return_type) if (peek == 'c' && peek_char_next (dm) == 'v') *suppress_return_type = 1; - RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args)); + RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args, NULL)); } else if (peek == 'C' || peek == 'D') { @@ -1457,9 +1468,45 @@ demangle_identifier (dm, length, identifier) while (length-- > 0) { + int ch; if (end_of_name_p (dm)) return "Unexpected end of name in <identifier>."; - if (!dyn_string_append_char (identifier, next_char (dm))) + ch = next_char (dm); + + /* Handle extended Unicode characters. We encode them as __U{hex}_, + where {hex} omits leading 0's. For instance, '$' is encoded as + "__U24_". */ + if (ch == '_' + && peek_char (dm) == '_' + && peek_char_next (dm) == 'U') + { + char buf[10]; + int pos = 0; + advance_char (dm); advance_char (dm); length -= 2; + while (length-- > 0) + { + ch = next_char (dm); + if (!isxdigit (ch)) + break; + buf[pos++] = ch; + } + if (ch != '_' || length < 0) + return STATUS_ERROR; + if (pos == 0) + { + /* __U_ just means __U. */ + if (!dyn_string_append_cstr (identifier, "__U")) + return STATUS_ALLOCATION_FAILED; + continue; + } + else + { + buf[pos] = '\0'; + ch = strtol (buf, 0, 16); + } + } + + if (!dyn_string_append_char (identifier, ch)) return STATUS_ALLOCATION_FAILED; } @@ -1492,7 +1539,9 @@ demangle_identifier (dm, length, identifier) /* Demangles and emits an <operator-name>. If SHORT_NAME is non-zero, the short form is emitted; otherwise the full source form (`operator +' etc.) is emitted. *NUM_ARGS is set to the number of - operands that the operator takes. + operands that the operator takes. If TYPE_ARG is non-NULL, + *TYPE_ARG is set to 1 if the first argument is a type and 0 + otherwise. <operator-name> ::= nw # new @@ -1542,15 +1591,17 @@ demangle_identifier (dm, length, identifier) ::= cl # () ::= ix # [] ::= qu # ? - ::= sz # sizeof + ::= st # sizeof (a type) + ::= sz # sizeof (an expression) ::= cv <type> # cast ::= v [0-9] <source-name> # vendor extended operator */ static status_t -demangle_operator_name (dm, short_name, num_args) +demangle_operator_name (dm, short_name, num_args, type_arg) demangling_t dm; int short_name; int *num_args; + int *type_arg; { struct operator_code { @@ -1624,6 +1675,10 @@ demangle_operator_name (dm, short_name, num_args) DEMANGLE_TRACE ("operator-name", dm); + /* Assume the first argument is not a type. */ + if (type_arg) + *type_arg = 0; + /* Is this a vendor-extended operator? */ if (c0 == 'v' && IS_DIGIT (c1)) { @@ -1643,6 +1698,16 @@ demangle_operator_name (dm, short_name, num_args) return STATUS_OK; } + /* Is it the sizeof variant that takes a type? */ + if (c0 == 's' && c1 == 't') + { + RETURN_IF_ERROR (result_add (dm, " sizeof")); + *num_args = 1; + if (type_arg) + *type_arg = 1; + return STATUS_OK; + } + /* Perform a binary search for the operator code. */ while (1) { @@ -3145,6 +3210,7 @@ demangle_expression (dm) /* An operator expression. */ { int num_args; + int type_arg; status_t status = STATUS_OK; dyn_string_t operator_name; @@ -3152,7 +3218,8 @@ demangle_expression (dm) operations in infix notation, capture the operator name first. */ RETURN_IF_ERROR (result_push (dm)); - RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args)); + RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args, + &type_arg)); operator_name = (dyn_string_t) result_pop (dm); /* If it's binary, do an operand first. */ @@ -3173,7 +3240,10 @@ demangle_expression (dm) /* Emit its second (if binary) or only (if unary) operand. */ RETURN_IF_ERROR (result_add_char (dm, '(')); - RETURN_IF_ERROR (demangle_expression (dm)); + if (type_arg) + RETURN_IF_ERROR (demangle_type (dm)); + else + RETURN_IF_ERROR (demangle_expression (dm)); RETURN_IF_ERROR (result_add_char (dm, ')')); /* The ternary operator takes a third operand. */ @@ -3568,7 +3638,7 @@ cp_demangle_type (type_name, result) return status; } -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *)); /* ia64 ABI-mandated entry point in the C++ runtime library for performing @@ -3676,7 +3746,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status) } } -#else /* !IN_LIBGCC2 */ +#else /* ! (IN_LIBGCC2 || IN_GLIBCPP_V3) */ /* Variant entry point for integration with the existing cplus-dem demangler. Attempts to demangle MANGLED. If the demangling @@ -3837,13 +3907,18 @@ java_demangle_v3 (mangled) free (cplus_demangled); - return_value = dyn_string_release (demangled); + if (demangled) + return_value = dyn_string_release (demangled); + else + return_value = NULL; + return return_value; } -#endif /* IN_LIBGCC2 */ +#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ +#ifndef IN_GLIBCPP_V3 /* Demangle NAME in the G++ V3 ABI demangling style, and return either zero, indicating that some error occurred, or a demangling_t holding the results. */ @@ -3923,6 +3998,7 @@ is_gnu_v3_mangled_dtor (name) else return 0; } +#endif /* IN_GLIBCPP_V3 */ #ifdef STANDALONE_DEMANGLER diff --git a/contrib/binutils/libiberty/cplus-dem.c b/contrib/binutils/libiberty/cplus-dem.c index 4e60b2c..203e30d 100644 --- a/contrib/binutils/libiberty/cplus-dem.c +++ b/contrib/binutils/libiberty/cplus-dem.c @@ -1787,7 +1787,7 @@ demangle_integral_value (work, mangled, s) /* By default, we let the number decide whether we shall consume an underscore. */ - int consume_following_underscore = 0; + int multidigit_without_leading_underscore = 0; int leave_following_underscore = 0; success = 0; @@ -1804,23 +1804,34 @@ demangle_integral_value (work, mangled, s) `m'-prefix we must do it here, using consume_count and adjusting underscores: we have to consume the underscore matching the prepended one. */ - consume_following_underscore = 1; + multidigit_without_leading_underscore = 1; string_appendn (s, "-", 1); (*mangled) += 2; } else if (**mangled == '_') { /* Do not consume a following underscore; - consume_following_underscore will consume what should be + multidigit_without_leading_underscore will consume what should be consumed. */ leave_following_underscore = 1; } + else + { + /* Since consume_count_with_underscores does not handle + multi-digit numbers that do not start with an underscore, + and this number can be an integer template parameter, + we have to call consume_count. */ + multidigit_without_leading_underscore = 1; + /* These multi-digit numbers never end on an underscore, + so if there is one then don't eat it. */ + leave_following_underscore = 1; + } /* We must call consume_count if we expect to remove a trailing underscore, since consume_count_with_underscores expects the leading underscore (that we consumed) if it is to handle multi-digit numbers. */ - if (consume_following_underscore) + if (multidigit_without_leading_underscore) value = consume_count (mangled); else value = consume_count_with_underscores (mangled); @@ -1838,7 +1849,7 @@ demangle_integral_value (work, mangled, s) is wrong. If other (arbitrary) cases are followed by an underscore, we need to do something more radical. */ - if ((value > 9 || consume_following_underscore) + if ((value > 9 || multidigit_without_leading_underscore) && ! leave_following_underscore && **mangled == '_') (*mangled)++; @@ -2403,8 +2414,15 @@ demangle_arm_hp_template (work, mangled, n, declp) break; default: /* Not handling other HP cfront stuff */ - if (!do_type (work, &args, &arg)) - goto cfront_template_args_done; + { + const char* old_args = args; + if (!do_type (work, &args, &arg)) + goto cfront_template_args_done; + + /* Fail if we didn't make any progress: prevent infinite loop. */ + if (args == old_args) + return; + } } string_appends (declp, &arg); string_append (declp, ","); diff --git a/contrib/binutils/libiberty/dyn-string.c b/contrib/binutils/libiberty/dyn-string.c index 34f88ad..1da76c2 100644 --- a/contrib/binutils/libiberty/dyn-string.c +++ b/contrib/binutils/libiberty/dyn-string.c @@ -1,5 +1,5 @@ /* An abstract string datatype. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GNU CC. @@ -9,6 +9,15 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file into combinations with other programs, +and to distribute those combinations without any restriction coming +from the use of this file. (The General Public License restrictions +do apply in other respects; for example, they cover modification of +the file, and distribution when not linked into a combined +executable.) + GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -41,7 +50,7 @@ Boston, MA 02111-1307, USA. */ abort if an allocation fails. Instead, percolate an error code up through the call chain. */ -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) #define RETURN_ON_ALLOCATION_FAILURE #endif diff --git a/contrib/binutils/libiberty/floatformat.c b/contrib/binutils/libiberty/floatformat.c index b5d0121..d9e9fad 100644 --- a/contrib/binutils/libiberty/floatformat.c +++ b/contrib/binutils/libiberty/floatformat.c @@ -103,13 +103,6 @@ const struct floatformat floatformat_m88110_harris_ext = floatformat_intbit_no, "floatformat_m88110_ext_harris" }; -const struct floatformat floatformat_arm_ext = -{ - /* Bits 1 to 16 are unused. */ - floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64, - floatformat_intbit_yes, - "floatformat_arm_ext" -}; const struct floatformat floatformat_arm_ext_big = { /* Bits 1 to 16 are unused. */ diff --git a/contrib/binutils/libiberty/functions.texi b/contrib/binutils/libiberty/functions.texi index af7760d..b518243 100644 --- a/contrib/binutils/libiberty/functions.texi +++ b/contrib/binutils/libiberty/functions.texi @@ -317,6 +317,34 @@ between calls to @code{getpwd}. @end deftypefn +@c hex.c:25 +@deftypefn Extension void hex_init (void) + +Initializes the array mapping the current character set to +corresponding hex values. This function must be called before any +call to @code{hex_p} or @code{hex_value}. + +@end deftypefn + +@c hex.c:33 +@deftypefn Extension int hex_p (int @var{c}) + +Evaluates to non-zero if the given character is a valid hex character, +or zero if it is not. Note that the value you pass will be cast to +@code{unsigned char} within the macro. + +@end deftypefn + +@c hex.c:41 +@deftypefn Extension int hex_value (int @var{c}) + +Returns the numeric equivalent of the given character when interpreted +as a hexidecimal digit. The result is undefined if you pass an +invalid hex digit. Note that the value you pass will be cast to +@code{unsigned char} within the macro. + +@end deftypefn + @c index.c:5 @deftypefn Supplemental char* index (char *@var{s}, int @var{c}) diff --git a/contrib/binutils/libiberty/getruntime.c b/contrib/binutils/libiberty/getruntime.c index 9301deb..3f7dc0d 100644 --- a/contrib/binutils/libiberty/getruntime.c +++ b/contrib/binutils/libiberty/getruntime.c @@ -1,5 +1,5 @@ /* Return time used so far, in microseconds. - Copyright (C) 1994, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 1999, 2002 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -22,6 +22,10 @@ Boston, MA 02111-1307, USA. */ #include "ansidecl.h" #include "libiberty.h" +/* On some systems (such as WindISS), you must include <sys/types.h> + to get the definition of "time_t" before you include <time.h>. */ +#include <sys/types.h> + /* There are several ways to get elapsed execution time; unfortunately no single way is available for all host systems, nor are there reliable ways to find out which way is correct for a given host. */ diff --git a/contrib/binutils/libiberty/hashtab.c b/contrib/binutils/libiberty/hashtab.c index 36ad6e4..6bf59ff 100644 --- a/contrib/binutils/libiberty/hashtab.c +++ b/contrib/binutils/libiberty/hashtab.c @@ -1,5 +1,5 @@ /* An expandable hash tables datatype. - Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Vladimir Makarov (vmakarov@cygnus.com). This file is part of the libiberty library. @@ -81,7 +81,6 @@ higher_prime_number (n) /* These are primes that are near, but slightly smaller than, a power of two. */ static const unsigned long primes[] = { - (unsigned long) 2, (unsigned long) 7, (unsigned long) 13, (unsigned long) 31, @@ -159,60 +158,60 @@ eq_pointer (p1, p2) /* This function creates table with length slightly longer than given source length. Created hash table is initiated as empty (all the hash table entries are EMPTY_ENTRY). The function returns the - created hash table. Memory allocation must not fail. */ + created hash table, or NULL if memory allocation fails. */ htab_t -htab_create (size, hash_f, eq_f, del_f) +htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f) size_t size; htab_hash hash_f; htab_eq eq_f; htab_del del_f; + htab_alloc alloc_f; + htab_free free_f; { htab_t result; size = higher_prime_number (size); - result = (htab_t) xcalloc (1, sizeof (struct htab)); - result->entries = (PTR *) xcalloc (size, sizeof (PTR)); + result = (htab_t) (*alloc_f) (1, sizeof (struct htab)); + if (result == NULL) + return NULL; + result->entries = (PTR *) (*alloc_f) (size, sizeof (PTR)); + if (result->entries == NULL) + { + if (free_f != NULL) + (*free_f) (result); + return NULL; + } result->size = size; result->hash_f = hash_f; result->eq_f = eq_f; result->del_f = del_f; - result->return_allocation_failure = 0; + result->alloc_f = alloc_f; + result->free_f = free_f; return result; } -/* This function creates table with length slightly longer than given - source length. The created hash table is initiated as empty (all the - hash table entries are EMPTY_ENTRY). The function returns the created - hash table. Memory allocation may fail; it may return NULL. */ +/* These functions exist solely for backward compatibility. */ +#undef htab_create htab_t -htab_try_create (size, hash_f, eq_f, del_f) +htab_create (size, hash_f, eq_f, del_f) size_t size; htab_hash hash_f; htab_eq eq_f; htab_del del_f; { - htab_t result; - - size = higher_prime_number (size); - result = (htab_t) calloc (1, sizeof (struct htab)); - if (result == NULL) - return NULL; - - result->entries = (PTR *) calloc (size, sizeof (PTR)); - if (result->entries == NULL) - { - free (result); - return NULL; - } + return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free); +} - result->size = size; - result->hash_f = hash_f; - result->eq_f = eq_f; - result->del_f = del_f; - result->return_allocation_failure = 1; - return result; +htab_t +htab_try_create (size, hash_f, eq_f, del_f) + size_t size; + htab_hash hash_f; + htab_eq eq_f; + htab_del del_f; +{ + return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free); } /* This function frees all memory allocated for given hash table. @@ -230,8 +229,11 @@ htab_delete (htab) && htab->entries[i] != DELETED_ENTRY) (*htab->del_f) (htab->entries[i]); - free (htab->entries); - free (htab); + if (htab->free_f != NULL) + { + (*htab->free_f) (htab->entries); + (*htab->free_f) (htab); + } } /* This function clears all entries in the given hash table. */ @@ -264,21 +266,27 @@ find_empty_slot_for_expand (htab, hash) hashval_t hash; { size_t size = htab->size; - hashval_t hash2 = 1 + hash % (size - 2); unsigned int index = hash % size; + PTR *slot = htab->entries + index; + hashval_t hash2; + + if (*slot == EMPTY_ENTRY) + return slot; + else if (*slot == DELETED_ENTRY) + abort (); + hash2 = 1 + hash % (size - 2); for (;;) { - PTR *slot = htab->entries + index; + index += hash2; + if (index >= size) + index -= size; + slot = htab->entries + index; if (*slot == EMPTY_ENTRY) return slot; else if (*slot == DELETED_ENTRY) abort (); - - index += hash2; - if (index >= size) - index -= size; } } @@ -297,21 +305,17 @@ htab_expand (htab) PTR *oentries; PTR *olimit; PTR *p; + PTR *nentries; oentries = htab->entries; olimit = oentries + htab->size; htab->size = higher_prime_number (htab->size * 2); - if (htab->return_allocation_failure) - { - PTR *nentries = (PTR *) calloc (htab->size, sizeof (PTR *)); - if (nentries == NULL) - return 0; - htab->entries = nentries; - } - else - htab->entries = (PTR *) xcalloc (htab->size, sizeof (PTR *)); + nentries = (PTR *) (*htab->alloc_f) (htab->size, sizeof (PTR *)); + if (nentries == NULL) + return 0; + htab->entries = nentries; htab->n_elements -= htab->n_deleted; htab->n_deleted = 0; @@ -332,7 +336,8 @@ htab_expand (htab) } while (p < olimit); - free (oentries); + if (htab->free_f != NULL) + (*htab->free_f) (oentries); return 1; } @@ -405,50 +410,59 @@ htab_find_slot_with_hash (htab, element, hash, insert) unsigned int index; hashval_t hash2; size_t size; + PTR entry; if (insert == INSERT && htab->size * 3 <= htab->n_elements * 4 && htab_expand (htab) == 0) return NULL; size = htab->size; - hash2 = 1 + hash % (size - 2); index = hash % size; htab->searches++; first_deleted_slot = NULL; + entry = htab->entries[index]; + if (entry == EMPTY_ENTRY) + goto empty_entry; + else if (entry == DELETED_ENTRY) + first_deleted_slot = &htab->entries[index]; + else if ((*htab->eq_f) (entry, element)) + return &htab->entries[index]; + + hash2 = 1 + hash % (size - 2); for (;;) { - PTR entry = htab->entries[index]; + htab->collisions++; + index += hash2; + if (index >= size) + index -= size; + + entry = htab->entries[index]; if (entry == EMPTY_ENTRY) - { - if (insert == NO_INSERT) - return NULL; - - htab->n_elements++; - - if (first_deleted_slot) - { - *first_deleted_slot = EMPTY_ENTRY; - return first_deleted_slot; - } - - return &htab->entries[index]; - } - - if (entry == DELETED_ENTRY) + goto empty_entry; + else if (entry == DELETED_ENTRY) { if (!first_deleted_slot) first_deleted_slot = &htab->entries[index]; } - else if ((*htab->eq_f) (entry, element)) + else if ((*htab->eq_f) (entry, element)) return &htab->entries[index]; - - htab->collisions++; - index += hash2; - if (index >= size) - index -= size; } + + empty_entry: + if (insert == NO_INSERT) + return NULL; + + htab->n_elements++; + + if (first_deleted_slot) + { + *first_deleted_slot = EMPTY_ENTRY; + return first_deleted_slot; + } + + return &htab->entries[index]; } /* Like htab_find_slot_with_hash, but compute the hash value from the diff --git a/contrib/binutils/libiberty/hex.c b/contrib/binutils/libiberty/hex.c index 3ba04ba..5f82292 100644 --- a/contrib/binutils/libiberty/hex.c +++ b/contrib/binutils/libiberty/hex.c @@ -20,11 +20,40 @@ Boston, MA 02111-1307, USA. */ #include <stdio.h> /* for EOF */ #include "libiberty.h" -/* Provided for ABI compatibility. */ -void -hex_init () -{ -} +/* + +@deftypefn Extension void hex_init (void) + +Initializes the array mapping the current character set to +corresponding hex values. This function must be called before any +call to @code{hex_p} or @code{hex_value}. If you fail to call it, a +default ASCII-based table will normally be used on ASCII systems. + +@end deftypefn + +@deftypefn Extension int hex_p (int @var{c}) + +Evaluates to non-zero if the given character is a valid hex character, +or zero if it is not. Note that the value you pass will be cast to +@code{unsigned char} within the macro. + +@end deftypefn + +@deftypefn Extension int hex_value (int @var{c}) + +Returns the numeric equivalent of the given character when interpreted +as a hexidecimal digit. The result is undefined if you pass an +invalid hex digit. Note that the value you pass will be cast to +@code{unsigned char} within the macro. + +@end deftypefn + +@undocumented _hex_array_size +@undocumented _hex_bad +@undocumented _hex_value + +*/ + /* Are we ASCII? */ #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ @@ -106,6 +135,46 @@ const char _hex_value[_hex_array_size] = _hex_bad, _hex_bad, _hex_bad, _hex_bad, _hex_bad, _hex_bad, _hex_bad, _hex_bad, }; +#define HEX_TABLE_INITIALIZED + #else - #error "Unsupported host character set" + +char _hex_value[_hex_array_size]; + #endif /* not ASCII */ + +void +hex_init () +{ +#ifndef HEX_TABLE_INITIALIZED + int i; + + for (i=0; i<_hex_array_size; i++) + { + switch (i) + { + case '0': _hex_value[i] = 0; break; + case '1': _hex_value[i] = 1; break; + case '2': _hex_value[i] = 2; break; + case '3': _hex_value[i] = 3; break; + case '4': _hex_value[i] = 4; break; + case '5': _hex_value[i] = 5; break; + case '6': _hex_value[i] = 6; break; + case '7': _hex_value[i] = 7; break; + case '8': _hex_value[i] = 8; break; + case '9': _hex_value[i] = 9; break; + + case 'a': case 'A': _hex_value[i] = 10; break; + case 'b': case 'B': _hex_value[i] = 11; break; + case 'c': case 'C': _hex_value[i] = 12; break; + case 'd': case 'D': _hex_value[i] = 13; break; + case 'e': case 'E': _hex_value[i] = 14; break; + case 'f': case 'F': _hex_value[i] = 15; break; + + default: + _hex_value[i] = _hex_bad; + break; + } + } +#endif +} diff --git a/contrib/binutils/libiberty/lbasename.c b/contrib/binutils/libiberty/lbasename.c index cea0253..43cb73f 100644 --- a/contrib/binutils/libiberty/lbasename.c +++ b/contrib/binutils/libiberty/lbasename.c @@ -1,6 +1,6 @@ /* Libiberty basename. Like basename, but is not overridden by the system C library. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -53,19 +53,11 @@ and a path ending in @code{/} returns the empty string after it. # endif #endif -/* Define IS_DIR_SEPARATOR. VMS uses '::', ':', '[...]' and '<...>' to - separate the different components of a file specification. It's a - bit of a stretch to call ':', ']' and '>' directory separators, so - just define the test to find the file name component. */ -#ifdef VMS -# define IS_DIR_SEPARATOR(ch) ((ch) == ':' || (ch) == ']' || (ch) == '>') +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else -# ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -# else -# define IS_DIR_SEPARATOR(ch) \ +# define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -# endif #endif const char * diff --git a/contrib/binutils/libiberty/splay-tree.c b/contrib/binutils/libiberty/splay-tree.c index a712395..7999447 100644 --- a/contrib/binutils/libiberty/splay-tree.c +++ b/contrib/binutils/libiberty/splay-tree.c @@ -70,7 +70,7 @@ splay_tree_delete_helper (sp, node) if (sp->delete_value) (*sp->delete_value)(node->value); - free ((char*) node); + (*sp->deallocate) ((char*) node, sp->allocate_data); } /* Help splay SP around KEY. PARENT and GRANDPARENT are the parent @@ -227,9 +227,29 @@ splay_tree_foreach_helper (sp, node, fn, data) return splay_tree_foreach_helper (sp, node->right, fn, data); } + +/* An allocator and deallocator based on xmalloc. */ +static void * +splay_tree_xmalloc_allocate (size, data) + int size; + void *data ATTRIBUTE_UNUSED; +{ + return xmalloc (size); +} + +static void +splay_tree_xmalloc_deallocate (object, data) + void *object; + void *data ATTRIBUTE_UNUSED; +{ + free (object); +} + + /* Allocate a new splay tree, using COMPARE_FN to compare nodes, DELETE_KEY_FN to deallocate keys, and DELETE_VALUE_FN to deallocate - values. */ + values. Use xmalloc to allocate the splay tree structure, and any + nodes added. */ splay_tree splay_tree_new (compare_fn, delete_key_fn, delete_value_fn) @@ -237,11 +257,35 @@ splay_tree_new (compare_fn, delete_key_fn, delete_value_fn) splay_tree_delete_key_fn delete_key_fn; splay_tree_delete_value_fn delete_value_fn; { - splay_tree sp = (splay_tree) xmalloc (sizeof (struct splay_tree_s)); + return (splay_tree_new_with_allocator + (compare_fn, delete_key_fn, delete_value_fn, + splay_tree_xmalloc_allocate, splay_tree_xmalloc_deallocate, 0)); +} + + +/* Allocate a new splay tree, using COMPARE_FN to compare nodes, + DELETE_KEY_FN to deallocate keys, and DELETE_VALUE_FN to deallocate + values. */ + +splay_tree +splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn, + allocate_fn, deallocate_fn, allocate_data) + splay_tree_compare_fn compare_fn; + splay_tree_delete_key_fn delete_key_fn; + splay_tree_delete_value_fn delete_value_fn; + splay_tree_allocate_fn allocate_fn; + splay_tree_deallocate_fn deallocate_fn; + void *allocate_data; +{ + splay_tree sp = (splay_tree) (*allocate_fn) (sizeof (struct splay_tree_s), + allocate_data); sp->root = 0; sp->comp = compare_fn; sp->delete_key = delete_key_fn; sp->delete_value = delete_value_fn; + sp->allocate = allocate_fn; + sp->deallocate = deallocate_fn; + sp->allocate_data = allocate_data; return sp; } @@ -253,7 +297,7 @@ splay_tree_delete (sp) splay_tree sp; { splay_tree_delete_helper (sp, sp->root); - free ((char*) sp); + (*sp->deallocate) ((char*) sp, sp->allocate_data); } /* Insert a new node (associating KEY with DATA) into SP. If a @@ -286,7 +330,9 @@ splay_tree_insert (sp, key, value) /* Create a new node, and insert it at the root. */ splay_tree_node node; - node = (splay_tree_node) xmalloc (sizeof (struct splay_tree_node_s)); + node = ((splay_tree_node) + (*sp->allocate) (sizeof (struct splay_tree_node_s), + sp->allocate_data)); node->key = key; node->value = value; @@ -330,7 +376,7 @@ splay_tree_remove (sp, key) /* Delete the root node itself. */ if (sp->delete_value) (*sp->delete_value) (sp->root->value); - free (sp->root); + (*sp->deallocate) (sp->root, sp->allocate_data); /* One of the children is now the root. Doesn't matter much which, so long as we preserve the properties of the tree. */ diff --git a/contrib/binutils/libiberty/strtod.c b/contrib/binutils/libiberty/strtod.c index 6b69ccf..97fc933 100644 --- a/contrib/binutils/libiberty/strtod.c +++ b/contrib/binutils/libiberty/strtod.c @@ -1,5 +1,5 @@ /* Implementation of strtod for systems with atof. - Copyright (C) 1991, 1995 Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 2002 Free Software Foundation, Inc. This file is part of the libiberty library. This library is free software; you can redistribute it and/or modify it under the @@ -75,7 +75,7 @@ strtod (str, ptr) && (p[6] == 't' || p[6] == 'T') && (p[7] == 'y' || p[7] == 'Y')) { - *ptr = p + 7; + *ptr = p + 8; return atof (str); } else diff --git a/contrib/binutils/libiberty/waitpid.c b/contrib/binutils/libiberty/waitpid.c index 703b8a6..6e31f25 100644 --- a/contrib/binutils/libiberty/waitpid.c +++ b/contrib/binutils/libiberty/waitpid.c @@ -13,13 +13,19 @@ does the return value. The third argument is unused in @libib{}. #ifdef HAVE_CONFIG_H #include "config.h" #endif + +/* On some systems (such as WindISS), you must include <sys/types.h> + to get the definition of "pid_t" before you include <sys/wait.h>. */ +#include <sys/types.h> + #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #endif -int +pid_t waitpid (pid, stat_loc, options) - int pid, *stat_loc, options; + pid_t pid; + int *stat_loc, options; { for (;;) { diff --git a/contrib/binutils/libiberty/xatexit.c b/contrib/binutils/libiberty/xatexit.c index 728254b..abf3407 100644 --- a/contrib/binutils/libiberty/xatexit.c +++ b/contrib/binutils/libiberty/xatexit.c @@ -33,8 +33,13 @@ failure. If you use @code{xatexit} to register functions, you must use #define size_t unsigned long #endif +#if VMS +#include <stdlib.h> +#include <unixlib.h> +#else /* For systems with larger pointers than ints, this must be declared. */ PTR malloc PARAMS ((size_t)); +#endif static void xatexit_cleanup PARAMS ((void)); diff --git a/contrib/binutils/libiberty/xmalloc.c b/contrib/binutils/libiberty/xmalloc.c index bf0cf2d..4c8249a 100644 --- a/contrib/binutils/libiberty/xmalloc.c +++ b/contrib/binutils/libiberty/xmalloc.c @@ -120,12 +120,12 @@ xmalloc_failed (size) else allocated = (char *) sbrk (0) - (char *) &environ; fprintf (stderr, - "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n", + "\n%s%sout of memory allocating %lu bytes after a total of %lu bytes\n", name, *name ? ": " : "", (unsigned long) size, (unsigned long) allocated); #else /* HAVE_SBRK */ fprintf (stderr, - "\n%s%sCannot allocate %lu bytes\n", + "\n%s%sout of memory allocating %lu bytes\n", name, *name ? ": " : "", (unsigned long) size); #endif /* HAVE_SBRK */ diff --git a/contrib/binutils/ltcf-cxx.sh b/contrib/binutils/ltcf-cxx.sh index 22875d0..bdc67f9 100644 --- a/contrib/binutils/ltcf-cxx.sh +++ b/contrib/binutils/ltcf-cxx.sh @@ -250,11 +250,17 @@ case $host_os in ;; hpux*) if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + case "$host_cpu" in + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;; + esac + hardcode_direct=yes hardcode_libdir_separator=: export_dynamic_flag_spec='${wl}-E' fi - hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. @@ -283,7 +289,14 @@ case $host_os in if test $with_gnu_ld = no; then case "$host_os" in hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; + *) + case "$host_cpu" in + ia64*) + archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;; + *) + archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; + esac + ;; esac fi else diff --git a/contrib/binutils/ltmain.sh b/contrib/binutils/ltmain.sh index bd76cfb..c3547e5 100644 --- a/contrib/binutils/ltmain.sh +++ b/contrib/binutils/ltmain.sh @@ -107,6 +107,7 @@ show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +taglist= # Parse our command line options once, thoroughly. while test $# -gt 0 @@ -140,6 +141,7 @@ do CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. + taglist="$taglist $tagname" ;; *) if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then @@ -4299,7 +4301,11 @@ fi\ fi done # Quote the link command for shipping. - relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" + tagopts= + for tag in $taglist; do + tagopts="$tagopts --tag $tag" + done + relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. @@ -4605,7 +4611,7 @@ relink_command=\"$relink_command\"" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - continue + exit 1 fi fi diff --git a/contrib/binutils/opcodes/ChangeLog b/contrib/binutils/opcodes/ChangeLog index c29dd31..9463897 100644 --- a/contrib/binutils/opcodes/ChangeLog +++ b/contrib/binutils/opcodes/ChangeLog @@ -1,30 +1,279 @@ +2002-09-04 Nick Clifton <nickc@redhat.com> + Daniel Jacobowitz <drow@mvista.com> + + * disassemble.c (disassembler_usage): Add invocation of + print_ppc_disassembler_options. + * ppc-dis.c (print_ppc_disassembler_options): New function. + +2002-09-23 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-09-11 Nick Clifton <nickc@redhat.com> + * po/da.po: Updated Danish translation file. + + 2002-09-04 Nick Clifton <nickc@redhat.com> + * ppc-opc.c: The BookE implementations of the TLBWE and TLBRE + instructions do not take any arguments. + + 2002-09-04 Nick Clifton <nickc@redhat.com> + * ppc-opc.c (extsw, extsw.): Do not allow for the BookE32. + + 2002-08-09 Nick Clifton <nickc@redhat.com> + * po/sv.po: Updated Swedish translation. + +2002-08-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * mips-opc.c (mips_builtin_opcodes): Remove "dla" and "la" as + aliases to "daddiu" and "addiu". + +2002-07-30 Daniel Jacobowitz <drow@mvista.com> + + Merge from mainline: + 2002-07-30 Nick Clifton <nickc@redhat.com> + * po/sv.po: Updated Swedish translation. + +2002-07-25 Nick Clifton <nickc@redhat.com> + + * po/sv.po: Updated Swedish translation. + * po/es.po: Updated Spanish translation. + * po/pr_BR.po: Updated Brazilian Portuguese translation. + * po/tr.po: Updated Turkish 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. + * po/pr_BR.po: Updated Brazilian Portuguese translation. + +2002-07-23 Daniel Jacobowitz <drow@mvista.com> + + * po/opcodes.pot: Regenerated. + +2002-07-23 Nick Clifton <nickc@redhat.com> + + * po/fr.po: Updated French translation. + * po/pr_BR.po: New Brazilian Portuguese translation. + * po/id.po: Updated Indonesian translation. + * configure.in (LINGUAS): Add pr_BR. + * configure: Regenerate. + +2002-07-17 David Mosberger <davidm@hpl.hp.com> + + * ia64-opc-b.c (bWhc): New macro. + (mWhc): Ditto. + (OpPaWhcD): Ditto. + (ia64_opcodes_b): Correct patterns for indirect call + instructions to use 3-bit "wh" field. + * ia64-asmtab.c: Regnerate. + +2002-07-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * mips-dis.c (mips_isa_type): Add MIPS16 insn handling. + * mips-opc.c (I16): New define. + (mips_builtin_opcodes): Make jalx an I16 insn. + +2002-06-18 Dave Brolley <brolley@redhat.com> + + * po/POTFILES.in: Add frv-*.[ch]. + * disassemble.c (ARCH_frv): New macro. + (disassembler): Handle bfd_arch_frv. + * configure.in: Support frv_bfd_arch. + * Makefile.am (HFILES): Add frv-*.h. + (CFILES): Add frv-*.c + (ALL_MACHINES): Add frv-*.lo. + (CLEANFILES): Add stamp-frv. + (FRV_DEPS): New variable. + (stamp-frv): New target. + (frv-asm.lo): New target. + (frv-desc.lo): New target. + (frv-dis.lo): New target. + (frv-ibld.lo): New target. + (frv-opc.lo): New target. + (frv-*.[ch]): New files. + +2002-06-18 Ben Elliston <bje@redhat.com> + + * Makefile.am (CGENDEPS): Remove unnecessary stamp-cgen. + * Makefile.in: Regenerate. + +2002-06-08 Alan Modra <amodra@bigpond.net.au> + + * a29k-dis.c: Replace CONST with const. + * h8300-dis.c: Likewise. + * m68k-dis.c: Likewise. + * or32-dis.c: Likewise. + * sparc-dis.c: Likewise. + +2002-06-04 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in: Add "sh5*-*" to list of targets which include + sh64 support. + * configure: Regenerate. + +2002-05-31 Chris G. Demetriou <cgd@broadcom.com> + + * mips-opc.c: Clean up a few whitespace issues, and sort a + few entries understanding that 'x' follows 'w' in the alphabet. + +2002-05-31 Chris G. Demetriou <cgd@broadcom.com> + Ed Satterthwaite <ehs@broadcom.com> + + * mips-opc.c: Add support for SB-1 MDMX subset and extensions. + +2002-05-31 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * po/POTFILES.in: Regenerate. + +2002-05-30 Chris G. Demetriou <cgd@broadcom.com> + Ed Satterthwaite <ehs@broadcom.com> + + * mips-dis.c (print_insn_arg): Add support for 'O', 'Q', 'X', 'Y', + and 'Z' formats, for MDMX. + (mips_isa_type): Add MDMX instructions to the ISA + bit mask for bfd_mach_mipsisa64. + * mips-opc.c: Add support for MDMX instructions. + (MX): New definition. + + * mips-dis.c: Update copyright years to include 2002. + +2002-05-30 Diego Novillo <dnovillo@redhat.com> + + * d10v-opc.c (d10v_opcodes): `btsti' does not modify its + arguments. + +2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net> + + * configure.in: Add DLX configuraton support. + * configure: Regenerate. + * Makefile.am: Add DLX configuraton support. + * Makefile.in: Regenerate. + * disassemble.c: Add DLX support. + * dlx-dis.c: New file. + +2002-05-25 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am (sh-dis.lo): Don't put make commands in deps. + * Makefile.in: Regenerate. + * arc-dis.c: Use #include "" instead of <> for local header files. + * m68k-dis.c: Likewise. + +Wed May 22 20:11:51 2002 J"orn Rennecke <joern.rennecke@superh.com> + + * Makefile.am (sh-dis.lo): Compile with @archdefs@. + * Makefile.in: regenerate. + + * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 + for disassembly. + +2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * mips-opc.c (mips_builtin_opcodes): Add drol, dror macros. + +Fri May 17 14:26:44 2002 J"orn Rennecke <joern.rennecke@superh.com> + + * disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh. + * sh-dis.c (LITTLE_BIT): Delete. + (print_insn_sh, print_insn_shl): Deleted. + (print_insn_shx): Renamed to + (print_insn_sh). No longer static. Handle SHmedia instructions. + Use info->endian to determine endianness. + * sh64-dis.c (print_insn_sh64, print_insn_sh64l): Delete. + (print_insn_sh64x): No longer static. Renamed to + (print_insn_sh64). Removed pfun_compact and endian arguments. + If we got an uneven address to indicate SHmedia, adjust it. + Return -2 for SHcompact instructions. + +2002-05-17 Alan Modra <amodra@bigpond.net.au> + + * acinclude.m4 (AM_INSTALL_LIBBFD): Fake to fool autotools. + * configure.in: Invoke AM_INSTALL_LIBBFD. + * Makefile.am (install-data-local): Move to.. + (install_libopcodes): .. New target. + (uninstall_libopcodes): Likewise. + (install-bfdlibLTLIBRARIES): Likewise. + (uninstall-bfdlibLTLIBRARIES): Likewise. + (bfdlibdir): New. + (bfdincludedir): New. + (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + +2002-05-15 Nick Clifton <nickc@cambridge.redhat.com> + + * fr30-asm.c: Regenerate. + * fr30-desc.c: Regenerate. + * fr30-dis.c: Regenerate. + * m32r-asm.c: Regenerate. + * m32r-desc.c: Regenerate. + * m32r-dis.c: Regenerate. + * openrisc-asm.c: Regenerate. + * openrisc-desc.c: Regenerate. + * openrisc-dis.c: Regenerate. + * xstormy16-asm.c: Regenerate. + * xstormy16-desc.c: Regenerate. + * xstormy16-dis.c: Regenerate. + +2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> + + * mips-dis.c (is_newabi): EABI is not a NewABI. + +2002-05-13 Jason Thorpe <thorpej@wasabisystems.com> + + * configure.in (shle-*-*elf*): Include sh64 support. + * configure: Regenerate. + +2002-04-28 Jason Thorpe <thorpej@wasabisystems.com> + + * vax-dis.c (print_insn_arg): Pass the insn info to print_insn_mode. + (print_insn_mode): Print some basic info about floating point values. + 2002-05-09 Anton Blanchard <anton@samba.org> * ppc-opc.c: Add "tlbiel" for POWER4. -2002-05-09 Alan Modra <amodra@bigpond.net.au> +2002-05-07 Graydon Hoare <graydon@redhat.com> - Merge from mainline. - 2002-05-01 Alan Modra <amodra@bigpond.net.au> - * ppc-opc.c: Add "tlbsx." and "tlbsxe." for booke. + * cgen-dis.in: (print_insn_@arch@): Cache list of opened CPUs rather + than just most-recently-opened. - 2002-04-17 matthew green <mrg@redhat.com> - * ppc-opc.c (powerpc_opcode): Fix dssall operand list. +2002-05-01 Alan Modra <amodra@bigpond.net.au> -2002-04-29 Chris Demetriou <cgd@broadcom.com> + * ppc-opc.c: Add "tlbsx." and "tlbsxe." for booke. - Merge from mainline: - 2002-03-06 Chris Demetriou <cgd@broadcom.com> - * mips-opc.c (mips_builtin_opcodes): Mark "pref" as being - present on I4. +2002-04-24 Christian Groessler <chris@groessler.org> - Merge from mainline: - 2002-03-06 Chris Demetriou <cgd@broadcom.com> - * mips-opc.c (mips_builtin_opcodes): Add "movn.ps" and "movz.ps". + * z8k-dis.c (print_insn_z8k): Set disassemble_info to 2 + bytes_per_chunk, 6 bytes_per_line for nicer display of the hex + codes. + (z8k_lookup_instr): CLASS_IGNORE case added. + (output_instr): Don't print hex codes, they are already + printed. + (unpack_instr): ARG_NIM4 case added. ARG_NIM8 case + fixed. Support CLASS_BIT_1OR2 and CLASS_IGNORE cases. + (unparse_instr): Fix base and indexed addressing disassembly: + The index is inside the brackets. + * z8kgen.c (gas): Add ARG_NIM4 and CLASS_IGNORE defines. + (opt): Fix shift left/right arithmetic/logical byte defines: + The high byte of the immediate word is ignored by the + processor. + Fix n parameter of ldm opcodes: The opcode contains (n-1). + (args): Fix "n" entry. + (toks): Add "nim4" and "iiii" entries. + * z8k-opc.h: Regenerated with new z8kgen.c. + +2002-04-24 Nick Clifton <nickc@cambridge.redhat.com> + + * po/id.po: New Indonesian translation. + * configure.in (ALL_LIGUAS): Add id.po + * configure: Regenerate. - Merge from mainline: - 2002-03-15 Chris Demetriou <cgd@broadcom.com> - * mips-dis.c (is_newabi): Fix ABI decoding. +2002-04-17 matthew green <mrg@redhat.com> + + * ppc-opc.c (powerpc_opcode): Fix dssall operand list. 2002-04-04 Alan Modra <amodra@bigpond.net.au> @@ -32,33 +281,110 @@ * Makefile.am (dep.sed): Subst TOPDIR. Run "make dep-am". * Makefile.in: Regenerate. + * ppc-opc.c: Whitespace. + * s390-dis.c: Fix copyright date. - Merge from mainline - 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> - * s390-dis.c (init_disasm): Use renamed architecture defines. +2002-03-23 matthew green <mrg@redhat.com> -2002-03-28 Alan Modra <amodra@bigpond.net.au> + * ppc-opc.c (vmaddfp): Fix operand order. + +2002-03-21 Alan Modra <amodra@bigpond.net.au> - * aclocal.m4: Regenerate. - * config.in: Regenerate. - * configure: Regenerate. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. - Merge from mainline. - 2002-03-23 matthew green <mrg@redhat.com> - * ppc-opc.c (vmaddfp): Fix operand order. +2002-03-21 Anton Blanchard <anton@samba.org> - 2002-03-21 Anton Blanchard <anton@samba.org> * ppc-opc.c: Add optional field to mtmsrd. (MTMSRD_L, XRLARB_MASK): Define. - 2002-03-13 Alan Modra <amodra@bigpond.net.au> +Mon Mar 18 21:10:43 CET 2002 Jan Hubicka <jh@suse.cz> + + * i386-dis.c (prefix_name): Fix handling of 32bit address prefix + in 64bit mode. + (print_insn) Likewise. + (putop): Fix handling of 'E' + (OP_E, OP_OFF): handle 32bit addressing mode in 64bit. + (ptr_reg): Likewise. + +2002-03-18 Nick Clifton <nickc@cambridge.redhat.com> + + * po/fr.po: Updated version. + +2002-03-16 Chris Demetriou <cgd@broadcom.com> + + * mips-opc.c (M3D): Tweak comment. + (mips_builtin_op): Add comment indicating that opcodes of the + same name must be placed together in the table, and sort + the "recip.fmt", "recip1.fmt", "recip2.fmt", "rsqrt.fmt", + "rsqrt1.fmt", and "rsqrt2.fmt" opcodes by name. + +2002-03-16 Nick Clifton <nickc@cambridge.redhat.com> + + * Makefile.am: Tidy up sh64 rules. + * Makefile.in: Regenerate. + +2002-03-15 Chris G. Demetriou <cgd@broadcom.com> + + * mips-dis.c: Update copyright years. + +2002-03-15 Chris G. Demetriou <cgd@broadcom.com> + + * mips-dis.c (mips_isa_type): Add MIPS3D instructions to the ISA + bit masks for bfd_mach_mips_sb1 and bfd_mach_mipsisa64. Add + comments for bfd_mach_mipsisa32 and bfd_mach_mipsisa64 that + indicate that they should dissassemble all applicable + MIPS-specified ASEs. + * mips-opc.c: Add support for MIPS-3D instructions. + (M3D): New definition. + + * mips-opc.c: Update copyright years. + +2002-03-15 Chris G. Demetriou <cgd@broadcom.com> + + * mips-opc.c (mips_builtin_opcodes): Sort bc<N> opcodes by name. + +2002-03-15 Chris Demetriou <cgd@broadcom.com> + + * mips-dis.c (is_newabi): Fix ABI decoding. + +2002-03-14 Chris G. Demetriou <cgd@broadcom.com> + + * mips-dis.c (mips_isa_type): Fix formatting of bfd_mach_mipsisa32 + and bfd_mach_mipsisa64 cases to match the rest. + +2002-03-13 Nick Clifton <nickc@cambridge.redhat.com> + + * po/fr.po: Updated version. + +2002-03-13 Alan Modra <amodra@bigpond.net.au> + * ppc-opc.c: Add optional `L' field to tlbie. (XRTLRA_MASK): Define. - 2002-02-20 Tom Rix <trix@redhat.com> - * ppc-opc.c (powerpc_operands): Add WS feild. Use for tlbre, tlbwe. +2002-03-06 Chris Demetriou <cgd@broadcom.com> + + * mips-opc.c (mips_builtin_opcodes): Mark "pref" as being + present on I4. + + * mips-opc.c (mips_builtin_opcodes): Add "movn.ps" and "movz.ps". + +2002-03-05 Paul Koning <pkoning@equallogic.com> + + * pdp11-opc.c: Fix "mark" operand type. Fix operand types + for float opcodes that take float operands. Add alternate + names (xxxD vs. xxxF) for float opcodes. + * pdp11-dis.c (print_operand): Clean up formatting for mode 67. + (print_foperand): New function to handle float opcode operands. + (print_insn_pdp11): Use print_foperand to disassemble float ops. + +2002-02-27 Nick Clifton <nickc@cambridge.redhat.com> + + * po/de.po: Updated. + +2002-02-26 Brian Gaeke <brg@dgate.org> + + * Makefile.am (install-data-local): Install dis-asm.h. 2002-02-26 Nick Clifton <nickc@cambridge.redhat.com> @@ -66,15 +392,6 @@ * configure: Regenerate. * po/de.po: New file. -Mon Feb 25 18:40:33 CET 2002 Jan Hubicka <jh@suse.cz> - - * i386-dis.c (prefix_name): Fix handling of 32bit address prefix - in 64bit mode. - (print_insn) Likewise. - (putop): Fix handling of 'E' - (OP_E, OP_OFF): handle 32bit addressing mode in 64bit. - (ptr_reg): Likewise. - 2002-02-25 Alan Modra <amodra@bigpond.net.au> * ppc-dis.c (powerpc_dialect): Handle power4 option. @@ -89,10 +406,23 @@ Mon Feb 25 18:40:33 CET 2002 Jan Hubicka <jh@suse.cz> and PPCCOM4 with POWER4 so that "at" style branch hint opcodes are enabled for power4 rather than ppc64. - Merge from mainline 2002-02-19 matthew green <mrg@redhat.com> +2002-02-20 Tom Rix <trix@redhat.com> + + * ppc-opc.c (powerpc_operands): Add WS field. Use for tlbre, tlbwe. + +2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * s390-dis.c (init_disasm): Use renamed architecture defines. + +2002-02-19 matthew green <mrg@redhat.com> + * ppc-opc.c (powerpc_dialect): Fix comment; BookE is not Motorola specific. +2002-02-18 Nick Clifton <nickc@cambridge.redhat.com> + + * po/tr.po: Updated translation. + 2002-02-15 Richard Henderson <rth@redhat.com> * alpha-opc.c (alpha_opcodes): Fix thinko in ret pseudo @@ -103,18 +433,36 @@ Mon Feb 25 18:40:33 CET 2002 Jan Hubicka <jh@suse.cz> * alpha-opc.c (alpha_opcodes): Add simple pseudos for lda, ldah, jmp, ret. -2002-02-13 Hans-Peter Nilsson <hp@bitrange.com> +2002-02-14 Nick Clifton <nickc@cambridge.redhat.com> - * configure.in <bfd_sh_arc>: For sh-* and shl-*, enable sh64 - support only for sh-*-*elf*, shl-*-*elf*, sh-*-linux* and - shl-*-linux*. - * configure: Regenerate. + * po/da.po: Updated translation. + +2002-02-12 Graydon Hoare <graydon@redhat.com> + * cgen-asm.in (parse_insn_normal): Change call from + @arch@_cgen_parse_operand to cd->parse_operand, to + facilitate CGEN_ASM_INIT_HOOK doing useful work. + 2002-02-11 Alexandre Oliva <aoliva@redhat.com> * sparc-dis.c (print_insn_sparc): Make sure 0xFFFFFFFF is not sign-extended. +2002-02-11 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: "make dep-am". + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + +2002-02-10 Hans-Peter Nilsson <hp@bitrange.com> + + * configure.in <bfd_sh_arc>: For sh-* and shl-*, enable sh64 + support only for sh-*-*elf*, shl-*-*elf*, sh-*-linux* and + shl-*-linux*. + * configure: Regenerate. + 2002-02-10 Daniel Jacobowitz <drow@mvista.com> * cgen-dis.c: Add prototypes for count_decodable_bits @@ -818,7 +1166,7 @@ Mon Feb 25 18:40:33 CET 2002 Jan Hubicka <jh@suse.cz> * arc-opc.c: Include "sysdep.h" to get stdio.h as include file. * arc-ext.c: Likewise. -2001-08-28 matthew gren <mrg@redhat.com> +2001-08-28 matthew green <mrg@redhat.com> * ppc-opc.c (icbt): Order correctly. diff --git a/contrib/binutils/opcodes/Makefile.am b/contrib/binutils/opcodes/Makefile.am index bc4a665..bafdb57 100644 --- a/contrib/binutils/opcodes/Makefile.am +++ b/contrib/binutils/opcodes/Makefile.am @@ -11,7 +11,10 @@ MKDEP = gcc -MM WARN_CFLAGS = @WARN_CFLAGS@ AM_CFLAGS = $(WARN_CFLAGS) -lib_LTLIBRARIES = libopcodes.la +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ + +bfdlib_LTLIBRARIES = libopcodes.la # This is where bfd.h lives. BFD_H = ../bfd/bfd.h @@ -23,15 +26,16 @@ LIBIBERTY = ../libiberty/libiberty.a HFILES = \ arm-opc.h \ fr30-desc.h fr30-opc.h \ + frv-desc.h frv-opc.h \ h8500-opc.h \ + ia64-asmtab.h \ + ia64-opc.h \ m32r-desc.h m32r-opc.h \ mcore-opc.h \ openrisc-desc.h openrisc-opc.h \ sh-opc.h \ + sh64-opc.h \ sysdep.h \ - ia64-asmtab.h \ - ia64-opc.h \ - sh64-opc.h \ w65-opc.h \ xstormy16-desc.h xstormy16-opc.h \ z8k-opc.h @@ -55,6 +59,7 @@ CFILES = \ d10v-opc.c \ d30v-dis.c \ d30v-opc.c \ + dlx-dis.c \ dis-buf.c \ disassemble.c \ fr30-asm.c \ @@ -62,6 +67,11 @@ CFILES = \ fr30-dis.c \ fr30-ibld.c \ fr30-opc.c \ + frv-asm.c \ + frv-desc.c \ + frv-dis.c \ + frv-ibld.c \ + frv-opc.c \ h8300-dis.c \ h8500-dis.c \ hppa-dis.c \ @@ -119,6 +129,8 @@ CFILES = \ s390-opc.c \ s390-dis.c \ sh-dis.c \ + sh64-dis.c \ + sh64-opc.c \ sparc-dis.c \ sparc-opc.c \ tic30-dis.c \ @@ -129,8 +141,6 @@ CFILES = \ v850-dis.c \ v850-opc.c \ vax-dis.c \ - sh64-dis.c \ - sh64-opc.c \ w65-dis.c \ xstormy16-asm.c \ xstormy16-desc.c \ @@ -158,11 +168,17 @@ ALL_MACHINES = \ d10v-opc.lo \ d30v-dis.lo \ d30v-opc.lo \ + dlx-dis.lo \ fr30-asm.lo \ fr30-desc.lo \ fr30-dis.lo \ fr30-ibld.lo \ fr30-opc.lo \ + frv-asm.lo \ + frv-desc.lo \ + frv-dis.lo \ + frv-ibld.lo \ + frv-opc.lo \ h8300-dis.lo \ h8500-dis.lo \ hppa-dis.lo \ @@ -211,6 +227,8 @@ ALL_MACHINES = \ s390-dis.lo \ s390-opc.lo \ sh-dis.lo \ + sh64-dis.lo \ + sh64-opc.lo \ sparc-dis.lo \ sparc-opc.lo \ tic30-dis.lo \ @@ -221,8 +239,6 @@ ALL_MACHINES = \ v850-dis.lo \ v850-opc.lo \ vax-dis.lo \ - sh64-dis.lo \ - sh64-opc.lo \ w65-dis.lo \ xstormy16-asm.lo \ xstormy16-desc.lo \ @@ -271,8 +287,32 @@ po/POTFILES.in: @MAINT@ Makefile config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in $(SHELL) ./config.status --recheck +install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libopcodes + @$(NORMAL_INSTALL) + +uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libopcodes + @$(NORMAL_UNINSTALL) + +.PHONY: install_libopcodes uninstall_libopcodes +install_libopcodes: $(bfdlib_LTLIBRARIES) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) + $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ + else :; fi; \ + done + $(INSTALL_DATA) $(INCDIR)/dis-asm.h $(DESTDIR)$(bfdincludedir)/dis-asm.h + +uninstall_libopcodes: + list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ + done + rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h + CLEANFILES = \ - stamp-m32r stamp-fr30 stamp-openrisc \ + stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \ stamp-xstormy16 \ libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2 @@ -282,7 +322,7 @@ CPUDIR = $(CGENDIR)/cpu CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` CGENFLAGS = -v -CGENDEPS = ../cgen/stamp-cgen \ +CGENDEPS = \ $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \ $(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \ $(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \ @@ -292,11 +332,13 @@ CGENDEPS = ../cgen/stamp-cgen \ if CGEN_MAINT M32R_DEPS = stamp-m32r FR30_DEPS = stamp-fr30 +FRV_DEPS = stamp-frv OPENRISC_DEPS = stamp-openrisc XSTORMY16_DEPS = stamp-xstormy16 else M32R_DEPS = FR30_DEPS = +FRV_DEPS = OPENRISC_DEPS = XSTORMY16_DEPS = endif @@ -319,9 +361,10 @@ $(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30- stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc $(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles= -sh64-opc.lo: sh64-opc.c sh64-opc.h -sh64-dis.lo: sh64-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ - sh64-opc.h $(INCDIR)/dis-asm.h $(BFD_H) opintl.h +$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS) + @true +stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc + $(MAKE) run-cgen arch=frv prefix=frv options= extrafiles= $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS) @true @@ -348,6 +391,9 @@ s390-mkopc: s390-mkopc.c s390-opc.tab: s390-mkopc s390-opc.txt ./s390-mkopc < $(srcdir)/s390-opc.txt > s390-opc.tab +sh-dis.lo: sh-dis.c + $(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $< + Makefile: $(BFDDIR)/configure.in # This dependency stuff is copied from BFD. @@ -445,6 +491,8 @@ d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h opintl.h d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/d30v.h +dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -465,6 +513,23 @@ fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \ fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \ fr30-opc.h $(INCDIR)/libiberty.h +frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h +frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h +frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \ + $(BFD_H) $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \ + frv-opc.h opintl.h +frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \ + $(BFD_H) $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \ + frv-opc.h opintl.h +frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h opintl.h @@ -609,6 +674,12 @@ s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \ $(INCDIR)/opcode/s390.h sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h +sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ + sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +sh64-opc.lo: sh64-opc.c sh64-opc.h sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h @@ -634,12 +705,6 @@ v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h -sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ - $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ - sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h -sh64-opc.lo: sh64-opc.c sh64-opc.h w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \ diff --git a/contrib/binutils/opcodes/Makefile.in b/contrib/binutils/opcodes/Makefile.in index 466acf6..b1b7ae1 100644 --- a/contrib/binutils/opcodes/Makefile.in +++ b/contrib/binutils/opcodes/Makefile.in @@ -121,7 +121,10 @@ MKDEP = gcc -MM WARN_CFLAGS = @WARN_CFLAGS@ AM_CFLAGS = $(WARN_CFLAGS) -lib_LTLIBRARIES = libopcodes.la +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ + +bfdlib_LTLIBRARIES = libopcodes.la # This is where bfd.h lives. BFD_H = ../bfd/bfd.h @@ -133,15 +136,16 @@ LIBIBERTY = ../libiberty/libiberty.a HFILES = \ arm-opc.h \ fr30-desc.h fr30-opc.h \ + frv-desc.h frv-opc.h \ h8500-opc.h \ + ia64-asmtab.h \ + ia64-opc.h \ m32r-desc.h m32r-opc.h \ mcore-opc.h \ openrisc-desc.h openrisc-opc.h \ sh-opc.h \ + sh64-opc.h \ sysdep.h \ - ia64-asmtab.h \ - ia64-opc.h \ - sh64-opc.h \ w65-opc.h \ xstormy16-desc.h xstormy16-opc.h \ z8k-opc.h @@ -166,6 +170,7 @@ CFILES = \ d10v-opc.c \ d30v-dis.c \ d30v-opc.c \ + dlx-dis.c \ dis-buf.c \ disassemble.c \ fr30-asm.c \ @@ -173,6 +178,11 @@ CFILES = \ fr30-dis.c \ fr30-ibld.c \ fr30-opc.c \ + frv-asm.c \ + frv-desc.c \ + frv-dis.c \ + frv-ibld.c \ + frv-opc.c \ h8300-dis.c \ h8500-dis.c \ hppa-dis.c \ @@ -230,6 +240,8 @@ CFILES = \ s390-opc.c \ s390-dis.c \ sh-dis.c \ + sh64-dis.c \ + sh64-opc.c \ sparc-dis.c \ sparc-opc.c \ tic30-dis.c \ @@ -240,8 +252,6 @@ CFILES = \ v850-dis.c \ v850-opc.c \ vax-dis.c \ - sh64-dis.c \ - sh64-opc.c \ w65-dis.c \ xstormy16-asm.c \ xstormy16-desc.c \ @@ -270,11 +280,17 @@ ALL_MACHINES = \ d10v-opc.lo \ d30v-dis.lo \ d30v-opc.lo \ + dlx-dis.lo \ fr30-asm.lo \ fr30-desc.lo \ fr30-dis.lo \ fr30-ibld.lo \ fr30-opc.lo \ + frv-asm.lo \ + frv-desc.lo \ + frv-dis.lo \ + frv-ibld.lo \ + frv-opc.lo \ h8300-dis.lo \ h8500-dis.lo \ hppa-dis.lo \ @@ -323,6 +339,8 @@ ALL_MACHINES = \ s390-dis.lo \ s390-opc.lo \ sh-dis.lo \ + sh64-dis.lo \ + sh64-opc.lo \ sparc-dis.lo \ sparc-opc.lo \ tic30-dis.lo \ @@ -333,8 +351,6 @@ ALL_MACHINES = \ v850-dis.lo \ v850-opc.lo \ vax-dis.lo \ - sh64-dis.lo \ - sh64-opc.lo \ w65-dis.lo \ xstormy16-asm.lo \ xstormy16-desc.lo \ @@ -363,7 +379,7 @@ noinst_LIBRARIES = libopcodes.a POTFILES = $(HFILES) $(CFILES) CLEANFILES = \ - stamp-m32r stamp-fr30 stamp-openrisc \ + stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \ stamp-xstormy16 \ libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2 @@ -373,7 +389,7 @@ CPUDIR = $(CGENDIR)/cpu CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` CGENFLAGS = -v -CGENDEPS = ../cgen/stamp-cgen \ +CGENDEPS = \ $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \ $(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \ $(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \ @@ -384,6 +400,8 @@ CGENDEPS = ../cgen/stamp-cgen \ @CGEN_MAINT_FALSE@M32R_DEPS = @CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30 @CGEN_MAINT_FALSE@FR30_DEPS = +@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv +@CGEN_MAINT_FALSE@FRV_DEPS = @CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc @CGEN_MAINT_FALSE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16 @@ -402,7 +420,7 @@ LIBS = @LIBS@ libopcodes_a_LIBADD = libopcodes_a_SOURCES = libopcodes.a.c libopcodes_a_OBJECTS = libopcodes.a.$(OBJEXT) -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(bfdlib_LTLIBRARIES) libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo CFLAGS = @CFLAGS@ @@ -517,33 +535,17 @@ distclean-libtool: maintainer-clean-libtool: -mostlyclean-libLTLIBRARIES: +mostlyclean-bfdlibLTLIBRARIES: -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) +clean-bfdlibLTLIBRARIES: + -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES) -distclean-libLTLIBRARIES: +distclean-bfdlibLTLIBRARIES: -maintainer-clean-libLTLIBRARIES: - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ - done +maintainer-clean-bfdlibLTLIBRARIES: libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libopcodes_la_LDFLAGS) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS) + $(LINK) -rpath $(bfdlibdir) $(libopcodes_la_LDFLAGS) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -705,16 +707,16 @@ install-info: install-info-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-exec: install-exec-recursive -install-data-am: +install-data-am: install-bfdlibLTLIBRARIES install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-libLTLIBRARIES +uninstall-am: uninstall-bfdlibLTLIBRARIES uninstall: uninstall-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h all-redirect: all-recursive-am @@ -722,7 +724,7 @@ install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(libdir) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) mostlyclean-generic: @@ -737,19 +739,19 @@ distclean-generic: maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \ mostlyclean-compile mostlyclean-libtool \ - mostlyclean-libLTLIBRARIES mostlyclean-tags \ + mostlyclean-bfdlibLTLIBRARIES mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \ - clean-libLTLIBRARIES clean-tags clean-generic \ + clean-bfdlibLTLIBRARIES clean-tags clean-generic \ mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \ - distclean-libtool distclean-libLTLIBRARIES \ + distclean-libtool distclean-bfdlibLTLIBRARIES \ distclean-tags distclean-generic clean-am -rm -f libtool @@ -759,8 +761,9 @@ distclean: distclean-recursive maintainer-clean-am: maintainer-clean-hdr \ maintainer-clean-noinstLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-libLTLIBRARIES maintainer-clean-tags \ - maintainer-clean-generic distclean-am + maintainer-clean-bfdlibLTLIBRARIES \ + maintainer-clean-tags maintainer-clean-generic \ + distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." @@ -772,14 +775,14 @@ mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ -clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \ -distclean-libLTLIBRARIES clean-libLTLIBRARIES \ -maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \ -install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ +clean-libtool maintainer-clean-libtool mostlyclean-bfdlibLTLIBRARIES \ +distclean-bfdlibLTLIBRARIES clean-bfdlibLTLIBRARIES \ +maintainer-clean-bfdlibLTLIBRARIES uninstall-bfdlibLTLIBRARIES \ +install-bfdlibLTLIBRARIES install-data-recursive \ +uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-info-am \ @@ -812,6 +815,30 @@ po/POTFILES.in: @MAINT@ Makefile config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in $(SHELL) ./config.status --recheck +install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libopcodes + @$(NORMAL_INSTALL) + +uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libopcodes + @$(NORMAL_UNINSTALL) + +.PHONY: install_libopcodes uninstall_libopcodes +install_libopcodes: $(bfdlib_LTLIBRARIES) + $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) + $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ + else :; fi; \ + done + $(INSTALL_DATA) $(INCDIR)/dis-asm.h $(DESTDIR)$(bfdincludedir)/dis-asm.h + +uninstall_libopcodes: + list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ + done + rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h + run-cgen: $(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \ $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \ @@ -830,9 +857,10 @@ $(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30- stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc $(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles= -sh64-opc.lo: sh64-opc.c sh64-opc.h -sh64-dis.lo: sh64-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ - sh64-opc.h $(INCDIR)/dis-asm.h $(BFD_H) opintl.h +$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS) + @true +stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc + $(MAKE) run-cgen arch=frv prefix=frv options= extrafiles= $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS) @true @@ -859,6 +887,9 @@ s390-mkopc: s390-mkopc.c s390-opc.tab: s390-mkopc s390-opc.txt ./s390-mkopc < $(srcdir)/s390-opc.txt > s390-opc.tab +sh-dis.lo: sh-dis.c + $(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $< + Makefile: $(BFDDIR)/configure.in # This dependency stuff is copied from BFD. @@ -956,6 +987,8 @@ d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/symcat.h opintl.h d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/d30v.h +dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \ @@ -976,6 +1009,23 @@ fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \ fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \ fr30-opc.h $(INCDIR)/libiberty.h +frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h +frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h +frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \ + $(BFD_H) $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \ + frv-opc.h opintl.h +frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \ + $(BFD_H) $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \ + frv-opc.h opintl.h +frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \ + $(INCDIR)/opcode/cgen.h frv-opc.h h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h opintl.h @@ -1120,6 +1170,12 @@ s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \ $(INCDIR)/opcode/s390.h sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h +sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ + sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +sh64-opc.lo: sh64-opc.c sh64-opc.h sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h @@ -1145,12 +1201,6 @@ v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/symcat.h -sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ - $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \ - sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h -sh64-opc.lo: sh64-opc.c sh64-opc.h w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \ diff --git a/contrib/binutils/opcodes/acinclude.m4 b/contrib/binutils/opcodes/acinclude.m4 index bb689a5..3a47b1b 100644 --- a/contrib/binutils/opcodes/acinclude.m4 +++ b/contrib/binutils/opcodes/acinclude.m4 @@ -15,3 +15,10 @@ ifelse(yes,no,[ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) + +dnl AM_INSTALL_LIBBFD already included in bfd/acinclude.m4 +ifelse(yes,no,[ +AC_DEFUN([AM_INSTALL_LIBBFD],) +AC_SUBST(bfdlibdir) +AC_SUBST(bfdincludedir) +]) diff --git a/contrib/binutils/opcodes/aclocal.m4 b/contrib/binutils/opcodes/aclocal.m4 index 5858db7..184bf36 100644 --- a/contrib/binutils/opcodes/aclocal.m4 +++ b/contrib/binutils/opcodes/aclocal.m4 @@ -28,6 +28,13 @@ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) +dnl AM_INSTALL_LIBBFD already included in bfd/acinclude.m4 +ifelse(yes,no,[ +AC_DEFUN([AM_INSTALL_LIBBFD],) +AC_SUBST(bfdlibdir) +AC_SUBST(bfdincludedir) +]) + # 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. diff --git a/contrib/binutils/opcodes/arc-dis.c b/contrib/binutils/opcodes/arc-dis.c index d38e2fa..194a75a 100644 --- a/contrib/binutils/opcodes/arc-dis.c +++ b/contrib/binutils/opcodes/arc-dis.c @@ -1,5 +1,5 @@ /* Instruction printing code for the ARC. - Copyright 1994, 1995, 1997, 1998, 2000, 2001 + Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). @@ -17,8 +17,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> -#include <libiberty.h> +#include "ansidecl.h" +#include "libiberty.h" #include "dis-asm.h" #include "opcode/arc.h" #include "elf-bfd.h" diff --git a/contrib/binutils/opcodes/arm-dis.c b/contrib/binutils/opcodes/arm-dis.c index 7e9b330..f3785f2 100644 --- a/contrib/binutils/opcodes/arm-dis.c +++ b/contrib/binutils/opcodes/arm-dis.c @@ -1,5 +1,5 @@ /* Instruction printing code for the ARM - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modification by James G. Smith (jsmith@cygnus.co.uk) @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "libcoff.h" #include "opintl.h" -/* FIXME: This shouldn't be done here */ +/* FIXME: This shouldn't be done here. */ #include "elf-bfd.h" #include "elf/internal.h" #include "elf/arm.h" @@ -99,15 +99,16 @@ int get_arm_regnames (int option, const char **setname, const char **setdescription, const char ***register_names); -/* Functions. */ +/* Functions. */ int -get_arm_regname_num_options (void) +get_arm_regname_num_options () { return NUM_ARM_REGNAMES; } int -set_arm_regname_option (int option) +set_arm_regname_option (option) + int option; { int old = regname_selected; regname_selected = option; @@ -115,9 +116,11 @@ set_arm_regname_option (int option) } int -get_arm_regnames (int option, const char **setname, - const char **setdescription, - const char ***register_names) +get_arm_regnames (option, setname, setdescription, register_names) + int option; + const char **setname; + const char **setdescription; + const char ***register_names; { *setname = regnames[option].name; *setdescription = regnames[option].description; @@ -161,6 +164,7 @@ arm_decode_shift (given, func, stream) /* Print one instruction from PC on INFO->STREAM. Return the size of the instruction (always 4 on ARM). */ + static int print_insn_arm (pc, info, given) bfd_vma pc; @@ -200,7 +204,7 @@ print_insn_arm (pc, info, given) if ((given & 0x00800000) == 0) offset = - offset; - /* pre-indexed */ + /* Pre-indexed. */ func (stream, ", #%d]", offset); offset += pc + 8; @@ -217,7 +221,8 @@ print_insn_arm (pc, info, given) /* Post indexed. */ func (stream, "], #%d", offset); - offset = pc + 8; /* ie ignore the offset. */ + /* ie ignore the offset. */ + offset = pc + 8; } func (stream, "\t; "); @@ -740,6 +745,7 @@ print_insn_arm (pc, info, given) /* Print one instruction from PC on INFO->STREAM. Return the size of the instruction. */ + static int print_insn_thumb (pc, info, given) bfd_vma pc; @@ -765,26 +771,17 @@ print_insn_thumb (pc, info, given) info->bytes_per_line = 4; offset = BDISP23 (given); - + offset = offset * 2 + pc + 4; + if ((given & 0x10000000) == 0) { func (stream, "blx\t"); - - /* The spec says that bit 1 of the branch's destination - address comes from bit 1 of the instruction's - address and not from the offset in the instruction. */ - if (offset & 0x1) - { - /* func (stream, "*malformed!* "); */ - offset &= ~ 0x1; - } - - offset |= ((pc & 0x2) >> 1); + offset &= 0xfffffffc; } else func (stream, "bl\t"); - info->print_address_func (offset * 2 + pc + 4, info); + info->print_address_func (offset, info); return 4; } else @@ -988,6 +985,7 @@ print_insn_thumb (pc, info, given) } /* Parse an individual disassembler option. */ + void parse_arm_disassembler_option (option) char * option; @@ -1022,6 +1020,7 @@ parse_arm_disassembler_option (option) } /* Parse the string of disassembler options, spliting it at whitespaces. */ + static void parse_disassembler_options (options) char * options; @@ -1050,6 +1049,7 @@ parse_disassembler_options (options) /* NOTE: There are no checks in these routines that the relevant number of data bytes exist. */ + static int print_insn (pc, info, little) bfd_vma pc; diff --git a/contrib/binutils/opcodes/cgen-asm.in b/contrib/binutils/opcodes/cgen-asm.in index 475a4f1..525177c 100644 --- a/contrib/binutils/opcodes/cgen-asm.in +++ b/contrib/binutils/opcodes/cgen-asm.in @@ -275,7 +275,7 @@ parse_insn_normal (cd, insn, strp, fields) } /* We have an operand of some sort. */ - errmsg = @arch@_cgen_parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), + errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields); if (errmsg) return errmsg; diff --git a/contrib/binutils/opcodes/cgen-dis.in b/contrib/binutils/opcodes/cgen-dis.in index c78723e..7c59340 100644 --- a/contrib/binutils/opcodes/cgen-dis.in +++ b/contrib/binutils/opcodes/cgen-dis.in @@ -351,11 +351,21 @@ default_print_insn (cd, pc, info) Print one instruction from PC on INFO->STREAM. Return the size of the instruction (in bytes). */ +typedef struct cpu_desc_list { + struct cpu_desc_list *next; + int isa; + int mach; + int endian; + CGEN_CPU_DESC cd; +} cpu_desc_list; + int print_insn_@arch@ (pc, info) bfd_vma pc; disassemble_info *info; { + static cpu_desc_list *cd_list = 0; + cpu_desc_list *cl = 0; static CGEN_CPU_DESC cd = 0; static int prev_isa; static int prev_mach; @@ -389,15 +399,24 @@ print_insn_@arch@ (pc, info) isa = info->insn_sets; #endif - /* If we've switched cpu's, close the current table and open a new one. */ + /* If we've switched cpu's, try to find a handle we've used before */ if (cd && (isa != prev_isa || mach != prev_mach || endian != prev_endian)) { - @arch@_cgen_cpu_close (cd); cd = 0; - } + for (cl = cd_list; cl; cl = cl->next) + { + if (cl->isa == isa && + cl->mach == mach && + cl->endian == endian) + { + cd = cl->cd; + break; + } + } + } /* If we haven't initialized yet, initialize the opcode table. */ if (! cd) @@ -418,6 +437,16 @@ print_insn_@arch@ (pc, info) CGEN_CPU_OPEN_END); if (!cd) abort (); + + /* save this away for future reference */ + cl = xmalloc (sizeof (struct cpu_desc_list)); + cl->cd = cd; + cl->isa = isa; + cl->mach = mach; + cl->endian = endian; + cl->next = cd_list; + cd_list = cl; + @arch@_cgen_init_dis (cd); } diff --git a/contrib/binutils/opcodes/configure b/contrib/binutils/opcodes/configure index 2e978ada..93dc228 100755 --- a/contrib/binutils/opcodes/configure +++ b/contrib/binutils/opcodes/configure @@ -33,6 +33,8 @@ ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" ac_help="$ac_help + --install-libbfd controls installation of libbfd and related headers" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -548,12 +550,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:552: checking for Cygwin environment" >&5 +echo "configure:554: 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 557 "configure" +#line 559 "configure" #include "confdefs.h" int main() { @@ -564,7 +566,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -581,19 +583,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:585: checking for mingw32 environment" >&5 +echo "configure:587: 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 590 "configure" +#line 592 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -658,7 +660,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:662: checking host system type" >&5 +echo "configure:664: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -679,7 +681,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:683: checking target system type" >&5 +echo "configure:685: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -697,7 +699,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:701: checking build system type" >&5 +echo "configure:703: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -722,7 +724,7 @@ test "$host_alias" != "$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:726: checking for $ac_word" >&5 +echo "configure:728: 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 @@ -752,7 +754,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:756: checking for $ac_word" >&5 +echo "configure:758: 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 @@ -803,7 +805,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:807: checking for $ac_word" >&5 +echo "configure:809: 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 @@ -835,7 +837,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:841: 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. @@ -846,12 +848,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 850 "configure" +#line 852 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:857: \"$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 @@ -877,12 +879,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:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:883: 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:886: checking whether we are using GNU C" >&5 +echo "configure:888: 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 @@ -891,7 +893,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:895: \"$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:897: \"$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 @@ -910,7 +912,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:914: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:916: 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 @@ -942,7 +944,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:946: checking for POSIXized ISC" >&5 +echo "configure:948: 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 @@ -980,7 +982,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:984: checking for a BSD compatible install" >&5 +echo "configure:986: 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 @@ -1033,7 +1035,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:1037: checking whether build environment is sane" >&5 +echo "configure:1039: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1090,7 +1092,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:1094: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1096: 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 @@ -1136,7 +1138,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1140: checking for working aclocal" >&5 +echo "configure:1142: 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. @@ -1149,7 +1151,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1153: checking for working autoconf" >&5 +echo "configure:1155: 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. @@ -1162,7 +1164,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1166: checking for working automake" >&5 +echo "configure:1168: 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. @@ -1175,7 +1177,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1179: checking for working autoheader" >&5 +echo "configure:1181: 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. @@ -1188,7 +1190,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1192: checking for working makeinfo" >&5 +echo "configure:1194: 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. @@ -1211,7 +1213,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1215: checking for $ac_word" >&5 +echo "configure:1217: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1243,7 +1245,7 @@ fi # 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:1247: checking for $ac_word" >&5 +echo "configure:1249: 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 @@ -1275,7 +1277,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:1279: checking for $ac_word" >&5 +echo "configure:1281: 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 @@ -1390,7 +1392,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:1394: checking for ld used by GCC" >&5 +echo "configure:1396: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1420,10 +1422,10 @@ echo "configure:1394: 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:1424: checking for GNU ld" >&5 +echo "configure:1426: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1427: checking for non-GNU ld" >&5 +echo "configure:1429: 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 @@ -1458,7 +1460,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:1462: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1464: 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 @@ -1475,7 +1477,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:1479: checking for $LD option to reload object files" >&5 +echo "configure:1481: 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 @@ -1487,7 +1489,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:1491: checking for BSD-compatible nm" >&5 +echo "configure:1493: 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 @@ -1525,7 +1527,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:1529: checking whether ln -s works" >&5 +echo "configure:1531: 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 @@ -1546,7 +1548,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1550: checking how to recognise dependant libraries" >&5 +echo "configure:1552: 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 @@ -1719,13 +1721,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:1723: checking for object suffix" >&5 +echo "configure:1725: 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:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1745,7 +1747,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1749: checking for executable suffix" >&5 +echo "configure:1751: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1755,7 +1757,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1782,7 +1784,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:1786: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1788: 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 @@ -1844,7 +1846,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:1848: checking for file" >&5 +echo "configure:1850: 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 @@ -1915,7 +1917,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:1919: checking for $ac_word" >&5 +echo "configure:1921: 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 @@ -1947,7 +1949,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:1951: checking for $ac_word" >&5 +echo "configure:1953: 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 @@ -1982,7 +1984,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:1986: checking for $ac_word" >&5 +echo "configure:1988: 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 @@ -2014,7 +2016,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:2018: checking for $ac_word" >&5 +echo "configure:2020: 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 @@ -2081,8 +2083,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 2085 "configure"' > conftest.$ac_ext - if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2087 "configure"' > conftest.$ac_ext + if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2101,7 +2103,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2119,7 +2121,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:2123: checking whether the C compiler needs -belf" >&5 +echo "configure:2125: 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 @@ -2132,14 +2134,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 2136 "configure" +#line 2138 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2145: \"$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 @@ -2307,7 +2309,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2311: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2313: 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" @@ -2329,10 +2331,45 @@ fi MAINT=$MAINTAINER_MODE_TRUE +echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6 +echo "configure:2336: checking whether to install libbfd" >&5 + # Check whether --enable-install-libbfd or --disable-install-libbfd was given. +if test "${enable_install_libbfd+set}" = set; then + enableval="$enable_install_libbfd" + install_libbfd_p=$enableval +else + if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then + install_libbfd_p=yes + else + install_libbfd_p=no + fi +fi + + echo "$ac_t""$install_libbfd_p" 1>&6 + + +if test $install_libbfd_p = yes; then + INSTALL_LIBBFD_TRUE= + INSTALL_LIBBFD_FALSE='#' +else + INSTALL_LIBBFD_TRUE='#' + INSTALL_LIBBFD_FALSE= +fi + # libbfd.a is a host library containing target dependent code + bfdlibdir='$(libdir)' + bfdincludedir='$(includedir)' + if test "${host}" != "${target}"; then + bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' + bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' + fi + + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2336: checking for executable suffix" >&5 +echo "configure:2373: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2342,7 +2379,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -2368,7 +2405,7 @@ ac_exeext=$EXEEXT # 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:2372: checking for $ac_word" >&5 +echo "configure:2409: 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 @@ -2398,7 +2435,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:2402: checking for $ac_word" >&5 +echo "configure:2439: 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 @@ -2449,7 +2486,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:2453: checking for $ac_word" >&5 +echo "configure:2490: 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 @@ -2481,7 +2518,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2485: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2522: 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. @@ -2492,12 +2529,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2496 "configure" +#line 2533 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2538: \"$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 @@ -2523,12 +2560,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:2527: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2564: 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:2532: checking whether we are using GNU C" >&5 +echo "configure:2569: 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 @@ -2537,7 +2574,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2541: \"$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:2578: \"$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 @@ -2556,7 +2593,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:2560: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2597: 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 @@ -2588,9 +2625,9 @@ else fi -ALL_LINGUAS="fr sv tr es da de" +ALL_LINGUAS="fr sv tr es da de id pt_BR" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2594: checking how to run the C preprocessor" >&5 +echo "configure:2631: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2605,13 +2642,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 2609 "configure" +#line 2646 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2622,13 +2659,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2626 "configure" +#line 2663 "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:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2669: \"$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 : @@ -2639,13 +2676,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2643 "configure" +#line 2680 "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:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2686: \"$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 : @@ -2672,7 +2709,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:2676: checking for $ac_word" >&5 +echo "configure:2713: 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 @@ -2700,12 +2737,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2704: checking for ANSI C header files" >&5 +echo "configure:2741: 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 2709 "configure" +#line 2746 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2713,7 +2750,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2754: \"$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* @@ -2730,7 +2767,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 2734 "configure" +#line 2771 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2748,7 +2785,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 2752 "configure" +#line 2789 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2769,7 +2806,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2773 "configure" +#line 2810 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2780,7 +2817,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2804,12 +2841,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2808: checking for working const" >&5 +echo "configure:2845: 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 2813 "configure" +#line 2850 "configure" #include "confdefs.h" int main() { @@ -2858,7 +2895,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2879,21 +2916,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2883: checking for inline" >&5 +echo "configure:2920: 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 2890 "configure" +#line 2927 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2919,12 +2956,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2923: checking for off_t" >&5 +echo "configure:2960: 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 2928 "configure" +#line 2965 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2952,12 +2989,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2956: checking for size_t" >&5 +echo "configure:2993: 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 2961 "configure" +#line 2998 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2987,19 +3024,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:2991: checking for working alloca.h" >&5 +echo "configure:3028: 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 2996 "configure" +#line 3033 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3040: \"$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 @@ -3020,12 +3057,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3024: checking for alloca" >&5 +echo "configure:3061: 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 3029 "configure" +#line 3066 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3053,7 +3090,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3094: \"$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 @@ -3085,12 +3122,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3089: checking whether alloca needs Cray hooks" >&5 +echo "configure:3126: 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 3094 "configure" +#line 3131 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3115,12 +3152,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:3119: checking for $ac_func" >&5 +echo "configure:3156: 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 3124 "configure" +#line 3161 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3143,7 +3180,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3184: \"$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 @@ -3170,7 +3207,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3174: checking stack direction for C alloca" >&5 +echo "configure:3211: 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 @@ -3178,7 +3215,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3182 "configure" +#line 3219 "configure" #include "confdefs.h" find_stack_direction () { @@ -3197,7 +3234,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3238: \"$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 @@ -3222,17 +3259,17 @@ 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:3226: checking for $ac_hdr" >&5 +echo "configure:3263: 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 3231 "configure" +#line 3268 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3273: \"$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* @@ -3261,12 +3298,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3265: checking for $ac_func" >&5 +echo "configure:3302: 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 3270 "configure" +#line 3307 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3289,7 +3326,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3330: \"$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 @@ -3314,7 +3351,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3318: checking for working mmap" >&5 +echo "configure:3355: 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 @@ -3322,7 +3359,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3326 "configure" +#line 3363 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3475,7 +3512,7 @@ main() } EOF -if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3516: \"$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 @@ -3503,17 +3540,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:3507: checking for $ac_hdr" >&5 +echo "configure:3544: 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 3512 "configure" +#line 3549 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3554: \"$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* @@ -3543,12 +3580,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3547: checking for $ac_func" >&5 +echo "configure:3584: 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 3552 "configure" +#line 3589 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3571,7 +3608,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3612: \"$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 @@ -3600,12 +3637,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3604: checking for $ac_func" >&5 +echo "configure:3641: 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 3609 "configure" +#line 3646 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3628,7 +3665,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3669: \"$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 @@ -3662,19 +3699,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3666: checking for LC_MESSAGES" >&5 +echo "configure:3703: 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 3671 "configure" +#line 3708 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3715: \"$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 @@ -3695,7 +3732,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3699: checking whether NLS is requested" >&5 +echo "configure:3736: 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" @@ -3715,7 +3752,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3719: checking whether included gettext is requested" >&5 +echo "configure:3756: 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" @@ -3734,17 +3771,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3738: checking for libintl.h" >&5 +echo "configure:3775: 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 3743 "configure" +#line 3780 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3785: \"$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* @@ -3761,19 +3798,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:3765: checking for gettext in libc" >&5 +echo "configure:3802: 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 3770 "configure" +#line 3807 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3814: \"$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 @@ -3789,7 +3826,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:3793: checking for bindtextdomain in -lintl" >&5 +echo "configure:3830: 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 @@ -3797,7 +3834,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3801 "configure" +#line 3838 "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 @@ -3808,7 +3845,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3849: \"$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 @@ -3824,19 +3861,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:3828: checking for gettext in libintl" >&5 +echo "configure:3865: 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 3833 "configure" +#line 3870 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3877: \"$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 @@ -3864,7 +3901,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:3868: checking for $ac_word" >&5 +echo "configure:3905: 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 @@ -3898,12 +3935,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3902: checking for $ac_func" >&5 +echo "configure:3939: 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 3907 "configure" +#line 3944 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3926,7 +3963,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3967: \"$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 @@ -3953,7 +3990,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:3957: checking for $ac_word" >&5 +echo "configure:3994: 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 @@ -3989,7 +4026,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:3993: checking for $ac_word" >&5 +echo "configure:4030: 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 @@ -4021,7 +4058,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4025 "configure" +#line 4062 "configure" #include "confdefs.h" int main() { @@ -4029,7 +4066,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4061,7 +4098,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:4065: checking for $ac_word" >&5 +echo "configure:4102: 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 @@ -4095,7 +4132,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:4099: checking for $ac_word" >&5 +echo "configure:4136: 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 @@ -4131,7 +4168,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:4135: checking for $ac_word" >&5 +echo "configure:4172: 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 @@ -4221,7 +4258,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4225: checking for catalogs to be installed" >&5 +echo "configure:4262: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4249,17 +4286,17 @@ echo "configure:4225: 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:4253: checking for linux/version.h" >&5 +echo "configure:4290: 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 4258 "configure" +#line 4295 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4300: \"$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* @@ -4337,7 +4374,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4341: checking for build system executable suffix" >&5 +echo "configure:4378: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4374,7 +4411,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:4378: checking for a BSD compatible install" >&5 +echo "configure:4415: 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 @@ -4431,17 +4468,17 @@ for ac_hdr in string.h strings.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4435: checking for $ac_hdr" >&5 +echo "configure:4472: 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 4440 "configure" +#line 4477 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4482: \"$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* @@ -4567,6 +4604,7 @@ if test x${all_targets} = xfalse ; then bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;; bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; + bfd_dlx_arch) ta="$ta dlx-dis.lo" ;; bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;; bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; @@ -4604,7 +4642,8 @@ if test x${all_targets} = xfalse ; then # Include it just for ELF targets, since the SH5 bfd:s are ELF only. for t in $target $canon_targets; do case $t in - all | sh64-* | sh-*-*elf* | shl-*-*elf* | sh-*-linux* | shl-*-linux*) + all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ + sh-*-linux* | shl-*-linux*) ta="$ta sh64-dis.lo sh64-opc.lo" archdefs="$archdefs -DINCLUDE_SHMEDIA" break;; @@ -4624,6 +4663,7 @@ if test x${all_targets} = xfalse ; then bfd_we32k_arch) ;; bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; + bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;; "") ;; *) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;; @@ -4835,6 +4875,10 @@ s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g +s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g +s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g +s%@bfdlibdir@%$bfdlibdir%g +s%@bfdincludedir@%$bfdincludedir%g s%@CPP@%$CPP%g s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g diff --git a/contrib/binutils/opcodes/configure.in b/contrib/binutils/opcodes/configure.in index 0088fe9..3183bc7 100644 --- a/contrib/binutils/opcodes/configure.in +++ b/contrib/binutils/opcodes/configure.in @@ -71,13 +71,14 @@ if test -z "$target" ; then fi AM_MAINTAINER_MODE +AM_INSTALL_LIBBFD AC_EXEEXT # host-specific stuff: AC_PROG_CC -ALL_LINGUAS="fr sv tr es da de" +ALL_LINGUAS="fr sv tr es da de id pt_BR" CY_GNU_GETTEXT . ${srcdir}/../bfd/configure.host @@ -178,6 +179,7 @@ if test x${all_targets} = xfalse ; then bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;; bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; + bfd_dlx_arch) ta="$ta dlx-dis.lo" ;; bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;; bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; @@ -215,7 +217,8 @@ if test x${all_targets} = xfalse ; then # Include it just for ELF targets, since the SH5 bfd:s are ELF only. for t in $target $canon_targets; do case $t in - all | sh64-* | sh-*-*elf* | shl-*-*elf* | sh-*-linux* | shl-*-linux*) + all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ + sh-*-linux* | shl-*-linux*) ta="$ta sh64-dis.lo sh64-opc.lo" archdefs="$archdefs -DINCLUDE_SHMEDIA" break;; @@ -235,6 +238,7 @@ if test x${all_targets} = xfalse ; then bfd_we32k_arch) ;; bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; + bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;; "") ;; *) AC_MSG_ERROR(*** unknown target architecture $arch) ;; diff --git a/contrib/binutils/opcodes/disassemble.c b/contrib/binutils/opcodes/disassemble.c index 93f3f00..7c586c7 100644 --- a/contrib/binutils/opcodes/disassemble.c +++ b/contrib/binutils/opcodes/disassemble.c @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ARCH_cris #define ARCH_d10v #define ARCH_d30v +#define ARCH_dlx #define ARCH_h8300 #define ARCH_h8500 #define ARCH_hppa @@ -65,6 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ARCH_w65 #define ARCH_xstormy16 #define ARCH_z8k +#define ARCH_frv #define INCLUDE_SHMEDIA #endif @@ -126,6 +128,12 @@ disassembler (abfd) disassemble = print_insn_d30v; break; #endif +#ifdef ARCH_dlx + case bfd_arch_dlx: + /* As far as I know we only handle big-endian DLX objects. */ + disassemble = print_insn_dlx; + break; +#endif #ifdef ARCH_h8300 case bfd_arch_h8300: if (bfd_get_mach(abfd) == bfd_mach_h8300h) @@ -278,20 +286,7 @@ disassembler (abfd) #endif #ifdef ARCH_sh case bfd_arch_sh: -#ifdef INCLUDE_SHMEDIA - if (bfd_get_mach (abfd) == bfd_mach_sh5) - { - if (bfd_big_endian (abfd)) - disassemble = print_insn_sh64; - else - disassemble = print_insn_sh64l; - break; - } -#endif - if (bfd_big_endian (abfd)) - disassemble = print_insn_sh; - else - disassemble = print_insn_shl; + disassemble = print_insn_sh; break; #endif #ifdef ARCH_sparc @@ -342,6 +337,11 @@ disassembler (abfd) disassemble = print_insn_vax; break; #endif +#ifdef ARCH_frv + case bfd_arch_frv: + disassemble = print_insn_frv; + break; +#endif default: return 0; } @@ -355,6 +355,9 @@ disassembler_usage (stream) #ifdef ARCH_arm print_arm_disassembler_options (stream); #endif +#ifdef ARCH_powerpc + print_ppc_disassembler_options (stream); +#endif return; } diff --git a/contrib/binutils/opcodes/ia64-asmtab.c b/contrib/binutils/opcodes/ia64-asmtab.c index 45f60eb..f007f71 100644 --- a/contrib/binutils/opcodes/ia64-asmtab.c +++ b/contrib/binutils/opcodes/ia64-asmtab.c @@ -4203,8 +4203,8 @@ main_table[] = { { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x40, 681, }, { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x200, 1843, }, { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x240, 1844, }, - { 14, 4, 1, 0x0000002000000000ull, 0x000001ee00001000ull, { 14, 15, 0, 0, 0 }, 0x0, 437, }, - { 14, 4, 1, 0x0000002000000000ull, 0x000001ee00001000ull, { 14, 15, 0, 0, 0 }, 0x40, 438, }, + { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 14, 15, 0, 0, 0 }, 0x0, 437, }, + { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 14, 15, 0, 0, 0 }, 0x40, 438, }, { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 80, 0, 0, 0, 0 }, 0x40, 835, }, { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 80, 0, 0, 0, 0 }, 0x0, 682, }, { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 80, 0, 0, 0, 0 }, 0x40, 683, }, @@ -4585,7 +4585,7 @@ main_table[] = { }; static const char dis_table[] = { -0xa0, 0xc2, 0x60, 0xa0, 0x2c, 0x80, 0xa0, 0x2a, 0x80, 0xa0, 0x1a, 0x70, +0xa0, 0xc2, 0xa0, 0xa0, 0x2c, 0xc0, 0xa0, 0x2a, 0xc0, 0xa0, 0x1a, 0x70, 0x98, 0xb0, 0x01, 0x40, 0x90, 0x50, 0x90, 0x28, 0x24, 0x31, 0x48, 0x24, 0x31, 0x40, 0x90, 0x28, 0x24, 0x31, 0x38, 0x24, 0x31, 0x30, 0x90, 0x50, 0x90, 0x28, 0x24, 0x31, 0x20, 0x24, 0x31, 0x18, 0x90, 0x28, 0x24, 0x31, @@ -4659,557 +4659,558 @@ static const char dis_table[] = { 0x83, 0x37, 0x1b, 0x98, 0xb0, 0x01, 0x40, 0x90, 0x50, 0x90, 0x28, 0x24, 0x2e, 0x60, 0x24, 0x2e, 0x58, 0x90, 0x28, 0x24, 0x2e, 0x50, 0x24, 0x2e, 0x48, 0x90, 0x50, 0x90, 0x28, 0x24, 0x2e, 0x38, 0x24, 0x2e, 0x30, 0x90, -0x28, 0x24, 0x2e, 0x28, 0x24, 0x2e, 0x20, 0xa8, 0x08, 0xe0, 0x0d, 0xe0, -0x96, 0x38, 0x95, 0xe8, 0x9b, 0x48, 0x05, 0xa8, 0x91, 0xa0, 0x90, 0xd0, -0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x88, 0x33, 0x92, 0xa4, 0x1c, 0x78, -0x33, 0x90, 0x90, 0x38, 0xa4, 0x1c, 0x68, 0x33, 0x8e, 0x80, 0x33, 0x8c, -0x90, 0x60, 0x90, 0x28, 0x24, 0x1c, 0x28, 0xa4, 0x1c, 0x18, 0x33, 0x84, -0x90, 0x38, 0xa4, 0x1c, 0x08, 0x33, 0x82, 0xa4, 0x1c, 0x50, 0x33, 0x8b, -0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x40, 0x33, 0x89, 0xa4, -0x1c, 0x30, 0x33, 0x87, 0x90, 0x38, 0xa4, 0x2d, 0xd8, 0x35, 0xc1, 0xa4, -0x2d, 0x78, 0x35, 0xb5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2a, 0xb0, 0x35, -0x62, 0xa4, 0x2a, 0x80, 0x35, 0x5c, 0x10, 0x10, 0xa4, 0x1b, 0xf8, 0x33, -0x80, 0x91, 0x50, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1c, 0xb8, +0x28, 0x24, 0x2e, 0x28, 0x24, 0x2e, 0x20, 0xa8, 0x09, 0x00, 0x0e, 0x20, +0x96, 0x48, 0x95, 0xe8, 0x93, 0x38, 0x91, 0xa0, 0x90, 0xd0, 0x90, 0x70, +0x90, 0x38, 0xa4, 0x1c, 0x88, 0x33, 0x92, 0xa4, 0x1c, 0x78, 0x33, 0x90, +0x90, 0x38, 0xa4, 0x1c, 0x68, 0x33, 0x8e, 0x80, 0x33, 0x8c, 0x90, 0x60, +0x90, 0x28, 0x24, 0x1c, 0x28, 0xa4, 0x1c, 0x18, 0x33, 0x84, 0x90, 0x38, +0xa4, 0x1c, 0x08, 0x33, 0x82, 0xa4, 0x1c, 0x50, 0x33, 0x8b, 0x90, 0xe0, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x40, 0x33, 0x89, 0xa4, 0x1c, 0x30, +0x33, 0x87, 0x90, 0x38, 0xa4, 0x2d, 0xd8, 0x35, 0xc1, 0xa4, 0x2d, 0x78, +0x35, 0xb5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2a, 0xb0, 0x35, 0x62, 0xa4, +0x2a, 0x80, 0x35, 0x5c, 0x10, 0x10, 0xa4, 0x1b, 0xf8, 0x33, 0x80, 0x99, +0x60, 0x02, 0x70, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1c, 0xb8, 0x80, 0x33, 0x9e, 0x80, 0xa4, 0x1c, 0xc0, 0x33, 0x9c, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1c, 0xc8, 0x80, 0x33, 0x9f, 0x90, 0x38, 0xa4, 0x1c, 0xd0, 0x33, 0x9d, 0xa4, 0x1c, 0x98, 0x33, 0x94, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2d, 0x08, 0x35, 0xa9, 0xa4, 0x2c, 0x68, 0x35, 0x96, 0x90, 0x38, 0xa4, 0x2c, 0x00, 0x35, 0x87, 0xa4, 0x2b, 0x70, 0x35, 0x76, 0x81, -0xa4, 0x1c, 0xa8, 0x33, 0x96, 0xe4, 0xe1, 0xc5, 0x00, 0x37, 0x16, 0xed, -0x21, 0xc3, 0xa0, 0xdf, 0x80, 0x37, 0x10, 0x92, 0x40, 0x99, 0x18, 0x02, -0x00, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xd0, +0xa4, 0x1c, 0xa8, 0x33, 0x96, 0xe4, 0xa1, 0xc5, 0x00, 0x37, 0x16, 0x18, +0x24, 0x1b, 0xf0, 0xe4, 0xe1, 0xc3, 0x80, 0x37, 0x10, 0x92, 0x40, 0x91, +0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xd0, 0x35, 0xc0, 0xa4, 0x2d, 0x70, 0x35, 0xb4, 0x80, 0x90, 0x38, 0xa4, 0x2a, -0xa8, 0x35, 0x61, 0xa4, 0x2a, 0x78, 0x35, 0x5b, 0x10, 0x10, 0x80, 0x90, -0x70, 0x90, 0x38, 0xa4, 0x2c, 0xf8, 0x35, 0xa8, 0xa4, 0x2c, 0x60, 0x35, -0x94, 0x90, 0x38, 0xa4, 0x2b, 0xf0, 0x35, 0x86, 0xa4, 0x2b, 0x68, 0x35, -0x74, 0xe4, 0xe1, 0xc2, 0x00, 0x37, 0x0a, 0xed, 0x21, 0xc0, 0xa0, 0xdf, -0x40, 0x37, 0x04, 0x92, 0x80, 0x92, 0x40, 0x99, 0x18, 0x02, 0x00, 0x10, -0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc8, 0x35, 0xbf, -0xa4, 0x2d, 0x68, 0x35, 0xb3, 0x80, 0x90, 0x38, 0xa4, 0x2a, 0xa0, 0x35, -0x60, 0xa4, 0x2a, 0x70, 0x35, 0x5a, 0x10, 0x10, 0x80, 0x90, 0x70, 0x90, -0x38, 0xa4, 0x2c, 0xe8, 0x35, 0xa7, 0xa4, 0x2c, 0x58, 0x35, 0x92, 0x90, -0x38, 0xa4, 0x2b, 0xe0, 0x35, 0x85, 0xa4, 0x2b, 0x60, 0x35, 0x72, 0xe4, -0xe1, 0xc5, 0x40, 0x37, 0x18, 0xe5, 0x21, 0xc3, 0xc0, 0x37, 0x12, 0x92, -0x50, 0x99, 0x18, 0x02, 0x00, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, -0x38, 0xa4, 0x2d, 0xc0, 0x35, 0xbe, 0xa4, 0x2d, 0x60, 0x35, 0xb2, 0x80, -0x90, 0x38, 0xa4, 0x2a, 0x98, 0x35, 0x5f, 0xa4, 0x2a, 0x68, 0x35, 0x59, -0x10, 0x10, 0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xd8, 0x35, 0xa6, -0xa4, 0x2c, 0x50, 0x35, 0x90, 0x90, 0x38, 0xa4, 0x2b, 0xd0, 0x35, 0x84, -0xa4, 0x2b, 0x58, 0x35, 0x70, 0xec, 0xe1, 0xc2, 0x60, 0xe6, 0xc0, 0x37, -0x0c, 0xe5, 0x21, 0xc0, 0xc0, 0x37, 0x06, 0xc0, 0x40, 0x80, 0x10, 0x10, -0x81, 0x90, 0x90, 0x90, 0x48, 0xc9, 0xe1, 0x59, 0x80, 0x85, 0x35, 0x6a, -0xc9, 0xe1, 0x5a, 0x00, 0x85, 0x35, 0x67, 0x80, 0x35, 0x65, 0x80, 0xd8, -0x47, 0x80, 0x0d, 0xc0, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, -0x81, 0x80, 0x80, 0x37, 0x00, 0x80, 0x36, 0xfe, 0xd5, 0x81, 0x80, 0x80, -0x36, 0xfc, 0x80, 0x36, 0xfa, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, -0xd5, 0x81, 0x80, 0x80, 0x37, 0x01, 0x80, 0x36, 0xff, 0xd5, 0x81, 0x80, -0x80, 0x36, 0xfd, 0x80, 0x36, 0xfb, 0xc0, 0x80, 0x84, 0x36, 0xf9, 0xa0, -0x56, 0x50, 0xa0, 0x40, 0x70, 0xa8, 0x1d, 0x40, 0x33, 0x18, 0xa0, 0x12, -0x38, 0xa0, 0x0b, 0x48, 0x96, 0x00, 0x9a, 0xf0, 0x05, 0xc0, 0x91, 0x70, -0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x50, 0x33, 0x7c, 0xa4, -0x14, 0x60, 0x33, 0x7b, 0x10, 0x10, 0xa4, 0x14, 0x58, 0x33, 0x7a, 0x90, -0x70, 0x90, 0x38, 0xa4, 0x14, 0x20, 0x33, 0x61, 0xa4, 0x14, 0x30, 0x33, -0x60, 0x10, 0x10, 0xa4, 0x14, 0x28, 0x33, 0x5f, 0x90, 0xb8, 0x90, 0x70, -0x90, 0x38, 0xa4, 0x13, 0xf0, 0x33, 0x46, 0xa4, 0x14, 0x00, 0x33, 0x45, -0x10, 0x10, 0xa4, 0x13, 0xf8, 0x33, 0x44, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x13, 0xc0, 0x33, 0x2b, 0xa4, 0x13, 0xd0, 0x33, 0x2a, 0x10, 0x10, 0xa4, -0x13, 0xc8, 0x33, 0x29, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, -0xa4, 0x14, 0x38, 0x33, 0x77, 0xa4, 0x14, 0x48, 0x33, 0x79, 0x10, 0x10, -0xa4, 0x14, 0x40, 0x33, 0x78, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, -0x33, 0x5c, 0xa4, 0x14, 0x18, 0x33, 0x5e, 0x10, 0x10, 0xa4, 0x14, 0x10, -0x33, 0x5d, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xd8, 0x33, -0x41, 0xa4, 0x13, 0xe8, 0x33, 0x43, 0x10, 0x10, 0xa4, 0x13, 0xe0, 0x33, -0x42, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa8, 0x33, 0x26, 0xa4, 0x13, -0xb8, 0x33, 0x28, 0x10, 0x10, 0xa4, 0x13, 0xb0, 0x33, 0x27, 0xe4, 0xe1, -0x4f, 0xc0, 0x35, 0x49, 0x9a, 0xf0, 0x05, 0x00, 0x91, 0x70, 0x90, 0xb8, -0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa0, 0x33, 0x74, 0xa4, 0x13, 0x98, -0x33, 0x76, 0x10, 0x10, 0xa4, 0x13, 0x90, 0x33, 0x75, 0x90, 0x70, 0x90, -0x38, 0xa4, 0x13, 0x88, 0x33, 0x59, 0xa4, 0x13, 0x80, 0x33, 0x5b, 0x10, -0x10, 0xa4, 0x13, 0x78, 0x33, 0x5a, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, -0xa4, 0x13, 0x70, 0x33, 0x3e, 0xa4, 0x13, 0x68, 0x33, 0x40, 0x10, 0x10, -0xa4, 0x13, 0x60, 0x33, 0x3f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x58, -0x33, 0x23, 0xa4, 0x13, 0x50, 0x33, 0x25, 0x10, 0x10, 0xa4, 0x13, 0x48, -0x33, 0x24, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, -0x71, 0x80, 0x33, 0x73, 0x10, 0x10, 0x80, 0x33, 0x72, 0x90, 0x50, 0x90, -0x28, 0x80, 0x33, 0x56, 0x80, 0x33, 0x58, 0x10, 0x10, 0x80, 0x33, 0x57, -0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x3b, 0x80, 0x33, 0x3d, -0x10, 0x10, 0x80, 0x33, 0x3c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x20, -0x80, 0x33, 0x22, 0x10, 0x10, 0x80, 0x33, 0x21, 0xe4, 0xe1, 0x3d, 0x40, -0x35, 0x09, 0x95, 0x40, 0x9a, 0x90, 0x05, 0x00, 0x91, 0x10, 0x90, 0x88, -0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x6e, 0x80, 0x33, 0x70, 0x10, 0x10, -0x80, 0x33, 0x6f, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x53, 0x80, 0x33, -0x55, 0x10, 0x10, 0x80, 0x33, 0x54, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, -0xa4, 0x13, 0x30, 0x33, 0x38, 0xa4, 0x13, 0x40, 0x33, 0x3a, 0x10, 0x10, -0xa4, 0x13, 0x38, 0x33, 0x39, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x00, -0x33, 0x1d, 0xa4, 0x13, 0x10, 0x33, 0x1f, 0x10, 0x10, 0xa4, 0x13, 0x08, -0x33, 0x1e, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, -0x6b, 0x80, 0x33, 0x6d, 0x10, 0x10, 0x80, 0x33, 0x6c, 0x90, 0x50, 0x90, -0x28, 0x80, 0x33, 0x50, 0x80, 0x33, 0x52, 0x10, 0x10, 0x80, 0x33, 0x51, -0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x18, 0x33, 0x35, 0xa4, -0x13, 0x28, 0x33, 0x37, 0x10, 0x10, 0xa4, 0x13, 0x20, 0x33, 0x36, 0x90, -0x70, 0x90, 0x38, 0xa4, 0x12, 0xe8, 0x33, 0x1a, 0xa4, 0x12, 0xf8, 0x33, -0x1c, 0x10, 0x10, 0xa4, 0x12, 0xf0, 0x33, 0x1b, 0xe4, 0xe1, 0x4f, 0x40, -0x35, 0x47, 0x98, 0xb8, 0x01, 0x68, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, -0x90, 0x28, 0x80, 0x33, 0x17, 0x80, 0x33, 0x19, 0x10, 0x10, 0x80, 0x33, -0x18, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x97, 0x00, 0x60, 0xa0, 0x96, -0xc0, 0x90, 0x30, 0x60, 0xa0, 0x96, 0x80, 0x60, 0xa0, 0x96, 0x40, 0xe4, -0xe1, 0x3c, 0x40, 0x35, 0x05, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, -0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x65, -0x80, 0x33, 0x6a, 0x10, 0x10, 0x80, 0x33, 0x69, 0x90, 0x50, 0x90, 0x28, -0x80, 0x33, 0x4a, 0x80, 0x33, 0x4f, 0x10, 0x10, 0x80, 0x33, 0x4e, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x2f, 0x80, 0x33, 0x34, 0x10, -0x10, 0x80, 0x33, 0x33, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x11, 0x80, -0x33, 0x16, 0x10, 0x10, 0x80, 0x33, 0x15, 0x91, 0x10, 0x90, 0x88, 0x90, -0x50, 0x90, 0x28, 0x80, 0x33, 0x62, 0x80, 0x33, 0x64, 0x10, 0x10, 0x80, -0x33, 0x63, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x47, 0x80, 0x33, 0x49, -0x10, 0x10, 0x80, 0x33, 0x48, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x33, 0x2c, 0x80, 0x33, 0x2e, 0x10, 0x10, 0x80, 0x33, 0x2d, 0x90, 0x50, -0x90, 0x28, 0x80, 0x33, 0x0e, 0x80, 0x33, 0x10, 0x10, 0x10, 0x80, 0x33, -0x0f, 0xe4, 0xe1, 0x4e, 0xc0, 0x35, 0x45, 0x88, 0x02, 0x28, 0x91, 0x10, -0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x66, 0x80, 0x33, 0x68, -0x10, 0x10, 0x80, 0x33, 0x67, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4b, -0x80, 0x33, 0x4d, 0x10, 0x10, 0x80, 0x33, 0x4c, 0x90, 0x88, 0x90, 0x50, -0x90, 0x28, 0x80, 0x33, 0x30, 0x80, 0x33, 0x32, 0x10, 0x10, 0x80, 0x33, -0x31, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x12, 0x80, 0x33, 0x14, 0x10, -0x10, 0x80, 0x33, 0x13, 0xe4, 0xe1, 0x3b, 0x40, 0x35, 0x01, 0x93, 0x40, -0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, -0x9e, 0x10, 0x10, 0x80, 0x32, 0x9d, 0x90, 0x28, 0x81, 0x32, 0x9a, 0x10, -0x10, 0x80, 0x32, 0x99, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x96, 0x10, -0x10, 0x80, 0x32, 0x95, 0x90, 0x28, 0x81, 0x32, 0x92, 0x10, 0x10, 0x80, -0x32, 0x91, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9b, 0x10, -0x10, 0x80, 0x32, 0x9c, 0x90, 0x28, 0x81, 0x32, 0x97, 0x10, 0x10, 0x80, -0x32, 0x98, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x93, 0x10, 0x10, 0x80, -0x32, 0x94, 0x90, 0x28, 0x81, 0x32, 0x8f, 0x10, 0x10, 0x80, 0x32, 0x90, -0xe4, 0xe1, 0x4e, 0x40, 0x35, 0x43, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, -0x10, 0x90, 0x28, 0x81, 0x32, 0x8d, 0x10, 0x10, 0x80, 0x32, 0x8e, 0xe4, -0xe1, 0x3a, 0x40, 0x34, 0xfd, 0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08, 0x94, +0xa8, 0x35, 0x61, 0xa4, 0x2a, 0x78, 0x35, 0x5b, 0x18, 0x20, 0x00, 0xf8, +0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xf8, 0x35, 0xa8, 0xa4, 0x2c, +0x60, 0x35, 0x94, 0x90, 0x38, 0xa4, 0x2b, 0xf0, 0x35, 0x86, 0xa4, 0x2b, +0x68, 0x35, 0x74, 0xe4, 0xa1, 0xc2, 0x00, 0x37, 0x0a, 0x18, 0x24, 0x1b, +0xe8, 0xe4, 0xe1, 0xc0, 0x80, 0x37, 0x04, 0x92, 0x90, 0x92, 0x40, 0x91, +0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc8, +0x35, 0xbf, 0xa4, 0x2d, 0x68, 0x35, 0xb3, 0x80, 0x90, 0x38, 0xa4, 0x2a, +0xa0, 0x35, 0x60, 0xa4, 0x2a, 0x70, 0x35, 0x5a, 0x18, 0x20, 0x00, 0xf8, +0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xe8, 0x35, 0xa7, 0xa4, 0x2c, +0x58, 0x35, 0x92, 0x90, 0x38, 0xa4, 0x2b, 0xe0, 0x35, 0x85, 0xa4, 0x2b, +0x60, 0x35, 0x72, 0xe4, 0xa1, 0xc5, 0x40, 0x37, 0x18, 0x10, 0x10, 0xe4, +0xe1, 0xc3, 0xc0, 0x37, 0x12, 0x92, 0x50, 0x99, 0x1c, 0x1c, 0xd8, 0x10, +0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc0, 0x35, 0xbe, +0xa4, 0x2d, 0x60, 0x35, 0xb2, 0x80, 0x90, 0x38, 0xa4, 0x2a, 0x98, 0x35, +0x5f, 0xa4, 0x2a, 0x68, 0x35, 0x59, 0x18, 0x20, 0x00, 0xf8, 0x80, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x2c, 0xd8, 0x35, 0xa6, 0xa4, 0x2c, 0x50, 0x35, +0x90, 0x90, 0x38, 0xa4, 0x2b, 0xd0, 0x35, 0x84, 0xa4, 0x2b, 0x58, 0x35, +0x70, 0xe4, 0xa1, 0xc2, 0x40, 0x37, 0x0c, 0x10, 0x10, 0xe4, 0xe1, 0xc0, +0xc0, 0x37, 0x06, 0xc0, 0x40, 0x80, 0x10, 0x10, 0x81, 0x90, 0x90, 0x90, +0x48, 0xc9, 0xe1, 0x59, 0x80, 0x85, 0x35, 0x6a, 0xc9, 0xe1, 0x5a, 0x00, +0x85, 0x35, 0x67, 0x80, 0x35, 0x65, 0x80, 0xd8, 0x47, 0x80, 0x0d, 0xc0, +0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, 0x37, +0x00, 0x80, 0x36, 0xfe, 0xd5, 0x81, 0x80, 0x80, 0x36, 0xfc, 0x80, 0x36, +0xfa, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, +0x37, 0x01, 0x80, 0x36, 0xff, 0xd5, 0x81, 0x80, 0x80, 0x36, 0xfd, 0x80, +0x36, 0xfb, 0xc0, 0x80, 0x84, 0x36, 0xf9, 0xa0, 0x56, 0x50, 0xa0, 0x40, +0x70, 0xa8, 0x1d, 0x40, 0x33, 0x18, 0xa0, 0x12, 0x38, 0xa0, 0x0b, 0x48, +0x96, 0x00, 0x9a, 0xf0, 0x05, 0xc0, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, +0x90, 0x38, 0xa4, 0x14, 0x50, 0x33, 0x7c, 0xa4, 0x14, 0x60, 0x33, 0x7b, +0x10, 0x10, 0xa4, 0x14, 0x58, 0x33, 0x7a, 0x90, 0x70, 0x90, 0x38, 0xa4, +0x14, 0x20, 0x33, 0x61, 0xa4, 0x14, 0x30, 0x33, 0x60, 0x10, 0x10, 0xa4, +0x14, 0x28, 0x33, 0x5f, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, +0xf0, 0x33, 0x46, 0xa4, 0x14, 0x00, 0x33, 0x45, 0x10, 0x10, 0xa4, 0x13, +0xf8, 0x33, 0x44, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xc0, 0x33, 0x2b, +0xa4, 0x13, 0xd0, 0x33, 0x2a, 0x10, 0x10, 0xa4, 0x13, 0xc8, 0x33, 0x29, +0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x38, 0x33, +0x77, 0xa4, 0x14, 0x48, 0x33, 0x79, 0x10, 0x10, 0xa4, 0x14, 0x40, 0x33, +0x78, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, 0x33, 0x5c, 0xa4, 0x14, +0x18, 0x33, 0x5e, 0x10, 0x10, 0xa4, 0x14, 0x10, 0x33, 0x5d, 0x90, 0xb8, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xd8, 0x33, 0x41, 0xa4, 0x13, 0xe8, +0x33, 0x43, 0x10, 0x10, 0xa4, 0x13, 0xe0, 0x33, 0x42, 0x90, 0x70, 0x90, +0x38, 0xa4, 0x13, 0xa8, 0x33, 0x26, 0xa4, 0x13, 0xb8, 0x33, 0x28, 0x10, +0x10, 0xa4, 0x13, 0xb0, 0x33, 0x27, 0xe4, 0xe1, 0x4f, 0xc0, 0x35, 0x49, +0x9a, 0xf0, 0x05, 0x00, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, +0xa4, 0x13, 0xa0, 0x33, 0x74, 0xa4, 0x13, 0x98, 0x33, 0x76, 0x10, 0x10, +0xa4, 0x13, 0x90, 0x33, 0x75, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x88, +0x33, 0x59, 0xa4, 0x13, 0x80, 0x33, 0x5b, 0x10, 0x10, 0xa4, 0x13, 0x78, +0x33, 0x5a, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x70, 0x33, +0x3e, 0xa4, 0x13, 0x68, 0x33, 0x40, 0x10, 0x10, 0xa4, 0x13, 0x60, 0x33, +0x3f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x58, 0x33, 0x23, 0xa4, 0x13, +0x50, 0x33, 0x25, 0x10, 0x10, 0xa4, 0x13, 0x48, 0x33, 0x24, 0x91, 0x10, +0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x71, 0x80, 0x33, 0x73, +0x10, 0x10, 0x80, 0x33, 0x72, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x56, +0x80, 0x33, 0x58, 0x10, 0x10, 0x80, 0x33, 0x57, 0x90, 0x88, 0x90, 0x50, +0x90, 0x28, 0x80, 0x33, 0x3b, 0x80, 0x33, 0x3d, 0x10, 0x10, 0x80, 0x33, +0x3c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x20, 0x80, 0x33, 0x22, 0x10, +0x10, 0x80, 0x33, 0x21, 0xe4, 0xe1, 0x3d, 0x40, 0x35, 0x09, 0x95, 0x40, +0x9a, 0x90, 0x05, 0x00, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, +0x80, 0x33, 0x6e, 0x80, 0x33, 0x70, 0x10, 0x10, 0x80, 0x33, 0x6f, 0x90, +0x50, 0x90, 0x28, 0x80, 0x33, 0x53, 0x80, 0x33, 0x55, 0x10, 0x10, 0x80, +0x33, 0x54, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x30, 0x33, +0x38, 0xa4, 0x13, 0x40, 0x33, 0x3a, 0x10, 0x10, 0xa4, 0x13, 0x38, 0x33, +0x39, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x00, 0x33, 0x1d, 0xa4, 0x13, +0x10, 0x33, 0x1f, 0x10, 0x10, 0xa4, 0x13, 0x08, 0x33, 0x1e, 0x91, 0x10, +0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x6b, 0x80, 0x33, 0x6d, +0x10, 0x10, 0x80, 0x33, 0x6c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x50, +0x80, 0x33, 0x52, 0x10, 0x10, 0x80, 0x33, 0x51, 0x90, 0xb8, 0x90, 0x70, +0x90, 0x38, 0xa4, 0x13, 0x18, 0x33, 0x35, 0xa4, 0x13, 0x28, 0x33, 0x37, +0x10, 0x10, 0xa4, 0x13, 0x20, 0x33, 0x36, 0x90, 0x70, 0x90, 0x38, 0xa4, +0x12, 0xe8, 0x33, 0x1a, 0xa4, 0x12, 0xf8, 0x33, 0x1c, 0x10, 0x10, 0xa4, +0x12, 0xf0, 0x33, 0x1b, 0xe4, 0xe1, 0x4f, 0x40, 0x35, 0x47, 0x98, 0xb8, +0x01, 0x68, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, +0x17, 0x80, 0x33, 0x19, 0x10, 0x10, 0x80, 0x33, 0x18, 0x90, 0x60, 0x90, +0x30, 0x60, 0xa0, 0x97, 0x00, 0x60, 0xa0, 0x96, 0xc0, 0x90, 0x30, 0x60, +0xa0, 0x96, 0x80, 0x60, 0xa0, 0x96, 0x40, 0xe4, 0xe1, 0x3c, 0x40, 0x35, +0x05, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, +0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x65, 0x80, 0x33, 0x6a, 0x10, +0x10, 0x80, 0x33, 0x69, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4a, 0x80, +0x33, 0x4f, 0x10, 0x10, 0x80, 0x33, 0x4e, 0x90, 0x88, 0x90, 0x50, 0x90, +0x28, 0x80, 0x33, 0x2f, 0x80, 0x33, 0x34, 0x10, 0x10, 0x80, 0x33, 0x33, +0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x11, 0x80, 0x33, 0x16, 0x10, 0x10, +0x80, 0x33, 0x15, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, +0x33, 0x62, 0x80, 0x33, 0x64, 0x10, 0x10, 0x80, 0x33, 0x63, 0x90, 0x50, +0x90, 0x28, 0x80, 0x33, 0x47, 0x80, 0x33, 0x49, 0x10, 0x10, 0x80, 0x33, +0x48, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x2c, 0x80, 0x33, +0x2e, 0x10, 0x10, 0x80, 0x33, 0x2d, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, +0x0e, 0x80, 0x33, 0x10, 0x10, 0x10, 0x80, 0x33, 0x0f, 0xe4, 0xe1, 0x4e, +0xc0, 0x35, 0x45, 0x88, 0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, +0x90, 0x28, 0x80, 0x33, 0x66, 0x80, 0x33, 0x68, 0x10, 0x10, 0x80, 0x33, +0x67, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4b, 0x80, 0x33, 0x4d, 0x10, +0x10, 0x80, 0x33, 0x4c, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, +0x30, 0x80, 0x33, 0x32, 0x10, 0x10, 0x80, 0x33, 0x31, 0x90, 0x50, 0x90, +0x28, 0x80, 0x33, 0x12, 0x80, 0x33, 0x14, 0x10, 0x10, 0x80, 0x33, 0x13, +0xe4, 0xe1, 0x3b, 0x40, 0x35, 0x01, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, +0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9e, 0x10, 0x10, 0x80, +0x32, 0x9d, 0x90, 0x28, 0x81, 0x32, 0x9a, 0x10, 0x10, 0x80, 0x32, 0x99, +0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x96, 0x10, 0x10, 0x80, 0x32, 0x95, +0x90, 0x28, 0x81, 0x32, 0x92, 0x10, 0x10, 0x80, 0x32, 0x91, 0x90, 0xc0, +0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9b, 0x10, 0x10, 0x80, 0x32, 0x9c, +0x90, 0x28, 0x81, 0x32, 0x97, 0x10, 0x10, 0x80, 0x32, 0x98, 0x90, 0x60, +0x90, 0x28, 0x81, 0x32, 0x93, 0x10, 0x10, 0x80, 0x32, 0x94, 0x90, 0x28, +0x81, 0x32, 0x8f, 0x10, 0x10, 0x80, 0x32, 0x90, 0xe4, 0xe1, 0x4e, 0x40, +0x35, 0x43, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x81, +0x32, 0x8d, 0x10, 0x10, 0x80, 0x32, 0x8e, 0xe4, 0xe1, 0x3a, 0x40, 0x34, +0xfd, 0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08, 0x94, 0x80, 0x9a, 0x30, 0x04, +0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x0d, +0x80, 0x33, 0x0c, 0x10, 0x10, 0x80, 0x33, 0x0b, 0x90, 0x50, 0x90, 0x28, +0x80, 0x32, 0xf2, 0x80, 0x32, 0xf1, 0x10, 0x10, 0x80, 0x32, 0xf0, 0x90, +0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd7, 0x80, 0x32, 0xd6, 0x10, +0x10, 0x80, 0x32, 0xd5, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xbc, 0x80, +0x32, 0xbb, 0x10, 0x10, 0x80, 0x32, 0xba, 0x91, 0x10, 0x90, 0x88, 0x90, +0x50, 0x90, 0x28, 0x80, 0x33, 0x08, 0x80, 0x33, 0x0a, 0x10, 0x10, 0x80, +0x33, 0x09, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xed, 0x80, 0x32, 0xef, +0x10, 0x10, 0x80, 0x32, 0xee, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, +0x32, 0xd2, 0x80, 0x32, 0xd4, 0x10, 0x10, 0x80, 0x32, 0xd3, 0x90, 0x50, +0x90, 0x28, 0x80, 0x32, 0xb7, 0x80, 0x32, 0xb9, 0x10, 0x10, 0x80, 0x32, +0xb8, 0xe4, 0xe1, 0x47, 0x40, 0x35, 0x31, 0x9a, 0x30, 0x04, 0x40, 0x91, +0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x05, 0x80, 0x33, +0x07, 0x10, 0x10, 0x80, 0x33, 0x06, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, +0xea, 0x80, 0x32, 0xec, 0x10, 0x10, 0x80, 0x32, 0xeb, 0x90, 0x88, 0x90, +0x50, 0x90, 0x28, 0x80, 0x32, 0xcf, 0x80, 0x32, 0xd1, 0x10, 0x10, 0x80, +0x32, 0xd0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb4, 0x80, 0x32, 0xb6, +0x10, 0x10, 0x80, 0x32, 0xb5, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, +0x28, 0x80, 0x33, 0x02, 0x80, 0x33, 0x04, 0x10, 0x10, 0x80, 0x33, 0x03, +0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe7, 0x80, 0x32, 0xe9, 0x10, 0x10, +0x80, 0x32, 0xe8, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xcc, +0x80, 0x32, 0xce, 0x10, 0x10, 0x80, 0x32, 0xcd, 0x90, 0x50, 0x90, 0x28, +0x80, 0x32, 0xb1, 0x80, 0x32, 0xb3, 0x10, 0x10, 0x80, 0x32, 0xb2, 0xe4, +0xe1, 0x36, 0xc0, 0x34, 0xe5, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, +0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xff, 0x80, 0x33, +0x01, 0x10, 0x10, 0x80, 0x33, 0x00, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, +0xe4, 0x80, 0x32, 0xe6, 0x10, 0x10, 0x80, 0x32, 0xe5, 0x90, 0x88, 0x90, +0x50, 0x90, 0x28, 0x80, 0x32, 0xc9, 0x80, 0x32, 0xcb, 0x10, 0x10, 0x80, +0x32, 0xca, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xae, 0x80, 0x32, 0xb0, +0x10, 0x10, 0x80, 0x32, 0xaf, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, +0x28, 0x80, 0x32, 0xfc, 0x80, 0x32, 0xfe, 0x10, 0x10, 0x80, 0x32, 0xfd, +0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe1, 0x80, 0x32, 0xe3, 0x10, 0x10, +0x80, 0x32, 0xe2, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc6, +0x80, 0x32, 0xc8, 0x10, 0x10, 0x80, 0x32, 0xc7, 0x90, 0x50, 0x90, 0x28, +0x80, 0x32, 0xab, 0x80, 0x32, 0xad, 0x10, 0x10, 0x80, 0x32, 0xac, 0xe4, +0xe1, 0x46, 0x40, 0x35, 0x2d, 0x88, 0x00, 0xb0, 0x10, 0x10, 0x10, 0x10, +0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa8, 0x80, 0x32, 0xaa, 0x10, 0x10, +0x80, 0x32, 0xa9, 0xe4, 0xe1, 0x36, 0x40, 0x34, 0xe3, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, -0x28, 0x80, 0x33, 0x0d, 0x80, 0x33, 0x0c, 0x10, 0x10, 0x80, 0x33, 0x0b, -0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf2, 0x80, 0x32, 0xf1, 0x10, 0x10, -0x80, 0x32, 0xf0, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd7, -0x80, 0x32, 0xd6, 0x10, 0x10, 0x80, 0x32, 0xd5, 0x90, 0x50, 0x90, 0x28, -0x80, 0x32, 0xbc, 0x80, 0x32, 0xbb, 0x10, 0x10, 0x80, 0x32, 0xba, 0x91, -0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x08, 0x80, 0x33, -0x0a, 0x10, 0x10, 0x80, 0x33, 0x09, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, -0xed, 0x80, 0x32, 0xef, 0x10, 0x10, 0x80, 0x32, 0xee, 0x90, 0x88, 0x90, -0x50, 0x90, 0x28, 0x80, 0x32, 0xd2, 0x80, 0x32, 0xd4, 0x10, 0x10, 0x80, -0x32, 0xd3, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb7, 0x80, 0x32, 0xb9, -0x10, 0x10, 0x80, 0x32, 0xb8, 0xe4, 0xe1, 0x47, 0x40, 0x35, 0x31, 0x9a, -0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x33, 0x05, 0x80, 0x33, 0x07, 0x10, 0x10, 0x80, 0x33, 0x06, 0x90, 0x50, -0x90, 0x28, 0x80, 0x32, 0xea, 0x80, 0x32, 0xec, 0x10, 0x10, 0x80, 0x32, -0xeb, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xcf, 0x80, 0x32, -0xd1, 0x10, 0x10, 0x80, 0x32, 0xd0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, -0xb4, 0x80, 0x32, 0xb6, 0x10, 0x10, 0x80, 0x32, 0xb5, 0x91, 0x10, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x02, 0x80, 0x33, 0x04, 0x10, -0x10, 0x80, 0x33, 0x03, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe7, 0x80, -0x32, 0xe9, 0x10, 0x10, 0x80, 0x32, 0xe8, 0x90, 0x88, 0x90, 0x50, 0x90, -0x28, 0x80, 0x32, 0xcc, 0x80, 0x32, 0xce, 0x10, 0x10, 0x80, 0x32, 0xcd, -0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb1, 0x80, 0x32, 0xb3, 0x10, 0x10, -0x80, 0x32, 0xb2, 0xe4, 0xe1, 0x36, 0xc0, 0x34, 0xe5, 0x94, 0x80, 0x9a, -0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x32, 0xff, 0x80, 0x33, 0x01, 0x10, 0x10, 0x80, 0x33, 0x00, 0x90, 0x50, -0x90, 0x28, 0x80, 0x32, 0xe4, 0x80, 0x32, 0xe6, 0x10, 0x10, 0x80, 0x32, -0xe5, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc9, 0x80, 0x32, -0xcb, 0x10, 0x10, 0x80, 0x32, 0xca, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, -0xae, 0x80, 0x32, 0xb0, 0x10, 0x10, 0x80, 0x32, 0xaf, 0x91, 0x10, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xfc, 0x80, 0x32, 0xfe, 0x10, -0x10, 0x80, 0x32, 0xfd, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe1, 0x80, -0x32, 0xe3, 0x10, 0x10, 0x80, 0x32, 0xe2, 0x90, 0x88, 0x90, 0x50, 0x90, -0x28, 0x80, 0x32, 0xc6, 0x80, 0x32, 0xc8, 0x10, 0x10, 0x80, 0x32, 0xc7, -0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xab, 0x80, 0x32, 0xad, 0x10, 0x10, -0x80, 0x32, 0xac, 0xe4, 0xe1, 0x46, 0x40, 0x35, 0x2d, 0x88, 0x00, 0xb0, -0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa8, 0x80, -0x32, 0xaa, 0x10, 0x10, 0x80, 0x32, 0xa9, 0xe4, 0xe1, 0x36, 0x40, 0x34, -0xe3, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf6, 0x80, 0x32, 0xfb, 0x10, -0x10, 0x80, 0x32, 0xfa, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdb, 0x80, -0x32, 0xe0, 0x10, 0x10, 0x80, 0x32, 0xdf, 0x90, 0x88, 0x90, 0x50, 0x90, -0x28, 0x80, 0x32, 0xc0, 0x80, 0x32, 0xc5, 0x10, 0x10, 0x80, 0x32, 0xc4, -0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa2, 0x80, 0x32, 0xa7, 0x10, 0x10, -0x80, 0x32, 0xa6, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x32, 0xf3, 0x80, 0x32, 0xf5, 0x10, 0x10, 0x80, 0x32, 0xf4, 0x90, 0x50, -0x90, 0x28, 0x80, 0x32, 0xd8, 0x80, 0x32, 0xda, 0x10, 0x10, 0x80, 0x32, -0xd9, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xbd, 0x80, 0x32, -0xbf, 0x10, 0x10, 0x80, 0x32, 0xbe, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, -0x9f, 0x80, 0x32, 0xa1, 0x10, 0x10, 0x80, 0x32, 0xa0, 0xe4, 0xe1, 0x45, -0x40, 0x35, 0x29, 0x88, 0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, -0x90, 0x28, 0x80, 0x32, 0xf7, 0x80, 0x32, 0xf9, 0x10, 0x10, 0x80, 0x32, -0xf8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdc, 0x80, 0x32, 0xde, 0x10, -0x10, 0x80, 0x32, 0xdd, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, -0xc1, 0x80, 0x32, 0xc3, 0x10, 0x10, 0x80, 0x32, 0xc2, 0x90, 0x50, 0x90, -0x28, 0x80, 0x32, 0xa3, 0x80, 0x32, 0xa5, 0x10, 0x10, 0x80, 0x32, 0xa4, -0xe4, 0xe1, 0x35, 0xc0, 0x34, 0xe1, 0x90, 0x40, 0xe5, 0x21, 0x44, 0x40, -0x35, 0x25, 0xe5, 0x21, 0x35, 0x40, 0x34, 0xdf, 0x9e, 0xb4, 0x20, 0x08, -0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, -0x80, 0x8c, 0x37, 0x58, 0x84, 0x36, 0xf5, 0xa4, 0x35, 0x38, 0x36, 0xbf, -0x90, 0x28, 0x24, 0x34, 0x78, 0xa4, 0x32, 0xf8, 0x36, 0x77, 0xd0, 0xc4, -0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x38, 0x84, 0x36, 0xf3, 0xa4, 0x35, -0x28, 0x36, 0xbd, 0x90, 0x28, 0x24, 0x34, 0x68, 0xa4, 0x32, 0xe8, 0x36, -0x75, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdf, -0xa4, 0x35, 0x08, 0x36, 0xb9, 0x90, 0x28, 0x24, 0x34, 0x48, 0xa4, 0x32, -0xc8, 0x36, 0x71, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdb, 0xa4, -0x34, 0xf8, 0x36, 0xb7, 0x90, 0x28, 0x24, 0x34, 0x38, 0xa4, 0x32, 0xb8, -0x36, 0x6f, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, -0x80, 0x36, 0xd3, 0xa4, 0x34, 0xd8, 0x36, 0xb3, 0x90, 0x28, 0x24, 0x34, -0x18, 0xa4, 0x32, 0x98, 0x36, 0x6b, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, -0x36, 0xcf, 0xa4, 0x34, 0xc8, 0x36, 0xb1, 0x90, 0x28, 0x24, 0x34, 0x08, -0xa4, 0x32, 0x88, 0x36, 0x69, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, -0x28, 0x80, 0x36, 0xc7, 0xa4, 0x34, 0xa8, 0x36, 0xad, 0x90, 0x28, 0x24, -0x33, 0xe8, 0xa4, 0x32, 0x68, 0x36, 0x65, 0xd0, 0xc3, 0x40, 0x90, 0x28, -0x80, 0x36, 0xc3, 0xa4, 0x34, 0x98, 0x36, 0xab, 0x90, 0x28, 0x24, 0x33, -0xd8, 0xa4, 0x32, 0x58, 0x36, 0x63, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, -0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x78, 0x84, 0x36, -0xf7, 0xa4, 0x35, 0x48, 0x36, 0xc1, 0x90, 0x28, 0x24, 0x34, 0x88, 0xa4, -0x33, 0x08, 0x36, 0x79, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, -0x48, 0x84, 0x36, 0xf4, 0xa4, 0x35, 0x30, 0x36, 0xbe, 0x90, 0x28, 0x24, -0x34, 0x70, 0xa4, 0x32, 0xf0, 0x36, 0x76, 0xd5, 0x06, 0x80, 0xd0, 0xc3, -0x40, 0x90, 0x28, 0x80, 0x36, 0xe3, 0xa4, 0x35, 0x18, 0x36, 0xbb, 0x90, -0x28, 0x24, 0x34, 0x58, 0xa4, 0x32, 0xd8, 0x36, 0x73, 0xd0, 0xc3, 0x40, -0x90, 0x28, 0x80, 0x36, 0xdd, 0xa4, 0x35, 0x00, 0x36, 0xb8, 0x90, 0x28, -0x24, 0x34, 0x40, 0xa4, 0x32, 0xc0, 0x36, 0x70, 0x91, 0x98, 0xd5, 0x06, -0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd7, 0xa4, 0x34, 0xe8, -0x36, 0xb5, 0x90, 0x28, 0x24, 0x34, 0x28, 0xa4, 0x32, 0xa8, 0x36, 0x6d, -0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd1, 0xa4, 0x34, 0xd0, 0x36, -0xb2, 0x90, 0x28, 0x24, 0x34, 0x10, 0xa4, 0x32, 0x90, 0x36, 0x6a, 0xd5, -0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xcb, 0xa4, 0x34, -0xb8, 0x36, 0xaf, 0x90, 0x28, 0x24, 0x33, 0xf8, 0xa4, 0x32, 0x78, 0x36, -0x67, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc5, 0xa4, 0x34, 0xa0, -0x36, 0xac, 0x90, 0x28, 0x24, 0x33, 0xe0, 0xa4, 0x32, 0x60, 0x36, 0x64, -0x99, 0x08, 0x01, 0xf0, 0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, -0xb0, 0x33, 0xee, 0xa4, 0x1f, 0x30, 0x33, 0xde, 0xd4, 0xc2, 0x00, 0xa4, -0x1f, 0x40, 0x33, 0xf0, 0xa4, 0x1e, 0xc0, 0x33, 0xe0, 0x81, 0x90, 0x78, -0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x60, 0x33, 0xf4, 0xa4, 0x1e, 0xe0, 0x33, -0xe4, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x50, 0x33, 0xf2, 0xa4, 0x1e, 0xd0, -0x33, 0xe2, 0xa8, 0x0b, 0x18, 0x13, 0xa8, 0x96, 0x80, 0x93, 0x40, 0x99, -0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xb8, -0x32, 0x58, 0x24, 0x12, 0xb0, 0x90, 0x38, 0xa4, 0x11, 0xe0, 0x32, 0x3d, -0x24, 0x11, 0xd8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x11, 0x08, 0x32, 0x22, -0x24, 0x11, 0x00, 0x90, 0x38, 0xa4, 0x10, 0x30, 0x32, 0x07, 0x24, 0x10, -0x28, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xa8, 0x32, 0x53, -0x24, 0x12, 0xa0, 0x90, 0x38, 0xa4, 0x11, 0xd0, 0x32, 0x38, 0x24, 0x11, -0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xf8, 0x32, 0x1d, 0x24, 0x10, -0xf0, 0x90, 0x38, 0xa4, 0x10, 0x20, 0x32, 0x02, 0x24, 0x10, 0x18, 0xe4, -0xe1, 0x91, 0x40, 0x36, 0x47, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, -0x60, 0x90, 0x38, 0xa4, 0x12, 0x90, 0x32, 0x50, 0x24, 0x12, 0x88, 0x90, -0x38, 0xa4, 0x11, 0xb8, 0x32, 0x35, 0x24, 0x11, 0xb0, 0x90, 0x60, 0x90, -0x38, 0xa4, 0x10, 0xe0, 0x32, 0x1a, 0x24, 0x10, 0xd8, 0x90, 0x38, 0xa4, -0x10, 0x08, 0x31, 0xff, 0x24, 0x10, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, -0x38, 0xa4, 0x12, 0x78, 0x32, 0x4d, 0x24, 0x12, 0x70, 0x90, 0x38, 0xa4, -0x11, 0xa0, 0x32, 0x32, 0x24, 0x11, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x10, 0xc8, 0x32, 0x17, 0x24, 0x10, 0xc0, 0x90, 0x38, 0xa4, 0x0f, 0xf0, -0x31, 0xfc, 0x24, 0x0f, 0xe8, 0xe4, 0xe1, 0x8f, 0xc0, 0x36, 0x41, 0x93, -0x78, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x12, 0x60, 0x32, 0x4a, 0x24, 0x12, 0x58, 0x90, 0x38, 0xa4, 0x11, 0x88, -0x32, 0x2f, 0x24, 0x11, 0x80, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xb0, -0x32, 0x14, 0x24, 0x10, 0xa8, 0x90, 0x38, 0xa4, 0x0f, 0xd8, 0x31, 0xf9, -0x24, 0x0f, 0xd0, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x48, -0x32, 0x47, 0x24, 0x12, 0x40, 0x90, 0x38, 0xa4, 0x11, 0x70, 0x32, 0x2c, -0x24, 0x11, 0x68, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x98, 0x32, 0x11, -0x24, 0x10, 0x90, 0x90, 0x38, 0xa4, 0x0f, 0xc0, 0x31, 0xf6, 0x24, 0x0f, -0xb8, 0xec, 0xa0, 0xff, 0x00, 0x02, 0x00, 0x33, 0xfe, 0xa4, 0x31, 0xc8, -0x36, 0x3b, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, -0x0f, 0xa8, 0x31, 0xf3, 0x24, 0x0f, 0xa0, 0xe9, 0x60, 0xfe, 0x40, 0x02, -0x00, 0x33, 0xfa, 0xe3, 0x61, 0x8c, 0xc0, 0x36, 0x35, 0x95, 0x08, 0x93, -0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x12, 0x30, 0x32, 0x41, 0x24, 0x12, 0x28, 0x90, 0x38, 0xa4, 0x11, 0x58, -0x32, 0x26, 0x24, 0x11, 0x50, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x80, -0x32, 0x0b, 0x24, 0x10, 0x78, 0x90, 0x38, 0xa4, 0x0f, 0x90, 0x31, 0xed, -0x24, 0x0f, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x00, -0x32, 0x3e, 0x24, 0x11, 0xf8, 0x90, 0x38, 0xa4, 0x11, 0x28, 0x32, 0x23, -0x24, 0x11, 0x20, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x50, 0x32, 0x08, -0x24, 0x10, 0x48, 0x90, 0x38, 0xa4, 0x0f, 0x60, 0x31, 0xea, 0x24, 0x0f, -0x58, 0xe4, 0xe1, 0x91, 0x80, 0x36, 0x49, 0x88, 0x01, 0x88, 0x90, 0xc0, -0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x20, 0x32, 0x42, 0x24, 0x12, 0x18, -0x90, 0x38, 0xa4, 0x11, 0x48, 0x32, 0x27, 0x24, 0x11, 0x40, 0x90, 0x60, -0x90, 0x38, 0xa4, 0x10, 0x70, 0x32, 0x0c, 0x24, 0x10, 0x68, 0x90, 0x38, -0xa4, 0x0f, 0x80, 0x31, 0xee, 0x24, 0x0f, 0x78, 0xe4, 0xe1, 0x90, 0x00, -0x36, 0x43, 0x92, 0xd0, 0x99, 0x50, 0x02, 0x80, 0x90, 0xa0, 0x90, 0x50, -0x90, 0x28, 0x80, 0x31, 0xe9, 0x24, 0x0f, 0x40, 0x90, 0x28, 0x80, 0x31, -0xe5, 0x24, 0x0f, 0x20, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe1, 0x24, -0x0f, 0x00, 0x90, 0x28, 0x80, 0x31, 0xdd, 0x24, 0x0e, 0xe0, 0x90, 0xa0, -0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe6, 0x24, 0x0f, 0x38, 0x90, 0x28, -0x80, 0x31, 0xe2, 0x24, 0x0f, 0x18, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, -0xde, 0x24, 0x0e, 0xf8, 0x90, 0x28, 0x80, 0x31, 0xda, 0x24, 0x0e, 0xd8, -0xec, 0xe1, 0x8e, 0xa1, 0x00, 0x00, 0x36, 0x3d, 0x88, 0x00, 0x78, 0x10, -0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x31, 0xd8, 0x24, 0x0e, 0xc8, 0xec, -0xe1, 0x8d, 0x20, 0xfe, 0x00, 0x36, 0x37, 0xe5, 0xa1, 0x34, 0xc0, 0x34, -0xd1, 0xa0, 0x2a, 0x10, 0xa8, 0x16, 0x60, 0x29, 0xd8, 0xa0, 0x0c, 0x48, -0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, -0x50, 0x90, 0x28, 0x80, 0x31, 0xa1, 0x80, 0x31, 0xa0, 0x10, 0x10, 0x80, -0x31, 0x9f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x98, 0x31, 0xb3, 0xa4, -0x08, 0x90, 0x31, 0xb2, 0x10, 0x10, 0xa4, 0x08, 0x88, 0x31, 0xb1, 0x90, -0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0xb8, 0x31, 0xd7, 0xa4, 0x09, -0xb0, 0x31, 0xd6, 0x10, 0x10, 0xa4, 0x09, 0xa8, 0x31, 0xd5, 0x90, 0x70, -0x90, 0x38, 0xa4, 0x09, 0x28, 0x31, 0xc5, 0xa4, 0x09, 0x20, 0x31, 0xc4, -0x10, 0x10, 0xa4, 0x09, 0x18, 0x31, 0xc3, 0x91, 0x40, 0x90, 0x88, 0x90, -0x50, 0x90, 0x28, 0x80, 0x31, 0x9c, 0x80, 0x31, 0x9e, 0x10, 0x10, 0x80, -0x31, 0x9d, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x70, 0x31, 0xae, 0xa4, -0x08, 0x80, 0x31, 0xb0, 0x10, 0x10, 0xa4, 0x08, 0x78, 0x31, 0xaf, 0x90, -0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x90, 0x31, 0xd2, 0xa4, 0x09, -0xa0, 0x31, 0xd4, 0x10, 0x10, 0xa4, 0x09, 0x98, 0x31, 0xd3, 0x90, 0x70, -0x90, 0x38, 0xa4, 0x09, 0x00, 0x31, 0xc0, 0xa4, 0x09, 0x10, 0x31, 0xc2, -0x10, 0x10, 0xa4, 0x09, 0x08, 0x31, 0xc1, 0x92, 0xb0, 0x91, 0x40, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x99, 0x80, 0x31, 0x9b, 0x10, -0x10, 0x80, 0x31, 0x9a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x58, 0x31, -0xab, 0xa4, 0x08, 0x68, 0x31, 0xad, 0x10, 0x10, 0xa4, 0x08, 0x60, 0x31, -0xac, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x78, 0x31, 0xcf, -0xa4, 0x09, 0x88, 0x31, 0xd1, 0x10, 0x10, 0xa4, 0x09, 0x80, 0x31, 0xd0, -0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xe8, 0x31, 0xbd, 0xa4, 0x08, 0xf8, -0x31, 0xbf, 0x10, 0x10, 0xa4, 0x08, 0xf0, 0x31, 0xbe, 0x91, 0x40, 0x90, -0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x96, 0x80, 0x31, 0x98, 0x10, -0x10, 0x80, 0x31, 0x97, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x40, 0x31, -0xa8, 0xa4, 0x08, 0x50, 0x31, 0xaa, 0x10, 0x10, 0xa4, 0x08, 0x48, 0x31, -0xa9, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x60, 0x31, 0xcc, -0xa4, 0x09, 0x70, 0x31, 0xce, 0x10, 0x10, 0xa4, 0x09, 0x68, 0x31, 0xcd, -0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xd0, 0x31, 0xba, 0xa4, 0x08, 0xe0, -0x31, 0xbc, 0x10, 0x10, 0xa4, 0x08, 0xd8, 0x31, 0xbb, 0x10, 0x10, 0x90, -0xa8, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x8d, -0x80, 0x31, 0x8f, 0x10, 0x10, 0x80, 0x31, 0x8e, 0x90, 0x60, 0x90, 0x30, -0x60, 0xa0, 0x2a, 0xc0, 0x60, 0xa0, 0x2a, 0x80, 0x90, 0x30, 0x60, 0xa0, -0x2a, 0x40, 0x60, 0xa0, 0x2a, 0x00, 0x97, 0xf0, 0x95, 0x60, 0x92, 0xb0, -0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x93, 0x80, -0x31, 0x95, 0x10, 0x10, 0x80, 0x31, 0x94, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x08, 0x28, 0x31, 0xa5, 0xa4, 0x08, 0x38, 0x31, 0xa7, 0x10, 0x10, 0xa4, -0x08, 0x30, 0x31, 0xa6, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, -0x48, 0x31, 0xc9, 0xa4, 0x09, 0x58, 0x31, 0xcb, 0x10, 0x10, 0xa4, 0x09, -0x50, 0x31, 0xca, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xb8, 0x31, 0xb7, -0xa4, 0x08, 0xc8, 0x31, 0xb9, 0x10, 0x10, 0xa4, 0x08, 0xc0, 0x31, 0xb8, -0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x90, 0x80, -0x31, 0x92, 0x10, 0x10, 0x80, 0x31, 0x91, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x08, 0x10, 0x31, 0xa2, 0xa4, 0x08, 0x20, 0x31, 0xa4, 0x10, 0x10, 0xa4, -0x08, 0x18, 0x31, 0xa3, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, -0x30, 0x31, 0xc6, 0xa4, 0x09, 0x40, 0x31, 0xc8, 0x10, 0x10, 0xa4, 0x09, -0x38, 0x31, 0xc7, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xa0, 0x31, 0xb4, -0xa4, 0x08, 0xb0, 0x31, 0xb6, 0x10, 0x10, 0xa4, 0x08, 0xa8, 0x31, 0xb5, -0x10, 0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, -0xcb, 0x80, 0x30, 0xca, 0x90, 0x28, 0x80, 0x30, 0xc9, 0x80, 0x30, 0xc8, -0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xc4, 0x80, 0x30, 0xc7, 0x90, 0x28, -0x80, 0x30, 0xc6, 0x80, 0x30, 0xc5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, -0x80, 0x30, 0xbc, 0x80, 0x30, 0xc3, 0x90, 0x28, 0x80, 0x30, 0xc2, 0x80, -0x30, 0xc1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbd, 0x80, 0x30, 0xc0, -0x90, 0x28, 0x80, 0x30, 0xbf, 0x80, 0x30, 0xbe, 0x91, 0x88, 0x80, 0x90, -0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x31, 0x3b, 0x10, 0x10, 0x80, 0x31, -0x3a, 0x90, 0x28, 0x81, 0x31, 0x3d, 0x10, 0x10, 0x80, 0x31, 0x3c, 0x90, -0x60, 0x90, 0x28, 0x81, 0x31, 0x41, 0x10, 0x10, 0x80, 0x31, 0x40, 0x90, -0x28, 0x81, 0x31, 0x3f, 0x10, 0x10, 0x80, 0x31, 0x3e, 0x80, 0x10, 0x10, -0x10, 0x10, 0x90, 0x28, 0x81, 0x31, 0x38, 0x10, 0x10, 0x80, 0x31, 0x39, -0xa0, 0x0b, 0x90, 0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, -0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x56, 0x80, 0x31, 0x55, -0x10, 0x10, 0x80, 0x31, 0x54, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xe8, -0x31, 0x68, 0xa4, 0x06, 0xe0, 0x31, 0x67, 0x10, 0x10, 0xa4, 0x06, 0xd8, -0x31, 0x66, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x08, 0x31, -0x8c, 0xa4, 0x08, 0x00, 0x31, 0x8b, 0x10, 0x10, 0xa4, 0x07, 0xf8, 0x31, -0x8a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x78, 0x31, 0x7a, 0xa4, 0x07, -0x70, 0x31, 0x79, 0x10, 0x10, 0xa4, 0x07, 0x68, 0x31, 0x78, 0x91, 0x40, -0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x51, 0x80, 0x31, 0x53, -0x10, 0x10, 0x80, 0x31, 0x52, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xc0, -0x31, 0x63, 0xa4, 0x06, 0xd0, 0x31, 0x65, 0x10, 0x10, 0xa4, 0x06, 0xc8, -0x31, 0x64, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xe0, 0x31, -0x87, 0xa4, 0x07, 0xf0, 0x31, 0x89, 0x10, 0x10, 0xa4, 0x07, 0xe8, 0x31, -0x88, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x50, 0x31, 0x75, 0xa4, 0x07, -0x60, 0x31, 0x77, 0x10, 0x10, 0xa4, 0x07, 0x58, 0x31, 0x76, 0x92, 0xb0, -0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4e, 0x80, -0x31, 0x50, 0x10, 0x10, 0x80, 0x31, 0x4f, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x06, 0xa8, 0x31, 0x60, 0xa4, 0x06, 0xb8, 0x31, 0x62, 0x10, 0x10, 0xa4, -0x06, 0xb0, 0x31, 0x61, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, -0xc8, 0x31, 0x84, 0xa4, 0x07, 0xd8, 0x31, 0x86, 0x10, 0x10, 0xa4, 0x07, -0xd0, 0x31, 0x85, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x38, 0x31, 0x72, -0xa4, 0x07, 0x48, 0x31, 0x74, 0x10, 0x10, 0xa4, 0x07, 0x40, 0x31, 0x73, -0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4b, 0x80, -0x31, 0x4d, 0x10, 0x10, 0x80, 0x31, 0x4c, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x06, 0x90, 0x31, 0x5d, 0xa4, 0x06, 0xa0, 0x31, 0x5f, 0x10, 0x10, 0xa4, -0x06, 0x98, 0x31, 0x5e, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, -0xb0, 0x31, 0x81, 0xa4, 0x07, 0xc0, 0x31, 0x83, 0x10, 0x10, 0xa4, 0x07, -0xb8, 0x31, 0x82, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x20, 0x31, 0x6f, -0xa4, 0x07, 0x30, 0x31, 0x71, 0x10, 0x10, 0xa4, 0x07, 0x28, 0x31, 0x70, -0x10, 0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, -0x31, 0x42, 0x80, 0x31, 0x44, 0x10, 0x10, 0x80, 0x31, 0x43, 0x80, 0x95, +0x28, 0x80, 0x32, 0xf6, 0x80, 0x32, 0xfb, 0x10, 0x10, 0x80, 0x32, 0xfa, +0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdb, 0x80, 0x32, 0xe0, 0x10, 0x10, +0x80, 0x32, 0xdf, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc0, +0x80, 0x32, 0xc5, 0x10, 0x10, 0x80, 0x32, 0xc4, 0x90, 0x50, 0x90, 0x28, +0x80, 0x32, 0xa2, 0x80, 0x32, 0xa7, 0x10, 0x10, 0x80, 0x32, 0xa6, 0x91, +0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf3, 0x80, 0x32, +0xf5, 0x10, 0x10, 0x80, 0x32, 0xf4, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, +0xd8, 0x80, 0x32, 0xda, 0x10, 0x10, 0x80, 0x32, 0xd9, 0x90, 0x88, 0x90, +0x50, 0x90, 0x28, 0x80, 0x32, 0xbd, 0x80, 0x32, 0xbf, 0x10, 0x10, 0x80, +0x32, 0xbe, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0x9f, 0x80, 0x32, 0xa1, +0x10, 0x10, 0x80, 0x32, 0xa0, 0xe4, 0xe1, 0x45, 0x40, 0x35, 0x29, 0x88, +0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, +0xf7, 0x80, 0x32, 0xf9, 0x10, 0x10, 0x80, 0x32, 0xf8, 0x90, 0x50, 0x90, +0x28, 0x80, 0x32, 0xdc, 0x80, 0x32, 0xde, 0x10, 0x10, 0x80, 0x32, 0xdd, +0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc1, 0x80, 0x32, 0xc3, +0x10, 0x10, 0x80, 0x32, 0xc2, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa3, +0x80, 0x32, 0xa5, 0x10, 0x10, 0x80, 0x32, 0xa4, 0xe4, 0xe1, 0x35, 0xc0, +0x34, 0xe1, 0x90, 0x40, 0xe5, 0x21, 0x44, 0x40, 0x35, 0x25, 0xe5, 0x21, +0x35, 0x40, 0x34, 0xdf, 0x9e, 0xb4, 0x20, 0x08, 0x93, 0x70, 0x91, 0xd8, +0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x58, +0x84, 0x36, 0xf5, 0xa4, 0x35, 0x38, 0x36, 0xbf, 0x90, 0x28, 0x24, 0x34, +0x78, 0xa4, 0x32, 0xf8, 0x36, 0x77, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, +0x8c, 0x37, 0x38, 0x84, 0x36, 0xf3, 0xa4, 0x35, 0x28, 0x36, 0xbd, 0x90, +0x28, 0x24, 0x34, 0x68, 0xa4, 0x32, 0xe8, 0x36, 0x75, 0xd5, 0x06, 0x80, +0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdf, 0xa4, 0x35, 0x08, 0x36, +0xb9, 0x90, 0x28, 0x24, 0x34, 0x48, 0xa4, 0x32, 0xc8, 0x36, 0x71, 0xd0, +0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdb, 0xa4, 0x34, 0xf8, 0x36, 0xb7, +0x90, 0x28, 0x24, 0x34, 0x38, 0xa4, 0x32, 0xb8, 0x36, 0x6f, 0x91, 0x98, +0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd3, 0xa4, +0x34, 0xd8, 0x36, 0xb3, 0x90, 0x28, 0x24, 0x34, 0x18, 0xa4, 0x32, 0x98, +0x36, 0x6b, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xcf, 0xa4, 0x34, +0xc8, 0x36, 0xb1, 0x90, 0x28, 0x24, 0x34, 0x08, 0xa4, 0x32, 0x88, 0x36, +0x69, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc7, +0xa4, 0x34, 0xa8, 0x36, 0xad, 0x90, 0x28, 0x24, 0x33, 0xe8, 0xa4, 0x32, +0x68, 0x36, 0x65, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc3, 0xa4, +0x34, 0x98, 0x36, 0xab, 0x90, 0x28, 0x24, 0x33, 0xd8, 0xa4, 0x32, 0x58, +0x36, 0x63, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, +0x90, 0x48, 0x80, 0x8c, 0x37, 0x78, 0x84, 0x36, 0xf7, 0xa4, 0x35, 0x48, +0x36, 0xc1, 0x90, 0x28, 0x24, 0x34, 0x88, 0xa4, 0x33, 0x08, 0x36, 0x79, +0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x48, 0x84, 0x36, 0xf4, +0xa4, 0x35, 0x30, 0x36, 0xbe, 0x90, 0x28, 0x24, 0x34, 0x70, 0xa4, 0x32, +0xf0, 0x36, 0x76, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, +0x36, 0xe3, 0xa4, 0x35, 0x18, 0x36, 0xbb, 0x90, 0x28, 0x24, 0x34, 0x58, +0xa4, 0x32, 0xd8, 0x36, 0x73, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, +0xdd, 0xa4, 0x35, 0x00, 0x36, 0xb8, 0x90, 0x28, 0x24, 0x34, 0x40, 0xa4, +0x32, 0xc0, 0x36, 0x70, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, +0x90, 0x28, 0x80, 0x36, 0xd7, 0xa4, 0x34, 0xe8, 0x36, 0xb5, 0x90, 0x28, +0x24, 0x34, 0x28, 0xa4, 0x32, 0xa8, 0x36, 0x6d, 0xd0, 0xc3, 0x40, 0x90, +0x28, 0x80, 0x36, 0xd1, 0xa4, 0x34, 0xd0, 0x36, 0xb2, 0x90, 0x28, 0x24, +0x34, 0x10, 0xa4, 0x32, 0x90, 0x36, 0x6a, 0xd5, 0x06, 0x80, 0xd0, 0xc3, +0x40, 0x90, 0x28, 0x80, 0x36, 0xcb, 0xa4, 0x34, 0xb8, 0x36, 0xaf, 0x90, +0x28, 0x24, 0x33, 0xf8, 0xa4, 0x32, 0x78, 0x36, 0x67, 0xd0, 0xc3, 0x40, +0x90, 0x28, 0x80, 0x36, 0xc5, 0xa4, 0x34, 0xa0, 0x36, 0xac, 0x90, 0x28, +0x24, 0x33, 0xe0, 0xa4, 0x32, 0x60, 0x36, 0x64, 0x99, 0x08, 0x01, 0xf0, +0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0xb0, 0x33, 0xee, 0xa4, +0x1f, 0x30, 0x33, 0xde, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x40, 0x33, 0xf0, +0xa4, 0x1e, 0xc0, 0x33, 0xe0, 0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, +0x1f, 0x60, 0x33, 0xf4, 0xa4, 0x1e, 0xe0, 0x33, 0xe4, 0xd4, 0xc2, 0x00, +0xa4, 0x1f, 0x50, 0x33, 0xf2, 0xa4, 0x1e, 0xd0, 0x33, 0xe2, 0xa8, 0x0b, +0x18, 0x13, 0xa8, 0x96, 0x80, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 0x90, +0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xb8, 0x32, 0x58, 0x24, 0x12, +0xb0, 0x90, 0x38, 0xa4, 0x11, 0xe0, 0x32, 0x3d, 0x24, 0x11, 0xd8, 0x90, +0x60, 0x90, 0x38, 0xa4, 0x11, 0x08, 0x32, 0x22, 0x24, 0x11, 0x00, 0x90, +0x38, 0xa4, 0x10, 0x30, 0x32, 0x07, 0x24, 0x10, 0x28, 0x90, 0xc0, 0x90, +0x60, 0x90, 0x38, 0xa4, 0x12, 0xa8, 0x32, 0x53, 0x24, 0x12, 0xa0, 0x90, +0x38, 0xa4, 0x11, 0xd0, 0x32, 0x38, 0x24, 0x11, 0xc8, 0x90, 0x60, 0x90, +0x38, 0xa4, 0x10, 0xf8, 0x32, 0x1d, 0x24, 0x10, 0xf0, 0x90, 0x38, 0xa4, +0x10, 0x20, 0x32, 0x02, 0x24, 0x10, 0x18, 0xe4, 0xe1, 0x91, 0x40, 0x36, +0x47, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, +0x12, 0x90, 0x32, 0x50, 0x24, 0x12, 0x88, 0x90, 0x38, 0xa4, 0x11, 0xb8, +0x32, 0x35, 0x24, 0x11, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xe0, +0x32, 0x1a, 0x24, 0x10, 0xd8, 0x90, 0x38, 0xa4, 0x10, 0x08, 0x31, 0xff, +0x24, 0x10, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x78, +0x32, 0x4d, 0x24, 0x12, 0x70, 0x90, 0x38, 0xa4, 0x11, 0xa0, 0x32, 0x32, +0x24, 0x11, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xc8, 0x32, 0x17, +0x24, 0x10, 0xc0, 0x90, 0x38, 0xa4, 0x0f, 0xf0, 0x31, 0xfc, 0x24, 0x0f, +0xe8, 0xe4, 0xe1, 0x8f, 0xc0, 0x36, 0x41, 0x93, 0x78, 0x99, 0x90, 0x03, +0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x60, 0x32, 0x4a, +0x24, 0x12, 0x58, 0x90, 0x38, 0xa4, 0x11, 0x88, 0x32, 0x2f, 0x24, 0x11, +0x80, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xb0, 0x32, 0x14, 0x24, 0x10, +0xa8, 0x90, 0x38, 0xa4, 0x0f, 0xd8, 0x31, 0xf9, 0x24, 0x0f, 0xd0, 0x90, +0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x48, 0x32, 0x47, 0x24, 0x12, +0x40, 0x90, 0x38, 0xa4, 0x11, 0x70, 0x32, 0x2c, 0x24, 0x11, 0x68, 0x90, +0x60, 0x90, 0x38, 0xa4, 0x10, 0x98, 0x32, 0x11, 0x24, 0x10, 0x90, 0x90, +0x38, 0xa4, 0x0f, 0xc0, 0x31, 0xf6, 0x24, 0x0f, 0xb8, 0xec, 0xa0, 0xff, +0x00, 0x02, 0x00, 0x33, 0xfe, 0xa4, 0x31, 0xc8, 0x36, 0x3b, 0x88, 0x00, +0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x0f, 0xa8, 0x31, 0xf3, +0x24, 0x0f, 0xa0, 0xe9, 0x60, 0xfe, 0x40, 0x02, 0x00, 0x33, 0xfa, 0xe3, +0x61, 0x8c, 0xc0, 0x36, 0x35, 0x95, 0x08, 0x93, 0x40, 0x99, 0x90, 0x03, +0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x30, 0x32, 0x41, +0x24, 0x12, 0x28, 0x90, 0x38, 0xa4, 0x11, 0x58, 0x32, 0x26, 0x24, 0x11, +0x50, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x80, 0x32, 0x0b, 0x24, 0x10, +0x78, 0x90, 0x38, 0xa4, 0x0f, 0x90, 0x31, 0xed, 0x24, 0x0f, 0x88, 0x90, +0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x00, 0x32, 0x3e, 0x24, 0x11, +0xf8, 0x90, 0x38, 0xa4, 0x11, 0x28, 0x32, 0x23, 0x24, 0x11, 0x20, 0x90, +0x60, 0x90, 0x38, 0xa4, 0x10, 0x50, 0x32, 0x08, 0x24, 0x10, 0x48, 0x90, +0x38, 0xa4, 0x0f, 0x60, 0x31, 0xea, 0x24, 0x0f, 0x58, 0xe4, 0xe1, 0x91, +0x80, 0x36, 0x49, 0x88, 0x01, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, +0xa4, 0x12, 0x20, 0x32, 0x42, 0x24, 0x12, 0x18, 0x90, 0x38, 0xa4, 0x11, +0x48, 0x32, 0x27, 0x24, 0x11, 0x40, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, +0x70, 0x32, 0x0c, 0x24, 0x10, 0x68, 0x90, 0x38, 0xa4, 0x0f, 0x80, 0x31, +0xee, 0x24, 0x0f, 0x78, 0xe4, 0xe1, 0x90, 0x00, 0x36, 0x43, 0x92, 0xd0, +0x99, 0x50, 0x02, 0x80, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, +0xe9, 0x24, 0x0f, 0x40, 0x90, 0x28, 0x80, 0x31, 0xe5, 0x24, 0x0f, 0x20, +0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe1, 0x24, 0x0f, 0x00, 0x90, 0x28, +0x80, 0x31, 0xdd, 0x24, 0x0e, 0xe0, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, +0x80, 0x31, 0xe6, 0x24, 0x0f, 0x38, 0x90, 0x28, 0x80, 0x31, 0xe2, 0x24, +0x0f, 0x18, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xde, 0x24, 0x0e, 0xf8, +0x90, 0x28, 0x80, 0x31, 0xda, 0x24, 0x0e, 0xd8, 0xec, 0xe1, 0x8e, 0xa1, +0x00, 0x00, 0x36, 0x3d, 0x88, 0x00, 0x78, 0x10, 0x10, 0x10, 0x10, 0x90, +0x28, 0x80, 0x31, 0xd8, 0x24, 0x0e, 0xc8, 0xec, 0xe1, 0x8d, 0x20, 0xfe, +0x00, 0x36, 0x37, 0xe5, 0xa1, 0x34, 0xc0, 0x34, 0xd1, 0xa0, 0x2a, 0x10, +0xa8, 0x16, 0x60, 0x29, 0xd8, 0xa0, 0x0c, 0x48, 0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x31, 0x48, 0x80, 0x31, 0x4a, 0x10, 0x10, 0x80, 0x31, 0x49, 0x90, 0x70, -0x90, 0x38, 0xa4, 0x06, 0x78, 0x31, 0x5a, 0xa4, 0x06, 0x88, 0x31, 0x5c, -0x10, 0x10, 0xa4, 0x06, 0x80, 0x31, 0x5b, 0x90, 0xb8, 0x90, 0x70, 0x90, -0x38, 0xa4, 0x07, 0x98, 0x31, 0x7e, 0xa4, 0x07, 0xa8, 0x31, 0x80, 0x10, -0x10, 0xa4, 0x07, 0xa0, 0x31, 0x7f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, -0x08, 0x31, 0x6c, 0xa4, 0x07, 0x18, 0x31, 0x6e, 0x10, 0x10, 0xa4, 0x07, -0x10, 0x31, 0x6d, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, -0x31, 0x45, 0x80, 0x31, 0x47, 0x10, 0x10, 0x80, 0x31, 0x46, 0x90, 0x70, -0x90, 0x38, 0xa4, 0x06, 0x60, 0x31, 0x57, 0xa4, 0x06, 0x70, 0x31, 0x59, -0x10, 0x10, 0xa4, 0x06, 0x68, 0x31, 0x58, 0x90, 0xb8, 0x90, 0x70, 0x90, -0x38, 0xa4, 0x07, 0x80, 0x31, 0x7b, 0xa4, 0x07, 0x90, 0x31, 0x7d, 0x10, -0x10, 0xa4, 0x07, 0x88, 0x31, 0x7c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, -0xf0, 0x31, 0x69, 0xa4, 0x07, 0x00, 0x31, 0x6b, 0x10, 0x10, 0xa4, 0x06, -0xf8, 0x31, 0x6a, 0x10, 0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, -0x28, 0x80, 0x30, 0xbb, 0x80, 0x30, 0xba, 0x90, 0x28, 0x80, 0x30, 0xb9, -0x80, 0x30, 0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xb4, 0x80, 0x30, -0xb7, 0x90, 0x28, 0x80, 0x30, 0xb6, 0x80, 0x30, 0xb5, 0x90, 0xa0, 0x90, -0x50, 0x90, 0x28, 0x80, 0x30, 0xac, 0x80, 0x30, 0xb3, 0x90, 0x28, 0x80, -0x30, 0xb2, 0x80, 0x30, 0xb1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xad, -0x80, 0x30, 0xb0, 0x90, 0x28, 0x80, 0x30, 0xaf, 0x80, 0x30, 0xae, 0xc3, -0xc0, 0x30, 0x42, 0x9c, 0xe8, 0x07, 0x60, 0x91, 0x90, 0x90, 0xf0, 0x10, -0x10, 0x80, 0x88, 0x00, 0x80, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xbc, -0x80, 0x33, 0xbd, 0x81, 0x33, 0xb3, 0xd0, 0x41, 0x80, 0x24, 0x1e, 0xb0, -0x24, 0x1e, 0xb8, 0x10, 0x10, 0x80, 0x90, 0x58, 0x80, 0x90, 0x28, 0x24, -0x1d, 0xb0, 0x24, 0x1d, 0xb8, 0x81, 0x24, 0x1d, 0x70, 0x92, 0x68, 0x91, -0x00, 0x80, 0x90, 0x90, 0x90, 0x30, 0x80, 0x24, 0x1e, 0x20, 0x90, 0x38, -0xa4, 0x1e, 0x18, 0x33, 0xca, 0x80, 0x33, 0xc9, 0x80, 0x90, 0x28, 0x80, -0x33, 0xd3, 0xa4, 0x1e, 0x00, 0x33, 0xd2, 0x80, 0x90, 0xc0, 0x90, 0x60, -0x90, 0x28, 0x80, 0x33, 0xcd, 0xa4, 0x1e, 0x10, 0x33, 0xcc, 0x90, 0x28, -0x80, 0x33, 0xc8, 0xa4, 0x1e, 0x08, 0x33, 0xc7, 0x90, 0x50, 0x90, 0x28, -0x80, 0x33, 0xd1, 0x80, 0x33, 0xd0, 0x90, 0x28, 0x24, 0x1e, 0xa8, 0x24, -0x1e, 0xa0, 0x90, 0x58, 0x80, 0x10, 0x10, 0x80, 0x10, 0x10, 0x80, 0x33, -0xbf, 0x80, 0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x80, 0x80, 0x10, -0x10, 0x80, 0x33, 0xbe, 0x91, 0x58, 0x91, 0x00, 0x90, 0x80, 0x81, 0x90, -0x50, 0x90, 0x28, 0x80, 0x33, 0xba, 0x80, 0x33, 0xbb, 0x81, 0x33, 0xb2, -0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xb8, 0x80, 0x33, 0xb9, 0x81, -0x33, 0xb1, 0x83, 0x90, 0x28, 0x24, 0x1d, 0xa0, 0x24, 0x1d, 0xa8, 0x90, -0xe8, 0x81, 0x90, 0x88, 0x90, 0x38, 0x10, 0x10, 0x80, 0x33, 0xcb, 0x90, -0x28, 0x80, 0x33, 0xc6, 0x80, 0x33, 0xc5, 0x80, 0x90, 0x28, 0x80, 0x33, -0xcf, 0x80, 0x33, 0xce, 0x82, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x78, 0x97, -0x10, 0x9e, 0x10, 0x06, 0x98, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, -0x60, 0x90, 0x38, 0xa4, 0x03, 0x80, 0x30, 0x71, 0x24, 0x03, 0x78, 0x90, -0x38, 0xa4, 0x04, 0x10, 0x30, 0x83, 0x24, 0x04, 0x08, 0x90, 0x60, 0x90, -0x38, 0xa4, 0x05, 0x30, 0x30, 0xa7, 0x24, 0x05, 0x28, 0x90, 0x38, 0xa4, -0x04, 0xa0, 0x30, 0x95, 0x24, 0x04, 0x98, 0x90, 0xc0, 0x90, 0x60, 0x90, -0x38, 0xa4, 0x03, 0x70, 0x30, 0x6c, 0x24, 0x03, 0x68, 0x90, 0x38, 0xa4, -0x04, 0x00, 0x30, 0x7e, 0x24, 0x03, 0xf8, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x05, 0x20, 0x30, 0xa2, 0x24, 0x05, 0x18, 0x90, 0x38, 0xa4, 0x04, 0x90, -0x30, 0x90, 0x24, 0x04, 0x88, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, -0x38, 0xa4, 0x03, 0x58, 0x30, 0x69, 0x24, 0x03, 0x50, 0x90, 0x38, 0xa4, -0x03, 0xe8, 0x30, 0x7b, 0x24, 0x03, 0xe0, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x05, 0x08, 0x30, 0x9f, 0x24, 0x05, 0x00, 0x90, 0x38, 0xa4, 0x04, 0x78, -0x30, 0x8d, 0x24, 0x04, 0x70, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x03, 0x40, 0x30, 0x66, 0x24, 0x03, 0x38, 0x90, 0x38, 0xa4, 0x03, 0xd0, -0x30, 0x78, 0x24, 0x03, 0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xf0, -0x30, 0x9c, 0x24, 0x04, 0xe8, 0x90, 0x38, 0xa4, 0x04, 0x60, 0x30, 0x8a, -0x24, 0x04, 0x58, 0x10, 0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, -0xa4, 0x02, 0xf8, 0x30, 0x5d, 0x24, 0x02, 0xf0, 0xd7, 0x42, 0x00, 0xa4, -0x31, 0x78, 0x36, 0x31, 0xa4, 0x31, 0x58, 0x36, 0x2d, 0x9c, 0xe0, 0x06, -0x90, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, -0x03, 0x28, 0x30, 0x63, 0x24, 0x03, 0x20, 0x90, 0x38, 0xa4, 0x03, 0xb8, -0x30, 0x75, 0x24, 0x03, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xd8, -0x30, 0x99, 0x24, 0x04, 0xd0, 0x90, 0x38, 0xa4, 0x04, 0x48, 0x30, 0x87, -0x24, 0x04, 0x40, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x10, -0x30, 0x60, 0x24, 0x03, 0x08, 0x90, 0x38, 0xa4, 0x03, 0xa0, 0x30, 0x72, -0x24, 0x03, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xc0, 0x30, 0x96, -0x24, 0x04, 0xb8, 0x90, 0x38, 0xa4, 0x04, 0x30, 0x30, 0x84, 0x24, 0x04, -0x28, 0x10, 0x10, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x88, -0x30, 0x52, 0xa4, 0x02, 0x78, 0x30, 0x50, 0x90, 0x38, 0xa4, 0x02, 0x70, -0x30, 0x4b, 0xa4, 0x02, 0x60, 0x30, 0x4d, 0x90, 0x70, 0x90, 0x38, 0xa4, -0x02, 0x50, 0x30, 0x43, 0xa4, 0x02, 0x40, 0x30, 0x49, 0x90, 0x38, 0xa4, -0x02, 0x38, 0x30, 0x44, 0xa4, 0x02, 0x28, 0x30, 0x46, 0x91, 0x48, 0x80, -0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x56, 0x24, 0x02, 0xa8, -0x90, 0x28, 0x80, 0x30, 0x58, 0x24, 0x02, 0xb8, 0x90, 0x50, 0x90, 0x28, -0x80, 0x30, 0x5c, 0x24, 0x02, 0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, -0x02, 0xc8, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, -0x24, 0x02, 0xa0, 0xd7, 0x42, 0x00, 0xa4, 0x31, 0x80, 0x36, 0x32, 0xa4, -0x31, 0x60, 0x36, 0x2e, 0xa0, 0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, -0x88, 0x9e, 0x88, 0x09, 0xd0, 0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, -0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2c, 0x40, 0x85, 0x34, 0xcd, 0xcb, 0x61, -0x25, 0x00, 0x85, 0x34, 0xa3, 0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, -0x91, 0x10, 0x90, 0xa0, 0x90, 0x68, 0x90, 0x20, 0x38, 0x96, 0xc9, 0xe2, -0x25, 0x00, 0x85, 0x34, 0xcb, 0xa4, 0x44, 0x90, 0x38, 0x93, 0x90, 0x38, -0xa4, 0x44, 0x58, 0x38, 0x8c, 0xa4, 0x44, 0x48, 0x38, 0x8a, 0x90, 0x48, -0x10, 0x10, 0xa4, 0x44, 0x10, 0x38, 0x83, 0x10, 0x10, 0x80, 0x38, 0x7f, -0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xe0, 0x38, 0x7d, 0x91, 0xb0, 0x91, -0x60, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x44, 0x80, 0x38, 0x91, -0xa4, 0x44, 0x70, 0x38, 0x8f, 0x90, 0x38, 0xa4, 0x44, 0x38, 0x38, 0x88, -0xa4, 0x44, 0x28, 0x38, 0x86, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0x00, -0x38, 0x81, 0x10, 0x10, 0x80, 0x38, 0x7e, 0x90, 0x28, 0x80, 0x38, 0x77, -0x80, 0x38, 0x76, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xd0, 0x38, 0x7b, -0xcb, 0x61, 0x24, 0xc0, 0x85, 0x34, 0xa2, 0x90, 0xd8, 0x88, 0x00, 0x90, -0x84, 0x90, 0x38, 0xc1, 0xc0, 0x85, 0x38, 0x9a, 0xc9, 0xe1, 0x2c, 0x00, -0x85, 0x34, 0xc9, 0xcb, 0x61, 0x24, 0x80, 0x85, 0x34, 0xa1, 0x88, 0x00, -0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2b, 0xc0, 0x85, 0x34, 0xc7, 0xcb, -0x61, 0x24, 0x40, 0x85, 0x34, 0xa0, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, -0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2b, 0x40, 0x85, 0x34, 0xc3, 0xcb, -0x61, 0x23, 0xc0, 0x85, 0x34, 0x9e, 0x88, 0x01, 0x00, 0x90, 0xa0, 0x81, -0x90, 0x70, 0x80, 0x90, 0x20, 0x38, 0x8d, 0xc9, 0xe1, 0x2b, 0x00, 0x85, -0x34, 0xc1, 0x81, 0x38, 0x84, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xc0, -0x38, 0x79, 0xcb, 0x61, 0x23, 0x80, 0x85, 0x34, 0x9d, 0x90, 0xb0, 0x88, -0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, 0xc0, 0x85, 0x34, 0xbf, -0xcb, 0x61, 0x23, 0x40, 0x85, 0x34, 0x9c, 0x88, 0x00, 0x68, 0x84, 0x10, -0x10, 0xc9, 0xe1, 0x2a, 0x80, 0x85, 0x34, 0xbd, 0xcb, 0x61, 0x23, 0x00, -0x85, 0x34, 0x9b, 0x92, 0x38, 0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, -0x90, 0x40, 0x80, 0xa4, 0x45, 0x48, 0x38, 0xaa, 0x80, 0xa4, 0x45, 0x40, -0x38, 0xa7, 0x90, 0x28, 0x81, 0x38, 0xa6, 0x90, 0x38, 0xa4, 0x45, 0x20, -0x38, 0xa5, 0xa4, 0x45, 0x10, 0x38, 0xa3, 0x90, 0x28, 0x80, 0x38, 0xa1, -0x80, 0x38, 0xa0, 0x80, 0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x44, 0xf8, -0x10, 0x10, 0x90, 0x38, 0xa4, 0x44, 0xe8, 0x38, 0x9e, 0xa4, 0x44, 0xd8, -0x38, 0x9c, 0x90, 0x50, 0x80, 0xc9, 0xa2, 0x26, 0x00, 0x85, 0x38, 0x99, -0x80, 0x38, 0x97, 0x9a, 0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, -0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, 0x00, 0x85, 0x34, 0xb9, -0xcb, 0x61, 0x22, 0x80, 0x85, 0x34, 0x99, 0x88, 0x00, 0x68, 0x84, 0x10, -0x10, 0xc9, 0xe1, 0x29, 0xc0, 0x85, 0x34, 0xb7, 0xcb, 0x61, 0x22, 0x40, -0x85, 0x34, 0x98, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, -0xe1, 0x29, 0x80, 0x85, 0x34, 0xb5, 0xcb, 0x61, 0x22, 0x00, 0x85, 0x34, -0x97, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x40, 0x85, -0x34, 0xb3, 0xcb, 0x61, 0x21, 0xc0, 0x85, 0x34, 0x96, 0x90, 0x90, 0x90, -0x48, 0xcb, 0xa1, 0x20, 0x00, 0x85, 0x34, 0x85, 0xcb, 0xa1, 0x1f, 0xc0, -0x85, 0x34, 0x84, 0x90, 0x48, 0xcb, 0xa1, 0x1f, 0x80, 0x85, 0x34, 0x83, -0xcb, 0xa1, 0x1f, 0x40, 0x85, 0x34, 0x82, 0xcb, 0xa2, 0x1d, 0x00, 0x80, -0x38, 0x75, 0x92, 0x40, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, -0x60, 0x84, 0x24, 0x23, 0xd8, 0x8c, 0x23, 0x58, 0x84, 0x24, 0x23, 0xd0, -0x90, 0x48, 0x8c, 0x23, 0x50, 0x84, 0x24, 0x23, 0xc8, 0x8c, 0x23, 0x48, -0x84, 0x24, 0x23, 0xc0, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x38, 0x84, -0x24, 0x23, 0xb0, 0x8c, 0x23, 0x30, 0x84, 0x24, 0x23, 0xa8, 0x90, 0x48, -0x8c, 0x23, 0x28, 0x84, 0x24, 0x23, 0xa0, 0x8c, 0x23, 0x20, 0x84, 0x24, -0x23, 0x98, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x10, 0x84, -0x24, 0x23, 0x88, 0x8c, 0x23, 0x08, 0x84, 0x24, 0x23, 0x80, 0x90, 0x48, -0x8c, 0x23, 0x00, 0x84, 0x24, 0x23, 0x78, 0x8c, 0x22, 0xf8, 0x84, 0x24, -0x23, 0x70, 0x90, 0x38, 0xa4, 0x22, 0xe0, 0x34, 0x5d, 0xa4, 0x22, 0xd0, -0x34, 0x5b, 0xa0, 0x0f, 0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, -0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x1c, 0x00, -0x38, 0x6c, 0xe5, 0x22, 0x18, 0x00, 0x38, 0x6a, 0xcb, 0x61, 0x12, 0x40, -0x85, 0x34, 0x58, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x14, 0x00, 0x38, -0x4c, 0xe5, 0x22, 0x10, 0x00, 0x38, 0x4a, 0xcb, 0x61, 0x12, 0x00, 0x85, -0x34, 0x57, 0x90, 0x48, 0xcb, 0xa1, 0x11, 0xc0, 0x85, 0x34, 0x56, 0xcb, -0xa1, 0x11, 0x80, 0x85, 0x34, 0x55, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, -0x00, 0x80, 0xe5, 0x22, 0x09, 0x00, 0x38, 0x30, 0xe5, 0x22, 0x03, 0x00, -0x38, 0x18, 0xcb, 0x61, 0x11, 0x00, 0x85, 0x34, 0x53, 0x98, 0x50, 0x00, -0x80, 0xe5, 0x21, 0xfd, 0x00, 0x38, 0x00, 0xe5, 0x21, 0xf7, 0x00, 0x37, -0xe8, 0xcb, 0x61, 0x10, 0xc0, 0x85, 0x34, 0x52, 0x90, 0x48, 0xcb, 0xa1, -0x10, 0x80, 0x85, 0x34, 0x51, 0xcb, 0xa1, 0x10, 0x40, 0x85, 0x34, 0x50, -0x92, 0x20, 0x91, 0x30, 0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, -0x8c, 0x01, 0xa0, 0x84, 0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, -0x84, 0x30, 0x3c, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, -0xc0, 0x81, 0x30, 0x24, 0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, -0x30, 0x1c, 0xc0, 0xc0, 0x81, 0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, -0x81, 0x30, 0x10, 0xc0, 0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, -0xd5, 0x03, 0x80, 0xc8, 0xe1, 0xf3, 0x00, 0x81, 0x8c, 0x01, 0xc0, 0x84, -0x30, 0x40, 0xc8, 0xe1, 0xf4, 0x00, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, -0x3d, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xf2, 0x80, 0x81, 0x30, 0x2c, 0xc8, -0xe1, 0xef, 0x80, 0x81, 0x30, 0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, -0xe1, 0xe9, 0x80, 0x81, 0x30, 0x20, 0xc8, 0xe1, 0xea, 0x80, 0x81, 0x30, -0x1a, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xe9, 0x00, 0x81, 0x30, 0x14, 0xc8, -0xe1, 0xe6, 0x00, 0x81, 0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, -0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x16, 0x00, 0x38, 0x54, -0xe5, 0x22, 0x17, 0x00, 0x38, 0x66, 0xcb, 0x61, 0x0f, 0xc0, 0x85, 0x34, -0x4e, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0e, 0x00, 0x38, 0x34, 0xe5, -0x22, 0x0f, 0x00, 0x38, 0x46, 0xcb, 0x61, 0x0f, 0x80, 0x85, 0x34, 0x4d, -0x90, 0x48, 0xcb, 0xa1, 0x0f, 0x40, 0x85, 0x34, 0x4c, 0xcb, 0xa1, 0x0f, -0x00, 0x85, 0x34, 0x4b, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, -0xe5, 0x22, 0x07, 0x00, 0x38, 0x28, 0xe5, 0x22, 0x01, 0x00, 0x38, 0x10, -0xcb, 0x61, 0x0d, 0x40, 0x85, 0x34, 0x3a, 0x98, 0x50, 0x00, 0x80, 0xe5, -0x21, 0xfb, 0x00, 0x37, 0xf8, 0xe5, 0x21, 0xf5, 0x00, 0x37, 0xe0, 0xcb, -0x61, 0x0d, 0x00, 0x85, 0x34, 0x39, 0x90, 0x48, 0xcb, 0xa1, 0x0c, 0xc0, -0x85, 0x34, 0x38, 0xcb, 0xa1, 0x0c, 0x80, 0x85, 0x34, 0x37, 0x91, 0x00, -0x90, 0x80, 0x90, 0x40, 0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, -0x01, 0x80, 0x30, 0x07, 0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, -0xe5, 0x20, 0x00, 0x00, 0x30, 0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, -0xed, 0x00, 0x37, 0xae, 0xe5, 0x21, 0xee, 0x40, 0x37, 0xc4, 0x90, 0x40, -0xe5, 0x21, 0xe3, 0x80, 0x37, 0x88, 0xe5, 0x21, 0xe4, 0xc0, 0x37, 0x9e, -0x80, 0x99, 0x28, 0x02, 0xf0, 0x8c, 0x21, 0x48, 0x90, 0x80, 0x90, 0x40, -0xe5, 0x22, 0x19, 0x00, 0x38, 0x62, 0xe5, 0x22, 0x17, 0x80, 0x38, 0x68, -0x90, 0x40, 0xe5, 0x22, 0x11, 0x00, 0x38, 0x42, 0xe5, 0x22, 0x0f, 0x80, -0x38, 0x48, 0x91, 0x48, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, -0x08, 0x00, 0x38, 0x2c, 0xe5, 0x22, 0x02, 0x00, 0x38, 0x14, 0xcb, 0x61, -0x0b, 0x00, 0x85, 0x34, 0x30, 0x90, 0x40, 0xe5, 0x21, 0xfc, 0x00, 0x37, -0xfc, 0xe5, 0x21, 0xf6, 0x00, 0x37, 0xe4, 0x90, 0x48, 0xcb, 0xa1, 0x0a, -0x80, 0x85, 0x34, 0x2e, 0xcb, 0xa1, 0x0a, 0xc0, 0x85, 0x34, 0x2f, 0x10, -0x10, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xf0, 0x80, 0x37, 0xc0, 0xe5, -0x21, 0xef, 0x00, 0x37, 0xc8, 0x90, 0x40, 0xe5, 0x21, 0xe7, 0x00, 0x37, -0x9a, 0xe5, 0x21, 0xe5, 0x80, 0x37, 0xa2, +0x31, 0xa1, 0x80, 0x31, 0xa0, 0x10, 0x10, 0x80, 0x31, 0x9f, 0x90, 0x70, +0x90, 0x38, 0xa4, 0x08, 0x98, 0x31, 0xb3, 0xa4, 0x08, 0x90, 0x31, 0xb2, +0x10, 0x10, 0xa4, 0x08, 0x88, 0x31, 0xb1, 0x90, 0xb8, 0x90, 0x70, 0x90, +0x38, 0xa4, 0x09, 0xb8, 0x31, 0xd7, 0xa4, 0x09, 0xb0, 0x31, 0xd6, 0x10, +0x10, 0xa4, 0x09, 0xa8, 0x31, 0xd5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, +0x28, 0x31, 0xc5, 0xa4, 0x09, 0x20, 0x31, 0xc4, 0x10, 0x10, 0xa4, 0x09, +0x18, 0x31, 0xc3, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, +0x31, 0x9c, 0x80, 0x31, 0x9e, 0x10, 0x10, 0x80, 0x31, 0x9d, 0x90, 0x70, +0x90, 0x38, 0xa4, 0x08, 0x70, 0x31, 0xae, 0xa4, 0x08, 0x80, 0x31, 0xb0, +0x10, 0x10, 0xa4, 0x08, 0x78, 0x31, 0xaf, 0x90, 0xb8, 0x90, 0x70, 0x90, +0x38, 0xa4, 0x09, 0x90, 0x31, 0xd2, 0xa4, 0x09, 0xa0, 0x31, 0xd4, 0x10, +0x10, 0xa4, 0x09, 0x98, 0x31, 0xd3, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, +0x00, 0x31, 0xc0, 0xa4, 0x09, 0x10, 0x31, 0xc2, 0x10, 0x10, 0xa4, 0x09, +0x08, 0x31, 0xc1, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, +0x28, 0x80, 0x31, 0x99, 0x80, 0x31, 0x9b, 0x10, 0x10, 0x80, 0x31, 0x9a, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x58, 0x31, 0xab, 0xa4, 0x08, 0x68, +0x31, 0xad, 0x10, 0x10, 0xa4, 0x08, 0x60, 0x31, 0xac, 0x90, 0xb8, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x09, 0x78, 0x31, 0xcf, 0xa4, 0x09, 0x88, 0x31, +0xd1, 0x10, 0x10, 0xa4, 0x09, 0x80, 0x31, 0xd0, 0x90, 0x70, 0x90, 0x38, +0xa4, 0x08, 0xe8, 0x31, 0xbd, 0xa4, 0x08, 0xf8, 0x31, 0xbf, 0x10, 0x10, +0xa4, 0x08, 0xf0, 0x31, 0xbe, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, +0x28, 0x80, 0x31, 0x96, 0x80, 0x31, 0x98, 0x10, 0x10, 0x80, 0x31, 0x97, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x40, 0x31, 0xa8, 0xa4, 0x08, 0x50, +0x31, 0xaa, 0x10, 0x10, 0xa4, 0x08, 0x48, 0x31, 0xa9, 0x90, 0xb8, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x09, 0x60, 0x31, 0xcc, 0xa4, 0x09, 0x70, 0x31, +0xce, 0x10, 0x10, 0xa4, 0x09, 0x68, 0x31, 0xcd, 0x90, 0x70, 0x90, 0x38, +0xa4, 0x08, 0xd0, 0x31, 0xba, 0xa4, 0x08, 0xe0, 0x31, 0xbc, 0x10, 0x10, +0xa4, 0x08, 0xd8, 0x31, 0xbb, 0x10, 0x10, 0x90, 0xa8, 0x10, 0x10, 0x10, +0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x8d, 0x80, 0x31, 0x8f, 0x10, +0x10, 0x80, 0x31, 0x8e, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0xc0, +0x60, 0xa0, 0x2a, 0x80, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0x40, 0x60, 0xa0, +0x2a, 0x00, 0x97, 0xf0, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, +0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x93, 0x80, 0x31, 0x95, 0x10, 0x10, +0x80, 0x31, 0x94, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x28, 0x31, 0xa5, +0xa4, 0x08, 0x38, 0x31, 0xa7, 0x10, 0x10, 0xa4, 0x08, 0x30, 0x31, 0xa6, +0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x48, 0x31, 0xc9, 0xa4, +0x09, 0x58, 0x31, 0xcb, 0x10, 0x10, 0xa4, 0x09, 0x50, 0x31, 0xca, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x08, 0xb8, 0x31, 0xb7, 0xa4, 0x08, 0xc8, 0x31, +0xb9, 0x10, 0x10, 0xa4, 0x08, 0xc0, 0x31, 0xb8, 0x91, 0x40, 0x90, 0x88, +0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x90, 0x80, 0x31, 0x92, 0x10, 0x10, +0x80, 0x31, 0x91, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x10, 0x31, 0xa2, +0xa4, 0x08, 0x20, 0x31, 0xa4, 0x10, 0x10, 0xa4, 0x08, 0x18, 0x31, 0xa3, +0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x30, 0x31, 0xc6, 0xa4, +0x09, 0x40, 0x31, 0xc8, 0x10, 0x10, 0xa4, 0x09, 0x38, 0x31, 0xc7, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x08, 0xa0, 0x31, 0xb4, 0xa4, 0x08, 0xb0, 0x31, +0xb6, 0x10, 0x10, 0xa4, 0x08, 0xa8, 0x31, 0xb5, 0x10, 0x10, 0x91, 0x40, +0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xcb, 0x80, 0x30, 0xca, +0x90, 0x28, 0x80, 0x30, 0xc9, 0x80, 0x30, 0xc8, 0x90, 0x50, 0x90, 0x28, +0x80, 0x30, 0xc4, 0x80, 0x30, 0xc7, 0x90, 0x28, 0x80, 0x30, 0xc6, 0x80, +0x30, 0xc5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbc, 0x80, +0x30, 0xc3, 0x90, 0x28, 0x80, 0x30, 0xc2, 0x80, 0x30, 0xc1, 0x90, 0x50, +0x90, 0x28, 0x80, 0x30, 0xbd, 0x80, 0x30, 0xc0, 0x90, 0x28, 0x80, 0x30, +0xbf, 0x80, 0x30, 0xbe, 0x91, 0x88, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, +0x28, 0x81, 0x31, 0x3b, 0x10, 0x10, 0x80, 0x31, 0x3a, 0x90, 0x28, 0x81, +0x31, 0x3d, 0x10, 0x10, 0x80, 0x31, 0x3c, 0x90, 0x60, 0x90, 0x28, 0x81, +0x31, 0x41, 0x10, 0x10, 0x80, 0x31, 0x40, 0x90, 0x28, 0x81, 0x31, 0x3f, +0x10, 0x10, 0x80, 0x31, 0x3e, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, +0x81, 0x31, 0x38, 0x10, 0x10, 0x80, 0x31, 0x39, 0xa0, 0x0b, 0x90, 0xa0, +0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, +0x90, 0x28, 0x80, 0x31, 0x56, 0x80, 0x31, 0x55, 0x10, 0x10, 0x80, 0x31, +0x54, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xe8, 0x31, 0x68, 0xa4, 0x06, +0xe0, 0x31, 0x67, 0x10, 0x10, 0xa4, 0x06, 0xd8, 0x31, 0x66, 0x90, 0xb8, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x08, 0x31, 0x8c, 0xa4, 0x08, 0x00, +0x31, 0x8b, 0x10, 0x10, 0xa4, 0x07, 0xf8, 0x31, 0x8a, 0x90, 0x70, 0x90, +0x38, 0xa4, 0x07, 0x78, 0x31, 0x7a, 0xa4, 0x07, 0x70, 0x31, 0x79, 0x10, +0x10, 0xa4, 0x07, 0x68, 0x31, 0x78, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, +0x90, 0x28, 0x80, 0x31, 0x51, 0x80, 0x31, 0x53, 0x10, 0x10, 0x80, 0x31, +0x52, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xc0, 0x31, 0x63, 0xa4, 0x06, +0xd0, 0x31, 0x65, 0x10, 0x10, 0xa4, 0x06, 0xc8, 0x31, 0x64, 0x90, 0xb8, +0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xe0, 0x31, 0x87, 0xa4, 0x07, 0xf0, +0x31, 0x89, 0x10, 0x10, 0xa4, 0x07, 0xe8, 0x31, 0x88, 0x90, 0x70, 0x90, +0x38, 0xa4, 0x07, 0x50, 0x31, 0x75, 0xa4, 0x07, 0x60, 0x31, 0x77, 0x10, +0x10, 0xa4, 0x07, 0x58, 0x31, 0x76, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, +0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4e, 0x80, 0x31, 0x50, 0x10, 0x10, +0x80, 0x31, 0x4f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xa8, 0x31, 0x60, +0xa4, 0x06, 0xb8, 0x31, 0x62, 0x10, 0x10, 0xa4, 0x06, 0xb0, 0x31, 0x61, +0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xc8, 0x31, 0x84, 0xa4, +0x07, 0xd8, 0x31, 0x86, 0x10, 0x10, 0xa4, 0x07, 0xd0, 0x31, 0x85, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x07, 0x38, 0x31, 0x72, 0xa4, 0x07, 0x48, 0x31, +0x74, 0x10, 0x10, 0xa4, 0x07, 0x40, 0x31, 0x73, 0x91, 0x40, 0x90, 0x88, +0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4b, 0x80, 0x31, 0x4d, 0x10, 0x10, +0x80, 0x31, 0x4c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x90, 0x31, 0x5d, +0xa4, 0x06, 0xa0, 0x31, 0x5f, 0x10, 0x10, 0xa4, 0x06, 0x98, 0x31, 0x5e, +0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xb0, 0x31, 0x81, 0xa4, +0x07, 0xc0, 0x31, 0x83, 0x10, 0x10, 0xa4, 0x07, 0xb8, 0x31, 0x82, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x07, 0x20, 0x31, 0x6f, 0xa4, 0x07, 0x30, 0x31, +0x71, 0x10, 0x10, 0xa4, 0x07, 0x28, 0x31, 0x70, 0x10, 0x10, 0x80, 0x10, +0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x42, 0x80, 0x31, +0x44, 0x10, 0x10, 0x80, 0x31, 0x43, 0x80, 0x95, 0x60, 0x92, 0xb0, 0x91, +0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x48, 0x80, 0x31, +0x4a, 0x10, 0x10, 0x80, 0x31, 0x49, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, +0x78, 0x31, 0x5a, 0xa4, 0x06, 0x88, 0x31, 0x5c, 0x10, 0x10, 0xa4, 0x06, +0x80, 0x31, 0x5b, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x98, +0x31, 0x7e, 0xa4, 0x07, 0xa8, 0x31, 0x80, 0x10, 0x10, 0xa4, 0x07, 0xa0, +0x31, 0x7f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x08, 0x31, 0x6c, 0xa4, +0x07, 0x18, 0x31, 0x6e, 0x10, 0x10, 0xa4, 0x07, 0x10, 0x31, 0x6d, 0x91, +0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x45, 0x80, 0x31, +0x47, 0x10, 0x10, 0x80, 0x31, 0x46, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, +0x60, 0x31, 0x57, 0xa4, 0x06, 0x70, 0x31, 0x59, 0x10, 0x10, 0xa4, 0x06, +0x68, 0x31, 0x58, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x80, +0x31, 0x7b, 0xa4, 0x07, 0x90, 0x31, 0x7d, 0x10, 0x10, 0xa4, 0x07, 0x88, +0x31, 0x7c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xf0, 0x31, 0x69, 0xa4, +0x07, 0x00, 0x31, 0x6b, 0x10, 0x10, 0xa4, 0x06, 0xf8, 0x31, 0x6a, 0x10, +0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbb, +0x80, 0x30, 0xba, 0x90, 0x28, 0x80, 0x30, 0xb9, 0x80, 0x30, 0xb8, 0x90, +0x50, 0x90, 0x28, 0x80, 0x30, 0xb4, 0x80, 0x30, 0xb7, 0x90, 0x28, 0x80, +0x30, 0xb6, 0x80, 0x30, 0xb5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, +0x30, 0xac, 0x80, 0x30, 0xb3, 0x90, 0x28, 0x80, 0x30, 0xb2, 0x80, 0x30, +0xb1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xad, 0x80, 0x30, 0xb0, 0x90, +0x28, 0x80, 0x30, 0xaf, 0x80, 0x30, 0xae, 0xc3, 0xc0, 0x30, 0x42, 0x9c, +0xe8, 0x07, 0x60, 0x91, 0x90, 0x90, 0xf0, 0x10, 0x10, 0x80, 0x88, 0x00, +0x80, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xbc, 0x80, 0x33, 0xbd, 0x81, +0x33, 0xb3, 0xd0, 0x41, 0x80, 0x24, 0x1e, 0xb0, 0x24, 0x1e, 0xb8, 0x10, +0x10, 0x80, 0x90, 0x58, 0x80, 0x90, 0x28, 0x24, 0x1d, 0xb0, 0x24, 0x1d, +0xb8, 0x81, 0x24, 0x1d, 0x70, 0x92, 0x68, 0x91, 0x00, 0x80, 0x90, 0x90, +0x90, 0x30, 0x80, 0x24, 0x1e, 0x20, 0x90, 0x38, 0xa4, 0x1e, 0x18, 0x33, +0xca, 0x80, 0x33, 0xc9, 0x80, 0x90, 0x28, 0x80, 0x33, 0xd3, 0xa4, 0x1e, +0x00, 0x33, 0xd2, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x80, 0x33, +0xcd, 0xa4, 0x1e, 0x10, 0x33, 0xcc, 0x90, 0x28, 0x80, 0x33, 0xc8, 0xa4, +0x1e, 0x08, 0x33, 0xc7, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xd1, 0x80, +0x33, 0xd0, 0x90, 0x28, 0x24, 0x1e, 0xa8, 0x24, 0x1e, 0xa0, 0x90, 0x58, +0x80, 0x10, 0x10, 0x80, 0x10, 0x10, 0x80, 0x33, 0xbf, 0x80, 0x90, 0x40, +0x10, 0x10, 0x80, 0x24, 0x1d, 0x80, 0x80, 0x10, 0x10, 0x80, 0x33, 0xbe, +0x91, 0x58, 0x91, 0x00, 0x90, 0x80, 0x81, 0x90, 0x50, 0x90, 0x28, 0x80, +0x33, 0xba, 0x80, 0x33, 0xbb, 0x81, 0x33, 0xb2, 0x81, 0x90, 0x50, 0x90, +0x28, 0x80, 0x33, 0xb8, 0x80, 0x33, 0xb9, 0x81, 0x33, 0xb1, 0x83, 0x90, +0x28, 0x24, 0x1d, 0xa0, 0x24, 0x1d, 0xa8, 0x90, 0xe8, 0x81, 0x90, 0x88, +0x90, 0x38, 0x10, 0x10, 0x80, 0x33, 0xcb, 0x90, 0x28, 0x80, 0x33, 0xc6, +0x80, 0x33, 0xc5, 0x80, 0x90, 0x28, 0x80, 0x33, 0xcf, 0x80, 0x33, 0xce, +0x82, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x78, 0x97, 0x10, 0x9e, 0x10, 0x06, +0x98, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, +0x03, 0x80, 0x30, 0x71, 0x24, 0x03, 0x78, 0x90, 0x38, 0xa4, 0x04, 0x10, +0x30, 0x83, 0x24, 0x04, 0x08, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x30, +0x30, 0xa7, 0x24, 0x05, 0x28, 0x90, 0x38, 0xa4, 0x04, 0xa0, 0x30, 0x95, +0x24, 0x04, 0x98, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x70, +0x30, 0x6c, 0x24, 0x03, 0x68, 0x90, 0x38, 0xa4, 0x04, 0x00, 0x30, 0x7e, +0x24, 0x03, 0xf8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x20, 0x30, 0xa2, +0x24, 0x05, 0x18, 0x90, 0x38, 0xa4, 0x04, 0x90, 0x30, 0x90, 0x24, 0x04, +0x88, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x58, +0x30, 0x69, 0x24, 0x03, 0x50, 0x90, 0x38, 0xa4, 0x03, 0xe8, 0x30, 0x7b, +0x24, 0x03, 0xe0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x08, 0x30, 0x9f, +0x24, 0x05, 0x00, 0x90, 0x38, 0xa4, 0x04, 0x78, 0x30, 0x8d, 0x24, 0x04, +0x70, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x40, 0x30, 0x66, +0x24, 0x03, 0x38, 0x90, 0x38, 0xa4, 0x03, 0xd0, 0x30, 0x78, 0x24, 0x03, +0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xf0, 0x30, 0x9c, 0x24, 0x04, +0xe8, 0x90, 0x38, 0xa4, 0x04, 0x60, 0x30, 0x8a, 0x24, 0x04, 0x58, 0x10, +0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x02, 0xf8, 0x30, +0x5d, 0x24, 0x02, 0xf0, 0xd7, 0x42, 0x00, 0xa4, 0x31, 0x78, 0x36, 0x31, +0xa4, 0x31, 0x58, 0x36, 0x2d, 0x9c, 0xe0, 0x06, 0x90, 0x93, 0x00, 0x91, +0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x28, 0x30, 0x63, +0x24, 0x03, 0x20, 0x90, 0x38, 0xa4, 0x03, 0xb8, 0x30, 0x75, 0x24, 0x03, +0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xd8, 0x30, 0x99, 0x24, 0x04, +0xd0, 0x90, 0x38, 0xa4, 0x04, 0x48, 0x30, 0x87, 0x24, 0x04, 0x40, 0x90, +0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x10, 0x30, 0x60, 0x24, 0x03, +0x08, 0x90, 0x38, 0xa4, 0x03, 0xa0, 0x30, 0x72, 0x24, 0x03, 0x98, 0x90, +0x60, 0x90, 0x38, 0xa4, 0x04, 0xc0, 0x30, 0x96, 0x24, 0x04, 0xb8, 0x90, +0x38, 0xa4, 0x04, 0x30, 0x30, 0x84, 0x24, 0x04, 0x28, 0x10, 0x10, 0x90, +0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x88, 0x30, 0x52, 0xa4, 0x02, +0x78, 0x30, 0x50, 0x90, 0x38, 0xa4, 0x02, 0x70, 0x30, 0x4b, 0xa4, 0x02, +0x60, 0x30, 0x4d, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x50, 0x30, 0x43, +0xa4, 0x02, 0x40, 0x30, 0x49, 0x90, 0x38, 0xa4, 0x02, 0x38, 0x30, 0x44, +0xa4, 0x02, 0x28, 0x30, 0x46, 0x91, 0x48, 0x80, 0x90, 0xa0, 0x90, 0x50, +0x90, 0x28, 0x80, 0x30, 0x56, 0x24, 0x02, 0xa8, 0x90, 0x28, 0x80, 0x30, +0x58, 0x24, 0x02, 0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x5c, 0x24, +0x02, 0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, 0x02, 0xc8, 0x80, 0x10, +0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, 0x24, 0x02, 0xa0, 0xd7, +0x42, 0x00, 0xa4, 0x31, 0x80, 0x36, 0x32, 0xa4, 0x31, 0x60, 0x36, 0x2e, +0xa0, 0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, 0x88, 0x9e, 0x88, 0x09, +0xd0, 0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, +0xe1, 0x2c, 0x40, 0x85, 0x34, 0xcd, 0xcb, 0x61, 0x25, 0x00, 0x85, 0x34, +0xa3, 0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, 0x91, 0x10, 0x90, 0xa0, +0x90, 0x68, 0x90, 0x20, 0x38, 0x96, 0xc9, 0xe2, 0x25, 0x00, 0x85, 0x34, +0xcb, 0xa4, 0x44, 0x90, 0x38, 0x93, 0x90, 0x38, 0xa4, 0x44, 0x58, 0x38, +0x8c, 0xa4, 0x44, 0x48, 0x38, 0x8a, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, +0x10, 0x38, 0x83, 0x10, 0x10, 0x80, 0x38, 0x7f, 0x81, 0x10, 0x10, 0x80, +0xa4, 0x43, 0xe0, 0x38, 0x7d, 0x91, 0xb0, 0x91, 0x60, 0x90, 0xe0, 0x90, +0x70, 0x90, 0x38, 0xa4, 0x44, 0x80, 0x38, 0x91, 0xa4, 0x44, 0x70, 0x38, +0x8f, 0x90, 0x38, 0xa4, 0x44, 0x38, 0x38, 0x88, 0xa4, 0x44, 0x28, 0x38, +0x86, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0x00, 0x38, 0x81, 0x10, 0x10, +0x80, 0x38, 0x7e, 0x90, 0x28, 0x80, 0x38, 0x77, 0x80, 0x38, 0x76, 0x81, +0x10, 0x10, 0x80, 0xa4, 0x43, 0xd0, 0x38, 0x7b, 0xcb, 0x61, 0x24, 0xc0, +0x85, 0x34, 0xa2, 0x90, 0xd8, 0x88, 0x00, 0x90, 0x84, 0x90, 0x38, 0xc1, +0xc0, 0x85, 0x38, 0x9a, 0xc9, 0xe1, 0x2c, 0x00, 0x85, 0x34, 0xc9, 0xcb, +0x61, 0x24, 0x80, 0x85, 0x34, 0xa1, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, +0xc9, 0xe1, 0x2b, 0xc0, 0x85, 0x34, 0xc7, 0xcb, 0x61, 0x24, 0x40, 0x85, +0x34, 0xa0, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, +0xc9, 0xe1, 0x2b, 0x40, 0x85, 0x34, 0xc3, 0xcb, 0x61, 0x23, 0xc0, 0x85, +0x34, 0x9e, 0x88, 0x01, 0x00, 0x90, 0xa0, 0x81, 0x90, 0x70, 0x80, 0x90, +0x20, 0x38, 0x8d, 0xc9, 0xe1, 0x2b, 0x00, 0x85, 0x34, 0xc1, 0x81, 0x38, +0x84, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xc0, 0x38, 0x79, 0xcb, 0x61, +0x23, 0x80, 0x85, 0x34, 0x9d, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, +0x10, 0xc9, 0xe1, 0x2a, 0xc0, 0x85, 0x34, 0xbf, 0xcb, 0x61, 0x23, 0x40, +0x85, 0x34, 0x9c, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, +0x80, 0x85, 0x34, 0xbd, 0xcb, 0x61, 0x23, 0x00, 0x85, 0x34, 0x9b, 0x92, +0x38, 0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, +0x45, 0x48, 0x38, 0xaa, 0x80, 0xa4, 0x45, 0x40, 0x38, 0xa7, 0x90, 0x28, +0x81, 0x38, 0xa6, 0x90, 0x38, 0xa4, 0x45, 0x20, 0x38, 0xa5, 0xa4, 0x45, +0x10, 0x38, 0xa3, 0x90, 0x28, 0x80, 0x38, 0xa1, 0x80, 0x38, 0xa0, 0x80, +0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x44, 0xf8, 0x10, 0x10, 0x90, 0x38, +0xa4, 0x44, 0xe8, 0x38, 0x9e, 0xa4, 0x44, 0xd8, 0x38, 0x9c, 0x90, 0x50, +0x80, 0xc9, 0xa2, 0x26, 0x00, 0x85, 0x38, 0x99, 0x80, 0x38, 0x97, 0x9a, +0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, +0x10, 0xc9, 0xe1, 0x2a, 0x00, 0x85, 0x34, 0xb9, 0xcb, 0x61, 0x22, 0x80, +0x85, 0x34, 0x99, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, +0xc0, 0x85, 0x34, 0xb7, 0xcb, 0x61, 0x22, 0x40, 0x85, 0x34, 0x98, 0x90, +0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x80, 0x85, +0x34, 0xb5, 0xcb, 0x61, 0x22, 0x00, 0x85, 0x34, 0x97, 0x88, 0x00, 0x68, +0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x40, 0x85, 0x34, 0xb3, 0xcb, 0x61, +0x21, 0xc0, 0x85, 0x34, 0x96, 0x90, 0x90, 0x90, 0x48, 0xcb, 0xa1, 0x20, +0x00, 0x85, 0x34, 0x85, 0xcb, 0xa1, 0x1f, 0xc0, 0x85, 0x34, 0x84, 0x90, +0x48, 0xcb, 0xa1, 0x1f, 0x80, 0x85, 0x34, 0x83, 0xcb, 0xa1, 0x1f, 0x40, +0x85, 0x34, 0x82, 0xcb, 0xa2, 0x1d, 0x00, 0x80, 0x38, 0x75, 0x92, 0x40, +0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x60, 0x84, 0x24, 0x23, +0xd8, 0x8c, 0x23, 0x58, 0x84, 0x24, 0x23, 0xd0, 0x90, 0x48, 0x8c, 0x23, +0x50, 0x84, 0x24, 0x23, 0xc8, 0x8c, 0x23, 0x48, 0x84, 0x24, 0x23, 0xc0, +0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x38, 0x84, 0x24, 0x23, 0xb0, 0x8c, +0x23, 0x30, 0x84, 0x24, 0x23, 0xa8, 0x90, 0x48, 0x8c, 0x23, 0x28, 0x84, +0x24, 0x23, 0xa0, 0x8c, 0x23, 0x20, 0x84, 0x24, 0x23, 0x98, 0x91, 0x20, +0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x10, 0x84, 0x24, 0x23, 0x88, 0x8c, +0x23, 0x08, 0x84, 0x24, 0x23, 0x80, 0x90, 0x48, 0x8c, 0x23, 0x00, 0x84, +0x24, 0x23, 0x78, 0x8c, 0x22, 0xf8, 0x84, 0x24, 0x23, 0x70, 0x90, 0x38, +0xa4, 0x22, 0xe0, 0x34, 0x5d, 0xa4, 0x22, 0xd0, 0x34, 0x5b, 0xa0, 0x0f, +0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, +0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x1c, 0x00, 0x38, 0x6c, 0xe5, 0x22, +0x18, 0x00, 0x38, 0x6a, 0xcb, 0x61, 0x12, 0x40, 0x85, 0x34, 0x58, 0x98, +0x50, 0x00, 0x80, 0xe5, 0x22, 0x14, 0x00, 0x38, 0x4c, 0xe5, 0x22, 0x10, +0x00, 0x38, 0x4a, 0xcb, 0x61, 0x12, 0x00, 0x85, 0x34, 0x57, 0x90, 0x48, +0xcb, 0xa1, 0x11, 0xc0, 0x85, 0x34, 0x56, 0xcb, 0xa1, 0x11, 0x80, 0x85, +0x34, 0x55, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, +0x09, 0x00, 0x38, 0x30, 0xe5, 0x22, 0x03, 0x00, 0x38, 0x18, 0xcb, 0x61, +0x11, 0x00, 0x85, 0x34, 0x53, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x21, 0xfd, +0x00, 0x38, 0x00, 0xe5, 0x21, 0xf7, 0x00, 0x37, 0xe8, 0xcb, 0x61, 0x10, +0xc0, 0x85, 0x34, 0x52, 0x90, 0x48, 0xcb, 0xa1, 0x10, 0x80, 0x85, 0x34, +0x51, 0xcb, 0xa1, 0x10, 0x40, 0x85, 0x34, 0x50, 0x92, 0x20, 0x91, 0x30, +0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0xa0, 0x84, +0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, 0x84, 0x30, 0x3c, 0xd5, +0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, 0xc0, 0x81, 0x30, 0x24, +0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x1c, 0xc0, 0xc0, +0x81, 0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x10, 0xc0, +0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, 0xd5, 0x03, 0x80, 0xc8, +0xe1, 0xf3, 0x00, 0x81, 0x8c, 0x01, 0xc0, 0x84, 0x30, 0x40, 0xc8, 0xe1, +0xf4, 0x00, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, 0x3d, 0xd5, 0x02, 0x80, +0xc8, 0xe1, 0xf2, 0x80, 0x81, 0x30, 0x2c, 0xc8, 0xe1, 0xef, 0x80, 0x81, +0x30, 0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xe9, 0x80, 0x81, +0x30, 0x20, 0xc8, 0xe1, 0xea, 0x80, 0x81, 0x30, 0x1a, 0xd5, 0x02, 0x80, +0xc8, 0xe1, 0xe9, 0x00, 0x81, 0x30, 0x14, 0xc8, 0xe1, 0xe6, 0x00, 0x81, +0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, +0x00, 0x80, 0xe5, 0x22, 0x16, 0x00, 0x38, 0x54, 0xe5, 0x22, 0x17, 0x00, +0x38, 0x66, 0xcb, 0x61, 0x0f, 0xc0, 0x85, 0x34, 0x4e, 0x98, 0x50, 0x00, +0x80, 0xe5, 0x22, 0x0e, 0x00, 0x38, 0x34, 0xe5, 0x22, 0x0f, 0x00, 0x38, +0x46, 0xcb, 0x61, 0x0f, 0x80, 0x85, 0x34, 0x4d, 0x90, 0x48, 0xcb, 0xa1, +0x0f, 0x40, 0x85, 0x34, 0x4c, 0xcb, 0xa1, 0x0f, 0x00, 0x85, 0x34, 0x4b, +0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x07, 0x00, +0x38, 0x28, 0xe5, 0x22, 0x01, 0x00, 0x38, 0x10, 0xcb, 0x61, 0x0d, 0x40, +0x85, 0x34, 0x3a, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x21, 0xfb, 0x00, 0x37, +0xf8, 0xe5, 0x21, 0xf5, 0x00, 0x37, 0xe0, 0xcb, 0x61, 0x0d, 0x00, 0x85, +0x34, 0x39, 0x90, 0x48, 0xcb, 0xa1, 0x0c, 0xc0, 0x85, 0x34, 0x38, 0xcb, +0xa1, 0x0c, 0x80, 0x85, 0x34, 0x37, 0x91, 0x00, 0x90, 0x80, 0x90, 0x40, +0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, 0x01, 0x80, 0x30, 0x07, +0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, 0xe5, 0x20, 0x00, 0x00, +0x30, 0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xed, 0x00, 0x37, 0xae, +0xe5, 0x21, 0xee, 0x40, 0x37, 0xc4, 0x90, 0x40, 0xe5, 0x21, 0xe3, 0x80, +0x37, 0x88, 0xe5, 0x21, 0xe4, 0xc0, 0x37, 0x9e, 0x80, 0x99, 0x28, 0x02, +0xf0, 0x8c, 0x21, 0x48, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22, 0x19, 0x00, +0x38, 0x62, 0xe5, 0x22, 0x17, 0x80, 0x38, 0x68, 0x90, 0x40, 0xe5, 0x22, +0x11, 0x00, 0x38, 0x42, 0xe5, 0x22, 0x0f, 0x80, 0x38, 0x48, 0x91, 0x48, +0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x08, 0x00, 0x38, 0x2c, +0xe5, 0x22, 0x02, 0x00, 0x38, 0x14, 0xcb, 0x61, 0x0b, 0x00, 0x85, 0x34, +0x30, 0x90, 0x40, 0xe5, 0x21, 0xfc, 0x00, 0x37, 0xfc, 0xe5, 0x21, 0xf6, +0x00, 0x37, 0xe4, 0x90, 0x48, 0xcb, 0xa1, 0x0a, 0x80, 0x85, 0x34, 0x2e, +0xcb, 0xa1, 0x0a, 0xc0, 0x85, 0x34, 0x2f, 0x10, 0x10, 0x90, 0x80, 0x90, +0x40, 0xe5, 0x21, 0xf0, 0x80, 0x37, 0xc0, 0xe5, 0x21, 0xef, 0x00, 0x37, +0xc8, 0x90, 0x40, 0xe5, 0x21, 0xe7, 0x00, 0x37, 0x9a, 0xe5, 0x21, 0xe5, +0x80, 0x37, 0xa2, }; static const struct ia64_dis_names ia64_dis_names[] = { diff --git a/contrib/binutils/opcodes/ia64-opc-b.c b/contrib/binutils/opcodes/ia64-opc-b.c index 9772b37..9a4a850 100644 --- a/contrib/binutils/opcodes/ia64-opc-b.c +++ b/contrib/binutils/opcodes/ia64-opc-b.c @@ -32,6 +32,7 @@ #define bPr(x) (((ia64_insn) ((x) & 0x3f)) << 0) #define bWha(x) (((ia64_insn) ((x) & 0x3)) << 33) #define bWhb(x) (((ia64_insn) ((x) & 0x3)) << 3) +#define bWhc(x) (((ia64_insn) ((x) & 0x7)) << 32) #define bX6(x) (((ia64_insn) ((x) & 0x3f)) << 27) #define mBtype bBtype (-1) @@ -41,11 +42,14 @@ #define mPr bPr (-1) #define mWha bWha (-1) #define mWhb bWhb (-1) +#define mWhc bWhc (-1) #define mX6 bX6 (-1) #define OpX6(a,b) (bOp (a) | bX6 (b)), (mOp | mX6) #define OpPaWhaD(a,b,c,d) \ (bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD) +#define OpPaWhcD(a,b,c,d) \ + (bOp (a) | bPa (b) | bWhc (c) | bD (d)), (mOp | mPa | mWhc | mD) #define OpBtypePaWhaD(a,b,c,d,e) \ (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \ (mOp | mBtype | mPa | mWha | mD) @@ -188,30 +192,30 @@ struct ia64_opcode ia64_opcodes_b[] = {"break.b", B0, OpX6 (0, 0x00), {IMMU21}}, - {"br.call.sptk.few", B, OpPaWhaD (1, 0, 0, 0), {B1, B2}}, - {"br.call.sptk", B, OpPaWhaD (1, 0, 0, 0), {B1, B2}, PSEUDO}, - {"br.call.sptk.few.clr", B, OpPaWhaD (1, 0, 0, 1), {B1, B2}}, - {"br.call.sptk.clr", B, OpPaWhaD (1, 0, 0, 1), {B1, B2}, PSEUDO}, - {"br.call.spnt.few", B, OpPaWhaD (1, 0, 1, 0), {B1, B2}}, - {"br.call.spnt", B, OpPaWhaD (1, 0, 1, 0), {B1, B2}, PSEUDO}, - {"br.call.spnt.few.clr", B, OpPaWhaD (1, 0, 1, 1), {B1, B2}}, - {"br.call.spnt.clr", B, OpPaWhaD (1, 0, 1, 1), {B1, B2}, PSEUDO}, - {"br.call.dptk.few", B, OpPaWhaD (1, 0, 2, 0), {B1, B2}}, - {"br.call.dptk", B, OpPaWhaD (1, 0, 2, 0), {B1, B2}, PSEUDO}, - {"br.call.dptk.few.clr", B, OpPaWhaD (1, 0, 2, 1), {B1, B2}}, - {"br.call.dptk.clr", B, OpPaWhaD (1, 0, 2, 1), {B1, B2}, PSEUDO}, - {"br.call.dpnt.few", B, OpPaWhaD (1, 0, 3, 0), {B1, B2}}, - {"br.call.dpnt", B, OpPaWhaD (1, 0, 3, 0), {B1, B2}, PSEUDO}, - {"br.call.dpnt.few.clr", B, OpPaWhaD (1, 0, 3, 1), {B1, B2}}, - {"br.call.dpnt.clr", B, OpPaWhaD (1, 0, 3, 1), {B1, B2}, PSEUDO}, - {"br.call.sptk.many", B, OpPaWhaD (1, 1, 0, 0), {B1, B2}}, - {"br.call.sptk.many.clr", B, OpPaWhaD (1, 1, 0, 1), {B1, B2}}, - {"br.call.spnt.many", B, OpPaWhaD (1, 1, 1, 0), {B1, B2}}, - {"br.call.spnt.many.clr", B, OpPaWhaD (1, 1, 1, 1), {B1, B2}}, - {"br.call.dptk.many", B, OpPaWhaD (1, 1, 2, 0), {B1, B2}}, - {"br.call.dptk.many.clr", B, OpPaWhaD (1, 1, 2, 1), {B1, B2}}, - {"br.call.dpnt.many", B, OpPaWhaD (1, 1, 3, 0), {B1, B2}}, - {"br.call.dpnt.many.clr", B, OpPaWhaD (1, 1, 3, 1), {B1, B2}}, + {"br.call.sptk.few", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}}, + {"br.call.sptk", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}, PSEUDO}, + {"br.call.sptk.few.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}}, + {"br.call.sptk.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}, PSEUDO}, + {"br.call.spnt.few", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}}, + {"br.call.spnt", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}, PSEUDO}, + {"br.call.spnt.few.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}}, + {"br.call.spnt.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}, PSEUDO}, + {"br.call.dptk.few", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}}, + {"br.call.dptk", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}, PSEUDO}, + {"br.call.dptk.few.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}}, + {"br.call.dptk.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}, PSEUDO}, + {"br.call.dpnt.few", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}}, + {"br.call.dpnt", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}, PSEUDO}, + {"br.call.dpnt.few.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}}, + {"br.call.dpnt.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}, PSEUDO}, + {"br.call.sptk.many", B, OpPaWhcD (1, 1, 1, 0), {B1, B2}}, + {"br.call.sptk.many.clr", B, OpPaWhcD (1, 1, 1, 1), {B1, B2}}, + {"br.call.spnt.many", B, OpPaWhcD (1, 1, 3, 0), {B1, B2}}, + {"br.call.spnt.many.clr", B, OpPaWhcD (1, 1, 3, 1), {B1, B2}}, + {"br.call.dptk.many", B, OpPaWhcD (1, 1, 5, 0), {B1, B2}}, + {"br.call.dptk.many.clr", B, OpPaWhcD (1, 1, 5, 1), {B1, B2}}, + {"br.call.dpnt.many", B, OpPaWhcD (1, 1, 7, 0), {B1, B2}}, + {"br.call.dpnt.many.clr", B, OpPaWhcD (1, 1, 7, 1), {B1, B2}}, #define BRP(a,b,c) \ B0, OpX6IhWhb (2, a, b, c), {B2, TAG13}, NO_PRED @@ -470,6 +474,7 @@ struct ia64_opcode ia64_opcodes_b[] = #undef bPr #undef bWha #undef bWhb +#undef bWhc #undef bX6 #undef mBtype #undef mD @@ -478,9 +483,11 @@ struct ia64_opcode ia64_opcodes_b[] = #undef mPr #undef mWha #undef mWhb +#undef mWhc #undef mX6 #undef OpX6 #undef OpPaWhaD +#undef OpPaWhcD #undef OpBtypePaWhaD #undef OpBtypePaWhaDPr #undef OpX6BtypePaWhaD diff --git a/contrib/binutils/opcodes/po/POTFILES.in b/contrib/binutils/opcodes/po/POTFILES.in index 0cb531b..9851ce8 100644 --- a/contrib/binutils/opcodes/po/POTFILES.in +++ b/contrib/binutils/opcodes/po/POTFILES.in @@ -18,6 +18,7 @@ d30v-dis.c d30v-opc.c dis-buf.c disassemble.c +dlx-dis.c fr30-asm.c fr30-desc.c fr30-desc.h @@ -25,6 +26,13 @@ fr30-dis.c fr30-ibld.c fr30-opc.c fr30-opc.h +frv-asm.c +frv-desc.c +frv-desc.h +frv-dis.c +frv-ibld.c +frv-opc.c +frv-opc.h h8300-dis.c h8500-dis.c h8500-opc.h diff --git a/contrib/binutils/opcodes/po/opcodes.pot b/contrib/binutils/opcodes/po/opcodes.pot index fbc549d..8d1136a 100644 --- a/contrib/binutils/opcodes/po/opcodes.pot +++ b/contrib/binutils/opcodes/po/opcodes.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-02-08 03:24-0200\n" +"POT-Creation-Date: 2002-07-23 15:55-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" @@ -26,16 +26,16 @@ msgstr "" msgid "Illegal limm reference in last instruction!\n" msgstr "" -#: arm-dis.c:502 +#: arm-dis.c:507 msgid "<illegal precision>" msgstr "" -#: arm-dis.c:1012 +#: arm-dis.c:1010 #, c-format msgid "Unrecognised register name set: %s\n" msgstr "" -#: arm-dis.c:1019 +#: arm-dis.c:1017 #, c-format msgid "Unrecognised disassembler option: %s\n" msgstr "" @@ -60,8 +60,8 @@ msgstr "" msgid "unknown constraint `%c'" msgstr "" -#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 -#: xstormy16-ibld.c:195 +#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195 +#: openrisc-ibld.c:195 xstormy16-ibld.c:195 #, c-format msgid "operand out of range (%ld not between %ld and %ld)" msgstr "" @@ -87,110 +87,126 @@ msgstr "" msgid "Address 0x%x is out of bounds.\n" msgstr "" -#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231 +#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244 +#: xstormy16-asm.c:231 #, c-format msgid "Unrecognized field %d while parsing.\n" msgstr "" -#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281 +#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294 +#: xstormy16-asm.c:281 msgid "missing mnemonic in syntax string" msgstr "" #. We couldn't parse it. -#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511 -#: m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 -#: openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623 -#: xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508 -#: xstormy16-asm.c:610 +#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781 +#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515 +#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434 +#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417 +#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610 msgid "unrecognized instruction" msgstr "" -#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464 +#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477 +#: xstormy16-asm.c:464 #, c-format msgid "syntax error (expected char `%c', found `%c')" msgstr "" -#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474 +#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487 +#: xstormy16-asm.c:474 #, c-format msgid "syntax error (expected char `%c', found end of instruction)" msgstr "" -#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502 +#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515 +#: xstormy16-asm.c:502 msgid "junk at end of line" msgstr "" -#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609 +#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622 +#: xstormy16-asm.c:609 msgid "unrecognized form of instruction" msgstr "" -#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621 +#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634 +#: xstormy16-asm.c:621 #, c-format msgid "bad instruction `%.50s...'" msgstr "" -#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624 +#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637 +#: xstormy16-asm.c:624 #, c-format msgid "bad instruction `%.50s'" msgstr "" #. Default text to print if an instruction isn't recognized. -#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39 +#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39 #: xstormy16-dis.c:39 msgid "*unknown*" msgstr "" -#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169 +#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136 +#: xstormy16-dis.c:169 #, c-format msgid "Unrecognized field %d while printing insn.\n" msgstr "" -#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166 +#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 +#: xstormy16-ibld.c:166 #, c-format msgid "operand out of range (%ld not between %ld and %lu)" msgstr "" -#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179 +#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 +#: xstormy16-ibld.c:179 #, c-format msgid "operand out of range (%lu not between 0 and %lu)" msgstr "" -#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678 +#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633 +#: xstormy16-ibld.c:678 #, c-format msgid "Unrecognized field %d while building insn.\n" msgstr "" -#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826 +#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735 +#: xstormy16-ibld.c:826 #, c-format msgid "Unrecognized field %d while decoding insn.\n" msgstr "" -#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939 +#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815 +#: xstormy16-ibld.c:939 #, c-format msgid "Unrecognized field %d while getting int operand.\n" msgstr "" -#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032 +#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875 +#: xstormy16-ibld.c:1032 #, c-format msgid "Unrecognized field %d while getting vma operand.\n" msgstr "" -#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134 +#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944 +#: xstormy16-ibld.c:1134 #, c-format msgid "Unrecognized field %d while setting int operand.\n" msgstr "" -#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001 +#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001 #: xstormy16-ibld.c:1224 #, c-format msgid "Unrecognized field %d while setting vma operand.\n" msgstr "" -#: h8300-dis.c:384 +#: h8300-dis.c:385 #, c-format msgid "Hmmmm %x" msgstr "" -#: h8300-dis.c:395 +#: h8300-dis.c:396 #, c-format msgid "Don't understand %x \n" msgstr "" @@ -240,12 +256,12 @@ msgstr "" msgid "# <dis error: %08x>" msgstr "" -#: mips-dis.c:290 +#: mips-dis.c:337 #, c-format msgid "# internal error, undefined modifier(%c)" msgstr "" -#: mips-dis.c:1154 +#: mips-dis.c:1209 #, c-format msgid "# internal disassembler error, unrecognised modifier (%c)" msgstr "" @@ -279,43 +295,43 @@ msgstr "" msgid "$<undefined>" msgstr "" -#: ppc-opc.c:765 ppc-opc.c:798 +#: ppc-opc.c:777 ppc-opc.c:810 msgid "invalid conditional option" msgstr "" -#: ppc-opc.c:800 +#: ppc-opc.c:812 msgid "attempt to set y bit when using + or - modifier" msgstr "" -#: ppc-opc.c:832 ppc-opc.c:884 +#: ppc-opc.c:844 ppc-opc.c:896 msgid "offset not a multiple of 4" msgstr "" -#: ppc-opc.c:857 +#: ppc-opc.c:869 msgid "offset not between -2048 and 2047" msgstr "" -#: ppc-opc.c:882 +#: ppc-opc.c:894 msgid "offset not between -8192 and 8191" msgstr "" -#: ppc-opc.c:910 +#: ppc-opc.c:922 msgid "ignoring least significant bits in branch offset" msgstr "" -#: ppc-opc.c:944 ppc-opc.c:981 +#: ppc-opc.c:956 ppc-opc.c:993 msgid "illegal bitmask" msgstr "" -#: ppc-opc.c:1054 +#: ppc-opc.c:1066 msgid "value out of range" msgstr "" -#: ppc-opc.c:1130 +#: ppc-opc.c:1142 msgid "index register in load range" msgstr "" -#: ppc-opc.c:1146 +#: ppc-opc.c:1158 msgid "invalid register operand when updating" msgstr "" diff --git a/contrib/binutils/opcodes/ppc-dis.c b/contrib/binutils/opcodes/ppc-dis.c index 0ac8275..35726ae 100644 --- a/contrib/binutils/opcodes/ppc-dis.c +++ b/contrib/binutils/opcodes/ppc-dis.c @@ -271,3 +271,16 @@ print_insn_powerpc (memaddr, info, bigendian, dialect) return 4; } + +void +print_ppc_disassembler_options (FILE * stream) +{ + fprintf (stream, "\n\ +The following PPC specific disassembler options are supported for use with\n\ +the -M switch:\n"); + + fprintf (stream, " booke|booke32|booke64 Disassemble the BookE instructions\n"); + fprintf (stream, " power4 Disassemble the Power4 instructions\n"); + fprintf (stream, " 32 Do not disassemble 64-bit instructions\n"); + fprintf (stream, " 64 Allow disassembly of 64-bit instructions\n"); +} diff --git a/contrib/binutils/opcodes/ppc-opc.c b/contrib/binutils/opcodes/ppc-opc.c index 70167f7..98ca1d2 100644 --- a/contrib/binutils/opcodes/ppc-opc.c +++ b/contrib/binutils/opcodes/ppc-opc.c @@ -3713,7 +3713,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA, RB } }, -{ "tlbre", X(31,946), X_MASK, BOOKE, { RT, RA, WS } }, +{ "tlbre", X(31,946), X_MASK, BOOKE, { 0 } }, { "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } }, { "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } }, @@ -3728,20 +3728,20 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "iccci", X(31,966), XRT_MASK, PPC403, { RA, RB } }, +{ "tlbwe", X(31,978), X_MASK, BOOKE, { 0 } }, + { "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } }, { "tlbwehi", XTLB(31,978,0), XTLB_MASK, PPC403, { RT, RA } }, { "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } }, { "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } }, -{ "tlbwe", X(31,978), X_MASK, BOOKE, { RT, RA, WS } }, - { "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } }, { "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA, RB } }, -{ "extsw", XRC(31,986,0), XRB_MASK, PPC, { RA, RS } }, -{ "extsw.", XRC(31,986,1), XRB_MASK, PPC, { RA, RS } }, +{ "extsw", XRC(31,986,0), XRB_MASK, PPC | BOOKE64, { RA, RS } }, +{ "extsw.", XRC(31,986,1), XRB_MASK, PPC | BOOKE64, { RA, RS } }, { "icread", X(31,998), XRT_MASK, PPC403, { RA, RB } }, diff --git a/contrib/binutils/opcodes/sh-dis.c b/contrib/binutils/opcodes/sh-dis.c index 92d7139..24d4b41 100644 --- a/contrib/binutils/opcodes/sh-dis.c +++ b/contrib/binutils/opcodes/sh-dis.c @@ -24,14 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "sh-opc.h" #include "dis-asm.h" -#define LITTLE_BIT 2 - static void print_movxy PARAMS ((sh_opcode_info *, int, int, fprintf_ftype, void *)); static void print_insn_ddt PARAMS ((int, struct disassemble_info *)); static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *)); static void print_insn_ppi PARAMS ((int, struct disassemble_info *)); -static int print_insn_shx PARAMS ((bfd_vma, struct disassemble_info *)); static void print_movxy (op, rn, rm, fprintf_fn, stream) @@ -286,8 +283,8 @@ print_insn_ppi (field_b, info) fprintf_fn (stream, ".word 0x%x", field_b); } -static int -print_insn_shx (memaddr, info) +int +print_insn_sh (memaddr, info) bfd_vma memaddr; struct disassemble_info *info; { @@ -304,6 +301,12 @@ print_insn_shx (memaddr, info) { case bfd_mach_sh: target_arch = arch_sh1; + /* SH coff object files lack information about the machine type, so + we end up with bfd_mach_sh unless it was set explicitly (which + could have happended if this is a call from gdb or the simulator.) */ + if (info->symbols + && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour) + target_arch = arch_sh4; break; case bfd_mach_sh2: target_arch = arch_sh2; @@ -324,6 +327,11 @@ print_insn_shx (memaddr, info) target_arch = arch_sh4; break; case bfd_mach_sh5: +#ifdef INCLUDE_SHMEDIA + status = print_insn_sh64 (memaddr, info); + if (status != -2) + return status; +#endif /* When we get here for sh64, it's because we want to disassemble SHcompact, i.e. arch_sh4. */ target_arch = arch_sh4; @@ -340,7 +348,7 @@ print_insn_shx (memaddr, info) return -1; } - if (info->flags & LITTLE_BIT) + if (info->endian == BFD_ENDIAN_LITTLE) { nibs[0] = (insn[1] >> 4) & 0xf; nibs[1] = insn[1] & 0xf; @@ -371,7 +379,7 @@ print_insn_shx (memaddr, info) return -1; } - if (info->flags & LITTLE_BIT) + if (info->endian == BFD_ENDIAN_LITTLE) field_b = insn[1] << 8 | insn[0]; else field_b = insn[0] << 8 | insn[1]; @@ -677,7 +685,7 @@ print_insn_shx (memaddr, info) { info->flags |= 1; fprintf_fn (stream, "\t(slot "); - print_insn_shx (memaddr + 2, info); + print_insn_sh (memaddr + 2, info); info->flags &= ~1; fprintf_fn (stream, ")"); return 4; @@ -700,14 +708,14 @@ print_insn_shx (memaddr, info) if (size == 2) { - if ((info->flags & LITTLE_BIT) != 0) + if (info->endian == BFD_ENDIAN_LITTLE) val = bfd_getl16 (bytes); else val = bfd_getb16 (bytes); } else { - if ((info->flags & LITTLE_BIT) != 0) + if (info->endian == BFD_ENDIAN_LITTLE) val = bfd_getl32 (bytes); else val = bfd_getb32 (bytes); @@ -724,27 +732,3 @@ print_insn_shx (memaddr, info) fprintf_fn (stream, ".word 0x%x%x%x%x", nibs[0], nibs[1], nibs[2], nibs[3]); return 2; } - -int -print_insn_shl (memaddr, info) - bfd_vma memaddr; - struct disassemble_info *info; -{ - int r; - - info->flags = LITTLE_BIT; - r = print_insn_shx (memaddr, info); - return r; -} - -int -print_insn_sh (memaddr, info) - bfd_vma memaddr; - struct disassemble_info *info; -{ - int r; - - info->flags = 0; - r = print_insn_shx (memaddr, info); - return r; -} diff --git a/contrib/binutils/opcodes/sparc-dis.c b/contrib/binutils/opcodes/sparc-dis.c index 4c59398..47ebb31 100644 --- a/contrib/binutils/opcodes/sparc-dis.c +++ b/contrib/binutils/opcodes/sparc-dis.c @@ -1,6 +1,6 @@ /* Print SPARC instructions. Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000 Free Software Foundation, Inc. + 2000, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -188,7 +188,7 @@ is_delayed_branch (insn) for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next) { - CONST struct sparc_opcode *opcode = op->opcode; + const struct sparc_opcode *opcode = op->opcode; if ((opcode->match & insn) == opcode->match && (opcode->lose & insn) == 0) return (opcode->flags & F_DELAYED); @@ -272,7 +272,7 @@ print_insn_sparc (memaddr, info) for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next) { - CONST struct sparc_opcode *opcode = op->opcode; + const struct sparc_opcode *opcode = op->opcode; /* If the insn isn't supported by the current architecture, skip it. */ if (! (opcode->architecture & current_arch_mask)) @@ -312,7 +312,7 @@ print_insn_sparc (memaddr, info) (*info->fprintf_func) (stream, opcode->name); { - register CONST char *s; + register const char *s; if (opcode->args[0] != ',') (*info->fprintf_func) (stream, " "); |