Upgrade to binutils-2.22. Part 2 of 3 - update binutils master branch to binutils-2.22 with 3 patches from binutils-2.21.

The patch ported from binutils-2.21 is - cl/58440-p2 cl/60394-p2 and cl/60478-p2

depot2 version for binutils-2.22 is 64605.

Note there are 3 CLs to upgrade to binutils-2.22, those must be submitted atomically -
     https://gerrit.chromium.org/gerrit/#/c/39596/
     https://gerrit.chromium.org/gerrit/#/c/39597/
     https://gerrit.chromium.org/gerrit/#/c/39598/

CQ-DEPEND=CL:39597
TEST=cbuildbot -g '39906 39596 39597 39598' --remote chromiumos-sdk/amd64-generic-full/x86-generic-full/arm-generic-full / bvt / pagecycler / bootperf
BUG=None

Change-Id: I007769d1d01648fcc91a55812f69b9c5606470c2
Reviewed-on: https://gerrit.chromium.org/gerrit/39596
Reviewed-by: Mike Frysinger <[email protected]>
Tested-by: Han Shen <[email protected]>
Commit-Queue: Han Shen <[email protected]>
diff --git a/ChangeLog b/ChangeLog
index 8b38454..e572d95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,658 @@
+2011-08-19  Joel Brobecker  <[email protected]>
+
+	* src-release (GDB_SUPPORT_DIRS): Add 'cpu'.
+
+2011-08-14  Yao Qi  <[email protected]>
+
+	Merge from gcc:
+
+	2011-08-14  Yao Qi  <[email protected]>
+	* configure.ac (tic6x-*-*): Remove gdb from noconfigdirs.
+	* configure: Regenerate.
+
+2011-07-26  Ian Lance Taylor  <[email protected]>
+
+	Merge from gcc:
+
+	2011-07-26  Ian Lance Taylor  <[email protected]>
+	* configure.ac: Set have_compiler based on whether gcc directory
+	exists, rather than on whether gcc is in configdirs.
+	* configure: Rebuild.
+
+	2011-07-20  David Edelsohn  <[email protected]>
+	* Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): Add libsupc++ to
+	link directories.
+	* Makefile.in: Rebuild.
+
+	2011-07-20  Ian Lance Taylor  <[email protected]>
+	PR bootstrap/49787
+	* configure.ac: Move --enable-bootstrap handling earlier in file.
+	If --enable-bootstrap and either --enable-build-with-cxx or
+	--enable-build-poststage1-with-cxx, enable C++ automatically.
+	* configure: Rebuild.
+
+	2011-07-19  Ian Lance Taylor  <[email protected]>
+	* configure.ac: Add --enable-build-poststage1-with-cxx.  If set,
+	make C++ a boot_language.  Set and substitute
+	POSTSTAGE1_CONFIGURE_FLAGS.
+	* Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): New variable.
+	(STAGE[+id+]_CONFIGURE_FLAGS): Add $(POSTSTAGE1_CONFIGURE_FLAGS).
+	* configure, Makefile.in: Rebuild.
+
+	2011-07-16  Jason Merrill  <[email protected]>
+	* Makefile.def (language=c++): Add check-c++0x and
+	check-target-libmudflap-c++.
+	* Makefile.tpl (check-target-libmudflap-c++): New.
+	* Makefile.in: Regenerate.
+
+	2011-07-16  Matthias Klose  <[email protected]>
+	* Makefile.tpl (EXTRA_CONFIGARGS_LIBJAVA): Define.
+	* Makefile.def (target_modules/libjava): Pass
+	$(EXTRA_CONFIGARGS_LIBJAVA).
+	* configure.ac: Pass --disable-static in EXTRA_CONFIGARGS_LIBJAVA,
+	if not configured with --enable-static-libjava.
+	* Makefile.in: Regenerate.
+	* configure: Likewise.
+
+	2011-06-22  Hans-Peter Nilsson  <[email protected]>
+	PR regression/47836
+	PR bootstrap/23656
+	PR other/47733
+	PR bootstrap/49247
+	PR c/48825
+	* configure.ac (target_libraries): Remove target-libiberty.
+	Remove case-statement setting skipdirs=target-libiberty for
+	multiple targets.  Remove checking target_configdirs and
+	removing target-libiberty but keeping target-libgcc if
+	otherwise empty.
+	* Makefile.def (target_modules): Don't add libiberty.
+	(dependencies): Remove all traces of target-libiberty.
+	* configure, Makefile.in: Regenerate.
+
+2011-07-22  Jason Merrill  <[email protected]>
+
+	* Makefile.def (language=c++): Add check-c++0x and
+	check-target-libmudflap-c++.
+	* Makefile.tpl (check-target-libmudflap-c++): New.
+	* Makefile.in: Regenerate.
+
+2011-07-18  Rainer Orth  <[email protected]>
+
+	* configure: Regenerate.
+
+2011-07-07  Rainer Orth  <[email protected]>
+
+	PR target/39150
+	* configure.ac (i[3456789]86-*-solaris2*): Also accept
+	x86_64-*-solaris2.1[0-9]*.
+	* configure: Regenerate.
+
+2011-06-13  Walter Lee <[email protected]>
+
+	* configure.ac (tilepro-*-*) New case.
+	(tilegx-*-*): Likewise.
+	* configure: Regenerate.
+
+2011-06-06  Nick Clifton  <[email protected]>
+
+	* config.sub: Sync from upstream.
+
+2011-05-08  Doug Kwan  <[email protected]>
+
+	Merge from gcc:
+
+	2011-05-08  Doug Kwan  <[email protected]>
+
+		* configure.ac: Propagate LDFLAGS_FOR_TARGET.
+		* configure: Regenerated.
+		* Makefile.tpl (LDFLAGS_FOR_TARGET): Use LDFLAGS_FOR_TARGET
+		value from configure.
+		* Makefile.in: Regenerated.
+
+2011-05-05  Joseph Myers  <[email protected]>
+
+	* configure.ac (alpha*-dec-osf*, i[[3456789]]86-*-rdos*,
+	sh*-*-pe|mips*-*-pe|arm-wince-pe, sparc-*-sunos4*, *-*-aix*,
+	*-*-beos*, *-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-linux*
+	| *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-lynxos*,
+	*-*-mingw*, *-*-netbsd*, *-*-netware*, *-*-tpf*, *-*-uclinux*,
+	*-*-vxworks*): Disable newlib and libgloss in separate case
+	statement.
+	(i[[3456789]]86-*-linux*): Move logic allowing newlib to be built
+	to separate case statement.
+	(*-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-netbsd*,
+	*-*-netware*, *-*-tpf*, *-*-uclinux*, *-*-vxworks*,
+	alpha*-dec-osf*, alpha*-*-linux*, am33_2.0-*-linux*, sh-*-linux*,
+	sh*-*-pe|mips*-*-pe|*arm-wince-pe, arm-*-coff, arm-*-elf* |
+	arm*-*-eabi*, arm*-*-linux-gnueabi, arm*-*-symbianelf*, avr-*-*,
+	bfin-*-*, cris-*-* | crisv32-*-*, frv-*-*, i[[3456789]]86-*-coff |
+	i[[3456789]]86-*-elf, i[[3456789]]86-w64-mingw*,
+	i[[3456789]]86-*-mingw*, x86_64-*-mingw*,
+	i[[3456789]]86-*-interix*, i[[3456789]]86-*-beos*,
+	i[[3456789]]86-*-rdos*, m32r-*-*,
+	m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*, m68k-*-elf*, m68*-*-*
+	| fido-*-*, powerpc-*-aix*, powerpc-*-beos*, powerpc-*-eabi,
+	powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems*,
+	rs6000-*-lynxos*, rs6000-*-aix*, mips*-*-linux*, sparclet-*-aout*
+	| sparc86x-*-*, sparc-*-elf*, sparc64-*-elf*, sparclite-*-*,
+	sparc-*-sunos4*, sparc-*-solaris* | sparc64-*-solaris* |
+	sparcv9-*-solaris*, *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu |
+	*-*-kopensolaris*-gnu, *-*-lynxos*, *-*-*): Don't disable newlib
+	and libgloss in main case over targets.  Remove most empty cases
+	in main case over targets.
+	* configure: Regenerate.
+
+2011-05-04  Joseph Myers  <[email protected]>
+
+	* configure.ac: Remove code setting special library locations for
+	hppa*64*-*-hpux11*.  Remove code setting compiler for
+	sparc-sun-solaris2*.
+	* configure: Regenerate.
+
+2011-05-04  Joseph Myers  <[email protected]>
+
+	* configure.ac: Separate libgloss_dir settings from general case
+	over targets.
+	* configure: Regenerate.
+
+2011-04-28  Joseph Myers  <[email protected]>
+
+	* configure.ac (*-*-dragonfly*, *-*-freebsd*, *-*-netbsd*,
+	alpha*-dec-osf*, alpha*-*-linux*, alpha*-*-*, sh-*-linux*,
+	arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi, frv-*-*): Remove
+	cases in libgcj-disabling case statement.
+	(hppa*64*-*-linux*): Set unsupported_languages instead of
+	disabling target-zlib.
+	(hppa*64*-*-*): Restrict case in libgcj-disabling case statement
+	to hppa*64*-*-hpux*.
+	(hppa*-*-*): Restrict case in libgcj-disabling case statement to
+	hppa*-*-hpux*.
+	(ia64*-*-elf*, ia64*-**-hpux*, i[[3456789]]86-*-elf,
+	i[[3456789]]86-*-linux*, *-*-cygwin*, i[[3456789]]86-*-interix*,
+	i[[3456789]]86-*-solaris2*, m32r-*-*, m68k-*-elf*, m68*-*-* |
+	fido-*-*, powerpc-*-eabi, powerpc-*-eabi* | powerpcle-*-eabi* |
+	powerpc-*-rtems*, mips*-*-linux*, mips*-*-*, sh-*-* | sh64-*-*,
+	sparc-*-elf*, sparc64-*-elf*, sparc-*-solaris* |
+	sparc64-*-solaris* | sparcv9-*-solaris*, *-*-linux* | *-*-gnu* |
+	*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-*): Remove cases in
+	libgcj-disabling case statement.
+	* configure: Regenerate.
+
+2011-04-28  Joseph Myers  <[email protected]>
+
+	* configure.ac: Disable Java for targets not supporting libffi.
+	(*-*-chorusos, *-*-kaos*, am33_2.0-*-linux*, sh*-*-pe|mips*-*-pe):
+	Remove cases in Java-disabling statement.
+	(*arm-wince-pe): Change to arm-wince-pe.
+	(arc-*-*, arm-*-coff, arm-*-pe*, arm-*-riscix*, avr-*-*): Remove
+	cases in Java-disabling statement.
+	(bfin-*-*): Don't disable Java again.
+	(c4x-*-* | tic4x-*-*, tic54x-*-*, cr16-*-*, d10v-*-*, d30v-*-*,
+	fr30-*-elf*, moxie-*-*, h8300*-*-*, h8500-*-*, hppa1.1-*-osf* |
+	hppa1.1-*-bsd*, hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-openbsd*,
+	hppa*-*-pro*, i960-*-*, i[[3456789]]86-*-coff,
+	i[[3456789]]86-*-pe, i[[3456789]]86-*-sco3.2v5*,
+	i[[3456789]]86-*-sco*, i[[3456789]]86-*-sysv4*,
+	i[[3456789]]86-*-beos*, i[[3456789]]86-*-rdos*,
+	m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*): Remove cases in
+	Java-disabling statement.
+	(mmix-*-*): Don't disable Java again.
+	(mt-*-*, powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*,
+	powerpc-*-beos*, rs6000-*-lynxos*, rs6000-*-*, m68k-apollo-*,
+	microblaze*, mips*-sde-elf*, mips*-*-irix5*, mips*-*-bsd*,
+	sparclet-*-aout* | sparc86x-*-*, sparclite-*-*, sparc-*-sunos4*,
+	tic6x-*-*, v810-*-*, vax-*-*): Remove cases in Java-disabling
+	statement.
+	* configure: Regenerate.
+
+2011-04-28  Joseph Myers  <[email protected]>
+
+	Merge from GCC:
+
+	2011-04-18  Jack Howarth  <[email protected]>
+
+	PR lto/48086
+	* configure.ac: Re-enable LTO on *-apple-darwin9*.
+	* configure: Regenerate.
+
+2011-04-28  Joseph Myers  <[email protected]>
+
+	* configure.ac: Separate cases disabling Java and Java libraries
+	from general case over targets.
+	* configure: Regenerate.
+
+2011-04-06  Joseph Myers  <[email protected]>
+
+	* configure.ac (build_tools): Remove build-byacc.
+	(host_libs): Remove mmalloc.
+	(host_tools): Remove byacc make patch prms send-pr ash bash bzip2
+	autoconf automake libtool diff rcs fileutils shellutils time
+	textutils wdiff find uudecode hello tar gzip indent recode release
+	sed perl gawk findutils gettext zip.
+	(libgcj): Remove target-qthreads.
+	(target_tools): Remove target-examples target-gperf.
+	(YACC): Don't handle building byacc.
+	* configure: Regenerate.
+	* Makefile.def (ash, autoconf, automake, bash, byacc, bzip2, diff,
+	dosutils, examples, fileutils, find, findutils, gawk, gettext,
+	gnuserv, gperf, gzip, hello, indent, libtool, make, mmalloc,
+	patch, perl, prms, qthreads, rcs, recode, release, sed, send-pr,
+	shellutils, tar, textutils, time, uudecode, wdiff, zip): Don't
+	handle building components.
+	* Makefile.in: Regenerate.
+
+2011-04-05  Ralf Wildenhues  <[email protected]>
+
+	* config.sub: Sync from upstream.
+
+2011-04-01  Joseph Myers  <[email protected]>
+
+	* configure.ac (avr-*-*): Add comment about why libssp is disabled.
+	(microblaze*): Don't disable libssp.
+	* configure: Regenerate.
+
+2011-04-01  Joseph Myers  <[email protected]>
+
+	* configure.ac: Remove code setting CONFIG_SHELL, config_shell and
+	moveifchange.
+	* configure: Regenerate.
+	* Makefile.tpl: Use @SHELL@ not @config_shell@.
+	* Makefile.in: Regenerate.
+
+2011-04-01  Joseph Myers  <[email protected]>
+
+	* configure.ac (*-*-sysv4*): Don't enable libgomp.
+	(alpha*-*-*vms*, i[[34567]]86-*-sco3.2v5*, mn10300-*-*,
+	powerpc-*-chorusos*, powerpc*-*-eabi*, powerpc*-*-sysv*,
+	powerpc*-*-kaos*, s390x-ibm-tpf*, sparc64-*-elf*, v850*-*-*,
+	xtensa*-*-elf*, *-*-beos*, *-*-elf*, *-*-netware*, *-*-rtems*,
+	*-*-sysv[[45]]*, *-*-vxworks*, *-wrs-windiss): Remove
+	md_exec_prefix cases.
+	* configure: Regenerate.
+
+2011-04-01  Joseph Myers  <[email protected]>
+
+	* configure.ac: Separate cases disabling target-libssp,
+	target-libiberty, target-libstdc++-v3 and Fortran from general
+	case over targets.
+	* configure: Regenerate.
+
+2011-04-01  Joseph Myers  <[email protected]>
+
+	* configure.ac (*-*-chorusos): Don't disable libgcj.
+	(*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*):
+	Remove case.
+	(*-*-kaos*): Don't disable GCC libraries, zlib or fastjar.
+	(arm-*-coff): Don't disable libgcj.
+	(arm*-*-linux-gnueabi): Remove useless assignment.
+	(arm-*-riscix*): Don't disable libgcj.
+	(bfin-*-*): Don't enable target-bsp and target-cygmon depending on
+	configuration.
+	(c4x-*-* | tic4x-*-*): Don't disable GCC libraries.
+	(c54x*-*-*): Remove case.
+	(tic54x-*-*): Don't disable GCC or GCC libraries.
+	(cris-*-* | crisv32-*-*): Don't handle *-*-aout.  Change *-*-elf
+	to *.
+	(d10v-*-*): Don't disable GCC libraries.
+	(d30v-*-*): Don't disable libgcj.
+	(h8500-*-*): Don't disable GCC libraries.
+	(i960-*-*): Don't disable libgcj.
+	(i[[3456789]]86-*-linux*): Don't handle *-*-*libc1*.
+	(i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*,
+	i[[3456789]]86-*-sysv4*, i[[3456789]]86-*-beos*): Don't disable
+	libgcj.
+	(m68k-*-coff*): Remove case.
+	(mmix-*-*): Don't disable libgloss on host.
+	(mn10200-*-*, mn10300-*-*): Remove cases.
+	(powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*,
+	powerpc-*-beos*, m68k-apollo-*, mips*-*-irix5*, mips*-*-bsd*):
+	Don't disable libgcj.
+	(romp-*-*): Remove case.
+	(sparclite-*-*, sparc-*-sunos4*): Don't disable libgcj.
+	(sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*): Remove
+	case.
+	(v810-*-*): Don't disable GCC libraries.
+	(v850*-*-*, vax-*-vms, xtensa*-*-*): Remove cases.
+	(ip2k-*-*): Don't disable GCC libraries.
+	* configure: Regenerate.
+
+2011-03-28  Joseph Myers  <[email protected]>
+
+	* configure.ac (i[[3456789]]86-*-msdosdjgpp*): Don't disable
+	libffi on host.
+	(x86_64-*-mingw*, i[[3456789]]86-*-mingw32*): Don't disable newlib
+	on host.
+	(c54x*-*-* | tic54x-*-*): Don't disable newlib on host.
+	* configure: Regenerate.
+
+2011-03-26  John Marino  <[email protected]>
+
+	* configure.ac: Add support for *-*-dragonfly*
+	* configure: Regenerate.
+
+2011-03-25  Joseph Myers  <[email protected]>
+
+	* configure.ac (native_only): Remove.
+	(i[[3456789]]86-*-msdosdjgpp*): Don't disable expect dejagnu
+	send-pr uudecode guile gnuserv on host.
+	(x86_64-*-mingw*): Don't disable expect dejagnu autoconf automake
+	send-pr rcs guile perl texinfo libtool on host.
+	(i[[3456789]]86-*-mingw32*): Don't disable expect dejagnu autoconf
+	automake send-pr rcs guile perl texinfo libtool on host.
+	(*-*-cygwin*, *-*-netbsd*): Remove host cases.
+	(*-*-kaos*): Don't disable target-examples target-gperf on target.
+	(alpha*-dec-osf*): Don't disable fileutils on target.
+	(sh*-*-pe|mips*-*-pe|*arm-wince-pe): Don't disable target-examples
+	texinfo send-pr expect dejagnu on target.
+	(arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi): Don't disable
+	target-qthreads on target.
+	(hppa*-hp-hpux11*, hppa*-*-*): Don't disable shellutils on target.
+	(ia64*-*-elf*, ia64*-*-*vms*): Don't disable mmalloc on target.
+	(i[[3456789]]86-w64-mingw*, i[[3456789]]86-*-mingw*,
+	x86_64-*-mingw*): Don't disable expect on target.
+	(*-*-cygwin*): Don't disable target-gperf on target.
+	(powerpc*-*-winnt* | powerpc*-*-pe*): Don't disable make expect
+	gnuserv on target.
+	(powerpcle-*-solaris*): Don't disable make expect gnuserv on
+	target.
+	* configure: Regenerate.
+
+2011-03-25  Joseph Myers  <[email protected]>
+
+	* configure.ac (target_tools): Remove target-groff.
+	(native_only): Remove target-groff.
+	(hppa*64*-*-*): Don't disable byacc.
+	(i[[3456789]]86-*-mingw32*): Remove commented-out noconfigdirs
+	setting.
+	(*-*-kaos*): Don't skip target-librx and target-groff.
+	(*-*-netware*): Don't skip target-libmudflap.
+	(*-*-tpf*): Don't skip target-libmudflap.
+	(sh*-*-pe|mips*-*-pe|*arm-wince-pe): Don't condition configured
+	directories on the host.
+	(ia64*-*-*vms*): Don't skip tix.
+	(sh-*-* | sh64-*-*): Don't condition skipped directories on the
+	host.
+	* configure: Regenerate.
+
+2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* configure.ac: Remove references to mt-mep, mt-netware,
+	mt-wince.
+	* Makefile.def: Add all-utils soft dependencies.
+	* Makefile.tpl: Remove GDB_NLM_DEPS.
+	* configure: Regenerate.
+	* Makefile.in: Regenerate.
+
+2011-03-24  Paolo Bonzini  <[email protected]>
+
+	Sync from GCC:
+
+	2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* configure.ac: Do not include mh-x86omitfp.
+	* configure: Regenerate.
+
+	2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* configure.ac: Remove empty cases.
+	* configure: Regenerate.
+
+	2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* Makefile.def: Add dependency from termcap to gdb.
+	* Makefile.in: Regenerate.
+
+	2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* configure.ac: Remove all mentions of mh-sysv4 and mh-solaris.
+	* configure: Regenerate.
+	* Makefile.def: Remove all mentions of X11_FLAGS_TO_PASS.
+	* Makefile.tpl: Likewise.
+	* Makefile.in: Regenerate.
+
+	2011-03-24  Paolo Bonzini  <[email protected]>
+
+	* configure.ac: Remove all mentions of tentative_cc.
+	* configure: Regenerate.
+
+	2011-03-16  Jack Howarth  <[email protected]>
+
+	PR lto/48086
+	* configure.ac: Re-enable LTO on *-apple-darwin9.
+	* configure: Regenerate.
+
+2011-03-24  Joseph Myers  <[email protected]>
+
+	* configure.ac (i[[3456789]]86-*-vsta, i[[3456789]]86-*-go32*,
+	i[[3456789]]86-*-beos*, powerpc-*-beos*, m68k-hp-hpux*,
+	m68k-apollo-sysv*, m68k-apollo-bsd*, m88k-dg-dgux*,
+	m88k-harris-cxux*, m88k-motorola-sysv*, mips*-dec-ultrix*,
+	mips*-nec-sysv4*, mips*-sgi-irix4*, mips*-*-sysv4*, mips*-*-sysv*,
+	i370-ibm-opened*, i[[3456789]]86-*-sysv5*, i[[3456789]]86-*-dgux*,
+	i[[3456789]]86-ncr-sysv4.3*, i[[3456789]]86-ncr-sysv4*,
+	i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*,
+	i[[3456789]]86-*-udk*, vax-*-ultrix2*, m68k-sun-sunos*,
+	hppa*-*-hiux*, *-*-hiux*, rs6000-*-lynxos*, *-*-sysv4*,
+	*-*-rhapsody*): Remove host cases.
+	* configure: Regenerate.
+
+2011-03-24  Joseph Myers  <[email protected]>
+
+	* configure.ac (ppc*-*-pe): Remove host case.
+	(strongarm-*-coff | xscale-*-coff, strongarm-*-elf* |
+	xscale-*-elf*, thumb-*-coff, thumb-*-elf, thumb-*-pe, ep9312-*-elf
+	| ep9312-*-coff, parisc*64*-*-linux*, ppc*-*-pe): Remove target
+	cases.
+	* configure: Regenerate.
+
+2011-03-24  Joseph Myers  <[email protected]>
+
+	* config.sub: Update to version 2011-03-23.
+
+2011-03-22  Joseph Myers  <[email protected]>
+
+	* configure.ac (arm-semi-aof, crx-*-*, parisc*-*-linux*,
+	i370-*-opened*, i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss*
+	| i[[3456789]]86-*-uwin*, mcore-*-pe*): Remove empty cases.
+	* configure: Regenerate.
+
+2011-03-22  Joseph Myers  <[email protected]>
+
+	* config-ml.in: Don't handle arc-*-elf*.
+	* configure.ac (arc-*-*, crx-*-*, i[[3456789]]86-*-pe,
+	m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*, mcore-*-pe*): Don't
+	handle GCC libraries.
+	* configure: Regenerate.
+
+2011-03-21  Rainer Orth  <[email protected]>
+
+	PR bootstrap/48120:
+	* configure.ac (pwllib): Use LIBS instead of LDFLAGS.
+	Add -lstdc++ -lm to LIBS.
+	* configure: Regenerate.
+
+2011-03-18  David Edelsohn  <[email protected]>
+
+	* config.guess: Update to version 2011-02-02
+	* config.sub: Update to version 2011-02-24
+	
+2011-03-03  Sebastian Pop  <[email protected]>
+
+        * configure.ac: Adjust test of with_ppl.
+        * configure: Regenerated.
+
+2011-03-02  Sebastian Pop  <[email protected]>
+
+	* configure.ac: Add -lpwl to ppllibs.
+	* config/cloog.m4: Add -lisl to clooglibs.
+	* configure: Regenerated.
+
+2011-02-13  Ralf Wildenhues  <[email protected]>
+
+	Import from Libtool and gnulib:
+
+	2011-01-27  Gerald Pfeifer  <[email protected]>
+
+	Prepare for supporting FreeBSD 10.
+	* config.rpath: Remove handling of freebsd1* which soon would
+	match FreeBSD 10.0.
+
+	2011-01-20  Gerald Pfeifer  <[email protected]>  (tiny change)
+
+	Remove support for FreeBSD 1.x.
+	* libtool.m4 (_LT_LINKER_SHLIBS)
+	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
+	soon would incorrectly match FreeBSD 10.0.
+
+2011-02-12  Ralf Wildenhues  <[email protected]>
+
+	PR binutils/12283
+	* MAINTAINERS (mkinstalldirs): Comes from Automake.
+	(move-if-change): Comes from gnulib.
+	* move-if-change: Import version from gnulib.
+
+2011-02-12  Ralf Wildenhues  <[email protected]>
+
+	Sync from GCC:
+
+	2011-02-12  Alexandre Oliva  <[email protected]>
+
+	PR lto/47225
+	* Makefile.def (lto-plugin): Double dash for enable-shared.
+	(configure-gcc): Depend on all-lto-plugin.
+	* Makefile.in: Rebuilt.
+
+	2011-02-11  Ralf Wildenhues  <[email protected]>
+
+	* configure.ac: Remove extra bracket.
+	* configure: Regenerate.
+
+	2011-02-06  Kai Tietz  <[email protected]>
+
+	PR lto/47225
+	* Makefile.def: Add dependency for install-gcc
+	on install-lto-plugin.
+	* Makfile.in: Regenerated
+
+	2011-01-25  Jakub Jelinek  <[email protected]>
+
+	* configure.ac: If with_ppl is no, move setting with_cloog=no
+	after CLOOG_REQUESTED check.
+	* configure: Regenerated.
+
+	2011-01-25  Sebastian Pop  <[email protected]>
+
+	* configure.ac: Call AC_MSG_ERROR when PPL 0.11 is not present and
+	CLooG has been requested.
+	* configure: Regenerated.
+
+	2011-01-25  Sebastian Pop  <[email protected]>
+
+	* configure: Regenerated.
+	* configure.ac: Check for version 0.11 (or later revision) of PPL.
+
+	2011-01-25  Tobias Grosser  <[email protected]>
+
+	* configure: Regenerated.
+	* configure.ac: Use CLOOG_CHECK_VERSION(0,16,1).
+
+	2011-01-07  Jan Hubicka  <[email protected]>
+
+	PR lto/47225
+	* Makefile.in: Regenerate.
+	* Makefile.def (lto-plugin): Always pass enable-shared to the plugin
+	configure.
+
+2011-01-31  Alexandre Oliva  <[email protected]>
+
+	PR libgcj/44341
+	* configure.ac: Discard --with-* flags for host when configuring
+	target libraries for cross build.
+	* configure: Rebuilt.
+
+2011-01-21  Andreas Schwab  <[email protected]>
+
+	Sync from GCC:
+
+	2011-01-21  Andreas Schwab  <[email protected]>
+
+	* configure.ac: Use AS_HELP_STRING throughout.
+	* configure: Regenerate.
+
+	2011-01-18  Jie Zhang  <[email protected]>
+
+	* configure.ac (bfin-*-*): Remove gdb from noconfigdirs.
+	* configure: Regenerate.
+
+2010-12-10  John David Anglin  <[email protected]>
+
+	* ltmain.sh (relink): Use absolute path when hardcoding with -L.
+
+2011-01-13  Joel Brobecker  <[email protected]>
+
+	* configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs
+	for ia64-hpux.
+	* configure: Regenerate.
+
+2011-01-02  Ralf Wildenhues  <[email protected]>
+
+	Sync from GCC:
+	2010-12-22  Hariharan Sandanagobalane  <[email protected]>
+
+	* configure.ac: (picochip): Disable libiberty.
+	* configure: Regenerate.
+
+2010-12-18  Jeff Johnston  <[email protected]>
+
+	* COPYING.LIBGLOSS: Remove the GPL for fr30 target.
+
+2010-12-10  Ian Lance Taylor  <[email protected]>
+
+	PR bootstrap/46819
+	* configure.ac: For --disable-libgcj clear libgcj_saved.
+	* configure: Rebuild.
+
+2010-12-10  Tobias Burnus  <[email protected]>
+
+	PR fortran/46540
+	* configure.ac: Add --disable-libquadmath and
+	--disable-libquadmath-support.
+	* configure: Regenerate.
+
+2010-12-10  Tristan Gingold  <[email protected]>
+
+	* src-release (ETC_SUPPORT): add gnu-oids.texi
+
+2010-12-03  Hans-Peter Nilsson  <[email protected]>
+
+	PR libffi/46792
+	* configure.ac (cris-*-elf, crisv32-*-elf): Disable target-libffi.
+	* configure: Regenerate.
+
+2010-12-02  Ian Lance Taylor  <[email protected]>
+
+	* configure.ac: Always set default for poststage1_ldflags to
+	-static-libstdc++ -static-libgcc.
+
+2010-12-02  Jeff Johnston  <[email protected]>
+
+	* COPYING.NEWLIB: Add National Semiconductor notice.
+
+2010-11-29  Andreas Schwab  <[email protected]>
+
+	* configure.ac: Move comment to remove extra space in last argument
+	of GCC_TARGET_TOOL.
+
+2010-11-26  Alexandre Oliva  <[email protected]>
+
+	PR other/46026
+	* configure.ac (CXX_FOR_TARGET): Add -funconfigured-libstdc++-v3.
+	* Makefile.def (CXX_FOR_TARGET): Removed from flags_to_pass.
+	* Makefile.tpl (CXX_FOR_TARGET_FLAG_TO_PASS): New.
+	(BASE_FLAGS_TO_PASS): Use it.
+	* configure: Rebuilt.
+	* Makefile.in: Rebuilt.
+
 2010-11-23  H.J. Lu  <[email protected]>
 
 	PR binutils/12258
@@ -11,6 +666,127 @@
 	`both*'.   New configure option --{en,dis}able-ld.
 	* configure: Regenerate.
 
+2010-11-20  Ian Lance Taylor  <[email protected]>
+
+	* configure.ac: Only disable a language library if no language needs
+	it.  Don't let --disable-libgcj uncondtionally disable libffi.
+	* configure: Rebuild.
+
+2010-11-20  Paolo Bonzini  <[email protected]>
+
+	* configure: Regenerate.
+
+2010-11-20  Ralf Wildenhues  <[email protected]>
+
+	PR other/46202
+	* configure.ac: Fix just-built in-tree STRIP name to be
+	binutils/strip-new.
+	* configure: Regenerate.
+	* Makefile.def (install-strip-gcc, install-strip-binutils)
+	(install-strip-opcodes, install-strip-ld, install-strip-itcl)
+	(install-strip-sid): Mirror dependencies on non-strip variants
+	of these targets on the respective -strip prerequisites.
+	* Makefile.tpl (install-strip, install-strip-host)
+	(install-strip-target): New targets.
+	(install-strip-[+module+], install-strip-target-[+module+]):
+	New targets.
+	* Makefile.in: Regenerate.
+
+2010-11-19  Ian Lance Taylor  <[email protected]>
+	    Ralf Wildenhues  <[email protected]>
+
+	* configure.ac: Add target-libgo to target_libraries.  Set
+	and substitute GOC_FOR_BUILD and GOC_FOR_TARGET.
+	* Makefile.tpl (BUILD_EXPORTS): Add GOC and GOCFLAGS.
+	(HOST_EXPORTS): Add GOC.
+	(BASE_TARGET_EXPORTS): Add GOC.
+	(GOC_FOR_BUILD, GOCFLAGS, GOC_FOR_TARGET): New variables.
+	(GOCFLAGS_FOR_TARGET): New variable.
+	(EXTRA_HOST_FLAGS): Add GOC.
+	(EXTRA_TARGET_FLAGS): Add GOC and GOCFLAGS.
+	* Makefile.def (target_modules): Add libgo.
+	(flags_to_pass): Add GOC_FOR_TARGET and GOCFLAGS_FOR_TARGET.
+	(dependencies): Add dependency from configure-target-libgo to
+	configure-target-libffi and all-target-libstdc++-v3.  Add
+	dependencies from all-target-libgo to all-target-libffi.
+	(languages): Add go.
+	* configure: Rebuild.
+	* Makefile.in: Rebuild.
+
+2010-11-19  Ian Lance Taylor  <[email protected]>
+
+	* config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
+	compiler/flag environment variables.
+
+2010-11-18  Ian Lance Taylor  <[email protected]>
+
+	* configure.ac: Check for lang_requires_boot_languages in
+	config-lang.in files.
+	* configure: Rebuild.
+
+2010-11-17  Mike Frysinger  <[email protected]>
+
+	* .gitignore: New file.
+
+2010-11-16  Francois-Xavier Coudert  <[email protected]>
+	    Tobias Burnus  <[email protected]>
+
+	PR fortran/32049
+	* Makefile.def: Add libquadmath; build it with language=fortran.
+	* configure.ac: Add libquadmath.
+	* Makefile.tpl: Handle multiple libs in check-[+language+].
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+
+2010-11-15  Andreas Schwab  <[email protected]>
+
+	* configure.ac: Fix spelling in option names.
+	* configure: Regenerated.
+
+2010-11-13  Georg-Johann Lay  <[email protected]>
+
+	PR bootstrap/39622
+	* configure.ac (FLAGS_FOR_TARGET): Add include-fixed path.
+	* configure: Regenerated.
+
+2010-11-12  Tobias Grosser  <[email protected]>
+
+	* config/cloog.m4: Add -enable-cloog-backend=(isl|ppl|ppl-legacy) to
+	define the cloog backend to use. Furthermore, only pass the ppllibs to
+	the configure checks, if necessary.
+	* configure: Regenerate.
+
+2010-11-12  Tobias Grosser  <[email protected]>
+
+	* config/cloog.m4: Use CLooG predefined macro to check for CLooG PPL.
+	* configure: regenerate
+
+2010-11-12  Tobias Grosser  <[email protected]>
+
+	* config/cloog.m4: Fix typo.  verison -> version.
+	* configure: Regenerate.
+
+2010-11-12  Tobias Grosser  <[email protected]>
+
+	* config/cloog.m4: Pass ppl libraries to the CLooG version check.
+	* configure: Regenerate.
+
+2010-11-11  Andreas Simbuerger  <[email protected]>
+
+	* configure.ac: Support official CLooG.org versions.
+	* configure: Regenerate.
+	* config/cloog.m4: New.
+
+2010-11-05  Michael Eager  <[email protected]>
+
+	* COPYING.LIBGLOSS: Correct typo in microblaze.
+	* COPYING.NEWLIB: Same.
+
+2010-11-04  Iain Sandoe  <[email protected]>
+
+	* configure.ac (*-*-darwin*): Use mh-darwin for all Darwin variants.
+	* configure: Regenerate.
+
 2010-11-03  Ian Lance Taylor  <[email protected]>
 	    Dave Korn  <[email protected]>
 
diff --git a/MAINTAINERS b/MAINTAINERS
index a471c90..046c5ea 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -38,7 +38,7 @@
 		[email protected]
 		[email protected]
 
-depcomp
+depcomp; mkinstalldirs
         Send bug reports and patches to [email protected].
 
 gdb/; readline/; sim/; GDB's part of include/
@@ -69,12 +69,8 @@
 	sources or submitted to the master file maintainer and brought
 	in via a merge.
 
-mkinstalldirs; move-if-change
-	autoconf: http://gnu.org
-	Patches to [email protected].
-	Changes need to be done in tandem with the official AUTOCONF
-	sources or submitted to the master file maintainer and brought
-	in via a merge.
+move-if-change
+	Send bug reports and patches to [email protected].
 
 symlink-tree
 	gcc: http://gcc.gnu.org
diff --git a/Makefile.def b/Makefile.def
index 72cbdd4..2c119a0 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -4,7 +4,7 @@
 // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 // This file was originally written by Nathanael Nerode.
 //
-//   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+//   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 //   Free Software Foundation
 //
 // This file is free software; you can redistribute it and/or modify
@@ -27,39 +27,25 @@
 
 build_modules= { module= libiberty; };
 build_modules= { module= bison; };
-build_modules= { module= byacc; };
 build_modules= { module= flex; };
 build_modules= { module= m4; };
 build_modules= { module= texinfo; };
 build_modules= { module= fixincludes; };
 
-host_modules= { module= ash; };
-host_modules= { module= autoconf; };
-host_modules= { module= automake; };
-host_modules= { module= bash; };
 host_modules= { module= bfd; bootstrap=true; };
 host_modules= { module= opcodes; bootstrap=true; };
 host_modules= { module= binutils; bootstrap=true; };
 host_modules= { module= bison; no_check_cross= true; };
-host_modules= { module= byacc; no_check_cross= true; };
-host_modules= { module= bzip2; };
 host_modules= { module= cgen; };
 host_modules= { module= dejagnu; };
-host_modules= { module= diff; };
-host_modules= { module= dosutils; no_check= true; };
 host_modules= { module= etc; };
 host_modules= { module= fastjar; no_check_cross= true; };
-host_modules= { module= fileutils; };
-host_modules= { module= findutils; };
-host_modules= { module= find; };
 host_modules= { module= fixincludes;
 		missing= TAGS; };
 host_modules= { module= flex; no_check_cross= true; };
 host_modules= { module= gas; bootstrap=true; };
 host_modules= { module= gcc; bootstrap=true; 
 		extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
-host_modules= { module= gawk; };
-host_modules= { module= gettext; };
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared';
 		no_install= true;
@@ -86,12 +72,8 @@
 host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared';
 		no_install= true; };
-host_modules= { module= gnuserv; };
 host_modules= { module= gold; bootstrap=true; };
 host_modules= { module= gprof; };
-host_modules= { module= gzip; };
-host_modules= { module= hello; };
-host_modules= { module= indent; };
 host_modules= { module= intl; bootstrap=true; };
 host_modules= { module= tcl;
                 missing=mostlyclean; };
@@ -110,34 +92,16 @@
 		missing= install-pdf;
 		missing= install-html;
 		missing= install-info; };
-host_modules= { module= libtool; };
 host_modules= { module= m4; };
-host_modules= { module= make; };
-host_modules= { module= mmalloc; no_check=true; };
-host_modules= { module= patch; };
-host_modules= { module= perl; };
-host_modules= { module= prms; };
-host_modules= { module= rcs; };
 host_modules= { module= readline; };
-host_modules= { module= release; no_install= true; no_check= true; };
-host_modules= { module= recode; };
-host_modules= { module= sed; };
-host_modules= { module= send-pr; };
-host_modules= { module= shellutils; };
 host_modules= { module= sid; };
 host_modules= { module= sim; };
-host_modules= { module= tar; };
 host_modules= { module= texinfo; no_install= true; };
-host_modules= { module= textutils; };
-host_modules= { module= time; };
-host_modules= { module= uudecode; };
-host_modules= { module= wdiff; };
-host_modules= { module= zip; no_check_cross=true; };
 host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; };
-host_modules= { module= gdb; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
-host_modules= { module= expect; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
-host_modules= { module= guile; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
-host_modules= { module= tk; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= gdb; };
+host_modules= { module= expect; };
+host_modules= { module= guile; };
+host_modules= { module= tk; };
 host_modules= { module= libtermcap; no_check=true; 
                 missing=mostlyclean;
                 missing=clean;
@@ -145,7 +109,8 @@
                 missing=maintainer-clean; };
 host_modules= { module= utils; no_check=true; };
 host_modules= { module= gnattools; };
-host_modules= { module= lto-plugin; bootstrap=true; };
+host_modules= { module= lto-plugin; bootstrap=true;
+		extra_configure_flags=--enable-shared; };
 
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
@@ -155,8 +120,10 @@
 target_modules = { module= libssp; lib_path=.libs; };
 target_modules = { module= newlib; };
 target_modules = { module= libgcc; bootstrap=true; no_check=true; };
+target_modules = { module= libquadmath; };
 target_modules = { module= libgfortran; };
 target_modules = { module= libobjc; };
+target_modules = { module= libgo; };
 target_modules = { module= libtermcap; no_check=true;
                    missing=mostlyclean;
                    missing=clean;
@@ -164,14 +131,11 @@
                    missing=maintainer-clean; };
 target_modules = { module= winsup; };
 target_modules = { module= libgloss; no_check=true; };
-target_modules = { module= libiberty; };
-target_modules = { module= gperf; };
-target_modules = { module= examples; no_check=true; no_install=true; };
 target_modules = { module= libffi; };
-target_modules = { module= libjava; raw_cxx=true; };
+target_modules = { module= libjava; raw_cxx=true;
+                   extra_configure_flags="$(EXTRA_CONFIGARGS_LIBJAVA)"; };
 target_modules = { module= zlib; };
 target_modules = { module= boehm-gc; };
-target_modules = { module= qthreads; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
 target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
@@ -280,12 +244,13 @@
 flags_to_pass = { flag= CC_FOR_TARGET ; };
 flags_to_pass = { flag= CFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= CPPFLAGS_FOR_TARGET ; };
-flags_to_pass = { flag= CXX_FOR_TARGET ; };
 flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
 flags_to_pass = { flag= FLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= GCJ_FOR_TARGET ; };
 flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
+flags_to_pass = { flag= GOC_FOR_TARGET ; };
+flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= LD_FOR_TARGET ; };
 flags_to_pass = { flag= LIPO_FOR_TARGET ; };
 flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
@@ -307,10 +272,8 @@
 
 // Build modules
 dependencies = { module=all-build-bison; on=all-build-texinfo; };
-dependencies = { module=all-build-byacc; on=all-build-texinfo; };
 dependencies = { module=all-build-flex; on=all-build-texinfo; };
 dependencies = { module=all-build-flex; on=all-build-bison; };
-dependencies = { module=all-build-flex; on=all-build-byacc; };
 dependencies = { module=all-build-flex; on=all-build-m4; };
 dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
 dependencies = { module=all-build-m4; on=all-build-texinfo; };
@@ -318,6 +281,7 @@
 
 // Host modules specific to gcc.
 dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=all-lto-plugin; };
 dependencies = { module=configure-gcc; on=all-binutils; };
 dependencies = { module=configure-gcc; on=all-gas; };
 dependencies = { module=configure-gcc; on=all-ld; };
@@ -332,7 +296,6 @@
 dependencies = { module=all-gcc; on=all-cloog; };
 dependencies = { module=all-gcc; on=all-build-texinfo; };
 dependencies = { module=all-gcc; on=all-build-bison; };
-dependencies = { module=all-gcc; on=all-build-byacc; };
 dependencies = { module=all-gcc; on=all-build-flex; };
 dependencies = { module=all-gcc; on=all-build-libiberty; };
 dependencies = { module=all-gcc; on=all-build-fixincludes; };
@@ -341,11 +304,14 @@
 dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
 dependencies = { module=all-gcc; on=all-libiberty; };
 dependencies = { module=all-gcc; on=all-fixincludes; };
+dependencies = { module=all-gcc; on=all-lto-plugin; };
 dependencies = { module=info-gcc; on=all-build-libiberty; };
 dependencies = { module=dvi-gcc; on=all-build-libiberty; };
 dependencies = { module=pdf-gcc; on=all-build-libiberty; };
 dependencies = { module=html-gcc; on=all-build-libiberty; };
 dependencies = { module=install-gcc ; on=install-fixincludes; };
+dependencies = { module=install-gcc ; on=install-lto-plugin; };
+dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; };
 
 dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
 dependencies = { module=configure-libcpp; on=configure-intl; };
@@ -356,7 +322,9 @@
 
 dependencies = { module=all-gnattools; on=all-target-libada; };
 
-dependencies = { module=all-lto-plugin; on=all-gcc; };
+dependencies = { module=all-lto-plugin; on=all-libiberty; };
+
+dependencies = { module=all-utils; on=all-libiberty; };
 
 dependencies = { module=configure-mpfr; on=all-gmp; };
 dependencies = { module=configure-mpc; on=all-mpfr; };
@@ -376,9 +344,9 @@
 dependencies = { module=all-gdb; on=all-opcodes; };
 dependencies = { module=all-gdb; on=all-readline; };
 dependencies = { module=all-gdb; on=all-build-bison; };
-dependencies = { module=all-gdb; on=all-build-byacc; };
 dependencies = { module=all-gdb; on=all-sim; };
 dependencies = { module=all-gdb; on=all-libdecnumber; };
+dependencies = { module=all-gdb; on=all-libtermcap; };
 
 dependencies = { module=configure-libgui; on=configure-tcl; };
 dependencies = { module=configure-libgui; on=configure-tk; };
@@ -400,16 +368,17 @@
 dependencies = { module=all-binutils; on=all-bfd; };
 dependencies = { module=all-binutils; on=all-build-flex; };
 dependencies = { module=all-binutils; on=all-build-bison; };
-dependencies = { module=all-binutils; on=all-build-byacc; };
 dependencies = { module=all-binutils; on=all-intl; };
 
 // We put install-opcodes before install-binutils because the installed
 // binutils might be on PATH, and they might need the shared opcodes
 // library.
 dependencies = { module=install-binutils; on=install-opcodes; };
+dependencies = { module=install-strip-binutils; on=install-strip-opcodes; };
 
 // libopcodes depends on libbfd
 dependencies = { module=install-opcodes; on=install-bfd; };
+dependencies = { module=install-strip-opcodes; on=install-strip-bfd; };
 
 dependencies = { module=configure-gas; on=configure-intl; };
 dependencies = { module=all-gas; on=all-libiberty; };
@@ -426,16 +395,15 @@
 dependencies = { module=all-ld; on=all-bfd; };
 dependencies = { module=all-ld; on=all-opcodes; };
 dependencies = { module=all-ld; on=all-build-bison; };
-dependencies = { module=all-ld; on=all-build-byacc; };
 dependencies = { module=all-ld; on=all-build-flex; };
 dependencies = { module=all-ld; on=all-intl; };
 dependencies = { module=install-ld; on=install-gold; };
+dependencies = { module=install-strip-ld; on=install-strip-gold; };
 dependencies = { module=configure-gold; on=configure-intl; };
 dependencies = { module=all-gold; on=all-libiberty; };
 dependencies = { module=all-gold; on=all-intl; };
 dependencies = { module=all-gold; on=all-bfd; };
 dependencies = { module=all-gold; on=all-build-bison; };
-dependencies = { module=all-gold; on=all-build-byacc; };
 dependencies = { module=check-gold; on=all-binutils; };
 dependencies = { module=check-gold; on=all-gas; };
 
@@ -460,6 +428,7 @@
 dependencies = { module=all-itcl; on=all-tcl; };
 dependencies = { module=all-itcl; on=all-tk; };
 dependencies = { module=install-itcl; on=install-tcl; };
+dependencies = { module=install-strip-itcl; on=install-strip-tcl; };
 
 dependencies = { module=configure-tk; on=configure-tcl; };
 dependencies = { module=all-tk; on=all-tcl; };
@@ -470,7 +439,9 @@
 dependencies = { module=all-sid; on=all-tcl; };
 dependencies = { module=all-sid; on=all-tk; };
 dependencies = { module=install-sid; on=install-tcl; };
+dependencies = { module=install-strip-sid; on=install-strip-tcl; };
 dependencies = { module=install-sid; on=install-tk; };
+dependencies = { module=install-strip-sid; on=install-strip-tk; };
 
 dependencies = { module=configure-sim; on=configure-intl; };
 dependencies = { module=all-sim; on=all-intl; };
@@ -486,44 +457,18 @@
 dependencies = { module=all-fastjar; on=all-libiberty; };
 
 // Warning, these are not well tested.
-dependencies = { module=all-autoconf; on=all-m4; };
-dependencies = { module=all-autoconf; on=all-build-texinfo; };
-dependencies = { module=all-automake; on=all-m4; };
-dependencies = { module=all-automake; on=all-build-texinfo; };
-dependencies = { module=all-automake; on=all-autoconf; };
 dependencies = { module=all-bison; on=all-intl; };
 dependencies = { module=all-bison; on=all-build-texinfo; };
-dependencies = { module=all-diff; on=all-intl; };
-dependencies = { module=all-diff; on=all-build-texinfo; };
-dependencies = { module=all-fileutils; on=all-intl; };
-dependencies = { module=all-fileutils; on=all-build-texinfo; };
 dependencies = { module=all-flex; on=all-build-bison; };
-dependencies = { module=all-flex; on=all-build-byacc; };
 dependencies = { module=all-flex; on=all-intl; };
 dependencies = { module=all-flex; on=all-m4; };
 dependencies = { module=all-flex; on=all-build-texinfo; };
-dependencies = { module=all-gzip; on=all-intl; };
-dependencies = { module=all-gzip; on=all-zlib; };
-dependencies = { module=all-gzip; on=all-build-texinfo; };
-dependencies = { module=all-hello; on=all-intl; };
-dependencies = { module=all-hello; on=all-build-texinfo; };
 dependencies = { module=all-m4; on=all-intl; };
 dependencies = { module=all-m4; on=all-build-texinfo; };
-dependencies = { module=all-make; on=all-intl; };
-dependencies = { module=all-make; on=all-build-texinfo; };
-dependencies = { module=all-patch; on=all-build-texinfo; };
-dependencies = { module=all-make; on=all-build-texinfo; };
-dependencies = { module=all-prms; on=all-libiberty; };
-dependencies = { module=all-recode; on=all-build-texinfo; };
-dependencies = { module=all-sed; on=all-build-texinfo; };
-dependencies = { module=all-send-pr; on=all-prms; };
-dependencies = { module=all-tar; on=all-build-texinfo; };
-dependencies = { module=all-uudecode; on=all-build-texinfo; };
 
 // Target modules.  These can also have dependencies on the language
 // environment (e.g. on libstdc++).  By default target modules depend
 // on libgcc and newlib/libgloss.
-lang_env_dependencies = { module=gperf; cxx=true; };
 lang_env_dependencies = { module=libjava; cxx=true; };
 lang_env_dependencies = { module=newlib; no_c=true; };
 lang_env_dependencies = { module=libgloss; no_c=true; };
@@ -533,24 +478,21 @@
 // a dependency on libgcc for native targets to configure.
 lang_env_dependencies = { module=libiberty; no_c=true; };
 
-dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
 dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
 dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
 dependencies = { module=all-target-fastjar; on=all-target-zlib; };
-dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
+dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
+dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
+dependencies = { module=all-target-libgo; on=all-target-libffi; };
 dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
 dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
-dependencies = { module=configure-target-libjava; on=configure-target-qthreads; };
 dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
 dependencies = { module=all-target-libjava; on=all-fastjar; };
 dependencies = { module=all-target-libjava; on=all-target-zlib; };
 dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
-dependencies = { module=all-target-libjava; on=all-target-qthreads; };
 dependencies = { module=all-target-libjava; on=all-target-libffi; };
 dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
-dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
 dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
-dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
 // parallel_list.o and parallel_settings.o depend on omp.h, which is
 // generated by the libgomp configure.  Unfortunately, due to the use of
@@ -558,24 +500,22 @@
 dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; };
 
 // Target modules in the 'src' repository.
-lang_env_dependencies = { module=examples; };
 lang_env_dependencies = { module=libtermcap; };
 lang_env_dependencies = { module=rda; };
 lang_env_dependencies = { module=winsup; };
-lang_env_dependencies = { module=qthreads; };
 
 dependencies = { module=all-target-libgloss; on=all-target-newlib; };
-dependencies = { module=all-target-winsup; on=all-target-libiberty; };
 dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
-dependencies = { module=configure-target-libiberty; on=all-binutils; };
-dependencies = { module=configure-target-libiberty; on=all-ld; };
 dependencies = { module=configure-target-newlib; on=all-binutils; };
 dependencies = { module=configure-target-newlib; on=all-ld; };
+dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; };
 
 languages = { language=c;	gcc-check-target=check-gcc; };
-languages = { language=c++;	gcc-check-target=check-c++;
-				lib-check-target=check-target-libstdc++-v3; };
+languages = { language=c++;	gcc-check-target="check-c++ check-c++0x";
+				lib-check-target=check-target-libstdc++-v3;
+				lib-check-target=check-target-libmudflap-c++; };
 languages = { language=fortran;	gcc-check-target=check-fortran;
+				lib-check-target=check-target-libquadmath;
 				lib-check-target=check-target-libgfortran; };
 languages = { language=java;	gcc-check-target=check-java;
 				lib-check-target=check-target-libjava; };
@@ -584,6 +524,8 @@
 languages = { language=objc;	gcc-check-target=check-objc;
 				lib-check-target=check-target-libobjc; };
 languages = { language=obj-c++;	gcc-check-target=check-obj-c++; };
+languages = { language=go;	gcc-check-target=check-go;
+				lib-check-target=check-target-libgo; };
 
 // Toplevel bootstrap
 bootstrap_stage = { id=1 ; };
diff --git a/Makefile.in b/Makefile.in
index aa8fceb..7e4915c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
 #
 # Makefile for directory with subdirs to build.
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
@@ -100,8 +100,6 @@
 tooldir = @tooldir@
 build_tooldir = @build_tooldir@
 
-GDB_NLM_DEPS = 
-
 # This is the name of the environment variable used for the path to
 # the libraries.
 RPATH_ENVVAR = @RPATH_ENVVAR@
@@ -157,6 +155,8 @@
 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+	GOC="$(GOC_FOR_BUILD)"; export GOC; \
+	GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
 	DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
 	LD="$(LD_FOR_BUILD)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
@@ -193,6 +193,7 @@
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
 	GCJ="$(GCJ)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
+	GOC="$(GOC)"; export GOC; \
 	AR="$(AR)"; export AR; \
 	AS="$(AS)"; export AS; \
 	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
@@ -236,10 +237,13 @@
 	CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
 	  -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+	  -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
 	  -I$$s/libstdc++-v3/libsupc++ \
-	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
+	  export CXX; \
 	CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD;
 @endif target-libstdc++-v3-bootstrap
 
@@ -273,6 +277,7 @@
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
+	GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
 	DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
 	LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
@@ -314,11 +319,13 @@
 HOST_LIBELFLIBS = @libelflibs@
 HOST_LIBELFINC = @libelfinc@
 
+EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
 
-SHELL = @config_shell@
+SHELL = @SHELL@
 
 # pwd command to use.  Allow user to override default by setting PWDCMD in
 # the environment to account for automounters.  The make variable must not
@@ -339,6 +346,7 @@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
 GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
+GOC_FOR_BUILD = @GOC_FOR_BUILD@
 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
 LD_FOR_BUILD = @LD_FOR_BUILD@
 NM_FOR_BUILD = @NM_FOR_BUILD@
@@ -401,6 +409,7 @@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+GOCFLAGS = $(CFLAGS)
 
 TFLAGS =
 
@@ -409,6 +418,7 @@
 STAGE_CFLAGS = $(BOOT_CFLAGS)
 STAGE_TFLAGS = $(TFLAGS)
 STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
+POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@
 
 
 # Defaults for stage 1; some are overridden below.
@@ -419,7 +429,10 @@
 STAGE1_CXXFLAGS = $(STAGE1_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGE1_TFLAGS = $(STAGE_TFLAGS)
-STAGE1_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE1_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 # Defaults for stage 2; some are overridden below.
 STAGE2_CFLAGS = $(STAGE_CFLAGS)
@@ -429,7 +442,10 @@
 STAGE2_CXXFLAGS = $(STAGE2_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGE2_TFLAGS = $(STAGE_TFLAGS)
-STAGE2_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE2_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 # Defaults for stage 3; some are overridden below.
 STAGE3_CFLAGS = $(STAGE_CFLAGS)
@@ -439,7 +455,10 @@
 STAGE3_CXXFLAGS = $(STAGE3_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGE3_TFLAGS = $(STAGE_TFLAGS)
-STAGE3_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE3_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 # Defaults for stage 4; some are overridden below.
 STAGE4_CFLAGS = $(STAGE_CFLAGS)
@@ -449,7 +468,10 @@
 STAGE4_CXXFLAGS = $(STAGE4_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGE4_TFLAGS = $(STAGE_TFLAGS)
-STAGE4_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE4_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 # Defaults for stage profile; some are overridden below.
 STAGEprofile_CFLAGS = $(STAGE_CFLAGS)
@@ -459,7 +481,10 @@
 STAGEprofile_CXXFLAGS = $(STAGEprofile_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGEprofile_TFLAGS = $(STAGE_TFLAGS)
-STAGEprofile_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGEprofile_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 # Defaults for stage feedback; some are overridden below.
 STAGEfeedback_CFLAGS = $(STAGE_CFLAGS)
@@ -469,7 +494,10 @@
 STAGEfeedback_CXXFLAGS = $(STAGEfeedback_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGEfeedback_TFLAGS = $(STAGE_TFLAGS)
-STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGEfeedback_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 
 
 # Only build the C compiler for stage1, because that is the only one that
@@ -487,6 +515,9 @@
 #   the last argument when conflicting --enable arguments are passed.
 # * Likewise, we force-disable coverage flags, since the installed
 #   compiler probably has never heard of them.
+# * Don't remove this, because above we added
+#   POSTSTAGE1_CONFIGURE_FLAGS to STAGE_CONFIGURE_FLAGS, which
+#   we don't want for STAGE1_CONFIGURE_FLAGS.
 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
 	  --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
 
@@ -516,6 +547,7 @@
 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
+GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
 LD_FOR_TARGET=@LD_FOR_TARGET@
 
@@ -536,7 +568,8 @@
 
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET = 
+LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
+GOCFLAGS_FOR_TARGET = -O2 -g
 
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
@@ -622,6 +655,26 @@
 @endif libelf
 
 
+CXX_FOR_TARGET_FLAG_TO_PASS = \
+	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"
+@if target-libstdc++-v3
+# CXX_FOR_TARGET is tricky to get right for target libs that require a
+# functional C++ compiler.  When we recurse, if we expand
+# CXX_FOR_TARGET before configuring libstdc++-v3, we won't get
+# libstdc++ include flags from the script.  Instead, we get an
+# -funconfigured-* word, so that we'll get errors if this invalid C++
+# command line is used for anything, but also so that we can use the
+# word to decide whether or not to pass on this CXX_FOR_TARGET.  If we
+# don't pass it on, sub-make will use the default definition, that
+# re-expands it at the time of use, so we'll get it right when we need
+# it.  One potential exception is the expansion of CXX_FOR_TARGET
+# passed down as part of CXX within TARGET_FLAGS, but this wouldn't
+# really work, for C++ host programs can't depend on the current-stage
+# C++ target library.
+CXX_FOR_TARGET_FLAG_TO_PASS = \
+	$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
+@endif target-libstdc++-v3
+
 # Flags to pass down to all sub-makes.
 BASE_FLAGS_TO_PASS = \
 	"DESTDIR=$(DESTDIR)" \
@@ -689,12 +742,13 @@
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
 	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
 	"CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
-	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
 	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
 	"FLAGS_FOR_TARGET=$(FLAGS_FOR_TARGET)" \
 	"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
 	"GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
+	"GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
+	"GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
 	"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
 	"LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
 	"LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
@@ -727,6 +781,7 @@
 	"STAGEfeedback_CFLAGS=$(STAGEfeedback_CFLAGS)" \
 	"STAGEfeedback_CXXFLAGS=$(STAGEfeedback_CXXFLAGS)" \
 	"STAGEfeedback_TFLAGS=$(STAGEfeedback_TFLAGS)" \
+	$(CXX_FOR_TARGET_FLAG_TO_PASS) \
 	"TFLAGS=$(TFLAGS)" \
 	"CONFIG_SHELL=$(SHELL)" \
 	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 
@@ -744,6 +799,7 @@
 	'DLLTOOL=$(DLLTOOL)' \
 	'GCJ=$(GCJ)' \
 	'GFORTRAN=$(GFORTRAN)' \
+	'GOC=$(GOC)' \
 	'LD=$(LD)' \
 	'LIPO=$(LIPO)' \
 	'NM=$(NM)' \
@@ -755,18 +811,6 @@
 
 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
 
-# Flags that are concerned with the location of the X11 include files
-# and library files
-#
-# NOTE: until the top-level is getting the values via autoconf, it only
-# causes problems to have this top-level Makefile overriding the autoconf-set
-# values in child directories.  Only variables that don't conflict with
-# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
-#
-X11_FLAGS_TO_PASS = \
-	'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
-	'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
-
 # Flags to pass to stage2 and later makes.
 
 POSTSTAGE1_FLAGS_TO_PASS = \
@@ -792,6 +836,8 @@
 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
 	'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
 	'LD=$(COMPILER_LD_FOR_TARGET)' \
 	'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
 	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
@@ -831,43 +877,26 @@
 
 .PHONY: configure-host
 configure-host:  \
-    maybe-configure-ash \
-    maybe-configure-autoconf \
-    maybe-configure-automake \
-    maybe-configure-bash \
     maybe-configure-bfd \
     maybe-configure-opcodes \
     maybe-configure-binutils \
     maybe-configure-bison \
-    maybe-configure-byacc \
-    maybe-configure-bzip2 \
     maybe-configure-cgen \
     maybe-configure-dejagnu \
-    maybe-configure-diff \
-    maybe-configure-dosutils \
     maybe-configure-etc \
     maybe-configure-fastjar \
-    maybe-configure-fileutils \
-    maybe-configure-findutils \
-    maybe-configure-find \
     maybe-configure-fixincludes \
     maybe-configure-flex \
     maybe-configure-gas \
     maybe-configure-gcc \
-    maybe-configure-gawk \
-    maybe-configure-gettext \
     maybe-configure-gmp \
     maybe-configure-mpfr \
     maybe-configure-mpc \
     maybe-configure-ppl \
     maybe-configure-cloog \
     maybe-configure-libelf \
-    maybe-configure-gnuserv \
     maybe-configure-gold \
     maybe-configure-gprof \
-    maybe-configure-gzip \
-    maybe-configure-hello \
-    maybe-configure-indent \
     maybe-configure-intl \
     maybe-configure-tcl \
     maybe-configure-itcl \
@@ -877,29 +906,11 @@
     maybe-configure-libgui \
     maybe-configure-libiberty \
     maybe-configure-libiconv \
-    maybe-configure-libtool \
     maybe-configure-m4 \
-    maybe-configure-make \
-    maybe-configure-mmalloc \
-    maybe-configure-patch \
-    maybe-configure-perl \
-    maybe-configure-prms \
-    maybe-configure-rcs \
     maybe-configure-readline \
-    maybe-configure-release \
-    maybe-configure-recode \
-    maybe-configure-sed \
-    maybe-configure-send-pr \
-    maybe-configure-shellutils \
     maybe-configure-sid \
     maybe-configure-sim \
-    maybe-configure-tar \
     maybe-configure-texinfo \
-    maybe-configure-textutils \
-    maybe-configure-time \
-    maybe-configure-uudecode \
-    maybe-configure-wdiff \
-    maybe-configure-zip \
     maybe-configure-zlib \
     maybe-configure-gdb \
     maybe-configure-expect \
@@ -916,19 +927,17 @@
     maybe-configure-target-libssp \
     maybe-configure-target-newlib \
     maybe-configure-target-libgcc \
+    maybe-configure-target-libquadmath \
     maybe-configure-target-libgfortran \
     maybe-configure-target-libobjc \
+    maybe-configure-target-libgo \
     maybe-configure-target-libtermcap \
     maybe-configure-target-winsup \
     maybe-configure-target-libgloss \
-    maybe-configure-target-libiberty \
-    maybe-configure-target-gperf \
-    maybe-configure-target-examples \
     maybe-configure-target-libffi \
     maybe-configure-target-libjava \
     maybe-configure-target-zlib \
     maybe-configure-target-boehm-gc \
-    maybe-configure-target-qthreads \
     maybe-configure-target-rda \
     maybe-configure-target-libada \
     maybe-configure-target-libgomp
@@ -962,7 +971,6 @@
 
 all-build: maybe-all-build-libiberty
 all-build: maybe-all-build-bison
-all-build: maybe-all-build-byacc
 all-build: maybe-all-build-flex
 all-build: maybe-all-build-m4
 all-build: maybe-all-build-texinfo
@@ -970,10 +978,6 @@
 
 .PHONY: all-host
 
-all-host: maybe-all-ash
-all-host: maybe-all-autoconf
-all-host: maybe-all-automake
-all-host: maybe-all-bash
 @if bfd-no-bootstrap
 all-host: maybe-all-bfd
 @endif bfd-no-bootstrap
@@ -984,17 +988,10 @@
 all-host: maybe-all-binutils
 @endif binutils-no-bootstrap
 all-host: maybe-all-bison
-all-host: maybe-all-byacc
-all-host: maybe-all-bzip2
 all-host: maybe-all-cgen
 all-host: maybe-all-dejagnu
-all-host: maybe-all-diff
-all-host: maybe-all-dosutils
 all-host: maybe-all-etc
 all-host: maybe-all-fastjar
-all-host: maybe-all-fileutils
-all-host: maybe-all-findutils
-all-host: maybe-all-find
 all-host: maybe-all-fixincludes
 all-host: maybe-all-flex
 @if gas-no-bootstrap
@@ -1003,8 +1000,6 @@
 @if gcc-no-bootstrap
 all-host: maybe-all-gcc
 @endif gcc-no-bootstrap
-all-host: maybe-all-gawk
-all-host: maybe-all-gettext
 @if gmp-no-bootstrap
 all-host: maybe-all-gmp
 @endif gmp-no-bootstrap
@@ -1023,14 +1018,10 @@
 @if libelf-no-bootstrap
 all-host: maybe-all-libelf
 @endif libelf-no-bootstrap
-all-host: maybe-all-gnuserv
 @if gold-no-bootstrap
 all-host: maybe-all-gold
 @endif gold-no-bootstrap
 all-host: maybe-all-gprof
-all-host: maybe-all-gzip
-all-host: maybe-all-hello
-all-host: maybe-all-indent
 @if intl-no-bootstrap
 all-host: maybe-all-intl
 @endif intl-no-bootstrap
@@ -1050,29 +1041,11 @@
 all-host: maybe-all-libiberty
 @endif libiberty-no-bootstrap
 all-host: maybe-all-libiconv
-all-host: maybe-all-libtool
 all-host: maybe-all-m4
-all-host: maybe-all-make
-all-host: maybe-all-mmalloc
-all-host: maybe-all-patch
-all-host: maybe-all-perl
-all-host: maybe-all-prms
-all-host: maybe-all-rcs
 all-host: maybe-all-readline
-all-host: maybe-all-release
-all-host: maybe-all-recode
-all-host: maybe-all-sed
-all-host: maybe-all-send-pr
-all-host: maybe-all-shellutils
 all-host: maybe-all-sid
 all-host: maybe-all-sim
-all-host: maybe-all-tar
 all-host: maybe-all-texinfo
-all-host: maybe-all-textutils
-all-host: maybe-all-time
-all-host: maybe-all-uudecode
-all-host: maybe-all-wdiff
-all-host: maybe-all-zip
 @if zlib-no-bootstrap
 all-host: maybe-all-zlib
 @endif zlib-no-bootstrap
@@ -1098,19 +1071,17 @@
 @if target-libgcc-no-bootstrap
 all-target: maybe-all-target-libgcc
 @endif target-libgcc-no-bootstrap
+all-target: maybe-all-target-libquadmath
 all-target: maybe-all-target-libgfortran
 all-target: maybe-all-target-libobjc
+all-target: maybe-all-target-libgo
 all-target: maybe-all-target-libtermcap
 all-target: maybe-all-target-winsup
 all-target: maybe-all-target-libgloss
-all-target: maybe-all-target-libiberty
-all-target: maybe-all-target-gperf
-all-target: maybe-all-target-examples
 all-target: maybe-all-target-libffi
 all-target: maybe-all-target-libjava
 all-target: maybe-all-target-zlib
 all-target: maybe-all-target-boehm-gc
-all-target: maybe-all-target-qthreads
 all-target: maybe-all-target-rda
 all-target: maybe-all-target-libada
 @if target-libgomp-no-bootstrap
@@ -1133,43 +1104,26 @@
 
 .PHONY: info-host
 
-info-host: maybe-info-ash
-info-host: maybe-info-autoconf
-info-host: maybe-info-automake
-info-host: maybe-info-bash
 info-host: maybe-info-bfd
 info-host: maybe-info-opcodes
 info-host: maybe-info-binutils
 info-host: maybe-info-bison
-info-host: maybe-info-byacc
-info-host: maybe-info-bzip2
 info-host: maybe-info-cgen
 info-host: maybe-info-dejagnu
-info-host: maybe-info-diff
-info-host: maybe-info-dosutils
 info-host: maybe-info-etc
 info-host: maybe-info-fastjar
-info-host: maybe-info-fileutils
-info-host: maybe-info-findutils
-info-host: maybe-info-find
 info-host: maybe-info-fixincludes
 info-host: maybe-info-flex
 info-host: maybe-info-gas
 info-host: maybe-info-gcc
-info-host: maybe-info-gawk
-info-host: maybe-info-gettext
 info-host: maybe-info-gmp
 info-host: maybe-info-mpfr
 info-host: maybe-info-mpc
 info-host: maybe-info-ppl
 info-host: maybe-info-cloog
 info-host: maybe-info-libelf
-info-host: maybe-info-gnuserv
 info-host: maybe-info-gold
 info-host: maybe-info-gprof
-info-host: maybe-info-gzip
-info-host: maybe-info-hello
-info-host: maybe-info-indent
 info-host: maybe-info-intl
 info-host: maybe-info-tcl
 info-host: maybe-info-itcl
@@ -1179,29 +1133,11 @@
 info-host: maybe-info-libgui
 info-host: maybe-info-libiberty
 info-host: maybe-info-libiconv
-info-host: maybe-info-libtool
 info-host: maybe-info-m4
-info-host: maybe-info-make
-info-host: maybe-info-mmalloc
-info-host: maybe-info-patch
-info-host: maybe-info-perl
-info-host: maybe-info-prms
-info-host: maybe-info-rcs
 info-host: maybe-info-readline
-info-host: maybe-info-release
-info-host: maybe-info-recode
-info-host: maybe-info-sed
-info-host: maybe-info-send-pr
-info-host: maybe-info-shellutils
 info-host: maybe-info-sid
 info-host: maybe-info-sim
-info-host: maybe-info-tar
 info-host: maybe-info-texinfo
-info-host: maybe-info-textutils
-info-host: maybe-info-time
-info-host: maybe-info-uudecode
-info-host: maybe-info-wdiff
-info-host: maybe-info-zip
 info-host: maybe-info-zlib
 info-host: maybe-info-gdb
 info-host: maybe-info-expect
@@ -1219,19 +1155,17 @@
 info-target: maybe-info-target-libssp
 info-target: maybe-info-target-newlib
 info-target: maybe-info-target-libgcc
+info-target: maybe-info-target-libquadmath
 info-target: maybe-info-target-libgfortran
 info-target: maybe-info-target-libobjc
+info-target: maybe-info-target-libgo
 info-target: maybe-info-target-libtermcap
 info-target: maybe-info-target-winsup
 info-target: maybe-info-target-libgloss
-info-target: maybe-info-target-libiberty
-info-target: maybe-info-target-gperf
-info-target: maybe-info-target-examples
 info-target: maybe-info-target-libffi
 info-target: maybe-info-target-libjava
 info-target: maybe-info-target-zlib
 info-target: maybe-info-target-boehm-gc
-info-target: maybe-info-target-qthreads
 info-target: maybe-info-target-rda
 info-target: maybe-info-target-libada
 info-target: maybe-info-target-libgomp
@@ -1247,43 +1181,26 @@
 
 .PHONY: dvi-host
 
-dvi-host: maybe-dvi-ash
-dvi-host: maybe-dvi-autoconf
-dvi-host: maybe-dvi-automake
-dvi-host: maybe-dvi-bash
 dvi-host: maybe-dvi-bfd
 dvi-host: maybe-dvi-opcodes
 dvi-host: maybe-dvi-binutils
 dvi-host: maybe-dvi-bison
-dvi-host: maybe-dvi-byacc
-dvi-host: maybe-dvi-bzip2
 dvi-host: maybe-dvi-cgen
 dvi-host: maybe-dvi-dejagnu
-dvi-host: maybe-dvi-diff
-dvi-host: maybe-dvi-dosutils
 dvi-host: maybe-dvi-etc
 dvi-host: maybe-dvi-fastjar
-dvi-host: maybe-dvi-fileutils
-dvi-host: maybe-dvi-findutils
-dvi-host: maybe-dvi-find
 dvi-host: maybe-dvi-fixincludes
 dvi-host: maybe-dvi-flex
 dvi-host: maybe-dvi-gas
 dvi-host: maybe-dvi-gcc
-dvi-host: maybe-dvi-gawk
-dvi-host: maybe-dvi-gettext
 dvi-host: maybe-dvi-gmp
 dvi-host: maybe-dvi-mpfr
 dvi-host: maybe-dvi-mpc
 dvi-host: maybe-dvi-ppl
 dvi-host: maybe-dvi-cloog
 dvi-host: maybe-dvi-libelf
-dvi-host: maybe-dvi-gnuserv
 dvi-host: maybe-dvi-gold
 dvi-host: maybe-dvi-gprof
-dvi-host: maybe-dvi-gzip
-dvi-host: maybe-dvi-hello
-dvi-host: maybe-dvi-indent
 dvi-host: maybe-dvi-intl
 dvi-host: maybe-dvi-tcl
 dvi-host: maybe-dvi-itcl
@@ -1293,29 +1210,11 @@
 dvi-host: maybe-dvi-libgui
 dvi-host: maybe-dvi-libiberty
 dvi-host: maybe-dvi-libiconv
-dvi-host: maybe-dvi-libtool
 dvi-host: maybe-dvi-m4
-dvi-host: maybe-dvi-make
-dvi-host: maybe-dvi-mmalloc
-dvi-host: maybe-dvi-patch
-dvi-host: maybe-dvi-perl
-dvi-host: maybe-dvi-prms
-dvi-host: maybe-dvi-rcs
 dvi-host: maybe-dvi-readline
-dvi-host: maybe-dvi-release
-dvi-host: maybe-dvi-recode
-dvi-host: maybe-dvi-sed
-dvi-host: maybe-dvi-send-pr
-dvi-host: maybe-dvi-shellutils
 dvi-host: maybe-dvi-sid
 dvi-host: maybe-dvi-sim
-dvi-host: maybe-dvi-tar
 dvi-host: maybe-dvi-texinfo
-dvi-host: maybe-dvi-textutils
-dvi-host: maybe-dvi-time
-dvi-host: maybe-dvi-uudecode
-dvi-host: maybe-dvi-wdiff
-dvi-host: maybe-dvi-zip
 dvi-host: maybe-dvi-zlib
 dvi-host: maybe-dvi-gdb
 dvi-host: maybe-dvi-expect
@@ -1333,19 +1232,17 @@
 dvi-target: maybe-dvi-target-libssp
 dvi-target: maybe-dvi-target-newlib
 dvi-target: maybe-dvi-target-libgcc
+dvi-target: maybe-dvi-target-libquadmath
 dvi-target: maybe-dvi-target-libgfortran
 dvi-target: maybe-dvi-target-libobjc
+dvi-target: maybe-dvi-target-libgo
 dvi-target: maybe-dvi-target-libtermcap
 dvi-target: maybe-dvi-target-winsup
 dvi-target: maybe-dvi-target-libgloss
-dvi-target: maybe-dvi-target-libiberty
-dvi-target: maybe-dvi-target-gperf
-dvi-target: maybe-dvi-target-examples
 dvi-target: maybe-dvi-target-libffi
 dvi-target: maybe-dvi-target-libjava
 dvi-target: maybe-dvi-target-zlib
 dvi-target: maybe-dvi-target-boehm-gc
-dvi-target: maybe-dvi-target-qthreads
 dvi-target: maybe-dvi-target-rda
 dvi-target: maybe-dvi-target-libada
 dvi-target: maybe-dvi-target-libgomp
@@ -1361,43 +1258,26 @@
 
 .PHONY: pdf-host
 
-pdf-host: maybe-pdf-ash
-pdf-host: maybe-pdf-autoconf
-pdf-host: maybe-pdf-automake
-pdf-host: maybe-pdf-bash
 pdf-host: maybe-pdf-bfd
 pdf-host: maybe-pdf-opcodes
 pdf-host: maybe-pdf-binutils
 pdf-host: maybe-pdf-bison
-pdf-host: maybe-pdf-byacc
-pdf-host: maybe-pdf-bzip2
 pdf-host: maybe-pdf-cgen
 pdf-host: maybe-pdf-dejagnu
-pdf-host: maybe-pdf-diff
-pdf-host: maybe-pdf-dosutils
 pdf-host: maybe-pdf-etc
 pdf-host: maybe-pdf-fastjar
-pdf-host: maybe-pdf-fileutils
-pdf-host: maybe-pdf-findutils
-pdf-host: maybe-pdf-find
 pdf-host: maybe-pdf-fixincludes
 pdf-host: maybe-pdf-flex
 pdf-host: maybe-pdf-gas
 pdf-host: maybe-pdf-gcc
-pdf-host: maybe-pdf-gawk
-pdf-host: maybe-pdf-gettext
 pdf-host: maybe-pdf-gmp
 pdf-host: maybe-pdf-mpfr
 pdf-host: maybe-pdf-mpc
 pdf-host: maybe-pdf-ppl
 pdf-host: maybe-pdf-cloog
 pdf-host: maybe-pdf-libelf
-pdf-host: maybe-pdf-gnuserv
 pdf-host: maybe-pdf-gold
 pdf-host: maybe-pdf-gprof
-pdf-host: maybe-pdf-gzip
-pdf-host: maybe-pdf-hello
-pdf-host: maybe-pdf-indent
 pdf-host: maybe-pdf-intl
 pdf-host: maybe-pdf-tcl
 pdf-host: maybe-pdf-itcl
@@ -1407,29 +1287,11 @@
 pdf-host: maybe-pdf-libgui
 pdf-host: maybe-pdf-libiberty
 pdf-host: maybe-pdf-libiconv
-pdf-host: maybe-pdf-libtool
 pdf-host: maybe-pdf-m4
-pdf-host: maybe-pdf-make
-pdf-host: maybe-pdf-mmalloc
-pdf-host: maybe-pdf-patch
-pdf-host: maybe-pdf-perl
-pdf-host: maybe-pdf-prms
-pdf-host: maybe-pdf-rcs
 pdf-host: maybe-pdf-readline
-pdf-host: maybe-pdf-release
-pdf-host: maybe-pdf-recode
-pdf-host: maybe-pdf-sed
-pdf-host: maybe-pdf-send-pr
-pdf-host: maybe-pdf-shellutils
 pdf-host: maybe-pdf-sid
 pdf-host: maybe-pdf-sim
-pdf-host: maybe-pdf-tar
 pdf-host: maybe-pdf-texinfo
-pdf-host: maybe-pdf-textutils
-pdf-host: maybe-pdf-time
-pdf-host: maybe-pdf-uudecode
-pdf-host: maybe-pdf-wdiff
-pdf-host: maybe-pdf-zip
 pdf-host: maybe-pdf-zlib
 pdf-host: maybe-pdf-gdb
 pdf-host: maybe-pdf-expect
@@ -1447,19 +1309,17 @@
 pdf-target: maybe-pdf-target-libssp
 pdf-target: maybe-pdf-target-newlib
 pdf-target: maybe-pdf-target-libgcc
+pdf-target: maybe-pdf-target-libquadmath
 pdf-target: maybe-pdf-target-libgfortran
 pdf-target: maybe-pdf-target-libobjc
+pdf-target: maybe-pdf-target-libgo
 pdf-target: maybe-pdf-target-libtermcap
 pdf-target: maybe-pdf-target-winsup
 pdf-target: maybe-pdf-target-libgloss
-pdf-target: maybe-pdf-target-libiberty
-pdf-target: maybe-pdf-target-gperf
-pdf-target: maybe-pdf-target-examples
 pdf-target: maybe-pdf-target-libffi
 pdf-target: maybe-pdf-target-libjava
 pdf-target: maybe-pdf-target-zlib
 pdf-target: maybe-pdf-target-boehm-gc
-pdf-target: maybe-pdf-target-qthreads
 pdf-target: maybe-pdf-target-rda
 pdf-target: maybe-pdf-target-libada
 pdf-target: maybe-pdf-target-libgomp
@@ -1475,43 +1335,26 @@
 
 .PHONY: html-host
 
-html-host: maybe-html-ash
-html-host: maybe-html-autoconf
-html-host: maybe-html-automake
-html-host: maybe-html-bash
 html-host: maybe-html-bfd
 html-host: maybe-html-opcodes
 html-host: maybe-html-binutils
 html-host: maybe-html-bison
-html-host: maybe-html-byacc
-html-host: maybe-html-bzip2
 html-host: maybe-html-cgen
 html-host: maybe-html-dejagnu
-html-host: maybe-html-diff
-html-host: maybe-html-dosutils
 html-host: maybe-html-etc
 html-host: maybe-html-fastjar
-html-host: maybe-html-fileutils
-html-host: maybe-html-findutils
-html-host: maybe-html-find
 html-host: maybe-html-fixincludes
 html-host: maybe-html-flex
 html-host: maybe-html-gas
 html-host: maybe-html-gcc
-html-host: maybe-html-gawk
-html-host: maybe-html-gettext
 html-host: maybe-html-gmp
 html-host: maybe-html-mpfr
 html-host: maybe-html-mpc
 html-host: maybe-html-ppl
 html-host: maybe-html-cloog
 html-host: maybe-html-libelf
-html-host: maybe-html-gnuserv
 html-host: maybe-html-gold
 html-host: maybe-html-gprof
-html-host: maybe-html-gzip
-html-host: maybe-html-hello
-html-host: maybe-html-indent
 html-host: maybe-html-intl
 html-host: maybe-html-tcl
 html-host: maybe-html-itcl
@@ -1521,29 +1364,11 @@
 html-host: maybe-html-libgui
 html-host: maybe-html-libiberty
 html-host: maybe-html-libiconv
-html-host: maybe-html-libtool
 html-host: maybe-html-m4
-html-host: maybe-html-make
-html-host: maybe-html-mmalloc
-html-host: maybe-html-patch
-html-host: maybe-html-perl
-html-host: maybe-html-prms
-html-host: maybe-html-rcs
 html-host: maybe-html-readline
-html-host: maybe-html-release
-html-host: maybe-html-recode
-html-host: maybe-html-sed
-html-host: maybe-html-send-pr
-html-host: maybe-html-shellutils
 html-host: maybe-html-sid
 html-host: maybe-html-sim
-html-host: maybe-html-tar
 html-host: maybe-html-texinfo
-html-host: maybe-html-textutils
-html-host: maybe-html-time
-html-host: maybe-html-uudecode
-html-host: maybe-html-wdiff
-html-host: maybe-html-zip
 html-host: maybe-html-zlib
 html-host: maybe-html-gdb
 html-host: maybe-html-expect
@@ -1561,19 +1386,17 @@
 html-target: maybe-html-target-libssp
 html-target: maybe-html-target-newlib
 html-target: maybe-html-target-libgcc
+html-target: maybe-html-target-libquadmath
 html-target: maybe-html-target-libgfortran
 html-target: maybe-html-target-libobjc
+html-target: maybe-html-target-libgo
 html-target: maybe-html-target-libtermcap
 html-target: maybe-html-target-winsup
 html-target: maybe-html-target-libgloss
-html-target: maybe-html-target-libiberty
-html-target: maybe-html-target-gperf
-html-target: maybe-html-target-examples
 html-target: maybe-html-target-libffi
 html-target: maybe-html-target-libjava
 html-target: maybe-html-target-zlib
 html-target: maybe-html-target-boehm-gc
-html-target: maybe-html-target-qthreads
 html-target: maybe-html-target-rda
 html-target: maybe-html-target-libada
 html-target: maybe-html-target-libgomp
@@ -1589,43 +1412,26 @@
 
 .PHONY: TAGS-host
 
-TAGS-host: maybe-TAGS-ash
-TAGS-host: maybe-TAGS-autoconf
-TAGS-host: maybe-TAGS-automake
-TAGS-host: maybe-TAGS-bash
 TAGS-host: maybe-TAGS-bfd
 TAGS-host: maybe-TAGS-opcodes
 TAGS-host: maybe-TAGS-binutils
 TAGS-host: maybe-TAGS-bison
-TAGS-host: maybe-TAGS-byacc
-TAGS-host: maybe-TAGS-bzip2
 TAGS-host: maybe-TAGS-cgen
 TAGS-host: maybe-TAGS-dejagnu
-TAGS-host: maybe-TAGS-diff
-TAGS-host: maybe-TAGS-dosutils
 TAGS-host: maybe-TAGS-etc
 TAGS-host: maybe-TAGS-fastjar
-TAGS-host: maybe-TAGS-fileutils
-TAGS-host: maybe-TAGS-findutils
-TAGS-host: maybe-TAGS-find
 TAGS-host: maybe-TAGS-fixincludes
 TAGS-host: maybe-TAGS-flex
 TAGS-host: maybe-TAGS-gas
 TAGS-host: maybe-TAGS-gcc
-TAGS-host: maybe-TAGS-gawk
-TAGS-host: maybe-TAGS-gettext
 TAGS-host: maybe-TAGS-gmp
 TAGS-host: maybe-TAGS-mpfr
 TAGS-host: maybe-TAGS-mpc
 TAGS-host: maybe-TAGS-ppl
 TAGS-host: maybe-TAGS-cloog
 TAGS-host: maybe-TAGS-libelf
-TAGS-host: maybe-TAGS-gnuserv
 TAGS-host: maybe-TAGS-gold
 TAGS-host: maybe-TAGS-gprof
-TAGS-host: maybe-TAGS-gzip
-TAGS-host: maybe-TAGS-hello
-TAGS-host: maybe-TAGS-indent
 TAGS-host: maybe-TAGS-intl
 TAGS-host: maybe-TAGS-tcl
 TAGS-host: maybe-TAGS-itcl
@@ -1635,29 +1441,11 @@
 TAGS-host: maybe-TAGS-libgui
 TAGS-host: maybe-TAGS-libiberty
 TAGS-host: maybe-TAGS-libiconv
-TAGS-host: maybe-TAGS-libtool
 TAGS-host: maybe-TAGS-m4
-TAGS-host: maybe-TAGS-make
-TAGS-host: maybe-TAGS-mmalloc
-TAGS-host: maybe-TAGS-patch
-TAGS-host: maybe-TAGS-perl
-TAGS-host: maybe-TAGS-prms
-TAGS-host: maybe-TAGS-rcs
 TAGS-host: maybe-TAGS-readline
-TAGS-host: maybe-TAGS-release
-TAGS-host: maybe-TAGS-recode
-TAGS-host: maybe-TAGS-sed
-TAGS-host: maybe-TAGS-send-pr
-TAGS-host: maybe-TAGS-shellutils
 TAGS-host: maybe-TAGS-sid
 TAGS-host: maybe-TAGS-sim
-TAGS-host: maybe-TAGS-tar
 TAGS-host: maybe-TAGS-texinfo
-TAGS-host: maybe-TAGS-textutils
-TAGS-host: maybe-TAGS-time
-TAGS-host: maybe-TAGS-uudecode
-TAGS-host: maybe-TAGS-wdiff
-TAGS-host: maybe-TAGS-zip
 TAGS-host: maybe-TAGS-zlib
 TAGS-host: maybe-TAGS-gdb
 TAGS-host: maybe-TAGS-expect
@@ -1675,19 +1463,17 @@
 TAGS-target: maybe-TAGS-target-libssp
 TAGS-target: maybe-TAGS-target-newlib
 TAGS-target: maybe-TAGS-target-libgcc
+TAGS-target: maybe-TAGS-target-libquadmath
 TAGS-target: maybe-TAGS-target-libgfortran
 TAGS-target: maybe-TAGS-target-libobjc
+TAGS-target: maybe-TAGS-target-libgo
 TAGS-target: maybe-TAGS-target-libtermcap
 TAGS-target: maybe-TAGS-target-winsup
 TAGS-target: maybe-TAGS-target-libgloss
-TAGS-target: maybe-TAGS-target-libiberty
-TAGS-target: maybe-TAGS-target-gperf
-TAGS-target: maybe-TAGS-target-examples
 TAGS-target: maybe-TAGS-target-libffi
 TAGS-target: maybe-TAGS-target-libjava
 TAGS-target: maybe-TAGS-target-zlib
 TAGS-target: maybe-TAGS-target-boehm-gc
-TAGS-target: maybe-TAGS-target-qthreads
 TAGS-target: maybe-TAGS-target-rda
 TAGS-target: maybe-TAGS-target-libada
 TAGS-target: maybe-TAGS-target-libgomp
@@ -1703,43 +1489,26 @@
 
 .PHONY: install-info-host
 
-install-info-host: maybe-install-info-ash
-install-info-host: maybe-install-info-autoconf
-install-info-host: maybe-install-info-automake
-install-info-host: maybe-install-info-bash
 install-info-host: maybe-install-info-bfd
 install-info-host: maybe-install-info-opcodes
 install-info-host: maybe-install-info-binutils
 install-info-host: maybe-install-info-bison
-install-info-host: maybe-install-info-byacc
-install-info-host: maybe-install-info-bzip2
 install-info-host: maybe-install-info-cgen
 install-info-host: maybe-install-info-dejagnu
-install-info-host: maybe-install-info-diff
-install-info-host: maybe-install-info-dosutils
 install-info-host: maybe-install-info-etc
 install-info-host: maybe-install-info-fastjar
-install-info-host: maybe-install-info-fileutils
-install-info-host: maybe-install-info-findutils
-install-info-host: maybe-install-info-find
 install-info-host: maybe-install-info-fixincludes
 install-info-host: maybe-install-info-flex
 install-info-host: maybe-install-info-gas
 install-info-host: maybe-install-info-gcc
-install-info-host: maybe-install-info-gawk
-install-info-host: maybe-install-info-gettext
 install-info-host: maybe-install-info-gmp
 install-info-host: maybe-install-info-mpfr
 install-info-host: maybe-install-info-mpc
 install-info-host: maybe-install-info-ppl
 install-info-host: maybe-install-info-cloog
 install-info-host: maybe-install-info-libelf
-install-info-host: maybe-install-info-gnuserv
 install-info-host: maybe-install-info-gold
 install-info-host: maybe-install-info-gprof
-install-info-host: maybe-install-info-gzip
-install-info-host: maybe-install-info-hello
-install-info-host: maybe-install-info-indent
 install-info-host: maybe-install-info-intl
 install-info-host: maybe-install-info-tcl
 install-info-host: maybe-install-info-itcl
@@ -1749,29 +1518,11 @@
 install-info-host: maybe-install-info-libgui
 install-info-host: maybe-install-info-libiberty
 install-info-host: maybe-install-info-libiconv
-install-info-host: maybe-install-info-libtool
 install-info-host: maybe-install-info-m4
-install-info-host: maybe-install-info-make
-install-info-host: maybe-install-info-mmalloc
-install-info-host: maybe-install-info-patch
-install-info-host: maybe-install-info-perl
-install-info-host: maybe-install-info-prms
-install-info-host: maybe-install-info-rcs
 install-info-host: maybe-install-info-readline
-install-info-host: maybe-install-info-release
-install-info-host: maybe-install-info-recode
-install-info-host: maybe-install-info-sed
-install-info-host: maybe-install-info-send-pr
-install-info-host: maybe-install-info-shellutils
 install-info-host: maybe-install-info-sid
 install-info-host: maybe-install-info-sim
-install-info-host: maybe-install-info-tar
 install-info-host: maybe-install-info-texinfo
-install-info-host: maybe-install-info-textutils
-install-info-host: maybe-install-info-time
-install-info-host: maybe-install-info-uudecode
-install-info-host: maybe-install-info-wdiff
-install-info-host: maybe-install-info-zip
 install-info-host: maybe-install-info-zlib
 install-info-host: maybe-install-info-gdb
 install-info-host: maybe-install-info-expect
@@ -1789,19 +1540,17 @@
 install-info-target: maybe-install-info-target-libssp
 install-info-target: maybe-install-info-target-newlib
 install-info-target: maybe-install-info-target-libgcc
+install-info-target: maybe-install-info-target-libquadmath
 install-info-target: maybe-install-info-target-libgfortran
 install-info-target: maybe-install-info-target-libobjc
+install-info-target: maybe-install-info-target-libgo
 install-info-target: maybe-install-info-target-libtermcap
 install-info-target: maybe-install-info-target-winsup
 install-info-target: maybe-install-info-target-libgloss
-install-info-target: maybe-install-info-target-libiberty
-install-info-target: maybe-install-info-target-gperf
-install-info-target: maybe-install-info-target-examples
 install-info-target: maybe-install-info-target-libffi
 install-info-target: maybe-install-info-target-libjava
 install-info-target: maybe-install-info-target-zlib
 install-info-target: maybe-install-info-target-boehm-gc
-install-info-target: maybe-install-info-target-qthreads
 install-info-target: maybe-install-info-target-rda
 install-info-target: maybe-install-info-target-libada
 install-info-target: maybe-install-info-target-libgomp
@@ -1817,43 +1566,26 @@
 
 .PHONY: install-pdf-host
 
-install-pdf-host: maybe-install-pdf-ash
-install-pdf-host: maybe-install-pdf-autoconf
-install-pdf-host: maybe-install-pdf-automake
-install-pdf-host: maybe-install-pdf-bash
 install-pdf-host: maybe-install-pdf-bfd
 install-pdf-host: maybe-install-pdf-opcodes
 install-pdf-host: maybe-install-pdf-binutils
 install-pdf-host: maybe-install-pdf-bison
-install-pdf-host: maybe-install-pdf-byacc
-install-pdf-host: maybe-install-pdf-bzip2
 install-pdf-host: maybe-install-pdf-cgen
 install-pdf-host: maybe-install-pdf-dejagnu
-install-pdf-host: maybe-install-pdf-diff
-install-pdf-host: maybe-install-pdf-dosutils
 install-pdf-host: maybe-install-pdf-etc
 install-pdf-host: maybe-install-pdf-fastjar
-install-pdf-host: maybe-install-pdf-fileutils
-install-pdf-host: maybe-install-pdf-findutils
-install-pdf-host: maybe-install-pdf-find
 install-pdf-host: maybe-install-pdf-fixincludes
 install-pdf-host: maybe-install-pdf-flex
 install-pdf-host: maybe-install-pdf-gas
 install-pdf-host: maybe-install-pdf-gcc
-install-pdf-host: maybe-install-pdf-gawk
-install-pdf-host: maybe-install-pdf-gettext
 install-pdf-host: maybe-install-pdf-gmp
 install-pdf-host: maybe-install-pdf-mpfr
 install-pdf-host: maybe-install-pdf-mpc
 install-pdf-host: maybe-install-pdf-ppl
 install-pdf-host: maybe-install-pdf-cloog
 install-pdf-host: maybe-install-pdf-libelf
-install-pdf-host: maybe-install-pdf-gnuserv
 install-pdf-host: maybe-install-pdf-gold
 install-pdf-host: maybe-install-pdf-gprof
-install-pdf-host: maybe-install-pdf-gzip
-install-pdf-host: maybe-install-pdf-hello
-install-pdf-host: maybe-install-pdf-indent
 install-pdf-host: maybe-install-pdf-intl
 install-pdf-host: maybe-install-pdf-tcl
 install-pdf-host: maybe-install-pdf-itcl
@@ -1863,29 +1595,11 @@
 install-pdf-host: maybe-install-pdf-libgui
 install-pdf-host: maybe-install-pdf-libiberty
 install-pdf-host: maybe-install-pdf-libiconv
-install-pdf-host: maybe-install-pdf-libtool
 install-pdf-host: maybe-install-pdf-m4
-install-pdf-host: maybe-install-pdf-make
-install-pdf-host: maybe-install-pdf-mmalloc
-install-pdf-host: maybe-install-pdf-patch
-install-pdf-host: maybe-install-pdf-perl
-install-pdf-host: maybe-install-pdf-prms
-install-pdf-host: maybe-install-pdf-rcs
 install-pdf-host: maybe-install-pdf-readline
-install-pdf-host: maybe-install-pdf-release
-install-pdf-host: maybe-install-pdf-recode
-install-pdf-host: maybe-install-pdf-sed
-install-pdf-host: maybe-install-pdf-send-pr
-install-pdf-host: maybe-install-pdf-shellutils
 install-pdf-host: maybe-install-pdf-sid
 install-pdf-host: maybe-install-pdf-sim
-install-pdf-host: maybe-install-pdf-tar
 install-pdf-host: maybe-install-pdf-texinfo
-install-pdf-host: maybe-install-pdf-textutils
-install-pdf-host: maybe-install-pdf-time
-install-pdf-host: maybe-install-pdf-uudecode
-install-pdf-host: maybe-install-pdf-wdiff
-install-pdf-host: maybe-install-pdf-zip
 install-pdf-host: maybe-install-pdf-zlib
 install-pdf-host: maybe-install-pdf-gdb
 install-pdf-host: maybe-install-pdf-expect
@@ -1903,19 +1617,17 @@
 install-pdf-target: maybe-install-pdf-target-libssp
 install-pdf-target: maybe-install-pdf-target-newlib
 install-pdf-target: maybe-install-pdf-target-libgcc
+install-pdf-target: maybe-install-pdf-target-libquadmath
 install-pdf-target: maybe-install-pdf-target-libgfortran
 install-pdf-target: maybe-install-pdf-target-libobjc
+install-pdf-target: maybe-install-pdf-target-libgo
 install-pdf-target: maybe-install-pdf-target-libtermcap
 install-pdf-target: maybe-install-pdf-target-winsup
 install-pdf-target: maybe-install-pdf-target-libgloss
-install-pdf-target: maybe-install-pdf-target-libiberty
-install-pdf-target: maybe-install-pdf-target-gperf
-install-pdf-target: maybe-install-pdf-target-examples
 install-pdf-target: maybe-install-pdf-target-libffi
 install-pdf-target: maybe-install-pdf-target-libjava
 install-pdf-target: maybe-install-pdf-target-zlib
 install-pdf-target: maybe-install-pdf-target-boehm-gc
-install-pdf-target: maybe-install-pdf-target-qthreads
 install-pdf-target: maybe-install-pdf-target-rda
 install-pdf-target: maybe-install-pdf-target-libada
 install-pdf-target: maybe-install-pdf-target-libgomp
@@ -1931,43 +1643,26 @@
 
 .PHONY: install-html-host
 
-install-html-host: maybe-install-html-ash
-install-html-host: maybe-install-html-autoconf
-install-html-host: maybe-install-html-automake
-install-html-host: maybe-install-html-bash
 install-html-host: maybe-install-html-bfd
 install-html-host: maybe-install-html-opcodes
 install-html-host: maybe-install-html-binutils
 install-html-host: maybe-install-html-bison
-install-html-host: maybe-install-html-byacc
-install-html-host: maybe-install-html-bzip2
 install-html-host: maybe-install-html-cgen
 install-html-host: maybe-install-html-dejagnu
-install-html-host: maybe-install-html-diff
-install-html-host: maybe-install-html-dosutils
 install-html-host: maybe-install-html-etc
 install-html-host: maybe-install-html-fastjar
-install-html-host: maybe-install-html-fileutils
-install-html-host: maybe-install-html-findutils
-install-html-host: maybe-install-html-find
 install-html-host: maybe-install-html-fixincludes
 install-html-host: maybe-install-html-flex
 install-html-host: maybe-install-html-gas
 install-html-host: maybe-install-html-gcc
-install-html-host: maybe-install-html-gawk
-install-html-host: maybe-install-html-gettext
 install-html-host: maybe-install-html-gmp
 install-html-host: maybe-install-html-mpfr
 install-html-host: maybe-install-html-mpc
 install-html-host: maybe-install-html-ppl
 install-html-host: maybe-install-html-cloog
 install-html-host: maybe-install-html-libelf
-install-html-host: maybe-install-html-gnuserv
 install-html-host: maybe-install-html-gold
 install-html-host: maybe-install-html-gprof
-install-html-host: maybe-install-html-gzip
-install-html-host: maybe-install-html-hello
-install-html-host: maybe-install-html-indent
 install-html-host: maybe-install-html-intl
 install-html-host: maybe-install-html-tcl
 install-html-host: maybe-install-html-itcl
@@ -1977,29 +1672,11 @@
 install-html-host: maybe-install-html-libgui
 install-html-host: maybe-install-html-libiberty
 install-html-host: maybe-install-html-libiconv
-install-html-host: maybe-install-html-libtool
 install-html-host: maybe-install-html-m4
-install-html-host: maybe-install-html-make
-install-html-host: maybe-install-html-mmalloc
-install-html-host: maybe-install-html-patch
-install-html-host: maybe-install-html-perl
-install-html-host: maybe-install-html-prms
-install-html-host: maybe-install-html-rcs
 install-html-host: maybe-install-html-readline
-install-html-host: maybe-install-html-release
-install-html-host: maybe-install-html-recode
-install-html-host: maybe-install-html-sed
-install-html-host: maybe-install-html-send-pr
-install-html-host: maybe-install-html-shellutils
 install-html-host: maybe-install-html-sid
 install-html-host: maybe-install-html-sim
-install-html-host: maybe-install-html-tar
 install-html-host: maybe-install-html-texinfo
-install-html-host: maybe-install-html-textutils
-install-html-host: maybe-install-html-time
-install-html-host: maybe-install-html-uudecode
-install-html-host: maybe-install-html-wdiff
-install-html-host: maybe-install-html-zip
 install-html-host: maybe-install-html-zlib
 install-html-host: maybe-install-html-gdb
 install-html-host: maybe-install-html-expect
@@ -2017,19 +1694,17 @@
 install-html-target: maybe-install-html-target-libssp
 install-html-target: maybe-install-html-target-newlib
 install-html-target: maybe-install-html-target-libgcc
+install-html-target: maybe-install-html-target-libquadmath
 install-html-target: maybe-install-html-target-libgfortran
 install-html-target: maybe-install-html-target-libobjc
+install-html-target: maybe-install-html-target-libgo
 install-html-target: maybe-install-html-target-libtermcap
 install-html-target: maybe-install-html-target-winsup
 install-html-target: maybe-install-html-target-libgloss
-install-html-target: maybe-install-html-target-libiberty
-install-html-target: maybe-install-html-target-gperf
-install-html-target: maybe-install-html-target-examples
 install-html-target: maybe-install-html-target-libffi
 install-html-target: maybe-install-html-target-libjava
 install-html-target: maybe-install-html-target-zlib
 install-html-target: maybe-install-html-target-boehm-gc
-install-html-target: maybe-install-html-target-qthreads
 install-html-target: maybe-install-html-target-rda
 install-html-target: maybe-install-html-target-libada
 install-html-target: maybe-install-html-target-libgomp
@@ -2045,43 +1720,26 @@
 
 .PHONY: installcheck-host
 
-installcheck-host: maybe-installcheck-ash
-installcheck-host: maybe-installcheck-autoconf
-installcheck-host: maybe-installcheck-automake
-installcheck-host: maybe-installcheck-bash
 installcheck-host: maybe-installcheck-bfd
 installcheck-host: maybe-installcheck-opcodes
 installcheck-host: maybe-installcheck-binutils
 installcheck-host: maybe-installcheck-bison
-installcheck-host: maybe-installcheck-byacc
-installcheck-host: maybe-installcheck-bzip2
 installcheck-host: maybe-installcheck-cgen
 installcheck-host: maybe-installcheck-dejagnu
-installcheck-host: maybe-installcheck-diff
-installcheck-host: maybe-installcheck-dosutils
 installcheck-host: maybe-installcheck-etc
 installcheck-host: maybe-installcheck-fastjar
-installcheck-host: maybe-installcheck-fileutils
-installcheck-host: maybe-installcheck-findutils
-installcheck-host: maybe-installcheck-find
 installcheck-host: maybe-installcheck-fixincludes
 installcheck-host: maybe-installcheck-flex
 installcheck-host: maybe-installcheck-gas
 installcheck-host: maybe-installcheck-gcc
-installcheck-host: maybe-installcheck-gawk
-installcheck-host: maybe-installcheck-gettext
 installcheck-host: maybe-installcheck-gmp
 installcheck-host: maybe-installcheck-mpfr
 installcheck-host: maybe-installcheck-mpc
 installcheck-host: maybe-installcheck-ppl
 installcheck-host: maybe-installcheck-cloog
 installcheck-host: maybe-installcheck-libelf
-installcheck-host: maybe-installcheck-gnuserv
 installcheck-host: maybe-installcheck-gold
 installcheck-host: maybe-installcheck-gprof
-installcheck-host: maybe-installcheck-gzip
-installcheck-host: maybe-installcheck-hello
-installcheck-host: maybe-installcheck-indent
 installcheck-host: maybe-installcheck-intl
 installcheck-host: maybe-installcheck-tcl
 installcheck-host: maybe-installcheck-itcl
@@ -2091,29 +1749,11 @@
 installcheck-host: maybe-installcheck-libgui
 installcheck-host: maybe-installcheck-libiberty
 installcheck-host: maybe-installcheck-libiconv
-installcheck-host: maybe-installcheck-libtool
 installcheck-host: maybe-installcheck-m4
-installcheck-host: maybe-installcheck-make
-installcheck-host: maybe-installcheck-mmalloc
-installcheck-host: maybe-installcheck-patch
-installcheck-host: maybe-installcheck-perl
-installcheck-host: maybe-installcheck-prms
-installcheck-host: maybe-installcheck-rcs
 installcheck-host: maybe-installcheck-readline
-installcheck-host: maybe-installcheck-release
-installcheck-host: maybe-installcheck-recode
-installcheck-host: maybe-installcheck-sed
-installcheck-host: maybe-installcheck-send-pr
-installcheck-host: maybe-installcheck-shellutils
 installcheck-host: maybe-installcheck-sid
 installcheck-host: maybe-installcheck-sim
-installcheck-host: maybe-installcheck-tar
 installcheck-host: maybe-installcheck-texinfo
-installcheck-host: maybe-installcheck-textutils
-installcheck-host: maybe-installcheck-time
-installcheck-host: maybe-installcheck-uudecode
-installcheck-host: maybe-installcheck-wdiff
-installcheck-host: maybe-installcheck-zip
 installcheck-host: maybe-installcheck-zlib
 installcheck-host: maybe-installcheck-gdb
 installcheck-host: maybe-installcheck-expect
@@ -2131,19 +1771,17 @@
 installcheck-target: maybe-installcheck-target-libssp
 installcheck-target: maybe-installcheck-target-newlib
 installcheck-target: maybe-installcheck-target-libgcc
+installcheck-target: maybe-installcheck-target-libquadmath
 installcheck-target: maybe-installcheck-target-libgfortran
 installcheck-target: maybe-installcheck-target-libobjc
+installcheck-target: maybe-installcheck-target-libgo
 installcheck-target: maybe-installcheck-target-libtermcap
 installcheck-target: maybe-installcheck-target-winsup
 installcheck-target: maybe-installcheck-target-libgloss
-installcheck-target: maybe-installcheck-target-libiberty
-installcheck-target: maybe-installcheck-target-gperf
-installcheck-target: maybe-installcheck-target-examples
 installcheck-target: maybe-installcheck-target-libffi
 installcheck-target: maybe-installcheck-target-libjava
 installcheck-target: maybe-installcheck-target-zlib
 installcheck-target: maybe-installcheck-target-boehm-gc
-installcheck-target: maybe-installcheck-target-qthreads
 installcheck-target: maybe-installcheck-target-rda
 installcheck-target: maybe-installcheck-target-libada
 installcheck-target: maybe-installcheck-target-libgomp
@@ -2159,43 +1797,26 @@
 
 .PHONY: mostlyclean-host
 
-mostlyclean-host: maybe-mostlyclean-ash
-mostlyclean-host: maybe-mostlyclean-autoconf
-mostlyclean-host: maybe-mostlyclean-automake
-mostlyclean-host: maybe-mostlyclean-bash
 mostlyclean-host: maybe-mostlyclean-bfd
 mostlyclean-host: maybe-mostlyclean-opcodes
 mostlyclean-host: maybe-mostlyclean-binutils
 mostlyclean-host: maybe-mostlyclean-bison
-mostlyclean-host: maybe-mostlyclean-byacc
-mostlyclean-host: maybe-mostlyclean-bzip2
 mostlyclean-host: maybe-mostlyclean-cgen
 mostlyclean-host: maybe-mostlyclean-dejagnu
-mostlyclean-host: maybe-mostlyclean-diff
-mostlyclean-host: maybe-mostlyclean-dosutils
 mostlyclean-host: maybe-mostlyclean-etc
 mostlyclean-host: maybe-mostlyclean-fastjar
-mostlyclean-host: maybe-mostlyclean-fileutils
-mostlyclean-host: maybe-mostlyclean-findutils
-mostlyclean-host: maybe-mostlyclean-find
 mostlyclean-host: maybe-mostlyclean-fixincludes
 mostlyclean-host: maybe-mostlyclean-flex
 mostlyclean-host: maybe-mostlyclean-gas
 mostlyclean-host: maybe-mostlyclean-gcc
-mostlyclean-host: maybe-mostlyclean-gawk
-mostlyclean-host: maybe-mostlyclean-gettext
 mostlyclean-host: maybe-mostlyclean-gmp
 mostlyclean-host: maybe-mostlyclean-mpfr
 mostlyclean-host: maybe-mostlyclean-mpc
 mostlyclean-host: maybe-mostlyclean-ppl
 mostlyclean-host: maybe-mostlyclean-cloog
 mostlyclean-host: maybe-mostlyclean-libelf
-mostlyclean-host: maybe-mostlyclean-gnuserv
 mostlyclean-host: maybe-mostlyclean-gold
 mostlyclean-host: maybe-mostlyclean-gprof
-mostlyclean-host: maybe-mostlyclean-gzip
-mostlyclean-host: maybe-mostlyclean-hello
-mostlyclean-host: maybe-mostlyclean-indent
 mostlyclean-host: maybe-mostlyclean-intl
 mostlyclean-host: maybe-mostlyclean-tcl
 mostlyclean-host: maybe-mostlyclean-itcl
@@ -2205,29 +1826,11 @@
 mostlyclean-host: maybe-mostlyclean-libgui
 mostlyclean-host: maybe-mostlyclean-libiberty
 mostlyclean-host: maybe-mostlyclean-libiconv
-mostlyclean-host: maybe-mostlyclean-libtool
 mostlyclean-host: maybe-mostlyclean-m4
-mostlyclean-host: maybe-mostlyclean-make
-mostlyclean-host: maybe-mostlyclean-mmalloc
-mostlyclean-host: maybe-mostlyclean-patch
-mostlyclean-host: maybe-mostlyclean-perl
-mostlyclean-host: maybe-mostlyclean-prms
-mostlyclean-host: maybe-mostlyclean-rcs
 mostlyclean-host: maybe-mostlyclean-readline
-mostlyclean-host: maybe-mostlyclean-release
-mostlyclean-host: maybe-mostlyclean-recode
-mostlyclean-host: maybe-mostlyclean-sed
-mostlyclean-host: maybe-mostlyclean-send-pr
-mostlyclean-host: maybe-mostlyclean-shellutils
 mostlyclean-host: maybe-mostlyclean-sid
 mostlyclean-host: maybe-mostlyclean-sim
-mostlyclean-host: maybe-mostlyclean-tar
 mostlyclean-host: maybe-mostlyclean-texinfo
-mostlyclean-host: maybe-mostlyclean-textutils
-mostlyclean-host: maybe-mostlyclean-time
-mostlyclean-host: maybe-mostlyclean-uudecode
-mostlyclean-host: maybe-mostlyclean-wdiff
-mostlyclean-host: maybe-mostlyclean-zip
 mostlyclean-host: maybe-mostlyclean-zlib
 mostlyclean-host: maybe-mostlyclean-gdb
 mostlyclean-host: maybe-mostlyclean-expect
@@ -2245,19 +1848,17 @@
 mostlyclean-target: maybe-mostlyclean-target-libssp
 mostlyclean-target: maybe-mostlyclean-target-newlib
 mostlyclean-target: maybe-mostlyclean-target-libgcc
+mostlyclean-target: maybe-mostlyclean-target-libquadmath
 mostlyclean-target: maybe-mostlyclean-target-libgfortran
 mostlyclean-target: maybe-mostlyclean-target-libobjc
+mostlyclean-target: maybe-mostlyclean-target-libgo
 mostlyclean-target: maybe-mostlyclean-target-libtermcap
 mostlyclean-target: maybe-mostlyclean-target-winsup
 mostlyclean-target: maybe-mostlyclean-target-libgloss
-mostlyclean-target: maybe-mostlyclean-target-libiberty
-mostlyclean-target: maybe-mostlyclean-target-gperf
-mostlyclean-target: maybe-mostlyclean-target-examples
 mostlyclean-target: maybe-mostlyclean-target-libffi
 mostlyclean-target: maybe-mostlyclean-target-libjava
 mostlyclean-target: maybe-mostlyclean-target-zlib
 mostlyclean-target: maybe-mostlyclean-target-boehm-gc
-mostlyclean-target: maybe-mostlyclean-target-qthreads
 mostlyclean-target: maybe-mostlyclean-target-rda
 mostlyclean-target: maybe-mostlyclean-target-libada
 mostlyclean-target: maybe-mostlyclean-target-libgomp
@@ -2273,43 +1874,26 @@
 
 .PHONY: clean-host
 
-clean-host: maybe-clean-ash
-clean-host: maybe-clean-autoconf
-clean-host: maybe-clean-automake
-clean-host: maybe-clean-bash
 clean-host: maybe-clean-bfd
 clean-host: maybe-clean-opcodes
 clean-host: maybe-clean-binutils
 clean-host: maybe-clean-bison
-clean-host: maybe-clean-byacc
-clean-host: maybe-clean-bzip2
 clean-host: maybe-clean-cgen
 clean-host: maybe-clean-dejagnu
-clean-host: maybe-clean-diff
-clean-host: maybe-clean-dosutils
 clean-host: maybe-clean-etc
 clean-host: maybe-clean-fastjar
-clean-host: maybe-clean-fileutils
-clean-host: maybe-clean-findutils
-clean-host: maybe-clean-find
 clean-host: maybe-clean-fixincludes
 clean-host: maybe-clean-flex
 clean-host: maybe-clean-gas
 clean-host: maybe-clean-gcc
-clean-host: maybe-clean-gawk
-clean-host: maybe-clean-gettext
 clean-host: maybe-clean-gmp
 clean-host: maybe-clean-mpfr
 clean-host: maybe-clean-mpc
 clean-host: maybe-clean-ppl
 clean-host: maybe-clean-cloog
 clean-host: maybe-clean-libelf
-clean-host: maybe-clean-gnuserv
 clean-host: maybe-clean-gold
 clean-host: maybe-clean-gprof
-clean-host: maybe-clean-gzip
-clean-host: maybe-clean-hello
-clean-host: maybe-clean-indent
 clean-host: maybe-clean-intl
 clean-host: maybe-clean-tcl
 clean-host: maybe-clean-itcl
@@ -2319,29 +1903,11 @@
 clean-host: maybe-clean-libgui
 clean-host: maybe-clean-libiberty
 clean-host: maybe-clean-libiconv
-clean-host: maybe-clean-libtool
 clean-host: maybe-clean-m4
-clean-host: maybe-clean-make
-clean-host: maybe-clean-mmalloc
-clean-host: maybe-clean-patch
-clean-host: maybe-clean-perl
-clean-host: maybe-clean-prms
-clean-host: maybe-clean-rcs
 clean-host: maybe-clean-readline
-clean-host: maybe-clean-release
-clean-host: maybe-clean-recode
-clean-host: maybe-clean-sed
-clean-host: maybe-clean-send-pr
-clean-host: maybe-clean-shellutils
 clean-host: maybe-clean-sid
 clean-host: maybe-clean-sim
-clean-host: maybe-clean-tar
 clean-host: maybe-clean-texinfo
-clean-host: maybe-clean-textutils
-clean-host: maybe-clean-time
-clean-host: maybe-clean-uudecode
-clean-host: maybe-clean-wdiff
-clean-host: maybe-clean-zip
 clean-host: maybe-clean-zlib
 clean-host: maybe-clean-gdb
 clean-host: maybe-clean-expect
@@ -2359,19 +1925,17 @@
 clean-target: maybe-clean-target-libssp
 clean-target: maybe-clean-target-newlib
 clean-target: maybe-clean-target-libgcc
+clean-target: maybe-clean-target-libquadmath
 clean-target: maybe-clean-target-libgfortran
 clean-target: maybe-clean-target-libobjc
+clean-target: maybe-clean-target-libgo
 clean-target: maybe-clean-target-libtermcap
 clean-target: maybe-clean-target-winsup
 clean-target: maybe-clean-target-libgloss
-clean-target: maybe-clean-target-libiberty
-clean-target: maybe-clean-target-gperf
-clean-target: maybe-clean-target-examples
 clean-target: maybe-clean-target-libffi
 clean-target: maybe-clean-target-libjava
 clean-target: maybe-clean-target-zlib
 clean-target: maybe-clean-target-boehm-gc
-clean-target: maybe-clean-target-qthreads
 clean-target: maybe-clean-target-rda
 clean-target: maybe-clean-target-libada
 clean-target: maybe-clean-target-libgomp
@@ -2387,43 +1951,26 @@
 
 .PHONY: distclean-host
 
-distclean-host: maybe-distclean-ash
-distclean-host: maybe-distclean-autoconf
-distclean-host: maybe-distclean-automake
-distclean-host: maybe-distclean-bash
 distclean-host: maybe-distclean-bfd
 distclean-host: maybe-distclean-opcodes
 distclean-host: maybe-distclean-binutils
 distclean-host: maybe-distclean-bison
-distclean-host: maybe-distclean-byacc
-distclean-host: maybe-distclean-bzip2
 distclean-host: maybe-distclean-cgen
 distclean-host: maybe-distclean-dejagnu
-distclean-host: maybe-distclean-diff
-distclean-host: maybe-distclean-dosutils
 distclean-host: maybe-distclean-etc
 distclean-host: maybe-distclean-fastjar
-distclean-host: maybe-distclean-fileutils
-distclean-host: maybe-distclean-findutils
-distclean-host: maybe-distclean-find
 distclean-host: maybe-distclean-fixincludes
 distclean-host: maybe-distclean-flex
 distclean-host: maybe-distclean-gas
 distclean-host: maybe-distclean-gcc
-distclean-host: maybe-distclean-gawk
-distclean-host: maybe-distclean-gettext
 distclean-host: maybe-distclean-gmp
 distclean-host: maybe-distclean-mpfr
 distclean-host: maybe-distclean-mpc
 distclean-host: maybe-distclean-ppl
 distclean-host: maybe-distclean-cloog
 distclean-host: maybe-distclean-libelf
-distclean-host: maybe-distclean-gnuserv
 distclean-host: maybe-distclean-gold
 distclean-host: maybe-distclean-gprof
-distclean-host: maybe-distclean-gzip
-distclean-host: maybe-distclean-hello
-distclean-host: maybe-distclean-indent
 distclean-host: maybe-distclean-intl
 distclean-host: maybe-distclean-tcl
 distclean-host: maybe-distclean-itcl
@@ -2433,29 +1980,11 @@
 distclean-host: maybe-distclean-libgui
 distclean-host: maybe-distclean-libiberty
 distclean-host: maybe-distclean-libiconv
-distclean-host: maybe-distclean-libtool
 distclean-host: maybe-distclean-m4
-distclean-host: maybe-distclean-make
-distclean-host: maybe-distclean-mmalloc
-distclean-host: maybe-distclean-patch
-distclean-host: maybe-distclean-perl
-distclean-host: maybe-distclean-prms
-distclean-host: maybe-distclean-rcs
 distclean-host: maybe-distclean-readline
-distclean-host: maybe-distclean-release
-distclean-host: maybe-distclean-recode
-distclean-host: maybe-distclean-sed
-distclean-host: maybe-distclean-send-pr
-distclean-host: maybe-distclean-shellutils
 distclean-host: maybe-distclean-sid
 distclean-host: maybe-distclean-sim
-distclean-host: maybe-distclean-tar
 distclean-host: maybe-distclean-texinfo
-distclean-host: maybe-distclean-textutils
-distclean-host: maybe-distclean-time
-distclean-host: maybe-distclean-uudecode
-distclean-host: maybe-distclean-wdiff
-distclean-host: maybe-distclean-zip
 distclean-host: maybe-distclean-zlib
 distclean-host: maybe-distclean-gdb
 distclean-host: maybe-distclean-expect
@@ -2473,19 +2002,17 @@
 distclean-target: maybe-distclean-target-libssp
 distclean-target: maybe-distclean-target-newlib
 distclean-target: maybe-distclean-target-libgcc
+distclean-target: maybe-distclean-target-libquadmath
 distclean-target: maybe-distclean-target-libgfortran
 distclean-target: maybe-distclean-target-libobjc
+distclean-target: maybe-distclean-target-libgo
 distclean-target: maybe-distclean-target-libtermcap
 distclean-target: maybe-distclean-target-winsup
 distclean-target: maybe-distclean-target-libgloss
-distclean-target: maybe-distclean-target-libiberty
-distclean-target: maybe-distclean-target-gperf
-distclean-target: maybe-distclean-target-examples
 distclean-target: maybe-distclean-target-libffi
 distclean-target: maybe-distclean-target-libjava
 distclean-target: maybe-distclean-target-zlib
 distclean-target: maybe-distclean-target-boehm-gc
-distclean-target: maybe-distclean-target-qthreads
 distclean-target: maybe-distclean-target-rda
 distclean-target: maybe-distclean-target-libada
 distclean-target: maybe-distclean-target-libgomp
@@ -2501,43 +2028,26 @@
 
 .PHONY: maintainer-clean-host
 
-maintainer-clean-host: maybe-maintainer-clean-ash
-maintainer-clean-host: maybe-maintainer-clean-autoconf
-maintainer-clean-host: maybe-maintainer-clean-automake
-maintainer-clean-host: maybe-maintainer-clean-bash
 maintainer-clean-host: maybe-maintainer-clean-bfd
 maintainer-clean-host: maybe-maintainer-clean-opcodes
 maintainer-clean-host: maybe-maintainer-clean-binutils
 maintainer-clean-host: maybe-maintainer-clean-bison
-maintainer-clean-host: maybe-maintainer-clean-byacc
-maintainer-clean-host: maybe-maintainer-clean-bzip2
 maintainer-clean-host: maybe-maintainer-clean-cgen
 maintainer-clean-host: maybe-maintainer-clean-dejagnu
-maintainer-clean-host: maybe-maintainer-clean-diff
-maintainer-clean-host: maybe-maintainer-clean-dosutils
 maintainer-clean-host: maybe-maintainer-clean-etc
 maintainer-clean-host: maybe-maintainer-clean-fastjar
-maintainer-clean-host: maybe-maintainer-clean-fileutils
-maintainer-clean-host: maybe-maintainer-clean-findutils
-maintainer-clean-host: maybe-maintainer-clean-find
 maintainer-clean-host: maybe-maintainer-clean-fixincludes
 maintainer-clean-host: maybe-maintainer-clean-flex
 maintainer-clean-host: maybe-maintainer-clean-gas
 maintainer-clean-host: maybe-maintainer-clean-gcc
-maintainer-clean-host: maybe-maintainer-clean-gawk
-maintainer-clean-host: maybe-maintainer-clean-gettext
 maintainer-clean-host: maybe-maintainer-clean-gmp
 maintainer-clean-host: maybe-maintainer-clean-mpfr
 maintainer-clean-host: maybe-maintainer-clean-mpc
 maintainer-clean-host: maybe-maintainer-clean-ppl
 maintainer-clean-host: maybe-maintainer-clean-cloog
 maintainer-clean-host: maybe-maintainer-clean-libelf
-maintainer-clean-host: maybe-maintainer-clean-gnuserv
 maintainer-clean-host: maybe-maintainer-clean-gold
 maintainer-clean-host: maybe-maintainer-clean-gprof
-maintainer-clean-host: maybe-maintainer-clean-gzip
-maintainer-clean-host: maybe-maintainer-clean-hello
-maintainer-clean-host: maybe-maintainer-clean-indent
 maintainer-clean-host: maybe-maintainer-clean-intl
 maintainer-clean-host: maybe-maintainer-clean-tcl
 maintainer-clean-host: maybe-maintainer-clean-itcl
@@ -2547,29 +2057,11 @@
 maintainer-clean-host: maybe-maintainer-clean-libgui
 maintainer-clean-host: maybe-maintainer-clean-libiberty
 maintainer-clean-host: maybe-maintainer-clean-libiconv
-maintainer-clean-host: maybe-maintainer-clean-libtool
 maintainer-clean-host: maybe-maintainer-clean-m4
-maintainer-clean-host: maybe-maintainer-clean-make
-maintainer-clean-host: maybe-maintainer-clean-mmalloc
-maintainer-clean-host: maybe-maintainer-clean-patch
-maintainer-clean-host: maybe-maintainer-clean-perl
-maintainer-clean-host: maybe-maintainer-clean-prms
-maintainer-clean-host: maybe-maintainer-clean-rcs
 maintainer-clean-host: maybe-maintainer-clean-readline
-maintainer-clean-host: maybe-maintainer-clean-release
-maintainer-clean-host: maybe-maintainer-clean-recode
-maintainer-clean-host: maybe-maintainer-clean-sed
-maintainer-clean-host: maybe-maintainer-clean-send-pr
-maintainer-clean-host: maybe-maintainer-clean-shellutils
 maintainer-clean-host: maybe-maintainer-clean-sid
 maintainer-clean-host: maybe-maintainer-clean-sim
-maintainer-clean-host: maybe-maintainer-clean-tar
 maintainer-clean-host: maybe-maintainer-clean-texinfo
-maintainer-clean-host: maybe-maintainer-clean-textutils
-maintainer-clean-host: maybe-maintainer-clean-time
-maintainer-clean-host: maybe-maintainer-clean-uudecode
-maintainer-clean-host: maybe-maintainer-clean-wdiff
-maintainer-clean-host: maybe-maintainer-clean-zip
 maintainer-clean-host: maybe-maintainer-clean-zlib
 maintainer-clean-host: maybe-maintainer-clean-gdb
 maintainer-clean-host: maybe-maintainer-clean-expect
@@ -2587,19 +2079,17 @@
 maintainer-clean-target: maybe-maintainer-clean-target-libssp
 maintainer-clean-target: maybe-maintainer-clean-target-newlib
 maintainer-clean-target: maybe-maintainer-clean-target-libgcc
+maintainer-clean-target: maybe-maintainer-clean-target-libquadmath
 maintainer-clean-target: maybe-maintainer-clean-target-libgfortran
 maintainer-clean-target: maybe-maintainer-clean-target-libobjc
+maintainer-clean-target: maybe-maintainer-clean-target-libgo
 maintainer-clean-target: maybe-maintainer-clean-target-libtermcap
 maintainer-clean-target: maybe-maintainer-clean-target-winsup
 maintainer-clean-target: maybe-maintainer-clean-target-libgloss
-maintainer-clean-target: maybe-maintainer-clean-target-libiberty
-maintainer-clean-target: maybe-maintainer-clean-target-gperf
-maintainer-clean-target: maybe-maintainer-clean-target-examples
 maintainer-clean-target: maybe-maintainer-clean-target-libffi
 maintainer-clean-target: maybe-maintainer-clean-target-libjava
 maintainer-clean-target: maybe-maintainer-clean-target-zlib
 maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
-maintainer-clean-target: maybe-maintainer-clean-target-qthreads
 maintainer-clean-target: maybe-maintainer-clean-target-rda
 maintainer-clean-target: maybe-maintainer-clean-target-libada
 maintainer-clean-target: maybe-maintainer-clean-target-libgomp
@@ -2670,43 +2160,26 @@
 # Only include modules actually being configured and built.
 .PHONY: check-host
 check-host:  \
-    maybe-check-ash \
-    maybe-check-autoconf \
-    maybe-check-automake \
-    maybe-check-bash \
     maybe-check-bfd \
     maybe-check-opcodes \
     maybe-check-binutils \
     maybe-check-bison \
-    maybe-check-byacc \
-    maybe-check-bzip2 \
     maybe-check-cgen \
     maybe-check-dejagnu \
-    maybe-check-diff \
-    maybe-check-dosutils \
     maybe-check-etc \
     maybe-check-fastjar \
-    maybe-check-fileutils \
-    maybe-check-findutils \
-    maybe-check-find \
     maybe-check-fixincludes \
     maybe-check-flex \
     maybe-check-gas \
     maybe-check-gcc \
-    maybe-check-gawk \
-    maybe-check-gettext \
     maybe-check-gmp \
     maybe-check-mpfr \
     maybe-check-mpc \
     maybe-check-ppl \
     maybe-check-cloog \
     maybe-check-libelf \
-    maybe-check-gnuserv \
     maybe-check-gold \
     maybe-check-gprof \
-    maybe-check-gzip \
-    maybe-check-hello \
-    maybe-check-indent \
     maybe-check-intl \
     maybe-check-tcl \
     maybe-check-itcl \
@@ -2716,29 +2189,11 @@
     maybe-check-libgui \
     maybe-check-libiberty \
     maybe-check-libiconv \
-    maybe-check-libtool \
     maybe-check-m4 \
-    maybe-check-make \
-    maybe-check-mmalloc \
-    maybe-check-patch \
-    maybe-check-perl \
-    maybe-check-prms \
-    maybe-check-rcs \
     maybe-check-readline \
-    maybe-check-release \
-    maybe-check-recode \
-    maybe-check-sed \
-    maybe-check-send-pr \
-    maybe-check-shellutils \
     maybe-check-sid \
     maybe-check-sim \
-    maybe-check-tar \
     maybe-check-texinfo \
-    maybe-check-textutils \
-    maybe-check-time \
-    maybe-check-uudecode \
-    maybe-check-wdiff \
-    maybe-check-zip \
     maybe-check-zlib \
     maybe-check-gdb \
     maybe-check-expect \
@@ -2756,19 +2211,17 @@
     maybe-check-target-libssp \
     maybe-check-target-newlib \
     maybe-check-target-libgcc \
+    maybe-check-target-libquadmath \
     maybe-check-target-libgfortran \
     maybe-check-target-libobjc \
+    maybe-check-target-libgo \
     maybe-check-target-libtermcap \
     maybe-check-target-winsup \
     maybe-check-target-libgloss \
-    maybe-check-target-libiberty \
-    maybe-check-target-gperf \
-    maybe-check-target-examples \
     maybe-check-target-libffi \
     maybe-check-target-libjava \
     maybe-check-target-zlib \
     maybe-check-target-boehm-gc \
-    maybe-check-target-qthreads \
     maybe-check-target-rda \
     maybe-check-target-libada \
     maybe-check-target-libgomp
@@ -2811,42 +2264,25 @@
 
 .PHONY: install-host-nogcc
 install-host-nogcc:  \
-    maybe-install-ash \
-    maybe-install-autoconf \
-    maybe-install-automake \
-    maybe-install-bash \
     maybe-install-bfd \
     maybe-install-opcodes \
     maybe-install-binutils \
     maybe-install-bison \
-    maybe-install-byacc \
-    maybe-install-bzip2 \
     maybe-install-cgen \
     maybe-install-dejagnu \
-    maybe-install-diff \
-    maybe-install-dosutils \
     maybe-install-etc \
     maybe-install-fastjar \
-    maybe-install-fileutils \
-    maybe-install-findutils \
-    maybe-install-find \
     maybe-install-fixincludes \
     maybe-install-flex \
     maybe-install-gas \
-    maybe-install-gawk \
-    maybe-install-gettext \
     maybe-install-gmp \
     maybe-install-mpfr \
     maybe-install-mpc \
     maybe-install-ppl \
     maybe-install-cloog \
     maybe-install-libelf \
-    maybe-install-gnuserv \
     maybe-install-gold \
     maybe-install-gprof \
-    maybe-install-gzip \
-    maybe-install-hello \
-    maybe-install-indent \
     maybe-install-intl \
     maybe-install-tcl \
     maybe-install-itcl \
@@ -2856,29 +2292,11 @@
     maybe-install-libgui \
     maybe-install-libiberty \
     maybe-install-libiconv \
-    maybe-install-libtool \
     maybe-install-m4 \
-    maybe-install-make \
-    maybe-install-mmalloc \
-    maybe-install-patch \
-    maybe-install-perl \
-    maybe-install-prms \
-    maybe-install-rcs \
     maybe-install-readline \
-    maybe-install-release \
-    maybe-install-recode \
-    maybe-install-sed \
-    maybe-install-send-pr \
-    maybe-install-shellutils \
     maybe-install-sid \
     maybe-install-sim \
-    maybe-install-tar \
     maybe-install-texinfo \
-    maybe-install-textutils \
-    maybe-install-time \
-    maybe-install-uudecode \
-    maybe-install-wdiff \
-    maybe-install-zip \
     maybe-install-zlib \
     maybe-install-gdb \
     maybe-install-expect \
@@ -2891,43 +2309,26 @@
 
 .PHONY: install-host
 install-host:  \
-    maybe-install-ash \
-    maybe-install-autoconf \
-    maybe-install-automake \
-    maybe-install-bash \
     maybe-install-bfd \
     maybe-install-opcodes \
     maybe-install-binutils \
     maybe-install-bison \
-    maybe-install-byacc \
-    maybe-install-bzip2 \
     maybe-install-cgen \
     maybe-install-dejagnu \
-    maybe-install-diff \
-    maybe-install-dosutils \
     maybe-install-etc \
     maybe-install-fastjar \
-    maybe-install-fileutils \
-    maybe-install-findutils \
-    maybe-install-find \
     maybe-install-fixincludes \
     maybe-install-flex \
     maybe-install-gas \
     maybe-install-gcc \
-    maybe-install-gawk \
-    maybe-install-gettext \
     maybe-install-gmp \
     maybe-install-mpfr \
     maybe-install-mpc \
     maybe-install-ppl \
     maybe-install-cloog \
     maybe-install-libelf \
-    maybe-install-gnuserv \
     maybe-install-gold \
     maybe-install-gprof \
-    maybe-install-gzip \
-    maybe-install-hello \
-    maybe-install-indent \
     maybe-install-intl \
     maybe-install-tcl \
     maybe-install-itcl \
@@ -2937,29 +2338,11 @@
     maybe-install-libgui \
     maybe-install-libiberty \
     maybe-install-libiconv \
-    maybe-install-libtool \
     maybe-install-m4 \
-    maybe-install-make \
-    maybe-install-mmalloc \
-    maybe-install-patch \
-    maybe-install-perl \
-    maybe-install-prms \
-    maybe-install-rcs \
     maybe-install-readline \
-    maybe-install-release \
-    maybe-install-recode \
-    maybe-install-sed \
-    maybe-install-send-pr \
-    maybe-install-shellutils \
     maybe-install-sid \
     maybe-install-sim \
-    maybe-install-tar \
     maybe-install-texinfo \
-    maybe-install-textutils \
-    maybe-install-time \
-    maybe-install-uudecode \
-    maybe-install-wdiff \
-    maybe-install-zip \
     maybe-install-zlib \
     maybe-install-gdb \
     maybe-install-expect \
@@ -2977,19 +2360,17 @@
     maybe-install-target-libssp \
     maybe-install-target-newlib \
     maybe-install-target-libgcc \
+    maybe-install-target-libquadmath \
     maybe-install-target-libgfortran \
     maybe-install-target-libobjc \
+    maybe-install-target-libgo \
     maybe-install-target-libtermcap \
     maybe-install-target-winsup \
     maybe-install-target-libgloss \
-    maybe-install-target-libiberty \
-    maybe-install-target-gperf \
-    maybe-install-target-examples \
     maybe-install-target-libffi \
     maybe-install-target-libjava \
     maybe-install-target-zlib \
     maybe-install-target-boehm-gc \
-    maybe-install-target-qthreads \
     maybe-install-target-rda \
     maybe-install-target-libada \
     maybe-install-target-libgomp
@@ -3015,6 +2396,82 @@
 install-no-fixedincludes: installdirs install-host-nogcc \
 	install-target gcc-no-fixedincludes
 
+.PHONY: install-strip
+install-strip:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-strip-host install-strip-target
+
+.PHONY: install-strip-host
+install-strip-host:  \
+    maybe-install-strip-bfd \
+    maybe-install-strip-opcodes \
+    maybe-install-strip-binutils \
+    maybe-install-strip-bison \
+    maybe-install-strip-cgen \
+    maybe-install-strip-dejagnu \
+    maybe-install-strip-etc \
+    maybe-install-strip-fastjar \
+    maybe-install-strip-fixincludes \
+    maybe-install-strip-flex \
+    maybe-install-strip-gas \
+    maybe-install-strip-gcc \
+    maybe-install-strip-gmp \
+    maybe-install-strip-mpfr \
+    maybe-install-strip-mpc \
+    maybe-install-strip-ppl \
+    maybe-install-strip-cloog \
+    maybe-install-strip-libelf \
+    maybe-install-strip-gold \
+    maybe-install-strip-gprof \
+    maybe-install-strip-intl \
+    maybe-install-strip-tcl \
+    maybe-install-strip-itcl \
+    maybe-install-strip-ld \
+    maybe-install-strip-libcpp \
+    maybe-install-strip-libdecnumber \
+    maybe-install-strip-libgui \
+    maybe-install-strip-libiberty \
+    maybe-install-strip-libiconv \
+    maybe-install-strip-m4 \
+    maybe-install-strip-readline \
+    maybe-install-strip-sid \
+    maybe-install-strip-sim \
+    maybe-install-strip-texinfo \
+    maybe-install-strip-zlib \
+    maybe-install-strip-gdb \
+    maybe-install-strip-expect \
+    maybe-install-strip-guile \
+    maybe-install-strip-tk \
+    maybe-install-strip-libtermcap \
+    maybe-install-strip-utils \
+    maybe-install-strip-gnattools \
+    maybe-install-strip-lto-plugin
+
+.PHONY: install-strip-target
+install-strip-target:  \
+    maybe-install-strip-target-libstdc++-v3 \
+    maybe-install-strip-target-libmudflap \
+    maybe-install-strip-target-libssp \
+    maybe-install-strip-target-newlib \
+    maybe-install-strip-target-libgcc \
+    maybe-install-strip-target-libquadmath \
+    maybe-install-strip-target-libgfortran \
+    maybe-install-strip-target-libobjc \
+    maybe-install-strip-target-libgo \
+    maybe-install-strip-target-libtermcap \
+    maybe-install-strip-target-winsup \
+    maybe-install-strip-target-libgloss \
+    maybe-install-strip-target-libffi \
+    maybe-install-strip-target-libjava \
+    maybe-install-strip-target-zlib \
+    maybe-install-strip-target-boehm-gc \
+    maybe-install-strip-target-rda \
+    maybe-install-strip-target-libada \
+    maybe-install-strip-target-libgomp
+
+
 ### other supporting targets
 
 MAKEDIRS= \
@@ -3170,62 +2627,6 @@
 
 
 
-.PHONY: configure-build-byacc maybe-configure-build-byacc
-maybe-configure-build-byacc:
-@if gcc-bootstrap
-configure-build-byacc: stage_current
-@endif gcc-bootstrap
-@if build-byacc
-maybe-configure-build-byacc: configure-build-byacc
-configure-build-byacc: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(BUILD_SUBDIR)/byacc/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/byacc ; \
-	$(BUILD_EXPORTS)  \
-	echo Configuring in $(BUILD_SUBDIR)/byacc; \
-	cd "$(BUILD_SUBDIR)/byacc" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(BUILD_SUBDIR)/byacc/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/byacc"; \
-	libsrcdir="$$s/byacc"; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-	  $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif build-byacc
-
-
-
-
-
-.PHONY: all-build-byacc maybe-all-build-byacc
-maybe-all-build-byacc:
-@if gcc-bootstrap
-all-build-byacc: stage_current
-@endif gcc-bootstrap
-@if build-byacc
-TARGET-build-byacc=all
-maybe-all-build-byacc: all-build-byacc
-all-build-byacc: configure-build-byacc
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(BUILD_EXPORTS)  \
-	(cd $(BUILD_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS)  \
-		$(TARGET-build-byacc))
-@endif build-byacc
-
-
-
-
-
 .PHONY: configure-build-flex maybe-configure-build-flex
 maybe-configure-build-flex:
 @if gcc-bootstrap
@@ -3455,1706 +2856,6 @@
 # --------------------------------------
 
 
-.PHONY: configure-ash maybe-configure-ash
-maybe-configure-ash:
-@if gcc-bootstrap
-configure-ash: stage_current
-@endif gcc-bootstrap
-@if ash
-maybe-configure-ash: configure-ash
-configure-ash: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/ash/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ash ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/ash; \
-	cd "$(HOST_SUBDIR)/ash" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/ash/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/ash"; \
-	libsrcdir="$$s/ash"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif ash
-
-
-
-
-
-.PHONY: all-ash maybe-all-ash
-maybe-all-ash:
-@if gcc-bootstrap
-all-ash: stage_current
-@endif gcc-bootstrap
-@if ash
-TARGET-ash=all
-maybe-all-ash: all-ash
-all-ash: configure-ash
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-ash))
-@endif ash
-
-
-
-
-.PHONY: check-ash maybe-check-ash
-maybe-check-ash:
-@if ash
-maybe-check-ash: check-ash
-
-check-ash:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif ash
-
-.PHONY: install-ash maybe-install-ash
-maybe-install-ash:
-@if ash
-maybe-install-ash: install-ash
-
-install-ash: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif ash
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-ash info-ash
-maybe-info-ash:
-@if ash
-maybe-info-ash: info-ash
-
-info-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-dvi-ash dvi-ash
-maybe-dvi-ash:
-@if ash
-maybe-dvi-ash: dvi-ash
-
-dvi-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-pdf-ash pdf-ash
-maybe-pdf-ash:
-@if ash
-maybe-pdf-ash: pdf-ash
-
-pdf-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-html-ash html-ash
-maybe-html-ash:
-@if ash
-maybe-html-ash: html-ash
-
-html-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-TAGS-ash TAGS-ash
-maybe-TAGS-ash:
-@if ash
-maybe-TAGS-ash: TAGS-ash
-
-TAGS-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-install-info-ash install-info-ash
-maybe-install-info-ash:
-@if ash
-maybe-install-info-ash: install-info-ash
-
-install-info-ash: \
-    configure-ash \
-    info-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-install-pdf-ash install-pdf-ash
-maybe-install-pdf-ash:
-@if ash
-maybe-install-pdf-ash: install-pdf-ash
-
-install-pdf-ash: \
-    configure-ash \
-    pdf-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-install-html-ash install-html-ash
-maybe-install-html-ash:
-@if ash
-maybe-install-html-ash: install-html-ash
-
-install-html-ash: \
-    configure-ash \
-    html-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-installcheck-ash installcheck-ash
-maybe-installcheck-ash:
-@if ash
-maybe-installcheck-ash: installcheck-ash
-
-installcheck-ash: \
-    configure-ash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-mostlyclean-ash mostlyclean-ash
-maybe-mostlyclean-ash:
-@if ash
-maybe-mostlyclean-ash: mostlyclean-ash
-
-mostlyclean-ash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-clean-ash clean-ash
-maybe-clean-ash:
-@if ash
-maybe-clean-ash: clean-ash
-
-clean-ash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-distclean-ash distclean-ash
-maybe-distclean-ash:
-@if ash
-maybe-distclean-ash: distclean-ash
-
-distclean-ash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif ash
-
-.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
-maybe-maintainer-clean-ash:
-@if ash
-maybe-maintainer-clean-ash: maintainer-clean-ash
-
-maintainer-clean-ash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./ash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in ash" ; \
-	(cd $(HOST_SUBDIR)/ash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif ash
-
-
-
-.PHONY: configure-autoconf maybe-configure-autoconf
-maybe-configure-autoconf:
-@if gcc-bootstrap
-configure-autoconf: stage_current
-@endif gcc-bootstrap
-@if autoconf
-maybe-configure-autoconf: configure-autoconf
-configure-autoconf: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/autoconf/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/autoconf ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/autoconf; \
-	cd "$(HOST_SUBDIR)/autoconf" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/autoconf/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/autoconf"; \
-	libsrcdir="$$s/autoconf"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif autoconf
-
-
-
-
-
-.PHONY: all-autoconf maybe-all-autoconf
-maybe-all-autoconf:
-@if gcc-bootstrap
-all-autoconf: stage_current
-@endif gcc-bootstrap
-@if autoconf
-TARGET-autoconf=all
-maybe-all-autoconf: all-autoconf
-all-autoconf: configure-autoconf
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-autoconf))
-@endif autoconf
-
-
-
-
-.PHONY: check-autoconf maybe-check-autoconf
-maybe-check-autoconf:
-@if autoconf
-maybe-check-autoconf: check-autoconf
-
-check-autoconf:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif autoconf
-
-.PHONY: install-autoconf maybe-install-autoconf
-maybe-install-autoconf:
-@if autoconf
-maybe-install-autoconf: install-autoconf
-
-install-autoconf: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif autoconf
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-autoconf info-autoconf
-maybe-info-autoconf:
-@if autoconf
-maybe-info-autoconf: info-autoconf
-
-info-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-dvi-autoconf dvi-autoconf
-maybe-dvi-autoconf:
-@if autoconf
-maybe-dvi-autoconf: dvi-autoconf
-
-dvi-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-pdf-autoconf pdf-autoconf
-maybe-pdf-autoconf:
-@if autoconf
-maybe-pdf-autoconf: pdf-autoconf
-
-pdf-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-html-autoconf html-autoconf
-maybe-html-autoconf:
-@if autoconf
-maybe-html-autoconf: html-autoconf
-
-html-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-TAGS-autoconf TAGS-autoconf
-maybe-TAGS-autoconf:
-@if autoconf
-maybe-TAGS-autoconf: TAGS-autoconf
-
-TAGS-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-install-info-autoconf install-info-autoconf
-maybe-install-info-autoconf:
-@if autoconf
-maybe-install-info-autoconf: install-info-autoconf
-
-install-info-autoconf: \
-    configure-autoconf \
-    info-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-install-pdf-autoconf install-pdf-autoconf
-maybe-install-pdf-autoconf:
-@if autoconf
-maybe-install-pdf-autoconf: install-pdf-autoconf
-
-install-pdf-autoconf: \
-    configure-autoconf \
-    pdf-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-install-html-autoconf install-html-autoconf
-maybe-install-html-autoconf:
-@if autoconf
-maybe-install-html-autoconf: install-html-autoconf
-
-install-html-autoconf: \
-    configure-autoconf \
-    html-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-installcheck-autoconf installcheck-autoconf
-maybe-installcheck-autoconf:
-@if autoconf
-maybe-installcheck-autoconf: installcheck-autoconf
-
-installcheck-autoconf: \
-    configure-autoconf 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
-maybe-mostlyclean-autoconf:
-@if autoconf
-maybe-mostlyclean-autoconf: mostlyclean-autoconf
-
-mostlyclean-autoconf: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-clean-autoconf clean-autoconf
-maybe-clean-autoconf:
-@if autoconf
-maybe-clean-autoconf: clean-autoconf
-
-clean-autoconf: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-distclean-autoconf distclean-autoconf
-maybe-distclean-autoconf:
-@if autoconf
-maybe-distclean-autoconf: distclean-autoconf
-
-distclean-autoconf: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif autoconf
-
-.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
-maybe-maintainer-clean-autoconf:
-@if autoconf
-maybe-maintainer-clean-autoconf: maintainer-clean-autoconf
-
-maintainer-clean-autoconf: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./autoconf/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in autoconf" ; \
-	(cd $(HOST_SUBDIR)/autoconf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif autoconf
-
-
-
-.PHONY: configure-automake maybe-configure-automake
-maybe-configure-automake:
-@if gcc-bootstrap
-configure-automake: stage_current
-@endif gcc-bootstrap
-@if automake
-maybe-configure-automake: configure-automake
-configure-automake: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/automake/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/automake ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/automake; \
-	cd "$(HOST_SUBDIR)/automake" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/automake/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/automake"; \
-	libsrcdir="$$s/automake"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif automake
-
-
-
-
-
-.PHONY: all-automake maybe-all-automake
-maybe-all-automake:
-@if gcc-bootstrap
-all-automake: stage_current
-@endif gcc-bootstrap
-@if automake
-TARGET-automake=all
-maybe-all-automake: all-automake
-all-automake: configure-automake
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-automake))
-@endif automake
-
-
-
-
-.PHONY: check-automake maybe-check-automake
-maybe-check-automake:
-@if automake
-maybe-check-automake: check-automake
-
-check-automake:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif automake
-
-.PHONY: install-automake maybe-install-automake
-maybe-install-automake:
-@if automake
-maybe-install-automake: install-automake
-
-install-automake: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif automake
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-automake info-automake
-maybe-info-automake:
-@if automake
-maybe-info-automake: info-automake
-
-info-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-dvi-automake dvi-automake
-maybe-dvi-automake:
-@if automake
-maybe-dvi-automake: dvi-automake
-
-dvi-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-pdf-automake pdf-automake
-maybe-pdf-automake:
-@if automake
-maybe-pdf-automake: pdf-automake
-
-pdf-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-html-automake html-automake
-maybe-html-automake:
-@if automake
-maybe-html-automake: html-automake
-
-html-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-TAGS-automake TAGS-automake
-maybe-TAGS-automake:
-@if automake
-maybe-TAGS-automake: TAGS-automake
-
-TAGS-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-install-info-automake install-info-automake
-maybe-install-info-automake:
-@if automake
-maybe-install-info-automake: install-info-automake
-
-install-info-automake: \
-    configure-automake \
-    info-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-install-pdf-automake install-pdf-automake
-maybe-install-pdf-automake:
-@if automake
-maybe-install-pdf-automake: install-pdf-automake
-
-install-pdf-automake: \
-    configure-automake \
-    pdf-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-install-html-automake install-html-automake
-maybe-install-html-automake:
-@if automake
-maybe-install-html-automake: install-html-automake
-
-install-html-automake: \
-    configure-automake \
-    html-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-installcheck-automake installcheck-automake
-maybe-installcheck-automake:
-@if automake
-maybe-installcheck-automake: installcheck-automake
-
-installcheck-automake: \
-    configure-automake 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-mostlyclean-automake mostlyclean-automake
-maybe-mostlyclean-automake:
-@if automake
-maybe-mostlyclean-automake: mostlyclean-automake
-
-mostlyclean-automake: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-clean-automake clean-automake
-maybe-clean-automake:
-@if automake
-maybe-clean-automake: clean-automake
-
-clean-automake: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-distclean-automake distclean-automake
-maybe-distclean-automake:
-@if automake
-maybe-distclean-automake: distclean-automake
-
-distclean-automake: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif automake
-
-.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
-maybe-maintainer-clean-automake:
-@if automake
-maybe-maintainer-clean-automake: maintainer-clean-automake
-
-maintainer-clean-automake: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./automake/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in automake" ; \
-	(cd $(HOST_SUBDIR)/automake && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif automake
-
-
-
-.PHONY: configure-bash maybe-configure-bash
-maybe-configure-bash:
-@if gcc-bootstrap
-configure-bash: stage_current
-@endif gcc-bootstrap
-@if bash
-maybe-configure-bash: configure-bash
-configure-bash: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/bash/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bash ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/bash; \
-	cd "$(HOST_SUBDIR)/bash" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/bash/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/bash"; \
-	libsrcdir="$$s/bash"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif bash
-
-
-
-
-
-.PHONY: all-bash maybe-all-bash
-maybe-all-bash:
-@if gcc-bootstrap
-all-bash: stage_current
-@endif gcc-bootstrap
-@if bash
-TARGET-bash=all
-maybe-all-bash: all-bash
-all-bash: configure-bash
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-bash))
-@endif bash
-
-
-
-
-.PHONY: check-bash maybe-check-bash
-maybe-check-bash:
-@if bash
-maybe-check-bash: check-bash
-
-check-bash:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif bash
-
-.PHONY: install-bash maybe-install-bash
-maybe-install-bash:
-@if bash
-maybe-install-bash: install-bash
-
-install-bash: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif bash
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-bash info-bash
-maybe-info-bash:
-@if bash
-maybe-info-bash: info-bash
-
-info-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-dvi-bash dvi-bash
-maybe-dvi-bash:
-@if bash
-maybe-dvi-bash: dvi-bash
-
-dvi-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-pdf-bash pdf-bash
-maybe-pdf-bash:
-@if bash
-maybe-pdf-bash: pdf-bash
-
-pdf-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-html-bash html-bash
-maybe-html-bash:
-@if bash
-maybe-html-bash: html-bash
-
-html-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-TAGS-bash TAGS-bash
-maybe-TAGS-bash:
-@if bash
-maybe-TAGS-bash: TAGS-bash
-
-TAGS-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-install-info-bash install-info-bash
-maybe-install-info-bash:
-@if bash
-maybe-install-info-bash: install-info-bash
-
-install-info-bash: \
-    configure-bash \
-    info-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-install-pdf-bash install-pdf-bash
-maybe-install-pdf-bash:
-@if bash
-maybe-install-pdf-bash: install-pdf-bash
-
-install-pdf-bash: \
-    configure-bash \
-    pdf-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-install-html-bash install-html-bash
-maybe-install-html-bash:
-@if bash
-maybe-install-html-bash: install-html-bash
-
-install-html-bash: \
-    configure-bash \
-    html-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-installcheck-bash installcheck-bash
-maybe-installcheck-bash:
-@if bash
-maybe-installcheck-bash: installcheck-bash
-
-installcheck-bash: \
-    configure-bash 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-mostlyclean-bash mostlyclean-bash
-maybe-mostlyclean-bash:
-@if bash
-maybe-mostlyclean-bash: mostlyclean-bash
-
-mostlyclean-bash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-clean-bash clean-bash
-maybe-clean-bash:
-@if bash
-maybe-clean-bash: clean-bash
-
-clean-bash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-distclean-bash distclean-bash
-maybe-distclean-bash:
-@if bash
-maybe-distclean-bash: distclean-bash
-
-distclean-bash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif bash
-
-.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
-maybe-maintainer-clean-bash:
-@if bash
-maybe-maintainer-clean-bash: maintainer-clean-bash
-
-maintainer-clean-bash: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bash/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in bash" ; \
-	(cd $(HOST_SUBDIR)/bash && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif bash
-
-
-
 .PHONY: configure-bfd maybe-configure-bfd
 maybe-configure-bfd:
 @if gcc-bootstrap
@@ -5693,6 +3394,21 @@
 
 @endif bfd
 
+.PHONY: install-strip-bfd maybe-install-strip-bfd
+maybe-install-strip-bfd:
+@if bfd
+maybe-install-strip-bfd: install-strip-bfd
+
+install-strip-bfd: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/bfd && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif bfd
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-bfd info-bfd
@@ -6559,6 +4275,21 @@
 
 @endif opcodes
 
+.PHONY: install-strip-opcodes maybe-install-strip-opcodes
+maybe-install-strip-opcodes:
+@if opcodes
+maybe-install-strip-opcodes: install-strip-opcodes
+
+install-strip-opcodes: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/opcodes && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif opcodes
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-opcodes info-opcodes
@@ -7425,6 +5156,21 @@
 
 @endif binutils
 
+.PHONY: install-strip-binutils maybe-install-strip-binutils
+maybe-install-strip-binutils:
+@if binutils
+maybe-install-strip-binutils: install-strip-binutils
+
+install-strip-binutils: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/binutils && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif binutils
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-binutils info-binutils
@@ -7840,6 +5586,21 @@
 
 @endif bison
 
+.PHONY: install-strip-bison maybe-install-strip-bison
+maybe-install-strip-bison:
+@if bison
+maybe-install-strip-bison: install-strip-bison
+
+install-strip-bison: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/bison && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif bison
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-bison info-bison
@@ -8181,859 +5942,6 @@
 
 
 
-.PHONY: configure-byacc maybe-configure-byacc
-maybe-configure-byacc:
-@if gcc-bootstrap
-configure-byacc: stage_current
-@endif gcc-bootstrap
-@if byacc
-maybe-configure-byacc: configure-byacc
-configure-byacc: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/byacc/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/byacc ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/byacc; \
-	cd "$(HOST_SUBDIR)/byacc" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/byacc/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/byacc"; \
-	libsrcdir="$$s/byacc"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif byacc
-
-
-
-
-
-.PHONY: all-byacc maybe-all-byacc
-maybe-all-byacc:
-@if gcc-bootstrap
-all-byacc: stage_current
-@endif gcc-bootstrap
-@if byacc
-TARGET-byacc=all
-maybe-all-byacc: all-byacc
-all-byacc: configure-byacc
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-byacc))
-@endif byacc
-
-
-
-
-.PHONY: check-byacc maybe-check-byacc
-maybe-check-byacc:
-@if byacc
-maybe-check-byacc: check-byacc
-
-# This module is only tested in a native toolchain.
-check-byacc:
-	@: $(MAKE); $(unstage)
-	@if [ '$(host)' = '$(target)' ] ; then \
-	  r=`${PWD_COMMAND}`; export r; \
-	  s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	  $(HOST_EXPORTS) \
-	  (cd $(HOST_SUBDIR)/byacc && \
-	    $(MAKE) $(FLAGS_TO_PASS)  check); \
-	fi
-
-@endif byacc
-
-.PHONY: install-byacc maybe-install-byacc
-maybe-install-byacc:
-@if byacc
-maybe-install-byacc: install-byacc
-
-install-byacc: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif byacc
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-byacc info-byacc
-maybe-info-byacc:
-@if byacc
-maybe-info-byacc: info-byacc
-
-info-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-dvi-byacc dvi-byacc
-maybe-dvi-byacc:
-@if byacc
-maybe-dvi-byacc: dvi-byacc
-
-dvi-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-pdf-byacc pdf-byacc
-maybe-pdf-byacc:
-@if byacc
-maybe-pdf-byacc: pdf-byacc
-
-pdf-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-html-byacc html-byacc
-maybe-html-byacc:
-@if byacc
-maybe-html-byacc: html-byacc
-
-html-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-TAGS-byacc TAGS-byacc
-maybe-TAGS-byacc:
-@if byacc
-maybe-TAGS-byacc: TAGS-byacc
-
-TAGS-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-install-info-byacc install-info-byacc
-maybe-install-info-byacc:
-@if byacc
-maybe-install-info-byacc: install-info-byacc
-
-install-info-byacc: \
-    configure-byacc \
-    info-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-install-pdf-byacc install-pdf-byacc
-maybe-install-pdf-byacc:
-@if byacc
-maybe-install-pdf-byacc: install-pdf-byacc
-
-install-pdf-byacc: \
-    configure-byacc \
-    pdf-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-install-html-byacc install-html-byacc
-maybe-install-html-byacc:
-@if byacc
-maybe-install-html-byacc: install-html-byacc
-
-install-html-byacc: \
-    configure-byacc \
-    html-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-installcheck-byacc installcheck-byacc
-maybe-installcheck-byacc:
-@if byacc
-maybe-installcheck-byacc: installcheck-byacc
-
-installcheck-byacc: \
-    configure-byacc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
-maybe-mostlyclean-byacc:
-@if byacc
-maybe-mostlyclean-byacc: mostlyclean-byacc
-
-mostlyclean-byacc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-clean-byacc clean-byacc
-maybe-clean-byacc:
-@if byacc
-maybe-clean-byacc: clean-byacc
-
-clean-byacc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-distclean-byacc distclean-byacc
-maybe-distclean-byacc:
-@if byacc
-maybe-distclean-byacc: distclean-byacc
-
-distclean-byacc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif byacc
-
-.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
-maybe-maintainer-clean-byacc:
-@if byacc
-maybe-maintainer-clean-byacc: maintainer-clean-byacc
-
-maintainer-clean-byacc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./byacc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in byacc" ; \
-	(cd $(HOST_SUBDIR)/byacc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif byacc
-
-
-
-.PHONY: configure-bzip2 maybe-configure-bzip2
-maybe-configure-bzip2:
-@if gcc-bootstrap
-configure-bzip2: stage_current
-@endif gcc-bootstrap
-@if bzip2
-maybe-configure-bzip2: configure-bzip2
-configure-bzip2: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/bzip2/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bzip2 ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/bzip2; \
-	cd "$(HOST_SUBDIR)/bzip2" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/bzip2/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/bzip2"; \
-	libsrcdir="$$s/bzip2"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif bzip2
-
-
-
-
-
-.PHONY: all-bzip2 maybe-all-bzip2
-maybe-all-bzip2:
-@if gcc-bootstrap
-all-bzip2: stage_current
-@endif gcc-bootstrap
-@if bzip2
-TARGET-bzip2=all
-maybe-all-bzip2: all-bzip2
-all-bzip2: configure-bzip2
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-bzip2))
-@endif bzip2
-
-
-
-
-.PHONY: check-bzip2 maybe-check-bzip2
-maybe-check-bzip2:
-@if bzip2
-maybe-check-bzip2: check-bzip2
-
-check-bzip2:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif bzip2
-
-.PHONY: install-bzip2 maybe-install-bzip2
-maybe-install-bzip2:
-@if bzip2
-maybe-install-bzip2: install-bzip2
-
-install-bzip2: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif bzip2
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-bzip2 info-bzip2
-maybe-info-bzip2:
-@if bzip2
-maybe-info-bzip2: info-bzip2
-
-info-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-dvi-bzip2 dvi-bzip2
-maybe-dvi-bzip2:
-@if bzip2
-maybe-dvi-bzip2: dvi-bzip2
-
-dvi-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-pdf-bzip2 pdf-bzip2
-maybe-pdf-bzip2:
-@if bzip2
-maybe-pdf-bzip2: pdf-bzip2
-
-pdf-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-html-bzip2 html-bzip2
-maybe-html-bzip2:
-@if bzip2
-maybe-html-bzip2: html-bzip2
-
-html-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
-maybe-TAGS-bzip2:
-@if bzip2
-maybe-TAGS-bzip2: TAGS-bzip2
-
-TAGS-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-install-info-bzip2 install-info-bzip2
-maybe-install-info-bzip2:
-@if bzip2
-maybe-install-info-bzip2: install-info-bzip2
-
-install-info-bzip2: \
-    configure-bzip2 \
-    info-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-install-pdf-bzip2 install-pdf-bzip2
-maybe-install-pdf-bzip2:
-@if bzip2
-maybe-install-pdf-bzip2: install-pdf-bzip2
-
-install-pdf-bzip2: \
-    configure-bzip2 \
-    pdf-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-install-html-bzip2 install-html-bzip2
-maybe-install-html-bzip2:
-@if bzip2
-maybe-install-html-bzip2: install-html-bzip2
-
-install-html-bzip2: \
-    configure-bzip2 \
-    html-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
-maybe-installcheck-bzip2:
-@if bzip2
-maybe-installcheck-bzip2: installcheck-bzip2
-
-installcheck-bzip2: \
-    configure-bzip2 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
-maybe-mostlyclean-bzip2:
-@if bzip2
-maybe-mostlyclean-bzip2: mostlyclean-bzip2
-
-mostlyclean-bzip2: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-clean-bzip2 clean-bzip2
-maybe-clean-bzip2:
-@if bzip2
-maybe-clean-bzip2: clean-bzip2
-
-clean-bzip2: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-distclean-bzip2 distclean-bzip2
-maybe-distclean-bzip2:
-@if bzip2
-maybe-distclean-bzip2: distclean-bzip2
-
-distclean-bzip2: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif bzip2
-
-.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
-maybe-maintainer-clean-bzip2:
-@if bzip2
-maybe-maintainer-clean-bzip2: maintainer-clean-bzip2
-
-maintainer-clean-bzip2: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./bzip2/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in bzip2" ; \
-	(cd $(HOST_SUBDIR)/bzip2 && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif bzip2
-
-
-
 .PHONY: configure-cgen maybe-configure-cgen
 maybe-configure-cgen:
 @if gcc-bootstrap
@@ -9118,6 +6026,21 @@
 
 @endif cgen
 
+.PHONY: install-strip-cgen maybe-install-strip-cgen
+maybe-install-strip-cgen:
+@if cgen
+maybe-install-strip-cgen: install-strip-cgen
+
+install-strip-cgen: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/cgen && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif cgen
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-cgen info-cgen
@@ -9543,6 +6466,21 @@
 
 @endif dejagnu
 
+.PHONY: install-strip-dejagnu maybe-install-strip-dejagnu
+maybe-install-strip-dejagnu:
+@if dejagnu
+maybe-install-strip-dejagnu: install-strip-dejagnu
+
+install-strip-dejagnu: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/dejagnu && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif dejagnu
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-dejagnu info-dejagnu
@@ -9884,850 +6822,6 @@
 
 
 
-.PHONY: configure-diff maybe-configure-diff
-maybe-configure-diff:
-@if gcc-bootstrap
-configure-diff: stage_current
-@endif gcc-bootstrap
-@if diff
-maybe-configure-diff: configure-diff
-configure-diff: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/diff/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/diff ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/diff; \
-	cd "$(HOST_SUBDIR)/diff" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/diff/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/diff"; \
-	libsrcdir="$$s/diff"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif diff
-
-
-
-
-
-.PHONY: all-diff maybe-all-diff
-maybe-all-diff:
-@if gcc-bootstrap
-all-diff: stage_current
-@endif gcc-bootstrap
-@if diff
-TARGET-diff=all
-maybe-all-diff: all-diff
-all-diff: configure-diff
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-diff))
-@endif diff
-
-
-
-
-.PHONY: check-diff maybe-check-diff
-maybe-check-diff:
-@if diff
-maybe-check-diff: check-diff
-
-check-diff:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif diff
-
-.PHONY: install-diff maybe-install-diff
-maybe-install-diff:
-@if diff
-maybe-install-diff: install-diff
-
-install-diff: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif diff
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-diff info-diff
-maybe-info-diff:
-@if diff
-maybe-info-diff: info-diff
-
-info-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-dvi-diff dvi-diff
-maybe-dvi-diff:
-@if diff
-maybe-dvi-diff: dvi-diff
-
-dvi-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-pdf-diff pdf-diff
-maybe-pdf-diff:
-@if diff
-maybe-pdf-diff: pdf-diff
-
-pdf-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-html-diff html-diff
-maybe-html-diff:
-@if diff
-maybe-html-diff: html-diff
-
-html-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-TAGS-diff TAGS-diff
-maybe-TAGS-diff:
-@if diff
-maybe-TAGS-diff: TAGS-diff
-
-TAGS-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-install-info-diff install-info-diff
-maybe-install-info-diff:
-@if diff
-maybe-install-info-diff: install-info-diff
-
-install-info-diff: \
-    configure-diff \
-    info-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-install-pdf-diff install-pdf-diff
-maybe-install-pdf-diff:
-@if diff
-maybe-install-pdf-diff: install-pdf-diff
-
-install-pdf-diff: \
-    configure-diff \
-    pdf-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-install-html-diff install-html-diff
-maybe-install-html-diff:
-@if diff
-maybe-install-html-diff: install-html-diff
-
-install-html-diff: \
-    configure-diff \
-    html-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-installcheck-diff installcheck-diff
-maybe-installcheck-diff:
-@if diff
-maybe-installcheck-diff: installcheck-diff
-
-installcheck-diff: \
-    configure-diff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-mostlyclean-diff mostlyclean-diff
-maybe-mostlyclean-diff:
-@if diff
-maybe-mostlyclean-diff: mostlyclean-diff
-
-mostlyclean-diff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-clean-diff clean-diff
-maybe-clean-diff:
-@if diff
-maybe-clean-diff: clean-diff
-
-clean-diff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-distclean-diff distclean-diff
-maybe-distclean-diff:
-@if diff
-maybe-distclean-diff: distclean-diff
-
-distclean-diff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif diff
-
-.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
-maybe-maintainer-clean-diff:
-@if diff
-maybe-maintainer-clean-diff: maintainer-clean-diff
-
-maintainer-clean-diff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./diff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in diff" ; \
-	(cd $(HOST_SUBDIR)/diff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif diff
-
-
-
-.PHONY: configure-dosutils maybe-configure-dosutils
-maybe-configure-dosutils:
-@if gcc-bootstrap
-configure-dosutils: stage_current
-@endif gcc-bootstrap
-@if dosutils
-maybe-configure-dosutils: configure-dosutils
-configure-dosutils: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/dosutils/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dosutils ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/dosutils; \
-	cd "$(HOST_SUBDIR)/dosutils" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/dosutils/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/dosutils"; \
-	libsrcdir="$$s/dosutils"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif dosutils
-
-
-
-
-
-.PHONY: all-dosutils maybe-all-dosutils
-maybe-all-dosutils:
-@if gcc-bootstrap
-all-dosutils: stage_current
-@endif gcc-bootstrap
-@if dosutils
-TARGET-dosutils=all
-maybe-all-dosutils: all-dosutils
-all-dosutils: configure-dosutils
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-dosutils))
-@endif dosutils
-
-
-
-
-.PHONY: check-dosutils maybe-check-dosutils
-maybe-check-dosutils:
-@if dosutils
-maybe-check-dosutils: check-dosutils
-
-check-dosutils:
-
-@endif dosutils
-
-.PHONY: install-dosutils maybe-install-dosutils
-maybe-install-dosutils:
-@if dosutils
-maybe-install-dosutils: install-dosutils
-
-install-dosutils: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif dosutils
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-dosutils info-dosutils
-maybe-info-dosutils:
-@if dosutils
-maybe-info-dosutils: info-dosutils
-
-info-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-dvi-dosutils dvi-dosutils
-maybe-dvi-dosutils:
-@if dosutils
-maybe-dvi-dosutils: dvi-dosutils
-
-dvi-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-pdf-dosutils pdf-dosutils
-maybe-pdf-dosutils:
-@if dosutils
-maybe-pdf-dosutils: pdf-dosutils
-
-pdf-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-html-dosutils html-dosutils
-maybe-html-dosutils:
-@if dosutils
-maybe-html-dosutils: html-dosutils
-
-html-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-TAGS-dosutils TAGS-dosutils
-maybe-TAGS-dosutils:
-@if dosutils
-maybe-TAGS-dosutils: TAGS-dosutils
-
-TAGS-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-install-info-dosutils install-info-dosutils
-maybe-install-info-dosutils:
-@if dosutils
-maybe-install-info-dosutils: install-info-dosutils
-
-install-info-dosutils: \
-    configure-dosutils \
-    info-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-install-pdf-dosutils install-pdf-dosutils
-maybe-install-pdf-dosutils:
-@if dosutils
-maybe-install-pdf-dosutils: install-pdf-dosutils
-
-install-pdf-dosutils: \
-    configure-dosutils \
-    pdf-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-install-html-dosutils install-html-dosutils
-maybe-install-html-dosutils:
-@if dosutils
-maybe-install-html-dosutils: install-html-dosutils
-
-install-html-dosutils: \
-    configure-dosutils \
-    html-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-installcheck-dosutils installcheck-dosutils
-maybe-installcheck-dosutils:
-@if dosutils
-maybe-installcheck-dosutils: installcheck-dosutils
-
-installcheck-dosutils: \
-    configure-dosutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
-maybe-mostlyclean-dosutils:
-@if dosutils
-maybe-mostlyclean-dosutils: mostlyclean-dosutils
-
-mostlyclean-dosutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-clean-dosutils clean-dosutils
-maybe-clean-dosutils:
-@if dosutils
-maybe-clean-dosutils: clean-dosutils
-
-clean-dosutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-distclean-dosutils distclean-dosutils
-maybe-distclean-dosutils:
-@if dosutils
-maybe-distclean-dosutils: distclean-dosutils
-
-distclean-dosutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif dosutils
-
-.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
-maybe-maintainer-clean-dosutils:
-@if dosutils
-maybe-maintainer-clean-dosutils: maintainer-clean-dosutils
-
-maintainer-clean-dosutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./dosutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in dosutils" ; \
-	(cd $(HOST_SUBDIR)/dosutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif dosutils
-
-
-
 .PHONY: configure-etc maybe-configure-etc
 maybe-configure-etc:
 @if gcc-bootstrap
@@ -10812,6 +6906,21 @@
 
 @endif etc
 
+.PHONY: install-strip-etc maybe-install-strip-etc
+maybe-install-strip-etc:
+@if etc
+maybe-install-strip-etc: install-strip-etc
+
+install-strip-etc: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/etc && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif etc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-etc info-etc
@@ -11240,6 +7349,21 @@
 
 @endif fastjar
 
+.PHONY: install-strip-fastjar maybe-install-strip-fastjar
+maybe-install-strip-fastjar:
+@if fastjar
+maybe-install-strip-fastjar: install-strip-fastjar
+
+install-strip-fastjar: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/fastjar && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif fastjar
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-fastjar info-fastjar
@@ -11581,1281 +7705,6 @@
 
 
 
-.PHONY: configure-fileutils maybe-configure-fileutils
-maybe-configure-fileutils:
-@if gcc-bootstrap
-configure-fileutils: stage_current
-@endif gcc-bootstrap
-@if fileutils
-maybe-configure-fileutils: configure-fileutils
-configure-fileutils: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/fileutils/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fileutils ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/fileutils; \
-	cd "$(HOST_SUBDIR)/fileutils" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/fileutils/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/fileutils"; \
-	libsrcdir="$$s/fileutils"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif fileutils
-
-
-
-
-
-.PHONY: all-fileutils maybe-all-fileutils
-maybe-all-fileutils:
-@if gcc-bootstrap
-all-fileutils: stage_current
-@endif gcc-bootstrap
-@if fileutils
-TARGET-fileutils=all
-maybe-all-fileutils: all-fileutils
-all-fileutils: configure-fileutils
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-fileutils))
-@endif fileutils
-
-
-
-
-.PHONY: check-fileutils maybe-check-fileutils
-maybe-check-fileutils:
-@if fileutils
-maybe-check-fileutils: check-fileutils
-
-check-fileutils:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif fileutils
-
-.PHONY: install-fileutils maybe-install-fileutils
-maybe-install-fileutils:
-@if fileutils
-maybe-install-fileutils: install-fileutils
-
-install-fileutils: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif fileutils
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-fileutils info-fileutils
-maybe-info-fileutils:
-@if fileutils
-maybe-info-fileutils: info-fileutils
-
-info-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-dvi-fileutils dvi-fileutils
-maybe-dvi-fileutils:
-@if fileutils
-maybe-dvi-fileutils: dvi-fileutils
-
-dvi-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-pdf-fileutils pdf-fileutils
-maybe-pdf-fileutils:
-@if fileutils
-maybe-pdf-fileutils: pdf-fileutils
-
-pdf-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-html-fileutils html-fileutils
-maybe-html-fileutils:
-@if fileutils
-maybe-html-fileutils: html-fileutils
-
-html-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-TAGS-fileutils TAGS-fileutils
-maybe-TAGS-fileutils:
-@if fileutils
-maybe-TAGS-fileutils: TAGS-fileutils
-
-TAGS-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-install-info-fileutils install-info-fileutils
-maybe-install-info-fileutils:
-@if fileutils
-maybe-install-info-fileutils: install-info-fileutils
-
-install-info-fileutils: \
-    configure-fileutils \
-    info-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-install-pdf-fileutils install-pdf-fileutils
-maybe-install-pdf-fileutils:
-@if fileutils
-maybe-install-pdf-fileutils: install-pdf-fileutils
-
-install-pdf-fileutils: \
-    configure-fileutils \
-    pdf-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-install-html-fileutils install-html-fileutils
-maybe-install-html-fileutils:
-@if fileutils
-maybe-install-html-fileutils: install-html-fileutils
-
-install-html-fileutils: \
-    configure-fileutils \
-    html-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-installcheck-fileutils installcheck-fileutils
-maybe-installcheck-fileutils:
-@if fileutils
-maybe-installcheck-fileutils: installcheck-fileutils
-
-installcheck-fileutils: \
-    configure-fileutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
-maybe-mostlyclean-fileutils:
-@if fileutils
-maybe-mostlyclean-fileutils: mostlyclean-fileutils
-
-mostlyclean-fileutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-clean-fileutils clean-fileutils
-maybe-clean-fileutils:
-@if fileutils
-maybe-clean-fileutils: clean-fileutils
-
-clean-fileutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-distclean-fileutils distclean-fileutils
-maybe-distclean-fileutils:
-@if fileutils
-maybe-distclean-fileutils: distclean-fileutils
-
-distclean-fileutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif fileutils
-
-.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
-maybe-maintainer-clean-fileutils:
-@if fileutils
-maybe-maintainer-clean-fileutils: maintainer-clean-fileutils
-
-maintainer-clean-fileutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./fileutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in fileutils" ; \
-	(cd $(HOST_SUBDIR)/fileutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif fileutils
-
-
-
-.PHONY: configure-findutils maybe-configure-findutils
-maybe-configure-findutils:
-@if gcc-bootstrap
-configure-findutils: stage_current
-@endif gcc-bootstrap
-@if findutils
-maybe-configure-findutils: configure-findutils
-configure-findutils: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/findutils/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/findutils ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/findutils; \
-	cd "$(HOST_SUBDIR)/findutils" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/findutils/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/findutils"; \
-	libsrcdir="$$s/findutils"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif findutils
-
-
-
-
-
-.PHONY: all-findutils maybe-all-findutils
-maybe-all-findutils:
-@if gcc-bootstrap
-all-findutils: stage_current
-@endif gcc-bootstrap
-@if findutils
-TARGET-findutils=all
-maybe-all-findutils: all-findutils
-all-findutils: configure-findutils
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-findutils))
-@endif findutils
-
-
-
-
-.PHONY: check-findutils maybe-check-findutils
-maybe-check-findutils:
-@if findutils
-maybe-check-findutils: check-findutils
-
-check-findutils:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif findutils
-
-.PHONY: install-findutils maybe-install-findutils
-maybe-install-findutils:
-@if findutils
-maybe-install-findutils: install-findutils
-
-install-findutils: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif findutils
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-findutils info-findutils
-maybe-info-findutils:
-@if findutils
-maybe-info-findutils: info-findutils
-
-info-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-dvi-findutils dvi-findutils
-maybe-dvi-findutils:
-@if findutils
-maybe-dvi-findutils: dvi-findutils
-
-dvi-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-pdf-findutils pdf-findutils
-maybe-pdf-findutils:
-@if findutils
-maybe-pdf-findutils: pdf-findutils
-
-pdf-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-html-findutils html-findutils
-maybe-html-findutils:
-@if findutils
-maybe-html-findutils: html-findutils
-
-html-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-TAGS-findutils TAGS-findutils
-maybe-TAGS-findutils:
-@if findutils
-maybe-TAGS-findutils: TAGS-findutils
-
-TAGS-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-install-info-findutils install-info-findutils
-maybe-install-info-findutils:
-@if findutils
-maybe-install-info-findutils: install-info-findutils
-
-install-info-findutils: \
-    configure-findutils \
-    info-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-install-pdf-findutils install-pdf-findutils
-maybe-install-pdf-findutils:
-@if findutils
-maybe-install-pdf-findutils: install-pdf-findutils
-
-install-pdf-findutils: \
-    configure-findutils \
-    pdf-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-install-html-findutils install-html-findutils
-maybe-install-html-findutils:
-@if findutils
-maybe-install-html-findutils: install-html-findutils
-
-install-html-findutils: \
-    configure-findutils \
-    html-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-installcheck-findutils installcheck-findutils
-maybe-installcheck-findutils:
-@if findutils
-maybe-installcheck-findutils: installcheck-findutils
-
-installcheck-findutils: \
-    configure-findutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
-maybe-mostlyclean-findutils:
-@if findutils
-maybe-mostlyclean-findutils: mostlyclean-findutils
-
-mostlyclean-findutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-clean-findutils clean-findutils
-maybe-clean-findutils:
-@if findutils
-maybe-clean-findutils: clean-findutils
-
-clean-findutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-distclean-findutils distclean-findutils
-maybe-distclean-findutils:
-@if findutils
-maybe-distclean-findutils: distclean-findutils
-
-distclean-findutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif findutils
-
-.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
-maybe-maintainer-clean-findutils:
-@if findutils
-maybe-maintainer-clean-findutils: maintainer-clean-findutils
-
-maintainer-clean-findutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./findutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in findutils" ; \
-	(cd $(HOST_SUBDIR)/findutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif findutils
-
-
-
-.PHONY: configure-find maybe-configure-find
-maybe-configure-find:
-@if gcc-bootstrap
-configure-find: stage_current
-@endif gcc-bootstrap
-@if find
-maybe-configure-find: configure-find
-configure-find: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/find/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/find ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/find; \
-	cd "$(HOST_SUBDIR)/find" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/find/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/find"; \
-	libsrcdir="$$s/find"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif find
-
-
-
-
-
-.PHONY: all-find maybe-all-find
-maybe-all-find:
-@if gcc-bootstrap
-all-find: stage_current
-@endif gcc-bootstrap
-@if find
-TARGET-find=all
-maybe-all-find: all-find
-all-find: configure-find
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-find))
-@endif find
-
-
-
-
-.PHONY: check-find maybe-check-find
-maybe-check-find:
-@if find
-maybe-check-find: check-find
-
-check-find:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif find
-
-.PHONY: install-find maybe-install-find
-maybe-install-find:
-@if find
-maybe-install-find: install-find
-
-install-find: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif find
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-find info-find
-maybe-info-find:
-@if find
-maybe-info-find: info-find
-
-info-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-dvi-find dvi-find
-maybe-dvi-find:
-@if find
-maybe-dvi-find: dvi-find
-
-dvi-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-pdf-find pdf-find
-maybe-pdf-find:
-@if find
-maybe-pdf-find: pdf-find
-
-pdf-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-html-find html-find
-maybe-html-find:
-@if find
-maybe-html-find: html-find
-
-html-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-TAGS-find TAGS-find
-maybe-TAGS-find:
-@if find
-maybe-TAGS-find: TAGS-find
-
-TAGS-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-install-info-find install-info-find
-maybe-install-info-find:
-@if find
-maybe-install-info-find: install-info-find
-
-install-info-find: \
-    configure-find \
-    info-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-install-pdf-find install-pdf-find
-maybe-install-pdf-find:
-@if find
-maybe-install-pdf-find: install-pdf-find
-
-install-pdf-find: \
-    configure-find \
-    pdf-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-install-html-find install-html-find
-maybe-install-html-find:
-@if find
-maybe-install-html-find: install-html-find
-
-install-html-find: \
-    configure-find \
-    html-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-installcheck-find installcheck-find
-maybe-installcheck-find:
-@if find
-maybe-installcheck-find: installcheck-find
-
-installcheck-find: \
-    configure-find 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-mostlyclean-find mostlyclean-find
-maybe-mostlyclean-find:
-@if find
-maybe-mostlyclean-find: mostlyclean-find
-
-mostlyclean-find: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-clean-find clean-find
-maybe-clean-find:
-@if find
-maybe-clean-find: clean-find
-
-clean-find: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-distclean-find distclean-find
-maybe-distclean-find:
-@if find
-maybe-distclean-find: distclean-find
-
-distclean-find: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif find
-
-.PHONY: maybe-maintainer-clean-find maintainer-clean-find
-maybe-maintainer-clean-find:
-@if find
-maybe-maintainer-clean-find: maintainer-clean-find
-
-maintainer-clean-find: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./find/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in find" ; \
-	(cd $(HOST_SUBDIR)/find && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif find
-
-
-
 .PHONY: configure-fixincludes maybe-configure-fixincludes
 maybe-configure-fixincludes:
 @if gcc-bootstrap
@@ -12940,6 +7789,21 @@
 
 @endif fixincludes
 
+.PHONY: install-strip-fixincludes maybe-install-strip-fixincludes
+maybe-install-strip-fixincludes:
+@if fixincludes
+maybe-install-strip-fixincludes: install-strip-fixincludes
+
+install-strip-fixincludes: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/fixincludes && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif fixincludes
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-fixincludes info-fixincludes
@@ -13352,6 +8216,21 @@
 
 @endif flex
 
+.PHONY: install-strip-flex maybe-install-strip-flex
+maybe-install-strip-flex:
+@if flex
+maybe-install-strip-flex: install-strip-flex
+
+install-strip-flex: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/flex && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif flex
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-flex info-flex
@@ -14231,6 +9110,21 @@
 
 @endif gas
 
+.PHONY: install-strip-gas maybe-install-strip-gas
+maybe-install-strip-gas:
+@if gas
+maybe-install-strip-gas: install-strip-gas
+
+install-strip-gas: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gas && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gas
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gas info-gas
@@ -15097,6 +9991,21 @@
 
 @endif gcc
 
+.PHONY: install-strip-gcc maybe-install-strip-gcc
+maybe-install-strip-gcc:
+@if gcc
+maybe-install-strip-gcc: install-strip-gcc
+
+install-strip-gcc: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gcc && \
+	  $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) install-strip)
+
+@endif gcc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gcc info-gcc
@@ -15425,856 +10334,6 @@
 
 
 
-.PHONY: configure-gawk maybe-configure-gawk
-maybe-configure-gawk:
-@if gcc-bootstrap
-configure-gawk: stage_current
-@endif gcc-bootstrap
-@if gawk
-maybe-configure-gawk: configure-gawk
-configure-gawk: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/gawk/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gawk ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/gawk; \
-	cd "$(HOST_SUBDIR)/gawk" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/gawk/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/gawk"; \
-	libsrcdir="$$s/gawk"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif gawk
-
-
-
-
-
-.PHONY: all-gawk maybe-all-gawk
-maybe-all-gawk:
-@if gcc-bootstrap
-all-gawk: stage_current
-@endif gcc-bootstrap
-@if gawk
-TARGET-gawk=all
-maybe-all-gawk: all-gawk
-all-gawk: configure-gawk
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-gawk))
-@endif gawk
-
-
-
-
-.PHONY: check-gawk maybe-check-gawk
-maybe-check-gawk:
-@if gawk
-maybe-check-gawk: check-gawk
-
-check-gawk:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif gawk
-
-.PHONY: install-gawk maybe-install-gawk
-maybe-install-gawk:
-@if gawk
-maybe-install-gawk: install-gawk
-
-install-gawk: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif gawk
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-gawk info-gawk
-maybe-info-gawk:
-@if gawk
-maybe-info-gawk: info-gawk
-
-info-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-dvi-gawk dvi-gawk
-maybe-dvi-gawk:
-@if gawk
-maybe-dvi-gawk: dvi-gawk
-
-dvi-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-pdf-gawk pdf-gawk
-maybe-pdf-gawk:
-@if gawk
-maybe-pdf-gawk: pdf-gawk
-
-pdf-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-html-gawk html-gawk
-maybe-html-gawk:
-@if gawk
-maybe-html-gawk: html-gawk
-
-html-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-TAGS-gawk TAGS-gawk
-maybe-TAGS-gawk:
-@if gawk
-maybe-TAGS-gawk: TAGS-gawk
-
-TAGS-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-install-info-gawk install-info-gawk
-maybe-install-info-gawk:
-@if gawk
-maybe-install-info-gawk: install-info-gawk
-
-install-info-gawk: \
-    configure-gawk \
-    info-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-install-pdf-gawk install-pdf-gawk
-maybe-install-pdf-gawk:
-@if gawk
-maybe-install-pdf-gawk: install-pdf-gawk
-
-install-pdf-gawk: \
-    configure-gawk \
-    pdf-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-install-html-gawk install-html-gawk
-maybe-install-html-gawk:
-@if gawk
-maybe-install-html-gawk: install-html-gawk
-
-install-html-gawk: \
-    configure-gawk \
-    html-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-installcheck-gawk installcheck-gawk
-maybe-installcheck-gawk:
-@if gawk
-maybe-installcheck-gawk: installcheck-gawk
-
-installcheck-gawk: \
-    configure-gawk 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
-maybe-mostlyclean-gawk:
-@if gawk
-maybe-mostlyclean-gawk: mostlyclean-gawk
-
-mostlyclean-gawk: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-clean-gawk clean-gawk
-maybe-clean-gawk:
-@if gawk
-maybe-clean-gawk: clean-gawk
-
-clean-gawk: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-distclean-gawk distclean-gawk
-maybe-distclean-gawk:
-@if gawk
-maybe-distclean-gawk: distclean-gawk
-
-distclean-gawk: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif gawk
-
-.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
-maybe-maintainer-clean-gawk:
-@if gawk
-maybe-maintainer-clean-gawk: maintainer-clean-gawk
-
-maintainer-clean-gawk: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gawk/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in gawk" ; \
-	(cd $(HOST_SUBDIR)/gawk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif gawk
-
-
-
-.PHONY: configure-gettext maybe-configure-gettext
-maybe-configure-gettext:
-@if gcc-bootstrap
-configure-gettext: stage_current
-@endif gcc-bootstrap
-@if gettext
-maybe-configure-gettext: configure-gettext
-configure-gettext: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/gettext/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/gettext; \
-	cd "$(HOST_SUBDIR)/gettext" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/gettext/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/gettext"; \
-	libsrcdir="$$s/gettext"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif gettext
-
-
-
-
-
-.PHONY: all-gettext maybe-all-gettext
-maybe-all-gettext:
-@if gcc-bootstrap
-all-gettext: stage_current
-@endif gcc-bootstrap
-@if gettext
-TARGET-gettext=all
-maybe-all-gettext: all-gettext
-all-gettext: configure-gettext
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-gettext))
-@endif gettext
-
-
-
-
-.PHONY: check-gettext maybe-check-gettext
-maybe-check-gettext:
-@if gettext
-maybe-check-gettext: check-gettext
-
-check-gettext:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif gettext
-
-.PHONY: install-gettext maybe-install-gettext
-maybe-install-gettext:
-@if gettext
-maybe-install-gettext: install-gettext
-
-install-gettext: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif gettext
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-gettext info-gettext
-maybe-info-gettext:
-@if gettext
-maybe-info-gettext: info-gettext
-
-info-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-dvi-gettext dvi-gettext
-maybe-dvi-gettext:
-@if gettext
-maybe-dvi-gettext: dvi-gettext
-
-dvi-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-pdf-gettext pdf-gettext
-maybe-pdf-gettext:
-@if gettext
-maybe-pdf-gettext: pdf-gettext
-
-pdf-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-html-gettext html-gettext
-maybe-html-gettext:
-@if gettext
-maybe-html-gettext: html-gettext
-
-html-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-TAGS-gettext TAGS-gettext
-maybe-TAGS-gettext:
-@if gettext
-maybe-TAGS-gettext: TAGS-gettext
-
-TAGS-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-install-info-gettext install-info-gettext
-maybe-install-info-gettext:
-@if gettext
-maybe-install-info-gettext: install-info-gettext
-
-install-info-gettext: \
-    configure-gettext \
-    info-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-install-pdf-gettext install-pdf-gettext
-maybe-install-pdf-gettext:
-@if gettext
-maybe-install-pdf-gettext: install-pdf-gettext
-
-install-pdf-gettext: \
-    configure-gettext \
-    pdf-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-install-html-gettext install-html-gettext
-maybe-install-html-gettext:
-@if gettext
-maybe-install-html-gettext: install-html-gettext
-
-install-html-gettext: \
-    configure-gettext \
-    html-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-installcheck-gettext installcheck-gettext
-maybe-installcheck-gettext:
-@if gettext
-maybe-installcheck-gettext: installcheck-gettext
-
-installcheck-gettext: \
-    configure-gettext 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
-maybe-mostlyclean-gettext:
-@if gettext
-maybe-mostlyclean-gettext: mostlyclean-gettext
-
-mostlyclean-gettext: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-clean-gettext clean-gettext
-maybe-clean-gettext:
-@if gettext
-maybe-clean-gettext: clean-gettext
-
-clean-gettext: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-distclean-gettext distclean-gettext
-maybe-distclean-gettext:
-@if gettext
-maybe-distclean-gettext: distclean-gettext
-
-distclean-gettext: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif gettext
-
-.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
-maybe-maintainer-clean-gettext:
-@if gettext
-maybe-maintainer-clean-gettext: maintainer-clean-gettext
-
-maintainer-clean-gettext: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gettext/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in gettext" ; \
-	(cd $(HOST_SUBDIR)/gettext && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif gettext
-
-
-
 .PHONY: configure-gmp maybe-configure-gmp
 maybe-configure-gmp:
 @if gcc-bootstrap
@@ -16813,6 +10872,15 @@
 
 @endif gmp
 
+.PHONY: install-strip-gmp maybe-install-strip-gmp
+maybe-install-strip-gmp:
+@if gmp
+maybe-install-strip-gmp: install-strip-gmp
+
+install-strip-gmp:
+
+@endif gmp
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gmp info-gmp
@@ -17679,6 +11747,15 @@
 
 @endif mpfr
 
+.PHONY: install-strip-mpfr maybe-install-strip-mpfr
+maybe-install-strip-mpfr:
+@if mpfr
+maybe-install-strip-mpfr: install-strip-mpfr
+
+install-strip-mpfr:
+
+@endif mpfr
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-mpfr info-mpfr
@@ -18545,6 +12622,15 @@
 
 @endif mpc
 
+.PHONY: install-strip-mpc maybe-install-strip-mpc
+maybe-install-strip-mpc:
+@if mpc
+maybe-install-strip-mpc: install-strip-mpc
+
+install-strip-mpc:
+
+@endif mpc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-mpc info-mpc
@@ -19411,6 +13497,15 @@
 
 @endif ppl
 
+.PHONY: install-strip-ppl maybe-install-strip-ppl
+maybe-install-strip-ppl:
+@if ppl
+maybe-install-strip-ppl: install-strip-ppl
+
+install-strip-ppl:
+
+@endif ppl
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-ppl info-ppl
@@ -20277,6 +14372,15 @@
 
 @endif cloog
 
+.PHONY: install-strip-cloog maybe-install-strip-cloog
+maybe-install-strip-cloog:
+@if cloog
+maybe-install-strip-cloog: install-strip-cloog
+
+install-strip-cloog:
+
+@endif cloog
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-cloog info-cloog
@@ -21143,6 +15247,15 @@
 
 @endif libelf
 
+.PHONY: install-strip-libelf maybe-install-strip-libelf
+maybe-install-strip-libelf:
+@if libelf
+maybe-install-strip-libelf: install-strip-libelf
+
+install-strip-libelf:
+
+@endif libelf
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libelf info-libelf
@@ -21471,431 +15584,6 @@
 
 
 
-.PHONY: configure-gnuserv maybe-configure-gnuserv
-maybe-configure-gnuserv:
-@if gcc-bootstrap
-configure-gnuserv: stage_current
-@endif gcc-bootstrap
-@if gnuserv
-maybe-configure-gnuserv: configure-gnuserv
-configure-gnuserv: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/gnuserv/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnuserv ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/gnuserv; \
-	cd "$(HOST_SUBDIR)/gnuserv" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/gnuserv/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/gnuserv"; \
-	libsrcdir="$$s/gnuserv"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif gnuserv
-
-
-
-
-
-.PHONY: all-gnuserv maybe-all-gnuserv
-maybe-all-gnuserv:
-@if gcc-bootstrap
-all-gnuserv: stage_current
-@endif gcc-bootstrap
-@if gnuserv
-TARGET-gnuserv=all
-maybe-all-gnuserv: all-gnuserv
-all-gnuserv: configure-gnuserv
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-gnuserv))
-@endif gnuserv
-
-
-
-
-.PHONY: check-gnuserv maybe-check-gnuserv
-maybe-check-gnuserv:
-@if gnuserv
-maybe-check-gnuserv: check-gnuserv
-
-check-gnuserv:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif gnuserv
-
-.PHONY: install-gnuserv maybe-install-gnuserv
-maybe-install-gnuserv:
-@if gnuserv
-maybe-install-gnuserv: install-gnuserv
-
-install-gnuserv: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif gnuserv
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-gnuserv info-gnuserv
-maybe-info-gnuserv:
-@if gnuserv
-maybe-info-gnuserv: info-gnuserv
-
-info-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-dvi-gnuserv dvi-gnuserv
-maybe-dvi-gnuserv:
-@if gnuserv
-maybe-dvi-gnuserv: dvi-gnuserv
-
-dvi-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-pdf-gnuserv pdf-gnuserv
-maybe-pdf-gnuserv:
-@if gnuserv
-maybe-pdf-gnuserv: pdf-gnuserv
-
-pdf-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-html-gnuserv html-gnuserv
-maybe-html-gnuserv:
-@if gnuserv
-maybe-html-gnuserv: html-gnuserv
-
-html-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
-maybe-TAGS-gnuserv:
-@if gnuserv
-maybe-TAGS-gnuserv: TAGS-gnuserv
-
-TAGS-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-install-info-gnuserv install-info-gnuserv
-maybe-install-info-gnuserv:
-@if gnuserv
-maybe-install-info-gnuserv: install-info-gnuserv
-
-install-info-gnuserv: \
-    configure-gnuserv \
-    info-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-install-pdf-gnuserv install-pdf-gnuserv
-maybe-install-pdf-gnuserv:
-@if gnuserv
-maybe-install-pdf-gnuserv: install-pdf-gnuserv
-
-install-pdf-gnuserv: \
-    configure-gnuserv \
-    pdf-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-install-html-gnuserv install-html-gnuserv
-maybe-install-html-gnuserv:
-@if gnuserv
-maybe-install-html-gnuserv: install-html-gnuserv
-
-install-html-gnuserv: \
-    configure-gnuserv \
-    html-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
-maybe-installcheck-gnuserv:
-@if gnuserv
-maybe-installcheck-gnuserv: installcheck-gnuserv
-
-installcheck-gnuserv: \
-    configure-gnuserv 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
-maybe-mostlyclean-gnuserv:
-@if gnuserv
-maybe-mostlyclean-gnuserv: mostlyclean-gnuserv
-
-mostlyclean-gnuserv: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-clean-gnuserv clean-gnuserv
-maybe-clean-gnuserv:
-@if gnuserv
-maybe-clean-gnuserv: clean-gnuserv
-
-clean-gnuserv: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-distclean-gnuserv distclean-gnuserv
-maybe-distclean-gnuserv:
-@if gnuserv
-maybe-distclean-gnuserv: distclean-gnuserv
-
-distclean-gnuserv: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif gnuserv
-
-.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
-maybe-maintainer-clean-gnuserv:
-@if gnuserv
-maybe-maintainer-clean-gnuserv: maintainer-clean-gnuserv
-
-maintainer-clean-gnuserv: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnuserv/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in gnuserv" ; \
-	(cd $(HOST_SUBDIR)/gnuserv && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif gnuserv
-
-
-
 .PHONY: configure-gold maybe-configure-gold
 maybe-configure-gold:
 @if gcc-bootstrap
@@ -22434,6 +16122,21 @@
 
 @endif gold
 
+.PHONY: install-strip-gold maybe-install-strip-gold
+maybe-install-strip-gold:
+@if gold
+maybe-install-strip-gold: install-strip-gold
+
+install-strip-gold: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gold && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gold
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gold info-gold
@@ -22846,6 +16549,21 @@
 
 @endif gprof
 
+.PHONY: install-strip-gprof maybe-install-strip-gprof
+maybe-install-strip-gprof:
+@if gprof
+maybe-install-strip-gprof: install-strip-gprof
+
+install-strip-gprof: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gprof && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gprof
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gprof info-gprof
@@ -23187,1281 +16905,6 @@
 
 
 
-.PHONY: configure-gzip maybe-configure-gzip
-maybe-configure-gzip:
-@if gcc-bootstrap
-configure-gzip: stage_current
-@endif gcc-bootstrap
-@if gzip
-maybe-configure-gzip: configure-gzip
-configure-gzip: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/gzip/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gzip ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/gzip; \
-	cd "$(HOST_SUBDIR)/gzip" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/gzip/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/gzip"; \
-	libsrcdir="$$s/gzip"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif gzip
-
-
-
-
-
-.PHONY: all-gzip maybe-all-gzip
-maybe-all-gzip:
-@if gcc-bootstrap
-all-gzip: stage_current
-@endif gcc-bootstrap
-@if gzip
-TARGET-gzip=all
-maybe-all-gzip: all-gzip
-all-gzip: configure-gzip
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-gzip))
-@endif gzip
-
-
-
-
-.PHONY: check-gzip maybe-check-gzip
-maybe-check-gzip:
-@if gzip
-maybe-check-gzip: check-gzip
-
-check-gzip:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif gzip
-
-.PHONY: install-gzip maybe-install-gzip
-maybe-install-gzip:
-@if gzip
-maybe-install-gzip: install-gzip
-
-install-gzip: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif gzip
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-gzip info-gzip
-maybe-info-gzip:
-@if gzip
-maybe-info-gzip: info-gzip
-
-info-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-dvi-gzip dvi-gzip
-maybe-dvi-gzip:
-@if gzip
-maybe-dvi-gzip: dvi-gzip
-
-dvi-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-pdf-gzip pdf-gzip
-maybe-pdf-gzip:
-@if gzip
-maybe-pdf-gzip: pdf-gzip
-
-pdf-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-html-gzip html-gzip
-maybe-html-gzip:
-@if gzip
-maybe-html-gzip: html-gzip
-
-html-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-TAGS-gzip TAGS-gzip
-maybe-TAGS-gzip:
-@if gzip
-maybe-TAGS-gzip: TAGS-gzip
-
-TAGS-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-install-info-gzip install-info-gzip
-maybe-install-info-gzip:
-@if gzip
-maybe-install-info-gzip: install-info-gzip
-
-install-info-gzip: \
-    configure-gzip \
-    info-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-install-pdf-gzip install-pdf-gzip
-maybe-install-pdf-gzip:
-@if gzip
-maybe-install-pdf-gzip: install-pdf-gzip
-
-install-pdf-gzip: \
-    configure-gzip \
-    pdf-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-install-html-gzip install-html-gzip
-maybe-install-html-gzip:
-@if gzip
-maybe-install-html-gzip: install-html-gzip
-
-install-html-gzip: \
-    configure-gzip \
-    html-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-installcheck-gzip installcheck-gzip
-maybe-installcheck-gzip:
-@if gzip
-maybe-installcheck-gzip: installcheck-gzip
-
-installcheck-gzip: \
-    configure-gzip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
-maybe-mostlyclean-gzip:
-@if gzip
-maybe-mostlyclean-gzip: mostlyclean-gzip
-
-mostlyclean-gzip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-clean-gzip clean-gzip
-maybe-clean-gzip:
-@if gzip
-maybe-clean-gzip: clean-gzip
-
-clean-gzip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-distclean-gzip distclean-gzip
-maybe-distclean-gzip:
-@if gzip
-maybe-distclean-gzip: distclean-gzip
-
-distclean-gzip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif gzip
-
-.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
-maybe-maintainer-clean-gzip:
-@if gzip
-maybe-maintainer-clean-gzip: maintainer-clean-gzip
-
-maintainer-clean-gzip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gzip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in gzip" ; \
-	(cd $(HOST_SUBDIR)/gzip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif gzip
-
-
-
-.PHONY: configure-hello maybe-configure-hello
-maybe-configure-hello:
-@if gcc-bootstrap
-configure-hello: stage_current
-@endif gcc-bootstrap
-@if hello
-maybe-configure-hello: configure-hello
-configure-hello: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/hello/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/hello ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/hello; \
-	cd "$(HOST_SUBDIR)/hello" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/hello/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/hello"; \
-	libsrcdir="$$s/hello"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif hello
-
-
-
-
-
-.PHONY: all-hello maybe-all-hello
-maybe-all-hello:
-@if gcc-bootstrap
-all-hello: stage_current
-@endif gcc-bootstrap
-@if hello
-TARGET-hello=all
-maybe-all-hello: all-hello
-all-hello: configure-hello
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-hello))
-@endif hello
-
-
-
-
-.PHONY: check-hello maybe-check-hello
-maybe-check-hello:
-@if hello
-maybe-check-hello: check-hello
-
-check-hello:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif hello
-
-.PHONY: install-hello maybe-install-hello
-maybe-install-hello:
-@if hello
-maybe-install-hello: install-hello
-
-install-hello: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif hello
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-hello info-hello
-maybe-info-hello:
-@if hello
-maybe-info-hello: info-hello
-
-info-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-dvi-hello dvi-hello
-maybe-dvi-hello:
-@if hello
-maybe-dvi-hello: dvi-hello
-
-dvi-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-pdf-hello pdf-hello
-maybe-pdf-hello:
-@if hello
-maybe-pdf-hello: pdf-hello
-
-pdf-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-html-hello html-hello
-maybe-html-hello:
-@if hello
-maybe-html-hello: html-hello
-
-html-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-TAGS-hello TAGS-hello
-maybe-TAGS-hello:
-@if hello
-maybe-TAGS-hello: TAGS-hello
-
-TAGS-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-install-info-hello install-info-hello
-maybe-install-info-hello:
-@if hello
-maybe-install-info-hello: install-info-hello
-
-install-info-hello: \
-    configure-hello \
-    info-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-install-pdf-hello install-pdf-hello
-maybe-install-pdf-hello:
-@if hello
-maybe-install-pdf-hello: install-pdf-hello
-
-install-pdf-hello: \
-    configure-hello \
-    pdf-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-install-html-hello install-html-hello
-maybe-install-html-hello:
-@if hello
-maybe-install-html-hello: install-html-hello
-
-install-html-hello: \
-    configure-hello \
-    html-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-installcheck-hello installcheck-hello
-maybe-installcheck-hello:
-@if hello
-maybe-installcheck-hello: installcheck-hello
-
-installcheck-hello: \
-    configure-hello 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-mostlyclean-hello mostlyclean-hello
-maybe-mostlyclean-hello:
-@if hello
-maybe-mostlyclean-hello: mostlyclean-hello
-
-mostlyclean-hello: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-clean-hello clean-hello
-maybe-clean-hello:
-@if hello
-maybe-clean-hello: clean-hello
-
-clean-hello: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-distclean-hello distclean-hello
-maybe-distclean-hello:
-@if hello
-maybe-distclean-hello: distclean-hello
-
-distclean-hello: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif hello
-
-.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
-maybe-maintainer-clean-hello:
-@if hello
-maybe-maintainer-clean-hello: maintainer-clean-hello
-
-maintainer-clean-hello: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./hello/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in hello" ; \
-	(cd $(HOST_SUBDIR)/hello && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif hello
-
-
-
-.PHONY: configure-indent maybe-configure-indent
-maybe-configure-indent:
-@if gcc-bootstrap
-configure-indent: stage_current
-@endif gcc-bootstrap
-@if indent
-maybe-configure-indent: configure-indent
-configure-indent: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/indent/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/indent ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/indent; \
-	cd "$(HOST_SUBDIR)/indent" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/indent/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/indent"; \
-	libsrcdir="$$s/indent"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif indent
-
-
-
-
-
-.PHONY: all-indent maybe-all-indent
-maybe-all-indent:
-@if gcc-bootstrap
-all-indent: stage_current
-@endif gcc-bootstrap
-@if indent
-TARGET-indent=all
-maybe-all-indent: all-indent
-all-indent: configure-indent
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-indent))
-@endif indent
-
-
-
-
-.PHONY: check-indent maybe-check-indent
-maybe-check-indent:
-@if indent
-maybe-check-indent: check-indent
-
-check-indent:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif indent
-
-.PHONY: install-indent maybe-install-indent
-maybe-install-indent:
-@if indent
-maybe-install-indent: install-indent
-
-install-indent: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif indent
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-indent info-indent
-maybe-info-indent:
-@if indent
-maybe-info-indent: info-indent
-
-info-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-dvi-indent dvi-indent
-maybe-dvi-indent:
-@if indent
-maybe-dvi-indent: dvi-indent
-
-dvi-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-pdf-indent pdf-indent
-maybe-pdf-indent:
-@if indent
-maybe-pdf-indent: pdf-indent
-
-pdf-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-html-indent html-indent
-maybe-html-indent:
-@if indent
-maybe-html-indent: html-indent
-
-html-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-TAGS-indent TAGS-indent
-maybe-TAGS-indent:
-@if indent
-maybe-TAGS-indent: TAGS-indent
-
-TAGS-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-install-info-indent install-info-indent
-maybe-install-info-indent:
-@if indent
-maybe-install-info-indent: install-info-indent
-
-install-info-indent: \
-    configure-indent \
-    info-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-install-pdf-indent install-pdf-indent
-maybe-install-pdf-indent:
-@if indent
-maybe-install-pdf-indent: install-pdf-indent
-
-install-pdf-indent: \
-    configure-indent \
-    pdf-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-install-html-indent install-html-indent
-maybe-install-html-indent:
-@if indent
-maybe-install-html-indent: install-html-indent
-
-install-html-indent: \
-    configure-indent \
-    html-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-installcheck-indent installcheck-indent
-maybe-installcheck-indent:
-@if indent
-maybe-installcheck-indent: installcheck-indent
-
-installcheck-indent: \
-    configure-indent 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-mostlyclean-indent mostlyclean-indent
-maybe-mostlyclean-indent:
-@if indent
-maybe-mostlyclean-indent: mostlyclean-indent
-
-mostlyclean-indent: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-clean-indent clean-indent
-maybe-clean-indent:
-@if indent
-maybe-clean-indent: clean-indent
-
-clean-indent: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-distclean-indent distclean-indent
-maybe-distclean-indent:
-@if indent
-maybe-distclean-indent: distclean-indent
-
-distclean-indent: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif indent
-
-.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
-maybe-maintainer-clean-indent:
-@if indent
-maybe-maintainer-clean-indent: maintainer-clean-indent
-
-maintainer-clean-indent: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./indent/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in indent" ; \
-	(cd $(HOST_SUBDIR)/indent && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif indent
-
-
-
 .PHONY: configure-intl maybe-configure-intl
 maybe-configure-intl:
 @if gcc-bootstrap
@@ -25000,6 +17443,21 @@
 
 @endif intl
 
+.PHONY: install-strip-intl maybe-install-strip-intl
+maybe-install-strip-intl:
+@if intl
+maybe-install-strip-intl: install-strip-intl
+
+install-strip-intl: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/intl && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif intl
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-intl info-intl
@@ -25412,6 +17870,21 @@
 
 @endif tcl
 
+.PHONY: install-strip-tcl maybe-install-strip-tcl
+maybe-install-strip-tcl:
+@if tcl
+maybe-install-strip-tcl: install-strip-tcl
+
+install-strip-tcl: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/tcl && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif tcl
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-tcl info-tcl
@@ -25822,6 +18295,21 @@
 
 @endif itcl
 
+.PHONY: install-strip-itcl maybe-install-strip-itcl
+maybe-install-strip-itcl:
+@if itcl
+maybe-install-strip-itcl: install-strip-itcl
+
+install-strip-itcl: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/itcl && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif itcl
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-itcl info-itcl
@@ -26701,6 +19189,21 @@
 
 @endif ld
 
+.PHONY: install-strip-ld maybe-install-strip-ld
+maybe-install-strip-ld:
+@if ld
+maybe-install-strip-ld: install-strip-ld
+
+install-strip-ld: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/ld && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif ld
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-ld info-ld
@@ -27567,6 +20070,21 @@
 
 @endif libcpp
 
+.PHONY: install-strip-libcpp maybe-install-strip-libcpp
+maybe-install-strip-libcpp:
+@if libcpp
+maybe-install-strip-libcpp: install-strip-libcpp
+
+install-strip-libcpp: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libcpp && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif libcpp
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libcpp info-libcpp
@@ -28433,6 +20951,21 @@
 
 @endif libdecnumber
 
+.PHONY: install-strip-libdecnumber maybe-install-strip-libdecnumber
+maybe-install-strip-libdecnumber:
+@if libdecnumber
+maybe-install-strip-libdecnumber: install-strip-libdecnumber
+
+install-strip-libdecnumber: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libdecnumber && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif libdecnumber
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libdecnumber info-libdecnumber
@@ -28845,6 +21378,21 @@
 
 @endif libgui
 
+.PHONY: install-strip-libgui maybe-install-strip-libgui
+maybe-install-strip-libgui:
+@if libgui
+maybe-install-strip-libgui: install-strip-libgui
+
+install-strip-libgui: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libgui && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif libgui
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libgui info-libgui
@@ -29730,6 +22278,21 @@
 
 @endif libiberty
 
+.PHONY: install-strip-libiberty maybe-install-strip-libiberty
+maybe-install-strip-libiberty:
+@if libiberty
+maybe-install-strip-libiberty: install-strip-libiberty
+
+install-strip-libiberty: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libiberty && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif libiberty
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libiberty info-libiberty
@@ -30136,6 +22699,15 @@
 
 @endif libiconv
 
+.PHONY: install-strip-libiconv maybe-install-strip-libiconv
+maybe-install-strip-libiconv:
+@if libiconv
+maybe-install-strip-libiconv: install-strip-libiconv
+
+install-strip-libiconv:
+
+@endif libiconv
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libiconv info-libiconv
@@ -30426,431 +22998,6 @@
 
 
 
-.PHONY: configure-libtool maybe-configure-libtool
-maybe-configure-libtool:
-@if gcc-bootstrap
-configure-libtool: stage_current
-@endif gcc-bootstrap
-@if libtool
-maybe-configure-libtool: configure-libtool
-configure-libtool: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/libtool/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtool ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/libtool; \
-	cd "$(HOST_SUBDIR)/libtool" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/libtool/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/libtool"; \
-	libsrcdir="$$s/libtool"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif libtool
-
-
-
-
-
-.PHONY: all-libtool maybe-all-libtool
-maybe-all-libtool:
-@if gcc-bootstrap
-all-libtool: stage_current
-@endif gcc-bootstrap
-@if libtool
-TARGET-libtool=all
-maybe-all-libtool: all-libtool
-all-libtool: configure-libtool
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-libtool))
-@endif libtool
-
-
-
-
-.PHONY: check-libtool maybe-check-libtool
-maybe-check-libtool:
-@if libtool
-maybe-check-libtool: check-libtool
-
-check-libtool:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif libtool
-
-.PHONY: install-libtool maybe-install-libtool
-maybe-install-libtool:
-@if libtool
-maybe-install-libtool: install-libtool
-
-install-libtool: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif libtool
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-libtool info-libtool
-maybe-info-libtool:
-@if libtool
-maybe-info-libtool: info-libtool
-
-info-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-dvi-libtool dvi-libtool
-maybe-dvi-libtool:
-@if libtool
-maybe-dvi-libtool: dvi-libtool
-
-dvi-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-pdf-libtool pdf-libtool
-maybe-pdf-libtool:
-@if libtool
-maybe-pdf-libtool: pdf-libtool
-
-pdf-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-html-libtool html-libtool
-maybe-html-libtool:
-@if libtool
-maybe-html-libtool: html-libtool
-
-html-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-TAGS-libtool TAGS-libtool
-maybe-TAGS-libtool:
-@if libtool
-maybe-TAGS-libtool: TAGS-libtool
-
-TAGS-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-install-info-libtool install-info-libtool
-maybe-install-info-libtool:
-@if libtool
-maybe-install-info-libtool: install-info-libtool
-
-install-info-libtool: \
-    configure-libtool \
-    info-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-install-pdf-libtool install-pdf-libtool
-maybe-install-pdf-libtool:
-@if libtool
-maybe-install-pdf-libtool: install-pdf-libtool
-
-install-pdf-libtool: \
-    configure-libtool \
-    pdf-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-install-html-libtool install-html-libtool
-maybe-install-html-libtool:
-@if libtool
-maybe-install-html-libtool: install-html-libtool
-
-install-html-libtool: \
-    configure-libtool \
-    html-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-installcheck-libtool installcheck-libtool
-maybe-installcheck-libtool:
-@if libtool
-maybe-installcheck-libtool: installcheck-libtool
-
-installcheck-libtool: \
-    configure-libtool 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
-maybe-mostlyclean-libtool:
-@if libtool
-maybe-mostlyclean-libtool: mostlyclean-libtool
-
-mostlyclean-libtool: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-clean-libtool clean-libtool
-maybe-clean-libtool:
-@if libtool
-maybe-clean-libtool: clean-libtool
-
-clean-libtool: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-distclean-libtool distclean-libtool
-maybe-distclean-libtool:
-@if libtool
-maybe-distclean-libtool: distclean-libtool
-
-distclean-libtool: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif libtool
-
-.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
-maybe-maintainer-clean-libtool:
-@if libtool
-maybe-maintainer-clean-libtool: maintainer-clean-libtool
-
-maintainer-clean-libtool: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./libtool/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in libtool" ; \
-	(cd $(HOST_SUBDIR)/libtool && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif libtool
-
-
-
 .PHONY: configure-m4 maybe-configure-m4
 maybe-configure-m4:
 @if gcc-bootstrap
@@ -30935,6 +23082,21 @@
 
 @endif m4
 
+.PHONY: install-strip-m4 maybe-install-strip-m4
+maybe-install-strip-m4:
+@if m4
+maybe-install-strip-m4: install-strip-m4
+
+install-strip-m4: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/m4 && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif m4
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-m4 info-m4
@@ -31276,2550 +23438,6 @@
 
 
 
-.PHONY: configure-make maybe-configure-make
-maybe-configure-make:
-@if gcc-bootstrap
-configure-make: stage_current
-@endif gcc-bootstrap
-@if make
-maybe-configure-make: configure-make
-configure-make: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/make/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/make ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/make; \
-	cd "$(HOST_SUBDIR)/make" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/make/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/make"; \
-	libsrcdir="$$s/make"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif make
-
-
-
-
-
-.PHONY: all-make maybe-all-make
-maybe-all-make:
-@if gcc-bootstrap
-all-make: stage_current
-@endif gcc-bootstrap
-@if make
-TARGET-make=all
-maybe-all-make: all-make
-all-make: configure-make
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-make))
-@endif make
-
-
-
-
-.PHONY: check-make maybe-check-make
-maybe-check-make:
-@if make
-maybe-check-make: check-make
-
-check-make:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif make
-
-.PHONY: install-make maybe-install-make
-maybe-install-make:
-@if make
-maybe-install-make: install-make
-
-install-make: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif make
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-make info-make
-maybe-info-make:
-@if make
-maybe-info-make: info-make
-
-info-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-dvi-make dvi-make
-maybe-dvi-make:
-@if make
-maybe-dvi-make: dvi-make
-
-dvi-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-pdf-make pdf-make
-maybe-pdf-make:
-@if make
-maybe-pdf-make: pdf-make
-
-pdf-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-html-make html-make
-maybe-html-make:
-@if make
-maybe-html-make: html-make
-
-html-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-TAGS-make TAGS-make
-maybe-TAGS-make:
-@if make
-maybe-TAGS-make: TAGS-make
-
-TAGS-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-install-info-make install-info-make
-maybe-install-info-make:
-@if make
-maybe-install-info-make: install-info-make
-
-install-info-make: \
-    configure-make \
-    info-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-install-pdf-make install-pdf-make
-maybe-install-pdf-make:
-@if make
-maybe-install-pdf-make: install-pdf-make
-
-install-pdf-make: \
-    configure-make \
-    pdf-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-install-html-make install-html-make
-maybe-install-html-make:
-@if make
-maybe-install-html-make: install-html-make
-
-install-html-make: \
-    configure-make \
-    html-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-installcheck-make installcheck-make
-maybe-installcheck-make:
-@if make
-maybe-installcheck-make: installcheck-make
-
-installcheck-make: \
-    configure-make 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-mostlyclean-make mostlyclean-make
-maybe-mostlyclean-make:
-@if make
-maybe-mostlyclean-make: mostlyclean-make
-
-mostlyclean-make: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-clean-make clean-make
-maybe-clean-make:
-@if make
-maybe-clean-make: clean-make
-
-clean-make: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-distclean-make distclean-make
-maybe-distclean-make:
-@if make
-maybe-distclean-make: distclean-make
-
-distclean-make: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif make
-
-.PHONY: maybe-maintainer-clean-make maintainer-clean-make
-maybe-maintainer-clean-make:
-@if make
-maybe-maintainer-clean-make: maintainer-clean-make
-
-maintainer-clean-make: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./make/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in make" ; \
-	(cd $(HOST_SUBDIR)/make && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif make
-
-
-
-.PHONY: configure-mmalloc maybe-configure-mmalloc
-maybe-configure-mmalloc:
-@if gcc-bootstrap
-configure-mmalloc: stage_current
-@endif gcc-bootstrap
-@if mmalloc
-maybe-configure-mmalloc: configure-mmalloc
-configure-mmalloc: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/mmalloc/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mmalloc ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/mmalloc; \
-	cd "$(HOST_SUBDIR)/mmalloc" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/mmalloc/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/mmalloc"; \
-	libsrcdir="$$s/mmalloc"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif mmalloc
-
-
-
-
-
-.PHONY: all-mmalloc maybe-all-mmalloc
-maybe-all-mmalloc:
-@if gcc-bootstrap
-all-mmalloc: stage_current
-@endif gcc-bootstrap
-@if mmalloc
-TARGET-mmalloc=all
-maybe-all-mmalloc: all-mmalloc
-all-mmalloc: configure-mmalloc
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-mmalloc))
-@endif mmalloc
-
-
-
-
-.PHONY: check-mmalloc maybe-check-mmalloc
-maybe-check-mmalloc:
-@if mmalloc
-maybe-check-mmalloc: check-mmalloc
-
-check-mmalloc:
-
-@endif mmalloc
-
-.PHONY: install-mmalloc maybe-install-mmalloc
-maybe-install-mmalloc:
-@if mmalloc
-maybe-install-mmalloc: install-mmalloc
-
-install-mmalloc: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif mmalloc
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-mmalloc info-mmalloc
-maybe-info-mmalloc:
-@if mmalloc
-maybe-info-mmalloc: info-mmalloc
-
-info-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-dvi-mmalloc dvi-mmalloc
-maybe-dvi-mmalloc:
-@if mmalloc
-maybe-dvi-mmalloc: dvi-mmalloc
-
-dvi-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-pdf-mmalloc pdf-mmalloc
-maybe-pdf-mmalloc:
-@if mmalloc
-maybe-pdf-mmalloc: pdf-mmalloc
-
-pdf-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-html-mmalloc html-mmalloc
-maybe-html-mmalloc:
-@if mmalloc
-maybe-html-mmalloc: html-mmalloc
-
-html-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
-maybe-TAGS-mmalloc:
-@if mmalloc
-maybe-TAGS-mmalloc: TAGS-mmalloc
-
-TAGS-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-install-info-mmalloc install-info-mmalloc
-maybe-install-info-mmalloc:
-@if mmalloc
-maybe-install-info-mmalloc: install-info-mmalloc
-
-install-info-mmalloc: \
-    configure-mmalloc \
-    info-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-install-pdf-mmalloc install-pdf-mmalloc
-maybe-install-pdf-mmalloc:
-@if mmalloc
-maybe-install-pdf-mmalloc: install-pdf-mmalloc
-
-install-pdf-mmalloc: \
-    configure-mmalloc \
-    pdf-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-install-html-mmalloc install-html-mmalloc
-maybe-install-html-mmalloc:
-@if mmalloc
-maybe-install-html-mmalloc: install-html-mmalloc
-
-install-html-mmalloc: \
-    configure-mmalloc \
-    html-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
-maybe-installcheck-mmalloc:
-@if mmalloc
-maybe-installcheck-mmalloc: installcheck-mmalloc
-
-installcheck-mmalloc: \
-    configure-mmalloc 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
-maybe-mostlyclean-mmalloc:
-@if mmalloc
-maybe-mostlyclean-mmalloc: mostlyclean-mmalloc
-
-mostlyclean-mmalloc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-clean-mmalloc clean-mmalloc
-maybe-clean-mmalloc:
-@if mmalloc
-maybe-clean-mmalloc: clean-mmalloc
-
-clean-mmalloc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-distclean-mmalloc distclean-mmalloc
-maybe-distclean-mmalloc:
-@if mmalloc
-maybe-distclean-mmalloc: distclean-mmalloc
-
-distclean-mmalloc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif mmalloc
-
-.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
-maybe-maintainer-clean-mmalloc:
-@if mmalloc
-maybe-maintainer-clean-mmalloc: maintainer-clean-mmalloc
-
-maintainer-clean-mmalloc: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./mmalloc/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in mmalloc" ; \
-	(cd $(HOST_SUBDIR)/mmalloc && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif mmalloc
-
-
-
-.PHONY: configure-patch maybe-configure-patch
-maybe-configure-patch:
-@if gcc-bootstrap
-configure-patch: stage_current
-@endif gcc-bootstrap
-@if patch
-maybe-configure-patch: configure-patch
-configure-patch: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/patch/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/patch ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/patch; \
-	cd "$(HOST_SUBDIR)/patch" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/patch/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/patch"; \
-	libsrcdir="$$s/patch"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif patch
-
-
-
-
-
-.PHONY: all-patch maybe-all-patch
-maybe-all-patch:
-@if gcc-bootstrap
-all-patch: stage_current
-@endif gcc-bootstrap
-@if patch
-TARGET-patch=all
-maybe-all-patch: all-patch
-all-patch: configure-patch
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-patch))
-@endif patch
-
-
-
-
-.PHONY: check-patch maybe-check-patch
-maybe-check-patch:
-@if patch
-maybe-check-patch: check-patch
-
-check-patch:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif patch
-
-.PHONY: install-patch maybe-install-patch
-maybe-install-patch:
-@if patch
-maybe-install-patch: install-patch
-
-install-patch: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif patch
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-patch info-patch
-maybe-info-patch:
-@if patch
-maybe-info-patch: info-patch
-
-info-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-dvi-patch dvi-patch
-maybe-dvi-patch:
-@if patch
-maybe-dvi-patch: dvi-patch
-
-dvi-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-pdf-patch pdf-patch
-maybe-pdf-patch:
-@if patch
-maybe-pdf-patch: pdf-patch
-
-pdf-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-html-patch html-patch
-maybe-html-patch:
-@if patch
-maybe-html-patch: html-patch
-
-html-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-TAGS-patch TAGS-patch
-maybe-TAGS-patch:
-@if patch
-maybe-TAGS-patch: TAGS-patch
-
-TAGS-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-install-info-patch install-info-patch
-maybe-install-info-patch:
-@if patch
-maybe-install-info-patch: install-info-patch
-
-install-info-patch: \
-    configure-patch \
-    info-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-install-pdf-patch install-pdf-patch
-maybe-install-pdf-patch:
-@if patch
-maybe-install-pdf-patch: install-pdf-patch
-
-install-pdf-patch: \
-    configure-patch \
-    pdf-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-install-html-patch install-html-patch
-maybe-install-html-patch:
-@if patch
-maybe-install-html-patch: install-html-patch
-
-install-html-patch: \
-    configure-patch \
-    html-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-installcheck-patch installcheck-patch
-maybe-installcheck-patch:
-@if patch
-maybe-installcheck-patch: installcheck-patch
-
-installcheck-patch: \
-    configure-patch 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-mostlyclean-patch mostlyclean-patch
-maybe-mostlyclean-patch:
-@if patch
-maybe-mostlyclean-patch: mostlyclean-patch
-
-mostlyclean-patch: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-clean-patch clean-patch
-maybe-clean-patch:
-@if patch
-maybe-clean-patch: clean-patch
-
-clean-patch: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-distclean-patch distclean-patch
-maybe-distclean-patch:
-@if patch
-maybe-distclean-patch: distclean-patch
-
-distclean-patch: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif patch
-
-.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
-maybe-maintainer-clean-patch:
-@if patch
-maybe-maintainer-clean-patch: maintainer-clean-patch
-
-maintainer-clean-patch: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./patch/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in patch" ; \
-	(cd $(HOST_SUBDIR)/patch && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif patch
-
-
-
-.PHONY: configure-perl maybe-configure-perl
-maybe-configure-perl:
-@if gcc-bootstrap
-configure-perl: stage_current
-@endif gcc-bootstrap
-@if perl
-maybe-configure-perl: configure-perl
-configure-perl: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/perl/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/perl ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/perl; \
-	cd "$(HOST_SUBDIR)/perl" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/perl/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/perl"; \
-	libsrcdir="$$s/perl"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif perl
-
-
-
-
-
-.PHONY: all-perl maybe-all-perl
-maybe-all-perl:
-@if gcc-bootstrap
-all-perl: stage_current
-@endif gcc-bootstrap
-@if perl
-TARGET-perl=all
-maybe-all-perl: all-perl
-all-perl: configure-perl
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-perl))
-@endif perl
-
-
-
-
-.PHONY: check-perl maybe-check-perl
-maybe-check-perl:
-@if perl
-maybe-check-perl: check-perl
-
-check-perl:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif perl
-
-.PHONY: install-perl maybe-install-perl
-maybe-install-perl:
-@if perl
-maybe-install-perl: install-perl
-
-install-perl: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif perl
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-perl info-perl
-maybe-info-perl:
-@if perl
-maybe-info-perl: info-perl
-
-info-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-dvi-perl dvi-perl
-maybe-dvi-perl:
-@if perl
-maybe-dvi-perl: dvi-perl
-
-dvi-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-pdf-perl pdf-perl
-maybe-pdf-perl:
-@if perl
-maybe-pdf-perl: pdf-perl
-
-pdf-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-html-perl html-perl
-maybe-html-perl:
-@if perl
-maybe-html-perl: html-perl
-
-html-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-TAGS-perl TAGS-perl
-maybe-TAGS-perl:
-@if perl
-maybe-TAGS-perl: TAGS-perl
-
-TAGS-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-install-info-perl install-info-perl
-maybe-install-info-perl:
-@if perl
-maybe-install-info-perl: install-info-perl
-
-install-info-perl: \
-    configure-perl \
-    info-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-install-pdf-perl install-pdf-perl
-maybe-install-pdf-perl:
-@if perl
-maybe-install-pdf-perl: install-pdf-perl
-
-install-pdf-perl: \
-    configure-perl \
-    pdf-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-install-html-perl install-html-perl
-maybe-install-html-perl:
-@if perl
-maybe-install-html-perl: install-html-perl
-
-install-html-perl: \
-    configure-perl \
-    html-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-installcheck-perl installcheck-perl
-maybe-installcheck-perl:
-@if perl
-maybe-installcheck-perl: installcheck-perl
-
-installcheck-perl: \
-    configure-perl 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-mostlyclean-perl mostlyclean-perl
-maybe-mostlyclean-perl:
-@if perl
-maybe-mostlyclean-perl: mostlyclean-perl
-
-mostlyclean-perl: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-clean-perl clean-perl
-maybe-clean-perl:
-@if perl
-maybe-clean-perl: clean-perl
-
-clean-perl: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-distclean-perl distclean-perl
-maybe-distclean-perl:
-@if perl
-maybe-distclean-perl: distclean-perl
-
-distclean-perl: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif perl
-
-.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
-maybe-maintainer-clean-perl:
-@if perl
-maybe-maintainer-clean-perl: maintainer-clean-perl
-
-maintainer-clean-perl: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./perl/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in perl" ; \
-	(cd $(HOST_SUBDIR)/perl && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif perl
-
-
-
-.PHONY: configure-prms maybe-configure-prms
-maybe-configure-prms:
-@if gcc-bootstrap
-configure-prms: stage_current
-@endif gcc-bootstrap
-@if prms
-maybe-configure-prms: configure-prms
-configure-prms: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/prms/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/prms ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/prms; \
-	cd "$(HOST_SUBDIR)/prms" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/prms/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/prms"; \
-	libsrcdir="$$s/prms"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif prms
-
-
-
-
-
-.PHONY: all-prms maybe-all-prms
-maybe-all-prms:
-@if gcc-bootstrap
-all-prms: stage_current
-@endif gcc-bootstrap
-@if prms
-TARGET-prms=all
-maybe-all-prms: all-prms
-all-prms: configure-prms
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-prms))
-@endif prms
-
-
-
-
-.PHONY: check-prms maybe-check-prms
-maybe-check-prms:
-@if prms
-maybe-check-prms: check-prms
-
-check-prms:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif prms
-
-.PHONY: install-prms maybe-install-prms
-maybe-install-prms:
-@if prms
-maybe-install-prms: install-prms
-
-install-prms: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif prms
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-prms info-prms
-maybe-info-prms:
-@if prms
-maybe-info-prms: info-prms
-
-info-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-dvi-prms dvi-prms
-maybe-dvi-prms:
-@if prms
-maybe-dvi-prms: dvi-prms
-
-dvi-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-pdf-prms pdf-prms
-maybe-pdf-prms:
-@if prms
-maybe-pdf-prms: pdf-prms
-
-pdf-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-html-prms html-prms
-maybe-html-prms:
-@if prms
-maybe-html-prms: html-prms
-
-html-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-TAGS-prms TAGS-prms
-maybe-TAGS-prms:
-@if prms
-maybe-TAGS-prms: TAGS-prms
-
-TAGS-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-install-info-prms install-info-prms
-maybe-install-info-prms:
-@if prms
-maybe-install-info-prms: install-info-prms
-
-install-info-prms: \
-    configure-prms \
-    info-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-install-pdf-prms install-pdf-prms
-maybe-install-pdf-prms:
-@if prms
-maybe-install-pdf-prms: install-pdf-prms
-
-install-pdf-prms: \
-    configure-prms \
-    pdf-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-install-html-prms install-html-prms
-maybe-install-html-prms:
-@if prms
-maybe-install-html-prms: install-html-prms
-
-install-html-prms: \
-    configure-prms \
-    html-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-installcheck-prms installcheck-prms
-maybe-installcheck-prms:
-@if prms
-maybe-installcheck-prms: installcheck-prms
-
-installcheck-prms: \
-    configure-prms 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-mostlyclean-prms mostlyclean-prms
-maybe-mostlyclean-prms:
-@if prms
-maybe-mostlyclean-prms: mostlyclean-prms
-
-mostlyclean-prms: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-clean-prms clean-prms
-maybe-clean-prms:
-@if prms
-maybe-clean-prms: clean-prms
-
-clean-prms: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-distclean-prms distclean-prms
-maybe-distclean-prms:
-@if prms
-maybe-distclean-prms: distclean-prms
-
-distclean-prms: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif prms
-
-.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
-maybe-maintainer-clean-prms:
-@if prms
-maybe-maintainer-clean-prms: maintainer-clean-prms
-
-maintainer-clean-prms: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./prms/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in prms" ; \
-	(cd $(HOST_SUBDIR)/prms && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif prms
-
-
-
-.PHONY: configure-rcs maybe-configure-rcs
-maybe-configure-rcs:
-@if gcc-bootstrap
-configure-rcs: stage_current
-@endif gcc-bootstrap
-@if rcs
-maybe-configure-rcs: configure-rcs
-configure-rcs: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/rcs/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/rcs ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/rcs; \
-	cd "$(HOST_SUBDIR)/rcs" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/rcs/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/rcs"; \
-	libsrcdir="$$s/rcs"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif rcs
-
-
-
-
-
-.PHONY: all-rcs maybe-all-rcs
-maybe-all-rcs:
-@if gcc-bootstrap
-all-rcs: stage_current
-@endif gcc-bootstrap
-@if rcs
-TARGET-rcs=all
-maybe-all-rcs: all-rcs
-all-rcs: configure-rcs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-rcs))
-@endif rcs
-
-
-
-
-.PHONY: check-rcs maybe-check-rcs
-maybe-check-rcs:
-@if rcs
-maybe-check-rcs: check-rcs
-
-check-rcs:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif rcs
-
-.PHONY: install-rcs maybe-install-rcs
-maybe-install-rcs:
-@if rcs
-maybe-install-rcs: install-rcs
-
-install-rcs: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif rcs
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-rcs info-rcs
-maybe-info-rcs:
-@if rcs
-maybe-info-rcs: info-rcs
-
-info-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-dvi-rcs dvi-rcs
-maybe-dvi-rcs:
-@if rcs
-maybe-dvi-rcs: dvi-rcs
-
-dvi-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-pdf-rcs pdf-rcs
-maybe-pdf-rcs:
-@if rcs
-maybe-pdf-rcs: pdf-rcs
-
-pdf-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-html-rcs html-rcs
-maybe-html-rcs:
-@if rcs
-maybe-html-rcs: html-rcs
-
-html-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-TAGS-rcs TAGS-rcs
-maybe-TAGS-rcs:
-@if rcs
-maybe-TAGS-rcs: TAGS-rcs
-
-TAGS-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-install-info-rcs install-info-rcs
-maybe-install-info-rcs:
-@if rcs
-maybe-install-info-rcs: install-info-rcs
-
-install-info-rcs: \
-    configure-rcs \
-    info-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-install-pdf-rcs install-pdf-rcs
-maybe-install-pdf-rcs:
-@if rcs
-maybe-install-pdf-rcs: install-pdf-rcs
-
-install-pdf-rcs: \
-    configure-rcs \
-    pdf-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-install-html-rcs install-html-rcs
-maybe-install-html-rcs:
-@if rcs
-maybe-install-html-rcs: install-html-rcs
-
-install-html-rcs: \
-    configure-rcs \
-    html-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-installcheck-rcs installcheck-rcs
-maybe-installcheck-rcs:
-@if rcs
-maybe-installcheck-rcs: installcheck-rcs
-
-installcheck-rcs: \
-    configure-rcs 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
-maybe-mostlyclean-rcs:
-@if rcs
-maybe-mostlyclean-rcs: mostlyclean-rcs
-
-mostlyclean-rcs: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-clean-rcs clean-rcs
-maybe-clean-rcs:
-@if rcs
-maybe-clean-rcs: clean-rcs
-
-clean-rcs: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-distclean-rcs distclean-rcs
-maybe-distclean-rcs:
-@if rcs
-maybe-distclean-rcs: distclean-rcs
-
-distclean-rcs: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif rcs
-
-.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
-maybe-maintainer-clean-rcs:
-@if rcs
-maybe-maintainer-clean-rcs: maintainer-clean-rcs
-
-maintainer-clean-rcs: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./rcs/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in rcs" ; \
-	(cd $(HOST_SUBDIR)/rcs && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif rcs
-
-
-
 .PHONY: configure-readline maybe-configure-readline
 maybe-configure-readline:
 @if gcc-bootstrap
@@ -33904,6 +23522,21 @@
 
 @endif readline
 
+.PHONY: install-strip-readline maybe-install-strip-readline
+maybe-install-strip-readline:
+@if readline
+maybe-install-strip-readline: install-strip-readline
+
+install-strip-readline: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/readline && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif readline
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-readline info-readline
@@ -34245,2119 +23878,6 @@
 
 
 
-.PHONY: configure-release maybe-configure-release
-maybe-configure-release:
-@if gcc-bootstrap
-configure-release: stage_current
-@endif gcc-bootstrap
-@if release
-maybe-configure-release: configure-release
-configure-release: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/release/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/release ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/release; \
-	cd "$(HOST_SUBDIR)/release" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/release/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/release"; \
-	libsrcdir="$$s/release"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif release
-
-
-
-
-
-.PHONY: all-release maybe-all-release
-maybe-all-release:
-@if gcc-bootstrap
-all-release: stage_current
-@endif gcc-bootstrap
-@if release
-TARGET-release=all
-maybe-all-release: all-release
-all-release: configure-release
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-release))
-@endif release
-
-
-
-
-.PHONY: check-release maybe-check-release
-maybe-check-release:
-@if release
-maybe-check-release: check-release
-
-check-release:
-
-@endif release
-
-.PHONY: install-release maybe-install-release
-maybe-install-release:
-@if release
-maybe-install-release: install-release
-
-install-release:
-
-@endif release
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-release info-release
-maybe-info-release:
-@if release
-maybe-info-release: info-release
-
-info-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-dvi-release dvi-release
-maybe-dvi-release:
-@if release
-maybe-dvi-release: dvi-release
-
-dvi-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-pdf-release pdf-release
-maybe-pdf-release:
-@if release
-maybe-pdf-release: pdf-release
-
-pdf-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-html-release html-release
-maybe-html-release:
-@if release
-maybe-html-release: html-release
-
-html-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-TAGS-release TAGS-release
-maybe-TAGS-release:
-@if release
-maybe-TAGS-release: TAGS-release
-
-TAGS-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-install-info-release install-info-release
-maybe-install-info-release:
-@if release
-maybe-install-info-release: install-info-release
-
-install-info-release: \
-    configure-release \
-    info-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-install-pdf-release install-pdf-release
-maybe-install-pdf-release:
-@if release
-maybe-install-pdf-release: install-pdf-release
-
-install-pdf-release: \
-    configure-release \
-    pdf-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-install-html-release install-html-release
-maybe-install-html-release:
-@if release
-maybe-install-html-release: install-html-release
-
-install-html-release: \
-    configure-release \
-    html-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-installcheck-release installcheck-release
-maybe-installcheck-release:
-@if release
-maybe-installcheck-release: installcheck-release
-
-installcheck-release: \
-    configure-release 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-mostlyclean-release mostlyclean-release
-maybe-mostlyclean-release:
-@if release
-maybe-mostlyclean-release: mostlyclean-release
-
-mostlyclean-release: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-clean-release clean-release
-maybe-clean-release:
-@if release
-maybe-clean-release: clean-release
-
-clean-release: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-distclean-release distclean-release
-maybe-distclean-release:
-@if release
-maybe-distclean-release: distclean-release
-
-distclean-release: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif release
-
-.PHONY: maybe-maintainer-clean-release maintainer-clean-release
-maybe-maintainer-clean-release:
-@if release
-maybe-maintainer-clean-release: maintainer-clean-release
-
-maintainer-clean-release: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./release/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in release" ; \
-	(cd $(HOST_SUBDIR)/release && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif release
-
-
-
-.PHONY: configure-recode maybe-configure-recode
-maybe-configure-recode:
-@if gcc-bootstrap
-configure-recode: stage_current
-@endif gcc-bootstrap
-@if recode
-maybe-configure-recode: configure-recode
-configure-recode: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/recode/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/recode ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/recode; \
-	cd "$(HOST_SUBDIR)/recode" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/recode/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/recode"; \
-	libsrcdir="$$s/recode"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif recode
-
-
-
-
-
-.PHONY: all-recode maybe-all-recode
-maybe-all-recode:
-@if gcc-bootstrap
-all-recode: stage_current
-@endif gcc-bootstrap
-@if recode
-TARGET-recode=all
-maybe-all-recode: all-recode
-all-recode: configure-recode
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-recode))
-@endif recode
-
-
-
-
-.PHONY: check-recode maybe-check-recode
-maybe-check-recode:
-@if recode
-maybe-check-recode: check-recode
-
-check-recode:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif recode
-
-.PHONY: install-recode maybe-install-recode
-maybe-install-recode:
-@if recode
-maybe-install-recode: install-recode
-
-install-recode: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif recode
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-recode info-recode
-maybe-info-recode:
-@if recode
-maybe-info-recode: info-recode
-
-info-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-dvi-recode dvi-recode
-maybe-dvi-recode:
-@if recode
-maybe-dvi-recode: dvi-recode
-
-dvi-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-pdf-recode pdf-recode
-maybe-pdf-recode:
-@if recode
-maybe-pdf-recode: pdf-recode
-
-pdf-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-html-recode html-recode
-maybe-html-recode:
-@if recode
-maybe-html-recode: html-recode
-
-html-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-TAGS-recode TAGS-recode
-maybe-TAGS-recode:
-@if recode
-maybe-TAGS-recode: TAGS-recode
-
-TAGS-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-install-info-recode install-info-recode
-maybe-install-info-recode:
-@if recode
-maybe-install-info-recode: install-info-recode
-
-install-info-recode: \
-    configure-recode \
-    info-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-install-pdf-recode install-pdf-recode
-maybe-install-pdf-recode:
-@if recode
-maybe-install-pdf-recode: install-pdf-recode
-
-install-pdf-recode: \
-    configure-recode \
-    pdf-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-install-html-recode install-html-recode
-maybe-install-html-recode:
-@if recode
-maybe-install-html-recode: install-html-recode
-
-install-html-recode: \
-    configure-recode \
-    html-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-installcheck-recode installcheck-recode
-maybe-installcheck-recode:
-@if recode
-maybe-installcheck-recode: installcheck-recode
-
-installcheck-recode: \
-    configure-recode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-mostlyclean-recode mostlyclean-recode
-maybe-mostlyclean-recode:
-@if recode
-maybe-mostlyclean-recode: mostlyclean-recode
-
-mostlyclean-recode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-clean-recode clean-recode
-maybe-clean-recode:
-@if recode
-maybe-clean-recode: clean-recode
-
-clean-recode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-distclean-recode distclean-recode
-maybe-distclean-recode:
-@if recode
-maybe-distclean-recode: distclean-recode
-
-distclean-recode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif recode
-
-.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
-maybe-maintainer-clean-recode:
-@if recode
-maybe-maintainer-clean-recode: maintainer-clean-recode
-
-maintainer-clean-recode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./recode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in recode" ; \
-	(cd $(HOST_SUBDIR)/recode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif recode
-
-
-
-.PHONY: configure-sed maybe-configure-sed
-maybe-configure-sed:
-@if gcc-bootstrap
-configure-sed: stage_current
-@endif gcc-bootstrap
-@if sed
-maybe-configure-sed: configure-sed
-configure-sed: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/sed/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sed ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/sed; \
-	cd "$(HOST_SUBDIR)/sed" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/sed/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/sed"; \
-	libsrcdir="$$s/sed"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif sed
-
-
-
-
-
-.PHONY: all-sed maybe-all-sed
-maybe-all-sed:
-@if gcc-bootstrap
-all-sed: stage_current
-@endif gcc-bootstrap
-@if sed
-TARGET-sed=all
-maybe-all-sed: all-sed
-all-sed: configure-sed
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-sed))
-@endif sed
-
-
-
-
-.PHONY: check-sed maybe-check-sed
-maybe-check-sed:
-@if sed
-maybe-check-sed: check-sed
-
-check-sed:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif sed
-
-.PHONY: install-sed maybe-install-sed
-maybe-install-sed:
-@if sed
-maybe-install-sed: install-sed
-
-install-sed: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif sed
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-sed info-sed
-maybe-info-sed:
-@if sed
-maybe-info-sed: info-sed
-
-info-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-dvi-sed dvi-sed
-maybe-dvi-sed:
-@if sed
-maybe-dvi-sed: dvi-sed
-
-dvi-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-pdf-sed pdf-sed
-maybe-pdf-sed:
-@if sed
-maybe-pdf-sed: pdf-sed
-
-pdf-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-html-sed html-sed
-maybe-html-sed:
-@if sed
-maybe-html-sed: html-sed
-
-html-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-TAGS-sed TAGS-sed
-maybe-TAGS-sed:
-@if sed
-maybe-TAGS-sed: TAGS-sed
-
-TAGS-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-install-info-sed install-info-sed
-maybe-install-info-sed:
-@if sed
-maybe-install-info-sed: install-info-sed
-
-install-info-sed: \
-    configure-sed \
-    info-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-install-pdf-sed install-pdf-sed
-maybe-install-pdf-sed:
-@if sed
-maybe-install-pdf-sed: install-pdf-sed
-
-install-pdf-sed: \
-    configure-sed \
-    pdf-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-install-html-sed install-html-sed
-maybe-install-html-sed:
-@if sed
-maybe-install-html-sed: install-html-sed
-
-install-html-sed: \
-    configure-sed \
-    html-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-installcheck-sed installcheck-sed
-maybe-installcheck-sed:
-@if sed
-maybe-installcheck-sed: installcheck-sed
-
-installcheck-sed: \
-    configure-sed 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-mostlyclean-sed mostlyclean-sed
-maybe-mostlyclean-sed:
-@if sed
-maybe-mostlyclean-sed: mostlyclean-sed
-
-mostlyclean-sed: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-clean-sed clean-sed
-maybe-clean-sed:
-@if sed
-maybe-clean-sed: clean-sed
-
-clean-sed: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-distclean-sed distclean-sed
-maybe-distclean-sed:
-@if sed
-maybe-distclean-sed: distclean-sed
-
-distclean-sed: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif sed
-
-.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
-maybe-maintainer-clean-sed:
-@if sed
-maybe-maintainer-clean-sed: maintainer-clean-sed
-
-maintainer-clean-sed: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./sed/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in sed" ; \
-	(cd $(HOST_SUBDIR)/sed && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif sed
-
-
-
-.PHONY: configure-send-pr maybe-configure-send-pr
-maybe-configure-send-pr:
-@if gcc-bootstrap
-configure-send-pr: stage_current
-@endif gcc-bootstrap
-@if send-pr
-maybe-configure-send-pr: configure-send-pr
-configure-send-pr: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/send-pr/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/send-pr ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/send-pr; \
-	cd "$(HOST_SUBDIR)/send-pr" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/send-pr/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/send-pr"; \
-	libsrcdir="$$s/send-pr"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif send-pr
-
-
-
-
-
-.PHONY: all-send-pr maybe-all-send-pr
-maybe-all-send-pr:
-@if gcc-bootstrap
-all-send-pr: stage_current
-@endif gcc-bootstrap
-@if send-pr
-TARGET-send-pr=all
-maybe-all-send-pr: all-send-pr
-all-send-pr: configure-send-pr
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-send-pr))
-@endif send-pr
-
-
-
-
-.PHONY: check-send-pr maybe-check-send-pr
-maybe-check-send-pr:
-@if send-pr
-maybe-check-send-pr: check-send-pr
-
-check-send-pr:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif send-pr
-
-.PHONY: install-send-pr maybe-install-send-pr
-maybe-install-send-pr:
-@if send-pr
-maybe-install-send-pr: install-send-pr
-
-install-send-pr: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif send-pr
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-send-pr info-send-pr
-maybe-info-send-pr:
-@if send-pr
-maybe-info-send-pr: info-send-pr
-
-info-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-dvi-send-pr dvi-send-pr
-maybe-dvi-send-pr:
-@if send-pr
-maybe-dvi-send-pr: dvi-send-pr
-
-dvi-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-pdf-send-pr pdf-send-pr
-maybe-pdf-send-pr:
-@if send-pr
-maybe-pdf-send-pr: pdf-send-pr
-
-pdf-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-html-send-pr html-send-pr
-maybe-html-send-pr:
-@if send-pr
-maybe-html-send-pr: html-send-pr
-
-html-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-TAGS-send-pr TAGS-send-pr
-maybe-TAGS-send-pr:
-@if send-pr
-maybe-TAGS-send-pr: TAGS-send-pr
-
-TAGS-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-install-info-send-pr install-info-send-pr
-maybe-install-info-send-pr:
-@if send-pr
-maybe-install-info-send-pr: install-info-send-pr
-
-install-info-send-pr: \
-    configure-send-pr \
-    info-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-install-pdf-send-pr install-pdf-send-pr
-maybe-install-pdf-send-pr:
-@if send-pr
-maybe-install-pdf-send-pr: install-pdf-send-pr
-
-install-pdf-send-pr: \
-    configure-send-pr \
-    pdf-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-install-html-send-pr install-html-send-pr
-maybe-install-html-send-pr:
-@if send-pr
-maybe-install-html-send-pr: install-html-send-pr
-
-install-html-send-pr: \
-    configure-send-pr \
-    html-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-installcheck-send-pr installcheck-send-pr
-maybe-installcheck-send-pr:
-@if send-pr
-maybe-installcheck-send-pr: installcheck-send-pr
-
-installcheck-send-pr: \
-    configure-send-pr 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
-maybe-mostlyclean-send-pr:
-@if send-pr
-maybe-mostlyclean-send-pr: mostlyclean-send-pr
-
-mostlyclean-send-pr: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-clean-send-pr clean-send-pr
-maybe-clean-send-pr:
-@if send-pr
-maybe-clean-send-pr: clean-send-pr
-
-clean-send-pr: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-distclean-send-pr distclean-send-pr
-maybe-distclean-send-pr:
-@if send-pr
-maybe-distclean-send-pr: distclean-send-pr
-
-distclean-send-pr: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif send-pr
-
-.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
-maybe-maintainer-clean-send-pr:
-@if send-pr
-maybe-maintainer-clean-send-pr: maintainer-clean-send-pr
-
-maintainer-clean-send-pr: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./send-pr/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in send-pr" ; \
-	(cd $(HOST_SUBDIR)/send-pr && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif send-pr
-
-
-
-.PHONY: configure-shellutils maybe-configure-shellutils
-maybe-configure-shellutils:
-@if gcc-bootstrap
-configure-shellutils: stage_current
-@endif gcc-bootstrap
-@if shellutils
-maybe-configure-shellutils: configure-shellutils
-configure-shellutils: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/shellutils/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/shellutils ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/shellutils; \
-	cd "$(HOST_SUBDIR)/shellutils" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/shellutils/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/shellutils"; \
-	libsrcdir="$$s/shellutils"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif shellutils
-
-
-
-
-
-.PHONY: all-shellutils maybe-all-shellutils
-maybe-all-shellutils:
-@if gcc-bootstrap
-all-shellutils: stage_current
-@endif gcc-bootstrap
-@if shellutils
-TARGET-shellutils=all
-maybe-all-shellutils: all-shellutils
-all-shellutils: configure-shellutils
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-shellutils))
-@endif shellutils
-
-
-
-
-.PHONY: check-shellutils maybe-check-shellutils
-maybe-check-shellutils:
-@if shellutils
-maybe-check-shellutils: check-shellutils
-
-check-shellutils:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif shellutils
-
-.PHONY: install-shellutils maybe-install-shellutils
-maybe-install-shellutils:
-@if shellutils
-maybe-install-shellutils: install-shellutils
-
-install-shellutils: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif shellutils
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-shellutils info-shellutils
-maybe-info-shellutils:
-@if shellutils
-maybe-info-shellutils: info-shellutils
-
-info-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-dvi-shellutils dvi-shellutils
-maybe-dvi-shellutils:
-@if shellutils
-maybe-dvi-shellutils: dvi-shellutils
-
-dvi-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-pdf-shellutils pdf-shellutils
-maybe-pdf-shellutils:
-@if shellutils
-maybe-pdf-shellutils: pdf-shellutils
-
-pdf-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-html-shellutils html-shellutils
-maybe-html-shellutils:
-@if shellutils
-maybe-html-shellutils: html-shellutils
-
-html-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-TAGS-shellutils TAGS-shellutils
-maybe-TAGS-shellutils:
-@if shellutils
-maybe-TAGS-shellutils: TAGS-shellutils
-
-TAGS-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-install-info-shellutils install-info-shellutils
-maybe-install-info-shellutils:
-@if shellutils
-maybe-install-info-shellutils: install-info-shellutils
-
-install-info-shellutils: \
-    configure-shellutils \
-    info-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-install-pdf-shellutils install-pdf-shellutils
-maybe-install-pdf-shellutils:
-@if shellutils
-maybe-install-pdf-shellutils: install-pdf-shellutils
-
-install-pdf-shellutils: \
-    configure-shellutils \
-    pdf-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-install-html-shellutils install-html-shellutils
-maybe-install-html-shellutils:
-@if shellutils
-maybe-install-html-shellutils: install-html-shellutils
-
-install-html-shellutils: \
-    configure-shellutils \
-    html-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-installcheck-shellutils installcheck-shellutils
-maybe-installcheck-shellutils:
-@if shellutils
-maybe-installcheck-shellutils: installcheck-shellutils
-
-installcheck-shellutils: \
-    configure-shellutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
-maybe-mostlyclean-shellutils:
-@if shellutils
-maybe-mostlyclean-shellutils: mostlyclean-shellutils
-
-mostlyclean-shellutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-clean-shellutils clean-shellutils
-maybe-clean-shellutils:
-@if shellutils
-maybe-clean-shellutils: clean-shellutils
-
-clean-shellutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-distclean-shellutils distclean-shellutils
-maybe-distclean-shellutils:
-@if shellutils
-maybe-distclean-shellutils: distclean-shellutils
-
-distclean-shellutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif shellutils
-
-.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
-maybe-maintainer-clean-shellutils:
-@if shellutils
-maybe-maintainer-clean-shellutils: maintainer-clean-shellutils
-
-maintainer-clean-shellutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./shellutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in shellutils" ; \
-	(cd $(HOST_SUBDIR)/shellutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif shellutils
-
-
-
 .PHONY: configure-sid maybe-configure-sid
 maybe-configure-sid:
 @if gcc-bootstrap
@@ -36442,6 +23962,21 @@
 
 @endif sid
 
+.PHONY: install-strip-sid maybe-install-strip-sid
+maybe-install-strip-sid:
+@if sid
+maybe-install-strip-sid: install-strip-sid
+
+install-strip-sid: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/sid && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif sid
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-sid info-sid
@@ -36867,6 +24402,21 @@
 
 @endif sim
 
+.PHONY: install-strip-sim maybe-install-strip-sim
+maybe-install-strip-sim:
+@if sim
+maybe-install-strip-sim: install-strip-sim
+
+install-strip-sim: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/sim && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif sim
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-sim info-sim
@@ -37208,431 +24758,6 @@
 
 
 
-.PHONY: configure-tar maybe-configure-tar
-maybe-configure-tar:
-@if gcc-bootstrap
-configure-tar: stage_current
-@endif gcc-bootstrap
-@if tar
-maybe-configure-tar: configure-tar
-configure-tar: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/tar/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tar ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/tar; \
-	cd "$(HOST_SUBDIR)/tar" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/tar/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/tar"; \
-	libsrcdir="$$s/tar"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif tar
-
-
-
-
-
-.PHONY: all-tar maybe-all-tar
-maybe-all-tar:
-@if gcc-bootstrap
-all-tar: stage_current
-@endif gcc-bootstrap
-@if tar
-TARGET-tar=all
-maybe-all-tar: all-tar
-all-tar: configure-tar
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-tar))
-@endif tar
-
-
-
-
-.PHONY: check-tar maybe-check-tar
-maybe-check-tar:
-@if tar
-maybe-check-tar: check-tar
-
-check-tar:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif tar
-
-.PHONY: install-tar maybe-install-tar
-maybe-install-tar:
-@if tar
-maybe-install-tar: install-tar
-
-install-tar: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif tar
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-tar info-tar
-maybe-info-tar:
-@if tar
-maybe-info-tar: info-tar
-
-info-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-dvi-tar dvi-tar
-maybe-dvi-tar:
-@if tar
-maybe-dvi-tar: dvi-tar
-
-dvi-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-pdf-tar pdf-tar
-maybe-pdf-tar:
-@if tar
-maybe-pdf-tar: pdf-tar
-
-pdf-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-html-tar html-tar
-maybe-html-tar:
-@if tar
-maybe-html-tar: html-tar
-
-html-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-TAGS-tar TAGS-tar
-maybe-TAGS-tar:
-@if tar
-maybe-TAGS-tar: TAGS-tar
-
-TAGS-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-install-info-tar install-info-tar
-maybe-install-info-tar:
-@if tar
-maybe-install-info-tar: install-info-tar
-
-install-info-tar: \
-    configure-tar \
-    info-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-install-pdf-tar install-pdf-tar
-maybe-install-pdf-tar:
-@if tar
-maybe-install-pdf-tar: install-pdf-tar
-
-install-pdf-tar: \
-    configure-tar \
-    pdf-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-install-html-tar install-html-tar
-maybe-install-html-tar:
-@if tar
-maybe-install-html-tar: install-html-tar
-
-install-html-tar: \
-    configure-tar \
-    html-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-installcheck-tar installcheck-tar
-maybe-installcheck-tar:
-@if tar
-maybe-installcheck-tar: installcheck-tar
-
-installcheck-tar: \
-    configure-tar 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-mostlyclean-tar mostlyclean-tar
-maybe-mostlyclean-tar:
-@if tar
-maybe-mostlyclean-tar: mostlyclean-tar
-
-mostlyclean-tar: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-clean-tar clean-tar
-maybe-clean-tar:
-@if tar
-maybe-clean-tar: clean-tar
-
-clean-tar: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-distclean-tar distclean-tar
-maybe-distclean-tar:
-@if tar
-maybe-distclean-tar: distclean-tar
-
-distclean-tar: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif tar
-
-.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
-maybe-maintainer-clean-tar:
-@if tar
-maybe-maintainer-clean-tar: maintainer-clean-tar
-
-maintainer-clean-tar: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./tar/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in tar" ; \
-	(cd $(HOST_SUBDIR)/tar && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif tar
-
-
-
 .PHONY: configure-texinfo maybe-configure-texinfo
 maybe-configure-texinfo:
 @if gcc-bootstrap
@@ -37711,6 +24836,15 @@
 
 @endif texinfo
 
+.PHONY: install-strip-texinfo maybe-install-strip-texinfo
+maybe-install-strip-texinfo:
+@if texinfo
+maybe-install-strip-texinfo: install-strip-texinfo
+
+install-strip-texinfo:
+
+@endif texinfo
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-texinfo info-texinfo
@@ -38052,2134 +25186,6 @@
 
 
 
-.PHONY: configure-textutils maybe-configure-textutils
-maybe-configure-textutils:
-@if gcc-bootstrap
-configure-textutils: stage_current
-@endif gcc-bootstrap
-@if textutils
-maybe-configure-textutils: configure-textutils
-configure-textutils: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/textutils/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/textutils ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/textutils; \
-	cd "$(HOST_SUBDIR)/textutils" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/textutils/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/textutils"; \
-	libsrcdir="$$s/textutils"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif textutils
-
-
-
-
-
-.PHONY: all-textutils maybe-all-textutils
-maybe-all-textutils:
-@if gcc-bootstrap
-all-textutils: stage_current
-@endif gcc-bootstrap
-@if textutils
-TARGET-textutils=all
-maybe-all-textutils: all-textutils
-all-textutils: configure-textutils
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-textutils))
-@endif textutils
-
-
-
-
-.PHONY: check-textutils maybe-check-textutils
-maybe-check-textutils:
-@if textutils
-maybe-check-textutils: check-textutils
-
-check-textutils:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif textutils
-
-.PHONY: install-textutils maybe-install-textutils
-maybe-install-textutils:
-@if textutils
-maybe-install-textutils: install-textutils
-
-install-textutils: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif textutils
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-textutils info-textutils
-maybe-info-textutils:
-@if textutils
-maybe-info-textutils: info-textutils
-
-info-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-dvi-textutils dvi-textutils
-maybe-dvi-textutils:
-@if textutils
-maybe-dvi-textutils: dvi-textutils
-
-dvi-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-pdf-textutils pdf-textutils
-maybe-pdf-textutils:
-@if textutils
-maybe-pdf-textutils: pdf-textutils
-
-pdf-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-html-textutils html-textutils
-maybe-html-textutils:
-@if textutils
-maybe-html-textutils: html-textutils
-
-html-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-TAGS-textutils TAGS-textutils
-maybe-TAGS-textutils:
-@if textutils
-maybe-TAGS-textutils: TAGS-textutils
-
-TAGS-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-install-info-textutils install-info-textutils
-maybe-install-info-textutils:
-@if textutils
-maybe-install-info-textutils: install-info-textutils
-
-install-info-textutils: \
-    configure-textutils \
-    info-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-install-pdf-textutils install-pdf-textutils
-maybe-install-pdf-textutils:
-@if textutils
-maybe-install-pdf-textutils: install-pdf-textutils
-
-install-pdf-textutils: \
-    configure-textutils \
-    pdf-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-install-html-textutils install-html-textutils
-maybe-install-html-textutils:
-@if textutils
-maybe-install-html-textutils: install-html-textutils
-
-install-html-textutils: \
-    configure-textutils \
-    html-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-installcheck-textutils installcheck-textutils
-maybe-installcheck-textutils:
-@if textutils
-maybe-installcheck-textutils: installcheck-textutils
-
-installcheck-textutils: \
-    configure-textutils 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
-maybe-mostlyclean-textutils:
-@if textutils
-maybe-mostlyclean-textutils: mostlyclean-textutils
-
-mostlyclean-textutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-clean-textutils clean-textutils
-maybe-clean-textutils:
-@if textutils
-maybe-clean-textutils: clean-textutils
-
-clean-textutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-distclean-textutils distclean-textutils
-maybe-distclean-textutils:
-@if textutils
-maybe-distclean-textutils: distclean-textutils
-
-distclean-textutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif textutils
-
-.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
-maybe-maintainer-clean-textutils:
-@if textutils
-maybe-maintainer-clean-textutils: maintainer-clean-textutils
-
-maintainer-clean-textutils: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./textutils/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in textutils" ; \
-	(cd $(HOST_SUBDIR)/textutils && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif textutils
-
-
-
-.PHONY: configure-time maybe-configure-time
-maybe-configure-time:
-@if gcc-bootstrap
-configure-time: stage_current
-@endif gcc-bootstrap
-@if time
-maybe-configure-time: configure-time
-configure-time: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/time/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/time ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/time; \
-	cd "$(HOST_SUBDIR)/time" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/time/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/time"; \
-	libsrcdir="$$s/time"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif time
-
-
-
-
-
-.PHONY: all-time maybe-all-time
-maybe-all-time:
-@if gcc-bootstrap
-all-time: stage_current
-@endif gcc-bootstrap
-@if time
-TARGET-time=all
-maybe-all-time: all-time
-all-time: configure-time
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-time))
-@endif time
-
-
-
-
-.PHONY: check-time maybe-check-time
-maybe-check-time:
-@if time
-maybe-check-time: check-time
-
-check-time:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif time
-
-.PHONY: install-time maybe-install-time
-maybe-install-time:
-@if time
-maybe-install-time: install-time
-
-install-time: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif time
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-time info-time
-maybe-info-time:
-@if time
-maybe-info-time: info-time
-
-info-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-dvi-time dvi-time
-maybe-dvi-time:
-@if time
-maybe-dvi-time: dvi-time
-
-dvi-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-pdf-time pdf-time
-maybe-pdf-time:
-@if time
-maybe-pdf-time: pdf-time
-
-pdf-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-html-time html-time
-maybe-html-time:
-@if time
-maybe-html-time: html-time
-
-html-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-TAGS-time TAGS-time
-maybe-TAGS-time:
-@if time
-maybe-TAGS-time: TAGS-time
-
-TAGS-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-install-info-time install-info-time
-maybe-install-info-time:
-@if time
-maybe-install-info-time: install-info-time
-
-install-info-time: \
-    configure-time \
-    info-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-install-pdf-time install-pdf-time
-maybe-install-pdf-time:
-@if time
-maybe-install-pdf-time: install-pdf-time
-
-install-pdf-time: \
-    configure-time \
-    pdf-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-install-html-time install-html-time
-maybe-install-html-time:
-@if time
-maybe-install-html-time: install-html-time
-
-install-html-time: \
-    configure-time \
-    html-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-installcheck-time installcheck-time
-maybe-installcheck-time:
-@if time
-maybe-installcheck-time: installcheck-time
-
-installcheck-time: \
-    configure-time 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-mostlyclean-time mostlyclean-time
-maybe-mostlyclean-time:
-@if time
-maybe-mostlyclean-time: mostlyclean-time
-
-mostlyclean-time: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-clean-time clean-time
-maybe-clean-time:
-@if time
-maybe-clean-time: clean-time
-
-clean-time: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-distclean-time distclean-time
-maybe-distclean-time:
-@if time
-maybe-distclean-time: distclean-time
-
-distclean-time: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif time
-
-.PHONY: maybe-maintainer-clean-time maintainer-clean-time
-maybe-maintainer-clean-time:
-@if time
-maybe-maintainer-clean-time: maintainer-clean-time
-
-maintainer-clean-time: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./time/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in time" ; \
-	(cd $(HOST_SUBDIR)/time && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif time
-
-
-
-.PHONY: configure-uudecode maybe-configure-uudecode
-maybe-configure-uudecode:
-@if gcc-bootstrap
-configure-uudecode: stage_current
-@endif gcc-bootstrap
-@if uudecode
-maybe-configure-uudecode: configure-uudecode
-configure-uudecode: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/uudecode/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/uudecode ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/uudecode; \
-	cd "$(HOST_SUBDIR)/uudecode" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/uudecode/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/uudecode"; \
-	libsrcdir="$$s/uudecode"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif uudecode
-
-
-
-
-
-.PHONY: all-uudecode maybe-all-uudecode
-maybe-all-uudecode:
-@if gcc-bootstrap
-all-uudecode: stage_current
-@endif gcc-bootstrap
-@if uudecode
-TARGET-uudecode=all
-maybe-all-uudecode: all-uudecode
-all-uudecode: configure-uudecode
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-uudecode))
-@endif uudecode
-
-
-
-
-.PHONY: check-uudecode maybe-check-uudecode
-maybe-check-uudecode:
-@if uudecode
-maybe-check-uudecode: check-uudecode
-
-check-uudecode:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif uudecode
-
-.PHONY: install-uudecode maybe-install-uudecode
-maybe-install-uudecode:
-@if uudecode
-maybe-install-uudecode: install-uudecode
-
-install-uudecode: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif uudecode
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-uudecode info-uudecode
-maybe-info-uudecode:
-@if uudecode
-maybe-info-uudecode: info-uudecode
-
-info-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-dvi-uudecode dvi-uudecode
-maybe-dvi-uudecode:
-@if uudecode
-maybe-dvi-uudecode: dvi-uudecode
-
-dvi-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-pdf-uudecode pdf-uudecode
-maybe-pdf-uudecode:
-@if uudecode
-maybe-pdf-uudecode: pdf-uudecode
-
-pdf-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-html-uudecode html-uudecode
-maybe-html-uudecode:
-@if uudecode
-maybe-html-uudecode: html-uudecode
-
-html-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-TAGS-uudecode TAGS-uudecode
-maybe-TAGS-uudecode:
-@if uudecode
-maybe-TAGS-uudecode: TAGS-uudecode
-
-TAGS-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-install-info-uudecode install-info-uudecode
-maybe-install-info-uudecode:
-@if uudecode
-maybe-install-info-uudecode: install-info-uudecode
-
-install-info-uudecode: \
-    configure-uudecode \
-    info-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-install-pdf-uudecode install-pdf-uudecode
-maybe-install-pdf-uudecode:
-@if uudecode
-maybe-install-pdf-uudecode: install-pdf-uudecode
-
-install-pdf-uudecode: \
-    configure-uudecode \
-    pdf-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-install-html-uudecode install-html-uudecode
-maybe-install-html-uudecode:
-@if uudecode
-maybe-install-html-uudecode: install-html-uudecode
-
-install-html-uudecode: \
-    configure-uudecode \
-    html-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-installcheck-uudecode installcheck-uudecode
-maybe-installcheck-uudecode:
-@if uudecode
-maybe-installcheck-uudecode: installcheck-uudecode
-
-installcheck-uudecode: \
-    configure-uudecode 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
-maybe-mostlyclean-uudecode:
-@if uudecode
-maybe-mostlyclean-uudecode: mostlyclean-uudecode
-
-mostlyclean-uudecode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-clean-uudecode clean-uudecode
-maybe-clean-uudecode:
-@if uudecode
-maybe-clean-uudecode: clean-uudecode
-
-clean-uudecode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-distclean-uudecode distclean-uudecode
-maybe-distclean-uudecode:
-@if uudecode
-maybe-distclean-uudecode: distclean-uudecode
-
-distclean-uudecode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif uudecode
-
-.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
-maybe-maintainer-clean-uudecode:
-@if uudecode
-maybe-maintainer-clean-uudecode: maintainer-clean-uudecode
-
-maintainer-clean-uudecode: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./uudecode/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in uudecode" ; \
-	(cd $(HOST_SUBDIR)/uudecode && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif uudecode
-
-
-
-.PHONY: configure-wdiff maybe-configure-wdiff
-maybe-configure-wdiff:
-@if gcc-bootstrap
-configure-wdiff: stage_current
-@endif gcc-bootstrap
-@if wdiff
-maybe-configure-wdiff: configure-wdiff
-configure-wdiff: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/wdiff/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/wdiff ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/wdiff; \
-	cd "$(HOST_SUBDIR)/wdiff" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/wdiff/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/wdiff"; \
-	libsrcdir="$$s/wdiff"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif wdiff
-
-
-
-
-
-.PHONY: all-wdiff maybe-all-wdiff
-maybe-all-wdiff:
-@if gcc-bootstrap
-all-wdiff: stage_current
-@endif gcc-bootstrap
-@if wdiff
-TARGET-wdiff=all
-maybe-all-wdiff: all-wdiff
-all-wdiff: configure-wdiff
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-wdiff))
-@endif wdiff
-
-
-
-
-.PHONY: check-wdiff maybe-check-wdiff
-maybe-check-wdiff:
-@if wdiff
-maybe-check-wdiff: check-wdiff
-
-check-wdiff:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
-
-@endif wdiff
-
-.PHONY: install-wdiff maybe-install-wdiff
-maybe-install-wdiff:
-@if wdiff
-maybe-install-wdiff: install-wdiff
-
-install-wdiff: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif wdiff
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-wdiff info-wdiff
-maybe-info-wdiff:
-@if wdiff
-maybe-info-wdiff: info-wdiff
-
-info-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-dvi-wdiff dvi-wdiff
-maybe-dvi-wdiff:
-@if wdiff
-maybe-dvi-wdiff: dvi-wdiff
-
-dvi-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-pdf-wdiff pdf-wdiff
-maybe-pdf-wdiff:
-@if wdiff
-maybe-pdf-wdiff: pdf-wdiff
-
-pdf-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-html-wdiff html-wdiff
-maybe-html-wdiff:
-@if wdiff
-maybe-html-wdiff: html-wdiff
-
-html-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-TAGS-wdiff TAGS-wdiff
-maybe-TAGS-wdiff:
-@if wdiff
-maybe-TAGS-wdiff: TAGS-wdiff
-
-TAGS-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-install-info-wdiff install-info-wdiff
-maybe-install-info-wdiff:
-@if wdiff
-maybe-install-info-wdiff: install-info-wdiff
-
-install-info-wdiff: \
-    configure-wdiff \
-    info-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-install-pdf-wdiff install-pdf-wdiff
-maybe-install-pdf-wdiff:
-@if wdiff
-maybe-install-pdf-wdiff: install-pdf-wdiff
-
-install-pdf-wdiff: \
-    configure-wdiff \
-    pdf-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-install-html-wdiff install-html-wdiff
-maybe-install-html-wdiff:
-@if wdiff
-maybe-install-html-wdiff: install-html-wdiff
-
-install-html-wdiff: \
-    configure-wdiff \
-    html-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-installcheck-wdiff installcheck-wdiff
-maybe-installcheck-wdiff:
-@if wdiff
-maybe-installcheck-wdiff: installcheck-wdiff
-
-installcheck-wdiff: \
-    configure-wdiff 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
-maybe-mostlyclean-wdiff:
-@if wdiff
-maybe-mostlyclean-wdiff: mostlyclean-wdiff
-
-mostlyclean-wdiff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-clean-wdiff clean-wdiff
-maybe-clean-wdiff:
-@if wdiff
-maybe-clean-wdiff: clean-wdiff
-
-clean-wdiff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-distclean-wdiff distclean-wdiff
-maybe-distclean-wdiff:
-@if wdiff
-maybe-distclean-wdiff: distclean-wdiff
-
-distclean-wdiff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif wdiff
-
-.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
-maybe-maintainer-clean-wdiff:
-@if wdiff
-maybe-maintainer-clean-wdiff: maintainer-clean-wdiff
-
-maintainer-clean-wdiff: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./wdiff/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in wdiff" ; \
-	(cd $(HOST_SUBDIR)/wdiff && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif wdiff
-
-
-
-.PHONY: configure-zip maybe-configure-zip
-maybe-configure-zip:
-@if gcc-bootstrap
-configure-zip: stage_current
-@endif gcc-bootstrap
-@if zip
-maybe-configure-zip: configure-zip
-configure-zip: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	test ! -f $(HOST_SUBDIR)/zip/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zip ; \
-	$(HOST_EXPORTS)  \
-	echo Configuring in $(HOST_SUBDIR)/zip; \
-	cd "$(HOST_SUBDIR)/zip" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(HOST_SUBDIR)/zip/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/zip"; \
-	libsrcdir="$$s/zip"; \
-	$(SHELL) $${libsrcdir}/configure \
-	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif zip
-
-
-
-
-
-.PHONY: all-zip maybe-all-zip
-maybe-all-zip:
-@if gcc-bootstrap
-all-zip: stage_current
-@endif gcc-bootstrap
-@if zip
-TARGET-zip=all
-maybe-all-zip: all-zip
-all-zip: configure-zip
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS)  \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
-		$(TARGET-zip))
-@endif zip
-
-
-
-
-.PHONY: check-zip maybe-check-zip
-maybe-check-zip:
-@if zip
-maybe-check-zip: check-zip
-
-# This module is only tested in a native toolchain.
-check-zip:
-	@: $(MAKE); $(unstage)
-	@if [ '$(host)' = '$(target)' ] ; then \
-	  r=`${PWD_COMMAND}`; export r; \
-	  s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	  $(HOST_EXPORTS) \
-	  (cd $(HOST_SUBDIR)/zip && \
-	    $(MAKE) $(FLAGS_TO_PASS)  check); \
-	fi
-
-@endif zip
-
-.PHONY: install-zip maybe-install-zip
-maybe-install-zip:
-@if zip
-maybe-install-zip: install-zip
-
-install-zip: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(FLAGS_TO_PASS)  install)
-
-@endif zip
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-zip info-zip
-maybe-info-zip:
-@if zip
-maybe-info-zip: info-zip
-
-info-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-dvi-zip dvi-zip
-maybe-dvi-zip:
-@if zip
-maybe-dvi-zip: dvi-zip
-
-dvi-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-pdf-zip pdf-zip
-maybe-pdf-zip:
-@if zip
-maybe-pdf-zip: pdf-zip
-
-pdf-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing pdf in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          pdf) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-html-zip html-zip
-maybe-html-zip:
-@if zip
-maybe-html-zip: html-zip
-
-html-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-TAGS-zip TAGS-zip
-maybe-TAGS-zip:
-@if zip
-maybe-TAGS-zip: TAGS-zip
-
-TAGS-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-install-info-zip install-info-zip
-maybe-install-info-zip:
-@if zip
-maybe-install-info-zip: install-info-zip
-
-install-info-zip: \
-    configure-zip \
-    info-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-install-pdf-zip install-pdf-zip
-maybe-install-pdf-zip:
-@if zip
-maybe-install-pdf-zip: install-pdf-zip
-
-install-pdf-zip: \
-    configure-zip \
-    pdf-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-pdf in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-pdf) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-install-html-zip install-html-zip
-maybe-install-html-zip:
-@if zip
-maybe-install-html-zip: install-html-zip
-
-install-html-zip: \
-    configure-zip \
-    html-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-html in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-html) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-installcheck-zip installcheck-zip
-maybe-installcheck-zip:
-@if zip
-maybe-installcheck-zip: installcheck-zip
-
-installcheck-zip: \
-    configure-zip 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-mostlyclean-zip mostlyclean-zip
-maybe-mostlyclean-zip:
-@if zip
-maybe-mostlyclean-zip: mostlyclean-zip
-
-mostlyclean-zip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing mostlyclean in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          mostlyclean) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-clean-zip clean-zip
-maybe-clean-zip:
-@if zip
-maybe-clean-zip: clean-zip
-
-clean-zip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing clean in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          clean) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-distclean-zip distclean-zip
-maybe-distclean-zip:
-@if zip
-maybe-distclean-zip: distclean-zip
-
-distclean-zip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing distclean in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          distclean) \
-	  || exit 1
-
-@endif zip
-
-.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
-maybe-maintainer-clean-zip:
-@if zip
-maybe-maintainer-clean-zip: maintainer-clean-zip
-
-maintainer-clean-zip: 
-	@: $(MAKE); $(unstage)
-	@[ -f ./zip/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing maintainer-clean in zip" ; \
-	(cd $(HOST_SUBDIR)/zip && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          maintainer-clean) \
-	  || exit 1
-
-@endif zip
-
-
-
 .PHONY: configure-zlib maybe-configure-zlib
 maybe-configure-zlib:
 @if gcc-bootstrap
@@ -40706,6 +25712,15 @@
 
 @endif zlib
 
+.PHONY: install-strip-zlib maybe-install-strip-zlib
+maybe-install-strip-zlib:
+@if zlib
+maybe-install-strip-zlib: install-strip-zlib
+
+install-strip-zlib:
+
+@endif zlib
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-zlib info-zlib
@@ -41081,7 +26096,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/gdb && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
 		$(TARGET-gdb))
 @endif gdb
 
@@ -41099,7 +26114,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/gdb && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gdb
 
@@ -41114,7 +26129,22 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/gdb && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif gdb
+
+.PHONY: install-strip-gdb maybe-install-strip-gdb
+maybe-install-strip-gdb:
+@if gdb
+maybe-install-strip-gdb: install-strip-gdb
+
+install-strip-gdb: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gdb && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
 
 @endif gdb
 
@@ -41132,7 +26162,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in gdb" ; \
@@ -41158,7 +26188,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in gdb" ; \
@@ -41184,7 +26214,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in gdb" ; \
@@ -41210,7 +26240,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in gdb" ; \
@@ -41236,7 +26266,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in gdb" ; \
@@ -41263,7 +26293,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in gdb" ; \
@@ -41290,7 +26320,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in gdb" ; \
@@ -41317,7 +26347,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in gdb" ; \
@@ -41343,7 +26373,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in gdb" ; \
@@ -41368,7 +26398,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in gdb" ; \
@@ -41393,7 +26423,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in gdb" ; \
@@ -41418,7 +26448,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in gdb" ; \
@@ -41443,7 +26473,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in gdb" ; \
@@ -41506,7 +26536,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/expect && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
 		$(TARGET-expect))
 @endif expect
 
@@ -41524,7 +26554,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/expect && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif expect
 
@@ -41539,7 +26569,22 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/expect && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif expect
+
+.PHONY: install-strip-expect maybe-install-strip-expect
+maybe-install-strip-expect:
+@if expect
+maybe-install-strip-expect: install-strip-expect
+
+install-strip-expect: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/expect && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
 
 @endif expect
 
@@ -41557,7 +26602,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in expect" ; \
@@ -41583,7 +26628,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in expect" ; \
@@ -41609,7 +26654,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in expect" ; \
@@ -41635,7 +26680,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in expect" ; \
@@ -41661,7 +26706,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in expect" ; \
@@ -41688,7 +26733,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in expect" ; \
@@ -41715,7 +26760,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in expect" ; \
@@ -41742,7 +26787,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in expect" ; \
@@ -41768,7 +26813,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in expect" ; \
@@ -41793,7 +26838,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in expect" ; \
@@ -41818,7 +26863,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in expect" ; \
@@ -41843,7 +26888,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in expect" ; \
@@ -41868,7 +26913,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in expect" ; \
@@ -41931,7 +26976,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/guile && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
 		$(TARGET-guile))
 @endif guile
 
@@ -41949,7 +26994,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/guile && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif guile
 
@@ -41964,7 +27009,22 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/guile && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif guile
+
+.PHONY: install-strip-guile maybe-install-strip-guile
+maybe-install-strip-guile:
+@if guile
+maybe-install-strip-guile: install-strip-guile
+
+install-strip-guile: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/guile && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
 
 @endif guile
 
@@ -41982,7 +27042,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in guile" ; \
@@ -42008,7 +27068,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in guile" ; \
@@ -42034,7 +27094,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in guile" ; \
@@ -42060,7 +27120,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in guile" ; \
@@ -42086,7 +27146,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in guile" ; \
@@ -42113,7 +27173,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in guile" ; \
@@ -42140,7 +27200,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in guile" ; \
@@ -42167,7 +27227,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in guile" ; \
@@ -42193,7 +27253,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in guile" ; \
@@ -42218,7 +27278,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in guile" ; \
@@ -42243,7 +27303,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in guile" ; \
@@ -42268,7 +27328,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in guile" ; \
@@ -42293,7 +27353,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in guile" ; \
@@ -42356,7 +27416,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/tk && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
 		$(TARGET-tk))
 @endif tk
 
@@ -42374,7 +27434,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/tk && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif tk
 
@@ -42389,7 +27449,22 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/tk && \
-	  $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif tk
+
+.PHONY: install-strip-tk maybe-install-strip-tk
+maybe-install-strip-tk:
+@if tk
+maybe-install-strip-tk: install-strip-tk
+
+install-strip-tk: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/tk && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
 
 @endif tk
 
@@ -42407,7 +27482,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in tk" ; \
@@ -42433,7 +27508,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in tk" ; \
@@ -42459,7 +27534,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in tk" ; \
@@ -42485,7 +27560,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in tk" ; \
@@ -42511,7 +27586,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in tk" ; \
@@ -42538,7 +27613,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in tk" ; \
@@ -42565,7 +27640,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in tk" ; \
@@ -42592,7 +27667,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in tk" ; \
@@ -42618,7 +27693,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in tk" ; \
@@ -42643,7 +27718,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in tk" ; \
@@ -42668,7 +27743,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in tk" ; \
@@ -42693,7 +27768,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in tk" ; \
@@ -42718,7 +27793,7 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in tk" ; \
@@ -42812,6 +27887,21 @@
 
 @endif libtermcap
 
+.PHONY: install-strip-libtermcap maybe-install-strip-libtermcap
+maybe-install-strip-libtermcap:
+@if libtermcap
+maybe-install-strip-libtermcap: install-strip-libtermcap
+
+install-strip-libtermcap: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libtermcap && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif libtermcap
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-libtermcap info-libtermcap
@@ -43171,6 +28261,21 @@
 
 @endif utils
 
+.PHONY: install-strip-utils maybe-install-strip-utils
+maybe-install-strip-utils:
+@if utils
+maybe-install-strip-utils: install-strip-utils
+
+install-strip-utils: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/utils && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif utils
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-utils info-utils
@@ -43596,6 +28701,21 @@
 
 @endif gnattools
 
+.PHONY: install-strip-gnattools maybe-install-strip-gnattools
+maybe-install-strip-gnattools:
+@if gnattools
+maybe-install-strip-gnattools: install-strip-gnattools
+
+install-strip-gnattools: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gnattools && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif gnattools
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-gnattools info-gnattools
@@ -43961,7 +29081,7 @@
 	libsrcdir="$$s/lto-plugin"; \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
+	  --target=${target_alias} $${srcdiroption} --enable-shared \
 	  || exit 1
 @endif lto-plugin
 
@@ -43995,7 +29115,8 @@
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
-	  $(STAGE1_CONFIGURE_FLAGS)
+	  $(STAGE1_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin
@@ -44028,7 +29149,8 @@
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE2_CONFIGURE_FLAGS)
+	  $(STAGE2_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin
@@ -44061,7 +29183,8 @@
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE3_CONFIGURE_FLAGS)
+	  $(STAGE3_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin
@@ -44094,7 +29217,8 @@
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGE4_CONFIGURE_FLAGS)
+	  $(STAGE4_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin
@@ -44127,7 +29251,8 @@
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGEprofile_CONFIGURE_FLAGS)
+	  $(STAGEprofile_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 .PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin
@@ -44160,7 +29285,8 @@
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption} \
 	  --with-build-libsubdir=$(HOST_SUBDIR) \
-	  $(STAGEfeedback_CONFIGURE_FLAGS)
+	  $(STAGEfeedback_CONFIGURE_FLAGS) \
+	  --enable-shared
 @endif lto-plugin-bootstrap
 
 
@@ -44475,6 +29601,21 @@
 
 @endif lto-plugin
 
+.PHONY: install-strip-lto-plugin maybe-install-strip-lto-plugin
+maybe-install-strip-lto-plugin:
+@if lto-plugin
+maybe-install-strip-lto-plugin: install-strip-lto-plugin
+
+install-strip-lto-plugin: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/lto-plugin && \
+	  $(MAKE) $(FLAGS_TO_PASS)  install-strip)
+
+@endif lto-plugin
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-lto-plugin info-lto-plugin
@@ -45435,6 +30576,21 @@
 
 @endif target-libstdc++-v3
 
+.PHONY: install-strip-target-libstdc++-v3 maybe-install-strip-target-libstdc++-v3
+maybe-install-strip-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-strip-target-libstdc++-v3: install-strip-target-libstdc++-v3
+
+install-strip-target-libstdc++-v3: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(RAW_CXX_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libstdc++-v3
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
@@ -45877,6 +31033,21 @@
 
 @endif target-libmudflap
 
+.PHONY: install-strip-target-libmudflap maybe-install-strip-target-libmudflap
+maybe-install-strip-target-libmudflap:
+@if target-libmudflap
+maybe-install-strip-target-libmudflap: install-strip-target-libmudflap
+
+install-strip-target-libmudflap: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libmudflap && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libmudflap
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libmudflap info-target-libmudflap
@@ -46319,6 +31490,21 @@
 
 @endif target-libssp
 
+.PHONY: install-strip-target-libssp maybe-install-strip-target-libssp
+maybe-install-strip-target-libssp:
+@if target-libssp
+maybe-install-strip-target-libssp: install-strip-target-libssp
+
+install-strip-target-libssp: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libssp && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libssp
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libssp info-target-libssp
@@ -46761,6 +31947,21 @@
 
 @endif target-newlib
 
+.PHONY: install-strip-target-newlib maybe-install-strip-target-newlib
+maybe-install-strip-target-newlib:
+@if target-newlib
+maybe-install-strip-target-newlib: install-strip-target-newlib
+
+install-strip-target-newlib: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/newlib && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-newlib
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-newlib info-target-newlib
@@ -47724,6 +32925,21 @@
 
 @endif target-libgcc
 
+.PHONY: install-strip-target-libgcc maybe-install-strip-target-libgcc
+maybe-install-strip-target-libgcc:
+@if target-libgcc
+maybe-install-strip-target-libgcc: install-strip-target-libgcc
+
+install-strip-target-libgcc: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgcc && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgcc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libgcc info-target-libgcc
@@ -48067,6 +33283,463 @@
 
 
 
+.PHONY: configure-target-libquadmath maybe-configure-target-libquadmath
+maybe-configure-target-libquadmath:
+@if gcc-bootstrap
+configure-target-libquadmath: stage_current
+@endif gcc-bootstrap
+@if target-libquadmath
+maybe-configure-target-libquadmath: configure-target-libquadmath
+configure-target-libquadmath: 
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	echo "Checking multilib configuration for libquadmath..."; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath ; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libquadmath/multilib.tmp 2> /dev/null ; \
+	if test -r $(TARGET_SUBDIR)/libquadmath/multilib.out; then \
+	  if cmp -s $(TARGET_SUBDIR)/libquadmath/multilib.tmp $(TARGET_SUBDIR)/libquadmath/multilib.out; then \
+	    rm -f $(TARGET_SUBDIR)/libquadmath/multilib.tmp; \
+	  else \
+	    rm -f $(TARGET_SUBDIR)/libquadmath/Makefile; \
+	    mv $(TARGET_SUBDIR)/libquadmath/multilib.tmp $(TARGET_SUBDIR)/libquadmath/multilib.out; \
+	  fi; \
+	else \
+	  mv $(TARGET_SUBDIR)/libquadmath/multilib.tmp $(TARGET_SUBDIR)/libquadmath/multilib.out; \
+	fi; \
+	test ! -f $(TARGET_SUBDIR)/libquadmath/Makefile || exit 0; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath ; \
+	$(NORMAL_TARGET_EXPORTS)  \
+	echo Configuring in $(TARGET_SUBDIR)/libquadmath; \
+	cd "$(TARGET_SUBDIR)/libquadmath" || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(TARGET_SUBDIR)/libquadmath/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	srcdiroption="--srcdir=$${topdir}/libquadmath"; \
+	libsrcdir="$$s/libquadmath"; \
+	rm -f no-such-file || : ; \
+	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+	  --target=${target_alias} $${srcdiroption}  \
+	  || exit 1
+@endif target-libquadmath
+
+
+
+
+
+.PHONY: all-target-libquadmath maybe-all-target-libquadmath
+maybe-all-target-libquadmath:
+@if gcc-bootstrap
+all-target-libquadmath: stage_current
+@endif gcc-bootstrap
+@if target-libquadmath
+TARGET-target-libquadmath=all
+maybe-all-target-libquadmath: all-target-libquadmath
+all-target-libquadmath: configure-target-libquadmath
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS)  \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
+		$(TARGET-target-libquadmath))
+@endif target-libquadmath
+
+
+
+
+
+.PHONY: check-target-libquadmath maybe-check-target-libquadmath
+maybe-check-target-libquadmath:
+@if target-libquadmath
+maybe-check-target-libquadmath: check-target-libquadmath
+
+check-target-libquadmath:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
+
+@endif target-libquadmath
+
+.PHONY: install-target-libquadmath maybe-install-target-libquadmath
+maybe-install-target-libquadmath:
+@if target-libquadmath
+maybe-install-target-libquadmath: install-target-libquadmath
+
+install-target-libquadmath: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
+
+@endif target-libquadmath
+
+.PHONY: install-strip-target-libquadmath maybe-install-strip-target-libquadmath
+maybe-install-strip-target-libquadmath:
+@if target-libquadmath
+maybe-install-strip-target-libquadmath: install-strip-target-libquadmath
+
+install-strip-target-libquadmath: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libquadmath
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libquadmath info-target-libquadmath
+maybe-info-target-libquadmath:
+@if target-libquadmath
+maybe-info-target-libquadmath: info-target-libquadmath
+
+info-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing info in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           info) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-dvi-target-libquadmath dvi-target-libquadmath
+maybe-dvi-target-libquadmath:
+@if target-libquadmath
+maybe-dvi-target-libquadmath: dvi-target-libquadmath
+
+dvi-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing dvi in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           dvi) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-pdf-target-libquadmath pdf-target-libquadmath
+maybe-pdf-target-libquadmath:
+@if target-libquadmath
+maybe-pdf-target-libquadmath: pdf-target-libquadmath
+
+pdf-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing pdf in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           pdf) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-html-target-libquadmath html-target-libquadmath
+maybe-html-target-libquadmath:
+@if target-libquadmath
+maybe-html-target-libquadmath: html-target-libquadmath
+
+html-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing html in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           html) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-TAGS-target-libquadmath TAGS-target-libquadmath
+maybe-TAGS-target-libquadmath:
+@if target-libquadmath
+maybe-TAGS-target-libquadmath: TAGS-target-libquadmath
+
+TAGS-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing TAGS in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           TAGS) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-install-info-target-libquadmath install-info-target-libquadmath
+maybe-install-info-target-libquadmath:
+@if target-libquadmath
+maybe-install-info-target-libquadmath: install-info-target-libquadmath
+
+install-info-target-libquadmath: \
+    configure-target-libquadmath \
+    info-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-info in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-info) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-install-pdf-target-libquadmath install-pdf-target-libquadmath
+maybe-install-pdf-target-libquadmath:
+@if target-libquadmath
+maybe-install-pdf-target-libquadmath: install-pdf-target-libquadmath
+
+install-pdf-target-libquadmath: \
+    configure-target-libquadmath \
+    pdf-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-pdf in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-pdf) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-install-html-target-libquadmath install-html-target-libquadmath
+maybe-install-html-target-libquadmath:
+@if target-libquadmath
+maybe-install-html-target-libquadmath: install-html-target-libquadmath
+
+install-html-target-libquadmath: \
+    configure-target-libquadmath \
+    html-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-html in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-html) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-installcheck-target-libquadmath installcheck-target-libquadmath
+maybe-installcheck-target-libquadmath:
+@if target-libquadmath
+maybe-installcheck-target-libquadmath: installcheck-target-libquadmath
+
+installcheck-target-libquadmath: \
+    configure-target-libquadmath 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing installcheck in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           installcheck) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-mostlyclean-target-libquadmath mostlyclean-target-libquadmath
+maybe-mostlyclean-target-libquadmath:
+@if target-libquadmath
+maybe-mostlyclean-target-libquadmath: mostlyclean-target-libquadmath
+
+mostlyclean-target-libquadmath: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing mostlyclean in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           mostlyclean) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-clean-target-libquadmath clean-target-libquadmath
+maybe-clean-target-libquadmath:
+@if target-libquadmath
+maybe-clean-target-libquadmath: clean-target-libquadmath
+
+clean-target-libquadmath: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing clean in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           clean) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-distclean-target-libquadmath distclean-target-libquadmath
+maybe-distclean-target-libquadmath:
+@if target-libquadmath
+maybe-distclean-target-libquadmath: distclean-target-libquadmath
+
+distclean-target-libquadmath: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing distclean in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           distclean) \
+	  || exit 1
+
+@endif target-libquadmath
+
+.PHONY: maybe-maintainer-clean-target-libquadmath maintainer-clean-target-libquadmath
+maybe-maintainer-clean-target-libquadmath:
+@if target-libquadmath
+maybe-maintainer-clean-target-libquadmath: maintainer-clean-target-libquadmath
+
+maintainer-clean-target-libquadmath: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libquadmath" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libquadmath && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           maintainer-clean) \
+	  || exit 1
+
+@endif target-libquadmath
+
+
+
+
+
 .PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
 maybe-configure-target-libgfortran:
 @if gcc-bootstrap
@@ -48166,6 +33839,21 @@
 
 @endif target-libgfortran
 
+.PHONY: install-strip-target-libgfortran maybe-install-strip-target-libgfortran
+maybe-install-strip-target-libgfortran:
+@if target-libgfortran
+maybe-install-strip-target-libgfortran: install-strip-target-libgfortran
+
+install-strip-target-libgfortran: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgfortran && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgfortran
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libgfortran info-target-libgfortran
@@ -48608,6 +34296,21 @@
 
 @endif target-libobjc
 
+.PHONY: install-strip-target-libobjc maybe-install-strip-target-libobjc
+maybe-install-strip-target-libobjc:
+@if target-libobjc
+maybe-install-strip-target-libobjc: install-strip-target-libobjc
+
+install-strip-target-libobjc: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libobjc && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libobjc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libobjc info-target-libobjc
@@ -48951,6 +34654,463 @@
 
 
 
+.PHONY: configure-target-libgo maybe-configure-target-libgo
+maybe-configure-target-libgo:
+@if gcc-bootstrap
+configure-target-libgo: stage_current
+@endif gcc-bootstrap
+@if target-libgo
+maybe-configure-target-libgo: configure-target-libgo
+configure-target-libgo: 
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	echo "Checking multilib configuration for libgo..."; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo ; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgo/multilib.tmp 2> /dev/null ; \
+	if test -r $(TARGET_SUBDIR)/libgo/multilib.out; then \
+	  if cmp -s $(TARGET_SUBDIR)/libgo/multilib.tmp $(TARGET_SUBDIR)/libgo/multilib.out; then \
+	    rm -f $(TARGET_SUBDIR)/libgo/multilib.tmp; \
+	  else \
+	    rm -f $(TARGET_SUBDIR)/libgo/Makefile; \
+	    mv $(TARGET_SUBDIR)/libgo/multilib.tmp $(TARGET_SUBDIR)/libgo/multilib.out; \
+	  fi; \
+	else \
+	  mv $(TARGET_SUBDIR)/libgo/multilib.tmp $(TARGET_SUBDIR)/libgo/multilib.out; \
+	fi; \
+	test ! -f $(TARGET_SUBDIR)/libgo/Makefile || exit 0; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo ; \
+	$(NORMAL_TARGET_EXPORTS)  \
+	echo Configuring in $(TARGET_SUBDIR)/libgo; \
+	cd "$(TARGET_SUBDIR)/libgo" || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(TARGET_SUBDIR)/libgo/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	srcdiroption="--srcdir=$${topdir}/libgo"; \
+	libsrcdir="$$s/libgo"; \
+	rm -f no-such-file || : ; \
+	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+	  --target=${target_alias} $${srcdiroption}  \
+	  || exit 1
+@endif target-libgo
+
+
+
+
+
+.PHONY: all-target-libgo maybe-all-target-libgo
+maybe-all-target-libgo:
+@if gcc-bootstrap
+all-target-libgo: stage_current
+@endif gcc-bootstrap
+@if target-libgo
+TARGET-target-libgo=all
+maybe-all-target-libgo: all-target-libgo
+all-target-libgo: configure-target-libgo
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS)  \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
+		$(TARGET-target-libgo))
+@endif target-libgo
+
+
+
+
+
+.PHONY: check-target-libgo maybe-check-target-libgo
+maybe-check-target-libgo:
+@if target-libgo
+maybe-check-target-libgo: check-target-libgo
+
+check-target-libgo:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
+
+@endif target-libgo
+
+.PHONY: install-target-libgo maybe-install-target-libgo
+maybe-install-target-libgo:
+@if target-libgo
+maybe-install-target-libgo: install-target-libgo
+
+install-target-libgo: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
+
+@endif target-libgo
+
+.PHONY: install-strip-target-libgo maybe-install-strip-target-libgo
+maybe-install-strip-target-libgo:
+@if target-libgo
+maybe-install-strip-target-libgo: install-strip-target-libgo
+
+install-strip-target-libgo: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgo
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libgo info-target-libgo
+maybe-info-target-libgo:
+@if target-libgo
+maybe-info-target-libgo: info-target-libgo
+
+info-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing info in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           info) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-dvi-target-libgo dvi-target-libgo
+maybe-dvi-target-libgo:
+@if target-libgo
+maybe-dvi-target-libgo: dvi-target-libgo
+
+dvi-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing dvi in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           dvi) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-pdf-target-libgo pdf-target-libgo
+maybe-pdf-target-libgo:
+@if target-libgo
+maybe-pdf-target-libgo: pdf-target-libgo
+
+pdf-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing pdf in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           pdf) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-html-target-libgo html-target-libgo
+maybe-html-target-libgo:
+@if target-libgo
+maybe-html-target-libgo: html-target-libgo
+
+html-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing html in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           html) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-TAGS-target-libgo TAGS-target-libgo
+maybe-TAGS-target-libgo:
+@if target-libgo
+maybe-TAGS-target-libgo: TAGS-target-libgo
+
+TAGS-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing TAGS in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           TAGS) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-install-info-target-libgo install-info-target-libgo
+maybe-install-info-target-libgo:
+@if target-libgo
+maybe-install-info-target-libgo: install-info-target-libgo
+
+install-info-target-libgo: \
+    configure-target-libgo \
+    info-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-info in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-info) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-install-pdf-target-libgo install-pdf-target-libgo
+maybe-install-pdf-target-libgo:
+@if target-libgo
+maybe-install-pdf-target-libgo: install-pdf-target-libgo
+
+install-pdf-target-libgo: \
+    configure-target-libgo \
+    pdf-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-pdf in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-pdf) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-install-html-target-libgo install-html-target-libgo
+maybe-install-html-target-libgo:
+@if target-libgo
+maybe-install-html-target-libgo: install-html-target-libgo
+
+install-html-target-libgo: \
+    configure-target-libgo \
+    html-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing install-html in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           install-html) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-installcheck-target-libgo installcheck-target-libgo
+maybe-installcheck-target-libgo:
+@if target-libgo
+maybe-installcheck-target-libgo: installcheck-target-libgo
+
+installcheck-target-libgo: \
+    configure-target-libgo 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing installcheck in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           installcheck) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-mostlyclean-target-libgo mostlyclean-target-libgo
+maybe-mostlyclean-target-libgo:
+@if target-libgo
+maybe-mostlyclean-target-libgo: mostlyclean-target-libgo
+
+mostlyclean-target-libgo: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           mostlyclean) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-clean-target-libgo clean-target-libgo
+maybe-clean-target-libgo:
+@if target-libgo
+maybe-clean-target-libgo: clean-target-libgo
+
+clean-target-libgo: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing clean in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           clean) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-distclean-target-libgo distclean-target-libgo
+maybe-distclean-target-libgo:
+@if target-libgo
+maybe-distclean-target-libgo: distclean-target-libgo
+
+distclean-target-libgo: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing distclean in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           distclean) \
+	  || exit 1
+
+@endif target-libgo
+
+.PHONY: maybe-maintainer-clean-target-libgo maintainer-clean-target-libgo
+maybe-maintainer-clean-target-libgo:
+@if target-libgo
+maybe-maintainer-clean-target-libgo: maintainer-clean-target-libgo
+
+maintainer-clean-target-libgo: 
+	@: $(MAKE); $(unstage)
+	@[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgo" ; \
+	for flag in $(EXTRA_TARGET_FLAGS); do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	(cd $(TARGET_SUBDIR)/libgo && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	           maintainer-clean) \
+	  || exit 1
+
+@endif target-libgo
+
+
+
+
+
 .PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
 maybe-configure-target-libtermcap:
 @if gcc-bootstrap
@@ -49045,6 +35205,21 @@
 
 @endif target-libtermcap
 
+.PHONY: install-strip-target-libtermcap maybe-install-strip-target-libtermcap
+maybe-install-strip-target-libtermcap:
+@if target-libtermcap
+maybe-install-strip-target-libtermcap: install-strip-target-libtermcap
+
+install-strip-target-libtermcap: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libtermcap && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libtermcap
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libtermcap info-target-libtermcap
@@ -49427,6 +35602,21 @@
 
 @endif target-winsup
 
+.PHONY: install-strip-target-winsup maybe-install-strip-target-winsup
+maybe-install-strip-target-winsup:
+@if target-winsup
+maybe-install-strip-target-winsup: install-strip-target-winsup
+
+install-strip-target-winsup: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/winsup && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-winsup
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-winsup info-target-winsup
@@ -49864,6 +36054,21 @@
 
 @endif target-libgloss
 
+.PHONY: install-strip-target-libgloss maybe-install-strip-target-libgloss
+maybe-install-strip-target-libgloss:
+@if target-libgloss
+maybe-install-strip-target-libgloss: install-strip-target-libgloss
+
+install-strip-target-libgloss: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgloss && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgloss
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libgloss info-target-libgloss
@@ -50207,1322 +36412,6 @@
 
 
 
-.PHONY: configure-target-libiberty maybe-configure-target-libiberty
-maybe-configure-target-libiberty:
-@if gcc-bootstrap
-configure-target-libiberty: stage_current
-@endif gcc-bootstrap
-@if target-libiberty
-maybe-configure-target-libiberty: configure-target-libiberty
-configure-target-libiberty: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	echo "Checking multilib configuration for libiberty..."; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
-	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.tmp 2> /dev/null ; \
-	if test -r $(TARGET_SUBDIR)/libiberty/multilib.out; then \
-	  if cmp -s $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; then \
-	    rm -f $(TARGET_SUBDIR)/libiberty/multilib.tmp; \
-	  else \
-	    rm -f $(TARGET_SUBDIR)/libiberty/Makefile; \
-	    mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
-	  fi; \
-	else \
-	  mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
-	fi; \
-	test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	echo Configuring in $(TARGET_SUBDIR)/libiberty; \
-	cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(TARGET_SUBDIR)/libiberty/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/libiberty"; \
-	libsrcdir="$$s/libiberty"; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif target-libiberty
-
-
-
-
-
-.PHONY: all-target-libiberty maybe-all-target-libiberty
-maybe-all-target-libiberty:
-@if gcc-bootstrap
-all-target-libiberty: stage_current
-@endif gcc-bootstrap
-@if target-libiberty
-TARGET-target-libiberty=all
-maybe-all-target-libiberty: all-target-libiberty
-all-target-libiberty: configure-target-libiberty
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
-		$(TARGET-target-libiberty))
-@endif target-libiberty
-
-
-
-
-
-.PHONY: check-target-libiberty maybe-check-target-libiberty
-maybe-check-target-libiberty:
-@if target-libiberty
-maybe-check-target-libiberty: check-target-libiberty
-
-check-target-libiberty:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
-
-@endif target-libiberty
-
-.PHONY: install-target-libiberty maybe-install-target-libiberty
-maybe-install-target-libiberty:
-@if target-libiberty
-maybe-install-target-libiberty: install-target-libiberty
-
-install-target-libiberty: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
-
-@endif target-libiberty
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-libiberty info-target-libiberty
-maybe-info-target-libiberty:
-@if target-libiberty
-maybe-info-target-libiberty: info-target-libiberty
-
-info-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
-maybe-dvi-target-libiberty:
-@if target-libiberty
-maybe-dvi-target-libiberty: dvi-target-libiberty
-
-dvi-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-pdf-target-libiberty pdf-target-libiberty
-maybe-pdf-target-libiberty:
-@if target-libiberty
-maybe-pdf-target-libiberty: pdf-target-libiberty
-
-pdf-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing pdf in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           pdf) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-html-target-libiberty html-target-libiberty
-maybe-html-target-libiberty:
-@if target-libiberty
-maybe-html-target-libiberty: html-target-libiberty
-
-html-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
-maybe-TAGS-target-libiberty:
-@if target-libiberty
-maybe-TAGS-target-libiberty: TAGS-target-libiberty
-
-TAGS-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
-maybe-install-info-target-libiberty:
-@if target-libiberty
-maybe-install-info-target-libiberty: install-info-target-libiberty
-
-install-info-target-libiberty: \
-    configure-target-libiberty \
-    info-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-pdf-target-libiberty install-pdf-target-libiberty
-maybe-install-pdf-target-libiberty:
-@if target-libiberty
-maybe-install-pdf-target-libiberty: install-pdf-target-libiberty
-
-install-pdf-target-libiberty: \
-    configure-target-libiberty \
-    pdf-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-pdf in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-pdf) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-install-html-target-libiberty install-html-target-libiberty
-maybe-install-html-target-libiberty:
-@if target-libiberty
-maybe-install-html-target-libiberty: install-html-target-libiberty
-
-install-html-target-libiberty: \
-    configure-target-libiberty \
-    html-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-html in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-html) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
-maybe-installcheck-target-libiberty:
-@if target-libiberty
-maybe-installcheck-target-libiberty: installcheck-target-libiberty
-
-installcheck-target-libiberty: \
-    configure-target-libiberty 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
-maybe-mostlyclean-target-libiberty:
-@if target-libiberty
-maybe-mostlyclean-target-libiberty: mostlyclean-target-libiberty
-
-mostlyclean-target-libiberty: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           mostlyclean) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-clean-target-libiberty clean-target-libiberty
-maybe-clean-target-libiberty:
-@if target-libiberty
-maybe-clean-target-libiberty: clean-target-libiberty
-
-clean-target-libiberty: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           clean) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
-maybe-distclean-target-libiberty:
-@if target-libiberty
-maybe-distclean-target-libiberty: distclean-target-libiberty
-
-distclean-target-libiberty: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           distclean) \
-	  || exit 1
-
-@endif target-libiberty
-
-.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
-maybe-maintainer-clean-target-libiberty:
-@if target-libiberty
-maybe-maintainer-clean-target-libiberty: maintainer-clean-target-libiberty
-
-maintainer-clean-target-libiberty: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libiberty && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           maintainer-clean) \
-	  || exit 1
-
-@endif target-libiberty
-
-
-
-
-
-.PHONY: configure-target-gperf maybe-configure-target-gperf
-maybe-configure-target-gperf:
-@if gcc-bootstrap
-configure-target-gperf: stage_current
-@endif gcc-bootstrap
-@if target-gperf
-maybe-configure-target-gperf: configure-target-gperf
-configure-target-gperf: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	echo "Checking multilib configuration for gperf..."; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
-	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/multilib.tmp 2> /dev/null ; \
-	if test -r $(TARGET_SUBDIR)/gperf/multilib.out; then \
-	  if cmp -s $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; then \
-	    rm -f $(TARGET_SUBDIR)/gperf/multilib.tmp; \
-	  else \
-	    rm -f $(TARGET_SUBDIR)/gperf/Makefile; \
-	    mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \
-	  fi; \
-	else \
-	  mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \
-	fi; \
-	test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	echo Configuring in $(TARGET_SUBDIR)/gperf; \
-	cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(TARGET_SUBDIR)/gperf/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/gperf"; \
-	libsrcdir="$$s/gperf"; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif target-gperf
-
-
-
-
-
-.PHONY: all-target-gperf maybe-all-target-gperf
-maybe-all-target-gperf:
-@if gcc-bootstrap
-all-target-gperf: stage_current
-@endif gcc-bootstrap
-@if target-gperf
-TARGET-target-gperf=all
-maybe-all-target-gperf: all-target-gperf
-all-target-gperf: configure-target-gperf
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
-		$(TARGET-target-gperf))
-@endif target-gperf
-
-
-
-
-
-.PHONY: check-target-gperf maybe-check-target-gperf
-maybe-check-target-gperf:
-@if target-gperf
-maybe-check-target-gperf: check-target-gperf
-
-check-target-gperf:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
-
-@endif target-gperf
-
-.PHONY: install-target-gperf maybe-install-target-gperf
-maybe-install-target-gperf:
-@if target-gperf
-maybe-install-target-gperf: install-target-gperf
-
-install-target-gperf: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
-
-@endif target-gperf
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-gperf info-target-gperf
-maybe-info-target-gperf:
-@if target-gperf
-maybe-info-target-gperf: info-target-gperf
-
-info-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-dvi-target-gperf dvi-target-gperf
-maybe-dvi-target-gperf:
-@if target-gperf
-maybe-dvi-target-gperf: dvi-target-gperf
-
-dvi-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-pdf-target-gperf pdf-target-gperf
-maybe-pdf-target-gperf:
-@if target-gperf
-maybe-pdf-target-gperf: pdf-target-gperf
-
-pdf-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing pdf in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           pdf) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-html-target-gperf html-target-gperf
-maybe-html-target-gperf:
-@if target-gperf
-maybe-html-target-gperf: html-target-gperf
-
-html-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
-maybe-TAGS-target-gperf:
-@if target-gperf
-maybe-TAGS-target-gperf: TAGS-target-gperf
-
-TAGS-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-install-info-target-gperf install-info-target-gperf
-maybe-install-info-target-gperf:
-@if target-gperf
-maybe-install-info-target-gperf: install-info-target-gperf
-
-install-info-target-gperf: \
-    configure-target-gperf \
-    info-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-install-pdf-target-gperf install-pdf-target-gperf
-maybe-install-pdf-target-gperf:
-@if target-gperf
-maybe-install-pdf-target-gperf: install-pdf-target-gperf
-
-install-pdf-target-gperf: \
-    configure-target-gperf \
-    pdf-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-pdf in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-pdf) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-install-html-target-gperf install-html-target-gperf
-maybe-install-html-target-gperf:
-@if target-gperf
-maybe-install-html-target-gperf: install-html-target-gperf
-
-install-html-target-gperf: \
-    configure-target-gperf \
-    html-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-html in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-html) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
-maybe-installcheck-target-gperf:
-@if target-gperf
-maybe-installcheck-target-gperf: installcheck-target-gperf
-
-installcheck-target-gperf: \
-    configure-target-gperf 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
-maybe-mostlyclean-target-gperf:
-@if target-gperf
-maybe-mostlyclean-target-gperf: mostlyclean-target-gperf
-
-mostlyclean-target-gperf: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           mostlyclean) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-clean-target-gperf clean-target-gperf
-maybe-clean-target-gperf:
-@if target-gperf
-maybe-clean-target-gperf: clean-target-gperf
-
-clean-target-gperf: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           clean) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-distclean-target-gperf distclean-target-gperf
-maybe-distclean-target-gperf:
-@if target-gperf
-maybe-distclean-target-gperf: distclean-target-gperf
-
-distclean-target-gperf: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           distclean) \
-	  || exit 1
-
-@endif target-gperf
-
-.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
-maybe-maintainer-clean-target-gperf:
-@if target-gperf
-maybe-maintainer-clean-target-gperf: maintainer-clean-target-gperf
-
-maintainer-clean-target-gperf: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/gperf && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           maintainer-clean) \
-	  || exit 1
-
-@endif target-gperf
-
-
-
-
-
-.PHONY: configure-target-examples maybe-configure-target-examples
-maybe-configure-target-examples:
-@if gcc-bootstrap
-configure-target-examples: stage_current
-@endif gcc-bootstrap
-@if target-examples
-maybe-configure-target-examples: configure-target-examples
-configure-target-examples: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	echo "Checking multilib configuration for examples..."; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
-	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/multilib.tmp 2> /dev/null ; \
-	if test -r $(TARGET_SUBDIR)/examples/multilib.out; then \
-	  if cmp -s $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; then \
-	    rm -f $(TARGET_SUBDIR)/examples/multilib.tmp; \
-	  else \
-	    rm -f $(TARGET_SUBDIR)/examples/Makefile; \
-	    mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \
-	  fi; \
-	else \
-	  mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \
-	fi; \
-	test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	echo Configuring in $(TARGET_SUBDIR)/examples; \
-	cd "$(TARGET_SUBDIR)/examples" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(TARGET_SUBDIR)/examples/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/examples"; \
-	libsrcdir="$$s/examples"; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif target-examples
-
-
-
-
-
-.PHONY: all-target-examples maybe-all-target-examples
-maybe-all-target-examples:
-@if gcc-bootstrap
-all-target-examples: stage_current
-@endif gcc-bootstrap
-@if target-examples
-TARGET-target-examples=all
-maybe-all-target-examples: all-target-examples
-all-target-examples: configure-target-examples
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
-		$(TARGET-target-examples))
-@endif target-examples
-
-
-
-
-
-.PHONY: check-target-examples maybe-check-target-examples
-maybe-check-target-examples:
-@if target-examples
-maybe-check-target-examples: check-target-examples
-
-# Dummy target for uncheckable module.
-check-target-examples:
-
-@endif target-examples
-
-.PHONY: install-target-examples maybe-install-target-examples
-maybe-install-target-examples:
-@if target-examples
-maybe-install-target-examples: install-target-examples
-
-# Dummy target for uninstallable.
-install-target-examples:
-
-@endif target-examples
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-examples info-target-examples
-maybe-info-target-examples:
-@if target-examples
-maybe-info-target-examples: info-target-examples
-
-info-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-dvi-target-examples dvi-target-examples
-maybe-dvi-target-examples:
-@if target-examples
-maybe-dvi-target-examples: dvi-target-examples
-
-dvi-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-pdf-target-examples pdf-target-examples
-maybe-pdf-target-examples:
-@if target-examples
-maybe-pdf-target-examples: pdf-target-examples
-
-pdf-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing pdf in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           pdf) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-html-target-examples html-target-examples
-maybe-html-target-examples:
-@if target-examples
-maybe-html-target-examples: html-target-examples
-
-html-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-TAGS-target-examples TAGS-target-examples
-maybe-TAGS-target-examples:
-@if target-examples
-maybe-TAGS-target-examples: TAGS-target-examples
-
-TAGS-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-install-info-target-examples install-info-target-examples
-maybe-install-info-target-examples:
-@if target-examples
-maybe-install-info-target-examples: install-info-target-examples
-
-install-info-target-examples: \
-    configure-target-examples \
-    info-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-install-pdf-target-examples install-pdf-target-examples
-maybe-install-pdf-target-examples:
-@if target-examples
-maybe-install-pdf-target-examples: install-pdf-target-examples
-
-install-pdf-target-examples: \
-    configure-target-examples \
-    pdf-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-pdf in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-pdf) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-install-html-target-examples install-html-target-examples
-maybe-install-html-target-examples:
-@if target-examples
-maybe-install-html-target-examples: install-html-target-examples
-
-install-html-target-examples: \
-    configure-target-examples \
-    html-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-html in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-html) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-installcheck-target-examples installcheck-target-examples
-maybe-installcheck-target-examples:
-@if target-examples
-maybe-installcheck-target-examples: installcheck-target-examples
-
-installcheck-target-examples: \
-    configure-target-examples 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
-maybe-mostlyclean-target-examples:
-@if target-examples
-maybe-mostlyclean-target-examples: mostlyclean-target-examples
-
-mostlyclean-target-examples: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           mostlyclean) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-clean-target-examples clean-target-examples
-maybe-clean-target-examples:
-@if target-examples
-maybe-clean-target-examples: clean-target-examples
-
-clean-target-examples: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           clean) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-distclean-target-examples distclean-target-examples
-maybe-distclean-target-examples:
-@if target-examples
-maybe-distclean-target-examples: distclean-target-examples
-
-distclean-target-examples: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           distclean) \
-	  || exit 1
-
-@endif target-examples
-
-.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
-maybe-maintainer-clean-target-examples:
-@if target-examples
-maybe-maintainer-clean-target-examples: maintainer-clean-target-examples
-
-maintainer-clean-target-examples: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/examples && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           maintainer-clean) \
-	  || exit 1
-
-@endif target-examples
-
-
-
-
-
 .PHONY: configure-target-libffi maybe-configure-target-libffi
 maybe-configure-target-libffi:
 @if gcc-bootstrap
@@ -51622,6 +36511,21 @@
 
 @endif target-libffi
 
+.PHONY: install-strip-target-libffi maybe-install-strip-target-libffi
+maybe-install-strip-target-libffi:
+@if target-libffi
+maybe-install-strip-target-libffi: install-strip-target-libffi
+
+install-strip-target-libffi: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libffi && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libffi
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libffi info-target-libffi
@@ -52004,7 +36908,7 @@
 	rm -f no-such-file || : ; \
 	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
 	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
+	  --target=${target_alias} $${srcdiroption} $(EXTRA_CONFIGARGS_LIBJAVA) \
 	  || exit 1
 @endif target-libjava
 
@@ -52064,6 +36968,21 @@
 
 @endif target-libjava
 
+.PHONY: install-strip-target-libjava maybe-install-strip-target-libjava
+maybe-install-strip-target-libjava:
+@if target-libjava
+maybe-install-strip-target-libjava: install-strip-target-libjava
+
+install-strip-target-libjava: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(RAW_CXX_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libjava && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libjava
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libjava info-target-libjava
@@ -52506,6 +37425,21 @@
 
 @endif target-zlib
 
+.PHONY: install-strip-target-zlib maybe-install-strip-target-zlib
+maybe-install-strip-target-zlib:
+@if target-zlib
+maybe-install-strip-target-zlib: install-strip-target-zlib
+
+install-strip-target-zlib: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/zlib && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-zlib
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-zlib info-target-zlib
@@ -52948,6 +37882,21 @@
 
 @endif target-boehm-gc
 
+.PHONY: install-strip-target-boehm-gc maybe-install-strip-target-boehm-gc
+maybe-install-strip-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-strip-target-boehm-gc: install-strip-target-boehm-gc
+
+install-strip-target-boehm-gc: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/boehm-gc && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-boehm-gc
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
@@ -53291,448 +38240,6 @@
 
 
 
-.PHONY: configure-target-qthreads maybe-configure-target-qthreads
-maybe-configure-target-qthreads:
-@if gcc-bootstrap
-configure-target-qthreads: stage_current
-@endif gcc-bootstrap
-@if target-qthreads
-maybe-configure-target-qthreads: configure-target-qthreads
-configure-target-qthreads: 
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	echo "Checking multilib configuration for qthreads..."; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
-	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/multilib.tmp 2> /dev/null ; \
-	if test -r $(TARGET_SUBDIR)/qthreads/multilib.out; then \
-	  if cmp -s $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; then \
-	    rm -f $(TARGET_SUBDIR)/qthreads/multilib.tmp; \
-	  else \
-	    rm -f $(TARGET_SUBDIR)/qthreads/Makefile; \
-	    mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \
-	  fi; \
-	else \
-	  mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \
-	fi; \
-	test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
-	$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	echo Configuring in $(TARGET_SUBDIR)/qthreads; \
-	cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
-	case $(srcdir) in \
-	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
-	  *) topdir=`echo $(TARGET_SUBDIR)/qthreads/ | \
-		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
-	esac; \
-	srcdiroption="--srcdir=$${topdir}/qthreads"; \
-	libsrcdir="$$s/qthreads"; \
-	rm -f no-such-file || : ; \
-	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
-	  $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
-	  --target=${target_alias} $${srcdiroption}  \
-	  || exit 1
-@endif target-qthreads
-
-
-
-
-
-.PHONY: all-target-qthreads maybe-all-target-qthreads
-maybe-all-target-qthreads:
-@if gcc-bootstrap
-all-target-qthreads: stage_current
-@endif gcc-bootstrap
-@if target-qthreads
-TARGET-target-qthreads=all
-maybe-all-target-qthreads: all-target-qthreads
-all-target-qthreads: configure-target-qthreads
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS)  \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)  \
-		$(TARGET-target-qthreads))
-@endif target-qthreads
-
-
-
-
-
-.PHONY: check-target-qthreads maybe-check-target-qthreads
-maybe-check-target-qthreads:
-@if target-qthreads
-maybe-check-target-qthreads: check-target-qthreads
-
-check-target-qthreads:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
-
-@endif target-qthreads
-
-.PHONY: install-target-qthreads maybe-install-target-qthreads
-maybe-install-target-qthreads:
-@if target-qthreads
-maybe-install-target-qthreads: install-target-qthreads
-
-install-target-qthreads: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
-
-@endif target-qthreads
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-qthreads info-target-qthreads
-maybe-info-target-qthreads:
-@if target-qthreads
-maybe-info-target-qthreads: info-target-qthreads
-
-info-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
-maybe-dvi-target-qthreads:
-@if target-qthreads
-maybe-dvi-target-qthreads: dvi-target-qthreads
-
-dvi-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-pdf-target-qthreads pdf-target-qthreads
-maybe-pdf-target-qthreads:
-@if target-qthreads
-maybe-pdf-target-qthreads: pdf-target-qthreads
-
-pdf-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing pdf in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           pdf) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-html-target-qthreads html-target-qthreads
-maybe-html-target-qthreads:
-@if target-qthreads
-maybe-html-target-qthreads: html-target-qthreads
-
-html-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
-maybe-TAGS-target-qthreads:
-@if target-qthreads
-maybe-TAGS-target-qthreads: TAGS-target-qthreads
-
-TAGS-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
-maybe-install-info-target-qthreads:
-@if target-qthreads
-maybe-install-info-target-qthreads: install-info-target-qthreads
-
-install-info-target-qthreads: \
-    configure-target-qthreads \
-    info-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-install-pdf-target-qthreads install-pdf-target-qthreads
-maybe-install-pdf-target-qthreads:
-@if target-qthreads
-maybe-install-pdf-target-qthreads: install-pdf-target-qthreads
-
-install-pdf-target-qthreads: \
-    configure-target-qthreads \
-    pdf-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-pdf in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-pdf) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-install-html-target-qthreads install-html-target-qthreads
-maybe-install-html-target-qthreads:
-@if target-qthreads
-maybe-install-html-target-qthreads: install-html-target-qthreads
-
-install-html-target-qthreads: \
-    configure-target-qthreads \
-    html-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-html in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-html) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
-maybe-installcheck-target-qthreads:
-@if target-qthreads
-maybe-installcheck-target-qthreads: installcheck-target-qthreads
-
-installcheck-target-qthreads: \
-    configure-target-qthreads 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
-maybe-mostlyclean-target-qthreads:
-@if target-qthreads
-maybe-mostlyclean-target-qthreads: mostlyclean-target-qthreads
-
-mostlyclean-target-qthreads: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           mostlyclean) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-clean-target-qthreads clean-target-qthreads
-maybe-clean-target-qthreads:
-@if target-qthreads
-maybe-clean-target-qthreads: clean-target-qthreads
-
-clean-target-qthreads: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           clean) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
-maybe-distclean-target-qthreads:
-@if target-qthreads
-maybe-distclean-target-qthreads: distclean-target-qthreads
-
-distclean-target-qthreads: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           distclean) \
-	  || exit 1
-
-@endif target-qthreads
-
-.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
-maybe-maintainer-clean-target-qthreads:
-@if target-qthreads
-maybe-maintainer-clean-target-qthreads: maintainer-clean-target-qthreads
-
-maintainer-clean-target-qthreads: 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/qthreads && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           maintainer-clean) \
-	  || exit 1
-
-@endif target-qthreads
-
-
-
-
-
 .PHONY: configure-target-rda maybe-configure-target-rda
 maybe-configure-target-rda:
 @if gcc-bootstrap
@@ -53832,6 +38339,21 @@
 
 @endif target-rda
 
+.PHONY: install-strip-target-rda maybe-install-strip-target-rda
+maybe-install-strip-target-rda:
+@if target-rda
+maybe-install-strip-target-rda: install-strip-target-rda
+
+install-strip-target-rda: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/rda && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-rda
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-rda info-target-rda
@@ -54274,6 +38796,21 @@
 
 @endif target-libada
 
+.PHONY: install-strip-target-libada maybe-install-strip-target-libada
+maybe-install-strip-target-libada:
+@if target-libada
+maybe-install-strip-target-libada: install-strip-target-libada
+
+install-strip-target-libada: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libada && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libada
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libada info-target-libada
@@ -55242,6 +39779,21 @@
 
 @endif target-libgomp
 
+.PHONY: install-strip-target-libgomp maybe-install-strip-target-libgomp
+maybe-install-strip-target-libgomp:
+@if target-libgomp
+maybe-install-strip-target-libgomp: install-strip-target-libgomp
+
+install-strip-target-libgomp: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(NORMAL_TARGET_EXPORTS) \
+	(cd $(TARGET_SUBDIR)/libgomp && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
+
+@endif target-libgomp
+
 # Other targets (info, dvi, pdf, etc.)
 
 .PHONY: maybe-info-target-libgomp info-target-libgomp
@@ -55583,6 +40135,13 @@
 
 
 
+@if target-libmudflap
+.PHONY: check-target-libmudflap-c++
+check-target-libmudflap-c++:
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
+
+@endif target-libmudflap
+
 # ----------
 # GCC module
 # ----------
@@ -55616,8 +40175,8 @@
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
-check-c++: check-gcc-c++ check-target-libstdc++-v3
+	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++ check-c++0x);
+check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++
 
 .PHONY: check-gcc-fortran check-fortran
 check-gcc-fortran:
@@ -55625,7 +40184,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-fortran);
-check-fortran: check-gcc-fortran check-target-libgfortran
+check-fortran: check-gcc-fortran check-target-libquadmath check-target-libgfortran
 
 .PHONY: check-gcc-java check-java
 check-gcc-java:
@@ -55659,6 +40218,14 @@
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-obj-c++);
 check-obj-c++: check-gcc-obj-c++
 
+.PHONY: check-gcc-go check-go
+check-gcc-go:
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
+check-go: check-gcc-go check-target-libgo
+
 
 # Install the gcc headers files, but not the fixed include files,
 # which Cygnus is not allowed to distribute.  This rule is very
@@ -57640,19 +42207,17 @@
 configure-stage4-target-libgcc: maybe-all-stage4-gcc
 configure-stageprofile-target-libgcc: maybe-all-stageprofile-gcc
 configure-stagefeedback-target-libgcc: maybe-all-stagefeedback-gcc
+configure-target-libquadmath: stage_last
 configure-target-libgfortran: stage_last
 configure-target-libobjc: stage_last
+configure-target-libgo: stage_last
 configure-target-libtermcap: stage_last
 configure-target-winsup: stage_last
 configure-target-libgloss: stage_last
-configure-target-libiberty: stage_last
-configure-target-gperf: stage_last
-configure-target-examples: stage_last
 configure-target-libffi: stage_last
 configure-target-libjava: stage_last
 configure-target-zlib: stage_last
 configure-target-boehm-gc: stage_last
-configure-target-qthreads: stage_last
 configure-target-rda: stage_last
 configure-target-libada: stage_last
 configure-stage1-target-libgomp: maybe-all-stage1-gcc
@@ -57669,19 +42234,17 @@
 configure-target-libssp: maybe-all-gcc
 configure-target-newlib: maybe-all-gcc
 configure-target-libgcc: maybe-all-gcc
+configure-target-libquadmath: maybe-all-gcc
 configure-target-libgfortran: maybe-all-gcc
 configure-target-libobjc: maybe-all-gcc
+configure-target-libgo: maybe-all-gcc
 configure-target-libtermcap: maybe-all-gcc
 configure-target-winsup: maybe-all-gcc
 configure-target-libgloss: maybe-all-gcc
-configure-target-libiberty: maybe-all-gcc
-configure-target-gperf: maybe-all-gcc
-configure-target-examples: maybe-all-gcc
 configure-target-libffi: maybe-all-gcc
 configure-target-libjava: maybe-all-gcc
 configure-target-zlib: maybe-all-gcc
 configure-target-boehm-gc: maybe-all-gcc
-configure-target-qthreads: maybe-all-gcc
 configure-target-rda: maybe-all-gcc
 configure-target-libada: maybe-all-gcc
 configure-target-libgomp: maybe-all-gcc
@@ -57706,10 +42269,8 @@
 # prebootstrap dependencies, prebootstrap modules are gathered in
 # a hash table.
 all-build-bison: maybe-all-build-texinfo
-all-build-byacc: maybe-all-build-texinfo
 all-build-flex: maybe-all-build-texinfo
 all-build-flex: maybe-all-build-bison
-all-build-flex: maybe-all-build-byacc
 all-build-flex: maybe-all-build-m4
 all-build-libiberty: maybe-all-build-texinfo
 all-build-m4: maybe-all-build-texinfo
@@ -57722,6 +42283,14 @@
 configure-stage4-gcc: maybe-configure-stage4-intl
 configure-stageprofile-gcc: maybe-configure-stageprofile-intl
 configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-all-lto-plugin
+
+configure-stage1-gcc: maybe-all-stage1-lto-plugin
+configure-stage2-gcc: maybe-all-stage2-lto-plugin
+configure-stage3-gcc: maybe-all-stage3-lto-plugin
+configure-stage4-gcc: maybe-all-stage4-lto-plugin
+configure-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+configure-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 configure-gcc: maybe-all-binutils
 
 configure-stage1-gcc: maybe-all-stage1-binutils
@@ -57834,14 +42403,6 @@
 all-stage4-gcc: maybe-all-build-bison
 all-stageprofile-gcc: maybe-all-build-bison
 all-stagefeedback-gcc: maybe-all-build-bison
-all-gcc: maybe-all-build-byacc
-
-all-stage1-gcc: maybe-all-build-byacc
-all-stage2-gcc: maybe-all-build-byacc
-all-stage3-gcc: maybe-all-build-byacc
-all-stage4-gcc: maybe-all-build-byacc
-all-stageprofile-gcc: maybe-all-build-byacc
-all-stagefeedback-gcc: maybe-all-build-byacc
 all-gcc: maybe-all-build-flex
 
 all-stage1-gcc: maybe-all-build-flex
@@ -57899,6 +42460,14 @@
 all-stageprofile-gcc: maybe-all-stageprofile-libiberty
 all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
 all-gcc: maybe-all-fixincludes
+all-gcc: maybe-all-lto-plugin
+
+all-stage1-gcc: maybe-all-stage1-lto-plugin
+all-stage2-gcc: maybe-all-stage2-lto-plugin
+all-stage3-gcc: maybe-all-stage3-lto-plugin
+all-stage4-gcc: maybe-all-stage4-lto-plugin
+all-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
+all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 info-gcc: maybe-all-build-libiberty
 
 info-stage1-gcc: maybe-all-build-libiberty
@@ -57932,6 +42501,8 @@
 html-stageprofile-gcc: maybe-all-build-libiberty
 html-stagefeedback-gcc: maybe-all-build-libiberty
 install-gcc: maybe-install-fixincludes
+install-gcc: maybe-install-lto-plugin
+install-strip-gcc: maybe-install-strip-fixincludes
 configure-libcpp: configure-libiberty
 
 configure-stage1-libcpp: configure-stage1-libiberty
@@ -57966,14 +42537,15 @@
 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
 all-fixincludes: maybe-all-libiberty
 all-gnattools: maybe-all-target-libada
-all-lto-plugin: maybe-all-gcc
+all-lto-plugin: maybe-all-libiberty
 
-all-stage1-lto-plugin: maybe-all-stage1-gcc
-all-stage2-lto-plugin: maybe-all-stage2-gcc
-all-stage3-lto-plugin: maybe-all-stage3-gcc
-all-stage4-lto-plugin: maybe-all-stage4-gcc
-all-stageprofile-lto-plugin: maybe-all-stageprofile-gcc
-all-stagefeedback-lto-plugin: maybe-all-stagefeedback-gcc
+all-stage1-lto-plugin: maybe-all-stage1-libiberty
+all-stage2-lto-plugin: maybe-all-stage2-libiberty
+all-stage3-lto-plugin: maybe-all-stage3-libiberty
+all-stage4-lto-plugin: maybe-all-stage4-libiberty
+all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty
+all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
+all-utils: maybe-all-libiberty
 configure-mpfr: maybe-all-gmp
 
 configure-stage1-mpfr: maybe-all-stage1-gmp
@@ -58023,9 +42595,9 @@
 all-gdb: maybe-all-opcodes
 all-gdb: maybe-all-readline
 all-gdb: maybe-all-build-bison
-all-gdb: maybe-all-build-byacc
 all-gdb: maybe-all-sim
 all-gdb: maybe-all-libdecnumber
+all-gdb: maybe-all-libtermcap
 configure-libgui: maybe-configure-tcl
 configure-libgui: maybe-configure-tk
 all-libgui: maybe-all-tcl
@@ -58127,14 +42699,6 @@
 all-stage4-binutils: maybe-all-build-bison
 all-stageprofile-binutils: maybe-all-build-bison
 all-stagefeedback-binutils: maybe-all-build-bison
-all-binutils: maybe-all-build-byacc
-
-all-stage1-binutils: maybe-all-build-byacc
-all-stage2-binutils: maybe-all-build-byacc
-all-stage3-binutils: maybe-all-build-byacc
-all-stage4-binutils: maybe-all-build-byacc
-all-stageprofile-binutils: maybe-all-build-byacc
-all-stagefeedback-binutils: maybe-all-build-byacc
 all-binutils: maybe-all-intl
 
 all-stage1-binutils: maybe-all-stage1-intl
@@ -58144,7 +42708,9 @@
 all-stageprofile-binutils: maybe-all-stageprofile-intl
 all-stagefeedback-binutils: maybe-all-stagefeedback-intl
 install-binutils: maybe-install-opcodes
+install-strip-binutils: maybe-install-strip-opcodes
 install-opcodes: maybe-install-bfd
+install-strip-opcodes: maybe-install-strip-bfd
 configure-gas: maybe-configure-intl
 
 configure-stage1-gas: maybe-configure-stage1-intl
@@ -58230,14 +42796,6 @@
 all-stage4-ld: maybe-all-build-bison
 all-stageprofile-ld: maybe-all-build-bison
 all-stagefeedback-ld: maybe-all-build-bison
-all-ld: maybe-all-build-byacc
-
-all-stage1-ld: maybe-all-build-byacc
-all-stage2-ld: maybe-all-build-byacc
-all-stage3-ld: maybe-all-build-byacc
-all-stage4-ld: maybe-all-build-byacc
-all-stageprofile-ld: maybe-all-build-byacc
-all-stagefeedback-ld: maybe-all-build-byacc
 all-ld: maybe-all-build-flex
 
 all-stage1-ld: maybe-all-build-flex
@@ -58255,6 +42813,7 @@
 all-stageprofile-ld: maybe-all-stageprofile-intl
 all-stagefeedback-ld: maybe-all-stagefeedback-intl
 install-ld: maybe-install-gold
+install-strip-ld: maybe-install-strip-gold
 configure-gold: maybe-configure-intl
 
 configure-stage1-gold: maybe-configure-stage1-intl
@@ -58295,14 +42854,6 @@
 all-stage4-gold: maybe-all-build-bison
 all-stageprofile-gold: maybe-all-build-bison
 all-stagefeedback-gold: maybe-all-build-bison
-all-gold: maybe-all-build-byacc
-
-all-stage1-gold: maybe-all-build-byacc
-all-stage2-gold: maybe-all-build-byacc
-all-stage3-gold: maybe-all-build-byacc
-all-stage4-gold: maybe-all-build-byacc
-all-stageprofile-gold: maybe-all-build-byacc
-all-stagefeedback-gold: maybe-all-build-byacc
 check-gold: maybe-all-binutils
 
 check-stage1-gold: maybe-all-stage1-binutils
@@ -58363,6 +42914,7 @@
 all-itcl: maybe-all-tcl
 all-itcl: maybe-all-tk
 install-itcl: maybe-install-tcl
+install-strip-itcl: maybe-install-strip-tcl
 configure-tk: maybe-configure-tcl
 all-tk: maybe-all-tcl
 all-sid: maybe-all-libiberty
@@ -58371,7 +42923,9 @@
 all-sid: maybe-all-tcl
 all-sid: maybe-all-tk
 install-sid: maybe-install-tcl
+install-strip-sid: maybe-install-strip-tcl
 install-sid: maybe-install-tk
+install-strip-sid: maybe-install-strip-tk
 configure-sim: maybe-configure-intl
 all-sim: maybe-all-intl
 all-sim: maybe-all-libiberty
@@ -58382,57 +42936,29 @@
 all-fastjar: maybe-all-zlib
 all-fastjar: maybe-all-build-texinfo
 all-fastjar: maybe-all-libiberty
-all-autoconf: maybe-all-m4
-all-autoconf: maybe-all-build-texinfo
-all-automake: maybe-all-m4
-all-automake: maybe-all-build-texinfo
-all-automake: maybe-all-autoconf
 all-bison: maybe-all-intl
 all-bison: maybe-all-build-texinfo
-all-diff: maybe-all-intl
-all-diff: maybe-all-build-texinfo
-all-fileutils: maybe-all-intl
-all-fileutils: maybe-all-build-texinfo
 all-flex: maybe-all-build-bison
-all-flex: maybe-all-build-byacc
 all-flex: maybe-all-intl
 all-flex: maybe-all-m4
 all-flex: maybe-all-build-texinfo
-all-gzip: maybe-all-intl
-all-gzip: maybe-all-zlib
-all-gzip: maybe-all-build-texinfo
-all-hello: maybe-all-intl
-all-hello: maybe-all-build-texinfo
 all-m4: maybe-all-intl
 all-m4: maybe-all-build-texinfo
-all-make: maybe-all-intl
-all-make: maybe-all-build-texinfo
-all-patch: maybe-all-build-texinfo
-all-make: maybe-all-build-texinfo
-all-prms: maybe-all-libiberty
-all-recode: maybe-all-build-texinfo
-all-sed: maybe-all-build-texinfo
-all-send-pr: maybe-all-prms
-all-tar: maybe-all-build-texinfo
-all-uudecode: maybe-all-build-texinfo
-configure-target-boehm-gc: maybe-configure-target-qthreads
 configure-target-boehm-gc: maybe-all-target-libstdc++-v3
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib
-all-target-fastjar: maybe-all-target-libiberty
+configure-target-libgo: maybe-configure-target-libffi
+configure-target-libgo: maybe-all-target-libstdc++-v3
+all-target-libgo: maybe-all-target-libffi
 configure-target-libjava: maybe-configure-target-zlib
 configure-target-libjava: maybe-configure-target-boehm-gc
-configure-target-libjava: maybe-configure-target-qthreads
 configure-target-libjava: maybe-configure-target-libffi
 all-target-libjava: maybe-all-fastjar
 all-target-libjava: maybe-all-target-zlib
 all-target-libjava: maybe-all-target-boehm-gc
-all-target-libjava: maybe-all-target-qthreads
 all-target-libjava: maybe-all-target-libffi
 configure-target-libobjc: maybe-configure-target-boehm-gc
-all-target-libobjc: maybe-all-target-libiberty
 all-target-libobjc: maybe-all-target-boehm-gc
-all-target-libstdc++-v3: maybe-all-target-libiberty
 configure-target-libstdc++-v3: maybe-configure-target-libgomp
 
 configure-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
@@ -58450,12 +42976,10 @@
 all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
 all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
 all-target-libgloss: maybe-all-target-newlib
-all-target-winsup: maybe-all-target-libiberty
 all-target-winsup: maybe-all-target-libtermcap
-configure-target-libiberty: maybe-all-binutils
-configure-target-libiberty: maybe-all-ld
 configure-target-newlib: maybe-all-binutils
 configure-target-newlib: maybe-all-ld
+configure-target-libgfortran: maybe-all-target-libquadmath
 
 
 # Dependencies for target modules on other target modules are
@@ -58483,19 +43007,17 @@
 configure-target-libmudflap: maybe-all-target-libgcc
 configure-target-libssp: maybe-all-target-libgcc
 configure-target-newlib: maybe-all-target-libgcc
+configure-target-libquadmath: maybe-all-target-libgcc
 configure-target-libgfortran: maybe-all-target-libgcc
 configure-target-libobjc: maybe-all-target-libgcc
+configure-target-libgo: maybe-all-target-libgcc
 configure-target-libtermcap: maybe-all-target-libgcc
 configure-target-winsup: maybe-all-target-libgcc
 configure-target-libgloss: maybe-all-target-libgcc
-configure-target-libiberty: maybe-all-target-libgcc
-configure-target-gperf: maybe-all-target-libgcc
-configure-target-examples: maybe-all-target-libgcc
 configure-target-libffi: maybe-all-target-libgcc
 configure-target-libjava: maybe-all-target-libgcc
 configure-target-zlib: maybe-all-target-libgcc
 configure-target-boehm-gc: maybe-all-target-libgcc
-configure-target-qthreads: maybe-all-target-libgcc
 configure-target-rda: maybe-all-target-libgcc
 configure-target-libada: maybe-all-target-libgcc
 configure-target-libgomp: maybe-all-target-libgcc
@@ -58510,21 +43032,19 @@
 
 
 
+configure-target-libquadmath: maybe-all-target-newlib maybe-all-target-libgloss
+
 configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
 
 configure-target-libobjc: maybe-all-target-newlib maybe-all-target-libgloss
 
+configure-target-libgo: maybe-all-target-newlib maybe-all-target-libgloss
+
 configure-target-libtermcap: maybe-all-target-newlib maybe-all-target-libgloss
 
 configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
 
 
-
-configure-target-gperf: maybe-all-target-newlib maybe-all-target-libgloss
-configure-target-gperf: maybe-all-target-libstdc++-v3
-
-configure-target-examples: maybe-all-target-newlib maybe-all-target-libgloss
-
 configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
 
 configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
@@ -58534,8 +43054,6 @@
 
 configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
 
-configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss
-
 configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
 
 configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
diff --git a/Makefile.tpl b/Makefile.tpl
index 4c55ee2..4dd2391 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -6,7 +6,7 @@
 #
 # Makefile for directory with subdirs to build.
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
@@ -103,8 +103,6 @@
 tooldir = @tooldir@
 build_tooldir = @build_tooldir@
 
-GDB_NLM_DEPS = 
-
 # This is the name of the environment variable used for the path to
 # the libraries.
 RPATH_ENVVAR = @RPATH_ENVVAR@
@@ -160,6 +158,8 @@
 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+	GOC="$(GOC_FOR_BUILD)"; export GOC; \
+	GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
 	DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
 	LD="$(LD_FOR_BUILD)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
@@ -196,6 +196,7 @@
 	CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
 	GCJ="$(GCJ)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
+	GOC="$(GOC)"; export GOC; \
 	AR="$(AR)"; export AR; \
 	AS="$(AS)"; export AS; \
 	CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
@@ -239,10 +240,13 @@
 	CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
 	  -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
 	  -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+	  -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
 	  -I$$s/libstdc++-v3/libsupc++ \
-	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
+	  export CXX; \
 	CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD;
 @endif target-libstdc++-v3-bootstrap
 
@@ -276,6 +280,7 @@
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
+	GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
 	DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
 	LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
@@ -317,11 +322,13 @@
 HOST_LIBELFLIBS = @libelflibs@
 HOST_LIBELFINC = @libelfinc@
 
+EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
 
-SHELL = @config_shell@
+SHELL = @SHELL@
 
 # pwd command to use.  Allow user to override default by setting PWDCMD in
 # the environment to account for automounters.  The make variable must not
@@ -342,6 +349,7 @@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
 GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
+GOC_FOR_BUILD = @GOC_FOR_BUILD@
 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
 LD_FOR_BUILD = @LD_FOR_BUILD@
 NM_FOR_BUILD = @NM_FOR_BUILD@
@@ -404,6 +412,7 @@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+GOCFLAGS = $(CFLAGS)
 
 TFLAGS =
 
@@ -412,6 +421,7 @@
 STAGE_CFLAGS = $(BOOT_CFLAGS)
 STAGE_TFLAGS = $(TFLAGS)
 STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
+POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@
 
 [+ FOR bootstrap-stage +]
 # Defaults for stage [+id+]; some are overridden below.
@@ -422,7 +432,10 @@
 STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS)
 @endif target-libstdc++-v3-bootstrap
 STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
-STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
+# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
+# POSTSTAGE1_CONFIGURE_FLAGS here.
+STAGE[+id+]_CONFIGURE_FLAGS = \
+	$(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
 [+ ENDFOR bootstrap-stage +]
 
 # Only build the C compiler for stage1, because that is the only one that
@@ -440,6 +453,9 @@
 #   the last argument when conflicting --enable arguments are passed.
 # * Likewise, we force-disable coverage flags, since the installed
 #   compiler probably has never heard of them.
+# * Don't remove this, because above we added
+#   POSTSTAGE1_CONFIGURE_FLAGS to STAGE[+id+]_CONFIGURE_FLAGS, which
+#   we don't want for STAGE1_CONFIGURE_FLAGS.
 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
 	  --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
 
@@ -469,6 +485,7 @@
 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
+GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
 LD_FOR_TARGET=@LD_FOR_TARGET@
 
@@ -489,7 +506,8 @@
 
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET = 
+LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
+GOCFLAGS_FOR_TARGET = -O2 -g
 
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
@@ -543,6 +561,26 @@
 @endif [+module+]
 [+ ENDIF lib_path +][+ ENDFOR host_modules +]
 
+CXX_FOR_TARGET_FLAG_TO_PASS = \
+	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"
+@if target-libstdc++-v3
+# CXX_FOR_TARGET is tricky to get right for target libs that require a
+# functional C++ compiler.  When we recurse, if we expand
+# CXX_FOR_TARGET before configuring libstdc++-v3, we won't get
+# libstdc++ include flags from the script.  Instead, we get an
+# -funconfigured-* word, so that we'll get errors if this invalid C++
+# command line is used for anything, but also so that we can use the
+# word to decide whether or not to pass on this CXX_FOR_TARGET.  If we
+# don't pass it on, sub-make will use the default definition, that
+# re-expands it at the time of use, so we'll get it right when we need
+# it.  One potential exception is the expansion of CXX_FOR_TARGET
+# passed down as part of CXX within TARGET_FLAGS, but this wouldn't
+# really work, for C++ host programs can't depend on the current-stage
+# C++ target library.
+CXX_FOR_TARGET_FLAG_TO_PASS = \
+	$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
+@endif target-libstdc++-v3
+
 # Flags to pass down to all sub-makes.
 BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
 	"`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
@@ -550,6 +588,7 @@
 	"STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \
 	"STAGE[+id+]_CXXFLAGS=$(STAGE[+id+]_CXXFLAGS)" \
 	"STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \
+	$(CXX_FOR_TARGET_FLAG_TO_PASS) \
 	"TFLAGS=$(TFLAGS)" \
 	"CONFIG_SHELL=$(SHELL)" \
 	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 
@@ -567,6 +606,7 @@
 	'DLLTOOL=$(DLLTOOL)' \
 	'GCJ=$(GCJ)' \
 	'GFORTRAN=$(GFORTRAN)' \
+	'GOC=$(GOC)' \
 	'LD=$(LD)' \
 	'LIPO=$(LIPO)' \
 	'NM=$(NM)' \
@@ -578,18 +618,6 @@
 
 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
 
-# Flags that are concerned with the location of the X11 include files
-# and library files
-#
-# NOTE: until the top-level is getting the values via autoconf, it only
-# causes problems to have this top-level Makefile overriding the autoconf-set
-# values in child directories.  Only variables that don't conflict with
-# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
-#
-X11_FLAGS_TO_PASS = \
-	'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
-	'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
-
 # Flags to pass to stage2 and later makes.
 
 POSTSTAGE1_FLAGS_TO_PASS = \
@@ -615,6 +643,8 @@
 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
 	'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
 	'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+	'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
 	'LD=$(COMPILER_LD_FOR_TARGET)' \
 	'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
 	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
@@ -878,6 +908,26 @@
 install-no-fixedincludes: installdirs install-host-nogcc \
 	install-target gcc-no-fixedincludes
 
+.PHONY: install-strip
+install-strip:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-strip-host install-strip-target
+
+.PHONY: install-strip-host
+install-strip-host: [+
+  FOR host_modules +] \
+    maybe-install-strip-[+module+][+
+  ENDFOR host_modules +]
+
+.PHONY: install-strip-target
+install-strip-target: [+
+  FOR target_modules +] \
+    maybe-install-strip-target-[+module+][+
+  ENDFOR target_modules +]
+
+
 ### other supporting targets
 
 MAKEDIRS= \
@@ -1163,6 +1213,23 @@
 [+ ENDIF no_install +]
 @endif [+module+]
 
+.PHONY: install-strip-[+module+] maybe-install-strip-[+module+]
+maybe-install-strip-[+module+]:
+@if [+module+]
+maybe-install-strip-[+module+]: install-strip-[+module+]
+[+ IF no_install +]
+install-strip-[+module+]:
+[+ ELSE install +]
+install-strip-[+module+]: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/[+module+] && \
+	  $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install-strip)
+[+ ENDIF no_install +]
+@endif [+module+]
+
 # Other targets (info, dvi, pdf, etc.)
 [+ FOR recursive_targets +]
 .PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
@@ -1275,6 +1342,28 @@
 [+ ENDIF no_install +]
 @endif target-[+module+]
 
+.PHONY: install-strip-target-[+module+] maybe-install-strip-target-[+module+]
+maybe-install-strip-target-[+module+]:
+@if target-[+module+]
+maybe-install-strip-target-[+module+]: install-strip-target-[+module+]
+[+ IF no_install +]
+# Dummy target for uninstallable.
+install-strip-target-[+module+]:
+[+ ELSE install +]
+install-strip-target-[+module+]: installdirs
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
+IF raw_cxx +]
+	$(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+	$(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
+	(cd $(TARGET_SUBDIR)/[+module+] && \
+	  $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install-strip)
+[+ ENDIF no_install +]
+@endif target-[+module+]
+
 # Other targets (info, dvi, pdf, etc.)
 [+ FOR recursive_targets +]
 .PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
@@ -1314,6 +1403,13 @@
 [+ ENDFOR recursive_targets +]
 [+ ENDFOR target_modules +]
 
+@if target-libmudflap
+.PHONY: check-target-libmudflap-c++
+check-target-libmudflap-c++:
+	$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
+
+@endif target-libmudflap
+
 # ----------
 # GCC module
 # ----------
@@ -1340,7 +1436,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
 	(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) [+gcc-check-target+]);
-check-[+language+]: check-gcc-[+language+][+ IF lib-check-target +] [+ lib-check-target +][+ ENDIF lib-check-target +]
+check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +]
 [+ ENDFOR languages +]
 
 # Install the gcc headers files, but not the fixed include files,
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index abf8122..65db027 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3252 +1,2698 @@
-2010-12-08  Tristan Gingold  <[email protected]>
+2011-11-21  Tristan Gingold  <[email protected]>
 
-	* configure.in: Bump version to 2.21
+	* configure.in: Bump version to 2.22
 	* Makefile.am (RELEASE): Set.
 	* configure, Makefile.in: Regenerate.
 
-2010-12-07  H.J. Lu  <[email protected]>
+2011-11-15  Maxim Kuvyrkov  <[email protected]>
 
-	* archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and
-	BFD_DECOMPRESS.
-	(bfd_openr_next_archived_file): Revert the last change.
+	Backport from mainline:
 
-2010-12-06  Mike Frysinger  <[email protected]>
+	2011-11-14  Maxim Kuvyrkov  <[email protected]>
+        * elfxx-mips.c (mips_n64_exe_plt0_entry): Use 64-bit move.
 
-	* Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing.
-	(PLUGINS/bfdinclude_HEADERS): Append plugin-api.h.
-	* Makefile.in: Regenerated.
+2011-11-15  Alan Modra  <[email protected]>
+	    Andreas Tobler  <[email protected]>
 
-2010-11-30  Joel Sherrill  <[email protected]>
+	* elflink.c (_bfd_elf_create_got_section): Replace
+	bfd_make_section_with_flags with bfd_make_section_anyway_with_flags.
+	(_bfd_elf_link_create_dynamic_sections): Likewise.
+	* elf32-ppc.c (ppc_elf_create_glink): Likewise.
+	(ppc_elf_create_dynamic_sections): Likewise.
 
-	* config.bfd: Add sparc64-rtems.
+2011-11-09  Alan Modra  <[email protected]>
 
-2010-11-25  Alan Modra  <[email protected]>
+	* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
+	executables when export_dynamic.
 
-	* po/es.po: Update.
-	* po/fi.po: Update.
-	* po/fr.po: Update.
-	* po/ja.po: Update.
-	* po/zh_CN.po: Update.
+2011-11-08  Alan Modra  <[email protected]>
 
-2010-11-17  Tristan Gingold  <[email protected]>
+	* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
+	ha_relocs_not_using_r2 to unexpected_toc_insn.
+	(ok_lo_toc_insn): New function.
+	(ppc64_elf_edit_toc): Check insn on lo toc reloc.  Emit warning.
+	(ppc64_elf_relocate_section): Don't check insn on lo toc reloc here.
+	Handle addic on lo toc reloc.
 
-	* vms-lib.c (vms_write_index): Add comments.
-	Partially revert previous patch.  Free blocks later.
+2011-10-25  Alan Modra  <[email protected]>
 
-2010-11-10  Richard Sandiford  <[email protected]>
+	Apply mainline patches
+	2011-10-20  Alan Modra  <[email protected]>
+	* elf32-i386.c (i386_opcode16): Delete.
+	(elf_i386_check_tls_transition): Use memcmp to compare contents.
+	* elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
+	(elf_x86_64_check_tls_transition): Use memcmp to compare contents.
 
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused
-	variables.
+	2011-10-19  Alan Modra  <[email protected]>
+	PR ld/13311
+	* elflink.c (elf_link_output_extsym): Correct test for warning when
+	forced local executable syms are referenced from shared libraries.
 
-2010-11-10  Nick Clifton  <[email protected]>
+	2011-10-19  Alan Modra  <[email protected]>
+	PR ld/13254
+	* elflink.c (bfd_elf_final_link): Emit error_textrel error.
 
-	* po/ja.po: Updated Japanese translation.
-	* po/ru.po: Updated Russian translation.
+	2011-10-17  Alan Modra  <[email protected]>
+	PR ld/12975
+	PR ld/13195
+	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
+	and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
 
-2010-11-08  Tristan Gingold  <[email protected]>
+	2011-10-11  Alan Modra  <[email protected]>
+	PR binutils/13278
+	* archive.c (bfd_generic_archive_p): Only check first element
+	when target_defaulted.
+	(_bfd_construct_extended_name_table): Use ar_maxnamelen.
+	(_bfd_archive_bsd44_construct_extended_name_table): Likewise.
 
-	* configure.in: Bump version to 2.20.90
+	2011-10-11  Alan Modra  <[email protected]>
+	PR binutils/13257
+	* archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
+	thin archive element using container target if not defaulted.
+
+	2011-10-10  Alan Modra  <[email protected]>
+	* elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
+	(struct ppc_link_hash_table): Add tocsave_htab.
+	(struct tocsave_entry): New.
+	(tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
+	(ppc64_elf_link_hash_table_create): Create tocsave_htab..
+	(ppc64_elf_link_hash_table_free): ..and delete it.
+	(build_plt_stub): Always put STD_R2_40R1 first.
+	(ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
+	on plt call.  If present add prologue nop location to tocsave_htab.
+	(ppc64_elf_relocate_section): Convert prologue nop to std.  Skip
+	first insn of plt call stub when R_PPC64_TOCSAVE present.
+
+	2011-10-08  H.J. Lu  <[email protected]>
+	PR ld/13250
+	* elflink.c (elf_link_add_object_symbols): Preserve the maximum
+	alignment and size for common symbols.
+
+	2011-10-08  Alan Modra  <[email protected]>
+	PR ld/13229
+	PR ld/13244
+	* elflink.c (elf_link_add_object_symbols): Don't make IR symbols
+	dynamic.
+
+	2011-10-08  Alan Modra  <[email protected]>
+	* elflink.c (elf_link_output_extsym): Strip defined plugin symbols
+	even when strip_discarded is false.
+
+	2011-09-30  Alan Modra  <[email protected]>
+	PR ld/13235
+	* elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
+	(ppc64_elf_edit_toc): Check HA relocs.
+	(ha_reloc_match): Delete function.
+	(ppc64_elf_relocate_section): Remove delayed HA nop optimization.
+	Instead do it and low part optimization based on
+	ha_relocs_not_using_r2.
+
+2011-10-18  David S. Miller  <[email protected]>
+
+	PR binutils/13301
+	* elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
+	(_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
+	call delay slot instruction forward 4 bytes when performing
+	relaxation.
+
+2011-10-18  H.J. Lu  <[email protected]>
+
+	PR ld/13177
+	* elflink.c (elf_gc_sweep_symbol): Don't hide symbols without PLT
+	nor GOT references.
+
+2011-10-14  Hans-Peter Nilsson  <[email protected]>
+
+	* elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
+	<R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
+	global symbols.
+	<R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
+	updates of the plt refcount.
+	(elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
+	refcount in relation to the plt refcount.
+
+2011-10-13  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
+	stubs as resolved.
+
+2011-09-29  H.J. Lu  <[email protected]>
+
+	PR ld/13195
+	* elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
+	clearing def_dynamic.
+	(elf_link_add_object_symbols): Likewise.  Set dynamic_def when
+	setting def_dynamic.
+	(bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
+	versioned.
+
+2011-09-29  Alan Modra  <[email protected]>
+
+	PR ld/13233
+	* elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
+	debug and special section groups.
+
+2011-09-26  Tristan Gingold  <[email protected]>
+
+	* configure.in: Bump version to 2.21.90
 	* configure: Regenerate.
 
-2010-11-08  Nick Clifton  <[email protected]>
+2011-09-21  David S. Miller  <[email protected]>
 
-	* po/ja.po: Updated Japanese translation.
+	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
+	* elfxx-sparc.h: Declare it.
+	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
+	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
 
-2010-11-05  Tristan Gingold  <[email protected]>
+2011-09-21  Tristan Gingold  <[email protected]>
 
-	* po/bfd.pot: Regenerate
+	* mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
+	Deals with size limited strings.
+	(bfd_mach_o_build_commands): Initialize more fields.
 
-2010-11-04  Maciej W. Rozycki  <[email protected]>
+2011-09-15  H.J. Lu  <[email protected]>
 
-	PR ld/10144
-	* elfxx-mips.c (_bfd_mips_elf_check_relocs)
-	[R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from
-	SEC_DEBUGGING sections.
+	PR ld/13177
+	* elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
+	nor GOT references.
 
-2010-11-04  Tristan Gingold  <[email protected]>
+2011-09-15  H.J. Lu  <[email protected]>
 
-	* vms-lib.c (vms_write_index): Fix thinko: reverse the loop.
-	Use bfd_zmalloc instead of bfd_malloc.  Fix comment.
+	PR ld/12975
+	* bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
+	to struct bfd_elf_version_tree.
 
-2010-11-04  Kai Tietz  <[email protected]>
+	* elflink.c (elf_info_failed): Remove verdefs.
+	(_bfd_elf_export_symbol): Updated.
+	_bfd_elf_link_assign_sym_version): Likewise.
+	(bfd_elf_size_dynamic_sections): Remove pointer to struct
+	bfd_elf_version_tree.  Updated.
+	(bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden
+	by linker script.
 
-	* coffcode.h (GNU_LINKONCE_WT): New.
-	(sec_to_styp_flags): Add handling of new debug
-	section.
-	(styp_to_sec_flags): Likewise.
+	* linker.c (bfd_hide_sym_by_version): New.
 
-2010-11-04  Tristan Gingold  <[email protected]>
-
-	* makefile.vms (CFLAGS): Make badalias warnings informational.
-	* vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer.
-
-2010-11-04  Joseph Myers  <[email protected]>
-
-	* elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
-	_bfd_elf_merge_unknown_attribute_list): New.
-	* elf-bfd.h (struct elf_backend_data): Add
-	obj_attrs_handle_unknown.
-	(_bfd_elf_merge_unknown_attribute_low,
-	_bfd_elf_merge_unknown_attribute_list): Declare.
-	* elf32-arm.c (elf32_arm_obj_attrs_handle_unknown): New.  Split
-	out from elf32_arm_merge_eabi_attributes.
-	(elf32_arm_merge_eabi_attributes): Use
-	_bfd_elf_merge_unknown_attribute_low and
-	_bfd_elf_merge_unknown_attribute_list.
-	(elf_backend_obj_attrs_handle_unknown): Define.
-	* elfxx-target.h (elf_backend_obj_attrs_handle_unknown): Define.
-	(elfNN_bed): Update initializer.
-
-2010-11-02  H.J. Lu  <[email protected]>
-
-	* bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New.
 	* bfd-in2.h: Regenerated.
 
-2010-11-02  Joseph Myers  <[email protected]>
+2011-09-12  H.J. Lu  <[email protected]>
 
-	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for
-	Tag_ABI_compatibility, treat odd tags as strings and even ones as
-	integers.
-	(elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment,
-	elf32_tic6x_array_alignment_to_tag): New.
-	(elf32_tic6x_merge_attributes): Handle more attributes.  Set type
-	for merged attributes.
-	(elf_backend_obj_attrs_order): Define.
+	PR ld/13178
+	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
+	if there are no GOT relocations.
 
-2010-10-29  Maciej W. Rozycki  <[email protected]>
+2011-09-09  Kai Tietz  <[email protected]>
 
-	* elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo.
+	* peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
+	for targets without symbol_leading_char.
 
-2010-10-29  Pawel Sikora  <[email protected]>
+2011-09-08  Bernd Jendrissek  <[email protected]>
 
-	PR binutils/12075
-	* compress.c (bfd_compress_section_contents): Use uLong on
-	compressed_size.
+	* bfdwin.c (bfd_get_file_window): Fix memory leak.
 
-2010-10-29  Joseph Myers  <[email protected]>
+2011-09-07  Alan Modra  <[email protected]>
 
-	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check
-	Tag_ABI_compatibility not Tag_compatibility.
-	(elf32_tic6x_merge_attributes): Update compatibility attribute
-	name in comment.  Return FALSE if merging common attributes fails.
+	PR ld/13131
+	* bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
+	is initialized.
 
-2010-10-29  Nick Clifton  <[email protected]>
+2011-09-06  Alan Modra  <[email protected]>
 
-	PR bintils/6962
-	* coffcode.h (handle_COMDAT): Only check the base type when
-	looking for a section symbol.
+	PR ld/13131
+	* elf64-ppc.c (adjust_toc_syms): Delete redundant code.
+	(ppc64_elf_edit_toc): Fix style nit.  Report some details
+	on linker failure due to reference in debug or non-alloc
+	sections to optimized away toc entry, and don't abort.
 
-2010-10-29  H.J. Lu  <[email protected]>
-	    Cary Coutant  <[email protected]>
+2011-09-01  Christophe Lyon  <[email protected]>
 
-	* archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
-	and BFD_DECOMPRESS.
-
-	* bfd.c (BFD_COMPRESS): New.
-	(BFD_DECOMPRESS): Likewise.
-	(BFD_FLAGS_SAVED): Likewise.
-	(bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.
-
-	* compress.c (bfd_uncompress_section_contents): Removed.
-	(get_uncompressed_size): New.
-	(decompress_contents): Likewise.
-	(bfd_compress_section_contents): Likewise.
-	(bfd_get_full_section_contents): Likewise.
-	(bfd_is_section_compressed): Likewise.
-	(bfd_init_section_decompress_status): Likewise.
-	(bfd_init_section_compress_status): Likewise.
-
-	* dwarf2.c (dwarf_debug_sections): New.
-	(dwarf_debug_section_enum): Likewise.
-	(read_section): Remove section_name and compressed_section_name.
-	Add dwarf_debug_section_enum.  Try compressed debug section.
-	(read_indirect_string): Updated.
-	(read_abbrevs): Likewise.
-	(decode_line_info): Likewise.
-	(read_debug_ranges): Likewise.
-	(find_line): Updated.
-
-	* ecoff.c (bfd_debug_section): Add compress_status and
-	compressed_size.
-
-	* elf.c (_bfd_elf_make_section_from_shdr): Call
-	bfd_is_section_compressed to check if a DWARF debug section is
-	compressed.  Call bfd_init_section_compress_status or
-	bfd_init_section_decompress_status if needed.
-
-	* elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
-	with bfd_get_full_section_contents.
-	* merge.c (_bfd_add_merge_section): Likewise.
-	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
-	* simple.c (bfd_simple_get_relocated_section_contents): Likewise.
-
-	* elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
-	BFD_DECOMPRESS.
-	(TARGET_LITTLE_SYM): Likewise.
-
-	* libbfd-in.h (dwarf_debug_section): New.
-	(dwarf_debug_sections): Likewise.
-
-	* libbfd.c (_bfd_generic_get_section_contents): Issue an error
-	when getting contents on compressed/decompressed section.
-
-	* section.c (COMPRESS_SECTION_NONE): New.
-	(COMPRESS_SECTION_DONE): Likewise.
-	(DECOMPRESS_SECTION_SIZED): Likewise.
-	(BFD_FAKE_SECTION): Add compress_status and compressed_size.
-	(bfd_malloc_and_get_section): Replace bfd_get_section_contents
-	with bfd_get_full_section_contents.
-
-	* bfd-in2.h: Regenerated.
-	* libbfd.h: Likewise.
-
-2010-10-29  Bernd Schmidt  <[email protected]>
-	    Joseph Myers  <[email protected]>
-
-	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch
-	of DSBT attributes.
-
-2010-10-25  Daniel Jacobowitz  <[email protected]>
-
-	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call
-	_bfd_clear_contents.  Pass it the input section.
-	* libbfd-in.h (_bfd_clear_contents): Add input_section argument.
-	* libbfd.h: Regenerate.
-	* reloc.c (_bfd_clear_contents): Take input_section argument.
-	Use non-zero for .debug_ranges.
-	(bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents
-	call.
-
-	* elf32-arm.c (elf32_arm_relocate_section): Use
-	RELOC_AGAINST_DISCARDED_SECTION.
-	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
-	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
-	* elf32-arm.c (elf32_arm_relocate_section): Likewise.
-	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
-	* elf32-bfin.c (bfin_relocate_section): Likewise.
-	(bfinfdpic_relocate_section): Likewise.
-	* elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
-	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
-	* elf32-cris.c (cris_elf_relocate_section): Likewise.
-	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
-	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
-	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
-	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
-	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
-	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
-	* elf32-i370.c (i370_elf_relocate_section): Likewise.
-	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
-	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
-	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
-	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
-	* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
-	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
-	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
-	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
-	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
-	* elf32-mep.c (mep_elf_relocate_section): Likewise.
-	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
-	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
-	* elf32-mt.c (mt_elf_relocate_section): Likewise.
-	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
-	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
-	* elf32-rx.c (rx_elf_relocate_section): Likewise.
-	* elf32-s390.c (elf_s390_relocate_section): Likewise.
-	* elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
-	* elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
-	* elf32-sh.c (sh_elf_relocate_section): Likewise.
-	* elf32-spu.c (spu_elf_relocate_section): Likewise.
-	* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
-	* elf32-v850.c (v850_elf_relocate_section): Likewise.
-	* elf32-vax.c (elf_vax_relocate_section): Likewise.
-	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
-	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
-	* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
-	* elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
-	(elf64_alpha_relocate_section): Likewise.
-	* elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
-	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
-	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
-	* elf64-s390.c (elf_s390_relocate_section): Likewise.
-	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
-	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
-	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
-	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
-
-2010-10-25  Nathan Sidwell  <[email protected]>
-
-	* elf32-tic6x.c: Add attribution.
-
-2010-10-25  Alan Modra  <[email protected]>
-
-	* elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
-	var warning at -O3.
-
-2010-10-25  Alan Modra  <[email protected]>
-
-	* opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal.
-	* libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here.
-	* libbfd.h: Regenerate
-	* bfd-in2.h: Regenerate.
-
-2010-10-25  Alan Modra  <[email protected]>
-
-	* opncls.c (_bfd_id_counter): Rename to bfd_id_counter.
-	(bfd_reserved_id_counter, bfd_use_reserved_id): New vars.
-	(_bfd_new_bfd): Use negative id when bfd_use_reserved_id.
-	(bfd_create): Doc fix.
-	* bfd-in2.h: Regenerate.
-
-2010-10-22  Rainer Orth  <[email protected]>
-
-	* elfxx-sparc.c (tpoff): Define bed, static_tls_size.
-	Consider static_tls_alignment.
-
-	* elf32-sparc.c (TARGET_BIG_SYM): Redefine to
-	bfd_elf32_sparc_sol2_vec.
-	(TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
-	(elf32_bed): Redefine to elf32_sparc_sol2_bed.
-	(elf_backend_static_tls_alignment): Redefine to 8.
-	Include elf32-target.h.
-	(elf_backend_static_tls_alignment): Undef again for VxWorks.
-
-	* elf64-sparc.c (TARGET_BIG_SYM): Redefine to
-	bfd_elf64_sparc_sol2_vec.
-	(TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
-	(ELF_OSABI): Undef.
-	(elf64_bed): Redefine to elf64_sparc_sol2_bed.
-	(elf_backend_static_tls_alignment): Redefine to 16.
-	Include elf64-target.h.
-
-	* config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
-	Set targ_defvec to bfd_elf32_sparc_sol2_vec.
-	[BFD64] (sparc-*-solaris2*): Set targ_defvec to
-	bfd_elf32_sparc_sol2_vec.
-	Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
-	targ_selvecs.
-
-	* configure.in: Handle bfd_elf32_sparc_sol2_vec,
-	bfd_elf64_sparc_sol2_vec.
-	* configure: Regenerate.
-
-	* targets.c (bfd_elf32_sparc_sol2_vec): Declare.
-	(bfd_elf64_sparc_sol2_vec): Declare.
-	(_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
-	bfd_elf64_sparc_sol2_vec.
-
-2010-10-21  Joseph Myers  <[email protected]>
-
-	* elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for
-	attribute renaming.
-	(elf_backend_obj_attrs_section): Change to ".c6xabi.attributes".
-
-2010-10-21  Rainer Orth  <[email protected]>
-
-	* elf-bfd.h (struct elf_backend_data): New member
-	static_tls_alignment.
-	* elfxx-target.h (elf_backend_static_tls_alignment): Provide
-	default.
-	(elfNN_bed): Initialize static_tls_alignment.
-	* elflink.c (bfd_elf_final_link): Don't round end of TLS section
-	if static TLS has special alignment requirements.
-	* elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size.
-	Consider static_tls_alignment.
-	(elf_backend_static_tls_alignment): Redefine for Solaris 2.
-	Undef again for VxWorks.
-	* elf64-x86-64.c (elf64_x86_64_tpoff):  Define bed,
-	static_tls_size.
-	Consider static_tls_alignment.
-	(elf_backend_static_tls_alignment): Redefine for Solaris 2.
-	Undef again for Intel L1OM.
-
-2010-10-14  Dave Korn  <[email protected]>
-
-	Apply LD plugin patch series (part 6/6).
-	* aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference
-	parameter and pass it when invoking add_archive_element callback.
-	(aout_link_check_archive_element): Handle substitute bfd if it
-	was set during add_archive_element callback in the above.
-	* cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference
-	parameter and pass it when invoking add_archive_element callback.
-	(coff_link_check_archive_element): Handle substitute bfd if it
-	was set during add_archive_element callback in the above.
-	* ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading
-	code factored-out from ecoff_link_check_archive_element.
-	(reread_ext_syms_and_strs): Clear old symbols and call it.
-	(ecoff_link_check_archive_element):  Use the above.  Handle substitute
-	BFD if one is set by add_archive_element callback.
-	(ecoff_link_add_archive_symbols): Likewise allow bfd substitution.
-	* elflink.c (elf_link_add_archive_symbols): Likewise.
-	* linker.c (generic_link_check_archive_element): Likewise.
-	* pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference
-	parameter and pass it when invoking add_archive_element callback.
-	(aout_link_check_archive_element): Handle substitute bfd if it was
-	set during add_archive_element callback in the above.
-	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute
-	BFD if one is set by add_archive_element callback.
-	* xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd"
-	reference parameter and pass it when invoking add_archive_element
-	callback.
-	(xcoff_link_check_ar_symbols): Likewise.
-	(xcoff_link_check_archive_element): Handle bfd substitution if it was
-	set by callback in the above.
-
-2010-10-11  Alan Modra  <[email protected]>
-
-	* elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
-	(elf32_frvfdpic_finish_dynamic_sections): Don't crash on
-	__ROFIXUP_END__ defined in shared lib.
-
-2010-10-11  Thomas Schwinge  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_final_link_relocate)
-	(elf32_arm_relocate_section): Handle relocations against STN_UNDEF.
-
-2010-10-11  Dave Korn  <[email protected]>
-
-	* elflink.c (_bfd_elf_link_output_relocs): Delete unused variable
-	"output_rel_hdr".
-
-2010-10-09  John Tytgat  <[email protected]>
-
-	* reloc.c (BFD_RELOC_ARM_HVC): Add.
-	* libbfd.h: Regenerate.
-
-2010-10-08  Kai Tietz  <[email protected]>
-
-	* pei-x86_64.c (find_next_xdata_or_end): Removed.
-	(pex64_dump_xdata): Remove arguments stop, onaline,
-	and pdata. New argument endx.  Print term "none"
-	instead of misleading "CFA".
-	(sort_xdata_arr): New function.
-	(pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs
-	instead of searching quadratic.
-
-2010-10-08  Pierre Muller  <[email protected]>
-	    Alan Modra  <[email protected]>
-
-	Fix build with -DDEBUG=7
-	* elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call
-	to deleted function elf_symbol_flags.  Add typecast to avoid warning.
-	* elf32-rx.c (dump_symbol) : Rename to..
-	(rx_dump_symbol): ..this to avoid link errors.
-	* elflink.c (elf_link_input_bfd): Add typecast to avoid warnings.
-	(bfd_elf_perform_complex_relocation): Likewise.
-	* elf32-xtensa.c (print_action_list): Likewise.
-
-2010-10-06  Nathan Sidwell  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
-	elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
-	ip/r12.
-	(arm_type_of_stub): Remove superfluous braces.
-
-2010-10-04  Bernd Schmidt  <[email protected]>
-
-	* elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
-	(struct bfd_elf_section_data): New members REL and RELA; delete
-	members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX,
-	REL_IDX2, REL_HASHES.
-	(_bfd_elf_init_reloc_shdr): Adjust declaration.
-	(_bfd_elf_single_rel_hdr): Declare.
-	(RELOC_AGAINST_DISCARDED_SECTION): Use it.
-	* elf.c (bfd_section_from_shdr): Adjusted to match changes in
-	data structures.
-	(_bfd_elf_init_reloc_shdr): New arg RELDATA.  Remove arg REL_HDR.
-	All callers changed.  Allocate memory for the Elf_Internal_Shdr
-	structure.
-	(_bfd_elf_single_rel_hdr): New function.
-	(struct fake_section_arg): New structure.
-	(elf_fake_section): Expect to see a pointer to it in the third
-	argument.  If doing a relocatable link, allocate both REL and RELA
-	sections as needed.
-	(assign_section_numbers): Adjusted to match changes in
-	data structures.
-	(_bfd_elf_compute_section_file_positions): Call elf_fake_sections
-	with a struct fake_section_args argument.
-	* elfcode.h (elf_write_relocs): Adjusted to match changes in
-	data structures.
-	(elf_slurp_reloc_table): Likewise.
-	* elflink.c (_bfd_elf_link_read_relocs): Likewise.
-	(_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with
-	RELDATA.  Remove argument O.  All callers changed.  Remove code to
-	discover the right rel_hdr and count.
-	(_bfd_elf_link_output_relocs): Adjusted to match changes in
-	data structures.
-	(elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH;
-	replace with RELDATA.  All callers changed.
-	(elf_link_input_bfd): Correctly generate rel_hash data when both
-	REL and RELA sections are present.
-	(elf_reloc_link_order): Adjusted to match changes in
-	data structures.
-	(bfd_elf_final_link): Simplify code to count relocs.  Free the
-	hashes array for both REL and RELA.
-	(get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr
-	* elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections):
-	Delete.
-	* elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections):
-	Delete.
-	(elf32_tic6x_rel_relocation_p): Adjusted to match changes in
-	data structures.
-	* elf32-microblaze.c (microblaze_elf_check_relocs): Use
-	_bfd_elf_single_rel_hdr.
-	* elf32-ppc.c (ppc_elf_relax_section): Likewise.
-	* elf32-spu.c (spu_elf_relocate_section): Likewise.
-	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
-	* elf64-hppa.c (get_reloc_section): Likewise.
-	* elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match
-	changes in data structures.
-	(mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr.
-	* elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
-	(ppc64_elf_edit_toc): Likewise.
-	(get_relocs): Adjusted to match changes in data structures.
-	Allocate an Elf_Internal_Shdr structure if necessary.
-	(ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr.
-	* elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match
-	changes in data structures.
-	* elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr.
-	* elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro.
-	(mips_elf_rel_relocation_p): Adjusted to match changes in data
-	structures.
-	(_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather
-	than MIPS_RELOC_RELOCA_P.
-	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use
-	_bfd_elf_single_rel_hdr.
-	(_bfd_sparc_elf_relocate_section): Likewise.
-
-2010-10-01  Thomas Schwinge  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in
-	SHN_UNDEF, SHN_ABS, SHN_COMMON.
-
-2010-09-30  H.J. Lu  <[email protected]>
-
-	PR ld/11812
-	* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
-	 allocate .got.plt section if there are no GOT nor PLT
-	 entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.
-	 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise.
-
-	* elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf.
-
-2010-09-27  Ralf Wildenhues  <[email protected]>
-
-	* configure: Regenerate.
-
-2010-09-24  Thomas Schwinge  <[email protected]>
-
-	* elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c,
-	elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c,
-	elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c,
-	elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h,
-	elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to
-	the zero symbol index.
-
-	* elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index
-	to STN_UNDEF, not SHN_UNDEF.
-
-2010-09-23  Bernd Schmidt  <[email protected]>
-
-	* elf32-tic6x.c (elf32_tic6x_fake_sections): New function.
-	(elf_backend_fake_sections): Define.
-
-2010-09-23  Matthew Gretton-Dann  <[email protected]>
-
-	* bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value.
-
-2010-09-23  Alan Modra  <[email protected]>
-
-	* cpu-d10v.c: Make bits_per_address 18 for all arch_info entries.
-
-2010-09-23  Alan Modra  <[email protected]>
-
-	* elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC
-	difference between input and output section.
-
-2010-09-22  Kai Tietz  <[email protected]>
-
-	* coffcode.h (sec_to_styp_flags): Adjust debug
-	sections to be conform to pe-coff specification
-	and avoid marking them as excluded.
-	(styp_to_sec_flags): Doing reverse mapping.
-
-	* peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for
-	setting IAT directory entry.
-
-2010-09-20  Richard Henderson  <[email protected]>
-
-	* elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc.
-
-2010-09-19  Richard Sandiford  <[email protected]>
-
-	* elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls.
-	(mips_elf_link_hash_newfunc): Initialize it.
-	(mips_elf_record_global_got_symbol): Add a for_call parameter.
-	(mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather
-	than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls.
-	Try to remove .got entries in favour of .got.plt entries on VxWorks.
-	(_bfd_mips_elf_check_relocs): Do not try to avoid allocating
-	a global GOT entry for VxWorks calls.  Update uses of
-	mips_elf_record_global_got_symbol.
-	(allocate_dynrelocs): Set got_only_for_calls to false if the GOT
-	entry is used for dynamic relocations.
-
-2010-09-19  Richard Sandiford  <[email protected]>
-
-	* elfxx-mips.c (mips_got_entry): Adjust commentary.
-	(mips_elf_create_local_got_entry): If given a symbol, check that it
-	has been assigned to the local part of the GOT.
-	(mips_elf_count_got_symbols): Take the bfd_link_info as argument
-	instead of the master GOT.  Put all locally-binding symbols in
-	the local area.
-	(mips_elf_make_got_per_bfd): Use global_got_area to decide whether
-	a symbol lives in the local or global area.
-	(mips_elf_local_relocation_p): Remove check_forced argument and
-	retain only the !check_forced behavior.
-	(mips_elf_calculate_relocation): Adjust call accordingly.
-	Use global_got_area to decide whether an output relocation
-	should be local or global.  Explicitly decay R_MIPS_GOT_PAGE
-	into R_MIPS_GOT_DISP where appropriate.  Fix selection of
-	local vs. global semantics for R_MIPS*_26.  Remove redundant
-	reevaluation of what is stored in was_local_p.
-	(mips_elf_create_dynamic_relocation): Use global_got_area to decide
-	whether the relocation should be against a global or local symbol.
-	(mips_elf_lay_out_got): Update the GOT traversal after the above
-	change to mips_elf_count_got_symbols.
-	(mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p.
-	(_bfd_mips_elf_relocate_section): Likewise.
-	(_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide
-	whether the symbol has a global got entry.
-	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
-
-2010-09-19  Richard Sandiford  <[email protected]>
-
-	* elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
-	to the global GOT on VxWorks.
-
-2010-09-19  Richard Sandiford  <[email protected]>
-
-	* elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
-	exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
-	about HI/LO relocations in shared objects.
-
-2010-09-16  Alan Modra  <[email protected]>
-
-	* elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc
+	* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
 	sections.
-	(spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and
-	set dynobj.
-	(spu_elf_finish_dynamic_sections): New function.
-	(elf_backend_finish_dynamic_sections): Define.
 
-2010-09-16  Alan Modra  <[email protected]>
-
-	* elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD.
-	* elflink.c (elf_link_input_bfd): Likewise.
-
-2010-09-15  Kai Tietz  <[email protected]>
-
-	* pei-x86_64.c (pex64_get_unwind_info): Reorgnized.
-	(pex64_get_scope_entry): Removed.
-	(find_next_xdata_or_end): New helper.
-	(pex64_dump_xdata): Reworked.
-	(pex64_bfd_print_pdata): Add checking for
-	valid pdata sorting and values. Reworked
-	output.
-
-2010-09-15  H.J. Lu  <[email protected]>
-
-	PR binutils/12004
-	* plugin.c (bfd_plugin_object_p): Handle NULL iostream.
-
-2010-09-14  Kai Tietz  <[email protected]>
-
-	* pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make
-	.rdata, .data, and .text partial matched section names.
-	* pei-x86_64.c: Likewise.
-
-	* peXXigen.c (sort_x64_pdata): New helper.
-	(_bfd_XXi_final_link_postscript): Do pdata sorting.
-
-2010-09-09  H.J. Lu  <[email protected]>
-
-	PR ld/11998
-	* elf.c (assign_file_positions_for_load_sections): Don't warn
-	zero LMA adjustment.
-
-2010-09-09  Bernd Schmidt  <[email protected]>
-
-	* elflink.c (bfd_elf_final_link): Correct calculation of
-	max_external_reloc_size.
-
-2010-09-07  Alan Modra  <[email protected]>
-	    Marcus Brinkmann  <[email protected]>
-
-	* peXXigen.c: Whitespace.
-	(pe_print_idata): Correct section limit calculations.  Tidy array
-	indexing.
-	(_bfd_XX_print_ce_compressed_pdata): Don't leak memory.
-
-2010-09-02  Richard Henderson  <[email protected]>
-
-	* config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too.
-
-2010-09-01  Pedro Alves  <[email protected]>
-
-	* netbsd-core.c (netbsd_core_core_file_pid): Renamed to ...
-	(netbsd_core_file_pid): ... this.
-
-2010-09-01  Tristan Gingold  <[email protected]>
-
-	* coffcode.h (coff_slurp_line_table): Add a cast.
-	(coff_slurp_reloc_table): Ditto.
-
-2010-08-30  Gunther Nikl  <[email protected]>
-
-	* cisco-core.c (cisco_core_file_pid): Define.
-
-2010-08-30  Alan Modra  <[email protected]>
-
-	PR binutils/11953
-	* elf.c (copy_elf_program_header): Calculate map->header_size
-	from lowest_section, not first_section.  Validate program
-	header p_paddr against section lma.  Find lowest_section in
-	second loop over headers.
-
-2010-08-28  Alan Modra  <[email protected]>
-
-	* elflink.c (_bfd_elf_dynamic_symbol_p): Rename param.  Make
-	common syms local.
-	(_bfd_elf_symbol_refs_local_p): Expand comment.
-	(elf_link_output_extsym): Fix style nit.
-
-2010-08-26  Nathan Sidwell  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_final_link): Process stub sections
-	exactly once.
-
-2010-08-25  H.J. Lu  <[email protected]>
-
-	PR ld/11939
-	* elflink.c (elf_link_add_object_symbols): Don't set
-	unique_global for non-ELF hash link table.
-
-2010-08-25  H.J. Lu  <[email protected]>
-
-	PR ld/11944
-	* elf-bfd.h (elf_backend_data): Add target_id.
-	(bfd_elf_make_generic_object): Renamed to ...
-	(bfd_elf_make_object): This.
-
-	* elf.c (bfd_elf_make_generic_object): Removed.
-	(bfd_elf_make_object): New.
-	(bfd_elf_mkcorefile): Really treat it as an object file.
-
-	* elf-m10300.c (ELF_TARGET_ID): New.
-	* elf32-arm.c (ELF_TARGET_ID): Likewise.
-	* elf32-bfin.c (ELF_TARGET_ID): Likewise.
-	* elf32-cris.c (ELF_TARGET_ID): Likewise.
-	* elf32-frv.c (ELF_TARGET_ID): Likewise.
-	* elf32-i386.c (ELF_TARGET_ID): Likewise.
-	* elf32-lm32.c (ELF_TARGET_ID): Likewise.
-	* elf32-m32r.c (ELF_TARGET_ID): Likewise.
-	* elf32-m68hc11.c (ELF_TARGET_ID): Likewise.
-	* elf32-m68hc12.c (ELF_TARGET_ID): Likewise.
-	* elf32-m68k.c (ELF_TARGET_ID): Likewise.
-	* elf32-microblaze.c (ELF_TARGET_ID): Likewise.
-	* elf32-ppc.c (ELF_TARGET_ID): Likewise.
-	* elf32-s390.c (ELF_TARGET_ID): Likewise.
-	* elf32-sh.c (ELF_TARGET_ID): Likewise.
-	* elf32-sparc.c (ELF_TARGET_ID): Likewise.
-	* elf32-spu.c (ELF_TARGET_ID): Likewise.
-	* elf32-tic6x.c (ELF_TARGET_ID): Likewise.
-	* elf32-xtensa.c (ELF_TARGET_ID): Likewise.
-	* elf64-alpha.c (ELF_TARGET_ID): Likewise.
-	* elf64-hppa.c (ELF_TARGET_ID): Likewise.
-	* elf64-ppc.c (ELF_TARGET_ID): Likewise.
-	* elf64-s390.c (ELF_TARGET_ID): Likewise.
-	* elf64-x86-64.c (ELF_TARGET_ID): Likewise.
-	* elfxx-ia64.c (ELF_TARGET_ID): Likewise.
-
-	* elf32-hppa.c (elf32_hppa_mkobject): Removed.
-	(bfd_elf32_mkobject): Likewise.
-	(ELF_TARGET_ID): New.
-
-	* elf32-mips.c (ELF_TARGET_ID): New.
-	(bfd_elf32_mkobject): Removed.
-
-	* elf64-mips.c (ELF_TARGET_ID): New.
-	(bfd_elf64_mkobject): Removed.
-
-	* elfn32-mips.c (ELF_TARGET_ID): New.
-	(bfd_elf32_mkobject): Removed.
-
-	* elfxx-mips.c (_bfd_mips_elf_mkobject): Removed.
-	* elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise.
-
-	* elfxx-target.h (bfd_elfNN_mkobject): Default to
-	bfd_elf_make_object.
-	(ELF_TARGET_ID): New.  Default to GENERIC_ELF_DATA.
-	(elfNN_bed): Initialize target_id.
-
-2010-08-25  Julian Brown  <[email protected]>
-
-	* elf32-arm.c (arm_stub_required_alignment): New.
-	(arm_build_one_stub): Use above to partition stubs.
-	(make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not
-	arm_stub_a8_veneer_b_cond.
-
-2010-08-25  Alan Modra  <[email protected]>
-
-	* aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address.
-	* aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise.
-	* aoutx.h (NAME(aout,reloc_type_lookup)): Likewise.
-	* coff-arm.c (coff_arm_reloc_type_lookup): Likewise.
-	* elf-hppa.h (elf_hppa_reloc_final_type): Likewise.
-	* reloc.c (bfd_default_reloc_type_lookup): Likewise.
-	* riscix.c (riscix_reloc_type_lookup): Likewise.
-
-2010-08-25  Alan Modra  <[email protected]>
-
-	* elf.c (_bfd_elf_map_sections_to_segments): Don't load program
-	headers if any loaded section wraps the address space.  Simplify
-	~(m-1) to -m.  Use lma rather than vma when determining whether
-	note sections are adjacent.
-
-2010-08-22  H.J. Lu  <[email protected]>
-
-	PR ld/11933
-	* elflink.c (elf_link_add_object_symbols): Don't check relocation
-	if input ELF object ID doesn't match output.
-
-2010-08-21  Ralf Wildenhues  <[email protected]>
-
-	* configure: Regenerate.
-
-2010-08-20  H.J. Lu  <[email protected]>
-
-	* merge.c (sec_merge_emit): Revert the last checkin.
-
-2010-08-20  Maciej W. Rozycki  <[email protected]>
-
-	* elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output
-	BFD.
-
-2010-08-20  Maciej W. Rozycki  <[email protected]>
-
-	* elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT
-	options unless an m68k hash table has been found.
-
-2010-08-20  Nick Clifton  <[email protected]>
-
-	* merge.c (sec_merge_emit): Do not zero pad sections that do not
-	have an alignment.
-
-2010-08-18  Pedro Alves  <[email protected]>
-
-	PR corefile/8210
-
-	* bfd-in2.h: Regenerate.
-	* corefile.c (bfd_core_file_pid): New.
-
-	* targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
-	(struct bfd_target) <_core_file_pid>: New.
-
-	* libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
-	* libbfd.c (_bfd_nocore_core_file_pid): New.
-
-	* elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
-	Declare.
-	* elfcode.h (elf_core_file_pid): New define.
-	* elfcore.h (elf_core_file_pid): New function.
-
-	* elf.c (elfcore_make_pid): Rewrite.
-	(elfcore_grok_prstatus): Only set core_pid if not set yet.
-	(elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
-	getting the lwpid from prstat.pr_pid.
-
-	* elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	(elf64_x86_64_grok_psinfo): Extract the the main process's PID,
-	and store it in elf_tdata's core_pid field.
-	* elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	(elf_i386_grok_psinfo): Extract the the main process's PID, and
-	store it in elf_tdata's core_pid field.
-
-	* elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
-	to elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
-	to elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
-	to elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-	* elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
-	elf_tdata's core_lwpid instead of to core_pid.
-
-	* plugin.c (bfd_plugin_core_file_pid): New function.
-	* aout-target.h (MY_core_file_pid): Define.
-	* aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
-	* coff-rs6000.c (coff_core_file_pid): New define.
-	(rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
-	* coff64-rs6000.c (coff_core_file_pid): New define.
-	(rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
-	(xcoff64_core_file_pid): New define.
-	(aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
-	* mach-o-target.c (bfd_mach_o_core_file_pid): New define.
-	* aix386-core.c (aix386_core_file_pid): New define.
-	* hppabsd-core.c (hppabsd_core_core_file_pid): New define.
-	* hpux-core.c (hpux_core_core_file_pid): New define.
-	* irix-core.c (irix_core_core_file_pid): New define.
-	* lynx-core.c (lynx_core_file_pid): New define.
-	* osf-core.c (osf_core_core_file_pid): New define.
-	* ptrace-core.c (ptrace_unix_core_file_pid): New define.
-	* sco5-core.c (sco5_core_file_pid): New define.
-	* xcoff-target.h (coff_core_file_pid): New define.
-	* netbsd-core.c (netbsd_core_core_file_pid): New define.
-
-2010-08-13  H.J. Lu  <[email protected]>
-
-	PR ld/11913
-	* elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
-	 .got.plt section is discarded.
-	 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.
-
-2010-08-13  Nathan Sidwell  <[email protected]>
-
-	* elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
-	variant.
-
-2010-08-12  H.J. Lu  <[email protected]>
-
-	PR binutils/11909
-	* Makefile.am (coff-tic4x.lo): New.  Disable -Werror.
-	(coff-tic54x.lo): Likewise.
-	* Makefile.in: Regenerated.
-
-2010-08-12  Todd Veldhuizen  <[email protected]>
-
-	PR ld/11843
-	* elflink.c (compute_bucket_count): Avoid futile long searches for
-	the best bucket size.
-
-2010-08-09  Richard Henderson  <[email protected]>
-
-	PR ld/11891
-	* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing
-	to tlshi/lo until pos0 and pos1 are adjacent.  Use the destination
-	register from the tldgd insn.
-
-2010-08-09  Catherine Moore  <[email protected]>
-
-	* elfxx-mips.c (mips_elf_perform_relocation): Improve
-	interlinking error message.
-
-2010-08-06  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
-	(ppc64_elf_relocate_section): Nop out high part insn of large toc
-	code sequence when the high part of offset is zero.
-
-2010-08-04  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
-	(alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
-	Clear the SEC_RELOC flag.
-
-2010-08-04  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
-	sections with relocs.
-	(alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
-	(alpha_vms_add_fixup_ca): Ditto.
-	(alpha_vms_add_fixup_qr): Ditto.
-	Add comments.
-
-2010-08-04  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
-	CODE sections writable.
-
-2010-08-04  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
-	(alpha_vms_add_fixup_lr): ... this for consistency.
-	(alpha_vms_add_qw_fixup): Removed.
-	Fix some comments.
-	(vms_get_symbol_info): Adjust type for unknown sections.
-
-2010-08-04  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
-	section for any absolute section.  Remove some debugging code.
-
-2010-08-03  DJ Delorie  <[email protected]>
-
-	* elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes.
-
-2010-08-03  Tristan Gingold  <[email protected]>
-
-	* vms-misc.c (vms_convert_to_var): Make it static.
-	(_bfd_vms_convert_to_var_unix_filename): Make it public.
-
-2010-08-03  Tristan Gingold  <[email protected]>
-
-	* makefile.vms (OBJS): Update list.
-
-2010-08-03  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
-	nor SEC_RELOC for empty sections.
-
-2010-08-03  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (evax_section_flags): Fix flags for absolute
-	section.  Remove useless parenthesis.
-
-2010-08-03  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
-	(vms_lib_bread, vms_lib_bopen): Adjust.
-
-2010-08-02  Alan Modra  <[email protected]>
-
-	PR 11866
-	* elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
-	calculate off_adjust rather than first section vma.
-
-2010-07-30  H.J. Lu  <[email protected]>
-
-	* elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
-
-2010-07-30  Anthony Green  <[email protected]>
-
-	* config.bfd (targ_cpu): Add moxie-*-rtems support.
-
-2010-07-29  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
-	.toc section, even when none are used in relocs.
-
-2010-07-27  Maciej W. Rozycki  <[email protected]>
-
-	* elfxx-mips.h: Include "elf/mips.h".
-	(gprel16_reloc_p): New static inline function.
-	* elfxx-mips.c (_bfd_mips_elf_check_relocs)
-	[R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
-	Use got16_reloc_p.
-	(_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
-	gprel16_reloc_p.
-	* elf32-mips.c (mips_info_to_howto_rel): Likewise.
-	* elfn32-mips.c (mips_info_to_howto_rel): Likewise.
-
-2010-07-27  Maciej W. Rozycki  <[email protected]>
-
-	* elf64-mips.c (mips_elf64_howto_table_rela)
-	[R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
-	[R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
-	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
-	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
-	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
-	* elfn32-mips.c (elf_mips_howto_table_rela)
-	[R_MIPS_TLS_DTPMOD32]: Likewise.
-	[R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
-	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
-	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
-	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
-
-2010-07-23  Naveen.H.S  <[email protected]>
-	    Ina Pandit  <[email protected]>
-
-	* archures.c (DESCRIPTION): Define bfd_mach_v850e2 and
-	bfd_mach_v850e2v3.
-	* reloc.c (bfd_architecture): Define bfd_mach_v850e2 and
-	bfd_mach_v850e2v3.
-	(BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL,
-	BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23,
-	BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
-	BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
-	BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
-	BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
-	BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT,
-	BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL,
-	BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY,
-	BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT,
-	BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF,
-	BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
-	BFD_RELOC_V850_DATA): New relocations for V850 target.
-	* config.bfd: Match all v850 targets.
-	* cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
-	* elf32-v850.c (v850_elf_check_relocs): Check the newly added
-	relocations.
-	(v850_elf_perform_relocation ): Update the newly added
-	relocations.
-	(v850_elf_howto_t): Update the specifications of added
-	relocations.
-	(v850_elf_reloc_map): Update the relocation mappings.
-	(v850_elf_final_link_relocate): Maps added relocation into the
-	appropriate howto structure.
-	(v850_elf_object_p): Add support for V850E2 and V850E2V3.
-	(v850_elf_final_write_processing): Likewise.
-	(v850_elf_merge_private_bfd_data): Likewise.
-	(v850_elf_print_private_bfd_data): Likewise.
-	* libbfd.h: Regenerate.
-	* bfd-in2.h: Regenerate.
-
-2010-07-23  Alan Modra  <[email protected]>
-
-	* archive.c (_bfd_archive_bsd44_construct_extended_name_table):
-	Correct format specifier.
-
-2010-07-22  Alan Modra  <[email protected]>
-
-	* ecoff.c: Don't include aout/ranlib.h.
-	(_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
-	(_bfd_ecoff_write_armap): Output ar_date and ar_size using
-	_bfd_ar_spacepad.
-
-2010-07-22  Alan Modra  <[email protected]>
-
-	* aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
-	relocs.
-
-2010-07-20  Alan Modra  <[email protected]>
-
-	* elf.c (assign_file_positions_for_load_sections): Check that
-	zero size sections are allocated in segments too.
-	(assign_file_positions_for_non_load_sections): Warn if zero
-	size alloc sections are found here.
-	(copy_elf_program_header): Don't drop zero size sections from
-	segment map.
-	(copy_private_bfd_data): Check for changes in zero size sections.
-
-2010-07-17  Alan Modra  <[email protected]>
-
-	* elf.c (_bfd_elf_map_sections_to_segments): Force new segment
-	for sections with overlapping LMAs.
-	(assign_file_positions_for_load_sections): Catch overlap for
-	sections that wrap around the address space.  Replace a
-	warning that duplicates ld's --check-sections error with a
-	warning that lma has been adjusted for overlapping sections.
-
-2010-07-14  Cary Coutant  <[email protected]>
-
-	PR ld/11817
-	* dwarf2.c (read_section): Revert patch for compressed debug sections.
-	(find_line): Likewise.
-	(read_and_uncompress_section): Remove.
-
-2010-07-13  H.J. Lu  <[email protected]>
-
-	PR ld/11812
-	* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
-	 allocate .got.plt section if there are no GOT nor PLT
-	 entries.
-	 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
-
-2010-07-13  H.J. Lu  <[email protected]>
-
-	PR ld/11791
-	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
-	garbage collection against STT_GNU_IFUNC symbols.
-
-	* elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
-	elf.plt.offset/elf.got.offset to -1.
-	(elf_i386_tls_transition): Skip TLS transition for functions.
-	(elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
-
-	* elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
-	elf.plt.offset/elf.got.offset to -1.
-	(elf64_x86_64_tls_transition): Skip TLS transition for functions.
-	(elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
-
-2010-07-12  H.J. Lu  <[email protected]>
-
-	* elf32-i386.c (elf_i386_check_relocs): Re-indent.
-	(elf_i386_relocate_section): Likewise.
-
-2010-07-06  H.J. Lu  <[email protected]>
-
-	* dwarf2.c (add_line_info): Initialize prev_line.
-
-2010-07-06  Alan Modra  <[email protected]>
-
-	* elf32-ppc.c (ppc_elf_relax_section): Insert branch around
-	trampolines only for .init and .fini sections.
-
-2010-07-05  Alan Modra  <[email protected]>
-
-	* elf32-ppc.c: Formatting.
-	(ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
-
-2010-07-03  Cary Coutant  <[email protected]>
-
-	* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
-	* dwarf2.c (read_and_uncompress_section): New function.
-	(read_section): Call it.
-	(find_line): Likewise.
-
-2010-07-01  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
-	than SYMBOL_REFERENCES_LOCAL.
-	(ppc64_elf_relocate_section): Likewise.
-
-2010-07-01  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
-
-2010-06-29  Alan Modra  <[email protected]>
-
-	* cpu-maxq.c: Delete file.
-	* coff-maxq.c: Delete file.
-	* Makefile.am: Remove references to maxq.
-	* archures.c: Likewise.
-	* coffcode.h: Likewise.
-	* configure.in: Likewise.
-	* targets.c: Likewise.
-	* config.bfd: Move maxq from obsolete to removed.
-	* Makefile.in: Regenerate.
-	* bfd-in2.h: Regenerate.
-	* configure: Regenerate.
-	* libbfd.h: Regenerate.
-	* po/SRC-POTFILES.in: Regenerate.
-
-2010-06-28  Alan Modra  <[email protected]>
-
-	* compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
-	to silence gcc warning.
-
-2010-06-27  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
-	(group_sections): Likewise.
-
-2010-06-27  Alan Modra  <[email protected]>
-
-	* bout.c (aligncode): Delete set but unused variables.
-	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
-	* coff-ppc.c (ppc_record_toc_entry): Likewise.
-	(coff_ppc_relocate_section): Likewise.
-	* coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
-	* elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
-	* elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
-	(mn10300_elf_relax_section): Likewise.
-	* elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
-	(record_vfp11_erratum_veneer): Likewise.
-	(bfd_elf32_arm_vfp11_erratum_scan): Likewise.
-	(elf32_arm_final_link_relocate): Likewise.
-	(elf32_arm_check_relocs, arm_map_one_stub): Likewise.
-	* elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
-	(elf32_avr_relax_section): Likewise.
-	(avr_mark_stub_not_to_be_necessary): Likewise.
-	* elf32-bfin.c (_bfin_create_got_section): Likewise.
-	* elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
-	(elf32_cr16_relax_delete_bytes): Likewise.
-	* elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
-	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
-	* elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
-	* elf32-h8300.c (elf32_h8_relax_section): Likewise.
-	(elf32_h8_relax_delete_bytes): Likewise.
-	* elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
-	* elf32-i370.c (i370_elf_check_relocs): Likewise.
-	(elf_relocate_section): Likewise.
-	* elf32-ip2k.c (adjust_all_relocations): Likewise.
-	(ip2k_elf_relax_section): Likewise.
-	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
-	(lm32_elf_check_relocs): Likewise.
-	(lm32_elf_finish_dynamic_sections): Likewise.
-	(lm32_elf_finish_dynamic_symbol): Likewise.
-	* elf32-m32c.c (m32c_offset_for_reloc): Likewise.
-	(m32c_elf_relax_delete_bytes): Likewise.
-	* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
-	(m32r_elf_finish_dynamic_sections): Likewise.
-	(m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
-	* elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
-	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
-	* elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
-	* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
-	(microblaze_elf_check_relocs): Likewise.
-	(microblaze_elf_finish_dynamic_symbol): Likewise.
-	* elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
-	* elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
-	* elf32-rx.c (rx_elf_relocate_section): Likewise.
-	(elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
-	(elf32_rx_relax_section): Likewise.
-	* elf32-score.c (score_elf_got_offset_from_index): Likewise.
-	(score_elf_final_link_relocate): Likewise.
-	(s3_bfd_score_elf_relocate_section): Likewise.
-	* elf32-score7.c (score_elf_got_offset_from_index): Likewise.
-	(s7_bfd_score_elf_relocate_section): Likewise.
-	* elf32-sh.c (sh_elf_check_relocs): Likewise.
-	* elf32-spu.c (spu_elf_relocate_section): Likewise.
-	* elf32-v850.c (v850_elf_check_relocs): Likewise.
-	(find_remembered_hi16s_reloc): Likewise.
-	* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
-	(elf_vax_relocate_section): Likewise.
-	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
-	* elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
-	(move_literal): Likewise.
-	* elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
-	(elf64_hppa_check_relocs): Likewise.
-	(elf64_hppa_finish_dynamic_symbol): Likewise.
-	(elf64_hppa_relocate_section): Likewise.
-	* elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
-	* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
-	(ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
-	* elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
-	(elfNN_vms_section_from_shdr): Likewise.
-	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
-	(_bfd_sparc_elf_relocate_section): Likewise.
-	* hp300hpux.c (slurp_symbol_table): Likewise.
-	* i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
-	* mach-o.c (bfd_mach_o_write_thread): Likewise.
-	* mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
-	* nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
-	* pdp11.c (pdp11_aout_link_input_section): Likewise.
-	(aout_link_input_section, aout_link_input_bfd): Likewise.
-	* pe-mips.c (mips_swap_reloc_out): Likewise.
-	(coff_pe_mips_relocate_section): Likewise.
-	* som.c (som_bfd_ar_write_symbol_stuff): Likewise.
-	* vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
-	* xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
-
-	* coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
-	* coffcode.h (coff_compute_section_file_positions): Likewise.
-	(coff_slurp_reloc_table): Likewise.
-	* cpu-arm.c (arm_check_note): Likewise.
-	* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
-	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
-	* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
-	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
-	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
-	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
-	* elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
-	* ieee.c (parse_expression): Likewise.
-	(ieee_slurp_external_symbols, drop_int): Likewise.
-	* peXXigen.c (pe_print_pdata): Likewise.
-	* versados.c (process_esd): Likewise.
-
-2010-06-25  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
-	its flags.  Create an absolute section if needed.
-
-2010-06-25  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
-	sections.  Mark .vmsdebug section as SEC_DEBUGGING.  Do not create
-	dummy psect anymore.  Adjust.
-	(_bfd_vms_write_eeom): Adjust (use target_index instead of index)
-	(_bfd_vms_write_etir): Ditto.
-	(start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
-	section name.  Adjust.
-
-2010-06-25  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_write_exec): Set linktime field.
-
-2010-06-25  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (toc_skip_enum): Define.
-	(ppc64_elf_edit_toc): Use two low bits of skip array as markers.
-	Optimize largetoc sequences.
-	(adjust_toc_syms): Update for skip array change.
-	(ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
-
-2010-06-25  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (is_static_defined): New function.
-	(get_tls_mask, ppc_type_of_stub): Use it here.
-	(ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
-	(ppc64_elf_tls_setup): Typo fix.
-	(adjust_toc_syms): Correctly handle symbols defined past the end
-	of the toc.  Move syms on removed entries to next entry rather
-	than to start of toc.
-	(ppc64_elf_edit_toc): Likewise.  Ensure we only attempt to
-	edit ppc64 input.  Allocate one extra word in skip array.
-	Honour info->keep_memory when reading relocs if we can.
-	Adjust toc relocs after adjusting symbols.
-
-2010-06-23  Nathan Sidwell  <[email protected]>
-
-	* archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
-	when scaning map.
-
-2010-06-17  Tristan Gingold  <[email protected]>
-
-	* Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
-	(BFD64_BACKENDS_CFILES): ... here.
-	(BFD32_BACKENDS): Move vms-alpha.lo to ...
-	(BFD64_BACKENDS): ... here.
-	* Makefile.in: Regenerate.
-
-2010-06-15  Joseph Myers  <[email protected]>
-
-	* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
-	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
-	elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
-	elf32_tic6x_merge_private_bfd_data): New.
-	(bfd_elf32_bfd_merge_private_bfd_data,
-	elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
-	elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
-	Define.
-	* elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
-
-2010-06-15  Joseph Myers  <[email protected]>
-
-	* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
-	(struct elf_backend_data): Update comment on obj_attrs_order.
-	* elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
-	_bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
-	instead of hardcoded 4.
-	* elf32-arm.c (elf32_arm_obj_attrs_order): Use
-	LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
-	instead of hardcoded 4 and 5.
-	(elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
-	instead of hardcoded 4.
-
-2010-06-14  Kevin Buettner  <[email protected]>
-
-	* elf32-h8300.c (elf_symbol_leading_char): Define.
-
-2010-06-11  Jan Kratochvil  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
-
-2010-06-11  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
-	sections to 0.
-
-2010-06-11  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
-
-2010-06-11  Tristan Gingold  <[email protected]>
-
-	* vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
-	Adjust cast.
-	(_bfd_vms_output_dump): Make DATA argument const, adjust cast.
-	* vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
-	* vms-alpha.c (evax_section_flags): Make it const.
-	(vms_secflag_by_name): Remove unused ABFD argument.
-	Make SECTION_FLAGS and NAME arguments const. Clarify comment.
-	(vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
-	(_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
-	(_bfd_vms_write_egsd): Remove useless cast.
-
-2010-06-10  Tristan Gingold  <[email protected]>
-
-	* config.bfd: Remove #if/#endif so that som can be compiled on any
-	host.
-	* targets.c (_bfd_target_vector): Remove #if/#endif so that som
-	can be used on any host.
-
-2010-06-10  Tristan Gingold  <[email protected]>
-
-	* som.c: Can now be compiled on any host.
-	Include bfd headers instead of system one.
-	(som_compute_checksum): Parameter is now a pointer to a
-	som_external_header structure.  Adjust.
-	(struct section_to_type): Field section is now const.
-	(R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
-	definition.
-	(R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
-	(R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
-	(som_swap_clock_in, som_swap_clock_out): New functions.
-	(som_swap_header_in, som_swap_header_out): Likewise.
-	(som_swap_space_dictionary_in): Likewise.
-	(som_swap_space_dictionary_out): Likewise.
-	(som_swap_subspace_dictionary_in): Likewise.
-	(som_swap_subspace_dictionary_record_out): Likewise.
-	(som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
-	(som_swap_string_auxhdr_out): Likewise.
-	(som_swap_compilation_unit_out): Likewise.
-	(som_swap_exec_auxhdr_in): Likewise.
-	(som_swap_exec_auxhdr_out): Likewise.
-	(som_swap_lst_header_in): Likewise.
-	(som_object_setup): Adjust parameter type using bfd types.
-	(setup_sections): Likewise.  Ditto for object file types.
-	Use intermediate variables for external representation and use the
-	swap functions to convert.
-	(som_object_p): Ditto.  Remove #ifdef/#endif on always defined
-	macros.
-	(som_prep_headers): Likewise.
-	(som_write_symbol_strings): Likewise.
-	(som_begin_writing): Likewise.
-	(som_finish_writing): Likewise.
-	(som_build_and_write_symbol_table): Likewise.
-	(bfd_section_from_som_symbol): Likewise.
-	(som_slurp_symbol_table): Likewise.
-	(som_bfd_print_private_bfd_data): Likewise.
-	(bfd_som_attach_aux_hdr): Likewise.  Clear the padding.
-	(bfd_som_attach_compilation_unit): Likewise.
-	(som_bfd_count_ar_symbols): Likewise.
-	(som_bfd_fill_in_ar_symbols): Likewise.
-	(som_slurp_armap): Likewise.
-	(som_bfd_ar_write_symbol_stuff): Likewise.
-	(som_write_armap): Likewise.  Use _bfd_ar_spacepad instead of
-	sprintf to write header fields.
-	* som.h: Include bfd headers instead of system one.
-	(FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
-	(struct somdata): Use bfd structures instead of system ones.
-	(struct som_section_data_struct): Likewise.
-	(struct som_subspace_dictionary_record): Removed (now in
-	include/som/internal.h)
-
-2010-06-10  Tristan Gingold  <[email protected]>
-
-	* targets.c (bfd_target_list): Remove hp/ux compiler work-around
-	as bfd requires an ANSI-C compiler.
-
-2010-06-09 Tristan Gingold  <[email protected]>
-
-	* bfdio.c (bfd_bread): Fix the code to prevent reading past the
-	end of archive members.
-
-2010-06-08  Tristan Gingold  <[email protected]>
-
-	* som.c (som_bfd_free_cached_info): Do not free relocations as
-	they were allocated with bfd_zalloc.
-
-2010-06-08  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
-	for the first block.
-
-2010-06-08  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
-	* libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
-	* libbfd.h: Regenerate.
-	* elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
-	(bfd_elfNN_mkarchive): Ditto.
-
-2010-06-02  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
-
-2010-06-01  Ralf Wildenhues  <[email protected]>
-
-	* configure: Regenerate.
-
-2010-06-01  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (struct vms_private_data_struct): Add
-	transfer_address field.  Remove unused dst_info field.
-	(alpha_vms_write_exec): Use transfer_address.
-	(_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
-	(alpha_vms_bfd_final_link): Set transfer_address.
-
-2010-05-31  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (credat_lo, credat_hi): New fields.
-	(vms_read_block): Adjust comments.
-	(vms_write_block): New function.
-	(_bfd_vms_lib_archive_p): Decode majorid once.  Replace some
-	hard-coded values with constants.  Set credat_lo and credat_hi.
-	(_bfd_vms_lib_mkarchive): Add argument kind.
-	Set ver, mhd_size and type according to kind.
-	(_bfd_vms_lib_alpha_mkarchive): New function.
-	(struct lib_index): Renamed from struct vms_index
-	(lib_index_cmp): Renamed from vms_index_cmp.  Adjusted.
-	(get_idxlen): Type of idx argument adjusted.  Add is_elfidx
-	argument and handle it.
-	(vms_write_index): Adjust argument idx.  Handle elf indexes.
-	(_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
-	(_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
-	use it.  Handle elf indexes.  Set credat.
-	* libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
-	(_bfd_vms_lib_alpha_mkarchive): ... this.
-	* libbfd.h: Regenerated.
-	* vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
-
-2010-05-28  Sterling Augustine  <[email protected]>
-
-	* elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
-	of code to change the bits in the instructions to match the changes
-	in the relocations.  Declare dest_addr and sym_sec to help.
-
-2010-05-28  Jan Kratochvil  <[email protected]>
-
-	Workaround GCC PR middle-end/4210.
-	* vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
-	and val[3].
-
-2010-05-27  Tristan Gingold  <[email protected]>
-
-	* vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
-	(VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
-	(vms_time_to_time_t): Use them instead of local const.
-	(vms_time_t_to_vms_time): New function.
-	(vms_get_time): Likewise.
-	(vms_raw_get_time): Likewise.
-	* vms.h	(vms_time_t_to_vms_time): New declaration.
-	(vms_get_time): Likewise.
-	(vms_raw_get_time): Likewise.
-
-2010-05-26  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c: Update comments.
-	(alpha_vms_write_exec): Set lnkflags.  Write the GST.
-	(alpha_vms_link_output_symbol): New function.
-	(alpha_vms_bfd_final_link): Generate the VMS symbol table.
-	Set dst_section private field.
-	(alpha_vms_bfd_final_link): Remove code that set dst_section.
-
-2010-05-26  Tristan Gingold  <[email protected]>
-
-	* bfdio.c: Declare and define _bfd_memory_iovec.
-	(bfd_bread): Move code for BFD_IN_MEMORY...
-	(bfd_bwrite): ... Ditto ...
-	(bfd_tell): ... Ditto ...
-	(bfd_flush): ... Ditto ...
-	(bfd_stat): ... Ditto ...
-	(bfd_seek): ... Ditto ...
-	(bfd_get_size): ... Ditto ...
-	(bfd_mmap): ... Ditto ...
-	(memory_bread): ... to these new functions.
-	(memory_bwrite): Ditto.
-	(memory_btell): Ditto.
-	(memory_bseek): Ditto.
-	(memory_bflush): Ditto.
-	(memory_bstat): Ditto.
-	(memory_bmmap): Ditto.
-	(memory_bclose): New function.
-	* peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
-	* xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
-	* opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
-	(bfd_make_writable): Use _bfd_memory_iovec.
-	* elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
-	* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
-	_bfd_memory_iovec.
-	(alpha_ecoff_openr_next_archived_file): Use proxy_origin
-	instead of origin.
-	* libbfd.h: Regenerate.
-
-2010-05-25  Daniel Jacobowitz  <[email protected]>
-	    Joseph Myers  <[email protected]>
-	    Andrew Stubbs  <[email protected]>
-
-	* config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
-	bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
-	* configure.in: Handle FDPIC vectors.
-	* elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
-	* elf32-sh.c (DEFAULT_STACK_SIZE): Define.
-	(SYMBOL_FUNCDESC_LOCAL): Define.  Use it instead of
-	SYMBOL_REFERENCES_LOCAL for function descriptors.
-	(fdpic_object_p): New.
-	(sh_reloc_map): Add FDPIC and movi20 relocations.
-	(sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
-	range.
-	(struct elf_sh_plt_info): Add got20 and short_plt.  Update all
-	definitions.
-	(FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
-	(fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
-	(FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
-	(fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
-	(fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
-	New.
-	(get_plt_info): Handle FDPIC.
-	(MAX_SHORT_PLT): Define.
-	(get_plt_index, get_plt_offset): Handle short_plt.
-	(union gotref): New.
-	(struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
-	got_type and adjust all uses.  Add GOT_FUNCDESC.
-	(struct sh_elf_obj_tdata): Add local_funcdesc.	Rename
-	local_got_tls_type to local_got_type.
-	(sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type.  All
-	users changed.
-	(sh_elf_local_funcdesc): Define.
-	(struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
-	and srofixup.
-	(sh_elf_link_hash_newfunc): Initialize new fields.
-	(sh_elf_link_hash_table_create): Set fdpic_p.
-	(sh_elf_omit_section_dynsym): New.
-	(create_got_section): Create .got.funcdesc, .rela.got.funcdesc
-	and .rofixup.
-	(allocate_dynrelocs): Allocate local function descriptors and space
-	for R_SH_FUNCDESC-related relocations, and for rofixups.
-	Handle GOT_FUNCDESC.  Create fixups.  Handle GOT entries which
-	require function descriptors.
-	(sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
-	(sh_elf_modify_program_headers): New.
-	(sh_elf_size_dynamic_sections): Allocate function descriptors for
-	local symbols.  Allocate .got.funcdesc contents.  Allocate rofixups.
-	Handle local GOT entries of type GOT_FUNCDESC.	Create fixups for
-	local GOT entries.  Ensure that FDPIC libraries always have a PLTGOT
-	entry in the .dynamic section.
-	(sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
-	(sh_elf_add_rofixup, sh_elf_osec_to_segment)
-	(sh_elf_osec_readonly_p, install_movi20_field): New functions.
-	(sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
-	R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC.  Use sh_elf_got_offset
-	and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_.	Add rofixup
-	read-only section warnings.  Handle undefined weak symbols.  Generate
-	fixups for R_SH_DIR32 and GOT entries.	Check for cross-segment
-	relocations and clear EF_SH_PIC.  Handle 20-bit relocations.
-	Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
-	(sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
-	R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
-	Handle 20-bit relocations.
-	(sh_elf_copy_indirect_symbol): Copy function descriptor reference
-	counts.
-	(sh_elf_check_relocs): Handle new relocations.  Make symbols
-	dynamic for FDPIC relocs.  Account for rofixups.  Error for FDPIC
-	symbol mismatches.  Allocate a GOT for R_SH_DIR32. Allocate fixups
-	for R_SH_DIR32.
-	(sh_elf_copy_private_data): Copy PT_GNU_STACK size.
-	(sh_elf_merge_private_data): Copy initial flags.  Do not clobber
-	non-mach flags.  Set EF_SH_PIC for FDPIC.  Reject FDPIC mismatches.
-	(sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
-	here.  Rename sgot to sgotplt and srel to srelplt.  Handle short_plt,
-	FDPIC descriptors, and got20.  Create R_SH_FUNCDESC_VALUE for FDPIC.
-	Use install_movi20_field.  Rename srel to srelgot.  Always generate
-	R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
-	(sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
-	Do not fill in reserved GOT entries for FDPIC.	Correct DT_PLTGOT.
-	Rename sgot to sgotplt.  Assert that the right number of rofixups
-	and dynamic relocations were allocated.
-	(sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
-	(elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
-	(elf_backend_can_make_relative_eh_frame)
-	(elf_backend_can_make_lsda_relative_eh_frame)
-	(elf_backend_encode_eh_address): Define.
-	(TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
-	(TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
-	Redefine for FDPIC vector.
-	* reloc.c: Add SH FDPIC and movi20 relocations.
-	* targets.c (_bfd_target_vector): Add FDPIC vectors.
-	* configure, bfd-in2.h, libbfd.h: Regenerated.
-
-2010-05-25  Jay Krell  <[email protected]>
-
-	PR ld/11624
-	* archive.c (_bfd_calloc_wrapper): New function.
-	(_bfd_add_bfd_to_archive_cache): Use it.
-
-	* configure.in: Add alpha*-*-*vms* to list of natives.
-	* configure: Regenerate.
-
-	* vms-misc.c: Define globalref if necessary.
-	(vms_convert_to_var_unix_filename): Rename to
-	_bfd_vms_convert_to_var_unix_filename and export.
-	* vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
-	* vms-alpha.c (vms_close_and_cleanup): Update invocation of
-	vms_convert_to_var_unix_filename.
-
-2010-05-24  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (add_symbol_entry): New function extrated from ...
-	(add_symbol): ... adjusted.
-
-2010-05-24  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
-	(alpha_vms_write_exec): Add a comment.
-	(_bfd_vms_write_egsd): Ditto.
-	(alpha_vms_convert_symbol): Remove a blank line.
-
-2010-05-21  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
-	for the GST.
-
-2010-05-21  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
-	SEC_LOAD if isect has data.
-	(vms_get_symbol_info): Refine the condition for 'T' type.
-
-2010-05-18  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_write_emh): New function.
-	(_bfd_vms_write_lmn): New function.
-	(_bfd_vms_write_eeom): Moved.
-	(hash_string): Likewise.
-	(_bfd_vms_length_hash_symbol): Likewise.
-	(_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
-	and _bfd_vms_write_lmn, and call these functions.
-
-2010-05-18  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
-	Add details in the messages.
-	(evax_bfd_print_image): Change message.
-
-2010-05-18  H.J. Lu  <[email protected]>
-
-	PR gas/11600
-	* elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
-	(elf_fake_sections): Likewise.
-
-	* elf32-i370.c (i370_elf_section_from_shdr): Don't handle
-	SHF_EXCLUDE here.
-	* elf32-ppc.c (ppc_elf_fake_sections): Likewise.
-
-2010-05-17  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c: Include esgps.h and eidc.h.
-	(_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
-	(evax_bfd_print_egsd_flags): New function, extracted from ...
-	(evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags.  Handles
-	EGSD__C_SPSC and EGSD__C_IDC.
-
-2010-05-14  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
-	(_bfd_vms_get_object_record): Handle align byte only in the
-	foreign case.
-
-2010-05-14  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
-	* libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
-	* libbfd.h: Regenerate.
-	* configure.in (havevecs): Define HAVE_all_vecs when
-	--enable-targets=all is set.  Use AC_SUBST on it.
-	(tdefaults): Do not add havevecs.
-	(bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
-	* configure: Regenerate.
-	* Makefile.am (HAVEVECS): New variable.
-	(INCLUDES): Add HAVEVECS.
-	* Makefile.in: Regenerate.
-	* elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
-	target is selected.  Add #ifdef/#endif around vms specific code.
-	(bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
-	bfd_elfNN_archive_slurp_extended_name_table,
-	bfd_elfNN_archive_construct_extended_name_table,
-	bfd_elfNN_archive_truncate_arname,
-	bfd_elfNN_archive_write_armap,
-	bfd_elfNN_archive_read_ar_hdr,
-	bfd_elfNN_archive_write_ar_hdr,
-	bfd_elfNN_archive_openr_next_archived_file,
-	bfd_elfNN_archive_get_elt_at_index,
-	bfd_elfNN_archive_generic_stat_arch_elt,
-	bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
-
-2010-05-11  Jie Zhang  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
-	Tag_ABI_HardFP_use correctly.
-
-2010-05-11  Alan Modra  <[email protected]>
-
-	* coffcode.h (coff_write_object_contents): Enclose all occurrences
-	of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
-
-2010-05-07  Daniel Jacobowitz  <[email protected]>
-
-	* elf32-arm.c (struct a8_erratum_reloc): Add hash member.  Move
-	sym_name to improve packing.
-	(cortex_a8_erratum_scan): Check for PLT entries.
-	(elf32_arm_size_stubs): Save the target symbol for a8 relocs.
-
-2010-05-07  Tristan Gingold  <[email protected]>
-
-	* Makefile.in: Regenerate with automake 1.11.1.
-	* aclocal.m4: Ditto.
-
-2010-05-05  Nick Clifton  <[email protected]>
+2011-08-26  Nick Clifton  <[email protected]>
 
 	* po/es.po: Updated Spanish translation.
 
-2010-05-03  Tristan Gingold  <[email protected]>
+2011-08-19  Alan Modra  <[email protected]>
 
-	* vms-lib.c (vms_lib_bopen): Fix the size threshold to read
-	selective_search flag.
-	Add comments.
-	* vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
-	before output_has_begun is set.
+	* elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
+	we haven't seen expected -mcmodel=medium/large code relocs.
 
-2010-05-03  Tristan Gingold  <[email protected]>
+2011-08-18  Tristan Gingold  <[email protected]>
 
-	* vms-alpha.c: Add comments.
-	(struct vms_private_data_struct): Remove image_autoextend field.
-	(dst_check_allocation): Removed.
-	(image_write): Remove call to dst_check_allocation.
-	(vms_slurp_debug): Do not set image_autoextend.  Adjust section
-	size.
-	(_bfd_vms_slurp_object_records): Remove useless new_type variable.
-	(alpha_vms_write_exec): Use dst_section to get the dst section.
-	Write the dmt section.
-	(evax_bfd_print_image): Also print the dst size in hexa.  Fix typo.
-	(alpha_vms_read_sections_content): Do not set image_autoextend.
-	(alpha_vms_bfd_final_link): Generate the dst.
+	* mach-o.c (bfd_mach_o_read_segment): Initialize list.
 
-2010-05-03  Tristan Gingold  <[email protected]>
+2011-08-17  Tristan Gingold  <[email protected]>
 
-	* vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
-	next array.
-	(vms_lib_dcx): Adjust for the above change.
+	* mach-o.c (bfd_mach_o_write_section_32): Fix typo.
 
-2010-04-30  H.J. Lu  <[email protected]>
+2011-08-17  Alan Modra  <[email protected]>
 
-	PR ld/11542
-	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
-
-	* elf32-i386.c (elf_i386_relocate_section): Use it.
-	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
-
-2010-04-30  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (vms_read_block): New function.
-	(vms_traverse_index): Use vms_read_block.  Handle long key names.
-
-2010-04-30  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
-	and syms removed.
-	(struct carsym_mem): New structure.
-	(vms_add_index): New function.
-	(vms_add_indexes_from_list): New function.
-	(vms_traverse_index): Parameter carsym changed to carsym_mem.
-	Code adjusted to handle elfidx.
-	(vms_lib_read_index): Adjusted for vms_traverse_index changes.
-	Parameter NBREL is now a pointer.
-	(_bfd_vms_lib_archive_p): Adjust for above change.  Handle ia64
-	archives.
-	(_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
-	(_bfd_vms_lib_find_symbol): Ditto.
-	(vms_lib_bopen): Fix two typos: return FALSE in case of error,
-	check MHD id.
-	(_bfd_vms_lib_get_module): New function.
-	(_bfd_vms_lib_get_elt_at_index): Rewritten using the above
-	function.
-	(_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
-	(_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
-	(vms_write_index): Adjust for structure renamed.
-	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
-	changes of _bfd_vms_lib_find_symbol.
-
-2010-04-28  Kai Tietz  <[email protected]>
-
-	* config.bfd: Correct accidential reverted patch
-	about vax*-*-*vms*.
-
-2010-04-27  Kai Tietz  <[email protected]>
-
-	* pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
-	to USE_MINGW64_LEADING_UNDERSCORES.
-	* pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
-	* config.bfd: Change underscoring default for x64 mingw
-	to false.
-	* coffcode.h (coff_write_relocs): Add check that dereferenced
-	sym_ptr_ptr isn't NULL.
-	* config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
-	* configure: Regenerated.
-	* configure.in: Add option '--enable-leading-mingw64-underscores'
-	and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
-
-2010-04-27  Nick Clifton  <[email protected]>
-
-	PR binutils/11512
-	* coffgen.c (coff_find_nearest_line): Incldue the section address
-	of function name symbols in address comparisons.
-
-2010-04-27  Nick Clifton  <[email protected]>
-
-	* po/fr.po: Updated French translation.
-
-2010-04-23  Alan Modra  <[email protected]>
-
-	* elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
-	ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
-	throughout file.
-	(assign_file_positions_for_load_sections): Modify section in
-	segment warning to ignore overlay vmas.
-	* elf32-spu.c (spu_elf_object_p): Replace use of
-	ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
-
-2010-04-22  Nick Clifton  <[email protected]>
-
-	* po/bfd.pot: Updated by the Translation project.
-	* po/vi.po: Updated Vietnamese translation.
-
-2010-04-22  Alan Modra  <[email protected]>
-
-	* elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
-	change.  Tidy.  Don't error on sections not allocated in segment.
-
-2010-04-15  Andrew Haley  <[email protected]>
-
-	* bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
-	merge_exidx_entries.
-	* bfd-in2.h: Likewise.
-	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise.  Use it to
-	control merging of exidx entries.
-
-2010-04-20  Joseph Myers  <[email protected]>
-
-	* elf32-tic6x.h: New.
-	* elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
-	* elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
-	elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
-	elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
-	elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
-	bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
-	(elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
-	elf32_tic6x_relocate_section): Handle REL relocations.
-	(elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
-
-2010-04-20  Jakub Jelinek  <[email protected]>
-
-	* dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
-	DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
-
-2010-04-19  Nick Clifton  <[email protected]>
-
-	* archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
-	arhdrpos variable.
-	* elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
-	attribute to warned variable.  Remove unused val, type and type2
-	variables.
-
-2010-04-16  Andreas Schwab  <[email protected]>
-
-	* vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
-	strict-aliasing rules.
-
-2010-04-16  Tristan Gingold  <[email protected]>
-
-	* vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
-	(_bfd_vms_get_object_record): Always assume there is a pad byte
-	for alignment.
-
-	* vms-lib.c: Add a few comments.
-
-2010-04-15  Matthew Gretton-Dann  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
-	attributes in v2.08 of the ABI.
-
-2010-04-15  Alan Modra  <[email protected]>
-
-	* config.bfd (vax*-*-*vms*): Delete.
-
-2010-04-14  Tristan Gingold  <[email protected]>
-
-	* Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
-	vms-tir.lo, vms.lo and add vms-alpha.lo
-	(BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
-	vms-tir.c, vms.c and add vms-alpha.c
-	* Makefile.in: Regenerate.
-	* configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
-	Remove vms_vax_vec.
-	* configure: Regenerate.
-	* targets.c (vms_vax_vec): Remove the declaration.
-	(_bfd_target_vector): Remove vms_vax_vec.
-	* vms-alpha.c: New file.
-	* vms-gsd.c: Removed, rewritten in vms-alpha.c
-	* vms-hdr.c: Ditto.
-	* vms-tir.c: Ditto.
-	* vms.c: Ditto.
-	* vms-misc.c: Fix indentation and comments.  Replace most of
-	#if VMS_DEBUG/vms_debug with vms_debug2.
-	(_bfd_vms_hash_newfunc): Moved to vms-alpha.c
-	(hash_string): Ditto.
-	(_bfd_vms_length_hash_symbol): Ditto.
-	(maybe_adjust_record_pointer_for_object): Ditto.
-	(_bfd_vms_get_object_record): Ditto.
-	(vms_get_remaining_object_record): Ditto.
-	(_bfd_vms_push): Ditto.
-	(_bfd_vms_pop): Ditto.
-	(_bfd_vms_get_header_values): Removed.
-	(_bfd_vms_get_first_record): Removed.
-	(vms_get_remaining_image_record): Removed.
-	(new_symbol): Removed.
-	(_bfd_vms_enter_symbol): Removed.
-	(_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
-	(_bfd_vms_output_begin): Remove rechead parameter.  Replace bfd
-	parameter with struct vms_rec_wr.
-	(_bfd_vms_output_push): Removed and replaced by ...
-	(_bfd_vms_output_begin_subrec): ... new function.
-	(_bfd_vms_output_alignment): Replace bfd parameter with
-	struct vms_rec_wr, and adjust.
-	(_bfd_vms_output_check): Ditto
-	(_bfd_vms_output_byte): Ditto.
-	(_bfd_vms_output_short): Ditto.
-	(_bfd_vms_output_long): Ditto.
-	(_bfd_vms_output_quad): Ditto.
-	(_bfd_vms_output_counted): Ditto.
-	(_bfd_vms_output_dump): Ditto.
-	(_bfd_vms_output_fill): Ditto.
-	(_bfd_vms_output_pop): Removed and replaced by ...
-	(_bfd_vms_output_end_subrec): ... new function.
-	(_bfd_vms_output_flush): Removed.
-	(_bfd_vms_output_align): New function.
-	(_bfd_vms_output_end): Add recwr parameter.  Adjust for this new
-	parameter.
-	(vms_convert_to_var): New function imported from vms.c
-	(vms_convert_to_var_1): Ditto.
-	(vms_convert_to_var_unix_filename): Ditto.
-	(vms_get_module_name): Ditto.
-	(get_vms_time_string): Ditto.
-	(vms_time_to_time_t): Ditto.
-	(vms_rawtime_to_time_t): Ditto.
-	* vms.h: All macros for the VMS file format are now in include/vms.
-	Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
-	have been removed.
-	(struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
-	(struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
-	(struct funcinfo, struct vms_private_data_struct): Ditto.
-	(struct vms_section_data_struct): Ditto.
-	(struct vms_rec_rd, stryct vms_rec_wr): New declarations.
-	(vms_get_module_name, get_vms_time_string): New declarations.
-	(vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
-	(_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
-	(_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
-	(_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
-	(_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
-	(_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
-	(_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
-	(_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
-	(_bfd_vms_output_fill): Ditto.
-	(bfd_vms_set_section_flags): Ditto.
-
-2010-04-14  Matthew Gretton-Dann  <[email protected]>
-
-	* elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
-	exit due to merging the same weak symbol to test that the symbols are
-	actually weak.
-
-2010-04-13  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
-	when optimizing high got_tlsgd/ld insns.
-
-2010-04-10  H.J. Lu  <[email protected]>
-
-	* hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
-	define.
-	(HAVE_PRSTATUS32_T): Likewise.
-
-2010-04-10  H.J. Lu  <[email protected]>
-
-	PR corefiles/11467
-	* configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
-	for x86_64-*-linux*.
-	* config.in: Regenerated.
-	* configure: Likewise.
-
-	* elf.c: Include CORE_HEADER if it is defined.
-
-2010-04-10  H.J. Lu  <[email protected]>
-	    Jan Kratochvil  <[email protected]>
-
-	* hosts/x86-64linux.h: New.
-
-2010-04-09  Nick Clifton  <[email protected]>
-
-	* aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
-	* elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
-	variables htab and hdr_info and mark info parameter as unused.
-	* elf.c (prep_headers): Remove unused variable i_phdrp.
-	(_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
-	* elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
-	as unused.
-	* peXXigen.c (pe_print_reloc): Remove unused variable datasize.
-	* verilog.c (verilog_write_section): Remove unused variable
-	address.
-
-2010-04-07  Alan Modra  <[email protected]>
-
-	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
-	* configure: Regenerate.
-
-2010-04-06  H.J. Lu  <[email protected]>
-
-	PR ld/11434
-	* elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
-
-2010-04-06  Tristan Gingold  <[email protected]>
-
-	* vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
-
-2010-04-05  Jakub Jelinek  <[email protected]>
-
-	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
-	provided that it has the expected address size and zero segment
-	length.
-
-	* dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
-	(struct line_info): Add op_index field, change end_sequence type to
-	unsigned char.
-	(new_line_sorts_after): For the same address compare op_index.
-	(add_line_info): Add op_index argument, store it into the structure.
-	(decode_line_info): Complain about unknown versions of .debug_line.
-	Initialize maximum_ops_per_insn.  Add op_index state register and
-	track it.
-
-2010-04-01  Nathan Sidwell  <[email protected]>
-
-	* elf32-ppc.c (apuinfo_set): New static var.
-	(ppc_elf_begin_write_processing): Set it here, always create an
-	APUinfo section if there were any in the inputs.
-	(ppc_elf_write_section): Check apuinfo_set.
-	(ppc_elf_final_write_processing): Likewise.
-
-2010-04-01  Tristan Gingold  <[email protected]>
-
-	* vms.h: Include time.h. Add prototypes for vms_get_module_name,
-	vms_time_to_time_t and vms_rawtime_to_time_t.
-	* vms.c (vms_alpha_vec): Add archives support.
-	* vms-misc.c: Include safe-ctype.h
-	(vms_get_module_name): New function.
-	(vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
-	* vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
-	vms_get_module_name function.  Use this function.
-	* targets.c: Declare vms_lib_txt_vec.  Add it to _bfd_target_vector.
-	* libbfd-in.h: Add prototype for _bfd_append_relative_path.
-	Add prototypes for vms-lib.c
-	* libbfd.h: Regenerate.
-	* configure.in (TDEFINES): Add an entry for vms_lib_txt_vec.  Add
-	vms-lib.lo to vms_alpha_vec.
-	* config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
-	* configure: Regenerate.
-	* bfd.c: Add selective_search field.
-	* bfd-in2.h: Regenerate.
-	* archive.c (append_relative_path): Rename to
-	_bfd_append_relative_path and make it public.
-	(_bfd_get_elt_at_filepos): Adjust for above renaming.
-	* Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
-	(BFD32_BACKENDS_CFILES): Add vms-lib.c
-	* Makefile.in: Regenerate.
-
-2010-04-01  Jakub Jelinek  <[email protected]>
-
-	* dwarf2.c (read_attribute_value): Handle CU version 4
-	for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
-	and DW_FORM_flag_present.  For unknown form value return NULL.
-	(scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
-	like DW_FORM_block.
-	(parse_comp_unit): Allow CU version 4.
-
-2010-04-01  Hans-Peter Nilsson  <[email protected]>
-
-	* elf32-cris.c (cris_elf_relocate_section): Correct first argument
-	to _bfd_elf_get_dynamic_reloc_section.
-	(elf_cris_discard_excess_dso_dynamics): Ditto.
-
-2010-03-31  Kai Tietz  <[email protected]>
-
-	* coff-i386.c (in_reloc_p): Check also for R_SECREL32.
-	* coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
-
-2010-03-31  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
-	TPREL16_HI and TPREL16_HA insns.
-
-2010-03-31  Hans-Peter Nilsson  <[email protected]>
-
-	PR ld/11458
-	* elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
-	assert of empty pcrel_relocs_copied on the direct symbol.  Instead
-	of moving the list from the indirect symbol to the direct symbol,
-	merge into any existing list.
-	(cris_elf_check_relocs): Store the original section in the
-	pcrel_relocs_copied list, not the relocation section.
-	(elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
-	the relocation section, for reducing its size.  Change the
-	BFD_ASSERT into a check for the section being read-only, and only
-	emit warnings and TEXTREL marker when there's an entry for a
-	read-only section.
-
-2010-03-29  Daniel Jacobowitz  <[email protected]>
-
-	* elf32-arm.c (using_thumb_only): Handle v6-M.
-
-2010-03-26  Alan Modra  <[email protected]>
-
-	* elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
-	* bfd-in.h (elf_discarded_section): Clarify comment.
-	* reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
-	* bfd-in2.h: Regenerate.
-
-2010-03-26  Matt Rice  <[email protected]>
-
-	* archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
-	as unique in the armap.
-
-2010-03-26  Alan Modra  <[email protected]>
-
-	PR ld/11375
-	* elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
-	possible stub on branches.
-
-2010-03-25  Joseph Myers  <[email protected]>
-
-	* Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
-	(ALL_MACHINES_CFILES): Add cpu-tic6x.c.
-	(BFD32_BACKENDS): Add elf32-tic6x.lo.
-	(BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
-	* Makefile.in: Regenerate.
-	* archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
-	(bfd_archures_list): Update.
-	* config.bfd (tic6x-*-elf): New.
-	* configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
-	New.
-	* configure: Regenerate.
-	* cpu-tic6x.c, elf32-tic6x.c: New.
-	* reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
-	BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
-	BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
-	BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
-	BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
-	BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
-	BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
-	BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
-	BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
-	BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
-	BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
-	BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
-	BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
-	* targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
-	(_bfd_target_vector): Update.
-	* bfd-in2.h, libbfd.h: Regenerate.
-
-2010-03-24  H.J. Lu  <[email protected]>
-
-	* aout-target.h: Update copyright year.
-	* aout-tic30.c: Likewise.
-	* coff-alpha.c: Likewise.
-	* coff-rs6000.c: Likewise.
-	* coff64-rs6000.c: Likewise.
-	* elf64-mips.c: Likewise.
-	* ieee.c: Likewise.
-	* libecoff.h: Likewise.
-	* mach-o-target.c: Likewise.
-	* mach-o.c: Likewise.
-	* oasys.c: Likewise.
+	PR ld/12762
+	* bfd-in.h (struct bfd_section_already_linked): Forward declare.
+	(_bfd_handle_already_linked): Declare.
+	* coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
+	_bfd_coff_section_already_linked.
+	* coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
+	* coffcode.h (coff_section_already_linked): Likewise.
+	* cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
+	* elf-bfd.h: Likewise.
+	* libbfd-in.h: Likewise.
 	* targets.c: Likewise.
+	* linker.c (bfd_section_already_linked): Likewise.
+	(bfd_section_already_linked_table_lookup): Likewise.
+	(bfd_section_already_linked_table_insert): Likewise.
+	(_bfd_generic_section_already_linked): Likewise.  Call
+	_bfd_handle_already_linked.
+	(_bfd_handle_already_linked): New function, split out from..
+	* elflink.c (_bfd_elf_section_already_linked): ..here.  Revert
+	2011-07-09 changes.  Avoid unnecessary strcmp when matching
+	already_linked_list entries.  Match plugin linkonce section.
+	(section_signature): Delete.
+	* coffgen.c (_bfd_coff_section_already_linked): New function.
+	* libcoff-in.h (_bfd_coff_section_already_linked): Declare.
+	* libbfd.h: Regenerate.
+	* libcoff.h: Regenerate.
+	* bfd-in2.h: Regenerate.
 
-2010-03-24  H.J. Lu  <[email protected]>
+2011-08-14  Alan Modra  <[email protected]>
 
-	* libbfd-in.h: Update copyright year.
+	* elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
+	shared and call to _mcount will go via plt.
 
-2010-03-21  H.J. Lu  <[email protected]>
+2011-08-14  Alan Modra  <[email protected]>
 
-	PR ld/11413
-	* elflink.c (_bfd_elf_add_default_symbol): Check !executable
-	instead of shared.
+	* elf64-ppc.c: Prefix all einfo error strings with "%P: ".
+	* elf32-ppc.c: Likewise.
+	(ppc_elf_select_plt_layout): Use einfo rather than info to report
+	forced bss-plt.
 
-2010-03-19  Jie Zhang  <[email protected]>
+2011-08-12  H.J. Lu  <[email protected]>
 
-	* elf32-arm.c (struct section_list): Remove.
-	(section_list): Remove typedef.
-	(record_section_with_arm_elf_section_data): Remove.
-	(find_arm_elf_section_entry): Remove.
-	(get_arm_elf_section_data): Use is_arm_elf.
-	(unrecord_section_with_arm_elf_section_data): Remove.
-	(elf32_arm_new_section_hook): Don't call
-	record_section_with_arm_elf_section_data.
-	(elf32_arm_write_section): Set mapcount to -1 when
-	the map has been used. Don't call
-	unrecord_section_with_arm_elf_section_data.
-	(unrecord_section_via_map_over_sections): Remove.
-	(elf32_arm_close_and_cleanup): Remove.
-	(elf32_arm_bfd_free_cached_info): Remove.
-	(bfd_elf32_close_and_cleanup): Don't define.
-	(bfd_elf32_bfd_free_cached_info): Don't define.
+	PR ld/13082
+	* elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
+	(elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
+	and zero-extend it to 64bit if addend is zero for x32.  Generate
+	R_X86_64_RELATIVE64 for x32.
 
-2010-03-18  H.J. Lu  <[email protected]>
+2011-08-09  Matthew Gretton-Dann  <[email protected]>
 
-	PR binutils/11396
-	* libcoff-in.h (pe_tdata): Add dont_strip_reloc.
-	* libcoff.h: Regenerated.
+	* bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
+	* bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
+	* elf32-arm.c (elf32_arm_link_hash_table): New field.
+	(elf232_arm_link_hash_table_create): Initialise new field.
+	(check_use_blx): Change test depending on fix_arm1176.
+	(bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
+	command line options.
 
-	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
-	if dont_strip_reloc is set.
-	(_bfd_XX_bfd_copy_private_bfd_data_common): Set
-	dont_strip_reloc on output if there is no .reloc and
-	IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
+2011-08-08  Tristan Gingold  <[email protected]>
 
-2010-03-18  Wei Guozhi  <[email protected]>
+	* mach-o.c (struct mach_o_segment_name_xlat): Add comments.
+	(segsec_names_xlat): Reorder elements.
+	(bfd_mach_o_read_section_32): Fix typo.
+	(bfd_mach_o_read_section_64): Fix typo.
 
-	PR gas/11323
-	* elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
-	R_ARM_GOT_PREL.
-	* reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
+2011-08-08  Tristan Gingold  <[email protected]>
+
+	* mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
+	(BFD_MACH_O_SECTNAME_SIZE): Ditto.
+	(bfd_mach_o_section): Use them.  Add next field.
+	(bfd_mach_o_segment_command): Replace sections array by
+	sect_head and sect_tail.
+	(bfd_mach_o_get_mach_o_section): New macro.
+	(bfd_mach_o_lookup_section): Remove.
+	(bfd_mach_o_new_section_hook): New function.
+	* mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
+	instead of strcmp.
+	(bfd_mach_o_convert_section_name_to_bfd): Replaces section
+	parameter with segname and sectname parameters.  Adjust.
+	(bfd_mach_o_append_section_to_segment): New function.  Use a
+	linked list for Mach-O sections.
+	(bfd_mach_o_write_segment_32): Adjust.
+	(bfd_mach_o_write_segment_64): Ditto.
+	(bfd_mach_o_build_commands): Fix comment.  Adjust.
+	(bfd_mach_o_flatten_sections): Adjust.
+	(bfd_mach_o_print_section_map): Adjust.
+	(bfd_mach_o_set_section_flags_from_bfd): Ditto.
+	(bfd_mach_o_new_section_hook): New function.
+	(bfd_mach_o_init_section_from_mach_o): Ditto.
+	(bfd_mach_o_read_section_32): Remove section parameter.
+	Return a section instead.
+	(bfd_mach_o_read_section_64): Ditto.
+	(bfd_mach_o_read_section): Ditto.
+	(bfd_mach_o_make_bfd_section): Adjust.
+	(bfd_mach_o_read_segment): Adjust for new profile of
+	bfd_mach_o_read_section.
+	(bfd_mach_o_lookup_section): Remove.
+	* mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
+
+2011-08-08  Tristan Gingold  <[email protected]>
+
+	* mach-o.h (bfd_mach_o_version_min_command): New structure.
+	(bfd_mach_o_load_command): Add version_min.
+	(mach_o_data_struct): Fix comment.
+	* mach-o.c (bfd_mach_o_read_version_min): New function.
+	(bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
+	BFD_MACH_O_LC_VERSION_MIN_MACOSX and
+	BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
+	(bfd_mach_o_get_name_or_null): New function.
+	(bfd_mach_o_get_name): Use the above new one.
+	(bfd_mach_o_load_command_name): Add the above new commands.
+	(bfd_mach_o_bfd_print_private_bfd_data): Display numerically
+	unknown commands.  Handle BFD_MACH_O_LC_FUNCTION_STARTS,
+	BFD_MACH_O_LC_VERSION_MIN_MACOSX and
+	BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
+
+2011-08-08  Tristan Gingold  <[email protected]>
+
+	* mach-o.h: Move size macros to external.h
+	Move reloc macros to reloc.h and x86-64.h.
+	* mach-o-i386.c: Includes mach-o/reloc.h
+	* mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
+	* mach-o.c: Add includes.
+	(bfd_mach_o_write_header): Use structure from external.h to convert.
+	(bfd_mach_o_write_thread): Ditto.
+	(bfd_mach_o_write_relocs): Ditto.
+	(bfd_mach_o_write_section_32): Ditto.
+	(bfd_mach_o_write_section_64): Ditto.
+	(bfd_mach_o_write_segment_32): Ditto.
+	(bfd_mach_o_write_segment_64): Ditto.
+	(bfd_mach_o_write_symtab): Ditto.
+	(bfd_mach_o_write_contents): Ditto.
+	(bfd_mach_o_read_header): Ditto.
+	(bfd_mach_o_read_section_32): Ditto.
+	(bfd_mach_o_read_section_64): Ditto.
+	(bfd_mach_o_read_symtab_symbol): Ditto.
+	(bfd_mach_o_read_dylinker): Ditto.
+	(bfd_mach_o_read_dylib): Ditto.
+	(bfd_mach_o_read_dysymtab): Ditto.
+	(bfd_mach_o_read_symtab): Ditto.
+	(bfd_mach_o_read_linkedit): Ditto.
+	(bfd_mach_o_read_str): Ditto.
+	(bfd_mach_o_read_dyld_info): Ditto.
+	(bfd_mach_o_read_segment): Ditto.
+	(bfd_mach_o_read_command): Ditto.
+	(bfd_mach_o_archive_p): Ditto.
+	(bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
+	(bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
+	(bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
+	(bfd_mach_o_read_uuid): Remove useless cast.  Use a macro instead
+	of an hard-coded value.
+
+2011-08-08  Tristan Gingold  <[email protected]>
+
+	* mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
+	(bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
+	BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
+	BFD_RELOC_MACH_O_X86_64_GOT_LOAD.  Share common code.
+
+2011-08-08  Tristan Gingold  <[email protected]>
+
+	* mach-o.c (bfd_mach_o_normalize_section_name): New function.
+	(bfd_mach_o_convert_section_name_to_bfd): Use it.
+	(bfd_mach_o_get_section_type_from_name): New function.
+	(bfd_mach_o_get_section_attribute_from_name): Ditto.
+	* mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
+	Add comments.  Add prototypes for the above new functions.
+
+2011-08-05  Mark Kettenis  <[email protected]>
+
+	* netbsd-core.c (netbsd_core_vec): Init match_priority field.
+
+2011-08-05  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (maybe_strip_output): New function.
+	(ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
+
+2011-08-05  Alan Modra  <[email protected]>
+
+	PR ld/12762
+	* elflink.c (_bfd_elf_section_already_linked): Return matched
+	status.  Remove COFF comdat section handling.
+	* linker.c (_bfd_generic_section_already_linked): Return matched
+	status.  Don't set SEC_GROUP in l_flags for plugin entries.
+	(bfd_section_already_linked): Update prototype.
+	* targets.c (_section_already_linked): Likewise.
+	* elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
+	* libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
+	(_bfd_nolink_section_already_linked): Update.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2011-08-05  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c: Include dwarf2.h.
+	(struct ppc_elf_link_hash_table): Add glink_eh_frame.
+	(ppc_elf_create_glink): Create .eh_frame section.
+	(glink_eh_frame_cie): New array.
+	(ppc_elf_size_dynamic_sections): Size glink_eh_frame.
+	(ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
+
+2011-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
+	(_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
+
+2011-08-03  Tristan Gingold  <[email protected]>
+
+	* mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
+	(bfd_mach_o_read_symtab_symbols): Return if no symbols.
+
+2011-08-02  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.c (check_4byte_branch): Remove function.
+	(check_relocated_bzc): New function.
+	(_bfd_mips_elf_relax_section): Permit the relaxation of LUI
+	instructions that immediately follow a compact branch
+	instruction.
+
+2011-08-02  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
+	plt_static_chain.
+	(ppc_build_one_stub): Adjust get_relocs call to suit..
+	(ppc_size_one_stub): ..and reloc sizing.  Correct plt size corner case.
+
+2011-08-01  H.J. Lu  <[email protected]>
+
+	PR ld/13048
+	* archures.c (bfd_mach_i386_intel_syntax): New.
+	(bfd_mach_i386_i8086): Updated.
+	(bfd_mach_i386_i386): Likewise.
+	(bfd_mach_x86_64): Likewise.
+	(bfd_mach_x64_32): Likewise.
+	(bfd_mach_i386_i386_intel_syntax): Likewise.
+	(bfd_mach_x86_64_intel_syntax): Likewise.
+	(bfd_mach_x64_32_intel_syntax): Likewise.
+	(bfd_mach_l1om): Likewise.
+	(bfd_mach_l1om_intel_syntax): Likewise.
+	(bfd_mach_k1om): Likewise.
+	(bfd_mach_k1om_intel_syntax): Likewise.
+
+	* bfd-in2.h: Regenerated.
+
+	* cpu-i386.c (bfd_i386_compatible): Check mach instead of
+	bits_per_address.
+	(bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
+	(bfd_x64_32_arch): Likewise.
+
+	* elf64-x86-64.c: Include "libiberty.h".
+	(x86_64_elf_howto_table): Append x32 R_X86_64_32.
+	(elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
+	(elf_x86_64_reloc_type_lookup): Likewise.
+	(elf_x86_64_reloc_name_lookup): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
+
+2011-07-29  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.c (check_br32): Fix return type.
+
+2011-07-29  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.c (bz_insn_16): Correct opcode mask.
+
+2011-07-29  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.c: Adjust comments throughout.
+	(mips_elf_relax_delete_bytes): Reshape code.
+	(_bfd_mips_elf_relax_section): Remove check for
+	R_MICROMIPS_GPREL16 relocations.  Reshape code.
+
+2011-07-28  Roland McGrath  <[email protected]>
+
+	* elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
+	(elf_i386_nacl_plt0_entry): New variable.
+	(elf_i386_plt_entry): New variable.
+	(elf_i386_nacl_pic_plt0_entry): New variable.
+	(elf_i386_nacl_pic_plt_entry): New variable.
+	(elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
+	(elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
+	(elf_backend_plt_alignment): Likewise.
+
+	* config.bfd: Handle i[3-7]86-*-nacl*.
+	* elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
+	* targets.c: Support bfd_elf32_i386_nacl_vec.
+	* configure.in: Likewise.
+	* configure: Regenerated.
+
+	* elf32-i386.c (struct elf_i386_plt_layout): New type.
+	(GET_PLT_ENTRY_SIZE): New macro.
+	(elf_i386_plt): New variable.
+	(struct elf_i386_backend_data): New member `plt'.
+	(elf_i386_arch_bed): Add initializer for it.
+	(elf_i386_vxworks_arch_bed): Likewise.
+	(elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
+	(elf_i386_plt_sym_val): Likewise.
+	(elf_i386_relocate_section): Likewise.
+	(elf_i386_finish_dynamic_symbol): Likewise.
+	Also use other elf_i386_plt_layout members for PLT details.
+	(elf_i386_finish_dynamic_sections): Likewise.
+
+	* elf32-i386.c (struct elf_i386_backend_data): New type.
+	(get_elf_i386_backend_data): New macro.
+	(elf_i386_arch_bed): New variable.
+	(elf_backend_arch_data): New macro.
+	(struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
+	(elf_i386_link_hash_table_create): Don't initialize them.
+	(elf_i386_create_dynamic_sections): Find is_vxworks flags in
+	elf_i386_backend_data, not elf_i386_link_hash_table.
+	(elf_i386_adjust_dynamic_symbol): Likewise.
+	(elf_i386_allocate_dynrelocs): Likewise.
+	(elf_i386_readonly_dynrelocs): Likewise.
+	(elf_i386_size_dynamic_sections): Likewise.
+	(elf_i386_relocate_section): Likewise.
+	(elf_i386_finish_dynamic_symbol): Likewise.
+	(elf_i386_finish_dynamic_sections): Likewise.  Same for plt0_pad_byte.
+	(elf_i386_vxworks_link_hash_table_create): Function removed.
+	(elf_i386_vxworks_arch_bed): New variable.
+	(elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
+
+	* elf-bfd.h (elf_backend_data): New member arch_backend_data.
+	* elfxx-target.h (elf_backend_arch_data): New macro.
+	(elfNN_bed): Use it as initializer for the new member.
+
+2011-07-28  Mikulas Patocka  <[email protected]>
+
+	* elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
+	of range branches.
+
+2011-07-26  Jakub Jelinek  <[email protected]>
+
+	* dwarf2.c (dwarf_debug_sections): Add .debug_macro
+	and .zdebug_macro entry.
+	(dwarf_debug_section_enum): Add debug_macro.
+
+2011-07-26  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c: Include dwarf2.h.
+	(struct ppc_link_hash_table): Add glink_eh_frame.
+	(create_linkage_sections): Create .eh_frame section.
+	(ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
+	glink_eh_frame.
+	(glink_eh_frame_cie): New array.
+	(ppc64_elf_size_stubs): Size glink_eh_frame.
+	(ppc64_elf_build_stubs): Init glink_eh_frame contents.
+	(ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
+
+2011-07-25  Hans-Peter Nilsson  <[email protected]>
+
+	PR ld/12815
+	* elf64-mmix.c (struct _mmix_elf_section_data): New members
+	has_warned_bpo and has_warned_pushj.
+	(mmix_final_link_relocate): Remove PARAMS and PTR macros,
+	converting to ISO C.  Add new parameter error_message.  All
+	callers changed.
+	(mmix_elf_perform_relocation): Ditto.
+	<case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
+	Handle the case where mmix_elf_check_common_relocs has not been
+	called, missing preparations for relocs of the respective type.
+
+2011-07-24  Chao-ying Fu  <[email protected]>
+	    Ilie Garbacea  <[email protected]>
+	    Maciej W. Rozycki  <[email protected]>
+	    Joseph Myers  <[email protected]>
+	    Catherine Moore  <[email protected]>
+	    Richard Sandiford  <[email protected]>
+
+	* archures.c (bfd_mach_mips_micromips): New macro.
+	* cpu-mips.c (I_micromips): New enum value.
+	(arch_info_struct): Add bfd_mach_mips_micromips.
+	* elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
+	prototype.
+	(_bfd_mips_elf_relax_section): Likewise.
+	(_bfd_mips16_elf_reloc_unshuffle): Rename to...
+	(_bfd_mips_elf_reloc_unshuffle): ... this.  Handle microMIPS
+	ASE.
+	(_bfd_mips16_elf_reloc_shuffle): Rename to...
+	(_bfd_mips_elf_reloc_shuffle): ... this.  Handle microMIPS ASE.
+	(gprel16_reloc_p): Handle microMIPS ASE.
+	(literal_reloc_p): New function.
+	* elf32-mips.c (elf_micromips_howto_table_rel): New variable.
+	(_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
+	(mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
+	and _bfd_mips_elf_reloc_shuffle changes.
+	(mips_elf_gprel32_reloc): Update comment.
+	(micromips_reloc_map): New variable.
+	(bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
+	(mips_elf32_rtype_to_howto): Likewise.
+	(mips_info_to_howto_rel): Likewise.
+	(bfd_elf32_bfd_is_target_special_symbol): Define.
+	(bfd_elf32_bfd_relax_section): Likewise.
+	* elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
+	(micromips_elf64_howto_table_rela): Likewise.
+	(mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
+	and _bfd_mips_elf_reloc_shuffle changes.
+	(micromips_reloc_map): Likewise.
+	(bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
+	(bfd_elf64_bfd_reloc_name_lookup): Likewise.
+	(mips_elf64_rtype_to_howto): Likewise.
+	(bfd_elf64_bfd_is_target_special_symbol): Define.
+	* elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
+	(elf_micromips_howto_table_rela): Likewise.
+	(mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
+	and _bfd_mips_elf_reloc_shuffle changes.
+	(micromips_reloc_map): Likewise.
+	(bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
+	(bfd_elf32_bfd_reloc_name_lookup): Likewise.
+	(mips_elf_n32_rtype_to_howto): Likewise.
+	(bfd_elf32_bfd_is_target_special_symbol): Define.
+	* elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
+	(LA25_LUI_MICROMIPS_2): Likewise.
+	(LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
+	(LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
+	(TLS_RELOC_P): Handle microMIPS ASE.
+	(mips_elf_create_stub_symbol): Adjust value of stub symbol if
+	target is a microMIPS function.
+	(micromips_reloc_p): New function.
+	(micromips_reloc_shuffle_p): Likewise.
+	(got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
+	(got_disp_reloc_p, got_page_reloc_p): New functions.
+	(got_ofst_reloc_p): Likewise.
+	(got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
+	(call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
+	(hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
+	(micromips_branch_reloc_p): New function.
+	(tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
+	(tls_gottprel_reloc_p): Likewise.
+	(_bfd_mips16_elf_reloc_unshuffle): Rename to...
+	(_bfd_mips_elf_reloc_unshuffle): ... this.  Handle microMIPS
+	ASE.
+	(_bfd_mips16_elf_reloc_shuffle): Rename to...
+	(_bfd_mips_elf_reloc_shuffle): ... this.  Handle microMIPS ASE.
+	(_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
+	(mips_tls_got_index, mips_elf_got_page): Likewise.
+	(mips_elf_create_local_got_entry): Likewise.
+	(mips_elf_relocation_needs_la25_stub): Likewise.
+	(mips_elf_calculate_relocation): Likewise.
+	(mips_elf_perform_relocation): Likewise.
+	(_bfd_mips_elf_symbol_processing): Likewise.
+	(_bfd_mips_elf_add_symbol_hook): Likewise.
+	(_bfd_mips_elf_link_output_symbol_hook): Likewise.
+	(mips_elf_add_lo16_rel_addend): Likewise.
+	(_bfd_mips_elf_check_relocs): Likewise.
+	(mips_elf_adjust_addend): Likewise.
+	(_bfd_mips_elf_relocate_section): Likewise.
+	(mips_elf_create_la25_stub): Likewise.
+	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+	(_bfd_mips_elf_gc_sweep_hook): Likewise.
+	(_bfd_mips_elf_is_target_special_symbol): New function.
+	(mips_elf_relax_delete_bytes): Likewise.
+	(opcode_descriptor): New structure.
+	(RA): New macro.
+	(OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
+	(b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
+	(beq_insn_32): Likewise.
+	(b_insn_16, bz_insn_16): New variables.
+	(BZC32_REG_FIELD): New macro.
+	(bz_rs_insns_32, bz_rt_insns_32): New variables.
+	(bzc_insns_32, bz_insns_16):Likewise.
+	(BZ16_REG, BZ16_REG_FIELD): New macros.
+	(jal_insn_32_bd16, jal_insn_32_bd32): New variables.
+	(jal_x_insn_32_bd32): Likewise.
+	(j_insn_32, jalr_insn_32): Likewise.
+	(ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
+	(jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
+	(JR16_REG): New macro.
+	(ds_insns_16_bd16): New variable.
+	(lui_insn): Likewise.
+	(addiu_insn, addiupc_insn): Likewise.
+	(ADDIUPC_REG_FIELD): New macro.
+	(MOVE32_RD, MOVE32_RS): Likewise.
+	(MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
+	(move_insns_32, move_insns_16): New variables.
+	(nop_insn_32, nop_insn_16): Likewise.
+	(MATCH): New macro.
+	(find_match): New function.
+	(check_br16_dslot, check_br32_dslot): Likewise.
+	(check_br16, check_br32): Likewise.
+	(IS_BITSIZE): New macro.
+	(check_4byte_branch): New function.
+	(_bfd_mips_elf_relax_section): Likewise.
+	(_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
+	and microMIPS modules together.
+	(_bfd_mips_elf_print_private_bfd_data):	Handle microMIPS ASE.
+	* reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
+	(BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
+	(BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
+	(BFD_RELOC_MICROMIPS_GPREL16): Likewise.
+	(BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
+	(BFD_RELOC_MICROMIPS_HI16_S): Likewise.
+	(BFD_RELOC_MICROMIPS_LO16): Likewise.
+	(BFD_RELOC_MICROMIPS_LITERAL): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT16): Likewise.
+	(BFD_RELOC_MICROMIPS_CALL16): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
+	(BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
+	(BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
+	(BFD_RELOC_MICROMIPS_SUB): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
+	(BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
+	(BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
+	(BFD_RELOC_MICROMIPS_HIGHER): Likewise.
+	(BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
+	(BFD_RELOC_MICROMIPS_JALR): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
+	(BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
 	* bfd-in2.h: Regenerate.
 	* libbfd.h: Regenerate.
 
-2010-03-17  H.J. Lu  <[email protected]>
+2011-07-22  H.J. Lu  <[email protected]>
 
-	* reloc.c (BFD_RELOC_SPU_PIC18): Removed.
-	(BFD_RELOC_SPU_STUB): Likewise.
+	* Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
+	(ALL_MACHINES_CFILES): Add cpu-k1om.c.
+	* Makefile.in: Regenerated.
 
-2010-03-17  Jie Zhang  <[email protected]>
+	* archures.c (bfd_architecture): Add bfd_arch_k1om.
+	(bfd_k1om_arch): New.
+	(bfd_archures_list): Add &bfd_k1om_arch.
+	* bfd-in2.h: Regenerated.
 
-	* elf.c (assign_file_positions_for_load_sections): Avoid
-	overflow.
+	* config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
+	bfd_elf64_x86_64_vec is supported.  Add bfd_elf64_k1om_freebsd_vec
+	if bfd_elf64_x86_64_freebsd_vec is supported.
+	(targ_selvecs): Likewise.
 
-2010-03-17  Alan Modra  <[email protected]>
+	* configure.in: Support bfd_elf64_k1om_vec and
+	bfd_elf64_k1om_freebsd_vec.
+	* configure: Regenerated.
 
-	PR binutils/11382
-	* plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
-	proper type.
+	* cpu-k1om.c: New.
 
-2010-03-17  Alan Modra  <[email protected]>
+	* elf64-x86-64.c (elf64_k1om_elf_object_p): New.
+	(bfd_elf64_k1om_vec): Likewise.
+	(bfd_elf64_k1om_freebsd_vec): Likewise.
 
-	* elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
+	* targets.c (bfd_elf64_k1om_vec): New.
+	(bfd_elf64_k1om_freebsd_vec): Likewise.
+	(_bfd_target_vector): Add bfd_elf64_k1om_vec and
+	bfd_elf64_k1om_freebsd_vec.
 
-2010-03-16  Alan Modra  <[email protected]>
+2011-07-20  Jan Kratochvil  <[email protected]>
 
-	* elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
-	(ppc64_elf_edit_toc): Set it here.
-	(ha_reloc_match): New function.
-	(ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
+	Fix false coff-go32-exe matches.
+	* coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
+	COFF_CHECK_FORMAT.
+	* coff-stgo32.c (go32_check_format): New forward declaration.
+	(COFF_CHECK_FORMAT): New defintion.
+	(go32_check_format): New function.
 
-2010-03-15  Alan Modra  <[email protected]>
+2011-07-15  Alan Modra  <[email protected]>
 
-	* elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
-	* elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
-
-2010-03-14  Alan Modra  <[email protected]>
-
-	PR ld/11378
-	* elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
-	* elf64-ppc.c (call_check_done): Define.
-	(ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
-	(ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
-	(ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
-	(toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
-	Simplify return logic.  Iterate over all .init and .fini fragments
-	by recursion.  Set makes_toc_func_call here..
-	(ppc64_elf_next_input_section): ..rather than here.
-	(check_pasted_section, ppc64_elf_check_init_fini): New functions.
-
-2010-03-13  Alan Modra  <[email protected]>
-
-	PR ld/11375
-	* elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
-	function descriptor symbol if there is one, not just for plt stubs.
-	(ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
-
-2010-03-05  Rainer Orth  <[email protected]>
-
-	* elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
-	version twice.
-	Skip it when constructing def.vd_next.
-
-	* elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
-	bfd_elf32_i386_sol2_vec.
-	(TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
-	(elf32_bed): Redefine to elf32_i386_sol2_bed.
-	(elf_backend_want_plt_sym): Redefine to 1.
-
-	* elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
-	bfd_elf64_x86_64_sol2_vec.
-	(TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
-	(elf64_bed): Redefine to elf64_x86_64_sol2_bed.
-	(elf_backend_want_plt_sym): Redefine to 1.
-
-	* config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
-	bfd_elf32_i386_sol2_vec.
-	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
-	targ64_selvecs.
-	(x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
-	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
-	targ_selvecs.
-
-	* configure.in: Handle bfd_elf32_i386_sol2_vec,
-	bfd_elf64_x86_64_sol2_vec.
+	* configure.in: Bump version.
 	* configure: Regenerate.
 
-	* targets.c (bfd_elf32_i386_sol2_vec): Declare.
-	(bfd_elf64_x86_64_sol2_vec): Declare.
-	(_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
-	bfd_elf64_x86_64_sol2_vec.
+2011-07-14  Alan Modra  <[email protected]>
 
-2010-03-04  Daniel Jacobowitz  <[email protected]>
+	* linker.c (_bfd_generic_section_already_linked): Set l_flags.
+	* elf-bfd.h (struct already_linked): Forward declare.
 
-	* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
-	sections.
+2011-07-14  Alan Modra  <[email protected]>
 
-2010-03-04  Alan Modra  <[email protected]>
+	* elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
+	(_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
 
-	PR 11302
-	* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
-	(read_attribute_value, decode_line_info): Likewise.
-	(add_line_info, read_rangelist): Return FALSE on alloc failures.
-	(arange_add, sort_line_sequences): Likewise.
-	(find_abstract_instance_name): Handle failures from called funcs.
-	(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
-	(find_line): Realloc to a temp, and handle alloc fail.
+2011-07-14  Alan Modra  <[email protected]>
 
-2010-03-03  Daniel Jacobowitz  <[email protected]>
+	* elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
+	(build_plt_stub): Add plt_static_chain param, don't load r11 if false.
+	(build_tls_get_addr_stub): Likewise.
+	(ppc_build_one_stub): Update calls to above.
+	(ppc_size_one_stub): Adjust stub size.
+	(ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
+	* elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
 
-	* elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
-	a mapping symbol to an empty section.
+2011-07-12  Nick Clifton  <[email protected]>
 
-2010-03-02  Matthew Gretton-Dann  <[email protected]>
+	* elf32-arm.c (elf32_arm_section_flags): Delete.
+	(elf_backend_section_flags): Remove.
 
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
-	return value from the call to _bfd_elf_merge_object_attributes.
+2011-07-11  H.J. Lu  <[email protected]>
 
-2010-03-02  Christophe Lyon  <[email protected]>
-	Alan Modra  <[email protected]>
+	PR ld/12982
+	* elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
+	when setting stack_flags.
 
-	* elf32-arm.c (a8_erratum_fix): Add st_type field to record the
-	destination mode of the a8 stub.
-	(elf32_arm_link_hash_table): Add top_id field.
-	(elf32_arm_link_hash_table_create): Initialize top_id.
-	(arm_type_of_stub): Update prototype, st_type can now be updated
-	by this function. Actual destination address in case of PLT is
-	computed here, to help factorizing code.
-	(elf32_arm_stub_name): Update prototype, use stub_type additional
-	parameter to build stub name.
-	(elf32_arm_get_stub_entry): Update prototype, use stub_type
-	additional parameter to build stub entry.
-	(arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
-	put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
-	Call elf32_arm_final_link_relocate to process all in-stub
-	relocations.
-	(elf32_arm_setup_section_lists): Update top_id.
-	(cortex_a8_erratum_scan): Record stub destination mode.
-	(elf32_arm_size_stubs): Update call to arm_type_of_stub according
-	to new prototype.
-	(elf32_arm_final_link_relocate): Enable processing of in-stub
-	REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
-	needed, enabling code factorization.
-	(elf32_arm_final_link): Process stub sections.
-	(elf32_arm_output_map_sym): Add entry to code/data map.
+2011-07-11  Catherine Moore  <[email protected]>
 
-2010-03-01  David S. Miller  <[email protected]>
+	* aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
+	* aout-target.h (MY_bfd_lookup_section_flags): New definition.
+	* aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
+	* bfd-in2.h: Regenerated.
+	* bfd.c (bfd_lookup_section_flags): New definition.
+	* binary.c (binary_bfd_lookup_section_flags): New definition.
+	* bout.c (b_out_bfd_lookup_section_flags): New definition.
+	* coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
+	* coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
+	* coff-rs6000.c (rs6000coff_vec): Include
+	bfd_generic_lookup_section_flags.
+	(pmac_xcoff_vec): Likewise.
+	* coffcode.h (coff_bfd_lookup_section_flags): New definition.
+	* coff64-rs6000.c (rs6000coff64_vec): Include
+	bfd_generic_lookup_section_flags.
+	(aix5coff64_vec): Likewise.
+	* ecoff.c (bfd_debug_section): Initialize flag_info field.
+	* elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
+	(bfd_elf_lookup_section_flags): Declare.
+	* elflink.c (bfd_elf_lookup_section_flags): New function.
+	* elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
+	(elf_backend_lookup_section_flags_hook): Define.
+	(elf_backend_data): Add elf_backend_lookup_section_flags_hook.
+	* i386msdos.c (msdos_bfd_lookup_section_flags): New define.
+	* i386os9k.c (os9k_bfd_lookup_section_flags): New define.
+	* ieee.c (ieee_bfd_lookup_section_flags): New define.
+	* ihex.c (ihex_bfd_lookup_section_flags): New define.
+	* libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
+	(bfd_generic_lookup_section_flags): Declare.
+	* libbfd.h: Regenerated.
+	* mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
+	* mmo.c (mmo_bfd_lookup_section_flags): New definition.
+	* nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
+	* oasys.c (oasys_bfd_lookup_section_flags): New definition.
+	* pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
+	* plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
+	* ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
+	* reloc.c (bfd_generic_lookup_section_flags): New function.
+	* som.c (som_bfd_lookup_section_flags): New definition.
+	* srec.c (srec_bfd_lookup_section_flags): New definition.
+	* targets.c (flag_info): Declare.
+	(NAME##_bfd_lookup_section_flags): Add to LINK jump table.
+	(_bfd_lookup_section_flags): New.
+	* tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
+	* versados.c (versados_bfd_lookup_section_flags): New definition.
+	* vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
+	* xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
 
-	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
-	h->def_regular, set h->ref_regular.
-	(allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
-	and dynamic relocations if h->ref_regular.
+2011-07-11  H.J. Lu  <[email protected]>
 
-	* elfxx-sparc.c (struct elf_reloc_map): Delete.
-	(sparc_reloc_map): Delete.
-	(_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
-	relocation type in switch statements.
+	PR ld/12978
+	* elfnn-ia64.c (count_dyn_reloc): Fix a typo.
 
-2010-02-25  Alan Modra  <[email protected]>
+2011-07-09  Alan Modra  <[email protected]>
 
-	PR ld/11304
-	* elf.c (_bfd_elf_init_private_section_data): Rename need_group
-	to final_link and invert.  For final link allow some flags to
-	differ.  Don't specially allow flags to be all zero.
+	PR ld/12942
+	* elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
+	rather than kept_section to determine whether a symbol is from
+	a discarded section.
+	* cofflink.c (coff_link_add_symbols): Make symbols from discarded
+	sections appear undefined.
 
-2010-02-24  Alan Modra  <[email protected]>
+2011-07-09  H.J. Lu  <[email protected]>
 
-	PR binutils/10858
-	* elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
-	SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
+	PR ld/12942
+	* elf-bfd.h (_bfd_elf_section_already_linked): Replace
+	"asection *" with "struct already_linked *".
+	* libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
+	(_bfd_generic_section_already_linked): Likewise.
+	(bfd_section_already_linked_table_insert): Likewise.
+	(struct already_linked): New.
+	(struct bfd_section_already_linked): Use it.
+	* elflink.c (_bfd_elf_section_already_linked): Replace.
+	"asection *" with "struct already_linked *".  Replace the plugin
+	dummy with the LTO output.
+	* linker.c (_bfd_generic_section_already_linked): Likewise.
+	* targets.c (struct already_linked): Add forward declaration.
+	(bfd_target): Replace "struct bfd_section *" with
+	"struct already_linked *" in _section_already_linked.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2011-07-06  Tristan Gingold  <[email protected]>
+
+	* mach-o.h: Move loader related definitions to
+	include/mach-o/loader.h.  Include it.
+
+2011-07-05  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_backend_post_process_headers): Always
+	define to _bfd_elf_set_osabi.
+
+2011-07-03  Samuel Thibault  <[email protected]>
+	    Thomas Schwinge  <[email protected]>
+
+	PR binutils/12913
+	* elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
+	ELFOSABI_LINUX alias.
+	* elf32-hppa.c: Likewise.
+	* elf32-i370.c: Likewise.
+	* elf64-hppa.c: Likewise.
+
+2011-07-01  Ian Lance Taylor  <[email protected]>
+
+	* elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
+	DW_OP_lit3 to DW_OP_lit2.
+
+2011-07-01  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
+	dyn relocs when called to copy flags for a weak sym.
+	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+	(ppc64_elf_merge_private_bfd_data): Delete.
+	(bfd_elf64_bfd_merge_private_bfd_data): Define as
+	_bfd_generic_verify_endian_match.
+
+2011-06-30  Bernd Schmidt  <[email protected]>
+
+	* bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
+	link_info is NULL.
+
+2011-06-28  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
+	unsigned int.
+	(_bfd_vms_write_etir): Write linkage index from reloc.
+
+2011-06-28  Fawzi Mohamed <[email protected]>
+
+	* mach-o.c (bfd_mach_o_read_command): Also ignore
+	BFD_MACH_O_LC_ROUTINES_64.
+
+2011-06-27  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
+	section target index.
+
+2011-06-27  Nick Clifton  <[email protected]>
+
+	* cisco-core.c (cisco_core_little_vec): Add initialization of
+	match_priority field.
+
+2011-06-27  Tristan Gingold  <[email protected]>
+
+	* cache.c: Include bfd_stdint.h.
+	(cache_bmmap): Change profile.  Return region start and size.
+	* bfdio.c (struct bfd_iovec): Change bmmap profile.
+	(bfd_mmap): Change profile and adjust.   Update comment.
+	(memory_bmmap): Change profile.
+	* opncls.c (opncls_bmmap): Change profile.
+	* vms-lib.c (vms_lib_bmmap): Likewise.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2011-06-27  Tristan Gingold  <[email protected]>
+
+	* vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
+	Add comment.
+
+2011-06-25  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_backend_post_process_headers): Don't
+	define for FreeBSD/x86-64 nor FreeBSD/L1OM.  Define for L1OM.
+
+2011-06-25  Jan Kratochvil  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
+	PLT_EH_FRAME.
+	* elf32-i386.c (elf_i386_link_hash_table): Likewise.
+
+2011-06-24  Richard Henderson  <[email protected]>
+
+	PR ld/12928
+	* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
+	tlsgd insn before swapping adjacent insns.
+
+2011-06-24  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
+	absolute section.
+
+2011-06-24  Alan Modra  <[email protected]>
+
+	PR ld/12921
+	* elf.c (assign_file_positions_for_load_sections): Don't align
+	sh_offset for all SHT_NOBITS sections here, just .tbss sections
+	that don't get a PT_LOAD.
+
+2011-06-22  Kaz Kojima  <[email protected]>
+
+	* elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
+	(sh_elf_check_relocs): Likewise.
+
+2011-06-22  Richard Henderson  <[email protected]>
+
+	* elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
+	TPREL in a PIE image.
+	(alpha_dynamic_entries_for_reloc): Likewise.
+	(elf64_alpha_relocate_section): Allow TPREL in PIE images.
+	(elf64_alpha_relax_got_load): Likewise.
+
+2011-06-22  Ramana Radhakrishnan  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
+	for PIE.
+
+2011-06-22  Alan Modra  <[email protected]>
+
+	* elflink.c (_bfd_elf_merge_symbol): Allow type changes for
+	plugin symbols.  Fix segfault on linker scrip defined syms.
+
+2011-06-20  Jakub Jelinek  <[email protected]>
+
+	PR ld/12570
+	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
+	at all for linker created .eh_frame sections.
+	(_bfd_elf_discard_section_eh_frame): Handle linker created
+	.eh_frame sections with no relocations.
+	* elf64-x86-64.c: Include dwarf2.h.
+	(elf_x86_64_eh_frame_plt): New variable.
+	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
+	PLT_FDE_LEN_OFFSET): Define.
+	(struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
+	(elf_x86_64_create_dynamic_sections): Create and fill in
+	.eh_frame section for .plt section.
+	(elf_x86_64_size_dynamic_sections): Write .plt section size
+	into .eh_frame FDE covering .plt section.
+	(elf_x86_64_finish_dynamic_sections): Write .plt section
+	start into .eh_frame FDE covering .plt section.  Call
+	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
+	(elf_backend_plt_alignment): Define to 4.
+	* elf32-i386.c: Include dwarf2.h.
+	(elf_i386_eh_frame_plt): New variable.
+	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
+	PLT_FDE_LEN_OFFSET): Define.
+	(struct elf_i386_link_hash_table): Add plt_eh_frame field.
+	(elf_i386_create_dynamic_sections): Create and fill in
+	.eh_frame section for .plt section.
+	(elf_i386_size_dynamic_sections): Write .plt section size
+	into .eh_frame FDE covering .plt section.
+	(elf_i386_finish_dynamic_sections): Write .plt section
+	start into .eh_frame FDE covering .plt section.  Call
+	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
+	(elf_backend_plt_alignment): Define to 4.
+
+2011-06-19  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_backend_post_process_headers): Defined
+	for x32.
+
+2011-06-16  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
+	CORE_HEADER is defined.
+	(elf_x86_64_write_core_note): New.
+	(elf_backend_write_core_note): Likewise.
+
+	* hosts/x86-64linux.h (uint64_t): New.
+	(user_regsx32_struct): Likewise.
+	(elf_gregx32_t): Likewise.
+	(ELF_NGREGX32): Likewise.
+	(elf_gregsetx32_t): Likewise.
+	(elf_prstatusx32): Likewise.
+	(prstatusx32_t): Likewise.
+	(user_fpregs32_struct): Removed.
+	(user_fpxregs32_struct): Likewise.
+	(user32): Likewise.
+	(elf_fpregset32_t): Likewise.
+	(elf_fpxregset32_t): Likewise.
+	(prgregset32_t): Likewise.
+	(prfpregset32_t): Likewise.
+
+2011-06-16  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
+	(elf_x86_64_grok_psinfo): Likewise.
+
+2011-06-16  Nick Clifton  <[email protected]>
+
+	* elf.c (elf_find_function): Fail if not provided with a symbol
 	table.
 
-2010-02-23  Andrew Zabolotny  <[email protected]>
+2011-06-15  Ulrich Weigand  <[email protected]>
 
-	PR binutils/11297
-	* elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
-	(avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
+	* elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
+	* elf.c (elfcore_grok_arm_vfp): New function.
+	(elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
+	(elfcore_write_arm_vfp): New function.
+	(elfcore_write_register_note): Call it to handle .reg-arm-vfp.
 
-2010-02-22  Alan Modra  <[email protected]>
+2011-06-14  Richard Henderson  <[email protected]>
 
-	* reloc.c (bfd_check_overflow): When forming addrmask, shift
-	fieldmask left by rightshift.
-	(_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
-	overflow checks.
+	* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
+	elf64_alpha_merge_ind_symbols; adjust for the generic interface.
+	(elf64_alpha_always_size_sections): Don't call
+	elf64_alpha_merge_ind_symbols.
+	(elf_backend_copy_indirect_symbol): New.
 
-2010-02-20  H.J. Lu  <[email protected]>
+2011-06-14  Alan Modra  <[email protected]>
 
-	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
-	STT_GNU_IFUNC on large common symbol.
+	PR ld/12887
+	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
+	before doing anything.
+	(_bfd_elf_discard_section_eh_frame): Likewise.
 
-2010-02-18  H.J. Lu  <[email protected]>
+2011-06-14  Alan Modra  <[email protected]>
 
-	* elf32-i386.c (elf_i386_add_symbol_hook): Don't set
-	has_ifunc_symbols if the symbol comes from a shared library.
+	* Makefile.am: Formatting.
+	* Makefile.in: Regenerate.
+	* configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
+	* po/SRC-POTFILES.in: Regnerate.
+
+2011-06-14  Alan Modra  <[email protected]>
+
+	* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
+	(allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
+	Don't handle warning symbols here.
+	* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
+	(allocate_dynrelocs, readonly_dynrelocs): As above.
+
+2011-06-14  Alan Modra  <[email protected]>
+
+	PR ld/12851
+	* elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
+	(elf_gc_sweep): Don't treat debug and sections like .comment
+	specially here.
+	(bfd_elf_gc_sections): Treat note sections as gc roots only when
+	not part of a group.  Always call gc_mark_extra_sections.
+	* elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
+	* elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
+	_bfd_elf_gc_mark_extra_sections.
+	* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
+	_bfd_elf_gc_mark_extra_sections.
+	* elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
+
+2011-06-13  Nick Clifton  <[email protected]>
+
+	* elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
+	variable 'local_got_offsets'.
+	* elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
+	(tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
+
+2011-06-13  Walter Lee  <[email protected]>
+
+	* Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
+	(ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
+	(BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
+	and elfxx-tilegx.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
+	elfxx-tilegx.c.
+	(BFD64_BACKENDS): Add elf64-tilegx.lo.
+	(BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
+	* Makefile.in: Regenerate.
+	* arctures.c (bfd_architecture): Define bfd_arch_tilepro,
+	bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
+	(bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
+	(bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
+	bfd-in2.h: Regenerate.
+	* config.bfd: Handle tilegx-*-* and tilepro-*-*.
+	* configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
+	and bfd_elf64_tilegx_vec.
+	* configure: Regenerate.
+	* elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
+	TILEPRO_ELF_DATA.
+	* libbfd.h: Regenerate.
+	* reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
+	RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
+	IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
+	IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
+	IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
+	IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
+	IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
+	IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
+	IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
+	IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
+	MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
+	IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
+	IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
+	IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
+	IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
+	IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
+	IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
+	Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
+	HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
+	JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
+	DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
+	SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
+	IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
+	IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
+	IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
+	IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
+	IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
+	IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
+	IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
+	IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
+	IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
+	IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
+	IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
+	IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
+	IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
+	IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
+	IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
+	IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
+	IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
+	IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
+	IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
+	IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
+	IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
+	IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
+	IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
+	IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
+	IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
+	IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
+	IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
+	TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
+	* targets.c (bfd_elf32_tilegx_vec): Declare.
+	(bfd_elf32_tilepro_vec): Declare.
+	(bfd_elf64_tilegx_vec): Declare.
+	(bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
+	and bfd_elf64_tilegx_vec.
+	* cpu-tilegx.c: New file.
+	* cpu-tilepro.c: New file.
+	* elf32-tilepro.h: New file.
+	* elf32-tilepro.c: New file.
+	* elf32-tilegx.c: New file.
+	* elf32-tilegx.h: New file.
+	* elf64-tilegx.c: New file.
+	* elf64-tilegx.h: New file.
+	* elfxx-tilegx.c: New file.
+	* elfxx-tilegx.h: New file.
+
+2011-06-13  Alan Modra  <[email protected]>
+
+	* linker.c (bfd_link_hash_traverse): Follow warning symbol link.
+	(_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
+	warning symbols here.
+	* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
+	* elf32-arm.c (allocate_dynrelocs_for_symbol,
+	elf32_arm_readonly_dynrelocs): Likewise.
+	* elf32-bfin.c (bfin_discard_copies): Likewise.
+	* elf32-cris.c (elf_cris_adjust_gotplt_to_got,
+	elf_cris_discard_excess_dso_dynamics,
+	elf_cris_discard_excess_program_dynamics): Likewise.
+	* elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
+	clobber_millicode_symbols, readonly_dynrelocs): Likewise.
+	* elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
+	* elf32-i386.c (elf_i386_allocate_dynrelocs,
+	elf_i386_readonly_dynrelocs): Likewise.
+	* elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
+	* elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* elf32-m68k.c (elf_m68k_discard_copies): Likewise.
+	* elf32-microblaze.c (allocate_dynrelocs): Likewise.
+	* elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
+	* elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* elf32-score.c (score_elf_sort_hash_table_f): Likewise.
+	* elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
+	* elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
+	elf32_tic6x_readonly_dynrelocs): Likewise.
+	* elf32-vax.c (elf_vax_discard_copies): Likewise.
+	* elf32-xstormy16.c (xstormy16_relax_plt_check,
+	xstormy16_relax_plt_realloc): Likewise.
+	* elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
+	* elf64-alpha.c (elf64_alpha_output_extsym,
+	elf64_alpha_calc_got_offsets_for_symbol,
+	elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
+	* elf64-hppa.c (elf64_hppa_mark_exported_functions,
+	allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
+	elf_hppa_unmark_useless_dynamic_symbols,
+	elf_hppa_remark_useless_dynamic_symbols): Likewise.
+	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
+	adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
+	readonly_dynrelocs, merge_global_got, reallocate_got,
+	undo_symbol_twiddle): Likewise.
+	* elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
+	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
+	elf_x86_64_readonly_dynrelocs): Likewise.
+	* elflink.c (elf_link_renumber_hash_table_dynsyms,
+	elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
+	_bfd_elf_link_find_version_dependencies,
+	_bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
+	_bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
+	elf_collect_hash_codes, elf_collect_gnu_hash_codes,
+	elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
+	elf_gc_propagate_vtable_entries_used,
+	elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
+	elf_gc_allocate_got_offsets): Likewise.
+	* elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
+	elfNN_ia64_global_dyn_sym_thunk): Likewise.
+	* elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
+	mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
+	* elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
+	* i386linux.c (linux_tally_symbols): Likewise.
+	* m68klinux.c (linux_tally_symbols): Likewise.
+	* sparclinux.c (linux_tally_symbols): Likewise.
+	* sunos.c (sunos_scan_dynamic_symbol): Likewise.
+	* xcofflink.c (xcoff_post_gc_symbol): Likewise.
+
+	* elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
+	function.  Update all callers.
+	* aoutx.h (aout_link_write_other_symbol): Likewise.
+	* pdp11.c (aout_link_write_other_symbol): Likewise.
+	* cofflink.c (_bfd_coff_write_global_sym): Likewise.
+	* ecoff.c (ecoff_link_write_external): Likewise.
+	* xcofflink.c (xcoff_write_global_symbol): Likewise.
+	* vms-alpha.c (alpha_vms_link_output_symbol): Likewise.  Handle
+	warning symbols.
+	* ecoff.c (ecoff_link_hash_traverse): Delete.
+	* coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
+	_bfd_coff_write_global_sym.
+	* libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
+	* libcoff.h: Regenerate.
+
+2011-06-10  Nick Clifton  <[email protected]>
+
+	* elflink.c (_bfd_elf_link_create_dynamic_sections): If the
+	backend does not provide a function for creating dynamic sections
+	then fail.
+	(bfd_elf_final_link): Issue a warning message if a dynamic section
+	has the SHT_NOTE type.
+	(bfd_elf_final_link): Do not look for dynamic strings in a section
+	that does not have the SHT_STRTAB type or the name .dynstr.
+	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
+	section is not in the output binary.
+	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
+
+2011-06-09  Tristan Gingold  <[email protected]>
+
+	* elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
+	(elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
+	spaces.
+
+2011-06-09  Tristan Gingold  <[email protected]>
+
+	* bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
+
+2011-06-09  Nick Clifton  <[email protected]>
+
+	PR ld/12845
+	* elf.c (_bfd_elf_init_private_section_data): Add an assertion
+	that the output section has an allocated bfd_elf_section_data
+	structure.
+	* elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
+	symbols in sections that have been removed by garbage collection.
+
+2011-06-08  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
+	relocations in SEC_DEBUGGING sections when building shared
+	libraries.
+
+2011-06-08  H.J. Lu  <[email protected]>
+
+	PR ld/12851
+	* elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
+	(bfd_elf_gc_sections): Also check SHT_NOTE sections.
+
+2011-06-08  Tristan Gingold  <[email protected]>
+
+	* makefile.vms (OBJS): Add elfxx-ia64.obj
+	Remove vax case.
+
+2011-06-08  Alan Modra  <[email protected]>
+
+	* aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
+	* sco5-core.c: Init match_priority field.
+
+2011-06-08  Alan Modra  <[email protected]>
+
+	* elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
+	indirect links here.
+
+2011-06-07  Joel Brobecker  <[email protected]>
+
+	* irix-core.c (irix_core_vec): Add match_priority field.
+
+2011-06-06  Alan Modra  <[email protected]>
+
+	* targets.c (bfd_target): Make ar_max_namelen an unsigned char.
+	Add match_priority.
+	* configure.in: Bump bfd version.
+	* elfcode.h (elf_object_p): Delete hacks preventing match of
+	EM_NONE and ELFOSABI_NONE targets when a better match exists.
+	* elfxx-target.h (elf_match_priority): Define and use.
+	* format.c (bfd_check_format_matches): Use target match_priority
+	to choose best of multiple matching targets.  In cases with multiple
+	matches rerun _bfd_check_format if we don't choose the last match.
+	* aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
+	* binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
+	* coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
+	* coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
+	* coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
+	* i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
+	* mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
+	* pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
+	* tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
+	* vms-lib.c, * xsym.c: Init match_priority field.
+	* configure: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2011-06-04  H.J. Lu  <[email protected]>
+
+	PR ld/12842
+	* elfcode.h (elf_object_p): Revert the last change.
+
+2011-06-04  Alan Modra  <[email protected]>
+
+	* archures.c (bfd_arch_get_compatible): If one arch is unknown,
+	return the other arch.
+	* elfcode.h (elf_object_p): Allow explicit match to generic ELF
+	target.
+
+2011-06-03  Bertram Felgenhauer  <[email protected]>
+
+	PR ld/12682
+	* hash.c (higher_primer_number): Add more, small, prime numbers.
+	(bfd_hash_set_default_size): Likewise.
+
+2011-06-02  Nick Clifton  <[email protected]>
+
+	* coff-mcore.c: Fix spelling typo.
+	* coff-stgo32.c: Likewise.
+	* elf32-arm.c: Likewise.
+	* elf32-avr.c: Likewise.
+	* elf-m68hc1x.c: Likewise.
+	* elf32-mcore.c: Likewise.
+	* elf32-mep.c: Likewise.
+	* elf32-mt.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-xtensa.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elfxx-mips.c: Likewise.
+	* netbsd.h: Likewise.
+	* nlmcode.h: Likewise.
+	* vms-alpha.c: Likewise.
+	* po/bfd.pot: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2011-06-01  DJ Delorie  <[email protected]>
+
+	* config.bfd: Add bfd_elf32_rx_be_ns_vec.
+	* target.c: Likewise.
+	* configure.in: Likewise.
+	* configure.in: Regenerate.
+	* elf32-rx.c: Add elf32-rx-be-ns target.
+	(rx_elf_object_p): Never allow the be-ns target by default,
+	only allow it if the user requests it.
+
+2011-06-01  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
+	relocation in readonly section in a shared object.
+	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+
+2011-05-31  Nick Clifton  <[email protected]>
+
+	* archive.c (adjust_relative_path): Fix comment to prevent it
+	corrupting the auto-generated bfd.h.
+
+2011-05-31  Paul Brook  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
+	for known functions.
+	(elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
+	symbols.
+
+2011-05-31  Paul Brook  <[email protected]>
+
+	* elf32-arm.c (arm_stub_is_thumb): Add
+	arm_stub_long_branch_v4t_thumb_tls_pic.
+	(elf32_arm_final_link_relocate): TLS stubs are always ARM.
+	Handle Thumb stubs.
+
+2011-05-27  Nick Clifton  <[email protected]>
+
+	PR binutils/12710
+	* archive.c (_bfd_get_elt_at_filepos): Set correct error value if
+	unable to read a file pointed to by an entry in a thin archive.
+	(adjust_relative_path): Use lrealpath to canonicalize paths.
+	Handle the case where the reference path is above the current
+	path in the directory tree.
+
+2011-05-26  H.J. Lu  <[email protected]>
+
+	PR ld/12809
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Handle
+	R_X86_64_TPOFF64 in executable.
+
+2011-05-26  Alan Modra  <[email protected]>
+
+	* elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
+	* elflink.c (_bfd_elf_symbol_refs_local_p): Expand
+	local_protected comment.
+
+2011-05-25  Tristan Gingold  <[email protected]>
+
+	* configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
+	(bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
+	(bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
+	* Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
+	(BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
+	(elf32-ia64.c): Created from elfnn-ia64.c
+	(elf64-ia64.c): Likewise.
+	* elfxx-ia64.h: New file.
+	* elfxx-ia64.c: Split with elfnn-ia64.c.  Keep only the following
+	functions.Includes elfxx-ia64.h.
+	(elfNN_ia64_reloc): Renames to ia64_elf_reloc.  Adjust error message.
+	(IA64_HOWTO): Adjust.
+	(lookup_howto): Renames to ia64_elf_lookup_howto.  Make it public.
+	(elfNN_ia64_reloc_type_lookup): Renames to
+	ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
+	(elfNN_ia64_reloc_name_lookup): Renames to
+	ia64_elf_reloc_name_lookup. Make it public.
+	(elfNN_ia64_relax_br): Renames to ia64_elf_relax_br.  Make it public.
+	(elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
+	public.
+	(elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
+	Move it and make it public.  Move prototype to elfxx-ia64.h
+	(elfNN_ia64_install_value): Renames to ia64_elf_install_value.
+	Move prototype to elfxx-ia64.h
+	* elfnn-ia64.c: New file, split from elfxx-ia64.c.
+	(elfNN_ia64_info_to_howto): Adjust calls.
+	(elfNN_ia64_relax_section): Adjust calls.
+	(count_dyn_reloc): Fix typo.
+	(elfNN_ia64_relocate_section): Adjust calls.
+	(elfNN_ia64_finish_dynamic_symbol): Likewise.
+	(bfd_elfNN_bfd_reloc_type_lookup)
+	(bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
+	* configure: Regenerate.
+	* Makefile.in: Regenerate.
+
+2011-05-23  DJ Delorie  <[email protected]>
+
+	* elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
+	the vma/lma swapping done in elf32_rx_modify_program_headers.
+
+2011-05-23  Nick Clifton  <[email protected]>
+
+	* elf-m10300.c (mn10300_elf_mkobject): New function.
+	(bfd_elf32_mkobject): Define.
+
+2011-05-23  Alan Modra  <[email protected]>
+
+	* elf-bfd.h: Comment typo fix.
+	* elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete.  Replace with
+	struct elf_dyn_relocs throughout.
+	* elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
+
+2011-05-23  Alan Modra  <[email protected]>
+
+	* elf32-frv.c: Use info->callbacks->einfo throughout file in linker
+	functions rather than warning callback or _bfd_error_handler.
+	* elf32-ppc.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
+	arg error.
+	* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
+
+2011-05-23  Alan Modra  <[email protected]>
+
+	PR 12763
+	* elf.c (assign_file_positions_for_load_sections): Set sh_offset for
+	.tbss, and page align same for all SHT_NOBITS sections.
+
+2011-05-21  Alan Modra  <[email protected]>
+
+	PR 12763
+	* elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
+	from PT_TLS header.
+	(_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
+	segment if just for .tbss.
+	(assign_file_positions_for_load_sections): Don't report "can't
+	allocate in segment" errors for .tbss.
+	(assign_file_positions_for_non_load_sections): Don't set p_filesz
+	from SHT_NOBITS section filepos.
+
+2011-05-20  Bernd Schmidt  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
+	R_C6000_PCR_H16 and R_C6000_PCR_L16.
+	(elf32_tic6x_relocate_section): Handle them.
+
+2011-05-18  Nick Clifton  <[email protected]>
+
+	PR ld/12761
+	* elflink.c (elf_link_add_object_symbols): Process .gnu.warning
+	sections when building shared libraries.
+
+2011-05-18  RafaÅ‚ Krypa  <[email protected]>
+
+	PR ld/12778
+	* elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
+	reloc pointer.
+
+2011-05-18  Tristan Gingold  <[email protected]>
+
+	* xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
+	(xcoff_sweep): Always keep dwarf sections.
+	(xcoff_link_input_bfd): Handle dwarf symbols and sections.
+
+2011-05-18  Tristan Gingold  <[email protected]>
+
+	* libxcoff.h (struct xcoff_dwsect_name): New type.
+	(XCOFF_DWSECT_NBR_NAMES): New macro.
+	(xcoff_dwsect_names): Declare.
+	* coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
+	(styp_to_sec_flags): Ditto.
+	(coff_new_section_hook): Ditto.
+	(coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
+	* coff-rs6000.c (xcoff_dwsect_name): New variable.
+
+2011-05-17  Tomohiro Kashiwada  <[email protected]>
+
+	PR ld/12759
+	* elf32-rx.c (ignore_lma): New variable.
+	(bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
+	(rx_modify_program_headers): Only copy the LMA into the VMA if
+	ignore_lma is true.
+
+2011-05-17  Alan Modra  <[email protected]>
+
+	PR ld/12760
+	* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
+	* elflink.c (elf_link_add_object_symbols): Likewise.
+	* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
+
+2011-05-16  Alan Modra  <[email protected]>
+
+	* linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
+
+2011-05-15  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
+	global GOT entries for GOT_PAGE relocations against global symbols.
+
+2011-05-13  Bernd Schmidt  <[email protected]>
+
+	* config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
+	(tic6x-*-*): Replaced by these.
+	* elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
+	(elf32_tic6x_check_relocs): Create dynamic sections if -shared.
+	(elf_backend_relocs_compatible, elf_backend_post_process_headers):
+	Define.
+	(elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
+	TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
+	"elf32-target.h" two more times.
+	* configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
+	bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
+	bfd_elf32_tic6x_elf_le_vec.
+	* configure: Regenerate.
+
+2011-05-13  Jan Beulich  <[email protected]>
+
+	* config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
+
+2011-05-12  Jan Kratochvil  <[email protected]>
+
+	* config.in: Regenerated.
+	* configure: Regenerated.
+	* configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
+	HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
+	HAVE_PSINFO32_T_PR_PID.
+	* elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
+	HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
+	and HAVE_PSINFO32_T_PR_PID.
+	* hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
+
+2011-05-10  Jan Kratochvil  <[email protected]>
+
+	* elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
+	32bit psinfo.
+	* elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
+	* elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
+
+2011-05-09  Paul Brook  <[email protected]>
+
+	* bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
+	* bfd-in2.h: Regenerate.
+	* elf32-tic6x.c: Include limits.h.
+	(tic6x_unwind_edit_type, tic6x_unwind_table_edit,
+	_tic6x_elf_section_data): New.
+	(elf32_tic6x_section_data): Define.
+	(elf32_tic6x_new_section_hook): Allocate target specific data.
+	(elf32_tic6x_add_unwind_table_edit): New function.
+	(get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
+	elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
+	elf32_tic6x_copy_exidx_entry): New functions.
+	(elf_backend_write_section): Define.
+
+2011-05-09  Paul Brook  <[email protected]>
+
+	* elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
+	elf32_tic6x_fake_sections): New functions.
+	(elf_backend_fake_sections): Define.
+
+2011-05-09  Paul Brook  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
+	(elf_backend_gc_mark_extra_sections): Define.
+
+2011-05-07  Dave Korn  <[email protected]>
+
+	PR ld/12365
+	* cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
+	references to symbols defined in discarded sections.
+
+2011-05-07  Dave Korn  <[email protected]>
+
+	PR ld/12365
+	* coffgen.c (coff_write_symbol): Assume input section is its own
+	output section if output_section member not set.
+	(coff_write_alien_symbol): Likewise.
+
+2011-05-07  H.J. Lu  <[email protected]>
+
+	PR ld/12730
+	* elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
+
+	* elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
+	sections if needed.
+
+	* section.c (SEC_ELF_REVERSE_COPY): New.
+	* bfd-in2.h: Regenerated.
+
+2011-05-07  Anders Kaseorg  <[email protected]>
+
+	PR 12739
+	* libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
+	* bfd-in2.h: Regenerate.
+
+2011-05-06  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
+	(_bfd_vms_slurp_egsd): Rename old_flags to vms_flags.  Handle
+	any code section.  Add comments.
+	(alpha_vms_object_p): Use void * instead of PTR.
+	(alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
+	(build_module_list): Guard against no DST section.  Add comments.
+	(alpha_vms_link_output_symbol): Discard undefined symbols.
+	(alpha_vms_get_section_contents): Simply memcpy if the section was
+	already loaded.  Fix typo.
+	(vms_new_section_hook): Use void * instead of PTR.
+	(vms_alpha_vec): Ditto.
+
+2011-05-06  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
+	branch to a PLT entry, redirect it to the PLT's Thumb entry point.
+
+2011-05-05  Bernd Schmidt  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_final_link): New function.
+	(elf32_tic6x_merge_attributes): Do not warn for PID or PIC
+	mismatch.  Choose the lower of the two values.
+	(bfd_elf32_bfd_final_link): New macro.
+
+2011-04-28  Tristan Gingold  <[email protected]>
+
+	* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
+	(bfd_xcoff_swap_aux_out): Ditto.
+	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
+	(bfd_xcoff64_swap_aux_out): Ditto.
+
+2011-05-04  Alan Modra  <[email protected]>
+
+	PR ld/12727
+	* elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
+	was_undefined on dot-symbols.
+
+2011-05-03  Paul Brook  <[email protected]>
+
+
+	* elf32-tic6x.c (elf32_tic6x_howto_table,
+	elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
+	elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
+	Add R_C6000_EHTYPE.
+
+2011-05-01  Alan Modra  <[email protected]>
+
+	PR ld/12718
+	* elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
+	creating ifunc sections.
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2011-04-30  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
+	names.
+
+2011-04-28  Tom Tromey  <[email protected]>
+
+	* bfdio.c (memory_bstat): Pass correct size to memset.
+
+2011-04-28  Mike Frysinger  <[email protected]>
+
+	* dwarf2.c (dwarf_debug_sections): Mark const.
+	* elf.c (special_sections): Likewise.
+	* libbfd-in.h (dwarf_debug_sections): Likewise.
+	* libbfd.h: Regenerate.
+
+2011-04-26  Kai Tietz  <[email protected]>
+
+	* coffcode.h (sec_to_styp_flags): Allow linkonce for
+	debugging sections.
+
+2011-04-26  Tristan Gingold  <[email protected]>
+
+	* coff64-rs6000.c: Convert to ISO-C.  Remove PARAMS and PTR macros.
+
+2011-04-24  Alan Modra  <[email protected]>
+
+	PR ld/12365
+	PR ld/12696
+	* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
+	* linker.c (_bfd_link_hash_newfunc): Clear bitfields.
+	(_bfd_generic_link_add_one_symbol): Update "notice" call.
+	* elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
+	it is a redef of an IR symbol in a real BFD.
+
+2011-04-22  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
+	in readonly section in a shared object.
+	(elf_i386_size_dynamic_sections): Likewise.
+	* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
+	(elf_x86_64_size_dynamic_sections): Likewise.
+
+2011-04-21  H.J. Lu  <[email protected]>
+
+	PR ld/12694
+	* elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
+	symbols.
+	* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
+
+2011-04-21  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
+	on dynamic symbol error.
+	* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
+
+2011-04-20  Tristan Gingold  <[email protected]>
+
+	* config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
+
+2011-04-20  Alan Modra  <[email protected]>
+
+	* hash.c (bfd_default_hash_table_size): Make it an unsigned long.
+	(bfd_hash_table_init_n): Overflow checking.
+	(bfd_hash_set_default_size): Return current size.  Take unsigned long
+	arg.  Add 65537 to hash_size primes.
+	* bfd-in.h (bfd_hash_set_default_size): Update prototype.
+	* bfd-in2.h: Regenerate.
+
+2011-04-20  Jan Kratochvil  <[email protected]>
+
+	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
+	memmove elements.
+
+2011-04-20  Alan Modra  <[email protected]>
+
+	* libbfd.c (bfd_log2): Do return rounded up value.
+	* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
+	call with expanded old round down version of the function.
+
+	* archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
+	* elflink.c (elf_link_add_object_symbols): Delete redundant code.
+
+2011-04-20  Alan Modra  <[email protected]>
+
+	PR ld/12365
+	* elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
+	in their own common section.
+	* elflink.c (elf_link_add_object_symbols): Likewise.
+	* linker.c (generic_link_check_archive_element): Don't lose flags
+	if common section is pre-existing.
+	(_bfd_generic_link_add_one_symbol): Likewise.
+
+2011-04-20  Alan Modra  <[email protected]>
+
+	PR ld/12365
+	* elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
+	* linker.c (_bfd_generic_link_add_one_symbol): Likewise.  Call
+	multiple_definition regardless of allow_multiple_definition.
+	* simple.c (simple_dummy_multiple_definition): Update.
+	* xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
+	calls.
+
+2011-04-18  Tristan Gingold  <[email protected]>
+
+	* coff-rs6000.c: Convert to ISO-C.  Remove PARAMS macro.
+
+2011-04-18  Alan Modra  <[email protected]>
+
+	PR ld/12365
+	PR ld/12672
+	* bfd.c (BFD_PLUGIN): Define.
+	(BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
+	* bfd-in2.h: Regenerate.
+	* elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
+	* opncls.c (bfd_make_readable): Don't lose original bfd flags.
+
+2011-04-17  Jan Kratochvil  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
+	SEC_LOAD.
+
+2011-04-15  Sergio Durigan Junior  <[email protected]>
+
+	* elf-bfd.h (struct sdt_note): New struct.
+	(struct elf_obj_tdata) <sdt_note_head>: New field.
+	* elf.c (elfobj_grok_stapsdt_note_1): New function.
+	(elfobj_grok_stapsdt_note): Likewise.
+	(elf_parse_notes): Added code to treat SystemTap note
+	sections.
+
+2011-04-12  Richard Henderson  <[email protected]>
+
+	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
+	exclude empty .got sections.
+
+2011-04-11  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
+	array access for BFD_RELOC_386_IRELATIVE.
+
+2011-04-11  Bernd Schmidt  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
+
+2011-04-11  Mark Wielaard  <[email protected]>
+
+	PR 10549
+	* elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
+	(has_gnu_symbols): Renamed from has_ifunc_symbols.
+	* elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
+	* elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
+	also if STB_GNU_UNIQUE symbol binding was seen.
+	* elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
 	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
 	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
 	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
 	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
-	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
+	* elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
 
-2010-02-19  Alan Modra  <[email protected]>
+2011-04-11  Alan Modra  <[email protected]>
 
-	* elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
-	(_bfd_elf_copy_private_header_data): ..here.
-	* elflink.c (_bfd_elf_size_group_sections): New function.
-	(bfd_elf_size_dynamic_sections): Call it.
-	* elf-bfd.h (_bfd_elf_size_group_sections): Declare.
-	(_bfd_elf_fixup_group_sections): Declare.
-
-2010-02-18  Matthew Gretton-Dann  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
-	merging Tag_DIV_use, Tag_MPextension_use, and
-	Tag_MPextension_use_legacy tags.
-
-2010-02-18  Alan Modra  <[email protected]>
-
-	* elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
-	commit.  Don't write zeros for removed group members.
-	(_bfd_elf_copy_private_header_data): Adjust size of group section
-	when group members are removed by objcopy.
-
-2010-02-15  Dave Korn  <[email protected]>
-
-	PR binutils/11280
-	* configure.host (*-*-solaris2.11):  Add host define to select
-	valid default code page for windres/windmc on solaris.
-
-2010-02-15  Nick Clifton  <[email protected]>
-
-	* po/vi.po: Updated Vietnamese translation.
-
-2010-02-12  Daniel Gutson  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_output_arch_local_syms): add
-	missing mapping symbol to data only sections.
-
-2010-02-11  David S. Miller  <[email protected]>
-
-	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
-	and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
-	symbols.
-	(_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
-	these relocs on global symbols.
-	(gdopoff): New.
-	(_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
-	local symbol references which are not STT_GNU_IFUNC.  Handle
-	relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
-	and deal with negative vs. non-negative values properly.
-
-2010-02-09  Tristan Gingold  <[email protected]>
-
-	* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
-	non-external relocation.
-
-2010-02-09  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (merge_got_entries): Move earlier in file.
-	(allocate_dynrelocs): Merge got entries here if not doing multi-toc.
-	(ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
-	(ppc64_elf_layout_multitoc): Don't resize if we have already
-	merged got entries.
-
-2010-02-09  Michael Holzheu  <[email protected]>
-
-	* elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
-	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
-	elfcore_write_s390_prefix): New.
-	* elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
-	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
-	elfcore_write_s390_prefix): New.
-	(elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
-	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
-	(elfcore_write_register_note): Handle .reg-s390-timer,
-	.reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
-	.reg-s390-prefix section.
-
-2010-02-09  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
-	unsigned char.  Update variables and code using them throughout file.
-	(struct ppc_link_hash_entry): Likewise for tls_mask.
-
-	* elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
-
-	* elf64-ppc.c (has_small_toc_reloc): Don't define.
-	(makes_toc_func_call, call_check_in_progress): Shuffle flags.
-	(struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
-	code setting the flag.
-	(ppc64_elf_next_toc_section): Group big-toc sections in
-	0x80008000 chunks.
-
-2010-02-08  David S. Miller  <[email protected]>
-
-	* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
-	srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
-
-	* elfxx-sparc.c (create_got_section): Delete.
-	(_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
-	section creator does that work for us.  Use ->elf.foo instead of
-	->foo where applicable.
-	(_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
-	where applicable.
-	(allocate_dynrelocs): Likewise.
-	(_bfd_sparc_elf_size_dynamic_sections): Likewise.
-	(_bfd_sparc_elf_relocate_section): Likewise.
-	(sparc_vxworks_build_plt_entry): Likewise.
-	(_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
-	(sparc_finish_dyn): Likewise.
-	(sparc_vxworks_finish_exec_plt): Likewise.
-	(sparc_vxworks_finish_shared_plt): Likewise.
-	(_bfd_sparc_elf_finish_dynamic_sections): Likewise.
-
-	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
-	macros for visibilty and locality checks.
-	(_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
-	(allocate_dynrelocs): Likewise.
-	(_bfd_sparc_elf_relocate_section): Likewise.
-	(_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
-
-	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
-	but never used local var 'dynobj'.
-
-	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
-	nocopyreloc.
-
-	* reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
-	(BFD_RELOC_SPARC_IRELATIVE): Likewise.
-	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
-
-	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
-	and loc_hash_memory.
-	(_bfd_sparc_elf_link_hash_table_free): Declare.
-	* elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
-	(elf_backend_add_symbol_hook, elf_backend_post_process_headers,
-	bfd_elf32_bfd_link_hash_table_free): Define.
-	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
-	has_ifunc_symbols if STT_GNU_IFUNC.
-	(bfd_elf64_bfd_link_hash_table_free): Define.
-	(elf_backend_post_process_headers): Define always.
-	* elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
-	(sparc_reloc_map): Add entries for new IFUNC relocs.
-	(_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
-	(_bfd_sparc_elf_info_to_howto_ptr): Likewise.
-	(elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
-	elf_sparc_get_local_sym_hash): New.
-	(_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
-	from here...
-	(_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
-	local hash table.
-	(_bfd_sparc_elf_link_hash_table_free): New.
-	(create_ifunc_sections): New.
-	(_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
-	and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
-	cons up a fake local hash table entry for it.  Unconditionally add
-	a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
-	dyn relocs for ifunc.
-	(_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
-	(allocate_dynrelocs):  Unconditionally emit a PLT entry when
-	STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
-	(allocate_local_dynrelocs): New function.
-	(_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
-	table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
-	like splt.
-	(_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
-	(_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
-	plt in iplt/irelplt.
-
-2010-02-08  Richard Sandiford  <[email protected]>
-
-	* xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
-	max_contents_size, only consider sections whose contents must
-	be swapped in.
-
-2010-02-09  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
-	(ppc64_elf_size_dynamic_sections): ..and here..
-	(merge_got_entries): ..rather than here.
-
-2010-02-09  Alan Modra  <[email protected]>
-
-	* elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
-	(has_small_toc_reloc): Define.
-	(ppc64_elf_check_relocs): Set the above flags.
-	(ppc64_elf_edit_opd): Delete obfd param.
-	(ppc64_elf_tls_optimize): Likewise.
-	(ppc64_elf_edit_toc): Likewise.
-	(ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
-	* elf64-ppc.h: Update prototypes.
-
-2010-02-08  Alan Modra  <[email protected]>
-
-	* section.c (struct bfd_section): Delete has_tls_reloc,
-	has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
-	Add sec_flg0 thru sec_flg5.
-	(BFD_FAKE_SECTION): Update for changed flags.
-	* ecoff.c (bfd_debug_section): Likewise.
-	* elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
-	* elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
-	(has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
-	* elf32-xtensa.c (reloc_done): Define.
-	* elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
+	* bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
+	sections.
+	* libbfd.c (_bfd_generic_get_section_contents): Likewise.
+	(_bfd_generic_get_section_contents_in_window): Likewise.
+	* section.c (bfd_get_section_contents): Likewise.
+	* compress.c (bfd_get_full_section_contents): Likewise.
+	* elf32-rx.c (rx_final_link): Ignore rawsize.
+	* elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
+	bfd with bfd_get_section_limit.
+	* elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter.  Use
+	os->size during final link.  Update callers.
 	* bfd-in2.h: Regenerate.
 
-2010-02-08  Tristan Gingold  <[email protected]>
+2011-04-10  Richard Sandiford  <[email protected]>
 
-	* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
-	for non-scattered relocations.
+	PR ld/12637
+	* elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
+	as the number of global entries when merging with the primary GOT.
 
-2010-02-08  Nathan Sidwell  <[email protected]>
+2011-04-09  H.J. Lu  <[email protected]>
 
-	* elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
-	apuinfo sections, only scan input sections once and reuse the
-	buffer.
-
-2010-02-08  Philipp Tomsich  <[email protected]>
-
-	* archures.c (bfd_mach_ppc_titan): Define.
-	* bfd-in2.h: Regenerate.
-	* cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
-
-2010-02-08  Alan Modra  <[email protected]>
-
-	* elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
-
-2010-02-05  Sterling Augustine  <[email protected]>
-
-	* elf.c (assign_file_positions_for_load_sections) Update lma of
-	section	if necessary.  Fixes Bugzilla 11219.
-
-2010-02-05  H.J. Lu  <[email protected]>
-
-	* elf32-i386.c: Remove trailing white spaces.
+	* elf32-i386.c: Update copyright year.
 	* elf64-x86-64.c: Likewise.
 
-2010-02-03  Nick Clifton  <[email protected]>
+2011-04-09  Kai Tietz  <[email protected]>
 
-	* elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
-	entries for other architectures.
-	(struct elf_link_hash_table): Add hash_table_id field.
-	(elf_hash_table_id): New accessor macro.
-	* elflink.c (_bfd_elf_link_hash_table_init): Add target_id
-	parameter.
-	* elf-m10300.c (elf32_mn10300_hash_table): Check table id before
-	returning cast pointer.
-	(elf32_mn10300_link_hash_table_create): Identify new table as
-	containing MN10300 extensions.
-	(mn10300_elf_relax_section): Check pointer returned by
-	elf32_mn10300_hash_table.
-	* elf32-arm.c: Likewise, except using ARM extensions.
-	* elf32-avr.c: Likewise, except using AVR extensions.
-	* elf32-bfin.c: Likewise, except using BFIN extensions.
-	* elf32-cris.c: Likewise, except using CRIS extensions.
-	* elf32-frv.c: Likewise, except using FRV extensions.
-	* elf32-hppa.c: Likewise, except using HPPA32 extensions.
-	* elf32-i386.c: Likewise, except using I386 extensions.
-	* elf32-lm32.c: Likewise, except using LM32 extensions.
-	* elf32-m32r.c: Likewise, except using M32RM extensions.
-	* elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
-	* elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
-	* elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
-	* elf32-m68k.c: Likewise, except using M68K extensions.
-	* elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
-	* elf32-ppc.c: Likewise, except using PPC32 extensions.
-	* elf32-s390.c: Likewise, except using S390 extensions.
-	* elf32-sh.c: Likewise, except using SH extensions.
-	* elf32-spu.c: Likewise, except using SPU extensions.
-	* elf32-xtensa.c: Likewise, except using XTENSA extensions.
-	* elf64-alpha.c: Likewise, except using ALPHA extensions.
-	* elf64-hppa.c: Likewise, except using HPPA64 extensions.
-	* elf64-ppc.c: Likewise, except using PPC64 extensions.
-	* elf64-s390.c: Likewise, except using S390 extensions.
-	* elf64-x86-64.c: Likewise, except using X86_64 extensions.
-	* elfxx-ia64.c: Likewise, except using IA64 extensions.
-	* elfxx-mips.c: Likewise, except using MIPS extensions.
-	* elfxx-sparc.c: Likewise, except using SPARC extensions.
-	* elfxx-sparc.h: Likewise, except using SPARC extensions.
-	* elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
-	redundant structure.
-	(elf32_cr16_hash_table): Delete unused macro.
-	(elf32_cr16_link_hash_traverse): Delete unused macro.
-	* elf32-score.c: Likewise.
-	* elf32-score7.c: Likewise.
-	* elf32-vax.c: Likewise.
-	* elf64-sh64.c: Likewise.
+	* peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
+	buffer and use rawsize for sorting.
+	* coffcode.h (coff_compute_section_file_positions): Set rawsize
+	before doing alignment.
 
-2010-02-03  Alan Modra  <[email protected]>
+2011-04-09  H.J. Lu  <[email protected]>
 
-	* elf64-ppc.c (struct plt_entry): Move earlier in file.
-	(struct got_entry): Likewise.  Add is_indirect and got.ent fields.
-	(struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
-	Update all uses.
-	(struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
-	Remove no_multi_toc.
-	(update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
-	when allocating a new struct got_entry.
-	(allocate_got): New function, extracted from..
-	(allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
-	(ppc64_elf_size_dynamic_sections): Track got relocs allocated in
-	.reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
-	(ppc64_elf_setup_section_lists): Remove output_bfd param and
-	no_multi_toc, add add_stub_section and layout_sections_again.  Stash
-	new params in htab.  Extract some code to..
-	(ppc64_elf_start_multitoc_partition): ..here.  New function.
-	(ppc64_elf_next_toc_section): Check for linker script errors.  Handle
-	second pass toc scan.
-	(merge_got_entries, merge_global_got, reallocate_got): New functions.
-	(ppc64_elf_reinit_toc): Rename to..
-	(ppc64_elf_finish_multitoc_partition): ..this.
-	(ppc64_elf_layout_multitoc): New function.
-	(ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
-	layout_sections_again params.
-	(ppc64_elf_relocate_section): Handle indirect got entries.
-	* elf64-ppc.h: Update prototypes.  Declare new functions.
+	* elf32-i386.c (elf_i386_relocate_section): Return relocation
+	error on unsupported relocation.
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
 
-2010-02-02  H.J. Lu  <[email protected]>
+2011-04-09  H.J. Lu  <[email protected]>
 
-	* elf-bfd.h (elfcore_write_xstatereg): New.
+	PR binutils/12657
+	* hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
+	pid_t.
 
-	* elf.c (elfcore_grok_xstatereg): New.
-	(elfcore_write_xstatereg): Likewise.
-	(elfcore_grok_note): Handle NT_X86_XSTATE.
-	(elfcore_write_register_note): Handle .reg-xstate section.
+2011-04-08  H.J. Lu  <[email protected]>
 
-2010-02-01  Tristan Gingold  <[email protected]>
+	PR ld/12654
+	* elf32-i386.c (elf_i386_relocate_section): Check !executable
+	instead of shared for R_386_TLS_LDO_32.
 
-	* som.c (som_write_ar_hdr): Define this macro.
+2011-04-08  Tristan Gingold  <[email protected]>
 
-2010-01-30  John David Anglin  <[email protected]>
-
-	* elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
-	R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
-	linkage table pointer to use the global table pointer if not doing
-	a shared link.
-
-2010-01-29  Joel Brobecker  <[email protected]>
-
-	* elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
-	if it has already been set.
-
-2010-01-27  Tristan Gingold  <[email protected]>
-
-	* vms.h: Remove trailing spaces.
-	(struct hdr_struct): Remove unused hdr_c_cpr field.
-	(enum file_format_enum): Add comments.
-	* vms.c (vms_bfd_print_private_bfd_data): New function that
-	replaces the macro.
-	Remove trailing spaces.
-	* vms-misc.c: Improve comments.
-	(_bfd_vms_get_object_record): Also handle files without pads.
-	* vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
-	* vms-gsd.c (struct flagdescstruct): Make name field const.
-	(gsyflagdesc): Fix typo.
-
-2010-01-27  Alan Modra  <[email protected]>
-
-	PR ld/11217
-	* elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
-	(ppc64_elf_setup_section_lists): Init them.
-	(ppc64_elf_next_toc_section): Don't partition multi-toc between .got
-	and .toc on the same input file.
-	(ppc64_elf_relocate_section): Correct GOT entry offset.
-
-2010-01-26  Tristan Gingold  <[email protected]>
-
-	* targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
-	(bfd_target): Add _bfd_write_ar_hdr_fn field.
-	* archive.c (is_bsd44_extended_name): New macro.
-	(_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
-	(bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
-	name.
-	(_bfd_archive_bsd44_construct_extended_name_table): New function.
-	(_bfd_generic_write_ar_hdr): Ditto.
-	(_bfd_bsd44_write_ar_hdr): Ditto.
-	(_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
-	(bsd_write_armap): Adjust firstreal computation.
-	* libbfd-in.h (struct areltdata): Add extra_size field.
-	(_bfd_generic_write_ar_hdr): Add prototype.
-	(_bfd_bsd44_write_ar_hdr): Ditto.
-	(_bfd_write_ar_hdr): Define.
-	(_bfd_noarchive_write_ar_hdr): Ditto.
-	(_bfd_archive_bsd_write_ar_hdr): Ditto.
-	(_bfd_archive_coff_write_ar_hdr): Ditto.
-	(_bfd_archive_bsd44_slurp_armap): Ditto.
-	(_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
-	(_bfd_archive_bsd44_construct_extended_name_table): New prototype.
-	(_bfd_archive_bsd44_truncate_arname): Ditto.
-	(_bfd_archive_bsd44_write_armap): Ditto.
-	(_bfd_archive_bsd44_read_ar_hdr): Ditto.
-	(_bfd_archive_bsd44_write_ar_hdr): Ditto.
-	(_bfd_archive_bsd44_openr_next_archived_file): Ditto.
-	(_bfd_archive_bsd44_get_elt_at_index): Ditto.
-	(_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
-	(_bfd_archive_bsd44_update_armap_timestamp): Ditto.
-	* libbfd.h: Regenerate.
-	* oasys.c (oasys_write_ar_hdr): Define.
-	* libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
-	* ieee.c (ieee_write_ar_hdr): Define.
-	* elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
-	* coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
-	(bfd_pmac_xcoff_backend_data): Ditto.
-	* coff64-rs6000.c (rs6000coff64_vec): Ditto.
-	(bfd_xcoff_aix5_backend_data): Ditto.
-	* coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
-	* aout-target.h (MY_write_ar_hdr): Define it if not defined.
-	* aout-tic30.c (MY_write_ar_hdr): Ditto.
-	* mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
-	(bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
-	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
-	(bfd_mach_o_construct_extended_name_table)
-	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
-	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
-	(bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
-	* mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
-	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
-	(bfd_mach_o_construct_extended_name_table)
-	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
-	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
-	(bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
-	* bfd-in2.h: Regenerate.
-
-2010-01-26  Alan Modra  <[email protected]>
-	    H.J. Lu  <[email protected]>
-
-	PR ld/11218
-	* elflink.c (elf_link_output_extsym): Do not ignore undefined
-	symbols with ref_regular set when gc_sections is active.
-
-2010-01-25  Alan Modra  <[email protected]>
-
-	PR ld/11217
-	* elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
-	with relocations against undefined weak symbols.
-	(ppc64_elf_relocate_section): Don't optimize calls to undefined
-	weak functions if the symbol is dynamic.
-	(ppc64_elf_relocate_section): Edit tprel tls sequences.
-	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
-	(_bfd_elf_ppc_at_tprel_transform): New function.
-	* bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
-	* bfd-in2.h: Regenerate.
-
-2010-01-23  Richard Sandiford  <[email protected]>
-
-	* coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
-	(_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
-	* coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
-	bitsize to 1.
-	(xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
-
-2010-01-21  Nick Clifton  <[email protected]>
-
-	* elflink.c (elf_link_add_object_symbols): Look up name of
-	undefined symbol both before and after versioning has been
-	applied.  Do not bother with symbols that are weakly undefined.
-
-2010-01-21  Andreas Krebbel  <[email protected]>
-
-	* elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
-	(bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
-
-2010-01-19  Cary Coutant  <[email protected]>
-
-	* dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
-
-2010-01-19  Daisuke Hatayama  <[email protected]>
-	    Alan Modra <[email protected]>
-
-	* elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
-	(elf_object_p): Read e_phnum extension.
-	(elf_write_shdrs_and_ehdr): Write e_phnum extension.
-	* elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
-	that we can read last program header.
-
-2010-01-19  Matthew Gretton-Dann  <[email protected]>
-
-	* elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
-	R_ARM_THM_CALL entry.
-	(elf32_arm_final_link_relocate): Correct calculation of
-	reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
-	or R_ARM_THM_JUMP24 relocation.
-
-2010-01-18  Alan Modra  <[email protected]>
-
-	PR 11168
-	* coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
-	block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
-	than 32k sections.
-
-2010-01-15  Jan Kratochvil  <[email protected]>
-
-	Fix compilation warning on gcc-3.4.
-	* vms-tir.c (start_etir_record, sto_imm): Rename the prototype
-	parameter index to sec_index according to the function definition.
-
-2010-01-13  Chao-ying Fu  <[email protected]>
-
-	* elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
-	It is true for all CPUs.
-	(jal_reloc_p): New function.
-	(mips_elf_calculate_relocation): Rename require_jalxp to
-	cross_mode_jump_p.
-	Update comment for CROSS_MODE_JUMP_P.
-	Set up cross_mode_jump_p based on the mode change.
-	(mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
-	Update comment for CROSS_MODE_JUMP_P.
-	Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
-	Use !cross_mode_jump_p to guard conversion.
-	Convert "jr t9" to "b", if possible.
-	(_bfd_mips_elf_relocate_section): Rename require_jalx to
-	cross_mode_jump_p.
-	Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
-	Pass cross_mode_jump_p to call mips_elf_perform_relocation.
-
-2010-01-13  Nick Clifton  <[email protected]>
-
-	* cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
-	"m32c" returns the m32c arch_info_struct and not the m16c
-	arch_info_struct.
-	(arch_info_struct): Use the new scan function.
-	(bfd_m32c_arch): Likewise.
-
-2010-01-13  Tristan Gingold  <[email protected]>
-
-	* config.bfd: Remove duplicated target vector for i386-*-darwin.
-	Appends new arch instead of overriding.
-	Use mach_o_x86_64_vec for x86_64-*-darwin.
-	* configure.in: Add mach_o_x86_64_vec.
-	* configure: Regenerate.
-	* targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
-	* Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
-	(BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
+	* Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
+	* coff-pmac: Remove
+	* xcoff-target.h: Remove
 	* Makefile.in: Regenerate.
-	* mach-o-x86-64.c: New file.
 
-2010-01-13  Tristan Gingold  <[email protected]>
+2011-04-07  Cary Coutant  <[email protected]>
 
-	* reloc.c: Add MACH_O_X86_64 relocations.
-	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
+	* dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
 
-2010-01-13  Tristan Gingold  <[email protected]>
+2011-04-07  Paul Brook  <[email protected]>
 
-	* archive.c (normalize): Use lbasename.
-	(bfd_bsd_truncate_arname): Ditto.
-	(bfd_gnu_truncate_arname): Ditto.
+	* elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
+	pc-relative.
+	(elf32_tic6x_howto_table_rel): Ditto.
+	(elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
+	(elf32_tic6x_check_relocs): Ditto.
 
-2010-01-12  Tristan Gingold  <[email protected]>
+2011-04-06  Joseph Myers  <[email protected]>
 
-	* makefile.vms (CFLAGS): Turns warnings into informational messages.
+	* config.bfd (thumb-*-oabi): Don't handle in list of obsolete
+	targets.
+	(strongarm*, thumb*, xscale*): Remove architectures.
+	(strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
+	thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
+	xscale-*-coff): Remove targets.
 
-2010-01-11  Tristan Gingold  <[email protected]>
+2011-04-01  Tristan Gingold  <[email protected]>
 
-	* mach-o.h: Add x86-64 relocation types.
+	* elfxx-ia64.c: include bfd_stdint.h
 
-2010-01-11  Tristan Gingold  <[email protected]>
+2011-03-31  Jan Kratochvil  <[email protected]>
 
-	* mach-o.h (bfd_mach_o_backend_data): Add arch field.
-	(bfd_mach_o_set_arch_mach): New prototype.
-	* mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
-	(bfd_mach_o_set_arch_mach): New function.
-	(bfd_mach_o_gen_mkobject): New function.
-	Set TARGET_ARCHITECTURE for the generic back-ends.
-	* mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
-	Check that TARGET_ARCHITECTURE is defined.
-	Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
-	* mach-o-i386.c (TARGET_ARCHITECTURE): Define.
+	* elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
+	dynobj and its initialization.
 
-2010-01-11  Tristan Gingold  <[email protected]>
+2011-03-31  Tristan Gingold  <[email protected]>
 
-	* archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
+	* makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
+	* configure.com: Set BFD_HOST_64BIT_LONG_LONG and
+	BFD_HOST_LONG_LONG to 1.
 
-2010-01-11  Nick Clifton  <[email protected]>
+2011-03-31  Tristan Gingold  <[email protected]>
 
-	* elf32-v850.c (v850_elf_perform_relocation): Fix overflow
-	handling of R_V850_HI16_S relocation.
+	* vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
+	(_bfd_vms_write_etir): Ditto.
+	(_bfd_vms_slurp_etir): Avoid to use intptr_t
+	* configure.com: Generate bfd_stdint.h
 
-2010-01-11  Alan Modra  <[email protected]>
+2011-03-31  Bernd Schmidt  <[email protected]>
 
-	PR 11103
-	* dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
+	* elf32-tic6x.h (struct elf32_tic6x_params): New.
+	(elf32_tic6x_setup): Declare.
+	* elf32-tic6x.c: Include <limits.h>.
+	(ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
+	(struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
+	New structures.
+	(elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
+	(tic6x_elf_scom_section, tic6x_elf_scom_symbol,
+	tic6x_elf_scom_symbol_ptr): New static variables.
+	(elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
+	elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
+	R_C6000_PCR_H16 and R_C6000_PCR_L16.
+	(elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
+	elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
+	elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
+	elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
+	elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
+	elf32_tic6x_adjust_dynamic_symbol): New static functions.
+	(elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
+	to weak symbols as required by the ABI.
+	Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
+	as needed when generating DSBT output.
+	(elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
+	elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
+	elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
+	elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
+	elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
+	elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
+	New static functions.
+	(ELF_MAXPAGESIZE): Define to 0x1000.
+	(bfd_elf32_bfd_copy_private_bfd_data,
+	bfd_elf32_bfd_link_hash_table_create,
+	bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
+	elf_backend_want_got_plt, elf_backend_want_dynbss,
+	elf_backend_plt_readonly, elf_backend_got_header_size,
+	elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
+	elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
+	elf_backend_check_relocs, elf_backend_add_symbol_hook,
+	elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
+	elf_backend_section_from_bfd_section,
+	elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
+	elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
+	elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
 
-2010-01-11  Alan Modra  <[email protected]>
+	* bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
+	BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
+	* bfd/bfd-in2.h: Regenerate.
+	* bfd/libbfd.h: Regenerate.
+	* config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
 
-	PR 6832
-	* dwarf2.c (struct comp_unit): Add sec_info_ptr.
-	(find_abstract_instance_name): Use it.
-	(parse_comp_unit): Set it.
+2011-03-31  Tristan Gingold  <[email protected]>
 
-2010-01-09  Ralf Wildenhues  <[email protected]>
+	* coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
+	entry on xcoff when value is C_NULL_VALUE.
 
-	* Makefile.in: Regenerate.
+2011-03-31  Tristan Gingold  <[email protected]>
+
+	* libcoff-in.h (exec_hdr): Remove.
+	* libcoff.h: Regenerate.
+
+2011-03-30  Nick Clifton  <[email protected]>
+
+	* po/da.po: Updated Danish translation.
+
+2011-03-29  Richard Henderson  <[email protected]>
+
+	* elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
+	(elf64_alpha_gc_sweep_hook): New.
+	(elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
+	(elf_backend_can_gc_sections): New.
+
+2011-03-26  John Marino  <[email protected]>
+
+	* config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
+	* configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
 	* configure: Regenerate.
 
-2010-01-08  Tristan Gingold  <[email protected]>
+2011-03-25  Michael Snyder  <[email protected]>
 
-	* archive.c: Remove bfd_special_undocumented_glue.
+	* coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
 
-2010-01-08  Alan Modra  <[email protected]>
+2011-03-25  Tristan Gingold  <[email protected]>
 
-	PR ld/11133
-	* elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
-	* elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
-	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
+	* vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
+	of find_nearest_line on object files.
 
-2010-01-07  H.J. Lu  <[email protected]>
+2011-03-25  Tristan Gingold  <[email protected]>
 
-	PR ld/11138
-	* elflink.c (elf_link_check_versioned_symbol): Don't abort if
-	a symbol referenced by DSO is is defined in a non-shared object
-	and forced local.
+	* vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
+	Minor reordering.
+	(alpha_vms_create_eisd_for_section): Make code sections read-only.
 
-2010-01-07  H.J. Lu  <[email protected]>
+2011-03-24  Alan Modra  <[email protected]>
 
-	PR ld/11133
-	* elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
-	undefined __start_XXX/__stop_XXX in all input files and set
-	SEC_KEEP.
+	* elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
+	old-style __tls_get_addr calls without marker relocs don't match
+	their arg setup insn one for one.  If such mismatches are found
+	report the reloc and don't do any tls optimization.
+	* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
 
-2010-01-07  H.J. Lu  <[email protected]>
+2011-03-22  Eric B. Weddington  <[email protected]>
 
-	PR ld/11143
-	* elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
-
-2010-01-04  Daniel Gutson  <[email protected]>
-
-	* bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
-	before including procfs.h.
-	(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
-	* configure.in: Added autoconf probe for the pr_fpreg member.
-	* configure: Regenerated.
-	* config.in: Regenerated.
-	* elf.c: Define _STRUCTURE_PROC before including procfs.h.
-
-2010-01-04  Joel Brobecker  <[email protected]>
-
-	Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
-	* dwarf2.c (concat_filename): Rename dirname with dir_name
-	to void shadowing the dirname function.
-	Rename subdirname with subdir_name to stay consistent with
-	the new dir_name variable name.
-
-2010-01-04  Edmar Wienskoski  <[email protected]>
-
-	* archures.c: Add bfd_mach_ppc_e500mc64.
 	* bfd-in2.h: Regenerate.
-	* cpu-powerpc.c (bfd_powerpc_archs): Add entry for
-	bfd_mach_ppc_e500mc64.
 
-2010-01-01  Joel Brobecker  <[email protected]>
+2011-03-22  Eric B. Weddington  <[email protected]>
 
-	Fix -Wshadow warnings (seen on ppc-aix)
-	* xcofflink.c: Replace finfo by flinfo throughout.
+	* archures.c: Add AVR XMEGA architecture information.
+	* cpu-avr.c (arch_info_struct): Likewise.
+	* elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
+	(elf32_avr_object_p): Likewise.
 
-For older changes see ChangeLog-2009
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
+	to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
+	entry.
+	(elf32_arm_howto_from_type): Update accordingly.
+	(elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
+	(elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
+	(arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
+	with an extra noncall_refcount field.
+	(arm_local_iplt_info): New structure.
+	(elf_arm_obj_tdata): Add local_iplt.
+	(elf32_arm_local_iplt): New accessor macro.
+	(elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
+	plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
+	Change tls_type to a bitfield and add is_iplt.
+	(elf32_arm_link_hash_newfunc): Update accordingly.
+	(elf32_arm_allocate_local_sym_info): New function.
+	(elf32_arm_create_local_iplt): Likewise.
+	(elf32_arm_get_plt_info): Likewise.
+	(elf32_arm_plt_needs_thumb_stub_p): Likewise.
+	(elf32_arm_get_local_dynreloc_list): Likewise.
+	(create_ifunc_sections): Likewise.
+	(elf32_arm_copy_indirect_symbol): Update after the changes to
+	elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
+	(arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
+	to get PLT information.  Assert that all STT_GNU_IFUNC references
+	are turned into PLT references.
+	(arm_build_one_stub): Pass the symbol type to
+	elf32_arm_final_link_relocate.
+	(elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
+	(elf32_arm_allocate_irelocs): New function.
+	(elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
+	all R_ARM_IRELATIVE.
+	(elf32_arm_allocate_plt_entry): New function.
+	(elf32_arm_populate_plt_entry): Likewise.
+	(elf32_arm_final_link_relocate): Add an st_type parameter.
+	Set srelgot to null for static objects.  Use separate variables
+	to record which st_value and st_type should be used when generating
+	a dynamic relocation.  Use elf32_arm_get_plt_info to find the
+	symbol's PLT information, setting has_iplt_entry, splt,
+	plt_offset and gotplt_offset accordingly.  Check whether
+	STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
+	the relocation target accordingly.  Broaden assert to include
+	.iplts.  Don't set sreloc for static relocations.  Assert that
+	we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
+	and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
+	of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
+	symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
+	resolve GOT references to the .igot.plt entry.
+	(elf32_arm_relocate_section): Update the call to
+	elf32_arm_final_link_relocate.
+	(elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
+	information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
+	relocations in shared libraries and relocatable executables.
+	Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
+	to get the list of dynamic relocations for a local symbol.
+	(elf32_arm_check_relocs): Always create ifunc sections.  Set isym
+	at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
+	to allocate local symbol information.  Treat R_ARM_REL32 and
+	R_ARM_REL32_NOI as call relocations in shared libraries and
+	relocatable executables.  Record PLT information for local
+	STT_GNU_IFUNC functions as well as global functions.   Count
+	non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
+	to get the list of dynamic relocations for a local symbol.
+	(elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
+	Don't remove STT_GNU_IFUNC PLTs unless all references have been
+	removed.  Update after the changes to elf32_arm_link_hash_entry.
+	(allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
+	entries should live in .plt or .iplt.  Check whether the .igot.plt
+	and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
+	to allocate .plt and .(i)got.plt entries.  Detect which .got
+	entries will need R_ARM_IRELATIVE relocations and use
+	elf32_arm_allocate_irelocs to allocate them.  Likewise other
+	non-.got dynamic relocations.
+	(elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
+	and dynamic relocations for local STT_GNU_IFUNC symbols.
+	Check whether the .igot.plt and .got entries can be combined.
+	Detect which .got entries will need R_ARM_IRELATIVE relocations
+	and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
+	section pointers intead of strcmp checks.  Handle iplt and igotplt.
+	(elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
+	to fill in .plt, .got.plt and .rel(a).plt entries.  Point
+	STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
+	resolve to it.
+	(elf32_arm_output_plt_map_1): New function, split out from
+	elf32_arm_output_plt_map.  Handle .iplt entries.  Use
+	elf32_arm_plt_needs_thumb_stub_p.
+	(elf32_arm_output_plt_map): Call it.
+	(elf32_arm_output_arch_local_syms): Add mapping symbols for
+	local .iplt entries.
+	(elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
+	(elf32_arm_swap_symbol_out): Likewise.
+	(elf32_arm_add_symbol_hook): New function.
+	(elf_backend_add_symbol_hook): Define for all targets.
+
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* elf-bfd.h (elf_link_hash_entry): Add target_internal.
+	* elf.c (swap_out_syms): Set st_target_internal for each
+	Elf_Internal_Sym.
+	* elfcode.h (elf_swap_symbol_in): Likewise.
+	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
+	* elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
+	* elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
+	* elflink.c (elf_link_output_extsym): Likewise.
+	(bfd_elf_final_link): Likewise.
+	(elf_link_add_object_symbols): Copy st_target_internal
+	to the hash table if we see a definition.
+	(_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
+	* elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
+	a branch_type field.
+	(a8_erratum_fix, a8_erratum_reloc): Likewise.
+	(arm_type_of_stub): Replace actual_st_type with an
+	actual_branch_type parameter.
+	(arm_build_one_stub): Use branch types rather than st_types to
+	determine the type of branch.
+	(cortex_a8_erratum_scan): Likewise.
+	(elf32_arm_size_stubs): Likewise.
+	(bfd_elf32_arm_process_before_allocation): Likewise.
+	(allocate_dynrelocs_for_symbol): Likewise.
+	(elf32_arm_finish_dynamic_sections): Likewise.
+	(elf32_arm_final_link_relocate): Replace sym_flags parameter with
+	a branch_type parameter.
+	(elf32_arm_relocate_section): Update call accordingly.
+	(elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
+	(elf32_arm_output_map_sym): Initialize st_target_internal.
+	(elf32_arm_output_stub_sym): Likewise.
+	(elf32_arm_symbol_processing): Delete.
+	(elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
+	Use st_target_internal to record the branch type.
+	(elf32_arm_swap_symbol_out): Use st_target_internal to test for
+	Thumb functions.
+	(elf32_arm_is_function_type): Delete.
+	(elf_backend_symbol_processing): Likewise.
+	(elf_backend_is_function_type): Likewise.
+
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
+	(elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
+	into the PLT block.
+
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
+	may_need_local_target_p and may_become_dynamic_p to classify
+	the relocation type.  Don't check info->symbolic or h->def_regular
+	when deciding whether to record a potential dynamic reloc.
+	Don't treat potential dynamic relocs as PLT references.
+	(elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
+	try to make the PLT reference count go negative.
+
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
+	GOT entry here, rather than leaving it to finish_dynamic_symbol.
+	Only create a dynamic relocation for local references if
+	info->shared.
+	(allocate_dynrelocs_for_symbol): Update dynamic relocation
+	allocation accordingly.
+	(elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
+
+2011-03-14  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
+	(elf32_arm_add_dynreloc): Likewise.
+	(elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
+	to allocate dynamic relocations.
+	(elf32_arm_size_dynamic_sections): Likewise.
+	(allocate_dynrelocs): Likewise.  Rename to
+	allocate_dynrelocs_for_symbol.
+	(elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
+	create dynamic relocations.
+	(elf32_arm_finish_dynamic_symbol): Likewise.
+
+2011-03-12  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
+	x32 GD->IE and GD->LE transitions.
+	(elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
+	and LD->LE transitions.
+
+2011-03-10  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
+	for LO_DS error message and correct multiple.
+
+2011-03-10  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
+	(ppc64_elf_link_just_syms): New function.
+	(opd_entry_value): Don't assume big-endian host.
+	(get_r2off): New function.
+	(ppc_build_one_stub, ppc_size_one_stub): Use it here.
+
+2011-03-06  Michael Snyder  <[email protected]>
+
+	* compress.c (bfd_compress_section_contents): Check for out of mem.
+
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Document
+	that case statement falls through intentionally.
+
+	* elf32-i386.c (elf_i386_relocate_section): Document fall through.
+
+2011-03-04  Alan Modra  <[email protected]>
+
+	* archive.c (bsd_write_armap): Don't call stat in deterministic
+	mode, and don't use st_mtime if stat returns error.
+
+2011-03-03  Michael Snyder  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
+
+	* coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
+
+	* aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
+	(aout_link_write_other_symbol): Missing break statement.
+
+	* dwarf2.c (scan_unit_for_symbols): Stop memory leak.
+
+	* archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
+
+2011-03-03  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
+	x32 IE->LE transition.
+	(elf_x86_64_relocate_section): Likewise.
+
+2011-03-02  Bernd Schmidt  <[email protected]>
+
+	* elflink.c (is_reloc_section): Remove function.
+	(get_dynamic_reloc_section_name): Construct string manually.
+
+2011-02-28  Kai Tietz  <[email protected]>
+
+	* archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
+	(adjust_relative_path): Likewise.
+	(_bfd_construct_extended_name_table): Likewise.
+	* corefile.c (generic_core_file_matches_executable_p): Likewise.
+	* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
+	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
+	* elf32-spu.c (sort_bfds): Likewise.
+	(spu_elf_auto_overlay): Likewise.
+	* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
+	* xcofflink.c (xcoff_set_import_path): Likewise.
+	* xtensa-isa.c (xtensa_regfile_lookup): Likewise.
+	(xtensa_regfile_lookup_shortname): Likewise.
+
+2011-02-28  Alan Modra  <[email protected]>
+
+	PR 12513
+	* archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
+	stringsize.  Properly sanity check symdef_count.  Remove redundant
+	bfd_release.
+
+2011-02-25  Rafael Ávila de Espíndola <[email protected]>
+
+	* plugin.c (bfd_plugin_object_p): Correctly set the filesize
+	and handle claim_file seeking. Only try to load the plugin once.
+
+2011-02-22  Andreas Schwab  <[email protected]>
+
+	* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
+	relocation read the value from the second GOT slot.
+
+2011-02-15  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
+
+2011-02-15  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
+	toc relocs.  Fuss over free(NULL).
+
+2011-02-14  Mike Frysinger  <[email protected]>
+
+	* elflink.c (bfd_elf_size_dynamic_sections): Add
+	bfd_get_symbol_leading_char to the start of newname.
+
+2011-02-13  Ralf Wildenhues  <[email protected]>
+
+	* configure: Regenerate.
+
+2011-02-09  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
+	we are done.  When optimising large toc, check that a global
+	symbol on a toc reloc is defined in a kept section.
+
+2011-02-08  Nick Clifton  <[email protected]>
+
+	PR binutils/12467
+	* elf.c (assign_file_positions_for_load_sections): Set the program
+	header offset and entry size to zero if there are no program
+	headers.
+
+2011-02-08  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
+	local_syms when looking for local symbols in .toc.
+
+2011-02-01  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
+	for toc pointer on any section having makes_toc_func_call set.
+	(check_pasted_section): Ensure pasted .init/.fini fragments use
+	the same toc if any has makes_toc_func_call set.
+
+2011-01-28  Joseph Myers  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
+	field.
+
+2011-01-22  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
+	common sections too.
+
+2011-01-18  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
+	Solaris target.
+
+2011-01-18  Pierre Muller  <[email protected]>
+
+	Fix compilation for mingw64.
+	* coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
+	typecast to avoid warning.
+	* elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
+	usage.
+	* elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
+	of long for pointer to avoid warning.
+	(elfNN_ia64_relax_brl): Idem.
+	(elfNN_ia64_install_value): Idem.
+	* vms-alpha.c (_bfd_vms_slurp_etir): Idem.
+
+2011-01-17  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
+	h->needs_plt when deciding whether to record a possible dynamic reloc.
+
+2011-01-17  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
+	dynamic relocs for the removed section.
+
+2011-01-15  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
+	relocations.
+
+2011-01-14  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
+	(elf_x86_64_link_hash_table_create): Set pointer_r_type.
+	(elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
+	for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
+	R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
+	(elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
+	for ILP32.
+
+2011-01-14  Alan Modra  <[email protected]>
+
+	* bfd.c (bfd_perror): Flush stdout before and stderr after printing
+	error.
+	(_bfd_default_error_handler): Likewise.
+	* elf.c (print_segment_map): Likewise.
+	* libbfd.c (warn_deprecated): Likewise.
+	* som.c (som_sizeof_headers): No need to do so here.
+	* coff-i860.c: Replace use of printf for error messages with
+	_bfd_error_handler.
+	* coff-ppc.c: Likewise.
+	* coff-sh.c: Likewise.
+	* elf32-bfin.c: Likewise.
+	* elf32-dlx.c: Likewise.
+	* elf32-mep.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* mach-o.c: Likewise.
+	* pef.c: Likewise.
+
+2011-01-13  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
+	swap_reloca_out.
+	(elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
+	(elf_x86_64_check_relocs): Align relocation section to 4 byte
+	for 32bit.
+	(elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
+	ELF_ST_TYPE.
+	(elf_x86_64_finish_dynamic_symbol): Updated.
+	(elf_x86_64_finish_dynamic_sections): Don't use
+	Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
+	bfd_elf64_swap_dyn_out.
+
+2011-01-14  J. Park  <[email protected]>
+
+	PR ld/12339
+	* elf32-arm.c (allocate_dynrelocs): Don't set up eh before
+	following bfd_link_hash_warning symbol link.
+
+2011-01-10  Nathan Sidwell  <[email protected]>
+	    Glauber de Oliveira Costa  <[email protected]>
+
+	* reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
+	BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
+	BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
+	relocations.
+	* libbfd.h: Rebuilt.
+	* bfd-in2.h: Rebuilt.
+	* elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
+	(elf32_arm_reloc_map): Likewise.
+	(tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
+	(elf32_arm_stub_long_branch_any_tls_pic,
+	elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
+	(DEF_STUBS): Add new stubs.
+	(struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
+	(elf32_arm_local_tlsdesc_gotent): New.
+	(GOT_TLS_GDESC): New mask.
+	(GOT_TLS_GD_ANY): Define.
+	(struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
+	(elf32_arm_compute_jump_table_size): New.
+	(struct elf32_arm_link_hash_table): Add next_tls_desc_index,
+	num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
+	sgotplt_jump_table_size fields.
+	(elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
+	(elf32_arm_link_hash_table_create): Initialize new fields.
+	(arm_type_of_stub): Check TLS desc relocs too.
+	(elf32_arm_stub_name): TLS desc relocs can be shared.
+	(elf32_arm_tls_transition): Determine relaxation.
+	(arm_stub_required_alignment): Add tls stubs.
+	(elf32_arm_size_stubs): Likewise.
+	(elf32_arm_tls_relax): Perform TLS relaxing.
+	(elf32_arm_final_link_relocate): Process TLS DESC relocations.
+	(IS_ARM_TLS_GNU_RELOC): New.
+	(IS_ARM_TLS_RELOC): Use it.
+	(elf32_arm_relocate_section): Perform TLS relaxing.
+	(elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
+	desc relocations.
+	(allocate_dynrelocs): Allocate tls desc relcoations.
+	(elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
+	symbols.
+	(elf32_arm_size_dynamic_sections): Allocate tls trampolines and
+	got slots.
+	(elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
+	symbol.
+	(elf32_arm_finish_dynamic_symbol): Adjust.
+	(arm_put_trampoline): New.
+	(elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
+	trampolines.
+	(elf_backend_always_size_sections): Define.
+
+2011-01-06  H.J. Lu  <[email protected]>
+
+	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
+
+2011-01-06  H.J. Lu  <[email protected]>
+
+	PR ld/12366
+	PR ld/12371
+	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
+	handle symbols marked with regular reference, but not non-GOT
+	reference when building shared library.
+
+	* elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
+	local and global STT_GNU_IFUNC symols when building shared
+	library.
+	* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
+
+2011-01-05  DJ Delorie  <[email protected]>
+
+	* reloc.c: Add BFD_RELOC_RX_OP_NEG.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
+
+2011-01-03  H.J. Lu  <[email protected]>
+
+	* cpu-i386.c (bfd_i386_compatible): New.
+	(bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
+	with bfd_i386_compatible.
+	(bfd_x86_64_arch_intel_syntax): Likewise.
+	(bfd_i386_arch_intel_syntax): Likewise.
+	(i8086_arch): Likewise.
+	(bfd_x64_32_arch): Likewise.
+	(bfd_x86_64_arch): Likewise.
+	(bfd_i386_arch): Likewise.
+
+For older changes see ChangeLog-2010
 
 Local Variables:
 mode: change-log
diff --git a/bfd/ChangeLog-2010 b/bfd/ChangeLog-2010
new file mode 100644
index 0000000..c486f58
--- /dev/null
+++ b/bfd/ChangeLog-2010
@@ -0,0 +1,3562 @@
+2010-12-31  Robert Millan  <[email protected]>
+
+	* config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu.
+	* configure.host: Likewise.
+	* configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec',
+	`bfd_elf32_ntradlittlemips_freebsd_vec',
+	`bfd_elf32_tradbigmips_freebsd_vec',
+	`bfd_elf32_tradlittlemips_freebsd_vec',
+	`bfd_elf64_tradbigmips_freebsd_vec' and
+	`bfd_elf64_tradlittlemips_freebsd_vec'.
+	* configure: Regenerate.
+	* elf32-mips.c: New target for FreeBSD support
+	(same as traditional MIPS but overrides ELF_OSABI
+	with ELFOSABI_FREEBSD).
+	* elf64-mips.c: Likewise.
+	* elfn32-mips.c: Likewise.
+	* targets.c (_bfd_target_vector): Add
+	`bfd_elf32_ntradbigmips_freebsd_vec',
+	`bfd_elf32_ntradlittlemips_freebsd_vec',
+	`bfd_elf32_tradbigmips_freebsd_vec',
+	`bfd_elf32_tradlittlemips_freebsd_vec',
+	`bfd_elf64_tradbigmips_freebsd_vec' and
+	`bfd_elf64_tradlittlemips_freebsd_vec'.
+
+2010-12-30  H.J. Lu  <[email protected]>
+
+	* elfcode.h (NAME(elf,r_info)): New.
+	(NAME(elf,r_sym)): Likewise.
+
+	* elflink.c (elf64_r_info): Removed.
+	(elf32_r_info): Likewise.
+	(elf64_r_sym): Likewise.
+	(elf32_r_sym): Likewise.
+
+2010-12-30  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf_x86_64_relocs_compatible): New.
+	(elf_backend_relocs_compatible): Defined to
+	elf_x86_64_relocs_compatible.
+
+2010-12-30  H.J. Lu  <[email protected]>
+
+	* archures.c (bfd_mach_x64_32): New.
+	(bfd_mach_x64_32_intel_syntax): Likewise.
+	* bfd-in2.h: Regenerated.
+
+	* config.bfd (targ64_selvecs): Add bfd_elf32_x86_64_vec for
+	i[3-7]86-*-linux-*.
+	(targ_selvecs): Add bfd_elf32_x86_64_vec for x86_64-*-linux-*.
+
+	* configure.in: Support bfd_elf32_x86_64_vec.
+	* configure: Regenerated.
+
+	* cpu-i386.c (bfd_x64_32_arch_intel_syntax): New.
+	(bfd_x64_32_arch): Likewise.
+
+	* elf-bfd.h (elf_append_rela): New prototype.
+	(elf_append_rel): Likewise.
+	(elf64_r_info): Likewise.
+	(elf32_r_info): Likewise.
+	(elf64_r_sym): Likewise.
+	(elf32_r_sym): Likewise.
+
+	* elf64-x86-64.c (ABI_64_P): New.
+	(elf_x86_64_info_to_howto): Replace ELF64_R_TYPE with
+	ELF32_R_TYPE.  Replace ELF64_ST_TYPE with ELF_ST_TYPE.
+	(elf_x86_64_check_tls_transition):Likewise.
+	(elf_x86_64_check_relocs): Likewise.
+	(elf_x86_64_gc_mark_hook):Likewise.
+	(elf_x86_64_gc_sweep_hook): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf_x86_64_reloc_type_class): Likewise.
+	(ELF_DYNAMIC_INTERPRETER): Renamed to ...
+	(ELF64_DYNAMIC_INTERPRETER): This.
+	(ELF32_DYNAMIC_INTERPRETER): New.
+	(elf_x86_64_link_hash_table): Add r_info, r_sym, swap_reloca_out,
+	dynamic_interpreter and dynamic_interpreter_size.
+	(elf_x86_64_get_local_sym_hash): Replace ELF64_R_SYM with
+	htab->r_sym.  Replace ELF64_R_INFO with htab->r_info.
+	(elf_x86_64_get_local_sym_hash): Likewise.
+	(elf_x86_64_check_tls_transition):Likewise.
+	(elf_x86_64_check_relocs): Likewise.
+	(elf_x86_64_gc_mark_hook):Likewise.
+	(elf_x86_64_gc_sweep_hook): Likewise.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf_x86_64_finish_dynamic_symbol): Likewise.
+	(elf_x86_64_finish_local_dynamic_symbol): Likewise.
+	(elf_x86_64_link_hash_table_create): Initialize r_info, r_sym,
+	swap_reloca_out, dynamic_interpreter and dynamic_interpreter_size.
+	(elf_x86_64_check_relocs): Check ABI_64_P when requesting for
+	PIC.
+	(elf_x86_64_relocate_section): Likewise.
+	(elf64_x86_64_adjust_dynamic_symbol): Replace sizeof
+	(Elf64_External_Rela) with bed->s->sizeof_rela.
+	(elf64_x86_64_allocate_dynrelocs): Likewise.
+	(elf64_x86_64_size_dynamic_sections): Likewise.
+	(elf64_x86_64_finish_dynamic_symbol): Likewise.
+	(elf64_x86_64_append_rela): Removed.
+	(elf32_x86_64_elf_object_p): New.
+	Add bfd_elf32_x86_64_vec.
+
+	* elf64-x86-64.c (elf64_x86_64_xxx): Renamed to ...
+	(elf_x86_64_xxx): This.
+
+	* elflink.c (bfd_elf_final_link): Check ELF file class on error.
+	(elf_append_rela): New.
+	(elf_append_rel): Likewise.
+	(elf64_r_info): Likewise.
+	(elf32_r_info): Likewise.
+	(elf64_r_sym): Likewise.
+	(elf32_r_sym): Likewise.
+
+	* targets.c (bfd_elf32_x86_64_vec): New.
+	(_bfd_target_vector): Add bfd_elf32_x86_64_vec.
+
+2010-12-24  Alan Modra  <[email protected]>
+
+	* compress.c (decompress_contents): Style.
+	(bfd_get_full_section_contents): Do not decompress directly into
+	caller buffer or directly return cached section contents.
+	Check malloc return for compressed_buffer.
+
+2010-12-21  Kai Tietz  <[email protected]>
+
+	* peXXigen.c (_bfd_XXi_final_link_postscript): Use
+	bfd_get_symbol_leading_char to determine "_tls_used" name.
+
+2010-12-21  Pierre Muller  <[email protected]>
+
+	* peXXigen.c (_bfd_XXi_final_link_postscript): Use correct size
+	for windows 64-bit TLS table size.
+
+2010-12-16  DJ Delorie  <[email protected]>
+
+	* reloc.c (BFD_RELOC_RX_ABS16_REV): Add.
+	(BFD_RELOC_RX_ABS32_REV): Add.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* elf32-rx.c (rx_reloc_map): Add them.
+
+2010-12-15  H.J. Lu  <[email protected]>
+
+	* elf.c (_bfd_elf_new_section_hook): Special handling for
+	.init_array/.fini_array output sections.
+
+2010-12-13  Alan Modra  <[email protected]>
+
+	* aoutx.h (aout_link_check_ar_symbols): Formatting.
+	* cofflink.c (coff_link_check_ar_symbols): Likewise.
+	* elflink.c (elf_link_add_archive_symbols): Likewise.
+	* pdp11.c (aout_link_check_ar_symbols): Likewise.
+	* xcofflink.c (xcoff_link_check_dynamic_ar_symbols,
+	xcoff_link_check_dynamic_ar_symbols): Likewise.
+
+	* aoutx.h (aout_link_check_archive_element): Simplify code dealing
+	with add_archive_element substitute BFD.
+	* cofflink.c (coff_link_check_archive_element): Likewise.
+	* ecoff.c (ecoff_link_check_archive_element): Likewise.
+	(ecoff_link_add_archive_symbols): Likewise.
+	* linker.c (generic_link_check_archive_element): Likewise.
+	* pdp11.c (aout_link_check_archive_element): Likewise.
+	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
+	* xcofflink.c (xcoff_link_check_archive_element): Likewise.
+
+	* aoutx.h (aout_link_check_archive_element): Free symbols from old
+	bfd if !keep_memory.
+	* cofflink.c (coff_link_check_archive_element): Likewise.
+	* pdp11.c (aout_link_check_archive_element): Likewise.
+	* xcofflink.c (xcoff_link_check_archive_element): Likewise.
+
+2010-12-13  Alan Modra  <[email protected]>
+
+	* plugin.c (bfd_plugin_mkobject): Delete.
+	(plugin_vec): Use bfd_false instead.
+
+2010-12-12  H.J. Lu  <[email protected]>
+
+	* elflink.c (elf_link_add_archive_symbols): Remove subsbfd.
+
+2010-12-12  H.J. Lu  <[email protected]>
+
+	* elf.c (special_sections_g): Add ".gnu.lto_".
+
+2010-12-10  Alan Modra  <[email protected]>
+
+	* config.bfd: Configure rs6000-*-aix* as for powerpc-*-aix*.
+	Add aix5coff64_vec to powerpc ELF entries.
+
+2010-12-09  Mike Frysinger  <[email protected]>
+
+	* .gitignore: New file.
+
+2010-12-06  Dmitry Gorbachev  <[email protected]>
+
+	PR ld/12288
+	* plugin.c (message): Add putchar for the trailing `\n'.
+
+2010-12-04  Mike Frysinger  <[email protected]>
+
+	* Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing.
+	(PLUGINS/bfdinclude_HEADERS): Append plugin-api.h.
+	* Makefile.in: Regenerated.
+
+2010-12-04  Alan Modra  <[email protected]>
+
+	PR ld/12277
+	* elflink.c (elf_link_output_extsym): Set bfd_error on symbol
+	and section errors.  Allow better translation of error messages.
+
+2010-12-02  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_link_hash_table): Remove sgot, sgotplt,
+	srelgot, splt, srelplt.
+	(create_got_section, elf32_arm_link_hash_table_create): Don't set them.
+	(elf32_arm_create_dynamic_sections): Likewise.  Use htab->root
+	fields instead.
+	(arm_type_of_stub): Use the root fields instead of the removed ones.
+	(cortex_a8_erratum_scan, elf32_arm_size_stubs): Likewise.
+	(bfd_elf32_arm_process_before_allocation): Likewise.
+	(elf32_arm_check_relocs, allocate_dynrelocs): Likewise.
+	(elf32_arm_size_dynamic_sections): Likewise.
+	(elf32_arm_output_arch_local_syms): Likewise.
+	(elf32_arm_final_link_relocate): Set sgot, splt and srelgot from the
+	htab fields instead of looking them up by name.  Consistently use
+	these local variables instead of htab fields.
+	(elf32_arm_finish_dynamic_symbol): Likewise sgot, splt and srel.
+	Use srelbss instead of looking it up by name.
+	(elf32_arm_finish_dynamic_sections): Use sgotplt, splt and srelplt
+	instead of looking up the symbols by name.  Use the root fields
+	instead of the removed ones.
+
+2010-12-02  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_relocs_copied): Delete.
+	(elf32_arm_link_hash_entry): Replace relocs_copied with dyn_relocs.
+	(elf32_arm_link_hash_newfunc): Update accordingly.
+	(elf32_arm_copy_indirect_symbol, elf32_arm_gc_sweep_hook): Likewise.
+	(elf32_arm_check_relocs, allocate_dynrelocs): Likewise.
+	(elf32_arm_readonly_dynrelocs): Likewise.
+	(elf32_arm_size_dynamic_sections): Likewise.
+
+2010-12-02  Paul Koning  <[email protected]>
+
+	* pdp11.c (aout_link_add_symbols): Ignore debug symbols.
+
+2010-11-30  Joel Sherrill  <[email protected]>
+
+	* config.bfd: Add sparc64-rtems.
+
+2010-11-25  Alan Modra  <[email protected]>
+
+	* po/es.po: Update.
+	* po/fi.po: Update.
+	* po/fr.po: Update.
+	* po/ja.po: Update.
+	* po/zh_CN.po: Update.
+
+2010-11-24  Joel Brobecker  <[email protected]>
+
+	* Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo.
+	(OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c.
+	* Makefile.in: Regenerate.
+
+2010-11-24  Alan Modra  <[email protected]>
+
+	PR ld/12253
+	* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct
+	DW_EH_PE_datarel handling.  Truncate .eh_frame_hdr address to
+	ptr_size.
+
+2010-11-23  Mingming Sun  <[email protected]>
+
+	* elfxx-mips.c (mips_set_isa_flags): Move bfd_mach_loongson_3a
+	after bfd_mach_mips_sb1.
+
+2010-11-17  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (vms_write_index): Add comments.
+	Partially revert previous patch.  Free blocks later.
+
+2010-11-17  Nick Clifton  <[email protected]>
+
+	PR ld/12161
+	* elf32-avr.c (elf32_avr_check_relocs): Delete.
+	(elf_backend_check_relocs): Delete.
+
+2010-11-16  Jie Zhang  <[email protected]>
+
+	* elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
+	(elf32_bfin_data_in_l1): New variable.
+	(elf32_bfin_final_write_processing): New.
+	(elf_backend_final_write_processing): Define.
+
+2010-11-15  Mike Frysinger  <[email protected]>
+
+	PR binutils/12177
+	* elf32-bfin.c (_bfin_create_got_section): Drop unused flags code.
+
+2010-11-12  H.J. Lu  <[email protected]>
+
+	* archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and
+	BFD_DECOMPRESS.
+	(bfd_openr_next_archived_file): Revert the last change.
+
+2010-11-11  Mingming Sun  <[email protected]>
+
+	* archures.c (bfd_mach_mips_loongson_3a): Defined.
+	* bfd-in2.h (bfd_mach_mips_loongson_3a): Defined.
+	* cpu-mips.c (I_loongson_3a): New add.
+	(arch_info_struct): Add loongson_3a.
+	* elfxx-mips.c (_bfd_elf_mips_mach): Add loongson_3a.
+	(mips_set_isa_flags): Add loongson_3a.
+	(mips_mach_extensions): Add loongson_3a in MIPS64 extensions.
+
+2010-11-10  Richard Sandiford  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused
+	variables.
+
+2010-11-10  Nick Clifton  <[email protected]>
+
+	* po/ja.po: Updated Japanese translation.
+	* po/ru.po: Updated Russian translation.
+
+2010-11-08  Nick Clifton  <[email protected]>
+
+	* po/ja.po: Updated Japanese translation.
+
+2010-11-08  Alan Modra  <[email protected]>
+
+	* hash.c (bfd_hash_hash): Extract from..
+	(bfd_hash_lookup): ..here.
+	(bfd_hash_rename): New function.
+	* section.c (bfd_rename_section): New function.
+	* bfd-in.h (bfd_hash_rename): Declare.
+	* bfd-in2.h: Regenerate.
+	* elf.c (_bfd_elf_make_section_from_shdr): Rename input sections
+	when compressing or decompressing.  Don't assert name match.
+	* elf64-hppa.c (get_reloc_section): Don't assert name match.
+	* elfxx-ia64.c (get_reloc_section): Likewise.
+
+2010-11-05  Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_obj_attrs_handle_unknown): New.
+	(elf32_tic6x_merge_attributes): Use
+	_bfd_elf_merge_unknown_attribute_low and
+	_bfd_elf_merge_unknown_attribute_list.
+	(elf_backend_obj_attrs_handle_unknown): Define.
+
+2010-11-05  Joseph Myers  <[email protected]>
+
+	* elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
+	_bfd_elf_merge_unknown_attribute_list): Correct test for matching
+	string attributes.
+
+2010-11-05  Tristan Gingold  <[email protected]>
+
+	* po/bfd.pot: Regenerate
+
+2010-11-05  Tristan Gingold  <[email protected]>
+
+	* configure.in: Bump version to 2.21.51
+	* configure: Regenerate.
+
+2010-11-04  Maciej W. Rozycki  <[email protected]>
+
+	PR ld/10144
+	* elfxx-mips.c (_bfd_mips_elf_check_relocs)
+	[R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from
+	SEC_DEBUGGING sections.
+
+2010-11-04  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (vms_write_index): Fix thinko: reverse the loop.
+	Use bfd_zmalloc instead of bfd_malloc.  Fix comment.
+
+2010-11-04  Kai Tietz  <[email protected]>
+
+	* coffcode.h (GNU_LINKONCE_WT): New.
+	(sec_to_styp_flags): Add handling of new debug
+	section.
+	(styp_to_sec_flags): Likewise.
+
+2010-11-04  Tristan Gingold  <[email protected]>
+
+	* makefile.vms (CFLAGS): Make badalias warnings informational.
+	* vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer.
+
+2010-11-04  Joseph Myers  <[email protected]>
+
+	* elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
+	_bfd_elf_merge_unknown_attribute_list): New.
+	* elf-bfd.h (struct elf_backend_data): Add
+	obj_attrs_handle_unknown.
+	(_bfd_elf_merge_unknown_attribute_low,
+	_bfd_elf_merge_unknown_attribute_list): Declare.
+	* elf32-arm.c (elf32_arm_obj_attrs_handle_unknown): New.  Split
+	out from elf32_arm_merge_eabi_attributes.
+	(elf32_arm_merge_eabi_attributes): Use
+	_bfd_elf_merge_unknown_attribute_low and
+	_bfd_elf_merge_unknown_attribute_list.
+	(elf_backend_obj_attrs_handle_unknown): Define.
+	* elfxx-target.h (elf_backend_obj_attrs_handle_unknown): Define.
+	(elfNN_bed): Update initializer.
+
+2010-11-02  H.J. Lu  <[email protected]>
+
+	* bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New.
+	* bfd-in2.h: Regenerated.
+
+2010-11-02  Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for
+	Tag_ABI_compatibility, treat odd tags as strings and even ones as
+	integers.
+	(elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment,
+	elf32_tic6x_array_alignment_to_tag): New.
+	(elf32_tic6x_merge_attributes): Handle more attributes.  Set type
+	for merged attributes.
+	(elf_backend_obj_attrs_order): Define.
+
+2010-10-29  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo.
+
+2010-10-29  Pawel Sikora  <[email protected]>
+
+	PR binutils/12075
+	* compress.c (bfd_compress_section_contents): Use uLong on
+	compressed_size.
+
+2010-10-29  Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check
+	Tag_ABI_compatibility not Tag_compatibility.
+	(elf32_tic6x_merge_attributes): Update compatibility attribute
+	name in comment.  Return FALSE if merging common attributes fails.
+
+2010-10-29  Nick Clifton  <[email protected]>
+
+	PR bintils/6962
+	* coffcode.h (handle_COMDAT): Only check the base type when
+	looking for a section symbol.
+
+2010-10-29  H.J. Lu  <[email protected]>
+	    Cary Coutant  <[email protected]>
+
+	* archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
+	and BFD_DECOMPRESS.
+
+	* bfd.c (BFD_COMPRESS): New.
+	(BFD_DECOMPRESS): Likewise.
+	(BFD_FLAGS_SAVED): Likewise.
+	(bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.
+
+	* compress.c (bfd_uncompress_section_contents): Removed.
+	(get_uncompressed_size): New.
+	(decompress_contents): Likewise.
+	(bfd_compress_section_contents): Likewise.
+	(bfd_get_full_section_contents): Likewise.
+	(bfd_is_section_compressed): Likewise.
+	(bfd_init_section_decompress_status): Likewise.
+	(bfd_init_section_compress_status): Likewise.
+
+	* dwarf2.c (dwarf_debug_sections): New.
+	(dwarf_debug_section_enum): Likewise.
+	(read_section): Remove section_name and compressed_section_name.
+	Add dwarf_debug_section_enum.  Try compressed debug section.
+	(read_indirect_string): Updated.
+	(read_abbrevs): Likewise.
+	(decode_line_info): Likewise.
+	(read_debug_ranges): Likewise.
+	(find_line): Updated.
+
+	* ecoff.c (bfd_debug_section): Add compress_status and
+	compressed_size.
+
+	* elf.c (_bfd_elf_make_section_from_shdr): Call
+	bfd_is_section_compressed to check if a DWARF debug section is
+	compressed.  Call bfd_init_section_compress_status or
+	bfd_init_section_decompress_status if needed.
+
+	* elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
+	with bfd_get_full_section_contents.
+	* merge.c (_bfd_add_merge_section): Likewise.
+	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
+	* simple.c (bfd_simple_get_relocated_section_contents): Likewise.
+
+	* elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
+	BFD_DECOMPRESS.
+	(TARGET_LITTLE_SYM): Likewise.
+
+	* libbfd-in.h (dwarf_debug_section): New.
+	(dwarf_debug_sections): Likewise.
+
+	* libbfd.c (_bfd_generic_get_section_contents): Issue an error
+	when getting contents on compressed/decompressed section.
+
+	* section.c (COMPRESS_SECTION_NONE): New.
+	(COMPRESS_SECTION_DONE): Likewise.
+	(DECOMPRESS_SECTION_SIZED): Likewise.
+	(BFD_FAKE_SECTION): Add compress_status and compressed_size.
+	(bfd_malloc_and_get_section): Replace bfd_get_section_contents
+	with bfd_get_full_section_contents.
+
+	* bfd-in2.h: Regenerated.
+	* libbfd.h: Likewise.
+
+2010-10-29  Bernd Schmidt  <[email protected]>
+	    Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch
+	of DSBT attributes.
+
+2010-10-25  Daniel Jacobowitz  <[email protected]>
+
+	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call
+	_bfd_clear_contents.  Pass it the input section.
+	* libbfd-in.h (_bfd_clear_contents): Add input_section argument.
+	* libbfd.h: Regenerate.
+	* reloc.c (_bfd_clear_contents): Take input_section argument.
+	Use non-zero for .debug_ranges.
+	(bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents
+	call.
+
+	* elf32-arm.c (elf32_arm_relocate_section): Use
+	RELOC_AGAINST_DISCARDED_SECTION.
+	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+	* elf32-arm.c (elf32_arm_relocate_section): Likewise.
+	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
+	* elf32-bfin.c (bfin_relocate_section): Likewise.
+	(bfinfdpic_relocate_section): Likewise.
+	* elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
+	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
+	* elf32-cris.c (cris_elf_relocate_section): Likewise.
+	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
+	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
+	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+	* elf32-i370.c (i370_elf_relocate_section): Likewise.
+	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
+	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
+	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
+	* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
+	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
+	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+	* elf32-mep.c (mep_elf_relocate_section): Likewise.
+	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
+	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+	* elf32-mt.c (mt_elf_relocate_section): Likewise.
+	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+	* elf32-rx.c (rx_elf_relocate_section): Likewise.
+	* elf32-s390.c (elf_s390_relocate_section): Likewise.
+	* elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
+	* elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
+	* elf32-sh.c (sh_elf_relocate_section): Likewise.
+	* elf32-spu.c (spu_elf_relocate_section): Likewise.
+	* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
+	* elf32-v850.c (v850_elf_relocate_section): Likewise.
+	* elf32-vax.c (elf_vax_relocate_section): Likewise.
+	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+	* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+	* elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
+	(elf64_alpha_relocate_section): Likewise.
+	* elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
+	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
+	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+	* elf64-s390.c (elf_s390_relocate_section): Likewise.
+	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+
+2010-10-25  Nathan Sidwell  <[email protected]>
+
+	* elf32-tic6x.c: Add attribution.
+
+2010-10-25  Alan Modra  <[email protected]>
+
+	* elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
+	var warning at -O3.
+
+2010-10-25  Alan Modra  <[email protected]>
+
+	* opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal.
+	* libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here.
+	* libbfd.h: Regenerate
+	* bfd-in2.h: Regenerate.
+
+2010-10-25  Alan Modra  <[email protected]>
+
+	* opncls.c (_bfd_id_counter): Rename to bfd_id_counter.
+	(bfd_reserved_id_counter, bfd_use_reserved_id): New vars.
+	(_bfd_new_bfd): Use negative id when bfd_use_reserved_id.
+	(bfd_create): Doc fix.
+	* bfd-in2.h: Regenerate.
+
+2010-10-22  Rainer Orth  <[email protected]>
+
+	* elfxx-sparc.c (tpoff): Define bed, static_tls_size.
+	Consider static_tls_alignment.
+
+	* elf32-sparc.c (TARGET_BIG_SYM): Redefine to
+	bfd_elf32_sparc_sol2_vec.
+	(TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
+	(elf32_bed): Redefine to elf32_sparc_sol2_bed.
+	(elf_backend_static_tls_alignment): Redefine to 8.
+	Include elf32-target.h.
+	(elf_backend_static_tls_alignment): Undef again for VxWorks.
+
+	* elf64-sparc.c (TARGET_BIG_SYM): Redefine to
+	bfd_elf64_sparc_sol2_vec.
+	(TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
+	(ELF_OSABI): Undef.
+	(elf64_bed): Redefine to elf64_sparc_sol2_bed.
+	(elf_backend_static_tls_alignment): Redefine to 16.
+	Include elf64-target.h.
+
+	* config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
+	Set targ_defvec to bfd_elf32_sparc_sol2_vec.
+	[BFD64] (sparc-*-solaris2*): Set targ_defvec to
+	bfd_elf32_sparc_sol2_vec.
+	Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
+	targ_selvecs.
+
+	* configure.in: Handle bfd_elf32_sparc_sol2_vec,
+	bfd_elf64_sparc_sol2_vec.
+	* configure: Regenerate.
+
+	* targets.c (bfd_elf32_sparc_sol2_vec): Declare.
+	(bfd_elf64_sparc_sol2_vec): Declare.
+	(_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
+	bfd_elf64_sparc_sol2_vec.
+
+2010-10-21  Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for
+	attribute renaming.
+	(elf_backend_obj_attrs_section): Change to ".c6xabi.attributes".
+
+2010-10-21  Rainer Orth  <[email protected]>
+
+	* elf-bfd.h (struct elf_backend_data): New member
+	static_tls_alignment.
+	* elfxx-target.h (elf_backend_static_tls_alignment): Provide
+	default.
+	(elfNN_bed): Initialize static_tls_alignment.
+	* elflink.c (bfd_elf_final_link): Don't round end of TLS section
+	if static TLS has special alignment requirements.
+	* elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size.
+	Consider static_tls_alignment.
+	(elf_backend_static_tls_alignment): Redefine for Solaris 2.
+	Undef again for VxWorks.
+	* elf64-x86-64.c (elf64_x86_64_tpoff):  Define bed,
+	static_tls_size.
+	Consider static_tls_alignment.
+	(elf_backend_static_tls_alignment): Redefine for Solaris 2.
+	Undef again for Intel L1OM.
+
+2010-10-14  Dave Korn  <[email protected]>
+
+	Apply LD plugin patch series (part 6/6).
+	* aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference
+	parameter and pass it when invoking add_archive_element callback.
+	(aout_link_check_archive_element): Handle substitute bfd if it
+	was set during add_archive_element callback in the above.
+	* cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference
+	parameter and pass it when invoking add_archive_element callback.
+	(coff_link_check_archive_element): Handle substitute bfd if it
+	was set during add_archive_element callback in the above.
+	* ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading
+	code factored-out from ecoff_link_check_archive_element.
+	(reread_ext_syms_and_strs): Clear old symbols and call it.
+	(ecoff_link_check_archive_element):  Use the above.  Handle substitute
+	BFD if one is set by add_archive_element callback.
+	(ecoff_link_add_archive_symbols): Likewise allow bfd substitution.
+	* elflink.c (elf_link_add_archive_symbols): Likewise.
+	* linker.c (generic_link_check_archive_element): Likewise.
+	* pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference
+	parameter and pass it when invoking add_archive_element callback.
+	(aout_link_check_archive_element): Handle substitute bfd if it was
+	set during add_archive_element callback in the above.
+	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute
+	BFD if one is set by add_archive_element callback.
+	* xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd"
+	reference parameter and pass it when invoking add_archive_element
+	callback.
+	(xcoff_link_check_ar_symbols): Likewise.
+	(xcoff_link_check_archive_element): Handle bfd substitution if it was
+	set by callback in the above.
+
+2010-10-11  Alan Modra  <[email protected]>
+
+	* elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
+	(elf32_frvfdpic_finish_dynamic_sections): Don't crash on
+	__ROFIXUP_END__ defined in shared lib.
+
+2010-10-11  Thomas Schwinge  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link_relocate)
+	(elf32_arm_relocate_section): Handle relocations against STN_UNDEF.
+
+2010-10-11  Dave Korn  <[email protected]>
+
+	* elflink.c (_bfd_elf_link_output_relocs): Delete unused variable
+	"output_rel_hdr".
+
+2010-10-09  John Tytgat  <[email protected]>
+
+	* reloc.c (BFD_RELOC_ARM_HVC): Add.
+	* libbfd.h: Regenerate.
+
+2010-10-08  Kai Tietz  <[email protected]>
+
+	* pei-x86_64.c (find_next_xdata_or_end): Removed.
+	(pex64_dump_xdata): Remove arguments stop, onaline,
+	and pdata. New argument endx.  Print term "none"
+	instead of misleading "CFA".
+	(sort_xdata_arr): New function.
+	(pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs
+	instead of searching quadratic.
+
+2010-10-08  Pierre Muller  <[email protected]>
+	    Alan Modra  <[email protected]>
+
+	Fix build with -DDEBUG=7
+	* elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call
+	to deleted function elf_symbol_flags.  Add typecast to avoid warning.
+	* elf32-rx.c (dump_symbol) : Rename to..
+	(rx_dump_symbol): ..this to avoid link errors.
+	* elflink.c (elf_link_input_bfd): Add typecast to avoid warnings.
+	(bfd_elf_perform_complex_relocation): Likewise.
+	* elf32-xtensa.c (print_action_list): Likewise.
+
+2010-10-06  Nathan Sidwell  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
+	elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
+	ip/r12.
+	(arm_type_of_stub): Remove superfluous braces.
+
+2010-10-04  Bernd Schmidt  <[email protected]>
+
+	* elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
+	(struct bfd_elf_section_data): New members REL and RELA; delete
+	members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX,
+	REL_IDX2, REL_HASHES.
+	(_bfd_elf_init_reloc_shdr): Adjust declaration.
+	(_bfd_elf_single_rel_hdr): Declare.
+	(RELOC_AGAINST_DISCARDED_SECTION): Use it.
+	* elf.c (bfd_section_from_shdr): Adjusted to match changes in
+	data structures.
+	(_bfd_elf_init_reloc_shdr): New arg RELDATA.  Remove arg REL_HDR.
+	All callers changed.  Allocate memory for the Elf_Internal_Shdr
+	structure.
+	(_bfd_elf_single_rel_hdr): New function.
+	(struct fake_section_arg): New structure.
+	(elf_fake_section): Expect to see a pointer to it in the third
+	argument.  If doing a relocatable link, allocate both REL and RELA
+	sections as needed.
+	(assign_section_numbers): Adjusted to match changes in
+	data structures.
+	(_bfd_elf_compute_section_file_positions): Call elf_fake_sections
+	with a struct fake_section_args argument.
+	* elfcode.h (elf_write_relocs): Adjusted to match changes in
+	data structures.
+	(elf_slurp_reloc_table): Likewise.
+	* elflink.c (_bfd_elf_link_read_relocs): Likewise.
+	(_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with
+	RELDATA.  Remove argument O.  All callers changed.  Remove code to
+	discover the right rel_hdr and count.
+	(_bfd_elf_link_output_relocs): Adjusted to match changes in
+	data structures.
+	(elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH;
+	replace with RELDATA.  All callers changed.
+	(elf_link_input_bfd): Correctly generate rel_hash data when both
+	REL and RELA sections are present.
+	(elf_reloc_link_order): Adjusted to match changes in
+	data structures.
+	(bfd_elf_final_link): Simplify code to count relocs.  Free the
+	hashes array for both REL and RELA.
+	(get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr
+	* elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections):
+	Delete.
+	* elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections):
+	Delete.
+	(elf32_tic6x_rel_relocation_p): Adjusted to match changes in
+	data structures.
+	* elf32-microblaze.c (microblaze_elf_check_relocs): Use
+	_bfd_elf_single_rel_hdr.
+	* elf32-ppc.c (ppc_elf_relax_section): Likewise.
+	* elf32-spu.c (spu_elf_relocate_section): Likewise.
+	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+	* elf64-hppa.c (get_reloc_section): Likewise.
+	* elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match
+	changes in data structures.
+	(mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr.
+	* elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
+	(ppc64_elf_edit_toc): Likewise.
+	(get_relocs): Adjusted to match changes in data structures.
+	Allocate an Elf_Internal_Shdr structure if necessary.
+	(ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr.
+	* elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match
+	changes in data structures.
+	* elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr.
+	* elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro.
+	(mips_elf_rel_relocation_p): Adjusted to match changes in data
+	structures.
+	(_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather
+	than MIPS_RELOC_RELOCA_P.
+	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use
+	_bfd_elf_single_rel_hdr.
+	(_bfd_sparc_elf_relocate_section): Likewise.
+
+2010-10-01  Thomas Schwinge  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in
+	SHN_UNDEF, SHN_ABS, SHN_COMMON.
+
+2010-09-30  H.J. Lu  <[email protected]>
+
+	PR ld/11812
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
+	 allocate .got.plt section if there are no GOT nor PLT
+	 entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.
+	 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise.
+
+	* elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf.
+
+2010-09-27  Ralf Wildenhues  <[email protected]>
+
+	* configure: Regenerate.
+
+2010-09-24  Thomas Schwinge  <[email protected]>
+
+	* elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c,
+	elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c,
+	elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c,
+	elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h,
+	elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to
+	the zero symbol index.
+
+	* elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index
+	to STN_UNDEF, not SHN_UNDEF.
+
+2010-09-23  Bernd Schmidt  <[email protected]>
+
+	* elf32-tic6x.c (elf32_tic6x_fake_sections): New function.
+	(elf_backend_fake_sections): Define.
+
+2010-09-23  Matthew Gretton-Dann  <[email protected]>
+
+	* bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value.
+
+2010-09-23  Alan Modra  <[email protected]>
+
+	* cpu-d10v.c: Make bits_per_address 18 for all arch_info entries.
+
+2010-09-23  Alan Modra  <[email protected]>
+
+	* elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC
+	difference between input and output section.
+
+2010-09-22  Kai Tietz  <[email protected]>
+
+	* coffcode.h (sec_to_styp_flags): Adjust debug
+	sections to be conform to pe-coff specification
+	and avoid marking them as excluded.
+	(styp_to_sec_flags): Doing reverse mapping.
+
+	* peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for
+	setting IAT directory entry.
+
+2010-09-20  Richard Henderson  <[email protected]>
+
+	* elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc.
+
+2010-09-19  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls.
+	(mips_elf_link_hash_newfunc): Initialize it.
+	(mips_elf_record_global_got_symbol): Add a for_call parameter.
+	(mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather
+	than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls.
+	Try to remove .got entries in favour of .got.plt entries on VxWorks.
+	(_bfd_mips_elf_check_relocs): Do not try to avoid allocating
+	a global GOT entry for VxWorks calls.  Update uses of
+	mips_elf_record_global_got_symbol.
+	(allocate_dynrelocs): Set got_only_for_calls to false if the GOT
+	entry is used for dynamic relocations.
+
+2010-09-19  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (mips_got_entry): Adjust commentary.
+	(mips_elf_create_local_got_entry): If given a symbol, check that it
+	has been assigned to the local part of the GOT.
+	(mips_elf_count_got_symbols): Take the bfd_link_info as argument
+	instead of the master GOT.  Put all locally-binding symbols in
+	the local area.
+	(mips_elf_make_got_per_bfd): Use global_got_area to decide whether
+	a symbol lives in the local or global area.
+	(mips_elf_local_relocation_p): Remove check_forced argument and
+	retain only the !check_forced behavior.
+	(mips_elf_calculate_relocation): Adjust call accordingly.
+	Use global_got_area to decide whether an output relocation
+	should be local or global.  Explicitly decay R_MIPS_GOT_PAGE
+	into R_MIPS_GOT_DISP where appropriate.  Fix selection of
+	local vs. global semantics for R_MIPS*_26.  Remove redundant
+	reevaluation of what is stored in was_local_p.
+	(mips_elf_create_dynamic_relocation): Use global_got_area to decide
+	whether the relocation should be against a global or local symbol.
+	(mips_elf_lay_out_got): Update the GOT traversal after the above
+	change to mips_elf_count_got_symbols.
+	(mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p.
+	(_bfd_mips_elf_relocate_section): Likewise.
+	(_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide
+	whether the symbol has a global got entry.
+	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+
+2010-09-19  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
+	to the global GOT on VxWorks.
+
+2010-09-19  Richard Sandiford  <[email protected]>
+
+	* elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
+	exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
+	about HI/LO relocations in shared objects.
+
+2010-09-16  Alan Modra  <[email protected]>
+
+	* elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc
+	sections.
+	(spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and
+	set dynobj.
+	(spu_elf_finish_dynamic_sections): New function.
+	(elf_backend_finish_dynamic_sections): Define.
+
+2010-09-16  Alan Modra  <[email protected]>
+
+	* elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD.
+	* elflink.c (elf_link_input_bfd): Likewise.
+
+2010-09-15  Kai Tietz  <[email protected]>
+
+	* pei-x86_64.c (pex64_get_unwind_info): Reorgnized.
+	(pex64_get_scope_entry): Removed.
+	(find_next_xdata_or_end): New helper.
+	(pex64_dump_xdata): Reworked.
+	(pex64_bfd_print_pdata): Add checking for
+	valid pdata sorting and values. Reworked
+	output.
+
+2010-09-15  H.J. Lu  <[email protected]>
+
+	PR binutils/12004
+	* plugin.c (bfd_plugin_object_p): Handle NULL iostream.
+
+2010-09-14  Kai Tietz  <[email protected]>
+
+	* pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make
+	.rdata, .data, and .text partial matched section names.
+	* pei-x86_64.c: Likewise.
+
+	* peXXigen.c (sort_x64_pdata): New helper.
+	(_bfd_XXi_final_link_postscript): Do pdata sorting.
+
+2010-09-09  H.J. Lu  <[email protected]>
+
+	PR ld/11998
+	* elf.c (assign_file_positions_for_load_sections): Don't warn
+	zero LMA adjustment.
+
+2010-09-09  Bernd Schmidt  <[email protected]>
+
+	* elflink.c (bfd_elf_final_link): Correct calculation of
+	max_external_reloc_size.
+
+2010-09-07  Alan Modra  <[email protected]>
+	    Marcus Brinkmann  <[email protected]>
+
+	* peXXigen.c: Whitespace.
+	(pe_print_idata): Correct section limit calculations.  Tidy array
+	indexing.
+	(_bfd_XX_print_ce_compressed_pdata): Don't leak memory.
+
+2010-09-02  Richard Henderson  <[email protected]>
+
+	* config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too.
+
+2010-09-01  Pedro Alves  <[email protected]>
+
+	* netbsd-core.c (netbsd_core_core_file_pid): Renamed to ...
+	(netbsd_core_file_pid): ... this.
+
+2010-09-01  Tristan Gingold  <[email protected]>
+
+	* coffcode.h (coff_slurp_line_table): Add a cast.
+	(coff_slurp_reloc_table): Ditto.
+
+2010-08-30  Gunther Nikl  <[email protected]>
+
+	* cisco-core.c (cisco_core_file_pid): Define.
+
+2010-08-30  Alan Modra  <[email protected]>
+
+	PR binutils/11953
+	* elf.c (copy_elf_program_header): Calculate map->header_size
+	from lowest_section, not first_section.  Validate program
+	header p_paddr against section lma.  Find lowest_section in
+	second loop over headers.
+
+2010-08-28  Alan Modra  <[email protected]>
+
+	* elflink.c (_bfd_elf_dynamic_symbol_p): Rename param.  Make
+	common syms local.
+	(_bfd_elf_symbol_refs_local_p): Expand comment.
+	(elf_link_output_extsym): Fix style nit.
+
+2010-08-26  Nathan Sidwell  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_final_link): Process stub sections
+	exactly once.
+
+2010-08-25  H.J. Lu  <[email protected]>
+
+	PR ld/11939
+	* elflink.c (elf_link_add_object_symbols): Don't set
+	unique_global for non-ELF hash link table.
+
+2010-08-25  H.J. Lu  <[email protected]>
+
+	PR ld/11944
+	* elf-bfd.h (elf_backend_data): Add target_id.
+	(bfd_elf_make_generic_object): Renamed to ...
+	(bfd_elf_make_object): This.
+
+	* elf.c (bfd_elf_make_generic_object): Removed.
+	(bfd_elf_make_object): New.
+	(bfd_elf_mkcorefile): Really treat it as an object file.
+
+	* elf-m10300.c (ELF_TARGET_ID): New.
+	* elf32-arm.c (ELF_TARGET_ID): Likewise.
+	* elf32-bfin.c (ELF_TARGET_ID): Likewise.
+	* elf32-cris.c (ELF_TARGET_ID): Likewise.
+	* elf32-frv.c (ELF_TARGET_ID): Likewise.
+	* elf32-i386.c (ELF_TARGET_ID): Likewise.
+	* elf32-lm32.c (ELF_TARGET_ID): Likewise.
+	* elf32-m32r.c (ELF_TARGET_ID): Likewise.
+	* elf32-m68hc11.c (ELF_TARGET_ID): Likewise.
+	* elf32-m68hc12.c (ELF_TARGET_ID): Likewise.
+	* elf32-m68k.c (ELF_TARGET_ID): Likewise.
+	* elf32-microblaze.c (ELF_TARGET_ID): Likewise.
+	* elf32-ppc.c (ELF_TARGET_ID): Likewise.
+	* elf32-s390.c (ELF_TARGET_ID): Likewise.
+	* elf32-sh.c (ELF_TARGET_ID): Likewise.
+	* elf32-sparc.c (ELF_TARGET_ID): Likewise.
+	* elf32-spu.c (ELF_TARGET_ID): Likewise.
+	* elf32-tic6x.c (ELF_TARGET_ID): Likewise.
+	* elf32-xtensa.c (ELF_TARGET_ID): Likewise.
+	* elf64-alpha.c (ELF_TARGET_ID): Likewise.
+	* elf64-hppa.c (ELF_TARGET_ID): Likewise.
+	* elf64-ppc.c (ELF_TARGET_ID): Likewise.
+	* elf64-s390.c (ELF_TARGET_ID): Likewise.
+	* elf64-x86-64.c (ELF_TARGET_ID): Likewise.
+	* elfxx-ia64.c (ELF_TARGET_ID): Likewise.
+
+	* elf32-hppa.c (elf32_hppa_mkobject): Removed.
+	(bfd_elf32_mkobject): Likewise.
+	(ELF_TARGET_ID): New.
+
+	* elf32-mips.c (ELF_TARGET_ID): New.
+	(bfd_elf32_mkobject): Removed.
+
+	* elf64-mips.c (ELF_TARGET_ID): New.
+	(bfd_elf64_mkobject): Removed.
+
+	* elfn32-mips.c (ELF_TARGET_ID): New.
+	(bfd_elf32_mkobject): Removed.
+
+	* elfxx-mips.c (_bfd_mips_elf_mkobject): Removed.
+	* elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise.
+
+	* elfxx-target.h (bfd_elfNN_mkobject): Default to
+	bfd_elf_make_object.
+	(ELF_TARGET_ID): New.  Default to GENERIC_ELF_DATA.
+	(elfNN_bed): Initialize target_id.
+
+2010-08-25  Julian Brown  <[email protected]>
+
+	* elf32-arm.c (arm_stub_required_alignment): New.
+	(arm_build_one_stub): Use above to partition stubs.
+	(make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not
+	arm_stub_a8_veneer_b_cond.
+
+2010-08-25  Alan Modra  <[email protected]>
+
+	* aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address.
+	* aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise.
+	* aoutx.h (NAME(aout,reloc_type_lookup)): Likewise.
+	* coff-arm.c (coff_arm_reloc_type_lookup): Likewise.
+	* elf-hppa.h (elf_hppa_reloc_final_type): Likewise.
+	* reloc.c (bfd_default_reloc_type_lookup): Likewise.
+	* riscix.c (riscix_reloc_type_lookup): Likewise.
+
+2010-08-25  Alan Modra  <[email protected]>
+
+	* elf.c (_bfd_elf_map_sections_to_segments): Don't load program
+	headers if any loaded section wraps the address space.  Simplify
+	~(m-1) to -m.  Use lma rather than vma when determining whether
+	note sections are adjacent.
+
+2010-08-22  H.J. Lu  <[email protected]>
+
+	PR ld/11933
+	* elflink.c (elf_link_add_object_symbols): Don't check relocation
+	if input ELF object ID doesn't match output.
+
+2010-08-21  Ralf Wildenhues  <[email protected]>
+
+	* configure: Regenerate.
+
+2010-08-20  H.J. Lu  <[email protected]>
+
+	* merge.c (sec_merge_emit): Revert the last checkin.
+
+2010-08-20  Maciej W. Rozycki  <[email protected]>
+
+	* elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output
+	BFD.
+
+2010-08-20  Maciej W. Rozycki  <[email protected]>
+
+	* elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT
+	options unless an m68k hash table has been found.
+
+2010-08-20  Nick Clifton  <[email protected]>
+
+	* merge.c (sec_merge_emit): Do not zero pad sections that do not
+	have an alignment.
+
+2010-08-18  Pedro Alves  <[email protected]>
+
+	PR corefile/8210
+
+	* bfd-in2.h: Regenerate.
+	* corefile.c (bfd_core_file_pid): New.
+
+	* targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
+	(struct bfd_target) <_core_file_pid>: New.
+
+	* libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
+	* libbfd.c (_bfd_nocore_core_file_pid): New.
+
+	* elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
+	Declare.
+	* elfcode.h (elf_core_file_pid): New define.
+	* elfcore.h (elf_core_file_pid): New function.
+
+	* elf.c (elfcore_make_pid): Rewrite.
+	(elfcore_grok_prstatus): Only set core_pid if not set yet.
+	(elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
+	getting the lwpid from prstat.pr_pid.
+
+	* elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	(elf64_x86_64_grok_psinfo): Extract the the main process's PID,
+	and store it in elf_tdata's core_pid field.
+	* elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	(elf_i386_grok_psinfo): Extract the the main process's PID, and
+	store it in elf_tdata's core_pid field.
+
+	* elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
+	to elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
+	to elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
+	to elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+	* elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
+	elf_tdata's core_lwpid instead of to core_pid.
+
+	* plugin.c (bfd_plugin_core_file_pid): New function.
+	* aout-target.h (MY_core_file_pid): Define.
+	* aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
+	* coff-rs6000.c (coff_core_file_pid): New define.
+	(rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
+	* coff64-rs6000.c (coff_core_file_pid): New define.
+	(rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
+	(xcoff64_core_file_pid): New define.
+	(aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
+	* mach-o-target.c (bfd_mach_o_core_file_pid): New define.
+	* aix386-core.c (aix386_core_file_pid): New define.
+	* hppabsd-core.c (hppabsd_core_core_file_pid): New define.
+	* hpux-core.c (hpux_core_core_file_pid): New define.
+	* irix-core.c (irix_core_core_file_pid): New define.
+	* lynx-core.c (lynx_core_file_pid): New define.
+	* osf-core.c (osf_core_core_file_pid): New define.
+	* ptrace-core.c (ptrace_unix_core_file_pid): New define.
+	* sco5-core.c (sco5_core_file_pid): New define.
+	* xcoff-target.h (coff_core_file_pid): New define.
+	* netbsd-core.c (netbsd_core_core_file_pid): New define.
+
+2010-08-13  H.J. Lu  <[email protected]>
+
+	PR ld/11913
+	* elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
+	 .got.plt section is discarded.
+	 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.
+
+2010-08-13  Nathan Sidwell  <[email protected]>
+
+	* elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
+	variant.
+
+2010-08-12  H.J. Lu  <[email protected]>
+
+	PR binutils/11909
+	* Makefile.am (coff-tic4x.lo): New.  Disable -Werror.
+	(coff-tic54x.lo): Likewise.
+	* Makefile.in: Regenerated.
+
+2010-08-12  Todd Veldhuizen  <[email protected]>
+
+	PR ld/11843
+	* elflink.c (compute_bucket_count): Avoid futile long searches for
+	the best bucket size.
+
+2010-08-09  Richard Henderson  <[email protected]>
+
+	PR ld/11891
+	* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing
+	to tlshi/lo until pos0 and pos1 are adjacent.  Use the destination
+	register from the tldgd insn.
+
+2010-08-09  Catherine Moore  <[email protected]>
+
+	* elfxx-mips.c (mips_elf_perform_relocation): Improve
+	interlinking error message.
+
+2010-08-06  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
+	(ppc64_elf_relocate_section): Nop out high part insn of large toc
+	code sequence when the high part of offset is zero.
+
+2010-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
+	(alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
+	Clear the SEC_RELOC flag.
+
+2010-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
+	sections with relocs.
+	(alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
+	(alpha_vms_add_fixup_ca): Ditto.
+	(alpha_vms_add_fixup_qr): Ditto.
+	Add comments.
+
+2010-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
+	CODE sections writable.
+
+2010-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
+	(alpha_vms_add_fixup_lr): ... this for consistency.
+	(alpha_vms_add_qw_fixup): Removed.
+	Fix some comments.
+	(vms_get_symbol_info): Adjust type for unknown sections.
+
+2010-08-04  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
+	section for any absolute section.  Remove some debugging code.
+
+2010-08-03  DJ Delorie  <[email protected]>
+
+	* elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes.
+
+2010-08-03  Tristan Gingold  <[email protected]>
+
+	* vms-misc.c (vms_convert_to_var): Make it static.
+	(_bfd_vms_convert_to_var_unix_filename): Make it public.
+
+2010-08-03  Tristan Gingold  <[email protected]>
+
+	* makefile.vms (OBJS): Update list.
+
+2010-08-03  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
+	nor SEC_RELOC for empty sections.
+
+2010-08-03  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (evax_section_flags): Fix flags for absolute
+	section.  Remove useless parenthesis.
+
+2010-08-03  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
+	(vms_lib_bread, vms_lib_bopen): Adjust.
+
+2010-08-02  Alan Modra  <[email protected]>
+
+	PR 11866
+	* elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
+	calculate off_adjust rather than first section vma.
+
+2010-07-30  H.J. Lu  <[email protected]>
+
+	* elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
+
+2010-07-30  Anthony Green  <[email protected]>
+
+	* config.bfd (targ_cpu): Add moxie-*-rtems support.
+
+2010-07-29  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
+	.toc section, even when none are used in relocs.
+
+2010-07-27  Maciej W. Rozycki  <[email protected]>
+
+	* elfxx-mips.h: Include "elf/mips.h".
+	(gprel16_reloc_p): New static inline function.
+	* elfxx-mips.c (_bfd_mips_elf_check_relocs)
+	[R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
+	Use got16_reloc_p.
+	(_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
+	gprel16_reloc_p.
+	* elf32-mips.c (mips_info_to_howto_rel): Likewise.
+	* elfn32-mips.c (mips_info_to_howto_rel): Likewise.
+
+2010-07-27  Maciej W. Rozycki  <[email protected]>
+
+	* elf64-mips.c (mips_elf64_howto_table_rela)
+	[R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
+	[R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
+	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
+	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
+	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
+	* elfn32-mips.c (elf_mips_howto_table_rela)
+	[R_MIPS_TLS_DTPMOD32]: Likewise.
+	[R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
+	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
+	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
+	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
+
+2010-07-23  Naveen.H.S  <[email protected]>
+	    Ina Pandit  <[email protected]>
+
+	* archures.c (DESCRIPTION): Define bfd_mach_v850e2 and
+	bfd_mach_v850e2v3.
+	* reloc.c (bfd_architecture): Define bfd_mach_v850e2 and
+	bfd_mach_v850e2v3.
+	(BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL,
+	BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23,
+	BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
+	BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
+	BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
+	BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
+	BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT,
+	BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL,
+	BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY,
+	BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT,
+	BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF,
+	BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
+	BFD_RELOC_V850_DATA): New relocations for V850 target.
+	* config.bfd: Match all v850 targets.
+	* cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
+	* elf32-v850.c (v850_elf_check_relocs): Check the newly added
+	relocations.
+	(v850_elf_perform_relocation ): Update the newly added
+	relocations.
+	(v850_elf_howto_t): Update the specifications of added
+	relocations.
+	(v850_elf_reloc_map): Update the relocation mappings.
+	(v850_elf_final_link_relocate): Maps added relocation into the
+	appropriate howto structure.
+	(v850_elf_object_p): Add support for V850E2 and V850E2V3.
+	(v850_elf_final_write_processing): Likewise.
+	(v850_elf_merge_private_bfd_data): Likewise.
+	(v850_elf_print_private_bfd_data): Likewise.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+
+2010-07-23  Alan Modra  <[email protected]>
+
+	* archive.c (_bfd_archive_bsd44_construct_extended_name_table):
+	Correct format specifier.
+
+2010-07-22  Alan Modra  <[email protected]>
+
+	* ecoff.c: Don't include aout/ranlib.h.
+	(_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
+	(_bfd_ecoff_write_armap): Output ar_date and ar_size using
+	_bfd_ar_spacepad.
+
+2010-07-22  Alan Modra  <[email protected]>
+
+	* aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
+	relocs.
+
+2010-07-20  Alan Modra  <[email protected]>
+
+	* elf.c (assign_file_positions_for_load_sections): Check that
+	zero size sections are allocated in segments too.
+	(assign_file_positions_for_non_load_sections): Warn if zero
+	size alloc sections are found here.
+	(copy_elf_program_header): Don't drop zero size sections from
+	segment map.
+	(copy_private_bfd_data): Check for changes in zero size sections.
+
+2010-07-17  Alan Modra  <[email protected]>
+
+	* elf.c (_bfd_elf_map_sections_to_segments): Force new segment
+	for sections with overlapping LMAs.
+	(assign_file_positions_for_load_sections): Catch overlap for
+	sections that wrap around the address space.  Replace a
+	warning that duplicates ld's --check-sections error with a
+	warning that lma has been adjusted for overlapping sections.
+
+2010-07-14  Cary Coutant  <[email protected]>
+
+	PR ld/11817
+	* dwarf2.c (read_section): Revert patch for compressed debug sections.
+	(find_line): Likewise.
+	(read_and_uncompress_section): Remove.
+
+2010-07-13  H.J. Lu  <[email protected]>
+
+	PR ld/11812
+	* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
+	 allocate .got.plt section if there are no GOT nor PLT
+	 entries.
+	 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
+
+2010-07-13  H.J. Lu  <[email protected]>
+
+	PR ld/11791
+	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
+	garbage collection against STT_GNU_IFUNC symbols.
+
+	* elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
+	elf.plt.offset/elf.got.offset to -1.
+	(elf_i386_tls_transition): Skip TLS transition for functions.
+	(elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
+
+	* elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
+	elf.plt.offset/elf.got.offset to -1.
+	(elf64_x86_64_tls_transition): Skip TLS transition for functions.
+	(elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
+
+2010-07-12  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_check_relocs): Re-indent.
+	(elf_i386_relocate_section): Likewise.
+
+2010-07-06  H.J. Lu  <[email protected]>
+
+	* dwarf2.c (add_line_info): Initialize prev_line.
+
+2010-07-06  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_relax_section): Insert branch around
+	trampolines only for .init and .fini sections.
+
+2010-07-05  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c: Formatting.
+	(ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
+
+2010-07-03  Cary Coutant  <[email protected]>
+
+	* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
+	* dwarf2.c (read_and_uncompress_section): New function.
+	(read_section): Call it.
+	(find_line): Likewise.
+
+2010-07-01  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
+	than SYMBOL_REFERENCES_LOCAL.
+	(ppc64_elf_relocate_section): Likewise.
+
+2010-07-01  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
+
+2010-06-29  Alan Modra  <[email protected]>
+
+	* cpu-maxq.c: Delete file.
+	* coff-maxq.c: Delete file.
+	* Makefile.am: Remove references to maxq.
+	* archures.c: Likewise.
+	* coffcode.h: Likewise.
+	* configure.in: Likewise.
+	* targets.c: Likewise.
+	* config.bfd: Move maxq from obsolete to removed.
+	* Makefile.in: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* configure: Regenerate.
+	* libbfd.h: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2010-06-28  Alan Modra  <[email protected]>
+
+	* compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
+	to silence gcc warning.
+
+2010-06-27  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
+	(group_sections): Likewise.
+
+2010-06-27  Alan Modra  <[email protected]>
+
+	* bout.c (aligncode): Delete set but unused variables.
+	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
+	* coff-ppc.c (ppc_record_toc_entry): Likewise.
+	(coff_ppc_relocate_section): Likewise.
+	* coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
+	* elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
+	* elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
+	(mn10300_elf_relax_section): Likewise.
+	* elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
+	(record_vfp11_erratum_veneer): Likewise.
+	(bfd_elf32_arm_vfp11_erratum_scan): Likewise.
+	(elf32_arm_final_link_relocate): Likewise.
+	(elf32_arm_check_relocs, arm_map_one_stub): Likewise.
+	* elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
+	(elf32_avr_relax_section): Likewise.
+	(avr_mark_stub_not_to_be_necessary): Likewise.
+	* elf32-bfin.c (_bfin_create_got_section): Likewise.
+	* elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
+	(elf32_cr16_relax_delete_bytes): Likewise.
+	* elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
+	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
+	* elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
+	* elf32-h8300.c (elf32_h8_relax_section): Likewise.
+	(elf32_h8_relax_delete_bytes): Likewise.
+	* elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
+	* elf32-i370.c (i370_elf_check_relocs): Likewise.
+	(elf_relocate_section): Likewise.
+	* elf32-ip2k.c (adjust_all_relocations): Likewise.
+	(ip2k_elf_relax_section): Likewise.
+	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
+	(lm32_elf_check_relocs): Likewise.
+	(lm32_elf_finish_dynamic_sections): Likewise.
+	(lm32_elf_finish_dynamic_symbol): Likewise.
+	* elf32-m32c.c (m32c_offset_for_reloc): Likewise.
+	(m32c_elf_relax_delete_bytes): Likewise.
+	* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
+	(m32r_elf_finish_dynamic_sections): Likewise.
+	(m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
+	* elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
+	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
+	* elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
+	* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
+	(microblaze_elf_check_relocs): Likewise.
+	(microblaze_elf_finish_dynamic_symbol): Likewise.
+	* elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
+	* elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
+	* elf32-rx.c (rx_elf_relocate_section): Likewise.
+	(elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
+	(elf32_rx_relax_section): Likewise.
+	* elf32-score.c (score_elf_got_offset_from_index): Likewise.
+	(score_elf_final_link_relocate): Likewise.
+	(s3_bfd_score_elf_relocate_section): Likewise.
+	* elf32-score7.c (score_elf_got_offset_from_index): Likewise.
+	(s7_bfd_score_elf_relocate_section): Likewise.
+	* elf32-sh.c (sh_elf_check_relocs): Likewise.
+	* elf32-spu.c (spu_elf_relocate_section): Likewise.
+	* elf32-v850.c (v850_elf_check_relocs): Likewise.
+	(find_remembered_hi16s_reloc): Likewise.
+	* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
+	(elf_vax_relocate_section): Likewise.
+	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
+	* elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
+	(move_literal): Likewise.
+	* elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
+	(elf64_hppa_check_relocs): Likewise.
+	(elf64_hppa_finish_dynamic_symbol): Likewise.
+	(elf64_hppa_relocate_section): Likewise.
+	* elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
+	* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+	(ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
+	(elfNN_vms_section_from_shdr): Likewise.
+	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+	(_bfd_sparc_elf_relocate_section): Likewise.
+	* hp300hpux.c (slurp_symbol_table): Likewise.
+	* i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
+	* mach-o.c (bfd_mach_o_write_thread): Likewise.
+	* mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
+	* nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
+	* pdp11.c (pdp11_aout_link_input_section): Likewise.
+	(aout_link_input_section, aout_link_input_bfd): Likewise.
+	* pe-mips.c (mips_swap_reloc_out): Likewise.
+	(coff_pe_mips_relocate_section): Likewise.
+	* som.c (som_bfd_ar_write_symbol_stuff): Likewise.
+	* vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
+	* xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
+
+	* coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
+	* coffcode.h (coff_compute_section_file_positions): Likewise.
+	(coff_slurp_reloc_table): Likewise.
+	* cpu-arm.c (arm_check_note): Likewise.
+	* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
+	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
+	* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
+	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
+	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+	* elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
+	* ieee.c (parse_expression): Likewise.
+	(ieee_slurp_external_symbols, drop_int): Likewise.
+	* peXXigen.c (pe_print_pdata): Likewise.
+	* versados.c (process_esd): Likewise.
+
+2010-06-25  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
+	its flags.  Create an absolute section if needed.
+
+2010-06-25  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
+	sections.  Mark .vmsdebug section as SEC_DEBUGGING.  Do not create
+	dummy psect anymore.  Adjust.
+	(_bfd_vms_write_eeom): Adjust (use target_index instead of index)
+	(_bfd_vms_write_etir): Ditto.
+	(start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
+	section name.  Adjust.
+
+2010-06-25  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_write_exec): Set linktime field.
+
+2010-06-25  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (toc_skip_enum): Define.
+	(ppc64_elf_edit_toc): Use two low bits of skip array as markers.
+	Optimize largetoc sequences.
+	(adjust_toc_syms): Update for skip array change.
+	(ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
+
+2010-06-25  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (is_static_defined): New function.
+	(get_tls_mask, ppc_type_of_stub): Use it here.
+	(ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
+	(ppc64_elf_tls_setup): Typo fix.
+	(adjust_toc_syms): Correctly handle symbols defined past the end
+	of the toc.  Move syms on removed entries to next entry rather
+	than to start of toc.
+	(ppc64_elf_edit_toc): Likewise.  Ensure we only attempt to
+	edit ppc64 input.  Allocate one extra word in skip array.
+	Honour info->keep_memory when reading relocs if we can.
+	Adjust toc relocs after adjusting symbols.
+
+2010-06-23  Nathan Sidwell  <[email protected]>
+
+	* archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
+	when scaning map.
+
+2010-06-17  Tristan Gingold  <[email protected]>
+
+	* Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
+	(BFD64_BACKENDS_CFILES): ... here.
+	(BFD32_BACKENDS): Move vms-alpha.lo to ...
+	(BFD64_BACKENDS): ... here.
+	* Makefile.in: Regenerate.
+
+2010-06-15  Joseph Myers  <[email protected]>
+
+	* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
+	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
+	elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
+	elf32_tic6x_merge_private_bfd_data): New.
+	(bfd_elf32_bfd_merge_private_bfd_data,
+	elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
+	elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
+	Define.
+	* elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
+
+2010-06-15  Joseph Myers  <[email protected]>
+
+	* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
+	(struct elf_backend_data): Update comment on obj_attrs_order.
+	* elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
+	_bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
+	instead of hardcoded 4.
+	* elf32-arm.c (elf32_arm_obj_attrs_order): Use
+	LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
+	instead of hardcoded 4 and 5.
+	(elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
+	instead of hardcoded 4.
+
+2010-06-14  Kevin Buettner  <[email protected]>
+
+	* elf32-h8300.c (elf_symbol_leading_char): Define.
+
+2010-06-11  Jan Kratochvil  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
+
+2010-06-11  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
+	sections to 0.
+
+2010-06-11  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
+
+2010-06-11  Tristan Gingold  <[email protected]>
+
+	* vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
+	Adjust cast.
+	(_bfd_vms_output_dump): Make DATA argument const, adjust cast.
+	* vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
+	* vms-alpha.c (evax_section_flags): Make it const.
+	(vms_secflag_by_name): Remove unused ABFD argument.
+	Make SECTION_FLAGS and NAME arguments const. Clarify comment.
+	(vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
+	(_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
+	(_bfd_vms_write_egsd): Remove useless cast.
+
+2010-06-10  Tristan Gingold  <[email protected]>
+
+	* config.bfd: Remove #if/#endif so that som can be compiled on any
+	host.
+	* targets.c (_bfd_target_vector): Remove #if/#endif so that som
+	can be used on any host.
+
+2010-06-10  Tristan Gingold  <[email protected]>
+
+	* som.c: Can now be compiled on any host.
+	Include bfd headers instead of system one.
+	(som_compute_checksum): Parameter is now a pointer to a
+	som_external_header structure.  Adjust.
+	(struct section_to_type): Field section is now const.
+	(R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
+	definition.
+	(R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
+	(R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
+	(som_swap_clock_in, som_swap_clock_out): New functions.
+	(som_swap_header_in, som_swap_header_out): Likewise.
+	(som_swap_space_dictionary_in): Likewise.
+	(som_swap_space_dictionary_out): Likewise.
+	(som_swap_subspace_dictionary_in): Likewise.
+	(som_swap_subspace_dictionary_record_out): Likewise.
+	(som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
+	(som_swap_string_auxhdr_out): Likewise.
+	(som_swap_compilation_unit_out): Likewise.
+	(som_swap_exec_auxhdr_in): Likewise.
+	(som_swap_exec_auxhdr_out): Likewise.
+	(som_swap_lst_header_in): Likewise.
+	(som_object_setup): Adjust parameter type using bfd types.
+	(setup_sections): Likewise.  Ditto for object file types.
+	Use intermediate variables for external representation and use the
+	swap functions to convert.
+	(som_object_p): Ditto.  Remove #ifdef/#endif on always defined
+	macros.
+	(som_prep_headers): Likewise.
+	(som_write_symbol_strings): Likewise.
+	(som_begin_writing): Likewise.
+	(som_finish_writing): Likewise.
+	(som_build_and_write_symbol_table): Likewise.
+	(bfd_section_from_som_symbol): Likewise.
+	(som_slurp_symbol_table): Likewise.
+	(som_bfd_print_private_bfd_data): Likewise.
+	(bfd_som_attach_aux_hdr): Likewise.  Clear the padding.
+	(bfd_som_attach_compilation_unit): Likewise.
+	(som_bfd_count_ar_symbols): Likewise.
+	(som_bfd_fill_in_ar_symbols): Likewise.
+	(som_slurp_armap): Likewise.
+	(som_bfd_ar_write_symbol_stuff): Likewise.
+	(som_write_armap): Likewise.  Use _bfd_ar_spacepad instead of
+	sprintf to write header fields.
+	* som.h: Include bfd headers instead of system one.
+	(FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
+	(struct somdata): Use bfd structures instead of system ones.
+	(struct som_section_data_struct): Likewise.
+	(struct som_subspace_dictionary_record): Removed (now in
+	include/som/internal.h)
+
+2010-06-10  Tristan Gingold  <[email protected]>
+
+	* targets.c (bfd_target_list): Remove hp/ux compiler work-around
+	as bfd requires an ANSI-C compiler.
+
+2010-06-09 Tristan Gingold  <[email protected]>
+
+	* bfdio.c (bfd_bread): Fix the code to prevent reading past the
+	end of archive members.
+
+2010-06-08  Tristan Gingold  <[email protected]>
+
+	* som.c (som_bfd_free_cached_info): Do not free relocations as
+	they were allocated with bfd_zalloc.
+
+2010-06-08  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
+	for the first block.
+
+2010-06-08  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
+	* libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
+	* libbfd.h: Regenerate.
+	* elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
+	(bfd_elfNN_mkarchive): Ditto.
+
+2010-06-02  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
+
+2010-06-01  Ralf Wildenhues  <[email protected]>
+
+	* configure: Regenerate.
+
+2010-06-01  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (struct vms_private_data_struct): Add
+	transfer_address field.  Remove unused dst_info field.
+	(alpha_vms_write_exec): Use transfer_address.
+	(_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
+	(alpha_vms_bfd_final_link): Set transfer_address.
+
+2010-05-31  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (credat_lo, credat_hi): New fields.
+	(vms_read_block): Adjust comments.
+	(vms_write_block): New function.
+	(_bfd_vms_lib_archive_p): Decode majorid once.  Replace some
+	hard-coded values with constants.  Set credat_lo and credat_hi.
+	(_bfd_vms_lib_mkarchive): Add argument kind.
+	Set ver, mhd_size and type according to kind.
+	(_bfd_vms_lib_alpha_mkarchive): New function.
+	(struct lib_index): Renamed from struct vms_index
+	(lib_index_cmp): Renamed from vms_index_cmp.  Adjusted.
+	(get_idxlen): Type of idx argument adjusted.  Add is_elfidx
+	argument and handle it.
+	(vms_write_index): Adjust argument idx.  Handle elf indexes.
+	(_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
+	(_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
+	use it.  Handle elf indexes.  Set credat.
+	* libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
+	(_bfd_vms_lib_alpha_mkarchive): ... this.
+	* libbfd.h: Regenerated.
+	* vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
+
+2010-05-28  Sterling Augustine  <[email protected]>
+
+	* elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
+	of code to change the bits in the instructions to match the changes
+	in the relocations.  Declare dest_addr and sym_sec to help.
+
+2010-05-28  Jan Kratochvil  <[email protected]>
+
+	Workaround GCC PR middle-end/4210.
+	* vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
+	and val[3].
+
+2010-05-27  Tristan Gingold  <[email protected]>
+
+	* vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
+	(VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
+	(vms_time_to_time_t): Use them instead of local const.
+	(vms_time_t_to_vms_time): New function.
+	(vms_get_time): Likewise.
+	(vms_raw_get_time): Likewise.
+	* vms.h	(vms_time_t_to_vms_time): New declaration.
+	(vms_get_time): Likewise.
+	(vms_raw_get_time): Likewise.
+
+2010-05-26  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c: Update comments.
+	(alpha_vms_write_exec): Set lnkflags.  Write the GST.
+	(alpha_vms_link_output_symbol): New function.
+	(alpha_vms_bfd_final_link): Generate the VMS symbol table.
+	Set dst_section private field.
+	(alpha_vms_bfd_final_link): Remove code that set dst_section.
+
+2010-05-26  Tristan Gingold  <[email protected]>
+
+	* bfdio.c: Declare and define _bfd_memory_iovec.
+	(bfd_bread): Move code for BFD_IN_MEMORY...
+	(bfd_bwrite): ... Ditto ...
+	(bfd_tell): ... Ditto ...
+	(bfd_flush): ... Ditto ...
+	(bfd_stat): ... Ditto ...
+	(bfd_seek): ... Ditto ...
+	(bfd_get_size): ... Ditto ...
+	(bfd_mmap): ... Ditto ...
+	(memory_bread): ... to these new functions.
+	(memory_bwrite): Ditto.
+	(memory_btell): Ditto.
+	(memory_bseek): Ditto.
+	(memory_bflush): Ditto.
+	(memory_bstat): Ditto.
+	(memory_bmmap): Ditto.
+	(memory_bclose): New function.
+	* peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
+	* xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
+	* opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
+	(bfd_make_writable): Use _bfd_memory_iovec.
+	* elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
+	* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
+	_bfd_memory_iovec.
+	(alpha_ecoff_openr_next_archived_file): Use proxy_origin
+	instead of origin.
+	* libbfd.h: Regenerate.
+
+2010-05-25  Daniel Jacobowitz  <[email protected]>
+	    Joseph Myers  <[email protected]>
+	    Andrew Stubbs  <[email protected]>
+
+	* config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
+	bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
+	* configure.in: Handle FDPIC vectors.
+	* elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
+	* elf32-sh.c (DEFAULT_STACK_SIZE): Define.
+	(SYMBOL_FUNCDESC_LOCAL): Define.  Use it instead of
+	SYMBOL_REFERENCES_LOCAL for function descriptors.
+	(fdpic_object_p): New.
+	(sh_reloc_map): Add FDPIC and movi20 relocations.
+	(sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
+	range.
+	(struct elf_sh_plt_info): Add got20 and short_plt.  Update all
+	definitions.
+	(FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
+	(fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
+	(FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
+	(fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
+	(fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
+	New.
+	(get_plt_info): Handle FDPIC.
+	(MAX_SHORT_PLT): Define.
+	(get_plt_index, get_plt_offset): Handle short_plt.
+	(union gotref): New.
+	(struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
+	got_type and adjust all uses.  Add GOT_FUNCDESC.
+	(struct sh_elf_obj_tdata): Add local_funcdesc.	Rename
+	local_got_tls_type to local_got_type.
+	(sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type.  All
+	users changed.
+	(sh_elf_local_funcdesc): Define.
+	(struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
+	and srofixup.
+	(sh_elf_link_hash_newfunc): Initialize new fields.
+	(sh_elf_link_hash_table_create): Set fdpic_p.
+	(sh_elf_omit_section_dynsym): New.
+	(create_got_section): Create .got.funcdesc, .rela.got.funcdesc
+	and .rofixup.
+	(allocate_dynrelocs): Allocate local function descriptors and space
+	for R_SH_FUNCDESC-related relocations, and for rofixups.
+	Handle GOT_FUNCDESC.  Create fixups.  Handle GOT entries which
+	require function descriptors.
+	(sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
+	(sh_elf_modify_program_headers): New.
+	(sh_elf_size_dynamic_sections): Allocate function descriptors for
+	local symbols.  Allocate .got.funcdesc contents.  Allocate rofixups.
+	Handle local GOT entries of type GOT_FUNCDESC.	Create fixups for
+	local GOT entries.  Ensure that FDPIC libraries always have a PLTGOT
+	entry in the .dynamic section.
+	(sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
+	(sh_elf_add_rofixup, sh_elf_osec_to_segment)
+	(sh_elf_osec_readonly_p, install_movi20_field): New functions.
+	(sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
+	R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC.  Use sh_elf_got_offset
+	and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_.	Add rofixup
+	read-only section warnings.  Handle undefined weak symbols.  Generate
+	fixups for R_SH_DIR32 and GOT entries.	Check for cross-segment
+	relocations and clear EF_SH_PIC.  Handle 20-bit relocations.
+	Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
+	(sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
+	R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
+	Handle 20-bit relocations.
+	(sh_elf_copy_indirect_symbol): Copy function descriptor reference
+	counts.
+	(sh_elf_check_relocs): Handle new relocations.  Make symbols
+	dynamic for FDPIC relocs.  Account for rofixups.  Error for FDPIC
+	symbol mismatches.  Allocate a GOT for R_SH_DIR32. Allocate fixups
+	for R_SH_DIR32.
+	(sh_elf_copy_private_data): Copy PT_GNU_STACK size.
+	(sh_elf_merge_private_data): Copy initial flags.  Do not clobber
+	non-mach flags.  Set EF_SH_PIC for FDPIC.  Reject FDPIC mismatches.
+	(sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
+	here.  Rename sgot to sgotplt and srel to srelplt.  Handle short_plt,
+	FDPIC descriptors, and got20.  Create R_SH_FUNCDESC_VALUE for FDPIC.
+	Use install_movi20_field.  Rename srel to srelgot.  Always generate
+	R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
+	(sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
+	Do not fill in reserved GOT entries for FDPIC.	Correct DT_PLTGOT.
+	Rename sgot to sgotplt.  Assert that the right number of rofixups
+	and dynamic relocations were allocated.
+	(sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
+	(elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
+	(elf_backend_can_make_relative_eh_frame)
+	(elf_backend_can_make_lsda_relative_eh_frame)
+	(elf_backend_encode_eh_address): Define.
+	(TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
+	(TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
+	Redefine for FDPIC vector.
+	* reloc.c: Add SH FDPIC and movi20 relocations.
+	* targets.c (_bfd_target_vector): Add FDPIC vectors.
+	* configure, bfd-in2.h, libbfd.h: Regenerated.
+
+2010-05-25  Jay Krell  <[email protected]>
+
+	PR ld/11624
+	* archive.c (_bfd_calloc_wrapper): New function.
+	(_bfd_add_bfd_to_archive_cache): Use it.
+
+	* configure.in: Add alpha*-*-*vms* to list of natives.
+	* configure: Regenerate.
+
+	* vms-misc.c: Define globalref if necessary.
+	(vms_convert_to_var_unix_filename): Rename to
+	_bfd_vms_convert_to_var_unix_filename and export.
+	* vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
+	* vms-alpha.c (vms_close_and_cleanup): Update invocation of
+	vms_convert_to_var_unix_filename.
+
+2010-05-24  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (add_symbol_entry): New function extrated from ...
+	(add_symbol): ... adjusted.
+
+2010-05-24  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
+	(alpha_vms_write_exec): Add a comment.
+	(_bfd_vms_write_egsd): Ditto.
+	(alpha_vms_convert_symbol): Remove a blank line.
+
+2010-05-21  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
+	for the GST.
+
+2010-05-21  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
+	SEC_LOAD if isect has data.
+	(vms_get_symbol_info): Refine the condition for 'T' type.
+
+2010-05-18  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_write_emh): New function.
+	(_bfd_vms_write_lmn): New function.
+	(_bfd_vms_write_eeom): Moved.
+	(hash_string): Likewise.
+	(_bfd_vms_length_hash_symbol): Likewise.
+	(_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
+	and _bfd_vms_write_lmn, and call these functions.
+
+2010-05-18  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
+	Add details in the messages.
+	(evax_bfd_print_image): Change message.
+
+2010-05-18  H.J. Lu  <[email protected]>
+
+	PR gas/11600
+	* elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
+	(elf_fake_sections): Likewise.
+
+	* elf32-i370.c (i370_elf_section_from_shdr): Don't handle
+	SHF_EXCLUDE here.
+	* elf32-ppc.c (ppc_elf_fake_sections): Likewise.
+
+2010-05-17  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c: Include esgps.h and eidc.h.
+	(_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
+	(evax_bfd_print_egsd_flags): New function, extracted from ...
+	(evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags.  Handles
+	EGSD__C_SPSC and EGSD__C_IDC.
+
+2010-05-14  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
+	(_bfd_vms_get_object_record): Handle align byte only in the
+	foreign case.
+
+2010-05-14  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
+	* libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
+	* libbfd.h: Regenerate.
+	* configure.in (havevecs): Define HAVE_all_vecs when
+	--enable-targets=all is set.  Use AC_SUBST on it.
+	(tdefaults): Do not add havevecs.
+	(bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
+	* configure: Regenerate.
+	* Makefile.am (HAVEVECS): New variable.
+	(INCLUDES): Add HAVEVECS.
+	* Makefile.in: Regenerate.
+	* elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
+	target is selected.  Add #ifdef/#endif around vms specific code.
+	(bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
+	bfd_elfNN_archive_slurp_extended_name_table,
+	bfd_elfNN_archive_construct_extended_name_table,
+	bfd_elfNN_archive_truncate_arname,
+	bfd_elfNN_archive_write_armap,
+	bfd_elfNN_archive_read_ar_hdr,
+	bfd_elfNN_archive_write_ar_hdr,
+	bfd_elfNN_archive_openr_next_archived_file,
+	bfd_elfNN_archive_get_elt_at_index,
+	bfd_elfNN_archive_generic_stat_arch_elt,
+	bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
+
+2010-05-11  Jie Zhang  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
+	Tag_ABI_HardFP_use correctly.
+
+2010-05-11  Alan Modra  <[email protected]>
+
+	* coffcode.h (coff_write_object_contents): Enclose all occurrences
+	of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
+
+2010-05-07  Daniel Jacobowitz  <[email protected]>
+
+	* elf32-arm.c (struct a8_erratum_reloc): Add hash member.  Move
+	sym_name to improve packing.
+	(cortex_a8_erratum_scan): Check for PLT entries.
+	(elf32_arm_size_stubs): Save the target symbol for a8 relocs.
+
+2010-05-07  Tristan Gingold  <[email protected]>
+
+	* Makefile.in: Regenerate with automake 1.11.1.
+	* aclocal.m4: Ditto.
+
+2010-05-05  Nick Clifton  <[email protected]>
+
+	* po/es.po: Updated Spanish translation.
+
+2010-05-03  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (vms_lib_bopen): Fix the size threshold to read
+	selective_search flag.
+	Add comments.
+	* vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
+	before output_has_begun is set.
+
+2010-05-03  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c: Add comments.
+	(struct vms_private_data_struct): Remove image_autoextend field.
+	(dst_check_allocation): Removed.
+	(image_write): Remove call to dst_check_allocation.
+	(vms_slurp_debug): Do not set image_autoextend.  Adjust section
+	size.
+	(_bfd_vms_slurp_object_records): Remove useless new_type variable.
+	(alpha_vms_write_exec): Use dst_section to get the dst section.
+	Write the dmt section.
+	(evax_bfd_print_image): Also print the dst size in hexa.  Fix typo.
+	(alpha_vms_read_sections_content): Do not set image_autoextend.
+	(alpha_vms_bfd_final_link): Generate the dst.
+
+2010-05-03  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
+	next array.
+	(vms_lib_dcx): Adjust for the above change.
+
+2010-04-30  H.J. Lu  <[email protected]>
+
+	PR ld/11542
+	* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
+
+	* elf32-i386.c (elf_i386_relocate_section): Use it.
+	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
+2010-04-30  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (vms_read_block): New function.
+	(vms_traverse_index): Use vms_read_block.  Handle long key names.
+
+2010-04-30  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
+	and syms removed.
+	(struct carsym_mem): New structure.
+	(vms_add_index): New function.
+	(vms_add_indexes_from_list): New function.
+	(vms_traverse_index): Parameter carsym changed to carsym_mem.
+	Code adjusted to handle elfidx.
+	(vms_lib_read_index): Adjusted for vms_traverse_index changes.
+	Parameter NBREL is now a pointer.
+	(_bfd_vms_lib_archive_p): Adjust for above change.  Handle ia64
+	archives.
+	(_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
+	(_bfd_vms_lib_find_symbol): Ditto.
+	(vms_lib_bopen): Fix two typos: return FALSE in case of error,
+	check MHD id.
+	(_bfd_vms_lib_get_module): New function.
+	(_bfd_vms_lib_get_elt_at_index): Rewritten using the above
+	function.
+	(_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
+	(_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
+	(vms_write_index): Adjust for structure renamed.
+	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
+	changes of _bfd_vms_lib_find_symbol.
+
+2010-04-28  Kai Tietz  <[email protected]>
+
+	* config.bfd: Correct accidential reverted patch
+	about vax*-*-*vms*.
+
+2010-04-27  Kai Tietz  <[email protected]>
+
+	* pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
+	to USE_MINGW64_LEADING_UNDERSCORES.
+	* pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
+	* config.bfd: Change underscoring default for x64 mingw
+	to false.
+	* coffcode.h (coff_write_relocs): Add check that dereferenced
+	sym_ptr_ptr isn't NULL.
+	* config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
+	* configure: Regenerated.
+	* configure.in: Add option '--enable-leading-mingw64-underscores'
+	and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
+
+2010-04-27  Nick Clifton  <[email protected]>
+
+	PR binutils/11512
+	* coffgen.c (coff_find_nearest_line): Incldue the section address
+	of function name symbols in address comparisons.
+
+2010-04-27  Nick Clifton  <[email protected]>
+
+	* po/fr.po: Updated French translation.
+
+2010-04-23  Alan Modra  <[email protected]>
+
+	* elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
+	ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
+	throughout file.
+	(assign_file_positions_for_load_sections): Modify section in
+	segment warning to ignore overlay vmas.
+	* elf32-spu.c (spu_elf_object_p): Replace use of
+	ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
+
+2010-04-22  Nick Clifton  <[email protected]>
+
+	* po/bfd.pot: Updated by the Translation project.
+	* po/vi.po: Updated Vietnamese translation.
+
+2010-04-22  Alan Modra  <[email protected]>
+
+	* elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
+	change.  Tidy.  Don't error on sections not allocated in segment.
+
+2010-04-15  Andrew Haley  <[email protected]>
+
+	* bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
+	merge_exidx_entries.
+	* bfd-in2.h: Likewise.
+	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise.  Use it to
+	control merging of exidx entries.
+
+2010-04-20  Joseph Myers  <[email protected]>
+
+	* elf32-tic6x.h: New.
+	* elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
+	* elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
+	elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
+	elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
+	elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
+	bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
+	(elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
+	elf32_tic6x_relocate_section): Handle REL relocations.
+	(elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
+
+2010-04-20  Jakub Jelinek  <[email protected]>
+
+	* dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
+	DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
+
+2010-04-19  Nick Clifton  <[email protected]>
+
+	* archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
+	arhdrpos variable.
+	* elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
+	attribute to warned variable.  Remove unused val, type and type2
+	variables.
+
+2010-04-16  Andreas Schwab  <[email protected]>
+
+	* vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
+	strict-aliasing rules.
+
+2010-04-16  Tristan Gingold  <[email protected]>
+
+	* vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
+	(_bfd_vms_get_object_record): Always assume there is a pad byte
+	for alignment.
+
+	* vms-lib.c: Add a few comments.
+
+2010-04-15  Matthew Gretton-Dann  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
+	attributes in v2.08 of the ABI.
+
+2010-04-15  Alan Modra  <[email protected]>
+
+	* config.bfd (vax*-*-*vms*): Delete.
+
+2010-04-14  Tristan Gingold  <[email protected]>
+
+	* Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
+	vms-tir.lo, vms.lo and add vms-alpha.lo
+	(BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
+	vms-tir.c, vms.c and add vms-alpha.c
+	* Makefile.in: Regenerate.
+	* configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
+	Remove vms_vax_vec.
+	* configure: Regenerate.
+	* targets.c (vms_vax_vec): Remove the declaration.
+	(_bfd_target_vector): Remove vms_vax_vec.
+	* vms-alpha.c: New file.
+	* vms-gsd.c: Removed, rewritten in vms-alpha.c
+	* vms-hdr.c: Ditto.
+	* vms-tir.c: Ditto.
+	* vms.c: Ditto.
+	* vms-misc.c: Fix indentation and comments.  Replace most of
+	#if VMS_DEBUG/vms_debug with vms_debug2.
+	(_bfd_vms_hash_newfunc): Moved to vms-alpha.c
+	(hash_string): Ditto.
+	(_bfd_vms_length_hash_symbol): Ditto.
+	(maybe_adjust_record_pointer_for_object): Ditto.
+	(_bfd_vms_get_object_record): Ditto.
+	(vms_get_remaining_object_record): Ditto.
+	(_bfd_vms_push): Ditto.
+	(_bfd_vms_pop): Ditto.
+	(_bfd_vms_get_header_values): Removed.
+	(_bfd_vms_get_first_record): Removed.
+	(vms_get_remaining_image_record): Removed.
+	(new_symbol): Removed.
+	(_bfd_vms_enter_symbol): Removed.
+	(_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
+	(_bfd_vms_output_begin): Remove rechead parameter.  Replace bfd
+	parameter with struct vms_rec_wr.
+	(_bfd_vms_output_push): Removed and replaced by ...
+	(_bfd_vms_output_begin_subrec): ... new function.
+	(_bfd_vms_output_alignment): Replace bfd parameter with
+	struct vms_rec_wr, and adjust.
+	(_bfd_vms_output_check): Ditto
+	(_bfd_vms_output_byte): Ditto.
+	(_bfd_vms_output_short): Ditto.
+	(_bfd_vms_output_long): Ditto.
+	(_bfd_vms_output_quad): Ditto.
+	(_bfd_vms_output_counted): Ditto.
+	(_bfd_vms_output_dump): Ditto.
+	(_bfd_vms_output_fill): Ditto.
+	(_bfd_vms_output_pop): Removed and replaced by ...
+	(_bfd_vms_output_end_subrec): ... new function.
+	(_bfd_vms_output_flush): Removed.
+	(_bfd_vms_output_align): New function.
+	(_bfd_vms_output_end): Add recwr parameter.  Adjust for this new
+	parameter.
+	(vms_convert_to_var): New function imported from vms.c
+	(vms_convert_to_var_1): Ditto.
+	(vms_convert_to_var_unix_filename): Ditto.
+	(vms_get_module_name): Ditto.
+	(get_vms_time_string): Ditto.
+	(vms_time_to_time_t): Ditto.
+	(vms_rawtime_to_time_t): Ditto.
+	* vms.h: All macros for the VMS file format are now in include/vms.
+	Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
+	have been removed.
+	(struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
+	(struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
+	(struct funcinfo, struct vms_private_data_struct): Ditto.
+	(struct vms_section_data_struct): Ditto.
+	(struct vms_rec_rd, stryct vms_rec_wr): New declarations.
+	(vms_get_module_name, get_vms_time_string): New declarations.
+	(vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
+	(_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
+	(_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
+	(_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
+	(_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
+	(_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
+	(_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
+	(_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
+	(_bfd_vms_output_fill): Ditto.
+	(bfd_vms_set_section_flags): Ditto.
+
+2010-04-14  Matthew Gretton-Dann  <[email protected]>
+
+	* elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
+	exit due to merging the same weak symbol to test that the symbols are
+	actually weak.
+
+2010-04-13  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
+	when optimizing high got_tlsgd/ld insns.
+
+2010-04-10  H.J. Lu  <[email protected]>
+
+	* hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
+	define.
+	(HAVE_PRSTATUS32_T): Likewise.
+
+2010-04-10  H.J. Lu  <[email protected]>
+
+	PR corefiles/11467
+	* configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
+	for x86_64-*-linux*.
+	* config.in: Regenerated.
+	* configure: Likewise.
+
+	* elf.c: Include CORE_HEADER if it is defined.
+
+2010-04-10  H.J. Lu  <[email protected]>
+	    Jan Kratochvil  <[email protected]>
+
+	* hosts/x86-64linux.h: New.
+
+2010-04-09  Nick Clifton  <[email protected]>
+
+	* aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
+	* elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
+	variables htab and hdr_info and mark info parameter as unused.
+	* elf.c (prep_headers): Remove unused variable i_phdrp.
+	(_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
+	* elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
+	as unused.
+	* peXXigen.c (pe_print_reloc): Remove unused variable datasize.
+	* verilog.c (verilog_write_section): Remove unused variable
+	address.
+
+2010-04-07  Alan Modra  <[email protected]>
+
+	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
+	* configure: Regenerate.
+
+2010-04-06  H.J. Lu  <[email protected]>
+
+	PR ld/11434
+	* elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
+
+2010-04-06  Tristan Gingold  <[email protected]>
+
+	* vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
+
+2010-04-05  Jakub Jelinek  <[email protected]>
+
+	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
+	provided that it has the expected address size and zero segment
+	length.
+
+	* dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
+	(struct line_info): Add op_index field, change end_sequence type to
+	unsigned char.
+	(new_line_sorts_after): For the same address compare op_index.
+	(add_line_info): Add op_index argument, store it into the structure.
+	(decode_line_info): Complain about unknown versions of .debug_line.
+	Initialize maximum_ops_per_insn.  Add op_index state register and
+	track it.
+
+2010-04-01  Nathan Sidwell  <[email protected]>
+
+	* elf32-ppc.c (apuinfo_set): New static var.
+	(ppc_elf_begin_write_processing): Set it here, always create an
+	APUinfo section if there were any in the inputs.
+	(ppc_elf_write_section): Check apuinfo_set.
+	(ppc_elf_final_write_processing): Likewise.
+
+2010-04-01  Tristan Gingold  <[email protected]>
+
+	* vms.h: Include time.h. Add prototypes for vms_get_module_name,
+	vms_time_to_time_t and vms_rawtime_to_time_t.
+	* vms.c (vms_alpha_vec): Add archives support.
+	* vms-misc.c: Include safe-ctype.h
+	(vms_get_module_name): New function.
+	(vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
+	* vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
+	vms_get_module_name function.  Use this function.
+	* targets.c: Declare vms_lib_txt_vec.  Add it to _bfd_target_vector.
+	* libbfd-in.h: Add prototype for _bfd_append_relative_path.
+	Add prototypes for vms-lib.c
+	* libbfd.h: Regenerate.
+	* configure.in (TDEFINES): Add an entry for vms_lib_txt_vec.  Add
+	vms-lib.lo to vms_alpha_vec.
+	* config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
+	* configure: Regenerate.
+	* bfd.c: Add selective_search field.
+	* bfd-in2.h: Regenerate.
+	* archive.c (append_relative_path): Rename to
+	_bfd_append_relative_path and make it public.
+	(_bfd_get_elt_at_filepos): Adjust for above renaming.
+	* Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
+	(BFD32_BACKENDS_CFILES): Add vms-lib.c
+	* Makefile.in: Regenerate.
+
+2010-04-01  Jakub Jelinek  <[email protected]>
+
+	* dwarf2.c (read_attribute_value): Handle CU version 4
+	for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
+	and DW_FORM_flag_present.  For unknown form value return NULL.
+	(scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
+	like DW_FORM_block.
+	(parse_comp_unit): Allow CU version 4.
+
+2010-04-01  Hans-Peter Nilsson  <[email protected]>
+
+	* elf32-cris.c (cris_elf_relocate_section): Correct first argument
+	to _bfd_elf_get_dynamic_reloc_section.
+	(elf_cris_discard_excess_dso_dynamics): Ditto.
+
+2010-03-31  Kai Tietz  <[email protected]>
+
+	* coff-i386.c (in_reloc_p): Check also for R_SECREL32.
+	* coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
+
+2010-03-31  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
+	TPREL16_HI and TPREL16_HA insns.
+
+2010-03-31  Hans-Peter Nilsson  <[email protected]>
+
+	PR ld/11458
+	* elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
+	assert of empty pcrel_relocs_copied on the direct symbol.  Instead
+	of moving the list from the indirect symbol to the direct symbol,
+	merge into any existing list.
+	(cris_elf_check_relocs): Store the original section in the
+	pcrel_relocs_copied list, not the relocation section.
+	(elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
+	the relocation section, for reducing its size.  Change the
+	BFD_ASSERT into a check for the section being read-only, and only
+	emit warnings and TEXTREL marker when there's an entry for a
+	read-only section.
+
+2010-03-29  Daniel Jacobowitz  <[email protected]>
+
+	* elf32-arm.c (using_thumb_only): Handle v6-M.
+
+2010-03-26  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
+	* bfd-in.h (elf_discarded_section): Clarify comment.
+	* reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
+	* bfd-in2.h: Regenerate.
+
+2010-03-26  Matt Rice  <[email protected]>
+
+	* archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
+	as unique in the armap.
+
+2010-03-26  Alan Modra  <[email protected]>
+
+	PR ld/11375
+	* elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
+	possible stub on branches.
+
+2010-03-25  Joseph Myers  <[email protected]>
+
+	* Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
+	(ALL_MACHINES_CFILES): Add cpu-tic6x.c.
+	(BFD32_BACKENDS): Add elf32-tic6x.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
+	* Makefile.in: Regenerate.
+	* archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
+	(bfd_archures_list): Update.
+	* config.bfd (tic6x-*-elf): New.
+	* configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
+	New.
+	* configure: Regenerate.
+	* cpu-tic6x.c, elf32-tic6x.c: New.
+	* reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
+	BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
+	BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
+	BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
+	BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
+	BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
+	BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
+	BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
+	BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
+	BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
+	BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
+	BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
+	BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
+	* targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
+	(_bfd_target_vector): Update.
+	* bfd-in2.h, libbfd.h: Regenerate.
+
+2010-03-24  H.J. Lu  <[email protected]>
+
+	* aout-target.h: Update copyright year.
+	* aout-tic30.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-rs6000.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* elf64-mips.c: Likewise.
+	* ieee.c: Likewise.
+	* libecoff.h: Likewise.
+	* mach-o-target.c: Likewise.
+	* mach-o.c: Likewise.
+	* oasys.c: Likewise.
+	* targets.c: Likewise.
+
+2010-03-24  H.J. Lu  <[email protected]>
+
+	* libbfd-in.h: Update copyright year.
+
+2010-03-21  H.J. Lu  <[email protected]>
+
+	PR ld/11413
+	* elflink.c (_bfd_elf_add_default_symbol): Check !executable
+	instead of shared.
+
+2010-03-19  Jie Zhang  <[email protected]>
+
+	* elf32-arm.c (struct section_list): Remove.
+	(section_list): Remove typedef.
+	(record_section_with_arm_elf_section_data): Remove.
+	(find_arm_elf_section_entry): Remove.
+	(get_arm_elf_section_data): Use is_arm_elf.
+	(unrecord_section_with_arm_elf_section_data): Remove.
+	(elf32_arm_new_section_hook): Don't call
+	record_section_with_arm_elf_section_data.
+	(elf32_arm_write_section): Set mapcount to -1 when
+	the map has been used. Don't call
+	unrecord_section_with_arm_elf_section_data.
+	(unrecord_section_via_map_over_sections): Remove.
+	(elf32_arm_close_and_cleanup): Remove.
+	(elf32_arm_bfd_free_cached_info): Remove.
+	(bfd_elf32_close_and_cleanup): Don't define.
+	(bfd_elf32_bfd_free_cached_info): Don't define.
+
+2010-03-18  H.J. Lu  <[email protected]>
+
+	PR binutils/11396
+	* libcoff-in.h (pe_tdata): Add dont_strip_reloc.
+	* libcoff.h: Regenerated.
+
+	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
+	if dont_strip_reloc is set.
+	(_bfd_XX_bfd_copy_private_bfd_data_common): Set
+	dont_strip_reloc on output if there is no .reloc and
+	IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
+
+2010-03-18  Wei Guozhi  <[email protected]>
+
+	PR gas/11323
+	* elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
+	R_ARM_GOT_PREL.
+	* reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2010-03-17  H.J. Lu  <[email protected]>
+
+	* reloc.c (BFD_RELOC_SPU_PIC18): Removed.
+	(BFD_RELOC_SPU_STUB): Likewise.
+
+2010-03-17  Jie Zhang  <[email protected]>
+
+	* elf.c (assign_file_positions_for_load_sections): Avoid
+	overflow.
+
+2010-03-17  Alan Modra  <[email protected]>
+
+	PR binutils/11382
+	* plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
+	proper type.
+
+2010-03-17  Alan Modra  <[email protected]>
+
+	* elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
+
+2010-03-16  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
+	(ppc64_elf_edit_toc): Set it here.
+	(ha_reloc_match): New function.
+	(ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
+
+2010-03-15  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
+	* elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
+
+2010-03-14  Alan Modra  <[email protected]>
+
+	PR ld/11378
+	* elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
+	* elf64-ppc.c (call_check_done): Define.
+	(ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
+	(ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
+	(ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
+	(toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
+	Simplify return logic.  Iterate over all .init and .fini fragments
+	by recursion.  Set makes_toc_func_call here..
+	(ppc64_elf_next_input_section): ..rather than here.
+	(check_pasted_section, ppc64_elf_check_init_fini): New functions.
+
+2010-03-13  Alan Modra  <[email protected]>
+
+	PR ld/11375
+	* elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
+	function descriptor symbol if there is one, not just for plt stubs.
+	(ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
+
+2010-03-05  Rainer Orth  <[email protected]>
+
+	* elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
+	version twice.
+	Skip it when constructing def.vd_next.
+
+	* elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
+	bfd_elf32_i386_sol2_vec.
+	(TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
+	(elf32_bed): Redefine to elf32_i386_sol2_bed.
+	(elf_backend_want_plt_sym): Redefine to 1.
+
+	* elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
+	bfd_elf64_x86_64_sol2_vec.
+	(TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
+	(elf64_bed): Redefine to elf64_x86_64_sol2_bed.
+	(elf_backend_want_plt_sym): Redefine to 1.
+
+	* config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
+	bfd_elf32_i386_sol2_vec.
+	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
+	targ64_selvecs.
+	(x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
+	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
+	targ_selvecs.
+
+	* configure.in: Handle bfd_elf32_i386_sol2_vec,
+	bfd_elf64_x86_64_sol2_vec.
+	* configure: Regenerate.
+
+	* targets.c (bfd_elf32_i386_sol2_vec): Declare.
+	(bfd_elf64_x86_64_sol2_vec): Declare.
+	(_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
+	bfd_elf64_x86_64_sol2_vec.
+
+2010-03-04  Daniel Jacobowitz  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
+	sections.
+
+2010-03-04  Alan Modra  <[email protected]>
+
+	PR 11302
+	* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
+	(read_attribute_value, decode_line_info): Likewise.
+	(add_line_info, read_rangelist): Return FALSE on alloc failures.
+	(arange_add, sort_line_sequences): Likewise.
+	(find_abstract_instance_name): Handle failures from called funcs.
+	(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
+	(find_line): Realloc to a temp, and handle alloc fail.
+
+2010-03-03  Daniel Jacobowitz  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
+	a mapping symbol to an empty section.
+
+2010-03-02  Matthew Gretton-Dann  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
+	return value from the call to _bfd_elf_merge_object_attributes.
+
+2010-03-02  Christophe Lyon  <[email protected]>
+	Alan Modra  <[email protected]>
+
+	* elf32-arm.c (a8_erratum_fix): Add st_type field to record the
+	destination mode of the a8 stub.
+	(elf32_arm_link_hash_table): Add top_id field.
+	(elf32_arm_link_hash_table_create): Initialize top_id.
+	(arm_type_of_stub): Update prototype, st_type can now be updated
+	by this function. Actual destination address in case of PLT is
+	computed here, to help factorizing code.
+	(elf32_arm_stub_name): Update prototype, use stub_type additional
+	parameter to build stub name.
+	(elf32_arm_get_stub_entry): Update prototype, use stub_type
+	additional parameter to build stub entry.
+	(arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
+	put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
+	Call elf32_arm_final_link_relocate to process all in-stub
+	relocations.
+	(elf32_arm_setup_section_lists): Update top_id.
+	(cortex_a8_erratum_scan): Record stub destination mode.
+	(elf32_arm_size_stubs): Update call to arm_type_of_stub according
+	to new prototype.
+	(elf32_arm_final_link_relocate): Enable processing of in-stub
+	REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
+	needed, enabling code factorization.
+	(elf32_arm_final_link): Process stub sections.
+	(elf32_arm_output_map_sym): Add entry to code/data map.
+
+2010-03-01  David S. Miller  <[email protected]>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
+	h->def_regular, set h->ref_regular.
+	(allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
+	and dynamic relocations if h->ref_regular.
+
+	* elfxx-sparc.c (struct elf_reloc_map): Delete.
+	(sparc_reloc_map): Delete.
+	(_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
+	relocation type in switch statements.
+
+2010-02-25  Alan Modra  <[email protected]>
+
+	PR ld/11304
+	* elf.c (_bfd_elf_init_private_section_data): Rename need_group
+	to final_link and invert.  For final link allow some flags to
+	differ.  Don't specially allow flags to be all zero.
+
+2010-02-24  Alan Modra  <[email protected]>
+
+	PR binutils/10858
+	* elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
+	SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
+	table.
+
+2010-02-23  Andrew Zabolotny  <[email protected]>
+
+	PR binutils/11297
+	* elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
+	(avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
+
+2010-02-22  Alan Modra  <[email protected]>
+
+	* reloc.c (bfd_check_overflow): When forming addrmask, shift
+	fieldmask left by rightshift.
+	(_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
+	overflow checks.
+
+2010-02-20  H.J. Lu  <[email protected]>
+
+	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
+	STT_GNU_IFUNC on large common symbol.
+
+2010-02-18  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c (elf_i386_add_symbol_hook): Don't set
+	has_ifunc_symbols if the symbol comes from a shared library.
+	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
+	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
+	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
+	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
+	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
+
+2010-02-19  Alan Modra  <[email protected]>
+
+	* elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
+	(_bfd_elf_copy_private_header_data): ..here.
+	* elflink.c (_bfd_elf_size_group_sections): New function.
+	(bfd_elf_size_dynamic_sections): Call it.
+	* elf-bfd.h (_bfd_elf_size_group_sections): Declare.
+	(_bfd_elf_fixup_group_sections): Declare.
+
+2010-02-18  Matthew Gretton-Dann  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
+	merging Tag_DIV_use, Tag_MPextension_use, and
+	Tag_MPextension_use_legacy tags.
+
+2010-02-18  Alan Modra  <[email protected]>
+
+	* elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
+	commit.  Don't write zeros for removed group members.
+	(_bfd_elf_copy_private_header_data): Adjust size of group section
+	when group members are removed by objcopy.
+
+2010-02-15  Dave Korn  <[email protected]>
+
+	PR binutils/11280
+	* configure.host (*-*-solaris2.11):  Add host define to select
+	valid default code page for windres/windmc on solaris.
+
+2010-02-15  Nick Clifton  <[email protected]>
+
+	* po/vi.po: Updated Vietnamese translation.
+
+2010-02-12  Daniel Gutson  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_output_arch_local_syms): add
+	missing mapping symbol to data only sections.
+
+2010-02-11  David S. Miller  <[email protected]>
+
+	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
+	and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
+	symbols.
+	(_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
+	these relocs on global symbols.
+	(gdopoff): New.
+	(_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
+	local symbol references which are not STT_GNU_IFUNC.  Handle
+	relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
+	and deal with negative vs. non-negative values properly.
+
+2010-02-09  Tristan Gingold  <[email protected]>
+
+	* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
+	non-external relocation.
+
+2010-02-09  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (merge_got_entries): Move earlier in file.
+	(allocate_dynrelocs): Merge got entries here if not doing multi-toc.
+	(ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
+	(ppc64_elf_layout_multitoc): Don't resize if we have already
+	merged got entries.
+
+2010-02-09  Michael Holzheu  <[email protected]>
+
+	* elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+	elfcore_write_s390_prefix): New.
+	* elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+	elfcore_write_s390_prefix): New.
+	(elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
+	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
+	(elfcore_write_register_note): Handle .reg-s390-timer,
+	.reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
+	.reg-s390-prefix section.
+
+2010-02-09  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
+	unsigned char.  Update variables and code using them throughout file.
+	(struct ppc_link_hash_entry): Likewise for tls_mask.
+
+	* elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
+
+	* elf64-ppc.c (has_small_toc_reloc): Don't define.
+	(makes_toc_func_call, call_check_in_progress): Shuffle flags.
+	(struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
+	code setting the flag.
+	(ppc64_elf_next_toc_section): Group big-toc sections in
+	0x80008000 chunks.
+
+2010-02-08  David S. Miller  <[email protected]>
+
+	* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
+	srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
+
+	* elfxx-sparc.c (create_got_section): Delete.
+	(_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
+	section creator does that work for us.  Use ->elf.foo instead of
+	->foo where applicable.
+	(_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
+	where applicable.
+	(allocate_dynrelocs): Likewise.
+	(_bfd_sparc_elf_size_dynamic_sections): Likewise.
+	(_bfd_sparc_elf_relocate_section): Likewise.
+	(sparc_vxworks_build_plt_entry): Likewise.
+	(_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
+	(sparc_finish_dyn): Likewise.
+	(sparc_vxworks_finish_exec_plt): Likewise.
+	(sparc_vxworks_finish_shared_plt): Likewise.
+	(_bfd_sparc_elf_finish_dynamic_sections): Likewise.
+
+	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
+	macros for visibilty and locality checks.
+	(_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
+	(allocate_dynrelocs): Likewise.
+	(_bfd_sparc_elf_relocate_section): Likewise.
+	(_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
+
+	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
+	but never used local var 'dynobj'.
+
+	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
+	nocopyreloc.
+
+	* reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
+	(BFD_RELOC_SPARC_IRELATIVE): Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
+	and loc_hash_memory.
+	(_bfd_sparc_elf_link_hash_table_free): Declare.
+	* elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
+	(elf_backend_add_symbol_hook, elf_backend_post_process_headers,
+	bfd_elf32_bfd_link_hash_table_free): Define.
+	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
+	has_ifunc_symbols if STT_GNU_IFUNC.
+	(bfd_elf64_bfd_link_hash_table_free): Define.
+	(elf_backend_post_process_headers): Define always.
+	* elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
+	(sparc_reloc_map): Add entries for new IFUNC relocs.
+	(_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
+	(_bfd_sparc_elf_info_to_howto_ptr): Likewise.
+	(elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
+	elf_sparc_get_local_sym_hash): New.
+	(_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
+	from here...
+	(_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
+	local hash table.
+	(_bfd_sparc_elf_link_hash_table_free): New.
+	(create_ifunc_sections): New.
+	(_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
+	and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
+	cons up a fake local hash table entry for it.  Unconditionally add
+	a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
+	dyn relocs for ifunc.
+	(_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
+	(allocate_dynrelocs):  Unconditionally emit a PLT entry when
+	STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
+	(allocate_local_dynrelocs): New function.
+	(_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
+	table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
+	like splt.
+	(_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
+	(_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
+	plt in iplt/irelplt.
+
+2010-02-08  Richard Sandiford  <[email protected]>
+
+	* xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
+	max_contents_size, only consider sections whose contents must
+	be swapped in.
+
+2010-02-09  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
+	(ppc64_elf_size_dynamic_sections): ..and here..
+	(merge_got_entries): ..rather than here.
+
+2010-02-09  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
+	(has_small_toc_reloc): Define.
+	(ppc64_elf_check_relocs): Set the above flags.
+	(ppc64_elf_edit_opd): Delete obfd param.
+	(ppc64_elf_tls_optimize): Likewise.
+	(ppc64_elf_edit_toc): Likewise.
+	(ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
+	* elf64-ppc.h: Update prototypes.
+
+2010-02-08  Alan Modra  <[email protected]>
+
+	* section.c (struct bfd_section): Delete has_tls_reloc,
+	has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
+	Add sec_flg0 thru sec_flg5.
+	(BFD_FAKE_SECTION): Update for changed flags.
+	* ecoff.c (bfd_debug_section): Likewise.
+	* elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
+	* elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
+	(has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
+	* elf32-xtensa.c (reloc_done): Define.
+	* elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
+	* bfd-in2.h: Regenerate.
+
+2010-02-08  Tristan Gingold  <[email protected]>
+
+	* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
+	for non-scattered relocations.
+
+2010-02-08  Nathan Sidwell  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
+	apuinfo sections, only scan input sections once and reuse the
+	buffer.
+
+2010-02-08  Philipp Tomsich  <[email protected]>
+
+	* archures.c (bfd_mach_ppc_titan): Define.
+	* bfd-in2.h: Regenerate.
+	* cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
+
+2010-02-08  Alan Modra  <[email protected]>
+
+	* elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
+
+2010-02-05  Sterling Augustine  <[email protected]>
+
+	* elf.c (assign_file_positions_for_load_sections) Update lma of
+	section	if necessary.  Fixes Bugzilla 11219.
+
+2010-02-05  H.J. Lu  <[email protected]>
+
+	* elf32-i386.c: Remove trailing white spaces.
+	* elf64-x86-64.c: Likewise.
+
+2010-02-03  Nick Clifton  <[email protected]>
+
+	* elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
+	entries for other architectures.
+	(struct elf_link_hash_table): Add hash_table_id field.
+	(elf_hash_table_id): New accessor macro.
+	* elflink.c (_bfd_elf_link_hash_table_init): Add target_id
+	parameter.
+	* elf-m10300.c (elf32_mn10300_hash_table): Check table id before
+	returning cast pointer.
+	(elf32_mn10300_link_hash_table_create): Identify new table as
+	containing MN10300 extensions.
+	(mn10300_elf_relax_section): Check pointer returned by
+	elf32_mn10300_hash_table.
+	* elf32-arm.c: Likewise, except using ARM extensions.
+	* elf32-avr.c: Likewise, except using AVR extensions.
+	* elf32-bfin.c: Likewise, except using BFIN extensions.
+	* elf32-cris.c: Likewise, except using CRIS extensions.
+	* elf32-frv.c: Likewise, except using FRV extensions.
+	* elf32-hppa.c: Likewise, except using HPPA32 extensions.
+	* elf32-i386.c: Likewise, except using I386 extensions.
+	* elf32-lm32.c: Likewise, except using LM32 extensions.
+	* elf32-m32r.c: Likewise, except using M32RM extensions.
+	* elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
+	* elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
+	* elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
+	* elf32-m68k.c: Likewise, except using M68K extensions.
+	* elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
+	* elf32-ppc.c: Likewise, except using PPC32 extensions.
+	* elf32-s390.c: Likewise, except using S390 extensions.
+	* elf32-sh.c: Likewise, except using SH extensions.
+	* elf32-spu.c: Likewise, except using SPU extensions.
+	* elf32-xtensa.c: Likewise, except using XTENSA extensions.
+	* elf64-alpha.c: Likewise, except using ALPHA extensions.
+	* elf64-hppa.c: Likewise, except using HPPA64 extensions.
+	* elf64-ppc.c: Likewise, except using PPC64 extensions.
+	* elf64-s390.c: Likewise, except using S390 extensions.
+	* elf64-x86-64.c: Likewise, except using X86_64 extensions.
+	* elfxx-ia64.c: Likewise, except using IA64 extensions.
+	* elfxx-mips.c: Likewise, except using MIPS extensions.
+	* elfxx-sparc.c: Likewise, except using SPARC extensions.
+	* elfxx-sparc.h: Likewise, except using SPARC extensions.
+	* elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
+	redundant structure.
+	(elf32_cr16_hash_table): Delete unused macro.
+	(elf32_cr16_link_hash_traverse): Delete unused macro.
+	* elf32-score.c: Likewise.
+	* elf32-score7.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf64-sh64.c: Likewise.
+
+2010-02-03  Alan Modra  <[email protected]>
+
+	* elf64-ppc.c (struct plt_entry): Move earlier in file.
+	(struct got_entry): Likewise.  Add is_indirect and got.ent fields.
+	(struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
+	Update all uses.
+	(struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
+	Remove no_multi_toc.
+	(update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
+	when allocating a new struct got_entry.
+	(allocate_got): New function, extracted from..
+	(allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
+	(ppc64_elf_size_dynamic_sections): Track got relocs allocated in
+	.reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
+	(ppc64_elf_setup_section_lists): Remove output_bfd param and
+	no_multi_toc, add add_stub_section and layout_sections_again.  Stash
+	new params in htab.  Extract some code to..
+	(ppc64_elf_start_multitoc_partition): ..here.  New function.
+	(ppc64_elf_next_toc_section): Check for linker script errors.  Handle
+	second pass toc scan.
+	(merge_got_entries, merge_global_got, reallocate_got): New functions.
+	(ppc64_elf_reinit_toc): Rename to..
+	(ppc64_elf_finish_multitoc_partition): ..this.
+	(ppc64_elf_layout_multitoc): New function.
+	(ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
+	layout_sections_again params.
+	(ppc64_elf_relocate_section): Handle indirect got entries.
+	* elf64-ppc.h: Update prototypes.  Declare new functions.
+
+2010-02-02  H.J. Lu  <[email protected]>
+
+	* elf-bfd.h (elfcore_write_xstatereg): New.
+
+	* elf.c (elfcore_grok_xstatereg): New.
+	(elfcore_write_xstatereg): Likewise.
+	(elfcore_grok_note): Handle NT_X86_XSTATE.
+	(elfcore_write_register_note): Handle .reg-xstate section.
+
+2010-02-01  Tristan Gingold  <[email protected]>
+
+	* som.c (som_write_ar_hdr): Define this macro.
+
+2010-01-30  John David Anglin  <[email protected]>
+
+	* elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
+	R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
+	linkage table pointer to use the global table pointer if not doing
+	a shared link.
+
+2010-01-29  Joel Brobecker  <[email protected]>
+
+	* elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
+	if it has already been set.
+
+2010-01-27  Tristan Gingold  <[email protected]>
+
+	* vms.h: Remove trailing spaces.
+	(struct hdr_struct): Remove unused hdr_c_cpr field.
+	(enum file_format_enum): Add comments.
+	* vms.c (vms_bfd_print_private_bfd_data): New function that
+	replaces the macro.
+	Remove trailing spaces.
+	* vms-misc.c: Improve comments.
+	(_bfd_vms_get_object_record): Also handle files without pads.
+	* vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
+	* vms-gsd.c (struct flagdescstruct): Make name field const.
+	(gsyflagdesc): Fix typo.
+
+2010-01-27  Alan Modra  <[email protected]>
+
+	PR ld/11217
+	* elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
+	(ppc64_elf_setup_section_lists): Init them.
+	(ppc64_elf_next_toc_section): Don't partition multi-toc between .got
+	and .toc on the same input file.
+	(ppc64_elf_relocate_section): Correct GOT entry offset.
+
+2010-01-26  Tristan Gingold  <[email protected]>
+
+	* targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
+	(bfd_target): Add _bfd_write_ar_hdr_fn field.
+	* archive.c (is_bsd44_extended_name): New macro.
+	(_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
+	(bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
+	name.
+	(_bfd_archive_bsd44_construct_extended_name_table): New function.
+	(_bfd_generic_write_ar_hdr): Ditto.
+	(_bfd_bsd44_write_ar_hdr): Ditto.
+	(_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
+	(bsd_write_armap): Adjust firstreal computation.
+	* libbfd-in.h (struct areltdata): Add extra_size field.
+	(_bfd_generic_write_ar_hdr): Add prototype.
+	(_bfd_bsd44_write_ar_hdr): Ditto.
+	(_bfd_write_ar_hdr): Define.
+	(_bfd_noarchive_write_ar_hdr): Ditto.
+	(_bfd_archive_bsd_write_ar_hdr): Ditto.
+	(_bfd_archive_coff_write_ar_hdr): Ditto.
+	(_bfd_archive_bsd44_slurp_armap): Ditto.
+	(_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
+	(_bfd_archive_bsd44_construct_extended_name_table): New prototype.
+	(_bfd_archive_bsd44_truncate_arname): Ditto.
+	(_bfd_archive_bsd44_write_armap): Ditto.
+	(_bfd_archive_bsd44_read_ar_hdr): Ditto.
+	(_bfd_archive_bsd44_write_ar_hdr): Ditto.
+	(_bfd_archive_bsd44_openr_next_archived_file): Ditto.
+	(_bfd_archive_bsd44_get_elt_at_index): Ditto.
+	(_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
+	(_bfd_archive_bsd44_update_armap_timestamp): Ditto.
+	* libbfd.h: Regenerate.
+	* oasys.c (oasys_write_ar_hdr): Define.
+	* libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
+	* ieee.c (ieee_write_ar_hdr): Define.
+	* elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
+	* coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
+	(bfd_pmac_xcoff_backend_data): Ditto.
+	* coff64-rs6000.c (rs6000coff64_vec): Ditto.
+	(bfd_xcoff_aix5_backend_data): Ditto.
+	* coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
+	* aout-target.h (MY_write_ar_hdr): Define it if not defined.
+	* aout-tic30.c (MY_write_ar_hdr): Ditto.
+	* mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
+	(bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
+	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
+	(bfd_mach_o_construct_extended_name_table)
+	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
+	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
+	(bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
+	* mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
+	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
+	(bfd_mach_o_construct_extended_name_table)
+	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
+	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
+	(bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
+	* bfd-in2.h: Regenerate.
+
+2010-01-26  Alan Modra  <[email protected]>
+	    H.J. Lu  <[email protected]>
+
+	PR ld/11218
+	* elflink.c (elf_link_output_extsym): Do not ignore undefined
+	symbols with ref_regular set when gc_sections is active.
+
+2010-01-25  Alan Modra  <[email protected]>
+
+	PR ld/11217
+	* elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
+	with relocations against undefined weak symbols.
+	(ppc64_elf_relocate_section): Don't optimize calls to undefined
+	weak functions if the symbol is dynamic.
+	(ppc64_elf_relocate_section): Edit tprel tls sequences.
+	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+	(_bfd_elf_ppc_at_tprel_transform): New function.
+	* bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
+	* bfd-in2.h: Regenerate.
+
+2010-01-23  Richard Sandiford  <[email protected]>
+
+	* coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
+	(_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
+	* coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
+	bitsize to 1.
+	(xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
+
+2010-01-21  Nick Clifton  <[email protected]>
+
+	* elflink.c (elf_link_add_object_symbols): Look up name of
+	undefined symbol both before and after versioning has been
+	applied.  Do not bother with symbols that are weakly undefined.
+
+2010-01-21  Andreas Krebbel  <[email protected]>
+
+	* elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
+	(bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
+
+2010-01-19  Cary Coutant  <[email protected]>
+
+	* dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
+
+2010-01-19  Daisuke Hatayama  <[email protected]>
+	    Alan Modra <[email protected]>
+
+	* elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
+	(elf_object_p): Read e_phnum extension.
+	(elf_write_shdrs_and_ehdr): Write e_phnum extension.
+	* elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
+	that we can read last program header.
+
+2010-01-19  Matthew Gretton-Dann  <[email protected]>
+
+	* elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
+	R_ARM_THM_CALL entry.
+	(elf32_arm_final_link_relocate): Correct calculation of
+	reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
+	or R_ARM_THM_JUMP24 relocation.
+
+2010-01-18  Alan Modra  <[email protected]>
+
+	PR 11168
+	* coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
+	block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
+	than 32k sections.
+
+2010-01-15  Jan Kratochvil  <[email protected]>
+
+	Fix compilation warning on gcc-3.4.
+	* vms-tir.c (start_etir_record, sto_imm): Rename the prototype
+	parameter index to sec_index according to the function definition.
+
+2010-01-13  Chao-ying Fu  <[email protected]>
+
+	* elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
+	It is true for all CPUs.
+	(jal_reloc_p): New function.
+	(mips_elf_calculate_relocation): Rename require_jalxp to
+	cross_mode_jump_p.
+	Update comment for CROSS_MODE_JUMP_P.
+	Set up cross_mode_jump_p based on the mode change.
+	(mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
+	Update comment for CROSS_MODE_JUMP_P.
+	Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
+	Use !cross_mode_jump_p to guard conversion.
+	Convert "jr t9" to "b", if possible.
+	(_bfd_mips_elf_relocate_section): Rename require_jalx to
+	cross_mode_jump_p.
+	Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
+	Pass cross_mode_jump_p to call mips_elf_perform_relocation.
+
+2010-01-13  Nick Clifton  <[email protected]>
+
+	* cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
+	"m32c" returns the m32c arch_info_struct and not the m16c
+	arch_info_struct.
+	(arch_info_struct): Use the new scan function.
+	(bfd_m32c_arch): Likewise.
+
+2010-01-13  Tristan Gingold  <[email protected]>
+
+	* config.bfd: Remove duplicated target vector for i386-*-darwin.
+	Appends new arch instead of overriding.
+	Use mach_o_x86_64_vec for x86_64-*-darwin.
+	* configure.in: Add mach_o_x86_64_vec.
+	* configure: Regenerate.
+	* targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
+	* Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
+	(BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
+	* Makefile.in: Regenerate.
+	* mach-o-x86-64.c: New file.
+
+2010-01-13  Tristan Gingold  <[email protected]>
+
+	* reloc.c: Add MACH_O_X86_64 relocations.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2010-01-13  Tristan Gingold  <[email protected]>
+
+	* archive.c (normalize): Use lbasename.
+	(bfd_bsd_truncate_arname): Ditto.
+	(bfd_gnu_truncate_arname): Ditto.
+
+2010-01-12  Tristan Gingold  <[email protected]>
+
+	* makefile.vms (CFLAGS): Turns warnings into informational messages.
+
+2010-01-11  Tristan Gingold  <[email protected]>
+
+	* mach-o.h: Add x86-64 relocation types.
+
+2010-01-11  Tristan Gingold  <[email protected]>
+
+	* mach-o.h (bfd_mach_o_backend_data): Add arch field.
+	(bfd_mach_o_set_arch_mach): New prototype.
+	* mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
+	(bfd_mach_o_set_arch_mach): New function.
+	(bfd_mach_o_gen_mkobject): New function.
+	Set TARGET_ARCHITECTURE for the generic back-ends.
+	* mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
+	Check that TARGET_ARCHITECTURE is defined.
+	Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
+	* mach-o-i386.c (TARGET_ARCHITECTURE): Define.
+
+2010-01-11  Tristan Gingold  <[email protected]>
+
+	* archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
+
+2010-01-11  Nick Clifton  <[email protected]>
+
+	* elf32-v850.c (v850_elf_perform_relocation): Fix overflow
+	handling of R_V850_HI16_S relocation.
+
+2010-01-11  Alan Modra  <[email protected]>
+
+	PR 11103
+	* dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
+
+2010-01-11  Alan Modra  <[email protected]>
+
+	PR 6832
+	* dwarf2.c (struct comp_unit): Add sec_info_ptr.
+	(find_abstract_instance_name): Use it.
+	(parse_comp_unit): Set it.
+
+2010-01-09  Ralf Wildenhues  <[email protected]>
+
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+
+2010-01-08  Tristan Gingold  <[email protected]>
+
+	* archive.c: Remove bfd_special_undocumented_glue.
+
+2010-01-08  Alan Modra  <[email protected]>
+
+	PR ld/11133
+	* elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
+	* elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
+	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
+
+2010-01-07  H.J. Lu  <[email protected]>
+
+	PR ld/11138
+	* elflink.c (elf_link_check_versioned_symbol): Don't abort if
+	a symbol referenced by DSO is is defined in a non-shared object
+	and forced local.
+
+2010-01-07  H.J. Lu  <[email protected]>
+
+	PR ld/11133
+	* elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
+	undefined __start_XXX/__stop_XXX in all input files and set
+	SEC_KEEP.
+
+2010-01-07  H.J. Lu  <[email protected]>
+
+	PR ld/11143
+	* elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
+
+2010-01-04  Daniel Gutson  <[email protected]>
+
+	* bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
+	before including procfs.h.
+	(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
+	* configure.in: Added autoconf probe for the pr_fpreg member.
+	* configure: Regenerated.
+	* config.in: Regenerated.
+	* elf.c: Define _STRUCTURE_PROC before including procfs.h.
+
+2010-01-04  Joel Brobecker  <[email protected]>
+
+	Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
+	* dwarf2.c (concat_filename): Rename dirname with dir_name
+	to void shadowing the dirname function.
+	Rename subdirname with subdir_name to stay consistent with
+	the new dir_name variable name.
+
+2010-01-04  Edmar Wienskoski  <[email protected]>
+
+	* archures.c: Add bfd_mach_ppc_e500mc64.
+	* bfd-in2.h: Regenerate.
+	* cpu-powerpc.c (bfd_powerpc_archs): Add entry for
+	bfd_mach_ppc_e500mc64.
+
+2010-01-01  Joel Brobecker  <[email protected]>
+
+	Fix -Wshadow warnings (seen on ppc-aix)
+	* xcofflink.c: Replace finfo by flinfo throughout.
+
+For older changes see ChangeLog-2009
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index bf5dea4..ea4fd28 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -91,6 +91,7 @@
 	cpu-i370.lo \
 	cpu-i386.lo \
 	cpu-l1om.lo \
+	cpu-k1om.lo \
 	cpu-i860.lo \
 	cpu-i960.lo \
 	cpu-ia64.lo \
@@ -132,6 +133,8 @@
 	cpu-tic54x.lo \
 	cpu-tic6x.lo \
 	cpu-tic80.lo \
+	cpu-tilegx.lo \
+	cpu-tilepro.lo \
 	cpu-v850.lo \
 	cpu-vax.lo \
 	cpu-w65.lo \
@@ -163,6 +166,7 @@
 	cpu-i370.c \
 	cpu-i386.c \
 	cpu-l1om.c \
+	cpu-k1om.c \
 	cpu-i860.c \
 	cpu-i960.c \
 	cpu-ia64.c \
@@ -204,6 +208,8 @@
 	cpu-tic54x.c \
 	cpu-tic6x.c \
 	cpu-tic80.c \
+	cpu-tilegx.c \
+	cpu-tilepro.c \
 	cpu-v850.c \
 	cpu-vax.c \
 	cpu-w65.c \
@@ -319,6 +325,8 @@
 	elf32-sparc.lo \
 	elf32-spu.lo \
 	elf32-tic6x.lo \
+	elf32-tilegx.lo \
+	elf32-tilepro.lo \
 	elf32-v850.lo \
 	elf32-vax.lo \
 	elf32-xc16x.lo \
@@ -328,6 +336,7 @@
 	elflink.lo \
 	elfxx-mips.lo \
 	elfxx-sparc.lo \
+	elfxx-tilegx.lo \
 	epoc-pe-arm.lo \
 	epoc-pei-arm.lo \
 	hp300bsd.lo \
@@ -500,6 +509,8 @@
 	elf32-sparc.c \
 	elf32-spu.c \
 	elf32-tic6x.c \
+	elf32-tilegx.c \
+	elf32-tilepro.c \
 	elf32-v850.c \
 	elf32-vax.c \
 	elf32-xc16x.c \
@@ -509,6 +520,7 @@
 	elflink.c \
 	elfxx-mips.c \
 	elfxx-sparc.c \
+	elfxx-tilegx.c \
 	epoc-pe-arm.c \
 	epoc-pei-arm.c \
 	hp300bsd.c \
@@ -602,9 +614,11 @@
 	elf64-s390.lo \
 	elf64-sh64.lo \
 	elf64-sparc.lo \
+	elf64-tilegx.lo \
 	elf64-x86-64.lo \
 	elf64.lo \
 	elfn32-mips.lo \
+	elfxx-ia64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
 	nlm32-alpha.lo \
@@ -634,9 +648,11 @@
 	elf64-s390.c \
 	elf64-sh64.c \
 	elf64-sparc.c \
+	elf64-tilegx.c \
 	elf64-x86-64.c \
 	elf64.c \
 	elfn32-mips.c \
+	elfxx-ia64.c \
 	mach-o-x86-64.c \
 	mmo.c \
 	nlm32-alpha.c \
@@ -653,6 +669,7 @@
 	irix-core.lo \
 	lynx-core.lo \
 	osf-core.lo \
+	rs6000-core.lo \
 	sco5-core.lo \
 	trad-core.lo
 
@@ -663,6 +680,7 @@
 	irix-core.c \
 	lynx-core.c \
 	osf-core.c \
+	rs6000-core.c \
 	sco5-core.c \
 	trad-core.c
 
@@ -709,7 +727,7 @@
 	libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
 	netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
 	pef.h pef-traceback.h peicode.h som.h version.h \
-	vms.h xcoff-target.h xsym.h
+	vms.h xsym.h
 
 ## ... and all .h files which are in the build tree.
 BUILD_HFILES = \
@@ -843,14 +861,14 @@
 	sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
 	mv -f elf64-target.new elf64-target.h
 
-elf32-ia64.c : elfxx-ia64.c
+elf32-ia64.c : elfnn-ia64.c
 	rm -f elf32-ia64.c
-	sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new
+	sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
 	mv -f elf32-ia64.new elf32-ia64.c
 
-elf64-ia64.c : elfxx-ia64.c
+elf64-ia64.c : elfnn-ia64.c
 	rm -f elf64-ia64.c
-	sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new
+	sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
 	mv -f elf64-ia64.new elf64-ia64.c
 
 peigen.c : peXXigen.c
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index b591ca6..741809c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -390,6 +390,7 @@
 	cpu-i370.lo \
 	cpu-i386.lo \
 	cpu-l1om.lo \
+	cpu-k1om.lo \
 	cpu-i860.lo \
 	cpu-i960.lo \
 	cpu-ia64.lo \
@@ -431,6 +432,8 @@
 	cpu-tic54x.lo \
 	cpu-tic6x.lo \
 	cpu-tic80.lo \
+	cpu-tilegx.lo \
+	cpu-tilepro.lo \
 	cpu-v850.lo \
 	cpu-vax.lo \
 	cpu-w65.lo \
@@ -462,6 +465,7 @@
 	cpu-i370.c \
 	cpu-i386.c \
 	cpu-l1om.c \
+	cpu-k1om.c \
 	cpu-i860.c \
 	cpu-i960.c \
 	cpu-ia64.c \
@@ -503,6 +507,8 @@
 	cpu-tic54x.c \
 	cpu-tic6x.c \
 	cpu-tic80.c \
+	cpu-tilegx.c \
+	cpu-tilepro.c \
 	cpu-v850.c \
 	cpu-vax.c \
 	cpu-w65.c \
@@ -619,6 +625,8 @@
 	elf32-sparc.lo \
 	elf32-spu.lo \
 	elf32-tic6x.lo \
+	elf32-tilegx.lo \
+	elf32-tilepro.lo \
 	elf32-v850.lo \
 	elf32-vax.lo \
 	elf32-xc16x.lo \
@@ -628,6 +636,7 @@
 	elflink.lo \
 	elfxx-mips.lo \
 	elfxx-sparc.lo \
+	elfxx-tilegx.lo \
 	epoc-pe-arm.lo \
 	epoc-pei-arm.lo \
 	hp300bsd.lo \
@@ -800,6 +809,8 @@
 	elf32-sparc.c \
 	elf32-spu.c \
 	elf32-tic6x.c \
+	elf32-tilegx.c \
+	elf32-tilepro.c \
 	elf32-v850.c \
 	elf32-vax.c \
 	elf32-xc16x.c \
@@ -809,6 +820,7 @@
 	elflink.c \
 	elfxx-mips.c \
 	elfxx-sparc.c \
+	elfxx-tilegx.c \
 	epoc-pe-arm.c \
 	epoc-pei-arm.c \
 	hp300bsd.c \
@@ -903,9 +915,11 @@
 	elf64-s390.lo \
 	elf64-sh64.lo \
 	elf64-sparc.lo \
+	elf64-tilegx.lo \
 	elf64-x86-64.lo \
 	elf64.lo \
 	elfn32-mips.lo \
+	elfxx-ia64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
 	nlm32-alpha.lo \
@@ -935,9 +949,11 @@
 	elf64-s390.c \
 	elf64-sh64.c \
 	elf64-sparc.c \
+	elf64-tilegx.c \
 	elf64-x86-64.c \
 	elf64.c \
 	elfn32-mips.c \
+	elfxx-ia64.c \
 	mach-o-x86-64.c \
 	mmo.c \
 	nlm32-alpha.c \
@@ -954,6 +970,7 @@
 	irix-core.lo \
 	lynx-core.lo \
 	osf-core.lo \
+	rs6000-core.lo \
 	sco5-core.lo \
 	trad-core.lo
 
@@ -964,6 +981,7 @@
 	irix-core.c \
 	lynx-core.c \
 	osf-core.c \
+	rs6000-core.c \
 	sco5-core.c \
 	trad-core.c
 
@@ -1010,7 +1028,7 @@
 	libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
 	netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
 	pef.h pef-traceback.h peicode.h som.h version.h \
-	vms.h xcoff-target.h xsym.h
+	vms.h xsym.h
 
 BUILD_HFILES = \
 	bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h
@@ -1254,6 +1272,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ia64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ip2k.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-iq2000.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-k1om.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-l1om.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-lm32.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m10200.Plo@am__quote@
@@ -1291,6 +1310,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic54x.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic6x.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic80.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tilegx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tilepro.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-v850.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-vax.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-w65.Plo@am__quote@
@@ -1367,6 +1388,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sparc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-spu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-tic6x.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-tilegx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-tilepro.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-v850.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-vax.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xc16x.Plo@am__quote@
@@ -1383,12 +1406,15 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sh64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-tilegx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elflink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfn32-mips.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-ia64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-mips.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-sparc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-tilegx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoc-pe-arm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoc-pei-arm.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@
@@ -1464,6 +1490,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc16.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs6000-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco5-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@
@@ -1892,14 +1919,14 @@
 	sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
 	mv -f elf64-target.new elf64-target.h
 
-elf32-ia64.c : elfxx-ia64.c
+elf32-ia64.c : elfnn-ia64.c
 	rm -f elf32-ia64.c
-	sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new
+	sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
 	mv -f elf32-ia64.new elf32-ia64.c
 
-elf64-ia64.c : elfxx-ia64.c
+elf64-ia64.c : elfnn-ia64.c
 	rm -f elf64-ia64.c
-	sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new
+	sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new
 	mv -f elf64-ia64.new elf64-ia64.c
 
 peigen.c : peXXigen.c
diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c
index 634d997..121d623 100644
--- a/bfd/aix386-core.c
+++ b/bfd/aix386-core.c
@@ -2,7 +2,7 @@
    This was based on trad-core.c, which was written by John Gilmore of
         Cygnus Support.
    Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000,
-   2001, 2002, 2004, 2005, 2006, 2007
+   2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011
    Free Software Foundation, Inc.
    Written by Minh Tran-Le <[email protected]>.
    Converted to back end form by Ian Lance Taylor <[email protected]>.
@@ -242,6 +242,7 @@
   0,				/* leading underscore */
   ' ',				/* ar_pad_char */
   16,				/* ar_max_namelen */
+  0,				/* match priority.  */
   NO_GET64, NO_GETS64, NO_PUT64,
   NO_GET, NO_GETS, NO_PUT,
   NO_GET, NO_GETS, NO_PUT,	/* data */
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index ca0e003..c8331d8 100644
--- a/bfd/aout-adobe.c
+++ b/bfd/aout-adobe.c
@@ -1,6 +1,6 @@
 /* BFD back-end for a.out.adobe binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.  Based on bout.c.
 
@@ -459,6 +459,7 @@
 #define aout_32_get_section_contents_in_window      _bfd_generic_get_section_contents_in_window
 #define aout_32_bfd_relax_section                   bfd_generic_relax_section
 #define aout_32_bfd_gc_sections                     bfd_generic_gc_sections
+#define aout_32_bfd_lookup_section_flags	    bfd_generic_lookup_section_flags
 #define aout_32_bfd_merge_sections	            bfd_generic_merge_sections
 #define aout_32_bfd_is_group_section	            bfd_generic_is_group_section
 #define aout_32_bfd_discard_group	            bfd_generic_discard_group
@@ -487,6 +488,7 @@
   '_',				/* Symbol leading char.  */
   ' ',				/* AR_pad_char.  */
   16,				/* AR_max_namelen.  */
+  0,				/* match priority.  */
 
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
diff --git a/bfd/aout-arm.c b/bfd/aout-arm.c
index 9a5d155..fd93603 100644
--- a/bfd/aout-arm.c
+++ b/bfd/aout-arm.c
@@ -1,6 +1,6 @@
 /* BFD back-end for raw ARM a.out binaries.
    Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
-   2007, 2009, 2010 Free Software Foundation, Inc.
+   2007, 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw ([email protected])
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -477,6 +477,7 @@
   MY_symbol_leading_char,
   AR_PAD_CHAR,                  /* AR_pad_char.  */
   15,                           /* AR_max_namelen.  */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
   bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* Data.  */
@@ -516,8 +517,9 @@
    HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
   MY_symbol_leading_char,
-  AR_PAD_CHAR,                  		/* AR_pad_char.  */
-  15,                           		/* AR_max_namelen.  */
+  AR_PAD_CHAR,			/* AR_pad_char.  */
+  15,				/* AR_max_namelen.  */
+  0,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,	/* Data.  */
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index 5162494..f6e8bd2 100644
--- a/bfd/aout-target.h
+++ b/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, 2002, 2003, 2004, 2005, 2007, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -486,6 +486,9 @@
 #ifndef MY_bfd_gc_sections
 #define MY_bfd_gc_sections bfd_generic_gc_sections
 #endif
+#ifndef MY_bfd_lookup_section_flags
+#define MY_bfd_lookup_section_flags bfd_generic_lookup_section_flags
+#endif
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
@@ -627,6 +630,7 @@
   MY_symbol_leading_char,
   AR_PAD_CHAR,			/* AR_pad_char.  */
   15,				/* AR_max_namelen.  */
+  0,				/* match priority.  */
 #ifdef TARGET_IS_BIG_ENDIAN_P
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index 5d5c7e2..0b01177 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -1,6 +1,6 @@
 /* BFD back-end for TMS320C30 a.out binaries.
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
-   2010
+   2010, 2011
    Free Software Foundation, Inc.
    Contributed by Steven Haworth ([email protected])
 
@@ -944,6 +944,9 @@
 #ifndef MY_bfd_gc_sections
 #define MY_bfd_gc_sections bfd_generic_gc_sections
 #endif
+#ifndef MY_bfd_lookup_section_flags
+#define MY_bfd_lookup_section_flags bfd_generic_lookup_section_flags
+#endif
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
@@ -1080,6 +1083,7 @@
   MY_symbol_leading_char,
   AR_PAD_CHAR,			/* AR_pad_char.  */
   15,				/* AR_max_namelen.  */
+  0,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,	/* Data.  */
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index efa9d47..1efb715 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1,6 +1,6 @@
 /* BFD semi-generic back-end for a.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -3305,8 +3305,8 @@
 		continue;
 	    }
 
-	  if (! (*info->callbacks->add_archive_element)
-					(info, abfd, name, subsbfd))
+	  if (!(*info->callbacks
+		->add_archive_element) (info, abfd, name, subsbfd))
 	    return FALSE;
 	  *pneeded = TRUE;
 	  return TRUE;
@@ -3333,8 +3333,8 @@
 			 outside BFD.  We assume that we should link
 			 in the object file.  This is done for the -u
 			 option in the linker.  */
-		      if (! (*info->callbacks->add_archive_element)
-					(info, abfd, name, subsbfd))
+		      if (!(*info->callbacks
+			    ->add_archive_element) (info, abfd, name, subsbfd))
 			return FALSE;
 		      *pneeded = TRUE;
 		      return TRUE;
@@ -3343,8 +3343,8 @@
 		     symbol.  It is already on the undefs list.  */
 		  h->type = bfd_link_hash_common;
 		  h->u.c.p = (struct bfd_link_hash_common_entry *)
-                      bfd_hash_allocate (&info->hash->table,
-                                         sizeof (struct bfd_link_hash_common_entry));
+		    bfd_hash_allocate (&info->hash->table,
+				       sizeof (struct bfd_link_hash_common_entry));
 		  if (h->u.c.p == NULL)
 		    return FALSE;
 
@@ -3382,8 +3382,8 @@
 	     it if the current link symbol is common.  */
 	  if (h->type == bfd_link_hash_undefined)
 	    {
-	      if (! (*info->callbacks->add_archive_element)
-					(info, abfd, name, subsbfd))
+	      if (!(*info->callbacks
+		    ->add_archive_element) (info, abfd, name, subsbfd))
 		return FALSE;
 	      *pneeded = TRUE;
 	      return TRUE;
@@ -3404,27 +3404,36 @@
 				 struct bfd_link_info *info,
 				 bfd_boolean *pneeded)
 {
-  bfd *subsbfd = NULL;
+  bfd *oldbfd;
+  bfd_boolean needed;
 
-  if (! aout_get_external_symbols (abfd))
+  if (!aout_get_external_symbols (abfd))
     return FALSE;
 
-  if (! aout_link_check_ar_symbols (abfd, info, pneeded, &subsbfd))
+  oldbfd = abfd;
+  if (!aout_link_check_ar_symbols (abfd, info, pneeded, &abfd))
     return FALSE;
 
-  if (*pneeded)
+  needed = *pneeded;
+  if (needed)
     {
       /* Potentially, the add_archive_element hook may have set a
 	 substitute BFD for us.  */
-      if (subsbfd && !aout_get_external_symbols (subsbfd))
-	return FALSE;
-      if (! aout_link_add_symbols (subsbfd ? subsbfd : abfd, info))
+      if (abfd != oldbfd)
+	{
+	  if (!info->keep_memory
+	      && !aout_link_free_symbols (oldbfd))
+	    return FALSE;
+	  if (!aout_get_external_symbols (abfd))
+	    return FALSE;
+	}
+      if (!aout_link_add_symbols (abfd, info))
 	return FALSE;
     }
 
-  if (! info->keep_memory || ! *pneeded)
+  if (!info->keep_memory || !needed)
     {
-      if (! aout_link_free_symbols (abfd))
+      if (!aout_link_free_symbols (abfd))
 	return FALSE;
     }
 
@@ -3542,8 +3551,9 @@
    object.  */
 
 static bfd_boolean
-aout_link_write_other_symbol (struct aout_link_hash_entry *h, void * data)
+aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
 {
+  struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh;
   struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
   bfd *output_bfd;
   int type;
@@ -3628,6 +3638,7 @@
     case bfd_link_hash_undefweak:
       type = N_WEAKU;
       val = 0;
+      break;
     case bfd_link_hash_indirect:
       /* We ignore these symbols, since the indirected symbol is
 	 already in the hash table.  */
@@ -3709,7 +3720,7 @@
 	     symbol.  */
 	  h->indx = -2;
 	  h->written = FALSE;
-	  if (! aout_link_write_other_symbol (h, (void *) finfo))
+	  if (!aout_link_write_other_symbol (&h->root.root, finfo))
 	    return FALSE;
 	  r_index = h->indx;
 	}
@@ -4067,8 +4078,8 @@
 			    {
 			      h->indx = -2;
 			      h->written = FALSE;
-			      if (! aout_link_write_other_symbol (h,
-								  (void *) finfo))
+			      if (!aout_link_write_other_symbol (&h->root.root,
+								 finfo))
 				return FALSE;
 			    }
 			  r_index = h->indx;
@@ -4409,8 +4420,8 @@
 			    {
 			      h->indx = -2;
 			      h->written = FALSE;
-			      if (! aout_link_write_other_symbol (h,
-								  (void *) finfo))
+			      if (!aout_link_write_other_symbol (&h->root.root,
+								 finfo))
 				return FALSE;
 			    }
 			  r_index = h->indx;
@@ -5439,7 +5450,7 @@
   /* Allocate buffers to hold section contents and relocs.  */
   aout_info.contents = (bfd_byte *) bfd_malloc (max_contents_size);
   aout_info.relocs = bfd_malloc (max_relocs_size);
-  aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int *));
+  aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int));
   aout_info.output_syms = (struct external_nlist *)
       bfd_malloc ((max_sym_count + 1) * sizeof (struct external_nlist));
   if ((aout_info.contents == NULL && max_contents_size != 0)
@@ -5458,7 +5469,7 @@
     h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
 			       FALSE, FALSE, FALSE);
     if (h != NULL)
-      aout_link_write_other_symbol (h, &aout_info);
+      aout_link_write_other_symbol (&h->root.root, &aout_info);
   }
 
   /* The most time efficient way to do the link would be to read all
@@ -5532,9 +5543,9 @@
     }
 
   /* Write out any symbols that we have not already written out.  */
-  aout_link_hash_traverse (aout_hash_table (info),
-			   aout_link_write_other_symbol,
-			   (void *) &aout_info);
+  bfd_hash_traverse (&info->hash->table,
+		     aout_link_write_other_symbol,
+		     &aout_info);
 
   /* Now handle any relocs we were asked to create by the linker.
      These did not come from any input file.  We must do these after
diff --git a/bfd/archive.c b/bfd/archive.c
index 258c8d9..3e333c7 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1,6 +1,6 @@
 /* BFD back-end for archive files (libraries).
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.  Mostly Gumby Henkel-Wallace's fault.
 
@@ -343,15 +343,19 @@
 _bfd_find_nested_archive (bfd *arch_bfd, const char *filename)
 {
   bfd *abfd;
+  const char *target;
 
   for (abfd = arch_bfd->nested_archives;
        abfd != NULL;
        abfd = abfd->archive_next)
     {
-      if (strcmp (filename, abfd->filename) == 0)
+      if (filename_cmp (filename, abfd->filename) == 0)
         return abfd;
     }
-  abfd = bfd_openr (filename, NULL);
+  target = NULL;
+  if (!arch_bfd->target_defaulted)
+    target = arch_bfd->xvec->name;
+  abfd = bfd_openr (filename, target);
   if (abfd)
     {
       abfd->archive_next = arch_bfd->nested_archives;
@@ -597,6 +601,8 @@
 
   if (bfd_is_thin_archive (archive))
     {
+      const char *target;
+
       /* This is a proxy entry for an external file.  */
       if (! IS_ABSOLUTE_PATH (filename))
         {
@@ -628,7 +634,12 @@
         }
       /* It's not an element of a nested archive;
          open the external file as a bfd.  */
-      n_nfd = bfd_openr (filename, NULL);
+      target = NULL;
+      if (!archive->target_defaulted)
+	target = archive->xvec->name;
+      n_nfd = bfd_openr (filename, target);
+      if (n_nfd == NULL)
+	bfd_set_error (bfd_error_malformed_archive);
     }
   else
     {
@@ -661,10 +672,6 @@
   if (_bfd_add_bfd_to_archive_cache (archive, filepos, n_nfd))
     return n_nfd;
 
-  /* Huh?  */
-  /* FIXME:  n_nfd isn't allocated in the archive's memory pool.
-     If we reach this point, I think bfd_release will abort.  */
-  bfd_release (archive, n_nfd);
   bfd_release (archive, new_areldata);
   return NULL;
 }
@@ -721,6 +728,7 @@
   else
     {
       unsigned int size = arelt_size (last_file);
+
       filestart = last_file->proxy_origin;
       if (! bfd_is_thin_archive (archive))
         filestart += size;
@@ -754,7 +762,7 @@
   if (strncmp (armag, ARMAG, SARMAG) != 0
       && strncmp (armag, ARMAGB, SARMAG) != 0
       && ! bfd_is_thin_archive (abfd))
-    return 0;
+    return NULL;
 
   tdata_hold = bfd_ardata (abfd);
 
@@ -785,7 +793,7 @@
       return NULL;
     }
 
-  if (bfd_has_map (abfd))
+  if (abfd->target_defaulted && bfd_has_map (abfd))
     {
       bfd *first;
 
@@ -1109,6 +1117,7 @@
   struct artdata *ardata = bfd_ardata (abfd);
   char *stringbase;
   unsigned int stringsize;
+  unsigned int left;
   bfd_size_type amt;
   carsym *set;
   int i = bfd_bread (nextname, 16, abfd);
@@ -1136,43 +1145,46 @@
   if (mapdata == NULL)
     return FALSE;
 
-  amt = mapdata->parsed_size;
-  raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
-  if (raw_armap == NULL)
+  if (mapdata->parsed_size < HPUX_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE)
     {
+    wrong_format:
+      bfd_set_error (bfd_error_wrong_format);
     byebye:
       bfd_release (abfd, mapdata);
       return FALSE;
     }
+  left = mapdata->parsed_size - HPUX_SYMDEF_COUNT_SIZE - BSD_STRING_COUNT_SIZE;
+
+  amt = mapdata->parsed_size;
+  raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
+  if (raw_armap == NULL)
+    goto byebye;
 
   if (bfd_bread (raw_armap, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_malformed_archive);
-    byebyebye:
-      bfd_release (abfd, raw_armap);
       goto byebye;
     }
 
   ardata->symdef_count = H_GET_16 (abfd, raw_armap);
 
-  if (ardata->symdef_count * BSD_SYMDEF_SIZE
-      > mapdata->parsed_size - HPUX_SYMDEF_COUNT_SIZE)
-    {
-      /* Probably we're using the wrong byte ordering.  */
-      bfd_set_error (bfd_error_wrong_format);
-      goto byebyebye;
-    }
-
   ardata->cache = 0;
 
   stringsize = H_GET_32 (abfd, raw_armap + HPUX_SYMDEF_COUNT_SIZE);
+  if (stringsize > left)
+    goto wrong_format;
+  left -= stringsize;
+
   /* Skip sym count and string sz.  */
   stringbase = ((char *) raw_armap
 		+ HPUX_SYMDEF_COUNT_SIZE
 		+ BSD_STRING_COUNT_SIZE);
   rbase = (bfd_byte *) stringbase + stringsize;
   amt = ardata->symdef_count * BSD_SYMDEF_SIZE;
+  if (amt > left)
+    goto wrong_format;
+
   ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt);
   if (!ardata->symdefs)
     return FALSE;
@@ -1216,7 +1228,9 @@
 
   /* FIXME:  Formatting sucks here, and in case of failure of BFD_READ,
      we probably don't want to return TRUE.  */
-  bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET);
+  if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0)
+    return FALSE;
+
   if (bfd_bread (nextname, 16, abfd) == 16)
     {
       if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
@@ -1331,19 +1345,51 @@
 }
 #endif
 
-/* Adjust a relative path name based on the reference path.  */
+/* Adjust a relative path name based on the reference path.
+   For example:
 
+     Relative path  Reference path  Result
+     -------------  --------------  ------
+     bar.o          lib.a           bar.o
+     foo/bar.o      lib.a           foo/bar.o
+     bar.o          foo/lib.a       ../bar.o
+     foo/bar.o      baz/lib.a       ../foo/bar.o
+     bar.o          ../lib.a        <parent of current dir>/bar.o
+   ; ../bar.o       ../lib.a        bar.o
+   ; ../bar.o       lib.a           ../bar.o
+     foo/bar.o      ../lib.a        <parent of current dir>/foo/bar.o
+     bar.o          ../../lib.a     <grandparent>/<parent>/bar.o
+     bar.o          foo/baz/lib.a   ../../bar.o
+
+   Note - the semicolons above are there to prevent the BFD chew
+   utility from interpreting those lines as prototypes to put into
+   the autogenerated bfd.h header...
+
+   Note - the string is returned in a static buffer.  */
+   
 static const char *
 adjust_relative_path (const char * path, const char * ref_path)
 {
   static char *pathbuf = NULL;
-  static int pathbuf_len = 0;
-  const char *pathp = path;
-  const char *refp = ref_path;
-  int element_count = 0;
-  int len;
+  static unsigned int pathbuf_len = 0;
+  const char *pathp;
+  const char *refp;
+  char * lpath;
+  char * rpath;
+  unsigned int len;
+  unsigned int dir_up = 0;
+  unsigned int dir_down = 0;
   char *newp;
+  char * pwd = getpwd ();
+  const char * down;
 
+  /* Remove symlinks, '.' and '..' from the paths, if possible.  */
+  lpath = lrealpath (path);
+  pathp = lpath == NULL ? path : lpath;
+
+  rpath = lrealpath (ref_path);
+  refp = rpath == NULL ? ref_path : rpath;
+ 
   /* Remove common leading path elements.  */
   for (;;)
     {
@@ -1355,18 +1401,48 @@
       while (*e2 && ! IS_DIR_SEPARATOR (*e2))
 	++e2;
       if (*e1 == '\0' || *e2 == '\0' || e1 - pathp != e2 - refp
-	  || strncmp (pathp, refp, e1 - pathp) != 0)
+	  || filename_ncmp (pathp, refp, e1 - pathp) != 0)
 	break;
       pathp = e1 + 1;
       refp = e2 + 1;
     }
 
+  len = strlen (pathp) + 1;
   /* For each leading path element in the reference path,
      insert "../" into the path.  */
   for (; *refp; ++refp)
     if (IS_DIR_SEPARATOR (*refp))
-      ++element_count;
-  len = 3 * element_count + strlen (path) + 1;
+      {
+	/* PR 12710:  If the path element is "../" then instead of
+	   inserting "../" we need to insert the name of the directory
+	   at the current level.  */	
+	if (refp > ref_path + 1
+	    && refp[-1] == '.'
+	    && refp[-2] == '.')
+	  dir_down ++;
+	else
+	  dir_up ++;
+      }
+
+  /* If the lrealpath calls above succeeded then we should never
+     see dir_up and dir_down both being non-zero.  */
+  
+  len += 3 * dir_up;
+
+  if (dir_down)
+    {
+      down = pwd + strlen (pwd) - 1;
+
+      while (dir_down && down > pwd)
+	{
+	  if (IS_DIR_SEPARATOR (*down))
+	    --dir_down;
+	}
+      BFD_ASSERT (dir_down == 0);
+      len += strlen (down) + 1;
+    }
+  else
+    down = NULL;
 
   if (len > pathbuf_len)
     {
@@ -1375,19 +1451,26 @@
       pathbuf_len = 0;
       pathbuf = (char *) bfd_malloc (len);
       if (pathbuf == NULL)
-	return path;
+	goto out;
       pathbuf_len = len;
     }
 
   newp = pathbuf;
-  while (element_count-- > 0)
+  while (dir_up-- > 0)
     {
       /* FIXME: Support Windows style path separators as well.  */
       strcpy (newp, "../");
       newp += 3;
     }
-  strcpy (newp, pathp);
 
+  if (down)
+    sprintf (newp, "%s/%s", down, pathp);
+  else
+    strcpy (newp, pathp);
+
+ out:
+  free (lpath);
+  free (rpath);
   return pathbuf;
 }
 
@@ -1429,7 +1512,7 @@
 				    char **tabloc,
 				    bfd_size_type *tablen)
 {
-  unsigned int maxname = abfd->xvec->ar_max_namelen;
+  unsigned int maxname = ar_maxnamelen (abfd);
   bfd_size_type total_namelen = 0;
   bfd *current;
   char *strptr;
@@ -1460,7 +1543,7 @@
           /* If the path is the same as the previous path seen,
              reuse it.  This can happen when flattening a thin
              archive that contains other archives.  */
-          if (last_filename && strcmp (last_filename, filename) == 0)
+          if (last_filename && filename_cmp (last_filename, filename) == 0)
             continue;
 
           last_filename = filename;
@@ -1506,7 +1589,7 @@
       else
 	{
 	  struct ar_hdr *hdr = arch_hdr (current);
-	  if (strncmp (normal, hdr->ar_name, thislen) != 0
+	  if (filename_ncmp (normal, hdr->ar_name, thislen) != 0
 	      || (thislen < sizeof hdr->ar_name
 		  && hdr->ar_name[thislen] != ar_padchar (current)))
 	    {
@@ -1554,7 +1637,7 @@
              archive that contains other archives.
              If the path is relative, adjust it relative to
              the containing archive.  */
-          if (last_filename && strcmp (last_filename, filename) == 0)
+          if (last_filename && filename_cmp (last_filename, filename) == 0)
             normal = last_filename;
           else if (! IS_ABSOLUTE_PATH (filename)
                    && ! IS_ABSOLUTE_PATH (abfd->filename))
@@ -1624,7 +1707,7 @@
                                                   bfd_size_type *tablen,
                                                   const char **name)
 {
-  unsigned int maxname = abfd->xvec->ar_max_namelen;
+  unsigned int maxname = ar_maxnamelen (abfd);
   bfd *current;
 
   *tablen = 0;
@@ -2295,31 +2378,28 @@
   bfd_byte temp[4];
   unsigned int count;
   struct ar_hdr hdr;
-  struct stat statbuf;
   long uid, gid;
 
   firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
 
-  stat (arch->filename, &statbuf);
+  /* If deterministic, we use 0 as the timestamp in the map.
+     Some linkers may require that the archive filesystem modification
+     time is less than (or near to) the archive map timestamp.  Those
+     linkers should not be used with deterministic mode.  (GNU ld and
+     Gold do not have this restriction.)  */
+  bfd_ardata (arch)->armap_timestamp = 0;
+  uid = 0;
+  gid = 0;
   if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0)
     {
-      /* Remember the timestamp, to keep it holy.  But fudge it a little.  */
-      bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime
-                                            + ARMAP_TIME_OFFSET);
+      struct stat statbuf;
+
+      if (stat (arch->filename, &statbuf) == 0)
+	bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime
+					      + ARMAP_TIME_OFFSET);
       uid = getuid();
       gid = getgid();
     }
-  else
-    {
-      /* If deterministic, we use 0 as the timestamp in the map.
-         Some linkers may require that the archive filesystem modification
-         time is less than (or near to) the archive map timestamp.  Those
-         linkers should not be used with deterministic mode.  (GNU ld and
-         Gold do not have this restriction.)  */
-      bfd_ardata (arch)->armap_timestamp = 0;
-      uid = 0;
-      gid = 0;
-    }
 
   memset (&hdr, ' ', sizeof (struct ar_hdr));
   memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG));
diff --git a/bfd/archures.c b/bfd/archures.c
index 1867154..44850e7 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,6 +1,6 @@
 /* BFD library support routines for architectures.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
@@ -173,6 +173,7 @@
 .#define bfd_mach_mips5                 5
 .#define bfd_mach_mips_loongson_2e      3001
 .#define bfd_mach_mips_loongson_2f      3002
+.#define bfd_mach_mips_loongson_3a      3003
 .#define bfd_mach_mips_sb1              12310201 {* octal 'SB', 01 *}
 .#define bfd_mach_mips_octeon		6501
 .#define bfd_mach_mips_xlr              887682   {* decimal 'XLR'  *}
@@ -180,15 +181,22 @@
 .#define bfd_mach_mipsisa32r2           33
 .#define bfd_mach_mipsisa64             64
 .#define bfd_mach_mipsisa64r2           65
+.#define bfd_mach_mips_micromips        96
 .  bfd_arch_i386,      {* Intel 386 *}
-.#define bfd_mach_i386_i386 1
-.#define bfd_mach_i386_i8086 2
-.#define bfd_mach_i386_i386_intel_syntax 3
-.#define bfd_mach_x86_64 64
-.#define bfd_mach_x86_64_intel_syntax 65
+.#define bfd_mach_i386_intel_syntax	(1 << 0)
+.#define bfd_mach_i386_i8086		(1 << 1)
+.#define bfd_mach_i386_i386		(1 << 2)
+.#define bfd_mach_x86_64		(1 << 3)
+.#define bfd_mach_x64_32		(1 << 4)
+.#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
+.#define bfd_mach_x86_64_intel_syntax	(bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
+.#define bfd_mach_x64_32_intel_syntax	(bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
 .  bfd_arch_l1om,   {* Intel L1OM *}
-.#define bfd_mach_l1om 66
-.#define bfd_mach_l1om_intel_syntax 67
+.#define bfd_mach_l1om			(1 << 5)
+.#define bfd_mach_l1om_intel_syntax	(bfd_mach_l1om | bfd_mach_i386_intel_syntax)
+.  bfd_arch_k1om,   {* Intel K1OM *}
+.#define bfd_mach_k1om			(1 << 6)
+.#define bfd_mach_k1om_intel_syntax	(bfd_mach_k1om | bfd_mach_i386_intel_syntax)
 .  bfd_arch_we32k,     {* AT&T WE32xxx *}
 .  bfd_arch_tahoe,     {* CCI/Harris Tahoe *}
 .  bfd_arch_i860,      {* Intel 860 *}
@@ -373,6 +381,13 @@
 .#define bfd_mach_avr5		5
 .#define bfd_mach_avr51		51
 .#define bfd_mach_avr6		6
+.#define bfd_mach_avrxmega1 101
+.#define bfd_mach_avrxmega2 102
+.#define bfd_mach_avrxmega3 103
+.#define bfd_mach_avrxmega4 104
+.#define bfd_mach_avrxmega5 105
+.#define bfd_mach_avrxmega6 106
+.#define bfd_mach_avrxmega7 107
 .  bfd_arch_bfin,        {* ADI Blackfin *}
 .#define bfd_mach_bfin          1
 .  bfd_arch_cr16,       {* National Semiconductor CompactRISC (ie CR16). *}
@@ -427,6 +442,10 @@
 .  bfd_arch_lm32,      {* Lattice Mico32 *}
 .#define bfd_mach_lm32      1
 .  bfd_arch_microblaze,{* Xilinx MicroBlaze. *}
+.  bfd_arch_tilepro,   {* Tilera TILEPro *}
+.  bfd_arch_tilegx, {* Tilera TILE-Gx *}
+.#define bfd_mach_tilepro   1
+.#define bfd_mach_tilegx    1
 .  bfd_arch_last
 .  };
 */
@@ -489,6 +508,7 @@
 extern const bfd_arch_info_type bfd_ia64_arch;
 extern const bfd_arch_info_type bfd_ip2k_arch;
 extern const bfd_arch_info_type bfd_iq2000_arch;
+extern const bfd_arch_info_type bfd_k1om_arch;
 extern const bfd_arch_info_type bfd_l1om_arch;
 extern const bfd_arch_info_type bfd_lm32_arch;
 extern const bfd_arch_info_type bfd_m32c_arch;
@@ -527,6 +547,8 @@
 extern const bfd_arch_info_type bfd_tic54x_arch;
 extern const bfd_arch_info_type bfd_tic6x_arch;
 extern const bfd_arch_info_type bfd_tic80_arch;
+extern const bfd_arch_info_type bfd_tilegx_arch;
+extern const bfd_arch_info_type bfd_tilepro_arch;
 extern const bfd_arch_info_type bfd_v850_arch;
 extern const bfd_arch_info_type bfd_vax_arch;
 extern const bfd_arch_info_type bfd_w65_arch;
@@ -566,6 +588,7 @@
     &bfd_ia64_arch,
     &bfd_ip2k_arch,
     &bfd_iq2000_arch,
+    &bfd_k1om_arch,
     &bfd_l1om_arch,
     &bfd_lm32_arch,
     &bfd_m32c_arch,
@@ -601,6 +624,8 @@
     &bfd_tic54x_arch,
     &bfd_tic6x_arch,
     &bfd_tic80_arch,
+    &bfd_tilegx_arch,
+    &bfd_tilepro_arch,
     &bfd_v850_arch,
     &bfd_vax_arch,
     &bfd_w65_arch,
@@ -738,25 +763,26 @@
 			 const bfd *bbfd,
 			 bfd_boolean accept_unknowns)
 {
-  const bfd * ubfd = NULL;
+  const bfd *ubfd, *kbfd;
 
   /* Look for an unknown architecture.  */
-  if (((ubfd = abfd) && ubfd->arch_info->arch == bfd_arch_unknown)
-      || ((ubfd = bbfd) && ubfd->arch_info->arch == bfd_arch_unknown))
-    {
-      /* We can allow an unknown architecture if accept_unknowns
-	 is true, or if the target is the "binary" format, which
-	 has an unknown architecture.  Since the binary format can
-	 only be set by explicit request from the user, it is safe
-	 to assume that they know what they are doing.  */
-      if (accept_unknowns
-	  || strcmp (bfd_get_target (ubfd), "binary") == 0)
-	return ubfd->arch_info;
-      return NULL;
-    }
+  if (abfd->arch_info->arch == bfd_arch_unknown)
+    ubfd = abfd, kbfd = bbfd;
+  else if (bbfd->arch_info->arch == bfd_arch_unknown)
+    ubfd = bbfd, kbfd = abfd;
+  else
+    /* Otherwise architecture-specific code has to decide.  */
+    return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info);
 
-  /* Otherwise architecture-specific code has to decide.  */
-  return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info);
+  /* We can allow an unknown architecture if accept_unknowns
+     is true, or if the target is the "binary" format, which
+     has an unknown architecture.  Since the binary format can
+     only be set by explicit request from the user, it is safe
+     to assume that they know what they are doing.  */
+  if (accept_unknowns
+      || strcmp (bfd_get_target (ubfd), "binary") == 0)
+    return kbfd->arch_info;
+  return NULL;
 }
 
 /*
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index cfa5225..a477b49 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1,7 +1,7 @@
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
@@ -291,8 +291,8 @@
 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
 /* Find the address one past the end of SEC.  */
 #define bfd_get_section_limit(bfd, sec) \
-  (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
-   / bfd_octets_per_byte (bfd))
+  (((bfd)->direction != write_direction && (sec)->rawsize != 0	\
+    ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd))
 
 /* Return TRUE if input section SEC has been discarded.  */
 #define elf_discarded_section(sec)				\
@@ -404,6 +404,10 @@
 extern struct bfd_hash_entry *bfd_hash_insert
   (struct bfd_hash_table *, const char *, unsigned long);
 
+/* Rename an entry in a hash table.  */
+extern void bfd_hash_rename
+  (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
+
 /* Replace an entry in a hash table.  */
 extern void bfd_hash_replace
   (struct bfd_hash_table *, struct bfd_hash_entry *old,
@@ -428,7 +432,7 @@
 /* Allows the default size of a hash table to be configured. New hash
    tables allocated using bfd_hash_table_init will be created with
    this size.  */
-extern void bfd_hash_set_default_size (bfd_size_type);
+extern unsigned long bfd_hash_set_default_size (unsigned long);
 
 /* This structure is used to keep track of stabs in sections
    information while linking.  */
@@ -548,11 +552,6 @@
 bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
 void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
 
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-
-/* Externally visible ECOFF routines.  */
-
 #if defined(__STDC__) || defined(ALMOST_STDC)
 struct ecoff_debug_info;
 struct ecoff_debug_swap;
@@ -560,8 +559,18 @@
 struct bfd_symbol;
 struct bfd_link_info;
 struct bfd_link_hash_entry;
+struct bfd_section_already_linked;
 struct bfd_elf_version_tree;
 #endif
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
+extern bfd_boolean _bfd_handle_already_linked
+  (struct bfd_section *, struct bfd_section_already_linked *,
+   struct bfd_link_info *);
+
+/* Externally visible ECOFF routines.  */
+
 extern bfd_vma bfd_ecoff_get_gp_value
   (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
@@ -636,8 +645,7 @@
   (bfd *, struct bfd_link_needed_list **);
 extern bfd_boolean bfd_elf_size_dynamic_sections
   (bfd *, const char *, const char *, const char *, const char *, const char *,
-   const char * const *, struct bfd_link_info *, struct bfd_section **,
-   struct bfd_elf_version_tree *);
+   const char * const *, struct bfd_link_info *, struct bfd_section **);
 extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
   (bfd *, struct bfd_link_info *);
 extern void bfd_elf_set_dt_needed_name
@@ -865,7 +873,7 @@
 
 void bfd_elf32_arm_set_target_relocs
   (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
-   int, int, int, int);
+   int, int, int, int, int);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
   (bfd *, struct bfd_link_info *);
@@ -908,6 +916,10 @@
 extern bfd_boolean elf32_arm_fix_exidx_coverage
 (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
+/* C6x unwind section editing support.  */
+extern bfd_boolean elf32_tic6x_fix_exidx_coverage
+(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
+
 /* PowerPC @tls opcode transform/validate.  */
 extern unsigned int _bfd_elf_ppc_at_tls_transform
   (unsigned int, unsigned int);
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c6a54b5..523ad9c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7,8 +7,8 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
@@ -298,8 +298,8 @@
 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
 /* Find the address one past the end of SEC.  */
 #define bfd_get_section_limit(bfd, sec) \
-  (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
-   / bfd_octets_per_byte (bfd))
+  (((bfd)->direction != write_direction && (sec)->rawsize != 0	\
+    ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd))
 
 /* Return TRUE if input section SEC has been discarded.  */
 #define elf_discarded_section(sec)				\
@@ -411,6 +411,10 @@
 extern struct bfd_hash_entry *bfd_hash_insert
   (struct bfd_hash_table *, const char *, unsigned long);
 
+/* Rename an entry in a hash table.  */
+extern void bfd_hash_rename
+  (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
+
 /* Replace an entry in a hash table.  */
 extern void bfd_hash_replace
   (struct bfd_hash_table *, struct bfd_hash_entry *old,
@@ -435,7 +439,7 @@
 /* Allows the default size of a hash table to be configured. New hash
    tables allocated using bfd_hash_table_init will be created with
    this size.  */
-extern void bfd_hash_set_default_size (bfd_size_type);
+extern unsigned long bfd_hash_set_default_size (unsigned long);
 
 /* This structure is used to keep track of stabs in sections
    information while linking.  */
@@ -555,11 +559,6 @@
 bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
 void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
 
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-
-/* Externally visible ECOFF routines.  */
-
 #if defined(__STDC__) || defined(ALMOST_STDC)
 struct ecoff_debug_info;
 struct ecoff_debug_swap;
@@ -567,8 +566,18 @@
 struct bfd_symbol;
 struct bfd_link_info;
 struct bfd_link_hash_entry;
+struct bfd_section_already_linked;
 struct bfd_elf_version_tree;
 #endif
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
+extern bfd_boolean _bfd_handle_already_linked
+  (struct bfd_section *, struct bfd_section_already_linked *,
+   struct bfd_link_info *);
+
+/* Externally visible ECOFF routines.  */
+
 extern bfd_vma bfd_ecoff_get_gp_value
   (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
@@ -643,8 +652,7 @@
   (bfd *, struct bfd_link_needed_list **);
 extern bfd_boolean bfd_elf_size_dynamic_sections
   (bfd *, const char *, const char *, const char *, const char *, const char *,
-   const char * const *, struct bfd_link_info *, struct bfd_section **,
-   struct bfd_elf_version_tree *);
+   const char * const *, struct bfd_link_info *, struct bfd_section **);
 extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
   (bfd *, struct bfd_link_info *);
 extern void bfd_elf_set_dt_needed_name
@@ -872,7 +880,7 @@
 
 void bfd_elf32_arm_set_target_relocs
   (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
-   int, int, int, int);
+   int, int, int, int, int);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
   (bfd *, struct bfd_link_info *);
@@ -915,6 +923,10 @@
 extern bfd_boolean elf32_arm_fix_exidx_coverage
 (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
+/* C6x unwind section editing support.  */
+extern bfd_boolean elf32_tic6x_fix_exidx_coverage
+(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
+
 /* PowerPC @tls opcode transform/validate.  */
 extern unsigned int _bfd_elf_ppc_at_tls_transform
   (unsigned int, unsigned int);
@@ -1025,9 +1037,9 @@
 #define bfd_put_signed_8 \
   bfd_put_8
 #define bfd_get_8(abfd, ptr) \
-  (*(unsigned char *) (ptr) & 0xff)
+  (*(const unsigned char *) (ptr) & 0xff)
 #define bfd_get_signed_8(abfd, ptr) \
-  (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
+  (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
 
 #define bfd_put_16(abfd, val, ptr) \
   BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
@@ -1135,7 +1147,8 @@
 file_ptr bfd_get_size (bfd *abfd);
 
 void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
-    int prot, int flags, file_ptr offset);
+    int prot, int flags, file_ptr offset,
+    void **map_addr, bfd_size_type *map_len);
 
 /* Extracted from bfdwin.c.  */
 /* Extracted from section.c.  */
@@ -1316,6 +1329,11 @@
      sections.  */
 #define SEC_COFF_SHARED_LIBRARY 0x4000000
 
+  /* This input section should be copied to output in reverse order
+     as an array of pointers.  This is for ELF linker internal use
+     only.  */
+#define SEC_ELF_REVERSE_COPY 0x4000000
+
   /* This section contains data which may be shared with other
      executables or shared objects. This is for COFF only.  */
 #define SEC_COFF_SHARED 0x8000000
@@ -1500,6 +1518,9 @@
   /* The BFD which owns the section.  */
   bfd *owner;
 
+  /* INPUT_SECTION_FLAGS if specified in the linker script.  */
+  struct flag_info *section_flag_info;
+
   /* A symbol which points at this section only.  */
   struct bfd_symbol *symbol;
   struct bfd_symbol **symbol_ptr_ptr;
@@ -1678,6 +1699,9 @@
   /* target_index, used_by_bfd, constructor_chain, owner,          */  \
      0,            NULL,        NULL,              NULL,               \
                                                                        \
+  /* flag_info,                                                    */  \
+     NULL,                                                             \
+                                                                       \
   /* symbol,                    symbol_ptr_ptr,                    */  \
      (struct bfd_symbol *) SYM, &SEC.symbol,                           \
                                                                        \
@@ -1713,6 +1737,9 @@
 bfd_boolean bfd_set_section_flags
    (bfd *abfd, asection *sec, flagword flags);
 
+void bfd_rename_section
+   (bfd *abfd, asection *sec, const char *newname);
+
 void bfd_map_over_sections
    (bfd *abfd,
     void (*func) (bfd *abfd, asection *sect, void *obj),
@@ -1853,6 +1880,7 @@
 #define bfd_mach_mips5                 5
 #define bfd_mach_mips_loongson_2e      3001
 #define bfd_mach_mips_loongson_2f      3002
+#define bfd_mach_mips_loongson_3a      3003
 #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
 #define bfd_mach_mips_octeon           6501
 #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
@@ -1860,15 +1888,22 @@
 #define bfd_mach_mipsisa32r2           33
 #define bfd_mach_mipsisa64             64
 #define bfd_mach_mipsisa64r2           65
+#define bfd_mach_mips_micromips        96
   bfd_arch_i386,      /* Intel 386 */
-#define bfd_mach_i386_i386 1
-#define bfd_mach_i386_i8086 2
-#define bfd_mach_i386_i386_intel_syntax 3
-#define bfd_mach_x86_64 64
-#define bfd_mach_x86_64_intel_syntax 65
+#define bfd_mach_i386_intel_syntax     (1 << 0)
+#define bfd_mach_i386_i8086            (1 << 1)
+#define bfd_mach_i386_i386             (1 << 2)
+#define bfd_mach_x86_64                (1 << 3)
+#define bfd_mach_x64_32                (1 << 4)
+#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
+#define bfd_mach_x86_64_intel_syntax   (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
+#define bfd_mach_x64_32_intel_syntax   (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
   bfd_arch_l1om,   /* Intel L1OM */
-#define bfd_mach_l1om 66
-#define bfd_mach_l1om_intel_syntax 67
+#define bfd_mach_l1om                  (1 << 5)
+#define bfd_mach_l1om_intel_syntax     (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
+  bfd_arch_k1om,   /* Intel K1OM */
+#define bfd_mach_k1om                  (1 << 6)
+#define bfd_mach_k1om_intel_syntax     (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
   bfd_arch_we32k,     /* AT&T WE32xxx */
   bfd_arch_tahoe,     /* CCI/Harris Tahoe */
   bfd_arch_i860,      /* Intel 860 */
@@ -2053,6 +2088,13 @@
 #define bfd_mach_avr5          5
 #define bfd_mach_avr51         51
 #define bfd_mach_avr6          6
+#define bfd_mach_avrxmega1 101
+#define bfd_mach_avrxmega2 102
+#define bfd_mach_avrxmega3 103
+#define bfd_mach_avrxmega4 104
+#define bfd_mach_avrxmega5 105
+#define bfd_mach_avrxmega6 106
+#define bfd_mach_avrxmega7 107
   bfd_arch_bfin,        /* ADI Blackfin */
 #define bfd_mach_bfin          1
   bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
@@ -2107,6 +2149,10 @@
   bfd_arch_lm32,      /* Lattice Mico32 */
 #define bfd_mach_lm32      1
   bfd_arch_microblaze,/* Xilinx MicroBlaze. */
+  bfd_arch_tilepro,   /* Tilera TILEPro */
+  bfd_arch_tilegx, /* Tilera TILE-Gx */
+#define bfd_mach_tilepro   1
+#define bfd_mach_tilegx    1
   bfd_arch_last
   };
 
@@ -2686,9 +2732,9 @@
   BFD_RELOC_ALPHA_TPREL_LO16,
   BFD_RELOC_ALPHA_TPREL16,
 
-/* Bits 27..2 of the relocation address shifted right 2 bits;
-simple reloc otherwise.  */
+/* The MIPS jump instruction.  */
   BFD_RELOC_MIPS_JMP,
+  BFD_RELOC_MICROMIPS_JMP,
 
 /* The MIPS16 jump instruction.  */
   BFD_RELOC_MIPS16_JMP,
@@ -2736,42 +2782,75 @@
 
 /* Relocation against a MIPS literal section.  */
   BFD_RELOC_MIPS_LITERAL,
+  BFD_RELOC_MICROMIPS_LITERAL,
+
+/* microMIPS PC-relative relocations.  */
+  BFD_RELOC_MICROMIPS_7_PCREL_S1,
+  BFD_RELOC_MICROMIPS_10_PCREL_S1,
+  BFD_RELOC_MICROMIPS_16_PCREL_S1,
+
+/* microMIPS versions of generic BFD relocs.  */
+  BFD_RELOC_MICROMIPS_GPREL16,
+  BFD_RELOC_MICROMIPS_HI16,
+  BFD_RELOC_MICROMIPS_HI16_S,
+  BFD_RELOC_MICROMIPS_LO16,
 
 /* MIPS ELF relocations.  */
   BFD_RELOC_MIPS_GOT16,
+  BFD_RELOC_MICROMIPS_GOT16,
   BFD_RELOC_MIPS_CALL16,
+  BFD_RELOC_MICROMIPS_CALL16,
   BFD_RELOC_MIPS_GOT_HI16,
+  BFD_RELOC_MICROMIPS_GOT_HI16,
   BFD_RELOC_MIPS_GOT_LO16,
+  BFD_RELOC_MICROMIPS_GOT_LO16,
   BFD_RELOC_MIPS_CALL_HI16,
+  BFD_RELOC_MICROMIPS_CALL_HI16,
   BFD_RELOC_MIPS_CALL_LO16,
+  BFD_RELOC_MICROMIPS_CALL_LO16,
   BFD_RELOC_MIPS_SUB,
+  BFD_RELOC_MICROMIPS_SUB,
   BFD_RELOC_MIPS_GOT_PAGE,
+  BFD_RELOC_MICROMIPS_GOT_PAGE,
   BFD_RELOC_MIPS_GOT_OFST,
+  BFD_RELOC_MICROMIPS_GOT_OFST,
   BFD_RELOC_MIPS_GOT_DISP,
+  BFD_RELOC_MICROMIPS_GOT_DISP,
   BFD_RELOC_MIPS_SHIFT5,
   BFD_RELOC_MIPS_SHIFT6,
   BFD_RELOC_MIPS_INSERT_A,
   BFD_RELOC_MIPS_INSERT_B,
   BFD_RELOC_MIPS_DELETE,
   BFD_RELOC_MIPS_HIGHEST,
+  BFD_RELOC_MICROMIPS_HIGHEST,
   BFD_RELOC_MIPS_HIGHER,
+  BFD_RELOC_MICROMIPS_HIGHER,
   BFD_RELOC_MIPS_SCN_DISP,
+  BFD_RELOC_MICROMIPS_SCN_DISP,
   BFD_RELOC_MIPS_REL16,
   BFD_RELOC_MIPS_RELGOT,
   BFD_RELOC_MIPS_JALR,
+  BFD_RELOC_MICROMIPS_JALR,
   BFD_RELOC_MIPS_TLS_DTPMOD32,
   BFD_RELOC_MIPS_TLS_DTPREL32,
   BFD_RELOC_MIPS_TLS_DTPMOD64,
   BFD_RELOC_MIPS_TLS_DTPREL64,
   BFD_RELOC_MIPS_TLS_GD,
+  BFD_RELOC_MICROMIPS_TLS_GD,
   BFD_RELOC_MIPS_TLS_LDM,
+  BFD_RELOC_MICROMIPS_TLS_LDM,
   BFD_RELOC_MIPS_TLS_DTPREL_HI16,
+  BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
   BFD_RELOC_MIPS_TLS_DTPREL_LO16,
+  BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
   BFD_RELOC_MIPS_TLS_GOTTPREL,
+  BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
   BFD_RELOC_MIPS_TLS_TPREL32,
   BFD_RELOC_MIPS_TLS_TPREL64,
   BFD_RELOC_MIPS_TLS_TPREL_HI16,
+  BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
   BFD_RELOC_MIPS_TLS_TPREL_LO16,
+  BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
 
 
 /* MIPS ELF relocations (VxWorks and PLT extensions).  */
@@ -3136,6 +3215,12 @@
   BFD_RELOC_ARM_TLS_TPOFF32,
   BFD_RELOC_ARM_TLS_IE32,
   BFD_RELOC_ARM_TLS_LE32,
+  BFD_RELOC_ARM_TLS_GOTDESC,
+  BFD_RELOC_ARM_TLS_CALL,
+  BFD_RELOC_ARM_THM_TLS_CALL,
+  BFD_RELOC_ARM_TLS_DESCSEQ,
+  BFD_RELOC_ARM_THM_TLS_DESCSEQ,
+  BFD_RELOC_ARM_TLS_DESC,
 
 /* ARM group relocations.  */
   BFD_RELOC_ARM_ALU_PC_G0_NC,
@@ -3170,6 +3255,9 @@
 /* Annotation of BX instructions.  */
   BFD_RELOC_ARM_V4BX,
 
+/* ARM support for STT_GNU_IFUNC.  */
+  BFD_RELOC_ARM_IRELATIVE,
+
 /* These relocs are only used within the ARM assembler.  They are not
 (at present) written to any object files.  */
   BFD_RELOC_ARM_IMMEDIATE,
@@ -3748,6 +3836,10 @@
   BFD_RELOC_C6000_DSBT_INDEX,
   BFD_RELOC_C6000_PREL31,
   BFD_RELOC_C6000_COPY,
+  BFD_RELOC_C6000_JUMP_SLOT,
+  BFD_RELOC_C6000_EHTYPE,
+  BFD_RELOC_C6000_PCR_H16,
+  BFD_RELOC_C6000_PCR_L16,
   BFD_RELOC_C6000_ALIGN,
   BFD_RELOC_C6000_FPHEAD,
   BFD_RELOC_C6000_NOCMP,
@@ -3981,9 +4073,12 @@
   BFD_RELOC_RX_GPRELL,
   BFD_RELOC_RX_SYM,
   BFD_RELOC_RX_OP_SUBTRACT,
+  BFD_RELOC_RX_OP_NEG,
   BFD_RELOC_RX_ABS8,
   BFD_RELOC_RX_ABS16,
+  BFD_RELOC_RX_ABS16_REV,
   BFD_RELOC_RX_ABS32,
+  BFD_RELOC_RX_ABS32_REV,
   BFD_RELOC_RX_ABS16U,
   BFD_RELOC_RX_ABS16UW,
   BFD_RELOC_RX_ABS16UL,
@@ -4757,6 +4852,178 @@
 /* This is used to tell the dynamic linker to copy the value out of
 the dynamic object into the runtime process image.  */
   BFD_RELOC_MICROBLAZE_COPY,
+
+/* Tilera TILEPro Relocations.  */
+  BFD_RELOC_TILEPRO_COPY,
+  BFD_RELOC_TILEPRO_GLOB_DAT,
+  BFD_RELOC_TILEPRO_JMP_SLOT,
+  BFD_RELOC_TILEPRO_RELATIVE,
+  BFD_RELOC_TILEPRO_BROFF_X1,
+  BFD_RELOC_TILEPRO_JOFFLONG_X1,
+  BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
+  BFD_RELOC_TILEPRO_IMM8_X0,
+  BFD_RELOC_TILEPRO_IMM8_Y0,
+  BFD_RELOC_TILEPRO_IMM8_X1,
+  BFD_RELOC_TILEPRO_IMM8_Y1,
+  BFD_RELOC_TILEPRO_DEST_IMM8_X1,
+  BFD_RELOC_TILEPRO_MT_IMM15_X1,
+  BFD_RELOC_TILEPRO_MF_IMM15_X1,
+  BFD_RELOC_TILEPRO_IMM16_X0,
+  BFD_RELOC_TILEPRO_IMM16_X1,
+  BFD_RELOC_TILEPRO_IMM16_X0_LO,
+  BFD_RELOC_TILEPRO_IMM16_X1_LO,
+  BFD_RELOC_TILEPRO_IMM16_X0_HI,
+  BFD_RELOC_TILEPRO_IMM16_X1_HI,
+  BFD_RELOC_TILEPRO_IMM16_X0_HA,
+  BFD_RELOC_TILEPRO_IMM16_X1_HA,
+  BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
+  BFD_RELOC_TILEPRO_IMM16_X0_GOT,
+  BFD_RELOC_TILEPRO_IMM16_X1_GOT,
+  BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
+  BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
+  BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
+  BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
+  BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
+  BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
+  BFD_RELOC_TILEPRO_MMSTART_X0,
+  BFD_RELOC_TILEPRO_MMEND_X0,
+  BFD_RELOC_TILEPRO_MMSTART_X1,
+  BFD_RELOC_TILEPRO_MMEND_X1,
+  BFD_RELOC_TILEPRO_SHAMT_X0,
+  BFD_RELOC_TILEPRO_SHAMT_X1,
+  BFD_RELOC_TILEPRO_SHAMT_Y0,
+  BFD_RELOC_TILEPRO_SHAMT_Y1,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
+  BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
+  BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
+  BFD_RELOC_TILEPRO_TLS_DTPMOD32,
+  BFD_RELOC_TILEPRO_TLS_DTPOFF32,
+  BFD_RELOC_TILEPRO_TLS_TPOFF32,
+
+/* Tilera TILE-Gx Relocations.  */
+  BFD_RELOC_TILEGX_HW0,
+  BFD_RELOC_TILEGX_HW1,
+  BFD_RELOC_TILEGX_HW2,
+  BFD_RELOC_TILEGX_HW3,
+  BFD_RELOC_TILEGX_HW0_LAST,
+  BFD_RELOC_TILEGX_HW1_LAST,
+  BFD_RELOC_TILEGX_HW2_LAST,
+  BFD_RELOC_TILEGX_COPY,
+  BFD_RELOC_TILEGX_GLOB_DAT,
+  BFD_RELOC_TILEGX_JMP_SLOT,
+  BFD_RELOC_TILEGX_RELATIVE,
+  BFD_RELOC_TILEGX_BROFF_X1,
+  BFD_RELOC_TILEGX_JUMPOFF_X1,
+  BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
+  BFD_RELOC_TILEGX_IMM8_X0,
+  BFD_RELOC_TILEGX_IMM8_Y0,
+  BFD_RELOC_TILEGX_IMM8_X1,
+  BFD_RELOC_TILEGX_IMM8_Y1,
+  BFD_RELOC_TILEGX_DEST_IMM8_X1,
+  BFD_RELOC_TILEGX_MT_IMM14_X1,
+  BFD_RELOC_TILEGX_MF_IMM14_X1,
+  BFD_RELOC_TILEGX_MMSTART_X0,
+  BFD_RELOC_TILEGX_MMEND_X0,
+  BFD_RELOC_TILEGX_SHAMT_X0,
+  BFD_RELOC_TILEGX_SHAMT_X1,
+  BFD_RELOC_TILEGX_SHAMT_Y0,
+  BFD_RELOC_TILEGX_SHAMT_Y1,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2,
+  BFD_RELOC_TILEGX_IMM16_X0_HW3,
+  BFD_RELOC_TILEGX_IMM16_X1_HW3,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE,
+  BFD_RELOC_TILEGX_TLS_DTPMOD64,
+  BFD_RELOC_TILEGX_TLS_DTPOFF64,
+  BFD_RELOC_TILEGX_TLS_TPOFF64,
+  BFD_RELOC_TILEGX_TLS_DTPMOD32,
+  BFD_RELOC_TILEGX_TLS_DTPOFF32,
+  BFD_RELOC_TILEGX_TLS_TPOFF32,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *bfd_reloc_type_lookup
@@ -5077,14 +5344,17 @@
   /* Decompress sections in this BFD.  */
 #define BFD_DECOMPRESS 0x10000
 
+  /* BFD is a dummy, for plugins.  */
+#define BFD_PLUGIN 0x20000
+
   /* Flags bits to be saved in bfd_preserve_save.  */
 #define BFD_FLAGS_SAVED \
-  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS)
+  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN)
 
   /* Flags bits which are for BFD use only.  */
 #define BFD_FLAGS_FOR_BFD_USE_MASK \
   (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
-   | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
+   | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
 
   /* Currently my_archive is tested before adding origin to
      anything. I believe that this can become always an add of
@@ -5317,6 +5587,11 @@
        BFD_SEND (abfd, _bfd_find_nearest_line, \
                  (abfd, sec, syms, off, file, func, line))
 
+#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
+                                            line, disc) \
+       BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \
+                 (abfd, sec, syms, off, file, func, line, disc))
+
 #define bfd_find_line(abfd, syms, sym, file, line) \
        BFD_SEND (abfd, _bfd_find_line, \
                  (abfd, syms, sym, file, line))
@@ -5349,6 +5624,9 @@
 #define bfd_gc_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
 
+#define bfd_lookup_section_flags(link_info, flag_info) \
+       BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info))
+
 #define bfd_merge_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 
@@ -5505,6 +5783,9 @@
 /* Forward declaration.  */
 typedef struct bfd_link_info _bfd_link_info;
 
+/* Forward declaration.  */
+typedef struct flag_info flag_info;
+
 typedef struct bfd_target
 {
   /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
@@ -5536,7 +5817,11 @@
   char ar_pad_char;
 
   /* The maximum number of characters in an archive header.  */
-  unsigned short ar_max_namelen;
+  unsigned char ar_max_namelen;
+
+  /* How well this target matches, used to select between various
+     possible targets when more than one target matches.  */
+  unsigned char match_priority;
 
   /* Entries for byte swapping for data. These are different from the
      other entry points, since they don't take a BFD as the first argument.
@@ -5688,6 +5973,7 @@
   NAME##_bfd_is_target_special_symbol, \
   NAME##_get_lineno, \
   NAME##_find_nearest_line, \
+  _bfd_generic_find_nearest_line_discriminator, \
   _bfd_generic_find_line, \
   NAME##_find_inliner_info, \
   NAME##_bfd_make_debug_symbol, \
@@ -5711,6 +5997,9 @@
   bfd_boolean (*_bfd_find_nearest_line)
     (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
      const char **, const char **, unsigned int *);
+  bfd_boolean (*_bfd_find_nearest_line_discriminator)
+    (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
+     const char **, const char **, unsigned int *, unsigned int *);
   bfd_boolean (*_bfd_find_line)
     (bfd *, struct bfd_symbol **, struct bfd_symbol *,
      const char **, unsigned int *);
@@ -5770,6 +6059,7 @@
   NAME##_bfd_final_link, \
   NAME##_bfd_link_split_section, \
   NAME##_bfd_gc_sections, \
+  NAME##_bfd_lookup_section_flags, \
   NAME##_bfd_merge_sections, \
   NAME##_bfd_is_group_section, \
   NAME##_bfd_discard_group, \
@@ -5814,6 +6104,10 @@
   /* Remove sections that are not referenced from the output.  */
   bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
+  /* Sets the bitmask of allowed and disallowed section flags.  */
+  void (*_bfd_lookup_section_flags) (struct bfd_link_info *,
+                                     struct flag_info *);
+
   /* Attempt to merge SEC_MERGE sections.  */
   bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
 
@@ -5825,8 +6119,8 @@
 
   /* Check if SEC has been already linked during a reloceatable or
      final link.  */
-  void (*_section_already_linked) (bfd *, struct bfd_section *,
-                                   struct bfd_link_info *);
+  bfd_boolean (*_section_already_linked) (bfd *, asection *,
+                                          struct bfd_link_info *);
 
   /* Define a common symbol.  */
   bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
@@ -5895,7 +6189,8 @@
 #define bfd_link_split_section(abfd, sec) \
        BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
 
-void bfd_section_already_linked (bfd *abfd, asection *sec,
+bfd_boolean bfd_section_already_linked (bfd *abfd,
+    asection *sec,
     struct bfd_link_info *info);
 
 #define bfd_section_already_linked(abfd, sec, info) \
@@ -5912,6 +6207,9 @@
    (struct bfd_elf_version_tree *verdefs,
     const char *sym_name, bfd_boolean *hide);
 
+bfd_boolean bfd_hide_sym_by_version
+   (struct bfd_elf_version_tree *verdefs, const char *sym_name);
+
 /* Extracted from simple.c.  */
 bfd_byte *bfd_simple_get_relocated_section_contents
    (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
diff --git a/bfd/bfd.c b/bfd/bfd.c
index a9ce7cc..2871e2e 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,6 +1,6 @@
 /* Generic BFD library interface and support routines.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -157,14 +157,17 @@
 .  {* Decompress sections in this BFD.  *}
 .#define BFD_DECOMPRESS 0x10000
 .
+.  {* BFD is a dummy, for plugins.  *}
+.#define BFD_PLUGIN 0x20000
+.
 .  {* Flags bits to be saved in bfd_preserve_save.  *}
 .#define BFD_FLAGS_SAVED \
-.  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS)
+.  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN)
 .
 .  {* Flags bits which are for BFD use only.  *}
 .#define BFD_FLAGS_FOR_BFD_USE_MASK \
 .  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
-.   | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
+.   | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
 .
 .  {* Currently my_archive is tested before adding origin to
 .     anything. I believe that this can become always an add of
@@ -523,10 +526,12 @@
 void
 bfd_perror (const char *message)
 {
+  fflush (stdout);
   if (message == NULL || *message == '\0')
     fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
   else
     fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
+  fflush (stderr);
 }
 
 /*
@@ -723,6 +728,7 @@
   va_end (ap);
 
   putc ('\n', stderr);
+  fflush (stderr);
 }
 
 /* This is a function pointer to the routine which should handle BFD
@@ -1025,7 +1031,8 @@
       || strcmp (name, "pe-x86-64") == 0
       || strcmp (name, "pei-x86-64") == 0
       || strcmp (name, "pe-arm-wince-little") == 0
-      || strcmp (name, "pei-arm-wince-little") == 0)
+      || strcmp (name, "pei-arm-wince-little") == 0
+      || strcmp (name, "aixcoff-rs6000") == 0)
     return 1;
 
   if (CONST_STRNEQ (name, "mach-o"))
@@ -1335,6 +1342,11 @@
 .       BFD_SEND (abfd, _bfd_find_nearest_line, \
 .                 (abfd, sec, syms, off, file, func, line))
 .
+.#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
+.                                            line, disc) \
+.       BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \
+.                 (abfd, sec, syms, off, file, func, line, disc))
+.
 .#define bfd_find_line(abfd, syms, sym, file, line) \
 .       BFD_SEND (abfd, _bfd_find_line, \
 .                 (abfd, syms, sym, file, line))
@@ -1367,6 +1379,9 @@
 .#define bfd_gc_sections(abfd, link_info) \
 .	BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
 .
+.#define bfd_lookup_section_flags(link_info, flag_info) \
+.	BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info))
+.
 .#define bfd_merge_sections(abfd, link_info) \
 .	BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 .
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index ce92781..841c781 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -1,7 +1,7 @@
 /* Low-level I/O routines for BFDs.
 
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
 
    Written by Cygnus Support.
@@ -158,9 +158,15 @@
 .  int (*bclose) (struct bfd *abfd);
 .  int (*bflush) (struct bfd *abfd);
 .  int (*bstat) (struct bfd *abfd, struct stat *sb);
-.  {* Just like mmap: (void*)-1 on failure, mmapped address on success.  *}
+.  {* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual
+.     mmap parameter, except that LEN and OFFSET do not need to be page
+.     aligned.  Returns (void *)-1 on failure, mmapped address on success.
+.     Also write in MAP_ADDR the address of the page aligned buffer and in
+.     MAP_LEN the size mapped (a page multiple).  Use unmap with MAP_ADDR and
+.     MAP_LEN to unmap.  *}
 .  void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len,
-.                  int prot, int flags, file_ptr offset);
+.                  int prot, int flags, file_ptr offset,
+.                  void **map_addr, bfd_size_type *map_len);
 .};
 
 .extern const struct bfd_iovec _bfd_memory_iovec;
@@ -423,23 +429,28 @@
 
 SYNOPSIS
 	void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
-	                int prot, int flags, file_ptr offset);
+	                int prot, int flags, file_ptr offset,
+	                void **map_addr, bfd_size_type *map_len);
 
 DESCRIPTION
 	Return mmap()ed region of the file, if possible and implemented.
+        LEN and OFFSET do not need to be page aligned.  The page aligned
+        address and length are written to MAP_ADDR and MAP_LEN.
 
 */
 
 void *
 bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
-	  int prot, int flags, file_ptr offset)
+	  int prot, int flags, file_ptr offset,
+          void **map_addr, bfd_size_type *map_len)
 {
   void *ret = (void *)-1;
 
   if (abfd->iovec == NULL)
     return ret;
 
-  return abfd->iovec->bmmap (abfd, addr, len, prot, flags, offset);
+  return abfd->iovec->bmmap (abfd, addr, len, prot, flags, offset,
+                             map_addr, map_len);
 }
 
 /* Memory file I/O operations.  */
@@ -577,7 +588,7 @@
 {
   struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
 
-  memset (statbuf, 0, sizeof (statbuf));
+  memset (statbuf, 0, sizeof (*statbuf));
   statbuf->st_size = bim->size;
 
   return 0;
@@ -586,7 +597,9 @@
 static void *
 memory_bmmap (bfd *abfd ATTRIBUTE_UNUSED, void *addr ATTRIBUTE_UNUSED,
               bfd_size_type len ATTRIBUTE_UNUSED, int prot ATTRIBUTE_UNUSED,
-              int flags ATTRIBUTE_UNUSED, file_ptr offset ATTRIBUTE_UNUSED)
+              int flags ATTRIBUTE_UNUSED, file_ptr offset ATTRIBUTE_UNUSED,
+              void **map_addr ATTRIBUTE_UNUSED,
+              bfd_size_type *map_len ATTRIBUTE_UNUSED)
 {
   return (void *)-1;
 }
diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c
index 63ad5ed..4103e9c 100644
--- a/bfd/bfdwin.c
+++ b/bfd/bfdwin.c
@@ -1,5 +1,5 @@
 /* Support for memory-mapped windows into a BFD.
-   Copyright 1995, 1996, 2001, 2002, 2003, 2005, 2007, 2008, 2009
+   Copyright 1995, 1996, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -128,17 +128,16 @@
   if (pagesize == 0)
     abort ();
 
-  if (i == 0)
+  if (i == NULL)
     {
       i = bfd_zmalloc (sizeof (bfd_window_internal));
-      windowp->i = i;
-      if (i == 0)
+      if (i == NULL)
 	return FALSE;
-      i->data = 0;
+      i->data = NULL;
     }
 #ifdef HAVE_MMAP
   if (ok_to_map
-      && (i->data == 0 || i->mapped == 1)
+      && (i->data == NULL || i->mapped == 1)
       && (abfd->flags & BFD_IN_MEMORY) == 0)
     {
       file_ptr file_offset, offset2;
@@ -156,9 +155,9 @@
       if (abfd->iostream == NULL
 	  && (abfd->iovec == NULL
 	      || abfd->iovec->bseek (abfd, offset, SEEK_SET) != 0))
-	return FALSE;
-      fd = fileno ((FILE *) abfd->iostream);
+	goto free_and_fail;
 
+      fd = fileno ((FILE *) abfd->iostream);
       /* Compute offsets and size for mmap and for the user's data.  */
       offset2 = offset % pagesize;
       if (offset2 < 0)
@@ -169,10 +168,10 @@
       real_size -= real_size % pagesize;
 
       /* If we're re-using a memory region, make sure it's big enough.  */
-      if (i->data && i->size < size)
+      if (i->data != NULL && i->size < size)
 	{
 	  munmap (i->data, i->size);
-	  i->data = 0;
+	  i->data = NULL;
 	}
       i->data = mmap (i->data, real_size,
 		      writable ? PROT_WRITE | PROT_READ : PROT_READ,
@@ -185,11 +184,10 @@
 	  /* An error happened.  Report it, or try using malloc, or
 	     something.  */
 	  bfd_set_error (bfd_error_system_call);
-	  i->data = 0;
 	  windowp->data = 0;
 	  if (debug_windows)
 	    fprintf (stderr, "\t\tmmap failed!\n");
-	  return FALSE;
+	  goto free_and_fail;
 	}
       if (debug_windows)
 	fprintf (stderr, "\n\tmapped %ld at %p, offset is %ld\n",
@@ -198,6 +196,8 @@
       windowp->data = (bfd_byte *) i->data + offset2;
       windowp->size = size;
       i->mapped = 1;
+      i->refcount = 1;
+      windowp->i = i;
       return TRUE;
     }
   else if (debug_windows)
@@ -228,15 +228,18 @@
   if (i->data == NULL)
     {
       if (size_to_alloc == 0)
-	return TRUE;
-      return FALSE;
+	{
+	  windowp->i = i;
+	  return TRUE;
+	}
+      goto free_and_fail;
     }
   i->refcount = 1;
   if (bfd_seek (abfd, offset, SEEK_SET) != 0)
-    return FALSE;
+    goto free_and_fail;
   i->size = bfd_bread (i->data, size, abfd);
   if (i->size != size)
-    return FALSE;
+    goto free_and_fail;
   i->mapped = 0;
 #ifdef HAVE_MPROTECT
   if (!writable)
@@ -249,7 +252,13 @@
 #endif
   windowp->data = i->data;
   windowp->size = i->size;
+  windowp->i = i;
   return TRUE;
+
+ free_and_fail:
+  /* We have a bfd_window_internal, but an error occurred.  Free it. */
+  free (i);
+  return FALSE;
 }
 
 #endif /* USE_MMAP */
diff --git a/bfd/binary.c b/bfd/binary.c
index 2af0293..700c862 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -1,6 +1,6 @@
 /* BFD back-end for binary objects.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2009, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <[email protected]>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -299,6 +299,7 @@
 #define binary_bfd_get_relocated_section_contents  bfd_generic_get_relocated_section_contents
 #define binary_bfd_relax_section                   bfd_generic_relax_section
 #define binary_bfd_gc_sections                     bfd_generic_gc_sections
+#define binary_bfd_lookup_section_flags            bfd_generic_lookup_section_flags
 #define binary_bfd_merge_sections                  bfd_generic_merge_sections
 #define binary_bfd_is_group_section                bfd_generic_is_group_section
 #define binary_bfd_discard_group                   bfd_generic_discard_group
@@ -326,6 +327,7 @@
   0,				/* symbol_leading_char */
   ' ',				/* ar_pad_char */
   16,				/* ar_max_namelen */
+  255,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,	/* data */
diff --git a/bfd/bout.c b/bfd/bout.c
index 34c1a6b..cfd4abb 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 960 b.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -1387,6 +1387,7 @@
 #define b_out_bfd_final_link                   _bfd_generic_final_link
 #define b_out_bfd_link_split_section           _bfd_generic_link_split_section
 #define b_out_bfd_gc_sections                  bfd_generic_gc_sections
+#define b_out_bfd_lookup_section_flags         bfd_generic_lookup_section_flags
 #define b_out_bfd_merge_sections               bfd_generic_merge_sections
 #define b_out_bfd_is_group_section             bfd_generic_is_group_section
 #define b_out_bfd_discard_group                bfd_generic_discard_group
@@ -1409,7 +1410,7 @@
   '_',				/* Symbol leading char.  */
   ' ',				/* AR_pad_char.  */
   16,				/* AR_max_namelen.  */
-
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data.  */
@@ -1451,6 +1452,7 @@
   '_',				/* Symbol leading char.  */
   ' ',				/* AR_pad_char.  */
   16,				/* AR_max_namelen.  */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data.  */
diff --git a/bfd/cache.c b/bfd/cache.c
index 2239c28..5ddbbe4 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -45,6 +45,7 @@
 #include "bfd.h"
 #include "libbfd.h"
 #include "libiberty.h"
+#include "bfd_stdint.h"
 
 #ifdef HAVE_MMAP
 #include <sys/mman.h>
@@ -398,7 +399,9 @@
 	     bfd_size_type len ATTRIBUTE_UNUSED,
 	     int prot ATTRIBUTE_UNUSED,
 	     int flags ATTRIBUTE_UNUSED,
-	     file_ptr offset ATTRIBUTE_UNUSED)
+	     file_ptr offset ATTRIBUTE_UNUSED,
+             void **map_addr ATTRIBUTE_UNUSED,
+             bfd_size_type *map_len ATTRIBUTE_UNUSED)
 {
   void *ret = (void *) -1;
 
@@ -407,13 +410,35 @@
 #ifdef HAVE_MMAP
   else
     {
-      FILE *f = bfd_cache_lookup (abfd, CACHE_NO_SEEK_ERROR);
+      static uintptr_t pagesize_m1;
+      FILE *f;
+      file_ptr pg_offset;
+      bfd_size_type pg_len;
+
+      f = bfd_cache_lookup (abfd, CACHE_NO_SEEK_ERROR);
       if (f == NULL)
 	return ret;
 
-      ret = mmap (addr, len, prot, flags, fileno (f), offset);
+      if (pagesize_m1 == 0)
+        pagesize_m1 = getpagesize () - 1;
+
+      /* Handle archive members.  */
+      if (abfd->my_archive != NULL)
+        offset += abfd->origin;
+
+      /* Align.  */
+      pg_offset = offset & ~pagesize_m1;
+      pg_len = (len + (offset - pg_offset) + pagesize_m1) & ~pagesize_m1;
+
+      ret = mmap (addr, pg_len, prot, flags, fileno (f), pg_offset);
       if (ret == (void *) -1)
 	bfd_set_error (bfd_error_system_call);
+      else
+        {
+          *map_addr = ret;
+          *map_len = pg_len;
+          ret += offset & pagesize_m1;
+        }
     }
 #endif
 
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index 29a7423..40eaca9 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -1,5 +1,6 @@
 /* BFD back-end for CISCO crash dumps.
-   Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2010
+   Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007,
+   2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -332,9 +333,10 @@
      HAS_LINENO | HAS_DEBUG |
      HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
     (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-    0,			                                   /* symbol prefix */
-    ' ',						   /* ar_pad_char */
-    16,							   /* ar_max_namelen */
+    0,				/* symbol prefix */
+    ' ',			/* ar_pad_char */
+    16,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getb64, bfd_getb_signed_64, bfd_putb64,
     bfd_getb32, bfd_getb_signed_32, bfd_putb32,
     bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
@@ -385,6 +387,7 @@
     0,			                                   /* symbol prefix */
     ' ',						   /* ar_pad_char */
     16,							   /* ar_max_namelen */
+    0,				/* match_priority */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 12b49ac..4466e4d 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1,6 +1,6 @@
 /* BFD back-end for ALPHA Extended-Coff files.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007, 2008, 2009, 2010
+   2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Modified from coff-mips.c by Steve Chamberlain <[email protected]> and
    Ian Lance Taylor <[email protected]>.
@@ -2393,6 +2393,9 @@
 #define _bfd_ecoff_get_section_contents_in_window \
   _bfd_generic_get_section_contents_in_window
 
+/* Input section flag lookup is generic.  */
+#define _bfd_ecoff_bfd_lookup_section_flags bfd_generic_lookup_section_flags
+
 /* Relaxing sections is generic.  */
 #define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
 #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
@@ -2400,7 +2403,7 @@
 #define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
 #define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
 #define _bfd_ecoff_section_already_linked \
-  _bfd_generic_section_already_linked
+  _bfd_coff_section_already_linked
 #define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
 
 const bfd_target ecoffalpha_little_vec =
@@ -2418,6 +2421,7 @@
   0,				/* leading underscore */
   ' ',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
diff --git a/bfd/coff-aux.c b/bfd/coff-aux.c
index af1db03..84805a8 100644
--- a/bfd/coff-aux.c
+++ b/bfd/coff-aux.c
@@ -1,5 +1,5 @@
 /* BFD back-end for Apple M68K COFF A/UX 3.x files.
-   Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008
+   Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008, 2011
    Free Software Foundation, Inc.
    Written by Richard Henderson <[email protected]>.
 
@@ -105,7 +105,8 @@
 	  && (bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE)
 	      != (struct bfd_hash_entry *) NULL))
 	{
-	  if (! (*info->callbacks->notice) (info, name, abfd, section, value))
+	  if (! (*info->callbacks->notice) (info, h, abfd, section, value,
+					    flags, string))
 	    return FALSE;
 	}
 
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 57c47d0..2f17a55 100644
--- a/bfd/coff-i386.c
+++ b/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, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -661,6 +661,7 @@
 #endif
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
@@ -670,8 +671,13 @@
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
 
 /* Note that we allow an object file to be treated as a core file as well.  */
-    {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
-       bfd_generic_archive_p, coff_object_p},
+    /* bfd_check_format */
+#ifdef COFF_CHECK_FORMAT
+    {_bfd_dummy_target, COFF_CHECK_FORMAT,
+       bfd_generic_archive_p, COFF_CHECK_FORMAT},
+#else
+    {_bfd_dummy_target, coff_object_p, bfd_generic_archive_p, coff_object_p},
+#endif
     {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
        bfd_false},
     {bfd_false, coff_write_object_contents, /* bfd_write_contents */
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index b7ada16..9eb39a5 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel i860 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007, 2008, 2010  Free Software Foundation, Inc.
+   2003, 2004, 2005, 2007, 2008, 2010, 2011  Free Software Foundation, Inc.
    Created mostly by substituting "860" for "386" in coff-i386.c
    Harry Dolan <[email protected]>, October 1995
 
@@ -144,7 +144,7 @@
 		     char **error_message ATTRIBUTE_UNUSED)
 {
   reloc_howto_type *howto = reloc_entry->howto;
-  fprintf (stderr, _("Relocation `%s' not yet implemented\n"), howto->name);
+  (*_bfd_error_handler) (_("relocation `%s' not yet implemented"), howto->name);
   return bfd_reloc_notsupported;
 }
 
@@ -677,6 +677,7 @@
   '_',				/* leading underscore */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index d0374d2..928315f 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -1,6 +1,7 @@
 /* BFD back-end for Intel 960 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2007, 2008  Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -656,6 +657,7 @@
   '_',				/* leading underscore */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
 
 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c
index 38d9ac6..86e7617 100644
--- a/bfd/coff-ia64.c
+++ b/bfd/coff-ia64.c
@@ -1,5 +1,5 @@
 /* BFD back-end for HP/Intel IA-64 COFF files.
-   Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009
+   Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    Contributed by David Mosberger <[email protected]>
 
@@ -176,6 +176,7 @@
 #endif
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 8b2f9d7..27b2ec3 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola MCore COFF/PE
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -377,7 +377,7 @@
   if (info->relocatable)
     return TRUE;
 
-  /* Check if we have the same endianess */
+  /* Check if we have the same endianness */
   if (   input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
       && output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
     {
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 34fda3a..4048ca8 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1,6 +1,6 @@
 /* BFD back-end for MIPS Extended-Coff files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, [email protected].
@@ -1410,13 +1410,16 @@
 /* GC of sections is not done.  */
 #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
 
+/* Input section flags is not implemented.  */
+#define _bfd_ecoff_bfd_lookup_section_flags bfd_generic_lookup_section_flags
+
 /* Merging of sections is not done.  */
 #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
 
 #define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
 #define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
 #define _bfd_ecoff_section_already_linked \
-  _bfd_generic_section_already_linked
+  _bfd_coff_section_already_linked
 #define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
 
 extern const bfd_target ecoff_big_vec;
@@ -1436,6 +1439,7 @@
   0,				/* leading underscore */
   ' ',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
@@ -1480,6 +1484,7 @@
   0,				/* leading underscore */
   ' ',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
      bfd_getb16, bfd_getb_signed_16, bfd_putb16,
@@ -1523,6 +1528,7 @@
   0,				/* leading underscore */
   ' ',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index 30801fb..a9683df 100644
--- a/bfd/coff-or32.c
+++ b/bfd/coff-or32.c
@@ -1,5 +1,5 @@
 /* BFD back-end for OpenRISC 1000 COFF binaries.
-   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
    Free Software Foundation, Inc.
    Contributed by Ivan Guzvinec  <[email protected]>
 
@@ -594,6 +594,7 @@
   '_',        /* Leading underscore.  */
   '/',        /* ar_pad_char.  */
   15,         /* ar_max_namelen.  */
+  0,          /* match priority.  */
 
   /* Data.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
diff --git a/bfd/coff-pmac.c b/bfd/coff-pmac.c
deleted file mode 100644
index 2c548b5..0000000
--- a/bfd/coff-pmac.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* BFD back-end for Apple et al PowerPC Mac "XCOFF" files.
-   Copyright 1995, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-/* Tweak coffcode.h based on this being a PowerMac instead of RS/6000.  */
-
-#define POWERMAC
-
-#define TARGET_SYM	pmac_xcoff_vec
-#define TARGET_NAME	"xcoff-powermac"
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-#include "coff/internal.h"
-#include "coff/rs6000.h"
-#include "libcoff.h"
-#include "xcoff-target.h"
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 06eed24..b37a224 100644
--- a/bfd/coff-ppc.c
+++ b/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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Original version pieced together by Kim Knuttila ([email protected])
@@ -1843,10 +1843,9 @@
 	howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
       break;
     default:
-      fprintf (stderr,
-	      _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
-	      ppc_coff_howto_table[r_type].name,
-	      r_type);
+      (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"),
+			     ppc_coff_howto_table[r_type].name,
+			     r_type);
       howto = ppc_coff_howto_table + r_type;
       break;
     }
@@ -1916,10 +1915,9 @@
       howto = ppc_coff_howto_table + r_type;
       break;
     default:
-      fprintf (stderr,
-	      _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
-	      ppc_coff_howto_table[r_type].name,
-	      r_type);
+      (*_bfd_error_handler) (_("warning: unsupported reloc %s [%d] used -- it may not work"),
+			     ppc_coff_howto_table[r_type].name,
+			     r_type);
       howto = ppc_coff_howto_table + r_type;
       break;
     }
@@ -2403,8 +2401,7 @@
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
-  coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
-			   (PTR) &finfo);
+  bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
   if (finfo.failed)
     goto error_return;
 
@@ -2584,6 +2581,7 @@
   0,				/* leading char */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen??? FIXMEmgo */
+  0,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
@@ -2643,6 +2641,7 @@
   0,				/* leading char */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen??? FIXMEmgo */
+  0,				/* match priority.  */
 
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 7fb20d8..035812e 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1,6 +1,6 @@
 /* BFD back-end for IBM RS/6000 "XCOFF" files.
    Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010
+   2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
@@ -33,46 +33,30 @@
 #include "libcoff.h"
 #include "libxcoff.h"
 
-extern bfd_boolean _bfd_xcoff_mkobject
-  PARAMS ((bfd *));
-extern bfd_boolean _bfd_xcoff_copy_private_bfd_data
-  PARAMS ((bfd *, bfd *));
-extern bfd_boolean _bfd_xcoff_is_local_label_name
-  PARAMS ((bfd *, const char *));
+extern bfd_boolean _bfd_xcoff_mkobject (bfd *);
+extern bfd_boolean _bfd_xcoff_copy_private_bfd_data (bfd *, bfd *);
+extern bfd_boolean _bfd_xcoff_is_local_label_name (bfd *, const char *);
 extern reloc_howto_type *_bfd_xcoff_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
-extern bfd_boolean _bfd_xcoff_slurp_armap
-  PARAMS ((bfd *));
-extern const bfd_target *_bfd_xcoff_archive_p
-  PARAMS ((bfd *));
-extern PTR _bfd_xcoff_read_ar_hdr
-  PARAMS ((bfd *));
-extern bfd *_bfd_xcoff_openr_next_archived_file
-  PARAMS ((bfd *, bfd *));
-extern int _bfd_xcoff_stat_arch_elt
-  PARAMS ((bfd *, struct stat *));
+  (bfd *, bfd_reloc_code_real_type);
+extern bfd_boolean _bfd_xcoff_slurp_armap (bfd *);
+extern const bfd_target *_bfd_xcoff_archive_p (bfd *);
+extern PTR _bfd_xcoff_read_ar_hdr (bfd *);
+extern bfd *_bfd_xcoff_openr_next_archived_file (bfd *, bfd *);
+extern int _bfd_xcoff_stat_arch_elt (bfd *, struct stat *);
 extern bfd_boolean _bfd_xcoff_write_armap
-  PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-extern bfd_boolean _bfd_xcoff_write_archive_contents
-  PARAMS ((bfd *));
-extern int _bfd_xcoff_sizeof_headers
-  PARAMS ((bfd *, struct bfd_link_info *));
-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));
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
+extern bfd_boolean _bfd_xcoff_write_archive_contents (bfd *);
+extern int _bfd_xcoff_sizeof_headers (bfd *, struct bfd_link_info *);
+extern void _bfd_xcoff_swap_sym_in (bfd *, PTR, PTR);
+extern unsigned int _bfd_xcoff_swap_sym_out (bfd *, PTR, PTR);
+extern void _bfd_xcoff_swap_aux_in (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));
+  (bfd *, PTR, int, int, int, int, PTR);
+static void xcoff_swap_reloc_in (bfd *, PTR, PTR);
+static unsigned int xcoff_swap_reloc_out (bfd *, PTR, PTR);
 
 /* Forward declare xcoff_rtype2howto for coffcode.h macro.  */
-void xcoff_rtype2howto
-  PARAMS ((arelent *, struct internal_reloc *));
+void xcoff_rtype2howto (arelent *, struct internal_reloc *);
 
 /* coffcode.h needs these to be defined.  */
 #define RS6000COFF_C 1
@@ -97,14 +81,11 @@
 #define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
 #define coff_bfd_reloc_name_lookup _bfd_xcoff_reloc_name_lookup
 #ifdef AIX_CORE
-extern const bfd_target * rs6000coff_core_p
-  PARAMS ((bfd *abfd));
+extern const bfd_target * rs6000coff_core_p (bfd *abfd);
 extern bfd_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));
+  (bfd *cbfd, bfd *ebfd);
+extern char *rs6000coff_core_file_failing_command (bfd *abfd);
+extern int rs6000coff_core_file_failing_signal (bfd *abfd);
 #define CORE_FILE_P rs6000coff_core_p
 #define coff_core_file_failing_command \
   rs6000coff_core_file_failing_command
@@ -141,66 +122,49 @@
 
 /* The main body of code is in coffcode.h.  */
 
-static const char *normalize_filename
-  PARAMS ((bfd *));
+static const char *normalize_filename (bfd *);
 static bfd_boolean xcoff_write_armap_old
-  PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
 static bfd_boolean xcoff_write_armap_big
-  PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-static bfd_boolean xcoff_write_archive_contents_old
-  PARAMS ((bfd *));
-static bfd_boolean xcoff_write_archive_contents_big
-  PARAMS ((bfd *));
-static void xcoff_swap_ldhdr_in
-  PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
-static void xcoff_swap_ldhdr_out
-  PARAMS ((bfd *, const struct internal_ldhdr *, PTR));
-static void xcoff_swap_ldsym_in
-  PARAMS ((bfd *, const PTR, struct internal_ldsym *));
-static void xcoff_swap_ldsym_out
-  PARAMS ((bfd *, const struct internal_ldsym *, PTR));
-static void xcoff_swap_ldrel_in
-  PARAMS ((bfd *, const PTR, struct internal_ldrel *));
-static void xcoff_swap_ldrel_out
-  PARAMS ((bfd *, const struct internal_ldrel *, PTR));
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
+static bfd_boolean xcoff_write_archive_contents_old (bfd *);
+static bfd_boolean xcoff_write_archive_contents_big (bfd *);
+static void xcoff_swap_ldhdr_in (bfd *, const PTR, struct internal_ldhdr *);
+static void xcoff_swap_ldhdr_out (bfd *, const struct internal_ldhdr *, PTR);
+static void xcoff_swap_ldsym_in (bfd *, const PTR, struct internal_ldsym *);
+static void xcoff_swap_ldsym_out (bfd *, const struct internal_ldsym *, PTR);
+static void xcoff_swap_ldrel_in (bfd *, const PTR, struct internal_ldrel *);
+static void xcoff_swap_ldrel_out (bfd *, const struct internal_ldrel *, PTR);
 static bfd_boolean xcoff_ppc_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-	   struct internal_reloc *, struct internal_syment *, asection **));
+  (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+   struct internal_reloc *, struct internal_syment *, asection **);
 static bfd_boolean _bfd_xcoff_put_ldsymbol_name
-  PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
-	   const char *));
+  (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *);
 static asection *xcoff_create_csect_from_smclas
-  PARAMS ((bfd *, union internal_auxent *, const char *));
-static bfd_boolean xcoff_is_lineno_count_overflow
-  PARAMS ((bfd *, bfd_vma));
-static bfd_boolean xcoff_is_reloc_count_overflow
-  PARAMS ((bfd *, bfd_vma));
-static bfd_vma xcoff_loader_symbol_offset
-  PARAMS ((bfd *, struct internal_ldhdr *));
-static bfd_vma xcoff_loader_reloc_offset
-  PARAMS ((bfd *, struct internal_ldhdr *));
+  (bfd *, union internal_auxent *, const char *);
+static bfd_boolean xcoff_is_lineno_count_overflow (bfd *, bfd_vma);
+static bfd_boolean xcoff_is_reloc_count_overflow (bfd *, bfd_vma);
+static bfd_vma xcoff_loader_symbol_offset (bfd *, struct internal_ldhdr *);
+static bfd_vma xcoff_loader_reloc_offset (bfd *, struct internal_ldhdr *);
 static bfd_boolean xcoff_generate_rtinit
-  PARAMS ((bfd *, const char *, const char *, bfd_boolean));
-static bfd_boolean do_pad
-  PARAMS ((bfd *, unsigned int));
-static bfd_boolean do_copy
-  PARAMS ((bfd *, bfd *));
+  (bfd *, const char *, const char *, bfd_boolean);
+static bfd_boolean do_pad (bfd *, unsigned int);
+static bfd_boolean do_copy (bfd *, bfd *);
 
 /* Relocation functions */
-static bfd_boolean xcoff_reloc_type_br
-  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
+static bfd_boolean xcoff_reloc_type_br (XCOFF_RELOC_FUNCTION_ARGS);
 
 static bfd_boolean xcoff_complain_overflow_dont_func
-  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
+  (XCOFF_COMPLAIN_FUNCTION_ARGS);
 static bfd_boolean xcoff_complain_overflow_bitfield_func
-  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
+  (XCOFF_COMPLAIN_FUNCTION_ARGS);
 static bfd_boolean xcoff_complain_overflow_signed_func
-  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
+  (XCOFF_COMPLAIN_FUNCTION_ARGS);
 static bfd_boolean xcoff_complain_overflow_unsigned_func
-  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
+  (XCOFF_COMPLAIN_FUNCTION_ARGS);
 
 bfd_boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
+  (XCOFF_RELOC_FUNCTION_ARGS) =
 {
   xcoff_reloc_type_pos,	 /* R_POS   (0x00) */
   xcoff_reloc_type_neg,	 /* R_NEG   (0x01) */
@@ -233,7 +197,7 @@
 };
 
 bfd_boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
-  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)) =
+  (XCOFF_COMPLAIN_FUNCTION_ARGS) =
 {
   xcoff_complain_overflow_dont_func,
   xcoff_complain_overflow_bitfield_func,
@@ -358,8 +322,7 @@
    so the COFF routines are compatible.  */
 
 bfd_boolean
-_bfd_xcoff_mkobject (abfd)
-     bfd *abfd;
+_bfd_xcoff_mkobject (bfd *abfd)
 {
   coff_data_type *coff;
   bfd_size_type amt = sizeof (struct xcoff_tdata);
@@ -391,9 +354,7 @@
 /* Copy XCOFF data from one BFD to another.  */
 
 bfd_boolean
-_bfd_xcoff_copy_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+_bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
   struct xcoff_tdata *ix, *ox;
   asection *sec;
@@ -439,18 +400,14 @@
    -x option.  */
 
 bfd_boolean
-_bfd_xcoff_is_local_label_name (abfd, name)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     const char *name ATTRIBUTE_UNUSED;
+_bfd_xcoff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+                                const char *name ATTRIBUTE_UNUSED)
 {
   return FALSE;
 }
 
 void
-_bfd_xcoff_swap_sym_in (abfd, ext1, in1)
-     bfd *abfd;
-     PTR ext1;
-     PTR in1;
+_bfd_xcoff_swap_sym_in (bfd *abfd, PTR ext1, PTR in1)
 {
   SYMENT *ext = (SYMENT *)ext1;
   struct internal_syment * in = (struct internal_syment *)in1;
@@ -473,10 +430,7 @@
 }
 
 unsigned int
-_bfd_xcoff_swap_sym_out (abfd, inp, extp)
-     bfd *abfd;
-     PTR inp;
-     PTR extp;
+_bfd_xcoff_swap_sym_out (bfd *abfd, PTR inp, PTR extp)
 {
   struct internal_syment *in = (struct internal_syment *)inp;
   SYMENT *ext =(SYMENT *)extp;
@@ -500,14 +454,8 @@
 }
 
 void
-_bfd_xcoff_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1)
-     bfd *abfd;
-     PTR ext1;
-     int type;
-     int in_class;
-     int indx;
-     int numaux;
-     PTR in1;
+_bfd_xcoff_swap_aux_in (bfd *abfd, PTR ext1, int type, int in_class,
+                        int indx, int numaux, PTR in1)
 {
   AUXENT * ext = (AUXENT *)ext1;
   union internal_auxent *in = (union internal_auxent *)in1;
@@ -515,23 +463,23 @@
   switch (in_class)
     {
     case C_FILE:
-      if (ext->x_file.x_fname[0] == 0)
+      if (ext->x_file.x_n.x_fname[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);
+	    H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset);
 	}
       else
 	{
 	  if (numaux > 1)
 	    {
 	      if (indx == 0)
-		memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+		memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname,
 			numaux * sizeof (AUXENT));
 	    }
 	  else
 	    {
-	      memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+	      memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN);
 	    }
 	}
       goto end;
@@ -615,19 +563,11 @@
      end of block.  */
 }
 
-
-unsigned int _bfd_xcoff_swap_aux_out
-  PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-
 unsigned int
-_bfd_xcoff_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp)
-     bfd * abfd;
-     PTR   inp;
-     int   type;
-     int   in_class;
-     int   indx ATTRIBUTE_UNUSED;
-     int   numaux ATTRIBUTE_UNUSED;
-     PTR   extp;
+_bfd_xcoff_swap_aux_out (bfd *abfd, PTR inp, int type, int in_class,
+                         int indx ATTRIBUTE_UNUSED,
+                         int numaux ATTRIBUTE_UNUSED,
+                         PTR extp)
 {
   union internal_auxent *in = (union internal_auxent *)inp;
   AUXENT *ext = (AUXENT *)extp;
@@ -638,12 +578,13 @@
     case C_FILE:
       if (in->x_file.x_fname[0] == 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);
+	  H_PUT_32 (abfd, 0, ext->x_file.x_n.x_n.x_zeroes);
+	  H_PUT_32 (abfd, in->x_file.x_n.x_offset,
+                    ext->x_file.x_n.x_n.x_offset);
 	}
       else
 	{
-	  memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+	  memcpy (ext->x_file.x_n.x_fname, in->x_file.x_fname, FILNMLEN);
 	}
       goto end;
 
@@ -1117,9 +1058,7 @@
 };
 
 void
-xcoff_rtype2howto (relent, internal)
-     arelent *relent;
-     struct internal_reloc *internal;
+xcoff_rtype2howto (arelent *relent, struct internal_reloc *internal)
 {
   if (internal->r_type > R_RBRC)
     abort ();
@@ -1150,9 +1089,8 @@
 }
 
 reloc_howto_type *
-_bfd_xcoff_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+_bfd_xcoff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                              bfd_reloc_code_real_type code)
 {
   switch (code)
     {
@@ -1238,9 +1176,8 @@
 /* Set the magic for archive.  */
 
 bfd_boolean
-bfd_xcoff_ar_archive_set_magic (abfd, magic)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     char *magic ATTRIBUTE_UNUSED;
+bfd_xcoff_ar_archive_set_magic (bfd *abfd ATTRIBUTE_UNUSED,
+                                char *magic ATTRIBUTE_UNUSED)
 {
   /* Not supported yet.  */
   return FALSE;
@@ -1250,8 +1187,7 @@
 /* Read in the armap of an XCOFF archive.  */
 
 bfd_boolean
-_bfd_xcoff_slurp_armap (abfd)
-     bfd *abfd;
+_bfd_xcoff_slurp_armap (bfd *abfd)
 {
   file_ptr off;
   size_t namlen;
@@ -1404,8 +1340,7 @@
 /* See if this is an XCOFF archive.  */
 
 const bfd_target *
-_bfd_xcoff_archive_p (abfd)
-     bfd *abfd;
+_bfd_xcoff_archive_p (bfd *abfd)
 {
   struct artdata *tdata_hold;
   char magic[SXCOFFARMAG];
@@ -1511,8 +1446,7 @@
 /* Read the archive header in an XCOFF archive.  */
 
 PTR
-_bfd_xcoff_read_ar_hdr (abfd)
-     bfd *abfd;
+_bfd_xcoff_read_ar_hdr (bfd *abfd)
 {
   bfd_size_type namlen;
   struct areltdata *ret;
@@ -1600,9 +1534,7 @@
 /* Open the next element in an XCOFF archive.  */
 
 bfd *
-_bfd_xcoff_openr_next_archived_file (archive, last_file)
-     bfd *archive;
-     bfd *last_file;
+_bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
   file_ptr filestart;
 
@@ -1661,9 +1593,7 @@
 /* Stat an element in an XCOFF archive.  */
 
 int
-_bfd_xcoff_stat_arch_elt (abfd, s)
-     bfd *abfd;
-     struct stat *s;
+_bfd_xcoff_stat_arch_elt (bfd *abfd, struct stat *s)
 {
   if (abfd->arelt_data == NULL)
     {
@@ -1698,8 +1628,7 @@
 /* Normalize a file name for inclusion in an archive.  */
 
 static const char *
-normalize_filename (abfd)
-     bfd *abfd;
+normalize_filename (bfd *abfd)
 {
   const char *file;
   const char *filename;
@@ -1716,12 +1645,8 @@
 /* Write out an XCOFF armap.  */
 
 static bfd_boolean
-xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
-     bfd *abfd;
-     unsigned int elength ATTRIBUTE_UNUSED;
-     struct orl *map;
-     unsigned int orl_count;
-     int stridx;
+xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED,
+                       struct orl *map, unsigned int orl_count, int stridx)
 {
   struct archive_iterator iterator;
   struct xcoff_ar_hdr hdr;
@@ -1815,9 +1740,7 @@
   (v) = bfd_scan_vma (buff20, (const char **) NULL, 10)
 
 static bfd_boolean
-do_pad (abfd, number)
-     bfd *abfd;
-     unsigned int number;
+do_pad (bfd *abfd, unsigned int number)
 {
   bfd_byte b = 0;
 
@@ -1833,9 +1756,7 @@
 }
 
 static bfd_boolean
-do_copy (out_bfd, in_bfd)
-     bfd *out_bfd;
-     bfd *in_bfd;
+do_copy (bfd *out_bfd, bfd *in_bfd)
 {
   bfd_size_type remaining;
   bfd_byte buffer[DEFAULT_BUFFERSIZE];
@@ -1865,12 +1786,8 @@
 }
 
 static bfd_boolean
-xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
-     bfd *abfd;
-     unsigned int elength ATTRIBUTE_UNUSED;
-     struct orl *map;
-     unsigned int orl_count;
-     int stridx;
+xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED,
+                       struct orl *map, unsigned int orl_count, int stridx)
 {
   struct archive_iterator iterator;
   struct xcoff_ar_file_hdr_big *fhdr;
@@ -2109,12 +2026,8 @@
 }
 
 bfd_boolean
-_bfd_xcoff_write_armap (abfd, elength, map, orl_count, stridx)
-     bfd *abfd;
-     unsigned int elength ATTRIBUTE_UNUSED;
-     struct orl *map;
-     unsigned int orl_count;
-     int stridx;
+_bfd_xcoff_write_armap (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED,
+                        struct orl *map, unsigned int orl_count, int stridx)
 {
   if (! xcoff_big_format_p (abfd))
     return xcoff_write_armap_old (abfd, elength, map, orl_count, stridx);
@@ -2126,8 +2039,7 @@
    rather than fussing with the freelist and so forth.  */
 
 static bfd_boolean
-xcoff_write_archive_contents_old (abfd)
-     bfd *abfd;
+xcoff_write_archive_contents_old (bfd *abfd)
 {
   struct archive_iterator iterator;
   struct xcoff_ar_file_hdr fhdr;
@@ -2333,8 +2245,7 @@
 }
 
 static bfd_boolean
-xcoff_write_archive_contents_big (abfd)
-     bfd *abfd;
+xcoff_write_archive_contents_big (bfd *abfd)
 {
   struct xcoff_ar_file_hdr_big fhdr;
   bfd_size_type count;
@@ -2570,8 +2481,7 @@
 }
 
 bfd_boolean
-_bfd_xcoff_write_archive_contents (abfd)
-     bfd *abfd;
+_bfd_xcoff_write_archive_contents (bfd *abfd)
 {
   if (! xcoff_big_format_p (abfd))
     return xcoff_write_archive_contents_old (abfd);
@@ -2605,10 +2515,7 @@
 /* Swap in the ldhdr structure.  */
 
 static void
-xcoff_swap_ldhdr_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldhdr *dst;
+xcoff_swap_ldhdr_in (bfd *abfd, const PTR s, struct internal_ldhdr *dst)
 {
   const struct external_ldhdr *src = (const struct external_ldhdr *) s;
 
@@ -2625,10 +2532,7 @@
 /* Swap out the ldhdr structure.  */
 
 static void
-xcoff_swap_ldhdr_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldhdr *src;
-     PTR d;
+xcoff_swap_ldhdr_out (bfd *abfd, const struct internal_ldhdr *src, PTR d)
 {
   struct external_ldhdr *dst = (struct external_ldhdr *) d;
 
@@ -2645,10 +2549,7 @@
 /* Swap in the ldsym structure.  */
 
 static void
-xcoff_swap_ldsym_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldsym *dst;
+xcoff_swap_ldsym_in (bfd *abfd, const PTR s, struct internal_ldsym *dst)
 {
   const struct external_ldsym *src = (const struct external_ldsym *) s;
 
@@ -2669,10 +2570,7 @@
 /* Swap out the ldsym structure.  */
 
 static void
-xcoff_swap_ldsym_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldsym *src;
-     PTR d;
+xcoff_swap_ldsym_out (bfd *abfd, const struct internal_ldsym *src, PTR d)
 {
   struct external_ldsym *dst = (struct external_ldsym *) d;
 
@@ -2693,10 +2591,7 @@
 }
 
 static void
-xcoff_swap_reloc_in (abfd, s, d)
-     bfd *abfd;
-     PTR s;
-     PTR d;
+xcoff_swap_reloc_in (bfd *abfd, PTR s, PTR d)
 {
   struct external_reloc *src = (struct external_reloc *) s;
   struct internal_reloc *dst = (struct internal_reloc *) d;
@@ -2710,10 +2605,7 @@
 }
 
 static unsigned int
-xcoff_swap_reloc_out (abfd, s, d)
-     bfd *abfd;
-     PTR s;
-     PTR d;
+xcoff_swap_reloc_out (bfd *abfd, PTR s, PTR d)
 {
   struct internal_reloc *src = (struct internal_reloc *) s;
   struct external_reloc *dst = (struct external_reloc *) d;
@@ -2729,10 +2621,7 @@
 /* Swap in the ldrel structure.  */
 
 static void
-xcoff_swap_ldrel_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldrel *dst;
+xcoff_swap_ldrel_in (bfd *abfd, const PTR s, struct internal_ldrel *dst)
 {
   const struct external_ldrel *src = (const struct external_ldrel *) s;
 
@@ -2745,10 +2634,7 @@
 /* Swap out the ldrel structure.  */
 
 static void
-xcoff_swap_ldrel_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldrel *src;
-     PTR d;
+xcoff_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, PTR d)
 {
   struct external_ldrel *dst = (struct external_ldrel *) d;
 
@@ -2760,35 +2646,31 @@
 
 
 bfd_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;
+xcoff_reloc_type_noop (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;
 }
 
 bfd_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;
+xcoff_reloc_type_fail (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"),
@@ -2798,54 +2680,48 @@
 }
 
 bfd_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;
+xcoff_reloc_type_pos (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;
 }
 
 bfd_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;
+xcoff_reloc_type_neg (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;
 }
 
 bfd_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;
+xcoff_reloc_type_rel (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;
 
@@ -2859,18 +2735,16 @@
 }
 
 bfd_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;
+xcoff_reloc_type_toc (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;
 
@@ -2902,18 +2776,16 @@
 }
 
 bfd_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;
+xcoff_reloc_type_ba (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;
@@ -2924,18 +2796,16 @@
 }
 
 static bfd_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;
+xcoff_reloc_type_br (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;
   bfd_vma section_offset;
@@ -3032,18 +2902,16 @@
 }
 
 bfd_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;
+xcoff_reloc_type_crel (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;
@@ -3059,21 +2927,20 @@
 }
 
 static bfd_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;
+xcoff_complain_overflow_dont_func (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 bfd_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;
+xcoff_complain_overflow_bitfield_func (bfd *input_bfd,
+                                       bfd_vma val,
+                                       bfd_vma relocation,
+                                       struct reloc_howto_struct *howto)
 {
   bfd_vma fieldmask, signmask, ss;
   bfd_vma a, b, sum;
@@ -3144,11 +3011,10 @@
 }
 
 static bfd_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;
+xcoff_complain_overflow_signed_func (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;
@@ -3206,11 +3072,10 @@
 }
 
 static bfd_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;
+xcoff_complain_overflow_unsigned_func (bfd *input_bfd,
+                                       bfd_vma val,
+                                       bfd_vma relocation,
+                                       struct reloc_howto_struct *howto)
 {
   bfd_vma addrmask, fieldmask;
   bfd_vma a, b, sum;
@@ -3356,17 +3221,14 @@
 */
 
 bfd_boolean
-xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
-			    input_section, contents, relocs, syms,
-			    sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     struct internal_reloc *relocs;
-     struct internal_syment *syms;
-     asection **sections;
+xcoff_ppc_relocate_section (bfd *output_bfd,
+                            struct bfd_link_info *info,
+                            bfd *input_bfd,
+                            asection *input_section,
+                            bfd_byte *contents,
+                            struct internal_reloc *relocs,
+                            struct internal_syment *syms,
+                            asection **sections)
 {
   struct internal_reloc *rel;
   struct internal_reloc *relend;
@@ -3552,11 +3414,10 @@
 }
 
 static bfd_boolean
-_bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
-     bfd *abfd ATTRIBUTE_UNUSED;
-	 struct xcoff_loader_info *ldinfo;
-	 struct internal_ldsym *ldsym;
-	 const char *name;
+_bfd_xcoff_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED,
+                              struct xcoff_loader_info *ldinfo,
+                              struct internal_ldsym *ldsym,
+                              const char *name)
 {
   size_t len;
   len = strlen (name);
@@ -3624,10 +3485,9 @@
 }
 
 static asection *
-xcoff_create_csect_from_smclas (abfd, aux, symbol_name)
-     bfd *abfd;
-     union internal_auxent *aux;
-     const char *symbol_name;
+xcoff_create_csect_from_smclas (bfd *abfd,
+                                union internal_auxent *aux,
+                                const char *symbol_name)
 {
   asection *return_value = NULL;
 
@@ -3658,9 +3518,7 @@
 }
 
 static bfd_boolean
-xcoff_is_lineno_count_overflow (abfd, value)
-    bfd *abfd ATTRIBUTE_UNUSED;
-	bfd_vma value;
+xcoff_is_lineno_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value)
 {
   if (0xffff <= value)
     return TRUE;
@@ -3669,9 +3527,7 @@
 }
 
 static bfd_boolean
-xcoff_is_reloc_count_overflow (abfd, value)
-    bfd *abfd ATTRIBUTE_UNUSED;
-	bfd_vma value;
+xcoff_is_reloc_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value)
 {
   if (0xffff <= value)
     return TRUE;
@@ -3680,27 +3536,21 @@
 }
 
 static bfd_vma
-xcoff_loader_symbol_offset (abfd, ldhdr)
-    bfd *abfd;
-    struct internal_ldhdr *ldhdr ATTRIBUTE_UNUSED;
+xcoff_loader_symbol_offset (bfd *abfd,
+                            struct internal_ldhdr *ldhdr ATTRIBUTE_UNUSED)
 {
   return bfd_xcoff_ldhdrsz (abfd);
 }
 
 static bfd_vma
-xcoff_loader_reloc_offset (abfd, ldhdr)
-    bfd *abfd;
-    struct internal_ldhdr *ldhdr;
+xcoff_loader_reloc_offset (bfd *abfd, struct internal_ldhdr *ldhdr)
 {
   return bfd_xcoff_ldhdrsz (abfd) + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (abfd);
 }
 
 static bfd_boolean
-xcoff_generate_rtinit  (abfd, init, fini, rtld)
-     bfd *abfd;
-     const char *init;
-     const char *fini;
-     bfd_boolean rtld;
+xcoff_generate_rtinit  (bfd *abfd, const char *init, const char *fini,
+                        bfd_boolean rtld)
 {
   bfd_byte filehdr_ext[FILHSZ];
   bfd_byte scnhdr_ext[SCNHSZ];
@@ -4012,6 +3862,18 @@
     0x00000000,	/* traceback table */
   };
 
+/* Table to convert DWARF flags to section names.  */
+
+const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
+  { SSUBTYP_DWINFO,  ".dwinfo",   TRUE },
+  { SSUBTYP_DWLINE,  ".dwline",   TRUE },
+  { SSUBTYP_DWPBNMS, ".dwpbnms",  TRUE },
+  { SSUBTYP_DWPBTYP, ".dwpbtyp",  TRUE },
+  { SSUBTYP_DWARNGE, ".dwarnge",  TRUE },
+  { SSUBTYP_DWABREV, ".dwabrev",  FALSE },
+  { SSUBTYP_DWSTR,   ".dwstr",    TRUE },
+  { SSUBTYP_DWRNGES, ".dwrnges",  TRUE }
+};
 
 static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
   {
@@ -4124,6 +3986,7 @@
     0,				/* leading char */
     '/',			/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -4211,6 +4074,7 @@
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
+    _bfd_generic_find_nearest_line_discriminator,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -4239,6 +4103,7 @@
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
@@ -4377,6 +4242,7 @@
     0,				/* leading char */
     '/',			/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -4464,6 +4330,7 @@
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
+    _bfd_generic_find_nearest_line_discriminator,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -4492,6 +4359,7 @@
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 28ac0ab..e707add 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -1,6 +1,7 @@
 /* BFD back-end for Renesas Super-H COFF binaries.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <[email protected]>.
    Relaxing code written by Ian Lance Taylor, <[email protected]>.
@@ -517,7 +518,7 @@
     if (sh_reloc_map[i].bfd_reloc_val == code)
       return &sh_coff_howtos[(int) sh_reloc_map[i].shcoff_reloc_val];
 
-  fprintf (stderr, "SH Error: unknown reloc type %d\n", code);
+  (*_bfd_error_handler) (_("SH Error: unknown reloc type %d"), code);
   return NULL;
 }
 
@@ -3184,6 +3185,7 @@
   '_',				/* leading symbol underscore */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
@@ -3228,6 +3230,7 @@
   '_',				/* leading symbol underscore */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
   bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index 78a4936..c10194e 100644
--- a/bfd/coff-stgo32.c
+++ b/bfd/coff-stgo32.c
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub).
-   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2007, 2009
-   Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2007, 2009,
+   2011  Free Software Foundation, Inc.
    Written by Robert Hoehne.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -95,6 +95,10 @@
 #define COFF_ADJUST_AUX_OUT_PRE adjust_aux_out_pre
 #define COFF_ADJUST_AUX_OUT_POST adjust_aux_out_post
 
+static const bfd_target *go32_check_format (bfd *abfd);
+
+#define COFF_CHECK_FORMAT go32_check_format
+
 static bfd_boolean
   go32_stubbed_coff_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
 
@@ -102,9 +106,9 @@
 
 #include "coff-i386.c"
 
-/* This macro is used, because I cannot assume the endianess of the
+/* This macro is used, because I cannot assume the endianness of the
    host system.  */
-#define _H(index) (H_GET_16 (abfd, (header+index*2)))
+#define _H(index) (H_GET_16 (abfd, (header + index * 2)))
 
 /* These bytes are a 2048-byte DOS executable, which loads the COFF
    image into memory and then runs it. It is called 'stub'.  */
@@ -414,3 +418,23 @@
 
   return TRUE;
 }
+
+/* coff_object_p only checks 2 bytes F_MAGIC at GO32_STUBSIZE inside the file
+   which is too fragile.  */
+
+static const bfd_target *
+go32_check_format (bfd *abfd)
+{
+  char mz[2];
+
+  if (bfd_bread (mz, 2, abfd) != 2 || mz[0] != 'M' || mz[1] != 'Z')
+    {
+      bfd_set_error (bfd_error_wrong_format);
+      return NULL;
+    }
+
+  if (bfd_seek (abfd, 0, SEEK_SET) != 0)
+    return NULL;
+
+  return coff_object_p (abfd);
+}
diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c
index 7670afe..497d340 100644
--- a/bfd/coff-tic30.c
+++ b/bfd/coff-tic30.c
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C30 coff binaries.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008
+   Copyright 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2011
    Free Software Foundation, Inc.
    Contributed by Steven Haworth ([email protected])
 
@@ -203,6 +203,7 @@
   '_',				/* leading symbol underscore */
   '/',				/* ar_pad_char */
   15,				/* ar_max_namelen */
+  0,				/* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,	/* data */
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index 672897d..3c353da 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C54X coff binaries.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2011
    Free Software Foundation, Inc.
    Contributed by Timothy Wall ([email protected])
 
@@ -446,6 +446,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
@@ -490,6 +491,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
@@ -535,6 +537,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
@@ -580,6 +583,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
@@ -625,6 +629,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
@@ -670,6 +675,7 @@
     '_',				/* leading symbol underscore */
     '/',				/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     bfd_getl16, bfd_getl_signed_16, bfd_putl16,	/* data */
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index 8083d97..d8a8a2e 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -1,5 +1,6 @@
 /* BFD back-end for AMD 64 COFF files.
-   Copyright 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -546,7 +547,7 @@
 {
   reloc_howto_type *howto;
 
-  if (rel->r_type > ARRAY_SIZE (howto_table))
+  if (rel->r_type >= ARRAY_SIZE (howto_table))
     {
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -762,6 +763,7 @@
 #endif
   '/',				/* Ar_pad_char.  */
   15,				/* Ar_max_namelen.  */
+  0,				/* match priority.  */
 
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index b154b67..0821b6f 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1,6 +1,6 @@
 /* BFD back-end for IBM RS/6000 "XCOFF64" files.
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010
+   2010, 2011
    Free Software Foundation, Inc.
    Written Clinton Popetz.
    Contributed by Cygnus Support.
@@ -85,106 +85,104 @@
 #define coff_SWAP_lineno_out _bfd_xcoff64_swap_lineno_out
 
 static void _bfd_xcoff64_swap_lineno_in
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 static unsigned int _bfd_xcoff64_swap_lineno_out
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 static bfd_boolean _bfd_xcoff64_put_symbol_name
-  PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
-	   const char *));
+  (bfd *, struct bfd_strtab_hash *, struct internal_syment *, const char *);
 static bfd_boolean _bfd_xcoff64_put_ldsymbol_name
-  PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
-	   const char *));
+  (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *);
 static void _bfd_xcoff64_swap_sym_in
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 static unsigned int _bfd_xcoff64_swap_sym_out
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 static void _bfd_xcoff64_swap_aux_in
-  PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+  (bfd *, void *, int, int, int, int, void *);
 static unsigned int _bfd_xcoff64_swap_aux_out
-  PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+  (bfd *, void *, int, int, int, int, void *);
 static void xcoff64_swap_reloc_in
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 static unsigned int xcoff64_swap_reloc_out
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 extern bfd_boolean _bfd_xcoff_mkobject
-  PARAMS ((bfd *));
+  (bfd *);
 extern bfd_boolean _bfd_xcoff_copy_private_bfd_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 extern bfd_boolean _bfd_xcoff_is_local_label_name
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 extern void xcoff64_rtype2howto
-  PARAMS ((arelent *, struct internal_reloc *));
+  (arelent *, struct internal_reloc *);
 extern reloc_howto_type * xcoff64_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
+  (bfd *, bfd_reloc_code_real_type);
 extern bfd_boolean _bfd_xcoff_slurp_armap
-  PARAMS ((bfd *));
-extern PTR _bfd_xcoff_read_ar_hdr
-  PARAMS ((bfd *));
+  (bfd *);
+extern void *_bfd_xcoff_read_ar_hdr
+  (bfd *);
 extern bfd *_bfd_xcoff_openr_next_archived_file
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 extern int _bfd_xcoff_stat_arch_elt
-  PARAMS ((bfd *, struct stat *));
+  (bfd *, struct stat *);
 extern bfd_boolean _bfd_xcoff_write_armap
-  PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
 extern bfd_boolean _bfd_xcoff_write_archive_contents
-  PARAMS ((bfd *));
+  (bfd *);
 extern int _bfd_xcoff_sizeof_headers
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern void _bfd_xcoff_swap_sym_in
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 extern unsigned int _bfd_xcoff_swap_sym_out
-  PARAMS ((bfd *, PTR, PTR));
+  (bfd *, void *, void *);
 extern void _bfd_xcoff_swap_aux_in
-  PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+  (bfd *, void *, int, int, int, int, void *);
 extern unsigned int _bfd_xcoff_swap_aux_out
-  PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+  (bfd *, void *, int, int, int, int, void *);
 static void xcoff64_swap_ldhdr_in
-  PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
+  (bfd *, const void *, struct internal_ldhdr *);
 static void xcoff64_swap_ldhdr_out
-  PARAMS ((bfd *, const struct internal_ldhdr *, PTR d));
+  (bfd *, const struct internal_ldhdr *, void *d);
 static void xcoff64_swap_ldsym_in
-  PARAMS ((bfd *, const PTR, struct internal_ldsym *));
+  (bfd *, const void *, struct internal_ldsym *);
 static void xcoff64_swap_ldsym_out
-  PARAMS ((bfd *, const struct internal_ldsym *, PTR d));
+  (bfd *, const struct internal_ldsym *, void *d);
 static void xcoff64_swap_ldrel_in
-  PARAMS ((bfd *, const PTR, struct internal_ldrel *));
+  (bfd *, const void *, struct internal_ldrel *);
 static void xcoff64_swap_ldrel_out
-  PARAMS ((bfd *, const struct internal_ldrel *, PTR d));
+  (bfd *, const struct internal_ldrel *, void *d);
 static bfd_boolean xcoff64_write_object_contents
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean xcoff64_ppc_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-	   struct internal_reloc *, struct internal_syment *,
-	   asection **));
+  (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+   struct internal_reloc *, struct internal_syment *,
+   asection **);
 static bfd_boolean xcoff64_slurp_armap
-  PARAMS ((bfd *));
+  (bfd *);
 static const bfd_target *xcoff64_archive_p
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd *xcoff64_openr_next_archived_file
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static int xcoff64_sizeof_headers
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static asection *xcoff64_create_csect_from_smclas
-  PARAMS ((bfd *, union internal_auxent *, const char *));
+  (bfd *, union internal_auxent *, const char *);
 static bfd_boolean xcoff64_is_lineno_count_overflow
-  PARAMS ((bfd *, bfd_vma));
+  (bfd *, bfd_vma);
 static bfd_boolean xcoff64_is_reloc_count_overflow
-  PARAMS ((bfd *, bfd_vma));
+  (bfd *, bfd_vma);
 static bfd_vma xcoff64_loader_symbol_offset
-  PARAMS ((bfd *, struct internal_ldhdr *));
+  (bfd *, struct internal_ldhdr *);
 static bfd_vma xcoff64_loader_reloc_offset
-  PARAMS ((bfd *, struct internal_ldhdr *));
+  (bfd *, struct internal_ldhdr *);
 static bfd_boolean xcoff64_generate_rtinit
-  PARAMS ((bfd *, const char *, const char *, bfd_boolean));
+  (bfd *, const char *, const char *, bfd_boolean);
 static bfd_boolean xcoff64_bad_format_hook
-  PARAMS ((bfd *, PTR ));
+  (bfd *, void *);
 
 /* Relocation functions */
 static bfd_boolean xcoff64_reloc_type_br
-  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
+  (XCOFF_RELOC_FUNCTION_ARGS);
 
 bfd_boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
+  (XCOFF_RELOC_FUNCTION_ARGS) =
 {
   xcoff_reloc_type_pos,	 /* R_POS   (0x00) */
   xcoff_reloc_type_neg,	 /* R_NEG   (0x01) */
@@ -242,13 +240,13 @@
 #define coff_bfd_reloc_name_lookup xcoff64_reloc_name_lookup
 #ifdef AIX_CORE
 extern const bfd_target * rs6000coff_core_p
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 extern bfd_boolean rs6000coff_core_file_matches_executable_p
-  PARAMS ((bfd *cbfd, bfd *ebfd));
+  (bfd *cbfd, bfd *ebfd);
 extern char *rs6000coff_core_file_failing_command
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 extern int rs6000coff_core_file_failing_signal
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 #define CORE_FILE_P rs6000coff_core_p
 #define coff_core_file_failing_command \
   rs6000coff_core_file_failing_command
@@ -286,10 +284,7 @@
 /* For XCOFF64, the effective width of symndx changes depending on
    whether we are the first entry.  Sigh.  */
 static void
-_bfd_xcoff64_swap_lineno_in (abfd, ext1, in1)
-     bfd *abfd;
-     PTR ext1;
-     PTR in1;
+_bfd_xcoff64_swap_lineno_in (bfd *abfd, void *ext1, void *in1)
 {
   LINENO *ext = (LINENO *) ext1;
   struct internal_lineno *in = (struct internal_lineno *) in1;
@@ -302,10 +297,7 @@
 }
 
 static unsigned int
-_bfd_xcoff64_swap_lineno_out (abfd, inp, outp)
-     bfd *abfd;
-     PTR inp;
-     PTR outp;
+_bfd_xcoff64_swap_lineno_out (bfd *abfd, void *inp, void *outp)
 {
   struct internal_lineno *in = (struct internal_lineno *) inp;
   struct external_lineno *ext = (struct external_lineno *) outp;
@@ -322,10 +314,7 @@
 }
 
 static void
-_bfd_xcoff64_swap_sym_in (abfd, ext1, in1)
-     bfd *abfd;
-     PTR ext1;
-     PTR in1;
+_bfd_xcoff64_swap_sym_in (bfd *abfd, void *ext1, void *in1)
 {
   struct external_syment *ext = (struct external_syment *) ext1;
   struct internal_syment *in = (struct internal_syment *) in1;
@@ -340,10 +329,7 @@
 }
 
 static unsigned int
-_bfd_xcoff64_swap_sym_out (abfd, inp, extp)
-     bfd *abfd;
-     PTR inp;
-     PTR extp;
+_bfd_xcoff64_swap_sym_out (bfd *abfd, void *inp, void *extp)
 {
   struct internal_syment *in = (struct internal_syment *) inp;
   struct external_syment *ext = (struct external_syment *) extp;
@@ -358,14 +344,8 @@
 }
 
 static void
-_bfd_xcoff64_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1)
-     bfd *abfd;
-     PTR ext1;
-     int type;
-     int in_class;
-     int indx;
-     int numaux;
-     PTR in1;
+_bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type, int in_class,
+                          int indx, int numaux, void *in1)
 {
   union external_auxent *ext = (union external_auxent *) ext1;
   union internal_auxent *in = (union internal_auxent *) in1;
@@ -373,14 +353,15 @@
   switch (in_class)
     {
     case C_FILE:
-      if (ext->x_file.x_n.x_zeroes[0] == 0)
+      if (ext->x_file.x_n.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);
+	  in->x_file.x_n.x_offset =
+            H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset);
 	}
       else
 	{
-	  memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+	  memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN);
 	}
       goto end;
 
@@ -450,30 +431,27 @@
 }
 
 static unsigned int
-_bfd_xcoff64_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp)
-     bfd *abfd;
-     PTR inp;
-     int type;
-     int in_class;
-     int indx ATTRIBUTE_UNUSED;
-     int numaux ATTRIBUTE_UNUSED;
-     PTR extp;
+_bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type, int in_class,
+                           int indx ATTRIBUTE_UNUSED,
+                           int numaux ATTRIBUTE_UNUSED,
+                           void *extp)
 {
   union internal_auxent *in = (union internal_auxent *) inp;
   union external_auxent *ext = (union external_auxent *) extp;
 
-  memset ((PTR) ext, 0, bfd_coff_auxesz (abfd));
+  memset (ext, 0, bfd_coff_auxesz (abfd));
   switch (in_class)
     {
     case C_FILE:
       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);
+	  H_PUT_32 (abfd, 0, ext->x_file.x_n.x_n.x_zeroes);
+	  H_PUT_32 (abfd, in->x_file.x_n.x_offset,
+                    ext->x_file.x_n.x_n.x_offset);
 	}
       else
 	{
-	  memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+	  memcpy (ext->x_file.x_n.x_fname, in->x_file.x_fname, FILNMLEN);
 	}
       H_PUT_8 (abfd, _AUX_FILE, ext->x_auxtype.x_auxtype);
       goto end;
@@ -541,11 +519,9 @@
 }
 
 static bfd_boolean
-_bfd_xcoff64_put_symbol_name (abfd, strtab, sym, name)
-     bfd *abfd;
-     struct bfd_strtab_hash *strtab;
-     struct internal_syment *sym;
-     const char *name;
+_bfd_xcoff64_put_symbol_name (bfd *abfd, struct bfd_strtab_hash *strtab,
+                              struct internal_syment *sym,
+                              const char *name)
 {
   bfd_boolean hash;
   bfd_size_type indx;
@@ -567,11 +543,10 @@
 }
 
 static bfd_boolean
-_bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct xcoff_loader_info *ldinfo;
-     struct internal_ldsym *ldsym;
-     const char *name;
+_bfd_xcoff64_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED,
+                                struct xcoff_loader_info *ldinfo,
+                                struct internal_ldsym *ldsym,
+                                const char *name)
 {
   size_t len;
   len = strlen (name);
@@ -615,10 +590,9 @@
 /* Swap in the ldhdr structure.  */
 
 static void
-xcoff64_swap_ldhdr_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldhdr *dst;
+xcoff64_swap_ldhdr_in (bfd *abfd,
+                       const void *s,
+                       struct internal_ldhdr *dst)
 {
   const struct external_ldhdr *src = (const struct external_ldhdr *) s;
 
@@ -637,10 +611,7 @@
 /* Swap out the ldhdr structure.  */
 
 static void
-xcoff64_swap_ldhdr_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldhdr *src;
-     PTR d;
+xcoff64_swap_ldhdr_out (bfd *abfd, const struct internal_ldhdr *src, void *d)
 {
   struct external_ldhdr *dst = (struct external_ldhdr *) d;
 
@@ -659,10 +630,7 @@
 /* Swap in the ldsym structure.  */
 
 static void
-xcoff64_swap_ldsym_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldsym *dst;
+xcoff64_swap_ldsym_in (bfd *abfd, const void *s, struct internal_ldsym *dst)
 {
   const struct external_ldsym *src = (const struct external_ldsym *) s;
   /* XCOFF64 does not use l_zeroes like XCOFF32
@@ -681,10 +649,7 @@
 /* Swap out the ldsym structure.  */
 
 static void
-xcoff64_swap_ldsym_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldsym *src;
-     PTR d;
+xcoff64_swap_ldsym_out (bfd *abfd, const struct internal_ldsym *src, void *d)
 {
   struct external_ldsym *dst = (struct external_ldsym *) d;
 
@@ -698,10 +663,7 @@
 }
 
 static void
-xcoff64_swap_reloc_in (abfd, s, d)
-     bfd *abfd;
-     PTR s;
-     PTR d;
+xcoff64_swap_reloc_in (bfd *abfd, void *s, void *d)
 {
   struct external_reloc *src = (struct external_reloc *) s;
   struct internal_reloc *dst = (struct internal_reloc *) d;
@@ -715,10 +677,7 @@
 }
 
 static unsigned int
-xcoff64_swap_reloc_out (abfd, s, d)
-     bfd *abfd;
-     PTR s;
-     PTR d;
+xcoff64_swap_reloc_out (bfd *abfd, void *s, void *d)
 {
   struct internal_reloc *src = (struct internal_reloc *) s;
   struct external_reloc *dst = (struct external_reloc *) d;
@@ -734,10 +693,7 @@
 /* Swap in the ldrel structure.  */
 
 static void
-xcoff64_swap_ldrel_in (abfd, s, dst)
-     bfd *abfd;
-     const PTR s;
-     struct internal_ldrel *dst;
+xcoff64_swap_ldrel_in (bfd *abfd, const void *s, struct internal_ldrel *dst)
 {
   const struct external_ldrel *src = (const struct external_ldrel *) s;
 
@@ -750,10 +706,7 @@
 /* Swap out the ldrel structure.  */
 
 static void
-xcoff64_swap_ldrel_out (abfd, src, d)
-     bfd *abfd;
-     const struct internal_ldrel *src;
-     PTR d;
+xcoff64_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, void *d)
 {
   struct external_ldrel *dst = (struct external_ldrel *) d;
 
@@ -764,8 +717,7 @@
 }
 
 static bfd_boolean
-xcoff64_write_object_contents (abfd)
-     bfd *abfd;
+xcoff64_write_object_contents (bfd *abfd)
 {
   asection *current;
   bfd_boolean hasrelocs = FALSE;
@@ -776,9 +728,9 @@
   file_ptr sym_base;
   unsigned long reloc_size = 0;
   unsigned long lnno_size = 0;
-  asection *text_sec = ((void *) 0);
-  asection *data_sec = ((void *) 0);
-  asection *bss_sec = ((void *) 0);
+  asection *text_sec = NULL;
+  asection *data_sec = NULL;
+  asection *bss_sec = NULL;
   struct internal_filehdr internal_f;
   struct internal_aouthdr internal_a;
 
@@ -898,7 +850,7 @@
 
       amount = bfd_coff_scnhsz (abfd);
       if (bfd_coff_swap_scnhdr_out (abfd, &section, &buff) == 0
-	  || bfd_bwrite ((PTR) (&buff), amount, abfd) != amount)
+	  || bfd_bwrite (&buff, amount, abfd) != amount)
 	return FALSE;
     }
 
@@ -1081,8 +1033,8 @@
     if (buff == NULL)
       return FALSE;
 
-    bfd_coff_swap_filehdr_out (abfd, (PTR) &internal_f, (PTR) buff);
-    amount = bfd_bwrite ((PTR) buff, amount, abfd);
+    bfd_coff_swap_filehdr_out (abfd, &internal_f, buff);
+    amount = bfd_bwrite (buff, amount, abfd);
 
     free (buff);
 
@@ -1099,8 +1051,8 @@
       if (buff == NULL)
 	return FALSE;
 
-      bfd_coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) buff);
-      amount = bfd_bwrite ((PTR) buff, amount, abfd);
+      bfd_coff_swap_aouthdr_out (abfd, &internal_a, buff);
+      amount = bfd_bwrite (buff, amount, abfd);
 
       free (buff);
 
@@ -1112,18 +1064,16 @@
 }
 
 static bfd_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;
+xcoff64_reloc_type_br (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;
   bfd_vma section_offset;
@@ -1221,17 +1171,14 @@
    See xcoff_ppc_relocation_section for more information. */
 
 bfd_boolean
-xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
-			      input_section, contents, relocs, syms,
-			      sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     struct internal_reloc *relocs;
-     struct internal_syment *syms;
-     asection **sections;
+xcoff64_ppc_relocate_section (bfd *output_bfd,
+                              struct bfd_link_info *info,
+                              bfd *input_bfd,
+                              asection *input_section,
+                              bfd_byte *contents,
+                              struct internal_reloc *relocs,
+                              struct internal_syment *syms,
+                              asection **sections)
 {
   struct internal_reloc *rel;
   struct internal_reloc *relend;
@@ -1829,9 +1776,7 @@
 };
 
 void
-xcoff64_rtype2howto (relent, internal)
-     arelent *relent;
-     struct internal_reloc *internal;
+xcoff64_rtype2howto (arelent *relent, struct internal_reloc *internal)
 {
   if (internal->r_type > R_RBRC)
     abort ();
@@ -1868,9 +1813,8 @@
 }
 
 reloc_howto_type *
-xcoff64_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+xcoff64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                           bfd_reloc_code_real_type code)
 {
   switch (code)
     {
@@ -1913,8 +1857,7 @@
 /* Read in the armap of an XCOFF archive.  */
 
 static bfd_boolean
-xcoff64_slurp_armap (abfd)
-     bfd *abfd;
+xcoff64_slurp_armap (bfd *abfd)
 {
   file_ptr off;
   size_t namlen;
@@ -1946,7 +1889,7 @@
     return FALSE;
 
   /* The symbol table starts with a normal archive header.  */
-  if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
+  if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
       != SIZEOF_AR_HDR_BIG)
     return FALSE;
 
@@ -1962,7 +1905,7 @@
   contents = (bfd_byte *) bfd_alloc (abfd, sz);
   if (contents == NULL)
     return FALSE;
-  if (bfd_bread ((PTR) contents, sz, abfd) != sz)
+  if (bfd_bread (contents, sz, abfd) != sz)
     return FALSE;
 
   /* The symbol table starts with an eight byte count.  */
@@ -2009,8 +1952,7 @@
 /* See if this is an NEW XCOFF archive.  */
 
 static const bfd_target *
-xcoff64_archive_p (abfd)
-     bfd *abfd;
+xcoff64_archive_p (bfd *abfd)
 {
   struct artdata *tdata_hold;
   char magic[SXCOFFARMAG];
@@ -2018,7 +1960,7 @@
   struct xcoff_ar_file_hdr_big hdr;
   bfd_size_type amt = SXCOFFARMAG;
 
-  if (bfd_bread ((PTR) magic, amt, abfd) != amt)
+  if (bfd_bread (magic, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
@@ -2036,7 +1978,7 @@
 
   /* Now read the rest of the file header.  */
   amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
-  if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
+  if (bfd_bread (&hdr.memoff, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
@@ -2083,9 +2025,7 @@
 /* Open the next element in an XCOFF archive.  */
 
 static bfd *
-xcoff64_openr_next_archived_file (archive, last_file)
-     bfd *archive;
-     bfd *last_file;
+xcoff64_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
   bfd_vma filestart;
 
@@ -2141,13 +2081,9 @@
   return size;
 }
 
-
-
 static asection *
-xcoff64_create_csect_from_smclas (abfd, aux, symbol_name)
-     bfd *abfd;
-     union internal_auxent *aux;
-     const char *symbol_name;
+xcoff64_create_csect_from_smclas (bfd *abfd, union internal_auxent *aux,
+                                  const char *symbol_name)
 {
   asection *return_value = NULL;
 
@@ -2181,41 +2117,35 @@
 }
 
 static bfd_boolean
-xcoff64_is_lineno_count_overflow (abfd, value)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_vma value ATTRIBUTE_UNUSED;
+xcoff64_is_lineno_count_overflow (bfd *abfd ATTRIBUTE_UNUSED,
+                                  bfd_vma value ATTRIBUTE_UNUSED)
 {
   return FALSE;
 }
 
 static bfd_boolean
-xcoff64_is_reloc_count_overflow (abfd, value)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_vma value ATTRIBUTE_UNUSED;
+xcoff64_is_reloc_count_overflow (bfd *abfd ATTRIBUTE_UNUSED,
+                                 bfd_vma value ATTRIBUTE_UNUSED)
 {
   return FALSE;
 }
 
 static bfd_vma
-xcoff64_loader_symbol_offset (abfd, ldhdr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct internal_ldhdr *ldhdr;
+xcoff64_loader_symbol_offset (bfd *abfd ATTRIBUTE_UNUSED,
+                              struct internal_ldhdr *ldhdr)
 {
   return (ldhdr->l_symoff);
 }
 
 static bfd_vma
-xcoff64_loader_reloc_offset (abfd, ldhdr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct internal_ldhdr *ldhdr;
+xcoff64_loader_reloc_offset (bfd *abfd ATTRIBUTE_UNUSED,
+                             struct internal_ldhdr *ldhdr)
 {
   return (ldhdr->l_rldoff);
 }
 
 static bfd_boolean
-xcoff64_bad_format_hook (abfd, filehdr)
-     bfd * abfd;
-     PTR filehdr;
+xcoff64_bad_format_hook (bfd * abfd, void *filehdr)
 {
   struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
 
@@ -2230,11 +2160,8 @@
 }
 
 static bfd_boolean
-xcoff64_generate_rtinit (abfd, init, fini, rtld)
-     bfd *abfd;
-     const char *init;
-     const char *fini;
-     bfd_boolean rtld;
+xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini,
+                         bfd_boolean rtld)
 {
   bfd_byte filehdr_ext[FILHSZ];
   bfd_byte scnhdr_ext[SCNHSZ * 3];
@@ -2695,6 +2622,7 @@
     0,				/* leading char */
     '/',			/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -2782,6 +2710,7 @@
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
+    _bfd_generic_find_nearest_line_discriminator,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -2810,6 +2739,7 @@
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
@@ -2826,19 +2756,18 @@
     /* Opposite endian version, none exists */
     NULL,
 
-    (void *) &bfd_xcoff_backend_data,
+    &bfd_xcoff_backend_data,
   };
 
 extern const bfd_target *xcoff64_core_p
-  PARAMS ((bfd *));
+  (bfd *);
 extern bfd_boolean xcoff64_core_file_matches_executable_p
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 extern char *xcoff64_core_file_failing_command
-  PARAMS ((bfd *));
+  (bfd *);
 extern int xcoff64_core_file_failing_signal
-  PARAMS ((bfd *));
-#define xcoff64_core_file_pid \
-  _bfd_nocore_core_file_pid
+  (bfd *);
+#define xcoff64_core_file_pid _bfd_nocore_core_file_pid
 
 /* AIX 5 */
 static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data =
@@ -2951,6 +2880,7 @@
     0,				/* leading char */
     '/',			/* ar_pad_char */
     15,				/* ar_max_namelen */
+    0,				/* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -3038,6 +2968,7 @@
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
+    _bfd_generic_find_nearest_line_discriminator,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -3066,6 +2997,7 @@
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
@@ -3082,5 +3014,5 @@
     /* Opposite endian version, none exists.  */
     NULL,
 
-    (void *) & bfd_xcoff_aix5_backend_data,
+    & bfd_xcoff_aix5_backend_data,
   };
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 70f9851..6f9685b 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1,6 +1,6 @@
 /* Support for the generic parts of most COFF variants, for BFD.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -581,6 +581,17 @@
     {
       styp_flags = STYP_TYPCHK;
     }
+  else if (sec_flags & SEC_DEBUGGING)
+    {
+      int i;
+
+      for (i = 0; i < XCOFF_DWSECT_NBR_NAMES; i++)
+        if (!strcmp (sec_name, xcoff_dwsect_names[i].name))
+          {
+            styp_flags = STYP_DWARF | xcoff_dwsect_names[i].flag;
+            break;
+          }
+    }
 #endif
   /* Try and figure out what it should be */
   else if (sec_flags & SEC_CODE)
@@ -658,7 +669,10 @@
 
   /* FIXME: There is no gas syntax to specify the debug section flag.  */
   if (is_dbg)
-      sec_flags = SEC_DEBUGGING | SEC_READONLY;
+    {
+      sec_flags &= (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD);
+      sec_flags |= SEC_DEBUGGING | SEC_READONLY;
+    }
 
   /* skip LOAD */
   /* READONLY later */
@@ -773,6 +787,10 @@
     }
   else if (styp_flags & STYP_PAD)
     sec_flags = 0;
+#ifdef RS6000COFF_C
+  else if (styp_flags & STYP_DWARF)
+    sec_flags |= SEC_DEBUGGING;
+#endif
   else if (strcmp (name, _TEXT) == 0)
     {
       if (sec_flags & SEC_NEVER_LOAD)
@@ -1714,6 +1732,7 @@
 {
   combined_entry_type *native;
   bfd_size_type amt;
+  unsigned char sclass = C_STAT;
 
   section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
 
@@ -1721,9 +1740,22 @@
   if (bfd_xcoff_text_align_power (abfd) != 0
       && strcmp (bfd_get_section_name (abfd, section), ".text") == 0)
     section->alignment_power = bfd_xcoff_text_align_power (abfd);
-  if (bfd_xcoff_data_align_power (abfd) != 0
+  else if (bfd_xcoff_data_align_power (abfd) != 0
       && strcmp (bfd_get_section_name (abfd, section), ".data") == 0)
     section->alignment_power = bfd_xcoff_data_align_power (abfd);
+  else
+    {
+      int i;
+
+      for (i = 0; i < XCOFF_DWSECT_NBR_NAMES; i++)
+        if (strcmp (bfd_get_section_name (abfd, section),
+                    xcoff_dwsect_names[i].name) == 0)
+          {
+            section->alignment_power = 0;
+            sclass = C_DWARF;
+            break;
+          }
+    }
 #endif
 
   /* Set up the section symbol.  */
@@ -1747,7 +1779,7 @@
      for n_numaux is already correct.  */
 
   native->u.syment.n_type = T_NULL;
-  native->u.syment.n_sclass = C_STAT;
+  native->u.syment.n_sclass = sclass;
 
   coffsymbol (section->symbol)->native = native;
 
@@ -1860,12 +1892,14 @@
       file_ptr oldpos = bfd_tell (abfd);
       bfd_size_type relsz = bfd_coff_relsz (abfd);
 
-      bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0);
+      if (bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0) != 0)
+	return;
       if (bfd_bread (& dst, relsz, abfd) != relsz)
 	return;
 
       coff_swap_reloc_in (abfd, &dst, &n);
-      bfd_seek (abfd, oldpos, 0);
+      if (bfd_seek (abfd, oldpos, 0) != 0)
+	return;
       section->reloc_count = hdr->s_nreloc = n.r_vaddr - 1;
       section->rel_filepos += relsz;
     }
@@ -3295,6 +3329,8 @@
       if (!(current->flags & SEC_HAS_CONTENTS))
 	continue;
 
+      current->rawsize = current->size;
+
 #ifdef COFF_IMAGE_WITH_PE
       /* Make sure we skip empty sections in a PE image.  */
       if (current->size == 0)
@@ -3361,7 +3397,7 @@
 
 #ifdef COFF_IMAGE_WITH_PE
       /* Set the padded size.  */
-      current->size = (current->size + page_size -1) & -page_size;
+      current->size = (current->size + page_size - 1) & -page_size;
 #endif
 
       sofar += current->size;
@@ -4748,6 +4784,10 @@
 	    case C_THUMBLABEL:   /* Thumb label.  */
 	    case C_THUMBSTATFUNC:/* Thumb static function.  */
 #endif
+#ifdef RS6000COFF_C
+            case C_DWARF:	 /* A label in a dwarf section.  */
+            case C_INFO:	 /* A label in a comment section.  */
+#endif
 	    case C_LABEL:	 /* Label.  */
 	      if (src->u.syment.n_scnum == N_DEBUG)
 		dst->symbol.flags = BSF_DEBUGGING;
@@ -4852,7 +4892,7 @@
 		 to the symbol instead of the index.  FIXME: This
 		 should use a union.  */
 	      src->u.syment.n_value =
-		(long) (native_symbols + src->u.syment.n_value);
+		(long) (intptr_t) (native_symbols + src->u.syment.n_value);
 	      dst->symbol.value = src->u.syment.n_value;
 	      src->fix_value = 1;
 	      break;
@@ -4894,6 +4934,11 @@
 		  && src->u.syment.n_value == 0
 		  && src->u.syment.n_scnum == 0)
 		break;
+#ifdef RS6000COFF_C
+              /* XCOFF specific: deleted entry.  */
+              if (src->u.syment.n_value == C_NULL_VALUE)
+                break;
+#endif
 	      /* Fall through.  */
 	    case C_EXTDEF:	/* External definition.  */
 	    case C_ULABEL:	/* Undefined label.  */
@@ -5607,6 +5652,10 @@
 #define coff_bfd_gc_sections		    bfd_generic_gc_sections
 #endif
 
+#ifndef coff_bfd_lookup_section_flags
+#define coff_bfd_lookup_section_flags	    bfd_generic_lookup_section_flags
+#endif
+
 #ifndef coff_bfd_merge_sections
 #define coff_bfd_merge_sections		    bfd_generic_merge_sections
 #endif
@@ -5621,7 +5670,7 @@
 
 #ifndef coff_section_already_linked
 #define coff_section_already_linked \
-  _bfd_generic_section_already_linked
+  _bfd_coff_section_already_linked
 #endif
 
 #ifndef coff_bfd_define_common_symbol
@@ -5643,6 +5692,7 @@
   UNDER,			/* Leading symbol underscore.  */	\
   '/',				/* AR_pad_char.  */			\
   15,				/* AR_max_namelen.  */			\
+  0,				/* match priority.  */			\
 									\
   /* Data conversion functions.  */					\
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,				\
@@ -5693,6 +5743,7 @@
   UNDER,			/* Leading symbol underscore.  */	\
   '/',				/* AR_pad_char.  */			\
   15,				/* AR_max_namelen.  */			\
+  0,				/* match priority.  */			\
 									\
   /* Data conversion functions.  */					\
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,				\
@@ -5743,6 +5794,7 @@
   UNDER,			/* Leading symbol underscore.  */	\
   '/',				/* AR_pad_char.  */			\
   15,				/* AR_max_namelen.  */			\
+  0,				/* match priority.  */			\
 									\
   /* Data conversion functions.  */					\
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,				\
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index fc82d57..a9f3b47 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -915,6 +915,9 @@
   unsigned int numaux = native->u.syment.n_numaux;
   int type = native->u.syment.n_type;
   int n_sclass = (int) native->u.syment.n_sclass;
+  asection *output_section = symbol->section->output_section
+			       ? symbol->section->output_section
+			       : symbol->section;
   void * buf;
   bfd_size_type symesz;
 
@@ -933,7 +936,7 @@
 
   else
     native->u.syment.n_scnum =
-      symbol->section->output_section->target_index;
+      output_section->target_index;
 
   coff_fix_symbol_name (abfd, symbol, native, string_size_p,
 			debug_string_section_p, debug_string_size_p);
@@ -990,6 +993,9 @@
 {
   combined_entry_type *native;
   combined_entry_type dummy;
+  asection *output_section = symbol->section->output_section
+			       ? symbol->section->output_section
+			       : symbol->section;
 
   native = &dummy;
   native->u.syment.n_type = T_NULL;
@@ -1015,12 +1021,11 @@
     }
   else
     {
-      native->u.syment.n_scnum =
-	symbol->section->output_section->target_index;
+      native->u.syment.n_scnum = output_section->target_index;
       native->u.syment.n_value = (symbol->value
 				  + symbol->section->output_offset);
       if (! obj_pe (abfd))
-	native->u.syment.n_value += symbol->section->output_section->vma;
+	native->u.syment.n_value += output_section->vma;
 
       /* Copy the any flags from the file header into the symbol.
          FIXME: Why?  */
@@ -2113,7 +2118,7 @@
   /* Also try examining DWARF2 debugging information.  */
   if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
 				     filename_ptr, functionname_ptr,
-				     line_ptr, 0,
+				     line_ptr, NULL, 0,
 				     &coff_data(abfd)->dwarf2_find_line_info))
     return TRUE;
 
@@ -2394,3 +2399,70 @@
   else
     return NULL;
 }
+
+bfd_boolean
+_bfd_coff_section_already_linked (bfd *abfd,
+				  asection *sec,
+				  struct bfd_link_info *info)
+{
+  flagword flags;
+  const char *name, *key;
+  struct bfd_section_already_linked *l;
+  struct bfd_section_already_linked_hash_entry *already_linked_list;
+  struct coff_comdat_info *s_comdat;
+
+  flags = sec->flags;
+  if ((flags & SEC_LINK_ONCE) == 0)
+    return FALSE;
+
+  /* The COFF backend linker doesn't support group sections.  */
+  if ((flags & SEC_GROUP) != 0)
+    return FALSE;
+
+  name = bfd_get_section_name (abfd, sec);
+  s_comdat = bfd_coff_get_comdat_section (abfd, sec);
+
+  if (s_comdat != NULL)
+    key = s_comdat->name;
+  else
+    {
+      if (CONST_STRNEQ (name, ".gnu.linkonce.")
+	  && (key = strchr (name + sizeof (".gnu.linkonce.") - 1, '.')) != NULL)
+	key++;
+      else
+	/* FIXME: gcc as of 2011-09 emits sections like .text$<key>,
+	   .xdata$<key> and .pdata$<key> only the first of which has a
+	   comdat key.  Should these all match the LTO IR key?  */
+	key = name;
+    }
+
+  already_linked_list = bfd_section_already_linked_table_lookup (key);
+
+  for (l = already_linked_list->entry; l != NULL; l = l->next)
+    {
+      struct coff_comdat_info *l_comdat;
+
+      l_comdat = bfd_coff_get_comdat_section (l->sec->owner, l->sec);
+
+      /* The section names must match, and both sections must be
+	 comdat and have the same comdat name, or both sections must
+	 be non-comdat.  LTO IR plugin sections are an exception.  They
+	 are always named .gnu.linkonce.t.<key> (<key> is some string)
+	 and match any comdat section with comdat name of <key>, and
+	 any linkonce section with the same suffix, ie.
+	 .gnu.linkonce.*.<key>.  */
+      if (((s_comdat != NULL) == (l_comdat != NULL)
+	   && strcmp (name, l->sec->name) == 0)
+	  || (l->sec->owner->flags & BFD_PLUGIN) != 0)
+	{
+	  /* The section has already been linked.  See if we should
+	     issue a warning.  */
+	  return _bfd_handle_already_linked (sec, l, info);
+	}
+    }
+
+  /* This is the first section with this name.  Record it.  */
+  if (!bfd_section_already_linked_table_insert (already_linked_list, sec))
+    info->callbacks->einfo (_("%F%P: already_linked_table: %E\n"));
+  return FALSE;
+}
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index a28d396..bca1364 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1,6 +1,6 @@
 /* COFF specific linker code.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -244,8 +244,8 @@
 	  if (h != (struct bfd_link_hash_entry *) NULL
 	      && h->type == bfd_link_hash_undefined)
 	    {
-	      if (! (*info->callbacks->add_archive_element)
-					(info, abfd, name, subsbfd))
+	      if (!(*info->callbacks
+		    ->add_archive_element) (info, abfd, name, subsbfd))
 		return FALSE;
 	      *pneeded = TRUE;
 	      return TRUE;
@@ -269,29 +269,38 @@
 				 struct bfd_link_info *info,
 				 bfd_boolean *pneeded)
 {
-  bfd *subsbfd = NULL;
+  bfd *oldbfd;
+  bfd_boolean needed;
 
-  if (! _bfd_coff_get_external_symbols (abfd))
+  if (!_bfd_coff_get_external_symbols (abfd))
     return FALSE;
 
-  if (! coff_link_check_ar_symbols (abfd, info, pneeded, &subsbfd))
+  oldbfd = abfd;
+  if (!coff_link_check_ar_symbols (abfd, info, pneeded, &abfd))
     return FALSE;
 
-  /* Potentially, the add_archive_element hook may have set a
-     substitute BFD for us.  */
-  if (*pneeded
-      && subsbfd
-      && ! _bfd_coff_get_external_symbols (subsbfd))
-    return FALSE;
+  needed = *pneeded;
+  if (needed)
+    {
+      /* Potentially, the add_archive_element hook may have set a
+	 substitute BFD for us.  */
+      if (abfd != oldbfd)
+	{
+	  if (!info->keep_memory
+	      && !_bfd_coff_free_symbols (oldbfd))
+	    return FALSE;
+	  if (!_bfd_coff_get_external_symbols (abfd))
+	    return FALSE;
+	}
+      if (!coff_link_add_symbols (abfd, info))
+	return FALSE;
+    }
 
-  if (*pneeded
-      && ! coff_link_add_symbols (subsbfd ? subsbfd : abfd, info))
-    return FALSE;
-
-  if ((! info->keep_memory || ! *pneeded)
-      && ! _bfd_coff_free_symbols (abfd))
-    return FALSE;
-
+  if (!info->keep_memory || !needed)
+    {
+      if (!_bfd_coff_free_symbols (abfd))
+	return FALSE;
+    }
   return TRUE;
 }
 
@@ -1010,8 +1019,7 @@
 
   /* Write out the global symbols.  */
   finfo.failed = FALSE;
-  coff_link_hash_traverse (coff_hash_table (info),
-			   _bfd_coff_write_global_sym, &finfo);
+  bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
   if (finfo.failed)
     goto error_return;
 
@@ -2356,6 +2364,35 @@
 	  if (internal_relocs == NULL)
 	    return FALSE;
 
+	  /* Run through the relocs looking for relocs against symbols
+	     coming from discarded sections and complain about them.  */
+	  irel = internal_relocs;
+	  for (; irel < &internal_relocs[o->reloc_count]; irel++)
+	    {
+	      struct coff_link_hash_entry *h;
+	      asection *ps = NULL;
+	      long symndx = irel->r_symndx;
+	      if (symndx < 0)
+		continue;
+	      h = obj_coff_sym_hashes (input_bfd)[symndx];
+	      if (h == NULL)
+		continue;
+	      while (h->root.type == bfd_link_hash_indirect
+		     || h->root.type == bfd_link_hash_warning)
+		h = (struct coff_link_hash_entry *) h->root.u.i.link;
+	      if (h->root.type == bfd_link_hash_defined
+		  || h->root.type == bfd_link_hash_defweak)
+		ps = h->root.u.def.section;
+	      if (ps == NULL)
+		continue;
+	      /* Complain if definition comes from an excluded section.  */
+	      if (ps->flags & SEC_EXCLUDE)
+		(*finfo->info->callbacks->einfo)
+		  (_("%X`%s' referenced in section `%A' of %B: "
+		     "defined in discarded section `%A' of %B\n"),
+		   h->root.root.string, o, input_bfd, ps, ps->owner);
+	    }
+
 	  /* Call processor specific code to relocate the section
              contents.  */
 	  if (! bfd_coff_relocate_section (output_bfd, finfo->info,
@@ -2478,11 +2515,12 @@
   return TRUE;
 }
 
-/* Write out a global symbol.  Called via coff_link_hash_traverse.  */
+/* Write out a global symbol.  Called via bfd_hash_traverse.  */
 
 bfd_boolean
-_bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
+_bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
 {
+  struct coff_link_hash_entry *h = (struct coff_link_hash_entry *) bh;
   struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
   bfd *output_bfd;
   struct internal_syment isym;
@@ -2707,7 +2745,7 @@
 	case bfd_link_hash_defweak:
 	  save_global_to_static = finfo->global_to_static;
 	  finfo->global_to_static = TRUE;
-	  rtnval = _bfd_coff_write_global_sym (h, data);
+	  rtnval = _bfd_coff_write_global_sym (&h->root.root, data);
 	  finfo->global_to_static = save_global_to_static;
 	  break;
 	default:
diff --git a/bfd/compress.c b/bfd/compress.c
index bdaa3c4..a82a8bc 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -1,5 +1,5 @@
 /* Compressed section support (intended for debug sections).
-   Copyright 2008, 2010
+   Copyright 2008, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -59,7 +59,7 @@
       rc = inflateReset (&strm);
     }
   rc = inflateEnd (&strm);
-  return rc != Z_OK || strm.avail_out != 0 ? FALSE: TRUE;
+  return rc == Z_OK && strm.avail_out == 0;
 }
 #endif
 
@@ -100,6 +100,9 @@
   compressed_size = compressBound (uncompressed_size) + 12;
   compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size);
 
+  if (compressed_buffer == NULL)
+    return FALSE;
+
   if (compress ((Bytef*) compressed_buffer + 12,
 		&compressed_size,
 		(const Bytef*) uncompressed_buffer,
@@ -155,10 +158,10 @@
 bfd_boolean
 bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
 {
-  bfd_size_type sz = sec->rawsize ? sec->rawsize : sec->size;
+  bfd_size_type sz;
   bfd_byte *p = *ptr;
-  bfd_boolean need_free, ret;
 #ifdef HAVE_ZLIB_H
+  bfd_boolean ret;
   bfd_size_type compressed_size;
   bfd_size_type uncompressed_size;
   bfd_size_type rawsize;
@@ -166,6 +169,10 @@
   bfd_byte *uncompressed_buffer;
 #endif
 
+  if (abfd->direction != write_direction && sec->rawsize != 0)
+    sz = sec->rawsize;
+  else
+    sz = sec->size;
   if (sz == 0)
     return TRUE;
 
@@ -177,88 +184,77 @@
 	  p = (bfd_byte *) bfd_malloc (sz);
 	  if (p == NULL)
 	    return FALSE;
-	  need_free = TRUE;
-	  *ptr = p;
 	}
-      else
-	need_free = FALSE;
-      ret = bfd_get_section_contents (abfd, sec, p, 0, sz);
-      if (!ret && need_free)
-	free (p);
-      return ret;
-
-    case COMPRESS_SECTION_DONE:
-      if (p)
-	memcpy (p, sec->contents, sz);
-      else
-	*ptr = sec->contents;
+      if (!bfd_get_section_contents (abfd, sec, p, 0, sz))
+	{
+	  if (*ptr != p)
+	    free (p);
+	  return FALSE;
+	}
+      *ptr = p;
       return TRUE;
 
     case DECOMPRESS_SECTION_SIZED:
-      break;
+#ifndef HAVE_ZLIB_H
+      bfd_set_error (bfd_error_invalid_operation);
+      return FALSE;
+#else
+      /* Read in the full compressed section contents.  */
+      uncompressed_size = sec->size;
+      compressed_size = sec->compressed_size;
+      compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size);
+      if (compressed_buffer == NULL)
+	return FALSE;
+      rawsize = sec->rawsize;
+      /* Clear rawsize, set size to compressed size and set compress_status
+	 to COMPRESS_SECTION_NONE.  If the compressed size is bigger than
+	 the uncompressed size, bfd_get_section_contents will fail.  */
+      sec->rawsize = 0;
+      sec->size = compressed_size;
+      sec->compress_status = COMPRESS_SECTION_NONE;
+      ret = bfd_get_section_contents (abfd, sec, compressed_buffer,
+				      0, compressed_size);
+      /* Restore rawsize and size.  */
+      sec->rawsize = rawsize;
+      sec->size = uncompressed_size;
+      sec->compress_status = DECOMPRESS_SECTION_SIZED;
+      if (!ret)
+	goto fail_compressed;
+
+      uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
+      if (uncompressed_buffer == NULL)
+	goto fail_compressed;
+
+      if (!decompress_contents (compressed_buffer, compressed_size,
+				uncompressed_buffer, uncompressed_size))
+	{
+	  bfd_set_error (bfd_error_bad_value);
+	  free (uncompressed_buffer);
+	fail_compressed:
+	  free (compressed_buffer);
+	  return FALSE;
+	}
+
+      free (compressed_buffer);
+      sec->contents = uncompressed_buffer;
+      sec->compress_status = COMPRESS_SECTION_DONE;
+      /* Fall thru */
+#endif
+
+    case COMPRESS_SECTION_DONE:
+      if (p == NULL)
+	{
+	  p = (bfd_byte *) bfd_malloc (sz);
+	  if (p == NULL)
+	    return FALSE;
+	  *ptr = p;
+	}
+      memcpy (p, sec->contents, sz);
+      return TRUE;
 
     default:
       abort ();
     }
-
-#ifndef HAVE_ZLIB_H
-  bfd_set_error (bfd_error_invalid_operation);
-  return FALSE;
-#else
-  /* Read in the full compressed section contents.  */
-  uncompressed_size = sec->size;
-  compressed_size = sec->compressed_size;
-  compressed_buffer = (bfd_byte *) bfd_malloc (compressed_size);
-  rawsize = sec->rawsize;
-  /* Clear rawsize, set size to compressed size and set compress_status
-     to COMPRESS_SECTION_NONE.  If the compressed size is bigger than
-     the uncompressed size, bfd_get_section_contents will fail.  */
-  sec->rawsize = 0;
-  sec->size = compressed_size;
-  sec->compress_status = COMPRESS_SECTION_NONE;
-  ret = bfd_get_section_contents (abfd, sec, compressed_buffer,
-				  0, compressed_size);
-  /* Restore rawsize and size.  */
-  sec->rawsize = rawsize;
-  sec->size = uncompressed_size;
-  if (!ret)
-    {
-fail_compressed:
-      sec->compress_status = DECOMPRESS_SECTION_SIZED;
-      free (compressed_buffer);
-      return ret;
-    }
-
-  /* Decompress to caller buffer directly if it is provided. */
-  if (p)
-    uncompressed_buffer = p;
-  else
-    {
-      uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
-      if (uncompressed_buffer == NULL)
-	goto fail_compressed;
-    }
-
-  if (!decompress_contents (compressed_buffer, compressed_size,
-			    uncompressed_buffer, uncompressed_size))
-    {
-      sec->compress_status = DECOMPRESS_SECTION_SIZED;
-      free (compressed_buffer);
-      if (p == NULL)
-	free (uncompressed_buffer);
-      bfd_set_error (bfd_error_bad_value);
-      return FALSE;
-    }
-
-  free (compressed_buffer);
-  if (p == NULL)
-    *ptr = uncompressed_buffer;
-
-  sec->contents = uncompressed_buffer;
-  sec->compress_status = COMPRESS_SECTION_DONE;
-
-  return TRUE;
-#endif
 }
 
 /*
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 9b719d8..3b9872a 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -53,7 +53,6 @@
  sparc-*-lynxos* | \
  vax-*-vms* | \
  arm-*-oabi | \
- thumb-*-oabi | \
  a29k-* | \
  hppa*-*-rtems* | \
  *-go32-rtems* | \
@@ -101,11 +100,10 @@
 sh*)		 targ_archs=bfd_sh_arch ;;
 sparc*)		 targ_archs=bfd_sparc_arch ;;
 spu*)            targ_archs=bfd_spu_arch ;;
-strongarm*)	 targ_archs=bfd_arm_arch ;;
-thumb*)		 targ_archs=bfd_arm_arch ;;
+tilegx*)	 targ_archs=bfd_tilegx_arch ;;
+tilepro*)	 targ_archs=bfd_tilepro_arch ;;
 v850*)		 targ_archs=bfd_v850_arch ;;
 x86_64*)	 targ_archs=bfd_i386_arch ;;
-xscale*)	 targ_archs=bfd_arm_arch ;;
 xtensa*)	 targ_archs=bfd_xtensa_arch ;;
 z80|r800)	 targ_archs=bfd_z80_arch ;;
 z8k*)		 targ_archs=bfd_z8k_arch ;;
@@ -176,6 +174,7 @@
     ;;
   alpha*-*-*vms*)
     targ_defvec=vms_alpha_vec
+    targ_selvecs=vms_lib_txt_vec
     want64=true
     ;;
   alpha*-*-*)
@@ -194,6 +193,7 @@
     ;;
   ia64*-*-*vms*)
     targ_defvec=bfd_elf64_ia64_vms_vec
+    targ_selvecs=vms_lib_txt_vec
     want64=true
     ;;
   sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
@@ -275,7 +275,7 @@
     targ_defvec=bfd_elf32_bigarm_vec
     targ_selvecs=bfd_elf32_littlearm_vec
     ;;
-  arm-*-kaos* | strongarm-*-kaos*)
+  arm-*-kaos*)
     targ_defvec=bfd_elf32_littlearm_vec
     targ_selvecs=bfd_elf32_bigarm_vec
     ;;
@@ -298,44 +298,6 @@
     targ_selvecs=bfd_elf32_bigarm_vec
     ;;
 
-  thumb-*-coff)
-    targ_defvec=armcoff_little_vec
-    targ_selvecs=armcoff_big_vec
-    targ_underscore=yes
-    ;;
-  thumb-*-elf)
-    targ_defvec=bfd_elf32_littlearm_vec
-    targ_selvecs=bfd_elf32_bigarm_vec
-    ;;
-  thumb-epoc-pe*)
-    targ_defvec=arm_epoc_pe_little_vec
-    targ_selvecs="arm_epoc_pe_little_vec arm_epoc_pe_big_vec arm_epoc_pei_little_vec arm_epoc_pei_big_vec"
-    targ_underscore=no
-    ;;
-  thumb-*-pe*)
-    targ_defvec=armpe_little_vec
-    targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
-    targ_underscore=yes
-    ;;
-  strongarm-*-elf)
-    targ_defvec=bfd_elf32_littlearm_vec
-    targ_selvecs=bfd_elf32_bigarm_vec
-    ;;
-  strongarm-*-coff)
-    targ_defvec=armcoff_little_vec
-    targ_selvecs=armcoff_big_vec
-    targ_underscore=yes
-    ;;
-  xscale-*-elf)
-    targ_defvec=bfd_elf32_littlearm_vec
-    targ_selvecs=bfd_elf32_bigarm_vec
-    ;;
-  xscale-*-coff)
-    targ_defvec=armcoff_little_vec
-    targ_selvecs=armcoff_big_vec
-    targ_underscore=yes
-    ;;
-
   avr-*-*)
     targ_defvec=bfd_elf32_avr_vec
     ;;
@@ -498,13 +460,13 @@
   i[3-7]86-*-solaris2*)
     targ_defvec=bfd_elf32_i386_sol2_vec
     targ_selvecs="i386coff_vec"
-    targ64_selvecs="bfd_elf64_x86_64_sol2_vec bfd_elf64_l1om_vec"
+    targ64_selvecs="bfd_elf64_x86_64_sol2_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     want64=true
     ;;
 #ifdef BFD64
   x86_64-*-solaris2*)
     targ_defvec=bfd_elf32_i386_sol2_vec
-    targ_selvecs="bfd_elf64_x86_64_sol2_vec bfd_elf64_l1om_vec i386coff_vec"
+    targ_selvecs="bfd_elf64_x86_64_sol2_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386coff_vec"
     want64=true
     ;;
 #endif
@@ -524,7 +486,7 @@
     ;;
   i[3-7]86-*-dicos*)
     targ_defvec=bfd_elf32_i386_vec
-    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
+    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     ;;
   *-*-msdosdjgpp* | *-*-go32* )
     targ_defvec=go32coff_vec
@@ -551,16 +513,20 @@
     targ_defvec=i386bsd_vec
     targ_underscore=yes
     ;;
+  i[3-7]86-*-dragonfly*)
+    targ_defvec=bfd_elf32_i386_vec
+    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
+    ;;
   i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
   i[3-7]86-*-freebsd[12])
     targ_defvec=i386freebsd_vec
     targ_selvecs=i386bsd_vec
     targ_underscore=yes
     ;;
-  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
+  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
     targ_defvec=bfd_elf32_i386_freebsd_vec
     targ_selvecs="bfd_elf32_i386_vec i386pei_vec i386coff_vec"
-    targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
+    targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec bfd_elf64_k1om_vec bfd_elf64_k1om_freebsd_vec"
     # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
     case "${targ}" in
       i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*)
@@ -570,7 +536,7 @@
   i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
     targ_defvec=bfd_elf32_i386_vec
     targ_selvecs=i386netbsd_vec
-    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
+    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     ;;
   i[3-7]86-*-netbsdpe*)
     targ_defvec=i386pe_vec
@@ -598,7 +564,11 @@
   i[3-7]86-*-linux-*)
     targ_defvec=bfd_elf32_i386_vec
     targ_selvecs="i386linux_vec i386pei_vec"
-    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
+    targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf32_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
+    ;;
+  i[3-7]86-*-nacl*)
+    targ_defvec=bfd_elf32_i386_nacl_vec
+    targ_selvecs="bfd_elf32_i386_vec"
     ;;
 #ifdef BFD64
   x86_64-*-darwin*)
@@ -609,32 +579,37 @@
     ;;
   x86_64-*-dicos*)
     targ_defvec=bfd_elf64_x86_64_vec
-    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec"
+    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     want64=true
     ;;
   x86_64-*-elf*)
     targ_defvec=bfd_elf64_x86_64_vec
-    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec i386coff_vec"
+    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386coff_vec"
+    want64=true
+    ;;
+  x86_64-*-dragonfly*)
+    targ_defvec=bfd_elf64_x86_64_vec
+    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     want64=true
     ;;
   x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
     targ_defvec=bfd_elf64_x86_64_freebsd_vec
-    targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
+    targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec bfd_elf64_k1om_vec bfd_elf64_k1om_freebsd_vec"
     want64=true
     ;;
   x86_64-*-netbsd* | x86_64-*-openbsd*)
     targ_defvec=bfd_elf64_x86_64_vec
-    targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec"
+    targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     want64=true
     ;;
   x86_64-*-linux-*)
     targ_defvec=bfd_elf64_x86_64_vec
-    targ_selvecs="bfd_elf32_i386_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec"
+    targ_selvecs="bfd_elf32_i386_vec bfd_elf32_x86_64_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
     want64=true
     ;;
-  x86_64-*-mingw*)
+  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep)
     targ_defvec=x86_64pe_vec
-    targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec i386pe_vec i386pei_vec bfd_elf32_i386_vec"
+    targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386pe_vec i386pei_vec bfd_elf32_i386_vec"
     want64=true
     targ_underscore=no
     ;;
@@ -743,12 +718,12 @@
     targ_defvec=bfd_elf32_lm32_vec
     targ_selvecs=bfd_elf32_lm32fdpic_vec
     ;;
-    
+
   lm32-*-*linux*)
     targ_defvec=bfd_elf32_lm32fdpic_vec
     targ_selvecs=bfd_elf32_lm32_vec
     ;;
-    
+
   m32c-*-elf | m32c-*-rtems*)
     targ_defvec=bfd_elf32_m32c_vec
     ;;
@@ -956,11 +931,11 @@
     want64=true
     ;;
 #endif
-  mips*el-sde-elf*)    
+  mips*el-sde-elf*)
     targ_defvec=bfd_elf32_tradlittlemips_vec
     targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
     want64=true
-    ;;  
+    ;;
   mips*-sde-elf*)
     targ_defvec=bfd_elf32_tradbigmips_vec
     targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
@@ -1016,6 +991,40 @@
     want64=true
     ;;
 #ifdef BFD64
+  mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu)
+    # FreeBSD vectors
+    targ_defvec=bfd_elf32_ntradlittlemips_freebsd_vec
+    targ_selvecs="bfd_elf32_ntradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec"
+    # Generic vectors
+    targ_selvecs="${targ_selvecs} bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
+    want64=true
+    ;;
+  mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu)
+    # FreeBSD vectors
+    targ_defvec=bfd_elf32_ntradbigmips_freebsd_vec
+    targ_selvecs="bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec"
+    # Generic vectors
+    targ_selvecs="${targ_selvecs} bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+    want64=true
+    ;;
+#endif
+  mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu)
+    # FreeBSD vectors
+    targ_defvec=bfd_elf32_tradlittlemips_freebsd_vec
+    targ_selvecs="bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec"
+    # Generic vectors
+    targ_selvecs="${targ_selvecs} bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
+    want64=true
+    ;;
+  mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
+    # FreeBSD vectors
+    targ_defvec=bfd_elf32_tradbigmips_freebsd_vec
+    targ_selvecs="bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec"
+    # Generic vectors
+    targ_selvecs="${targ_selvecs} bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
+    want64=true
+    ;;
+#ifdef BFD64
   mmix-*-*)
     targ_defvec=bfd_elf64_mmix_vec
     targ_selvecs=bfd_mmo_vec
@@ -1076,26 +1085,26 @@
     targ_selvecs="bfd_elf32_pjl_vec bfd_elf32_pj_vec bfd_elf32_i386_vec"
     ;;
 
-  powerpc-*-aix5.[01])
+  powerpc-*-aix5.[01] | rs6000-*-aix5.[01])
     targ_defvec=rs6000coff_vec
     targ_selvecs="aix5coff64_vec"
     want64=true
     ;;
 #ifdef BFD64
-  powerpc64-*-aix5.[01])
+  powerpc64-*-aix5.[01] | rs6000-*-aix5.[01])
     targ_defvec=aix5coff64_vec
     targ_selvecs="rs6000coff_vec"
     want64=true
     ;;
 #endif
-  powerpc-*-aix[5-9]*)
+  powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*)
     targ_cflags=-DAIX_WEAK_SUPPORT
     targ_defvec=rs6000coff_vec
     targ_selvecs="aix5coff64_vec"
     want64=true
     ;;
 #ifdef BFD64
-  powerpc64-*-aix[5-9]*)
+  powerpc64-*-aix[5-9]* | rs6000-*-aix[5-9]*)
     targ_cflags=-DAIX_WEAK_SUPPORT
     targ_defvec=aix5coff64_vec
     targ_selvecs="rs6000coff_vec"
@@ -1122,12 +1131,12 @@
   powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
   powerpc64-*-*bsd*)
     targ_defvec=bfd_elf64_powerpc_vec
-    targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
+    targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
     want64=true
     ;;
   powerpc64le-*-elf* | powerpcle-*-elf64*)
     targ_defvec=bfd_elf64_powerpcle_vec
-    targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec"
+    targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
     want64=true
     ;;
 #endif
@@ -1186,7 +1195,7 @@
 
   rx-*-elf)
     targ_defvec=bfd_elf32_rx_le_vec
-    targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec"
+    targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec bfd_elf32_rx_be_ns_vec"
     ;;
 
   s390-*-linux*)
@@ -1463,8 +1472,13 @@
 #endif
 
   tic6x-*-elf)
-    targ_defvec=bfd_elf32_tic6x_le_vec
-    targ_selvecs=bfd_elf32_tic6x_be_vec
+    targ_defvec=bfd_elf32_tic6x_elf_le_vec
+    targ_selvecs="bfd_elf32_tic6x_elf_be_vec bfd_elf32_tic6x_le_vec bfd_elf32_tic6x_be_vec"
+    ;;
+
+  tic6x-*-uclinux)
+    targ_defvec=bfd_elf32_tic6x_linux_le_vec
+    targ_selvecs="bfd_elf32_tic6x_linux_be_vec bfd_elf32_tic6x_le_vec bfd_elf32_tic6x_be_vec"
     ;;
 
   tic80*-*-*)
@@ -1472,6 +1486,17 @@
     targ_underscore=yes
     ;;
 
+#ifdef BFD64
+  tilegx-*-*)
+    targ_defvec=bfd_elf64_tilegx_vec
+    targ_selvecs=bfd_elf32_tilegx_vec
+    ;;
+#endif
+
+  tilepro-*-*)
+    targ_defvec=bfd_elf32_tilepro_vec
+    ;;
+
   v850*-*-*)
     targ_defvec=bfd_elf32_v850_vec
     ;;
@@ -1520,7 +1545,7 @@
  xc16x-*-elf)
     targ_defvec=bfd_elf32_xc16x_vec
     ;;
-  
+
   z80-*-*)
     targ_defvec=z80coff_vec
     targ_underscore=no
@@ -1582,3 +1607,10 @@
     targ_archs="$targ_archs bfd_l1om_arch"
     ;;
 esac
+
+# If we support Intel K1OM target, then add support for bfd_k1om_arch.
+case "${targ_defvec} ${targ_selvecs}" in
+  *bfd_elf64_k1om_vec*)
+    targ_archs="$targ_archs bfd_k1om_arch"
+    ;;
+esac
diff --git a/bfd/config.in b/bfd/config.in
index b0b97a2..98157e1 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -144,9 +144,15 @@
 /* Define if <sys/procfs.h> has prpsinfo32_t. */
 #undef HAVE_PRPSINFO32_T
 
+/* Define if <sys/procfs.h> has prpsinfo32_t.pr_pid. */
+#undef HAVE_PRPSINFO32_T_PR_PID
+
 /* Define if <sys/procfs.h> has prpsinfo_t. */
 #undef HAVE_PRPSINFO_T
 
+/* Define if <sys/procfs.h> has prpsinfo_t.pr_pid. */
+#undef HAVE_PRPSINFO_T_PR_PID
+
 /* Define if <sys/procfs.h> has prstatus32_t. */
 #undef HAVE_PRSTATUS32_T
 
@@ -162,9 +168,15 @@
 /* Define if <sys/procfs.h> has psinfo32_t. */
 #undef HAVE_PSINFO32_T
 
+/* Define if <sys/procfs.h> has psinfo32_t.pr_pid. */
+#undef HAVE_PSINFO32_T_PR_PID
+
 /* Define if <sys/procfs.h> has psinfo_t. */
 #undef HAVE_PSINFO_T
 
+/* Define if <sys/procfs.h> has psinfo_t.pr_pid. */
+#undef HAVE_PSINFO_T_PR_PID
+
 /* Define if <sys/procfs.h> has pstatus32_t. */
 #undef HAVE_PSTATUS32_T
 
diff --git a/bfd/configure b/bfd/configure
index 7a25b7f..bc242b9 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -3988,7 +3988,7 @@
 
 # Define the identity of the package.
  PACKAGE=bfd
- VERSION=2.21
+ VERSION=2.22
 
 
 cat >>confdefs.h <<_ACEOF
@@ -9627,10 +9627,6 @@
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -10549,10 +10545,6 @@
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -11412,7 +11404,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11415 "configure"
+#line 11407 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11518,7 +11510,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11521 "configure"
+#line 11513 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14387,6 +14379,43 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6; }
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PRPSINFO_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo_t_pr_pid" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t in sys/procfs.h" >&5
 $as_echo_n "checking for prpsinfo32_t in sys/procfs.h... " >&6; }
  if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then :
@@ -14424,6 +14453,43 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6; }
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for prpsinfo32_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+prpsinfo32_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PRPSINFO32_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_prpsinfo32_t_pr_pid" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t in sys/procfs.h" >&5
 $as_echo_n "checking for psinfo_t in sys/procfs.h... " >&6; }
  if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then :
@@ -14461,6 +14527,43 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_psinfo_t" >&6; }
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PSINFO_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo_t_pr_pid" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t in sys/procfs.h" >&5
 $as_echo_n "checking for psinfo32_t in sys/procfs.h... " >&6; }
  if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then :
@@ -14498,6 +14601,43 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6; }
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t.pr_pid in sys/procfs.h" >&5
+$as_echo_n "checking for psinfo32_t.pr_pid in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris.  */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psinfo32_t avar; void* aref = (void*) &avar.pr_pid
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=yes
+else
+  bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid = yes; then
+
+$as_echo "#define HAVE_PSINFO32_T_PR_PID 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_member_psinfo32_t_pr_pid" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t in sys/procfs.h" >&5
 $as_echo_n "checking for lwpstatus_t in sys/procfs.h... " >&6; }
  if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then :
@@ -15068,17 +15208,16 @@
     bfd_elf32_hppa_nbsd_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_dragonfly_vec)
-				tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.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" ;;
-    bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
-    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
+    bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
+    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf";;
     bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
     bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
     bfd_elf32_lm32_vec)         tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
@@ -15113,8 +15252,10 @@
     bfd_elf32_msp430_vec)	tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)
+				tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
+				tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)	tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)	tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
@@ -15124,6 +15265,7 @@
     bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_rx_le_vec)        tb="$tb elf32-rx.lo elf32.lo $elf" ;;
     bfd_elf32_rx_be_vec)        tb="$tb elf32-rx.lo elf32.lo $elf" ;;
+    bfd_elf32_rx_be_ns_vec)     tb="$tb elf32-rx.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
@@ -15153,8 +15295,16 @@
     bfd_elf32_spu_vec)		tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_be_vec)	tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_le_vec)	tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
-    bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
-    bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tic6x_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_elf_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_elf_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tilegx_vec)	tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
+    bfd_elf32_tilepro_vec)	tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
+    bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
+				tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
+				tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.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" ;;
@@ -15168,10 +15318,10 @@
     bfd_elf64_bigmips_vec) 	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.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_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
-    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_ia64_vms_vec)	tb="$tb elf64-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_big_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_little_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_vms_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo  elf64.lo vms-lib.lo vms-misc.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 elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_mmix_vec) 	tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
@@ -15187,13 +15337,19 @@
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tilegx_vec)	tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+    bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec)
+				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
+				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.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" ;;
diff --git a/bfd/configure.com b/bfd/configure.com
index 2102415..a19dadd 100644
--- a/bfd/configure.com
+++ b/bfd/configure.com
@@ -70,13 +70,13 @@
    IF match_pos <> 0 THEN;
       POSITION(BEGINNING_OF(match_pos));
       ERASE(match_pos);
-      COPY_TEXT('0');
+      COPY_TEXT('1');
    ENDIF;
    match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang);
    IF match_pos <> 0 THEN;
       POSITION(BEGINNING_OF(match_pos));
       ERASE(match_pos);
-      COPY_TEXT('0');
+      COPY_TEXT('1');
    ENDIF;
    match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
    IF match_pos <> 0 THEN;
@@ -257,6 +257,13 @@
 $  EOD
 $!
 $!
+$! create bfd_stdint.h
+$!
+$ write sys$output "Generate `bfd_stdint.h'"
+$ create []bfd_stdint.h
+#include <inttypes.h>
+$!
+$!
 $! create targmatch.h
 $!
 $ write sys$output "Generate `targmatch.h'"
diff --git a/bfd/configure.host b/bfd/configure.host
index eb7bfe9..7c63de5 100644
--- a/bfd/configure.host
+++ b/bfd/configure.host
@@ -50,6 +50,7 @@
 mips*-sgi-irix4*)	HDEFINES="-G 4" ;;
 mips*-sgi-irix6*)	host64=true;;
 mips64*-*-linux*)	host64=true;;
+mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;;
 mips*-*-sysv4*)		;;
 mips*-*-sysv*)		HDEFINES="-G 4" ;;
 mips*-*-riscos*)	HDEFINES="-G 4" ;;
diff --git a/bfd/configure.in b/bfd/configure.in
index fce1dd7..435aaaa 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -8,7 +8,7 @@
 AC_CANONICAL_TARGET
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(bfd, 2.21)
+AM_INIT_AUTOMAKE(bfd, 2.22)
 
 dnl These must be called before LT_INIT, because it may want
 dnl to call AC_CHECK_PROG.
@@ -488,9 +488,13 @@
     BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
     BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
     BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
     BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
+    BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
     BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
     BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
@@ -703,17 +707,16 @@
     bfd_elf32_hppa_nbsd_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_dragonfly_vec)
-				tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_sol2_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_freebsd_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vxworks_vec)	tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.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" ;;
-    bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
-    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
+    bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
+    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf";;
     bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
     bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
     bfd_elf32_lm32_vec)         tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
@@ -748,8 +751,10 @@
     bfd_elf32_msp430_vec)	tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec)
+				tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
+				tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)	tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)	tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
@@ -759,6 +764,7 @@
     bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_rx_le_vec)        tb="$tb elf32-rx.lo elf32.lo $elf" ;;
     bfd_elf32_rx_be_vec)        tb="$tb elf32-rx.lo elf32.lo $elf" ;;
+    bfd_elf32_rx_be_ns_vec)     tb="$tb elf32-rx.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
@@ -788,8 +794,16 @@
     bfd_elf32_spu_vec)		tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_be_vec)	tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
     bfd_elf32_tic6x_le_vec)	tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
-    bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
-    bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tic6x_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_elf_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tic6x_elf_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+    bfd_elf32_tilegx_vec)	tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
+    bfd_elf32_tilepro_vec)	tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
+    bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
+				tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
+				tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.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" ;;
@@ -803,10 +817,10 @@
     bfd_elf64_bigmips_vec) 	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.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_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
-    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_ia64_vms_vec)	tb="$tb elf64-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_big_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_little_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_vms_vec)	tb="$tb elf64-ia64.lo elfxx-ia64.lo  elf64.lo vms-lib.lo vms-misc.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 elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_mmix_vec) 	tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
@@ -822,13 +836,19 @@
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tilegx_vec)	tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+    bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec)
+				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
+				tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)	tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     bfd_elf64_l1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)		tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.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" ;;
diff --git a/bfd/corefile.c b/bfd/corefile.c
index 605be8d..bba0d1c 100644
--- a/bfd/corefile.c
+++ b/bfd/corefile.c
@@ -186,6 +186,6 @@
   if (last_slash != NULL)
     exec = last_slash + 1;
   
-  return strcmp (exec, core) == 0;
+  return filename_cmp (exec, core) == 0;
 }
 
diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c
index 9e62ab4..07ba6dc 100644
--- a/bfd/cpu-avr.c
+++ b/bfd/cpu-avr.c
@@ -133,7 +133,29 @@
   N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]),
 
   /* 3-Byte PC.  */
-  N (22, bfd_mach_avr6, "avr:6", FALSE, NULL)
+  N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]),
+  
+  /* Xmega 1 */
+  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[11]),
+
+  /* Xmega 2 */
+  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[12]),
+  
+  /* Xmega 3 */
+  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[13]),
+  
+  /* Xmega 4 */
+  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[14]),
+  
+  /* Xmega 5 */
+  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[15]),
+  
+  /* Xmega 6 */
+  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]),
+  
+  /* Xmega 7 */
+  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
+  
 };
 
 const bfd_arch_info_type bfd_avr_arch =
diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c
index 44cca9d..f98c0e5 100644
--- a/bfd/cpu-i386.c
+++ b/bfd/cpu-i386.c
@@ -1,6 +1,6 @@
 /* BFD support for the Intel 386 architecture.
    Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2005,
-   2007, 2009
+   2007, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -24,6 +24,36 @@
 #include "bfd.h"
 #include "libbfd.h"
 
+static const bfd_arch_info_type *
+bfd_i386_compatible (const bfd_arch_info_type *a,
+		     const bfd_arch_info_type *b)
+{
+  const bfd_arch_info_type *compat = bfd_default_compatible (a, b);
+
+  /* Don't allow mixing x64_32 with x86_64.  */
+  if (compat
+      && (a->mach & bfd_mach_x64_32) != (b->mach & bfd_mach_x64_32))
+    compat = NULL;
+
+  return compat;
+}
+
+static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
+{
+  64, /* 64 bits in a word */
+  64, /* 64 bits in an address */
+  8,  /* 8 bits in a byte */
+  bfd_arch_i386,
+  bfd_mach_x64_32_intel_syntax,
+  "i386:intel",
+  "i386:x64-32:intel",
+  3,
+  FALSE,
+  bfd_i386_compatible,
+  bfd_default_scan,
+  0
+};
+
 static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
 {
   64, /* 64 bits in a word */
@@ -35,9 +65,9 @@
   "i386:x86-64:intel",
   3,
   FALSE,
-  bfd_default_compatible,
+  bfd_i386_compatible,
   bfd_default_scan,
-  0
+  &bfd_x64_32_arch_intel_syntax,
 };
 
 static const bfd_arch_info_type bfd_i386_arch_intel_syntax =
@@ -51,7 +81,7 @@
   "i386:intel",
   3,
   TRUE,
-  bfd_default_compatible,
+  bfd_i386_compatible,
   bfd_default_scan,
   &bfd_x86_64_arch_intel_syntax
 };
@@ -67,11 +97,27 @@
   "i8086",
   3,
   FALSE,
-  bfd_default_compatible,
+  bfd_i386_compatible,
   bfd_default_scan,
   &bfd_i386_arch_intel_syntax
 };
 
+static const bfd_arch_info_type bfd_x64_32_arch =
+{
+  64, /* 64 bits in a word */
+  64, /* 64 bits in an address */
+  8,  /* 8 bits in a byte */
+  bfd_arch_i386,
+  bfd_mach_x64_32,
+  "i386",
+  "i386:x64-32",
+  3,
+  FALSE,
+  bfd_i386_compatible,
+  bfd_default_scan,
+  &i8086_arch
+};
+
 static const bfd_arch_info_type bfd_x86_64_arch =
 {
   64, /* 64 bits in a word */
@@ -83,9 +129,9 @@
   "i386:x86-64",
   3,
   FALSE,
-  bfd_default_compatible,
+  bfd_i386_compatible,
   bfd_default_scan,
-  &i8086_arch
+  &bfd_x64_32_arch
 };
 
 const bfd_arch_info_type bfd_i386_arch =
@@ -99,7 +145,7 @@
   "i386",
   3,
   TRUE,
-  bfd_default_compatible,
+  bfd_i386_compatible,
   bfd_default_scan,
   &bfd_x86_64_arch
 };
diff --git a/bfd/cpu-k1om.c b/bfd/cpu-k1om.c
new file mode 100644
index 0000000..fa030ae
--- /dev/null
+++ b/bfd/cpu-k1om.c
@@ -0,0 +1,56 @@
+/* BFD support for the Intel K1OM architecture.
+   Copyright 2011
+   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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+static const bfd_arch_info_type bfd_k1om_arch_intel_syntax =
+{
+  64, /* 64 bits in a word */
+  64, /* 64 bits in an address */
+  8,  /* 8 bits in a byte */
+  bfd_arch_k1om,
+  bfd_mach_k1om_intel_syntax,
+  "k1om:intel",
+  "k1om:intel",
+  3,
+  TRUE,
+  bfd_default_compatible,
+  bfd_default_scan,
+  0
+};
+
+const bfd_arch_info_type bfd_k1om_arch =
+{
+  64, /* 64 bits in a word */
+  64, /* 64 bits in an address */
+  8,  /* 8 bits in a byte */
+  bfd_arch_k1om,
+  bfd_mach_k1om,
+  "k1om",
+  "k1om",
+  3,
+  TRUE,
+  bfd_default_compatible,
+  bfd_default_scan,
+  &bfd_k1om_arch_intel_syntax
+};
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index c0f532f..42d43a9 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -91,8 +91,10 @@
   I_sb1,
   I_loongson_2e,
   I_loongson_2f,
+  I_loongson_3a,
   I_mipsocteon,
-  I_xlr
+  I_xlr,
+  I_micromips
 };
 
 #define NN(index) (&arch_info_struct[(index) + 1])
@@ -130,8 +132,10 @@
   N (64, 64, bfd_mach_mips_sb1, "mips:sb1",       FALSE, NN(I_sb1)),
   N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e",       FALSE, NN(I_loongson_2e)),
   N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f",       FALSE, NN(I_loongson_2f)),
+  N (64, 64, bfd_mach_mips_loongson_3a, "mips:loongson_3a",       FALSE, NN(I_loongson_3a)),
   N (64, 64, bfd_mach_mips_octeon,"mips:octeon",  FALSE, NN(I_mipsocteon)),
-  N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, 0)
+  N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, NN(I_xlr)),
+  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
 };
 
 /* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/cpu-tilegx.c b/bfd/cpu-tilegx.c
new file mode 100644
index 0000000..aa2fe80
--- /dev/null
+++ b/bfd/cpu-tilegx.c
@@ -0,0 +1,39 @@
+/* BFD support for the TILE-Gx processor.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+const bfd_arch_info_type bfd_tilegx_arch =
+  {
+    64, /* 64 bits in a word */
+    64, /* 64 bits in an address */
+    8,  /* 8 bits in a byte */
+    bfd_arch_tilegx,
+    bfd_mach_tilegx,
+    "tilegx",
+    "tilegx",
+    3,
+    TRUE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    0,
+  };
diff --git a/bfd/cpu-tilepro.c b/bfd/cpu-tilepro.c
new file mode 100644
index 0000000..cadd006
--- /dev/null
+++ b/bfd/cpu-tilepro.c
@@ -0,0 +1,39 @@
+/* BFD support for the TILEPro processor.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+const bfd_arch_info_type bfd_tilepro_arch =
+  {
+    32, /* 32 bits in a word */
+    32, /* 32 bits in an address */
+    8,  /* 8 bits in a byte */
+    bfd_arch_tilepro,
+    bfd_mach_tilepro,
+    "tilepro",
+    "tilepro",
+    3,
+    TRUE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    0,
+  };
diff --git a/bfd/doc/archures.texi b/bfd/doc/archures.texi
index a37046b..683d165 100644
--- a/bfd/doc/archures.texi
+++ b/bfd/doc/archures.texi
@@ -138,6 +138,7 @@
 #define bfd_mach_mips5                 5
 #define bfd_mach_mips_loongson_2e      3001
 #define bfd_mach_mips_loongson_2f      3002
+#define bfd_mach_mips_loongson_3a      3003
 #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
 #define bfd_mach_mips_octeon           6501
 #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
@@ -145,15 +146,22 @@
 #define bfd_mach_mipsisa32r2           33
 #define bfd_mach_mipsisa64             64
 #define bfd_mach_mipsisa64r2           65
+#define bfd_mach_mips_micromips        96
   bfd_arch_i386,      /* Intel 386 */
-#define bfd_mach_i386_i386 1
-#define bfd_mach_i386_i8086 2
-#define bfd_mach_i386_i386_intel_syntax 3
-#define bfd_mach_x86_64 64
-#define bfd_mach_x86_64_intel_syntax 65
+#define bfd_mach_i386_intel_syntax     (1 << 0)
+#define bfd_mach_i386_i8086            (1 << 1)
+#define bfd_mach_i386_i386             (1 << 2)
+#define bfd_mach_x86_64                (1 << 3)
+#define bfd_mach_x64_32                (1 << 4)
+#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
+#define bfd_mach_x86_64_intel_syntax   (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
+#define bfd_mach_x64_32_intel_syntax   (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
   bfd_arch_l1om,   /* Intel L1OM */
-#define bfd_mach_l1om 66
-#define bfd_mach_l1om_intel_syntax 67
+#define bfd_mach_l1om                  (1 << 5)
+#define bfd_mach_l1om_intel_syntax     (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
+  bfd_arch_k1om,   /* Intel K1OM */
+#define bfd_mach_k1om                  (1 << 6)
+#define bfd_mach_k1om_intel_syntax     (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
   bfd_arch_we32k,     /* AT&T WE32xxx */
   bfd_arch_tahoe,     /* CCI/Harris Tahoe */
   bfd_arch_i860,      /* Intel 860 */
@@ -338,6 +346,13 @@
 #define bfd_mach_avr5          5
 #define bfd_mach_avr51         51
 #define bfd_mach_avr6          6
+#define bfd_mach_avrxmega1 101
+#define bfd_mach_avrxmega2 102
+#define bfd_mach_avrxmega3 103
+#define bfd_mach_avrxmega4 104
+#define bfd_mach_avrxmega5 105
+#define bfd_mach_avrxmega6 106
+#define bfd_mach_avrxmega7 107
   bfd_arch_bfin,        /* ADI Blackfin */
 #define bfd_mach_bfin          1
   bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
@@ -392,6 +407,10 @@
   bfd_arch_lm32,      /* Lattice Mico32 */
 #define bfd_mach_lm32      1
   bfd_arch_microblaze,/* Xilinx MicroBlaze. */
+  bfd_arch_tilepro,   /* Tilera TILEPro */
+  bfd_arch_tilegx, /* Tilera TILE-Gx */
+#define bfd_mach_tilepro   1
+#define bfd_mach_tilegx    1
   bfd_arch_last
   @};
 @end example
diff --git a/bfd/doc/bfdio.texi b/bfd/doc/bfdio.texi
index 30b250c..ff8275f 100644
--- a/bfd/doc/bfdio.texi
+++ b/bfd/doc/bfdio.texi
@@ -26,9 +26,15 @@
   int (*bclose) (struct bfd *abfd);
   int (*bflush) (struct bfd *abfd);
   int (*bstat) (struct bfd *abfd, struct stat *sb);
-  /* Just like mmap: (void*)-1 on failure, mmapped address on success.  */
+  /* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual
+     mmap parameter, except that LEN and OFFSET do not need to be page
+     aligned.  Returns (void *)-1 on failure, mmapped address on success.
+     Also write in MAP_ADDR the address of the page aligned buffer and in
+     MAP_LEN the size mapped (a page multiple).  Use unmap with MAP_ADDR and
+     MAP_LEN to unmap.  */
   void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len,
-                  int prot, int flags, file_ptr offset);
+                  int prot, int flags, file_ptr offset,
+                  void **map_addr, bfd_size_type *map_len);
 @};
 extern const struct bfd_iovec _bfd_memory_iovec;
 @end example
@@ -79,8 +85,11 @@
 @strong{Synopsis}
 @example
 void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
-    int prot, int flags, file_ptr offset);
+    int prot, int flags, file_ptr offset,
+    void **map_addr, bfd_size_type *map_len);
 @end example
 @strong{Description}@*
 Return mmap()ed region of the file, if possible and implemented.
+LEN and OFFSET do not need to be page aligned.  The page aligned
+address and length are written to MAP_ADDR and MAP_LEN.
 
diff --git a/bfd/doc/bfdt.texi b/bfd/doc/bfdt.texi
index b9e4341..8b82750 100644
--- a/bfd/doc/bfdt.texi
+++ b/bfd/doc/bfdt.texi
@@ -132,14 +132,17 @@
   /* Decompress sections in this BFD.  */
 #define BFD_DECOMPRESS 0x10000
 
+  /* BFD is a dummy, for plugins.  */
+#define BFD_PLUGIN 0x20000
+
   /* Flags bits to be saved in bfd_preserve_save.  */
 #define BFD_FLAGS_SAVED \
-  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS)
+  (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN)
 
   /* Flags bits which are for BFD use only.  */
 #define BFD_FLAGS_FOR_BFD_USE_MASK \
   (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
-   | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
+   | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
 
   /* Currently my_archive is tested before adding origin to
      anything. I believe that this can become always an add of
@@ -710,6 +713,9 @@
 #define bfd_gc_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
 
+#define bfd_lookup_section_flags(link_info, flag_info) \
+       BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info))
+
 #define bfd_merge_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 
diff --git a/bfd/doc/bfdver.texi b/bfd/doc/bfdver.texi
index 080824b..0529522 100644
--- a/bfd/doc/bfdver.texi
+++ b/bfd/doc/bfdver.texi
@@ -1,4 +1,4 @@
-@set VERSION 2.21
+@set VERSION 2.22
 @set VERSION_PACKAGE (GNU Binutils) 
-@set UPDATED December 2010
+@set UPDATED November 2011
 @set BUGURL @uref{http://www.sourceware.org/bugzilla/}
diff --git a/bfd/doc/libbfd.texi b/bfd/doc/libbfd.texi
index fef6e0e..b0b0300 100644
--- a/bfd/doc/libbfd.texi
+++ b/bfd/doc/libbfd.texi
@@ -50,9 +50,9 @@
 #define bfd_put_signed_8 \
   bfd_put_8
 #define bfd_get_8(abfd, ptr) \
-  (*(unsigned char *) (ptr) & 0xff)
+  (*(const unsigned char *) (ptr) & 0xff)
 #define bfd_get_signed_8(abfd, ptr) \
-  (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
+  (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
 
 #define bfd_put_16(abfd, val, ptr) \
   BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
diff --git a/bfd/doc/linker.texi b/bfd/doc/linker.texi
index 35c6964..eae1662 100644
--- a/bfd/doc/linker.texi
+++ b/bfd/doc/linker.texi
@@ -375,12 +375,13 @@
 @subsubsection @code{bfd_section_already_linked}
 @strong{Synopsis}
 @example
-void bfd_section_already_linked (bfd *abfd, asection *sec,
+bfd_boolean bfd_section_already_linked (bfd *abfd,
+    asection *sec,
     struct bfd_link_info *info);
 @end example
 @strong{Description}@*
-Check if @var{sec} has been already linked during a reloceatable
-or final link.
+Check if @var{data} has been already linked during a reloceatable
+or final link.  Return TRUE if it has.
 @example
 #define bfd_section_already_linked(abfd, sec, info) \
        BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
@@ -418,3 +419,14 @@
 Return non-NULL on success and NULL on failure; also sets
 the output @samp{hide} boolean parameter.
 
+@findex bfd_hide_sym_by_version
+@subsubsection @code{bfd_hide_sym_by_version}
+@strong{Synopsis}
+@example
+bfd_boolean bfd_hide_sym_by_version
+   (struct bfd_elf_version_tree *verdefs, const char *sym_name);
+@end example
+@strong{Description}@*
+Search an elf version script tree for symbol versioning
+info for a given symbol.  Return TRUE if the symbol is hidden.
+
diff --git a/bfd/doc/reloc.texi b/bfd/doc/reloc.texi
index 8e1187a..566a8e0 100644
--- a/bfd/doc/reloc.texi
+++ b/bfd/doc/reloc.texi
@@ -811,8 +811,8 @@
 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.
+@deffnx {} BFD_RELOC_MICROMIPS_JMP
+The MIPS jump instruction.
 @end deffn
 @deffn {} BFD_RELOC_MIPS16_JMP
 The MIPS16 jump instruction.
@@ -859,42 +859,75 @@
 MIPS16 low 16 bits.
 @end deffn
 @deffn {} BFD_RELOC_MIPS_LITERAL
+@deffnx {} BFD_RELOC_MICROMIPS_LITERAL
 Relocation against a MIPS literal section.
 @end deffn
+@deffn {} BFD_RELOC_MICROMIPS_7_PCREL_S1
+@deffnx {} BFD_RELOC_MICROMIPS_10_PCREL_S1
+@deffnx {} BFD_RELOC_MICROMIPS_16_PCREL_S1
+microMIPS PC-relative relocations.
+@end deffn
+@deffn {} BFD_RELOC_MICROMIPS_GPREL16
+@deffnx {} BFD_RELOC_MICROMIPS_HI16
+@deffnx {} BFD_RELOC_MICROMIPS_HI16_S
+@deffnx {} BFD_RELOC_MICROMIPS_LO16
+microMIPS versions of generic BFD relocs.
+@end deffn
 @deffn {} BFD_RELOC_MIPS_GOT16
+@deffnx {} BFD_RELOC_MICROMIPS_GOT16
 @deffnx {} BFD_RELOC_MIPS_CALL16
+@deffnx {} BFD_RELOC_MICROMIPS_CALL16
 @deffnx {} BFD_RELOC_MIPS_GOT_HI16
+@deffnx {} BFD_RELOC_MICROMIPS_GOT_HI16
 @deffnx {} BFD_RELOC_MIPS_GOT_LO16
+@deffnx {} BFD_RELOC_MICROMIPS_GOT_LO16
 @deffnx {} BFD_RELOC_MIPS_CALL_HI16
+@deffnx {} BFD_RELOC_MICROMIPS_CALL_HI16
 @deffnx {} BFD_RELOC_MIPS_CALL_LO16
+@deffnx {} BFD_RELOC_MICROMIPS_CALL_LO16
 @deffnx {} BFD_RELOC_MIPS_SUB
+@deffnx {} BFD_RELOC_MICROMIPS_SUB
 @deffnx {} BFD_RELOC_MIPS_GOT_PAGE
+@deffnx {} BFD_RELOC_MICROMIPS_GOT_PAGE
 @deffnx {} BFD_RELOC_MIPS_GOT_OFST
+@deffnx {} BFD_RELOC_MICROMIPS_GOT_OFST
 @deffnx {} BFD_RELOC_MIPS_GOT_DISP
+@deffnx {} BFD_RELOC_MICROMIPS_GOT_DISP
 @deffnx {} BFD_RELOC_MIPS_SHIFT5
 @deffnx {} BFD_RELOC_MIPS_SHIFT6
 @deffnx {} BFD_RELOC_MIPS_INSERT_A
 @deffnx {} BFD_RELOC_MIPS_INSERT_B
 @deffnx {} BFD_RELOC_MIPS_DELETE
 @deffnx {} BFD_RELOC_MIPS_HIGHEST
+@deffnx {} BFD_RELOC_MICROMIPS_HIGHEST
 @deffnx {} BFD_RELOC_MIPS_HIGHER
+@deffnx {} BFD_RELOC_MICROMIPS_HIGHER
 @deffnx {} BFD_RELOC_MIPS_SCN_DISP
+@deffnx {} BFD_RELOC_MICROMIPS_SCN_DISP
 @deffnx {} BFD_RELOC_MIPS_REL16
 @deffnx {} BFD_RELOC_MIPS_RELGOT
 @deffnx {} BFD_RELOC_MIPS_JALR
+@deffnx {} BFD_RELOC_MICROMIPS_JALR
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPMOD32
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPREL32
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPMOD64
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPREL64
 @deffnx {} BFD_RELOC_MIPS_TLS_GD
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_GD
 @deffnx {} BFD_RELOC_MIPS_TLS_LDM
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_LDM
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPREL_HI16
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16
 @deffnx {} BFD_RELOC_MIPS_TLS_DTPREL_LO16
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16
 @deffnx {} BFD_RELOC_MIPS_TLS_GOTTPREL
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_GOTTPREL
 @deffnx {} BFD_RELOC_MIPS_TLS_TPREL32
 @deffnx {} BFD_RELOC_MIPS_TLS_TPREL64
 @deffnx {} BFD_RELOC_MIPS_TLS_TPREL_HI16
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_TPREL_HI16
 @deffnx {} BFD_RELOC_MIPS_TLS_TPREL_LO16
+@deffnx {} BFD_RELOC_MICROMIPS_TLS_TPREL_LO16
 MIPS ELF relocations.
 @end deffn
 @deffn {} BFD_RELOC_MIPS_COPY
@@ -1254,6 +1287,12 @@
 @deffnx {} BFD_RELOC_ARM_TLS_TPOFF32
 @deffnx {} BFD_RELOC_ARM_TLS_IE32
 @deffnx {} BFD_RELOC_ARM_TLS_LE32
+@deffnx {} BFD_RELOC_ARM_TLS_GOTDESC
+@deffnx {} BFD_RELOC_ARM_TLS_CALL
+@deffnx {} BFD_RELOC_ARM_THM_TLS_CALL
+@deffnx {} BFD_RELOC_ARM_TLS_DESCSEQ
+@deffnx {} BFD_RELOC_ARM_THM_TLS_DESCSEQ
+@deffnx {} BFD_RELOC_ARM_TLS_DESC
 ARM thread-local storage relocations.
 @end deffn
 @deffn {} BFD_RELOC_ARM_ALU_PC_G0_NC
@@ -1289,6 +1328,9 @@
 @deffn {} BFD_RELOC_ARM_V4BX
 Annotation of BX instructions.
 @end deffn
+@deffn {} BFD_RELOC_ARM_IRELATIVE
+ARM support for STT_GNU_IFUNC.
+@end deffn
 @deffn {} BFD_RELOC_ARM_IMMEDIATE
 @deffnx {} BFD_RELOC_ARM_ADRL_IMMEDIATE
 @deffnx {} BFD_RELOC_ARM_T32_IMMEDIATE
@@ -1866,6 +1908,10 @@
 @deffnx {} BFD_RELOC_C6000_DSBT_INDEX
 @deffnx {} BFD_RELOC_C6000_PREL31
 @deffnx {} BFD_RELOC_C6000_COPY
+@deffnx {} BFD_RELOC_C6000_JUMP_SLOT
+@deffnx {} BFD_RELOC_C6000_EHTYPE
+@deffnx {} BFD_RELOC_C6000_PCR_H16
+@deffnx {} BFD_RELOC_C6000_PCR_L16
 @deffnx {} BFD_RELOC_C6000_ALIGN
 @deffnx {} BFD_RELOC_C6000_FPHEAD
 @deffnx {} BFD_RELOC_C6000_NOCMP
@@ -2098,9 +2144,12 @@
 @deffnx {} BFD_RELOC_RX_GPRELL
 @deffnx {} BFD_RELOC_RX_SYM
 @deffnx {} BFD_RELOC_RX_OP_SUBTRACT
+@deffnx {} BFD_RELOC_RX_OP_NEG
 @deffnx {} BFD_RELOC_RX_ABS8
 @deffnx {} BFD_RELOC_RX_ABS16
+@deffnx {} BFD_RELOC_RX_ABS16_REV
 @deffnx {} BFD_RELOC_RX_ABS32
+@deffnx {} BFD_RELOC_RX_ABS32_REV
 @deffnx {} BFD_RELOC_RX_ABS16U
 @deffnx {} BFD_RELOC_RX_ABS16UW
 @deffnx {} BFD_RELOC_RX_ABS16UL
@@ -2875,6 +2924,178 @@
 This is used to tell the dynamic linker to copy the value out of
 the dynamic object into the runtime process image.
 @end deffn
+@deffn {} BFD_RELOC_TILEPRO_COPY
+@deffnx {} BFD_RELOC_TILEPRO_GLOB_DAT
+@deffnx {} BFD_RELOC_TILEPRO_JMP_SLOT
+@deffnx {} BFD_RELOC_TILEPRO_RELATIVE
+@deffnx {} BFD_RELOC_TILEPRO_BROFF_X1
+@deffnx {} BFD_RELOC_TILEPRO_JOFFLONG_X1
+@deffnx {} BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_X0
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_Y0
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_X1
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_Y1
+@deffnx {} BFD_RELOC_TILEPRO_DEST_IMM8_X1
+@deffnx {} BFD_RELOC_TILEPRO_MT_IMM15_X1
+@deffnx {} BFD_RELOC_TILEPRO_MF_IMM15_X1
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_GOT
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_GOT
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA
+@deffnx {} BFD_RELOC_TILEPRO_MMSTART_X0
+@deffnx {} BFD_RELOC_TILEPRO_MMEND_X0
+@deffnx {} BFD_RELOC_TILEPRO_MMSTART_X1
+@deffnx {} BFD_RELOC_TILEPRO_MMEND_X1
+@deffnx {} BFD_RELOC_TILEPRO_SHAMT_X0
+@deffnx {} BFD_RELOC_TILEPRO_SHAMT_X1
+@deffnx {} BFD_RELOC_TILEPRO_SHAMT_Y0
+@deffnx {} BFD_RELOC_TILEPRO_SHAMT_Y1
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA
+@deffnx {} BFD_RELOC_TILEPRO_TLS_DTPMOD32
+@deffnx {} BFD_RELOC_TILEPRO_TLS_DTPOFF32
+@deffnx {} BFD_RELOC_TILEPRO_TLS_TPOFF32
+Tilera TILEPro Relocations.
+@end deffn
+@deffn {} BFD_RELOC_TILEGX_HW0
+@deffnx {} BFD_RELOC_TILEGX_HW1
+@deffnx {} BFD_RELOC_TILEGX_HW2
+@deffnx {} BFD_RELOC_TILEGX_HW3
+@deffnx {} BFD_RELOC_TILEGX_HW0_LAST
+@deffnx {} BFD_RELOC_TILEGX_HW1_LAST
+@deffnx {} BFD_RELOC_TILEGX_HW2_LAST
+@deffnx {} BFD_RELOC_TILEGX_COPY
+@deffnx {} BFD_RELOC_TILEGX_GLOB_DAT
+@deffnx {} BFD_RELOC_TILEGX_JMP_SLOT
+@deffnx {} BFD_RELOC_TILEGX_RELATIVE
+@deffnx {} BFD_RELOC_TILEGX_BROFF_X1
+@deffnx {} BFD_RELOC_TILEGX_JUMPOFF_X1
+@deffnx {} BFD_RELOC_TILEGX_JUMPOFF_X1_PLT
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X0
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y0
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X1
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y1
+@deffnx {} BFD_RELOC_TILEGX_DEST_IMM8_X1
+@deffnx {} BFD_RELOC_TILEGX_MT_IMM14_X1
+@deffnx {} BFD_RELOC_TILEGX_MF_IMM14_X1
+@deffnx {} BFD_RELOC_TILEGX_MMSTART_X0
+@deffnx {} BFD_RELOC_TILEGX_MMEND_X0
+@deffnx {} BFD_RELOC_TILEGX_SHAMT_X0
+@deffnx {} BFD_RELOC_TILEGX_SHAMT_X1
+@deffnx {} BFD_RELOC_TILEGX_SHAMT_Y0
+@deffnx {} BFD_RELOC_TILEGX_SHAMT_Y1
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW3
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE
+@deffnx {} BFD_RELOC_TILEGX_TLS_DTPMOD64
+@deffnx {} BFD_RELOC_TILEGX_TLS_DTPOFF64
+@deffnx {} BFD_RELOC_TILEGX_TLS_TPOFF64
+@deffnx {} BFD_RELOC_TILEGX_TLS_DTPMOD32
+@deffnx {} BFD_RELOC_TILEGX_TLS_DTPOFF32
+@deffnx {} BFD_RELOC_TILEGX_TLS_TPOFF32
+Tilera TILE-Gx Relocations.
+@end deffn
 
 @example
 
@@ -2939,6 +3160,17 @@
 Provides default handling for relaxing for back ends which
 don't do section gc -- i.e., does nothing.
 
+@findex bfd_generic_lookup_section_flags
+@subsubsection @code{bfd_generic_lookup_section_flags}
+@strong{Synopsis}
+@example
+void bfd_generic_lookup_section_flags
+   (struct bfd_link_info *, struct flag_info *);
+@end example
+@strong{Description}@*
+Provides default handling for section flags lookup
+-- i.e., does nothing.
+
 @findex bfd_generic_merge_sections
 @subsubsection @code{bfd_generic_merge_sections}
 @strong{Synopsis}
diff --git a/bfd/doc/section.texi b/bfd/doc/section.texi
index 98c7c6c..5013701 100644
--- a/bfd/doc/section.texi
+++ b/bfd/doc/section.texi
@@ -284,6 +284,11 @@
      sections.  */
 #define SEC_COFF_SHARED_LIBRARY 0x4000000
 
+  /* This input section should be copied to output in reverse order
+     as an array of pointers.  This is for ELF linker internal use
+     only.  */
+#define SEC_ELF_REVERSE_COPY 0x4000000
+
   /* This section contains data which may be shared with other
      executables or shared objects. This is for COFF only.  */
 #define SEC_COFF_SHARED 0x8000000
@@ -468,6 +473,9 @@
   /* The BFD which owns the section.  */
   bfd *owner;
 
+  /* INPUT_SECTION_FLAGS if specified in the linker script.  */
+  struct flag_info *section_flag_info;
+
   /* A symbol which points at this section only.  */
   struct bfd_symbol *symbol;
   struct bfd_symbol **symbol_ptr_ptr;
@@ -646,6 +654,9 @@
   /* target_index, used_by_bfd, constructor_chain, owner,          */  \
      0,            NULL,        NULL,              NULL,               \
                                                                        \
+  /* flag_info,                                                    */  \
+     NULL,                                                             \
+                                                                       \
   /* symbol,                    symbol_ptr_ptr,                    */  \
      (struct bfd_symbol *) SYM, &SEC.symbol,                           \
                                                                        \
@@ -838,6 +849,16 @@
 have the @code{SEC_HAS_CONTENTS} field set.
 @end itemize
 
+@findex bfd_rename_section
+@subsubsection @code{bfd_rename_section}
+@strong{Synopsis}
+@example
+void bfd_rename_section
+   (bfd *abfd, asection *sec, const char *newname);
+@end example
+@strong{Description}@*
+Rename section @var{sec} in @var{abfd} to @var{newname}.
+
 @findex bfd_map_over_sections
 @subsubsection @code{bfd_map_over_sections}
 @strong{Synopsis}
diff --git a/bfd/doc/targets.texi b/bfd/doc/targets.texi
index c2e81f3..b25f2f8 100644
--- a/bfd/doc/targets.texi
+++ b/bfd/doc/targets.texi
@@ -145,6 +145,9 @@
 /* Forward declaration.  */
 typedef struct bfd_link_info _bfd_link_info;
 
+/* Forward declaration.  */
+typedef struct flag_info flag_info;
+
 typedef struct bfd_target
 @{
   /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
@@ -176,7 +179,11 @@
   char ar_pad_char;
 
   /* The maximum number of characters in an archive header.  */
-  unsigned short ar_max_namelen;
+  unsigned char ar_max_namelen;
+
+  /* How well this target matches, used to select between various
+     possible targets when more than one target matches.  */
+  unsigned char match_priority;
 
   /* Entries for byte swapping for data. These are different from the
      other entry points, since they don't take a BFD as the first argument.
@@ -414,6 +421,7 @@
   NAME##_bfd_final_link, \
   NAME##_bfd_link_split_section, \
   NAME##_bfd_gc_sections, \
+  NAME##_bfd_lookup_section_flags, \
   NAME##_bfd_merge_sections, \
   NAME##_bfd_is_group_section, \
   NAME##_bfd_discard_group, \
@@ -458,6 +466,10 @@
   /* Remove sections that are not referenced from the output.  */
   bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
+  /* Sets the bitmask of allowed and disallowed section flags.  */
+  void (*_bfd_lookup_section_flags) (struct bfd_link_info *,
+                                     struct flag_info *);
+
   /* Attempt to merge SEC_MERGE sections.  */
   bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
 
@@ -469,8 +481,8 @@
 
   /* Check if SEC has been already linked during a reloceatable or
      final link.  */
-  void (*_section_already_linked) (bfd *, struct bfd_section *,
-                                   struct bfd_link_info *);
+  bfd_boolean (*_section_already_linked) (bfd *, asection *,
+                                          struct bfd_link_info *);
 
   /* Define a common symbol.  */
   bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 9591e81..6dec4c1 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -278,7 +278,7 @@
 /* Map of uncompressed DWARF debug section name to compressed one.  It
    is terminated by NULL uncompressed_name.  */
 
-struct dwarf_debug_section dwarf_debug_sections[] =
+const struct dwarf_debug_section dwarf_debug_sections[] =
 {
   { ".debug_abbrev",		".zdebug_abbrev" },
   { ".debug_aranges",		".zdebug_aranges" },
@@ -287,6 +287,7 @@
   { ".debug_line",		".zdebug_line" },
   { ".debug_loc",		".zdebug_loc" },
   { ".debug_macinfo",		".zdebug_macinfo" },
+  { ".debug_macro",		".zdebug_macro" },
   { ".debug_pubnames",		".zdebug_pubnames" },
   { ".debug_pubtypes",		".zdebug_pubtypes" },
   { ".debug_ranges",		".zdebug_ranges" },
@@ -314,6 +315,7 @@
   debug_line,
   debug_loc,
   debug_macinfo,
+  debug_macro,
   debug_pubnames,
   debug_pubtypes,
   debug_ranges,
@@ -970,6 +972,7 @@
   char *filename;
   unsigned int line;
   unsigned int column;
+  unsigned int discriminator;
   unsigned char op_index;
   unsigned char end_sequence;		/* End of (sequential) code sequence.  */
 };
@@ -1063,6 +1066,7 @@
 	       char *filename,
 	       unsigned int line,
 	       unsigned int column,
+	       unsigned int discriminator,
 	       int end_sequence)
 {
   bfd_size_type amt = sizeof (struct line_info);
@@ -1078,6 +1082,7 @@
   info->op_index = op_index;
   info->line = line;
   info->column = column;
+  info->discriminator = discriminator;
   info->end_sequence = end_sequence;
 
   if (filename && filename[0])
@@ -1550,6 +1555,7 @@
       char * filename = table->num_files ? concat_filename (table, 1) : NULL;
       unsigned int line = 1;
       unsigned int column = 0;
+      unsigned int discriminator = 0;
       int is_stmt = lh.default_is_stmt;
       int end_sequence = 0;
       /* [email protected]: Against the DWARF2 specs, some
@@ -1584,8 +1590,9 @@
 	      line += lh.line_base + (adj_opcode % lh.line_range);
 	      /* Append row to matrix using current values.  */
 	      if (!add_line_info (table, address, op_index, filename,
-				  line, column, 0))
+				  line, column, discriminator, 0))
 		goto line_fail;
+              discriminator = 0;
 	      if (address < low_pc)
 		low_pc = address;
 	      if (address > high_pc)
@@ -1603,9 +1610,10 @@
 		{
 		case DW_LNE_end_sequence:
 		  end_sequence = 1;
-		  if (!add_line_info (table, address, op_index, filename,
-				      line, column, end_sequence))
+		  if (!add_line_info (table, address, op_index, filename, line,
+				      column, discriminator, end_sequence))
 		    goto line_fail;
+                  discriminator = 0;
 		  if (address < low_pc)
 		    low_pc = address;
 		  if (address > high_pc)
@@ -1645,7 +1653,8 @@
 		  table->num_files++;
 		  break;
 		case DW_LNE_set_discriminator:
-		  (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+		  discriminator =
+                      read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
 		  line_ptr += bytes_read;
 		  break;
 		default:
@@ -1659,8 +1668,9 @@
 	      break;
 	    case DW_LNS_copy:
 	      if (!add_line_info (table, address, op_index,
-				  filename, line, column, 0))
+				  filename, line, column, discriminator, 0))
 		goto line_fail;
+              discriminator = 0;
 	      if (address < low_pc)
 		low_pc = address;
 	      if (address > high_pc)
@@ -1760,7 +1770,8 @@
 lookup_address_in_line_info_table (struct line_info_table *table,
 				   bfd_vma addr,
 				   const char **filename_ptr,
-				   unsigned int *linenumber_ptr)
+				   unsigned int *linenumber_ptr,
+				   unsigned int *discriminator_ptr)
 {
   struct line_sequence *seq = NULL;
   struct line_info *each_line;
@@ -1795,6 +1806,8 @@
         {
           *filename_ptr = each_line->filename;
           *linenumber_ptr = each_line->line;
+          if (discriminator_ptr)
+            *discriminator_ptr = each_line->discriminator;
           return TRUE;
         }
     }
@@ -2017,7 +2030,6 @@
 {
   bfd_byte *ranges_ptr;
   bfd_vma base_address = unit->base_address;
-  unsigned int i;
 
   if (! unit->stash->dwarf_ranges_buffer)
     {
@@ -2026,7 +2038,7 @@
     }
   ranges_ptr = unit->stash->dwarf_ranges_buffer + offset;
 
-  for (i = 0; ; i++)
+  for (;;)
     {
       bfd_vma low_pc;
       bfd_vma high_pc;
@@ -2036,11 +2048,6 @@
       high_pc = read_address (unit, ranges_ptr);
       ranges_ptr += unit->addr_size;
 
-      /* If the first entry is (0,0), we may be dealing with a corrupted
-         range list caused by --gc-sections.  Skip it.  */
-      if (i == 0 && low_pc == 0 && high_pc == 0)
-	continue;
-
       if (low_pc == 0 && high_pc == 0)
 	break;
       if (low_pc == -1UL && high_pc != -1UL)
@@ -2087,6 +2094,7 @@
       struct varinfo *var;
       bfd_vma low_pc = 0;
       bfd_vma high_pc = 0;
+      bfd_boolean high_pc_relative = FALSE;
 
       abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;
@@ -2154,7 +2162,7 @@
 	{
 	  info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
 	  if (info_ptr == NULL)
-	    return FALSE;
+	    goto fail;
 
 	  if (func)
 	    {
@@ -2192,6 +2200,7 @@
 
 		case DW_AT_high_pc:
 		  high_pc = attr.u.val;
+		  high_pc_relative = attr.form != DW_FORM_addr;
 		  break;
 
 		case DW_AT_ranges:
@@ -2270,6 +2279,9 @@
 	    }
 	}
 
+      if (high_pc_relative)
+	high_pc += low_pc;
+
       if (func && high_pc != 0)
 	{
 	  if (!arange_add (unit->abfd, &func->arange, low_pc, high_pc))
@@ -2333,6 +2345,7 @@
   bfd_vma low_pc = 0;
   bfd_vma high_pc = 0;
   bfd *abfd = stash->bfd_ptr;
+  bfd_boolean high_pc_relative = FALSE;
 
   version = read_2_bytes (abfd, info_ptr);
   info_ptr += 2;
@@ -2435,6 +2448,7 @@
 
 	case DW_AT_high_pc:
 	  high_pc = attr.u.val;
+	  high_pc_relative = attr.form != DW_FORM_addr;
 	  break;
 
 	case DW_AT_ranges:
@@ -2462,6 +2476,8 @@
 	  break;
 	}
     }
+  if (high_pc_relative)
+    high_pc += low_pc;
   if (high_pc != 0)
     {
       if (!arange_add (unit->abfd, &unit->arange, low_pc, high_pc))
@@ -2512,6 +2528,7 @@
 			     const char **filename_ptr,
 			     const char **functionname_ptr,
 			     unsigned int *linenumber_ptr,
+			     unsigned int *discriminator_ptr,
 			     struct dwarf2_debug *stash)
 {
   bfd_boolean line_p;
@@ -2552,7 +2569,8 @@
     stash->inliner_chain = function;
   line_p = lookup_address_in_line_info_table (unit->line_table, addr,
 					      filename_ptr,
-					      linenumber_ptr);
+					      linenumber_ptr,
+					      discriminator_ptr);
   return line_p || func_p;
 }
 
@@ -3127,6 +3145,7 @@
 	   const char **filename_ptr,
 	   const char **functionname_ptr,
 	   unsigned int *linenumber_ptr,
+	   unsigned int *discriminator_ptr,
 	   unsigned int addr_size,
 	   void **pinfo)
 {
@@ -3188,6 +3207,8 @@
   if (! do_line)
     *functionname_ptr = NULL;
   *linenumber_ptr = 0;
+  if (discriminator_ptr)
+    *discriminator_ptr = 0;
 
   if (! *pinfo)
     {
@@ -3331,6 +3352,7 @@
 						   filename_ptr,
 						   functionname_ptr,
 						   linenumber_ptr,
+						   discriminator_ptr,
 						   stash));
 	  if (found)
 	    goto done;
@@ -3424,6 +3446,7 @@
 						     filename_ptr,
 						     functionname_ptr,
 						     linenumber_ptr,
+						     discriminator_ptr,
 						     stash));
 
 	  if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
@@ -3456,12 +3479,13 @@
 			       const char **filename_ptr,
 			       const char **functionname_ptr,
 			       unsigned int *linenumber_ptr,
+                               unsigned int *discriminator_ptr,
 			       unsigned int addr_size,
 			       void **pinfo)
 {
   return find_line (abfd, section, offset, NULL, symbols, filename_ptr,
-		    functionname_ptr, linenumber_ptr, addr_size,
-		    pinfo);
+		    functionname_ptr, linenumber_ptr,
+                    discriminator_ptr, addr_size, pinfo);
 }
 
 /* The DWARF2 version of find_line.
@@ -3473,12 +3497,13 @@
 		       asymbol *symbol,
 		       const char **filename_ptr,
 		       unsigned int *linenumber_ptr,
+                       unsigned int *discriminator_ptr,
 		       unsigned int addr_size,
 		       void **pinfo)
 {
   return find_line (abfd, NULL, 0, symbol, symbols, filename_ptr,
-		    NULL, linenumber_ptr, addr_size,
-		    pinfo);
+		    NULL, linenumber_ptr, discriminator_ptr,
+                    addr_size, pinfo);
 }
 
 bfd_boolean
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 4349486..b76266d 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1,6 +1,6 @@
 /* Generic ECOFF (Extended-COFF) routines.
    Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, [email protected].
@@ -73,6 +73,8 @@
      0,       NULL,         0,
   /* target_index, used_by_bfd, constructor_chain, owner,          */
      0,            NULL,        NULL,              NULL,
+  /* flag_info,                                                    */
+     NULL,
   /* symbol,                                                       */
      NULL,
   /* symbol_ptr_ptr,                                               */
@@ -3231,14 +3233,6 @@
   ((struct ecoff_link_hash_entry *) \
    bfd_link_hash_lookup (&(table)->root, (string), (create), (copy), (follow)))
 
-/* Traverse an ECOFF link hash table.  */
-
-#define ecoff_link_hash_traverse(table, func, info)			\
-  (bfd_link_hash_traverse						\
-   (&(table)->root,							\
-    (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func),	\
-    (info)))
-
 /* Get the ECOFF link hash table from the info structure.  This is
    just a cast.  */
 
@@ -3600,7 +3594,7 @@
       EXTR esym;
       bfd_boolean def;
       const char *name;
-      bfd *subsbfd;
+      bfd *oldbfd;
       struct bfd_link_hash_entry *h;
 
       (*swap_ext_in) (abfd, (void *) ext_ptr, &esym);
@@ -3645,18 +3639,17 @@
 	continue;
 
       /* Include this element.  */
-      subsbfd = NULL;
-      if (! (*info->callbacks->add_archive_element)
-					(info, abfd, name, &subsbfd))
+      oldbfd = abfd;
+      if (!(*info->callbacks
+	    ->add_archive_element) (info, abfd, name, &abfd))
 	goto error_return;
       /* Potentially, the add_archive_element hook may have set a
 	 substitute BFD for us.  */
-      if (subsbfd
+      if (abfd != oldbfd
 	  && !reread_ext_syms_and_strs (&symhdr, &external_ext_size, &esize,
-				&external_ext, &ssext, subsbfd, backend))
+					&external_ext, &ssext, abfd, backend))
 	goto error_return;
-      if (! ecoff_link_add_externals (subsbfd ? subsbfd : abfd, info,
-				external_ext, ssext))
+      if (! ecoff_link_add_externals (abfd, info, external_ext, ssext))
 	goto error_return;
 
       *pneeded = TRUE;
@@ -3733,7 +3726,6 @@
       unsigned int file_offset;
       const char *name;
       bfd *element;
-      bfd *subsbfd;
 
       h = *pundef;
 
@@ -3820,13 +3812,10 @@
       /* Unlike the generic linker, we know that this element provides
 	 a definition for an undefined symbol and we know that we want
 	 to include it.  We don't need to check anything.  */
-      subsbfd = NULL;
-      if (! (*info->callbacks->add_archive_element)
-					(info, element, name, &subsbfd))
+      if (!(*info->callbacks
+	    ->add_archive_element) (info, element, name, &element))
 	return FALSE;
-      /* Potentially, the add_archive_element hook may have set a
-	 substitute BFD for us.  */
-      if (! ecoff_link_add_object_symbols (subsbfd ? subsbfd : element, info))
+      if (! ecoff_link_add_object_symbols (element, info))
 	return FALSE;
 
       pundef = &(*pundef)->u.undef.next;
@@ -4264,8 +4253,9 @@
    the hash table.  */
 
 static bfd_boolean
-ecoff_link_write_external (struct ecoff_link_hash_entry *h, void * data)
+ecoff_link_write_external (struct bfd_hash_entry *bh, void * data)
 {
+  struct ecoff_link_hash_entry *h = (struct ecoff_link_hash_entry *) bh;
   struct extsym_info *einfo = (struct extsym_info *) data;
   bfd *output_bfd = einfo->abfd;
   bfd_boolean strip;
@@ -4496,9 +4486,7 @@
   /* Write out the external symbols.  */
   einfo.abfd = abfd;
   einfo.info = info;
-  ecoff_link_hash_traverse (ecoff_hash_table (info),
-			    ecoff_link_write_external,
-			    (void *) &einfo);
+  bfd_hash_traverse (&info->hash->table, ecoff_link_write_external, &einfo);
 
   if (info->relocatable)
     {
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index e1893d3..569e846 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -613,7 +613,7 @@
 
   /* Only pass on attributes that match in both inputs.  */
   if (in_attr[tag].i != out_attr[tag].i
-      || in_attr[tag].s != out_attr[tag].s
+      || (in_attr[tag].s == NULL) != (out_attr[tag].s == NULL)
       || (in_attr[tag].s != NULL && out_attr[tag].s != NULL
 	  && strcmp (in_attr[tag].s, out_attr[tag].s) != 0))
     {
@@ -673,7 +673,7 @@
 
 	  /*  Only pass on attributes that match in both inputs.  */
 	  if (in_list->attr.i != out_list->attr.i
-	      || in_list->attr.s != out_list->attr.s
+	      || (in_list->attr.s == NULL) != (out_list->attr.s == NULL)
 	      || (in_list->attr.s && out_list->attr.s
 		  && strcmp (in_list->attr.s, out_list->attr.s) != 0))
 	    {
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 2e607f8..935718f 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1,6 +1,6 @@
 /* BFD back-end data structures for ELF files.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -153,6 +153,9 @@
   /* Symbol st_other value, symbol visibility.  */
   unsigned int other : 8;
 
+  /* The symbol's st_target_internal value (see Elf_Internal_Sym).  */
+  unsigned int target_internal : 8;
+
   /* Symbol is referenced by a non-shared object (other than the object
      in which it is defined).  */
   unsigned int ref_regular : 1;
@@ -229,11 +232,7 @@
 };
 
 /* Will references to this symbol always reference the symbol
-   in this object?  STV_PROTECTED is excluded from the visibility test
-   here so that function pointer comparisons work properly.  Since
-   function symbols not defined in an app are set to their .plt entry,
-   it's necessary for shared libs to also reference the .plt even
-   though the symbol is really local to the shared lib.  */
+   in this object?  */
 #define SYMBOL_REFERENCES_LOCAL(INFO, H) \
   _bfd_elf_symbol_refs_local_p (H, INFO, 0)
 
@@ -429,6 +428,8 @@
   TIC6X_ELF_DATA,
   X86_64_ELF_DATA,
   XTENSA_ELF_DATA,
+  TILEGX_ELF_DATA,
+  TILEPRO_ELF_DATA,
   GENERIC_ELF_DATA
 };
 
@@ -713,6 +714,10 @@
   /* The BFD flags applied to sections created for dynamic linking.  */
   flagword dynamic_sec_flags;
 
+  /* Architecture-specific data for this backend.
+     This is actually a pointer to some type like struct elf_ARCH_data.  */
+  const void *arch_data;
+
   /* A function to translate an ELF RELA relocation to a BFD arelent
      structure.  */
   void (*elf_info_to_howto)
@@ -1111,6 +1116,11 @@
   char *(*elf_backend_write_core_note)
     (bfd *abfd, char *buf, int *bufsiz, int note_type, ...);
 
+  /* This function, if defined, is called to convert target-specific
+     section flag names into hex values.  */
+  flagword (*elf_backend_lookup_section_flags_hook)
+    (char *);
+
   /* This function returns class of a reloc type.  */
   enum elf_reloc_type_class (*elf_backend_reloc_type_class)
     (const Elf_Internal_Rela *);
@@ -1211,6 +1221,12 @@
   /* Return TRUE if type is a function symbol type.  */
   bfd_boolean (*is_function_type) (unsigned int type);
 
+  /* If the ELF symbol SYM might be a function in SEC, return the
+     function size and set *CODE_OFF to the function's entry point,
+     otherwise return zero.  */
+  bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec,
+				       bfd_vma *code_off);
+
   /* Used to handle bad SHF_LINK_ORDER input.  */
   bfd_error_handler_type link_order_error_handler;
 
@@ -1403,14 +1419,14 @@
   void *sec_info;
 };
 
-#define elf_section_data(sec)  ((struct bfd_elf_section_data*)(sec)->used_by_bfd)
+#define elf_section_data(sec) ((struct bfd_elf_section_data*)(sec)->used_by_bfd)
 #define elf_linked_to_section(sec) (elf_section_data(sec)->linked_to)
-#define elf_section_type(sec)  (elf_section_data(sec)->this_hdr.sh_type)
-#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
-#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_fde_list(sec)      (elf_section_data(sec)->fde_list)
+#define elf_section_type(sec)	(elf_section_data(sec)->this_hdr.sh_type)
+#define elf_section_flags(sec)	(elf_section_data(sec)->this_hdr.sh_flags)
+#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_fde_list(sec)	(elf_section_data(sec)->fde_list)
 #define elf_sec_group(sec)	(elf_section_data(sec)->sec_group)
 
 #define xvec_get_elf_backend_data(xvec) \
@@ -1473,6 +1489,15 @@
   Tag_compatibility = 32
 };
 
+/* The following struct stores information about every SystemTap section
+   found in the object file.  */
+struct sdt_note
+{
+  struct sdt_note *next;
+  bfd_size_type size;
+  bfd_byte data[1];
+};
+
 /* Some private data is stashed away for future use using the tdata pointer
    in the bfd structure.  */
 
@@ -1538,7 +1563,7 @@
   const char *dt_name;
 
   /* The linker emulation needs to know what audit libs
-     are used by a dynamic object.  */ 
+     are used by a dynamic object.  */
   const char *dt_audit;
 
   /* Records the result of `get_program_header_size'.  */
@@ -1630,10 +1655,15 @@
   bfd_size_type build_id_size;
   bfd_byte *build_id;
 
+  /* Linked-list containing information about every Systemtap section
+     found in the object file.  Each section corresponds to one entry
+     in the list.  */
+  struct sdt_note *sdt_note_head;
+
   /* True if the bfd contains symbols that have the STT_GNU_IFUNC
-     symbol type.  Used to set the osabi field in the ELF header
-     structure.  */
-  bfd_boolean has_ifunc_symbols;
+     symbol type or STB_GNU_UNIQUE binding.  Used to set the osabi
+     field in the ELF header structure.  */
+  bfd_boolean has_gnu_symbols;
 
   /* An identifier used to distinguish different target
      specific extensions to this structure.  */
@@ -1777,8 +1807,8 @@
   (bfd *, const asection *, bfd *, const asection *);
 extern bfd_boolean bfd_elf_is_group_section
   (bfd *, const struct bfd_section *);
-extern void _bfd_elf_section_already_linked
-  (bfd *, struct bfd_section *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_section_already_linked
+  (bfd *, asection *, struct bfd_link_info *);
 extern void bfd_elf_set_group_contents
   (bfd *, asection *, void *);
 extern asection *_bfd_elf_check_kept_section
@@ -1842,9 +1872,16 @@
 extern bfd_boolean _bfd_elf_find_nearest_line
   (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
    unsigned int *);
+extern bfd_boolean _bfd_elf_find_nearest_line_discriminator
+  (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
+   unsigned int *, unsigned int *);
 extern bfd_boolean _bfd_elf_find_line
   (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+extern bfd_boolean _bfd_elf_find_line_discriminator
+  (bfd *, asymbol **, asymbol *, const char **, unsigned int *, unsigned int *);
 #define _bfd_generic_find_line _bfd_elf_find_line
+#define _bfd_generic_find_nearest_line_discriminator \
+        _bfd_elf_find_nearest_line_discriminator
 extern bfd_boolean _bfd_elf_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *);
 #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
@@ -1872,7 +1909,7 @@
 extern int _bfd_elf_symbol_from_bfd_symbol
   (bfd *, asymbol **);
 
-extern Elf_Internal_Sym *bfd_sym_from_r_symndx 
+extern Elf_Internal_Sym *bfd_sym_from_r_symndx
   (struct sym_cache *, bfd *, unsigned long);
 extern asection *bfd_section_from_elf_index
   (bfd *, unsigned int);
@@ -2156,6 +2193,9 @@
 extern bfd_boolean _bfd_elf_gc_mark
   (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn);
 
+extern bfd_boolean _bfd_elf_gc_mark_extra_sections
+  (struct bfd_link_info *, elf_gc_mark_hook_fn);
+
 extern bfd_boolean bfd_elf_gc_common_finalize_got_offsets
   (bfd *, struct bfd_link_info *);
 
@@ -2173,8 +2213,14 @@
 
 extern bfd_boolean _bfd_elf_is_function_type (unsigned int);
 
+extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *,
+						  bfd_vma *);
+
 extern int bfd_elf_get_default_section_type (flagword);
 
+extern void bfd_elf_lookup_section_flags
+  (struct bfd_link_info *, struct flag_info *);
+
 extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section
   (bfd * abfd, asection * section);
 
@@ -2207,6 +2253,8 @@
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_s390_prefix
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arm_vfp
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
@@ -2243,7 +2291,7 @@
 extern bfd_boolean _bfd_elf_merge_unknown_attribute_list (bfd *, bfd *);
 extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr (asection *sec);
 
-/* The linker may needs to keep track of the number of relocs that it
+/* The linker may need to keep track of the number of relocs that it
    decides to copy as dynamic relocs in check_relocs for each symbol.
    This is so that it can later discard them if they are found to be
    unnecessary.  We can store the information in a field extending the
@@ -2272,6 +2320,14 @@
   (struct bfd_link_info *, struct elf_link_hash_entry *,
    struct elf_dyn_relocs **, unsigned int, unsigned int);
 
+extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *);
+extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *);
+
+extern bfd_vma elf64_r_info (bfd_vma, bfd_vma);
+extern bfd_vma elf64_r_sym (bfd_vma);
+extern bfd_vma elf32_r_info (bfd_vma, bfd_vma);
+extern bfd_vma elf32_r_sym (bfd_vma);
+
 /* Large common section.  */
 extern asection _bfd_elf_large_com_section;
 
@@ -2353,7 +2409,7 @@
 /* This macro is to avoid lots of duplicated code in the body of the
    loop over relocations in xxx_relocate_section() in the various
    elfxx-xxxx.c files.
-   
+
    Handle relocations against symbols from removed linkonce sections,
    or sections discarded by a linker script.  When doing a relocatable
    link, we remove such relocations.  Otherwise, we just want the
@@ -2380,7 +2436,7 @@
 	    rel_hdr = _bfd_elf_single_rel_hdr (input_section);		\
 	    rel_hdr->sh_size -= rel_hdr->sh_entsize;			\
 									\
-	    memmove (rel, rel + 1, (relend - rel) * sizeof (*rel));	\
+	    memmove (rel, rel + 1, (relend - rel - 1) * sizeof (*rel));	\
 									\
 	    input_section->reloc_count--;				\
 	    relend--;							\
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 8380ef8..54142b2 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
 /* .eh_frame section optimization.
-   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Jakub Jelinek <[email protected]>.
 
@@ -490,7 +490,8 @@
   if (hdr_info->parsed_eh_frames)
     return;
 
-  if (sec->size == 0)
+  if (sec->size == 0
+      || sec->sec_info_type != ELF_INFO_TYPE_NONE)
     {
       /* This file does not contain .eh_frame information.  */
       return;
@@ -777,8 +778,6 @@
 	}
       else
 	{
-	  asection *rsec;
-
 	  /* Find the corresponding CIE.  */
 	  unsigned int cie_offset = this_inf->offset + 4 - hdr_id;
 	  for (cie = local_cies; cie < local_cies + cie_count; cie++)
@@ -794,17 +793,22 @@
 	    = cie->cie_inf->add_augmentation_size;
 
 	  ENSURE_NO_RELOCS (buf);
-	  REQUIRE (GET_RELOC (buf));
-
-	  /* Chain together the FDEs for each section.  */
-	  rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
-	  /* RSEC will be NULL if FDE was cleared out as it was belonging to
-	     a discarded SHT_GROUP.  */
-	  if (rsec)
+	  if ((sec->flags & SEC_LINKER_CREATED) == 0 || cookie->rels != NULL)
 	    {
-	      REQUIRE (rsec->owner == abfd);
-	      this_inf->u.fde.next_for_section = elf_fde_list (rsec);
-	      elf_fde_list (rsec) = this_inf;
+	      asection *rsec;
+
+	      REQUIRE (GET_RELOC (buf));
+
+	      /* Chain together the FDEs for each section.  */
+	      rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
+	      /* RSEC will be NULL if FDE was cleared out as it was belonging to
+		 a discarded SHT_GROUP.  */
+	      if (rsec)
+		{
+		  REQUIRE (rsec->owner == abfd);
+		  this_inf->u.fde.next_for_section = elf_fde_list (rsec);
+		  elf_fde_list (rsec) = this_inf;
+		}
 	    }
 
 	  /* Skip the initial location and address range.  */
@@ -1133,10 +1137,16 @@
   struct eh_frame_hdr_info *hdr_info;
   unsigned int ptr_size, offset;
 
+  if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+    return FALSE;
+
   sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
   if (sec_info == NULL)
     return FALSE;
 
+  ptr_size = (get_elf_backend_data (sec->owner)
+	      ->elf_backend_eh_frame_address_size (sec->owner, sec));
+
   hdr_info = &elf_hash_table (info)->eh_info;
   for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
     if (ent->size == 4)
@@ -1145,11 +1155,25 @@
       ent->removed = sec->map_head.s != NULL;
     else if (!ent->cie)
       {
-	cookie->rel = cookie->rels + ent->reloc_index;
-	/* FIXME: octets_per_byte.  */
-	BFD_ASSERT (cookie->rel < cookie->relend
-		    && cookie->rel->r_offset == ent->offset + 8);
-	if (!(*reloc_symbol_deleted_p) (ent->offset + 8, cookie))
+	bfd_boolean keep;
+	if ((sec->flags & SEC_LINKER_CREATED) != 0 && cookie->rels == NULL)
+	  {
+	    unsigned int width
+	      = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+	    bfd_vma value
+	      = read_value (abfd, sec->contents + ent->offset + 8 + width,
+			    width, get_DW_EH_PE_signed (ent->fde_encoding));
+	    keep = value != 0;
+	  }
+	else
+	  {
+	    cookie->rel = cookie->rels + ent->reloc_index;
+	    /* FIXME: octets_per_byte.  */
+	    BFD_ASSERT (cookie->rel < cookie->relend
+			&& cookie->rel->r_offset == ent->offset + 8);
+	    keep = !(*reloc_symbol_deleted_p) (ent->offset + 8, cookie);
+	  }
+	if (keep)
 	  {
 	    if (info->shared
 		&& (((ent->fde_encoding & 0x70) == DW_EH_PE_absptr
@@ -1178,8 +1202,6 @@
       sec_info->cies = NULL;
     }
 
-  ptr_size = (get_elf_backend_data (sec->owner)
-	      ->elf_backend_eh_frame_address_size (sec->owner, sec));
   offset = 0;
   for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
     if (!ent->removed)
@@ -1572,10 +1594,31 @@
 		  break;
 		case DW_EH_PE_datarel:
 		  {
-		    asection *got = bfd_get_section_by_name (abfd, ".got");
-
-		    BFD_ASSERT (got != NULL);
-		    address += got->vma;
+		    switch (abfd->arch_info->arch)
+		      {
+		      case bfd_arch_ia64:
+			BFD_ASSERT (elf_gp (abfd) != 0);
+			address += elf_gp (abfd);
+			break;
+		      default:
+			(*info->callbacks->einfo)
+			  (_("%P: DW_EH_PE_datarel unspecified"
+			     " for this architecture.\n"));
+			/* Fall thru */
+		      case bfd_arch_frv:
+		      case bfd_arch_i386:
+			BFD_ASSERT (htab->hgot != NULL
+				    && ((htab->hgot->root.type
+					 == bfd_link_hash_defined)
+					|| (htab->hgot->root.type
+					    == bfd_link_hash_defweak)));
+			address
+			  += (htab->hgot->root.u.def.value
+			      + htab->hgot->root.u.def.section->output_offset
+			      + (htab->hgot->root.u.def.section->output_section
+				 ->vma));
+			break;
+		      }
 		  }
 		  break;
 		case DW_EH_PE_pcrel:
@@ -1596,6 +1639,11 @@
 
 	  if (hdr_info)
 	    {
+	      /* The address calculation may overflow, giving us a
+		 value greater than 4G on a 32-bit target when
+		 dwarf_vma is 64-bit.  */
+	      if (sizeof (address) > 4 && ptr_size == 4)
+		address &= 0xffffffff;
 	      hdr_info->array[hdr_info->array_count].initial_loc = address;
 	      hdr_info->array[hdr_info->array_count++].fde
 		= (sec->output_section->vma
diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c
index 17b23c2..3ba96c7 100644
--- a/bfd/elf-ifunc.c
+++ b/bfd/elf-ifunc.c
@@ -194,25 +194,20 @@
          where it is marked with regular reference, but not non-GOT
 	 reference.  It may happen if we didn't see STT_GNU_IFUNC
 	 symbol at the time when checking relocations.  */
-      bfd_size_type count = 0;
-
       if (info->shared
 	  && !h->non_got_ref
 	  && h->ref_regular)
-	{
-	  for (p = *head; p != NULL; p = p->next)
-	    count += p->count;
-	  if (count != 0)
-	    h->non_got_ref = 1;
-	}
+	for (p = *head; p != NULL; p = p->next)
+	  if (p->count)
+	    {
+	      h->non_got_ref = 1;
+	      goto keep;
+	    }
 
-      if (count == 0)
-	{
-	  h->got = htab->init_got_offset;
-	  h->plt = htab->init_plt_offset;
-	  *head = NULL;
-	  return TRUE;
-	}
+      h->got = htab->init_got_offset;
+      h->plt = htab->init_plt_offset;
+      *head = NULL;
+      return TRUE;
     }
 
   /* Return and discard space for dynamic relocations against it if
@@ -228,6 +223,7 @@
       return TRUE;
     }
 
+keep:
   bed = get_elf_backend_data (info->output_bfd);
   if (bed->rela_plts_and_copies_p)
     sizeof_reloc = bed->s->sizeof_rela;
@@ -277,10 +273,20 @@
     *head = NULL;
 
   /* Finally, allocate space.  */
-  for (p = *head; p != NULL; p = p->next)
-    htab->irelifunc->size += p->count * sizeof_reloc;
+  p = *head;
+  if (p != NULL)
+    {
+      bfd_size_type count = 0;
+      do
+	{
+	  count += p->count;
+	  p = p->next;
+	}
+      while (p != NULL);
+      htab->irelifunc->size += count * sizeof_reloc;
+    }
 
-  /* For STT_GNU_IFUNC symbol, .got.plt has the real function addres
+  /* For STT_GNU_IFUNC symbol, .got.plt has the real function address
      and .got has the PLT entry adddress.  We will load the GOT entry
      with the PLT entry in finish_dynamic_symbol if it is used.  For
      branch, it uses .got.plt.  For symbol value,
@@ -293,9 +299,10 @@
      5. Otherwise use .got so that it can be shared among different
      objects at run-time.
      We only need to relocate .got entry in shared object.  */
-  if ((info->shared
-       && (h->dynindx == -1
-	   || h->forced_local))
+  if (h->got.refcount <= 0
+      || (info->shared
+	  && (h->dynindx == -1
+	      || h->forced_local))
       || (!info->shared
 	  && !h->pointer_equality_needed)
       || (info->executable && info->shared)
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index bdca122..8276a2f 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1,6 +1,6 @@
 /* Matsushita 10300 specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1602,9 +1602,6 @@
 
   entry = (struct elf32_mn10300_link_hash_entry *) gen_entry;
 
-  if (entry->root.root.type == bfd_link_hash_warning)
-    entry = (struct elf32_mn10300_link_hash_entry *) entry->root.root.u.i.link;
-
   /* If we already know we want to convert "call" to "calls" for calls
      to this symbol, then return now.  */
   if (entry->flags == MN10300_CONVERT_CALL_TO_CALLS)
@@ -4882,6 +4879,22 @@
     }
 }
 
+/* Allocate space for an MN10300 extension to the bfd elf data structure.  */
+
+static bfd_boolean
+mn10300_elf_mkobject (bfd *abfd)
+{
+  /* We do not actually need any extra room in the bfd elf data structure.
+     But we do need the object_id of the structure to be set to
+     MN10300_ELF_DATA so that elflink.c:elf_link_add_object_symols() will call
+     our mn10300_elf_check_relocs function which will then allocate space in
+     the .got section for any GOT based relocs.  */
+  return bfd_elf_allocate_object (abfd, sizeof (struct elf_obj_tdata),
+				  MN10300_ELF_DATA);
+}
+
+#define bfd_elf32_mkobject	mn10300_elf_mkobject
+
 #ifndef ELF_ARCH
 #define TARGET_LITTLE_SYM	bfd_elf32_mn10300_vec
 #define TARGET_LITTLE_NAME	"elf32-mn10300"
diff --git a/bfd/elf.c b/bfd/elf.c
index 92993a0..93b518d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,7 +1,7 @@
 /* ELF executable support for BFD.
 
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -822,11 +822,7 @@
   const struct elf_backend_data *bed;
 
   if (hdr->bfd_section != NULL)
-    {
-      BFD_ASSERT (strcmp (name,
-			  bfd_get_section_name (abfd, hdr->bfd_section)) == 0);
-      return TRUE;
-    }
+    return TRUE;
 
   newsect = bfd_make_section_anyway (abfd, name);
   if (newsect == NULL)
@@ -884,45 +880,25 @@
     {
       /* The debugging sections appear to be recognized only by name,
 	 not any sort of flag.  Their SEC_ALLOC bits are cleared.  */
-      static const struct
-	{
-	  const char *name;
-	  int len;
-	} debug_sections [] =
-	{
-	  { STRING_COMMA_LEN ("debug") },	/* 'd' */
-	  { NULL,		 0  },	/* 'e' */
-	  { NULL,		 0  },	/* 'f' */
-	  { STRING_COMMA_LEN ("gnu.linkonce.wi.") },	/* 'g' */
-	  { NULL,		 0  },	/* 'h' */
-	  { NULL,		 0  },	/* 'i' */
-	  { NULL,		 0  },	/* 'j' */
-	  { NULL,		 0  },	/* 'k' */
-	  { STRING_COMMA_LEN ("line") },	/* 'l' */
-	  { NULL,		 0  },	/* 'm' */
-	  { NULL,		 0  },	/* 'n' */
-	  { NULL,		 0  },	/* 'o' */
-	  { NULL,		 0  },	/* 'p' */
-	  { NULL,		 0  },	/* 'q' */
-	  { NULL,		 0  },	/* 'r' */
-	  { STRING_COMMA_LEN ("stab") },	/* 's' */
-	  { NULL,		 0  },	/* 't' */
-	  { NULL,		 0  },	/* 'u' */
-	  { NULL,		 0  },	/* 'v' */
-	  { NULL,		 0  },	/* 'w' */
-	  { NULL,		 0  },	/* 'x' */
-	  { NULL,		 0  },	/* 'y' */
-	  { STRING_COMMA_LEN ("zdebug") }	/* 'z' */
-	};
-
       if (name [0] == '.')
 	{
-	  int i = name [1] - 'd';
-	  if (i >= 0
-	      && i < (int) ARRAY_SIZE (debug_sections)
-	      && debug_sections [i].name != NULL
-	      && strncmp (&name [1], debug_sections [i].name,
-			  debug_sections [i].len) == 0)
+	  const char *p;
+	  int n;
+	  if (name[1] == 'd')
+	    p = ".debug", n = 6;
+	  else if (name[1] == 'g' && name[2] == 'n')
+	    p = ".gnu.linkonce.wi.", n = 17;
+	  else if (name[1] == 'g' && name[2] == 'd')
+	    p = ".gdb_index", n = 11; /* yes we really do mean 11.  */
+	  else if (name[1] == 'l')
+	    p = ".line", n = 5;
+	  else if (name[1] == 's')
+	    p = ".stab", n = 5;
+	  else if (name[1] == 'z')
+	    p = ".zdebug", n = 7;
+	  else
+	    p = NULL, n = 0;
+	  if (p != NULL && strncmp (name, p, n) == 0)
 	    flags |= SEC_DEBUGGING;
 	}
     }
@@ -980,7 +956,9 @@
       phdr = elf_tdata (abfd)->phdr;
       for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)
 	{
-	  if (phdr->p_type == PT_LOAD
+	  if (((phdr->p_type == PT_LOAD
+		&& (hdr->sh_flags & SHF_TLS) == 0)
+	       || phdr->p_type == PT_TLS)
 	      && ELF_SECTION_IN_SEGMENT (hdr, phdr))
 	    {
 	      if ((flags & SEC_LOAD) == 0)
@@ -1016,6 +994,7 @@
 	  || (name[1] == 'z' && name[7] == '_')))
     {
       enum { nothing, compress, decompress } action = nothing;
+      char *new_name;
 
       if (bfd_is_section_compressed (abfd, newsect))
 	{
@@ -1030,6 +1009,7 @@
 	    action = compress;
 	}
 
+      new_name = NULL;
       switch (action)
 	{
 	case nothing:
@@ -1042,6 +1022,17 @@
 		 abfd, name);
 	      return FALSE;
 	    }
+	  if (name[1] != 'z')
+	    {
+	      unsigned int len = strlen (name);
+
+	      new_name = bfd_alloc (abfd, len + 2);
+	      if (new_name == NULL)
+		return FALSE;
+	      new_name[0] = '.';
+	      new_name[1] = 'z';
+	      memcpy (new_name + 2, name + 1, len);
+	    }
 	  break;
 	case decompress:
 	  if (!bfd_init_section_decompress_status (abfd, newsect))
@@ -1051,8 +1042,20 @@
 		 abfd, name);
 	      return FALSE;
 	    }
+	  if (name[1] == 'z')
+	    {
+	      unsigned int len = strlen (name);
+
+	      new_name = bfd_alloc (abfd, len);
+	      if (new_name == NULL)
+		return FALSE;
+	      new_name[0] = '.';
+	      memcpy (new_name + 1, name + 2, len - 1);
+	    }
 	  break;
 	}
+      if (new_name != NULL)
+	bfd_rename_section (abfd, newsect, new_name);
     }
 
   return TRUE;
@@ -2061,6 +2064,7 @@
 static const struct bfd_elf_special_section special_sections_g[] =
 {
   { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS,      SHF_ALLOC + SHF_WRITE },
+  { STRING_COMMA_LEN (".gnu.lto_"),       -1, SHT_PROGBITS,    SHF_EXCLUDE },
   { STRING_COMMA_LEN (".got"),             0, SHT_PROGBITS,    SHF_ALLOC + SHF_WRITE },
   { STRING_COMMA_LEN (".gnu.version"),     0, SHT_GNU_versym,  0 },
   { STRING_COMMA_LEN (".gnu.version_d"),   0, SHT_GNU_verdef,  0 },
@@ -2142,7 +2146,7 @@
   { NULL,                     0,  0, 0,            0 }
 };
 
-static const struct bfd_elf_special_section *special_sections[] =
+static const struct bfd_elf_special_section * const special_sections[] =
 {
   special_sections_b,		/* 'b' */
   special_sections_c,		/* 'c' */
@@ -2282,12 +2286,19 @@
      anyway.  We will set ELF section type and flags for all linker
      created sections.  If user specifies BFD section flags, we will
      set ELF section type and flags based on BFD section flags in
-     elf_fake_sections.  */
-  if ((!sec->flags && abfd->direction != read_direction)
+     elf_fake_sections.  Special handling for .init_array/.fini_array
+     output sections since they may contain .ctors/.dtors input
+     sections.  We don't want _bfd_elf_init_private_section_data to
+     copy ELF section type from .ctors/.dtors input sections.  */
+  if (abfd->direction != read_direction
       || (sec->flags & SEC_LINKER_CREATED) != 0)
     {
       ssect = (*bed->get_sec_type_attr) (abfd, sec);
-      if (ssect != NULL)
+      if (ssect != NULL
+	  && (!sec->flags
+	      || (sec->flags & SEC_LINKER_CREATED) != 0
+	      || ssect->type == SHT_INIT_ARRAY
+	      || ssect->type == SHT_FINI_ARRAY))
 	{
 	  elf_section_type (sec) = ssect->type;
 	  elf_section_flags (sec) = ssect->attr;
@@ -3958,8 +3969,12 @@
 	  phdr_in_segment = FALSE;
 	}
 
-      /* Create a final PT_LOAD program segment.  */
-      if (last_hdr != NULL)
+      /* Create a final PT_LOAD program segment, but not if it's just
+	 for .tbss.  */
+      if (last_hdr != NULL
+	  && (i - phdr_index != 1
+	      || ((last_hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
+		  != SEC_THREAD_LOCAL)))
 	{
 	  m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
 	  if (m == NULL)
@@ -4251,10 +4266,12 @@
 		  (unsigned int) m->p_type);
       pt = buf;
     }
+  fflush (stdout);
   fprintf (stderr, "%s:", pt);
   for (j = 0; j < m->count; j++)
     fprintf (stderr, " %s", m->sections [j]->name);
   putc ('\n',stderr);
+  fflush (stderr);
 }
 
 static bfd_boolean
@@ -4303,8 +4320,18 @@
 	header_pad = m->header_size;
     }
 
-  elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
-  elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
+  if (alloc)
+    {
+      elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
+      elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
+    }
+  else
+    {
+      /* PR binutils/12467.  */
+      elf_elfheader (abfd)->e_phoff = 0;
+      elf_elfheader (abfd)->e_phentsize = 0;
+    }
+  
   elf_elfheader (abfd)->e_phnum = alloc;
 
   if (elf_tdata (abfd)->program_header_size == (bfd_size_type) -1)
@@ -4643,6 +4670,21 @@
 		  if (this_hdr->sh_type != SHT_NOBITS)
 		    off += this_hdr->sh_size;
 		}
+	      else if (this_hdr->sh_type == SHT_NOBITS
+		       && (this_hdr->sh_flags & SHF_TLS) != 0
+		       && this_hdr->sh_offset == 0)
+		{
+		  /* This is a .tbss section that didn't get a PT_LOAD.
+		     (See _bfd_elf_map_sections_to_segments "Create a
+		     final PT_LOAD".)  Set sh_offset to the value it
+		     would have if we had created a zero p_filesz and
+		     p_memsz PT_LOAD header for the section.  This
+		     also makes the PT_TLS header have the same
+		     p_offset value.  */
+		  bfd_vma adjust = vma_page_aligned_bias (this_hdr->sh_addr,
+							  off, align);
+		  this_hdr->sh_offset = sec->filepos = off + adjust;
+		}
 
 	      if (this_hdr->sh_type != SHT_NOBITS)
 		{
@@ -4707,7 +4749,8 @@
 
 	      sec = m->sections[i];
 	      this_hdr = &(elf_section_data(sec)->this_hdr);
-	      if (!ELF_SECTION_IN_SEGMENT_1 (this_hdr, p, check_vma, 0))
+	      if (!ELF_SECTION_IN_SEGMENT_1 (this_hdr, p, check_vma, 0)
+		  && !ELF_TBSS_SPECIAL (this_hdr, p))
 		{
 		  (*_bfd_error_handler)
 		    (_("%B: section `%A' can't be allocated in segment %d"),
@@ -4884,17 +4927,21 @@
 	      && (p->p_type != PT_NOTE
 		  || bfd_get_format (abfd) != bfd_core))
 	    {
-	      Elf_Internal_Shdr *hdr;
-	      asection *sect;
-
 	      BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
 
-	      sect = m->sections[m->count - 1];
-	      hdr = &elf_section_data (sect)->this_hdr;
-	      p->p_filesz = sect->filepos - m->sections[0]->filepos;
-	      if (hdr->sh_type != SHT_NOBITS)
-		p->p_filesz += hdr->sh_size;
+	      p->p_filesz = 0;
 	      p->p_offset = m->sections[0]->filepos;
+	      for (i = m->count; i-- != 0;)
+		{
+		  asection *sect = m->sections[i];
+		  Elf_Internal_Shdr *hdr = &elf_section_data (sect)->this_hdr;
+		  if (hdr->sh_type != SHT_NOBITS)
+		    {
+		      p->p_filesz = (sect->filepos - m->sections[0]->filepos
+				     + hdr->sh_size);
+		      break;
+		    }
+		}
 	    }
 	}
       else if (m->includes_filehdr)
@@ -6213,6 +6260,8 @@
       || obfd->xvec->flavour != bfd_target_elf_flavour)
     return TRUE;
 
+  BFD_ASSERT (elf_section_data (osec) != NULL);
+
   /* For objcopy and relocatable link, don't copy the output ELF
      section type from input if the output BFD section flags have been
      set to something different.  For a final link allow some flags
@@ -6507,6 +6556,7 @@
     sym.st_info = 0;
     sym.st_other = 0;
     sym.st_shndx = SHN_UNDEF;
+    sym.st_target_internal = 0;
     bed->s->swap_symbol_out (abfd, &sym, outbound_syms, outbound_shndx);
     outbound_syms += bed->s->sizeof_sym;
     if (outbound_shndx != NULL)
@@ -6706,9 +6756,16 @@
 	}
 
       if (type_ptr != NULL)
-	sym.st_other = type_ptr->internal_elf_sym.st_other;
+	{
+	  sym.st_other = type_ptr->internal_elf_sym.st_other;
+	  sym.st_target_internal
+	    = type_ptr->internal_elf_sym.st_target_internal;
+	}
       else
-	sym.st_other = 0;
+	{
+	  sym.st_other = 0;
+	  sym.st_target_internal = 0;
+	}
 
       bed->s->swap_symbol_out (abfd, &sym, outbound_syms, outbound_shndx);
       outbound_syms += bed->s->sizeof_sym;
@@ -7307,62 +7364,74 @@
 		   const char **filename_ptr,
 		   const char **functionname_ptr)
 {
-  const char *filename;
-  asymbol *func, *file;
-  bfd_vma low_func;
-  asymbol **p;
-  /* ??? Given multiple file symbols, it is impossible to reliably
-     choose the right file name for global symbols.  File symbols are
-     local symbols, and thus all file symbols must sort before any
-     global symbols.  The ELF spec may be interpreted to say that a
-     file symbol must sort before other local symbols, but currently
-     ld -r doesn't do this.  So, for ld -r output, it is possible to
-     make a better choice of file name for local symbols by ignoring
-     file symbols appearing after a given local symbol.  */
-  enum { nothing_seen, symbol_seen, file_after_symbol_seen } state;
-  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  static asection *last_section;
+  static asymbol *func;
+  static const char *filename;
+  static bfd_size_type func_size;
 
-  filename = NULL;
-  func = NULL;
-  file = NULL;
-  low_func = 0;
-  state = nothing_seen;
+  if (symbols == NULL)
+    return FALSE;
 
-  for (p = symbols; *p != NULL; p++)
+  if (last_section != section
+      || func == NULL
+      || offset < func->value
+      || offset >= func->value + func_size)
     {
-      elf_symbol_type *q;
-      unsigned int type;
+      asymbol *file;
+      bfd_vma low_func;
+      asymbol **p;
+      /* ??? Given multiple file symbols, it is impossible to reliably
+	 choose the right file name for global symbols.  File symbols are
+	 local symbols, and thus all file symbols must sort before any
+	 global symbols.  The ELF spec may be interpreted to say that a
+	 file symbol must sort before other local symbols, but currently
+	 ld -r doesn't do this.  So, for ld -r output, it is possible to
+	 make a better choice of file name for local symbols by ignoring
+	 file symbols appearing after a given local symbol.  */
+      enum { nothing_seen, symbol_seen, file_after_symbol_seen } state;
+      const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
-      q = (elf_symbol_type *) *p;
+      filename = NULL;
+      func = NULL;
+      file = NULL;
+      low_func = 0;
+      state = nothing_seen;
+      func_size = 0;
+      last_section = section;
 
-      type = ELF_ST_TYPE (q->internal_elf_sym.st_info);
-      switch (type)
+      for (p = symbols; *p != NULL; p++)
 	{
-	case STT_FILE:
-	  file = &q->symbol;
-	  if (state == symbol_seen)
-	    state = file_after_symbol_seen;
-	  continue;
-	default:
-	  if (!bed->is_function_type (type))
-	    break;
-	case STT_NOTYPE:
-	  if (bfd_get_section (&q->symbol) == section
-	      && q->symbol.value >= low_func
-	      && q->symbol.value <= offset)
+	  asymbol *sym = *p;
+	  bfd_vma code_off;
+	  bfd_size_type size;
+
+	  if ((sym->flags & BSF_FILE) != 0)
 	    {
-	      func = (asymbol *) q;
-	      low_func = q->symbol.value;
+	      file = sym;
+	      if (state == symbol_seen)
+		state = file_after_symbol_seen;
+	      continue;
+	    }
+
+	  size = bed->maybe_function_sym (sym, section, &code_off);
+	  if (size != 0
+	      && code_off <= offset
+	      && (code_off > low_func
+		  || (code_off == low_func
+		      && size > func_size)))
+	    {
+	      func = sym;
+	      func_size = size;
+	      low_func = code_off;
 	      filename = NULL;
 	      if (file != NULL
-		  && (ELF_ST_BIND (q->internal_elf_sym.st_info) == STB_LOCAL
+		  && ((sym->flags & BSF_LOCAL) != 0
 		      || state != file_after_symbol_seen))
 		filename = bfd_asymbol_name (file);
 	    }
-	  break;
+	  if (state == nothing_seen)
+	    state = symbol_seen;
 	}
-      if (state == nothing_seen)
-	state = symbol_seen;
     }
 
   if (func == NULL)
@@ -7388,6 +7457,23 @@
 			    const char **functionname_ptr,
 			    unsigned int *line_ptr)
 {
+  return _bfd_elf_find_nearest_line_discriminator (abfd, section, symbols,
+                                                   offset, filename_ptr,
+                                                   functionname_ptr,
+                                                   line_ptr,
+                                                   NULL);
+}
+
+bfd_boolean
+_bfd_elf_find_nearest_line_discriminator (bfd *abfd,
+                                          asection *section,
+                                          asymbol **symbols,
+                                          bfd_vma offset,
+                                          const char **filename_ptr,
+                                          const char **functionname_ptr,
+                                          unsigned int *line_ptr,
+                                          unsigned int *discriminator_ptr)
+{
   bfd_boolean found;
 
   if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
@@ -7404,7 +7490,7 @@
 
   if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
 				     filename_ptr, functionname_ptr,
-				     line_ptr, 0,
+				     line_ptr, discriminator_ptr, 0,
 				     &elf_tdata (abfd)->dwarf2_find_line_info))
     {
       if (!*functionname_ptr)
@@ -7440,8 +7526,19 @@
 _bfd_elf_find_line (bfd *abfd, asymbol **symbols, asymbol *symbol,
 		    const char **filename_ptr, unsigned int *line_ptr)
 {
+  return _bfd_elf_find_line_discriminator (abfd, symbols, symbol,
+		                           filename_ptr, line_ptr,
+                                           NULL);
+}
+
+bfd_boolean
+_bfd_elf_find_line_discriminator (bfd *abfd, asymbol **symbols, asymbol *symbol,
+                                  const char **filename_ptr,
+                                  unsigned int *line_ptr,
+                                  unsigned int *discriminator_ptr)
+{
   return _bfd_dwarf2_find_line (abfd, symbols, symbol,
-				filename_ptr, line_ptr, 0,
+				filename_ptr, line_ptr, discriminator_ptr, 0,
 				&elf_tdata (abfd)->dwarf2_find_line_info);
 }
 
@@ -7907,6 +8004,12 @@
   return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note);
 }
 
+static bfd_boolean
+elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)		/* Sparc64 cross Sparc32 */
@@ -7957,6 +8060,9 @@
 
       memcpy (&psinfo, note->descdata, sizeof (psinfo));
 
+#if defined (HAVE_PSINFO_T_PR_PID) || defined (HAVE_PRPSINFO_T_PR_PID)
+      elf_tdata (abfd)->core_pid = psinfo.pr_pid;
+#endif
       elf_tdata (abfd)->core_program
 	= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
 				sizeof (psinfo.pr_fname));
@@ -7973,6 +8079,9 @@
 
       memcpy (&psinfo, note->descdata, sizeof (psinfo));
 
+#if defined (HAVE_PSINFO32_T_PR_PID) || defined (HAVE_PRPSINFO32_T_PR_PID)
+      elf_tdata (abfd)->core_pid = psinfo.pr_pid;
+#endif
       elf_tdata (abfd)->core_program
 	= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
 				sizeof (psinfo.pr_fname));
@@ -8320,6 +8429,13 @@
       else
         return TRUE;
 
+    case NT_ARM_VFP:
+      if (note->namesz == 6
+	  && strcmp (note->namedata, "LINUX") == 0)
+	return elfcore_grok_arm_vfp (abfd, note);
+      else
+	return TRUE;
+
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
@@ -8374,6 +8490,35 @@
 }
 
 static bfd_boolean
+elfobj_grok_stapsdt_note_1 (bfd *abfd, Elf_Internal_Note *note)
+{
+  struct sdt_note *cur =
+    (struct sdt_note *) bfd_alloc (abfd, sizeof (struct sdt_note)
+				   + note->descsz);
+
+  cur->next = (struct sdt_note *) (elf_tdata (abfd))->sdt_note_head;
+  cur->size = (bfd_size_type) note->descsz;
+  memcpy (cur->data, note->descdata, note->descsz);
+
+  elf_tdata (abfd)->sdt_note_head = cur;
+
+  return TRUE;
+}
+
+static bfd_boolean
+elfobj_grok_stapsdt_note (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note->type)
+    {
+    case NT_STAPSDT:
+      return elfobj_grok_stapsdt_note_1 (abfd, note);
+
+    default:
+      return TRUE;
+    }
+}
+
+static bfd_boolean
 elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp)
 {
   char *cp;
@@ -9045,6 +9190,18 @@
 }
 
 char *
+elfcore_write_arm_vfp (bfd *abfd,
+		       char *buf,
+		       int *bufsiz,
+		       const void *arm_vfp,
+		       int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+			     note_name, NT_ARM_VFP, arm_vfp, size);
+}
+
+char *
 elfcore_write_register_note (bfd *abfd,
 			     char *buf,
 			     int *bufsiz,
@@ -9074,6 +9231,8 @@
     return elfcore_write_s390_ctrs (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-s390-prefix") == 0)
     return elfcore_write_s390_prefix (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-arm-vfp") == 0)
+    return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
@@ -9146,6 +9305,12 @@
 	      if (! elfobj_grok_gnu_note (abfd, &in))
 		return FALSE;
 	    }
+	  else if (in.namesz == sizeof "stapsdt"
+		   && strcmp (in.namedata, "stapsdt") == 0)
+	    {
+	      if (! elfobj_grok_stapsdt_note (abfd, &in))
+		return FALSE;
+	    }
 	  break;
 	}
 
@@ -9301,6 +9466,12 @@
     case ELF_INFO_TYPE_EH_FRAME:
       return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
     default:
+      if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0)
+	{
+	  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+	  bfd_size_type address_size = bed->s->arch_size / 8;
+	  offset = sec->size - offset - address_size;
+	}
       return offset;
     }
 }
@@ -9462,11 +9633,11 @@
   i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
 
   /* To make things simpler for the loader on Linux systems we set the
-     osabi field to ELFOSABI_LINUX if the binary contains symbols of
-     the STT_GNU_IFUNC type.  */
+     osabi field to ELFOSABI_GNU if the binary contains symbols of
+     the STT_GNU_IFUNC type or STB_GNU_UNIQUE binding.  */
   if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_NONE
-      && elf_tdata (abfd)->has_ifunc_symbols)
-    i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
+      && elf_tdata (abfd)->has_gnu_symbols)
+    i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_GNU;
 }
 
 
@@ -9480,3 +9651,27 @@
   return (type == STT_FUNC
 	  || type == STT_GNU_IFUNC);
 }
+
+/* If the ELF symbol SYM might be a function in SEC, return the
+   function size and set *CODE_OFF to the function's entry point,
+   otherwise return zero.  */
+
+bfd_size_type
+_bfd_elf_maybe_function_sym (const asymbol *sym, asection *sec,
+			     bfd_vma *code_off)
+{
+  bfd_size_type size;
+
+  if ((sym->flags & (BSF_SECTION_SYM | BSF_FILE | BSF_OBJECT
+		     | BSF_THREAD_LOCAL | BSF_RELC | BSF_SRELC)) != 0
+      || sym->section != sec)
+    return 0;
+
+  *code_off = sym->value;
+  size = 0;
+  if (!(sym->flags & BSF_SYNTHETIC))
+    size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size;
+  if (size == 0)
+    size = 1;
+  return size;
+}
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index a732e80..8eb6741 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,6 @@
 /* 32-bit ELF support for ARM
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010  Free Software Foundation, Inc.
+   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -229,8 +229,8 @@
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_ARM_THM_CALL",	/* name */
 	 FALSE,			/* partial_inplace */
-	 0x07ff07ff,		/* src_mask */
-	 0x07ff07ff,		/* dst_mask */
+	 0x07ff2fff,		/* src_mask */
+	 0x07ff2fff,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
 
   HOWTO (R_ARM_THM_PC8,	        /* type */
@@ -261,18 +261,18 @@
 	 0xffffffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
-  HOWTO (R_ARM_SWI24,		/* type */
+  HOWTO (R_ARM_TLS_DESC,	/* type */
 	 0,			/* rightshift */
-	 0,			/* size (0 = byte, 1 = short, 2 = long) */
-	 0,			/* bitsize */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
 	 FALSE,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_signed,/* complain_on_overflow */
+	 complain_overflow_bitfield,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_ARM_SWI24",		/* name */
+	 "R_ARM_TLS_DESC",	/* name */
 	 FALSE,			/* partial_inplace */
-	 0x00000000,		/* src_mask */
-	 0x00000000,		/* dst_mask */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
   HOWTO (R_ARM_THM_SWI8,	/* type */
@@ -293,7 +293,7 @@
   HOWTO (R_ARM_XPC25,		/* type */
 	 2,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 25,			/* bitsize */
+	 24,			/* bitsize */
 	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed,/* complain_on_overflow */
@@ -308,15 +308,15 @@
   HOWTO (R_ARM_THM_XPC22,	/* type */
 	 2,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 22,			/* bitsize */
+	 24,			/* bitsize */
 	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_ARM_THM_XPC22",	/* name */
 	 FALSE,			/* partial_inplace */
-	 0x07ff07ff,		/* src_mask */
-	 0x07ff07ff,		/* dst_mask */
+	 0x07ff2fff,		/* src_mask */
+	 0x07ff2fff,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
 
   /* Dynamic TLS relocations.  */
@@ -1352,10 +1352,61 @@
 	 0x040f70ff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
-  EMPTY_HOWTO (90),   /* Unallocated.  */
-  EMPTY_HOWTO (91),
-  EMPTY_HOWTO (92),
-  EMPTY_HOWTO (93),
+  HOWTO (R_ARM_TLS_GOTDESC,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield,/* complain_on_overflow */
+	 NULL,			/* special_function */
+	 "R_ARM_TLS_GOTDESC",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_ARM_TLS_CALL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 24,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_ARM_TLS_CALL",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x00ffffff,		/* src_mask */
+	 0x00ffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_ARM_TLS_DESCSEQ,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_ARM_TLS_DESCSEQ",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x00000000,		/* src_mask */
+	 0x00000000,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_ARM_THM_TLS_CALL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 24,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_ARM_THM_TLS_CALL",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x07ff07ff,		/* src_mask */
+	 0x07ff07ff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
 
   HOWTO (R_ARM_PLT32_ABS,	/* type */
 	 0,			/* rightshift */
@@ -1599,15 +1650,63 @@
 	 0x00000fff,		/* src_mask */
 	 0x00000fff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
+
+  /* 112-127 private relocations.  */
+  EMPTY_HOWTO (112),
+  EMPTY_HOWTO (113),
+  EMPTY_HOWTO (114),
+  EMPTY_HOWTO (115),
+  EMPTY_HOWTO (116),
+  EMPTY_HOWTO (117),
+  EMPTY_HOWTO (118),
+  EMPTY_HOWTO (119),
+  EMPTY_HOWTO (120),
+  EMPTY_HOWTO (121),
+  EMPTY_HOWTO (122),
+  EMPTY_HOWTO (123),
+  EMPTY_HOWTO (124),
+  EMPTY_HOWTO (125),
+  EMPTY_HOWTO (126),
+  EMPTY_HOWTO (127),
+
+  /* R_ARM_ME_TOO, obsolete.  */
+  EMPTY_HOWTO (128),
+
+  HOWTO (R_ARM_THM_TLS_DESCSEQ,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_ARM_THM_TLS_DESCSEQ",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x00000000,		/* src_mask */
+	 0x00000000,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
 };
 
-/* 112-127 private relocations
-   128 R_ARM_ME_TOO, obsolete
-   129-255 unallocated in AAELF.
+/* 160 onwards: */
+static reloc_howto_type elf32_arm_howto_table_2[1] =
+{
+  HOWTO (R_ARM_IRELATIVE,	/* type */
+         0,                     /* rightshift */
+         2,                     /* size (0 = byte, 1 = short, 2 = long) */
+         32,                    /* bitsize */
+         FALSE,                 /* pc_relative */
+         0,                     /* bitpos */
+         complain_overflow_bitfield,/* complain_on_overflow */
+         bfd_elf_generic_reloc, /* special_function */
+         "R_ARM_IRELATIVE",	/* name */
+         TRUE,			/* partial_inplace */
+         0xffffffff,		/* src_mask */
+         0xffffffff,		/* dst_mask */
+         FALSE)			/* pcrel_offset */
+};
 
-   249-255 extended, currently unused, relocations:  */
-
-static reloc_howto_type elf32_arm_howto_table_2[4] =
+/* 249-255 extended, currently unused, relocations:  */
+static reloc_howto_type elf32_arm_howto_table_3[4] =
 {
   HOWTO (R_ARM_RREL32,		/* type */
 	 0,			/* rightshift */
@@ -1672,9 +1771,12 @@
   if (r_type < ARRAY_SIZE (elf32_arm_howto_table_1))
     return &elf32_arm_howto_table_1[r_type];
 
+  if (r_type == R_ARM_IRELATIVE)
+    return &elf32_arm_howto_table_2[r_type - R_ARM_IRELATIVE];
+
   if (r_type >= R_ARM_RREL32
-      && r_type < R_ARM_RREL32 + ARRAY_SIZE (elf32_arm_howto_table_2))
-    return &elf32_arm_howto_table_2[r_type - R_ARM_RREL32];
+      && r_type < R_ARM_RREL32 + ARRAY_SIZE (elf32_arm_howto_table_3))
+    return &elf32_arm_howto_table_3[r_type - R_ARM_RREL32];
 
   return NULL;
 }
@@ -1730,6 +1832,12 @@
     {BFD_RELOC_ARM_PREL31,	     R_ARM_PREL31},
     {BFD_RELOC_ARM_TARGET2,	     R_ARM_TARGET2},
     {BFD_RELOC_ARM_PLT32,            R_ARM_PLT32},
+    {BFD_RELOC_ARM_TLS_GOTDESC,      R_ARM_TLS_GOTDESC},
+    {BFD_RELOC_ARM_TLS_CALL,         R_ARM_TLS_CALL},
+    {BFD_RELOC_ARM_THM_TLS_CALL,     R_ARM_THM_TLS_CALL},
+    {BFD_RELOC_ARM_TLS_DESCSEQ,      R_ARM_TLS_DESCSEQ},
+    {BFD_RELOC_ARM_THM_TLS_DESCSEQ,  R_ARM_THM_TLS_DESCSEQ},
+    {BFD_RELOC_ARM_TLS_DESC,         R_ARM_TLS_DESC},
     {BFD_RELOC_ARM_TLS_GD32,	     R_ARM_TLS_GD32},
     {BFD_RELOC_ARM_TLS_LDO32,	     R_ARM_TLS_LDO32},
     {BFD_RELOC_ARM_TLS_LDM32,	     R_ARM_TLS_LDM32},
@@ -1738,6 +1846,7 @@
     {BFD_RELOC_ARM_TLS_TPOFF32,      R_ARM_TLS_TPOFF32},
     {BFD_RELOC_ARM_TLS_IE32,         R_ARM_TLS_IE32},
     {BFD_RELOC_ARM_TLS_LE32,         R_ARM_TLS_LE32},
+    {BFD_RELOC_ARM_IRELATIVE,        R_ARM_IRELATIVE},
     {BFD_RELOC_VTABLE_INHERIT,	     R_ARM_GNU_VTINHERIT},
     {BFD_RELOC_VTABLE_ENTRY,	     R_ARM_GNU_VTENTRY},
     {BFD_RELOC_ARM_MOVW,	     R_ARM_MOVW_ABS_NC},
@@ -1808,6 +1917,11 @@
 	&& strcasecmp (elf32_arm_howto_table_2[i].name, r_name) == 0)
       return &elf32_arm_howto_table_2[i];
 
+  for (i = 0; i < ARRAY_SIZE (elf32_arm_howto_table_3); i++)
+    if (elf32_arm_howto_table_3[i].name != NULL
+	&& strcasecmp (elf32_arm_howto_table_3[i].name, r_name) == 0)
+      return &elf32_arm_howto_table_3[i];
+
   return NULL;
 }
 
@@ -1912,6 +2026,26 @@
    section.  */
 #define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
 
+static const unsigned long tls_trampoline [] =
+  {
+    0xe08e0000,		/* add r0, lr, r0 */
+    0xe5901004,		/* ldr r1, [r0,#4] */
+    0xe12fff11,		/* bx  r1 */
+  };
+
+static const unsigned long dl_tlsdesc_lazy_trampoline [] =
+  {
+    0xe52d2004, /*	push    {r2}			*/
+    0xe59f200c, /*      ldr     r2, [pc, #3f - . - 8]	*/
+    0xe59f100c, /*      ldr     r1, [pc, #4f - . - 8]	*/
+    0xe79f2002, /* 1:   ldr     r2, [pc, r2]		*/
+    0xe081100f, /* 2:   add     r1, pc			*/
+    0xe12fff12, /*      bx      r2			*/
+    0x00000014, /* 3:   .word  _GLOBAL_OFFSET_TABLE_ - 1b - 8
+		   		+ dl_tlsdesc_lazy_resolver(GOT)   */
+    0x00000018, /* 4:   .word  _GLOBAL_OFFSET_TABLE_ - 2b - 8 */ 
+  };
+
 #ifdef FOUR_WORD_PLT
 
 /* The first entry in a procedure linkage table looks like
@@ -2167,6 +2301,26 @@
     DATA_WORD(0, R_ARM_REL32, 0),     /* dcd  R_ARM_REL32(X) */
   };
 
+/* Thumb2/ARM -> TLS trampoline.  Lowest common denominator, which is a
+   long PIC stub.  We can use r1 as a scratch -- and cannot use ip.  */
+static const insn_sequence elf32_arm_stub_long_branch_any_tls_pic[] =
+{
+    ARM_INSN(0xe59f1000),             /* ldr   r1, [pc] */
+    ARM_INSN(0xe08ff001),             /* add   pc, pc, r1 */
+    DATA_WORD(0, R_ARM_REL32, -4),    /* dcd   R_ARM_REL32(X-4) */
+};
+
+/* V4T Thumb -> TLS trampoline.  lowest common denominator, which is a
+   long PIC stub.  We can use r1 as a scratch -- and cannot use ip.  */
+static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_tls_pic[] =
+{
+    THUMB16_INSN(0x4778),             /* bx   pc */
+    THUMB16_INSN(0x46c0),             /* nop */
+    ARM_INSN(0xe59f1000),             /* ldr  r1, [pc, #0] */
+    ARM_INSN(0xe081f00f),             /* add  pc, r1, pc */
+    DATA_WORD(0, R_ARM_REL32, -4),    /* dcd  R_ARM_REL32(X) */
+};
+
 /* Cortex-A8 erratum-workaround stubs.  */
 
 /* Stub used for conditional branches (which may be beyond +/-1MB away, so we
@@ -2218,6 +2372,8 @@
   DEF_STUB(long_branch_v4t_arm_thumb_pic) \
   DEF_STUB(long_branch_v4t_thumb_arm_pic) \
   DEF_STUB(long_branch_thumb_only_pic) \
+  DEF_STUB(long_branch_any_tls_pic) \
+  DEF_STUB(long_branch_v4t_thumb_tls_pic) \
   DEF_STUB(a8_veneer_b_cond) \
   DEF_STUB(a8_veneer_b) \
   DEF_STUB(a8_veneer_bl) \
@@ -2279,8 +2435,8 @@
   /* The symbol table entry, if any, that this was derived from.  */
   struct elf32_arm_link_hash_entry *h;
 
-  /* Destination symbol type (STT_ARM_TFUNC, ...) */
-  unsigned char st_type;
+  /* Type of branch.  */
+  enum arm_st_branch_type branch_type;
 
   /* Where this stub is being called from, or, in the case of combined
      stub sections, the first input section in the group.  */
@@ -2400,7 +2556,7 @@
   unsigned long orig_insn;
   char *stub_name;
   enum elf32_arm_stub_type stub_type;
-  int st_type;
+  enum arm_st_branch_type branch_type;
 };
 
 /* A table of relocs applied to branches which might trigger Cortex-A8
@@ -2412,13 +2568,51 @@
   struct elf32_arm_link_hash_entry *hash;
   const char *sym_name;
   unsigned int r_type;
-  unsigned char st_type;
+  enum arm_st_branch_type branch_type;
   bfd_boolean non_a8_stub;
 };
 
 /* The size of the thread control block.  */
 #define TCB_SIZE	8
 
+/* ARM-specific information about a PLT entry, over and above the usual
+   gotplt_union.  */
+struct arm_plt_info {
+  /* We reference count Thumb references to a PLT entry separately,
+     so that we can emit the Thumb trampoline only if needed.  */
+  bfd_signed_vma thumb_refcount;
+
+  /* Some references from Thumb code may be eliminated by BL->BLX
+     conversion, so record them separately.  */
+  bfd_signed_vma maybe_thumb_refcount;
+
+  /* How many of the recorded PLT accesses were from non-call relocations.
+     This information is useful when deciding whether anything takes the
+     address of an STT_GNU_IFUNC PLT.  A value of 0 means that all
+     non-call references to the function should resolve directly to the
+     real runtime target.  */
+  unsigned int noncall_refcount;
+
+  /* Since PLT entries have variable size if the Thumb prologue is
+     used, we need to record the index into .got.plt instead of
+     recomputing it from the PLT offset.  */
+  bfd_signed_vma got_offset;
+};
+
+/* Information about an .iplt entry for a local STT_GNU_IFUNC symbol.  */
+struct arm_local_iplt_info {
+  /* The information that is usually found in the generic ELF part of
+     the hash table entry.  */
+  union gotplt_union root;
+
+  /* The information that is usually found in the ARM-specific part of
+     the hash table entry.  */
+  struct arm_plt_info arm;
+
+  /* A list of all potential dynamic relocations against this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+};
+
 struct elf_arm_obj_tdata
 {
   struct elf_obj_tdata root;
@@ -2426,6 +2620,12 @@
   /* tls_type for each local got entry.  */
   char *local_got_tls_type;
 
+  /* GOTPLT entries for TLS descriptors.  */
+  bfd_vma *local_tlsdesc_gotent;
+
+  /* Information for local symbols that need entries in .iplt.  */
+  struct arm_local_iplt_info **local_iplt;
+
   /* Zero to warn when linking objects with incompatible enum sizes.  */
   int no_enum_size_warning;
 
@@ -2439,6 +2639,12 @@
 #define elf32_arm_local_got_tls_type(bfd) \
   (elf_arm_tdata (bfd)->local_got_tls_type)
 
+#define elf32_arm_local_tlsdesc_gotent(bfd) \
+  (elf_arm_tdata (bfd)->local_tlsdesc_gotent)
+
+#define elf32_arm_local_iplt(bfd) \
+  (elf_arm_tdata (bfd)->local_iplt)
+
 #define is_arm_elf(bfd) \
   (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
    && elf_tdata (bfd) != NULL \
@@ -2451,26 +2657,6 @@
 				  ARM_ELF_DATA);
 }
 
-/* The ARM linker needs to keep track of the number of relocs that it
-   decides to copy in check_relocs for each symbol.  This is so that
-   it can discard PC relative relocs if it doesn't need them when
-   linking with -Bsymbolic.  We store the information in a field
-   extending the regular ELF linker hash table.  */
-
-/* This structure keeps track of the number of relocs we have copied
-   for a given symbol.  */
-struct elf32_arm_relocs_copied
-  {
-    /* Next section.  */
-    struct elf32_arm_relocs_copied * next;
-    /* A section in dynobj.  */
-    asection * section;
-    /* Number of relocs copied in this section.  */
-    bfd_size_type count;
-    /* Number of PC-relative relocs copied in this section.  */
-    bfd_size_type pc_count;
-  };
-
 #define elf32_arm_hash_entry(ent) ((struct elf32_arm_link_hash_entry *)(ent))
 
 /* Arm ELF linker hash entry.  */
@@ -2478,27 +2664,28 @@
   {
     struct elf_link_hash_entry root;
 
-    /* Number of PC relative relocs copied for this symbol.  */
-    struct elf32_arm_relocs_copied * relocs_copied;
+    /* Track dynamic relocs copied for this symbol.  */
+    struct elf_dyn_relocs *dyn_relocs;
 
-    /* We reference count Thumb references to a PLT entry separately,
-       so that we can emit the Thumb trampoline only if needed.  */
-    bfd_signed_vma plt_thumb_refcount;
-
-    /* Some references from Thumb code may be eliminated by BL->BLX
-       conversion, so record them separately.  */
-    bfd_signed_vma plt_maybe_thumb_refcount;
-
-    /* Since PLT entries have variable size if the Thumb prologue is
-       used, we need to record the index into .got.plt instead of
-       recomputing it from the PLT offset.  */
-    bfd_signed_vma plt_got_offset;
+    /* ARM-specific PLT information.  */
+    struct arm_plt_info plt;
 
 #define GOT_UNKNOWN	0
 #define GOT_NORMAL	1
 #define GOT_TLS_GD	2
 #define GOT_TLS_IE	4
-    unsigned char tls_type;
+#define GOT_TLS_GDESC	8
+#define GOT_TLS_GD_ANY_P(type)	((type & GOT_TLS_GD) || (type & GOT_TLS_GDESC))
+    unsigned int tls_type : 8;
+
+    /* True if the symbol's PLT entry is in .iplt rather than .plt.  */
+    unsigned int is_iplt : 1;
+
+    unsigned int unused : 23;
+
+    /* Offset of the GOTPLT entry reserved for the TLS descriptor,
+       starting at the end of the jump table.  */
+    bfd_vma tlsdesc_got;
 
     /* The symbol marking the real symbol location for exported thumb
        symbols with Arm stubs.  */
@@ -2536,6 +2723,9 @@
   asection *stub_sec;
 };
 
+#define elf32_arm_compute_jump_table_size(htab) \
+  ((htab)->next_tls_desc_index * 4)
+
 /* ARM ELF linker hash table.  */
 struct elf32_arm_link_hash_table
 {
@@ -2586,6 +2776,9 @@
   /* Whether we should fix the Cortex-A8 Thumb-2 branch/TLB erratum.  */
   int fix_cortex_a8;
 
+  /* Whether we should fix the ARM1176 BLX immediate issue.  */
+  int fix_arm1176;
+
   /* Nonzero if the ARM/Thumb BLX instructions are available for use.  */
   int use_blx;
 
@@ -2614,18 +2807,32 @@
   /* True if the target uses REL relocations.  */
   int use_rel;
 
+  /* The index of the next unused R_ARM_TLS_DESC slot in .rel.plt.  */
+  bfd_vma next_tls_desc_index;
+
+  /* How many R_ARM_TLS_DESC relocations were generated so far.  */
+  bfd_vma num_tls_desc;
+
   /* Short-cuts to get to dynamic linker sections.  */
-  asection *sgot;
-  asection *sgotplt;
-  asection *srelgot;
-  asection *splt;
-  asection *srelplt;
   asection *sdynbss;
   asection *srelbss;
 
   /* The (unloaded but important) VxWorks .rela.plt.unloaded section.  */
   asection *srelplt2;
 
+  /* The offset into splt of the PLT entry for the TLS descriptor
+     resolver.  Special values are 0, if not necessary (or not found
+     to be necessary yet), and -1 if needed but not determined
+     yet.  */
+  bfd_vma dt_tlsdesc_plt;
+
+  /* The offset into sgot of the GOT entry used by the PLT entry
+     above.  */
+  bfd_vma dt_tlsdesc_got;    
+
+  /* Offset in .plt section of tls_arm_trampoline.  */
+  bfd_vma tls_trampoline;
+
   /* Data for R_ARM_TLS_LDM32 relocations.  */
   union
   {
@@ -2639,6 +2846,10 @@
   /* For convenience in allocate_dynrelocs.  */
   bfd * obfd;
 
+  /* The amount of space used by the reserved portion of the sgotplt
+     section, plus whatever space is used by the jump slots.  */
+  bfd_vma sgotplt_jump_table_size;
+
   /* The stub hash table.  */
   struct bfd_hash_table stub_hash_table;
 
@@ -2686,11 +2897,14 @@
 				     table, string));
   if (ret != NULL)
     {
-      ret->relocs_copied = NULL;
+      ret->dyn_relocs = NULL;
       ret->tls_type = GOT_UNKNOWN;
-      ret->plt_thumb_refcount = 0;
-      ret->plt_maybe_thumb_refcount = 0;
-      ret->plt_got_offset = -1;
+      ret->tlsdesc_got = (bfd_vma) -1;
+      ret->plt.thumb_refcount = 0;
+      ret->plt.maybe_thumb_refcount = 0;
+      ret->plt.noncall_refcount = 0;
+      ret->plt.got_offset = -1;
+      ret->is_iplt = FALSE;
       ret->export_glue = NULL;
 
       ret->stub_cache = NULL;
@@ -2699,6 +2913,142 @@
   return (struct bfd_hash_entry *) ret;
 }
 
+/* Ensure that we have allocated bookkeeping structures for ABFD's local
+   symbols.  */
+
+static bfd_boolean
+elf32_arm_allocate_local_sym_info (bfd *abfd)
+{
+  if (elf_local_got_refcounts (abfd) == NULL)
+    {
+      bfd_size_type num_syms;
+      bfd_size_type size;
+      char *data;
+
+      num_syms = elf_tdata (abfd)->symtab_hdr.sh_info;
+      size = num_syms * (sizeof (bfd_signed_vma)
+			 + sizeof (struct arm_local_iplt_info *)
+			 + sizeof (bfd_vma)
+			 + sizeof (char));
+      data = bfd_zalloc (abfd, size);
+      if (data == NULL)
+	return FALSE;
+
+      elf_local_got_refcounts (abfd) = (bfd_signed_vma *) data;
+      data += num_syms * sizeof (bfd_signed_vma);
+
+      elf32_arm_local_iplt (abfd) = (struct arm_local_iplt_info **) data;
+      data += num_syms * sizeof (struct arm_local_iplt_info *);
+
+      elf32_arm_local_tlsdesc_gotent (abfd) = (bfd_vma *) data;
+      data += num_syms * sizeof (bfd_vma);
+
+      elf32_arm_local_got_tls_type (abfd) = data;
+    }
+  return TRUE;
+}
+
+/* Return the .iplt information for local symbol R_SYMNDX, which belongs
+   to input bfd ABFD.  Create the information if it doesn't already exist.
+   Return null if an allocation fails.  */
+
+static struct arm_local_iplt_info *
+elf32_arm_create_local_iplt (bfd *abfd, unsigned long r_symndx)
+{
+  struct arm_local_iplt_info **ptr;
+
+  if (!elf32_arm_allocate_local_sym_info (abfd))
+    return NULL;
+
+  BFD_ASSERT (r_symndx < elf_tdata (abfd)->symtab_hdr.sh_info);
+  ptr = &elf32_arm_local_iplt (abfd)[r_symndx];
+  if (*ptr == NULL)
+    *ptr = bfd_zalloc (abfd, sizeof (**ptr));
+  return *ptr;
+}
+
+/* Try to obtain PLT information for the symbol with index R_SYMNDX
+   in ABFD's symbol table.  If the symbol is global, H points to its
+   hash table entry, otherwise H is null.
+
+   Return true if the symbol does have PLT information.  When returning
+   true, point *ROOT_PLT at the target-independent reference count/offset
+   union and *ARM_PLT at the ARM-specific information.  */
+
+static bfd_boolean
+elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_entry *h,
+			unsigned long r_symndx, union gotplt_union **root_plt,
+			struct arm_plt_info **arm_plt)
+{
+  struct arm_local_iplt_info *local_iplt;
+
+  if (h != NULL)
+    {
+      *root_plt = &h->root.plt;
+      *arm_plt = &h->plt;
+      return TRUE;
+    }
+
+  if (elf32_arm_local_iplt (abfd) == NULL)
+    return FALSE;
+
+  local_iplt = elf32_arm_local_iplt (abfd)[r_symndx];
+  if (local_iplt == NULL)
+    return FALSE;
+
+  *root_plt = &local_iplt->root;
+  *arm_plt = &local_iplt->arm;
+  return TRUE;
+}
+
+/* Return true if the PLT described by ARM_PLT requires a Thumb stub
+   before it.  */
+
+static bfd_boolean
+elf32_arm_plt_needs_thumb_stub_p (struct bfd_link_info *info,
+				  struct arm_plt_info *arm_plt)
+{
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  return (arm_plt->thumb_refcount != 0
+	  || (!htab->use_blx && arm_plt->maybe_thumb_refcount != 0));
+}
+
+/* Return a pointer to the head of the dynamic reloc list that should
+   be used for local symbol ISYM, which is symbol number R_SYMNDX in
+   ABFD's symbol table.  Return null if an error occurs.  */
+
+static struct elf_dyn_relocs **
+elf32_arm_get_local_dynreloc_list (bfd *abfd, unsigned long r_symndx,
+				   Elf_Internal_Sym *isym)
+{
+  if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
+    {
+      struct arm_local_iplt_info *local_iplt;
+
+      local_iplt = elf32_arm_create_local_iplt (abfd, r_symndx);
+      if (local_iplt == NULL)
+	return NULL;
+      return &local_iplt->dyn_relocs;
+    }
+  else
+    {
+      /* Track dynamic relocs needed for local syms too.
+	 We really need local syms available to do this
+	 easily.  Oh well.  */
+      asection *s;
+      void *vpp;
+
+      s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+      if (s == NULL)
+	abort ();
+
+      vpp = &elf_section_data (s)->local_dynrel;
+      return (struct elf_dyn_relocs **) vpp;
+    }
+}
+
 /* Initialize an entry in the stub hash table.  */
 
 static struct bfd_hash_entry *
@@ -2761,15 +3111,53 @@
   if (! _bfd_elf_create_got_section (dynobj, info))
     return FALSE;
 
-  htab->sgot = bfd_get_section_by_name (dynobj, ".got");
-  htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
-  if (!htab->sgot || !htab->sgotplt)
-    abort ();
+  return TRUE;
+}
 
-  htab->srelgot = bfd_get_section_by_name (dynobj,
-					   RELOC_SECTION (htab, ".got"));
-  if (htab->srelgot == NULL)
-    return FALSE;
+/* Create the .iplt, .rel(a).iplt and .igot.plt sections.  */
+
+static bfd_boolean
+create_ifunc_sections (struct bfd_link_info *info)
+{
+  struct elf32_arm_link_hash_table *htab;
+  const struct elf_backend_data *bed;
+  bfd *dynobj;
+  asection *s;
+  flagword flags;
+  
+  htab = elf32_arm_hash_table (info);
+  dynobj = htab->root.dynobj;
+  bed = get_elf_backend_data (dynobj);
+  flags = bed->dynamic_sec_flags;
+
+  if (htab->root.iplt == NULL)
+    {
+      s = bfd_make_section_with_flags (dynobj, ".iplt",
+				       flags | SEC_READONLY | SEC_CODE);
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+	return FALSE;
+      htab->root.iplt = s;
+    }
+
+  if (htab->root.irelplt == NULL)
+    {
+      s = bfd_make_section_with_flags (dynobj, RELOC_SECTION (htab, ".iplt"),
+				       flags | SEC_READONLY);
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+	return FALSE;
+      htab->root.irelplt = s;
+    }
+
+  if (htab->root.igotplt == NULL)
+    {
+      s = bfd_make_section_with_flags (dynobj, ".igot.plt", flags);
+      if (s == NULL
+	  || !bfd_set_section_alignment (dynobj, s, bed->s->log_file_align))
+	return FALSE;
+      htab->root.igotplt = s;
+    }
   return TRUE;
 }
 
@@ -2786,15 +3174,12 @@
   if (htab == NULL)
     return FALSE;
 
-  if (!htab->sgot && !create_got_section (dynobj, info))
+  if (!htab->root.sgot && !create_got_section (dynobj, info))
     return FALSE;
 
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
-  htab->splt = bfd_get_section_by_name (dynobj, ".plt");
-  htab->srelplt = bfd_get_section_by_name (dynobj,
-					   RELOC_SECTION (htab, ".plt"));
   htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
   if (!info->shared)
     htab->srelbss = bfd_get_section_by_name (dynobj,
@@ -2820,8 +3205,8 @@
 	}
     }
 
-  if (!htab->splt
-      || !htab->srelplt
+  if (!htab->root.splt
+      || !htab->root.srelplt
       || !htab->sdynbss
       || (!info->shared && !htab->srelbss))
     abort ();
@@ -2841,21 +3226,21 @@
   edir = (struct elf32_arm_link_hash_entry *) dir;
   eind = (struct elf32_arm_link_hash_entry *) ind;
 
-  if (eind->relocs_copied != NULL)
+  if (eind->dyn_relocs != NULL)
     {
-      if (edir->relocs_copied != NULL)
+      if (edir->dyn_relocs != NULL)
 	{
-	  struct elf32_arm_relocs_copied **pp;
-	  struct elf32_arm_relocs_copied *p;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
 
 	  /* Add reloc counts against the indirect sym to the direct sym
 	     list.  Merge any entries against the same section.  */
-	  for (pp = &eind->relocs_copied; (p = *pp) != NULL; )
+	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
 	    {
-	      struct elf32_arm_relocs_copied *q;
+	      struct elf_dyn_relocs *q;
 
-	      for (q = edir->relocs_copied; q != NULL; q = q->next)
-		if (q->section == p->section)
+	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
+		if (q->sec == p->sec)
 		  {
 		    q->pc_count += p->pc_count;
 		    q->count += p->count;
@@ -2865,20 +3250,26 @@
 	      if (q == NULL)
 		pp = &p->next;
 	    }
-	  *pp = edir->relocs_copied;
+	  *pp = edir->dyn_relocs;
 	}
 
-      edir->relocs_copied = eind->relocs_copied;
-      eind->relocs_copied = NULL;
+      edir->dyn_relocs = eind->dyn_relocs;
+      eind->dyn_relocs = NULL;
     }
 
   if (ind->root.type == bfd_link_hash_indirect)
     {
       /* Copy over PLT info.  */
-      edir->plt_thumb_refcount += eind->plt_thumb_refcount;
-      eind->plt_thumb_refcount = 0;
-      edir->plt_maybe_thumb_refcount += eind->plt_maybe_thumb_refcount;
-      eind->plt_maybe_thumb_refcount = 0;
+      edir->plt.thumb_refcount += eind->plt.thumb_refcount;
+      eind->plt.thumb_refcount = 0;
+      edir->plt.maybe_thumb_refcount += eind->plt.maybe_thumb_refcount;
+      eind->plt.maybe_thumb_refcount = 0;
+      edir->plt.noncall_refcount += eind->plt.noncall_refcount;
+      eind->plt.noncall_refcount = 0;
+
+      /* We should only allocate a function to .iplt once the final
+	 symbol information is known.  */
+      BFD_ASSERT (!eind->is_iplt);
 
       if (dir->got.refcount <= 0)
 	{
@@ -2911,14 +3302,14 @@
       return NULL;
     }
 
-  ret->sgot = NULL;
-  ret->sgotplt = NULL;
-  ret->srelgot = NULL;
-  ret->splt = NULL;
-  ret->srelplt = NULL;
   ret->sdynbss = NULL;
   ret->srelbss = NULL;
   ret->srelplt2 = NULL;
+  ret->dt_tlsdesc_plt = 0;
+  ret->dt_tlsdesc_got = 0;
+  ret->tls_trampoline = 0;
+  ret->next_tls_desc_index = 0;
+  ret->num_tls_desc = 0;
   ret->thumb_glue_size = 0;
   ret->arm_glue_size = 0;
   ret->bx_glue_size = 0;
@@ -2927,6 +3318,7 @@
   ret->vfp11_erratum_glue_size = 0;
   ret->num_vfp11_fixes = 0;
   ret->fix_cortex_a8 = 0;
+  ret->fix_arm1176 = 0;
   ret->bfd_of_glue_owner = NULL;
   ret->byteswap_code = 0;
   ret->target1_is_rel = 0;
@@ -3039,6 +3431,7 @@
     case arm_stub_long_branch_v4t_thumb_arm:
     case arm_stub_short_branch_v4t_thumb_arm:
     case arm_stub_long_branch_v4t_thumb_arm_pic:
+    case arm_stub_long_branch_v4t_thumb_tls_pic:
     case arm_stub_long_branch_thumb_only_pic:
       return TRUE;
     case arm_stub_none:
@@ -3056,7 +3449,8 @@
 arm_type_of_stub (struct bfd_link_info *info,
 		  asection *input_sec,
 		  const Elf_Internal_Rela *rel,
-		  int *actual_st_type,
+		  unsigned char st_type,
+		  enum arm_st_branch_type *actual_branch_type,
 		  struct elf32_arm_link_hash_entry *hash,
 		  bfd_vma destination,
 		  asection *sym_sec,
@@ -3071,11 +3465,11 @@
   int thumb_only;
   enum elf32_arm_stub_type stub_type = arm_stub_none;
   int use_plt = 0;
-  int st_type = *actual_st_type;
+  enum arm_st_branch_type branch_type = *actual_branch_type;
+  union gotplt_union *root_plt;
+  struct arm_plt_info *arm_plt;
 
-  /* We don't know the actual type of destination in case it is of
-     type STT_SECTION: give up.  */
-  if (st_type == STT_SECTION)
+  if (branch_type == ST_BRANCH_LONG)
     return stub_type;
 
   globals = elf32_arm_hash_table (info);
@@ -3093,31 +3487,47 @@
 
   r_type = ELF32_R_TYPE (rel->r_info);
 
-  /* Keep a simpler condition, for the sake of clarity.  */
-  if (globals->splt != NULL
-      && hash != NULL
-      && hash->root.plt.offset != (bfd_vma) -1)
+  /* For TLS call relocs, it is the caller's responsibility to provide
+     the address of the appropriate trampoline.  */
+  if (r_type != R_ARM_TLS_CALL
+      && r_type != R_ARM_THM_TLS_CALL
+      && elf32_arm_get_plt_info (input_bfd, hash, ELF32_R_SYM (rel->r_info),
+				 &root_plt, &arm_plt)
+      && root_plt->offset != (bfd_vma) -1)
     {
-      use_plt = 1;
+      asection *splt;
 
-      /* Note when dealing with PLT entries: the main PLT stub is in
-	 ARM mode, so if the branch is in Thumb mode, another
-	 Thumb->ARM stub will be inserted later just before the ARM
-	 PLT stub. We don't take this extra distance into account
-	 here, because if a long branch stub is needed, we'll add a
-	 Thumb->Arm one and branch directly to the ARM PLT entry
-	 because it avoids spreading offset corrections in several
-	 places.  */
+      if (hash == NULL || hash->is_iplt)
+	splt = globals->root.iplt;
+      else
+	splt = globals->root.splt;
+      if (splt != NULL)
+	{	
+	  use_plt = 1;
 
-      destination = (globals->splt->output_section->vma
-		     + globals->splt->output_offset
-		     + hash->root.plt.offset);
-      st_type = STT_FUNC;
+	  /* Note when dealing with PLT entries: the main PLT stub is in
+	     ARM mode, so if the branch is in Thumb mode, another
+	     Thumb->ARM stub will be inserted later just before the ARM
+	     PLT stub. We don't take this extra distance into account
+	     here, because if a long branch stub is needed, we'll add a
+	     Thumb->Arm one and branch directly to the ARM PLT entry
+	     because it avoids spreading offset corrections in several
+	     places.  */
+
+	  destination = (splt->output_section->vma
+			 + splt->output_offset
+			 + root_plt->offset);
+	  st_type = STT_FUNC;
+	  branch_type = ST_BRANCH_TO_ARM;
+	}
     }
+  /* Calls to STT_GNU_IFUNC symbols should go through a PLT.  */
+  BFD_ASSERT (st_type != STT_GNU_IFUNC);
 
   branch_offset = (bfd_signed_vma)(destination - location);
 
-  if (r_type == R_ARM_THM_CALL || r_type == R_ARM_THM_JUMP24)
+  if (r_type == R_ARM_THM_CALL || r_type == R_ARM_THM_JUMP24
+      || r_type == R_ARM_THM_TLS_CALL)
     {
       /* Handle cases where:
 	 - this call goes too far (different Thumb/Thumb2 max
@@ -3133,12 +3543,13 @@
 	  || (thumb2
 	      && (branch_offset > THM2_MAX_FWD_BRANCH_OFFSET
 		  || (branch_offset < THM2_MAX_BWD_BRANCH_OFFSET)))
-	  || ((st_type != STT_ARM_TFUNC)
-	      && (((r_type == R_ARM_THM_CALL) && !globals->use_blx)
+	  || (branch_type == ST_BRANCH_TO_ARM
+	      && (((r_type == R_ARM_THM_CALL
+		    || r_type == R_ARM_THM_TLS_CALL) && !globals->use_blx)
 		  || (r_type == R_ARM_THM_JUMP24))
 	      && !use_plt))
 	{
-	  if (st_type == STT_ARM_TFUNC)
+	  if (branch_type == ST_BRANCH_TO_THUMB)
 	    {
 	      /* Thumb to thumb.  */
 	      if (!thumb_only)
@@ -3185,18 +3596,21 @@
 		     sym_sec->owner, input_bfd, name);
 		}
 
-	      stub_type = (info->shared | globals->pic_veneer)
+	      stub_type =
+		(info->shared | globals->pic_veneer)
 		/* PIC stubs.  */
-		? ((globals->use_blx
-		    && (r_type ==R_ARM_THM_CALL))
-		   /* V5T and above.  */
-		   ? arm_stub_long_branch_any_arm_pic
-		   /* V4T PIC stub.  */
-		   : arm_stub_long_branch_v4t_thumb_arm_pic)
+		? (r_type == R_ARM_THM_TLS_CALL
+		   /* TLS PIC stubs */
+		   ? (globals->use_blx ? arm_stub_long_branch_any_tls_pic
+		      : arm_stub_long_branch_v4t_thumb_tls_pic)
+		   : ((globals->use_blx && r_type == R_ARM_THM_CALL)
+		      /* V5T PIC and above.  */
+		      ? arm_stub_long_branch_any_arm_pic
+		      /* V4T PIC stub.  */
+		      : arm_stub_long_branch_v4t_thumb_arm_pic))
 
 		/* non-PIC stubs.  */
-		: ((globals->use_blx
-		    && (r_type ==R_ARM_THM_CALL))
+		: ((globals->use_blx && r_type == R_ARM_THM_CALL)
 		   /* V5T and above.  */
 		   ? arm_stub_long_branch_any_any
 		   /* V4T.  */
@@ -3212,9 +3626,10 @@
     }
   else if (r_type == R_ARM_CALL
 	   || r_type == R_ARM_JUMP24
-	   || r_type == R_ARM_PLT32)
+	   || r_type == R_ARM_PLT32
+	   || r_type == R_ARM_TLS_CALL)
     {
-      if (st_type == STT_ARM_TFUNC)
+      if (branch_type == ST_BRANCH_TO_THUMB)
 	{
 	  /* Arm to thumb.  */
 
@@ -3232,7 +3647,7 @@
 	     the mode change (bit 24 (H) of BLX encoding).  */
 	  if (branch_offset > (ARM_MAX_FWD_BRANCH_OFFSET + 2)
 	      || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET)
-	      || ((r_type == R_ARM_CALL) && !globals->use_blx)
+	      || (r_type == R_ARM_CALL && !globals->use_blx)
 	      || (r_type == R_ARM_JUMP24)
 	      || (r_type == R_ARM_PLT32))
 	    {
@@ -3258,9 +3673,13 @@
 	  if (branch_offset > ARM_MAX_FWD_BRANCH_OFFSET
 	      || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET))
 	    {
-	      stub_type = (info->shared | globals->pic_veneer)
+	      stub_type =
+		(info->shared | globals->pic_veneer)
 		/* PIC stubs.  */
-		? arm_stub_long_branch_any_arm_pic
+		? (r_type == R_ARM_TLS_CALL
+		   /* TLS PIC Stub */
+		   ? arm_stub_long_branch_any_tls_pic
+		   : arm_stub_long_branch_any_arm_pic)
 		/* non-PIC stubs.  */
 		: arm_stub_long_branch_any_any;
 	    }
@@ -3269,7 +3688,7 @@
 
   /* If a stub is needed, record the actual destination type.  */
   if (stub_type != arm_stub_none)
-    *actual_st_type = st_type;
+    *actual_branch_type = branch_type;
 
   return stub_type;
 }
@@ -3305,7 +3724,9 @@
 	sprintf (stub_name, "%08x_%x:%x+%x_%d",
 		 input_section->id & 0xffffffff,
 		 sym_sec->id & 0xffffffff,
-		 (int) ELF32_R_SYM (rel->r_info) & 0xffffffff,
+		 ELF32_R_TYPE (rel->r_info) == R_ARM_TLS_CALL
+		 || ELF32_R_TYPE (rel->r_info) == R_ARM_THM_TLS_CALL
+		 ? 0 : (int) ELF32_R_SYM (rel->r_info) & 0xffffffff,
 		 (int) rel->r_addend & 0xffffffff,
 		 (int) stub_type);
     }
@@ -3468,10 +3889,37 @@
     bfd_putb16 (val, ptr);
 }
 
+/* If it's possible to change R_TYPE to a more efficient access
+   model, return the new reloc type.  */
+
+static unsigned
+elf32_arm_tls_transition (struct bfd_link_info *info, int r_type, 
+			  struct elf_link_hash_entry *h)
+{
+  int is_local = (h == NULL);
+
+  if (info->shared || (h && h->root.type == bfd_link_hash_undefweak))
+    return r_type;
+
+  /* We do not support relaxations for Old TLS models.  */ 
+  switch (r_type)
+    {
+    case R_ARM_TLS_GOTDESC:
+    case R_ARM_TLS_CALL:
+    case R_ARM_THM_TLS_CALL:
+    case R_ARM_TLS_DESCSEQ:
+    case R_ARM_THM_TLS_DESCSEQ:
+      return is_local ? R_ARM_TLS_LE32 : R_ARM_TLS_IE32;
+    }
+
+  return r_type;
+}
+
 static bfd_reloc_status_type elf32_arm_final_link_relocate
   (reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *,
-   const char *, int, struct elf_link_hash_entry *, bfd_boolean *, char **);
+   const char *, unsigned char, enum arm_st_branch_type,
+   struct elf_link_hash_entry *, bfd_boolean *, char **);
 
 static unsigned int
 arm_stub_required_alignment (enum elf32_arm_stub_type stub_type)
@@ -3495,6 +3943,8 @@
     case arm_stub_long_branch_v4t_arm_thumb_pic:
     case arm_stub_long_branch_v4t_thumb_arm_pic:
     case arm_stub_long_branch_thumb_only_pic:
+    case arm_stub_long_branch_any_tls_pic:
+    case arm_stub_long_branch_v4t_thumb_tls_pic:
     case arm_stub_a8_veneer_blx:
       return 4;
     
@@ -3620,7 +4070,7 @@
   BFD_ASSERT (size == stub_entry->stub_size);
 
   /* Destination is Thumb. Force bit 0 to 1 to reflect this.  */
-  if (stub_entry->st_type == STT_ARM_TFUNC)
+  if (stub_entry->branch_type == ST_BRANCH_TO_THUMB)
     sym_value |= 1;
 
   /* Assume there is at least one and at most MAXRELOCS entries to relocate
@@ -3636,9 +4086,9 @@
 	Elf_Internal_Rela rel;
 	bfd_boolean unresolved_reloc;
 	char *error_message;
-	int sym_flags
-	  = (template_sequence[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22)
-	    ? STT_ARM_TFUNC : 0;
+	enum arm_st_branch_type branch_type
+	  = (template_sequence[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22
+	     ? ST_BRANCH_TO_THUMB : ST_BRANCH_TO_ARM);
 	bfd_vma points_to = sym_value + stub_entry->target_addend;
 
 	rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
@@ -3662,9 +4112,9 @@
 	elf32_arm_final_link_relocate (elf32_arm_howto_from_type
 	    (template_sequence[stub_reloc_idx[i]].r_type),
 	  stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
-	  points_to, info, stub_entry->target_section, "", sym_flags,
-	  (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
-	  &error_message);
+	  points_to, info, stub_entry->target_section, "", STT_FUNC,
+	  branch_type, (struct elf_link_hash_entry *) stub_entry->h,
+	  &unresolved_reloc, &error_message);
       }
     else
       {
@@ -3682,7 +4132,8 @@
 	elf32_arm_final_link_relocate (elf32_arm_howto_from_type
 	    (template_sequence[stub_reloc_idx[i]].r_type),
 	  stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
-	  points_to, info, stub_entry->target_section, "", stub_entry->st_type,
+	  points_to, info, stub_entry->target_section, "", STT_FUNC,
+	  stub_entry->branch_type,
 	  (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
 	  &error_message);
       }
@@ -4132,13 +4583,14 @@
 			found->non_a8_stub = TRUE;
 
 		      /* Keep a simpler condition, for the sake of clarity.  */
-		      if (htab->splt != NULL && found->hash != NULL
+		      if (htab->root.splt != NULL && found->hash != NULL
 			  && found->hash->root.plt.offset != (bfd_vma) -1)
 			use_plt = TRUE;
 
 		      if (found->r_type == R_ARM_THM_CALL)
 			{
-			  if (found->st_type != STT_ARM_TFUNC || use_plt)
+			  if (found->branch_type == ST_BRANCH_TO_ARM
+			      || use_plt)
 			    force_target_arm = TRUE;
 			  else
 			    force_target_thumb = TRUE;
@@ -4281,8 +4733,8 @@
                           a8_fixes[num_a8_fixes].orig_insn = insn;
                           a8_fixes[num_a8_fixes].stub_name = stub_name;
                           a8_fixes[num_a8_fixes].stub_type = stub_type;
-                          a8_fixes[num_a8_fixes].st_type =
-			    is_blx ? STT_FUNC : STT_ARM_TFUNC;
+                          a8_fixes[num_a8_fixes].branch_type =
+			    is_blx ? ST_BRANCH_TO_ARM : ST_BRANCH_TO_THUMB;
 
                           num_a8_fixes++;
                         }
@@ -4453,7 +4905,8 @@
 		  const char *sym_name;
 		  char *stub_name;
 		  const asection *id_sec;
-		  int st_type;
+		  unsigned char st_type;
+		  enum arm_st_branch_type branch_type;
 		  bfd_boolean created_stub = FALSE;
 
 		  r_type = ELF32_R_TYPE (irela->r_info);
@@ -4467,15 +4920,30 @@
 			free (internal_relocs);
 		      goto error_ret_free_local;
 		    }
-
-		  /* Only look for stubs on branch instructions.  */
+		  
+		  hash = NULL;
+		  if (r_indx >= symtab_hdr->sh_info)
+		    hash = elf32_arm_hash_entry
+		      (elf_sym_hashes (input_bfd)
+		       [r_indx - symtab_hdr->sh_info]);
+		  
+		  /* Only look for stubs on branch instructions, or
+		     non-relaxed TLSCALL  */
 		  if ((r_type != (unsigned int) R_ARM_CALL)
 		      && (r_type != (unsigned int) R_ARM_THM_CALL)
 		      && (r_type != (unsigned int) R_ARM_JUMP24)
 		      && (r_type != (unsigned int) R_ARM_THM_JUMP19)
 		      && (r_type != (unsigned int) R_ARM_THM_XPC22)
 		      && (r_type != (unsigned int) R_ARM_THM_JUMP24)
-		      && (r_type != (unsigned int) R_ARM_PLT32))
+		      && (r_type != (unsigned int) R_ARM_PLT32)
+		      && !((r_type == (unsigned int) R_ARM_TLS_CALL
+			    || r_type == (unsigned int) R_ARM_THM_TLS_CALL)
+			   && r_type == elf32_arm_tls_transition
+			       (info, r_type, &hash->root)
+			   && ((hash ? hash->tls_type
+				: (elf32_arm_local_got_tls_type
+				   (input_bfd)[r_indx]))
+			       & GOT_TLS_GDESC) != 0))
 		    continue;
 
 		  /* Now determine the call target, its name, value,
@@ -4483,9 +4951,22 @@
 		  sym_sec = NULL;
 		  sym_value = 0;
 		  destination = 0;
-		  hash = NULL;
 		  sym_name = NULL;
-		  if (r_indx < symtab_hdr->sh_info)
+		  
+		  if (r_type == (unsigned int) R_ARM_TLS_CALL
+		      || r_type == (unsigned int) R_ARM_THM_TLS_CALL)
+		    {
+		      /* A non-relaxed TLS call.  The target is the
+			 plt-resident trampoline and nothing to do
+			 with the symbol.  */
+		      BFD_ASSERT (htab->tls_trampoline > 0);
+		      sym_sec = htab->root.splt;
+		      sym_value = htab->tls_trampoline;
+		      hash = 0;
+		      st_type = STT_FUNC;
+		      branch_type = ST_BRANCH_TO_ARM;
+		    }
+		  else if (!hash)
 		    {
 		      /* It's a local symbol.  */
 		      Elf_Internal_Sym *sym;
@@ -4525,6 +5006,7 @@
 				     + sym_sec->output_offset
 				     + sym_sec->output_section->vma);
 		      st_type = ELF_ST_TYPE (sym->st_info);
+		      branch_type = ARM_SYM_BRANCH_TYPE (sym);
 		      sym_name
 			= bfd_elf_string_from_elf_section (input_bfd,
 							   symtab_hdr->sh_link,
@@ -4533,12 +5015,6 @@
 		  else
 		    {
 		      /* It's an external symbol.  */
-		      int e_indx;
-
-		      e_indx = r_indx - symtab_hdr->sh_info;
-		      hash = ((struct elf32_arm_link_hash_entry *)
-			      elf_sym_hashes (input_bfd)[e_indx]);
-
 		      while (hash->root.root.type == bfd_link_hash_indirect
 			     || hash->root.root.type == bfd_link_hash_warning)
 			hash = ((struct elf32_arm_link_hash_entry *)
@@ -4558,11 +5034,11 @@
 			     decide whether a branch stub is
 			     needed.  */
 			  if (globals != NULL
-			      && globals->splt != NULL
+			      && globals->root.splt != NULL
 			      && hash != NULL
 			      && hash->root.plt.offset != (bfd_vma) -1)
 			    {
-			      sym_sec = globals->splt;
+			      sym_sec = globals->root.splt;
 			      sym_value = hash->root.plt.offset;
 			      if (sym_sec->output_section != NULL)
 				destination = (sym_value
@@ -4585,11 +5061,11 @@
 			    elf32_arm_hash_table (info);
 
 			  if (globals != NULL
-			      && globals->splt != NULL
+			      && globals->root.splt != NULL
 			      && hash != NULL
 			      && hash->root.plt.offset != (bfd_vma) -1)
 			    {
-			      sym_sec = globals->splt;
+			      sym_sec = globals->root.splt;
 			      sym_value = hash->root.plt.offset;
 			      if (sym_sec->output_section != NULL)
 				destination = (sym_value
@@ -4604,7 +5080,8 @@
 			  bfd_set_error (bfd_error_bad_value);
 			  goto error_ret_free_internal;
 			}
-		      st_type = ELF_ST_TYPE (hash->root.type);
+		      st_type = hash->root.type;
+		      branch_type = hash->root.target_internal;
 		      sym_name = hash->root.root.root.string;
 		    }
 
@@ -4612,8 +5089,8 @@
 		    {
 		      /* Determine what (if any) linker stub is needed.  */
 		      stub_type = arm_type_of_stub (info, section, irela,
-						    &st_type, hash,
-						    destination, sym_sec,
+						    st_type, &branch_type,
+						    hash, destination, sym_sec,
 						    input_bfd, sym_name);
 		      if (stub_type == arm_stub_none)
 			break;
@@ -4654,7 +5131,7 @@
                       stub_entry->target_section = sym_sec;
                       stub_entry->stub_type = stub_type;
                       stub_entry->h = hash;
-                      stub_entry->st_type = st_type;
+                      stub_entry->branch_type = branch_type;
 
                       if (sym_name == NULL)
                 	sym_name = "unnamed";
@@ -4670,14 +5147,14 @@
 
                       /* For historical reasons, use the existing names for
                 	 ARM-to-Thumb and Thumb-to-ARM stubs.  */
-                      if ( ((r_type == (unsigned int) R_ARM_THM_CALL)
-                            || (r_type == (unsigned int) R_ARM_THM_JUMP24))
-                           && st_type != STT_ARM_TFUNC)
+                      if ((r_type == (unsigned int) R_ARM_THM_CALL
+			   || r_type == (unsigned int) R_ARM_THM_JUMP24)
+			  && branch_type == ST_BRANCH_TO_ARM)
                 	sprintf (stub_entry->output_name,
                         	 THUMB2ARM_GLUE_ENTRY_NAME, sym_name);
-                      else if ( ((r_type == (unsigned int) R_ARM_CALL)
-                        	 || (r_type == (unsigned int) R_ARM_JUMP24))
-                               && st_type == STT_ARM_TFUNC)
+                      else if ((r_type == (unsigned int) R_ARM_CALL
+			       || r_type == (unsigned int) R_ARM_JUMP24)
+			       && branch_type == ST_BRANCH_TO_THUMB)
                 	sprintf (stub_entry->output_name,
                         	 ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
                       else
@@ -4719,7 +5196,7 @@
                           a8_relocs[num_a8_relocs].from = from;
                           a8_relocs[num_a8_relocs].destination = destination;
                           a8_relocs[num_a8_relocs].r_type = r_type;
-                          a8_relocs[num_a8_relocs].st_type = st_type;
+                          a8_relocs[num_a8_relocs].branch_type = branch_type;
                           a8_relocs[num_a8_relocs].sym_name = sym_name;
                           a8_relocs[num_a8_relocs].non_a8_stub = created_stub;
                           a8_relocs[num_a8_relocs].hash = hash;
@@ -4824,7 +5301,7 @@
           stub_entry->target_value = a8_fixes[i].offset;
           stub_entry->target_addend = a8_fixes[i].addend;
           stub_entry->orig_insn = a8_fixes[i].orig_insn;
-	  stub_entry->st_type = a8_fixes[i].st_type;
+	  stub_entry->branch_type = a8_fixes[i].branch_type;
 
           size = find_stub_size_and_template (a8_fixes[i].stub_type,
                                               &template_sequence,
@@ -5457,9 +5934,21 @@
 static void
 check_use_blx (struct elf32_arm_link_hash_table *globals)
 {
-  if (bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
-				Tag_CPU_arch) > 2)
-    globals->use_blx = 1;
+  int cpu_arch;
+
+  cpu_arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, 
+				       Tag_CPU_arch);
+
+  if (globals->fix_arm1176)
+    {
+      if (cpu_arch == TAG_CPU_ARCH_V6T2 || cpu_arch > TAG_CPU_ARCH_V6K)
+	globals->use_blx = 1;
+    }
+  else
+    {
+      if (cpu_arch > TAG_CPU_ARCH_V4T)
+	globals->use_blx = 1;
+    }
 }
 
 bfd_boolean
@@ -5580,7 +6069,7 @@
 
 	  /* If the call will go through a PLT entry then we do not need
 	     glue.  */
-	  if (globals->splt != NULL && h->plt.offset != (bfd_vma) -1)
+	  if (globals->root.splt != NULL && h->plt.offset != (bfd_vma) -1)
 	    continue;
 
 	  switch (r_type)
@@ -5589,7 +6078,7 @@
 	      /* This one is a call from arm code.  We need to look up
 	         the target of the call.  If it is a thumb target, we
 	         insert glue.  */
-	      if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC)
+	      if (h->target_internal == ST_BRANCH_TO_THUMB)
 		record_arm_to_thumb_glue (link_info, h);
 	      break;
 
@@ -6313,7 +6802,8 @@
 				 int use_blx,
                                  bfd_arm_vfp11_fix vfp11_fix,
 				 int no_enum_warn, int no_wchar_warn,
-				 int pic_veneer, int fix_cortex_a8)
+				 int pic_veneer, int fix_cortex_a8,
+				 int fix_arm1176)
 {
   struct elf32_arm_link_hash_table *globals;
 
@@ -6338,6 +6828,7 @@
   globals->vfp11_fix = vfp11_fix;
   globals->pic_veneer = pic_veneer;
   globals->fix_cortex_a8 = fix_cortex_a8;
+  globals->fix_arm1176 = fix_arm1176;
 
   BFD_ASSERT (is_arm_elf (output_bfd));
   elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
@@ -6725,6 +7216,339 @@
 			  link_info);
 }
 
+/* Reserve space for COUNT dynamic relocations in relocation selection
+   SRELOC.  */
+
+static void
+elf32_arm_allocate_dynrelocs (struct bfd_link_info *info, asection *sreloc,
+			      bfd_size_type count)
+{
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  BFD_ASSERT (htab->root.dynamic_sections_created);
+  if (sreloc == NULL)
+    abort ();
+  sreloc->size += RELOC_SIZE (htab) * count;
+}
+
+/* Reserve space for COUNT R_ARM_IRELATIVE relocations.  If the link is
+   dynamic, the relocations should go in SRELOC, otherwise they should
+   go in the special .rel.iplt section.  */
+
+static void
+elf32_arm_allocate_irelocs (struct bfd_link_info *info, asection *sreloc,
+			    bfd_size_type count)
+{
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  if (!htab->root.dynamic_sections_created)
+    htab->root.irelplt->size += RELOC_SIZE (htab) * count;
+  else
+    {
+      BFD_ASSERT (sreloc != NULL);
+      sreloc->size += RELOC_SIZE (htab) * count;
+    }
+}
+
+/* Add relocation REL to the end of relocation section SRELOC.  */
+
+static void
+elf32_arm_add_dynreloc (bfd *output_bfd, struct bfd_link_info *info,
+			asection *sreloc, Elf_Internal_Rela *rel)
+{
+  bfd_byte *loc;
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  if (!htab->root.dynamic_sections_created
+      && ELF32_R_TYPE (rel->r_info) == R_ARM_IRELATIVE)
+    sreloc = htab->root.irelplt;
+  if (sreloc == NULL)
+    abort ();
+  loc = sreloc->contents;
+  loc += sreloc->reloc_count++ * RELOC_SIZE (htab);
+  if (sreloc->reloc_count * RELOC_SIZE (htab) > sreloc->size)
+    abort ();
+  SWAP_RELOC_OUT (htab) (output_bfd, rel, loc);
+}
+
+/* Allocate room for a PLT entry described by ROOT_PLT and ARM_PLT.
+   IS_IPLT_ENTRY says whether the entry belongs to .iplt rather than
+   to .plt.  */
+
+static void
+elf32_arm_allocate_plt_entry (struct bfd_link_info *info,
+			      bfd_boolean is_iplt_entry,
+			      union gotplt_union *root_plt,
+			      struct arm_plt_info *arm_plt)
+{
+  struct elf32_arm_link_hash_table *htab;
+  asection *splt;
+  asection *sgotplt;
+
+  htab = elf32_arm_hash_table (info);
+
+  if (is_iplt_entry)
+    {
+      splt = htab->root.iplt;
+      sgotplt = htab->root.igotplt;
+
+      /* Allocate room for an R_ARM_IRELATIVE relocation in .rel.iplt.  */
+      elf32_arm_allocate_irelocs (info, htab->root.irelplt, 1);
+    }
+  else
+    {
+      splt = htab->root.splt;
+      sgotplt = htab->root.sgotplt;
+
+      /* Allocate room for an R_JUMP_SLOT relocation in .rel.plt.  */
+      elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
+
+      /* If this is the first .plt entry, make room for the special
+	 first entry.  */
+      if (splt->size == 0)
+	splt->size += htab->plt_header_size;
+    }
+
+  /* Allocate the PLT entry itself, including any leading Thumb stub.  */
+  if (elf32_arm_plt_needs_thumb_stub_p (info, arm_plt))
+    splt->size += PLT_THUMB_STUB_SIZE;
+  root_plt->offset = splt->size;
+  splt->size += htab->plt_entry_size;
+
+  if (!htab->symbian_p)
+    {
+      /* We also need to make an entry in the .got.plt section, which
+	 will be placed in the .got section by the linker script.  */
+      arm_plt->got_offset = sgotplt->size - 8 * htab->num_tls_desc;
+      sgotplt->size += 4;
+    }
+}
+
+/* Fill in a PLT entry and its associated GOT slot.  If DYNINDX == -1,
+   the entry lives in .iplt and resolves to (*SYM_VALUE)().
+   Otherwise, DYNINDX is the index of the symbol in the dynamic
+   symbol table and SYM_VALUE is undefined.
+
+   ROOT_PLT points to the offset of the PLT entry from the start of its
+   section (.iplt or .plt).  ARM_PLT points to the symbol's ARM-specific
+   bookkeeping information.  */
+
+static void
+elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info,
+			      union gotplt_union *root_plt,
+			      struct arm_plt_info *arm_plt,
+			      int dynindx, bfd_vma sym_value)
+{
+  struct elf32_arm_link_hash_table *htab;
+  asection *sgot;
+  asection *splt;
+  asection *srel;
+  bfd_byte *loc;
+  bfd_vma plt_index;
+  Elf_Internal_Rela rel;
+  bfd_vma plt_header_size;
+  bfd_vma got_header_size;
+
+  htab = elf32_arm_hash_table (info);
+
+  /* Pick the appropriate sections and sizes.  */
+  if (dynindx == -1)
+    {
+      splt = htab->root.iplt;
+      sgot = htab->root.igotplt;
+      srel = htab->root.irelplt;
+
+      /* There are no reserved entries in .igot.plt, and no special
+	 first entry in .iplt.  */
+      got_header_size = 0;
+      plt_header_size = 0;
+    }
+  else
+    {
+      splt = htab->root.splt;
+      sgot = htab->root.sgotplt;
+      srel = htab->root.srelplt;
+
+      got_header_size = get_elf_backend_data (output_bfd)->got_header_size;
+      plt_header_size = htab->plt_header_size;
+    }
+  BFD_ASSERT (splt != NULL && srel != NULL);
+
+  /* Fill in the entry in the procedure linkage table.  */
+  if (htab->symbian_p)
+    {
+      BFD_ASSERT (dynindx >= 0);
+      put_arm_insn (htab, output_bfd,
+		    elf32_arm_symbian_plt_entry[0],
+		    splt->contents + root_plt->offset);
+      bfd_put_32 (output_bfd,
+		  elf32_arm_symbian_plt_entry[1],
+		  splt->contents + root_plt->offset + 4);
+
+      /* Fill in the entry in the .rel.plt section.  */
+      rel.r_offset = (splt->output_section->vma
+		      + splt->output_offset
+		      + root_plt->offset + 4);
+      rel.r_info = ELF32_R_INFO (dynindx, R_ARM_GLOB_DAT);
+
+      /* Get the index in the procedure linkage table which
+	 corresponds to this symbol.  This is the index of this symbol
+	 in all the symbols for which we are making plt entries.  The
+	 first entry in the procedure linkage table is reserved.  */
+      plt_index = ((root_plt->offset - plt_header_size)
+		   / htab->plt_entry_size);
+    }
+  else
+    {
+      bfd_vma got_offset, got_address, plt_address;
+      bfd_vma got_displacement, initial_got_entry;
+      bfd_byte * ptr;
+
+      BFD_ASSERT (sgot != NULL);
+
+      /* Get the offset into the .(i)got.plt table of the entry that
+	 corresponds to this function.  */
+      got_offset = (arm_plt->got_offset & -2);
+
+      /* Get the index in the procedure linkage table which
+	 corresponds to this symbol.  This is the index of this symbol
+	 in all the symbols for which we are making plt entries.
+	 After the reserved .got.plt entries, all symbols appear in
+	 the same order as in .plt.  */
+      plt_index = (got_offset - got_header_size) / 4;
+
+      /* Calculate the address of the GOT entry.  */
+      got_address = (sgot->output_section->vma
+		     + sgot->output_offset
+		     + got_offset);
+
+      /* ...and the address of the PLT entry.  */
+      plt_address = (splt->output_section->vma
+		     + splt->output_offset
+		     + root_plt->offset);
+
+      ptr = splt->contents + root_plt->offset;
+      if (htab->vxworks_p && info->shared)
+	{
+	  unsigned int i;
+	  bfd_vma val;
+
+	  for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
+	    {
+	      val = elf32_arm_vxworks_shared_plt_entry[i];
+	      if (i == 2)
+		val |= got_address - sgot->output_section->vma;
+	      if (i == 5)
+		val |= plt_index * RELOC_SIZE (htab);
+	      if (i == 2 || i == 5)
+		bfd_put_32 (output_bfd, val, ptr);
+	      else
+		put_arm_insn (htab, output_bfd, val, ptr);
+	    }
+	}
+      else if (htab->vxworks_p)
+	{
+	  unsigned int i;
+	  bfd_vma val;
+
+	  for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
+	    {
+	      val = elf32_arm_vxworks_exec_plt_entry[i];
+	      if (i == 2)
+		val |= got_address;
+	      if (i == 4)
+		val |= 0xffffff & -((root_plt->offset + i * 4 + 8) >> 2);
+	      if (i == 5)
+		val |= plt_index * RELOC_SIZE (htab);
+	      if (i == 2 || i == 5)
+		bfd_put_32 (output_bfd, val, ptr);
+	      else
+		put_arm_insn (htab, output_bfd, val, ptr);
+	    }
+
+	  loc = (htab->srelplt2->contents
+		 + (plt_index * 2 + 1) * RELOC_SIZE (htab));
+
+	  /* Create the .rela.plt.unloaded R_ARM_ABS32 relocation
+	     referencing the GOT for this PLT entry.  */
+	  rel.r_offset = plt_address + 8;
+	  rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
+	  rel.r_addend = got_offset;
+	  SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+	  loc += RELOC_SIZE (htab);
+
+	  /* Create the R_ARM_ABS32 relocation referencing the
+	     beginning of the PLT for this GOT entry.  */
+	  rel.r_offset = got_address;
+	  rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
+	  rel.r_addend = 0;
+	  SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+	}
+      else
+	{
+	  /* Calculate the displacement between the PLT slot and the
+	     entry in the GOT.  The eight-byte offset accounts for the
+	     value produced by adding to pc in the first instruction
+	     of the PLT stub.  */
+	  got_displacement = got_address - (plt_address + 8);
+
+	  BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
+
+	  if (elf32_arm_plt_needs_thumb_stub_p (info, arm_plt))
+	    {
+	      put_thumb_insn (htab, output_bfd,
+			      elf32_arm_plt_thumb_stub[0], ptr - 4);
+	      put_thumb_insn (htab, output_bfd,
+			      elf32_arm_plt_thumb_stub[1], ptr - 2);
+	    }
+
+	  put_arm_insn (htab, output_bfd,
+			elf32_arm_plt_entry[0]
+			| ((got_displacement & 0x0ff00000) >> 20),
+			ptr + 0);
+	  put_arm_insn (htab, output_bfd,
+			elf32_arm_plt_entry[1]
+			| ((got_displacement & 0x000ff000) >> 12),
+			ptr+ 4);
+	  put_arm_insn (htab, output_bfd,
+			elf32_arm_plt_entry[2]
+			| (got_displacement & 0x00000fff),
+			ptr + 8);
+#ifdef FOUR_WORD_PLT
+	  bfd_put_32 (output_bfd, elf32_arm_plt_entry[3], ptr + 12);
+#endif
+	}
+
+      /* Fill in the entry in the .rel(a).(i)plt section.  */
+      rel.r_offset = got_address;
+      rel.r_addend = 0;
+      if (dynindx == -1)
+	{
+	  /* .igot.plt entries use IRELATIVE relocations against SYM_VALUE.
+	     The dynamic linker or static executable then calls SYM_VALUE
+	     to determine the correct run-time value of the .igot.plt entry.  */
+	  rel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
+	  initial_got_entry = sym_value;
+	}
+      else
+	{
+	  rel.r_info = ELF32_R_INFO (dynindx, R_ARM_JUMP_SLOT);
+	  initial_got_entry = (splt->output_section->vma
+			       + splt->output_offset);
+	}
+
+      /* Fill in the entry in the global offset table.  */
+      bfd_put_32 (output_bfd, initial_got_entry,
+		  sgot->contents + got_offset);
+    }
+
+  loc = srel->contents + plt_index * RELOC_SIZE (htab);
+  SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+}
+
 /* Some relocations map to different relocations depending on the
    target.  Return the real relocation.  */
 
@@ -6791,6 +7615,151 @@
   return bfd_reloc_ok;
 }
 
+/* Handle TLS relaxations.  Relaxing is possible for symbols that use
+   R_ARM_GOTDESC, R_ARM_{,THM_}TLS_CALL or
+   R_ARM_{,THM_}TLS_DESCSEQ relocations, during a static link.
+
+   Return bfd_reloc_ok if we're done, bfd_reloc_continue if the caller
+   is to then call final_link_relocate.  Return other values in the
+   case of error.
+
+   FIXME:When --emit-relocs is in effect, we'll emit relocs describing
+   the pre-relaxed code.  It would be nice if the relocs were updated
+   to match the optimization.   */
+
+static bfd_reloc_status_type 
+elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
+		     bfd *input_bfd, asection *input_sec, bfd_byte *contents, 
+		     Elf_Internal_Rela *rel, unsigned long is_local)
+{
+  unsigned long insn;
+  
+  switch (ELF32_R_TYPE (rel->r_info))
+    {
+    default:
+      return bfd_reloc_notsupported;
+      
+    case R_ARM_TLS_GOTDESC:
+      if (is_local)
+	insn = 0;
+      else
+	{
+	  insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	  if (insn & 1)
+	    insn -= 5; /* THUMB */
+	  else
+	    insn -= 8; /* ARM */
+	}
+      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+      return bfd_reloc_continue;
+
+    case R_ARM_THM_TLS_DESCSEQ:
+      /* Thumb insn.  */
+      insn = bfd_get_16 (input_bfd, contents + rel->r_offset);
+      if ((insn & 0xff78) == 0x4478)	  /* add rx, pc */
+	{
+	  if (is_local)
+	    /* nop */
+	    bfd_put_16 (input_bfd, 0x46c0, contents + rel->r_offset);
+	}
+      else if ((insn & 0xffc0) == 0x6840)  /* ldr rx,[ry,#4] */
+	{
+	  if (is_local)
+	    /* nop */
+	    bfd_put_16 (input_bfd, 0x46c0, contents + rel->r_offset);
+	  else
+	    /* ldr rx,[ry] */
+	    bfd_put_16 (input_bfd, insn & 0xf83f, contents + rel->r_offset);
+	}
+      else if ((insn & 0xff87) == 0x4780)  /* blx rx */
+	{
+	  if (is_local)
+	    /* nop */
+	    bfd_put_16 (input_bfd, 0x46c0, contents + rel->r_offset);
+	  else
+	    /* mov r0, rx */
+	    bfd_put_16 (input_bfd, 0x4600 | (insn & 0x78),
+			contents + rel->r_offset);
+	}
+      else
+	{
+	  if ((insn & 0xf000) == 0xf000 || (insn & 0xf800) == 0xe800)
+	    /* It's a 32 bit instruction, fetch the rest of it for
+	       error generation.  */
+	    insn = (insn << 16)
+	      | bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
+	  (*_bfd_error_handler)
+	    (_("%B(%A+0x%lx):unexpected Thumb instruction '0x%x' in TLS trampoline"),
+	     input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
+	  return bfd_reloc_notsupported;
+	}
+      break;
+      
+    case R_ARM_TLS_DESCSEQ:
+      /* arm insn.  */
+      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+      if ((insn & 0xffff0ff0) == 0xe08f0000) /* add rx,pc,ry */
+	{
+	  if (is_local)
+	    /* mov rx, ry */
+	    bfd_put_32 (input_bfd, 0xe1a00000 | (insn & 0xffff),
+			contents + rel->r_offset);
+	}
+      else if ((insn & 0xfff00fff) == 0xe5900004) /* ldr rx,[ry,#4]*/
+	{
+	  if (is_local)
+	    /* nop */
+	    bfd_put_32 (input_bfd, 0xe1a00000, contents + rel->r_offset);
+	  else
+	    /* ldr rx,[ry] */
+	    bfd_put_32 (input_bfd, insn & 0xfffff000,
+			contents + rel->r_offset);
+	}
+      else if ((insn & 0xfffffff0) == 0xe12fff30) /* blx rx */
+	{
+	  if (is_local)
+	    /* nop */
+	    bfd_put_32 (input_bfd, 0xe1a00000, contents + rel->r_offset);
+	  else
+	    /* mov r0, rx */
+	    bfd_put_32 (input_bfd, 0xe1a00000 | (insn & 0xf),
+			contents + rel->r_offset);
+	}
+      else
+	{
+	  (*_bfd_error_handler)
+	    (_("%B(%A+0x%lx):unexpected ARM instruction '0x%x' in TLS trampoline"),
+	     input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
+	  return bfd_reloc_notsupported;
+	}
+      break;
+
+    case R_ARM_TLS_CALL:
+      /* GD->IE relaxation, turn the instruction into 'nop' or
+	 'ldr r0, [pc,r0]'  */
+      insn = is_local ? 0xe1a00000 : 0xe79f0000;
+      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+      break;
+      
+    case R_ARM_THM_TLS_CALL:
+      /* GD->IE relaxation */
+      if (!is_local)
+	/* add r0,pc; ldr r0, [r0]  */
+	insn = 0x44786800;
+      else if (arch_has_thumb2_nop (globals))
+	/* nop.w */
+	insn = 0xf3af8000;
+      else
+	/* nop; nop */
+	insn = 0xbf00bf00;
+	
+      bfd_put_16 (input_bfd, insn >> 16, contents + rel->r_offset);
+      bfd_put_16 (input_bfd, insn & 0xffff, contents + rel->r_offset + 2);
+      break;
+    }
+  return bfd_reloc_ok;
+}
+
 /* For a given value of n, calculate the value of G_n as required to
    deal with group relocations.  We return it in the form of an
    encoded constant-and-rotation, together with the final residual.  If n is
@@ -6873,7 +7842,8 @@
 			       struct bfd_link_info *       info,
 			       asection *                   sym_sec,
 			       const char *                 sym_name,
-			       int		            sym_flags,
+			       unsigned char                st_type,
+			       enum arm_st_branch_type      branch_type,
 			       struct elf_link_hash_entry * h,
 			       bfd_boolean *                unresolved_reloc_p,
 			       char **                      error_message)
@@ -6881,14 +7851,23 @@
   unsigned long                 r_type = howto->type;
   unsigned long                 r_symndx;
   bfd_byte *                    hit_data = contents + rel->r_offset;
-  bfd *                         dynobj = NULL;
   bfd_vma *                     local_got_offsets;
-  asection *                    sgot = NULL;
-  asection *                    splt = NULL;
+  bfd_vma *                     local_tlsdesc_gotents;
+  asection *                    sgot;
+  asection *                    splt;
   asection *                    sreloc = NULL;
+  asection *                    srelgot;
   bfd_vma                       addend;
   bfd_signed_vma                signed_addend;
+  unsigned char                 dynreloc_st_type;
+  bfd_vma                       dynreloc_value;
   struct elf32_arm_link_hash_table * globals;
+  struct elf32_arm_link_hash_entry *eh;
+  union gotplt_union           *root_plt;
+  struct arm_plt_info          *arm_plt;
+  bfd_vma                       plt_offset;
+  bfd_vma                       gotplt_offset;
+  bfd_boolean                   has_iplt_entry;
 
   globals = elf32_arm_hash_table (info);
   if (globals == NULL)
@@ -6899,6 +7878,11 @@
   /* Some relocation types map to different relocations depending on the
      target.  We pick the right one here.  */
   r_type = arm_real_reloc_type (globals, r_type);
+
+  /* It is possible to have linker relaxations on some TLS access
+     models.  Update our information here.  */
+  r_type = elf32_arm_tls_transition (info, r_type, h);
+
   if (r_type != howto->type)
     howto = elf32_arm_howto_from_type (r_type);
 
@@ -6914,13 +7898,16 @@
   if (bfd_get_start_address (output_bfd) != 0)
     elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
 
-  dynobj = elf_hash_table (info)->dynobj;
-  if (dynobj)
-    {
-      sgot = bfd_get_section_by_name (dynobj, ".got");
-      splt = bfd_get_section_by_name (dynobj, ".plt");
-    }
+  eh = (struct elf32_arm_link_hash_entry *) h;
+  sgot = globals->root.sgot;
   local_got_offsets = elf_local_got_offsets (input_bfd);
+  local_tlsdesc_gotents = elf32_arm_local_tlsdesc_gotent (input_bfd);
+
+  if (globals->root.dynamic_sections_created)
+    srelgot = globals->root.srelgot;
+  else
+    srelgot = NULL;
+
   r_symndx = ELF32_R_SYM (rel->r_info);
 
   if (globals->use_rel)
@@ -6939,6 +7926,65 @@
   else
     addend = signed_addend = rel->r_addend;
 
+  /* Record the symbol information that should be used in dynamic
+     relocations.  */
+  dynreloc_st_type = st_type;
+  dynreloc_value = value;
+  if (branch_type == ST_BRANCH_TO_THUMB)
+    dynreloc_value |= 1;
+
+  /* Find out whether the symbol has a PLT.  Set ST_VALUE, BRANCH_TYPE and
+     VALUE appropriately for relocations that we resolve at link time.  */
+  has_iplt_entry = FALSE;
+  if (elf32_arm_get_plt_info (input_bfd, eh, r_symndx, &root_plt, &arm_plt)
+      && root_plt->offset != (bfd_vma) -1)
+    {
+      plt_offset = root_plt->offset;
+      gotplt_offset = arm_plt->got_offset;
+
+      if (h == NULL || eh->is_iplt)
+	{
+	  has_iplt_entry = TRUE;
+	  splt = globals->root.iplt;
+
+	  /* Populate .iplt entries here, because not all of them will
+	     be seen by finish_dynamic_symbol.  The lower bit is set if
+	     we have already populated the entry.  */
+	  if (plt_offset & 1)
+	    plt_offset--;
+	  else
+	    {
+	      elf32_arm_populate_plt_entry (output_bfd, info, root_plt, arm_plt,
+					    -1, dynreloc_value);
+	      root_plt->offset |= 1;
+	    }
+
+	  /* Static relocations always resolve to the .iplt entry.  */
+	  st_type = STT_FUNC;
+	  value = (splt->output_section->vma
+		   + splt->output_offset
+		   + plt_offset);
+	  branch_type = ST_BRANCH_TO_ARM;
+
+	  /* If there are non-call relocations that resolve to the .iplt
+	     entry, then all dynamic ones must too.  */
+	  if (arm_plt->noncall_refcount != 0)
+	    {
+	      dynreloc_st_type = st_type;
+	      dynreloc_value = value;
+	    }
+	}
+      else
+	/* We populate the .plt entry in finish_dynamic_symbol.  */
+	splt = globals->root.splt;
+    }
+  else
+    {
+      splt = NULL;
+      plt_offset = (bfd_vma) -1;
+      gotplt_offset = (bfd_vma) -1;
+    }
+
   switch (r_type)
     {
     case R_ARM_NONE:
@@ -6971,18 +8017,17 @@
 	   && r_type != R_ARM_CALL
 	   && r_type != R_ARM_JUMP24
 	   && r_type != R_ARM_PLT32)
-	  && h != NULL
-	  && splt != NULL
-	  && h->plt.offset != (bfd_vma) -1)
+	  && plt_offset != (bfd_vma) -1)
 	{
-	  /* If we've created a .plt section, and assigned a PLT entry to
-	     this function, it should not be known to bind locally.  If
-	     it were, we would have cleared the PLT entry.  */
-	  BFD_ASSERT (!SYMBOL_CALLS_LOCAL (info, h));
+	  /* If we've created a .plt section, and assigned a PLT entry
+	     to this function, it must either be a STT_GNU_IFUNC reference
+	     or not be known to bind locally.  In other cases, we should
+	     have cleared the PLT entry by now.  */
+	  BFD_ASSERT (has_iplt_entry || !SYMBOL_CALLS_LOCAL (info, h));
 
 	  value = (splt->output_section->vma
 		   + splt->output_offset
-		   + h->plt.offset);
+		   + plt_offset);
 	  *unresolved_reloc_p = FALSE;
 	  return _bfd_final_link_relocate (howto, input_bfd, input_section,
 					   contents, rel->r_offset, value,
@@ -7010,12 +8055,11 @@
 	  && r_type != R_ARM_PLT32)
 	{
 	  Elf_Internal_Rela outrel;
-	  bfd_byte *loc;
 	  bfd_boolean skip, relocate;
 
 	  *unresolved_reloc_p = FALSE;
 
-	  if (sreloc == NULL)
+	  if (sreloc == NULL && globals->root.dynamic_sections_created)
 	    {
 	      sreloc = _bfd_elf_get_dynamic_reloc_section (input_bfd, input_section,
 							   ! globals->use_rel);
@@ -7051,8 +8095,7 @@
 	      int symbol;
 
 	      /* This symbol is local, or marked to become local.  */
-	      if (sym_flags == STT_ARM_TFUNC)
-		value |= 1;
+	      BFD_ASSERT (r_type == R_ARM_ABS32 || r_type == R_ARM_ABS32_NOI);
 	      if (globals->symbian_p)
 		{
 		  asection *osec;
@@ -7092,16 +8135,21 @@
 		   relocate the text and data segments independently,
 		   so the symbol does not matter.  */
 		symbol = 0;
-	      outrel.r_info = ELF32_R_INFO (symbol, R_ARM_RELATIVE);
+	      if (dynreloc_st_type == STT_GNU_IFUNC)
+		/* We have an STT_GNU_IFUNC symbol that doesn't resolve
+		   to the .iplt entry.  Instead, every non-call reference
+		   must use an R_ARM_IRELATIVE relocation to obtain the
+		   correct run-time address.  */
+		outrel.r_info = ELF32_R_INFO (symbol, R_ARM_IRELATIVE);
+	      else
+		outrel.r_info = ELF32_R_INFO (symbol, R_ARM_RELATIVE);
 	      if (globals->use_rel)
 		relocate = TRUE;
 	      else
-		outrel.r_addend += value;
+		outrel.r_addend += dynreloc_value;
 	    }
 
-	  loc = sreloc->contents;
-	  loc += sreloc->reloc_count++ * RELOC_SIZE (globals);
-	  SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+	  elf32_arm_add_dynreloc (output_bfd, info, sreloc, &outrel);
 
 	  /* If this reloc is against an external symbol, we do not want to
 	     fiddle with the addend.  Otherwise, we need to include the symbol
@@ -7110,8 +8158,8 @@
 	    return bfd_reloc_ok;
 
 	  return _bfd_final_link_relocate (howto, input_bfd, input_section,
-					   contents, rel->r_offset, value,
-					   (bfd_vma) 0);
+					   contents, rel->r_offset,
+					   dynreloc_value, (bfd_vma) 0);
 	}
       else switch (r_type)
 	{
@@ -7131,7 +8179,7 @@
 	      /* Check for Arm calling Arm function.  */
 	      /* FIXME: Should we translate the instruction into a BL
 		 instruction instead ?  */
-	      if (sym_flags != STT_ARM_TFUNC)
+	      if (branch_type != ST_BRANCH_TO_THUMB)
 		(*_bfd_error_handler)
 		  (_("\%B: Warning: Arm BLX instruction targets Arm function '%s'."),
 		   input_bfd,
@@ -7140,7 +8188,7 @@
 	  else if (r_type == R_ARM_PC24)
 	    {
 	      /* Check for Arm calling Thumb function.  */
-	      if (sym_flags == STT_ARM_TFUNC)
+	      if (branch_type == ST_BRANCH_TO_THUMB)
 		{
 		  if (elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
 					       output_bfd, input_section,
@@ -7164,8 +8212,8 @@
 
 	      hash = (struct elf32_arm_link_hash_entry *) h;
 	      stub_type = arm_type_of_stub (info, input_section, rel,
-					    &sym_flags, hash,
-					    value, sym_sec,
+					    st_type, &branch_type,
+					    hash, value, sym_sec,
 					    input_bfd, sym_name);
 
 	      if (stub_type != arm_stub_none)
@@ -7177,26 +8225,29 @@
 							 sym_sec, h,
 							 rel, globals,
 							 stub_type);
-		  if (stub_entry != NULL)
-		    value = (stub_entry->stub_offset
-			     + stub_entry->stub_sec->output_offset
-			     + stub_entry->stub_sec->output_section->vma);
+		  {
+		    if (stub_entry != NULL)
+		      value = (stub_entry->stub_offset
+			       + stub_entry->stub_sec->output_offset
+			       + stub_entry->stub_sec->output_section->vma);
+
+		    if (plt_offset != (bfd_vma) -1)
+		      *unresolved_reloc_p = FALSE;
+		  }
 		}
 	      else
 		{
 		  /* If the call goes through a PLT entry, make sure to
 		     check distance to the right destination address.  */
-		  if (h != NULL
-		      && splt != NULL
-		      && h->plt.offset != (bfd_vma) -1)
+		  if (plt_offset != (bfd_vma) -1)
 		    {
 		      value = (splt->output_section->vma
 			       + splt->output_offset
-			       + h->plt.offset);
+			       + plt_offset);
 		      *unresolved_reloc_p = FALSE;
 		      /* The PLT entry is in ARM mode, regardless of the
 			 target function.  */
-		      sym_flags = STT_FUNC;
+		      branch_type = ST_BRANCH_TO_ARM;
 		    }
 		}
 	    }
@@ -7238,7 +8289,7 @@
 	     The jump to the next instruction is optimized as a NOP depending
 	     on the architecture.  */
 	  if (h ? (h->root.type == bfd_link_hash_undefweak
-		   && !(splt != NULL && h->plt.offset != (bfd_vma) -1))
+		   && plt_offset == (bfd_vma) -1)
 	      : r_symndx != STN_UNDEF && bfd_is_und_section (sym_sec))
 	    {
 	      value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000);
@@ -7263,7 +8314,7 @@
 	      if (r_type == R_ARM_CALL)
 		{
 		  /* Set the H bit in the BLX instruction.  */
-		  if (sym_flags == STT_ARM_TFUNC)
+		  if (branch_type == ST_BRANCH_TO_THUMB)
 		    {
 		      if (addend)
 			value |= (1 << 24);
@@ -7274,9 +8325,9 @@
 		  /* Select the correct instruction (BL or BLX).  */
 		  /* Only if we are not handling a BL to a stub. In this
 		     case, mode switching is performed by the stub.  */
-		  if (sym_flags == STT_ARM_TFUNC && !stub_entry)
+		  if (branch_type == ST_BRANCH_TO_THUMB && !stub_entry)
 		    value |= (1 << 28);
-		  else
+		  else if (stub_entry || branch_type != ST_BRANCH_UNKNOWN)
 		    {
 		      value &= ~(bfd_vma)(1 << 28);
 		      value |= (1 << 24);
@@ -7288,7 +8339,7 @@
 
 	case R_ARM_ABS32:
 	  value += addend;
-	  if (sym_flags == STT_ARM_TFUNC)
+	  if (branch_type == ST_BRANCH_TO_THUMB)
 	    value |= 1;
 	  break;
 
@@ -7298,7 +8349,7 @@
 
 	case R_ARM_REL32:
 	  value += addend;
-	  if (sym_flags == STT_ARM_TFUNC)
+	  if (branch_type == ST_BRANCH_TO_THUMB)
 	    value |= 1;
 	  value -= (input_section->output_section->vma
 		    + input_section->output_offset + rel->r_offset);
@@ -7322,7 +8373,7 @@
 	    }
 	  value &= 0x7fffffff;
 	  value |= (bfd_get_32 (input_bfd, hit_data) & 0x80000000);
-	  if (sym_flags == STT_ARM_TFUNC)
+	  if (branch_type == ST_BRANCH_TO_THUMB)
 	    value |= 1;
 	  break;
 	}
@@ -7503,7 +8554,7 @@
 	   The jump to the next instruction is optimized as a NOP.W for
 	   Thumb-2 enabled architectures.  */
 	if (h && h->root.type == bfd_link_hash_undefweak
-	    && !(splt != NULL && h->plt.offset != (bfd_vma) -1))
+	    && plt_offset == (bfd_vma) -1)
 	  {
 	    if (arch_has_thumb2_nop (globals))
 	      {
@@ -7542,7 +8593,7 @@
 	    /* Check for Thumb to Thumb call.  */
 	    /* FIXME: Should we translate the instruction into a BL
 	       instruction instead ?  */
-	    if (sym_flags == STT_ARM_TFUNC)
+	    if (branch_type == ST_BRANCH_TO_THUMB)
 	      (*_bfd_error_handler)
 		(_("%B: Warning: Thumb BLX instruction targets thumb function '%s'."),
 		 input_bfd,
@@ -7554,9 +8605,7 @@
 	       If it is a call relative to a section name, then it is not a
 	       function call at all, but rather a long jump.  Calls through
 	       the PLT do not require stubs.  */
-	    if (sym_flags != STT_ARM_TFUNC && sym_flags != STT_SECTION
-		&& (h == NULL || splt == NULL
-		    || h->plt.offset == (bfd_vma) -1))
+	    if (branch_type == ST_BRANCH_TO_ARM && plt_offset == (bfd_vma) -1)
 	      {
 		if (globals->use_blx && r_type == R_ARM_THM_CALL)
 		  {
@@ -7575,7 +8624,8 @@
 		      return bfd_reloc_dangerous;
 		  }
 	      }
-	    else if (sym_flags == STT_ARM_TFUNC && globals->use_blx
+	    else if (branch_type == ST_BRANCH_TO_THUMB
+		     && globals->use_blx
 		     && r_type == R_ARM_THM_CALL)
 	      {
 		/* Make sure this is a BL.  */
@@ -7594,7 +8644,8 @@
 	    hash = (struct elf32_arm_link_hash_entry *) h;
 
 	    stub_type = arm_type_of_stub (info, input_section, rel,
-					  &sym_flags, hash, value, sym_sec,
+					  st_type, &branch_type,
+					  hash, value, sym_sec,
 					  input_bfd, sym_name);
 
 	    if (stub_type != arm_stub_none)
@@ -7607,30 +8658,32 @@
 						       rel, globals,
 						       stub_type);
 		if (stub_entry != NULL)
-		  value = (stub_entry->stub_offset
-			   + stub_entry->stub_sec->output_offset
-			   + stub_entry->stub_sec->output_section->vma);
+		  {
+		    value = (stub_entry->stub_offset
+			     + stub_entry->stub_sec->output_offset
+			     + stub_entry->stub_sec->output_section->vma);
+
+		    if (plt_offset != (bfd_vma) -1)
+		      *unresolved_reloc_p = FALSE;
+		  }
 
 		/* If this call becomes a call to Arm, force BLX.  */
 		if (globals->use_blx && (r_type == R_ARM_THM_CALL))
 		  {
 		    if ((stub_entry
 			 && !arm_stub_is_thumb (stub_entry->stub_type))
-			|| (sym_flags != STT_ARM_TFUNC))
+			|| branch_type != ST_BRANCH_TO_THUMB)
 		      lower_insn = (lower_insn & ~0x1000) | 0x0800;
 		  }
 	      }
 	  }
 
 	/* Handle calls via the PLT.  */
-	if (stub_type == arm_stub_none
-	    && h != NULL
-	    && splt != NULL
-	    && h->plt.offset != (bfd_vma) -1)
+	if (stub_type == arm_stub_none && plt_offset != (bfd_vma) -1)
 	  {
 	    value = (splt->output_section->vma
 		     + splt->output_offset
-		     + h->plt.offset);
+		     + plt_offset);
 
 	    if (globals->use_blx && r_type == R_ARM_THM_CALL)
 	      {
@@ -7638,13 +8691,13 @@
 		   the BL to a BLX instruction to call the ARM-mode
 		   PLT entry.  */
 		lower_insn = (lower_insn & ~0x1000) | 0x0800;
-		sym_flags = STT_FUNC;
+		branch_type = ST_BRANCH_TO_ARM;
 	      }
 	    else
 	      {
 		/* Target the Thumb stub before the ARM PLT entry.  */
 		value -= PLT_THUMB_STUB_SIZE;
-		sym_flags = STT_ARM_TFUNC;
+		branch_type = ST_BRANCH_TO_THUMB;
 	      }
 	    *unresolved_reloc_p = FALSE;
 	  }
@@ -7735,11 +8788,11 @@
 	  }
 
 	/* Handle calls via the PLT.  */
-	if (h != NULL && splt != NULL && h->plt.offset != (bfd_vma) -1)
+	if (plt_offset != (bfd_vma) -1)
 	  {
 	    value = (splt->output_section->vma
 		     + splt->output_offset
-		     + h->plt.offset);
+		     + plt_offset);
 	    /* Target the Thumb stub before the ARM PLT entry.  */
 	    value -= PLT_THUMB_STUB_SIZE;
 	    *unresolved_reloc_p = FALSE;
@@ -7872,7 +8925,7 @@
       /* 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)
+      if (branch_type == ST_BRANCH_TO_THUMB)
 	value += 1;
 
       /* Note that sgot->output_offset is not involved in this
@@ -7905,48 +8958,82 @@
       if (sgot == NULL)
 	return bfd_reloc_notsupported;
 
-      if (h != NULL)
+      if (dynreloc_st_type == STT_GNU_IFUNC
+	  && plt_offset != (bfd_vma) -1
+	  && (h == NULL || SYMBOL_REFERENCES_LOCAL (info, h)))
+	{
+	  /* We have a relocation against a locally-binding STT_GNU_IFUNC
+	     symbol, and the relocation resolves directly to the runtime
+	     target rather than to the .iplt entry.  This means that any
+	     .got entry would be the same value as the .igot.plt entry,
+	     so there's no point creating both.  */
+	  sgot = globals->root.igotplt;
+	  value = sgot->output_offset + gotplt_offset;
+	}
+      else if (h != NULL)
 	{
 	  bfd_vma off;
-	  bfd_boolean dyn;
 
 	  off = h->got.offset;
 	  BFD_ASSERT (off != (bfd_vma) -1);
-	  dyn = globals->root.dynamic_sections_created;
-
-	  if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
-	      || (info->shared
-		  && SYMBOL_REFERENCES_LOCAL (info, h))
-	      || (ELF_ST_VISIBILITY (h->other)
-		  && h->root.type == bfd_link_hash_undefweak))
+	  if ((off & 1) != 0)
 	    {
-	      /* This is actually a static link, or it is a -Bsymbolic link
-		 and the symbol is defined locally.  We must initialize this
-		 entry in the global offset table.  Since the offset must
-		 always be a multiple of 4, we use the least significant bit
-		 to record whether we have initialized it already.
-
-		 When doing a dynamic link, we create a .rel(a).got relocation
-		 entry to initialize the value.  This is done in the
-		 finish_dynamic_symbol routine.  */
-	      if ((off & 1) != 0)
-		off &= ~1;
-	      else
-		{
-		  /* 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)
-		    value |= 1;
-
-		  bfd_put_32 (output_bfd, value, sgot->contents + off);
-		  h->got.offset |= 1;
-		}
+	      /* We have already processsed one GOT relocation against
+		 this symbol.  */
+	      off &= ~1;
+	      if (globals->root.dynamic_sections_created
+		  && !SYMBOL_REFERENCES_LOCAL (info, h))
+		*unresolved_reloc_p = FALSE;
 	    }
 	  else
-	    *unresolved_reloc_p = FALSE;
+	    {
+	      Elf_Internal_Rela outrel;
 
+	      if (!SYMBOL_REFERENCES_LOCAL (info, h))
+		{
+		  /* If the symbol doesn't resolve locally in a static
+		     object, we have an undefined reference.  If the
+		     symbol doesn't resolve locally in a dynamic object,
+		     it should be resolved by the dynamic linker.  */
+		  if (globals->root.dynamic_sections_created)
+		    {
+		      outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
+		      *unresolved_reloc_p = FALSE;
+		    }
+		  else
+		    outrel.r_info = 0;
+		  outrel.r_addend = 0;
+		}
+	      else
+		{
+		  if (dynreloc_st_type == STT_GNU_IFUNC)
+ 		    outrel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
+		  else if (info->shared)
+ 		    outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ 		  else
+ 		    outrel.r_info = 0;
+		  outrel.r_addend = dynreloc_value;
+		}
+
+	      /* The GOT entry is initialized to zero by default.
+		 See if we should install a different value.  */
+	      if (outrel.r_addend != 0
+		  && (outrel.r_info == 0 || globals->use_rel))
+		{
+		  bfd_put_32 (output_bfd, outrel.r_addend,
+			      sgot->contents + off);
+		  outrel.r_addend = 0;
+		}
+
+	      if (outrel.r_info != 0)
+		{
+		  outrel.r_offset = (sgot->output_section->vma
+				     + sgot->output_offset
+				     + off);
+		  elf32_arm_add_dynreloc (output_bfd, info, srelgot, &outrel);
+		}
+	      h->got.offset |= 1;
+	    }
 	  value = sgot->output_offset + off;
 	}
       else
@@ -7965,34 +9052,22 @@
 	    off &= ~1;
 	  else
 	    {
-	      /* 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)
-		value |= 1;
-
 	      if (globals->use_rel)
-		bfd_put_32 (output_bfd, value, sgot->contents + off);
+		bfd_put_32 (output_bfd, dynreloc_value, sgot->contents + off);
 
-	      if (info->shared)
+	      if (info->shared || dynreloc_st_type == STT_GNU_IFUNC)
 		{
-		  asection * srelgot;
 		  Elf_Internal_Rela outrel;
-		  bfd_byte *loc;
 
-		  srelgot = (bfd_get_section_by_name
-			     (dynobj, RELOC_SECTION (globals, ".got")));
-		  BFD_ASSERT (srelgot != NULL);
-
-		  outrel.r_addend = addend + value;
+		  outrel.r_addend = addend + dynreloc_value;
 		  outrel.r_offset = (sgot->output_section->vma
 				     + sgot->output_offset
 				     + off);
-		  outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
-		  loc = srelgot->contents;
-		  loc += srelgot->reloc_count++ * RELOC_SIZE (globals);
-		  SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+		  if (dynreloc_st_type == STT_GNU_IFUNC)
+ 		    outrel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
+		  else
+		    outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+		  elf32_arm_add_dynreloc (output_bfd, info, srelgot, &outrel);
 		}
 
 	      local_got_offsets[r_symndx] |= 1;
@@ -8018,7 +9093,7 @@
       {
 	bfd_vma off;
 
-	if (globals->sgot == NULL)
+	if (sgot == NULL)
 	  abort ();
 
 	off = globals->tls_ldm_got.offset;
@@ -8032,31 +9107,28 @@
 	    if (info->shared)
 	      {
 		Elf_Internal_Rela outrel;
-		bfd_byte *loc;
 
-		if (globals->srelgot == NULL)
+		if (srelgot == NULL)
 		  abort ();
 
 		outrel.r_addend = 0;
-		outrel.r_offset = (globals->sgot->output_section->vma
-				   + globals->sgot->output_offset + off);
+		outrel.r_offset = (sgot->output_section->vma
+				   + sgot->output_offset + off);
 		outrel.r_info = ELF32_R_INFO (0, R_ARM_TLS_DTPMOD32);
 
 		if (globals->use_rel)
 		  bfd_put_32 (output_bfd, outrel.r_addend,
-			      globals->sgot->contents + off);
+			      sgot->contents + off);
 
-		loc = globals->srelgot->contents;
-		loc += globals->srelgot->reloc_count++ * RELOC_SIZE (globals);
-		SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+		elf32_arm_add_dynreloc (output_bfd, info, srelgot, &outrel);
 	      }
 	    else
-	      bfd_put_32 (output_bfd, 1, globals->sgot->contents + off);
+	      bfd_put_32 (output_bfd, 1, sgot->contents + off);
 
 	    globals->tls_ldm_got.offset |= 1;
 	  }
 
-	value = globals->sgot->output_section->vma + globals->sgot->output_offset + off
+	value = sgot->output_section->vma + sgot->output_offset + off
 	  - (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
 
 	return _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -8064,17 +9136,20 @@
 					 rel->r_addend);
       }
 
+    case R_ARM_TLS_CALL:
+    case R_ARM_THM_TLS_CALL:
     case R_ARM_TLS_GD32:
     case R_ARM_TLS_IE32:
+    case R_ARM_TLS_GOTDESC:
+    case R_ARM_TLS_DESCSEQ:
+    case R_ARM_THM_TLS_DESCSEQ:
       {
-	bfd_vma off;
-	int indx;
+	bfd_vma off, offplt;
+	int indx = 0;
 	char tls_type;
 
-	if (globals->sgot == NULL)
-	  abort ();
+	BFD_ASSERT (sgot != NULL);
 
-	indx = 0;
 	if (h != NULL)
 	  {
 	    bfd_boolean dyn;
@@ -8087,18 +9162,23 @@
 		indx = h->dynindx;
 	      }
 	    off = h->got.offset;
+	    offplt = elf32_arm_hash_entry (h)->tlsdesc_got;
 	    tls_type = ((struct elf32_arm_link_hash_entry *) h)->tls_type;
 	  }
 	else
 	  {
-	    if (local_got_offsets == NULL)
-	      abort ();
+	    BFD_ASSERT (local_got_offsets != NULL);
 	    off = local_got_offsets[r_symndx];
+	    offplt = local_tlsdesc_gotents[r_symndx];
 	    tls_type = elf32_arm_local_got_tls_type (input_bfd)[r_symndx];
 	  }
 
-	if (tls_type == GOT_UNKNOWN)
-	  abort ();
+	/* Linker relaxations happens from one of the
+	   R_ARM_{GOTDESC,CALL,DESCSEQ} relocations to IE or LE.  */ 
+	if (ELF32_R_TYPE(rel->r_info) != r_type)
+	  tls_type = GOT_TLS_IE; 
+
+	BFD_ASSERT (tls_type != GOT_UNKNOWN);
 
 	if ((off & 1) != 0)
 	  off &= ~1;
@@ -8106,7 +9186,6 @@
 	  {
 	    bfd_boolean need_relocs = FALSE;
 	    Elf_Internal_Rela outrel;
-	    bfd_byte *loc = NULL;
 	    int cur_off = off;
 
 	    /* The GOT entries have not been initialized yet.  Do it
@@ -8119,33 +9198,70 @@
 		    || h->root.type != bfd_link_hash_undefweak))
 	      {
 		need_relocs = TRUE;
-		if (globals->srelgot == NULL)
-		  abort ();
-		loc = globals->srelgot->contents;
-		loc += globals->srelgot->reloc_count * RELOC_SIZE (globals);
+		BFD_ASSERT (srelgot != NULL);
 	      }
 
+	    if (tls_type & GOT_TLS_GDESC)
+	      {
+		bfd_byte *loc;
+
+		/* We should have relaxed, unless this is an undefined
+		   weak symbol.  */
+		BFD_ASSERT ((h && (h->root.type == bfd_link_hash_undefweak))
+			    || info->shared);
+		BFD_ASSERT (globals->sgotplt_jump_table_size + offplt + 8
+                            <= globals->root.sgotplt->size);
+
+		outrel.r_addend = 0;
+		outrel.r_offset = (globals->root.sgotplt->output_section->vma
+				   + globals->root.sgotplt->output_offset
+				   + offplt
+				   + globals->sgotplt_jump_table_size);
+		
+		outrel.r_info = ELF32_R_INFO (indx, R_ARM_TLS_DESC);
+		sreloc = globals->root.srelplt;
+		loc = sreloc->contents;
+		loc += globals->next_tls_desc_index++ * RELOC_SIZE (globals);
+		BFD_ASSERT (loc + RELOC_SIZE (globals)
+		   	   <= sreloc->contents + sreloc->size);
+
+		SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+
+		/* For globals, the first word in the relocation gets
+		   the relocation index and the top bit set, or zero,
+		   if we're binding now.  For locals, it gets the
+		   symbol's offset in the tls section.  */
+	    	bfd_put_32 (output_bfd,
+			    !h ? value - elf_hash_table (info)->tls_sec->vma
+			    : info->flags & DF_BIND_NOW ? 0
+			    : 0x80000000 | ELF32_R_SYM (outrel.r_info),
+			    globals->root.sgotplt->contents + offplt +
+			    globals->sgotplt_jump_table_size);
+		
+		/* Second word in the relocation is always zero.  */
+	    	bfd_put_32 (output_bfd, 0,
+			    globals->root.sgotplt->contents + offplt +
+			    globals->sgotplt_jump_table_size + 4);
+	      }
 	    if (tls_type & GOT_TLS_GD)
 	      {
 		if (need_relocs)
 		  {
 		    outrel.r_addend = 0;
-		    outrel.r_offset = (globals->sgot->output_section->vma
-				       + globals->sgot->output_offset
+		    outrel.r_offset = (sgot->output_section->vma
+				       + sgot->output_offset
 				       + cur_off);
 		    outrel.r_info = ELF32_R_INFO (indx, R_ARM_TLS_DTPMOD32);
 
 		    if (globals->use_rel)
 		      bfd_put_32 (output_bfd, outrel.r_addend,
-				  globals->sgot->contents + cur_off);
+				  sgot->contents + cur_off);
 
-		    SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
-		    globals->srelgot->reloc_count++;
-		    loc += RELOC_SIZE (globals);
+		    elf32_arm_add_dynreloc (output_bfd, info, srelgot, &outrel);
 
 		    if (indx == 0)
 		      bfd_put_32 (output_bfd, value - dtpoff_base (info),
-				  globals->sgot->contents + cur_off + 4);
+				  sgot->contents + cur_off + 4);
 		    else
 		      {
 			outrel.r_addend = 0;
@@ -8155,12 +9271,10 @@
 
 			if (globals->use_rel)
 			  bfd_put_32 (output_bfd, outrel.r_addend,
-				      globals->sgot->contents + cur_off + 4);
+				      sgot->contents + cur_off + 4);
 
-
-			SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
-			globals->srelgot->reloc_count++;
-			loc += RELOC_SIZE (globals);
+			elf32_arm_add_dynreloc (output_bfd, info,
+						srelgot, &outrel);
 		      }
 		  }
 		else
@@ -8171,9 +9285,9 @@
 		       symbol binding locally.  Mark it as belonging
 		       to module 1, the executable.  */
 		    bfd_put_32 (output_bfd, 1,
-				globals->sgot->contents + cur_off);
+				sgot->contents + cur_off);
 		    bfd_put_32 (output_bfd, value - dtpoff_base (info),
-				globals->sgot->contents + cur_off + 4);
+				sgot->contents + cur_off + 4);
 		  }
 
 		cur_off += 8;
@@ -8187,22 +9301,20 @@
 		      outrel.r_addend = value - dtpoff_base (info);
 		    else
 		      outrel.r_addend = 0;
-		    outrel.r_offset = (globals->sgot->output_section->vma
-				       + globals->sgot->output_offset
+		    outrel.r_offset = (sgot->output_section->vma
+				       + sgot->output_offset
 				       + cur_off);
 		    outrel.r_info = ELF32_R_INFO (indx, R_ARM_TLS_TPOFF32);
 
 		    if (globals->use_rel)
 		      bfd_put_32 (output_bfd, outrel.r_addend,
-				  globals->sgot->contents + cur_off);
+				  sgot->contents + cur_off);
 
-		    SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
-		    globals->srelgot->reloc_count++;
-		    loc += RELOC_SIZE (globals);
+		    elf32_arm_add_dynreloc (output_bfd, info, srelgot, &outrel);
 		  }
 		else
 		  bfd_put_32 (output_bfd, tpoff (info, value),
-			      globals->sgot->contents + cur_off);
+			      sgot->contents + cur_off);
 		cur_off += 4;
 	      }
 
@@ -8214,8 +9326,155 @@
 
 	if ((tls_type & GOT_TLS_GD) && r_type != R_ARM_TLS_GD32)
 	  off += 8;
-	value = globals->sgot->output_section->vma + globals->sgot->output_offset + off
-	  - (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
+	else if (tls_type & GOT_TLS_GDESC)
+	  off = offplt;
+
+	if (ELF32_R_TYPE(rel->r_info) == R_ARM_TLS_CALL
+	    || ELF32_R_TYPE(rel->r_info) == R_ARM_THM_TLS_CALL)
+	  {
+	    bfd_signed_vma offset;
+	    /* TLS stubs are arm mode.  The original symbol is a
+	       data object, so branch_type is bogus.  */
+	    branch_type = ST_BRANCH_TO_ARM;
+	    enum elf32_arm_stub_type stub_type
+	      = arm_type_of_stub (info, input_section, rel,
+				  st_type, &branch_type,
+				  (struct elf32_arm_link_hash_entry *)h,
+				  globals->tls_trampoline, globals->root.splt,
+				  input_bfd, sym_name);
+
+	    if (stub_type != arm_stub_none)
+	      {
+		struct elf32_arm_stub_hash_entry *stub_entry
+		  = elf32_arm_get_stub_entry
+		  (input_section, globals->root.splt, 0, rel,
+		   globals, stub_type);
+		offset = (stub_entry->stub_offset
+			  + stub_entry->stub_sec->output_offset
+			  + stub_entry->stub_sec->output_section->vma);
+	      }
+	    else
+	      offset = (globals->root.splt->output_section->vma
+			+ globals->root.splt->output_offset
+			+ globals->tls_trampoline);
+
+	    if (ELF32_R_TYPE(rel->r_info) == R_ARM_TLS_CALL)
+	      {
+		unsigned long inst;
+		
+		offset -= (input_section->output_section->vma +
+			   input_section->output_offset + rel->r_offset + 8);
+
+		inst = offset >> 2;
+		inst &= 0x00ffffff;
+		value = inst | (globals->use_blx ? 0xfa000000 : 0xeb000000);
+	      }
+	    else
+	      {
+		/* Thumb blx encodes the offset in a complicated
+		   fashion.  */
+		unsigned upper_insn, lower_insn;
+		unsigned neg;
+
+		offset -= (input_section->output_section->vma + 
+			   input_section->output_offset
+			   + rel->r_offset + 4);
+	    
+		if (stub_type != arm_stub_none
+		    && arm_stub_is_thumb (stub_type))
+		  {
+		    lower_insn = 0xd000;
+		  }
+		else
+		  {
+		    lower_insn = 0xc000;
+		    /* Round up the offset to a word boundary */
+		    offset = (offset + 2) & ~2;
+		  }
+
+		neg = offset < 0;
+		upper_insn = (0xf000
+			      | ((offset >> 12) & 0x3ff)
+			      | (neg << 10));
+		lower_insn |= (((!((offset >> 23) & 1)) ^ neg) << 13)
+			      | (((!((offset >> 22) & 1)) ^ neg) << 11)
+			      | ((offset >> 1) & 0x7ff);
+		bfd_put_16 (input_bfd, upper_insn, hit_data);
+		bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
+		return bfd_reloc_ok;
+	      }
+	  }
+	/* These relocations needs special care, as besides the fact
+	   they point somewhere in .gotplt, the addend must be
+	   adjusted accordingly depending on the type of instruction
+	   we refer to */
+	else if ((r_type == R_ARM_TLS_GOTDESC) && (tls_type & GOT_TLS_GDESC))
+	  {
+	    unsigned long data, insn;
+	    unsigned thumb;
+	    
+	    data = bfd_get_32 (input_bfd, hit_data);
+	    thumb = data & 1;
+	    data &= ~1u;
+	    
+	    if (thumb)
+	      {
+		insn = bfd_get_16 (input_bfd, contents + rel->r_offset - data);
+		if ((insn & 0xf000) == 0xf000 || (insn & 0xf800) == 0xe800)
+		  insn = (insn << 16)
+		    | bfd_get_16 (input_bfd,
+				  contents + rel->r_offset - data + 2);
+		if ((insn & 0xf800c000) == 0xf000c000)
+		  /* bl/blx */
+		  value = -6;
+		else if ((insn & 0xffffff00) == 0x4400)
+		  /* add */
+		  value = -5;
+		else
+		  {
+		    (*_bfd_error_handler)
+		      (_("%B(%A+0x%lx):unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"),
+		       input_bfd, input_section,
+		       (unsigned long)rel->r_offset, insn);
+		    return bfd_reloc_notsupported;
+		  }
+	      }
+	    else
+	      {
+		insn = bfd_get_32 (input_bfd, contents + rel->r_offset - data);
+
+		switch (insn >> 24)
+		  {
+		  case 0xeb:  /* bl */
+		  case 0xfa:  /* blx */
+		    value = -4;
+		    break;
+
+		  case 0xe0:	/* add */
+		    value = -8;
+		    break;
+		    
+		  default:
+		    (*_bfd_error_handler)
+		      (_("%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"),
+		       input_bfd, input_section,
+		       (unsigned long)rel->r_offset, insn);
+		    return bfd_reloc_notsupported;
+		  }
+	      }
+ 
+	    value += ((globals->root.sgotplt->output_section->vma
+		       + globals->root.sgotplt->output_offset + off)
+		      - (input_section->output_section->vma
+			 + input_section->output_offset
+			 + rel->r_offset)
+		      + globals->sgotplt_jump_table_size);
+	  }
+	else
+	  value = ((globals->root.sgot->output_section->vma
+		    + globals->root.sgot->output_offset + off)
+		   - (input_section->output_section->vma
+		      + input_section->output_offset + rel->r_offset));
 
 	return _bfd_final_link_relocate (howto, input_bfd, input_section,
 					 contents, rel->r_offset, value,
@@ -8223,7 +9482,7 @@
       }
 
     case R_ARM_TLS_LE32:
-      if (info->shared)
+      if (info->shared && !info->pie)
 	{
 	  (*_bfd_error_handler)
 	    (_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
@@ -8297,7 +9556,7 @@
 	if (r_type == R_ARM_MOVW_BREL && value >= 0x10000)
           return bfd_reloc_overflow;
 
-	if (sym_flags == STT_ARM_TFUNC)
+	if (branch_type == ST_BRANCH_TO_THUMB)
 	  value |= 1;
 
 	if (r_type == R_ARM_MOVT_ABS || r_type == R_ARM_MOVT_PREL
@@ -8347,7 +9606,7 @@
 	if (r_type == R_ARM_THM_MOVW_BREL && value >= 0x10000)
           return bfd_reloc_overflow;
 
-	if (sym_flags == STT_ARM_TFUNC)
+	if (branch_type == ST_BRANCH_TO_THUMB)
 	  value |= 1;
 
 	if (r_type == R_ARM_THM_MOVT_ABS || r_type == R_ARM_THM_MOVT_PREL
@@ -8464,7 +9723,7 @@
 
         /* If the target symbol is a Thumb function, then set the
            Thumb bit in the address.  */
-	if (sym_flags == STT_ARM_TFUNC)
+	if (branch_type == ST_BRANCH_TO_THUMB)
 	  signed_value |= 1;
 
         /* Calculate the value of the relevant G_n, in encoded
@@ -8843,7 +10102,16 @@
    || (R_TYPE) == R_ARM_TLS_DTPMOD32	\
    || (R_TYPE) == R_ARM_TLS_TPOFF32	\
    || (R_TYPE) == R_ARM_TLS_LE32	\
-   || (R_TYPE) == R_ARM_TLS_IE32)
+   || (R_TYPE) == R_ARM_TLS_IE32	\
+   || IS_ARM_TLS_GNU_RELOC (R_TYPE))
+
+/* Specific set of relocations for the gnu tls dialect.  */
+#define IS_ARM_TLS_GNU_RELOC(R_TYPE)	\
+  ((R_TYPE) == R_ARM_TLS_GOTDESC	\
+   || (R_TYPE) == R_ARM_TLS_CALL	\
+   || (R_TYPE) == R_ARM_THM_TLS_CALL	\
+   || (R_TYPE) == R_ARM_TLS_DESCSEQ	\
+   || (R_TYPE) == R_ARM_THM_TLS_DESCSEQ)
 
 /* Relocate an ARM ELF section.  */
 
@@ -8993,7 +10261,7 @@
 		    - relocation;
 		  addend += msec->output_section->vma + msec->output_offset;
 
-		  /* Cases here must match those in the preceeding
+		  /* Cases here must match those in the preceding
 		     switch statement.  */
 		  switch (r_type)
 		    {
@@ -9086,12 +10354,33 @@
 	     name);
 	}
 
-      r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
-					 input_section, contents, rel,
-					 relocation, info, sec, name,
-					 (h ? ELF_ST_TYPE (h->type) :
-					  ELF_ST_TYPE (sym->st_info)), h,
-					 &unresolved_reloc, &error_message);
+      /* We call elf32_arm_final_link_relocate unless we're completely
+         done, i.e., the relaxation produced the final output we want,
+         and we won't let anybody mess with it. Also, we have to do
+         addend adjustments in case of a R_ARM_TLS_GOTDESC relocation
+         both in relaxed and non-relaxed cases */
+     if ((elf32_arm_tls_transition (info, r_type, h) != (unsigned)r_type)
+	 || (IS_ARM_TLS_GNU_RELOC (r_type)
+	     && !((h ? elf32_arm_hash_entry (h)->tls_type : 
+		   elf32_arm_local_got_tls_type (input_bfd)[r_symndx])
+		  & GOT_TLS_GDESC)))
+       {
+	 r = elf32_arm_tls_relax (globals, input_bfd, input_section,
+				  contents, rel, h == NULL);
+	 /* This may have been marked unresolved because it came from
+	    a shared library.  But we've just dealt with that.  */
+	 unresolved_reloc = 0;
+       }
+     else
+       r = bfd_reloc_continue;
+     
+     if (r == bfd_reloc_continue)
+       r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
+					  input_section, contents, rel,
+					  relocation, info, sec, name, sym_type,
+					  (h ? h->target_internal
+					   : ARM_SYM_BRANCH_TYPE (sym)), h,
+					  &unresolved_reloc, &error_message);
 
       /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
 	 because such sections are not SEC_ALLOC and thus ld.so will
@@ -10658,7 +11947,13 @@
     {
       unsigned long r_symndx;
       struct elf_link_hash_entry *h = NULL;
+      struct elf32_arm_link_hash_entry *eh;
       int r_type;
+      bfd_boolean call_reloc_p;
+      bfd_boolean may_become_dynamic_p;
+      bfd_boolean may_need_local_target_p;
+      union gotplt_union *root_plt;
+      struct arm_plt_info *arm_plt;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
       if (r_symndx >= symtab_hdr->sh_info)
@@ -10668,6 +11963,11 @@
 		 || h->root.type == bfd_link_hash_warning)
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
 	}
+      eh = (struct elf32_arm_link_hash_entry *) h;
+
+      call_reloc_p = FALSE;
+      may_become_dynamic_p = FALSE;
+      may_need_local_target_p = FALSE;
 
       r_type = ELF32_R_TYPE (rel->r_info);
       r_type = arm_real_reloc_type (globals, r_type);
@@ -10693,10 +11993,6 @@
 	  globals->tls_ldm_got.refcount -= 1;
 	  break;
 
-	case R_ARM_ABS32:
-	case R_ARM_ABS32_NOI:
-	case R_ARM_REL32:
-	case R_ARM_REL32_NOI:
 	case R_ARM_PC24:
 	case R_ARM_PLT32:
 	case R_ARM_CALL:
@@ -10705,6 +12001,21 @@
 	case R_ARM_THM_CALL:
 	case R_ARM_THM_JUMP24:
 	case R_ARM_THM_JUMP19:
+	  call_reloc_p = TRUE;
+	  may_need_local_target_p = TRUE;
+	  break;
+
+	case R_ARM_ABS12:
+	  if (!globals->vxworks_p)
+	    {
+	      may_need_local_target_p = TRUE;
+	      break;
+	    }
+	  /* Fall through.  */
+	case R_ARM_ABS32:
+	case R_ARM_ABS32_NOI:
+	case R_ARM_REL32:
+	case R_ARM_REL32_NOI:
 	case R_ARM_MOVW_ABS_NC:
 	case R_ARM_MOVT_ABS:
 	case R_ARM_MOVW_PREL_NC:
@@ -10714,50 +12025,70 @@
 	case R_ARM_THM_MOVW_PREL_NC:
 	case R_ARM_THM_MOVT_PREL:
 	  /* Should the interworking branches be here also?  */
-
-	  if (h != NULL)
+	  if ((info->shared || globals->root.is_relocatable_executable)
+	      && (sec->flags & SEC_ALLOC) != 0)
 	    {
-	      struct elf32_arm_link_hash_entry *eh;
-	      struct elf32_arm_relocs_copied **pp;
-	      struct elf32_arm_relocs_copied *p;
-
-	      eh = (struct elf32_arm_link_hash_entry *) h;
-
-	      if (h->plt.refcount > 0)
+	      if (h == NULL
+		  && (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI))
 		{
-		  h->plt.refcount -= 1;
-		  if (r_type == R_ARM_THM_CALL)
-		    eh->plt_maybe_thumb_refcount--;
-
-		  if (r_type == R_ARM_THM_JUMP24
-		      || r_type == R_ARM_THM_JUMP19)
-		    eh->plt_thumb_refcount--;
+		  call_reloc_p = TRUE;
+		  may_need_local_target_p = TRUE;
 		}
-
-	      if (r_type == R_ARM_ABS32
-		  || r_type == R_ARM_REL32
-                  || r_type == R_ARM_ABS32_NOI
-                  || r_type == R_ARM_REL32_NOI)
-		{
-		  for (pp = &eh->relocs_copied; (p = *pp) != NULL;
-		       pp = &p->next)
-		  if (p->section == sec)
-		    {
-		      p->count -= 1;
-		      if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
-                          || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32_NOI)
-			p->pc_count -= 1;
-		      if (p->count == 0)
-			*pp = p->next;
-		      break;
-		    }
-		}
+	      else
+		may_become_dynamic_p = TRUE;
 	    }
+	  else
+	    may_need_local_target_p = TRUE;
 	  break;
 
 	default:
 	  break;
 	}
+
+      if (may_need_local_target_p
+	  && elf32_arm_get_plt_info (abfd, eh, r_symndx, &root_plt, &arm_plt))
+	{
+	  BFD_ASSERT (root_plt->refcount > 0);
+	  root_plt->refcount -= 1;
+
+	  if (!call_reloc_p)
+	    arm_plt->noncall_refcount--;
+
+	  if (r_type == R_ARM_THM_CALL)
+	    arm_plt->maybe_thumb_refcount--;
+
+	  if (r_type == R_ARM_THM_JUMP24
+	      || r_type == R_ARM_THM_JUMP19)
+	    arm_plt->thumb_refcount--;
+	}
+
+      if (may_become_dynamic_p)
+	{
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
+
+	  if (h != NULL)
+	    pp = &(eh->dyn_relocs);
+	  else
+	    {
+	      Elf_Internal_Sym *isym;
+
+	      isym = bfd_sym_from_r_symndx (&globals->sym_cache,
+					    abfd, r_symndx);
+	      if (isym == NULL)
+		return FALSE;
+	      pp = elf32_arm_get_local_dynreloc_list (abfd, r_symndx, isym);
+	      if (pp == NULL)
+		return FALSE;
+	    }
+	  for (; (p = *pp) != NULL; pp = &p->next)
+	    if (p->sec == sec)
+	      {
+		/* Everything must go for SEC.  */
+		*pp = p->next;
+		break;
+	      }
+	}
     }
 
   return TRUE;
@@ -10776,7 +12107,9 @@
   bfd *dynobj;
   asection *sreloc;
   struct elf32_arm_link_hash_table *htab;
-  bfd_boolean needs_plt;
+  bfd_boolean call_reloc_p;
+  bfd_boolean may_become_dynamic_p;
+  bfd_boolean may_need_local_target_p;
   unsigned long nsyms;
 
   if (info->relocatable)
@@ -10799,7 +12132,13 @@
 	return FALSE;
     }
 
-  dynobj = elf_hash_table (info)->dynobj;
+  if (htab->root.dynobj == NULL)
+    htab->root.dynobj = abfd;
+  if (!create_ifunc_sections (info))
+    return FALSE;
+
+  dynobj = htab->root.dynobj;
+
   symtab_hdr = & elf_symtab_hdr (abfd);
   sym_hashes = elf_sym_hashes (abfd);
   nsyms = NUM_SHDR_ENTRIES (symtab_hdr);
@@ -10807,6 +12146,7 @@
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
     {
+      Elf_Internal_Sym *isym;
       struct elf_link_hash_entry *h;
       struct elf32_arm_link_hash_entry *eh;
       unsigned long r_symndx;
@@ -10827,24 +12167,46 @@
 	  return FALSE;
 	}
 
-      if (nsyms == 0 || r_symndx < symtab_hdr->sh_info)
-        h = NULL;
-      else
+      h = NULL;
+      isym = NULL;
+      if (nsyms > 0)
 	{
-	  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 (r_symndx < symtab_hdr->sh_info)
+	    {
+	      /* A local symbol.  */
+	      isym = bfd_sym_from_r_symndx (&htab->sym_cache,
+					    abfd, r_symndx);
+	      if (isym == NULL)
+		return FALSE;
+	    }
+	  else
+	    {
+	      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;
+	    }
 	}
 
       eh = (struct elf32_arm_link_hash_entry *) h;
 
+      call_reloc_p = FALSE;
+      may_become_dynamic_p = FALSE;
+      may_need_local_target_p = FALSE;
+
+      /* Could be done earlier, if h were already available.  */
+      r_type = elf32_arm_tls_transition (info, r_type, h);
       switch (r_type)
         {
 	  case R_ARM_GOT32:
 	  case R_ARM_GOT_PREL:
 	  case R_ARM_TLS_GD32:
 	  case R_ARM_TLS_IE32:
+	  case R_ARM_TLS_GOTDESC:
+	  case R_ARM_TLS_DESCSEQ:
+	  case R_ARM_THM_TLS_DESCSEQ:
+	  case R_ARM_TLS_CALL:
+	  case R_ARM_THM_TLS_CALL:
 	    /* This symbol requires a global offset table entry.  */
 	    {
 	      int tls_type, old_tls_type;
@@ -10852,7 +12214,14 @@
 	      switch (r_type)
 		{
 		case R_ARM_TLS_GD32: tls_type = GOT_TLS_GD; break;
+		  
 		case R_ARM_TLS_IE32: tls_type = GOT_TLS_IE; break;
+		  
+		case R_ARM_TLS_GOTDESC:
+		case R_ARM_TLS_CALL: case R_ARM_THM_TLS_CALL:
+		case R_ARM_TLS_DESCSEQ: case R_ARM_THM_TLS_DESCSEQ:
+		  tls_type = GOT_TLS_GDESC; break;
+		  
 		default: tls_type = GOT_NORMAL; break;
 		}
 
@@ -10863,36 +12232,33 @@
 		}
 	      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;
-		      elf32_arm_local_got_tls_type (abfd)
-			= (char *) (local_got_refcounts + symtab_hdr->sh_info);
-		    }
-		  local_got_refcounts[r_symndx] += 1;
+		  if (!elf32_arm_allocate_local_sym_info (abfd))
+		    return FALSE;
+		  elf_local_got_refcounts (abfd)[r_symndx] += 1;
 		  old_tls_type = elf32_arm_local_got_tls_type (abfd) [r_symndx];
 		}
 
-	      /* We will already have issued an error message if there is a
-		 TLS / non-TLS mismatch, based on the symbol type.  We don't
-		 support any linker relaxations.  So just combine any TLS
-		 types needed.  */
+	      /* If a variable is accessed with both tls methods, two
+	         slots may be created.  */
+	      if (GOT_TLS_GD_ANY_P (old_tls_type)
+		  && GOT_TLS_GD_ANY_P (tls_type))
+		tls_type |= old_tls_type;
+
+	      /* We will already have issued an error message if there
+		 is a TLS/non-TLS mismatch, based on the symbol
+		 type.  So just combine any TLS types needed.  */
 	      if (old_tls_type != GOT_UNKNOWN && old_tls_type != GOT_NORMAL
 		  && tls_type != GOT_NORMAL)
 		tls_type |= old_tls_type;
 
+	      /* If the symbol is accessed in both IE and GDESC
+	         method, we're able to relax. Turn off the GDESC flag,
+	         without messing up with any other kind of tls types
+	         that may be involved */
+	      if ((tls_type & GOT_TLS_IE) && (tls_type & GOT_TLS_GDESC))
+		tls_type &= ~GOT_TLS_GDESC;
+
 	      if (old_tls_type != tls_type)
 		{
 		  if (h != NULL)
@@ -10910,22 +12276,11 @@
 
 	  case R_ARM_GOTOFF32:
 	  case R_ARM_GOTPC:
-	    if (htab->sgot == NULL)
-	      {
-		if (htab->root.dynobj == NULL)
-		  htab->root.dynobj = abfd;
-		if (!create_got_section (htab->root.dynobj, info))
-		  return FALSE;
-	      }
+	    if (htab->root.sgot == NULL
+		&& !create_got_section (htab->root.dynobj, info))
+	      return FALSE;
 	    break;
 
-	  case R_ARM_ABS12:
-	    /* VxWorks uses dynamic R_ARM_ABS12 relocations for
-	       ldr __GOTT_INDEX__ offsets.  */
-	    if (!htab->vxworks_p)
-	      break;
-	    /* Fall through.  */
-
 	  case R_ARM_PC24:
 	  case R_ARM_PLT32:
 	  case R_ARM_CALL:
@@ -10934,8 +12289,19 @@
 	  case R_ARM_THM_CALL:
 	  case R_ARM_THM_JUMP24:
 	  case R_ARM_THM_JUMP19:
-	    needs_plt = 1;
-	    goto normal_reloc;
+	    call_reloc_p = TRUE;
+	    may_need_local_target_p = TRUE;
+	    break;
+
+	  case R_ARM_ABS12:
+	    /* VxWorks uses dynamic R_ARM_ABS12 relocations for
+	       ldr __GOTT_INDEX__ offsets.  */
+	    if (!htab->vxworks_p)
+	      {
+		may_need_local_target_p = TRUE;
+		break;
+	      }
+	    /* Fall through.  */
 
 	  case R_ARM_MOVW_ABS_NC:
 	  case R_ARM_MOVT_ABS:
@@ -10960,134 +12326,30 @@
 	  case R_ARM_MOVT_PREL:
 	  case R_ARM_THM_MOVW_PREL_NC:
 	  case R_ARM_THM_MOVT_PREL:
-	    needs_plt = 0;
-	  normal_reloc:
 
 	    /* Should the interworking branches be listed here?  */
-	    if (h != NULL)
-	      {
-		/* If this reloc is in a read-only section, we might
-		   need a copy reloc.  We can't check reliably at this
-		   stage whether the section is read-only, as input
-		   sections have not yet been mapped to output sections.
-		   Tentatively set the flag for now, and correct in
-		   adjust_dynamic_symbol.  */
-		if (!info->shared)
-		  h->non_got_ref = 1;
-
-		/* We may need a .plt entry if the function this reloc
-		   refers to is in a different object.  We can't tell for
-		   sure yet, because something later might force the
-		   symbol local.  */
-		if (needs_plt)
-		  h->needs_plt = 1;
-
-		/* If we create a PLT entry, this relocation will reference
-		   it, even if it's an ABS32 relocation.  */
-		h->plt.refcount += 1;
-
-		/* It's too early to use htab->use_blx here, so we have to
-		   record possible blx references separately from
-		   relocs that definitely need a thumb stub.  */
-
-		if (r_type == R_ARM_THM_CALL)
-		  eh->plt_maybe_thumb_refcount += 1;
-
-		if (r_type == R_ARM_THM_JUMP24
-		    || r_type == R_ARM_THM_JUMP19)
-		  eh->plt_thumb_refcount += 1;
-	      }
-
-	    /* If we are creating a shared library or relocatable executable,
-	       and this is a reloc against a global symbol, or a non PC
-	       relative reloc against a local symbol, then we need to copy
-	       the reloc into the shared library.  However, if we are linking
-	       with -Bsymbolic, we do not need to copy a reloc against a
-               global symbol which is defined in an object we are
-               including in the link (i.e., DEF_REGULAR is set).  At
-               this point we have not seen all the input files, so it is
-               possible that DEF_REGULAR is not set now but will be set
-               later (it is never cleared).  We account for that
-               possibility below by storing information in the
-               relocs_copied field of the hash table entry.  */
 	    if ((info->shared || htab->root.is_relocatable_executable)
-		&& (sec->flags & SEC_ALLOC) != 0
-		&& ((r_type == R_ARM_ABS32 || r_type == R_ARM_ABS32_NOI)
-		    || (h != NULL && ! h->needs_plt
-			&& (! info->symbolic || ! h->def_regular))))
+		&& (sec->flags & SEC_ALLOC) != 0)
 	      {
-		struct elf32_arm_relocs_copied *p, **head;
-
-	        /* When creating a shared object, we must copy these
-                   reloc types into the output file.  We create a reloc
-                   section in dynobj and make room for this reloc.  */
-  	        if (sreloc == NULL)
+		if (h == NULL
+		    && (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI))
 		  {
-		    sreloc = _bfd_elf_make_dynamic_reloc_section
-		      (sec, dynobj, 2, abfd, ! htab->use_rel);
-
-		    if (sreloc == NULL)
-		      return FALSE;
-
-		    /* BPABI objects never have dynamic relocations mapped.  */
-		    if (htab->symbian_p)
-		      {
-			flagword flags;
-
-			flags = bfd_get_section_flags (dynobj, sreloc);
-			flags &= ~(SEC_LOAD | SEC_ALLOC);
-			bfd_set_section_flags (dynobj, sreloc, flags);
-		      }
-		  }
-
-		/* If this is a global symbol, we count the number of
-		   relocations we need for this symbol.  */
-		if (h != NULL)
-		  {
-		    head = &((struct elf32_arm_link_hash_entry *) h)->relocs_copied;
+		    /* In shared libraries and relocatable executables,
+		       we treat local relative references as calls;
+		       see the related SYMBOL_CALLS_LOCAL code in
+		       allocate_dynrelocs.  */
+		    call_reloc_p = TRUE;
+		    may_need_local_target_p = TRUE;
 		  }
 		else
-		  {
-		    /* Track dynamic relocs needed for local syms too.
-		       We really need local syms available to do this
-		       easily.  Oh well.  */
-		    asection *s;
-		    void *vpp;
-		    Elf_Internal_Sym *isym;
-
-		    isym = bfd_sym_from_r_symndx (&htab->sym_cache,
-						  abfd, r_symndx);
-		    if (isym == NULL)
-		      return FALSE;
-
-		    s = bfd_section_from_elf_index (abfd, isym->st_shndx);
-		    if (s == NULL)
-		      s = sec;
-
-		    vpp = &elf_section_data (s)->local_dynrel;
-		    head = (struct elf32_arm_relocs_copied **) vpp;
-		  }
-
-		p = *head;
-		if (p == NULL || p->section != sec)
-		  {
-		    bfd_size_type amt = sizeof *p;
-
-		    p = (struct elf32_arm_relocs_copied *)
-                        bfd_alloc (htab->root.dynobj, amt);
-		    if (p == NULL)
-		      return FALSE;
-		    p->next = *head;
-		    *head = p;
-		    p->section = sec;
-		    p->count = 0;
-		    p->pc_count = 0;
-		  }
-
-		if (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI)
-		  p->pc_count += 1;
-		p->count += 1;
+		  /* We are creating a shared library or relocatable
+		     executable, and this is a reloc against a global symbol,
+		     or a non-PC-relative reloc against a local symbol.
+		     We may need to copy the reloc into the output.  */
+		  may_become_dynamic_p = TRUE;
 	      }
+	    else
+	      may_need_local_target_p = TRUE;
 	    break;
 
         /* This relocation describes the C++ object vtable hierarchy.
@@ -11106,6 +12368,119 @@
             return FALSE;
           break;
         }
+
+      if (h != NULL)
+	{
+	  if (call_reloc_p)
+	    /* We may need a .plt entry if the function this reloc
+	       refers to is in a different object, regardless of the
+	       symbol's type.  We can't tell for sure yet, because
+	       something later might force the symbol local.  */
+	    h->needs_plt = 1;
+	  else if (may_need_local_target_p)
+	    /* If this reloc is in a read-only section, we might
+	       need a copy reloc.  We can't check reliably at this
+	       stage whether the section is read-only, as input
+	       sections have not yet been mapped to output sections.
+	       Tentatively set the flag for now, and correct in
+	       adjust_dynamic_symbol.  */
+	    h->non_got_ref = 1;
+	}
+
+      if (may_need_local_target_p
+	  && (h != NULL || ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC))
+	{
+	  union gotplt_union *root_plt;
+	  struct arm_plt_info *arm_plt;
+	  struct arm_local_iplt_info *local_iplt;
+
+	  if (h != NULL)
+	    {
+	      root_plt = &h->plt;
+	      arm_plt = &eh->plt;
+	    }
+	  else
+	    {
+	      local_iplt = elf32_arm_create_local_iplt (abfd, r_symndx);
+	      if (local_iplt == NULL)
+		return FALSE;
+	      root_plt = &local_iplt->root;
+	      arm_plt = &local_iplt->arm;
+	    }
+
+	  /* If the symbol is a function that doesn't bind locally,
+	     this relocation will need a PLT entry.  */
+	  root_plt->refcount += 1;
+
+	  if (!call_reloc_p)
+	    arm_plt->noncall_refcount++;
+
+	  /* It's too early to use htab->use_blx here, so we have to
+	     record possible blx references separately from
+	     relocs that definitely need a thumb stub.  */
+
+	  if (r_type == R_ARM_THM_CALL)
+	    arm_plt->maybe_thumb_refcount += 1;
+
+	  if (r_type == R_ARM_THM_JUMP24
+	      || r_type == R_ARM_THM_JUMP19)
+	    arm_plt->thumb_refcount += 1;
+	}
+
+      if (may_become_dynamic_p)
+	{
+	  struct elf_dyn_relocs *p, **head;
+
+	  /* Create a reloc section in dynobj.  */
+	  if (sreloc == NULL)
+	    {
+	      sreloc = _bfd_elf_make_dynamic_reloc_section
+		(sec, dynobj, 2, abfd, ! htab->use_rel);
+
+	      if (sreloc == NULL)
+		return FALSE;
+
+	      /* BPABI objects never have dynamic relocations mapped.  */
+	      if (htab->symbian_p)
+		{
+		  flagword flags;
+
+		  flags = bfd_get_section_flags (dynobj, sreloc);
+		  flags &= ~(SEC_LOAD | SEC_ALLOC);
+		  bfd_set_section_flags (dynobj, sreloc, flags);
+		}
+	    }
+
+	  /* If this is a global symbol, count the number of
+	     relocations we need for this symbol.  */
+	  if (h != NULL)
+	    head = &((struct elf32_arm_link_hash_entry *) h)->dyn_relocs;
+	  else
+	    {
+	      head = elf32_arm_get_local_dynreloc_list (abfd, r_symndx, isym);
+	      if (head == NULL)
+		return FALSE;
+	    }
+
+	  p = *head;
+	  if (p == NULL || p->sec != sec)
+	    {
+	      bfd_size_type amt = sizeof *p;
+
+	      p = (struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt);
+	      if (p == NULL)
+		return FALSE;
+	      p->next = *head;
+	      *head = p;
+	      p->sec = sec;
+	      p->count = 0;
+	      p->pc_count = 0;
+	    }
+
+	  if (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI)
+	    p->pc_count += 1;
+	  p->count += 1;
+	}
     }
 
   return TRUE;
@@ -11122,6 +12497,8 @@
   Elf_Internal_Shdr **elf_shdrp;
   bfd_boolean again;
 
+  _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook);
+
   /* Marking EH data may cause additional code sections to be marked,
      requiring multiple passes.  */
   again = TRUE;
@@ -11248,7 +12625,7 @@
 
   if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
 				     filename_ptr, functionname_ptr,
-				     line_ptr, 0,
+				     line_ptr, NULL, 0,
 				     & elf_tdata (abfd)->dwarf2_find_line_info))
     {
       if (!*functionname_ptr)
@@ -11316,6 +12693,7 @@
   /* Make sure we know what is going on here.  */
   BFD_ASSERT (dynobj != NULL
 	      && (h->needs_plt
+		  || h->type == STT_GNU_IFUNC
 		  || h->u.weakdef != NULL
 		  || (h->def_dynamic
 		      && h->ref_regular
@@ -11326,13 +12704,15 @@
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later,
      when we know the address of the .got section.  */
-  if (h->type == STT_FUNC || h->type == STT_ARM_TFUNC
-      || h->needs_plt)
+  if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt)
     {
+      /* Calls to STT_GNU_IFUNC symbols always use a PLT, even if the
+	 symbol binds locally.  */
       if (h->plt.refcount <= 0
-	  || SYMBOL_CALLS_LOCAL (info, h)
-	  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
-	      && h->root.type == bfd_link_hash_undefweak))
+	  || (h->type != STT_GNU_IFUNC
+	      && (SYMBOL_CALLS_LOCAL (info, h)
+		  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+		      && h->root.type == bfd_link_hash_undefweak))))
 	{
 	  /* This case can occur if we saw a PLT32 reloc in an input
 	     file, but the symbol was never referred to by a dynamic
@@ -11340,8 +12720,9 @@
 	     such a case, we don't actually need to build a procedure
 	     linkage table, and we can just do a PC24 reloc instead.  */
 	  h->plt.offset = (bfd_vma) -1;
-	  eh->plt_thumb_refcount = 0;
-	  eh->plt_maybe_thumb_refcount = 0;
+	  eh->plt.thumb_refcount = 0;
+	  eh->plt.maybe_thumb_refcount = 0;
+	  eh->plt.noncall_refcount = 0;
 	  h->needs_plt = 0;
 	}
 
@@ -11355,8 +12736,9 @@
 	 and non-function syms in check-relocs; Objects loaded later in
 	 the link may change h->type.  So fix it now.  */
       h->plt.offset = (bfd_vma) -1;
-      eh->plt_thumb_refcount = 0;
-      eh->plt_maybe_thumb_refcount = 0;
+      eh->plt.thumb_refcount = 0;
+      eh->plt.maybe_thumb_refcount = 0;
+      eh->plt.noncall_refcount = 0;
     }
 
   /* If this is a weak symbol, and there is a real definition, the
@@ -11416,8 +12798,7 @@
       asection *srel;
 
       srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (globals, ".bss"));
-      BFD_ASSERT (srel != NULL);
-      srel->size += RELOC_SIZE (globals);
+      elf32_arm_allocate_dynrelocs (info, srel, 1);
       h->needs_copy = 1;
     }
 
@@ -11428,31 +12809,24 @@
    dynamic relocs.  */
 
 static bfd_boolean
-allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
+allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
 {
   struct bfd_link_info *info;
   struct elf32_arm_link_hash_table *htab;
   struct elf32_arm_link_hash_entry *eh;
-  struct elf32_arm_relocs_copied *p;
-  bfd_signed_vma thumb_refs;
-
-  eh = (struct elf32_arm_link_hash_entry *) h;
+  struct elf_dyn_relocs *p;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  eh = (struct elf32_arm_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
   htab = elf32_arm_hash_table (info);
   if (htab == NULL)
     return FALSE;
 
-  if (htab->root.dynamic_sections_created
+  if ((htab->root.dynamic_sections_created || h->type == STT_GNU_IFUNC)
       && h->plt.refcount > 0)
     {
       /* Make sure this symbol is output as a dynamic symbol.
@@ -11464,29 +12838,29 @@
 	    return FALSE;
 	}
 
+      /* If the call in the PLT entry binds locally, the associated
+	 GOT entry should use an R_ARM_IRELATIVE relocation instead of
+	 the usual R_ARM_JUMP_SLOT.  Put it in the .iplt section rather
+	 than the .plt section.  */
+      if (h->type == STT_GNU_IFUNC && SYMBOL_CALLS_LOCAL (info, h))
+	{
+	  eh->is_iplt = 1;
+	  if (eh->plt.noncall_refcount == 0
+	      && SYMBOL_REFERENCES_LOCAL (info, h))
+	    /* All non-call references can be resolved directly.
+	       This means that they can (and in some cases, must)
+	       resolve directly to the run-time target, rather than
+	       to the PLT.  That in turns means that any .got entry
+	       would be equal to the .igot.plt entry, so there's
+	       no point having both.  */
+	    h->got.refcount = 0;
+	}
+
       if (info->shared
+	  || eh->is_iplt
 	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
 	{
-	  asection *s = htab->splt;
-
-	  /* If this is the first .plt entry, make room for the special
-	     first entry.  */
-	  if (s->size == 0)
-	    s->size += htab->plt_header_size;
-
-	  h->plt.offset = s->size;
-
-	  /* If we will insert a Thumb trampoline before this PLT, leave room
-	     for it.  */
-	  thumb_refs = eh->plt_thumb_refcount;
-	  if (!htab->use_blx)
-	    thumb_refs += eh->plt_maybe_thumb_refcount;
-
-	  if (thumb_refs > 0)
-	    {
-	      h->plt.offset += PLT_THUMB_STUB_SIZE;
-	      s->size += PLT_THUMB_STUB_SIZE;
-	    }
+	  elf32_arm_allocate_plt_entry (info, eh->is_iplt, &h->plt, &eh->plt);
 
 	  /* If this symbol is not defined in a regular file, and we are
 	     not generating a shared library, then set the symbol to this
@@ -11496,29 +12870,16 @@
 	  if (! info->shared
 	      && !h->def_regular)
 	    {
-	      h->root.u.def.section = s;
+	      h->root.u.def.section = htab->root.splt;
 	      h->root.u.def.value = h->plt.offset;
 
 	      /* Make sure the function is not marked as Thumb, in case
 		 it is the target of an ABS32 relocation, which will
 		 point to the PLT entry.  */
-	      if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC)
-		h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC);
+	      h->target_internal = ST_BRANCH_TO_ARM;
 	    }
 
-	  /* Make room for this entry.  */
-	  s->size += htab->plt_entry_size;
-
-	  if (!htab->symbian_p)
-	    {
-	      /* We also need to make an entry in the .got.plt section, which
-		 will be placed in the .got section by the linker script.  */
-	      eh->plt_got_offset = htab->sgotplt->size;
-	      htab->sgotplt->size += 4;
-	    }
-
-	  /* We also need to make an entry in the .rel(a).plt section.  */
-	  htab->srelplt->size += RELOC_SIZE (htab);
+	  htab->next_tls_desc_index++;
 
 	  /* VxWorks executables have a second set of relocations for
 	     each PLT entry.  They go in a separate relocation section,
@@ -11528,12 +12889,12 @@
 	      /* There is a relocation for the initial PLT entry:
 		 an R_ARM_32 relocation for _GLOBAL_OFFSET_TABLE_.  */
 	      if (h->plt.offset == htab->plt_header_size)
-		htab->srelplt2->size += RELOC_SIZE (htab);
+		elf32_arm_allocate_dynrelocs (info, htab->srelplt2, 1);
 
 	      /* There are two extra relocations for each subsequent
 		 PLT entry: an R_ARM_32 relocation for the GOT entry,
 		 and an R_ARM_32 relocation for the PLT entry.  */
-	      htab->srelplt2->size += RELOC_SIZE (htab) * 2;
+	      elf32_arm_allocate_dynrelocs (info, htab->srelplt2, 2);
 	    }
 	}
       else
@@ -11548,6 +12909,9 @@
       h->needs_plt = 0;
     }
 
+  eh = (struct elf32_arm_link_hash_entry *) h;
+  eh->tlsdesc_got = (bfd_vma) -1;
+
   if (h->got.refcount > 0)
     {
       asection *s;
@@ -11566,7 +12930,7 @@
 
       if (!htab->symbian_p)
 	{
-	  s = htab->sgot;
+	  s = htab->root.sgot;
 	  h->got.offset = s->size;
 
 	  if (tls_type == GOT_UNKNOWN)
@@ -11577,9 +12941,28 @@
 	    s->size += 4;
 	  else
 	    {
+              if (tls_type & GOT_TLS_GDESC)
+	        {
+		  /* R_ARM_TLS_DESC needs 2 GOT slots.  */
+	          eh->tlsdesc_got
+		    = (htab->root.sgotplt->size
+		       - elf32_arm_compute_jump_table_size (htab));
+	          htab->root.sgotplt->size += 8;
+	          h->got.offset = (bfd_vma) -2;
+		  /* plt.got_offset needs to know there's a TLS_DESC
+		     reloc in the middle of .got.plt.  */
+                  htab->num_tls_desc++;
+	        }
+
 	      if (tls_type & GOT_TLS_GD)
-		/* R_ARM_TLS_GD32 needs 2 consecutive GOT slots.  */
-		s->size += 8;
+		{
+		  /* R_ARM_TLS_GD32 needs 2 consecutive GOT slots.  If
+		     the symbol is both GD and GDESC, got.offset may
+		     have been overwritten.  */
+		  h->got.offset = s->size;
+		  s->size += 8;
+		}
+
 	      if (tls_type & GOT_TLS_IE)
 		/* R_ARM_TLS_IE32 needs one GOT slot.  */
 		s->size += 4;
@@ -11599,19 +12982,38 @@
 		  || h->root.type != bfd_link_hash_undefweak))
 	    {
 	      if (tls_type & GOT_TLS_IE)
-		htab->srelgot->size += RELOC_SIZE (htab);
+		elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
 
 	      if (tls_type & GOT_TLS_GD)
-		htab->srelgot->size += RELOC_SIZE (htab);
+		elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
 
-	      if ((tls_type & GOT_TLS_GD) && indx != 0)
-		htab->srelgot->size += RELOC_SIZE (htab);
+	      if (tls_type & GOT_TLS_GDESC) 
+		{
+		  elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
+		  /* GDESC needs a trampoline to jump to.  */
+		  htab->tls_trampoline = -1;
+		}
+
+	      /* Only GD needs it.  GDESC just emits one relocation per
+		 2 entries.  */
+	      if ((tls_type & GOT_TLS_GD) && indx != 0)  
+		elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
 	    }
-	  else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-		    || h->root.type != bfd_link_hash_undefweak)
-		   && (info->shared
-	    	   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
-	    htab->srelgot->size += RELOC_SIZE (htab);
+	  else if (!SYMBOL_REFERENCES_LOCAL (info, h))
+	    {
+	      if (htab->root.dynamic_sections_created)
+		/* Reserve room for the GOT entry's R_ARM_GLOB_DAT relocation.  */
+		elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
+	    }
+	  else if (h->type == STT_GNU_IFUNC
+		   && eh->plt.noncall_refcount == 0)
+	    /* No non-call references resolve the STT_GNU_IFUNC's PLT entry;
+	       they all resolve dynamically instead.  Reserve room for the
+	       GOT entry's R_ARM_IRELATIVE relocation.  */
+	    elf32_arm_allocate_irelocs (info, htab->root.srelgot, 1);
+	  else if (info->shared)
+	    /* Reserve room for the GOT entry's R_ARM_RELATIVE relocation.  */
+	    elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
 	}
     }
   else
@@ -11620,7 +13022,7 @@
   /* Allocate stubs for exported Thumb functions on v4t.  */
   if (!htab->use_blx && h->dynindx != -1
       && h->def_regular
-      && ELF_ST_TYPE (h->type) == STT_ARM_TFUNC
+      && h->target_internal == ST_BRANCH_TO_THUMB
       && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
     {
       struct elf_link_hash_entry * th;
@@ -11638,17 +13040,19 @@
 					NULL, TRUE, FALSE, &bh);
 
       myh = (struct elf_link_hash_entry *) bh;
-      myh->type = ELF_ST_INFO (STB_LOCAL, STT_ARM_TFUNC);
+      myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
       myh->forced_local = 1;
+      myh->target_internal = ST_BRANCH_TO_THUMB;
       eh->export_glue = myh;
       th = record_arm_to_thumb_glue (info, h);
       /* Point the symbol at the stub.  */
       h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC);
+      h->target_internal = ST_BRANCH_TO_ARM;
       h->root.u.def.section = th->root.u.def.section;
       h->root.u.def.value = th->root.u.def.value & ~1;
     }
 
-  if (eh->relocs_copied == NULL)
+  if (eh->dyn_relocs == NULL)
     return TRUE;
 
   /* In the shared -Bsymbolic case, discard space allocated for
@@ -11667,9 +13071,9 @@
          should avoid writing assembly like ".long foo - .".  */
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
-	  struct elf32_arm_relocs_copied **pp;
+	  struct elf_dyn_relocs **pp;
 
-	  for (pp = &eh->relocs_copied; (p = *pp) != NULL; )
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
 	    {
 	      p->count -= p->pc_count;
 	      p->pc_count = 0;
@@ -11682,11 +13086,11 @@
 
       if (htab->vxworks_p)
 	{
-	  struct elf32_arm_relocs_copied **pp;
+	  struct elf_dyn_relocs **pp;
 
-	  for (pp = &eh->relocs_copied; (p = *pp) != NULL; )
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
 	    {
-	      if (strcmp (p->section->output_section->name, ".tls_vars") == 0)
+	      if (strcmp (p->sec->output_section->name, ".tls_vars") == 0)
 		*pp = p->next;
 	      else
 		pp = &p->next;
@@ -11695,11 +13099,11 @@
 
       /* Also discard relocs on undefined weak syms with non-default
          visibility.  */
-      if (eh->relocs_copied != NULL
+      if (eh->dyn_relocs != NULL
 	  && h->root.type == bfd_link_hash_undefweak)
 	{
 	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-	    eh->relocs_copied = NULL;
+	    eh->dyn_relocs = NULL;
 
 	  /* Make sure undefined weak symbols are output as a dynamic
 	     symbol in PIEs.  */
@@ -11750,16 +13154,21 @@
 	    goto keep;
 	}
 
-      eh->relocs_copied = NULL;
+      eh->dyn_relocs = NULL;
 
     keep: ;
     }
 
   /* Finally, allocate space.  */
-  for (p = eh->relocs_copied; p != NULL; p = p->next)
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
-      asection *sreloc = elf_section_data (p->section)->sreloc;
-      sreloc->size += p->count * RELOC_SIZE (htab);
+      asection *sreloc = elf_section_data (p->sec)->sreloc;
+      if (h->type == STT_GNU_IFUNC
+	  && eh->plt.noncall_refcount == 0
+	  && SYMBOL_REFERENCES_LOCAL (info, h))
+	elf32_arm_allocate_irelocs (info, sreloc, p->count);
+      else
+	elf32_arm_allocate_dynrelocs (info, sreloc, p->count);
     }
 
   return TRUE;
@@ -11771,15 +13180,12 @@
 elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry * h, void * inf)
 {
   struct elf32_arm_link_hash_entry * eh;
-  struct elf32_arm_relocs_copied * p;
-
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  struct elf_dyn_relocs * p;
 
   eh = (struct elf32_arm_link_hash_entry *) h;
-  for (p = eh->relocs_copied; p != NULL; p = p->next)
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
-      asection *s = p->section;
+      asection *s = p->sec;
 
       if (s != NULL && (s->flags & SEC_READONLY) != 0)
 	{
@@ -11846,24 +13252,27 @@
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
+      struct arm_local_iplt_info **local_iplt_ptr, *local_iplt;
       char *local_tls_type;
+      bfd_vma *local_tlsdesc_gotent;
       bfd_size_type locsymcount;
       Elf_Internal_Shdr *symtab_hdr;
       asection *srel;
       bfd_boolean is_vxworks = htab->vxworks_p;
+      unsigned int symndx;
 
       if (! is_arm_elf (ibfd))
 	continue;
 
       for (s = ibfd->sections; s != NULL; s = s->next)
 	{
-	  struct elf32_arm_relocs_copied *p;
+	  struct elf_dyn_relocs *p;
 
-	  for (p = (struct elf32_arm_relocs_copied *)
+	  for (p = (struct elf_dyn_relocs *)
                    elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
 	    {
-	      if (!bfd_is_abs_section (p->section)
-		  && bfd_is_abs_section (p->section->output_section))
+	      if (!bfd_is_abs_section (p->sec)
+		  && bfd_is_abs_section (p->sec->output_section))
 		{
 		  /* Input section has been discarded, either because
 		     it is a copy of a linkonce section or due to
@@ -11871,7 +13280,7 @@
 		     the relocs too.  */
 		}
 	      else if (is_vxworks
-		       && strcmp (p->section->output_section->name,
+		       && strcmp (p->sec->output_section->name,
 				  ".tls_vars") == 0)
 		{
 		  /* Relocations in vxworks .tls_vars sections are
@@ -11879,9 +13288,9 @@
 		}
 	      else if (p->count != 0)
 		{
-		  srel = elf_section_data (p->section)->sreloc;
-		  srel->size += p->count * RELOC_SIZE (htab);
-		  if ((p->section->output_section->flags & SEC_READONLY) != 0)
+		  srel = elf_section_data (p->sec)->sreloc;
+		  elf32_arm_allocate_dynrelocs (info, srel, p->count);
+		  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
 		    info->flags |= DF_TEXTREL;
 		}
 	    }
@@ -11894,24 +13303,101 @@
       symtab_hdr = & elf_symtab_hdr (ibfd);
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
+      local_iplt_ptr = elf32_arm_local_iplt (ibfd);
       local_tls_type = elf32_arm_local_got_tls_type (ibfd);
-      s = htab->sgot;
-      srel = htab->srelgot;
-      for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+      local_tlsdesc_gotent = elf32_arm_local_tlsdesc_gotent (ibfd);
+      symndx = 0;
+      s = htab->root.sgot;
+      srel = htab->root.srelgot;
+      for (; local_got < end_local_got;
+	   ++local_got, ++local_iplt_ptr, ++local_tls_type,
+	   ++local_tlsdesc_gotent, ++symndx)
 	{
+	  *local_tlsdesc_gotent = (bfd_vma) -1;
+	  local_iplt = *local_iplt_ptr;
+	  if (local_iplt != NULL)
+	    {
+	      struct elf_dyn_relocs *p;
+
+	      if (local_iplt->root.refcount > 0)
+		{
+		  elf32_arm_allocate_plt_entry (info, TRUE,
+						&local_iplt->root,
+						&local_iplt->arm);
+		  if (local_iplt->arm.noncall_refcount == 0)
+		    /* All references to the PLT are calls, so all
+		       non-call references can resolve directly to the
+		       run-time target.  This means that the .got entry
+		       would be the same as the .igot.plt entry, so there's
+		       no point creating both.  */
+		    *local_got = 0;
+		}
+	      else
+		{
+		  BFD_ASSERT (local_iplt->arm.noncall_refcount == 0);
+		  local_iplt->root.offset = (bfd_vma) -1;
+		}
+
+	      for (p = local_iplt->dyn_relocs; p != NULL; p = p->next)
+		{
+		  asection *psrel;
+
+		  psrel = elf_section_data (p->sec)->sreloc;
+		  if (local_iplt->arm.noncall_refcount == 0)
+		    elf32_arm_allocate_irelocs (info, psrel, p->count);
+		  else
+		    elf32_arm_allocate_dynrelocs (info, psrel, p->count);
+		}
+	    }
 	  if (*local_got > 0)
 	    {
+	      Elf_Internal_Sym *isym;
+
 	      *local_got = s->size;
 	      if (*local_tls_type & GOT_TLS_GD)
 		/* TLS_GD relocs need an 8-byte structure in the GOT.  */
 		s->size += 8;
+	      if (*local_tls_type & GOT_TLS_GDESC)
+		{
+		  *local_tlsdesc_gotent = htab->root.sgotplt->size
+		    - elf32_arm_compute_jump_table_size (htab);
+		  htab->root.sgotplt->size += 8;
+		  *local_got = (bfd_vma) -2;
+		  /* plt.got_offset needs to know there's a TLS_DESC
+		     reloc in the middle of .got.plt.  */
+                  htab->num_tls_desc++;
+		}
 	      if (*local_tls_type & GOT_TLS_IE)
 		s->size += 4;
-	      if (*local_tls_type == GOT_NORMAL)
-		s->size += 4;
 
-	      if (info->shared || *local_tls_type == GOT_TLS_GD)
-		srel->size += RELOC_SIZE (htab);
+	      if (*local_tls_type & GOT_NORMAL)
+		{
+		  /* If the symbol is both GD and GDESC, *local_got
+		     may have been overwritten.  */
+		  *local_got = s->size;
+		  s->size += 4;
+		}
+
+	      isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, symndx);
+	      if (isym == NULL)
+		return FALSE;
+
+	      /* If all references to an STT_GNU_IFUNC PLT are calls,
+		 then all non-call references, including this GOT entry,
+		 resolve directly to the run-time target.  */
+	      if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC
+		  && (local_iplt == NULL
+		      || local_iplt->arm.noncall_refcount == 0))
+		elf32_arm_allocate_irelocs (info, srel, 1);
+	      else if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
+		       || *local_tls_type & GOT_TLS_GD)
+		elf32_arm_allocate_dynrelocs (info, srel, 1);
+
+	      if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+		{
+		  elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
+		  htab->tls_trampoline = -1;
+		}
 	    }
 	  else
 	    *local_got = (bfd_vma) -1;
@@ -11922,17 +13408,17 @@
     {
       /* Allocate two GOT entries and one dynamic relocation (if necessary)
 	 for R_ARM_TLS_LDM32 relocations.  */
-      htab->tls_ldm_got.offset = htab->sgot->size;
-      htab->sgot->size += 8;
+      htab->tls_ldm_got.offset = htab->root.sgot->size;
+      htab->root.sgot->size += 8;
       if (info->shared)
-	htab->srelgot->size += RELOC_SIZE (htab);
+	elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
     }
   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->root, allocate_dynrelocs, info);
+  elf_link_hash_traverse (& htab->root, allocate_dynrelocs_for_symbol, info);
 
   /* Here we rummage through the found bfds to collect glue information.  */
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
@@ -11953,6 +13439,34 @@
   /* Allocate space for the glue sections now that we've sized them.  */
   bfd_elf32_arm_allocate_interworking_sections (info);
 
+  /* For every jump slot reserved in the sgotplt, reloc_count is
+     incremented.  However, when we reserve space for TLS descriptors,
+     it's not incremented, so in order to compute the space reserved
+     for them, it suffices to multiply the reloc count by the jump
+     slot size.  */
+  if (htab->root.srelplt)
+    htab->sgotplt_jump_table_size = elf32_arm_compute_jump_table_size(htab);
+
+  if (htab->tls_trampoline)
+    {
+      if (htab->root.splt->size == 0)
+	htab->root.splt->size += htab->plt_header_size;
+      
+      htab->tls_trampoline = htab->root.splt->size;
+      htab->root.splt->size += htab->plt_entry_size;
+      
+      /* If we're not using lazy TLS relocations, don't generate the
+         PLT and GOT entries they require.  */
+      if (!(info->flags & DF_BIND_NOW))
+	{
+	  htab->dt_tlsdesc_got = htab->root.sgot->size;
+	  htab->root.sgot->size += 4;
+
+	  htab->dt_tlsdesc_plt = htab->root.splt->size;
+	  htab->root.splt->size += 4 * ARRAY_SIZE (dl_tlsdesc_lazy_trampoline);
+	}
+    }
+
   /* The check_relocs and adjust_dynamic_symbol entry points have
      determined the sizes of the various dynamic sections.  Allocate
      memory for them.  */
@@ -11969,7 +13483,7 @@
 	 of the dynobj section names depend upon the input files.  */
       name = bfd_get_section_name (dynobj, s);
 
-      if (strcmp (name, ".plt") == 0)
+      if (s == htab->root.splt)
 	{
 	  /* Remember whether there is a PLT.  */
 	  plt = s->size != 0;
@@ -11980,7 +13494,7 @@
 	    {
 	      /* Remember whether there are any reloc sections other
 		 than .rel(a).plt and .rela.plt.unloaded.  */
-	      if (s != htab->srelplt && s != htab->srelplt2)
+	      if (s != htab->root.srelplt && s != htab->srelplt2)
 		relocs = TRUE;
 
 	      /* We use the reloc_count field as a counter if we need
@@ -11988,8 +13502,11 @@
 	      s->reloc_count = 0;
 	    }
 	}
-      else if (! CONST_STRNEQ (name, ".got")
-	       && strcmp (name, ".dynbss") != 0)
+      else if (s != htab->root.sgot
+	       && s != htab->root.sgotplt
+	       && s != htab->root.iplt
+	       && s != htab->root.igotplt
+	       && s != htab->sdynbss)
 	{
 	  /* It's not one of our sections, so don't allocate space.  */
 	  continue;
@@ -12043,6 +13560,11 @@
 				     htab->use_rel ? DT_REL : DT_RELA)
 	      || !add_dynamic_entry (DT_JMPREL, 0))
 	    return FALSE;
+
+	  if (htab->dt_tlsdesc_plt &&
+		(!add_dynamic_entry (DT_TLSDESC_PLT,0) 
+		 || !add_dynamic_entry (DT_TLSDESC_GOT,0)))
+	    return FALSE; 
 	}
 
       if (relocs)
@@ -12083,6 +13605,49 @@
   return TRUE;
 }
 
+/* Size sections even though they're not dynamic.  We use it to setup
+   _TLS_MODULE_BASE_, if needed.  */
+
+static bfd_boolean
+elf32_arm_always_size_sections (bfd *output_bfd,
+	                        struct bfd_link_info *info)
+{
+  asection *tls_sec;
+
+  if (info->relocatable)
+    return TRUE;
+
+  tls_sec = elf_hash_table (info)->tls_sec;
+
+  if (tls_sec)
+    {
+      struct elf_link_hash_entry *tlsbase;
+
+      tlsbase = elf_link_hash_lookup
+	(elf_hash_table (info), "_TLS_MODULE_BASE_", TRUE, TRUE, FALSE);
+
+      if (tlsbase)
+        {
+          struct bfd_link_hash_entry *bh = NULL;
+	  const struct elf_backend_data *bed
+            = get_elf_backend_data (output_bfd);
+
+          if (!(_bfd_generic_link_add_one_symbol
+		(info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL,
+		 tls_sec, 0, NULL, FALSE,
+		 bed->collect, &bh)))
+	    return FALSE;
+	  
+      	  tlsbase->type = STT_TLS;
+          tlsbase = (struct elf_link_hash_entry *)bh;
+          tlsbase->def_regular = 1;
+          tlsbase->other = STV_HIDDEN;
+          (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE);
+	}
+    }
+  return TRUE;
+}
+
 /* Finish up dynamic symbol handling.  We set the contents of various
    dynamic sections here.  */
 
@@ -12092,11 +13657,9 @@
 				 struct elf_link_hash_entry * h,
 				 Elf_Internal_Sym * sym)
 {
-  bfd * dynobj;
   struct elf32_arm_link_hash_table *htab;
   struct elf32_arm_link_hash_entry *eh;
 
-  dynobj = elf_hash_table (info)->dynobj;
   htab = elf32_arm_hash_table (info);
   if (htab == NULL)
     return FALSE;
@@ -12105,186 +13668,12 @@
 
   if (h->plt.offset != (bfd_vma) -1)
     {
-      asection * splt;
-      asection * srel;
-      bfd_byte *loc;
-      bfd_vma plt_index;
-      Elf_Internal_Rela rel;
-
-      /* This symbol has an entry in the procedure linkage table.  Set
-	 it up.  */
-
-      BFD_ASSERT (h->dynindx != -1);
-
-      splt = bfd_get_section_by_name (dynobj, ".plt");
-      srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (htab, ".plt"));
-      BFD_ASSERT (splt != NULL && srel != NULL);
-
-      /* Fill in the entry in the procedure linkage table.  */
-      if (htab->symbian_p)
+      if (!eh->is_iplt)
 	{
-	  put_arm_insn (htab, output_bfd,
-		      elf32_arm_symbian_plt_entry[0],
-		      splt->contents + h->plt.offset);
-	  bfd_put_32 (output_bfd,
-		      elf32_arm_symbian_plt_entry[1],
-		      splt->contents + h->plt.offset + 4);
-
-	  /* Fill in the entry in the .rel.plt section.  */
-	  rel.r_offset = (splt->output_section->vma
-			  + splt->output_offset
-			  + h->plt.offset + 4);
-	  rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
-
-	  /* Get the index in the procedure linkage table which
-	     corresponds to this symbol.  This is the index of this symbol
-	     in all the symbols for which we are making plt entries.  The
-	     first entry in the procedure linkage table is reserved.  */
-	  plt_index = ((h->plt.offset - htab->plt_header_size)
-		       / htab->plt_entry_size);
+	  BFD_ASSERT (h->dynindx != -1);
+	  elf32_arm_populate_plt_entry (output_bfd, info, &h->plt, &eh->plt,
+					h->dynindx, 0);
 	}
-      else
-	{
-	  bfd_vma got_offset, got_address, plt_address;
-	  bfd_vma got_displacement;
-	  asection * sgot;
-	  bfd_byte * ptr;
-
-	  sgot = bfd_get_section_by_name (dynobj, ".got.plt");
-	  BFD_ASSERT (sgot != NULL);
-
-	  /* Get the offset into the .got.plt table of the entry that
-	     corresponds to this function.  */
-	  got_offset = eh->plt_got_offset;
-
-	  /* Get the index in the procedure linkage table which
-	     corresponds to this symbol.  This is the index of this symbol
-	     in all the symbols for which we are making plt entries.  The
-	     first three entries in .got.plt are reserved; after that
-	     symbols appear in the same order as in .plt.  */
-	  plt_index = (got_offset - 12) / 4;
-
-	  /* Calculate the address of the GOT entry.  */
-	  got_address = (sgot->output_section->vma
-			 + sgot->output_offset
-			 + got_offset);
-
-	  /* ...and the address of the PLT entry.  */
-	  plt_address = (splt->output_section->vma
-			 + splt->output_offset
-			 + h->plt.offset);
-
-	  ptr = htab->splt->contents + h->plt.offset;
-	  if (htab->vxworks_p && info->shared)
-	    {
-	      unsigned int i;
-	      bfd_vma val;
-
-	      for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
-		{
-		  val = elf32_arm_vxworks_shared_plt_entry[i];
-		  if (i == 2)
-		    val |= got_address - sgot->output_section->vma;
-		  if (i == 5)
-		    val |= plt_index * RELOC_SIZE (htab);
-		  if (i == 2 || i == 5)
-		    bfd_put_32 (output_bfd, val, ptr);
-		  else
-		    put_arm_insn (htab, output_bfd, val, ptr);
-		}
-	    }
-	  else if (htab->vxworks_p)
-	    {
-	      unsigned int i;
-	      bfd_vma val;
-
-	      for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
-		{
-		  val = elf32_arm_vxworks_exec_plt_entry[i];
-		  if (i == 2)
-		    val |= got_address;
-		  if (i == 4)
-		    val |= 0xffffff & -((h->plt.offset + i * 4 + 8) >> 2);
-		  if (i == 5)
-		    val |= plt_index * RELOC_SIZE (htab);
-		  if (i == 2 || i == 5)
-		    bfd_put_32 (output_bfd, val, ptr);
-		  else
-		    put_arm_insn (htab, output_bfd, val, ptr);
-		}
-
-	      loc = (htab->srelplt2->contents
-		     + (plt_index * 2 + 1) * RELOC_SIZE (htab));
-
-	      /* Create the .rela.plt.unloaded R_ARM_ABS32 relocation
-		 referencing the GOT for this PLT entry.  */
-	      rel.r_offset = plt_address + 8;
-	      rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
-	      rel.r_addend = got_offset;
-	      SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
-	      loc += RELOC_SIZE (htab);
-
-	      /* Create the R_ARM_ABS32 relocation referencing the
-		 beginning of the PLT for this GOT entry.  */
-	      rel.r_offset = got_address;
-	      rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
-	      rel.r_addend = 0;
-	      SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
-	    }
-	  else
-	    {
-	      bfd_signed_vma thumb_refs;
-	      /* Calculate the displacement between the PLT slot and the
-		 entry in the GOT.  The eight-byte offset accounts for the
-		 value produced by adding to pc in the first instruction
-		 of the PLT stub.  */
-	      got_displacement = got_address - (plt_address + 8);
-
-	      BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
-
-	      thumb_refs = eh->plt_thumb_refcount;
-	      if (!htab->use_blx)
-		thumb_refs += eh->plt_maybe_thumb_refcount;
-
-	      if (thumb_refs > 0)
-		{
-		  put_thumb_insn (htab, output_bfd,
-				  elf32_arm_plt_thumb_stub[0], ptr - 4);
-		  put_thumb_insn (htab, output_bfd,
-				  elf32_arm_plt_thumb_stub[1], ptr - 2);
-		}
-
-	      put_arm_insn (htab, output_bfd,
-			    elf32_arm_plt_entry[0]
-			    | ((got_displacement & 0x0ff00000) >> 20),
-			    ptr + 0);
-	      put_arm_insn (htab, output_bfd,
-			    elf32_arm_plt_entry[1]
-			    | ((got_displacement & 0x000ff000) >> 12),
-			    ptr+ 4);
-	      put_arm_insn (htab, output_bfd,
-			    elf32_arm_plt_entry[2]
-			    | (got_displacement & 0x00000fff),
-			    ptr + 8);
-#ifdef FOUR_WORD_PLT
-	      bfd_put_32 (output_bfd, elf32_arm_plt_entry[3], ptr + 12);
-#endif
-	    }
-
-	  /* Fill in the entry in the global offset table.  */
-	  bfd_put_32 (output_bfd,
-		      (splt->output_section->vma
-		       + splt->output_offset),
-		      sgot->contents + got_offset);
-
-	  /* Fill in the entry in the .rel(a).plt section.  */
-	  rel.r_addend = 0;
-	  rel.r_offset = got_address;
-	  rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
-	}
-
-      loc = srel->contents + plt_index * RELOC_SIZE (htab);
-      SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
 
       if (!h->def_regular)
 	{
@@ -12298,70 +13687,31 @@
 	  if (!h->ref_regular_nonweak)
 	    sym->st_value = 0;
 	}
-    }
-
-  if (h->got.offset != (bfd_vma) -1
-      && (elf32_arm_hash_entry (h)->tls_type & GOT_TLS_GD) == 0
-      && (elf32_arm_hash_entry (h)->tls_type & GOT_TLS_IE) == 0)
-    {
-      asection * sgot;
-      asection * srel;
-      Elf_Internal_Rela rel;
-      bfd_byte *loc;
-      bfd_vma offset;
-
-      /* This symbol has an entry in the global offset table.  Set it
-	 up.  */
-      sgot = bfd_get_section_by_name (dynobj, ".got");
-      srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (htab, ".got"));
-      BFD_ASSERT (sgot != NULL && srel != NULL);
-
-      offset = (h->got.offset & ~(bfd_vma) 1);
-      rel.r_addend = 0;
-      rel.r_offset = (sgot->output_section->vma
-		      + sgot->output_offset
-		      + offset);
-
-      /* If this is a static link, or it is a -Bsymbolic link and the
-	 symbol is defined locally or was forced to be local because
-	 of a version file, we just want to emit a RELATIVE reloc.
-	 The entry in the global offset table will already have been
-	 initialized in the relocate_section function.  */
-      if (info->shared
-	  && SYMBOL_REFERENCES_LOCAL (info, h))
+      else if (eh->is_iplt && eh->plt.noncall_refcount != 0)
 	{
-	  BFD_ASSERT ((h->got.offset & 1) != 0);
-	  rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
-	  if (!htab->use_rel)
-	    {
-	      rel.r_addend = bfd_get_32 (output_bfd, sgot->contents + offset);
-	      bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + offset);
-	    }
+	  /* At least one non-call relocation references this .iplt entry,
+	     so the .iplt entry is the function's canonical address.  */
+	  sym->st_info = ELF_ST_INFO (ELF_ST_BIND (sym->st_info), STT_FUNC);
+	  sym->st_target_internal = ST_BRANCH_TO_ARM;
+	  sym->st_shndx = (_bfd_elf_section_from_bfd_section
+			   (output_bfd, htab->root.iplt->output_section));
+	  sym->st_value = (h->plt.offset
+			   + htab->root.iplt->output_section->vma
+			   + htab->root.iplt->output_offset);
 	}
-      else
-	{
-	  BFD_ASSERT ((h->got.offset & 1) == 0);
-	  bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + offset);
-	  rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
-	}
-
-      loc = srel->contents + srel->reloc_count++ * RELOC_SIZE (htab);
-      SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
     }
 
   if (h->needs_copy)
     {
       asection * s;
       Elf_Internal_Rela rel;
-      bfd_byte *loc;
 
       /* This symbol needs a copy reloc.  Set it up.  */
       BFD_ASSERT (h->dynindx != -1
 		  && (h->root.type == bfd_link_hash_defined
 		      || h->root.type == bfd_link_hash_defweak));
 
-      s = bfd_get_section_by_name (h->root.u.def.section->owner,
-				   RELOC_SECTION (htab, ".bss"));
+      s = htab->srelbss;
       BFD_ASSERT (s != NULL);
 
       rel.r_addend = 0;
@@ -12369,8 +13719,7 @@
 		      + h->root.u.def.section->output_section->vma
 		      + h->root.u.def.section->output_offset);
       rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY);
-      loc = s->contents + s->reloc_count++ * RELOC_SIZE (htab);
-      SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+      elf32_arm_add_dynreloc (output_bfd, info, s, &rel);
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  On VxWorks,
@@ -12383,6 +13732,24 @@
   return TRUE;
 }
 
+static void
+arm_put_trampoline (struct elf32_arm_link_hash_table *htab, bfd *output_bfd,
+		    void *contents,
+		    const unsigned long *template, unsigned count)
+{
+  unsigned ix;
+  
+  for (ix = 0; ix != count; ix++)
+    {
+      unsigned long insn = template[ix];
+
+      /* Emit mov pc,rx if bx is not permitted.  */
+      if (htab->fix_v4bx == 1 && (insn & 0x0ffffff0) == 0x012fff10)
+	insn = (insn & 0xf000000f) | 0x01a0f000;
+      put_arm_insn (htab, output_bfd, insn, (char *)contents + ix*4);
+    }
+}
+
 /* Finish up the dynamic sections.  */
 
 static bfd_boolean
@@ -12399,8 +13766,11 @@
 
   dynobj = elf_hash_table (info)->dynobj;
 
-  sgot = bfd_get_section_by_name (dynobj, ".got.plt");
-  BFD_ASSERT (htab->symbian_p || sgot != NULL);
+  sgot = htab->root.sgotplt;
+  /* A broken linker script might have discarded the dynamic sections.
+     Catch this here so that we do not seg-fault later on.  */
+  if (sgot != NULL && bfd_is_abs_section (sgot->output_section))
+    return FALSE;
   sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
 
   if (elf_hash_table (info)->dynamic_sections_created)
@@ -12408,8 +13778,9 @@
       asection *splt;
       Elf32_External_Dyn *dyncon, *dynconend;
 
-      splt = bfd_get_section_by_name (dynobj, ".plt");
+      splt = htab->root.splt;
       BFD_ASSERT (splt != NULL && sdyn != NULL);
+      BFD_ASSERT (htab->symbian_p || sgot != NULL);
 
       dyncon = (Elf32_External_Dyn *) sdyn->contents;
       dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
@@ -12475,8 +13846,7 @@
 	      break;
 
 	    case DT_PLTRELSZ:
-	      s = bfd_get_section_by_name (output_bfd,
-					   RELOC_SECTION (htab, ".plt"));
+	      s = htab->root.srelplt;
 	      BFD_ASSERT (s != NULL);
 	      dyn.d_un.d_val = s->size;
 	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -12495,8 +13865,7 @@
 		     the linker script arranges for .rel(a).plt to follow all
 		     other relocation sections, we don't have to worry
 		     about changing the DT_REL entry.  */
-		  s = bfd_get_section_by_name (output_bfd,
-					       RELOC_SECTION (htab, ".plt"));
+		  s = htab->root.srelplt;
 		  if (s != NULL)
 		    dyn.d_un.d_val -= s->size;
 		  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -12538,6 +13907,20 @@
 		}
 	      break;
 
+	    case DT_TLSDESC_PLT:
+              s = htab->root.splt;
+	      dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset
+				+ htab->dt_tlsdesc_plt);
+	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+	      break;
+
+	    case DT_TLSDESC_GOT:
+              s = htab->root.sgot;
+	      dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset
+		      		+ htab->dt_tlsdesc_got);
+	      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+	      break;
+
 	      /* Set the bottom bit of DT_INIT/FINI if the
 		 corresponding function is Thumb.  */
 	    case DT_INIT:
@@ -12554,8 +13937,7 @@
 
 		  eh = elf_link_hash_lookup (elf_hash_table (info), name,
 					     FALSE, FALSE, TRUE);
-		  if (eh != NULL
-		      && ELF_ST_TYPE (eh->type) == STT_ARM_TFUNC)
+		  if (eh != NULL && eh->target_internal == ST_BRANCH_TO_THUMB)
 		    {
 		      dyn.d_un.d_val |= 1;
 		      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
@@ -12627,14 +14009,49 @@
       if (splt->output_section->owner == output_bfd)
 	elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
 
-      if (htab->vxworks_p && !info->shared && htab->splt->size > 0)
+      if (htab->dt_tlsdesc_plt)
+	{
+	  bfd_vma got_address
+	    = sgot->output_section->vma + sgot->output_offset;
+	  bfd_vma gotplt_address = (htab->root.sgot->output_section->vma
+				    + htab->root.sgot->output_offset);
+	  bfd_vma plt_address
+	    = splt->output_section->vma + splt->output_offset;
+
+	  arm_put_trampoline (htab, output_bfd, 
+			      splt->contents + htab->dt_tlsdesc_plt,
+			      dl_tlsdesc_lazy_trampoline, 6);
+
+	  bfd_put_32 (output_bfd,
+		      gotplt_address + htab->dt_tlsdesc_got
+		      - (plt_address + htab->dt_tlsdesc_plt)
+		      - dl_tlsdesc_lazy_trampoline[6],
+		      splt->contents + htab->dt_tlsdesc_plt + 24);
+	  bfd_put_32 (output_bfd,
+		      got_address - (plt_address + htab->dt_tlsdesc_plt)
+		      - dl_tlsdesc_lazy_trampoline[7],
+		      splt->contents + htab->dt_tlsdesc_plt + 24 + 4);
+	}
+
+      if (htab->tls_trampoline)
+	{
+	  arm_put_trampoline (htab, output_bfd, 
+			      splt->contents + htab->tls_trampoline,
+			      tls_trampoline, 3);
+#ifdef FOUR_WORD_PLT
+	  bfd_put_32 (output_bfd, 0x00000000,
+		      splt->contents + htab->tls_trampoline + 12);
+#endif 
+	}
+
+      if (htab->vxworks_p && !info->shared && htab->root.splt->size > 0)
 	{
 	  /* Correct the .rel(a).plt.unloaded relocations.  They will have
 	     incorrect symbol indexes.  */
 	  int num_plts;
 	  unsigned char *p;
 
-	  num_plts = ((htab->splt->size - htab->plt_header_size)
+	  num_plts = ((htab->root.splt->size - htab->plt_header_size)
 		      / htab->plt_entry_size);
 	  p = htab->srelplt2->contents + RELOC_SIZE (htab);
 
@@ -12714,17 +14131,6 @@
     }
 }
 
-/* Set the right machine number for an Arm ELF file.  */
-
-static bfd_boolean
-elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
-{
-  if (hdr->sh_type == SHT_NOTE)
-    *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
-
-  return TRUE;
-}
-
 static void
 elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
 {
@@ -12835,39 +14241,44 @@
   sym.st_other = 0;
   sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
   sym.st_shndx = osi->sec_shndx;
+  sym.st_target_internal = 0;
   elf32_arm_section_map_add (osi->sec, names[type][1], offset);
   return osi->func (osi->finfo, names[type], &sym, osi->sec, NULL) == 1;
 }
 
-
-/* Output mapping symbols for PLT entries associated with H.  */
+/* Output mapping symbols for the PLT entry described by ROOT_PLT and ARM_PLT.
+   IS_IPLT_ENTRY_P says whether the PLT is in .iplt rather than .plt.  */
 
 static bfd_boolean
-elf32_arm_output_plt_map (struct elf_link_hash_entry *h, void *inf)
+elf32_arm_output_plt_map_1 (output_arch_syminfo *osi,
+			    bfd_boolean is_iplt_entry_p,
+			    union gotplt_union *root_plt,
+			    struct arm_plt_info *arm_plt)
 {
-  output_arch_syminfo *osi = (output_arch_syminfo *) inf;
   struct elf32_arm_link_hash_table *htab;
-  struct elf32_arm_link_hash_entry *eh;
-  bfd_vma addr;
+  bfd_vma addr, plt_header_size;
 
-  if (h->root.type == bfd_link_hash_indirect)
-    return TRUE;
-
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->plt.offset == (bfd_vma) -1)
+  if (root_plt->offset == (bfd_vma) -1)
     return TRUE;
 
   htab = elf32_arm_hash_table (osi->info);
   if (htab == NULL)
     return FALSE;
 
-  eh = (struct elf32_arm_link_hash_entry *) h;
-  addr = h->plt.offset;
+  if (is_iplt_entry_p)
+    {
+      osi->sec = htab->root.iplt;
+      plt_header_size = 0;
+    }
+  else
+    {
+      osi->sec = htab->root.splt;
+      plt_header_size = htab->plt_header_size;
+    }
+  osi->sec_shndx = (_bfd_elf_section_from_bfd_section
+		    (osi->info->output_bfd, osi->sec->output_section));
+
+  addr = root_plt->offset & -2;
   if (htab->symbian_p)
     {
       if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
@@ -12888,13 +14299,10 @@
     }
   else
     {
-      bfd_signed_vma thumb_refs;
+      bfd_boolean thumb_stub_p;
 
-      thumb_refs = eh->plt_thumb_refcount;
-      if (!htab->use_blx)
-	thumb_refs += eh->plt_maybe_thumb_refcount;
-
-      if (thumb_refs > 0)
+      thumb_stub_p = elf32_arm_plt_needs_thumb_stub_p (osi->info, arm_plt);
+      if (thumb_stub_p)
 	{
 	  if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr - 4))
 	    return FALSE;
@@ -12908,7 +14316,7 @@
       /* A three-word PLT with no Thumb thunk contains only Arm code,
 	 so only need to output a mapping symbol for the first PLT entry and
 	 entries with thumb thunks.  */
-      if (thumb_refs > 0 || addr == 20)
+      if (thumb_stub_p || addr == plt_header_size)
 	{
 	  if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
 	    return FALSE;
@@ -12919,6 +14327,28 @@
   return TRUE;
 }
 
+/* Output mapping symbols for PLT entries associated with H.  */
+
+static bfd_boolean
+elf32_arm_output_plt_map (struct elf_link_hash_entry *h, void *inf)
+{
+  output_arch_syminfo *osi = (output_arch_syminfo *) inf;
+  struct elf32_arm_link_hash_entry *eh;
+
+  if (h->root.type == bfd_link_hash_indirect)
+    return TRUE;
+
+  if (h->root.type == bfd_link_hash_warning)
+    /* When warning symbols are created, they **replace** the "real"
+       entry in the hash table, thus we never get to see the real
+       symbol in a hash traversal.  So look at it now.  */
+    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+  eh = (struct elf32_arm_link_hash_entry *) h;
+  return elf32_arm_output_plt_map_1 (osi, SYMBOL_CALLS_LOCAL (osi->info, h),
+				     &h->plt, &eh->plt);
+}
+
 /* Output a single local symbol for a generated stub.  */
 
 static bfd_boolean
@@ -12934,6 +14364,7 @@
   sym.st_other = 0;
   sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
   sym.st_shndx = osi->sec_shndx;
+  sym.st_target_internal = 0;
   return osi->func (osi->finfo, name, &sym, osi->sec, NULL) == 1;
 }
 
@@ -13087,7 +14518,8 @@
 		   == SEC_HAS_CONTENTS
 		&& get_arm_elf_section_data (osi.sec) != NULL
 		&& get_arm_elf_section_data (osi.sec)->mapcount == 0
-		&& osi.sec->size > 0)
+		&& osi.sec->size > 0
+		&& (osi.sec->flags & SEC_EXCLUDE) == 0)
 	      {
 		osi.sec_shndx = _bfd_elf_section_from_bfd_section
 		  (output_bfd, osi.sec->output_section);
@@ -13172,36 +14604,81 @@
     }
 
   /* Finally, output mapping symbols for the PLT.  */
-  if (!htab->splt || htab->splt->size == 0)
-    return TRUE;
-
-  osi.sec_shndx = _bfd_elf_section_from_bfd_section (output_bfd,
-						     htab->splt->output_section);
-  osi.sec = htab->splt;
-  /* Output mapping symbols for the plt header.  SymbianOS does not have a
-     plt header.  */
-  if (htab->vxworks_p)
+  if (htab->root.splt && htab->root.splt->size > 0)
     {
-      /* VxWorks shared libraries have no PLT header.  */
-      if (!info->shared)
+      osi.sec = htab->root.splt;
+      osi.sec_shndx = (_bfd_elf_section_from_bfd_section
+		       (output_bfd, osi.sec->output_section));
+
+      /* Output mapping symbols for the plt header.  SymbianOS does not have a
+	 plt header.  */
+      if (htab->vxworks_p)
+	{
+	  /* VxWorks shared libraries have no PLT header.  */
+	  if (!info->shared)
+	    {
+	      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
+		return FALSE;
+	      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 12))
+		return FALSE;
+	    }
+	}
+      else if (!htab->symbian_p)
 	{
 	  if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
 	    return FALSE;
-	  if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 12))
+#ifndef FOUR_WORD_PLT
+	  if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 16))
 	    return FALSE;
+#endif
 	}
     }
-  else if (!htab->symbian_p)
+  if ((htab->root.splt && htab->root.splt->size > 0)
+      || (htab->root.iplt && htab->root.iplt->size > 0))
     {
-      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
-	return FALSE;
-#ifndef FOUR_WORD_PLT
-      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 16))
-	return FALSE;
-#endif
-    }
+      elf_link_hash_traverse (&htab->root, elf32_arm_output_plt_map, &osi);
+      for (input_bfd = info->input_bfds;
+	   input_bfd != NULL;
+	   input_bfd = input_bfd->link_next)
+	{
+	  struct arm_local_iplt_info **local_iplt;
+	  unsigned int i, num_syms;
 
-  elf_link_hash_traverse (&htab->root, elf32_arm_output_plt_map, (void *) &osi);
+	  local_iplt = elf32_arm_local_iplt (input_bfd);
+	  if (local_iplt != NULL)
+	    {
+	      num_syms = elf_symtab_hdr (input_bfd).sh_info;
+	      for (i = 0; i < num_syms; i++)
+		if (local_iplt[i] != NULL
+		    && !elf32_arm_output_plt_map_1 (&osi, TRUE,
+						    &local_iplt[i]->root,
+						    &local_iplt[i]->arm))
+		  return FALSE;
+	    }
+	}
+    }
+  if (htab->dt_tlsdesc_plt != 0)
+    {
+      /* Mapping symbols for the lazy tls trampoline.  */
+      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, htab->dt_tlsdesc_plt))
+	return FALSE;
+       
+      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA,
+				     htab->dt_tlsdesc_plt + 24))
+	return FALSE;
+    }
+  if (htab->tls_trampoline != 0)
+    {
+      /* Mapping symbols for the tls trampoline.  */
+      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, htab->tls_trampoline))
+	return FALSE;
+#ifdef FOUR_WORD_PLT
+      if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA,
+				     htab->tls_trampoline + 12))
+	return FALSE;
+#endif 
+    }
+  
   return TRUE;
 }
 
@@ -13658,19 +15135,6 @@
   return FALSE;
 }
 
-/* Display STT_ARM_TFUNC symbols as functions.  */
-
-static void
-elf32_arm_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
-			     asymbol *asym)
-{
-  elf_symbol_type *elfsym = (elf_symbol_type *) asym;
-
-  if (ELF_ST_TYPE (elfsym->internal_elf_sym.st_info) == STT_ARM_TFUNC)
-    elfsym->symbol.flags |= BSF_FUNCTION;
-}
-
-
 /* Mangle thumb function symbols as we read them in.  */
 
 static bfd_boolean
@@ -13683,13 +15147,28 @@
     return FALSE;
 
   /* New EABI objects mark thumb function symbols by setting the low bit of
-     the address.  Turn these into STT_ARM_TFUNC.  */
-  if ((ELF_ST_TYPE (dst->st_info) == STT_FUNC)
-      && (dst->st_value & 1))
+     the address.  */
+  if (ELF_ST_TYPE (dst->st_info) == STT_FUNC
+      || ELF_ST_TYPE (dst->st_info) == STT_GNU_IFUNC)
     {
-      dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_ARM_TFUNC);
-      dst->st_value &= ~(bfd_vma) 1;
+      if (dst->st_value & 1)
+	{
+	  dst->st_value &= ~(bfd_vma) 1;
+	  dst->st_target_internal = ST_BRANCH_TO_THUMB;
+	}
+      else
+	dst->st_target_internal = ST_BRANCH_TO_ARM;
     }
+  else if (ELF_ST_TYPE (dst->st_info) == STT_ARM_TFUNC)
+    {
+      dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_FUNC);
+      dst->st_target_internal = ST_BRANCH_TO_THUMB;
+    }
+  else if (ELF_ST_TYPE (dst->st_info) == STT_SECTION)
+    dst->st_target_internal = ST_BRANCH_LONG;
+  else
+    dst->st_target_internal = ST_BRANCH_UNKNOWN;
+
   return TRUE;
 }
 
@@ -13708,10 +15187,11 @@
      of the address set, as per the new EABI.  We do this unconditionally
      because objcopy does not set the elf header flags until after
      it writes out the symbol table.  */
-  if (ELF_ST_TYPE (src->st_info) == STT_ARM_TFUNC)
+  if (src->st_target_internal == ST_BRANCH_TO_THUMB)
     {
       newsym = *src;
-      newsym.st_info = ELF_ST_INFO (ELF_ST_BIND (src->st_info), STT_FUNC);
+      if (ELF_ST_TYPE (src->st_info) != STT_GNU_IFUNC)
+	newsym.st_info = ELF_ST_INFO (ELF_ST_BIND (src->st_info), STT_FUNC);
       if (newsym.st_shndx != SHN_UNDEF)
         {
           /* Do this only for defined symbols. At link type, the static
@@ -13781,12 +15261,25 @@
     return 0;
 }
 
-/* We have two function types: STT_FUNC and STT_ARM_TFUNC.  */
+/* Hook called by the linker routine which adds symbols from an object
+   file.  */
 
 static bfd_boolean
-elf32_arm_is_function_type (unsigned int type)
+elf32_arm_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+			   Elf_Internal_Sym *sym, const char **namep,
+			   flagword *flagsp, asection **secp, bfd_vma *valp)
 {
-  return (type == STT_FUNC) || (type == STT_ARM_TFUNC);
+  if ((abfd->flags & DYNAMIC) == 0
+      && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+	  || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+
+  if (elf32_arm_hash_table (info)->vxworks_p
+      && !elf_vxworks_add_symbol_hook (abfd, info, sym, namep,
+				       flagsp, secp, valp))
+    return FALSE;
+
+  return TRUE;
 }
 
 /* We use this to override swap_symbol_in and swap_symbol_out.  */
@@ -13859,22 +15352,21 @@
 #define elf_backend_finish_dynamic_symbol	elf32_arm_finish_dynamic_symbol
 #define elf_backend_finish_dynamic_sections	elf32_arm_finish_dynamic_sections
 #define elf_backend_size_dynamic_sections	elf32_arm_size_dynamic_sections
+#define elf_backend_always_size_sections	elf32_arm_always_size_sections
 #define elf_backend_init_index_section		_bfd_elf_init_2_index_sections
 #define elf_backend_post_process_headers	elf32_arm_post_process_headers
 #define elf_backend_reloc_type_class		elf32_arm_reloc_type_class
 #define elf_backend_object_p			elf32_arm_object_p
-#define elf_backend_section_flags		elf32_arm_section_flags
 #define elf_backend_fake_sections  		elf32_arm_fake_sections
 #define elf_backend_section_from_shdr  		elf32_arm_section_from_shdr
 #define elf_backend_final_write_processing      elf32_arm_final_write_processing
 #define elf_backend_copy_indirect_symbol        elf32_arm_copy_indirect_symbol
-#define elf_backend_symbol_processing		elf32_arm_symbol_processing
 #define elf_backend_size_info			elf32_arm_size_info
 #define elf_backend_modify_segment_map		elf32_arm_modify_segment_map
 #define elf_backend_additional_program_headers  elf32_arm_additional_program_headers
 #define elf_backend_output_arch_local_syms      elf32_arm_output_arch_local_syms
 #define elf_backend_begin_write_processing      elf32_arm_begin_write_processing
-#define elf_backend_is_function_type		elf32_arm_is_function_type
+#define elf_backend_add_symbol_hook		elf32_arm_add_symbol_hook
 
 #define elf_backend_can_refcount       1
 #define elf_backend_can_gc_sections    1
@@ -13942,8 +15434,6 @@
 
 #undef  bfd_elf32_bfd_link_hash_table_create
 #define bfd_elf32_bfd_link_hash_table_create	elf32_arm_vxworks_link_hash_table_create
-#undef  elf_backend_add_symbol_hook
-#define elf_backend_add_symbol_hook		elf_vxworks_add_symbol_hook
 #undef  elf_backend_final_write_processing
 #define elf_backend_final_write_processing	elf32_arm_vxworks_final_write_processing
 #undef  elf_backend_emit_relocs
@@ -13974,7 +15464,7 @@
   bfd_boolean flags_compatible = TRUE;
   asection *sec;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return FALSE;
 
@@ -14311,7 +15801,6 @@
 #define ELF_DYNAMIC_SEC_FLAGS \
   (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED)
 
-#undef elf_backend_add_symbol_hook
 #undef elf_backend_emit_relocs
 
 #undef  bfd_elf32_bfd_link_hash_table_create
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 07568a4..6d20aef 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1,6 +1,6 @@
 /* AVR-specific support for 32-bit ELF
    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011  Free Software Foundation, Inc.
    Contributed by Denis Chertykov <[email protected]>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -734,48 +734,6 @@
   cache_ptr->howto = &elf_avr_howto_table[r_type];
 }
 
-/* Look through the relocs for a section during the first phase.
-   Since we don't do .gots or .plts, we just need to consider the
-   virtual table relocs for gc.  */
-
-static bfd_boolean
-elf32_avr_check_relocs (bfd *abfd,
-			struct bfd_link_info *info,
-			asection *sec,
-			const Elf_Internal_Rela *relocs)
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  const Elf_Internal_Rela *rel;
-  const Elf_Internal_Rela *rel_end;
-
-  if (info->relocatable)
-    return TRUE;
-
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (abfd);
-
-  rel_end = relocs + sec->reloc_count;
-  for (rel = relocs; rel < rel_end; rel++)
-    {
-      struct elf_link_hash_entry *h;
-      unsigned long r_symndx;
-
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx < symtab_hdr->sh_info)
-        h = NULL;
-      else
-	{
-	  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;
-	}
-    }
-
-  return TRUE;
-}
-
 static bfd_boolean
 avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation)
 {
@@ -1340,6 +1298,34 @@
     case bfd_mach_avr6:
       val = E_AVR_MACH_AVR6;
       break;
+
+    case bfd_mach_avrxmega1:
+      val = E_AVR_MACH_XMEGA1;
+      break;
+
+    case bfd_mach_avrxmega2:
+      val = E_AVR_MACH_XMEGA2;
+      break;
+
+    case bfd_mach_avrxmega3:
+      val = E_AVR_MACH_XMEGA3;
+      break;
+
+    case bfd_mach_avrxmega4:
+      val = E_AVR_MACH_XMEGA4;
+      break;
+
+    case bfd_mach_avrxmega5:
+      val = E_AVR_MACH_XMEGA5;
+      break;
+
+    case bfd_mach_avrxmega6:
+      val = E_AVR_MACH_XMEGA6;
+      break;
+
+    case bfd_mach_avrxmega7:
+      val = E_AVR_MACH_XMEGA7;
+      break;
     }
 
   elf_elfheader (abfd)->e_machine = EM_AVR;
@@ -1402,6 +1388,34 @@
 	case E_AVR_MACH_AVR6:
 	  e_set = bfd_mach_avr6;
 	  break;
+
+	case E_AVR_MACH_XMEGA1:
+	  e_set = bfd_mach_avrxmega1;
+	  break;
+
+	case E_AVR_MACH_XMEGA2:
+	  e_set = bfd_mach_avrxmega2;
+	  break;
+
+	case E_AVR_MACH_XMEGA3:
+	  e_set = bfd_mach_avrxmega3;
+	  break;
+
+	case E_AVR_MACH_XMEGA4:
+	  e_set = bfd_mach_avrxmega4;
+	  break;
+
+	case E_AVR_MACH_XMEGA5:
+	  e_set = bfd_mach_avrxmega5;
+	  break;
+
+	case E_AVR_MACH_XMEGA6:
+	  e_set = bfd_mach_avrxmega6;
+	  break;
+
+	case E_AVR_MACH_XMEGA7:
+	  e_set = bfd_mach_avrxmega7;
+	  break;
 	}
     }
   return bfd_default_set_arch_mach (abfd, bfd_arch_avr,
@@ -1994,10 +2008,10 @@
                 if ((0x95 == next_insn_msb) && (0x08 == next_insn_lsb))
                   {
                     /* The next insn is a ret. We possibly could delete
-                       this ret. First we need to check for preceeding
+                       this ret. First we need to check for preceding
                        sbis/sbic/sbrs or cpse "skip" instructions.  */
 
-                    int there_is_preceeding_non_skip_insn = 1;
+                    int there_is_preceding_non_skip_insn = 1;
                     bfd_vma address_of_ret;
 
                     address_of_ret = dot + insn_size;
@@ -2009,51 +2023,52 @@
                       printf ("found jmp / ret sequence at address 0x%x\n",
                               (int) dot);
 
-                    /* We have to make sure that there is a preceeding insn.  */
+                    /* We have to make sure that there is a preceding insn.  */
                     if (irel->r_offset >= 2)
                       {
-                        unsigned char preceeding_msb;
-                        unsigned char preceeding_lsb;
-                        preceeding_msb =
+                        unsigned char preceding_msb;
+                        unsigned char preceding_lsb;
+
+                        preceding_msb =
 			  bfd_get_8 (abfd, contents + irel->r_offset - 1);
-                        preceeding_lsb =
+                        preceding_lsb =
 			  bfd_get_8 (abfd, contents + irel->r_offset - 2);
 
                         /* sbic.  */
-                        if (0x99 == preceeding_msb)
-                          there_is_preceeding_non_skip_insn = 0;
+                        if (0x99 == preceding_msb)
+                          there_is_preceding_non_skip_insn = 0;
 
                         /* sbis.  */
-                        if (0x9b == preceeding_msb)
-                          there_is_preceeding_non_skip_insn = 0;
+                        if (0x9b == preceding_msb)
+                          there_is_preceding_non_skip_insn = 0;
 
                         /* sbrc */
-                        if ((0xfc == (preceeding_msb & 0xfe)
-			     && (0x00 == (preceeding_lsb & 0x08))))
-                          there_is_preceeding_non_skip_insn = 0;
+                        if ((0xfc == (preceding_msb & 0xfe)
+			     && (0x00 == (preceding_lsb & 0x08))))
+                          there_is_preceding_non_skip_insn = 0;
 
                         /* sbrs */
-                        if ((0xfe == (preceeding_msb & 0xfe)
-			     && (0x00 == (preceeding_lsb & 0x08))))
-                          there_is_preceeding_non_skip_insn = 0;
+                        if ((0xfe == (preceding_msb & 0xfe)
+			     && (0x00 == (preceding_lsb & 0x08))))
+                          there_is_preceding_non_skip_insn = 0;
 
                         /* cpse */
-                        if (0x10 == (preceeding_msb & 0xfc))
-                          there_is_preceeding_non_skip_insn = 0;
+                        if (0x10 == (preceding_msb & 0xfc))
+                          there_is_preceding_non_skip_insn = 0;
 
-                        if (there_is_preceeding_non_skip_insn == 0)
+                        if (there_is_preceding_non_skip_insn == 0)
                           if (debug_relax)
-                            printf ("preceeding skip insn prevents deletion of"
-                                    " ret insn at addr 0x%x in section %s\n",
+                            printf ("preceding skip insn prevents deletion of"
+                                    " ret insn at Addy 0x%x in section %s\n",
                                     (int) dot + 2, sec->name);
                       }
                     else
                       {
                         /* There is no previous instruction.  */
-                        there_is_preceeding_non_skip_insn = 0;
+                        there_is_preceding_non_skip_insn = 0;
                       }
 
-                    if (there_is_preceeding_non_skip_insn)
+                    if (there_is_preceding_non_skip_insn)
                       {
                         /* We now only have to make sure that there is no
                            local label defined at the address of the ret
@@ -2998,7 +3013,6 @@
 #define elf_info_to_howto	             avr_info_to_howto_rela
 #define elf_info_to_howto_rel	             NULL
 #define elf_backend_relocate_section         elf32_avr_relocate_section
-#define elf_backend_check_relocs             elf32_avr_check_relocs
 #define elf_backend_can_gc_sections          1
 #define elf_backend_rela_normal		     1
 #define elf_backend_final_write_processing \
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 237391b..b112dfc 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1,5 +1,5 @@
 /* ADI Blackfin BFD support for 32-bit ELF.
-   Copyright 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -104,7 +104,7 @@
   /* if rightshift is 1 and the number odd, return error.  */
   if (howto->rightshift && (relocation & 0x01))
     {
-      fprintf(stderr, "relocation should be even number\n");
+      (*_bfd_error_handler) (_("relocation should be even number"));
       return bfd_reloc_overflow;
     }
 
@@ -360,7 +360,7 @@
   /* If rightshift is 1 and the number odd, return error.  */
   if (howto->rightshift && (relocation & 0x01))
     {
-      fprintf(stderr, "relocation should be even number\n");
+      (*_bfd_error_handler) (_("relocation should be even number"));
       return bfd_reloc_overflow;
     }
 
@@ -1120,6 +1120,22 @@
   return (reloc_howto_type *) NULL;
 }
 
+/* Set by ld emulation if --code-in-l1.  */
+bfd_boolean elf32_bfin_code_in_l1 = 0;
+
+/* Set by ld emulation if --data-in-l1.  */
+bfd_boolean elf32_bfin_data_in_l1 = 0;
+
+static void
+elf32_bfin_final_write_processing (bfd *abfd,
+				   bfd_boolean linker ATTRIBUTE_UNUSED)
+{
+  if (elf32_bfin_code_in_l1)
+    elf_elfheader (abfd)->e_flags |= EF_BFIN_CODE_IN_L1;
+  if (elf32_bfin_data_in_l1)
+    elf_elfheader (abfd)->e_flags |= EF_BFIN_DATA_IN_L1;
+}
+
 /* Return TRUE if the name is a local label.
    bfin local labels begin with L$.  */
 static bfd_boolean
@@ -3087,10 +3103,10 @@
 	  if (silence_segment_error == 1)
 	    silence_segment_error =
 	      (strlen (input_bfd->filename) == 6
-	       && strcmp (input_bfd->filename, "crt0.o") == 0)
+	       && filename_cmp (input_bfd->filename, "crt0.o") == 0)
 	      || (strlen (input_bfd->filename) > 6
-		  && strcmp (input_bfd->filename
-			     + strlen (input_bfd->filename) - 7,
+		  && filename_cmp (input_bfd->filename
+				   + strlen (input_bfd->filename) - 7,
 			     "/crt0.o") == 0)
 	      ? -1 : 0;
 #endif
@@ -3442,14 +3458,8 @@
 	return FALSE;
 
       bfinfdpic_gotfixup_section (info) = s;
-      flags = BSF_GLOBAL;
-    }
-  else
-    {
-      flags = BSF_GLOBAL | BSF_WEAK;
     }
 
-  flags = pltflags;
   pltflags |= SEC_CODE;
   if (bed->plt_not_loaded)
     pltflags &= ~ (SEC_CODE | SEC_LOAD | SEC_HAS_CONTENTS);
@@ -5266,7 +5276,8 @@
 	  && (info->symbolic
 	      || h->dynindx == -1 || h->forced_local) && h->def_regular)
 	{
-	  fprintf(stderr, "*** check this relocation %s\n", __FUNCTION__);
+	  (*_bfd_error_handler) (_("*** check this relocation %s"),
+				 __FUNCTION__);
 	  rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24);
 	  rela.r_addend = bfd_get_signed_32 (output_bfd,
 					     (sgot->contents
@@ -5440,9 +5451,6 @@
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct bfin_pcrel_relocs_copied *s;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (!h->def_regular || (!info->symbolic && !h->forced_local))
     {
       if ((info->flags & DF_TEXTREL) == 0)
@@ -5793,6 +5801,8 @@
                                         elf32_bfin_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data \
                                         elf32_bfin_print_private_bfd_data
+#define elf_backend_final_write_processing \
+                                        elf32_bfin_final_write_processing
 #define elf_backend_reloc_type_class    elf32_bfin_reloc_type_class
 #define elf_backend_can_gc_sections 1
 #define elf_backend_special_sections	elf32_bfin_special_sections
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 9644e9b..243a8ec 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1,6 +1,6 @@
 /* CRIS-specific support for 32-bit ELF.
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hans-Peter Nilsson, based on elf32-fr30.c
    PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
@@ -2663,6 +2663,9 @@
 	  /* For local symbols, treat these like GOT relocs.  */
 	  if (h == NULL)
 	    goto local_got_reloc;
+	  else
+	    /* For global symbols, adjust the reloc-specific refcount.  */
+	    elf_cris_hash_entry (h)->gotplt_refcount--;
 	  /* Fall through.  */
 
 	case R_CRIS_32_PLT_GOTREL:
@@ -2671,10 +2674,14 @@
 	    local_got_refcounts[-1]--;
 	  /* Fall through.  */
 
+	case R_CRIS_8:
+	case R_CRIS_16:
+	case R_CRIS_32:
 	case R_CRIS_8_PCREL:
 	case R_CRIS_16_PCREL:
 	case R_CRIS_32_PCREL:
 	case R_CRIS_32_PLT_PCREL:
+	  /* Negate the increment we did in cris_elf_check_relocs.  */
 	  if (h != NULL)
 	    {
 	      if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -2733,8 +2740,10 @@
 {
   struct bfd_link_info *info = (struct bfd_link_info *) p;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
+  /* A GOTPLT reloc, when activated, is supposed to be included into
+     the PLT refcount.  */
+  BFD_ASSERT (h->gotplt_refcount == 0
+	      || h->gotplt_refcount <= h->root.plt.refcount);
 
   /* If nobody wanted a GOTPLT with this symbol, we're done.  */
   if (h->gotplt_refcount <= 0)
@@ -3956,9 +3965,6 @@
   struct elf_cris_pcrel_relocs_copied *s;
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
-
   /* If a symbol has been forced local or we have found a regular
      definition for the symbolic link case, then we won't be needing
      any relocs.  */
@@ -4014,9 +4020,6 @@
 {
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
-
   /* If we're not creating a shared library and have a symbol which is
      referred to by .got references, but the symbol is defined locally,
      (or rather, not defined by a DSO) then lose the reloc for the .got
diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c
index 6b96ac9..29b8910 100644
--- a/bfd/elf32-dlx.c
+++ b/bfd/elf32-dlx.c
@@ -1,5 +1,5 @@
 /* DLX specific support for 32-bit ELF
-   Copyright 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -139,9 +139,8 @@
   /* Can not support a long jump to sections other then .text.  */
   if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
     {
-      fprintf (stderr,
-	       "BFD Link Error: branch (PC rel16) to section (%s) not supported\n",
-	       symbol->section->output_section->name);
+      (*_bfd_error_handler) (_("BFD Link Error: branch (PC rel16) to section (%s) not supported"),
+			     symbol->section->output_section->name);
       return bfd_reloc_undefined;
     }
 
@@ -202,9 +201,8 @@
   /* Can not support a long jump to sections other then .text   */
   if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
     {
-      fprintf (stderr,
-	       "BFD Link Error: jump (PC rel26) to section (%s) not supported\n",
-	       symbol->section->output_section->name);
+      (*_bfd_error_handler) (_("BFD Link Error: jump (PC rel26) to section (%s) not supported"),
+			     symbol->section->output_section->name);
       return bfd_reloc_undefined;
     }
 
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index bce0540..7f3c4dd 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -1,5 +1,5 @@
 /* FRV-specific support for 32-bit ELF.
-   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2884,8 +2884,9 @@
 						      osec, sym,
 						      rel->r_addend))
 	    {
-	      (*_bfd_error_handler)
-		(_("%B(%A+0x%x): relocation to `%s+%x' may have caused the error above"),
+	      info->callbacks->einfo
+		(_("%H: relocation to `%s+%v'"
+		   " may have caused the error above\n"),
 		 input_bfd, input_section, rel->r_offset, name, rel->r_addend);
 	      return FALSE;
 	    }
@@ -2897,9 +2898,10 @@
 	  picrel = NULL;
 	  if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
 	    {
-	      info->callbacks->warning
-		(info, _("relocation references symbol not defined in the module"),
-		 name, input_bfd, input_section, rel->r_offset);
+	      info->callbacks->einfo
+		(_("%H: relocation references symbol"
+		   " not defined in the module\n"),
+		 input_bfd, input_section, rel->r_offset);
 	      return FALSE;
 	    }
 	  break;
@@ -2972,10 +2974,9 @@
 	    /* Is this a call instruction?  */
 	    if ((insn & (unsigned long)0x01fc0000) != 0x003c0000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GETTLSOFF not applied to a call instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GETTLSOFF not applied to a call instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3014,10 +3015,10 @@
 	    /* Is this an lddi instruction?  */
 	    if ((insn & (unsigned long)0x01fc0000) != 0x00cc0000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSDESC12 not applied to an lddi instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSDESC12"
+		     " not applied to an lddi instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3085,10 +3086,10 @@
 	    /* Is this a sethi instruction?  */
 	    if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSDESCHI not applied to a sethi instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSDESCHI"
+		     " not applied to a sethi instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3122,11 +3123,10 @@
 	    /* Is this a setlo or setlos instruction?  */
 	    if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSDESCLO"
-		     " not applied to a setlo or setlos instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSDESCLO"
+		     " not applied to a setlo or setlos instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3170,10 +3170,10 @@
 	    /* Is this an ldd instruction?  */
 	    if ((insn & (unsigned long)0x01fc0fc0) != 0x00080140)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_TLSDESC_RELAX not applied to an ldd instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_TLSDESC_RELAX"
+		     " not applied to an ldd instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3254,11 +3254,10 @@
 	    /* Is this a calll or callil instruction?  */
 	    if ((insn & (unsigned long)0x7ff80fc0) != 0x02300000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GETTLSOFF_RELAX"
-		     " not applied to a calll instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GETTLSOFF_RELAX"
+		     " not applied to a calll instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3309,10 +3308,10 @@
 	    /* Is this an ldi instruction?  */
 	    if ((insn & (unsigned long)0x01fc0000) != 0x00c80000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSOFF12 not applied to an ldi instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSOFF12"
+		     " not applied to an ldi instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3339,10 +3338,10 @@
 	    /* Is this a sethi instruction?  */
 	    if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSOFFHI not applied to a sethi instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSOFFHI"
+		     " not applied to a sethi instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3368,11 +3367,10 @@
 	    /* Is this a setlo or setlos instruction?  */
 	    if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_GOTTLSOFFLO"
-		     " not applied to a setlo or setlos instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_GOTTLSOFFLO"
+		     " not applied to a setlo or setlos instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3399,10 +3397,10 @@
 	    /* Is this an ld instruction?  */
 	    if ((insn & (unsigned long)0x01fc0fc0) != 0x00080100)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_TLSOFF_RELAX not applied to an ld instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_TLSOFF_RELAX"
+		     " not applied to an ld instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3444,10 +3442,10 @@
 	    /* Is this a sethi instruction?  */
 	    if ((insn & (unsigned long)0x01ff0000) != 0x00f80000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_TLSMOFFHI not applied to a sethi instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("%H: R_FRV_TLSMOFFHI"
+		     " not applied to a sethi instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3471,11 +3469,10 @@
 	    /* Is this a setlo or setlos instruction?  */
 	    if ((insn & (unsigned long)0x01f70000) != 0x00f40000)
 	      {
-		r = info->callbacks->warning
-		  (info,
-		   _("R_FRV_TLSMOFFLO"
-		     " not applied to a setlo or setlos instruction"),
-		   name, input_bfd, input_section, rel->r_offset);
+		info->callbacks->einfo
+		  (_("R_FRV_TLSMOFFLO"
+		     " not applied to a setlo or setlos instruction\n"),
+		   input_bfd, input_section, rel->r_offset);
 		return FALSE;
 	      }
 
@@ -3593,9 +3590,10 @@
 		  {
 		    if (addend)
 		      {
-			info->callbacks->warning
-			  (info, _("R_FRV_FUNCDESC references dynamic symbol with nonzero addend"),
-			   name, input_bfd, input_section, rel->r_offset);
+			info->callbacks->einfo
+			  (_("%H: R_FRV_FUNCDESC references dynamic symbol"
+			     " with nonzero addend\n"),
+			   input_bfd, input_section, rel->r_offset);
 			return FALSE;
 		      }
 		    dynindx = h->dynindx;
@@ -3633,10 +3631,10 @@
 						       input_section
 						       ->output_section))
 			  {
-			    info->callbacks->warning
-			      (info,
-			       _("cannot emit fixups in read-only section"),
-			       name, input_bfd, input_section, rel->r_offset);
+			    info->callbacks->einfo
+			      (_("%H: cannot emit fixups"
+				 " in read-only section\n"),
+			       input_bfd, input_section, rel->r_offset);
 			    return FALSE;
 			  }
 
@@ -3664,10 +3662,10 @@
 						   input_section
 						   ->output_section))
 		      {
-			info->callbacks->warning
-			  (info,
-			   _("cannot emit dynamic relocations in read-only section"),
-			   name, input_bfd, input_section, rel->r_offset);
+			info->callbacks->einfo
+			  (_("%H: cannot emit dynamic relocations"
+			     " in read-only section\n"),
+			   input_bfd, input_section, rel->r_offset);
 			return FALSE;
 		      }
 
@@ -3713,9 +3711,10 @@
 	      {
 		if (addend && r_type == R_FRV_FUNCDESC_VALUE)
 		  {
-		    info->callbacks->warning
-		      (info, _("R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend"),
-		       name, input_bfd, input_section, rel->r_offset);
+		    info->callbacks->einfo
+		      (_("%H: R_FRV_FUNCDESC_VALUE"
+			 " references dynamic symbol with nonzero addend\n"),
+		       input_bfd, input_section, rel->r_offset);
 		    return FALSE;
 		  }
 		dynindx = h->dynindx;
@@ -3754,10 +3753,9 @@
 						   input_section
 						   ->output_section))
 		      {
-			info->callbacks->warning
-			  (info,
-			   _("cannot emit fixups in read-only section"),
-			   name, input_bfd, input_section, rel->r_offset);
+			info->callbacks->einfo
+			  (_("%H: cannot emit fixups in read-only section\n"),
+			   input_bfd, input_section, rel->r_offset);
 			return FALSE;
 		      }
 		    if (!h || h->root.type != bfd_link_hash_undefweak)
@@ -3798,10 +3796,10 @@
 						   input_section
 						   ->output_section))
 		      {
-			info->callbacks->warning
-			  (info,
-			   _("cannot emit dynamic relocations in read-only section"),
-			   name, input_bfd, input_section, rel->r_offset);
+			info->callbacks->einfo
+			  (_("%H: cannot emit dynamic relocations"
+			     " in read-only section\n"),
+			   input_bfd, input_section, rel->r_offset);
 			return FALSE;
 		      }
 
@@ -3957,10 +3955,10 @@
 	  if (silence_segment_error == 1)
 	    silence_segment_error =
 	      (strlen (input_bfd->filename) == 6
-	       && strcmp (input_bfd->filename, "crt0.o") == 0)
+	       && filename_cmp (input_bfd->filename, "crt0.o") == 0)
 	      || (strlen (input_bfd->filename) > 6
-		  && strcmp (input_bfd->filename
-			     + strlen (input_bfd->filename) - 7,
+		  && filename_cmp (input_bfd->filename
+				   + strlen (input_bfd->filename) - 7,
 			     "/crt0.o") == 0)
 	      ? -1 : 0;
 	  if (!silence_segment_error
@@ -3969,16 +3967,9 @@
 	      && !(picrel && picrel->symndx == -1
 		   && picrel->d.h->root.type == bfd_link_hash_undefined))
 	    {
-	      if (info->shared || info->pie)
-		(*_bfd_error_handler)
-		  (_("%B(%A+0x%lx): reloc against `%s': %s"),
-		   input_bfd, input_section, (long)rel->r_offset, name,
-		   _("relocation references a different segment"));
-	      else
-		info->callbacks->warning
-		  (info,
-		   _("relocation references a different segment"),
-		   name, input_bfd, input_section, rel->r_offset);
+	      info->callbacks->einfo
+		(_("%H: reloc against `%s' references a different segment\n"),
+		 input_bfd, input_section, rel->r_offset, name);
 	    }
 	  if (!silence_segment_error && (info->shared || info->pie))
 	    return FALSE;
@@ -4126,9 +4117,9 @@
 
 	  if (msg)
 	    {
-	      (*_bfd_error_handler)
-		(_("%B(%A+0x%lx): reloc against `%s': %s"),
-		 input_bfd, input_section, (long)rel->r_offset, name, msg);
+	      info->callbacks->einfo
+		(_("%H: reloc against `%s': %s\n"),
+		 input_bfd, input_section, rel->r_offset, name, msg);
 	      return FALSE;
 	    }
 
@@ -5882,8 +5873,8 @@
 	      != (frvfdpic_gotfixup_section (info)->reloc_count * 4))
 	    {
 	    error:
-	      (*_bfd_error_handler)
-		("LINKER BUG: .rofixup section size mismatch");
+	      info->callbacks->einfo
+		("LINKER BUG: .rofixup section size mismatch\n");
 	      return FALSE;
 	    }
 
@@ -6402,8 +6393,8 @@
 
 	default:
 	bad_reloc:
-	  (*_bfd_error_handler)
-	    (_("%B: unsupported relocation type %i"),
+	  info->callbacks->einfo
+	    (_("%B: unsupported relocation type %i\n"),
 	     abfd, ELF32_R_TYPE (rel->r_info));
 	  return FALSE;
         }
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 81bc042..7f0f2cb 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1,6 +1,6 @@
 /* BFD back-end for HP PA-RISC ELF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Original code by
@@ -950,9 +950,9 @@
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
     {
-      /* GCC on hppa-linux produces binaries with OSABI=Linux,
+      /* GCC on hppa-linux produces binaries with OSABI=GNU,
 	 but the kernel produces corefiles with OSABI=SysV.  */
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU &&
 	  i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
 	return FALSE;
     }
@@ -1938,9 +1938,6 @@
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   hh = hppa_elf_hash_entry (eh);
   htab = hppa_link_hash_table (info);
@@ -2008,9 +2005,6 @@
   if (eh->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   info = inf;
   htab = hppa_link_hash_table (info);
   if (htab == NULL)
@@ -2170,9 +2164,6 @@
 clobber_millicode_symbols (struct elf_link_hash_entry *eh,
 			   struct bfd_link_info *info)
 {
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   if (eh->type == STT_PARISC_MILLI
       && !eh->forced_local)
     {
@@ -2189,9 +2180,6 @@
   struct elf32_hppa_link_hash_entry *hh;
   struct elf32_hppa_dyn_reloc_entry *hdh_p;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   hh = hppa_elf_hash_entry (eh);
   for (hdh_p = hh->dyn_relocs; hdh_p != NULL; hdh_p = hdh_p->hdh_next)
     {
@@ -4498,6 +4486,7 @@
   bfd *dynobj;
   struct elf32_hppa_link_hash_table *htab;
   asection *sdyn;
+  asection * sgot;
 
   htab = hppa_link_hash_table (info);
   if (htab == NULL)
@@ -4505,6 +4494,12 @@
 
   dynobj = htab->etab.dynobj;
 
+  sgot = htab->sgot;
+  /* A broken linker script might have discarded the dynamic sections.
+     Catch this here so that we do not seg-fault later on.  */
+  if (sgot != NULL && bfd_is_abs_section (sgot->output_section))
+    return FALSE;
+
   sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
 
   if (htab->etab.dynamic_sections_created)
@@ -4569,19 +4564,19 @@
 	}
     }
 
-  if (htab->sgot != NULL && htab->sgot->size != 0)
+  if (sgot != NULL && sgot->size != 0)
     {
       /* Fill in the first entry in the global offset table.
 	 We use it to point to our dynamic section, if we have one.  */
       bfd_put_32 (output_bfd,
 		  sdyn ? sdyn->output_section->vma + sdyn->output_offset : 0,
-		  htab->sgot->contents);
+		  sgot->contents);
 
       /* The second entry is reserved for use by the dynamic linker.  */
-      memset (htab->sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
+      memset (sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
 
       /* Set .got entry size.  */
-      elf_section_data (htab->sgot->output_section)
+      elf_section_data (sgot->output_section)
 	->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
     }
 
@@ -4601,8 +4596,8 @@
 	  if ((htab->splt->output_offset
 	       + htab->splt->output_section->vma
 	       + htab->splt->size)
-	      != (htab->sgot->output_offset
-		  + htab->sgot->output_section->vma))
+	      != (sgot->output_offset
+		  + sgot->output_section->vma))
 	    {
 	      (*_bfd_error_handler)
 		(_(".got section not immediately after .plt section"));
@@ -4683,7 +4678,7 @@
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME		"elf32-hppa-linux"
 #undef ELF_OSABI
-#define ELF_OSABI		ELFOSABI_LINUX
+#define ELF_OSABI		ELFOSABI_GNU
 #undef elf32_bed
 #define elf32_bed		elf32_hppa_linux_bed
 
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index a17a0fe..8082927 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1,6 +1,6 @@
 /* i370-specific support for 32-bit ELF
    Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2010  Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Hacked by Linas Vepstas for i370 [email protected]
 
@@ -562,9 +562,6 @@
 	   h->dynindx, *cp);
 #endif
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->dynindx != -1)
     h->dynindx += *cp;
 
@@ -962,6 +959,7 @@
       sym.st_name = 0;
       sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
       sym.st_other = 0;
+      sym.st_target_internal = 0;
 
       for (s = output_bfd->sections; s != NULL; s = s->next)
 	{
@@ -1370,7 +1368,7 @@
 #define ELF_MACHINE_ALT1	EM_I370_OLD
 #endif
 #define ELF_MAXPAGESIZE		0x1000
-#define ELF_OSABI		ELFOSABI_LINUX
+#define ELF_OSABI		ELFOSABI_GNU
 
 #define elf_info_to_howto	i370_elf_info_to_howto
 
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index b1a329b..d75f69a 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1,6 +1,7 @@
 /* Intel 80386/80486-specific support for 32-bit ELF
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -28,6 +29,7 @@
 #include "bfd_stdint.h"
 #include "objalloc.h"
 #include "hashtab.h"
+#include "dwarf2.h"
 
 /* 386 uses REL relocations instead of RELA.  */
 #define USE_REL	1
@@ -323,7 +325,7 @@
 
     case BFD_RELOC_386_IRELATIVE:
       TRACE ("BFD_RELOC_386_IRELATIVE");
-      return &elf_howto_table[R_386_IRELATIVE];
+      return &elf_howto_table[R_386_IRELATIVE - R_386_tls_offset];
 
     case BFD_RELOC_VTABLE_INHERIT:
       TRACE ("BFD_RELOC_VTABLE_INHERIT");
@@ -573,12 +575,135 @@
   0, 0, 0, 0	/* replaced with offset to start of .plt.  */
 };
 
+/* .eh_frame covering the .plt section.  */
+
+static const bfd_byte elf_i386_eh_frame_plt[] =
+{
+#define PLT_CIE_LENGTH		20
+#define PLT_FDE_LENGTH		36
+#define PLT_FDE_START_OFFSET	4 + PLT_CIE_LENGTH + 8
+#define PLT_FDE_LEN_OFFSET	4 + PLT_CIE_LENGTH + 12
+  PLT_CIE_LENGTH, 0, 0, 0,	/* CIE length */
+  0, 0, 0, 0,			/* CIE ID */
+  1,				/* CIE version */
+  'z', 'R', 0,			/* Augmentation string */
+  1,				/* Code alignment factor */
+  0x7c,				/* Data alignment factor */
+  8,				/* Return address column */
+  1,				/* Augmentation size */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+  DW_CFA_def_cfa, 4, 4,		/* DW_CFA_def_cfa: r4 (esp) ofs 4 */
+  DW_CFA_offset + 8, 1,		/* DW_CFA_offset: r8 (eip) at cfa-4 */
+  DW_CFA_nop, DW_CFA_nop,
+
+  PLT_FDE_LENGTH, 0, 0, 0,	/* FDE length */
+  PLT_CIE_LENGTH + 8, 0, 0, 0,	/* CIE pointer */
+  0, 0, 0, 0,			/* R_386_PC32 .plt goes here */
+  0, 0, 0, 0,			/* .plt size goes here */
+  0,				/* Augmentation size */
+  DW_CFA_def_cfa_offset, 8,	/* DW_CFA_def_cfa_offset: 8 */
+  DW_CFA_advance_loc + 6,	/* DW_CFA_advance_loc: 6 to __PLT__+6 */
+  DW_CFA_def_cfa_offset, 12,	/* DW_CFA_def_cfa_offset: 12 */
+  DW_CFA_advance_loc + 10,	/* DW_CFA_advance_loc: 10 to __PLT__+16 */
+  DW_CFA_def_cfa_expression,	/* DW_CFA_def_cfa_expression */
+  11,				/* Block length */
+  DW_OP_breg4, 4,		/* DW_OP_breg4 (esp): 4 */
+  DW_OP_breg8, 0,		/* DW_OP_breg8 (eip): 0 */
+  DW_OP_lit15, DW_OP_and, DW_OP_lit11, DW_OP_ge,
+  DW_OP_lit2, DW_OP_shl, DW_OP_plus,
+  DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
+struct elf_i386_plt_layout
+{
+  /* The first entry in an absolute procedure linkage table looks like this.  */
+  const bfd_byte *plt0_entry;
+  unsigned int plt0_entry_size;
+
+  /* Offsets into plt0_entry that are to be replaced with GOT[1] and GOT[2].  */
+  unsigned int plt0_got1_offset;
+  unsigned int plt0_got2_offset;
+
+  /* Later entries in an absolute procedure linkage table look like this.  */
+  const bfd_byte *plt_entry;
+  unsigned int plt_entry_size;
+
+  /* Offsets into plt_entry that are to be replaced with...  */
+  unsigned int plt_got_offset;    /* ... address of this symbol in .got. */
+  unsigned int plt_reloc_offset;  /* ... offset into relocation table. */
+  unsigned int plt_plt_offset;    /* ... offset to start of .plt. */
+
+  /* Offset into plt_entry where the initial value of the GOT entry points.  */
+  unsigned int plt_lazy_offset;
+
+  /* The first entry in a PIC procedure linkage table looks like this.  */
+  const bfd_byte *pic_plt0_entry;
+
+  /* Subsequent entries in a PIC procedure linkage table look like this.  */
+  const bfd_byte *pic_plt_entry;
+
+  /* .eh_frame covering the .plt section.  */
+  const bfd_byte *eh_frame_plt;
+  unsigned int eh_frame_plt_size;
+};
+
+#define GET_PLT_ENTRY_SIZE(abfd) \
+  get_elf_i386_backend_data (abfd)->plt->plt_entry_size
+
+/* These are the standard parameters.  */
+static const struct elf_i386_plt_layout elf_i386_plt =
+  {
+    elf_i386_plt0_entry,                /* plt0_entry */
+    sizeof (elf_i386_plt0_entry),       /* plt0_entry_size */
+    2,                                  /* plt0_got1_offset */
+    8,                                  /* plt0_got2_offset */
+    elf_i386_plt_entry,                 /* plt_entry */
+    PLT_ENTRY_SIZE,                     /* plt_entry_size */
+    2,                                  /* plt_got_offset */
+    7,                                  /* plt_reloc_offset */
+    12,                                 /* plt_plt_offset */
+    6,                                  /* plt_lazy_offset */
+    elf_i386_pic_plt0_entry,            /* pic_plt0_entry */
+    elf_i386_pic_plt_entry,             /* pic_plt_entry */
+    elf_i386_eh_frame_plt,              /* eh_frame_plt */
+    sizeof (elf_i386_eh_frame_plt),     /* eh_frame_plt_size */
+  };
+
+
 /* On VxWorks, the .rel.plt.unloaded section has absolute relocations
    for the PLTResolve stub and then for each PLT entry.  */
 #define PLTRESOLVE_RELOCS_SHLIB 0
 #define PLTRESOLVE_RELOCS 2
 #define PLT_NON_JUMP_SLOT_RELOCS 2
 
+/* Architecture-specific backend data for i386.  */
+
+struct elf_i386_backend_data
+{
+  /* Parameters describing PLT generation.  */
+  const struct elf_i386_plt_layout *plt;
+
+  /* Value used to fill the unused bytes of the first PLT entry.  */
+  bfd_byte plt0_pad_byte;
+
+  /* True if the target system is VxWorks.  */
+  int is_vxworks;
+};
+
+#define get_elf_i386_backend_data(abfd) \
+  ((const struct elf_i386_backend_data *) \
+   get_elf_backend_data (abfd)->arch_data)
+
+/* These are the standard parameters.  */
+static const struct elf_i386_backend_data elf_i386_arch_bed =
+  {
+    &elf_i386_plt,                      /* plt */
+    0,                                  /* plt0_pad_byte */
+    0,                                  /* is_vxworks */
+  };
+
+#define	elf_backend_arch_data	&elf_i386_arch_bed
+
 /* i386 ELF linker hash entry.  */
 
 struct elf_i386_link_hash_entry
@@ -654,6 +779,7 @@
   /* Short-cuts to get to dynamic linker sections.  */
   asection *sdynbss;
   asection *srelbss;
+  asection *plt_eh_frame;
 
   union
   {
@@ -678,14 +804,8 @@
   /* The (unloaded but important) .rel.plt.unloaded section on VxWorks.  */
   asection *srelplt2;
 
-  /* True if the target system is VxWorks.  */
-  int is_vxworks;
-
   /* The index of the next unused R_386_TLS_DESC slot in .rel.plt.  */
   bfd_vma next_tls_desc_index;
-
-  /* Value used to fill the last word of the first plt entry.  */
-  bfd_byte plt0_pad_byte;
 };
 
 /* Get the i386 ELF linker hash table from a link_info structure.  */
@@ -819,13 +939,12 @@
 
   ret->sdynbss = NULL;
   ret->srelbss = NULL;
+  ret->plt_eh_frame = NULL;
   ret->tls_ldm_got.refcount = 0;
   ret->next_tls_desc_index = 0;
   ret->sgotplt_jump_table_size = 0;
   ret->sym_cache.abfd = NULL;
-  ret->is_vxworks = 0;
   ret->srelplt2 = NULL;
-  ret->plt0_pad_byte = 0;
   ret->tls_module_base = NULL;
 
   ret->loc_hash_table = htab_try_create (1024,
@@ -881,11 +1000,30 @@
       || (!info->shared && !htab->srelbss))
     abort ();
 
-  if (htab->is_vxworks
+  if (get_elf_i386_backend_data (dynobj)->is_vxworks
       && !elf_vxworks_create_dynamic_sections (dynobj, info,
 					       &htab->srelplt2))
     return FALSE;
 
+  if (!info->no_ld_generated_unwind_info
+      && bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
+      && htab->elf.splt != NULL)
+    {
+      flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
+      htab->plt_eh_frame
+	= bfd_make_section_with_flags (dynobj, ".eh_frame",
+				       flags | SEC_READONLY);
+      if (htab->plt_eh_frame == NULL
+	  || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 2))
+	return FALSE;
+
+      htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
+      htab->plt_eh_frame->contents
+	= bfd_alloc (dynobj, htab->plt_eh_frame->size);
+      memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
+	      sizeof (elf_i386_eh_frame_plt));
+    }
+
   return TRUE;
 }
 
@@ -956,13 +1094,6 @@
     _bfd_elf_link_hash_copy_indirect (info, dir, ind);
 }
 
-typedef union 
-  {
-    unsigned char c[2];
-    uint16_t i;
-  }
-i386_opcode16;
-
 /* Return TRUE if the TLS access code sequence support transition
    from R_TYPE.  */
 
@@ -1133,8 +1264,8 @@
       if (offset + 2 <= sec->size)
 	{
 	  /* Make sure that it's a call *x@tlsdesc(%rax).  */
-	  static i386_opcode16 call = { { 0xff, 0x10 } };
-	  return bfd_get_16 (abfd, contents + offset) == call.i;
+	  static const unsigned char call[] = { 0xff, 0x10 };
+	  return memcmp (contents + offset, call, 2) == 0;
 	}
 
       return FALSE;
@@ -1375,7 +1506,9 @@
 	    case R_386_PLT32:
 	    case R_386_GOT32:
 	    case R_386_GOTOFF:
-	      if (!_bfd_elf_create_ifunc_sections (abfd, info))
+	      if (htab->elf.dynobj == NULL)
+		htab->elf.dynobj = abfd;
+	      if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info))
 		return FALSE;
 	      break;
 	    }
@@ -1452,7 +1585,7 @@
       if (! elf_i386_tls_transition (info, abfd, sec, NULL,
 				     symtab_hdr, sym_hashes,
 				     &r_type, GOT_UNKNOWN,
-				     rel, rel_end, h, r_symndx)) 
+				     rel, rel_end, h, r_symndx))
 	return FALSE;
 
       switch (r_type)
@@ -1850,7 +1983,7 @@
       if (! elf_i386_tls_transition (info, abfd, sec, NULL,
 				     symtab_hdr, sym_hashes,
 				     &r_type, GOT_UNKNOWN,
-				     rel, relend, h, r_symndx)) 
+				     rel, relend, h, r_symndx))
 	return FALSE;
 
       switch (r_type)
@@ -2015,7 +2148,8 @@
      we can keep the dynamic relocs and avoid the copy reloc.  This
      doesn't work on VxWorks, where we can not have dynamic relocations
      (other than copy and jump slot relocations) in an executable.  */
-  if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks)
+  if (ELIMINATE_COPY_RELOCS
+      && !get_elf_i386_backend_data (info->output_bfd)->is_vxworks)
     {
       struct elf_i386_link_hash_entry * eh;
       struct elf_dyn_relocs *p;
@@ -2076,15 +2210,11 @@
   struct elf_i386_link_hash_table *htab;
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
+  unsigned plt_entry_size;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
   eh = (struct elf_i386_link_hash_entry *) h;
 
   info = (struct bfd_link_info *) inf;
@@ -2092,13 +2222,14 @@
   if (htab == NULL)
     return FALSE;
 
+  plt_entry_size = GET_PLT_ENTRY_SIZE (info->output_bfd);
+
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
      here if it is defined and referenced in a non-shared object.  */
   if (h->type == STT_GNU_IFUNC
       && h->def_regular)
-    return _bfd_elf_allocate_ifunc_dyn_relocs (info, h,
-					       &eh->dyn_relocs,
-					       PLT_ENTRY_SIZE, 4);
+    return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, &eh->dyn_relocs,
+                                               plt_entry_size, 4);
   else if (htab->elf.dynamic_sections_created
 	   && h->plt.refcount > 0)
     {
@@ -2119,7 +2250,7 @@
 	  /* If this is the first .plt entry, make room for the special
 	     first entry.  */
 	  if (s->size == 0)
-	    s->size += PLT_ENTRY_SIZE;
+	    s->size += plt_entry_size;
 
 	  h->plt.offset = s->size;
 
@@ -2136,7 +2267,7 @@
 	    }
 
 	  /* Make room for this entry.  */
-	  s->size += PLT_ENTRY_SIZE;
+	  s->size += plt_entry_size;
 
 	  /* We also need to make an entry in the .got.plt section, which
 	     will be placed in the .got section by the linker script.  */
@@ -2146,7 +2277,8 @@
 	  htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
 	  htab->next_tls_desc_index++;
 
-	  if (htab->is_vxworks && !info->shared)
+	  if (get_elf_i386_backend_data (info->output_bfd)->is_vxworks
+              && !info->shared)
 	    {
 	      /* VxWorks has a second set of relocations for each PLT entry
 		 in executables.  They go in a separate relocation section,
@@ -2156,7 +2288,7 @@
 		 R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 4 and an
 		 R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 8.  */
 
-	      if (h->plt.offset == PLT_ENTRY_SIZE)
+	      if (h->plt.offset == plt_entry_size)
 		htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
 
 	      /* There are two extra relocations for each subsequent PLT entry:
@@ -2276,7 +2408,7 @@
 	    }
 	}
 
-      if (htab->is_vxworks)
+      if (get_elf_i386_backend_data (info->output_bfd)->is_vxworks)
 	{
 	  struct elf_dyn_relocs **pp;
 	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
@@ -2380,8 +2512,9 @@
   struct elf_i386_link_hash_entry *eh;
   struct elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  /* Skip local IFUNC symbols. */
+  if (h->forced_local && h->type == STT_GNU_IFUNC)
+    return TRUE;
 
   eh = (struct elf_i386_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -2394,6 +2527,11 @@
 
 	  info->flags |= DF_TEXTREL;
 
+	  if (info->warn_shared_textrel && info->shared)
+	    info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"),
+				    p->sec->owner, h->root.root.string,
+				    p->sec);
+
 	  /* Not an error, just cut short the traversal.  */
 	  return FALSE;
 	}
@@ -2404,8 +2542,7 @@
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
-elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-				struct bfd_link_info *info)
+elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
   struct elf_i386_link_hash_table *htab;
   bfd *dynobj;
@@ -2465,7 +2602,7 @@
 		     linker script /DISCARD/, so we'll be discarding
 		     the relocs too.  */
 		}
-	      else if (htab->is_vxworks
+	      else if (get_elf_i386_backend_data (output_bfd)->is_vxworks
 		       && strcmp (p->sec->output_section->name,
 				  ".tls_vars") == 0)
 		{
@@ -2476,8 +2613,14 @@
 		{
 		  srel = elf_section_data (p->sec)->sreloc;
 		  srel->size += p->count * sizeof (Elf32_External_Rel);
-		  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
-		    info->flags |= DF_TEXTREL;
+		  if ((p->sec->output_section->flags & SEC_READONLY) != 0
+		      && (info->flags & DF_TEXTREL) == 0)
+		    {
+		      info->flags |= DF_TEXTREL;
+		      if (info->warn_shared_textrel && info->shared)
+			info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
+						p->sec->owner, p->sec);
+		    }
 		}
 	    }
 	}
@@ -2657,6 +2800,13 @@
 	return FALSE;
     }
 
+  if (htab->plt_eh_frame != NULL
+      && htab->elf.splt != NULL
+      && htab->elf.splt->size != 0
+      && (htab->elf.splt->flags & SEC_EXCLUDE) == 0)
+    bfd_put_32 (dynobj, htab->elf.splt->size,
+		htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -2701,7 +2851,7 @@
 		return FALSE;
 	    }
 	}
-      if (htab->is_vxworks
+      if (get_elf_i386_backend_data (output_bfd)->is_vxworks
 	  && !elf_vxworks_add_dynamic_entries (output_bfd, info))
 	return FALSE;
     }
@@ -2864,6 +3014,7 @@
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
   bfd_boolean is_vxworks_tls;
+  unsigned plt_entry_size;
 
   BFD_ASSERT (is_i386_elf (input_bfd));
 
@@ -2876,12 +3027,15 @@
   local_tlsdesc_gotents = elf_i386_local_tlsdesc_gotent (input_bfd);
   /* We have to handle relocations in vxworks .tls_vars sections
      specially, because the dynamic loader is 'weird'.  */
-  is_vxworks_tls = (htab->is_vxworks && info->shared
+  is_vxworks_tls = (get_elf_i386_backend_data (output_bfd)->is_vxworks
+                    && info->shared
 		    && !strcmp (input_section->output_section->name,
 				".tls_vars"));
 
   elf_i386_set_tls_module_base (info);
 
+  plt_entry_size = GET_PLT_ENTRY_SIZE (output_bfd);
+
   rel = relocs;
   relend = relocs + input_section->reloc_count;
   for (; rel < relend; rel++)
@@ -3009,7 +3163,7 @@
 	      if (h == NULL)
 		abort ();
 
-	      /* Set STT_GNU_IFUNC symbol value.  */ 
+	      /* Set STT_GNU_IFUNC symbol value.  */
 	      h->root.u.def.value = sym->st_value;
 	      h->root.u.def.section = sec;
 	    }
@@ -3107,7 +3261,7 @@
 		      /* This symbol is resolved locally.  */
 		      outrel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
 		      bfd_put_32 (output_bfd,
-				  (h->root.u.def.value 
+				  (h->root.u.def.value
 				   + h->root.u.def.section->output_section->vma
 				   + h->root.u.def.section->output_offset),
 				  contents + offset);
@@ -3128,7 +3282,7 @@
 		     internal symbol, we have updated addend.  */
 		  continue;
 		}
-
+	      /* FALLTHROUGH */
 	    case R_386_PC32:
 	    case R_386_PLT32:
 	      goto do_relocation;
@@ -3148,13 +3302,13 @@
 
 		  if (htab->elf.splt != NULL)
 		    {
-		      plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
+		      plt_index = h->plt.offset / plt_entry_size - 1;
 		      off = (plt_index + 3) * 4;
 		      base_got = htab->elf.sgotplt;
 		    }
 		  else
 		    {
-		      plt_index = h->plt.offset / PLT_ENTRY_SIZE;
+		      plt_index = h->plt.offset / plt_entry_size;
 		      off = plt_index * 4;
 		      base_got = htab->elf.igotplt;
 		    }
@@ -3451,7 +3605,11 @@
 
 	      sreloc = elf_section_data (input_section)->sreloc;
 
-	      BFD_ASSERT (sreloc != NULL && sreloc->contents != NULL);
+	      if (sreloc == NULL || sreloc->contents == NULL)
+		{
+		  r = bfd_reloc_notsupported;
+		  goto check_relocation_error;
+		}
 
 	      loc = sreloc->contents;
 	      loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
@@ -3769,7 +3927,7 @@
 			    relocation - elf_i386_dtpoff_base (info),
 			    htab->elf.sgot->contents + off);
 	      else if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
-		bfd_put_32 (output_bfd, 
+		bfd_put_32 (output_bfd,
 			    elf_i386_dtpoff_base (info) - relocation,
 			    htab->elf.sgot->contents + off);
 	      else if (dr_type != R_386_TLS_DESC)
@@ -4025,7 +4183,7 @@
 	  break;
 
 	case R_386_TLS_LDO_32:
-	  if (info->shared || (input_section->flags & SEC_CODE) == 0)
+	  if (!info->executable || (input_section->flags & SEC_CODE) == 0)
 	    relocation -= elf_i386_dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */
@@ -4098,6 +4256,7 @@
 				    contents, rel->r_offset,
 				    relocation, 0);
 
+check_relocation_error:
       if (r != bfd_reloc_ok)
 	{
 	  const char *name;
@@ -4147,11 +4306,16 @@
 				Elf_Internal_Sym *sym)
 {
   struct elf_i386_link_hash_table *htab;
+  unsigned plt_entry_size;
+  const struct elf_i386_backend_data *abed;
 
   htab = elf_i386_hash_table (info);
   if (htab == NULL)
     return FALSE;
 
+  abed = get_elf_i386_backend_data (output_bfd);
+  plt_entry_size = GET_PLT_ENTRY_SIZE (output_bfd);
+
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma plt_index;
@@ -4185,7 +4349,7 @@
 	  || plt == NULL
 	  || gotplt == NULL
 	  || relplt == NULL)
-	abort ();
+	return FALSE;
 
       /* Get the index in the procedure linkage table which
 	 corresponds to this symbol.  This is the index of this symbol
@@ -4200,27 +4364,28 @@
 
       if (plt == htab->elf.splt)
 	{
-	  plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
+	  plt_index = h->plt.offset / plt_entry_size - 1;
 	  got_offset = (plt_index + 3) * 4;
 	}
       else
 	{
-	  plt_index = h->plt.offset / PLT_ENTRY_SIZE;
+	  plt_index = h->plt.offset / plt_entry_size;
 	  got_offset = plt_index * 4;
 	}
 
       /* Fill in the entry in the procedure linkage table.  */
       if (! info->shared)
 	{
-	  memcpy (plt->contents + h->plt.offset, elf_i386_plt_entry,
-		  PLT_ENTRY_SIZE);
+	  memcpy (plt->contents + h->plt.offset, abed->plt->plt_entry,
+		  abed->plt->plt_entry_size);
 	  bfd_put_32 (output_bfd,
 		      (gotplt->output_section->vma
 		       + gotplt->output_offset
 		       + got_offset),
-		      plt->contents + h->plt.offset + 2);
+		      plt->contents + h->plt.offset
+                      + abed->plt->plt_got_offset);
 
-	  if (htab->is_vxworks)
+	  if (abed->is_vxworks)
 	    {
 	      int s, k, reloc_index;
 
@@ -4228,7 +4393,8 @@
 		 for this PLT entry.  */
 
 	      /* S: Current slot number (zero-based).  */
-	      s = (h->plt.offset - PLT_ENTRY_SIZE) / PLT_ENTRY_SIZE;
+	      s = ((h->plt.offset - abed->plt->plt_entry_size)
+                   / abed->plt->plt_entry_size);
 	      /* K: Number of relocations for PLTResolve. */
 	      if (info->shared)
 		k = PLTRESOLVE_RELOCS_SHLIB;
@@ -4258,19 +4424,23 @@
 	}
       else
 	{
-	  memcpy (plt->contents + h->plt.offset, elf_i386_pic_plt_entry,
-		  PLT_ENTRY_SIZE);
+	  memcpy (plt->contents + h->plt.offset, abed->plt->pic_plt_entry,
+		  abed->plt->plt_entry_size);
 	  bfd_put_32 (output_bfd, got_offset,
-		      plt->contents + h->plt.offset + 2);
+		      plt->contents + h->plt.offset
+                      + abed->plt->plt_got_offset);
 	}
 
       /* Don't fill PLT entry for static executables.  */
       if (plt == htab->elf.splt)
 	{
 	  bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel),
-		      plt->contents + h->plt.offset + 7);
-	  bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE),
-		      plt->contents + h->plt.offset + 12);
+		      plt->contents + h->plt.offset
+                      + abed->plt->plt_reloc_offset);
+	  bfd_put_32 (output_bfd, - (h->plt.offset
+                                     + abed->plt->plt_plt_offset + 4),
+		      plt->contents + h->plt.offset
+                      + abed->plt->plt_plt_offset);
 	}
 
       /* Fill in the entry in the global offset table.  */
@@ -4278,7 +4448,7 @@
 		  (plt->output_section->vma
 		   + plt->output_offset
 		   + h->plt.offset
-		   + 6),
+		   + abed->plt->plt_lazy_offset),
 		  gotplt->contents + got_offset);
 
       /* Fill in the entry in the .rel.plt section.  */
@@ -4295,7 +4465,7 @@
 	     R_386_IRELATIVE instead of R_386_JUMP_SLOT.  Store addend
 	     in the .got.plt section.  */
 	  bfd_put_32 (output_bfd,
-		      (h->root.u.def.value 
+		      (h->root.u.def.value
 		       + h->root.u.def.section->output_section->vma
 		       + h->root.u.def.section->output_offset),
 		      gotplt->contents + got_offset);
@@ -4419,7 +4589,8 @@
      is relative to the ".got" section.  */
   if (sym != NULL
       && (strcmp (h->root.root.string, "_DYNAMIC") == 0
-	  || (!htab->is_vxworks && h == htab->elf.hgot)))
+	  || (!abed->is_vxworks
+              && h == htab->elf.hgot)))
     sym->st_shndx = SHN_ABS;
 
   return TRUE;
@@ -4434,7 +4605,7 @@
   struct elf_link_hash_entry *h
     = (struct elf_link_hash_entry *) *slot;
   struct bfd_link_info *info
-    = (struct bfd_link_info *) inf; 
+    = (struct bfd_link_info *) inf;
 
   return elf_i386_finish_dynamic_symbol (info->output_bfd, info,
 					 h, NULL);
@@ -4468,6 +4639,7 @@
   struct elf_i386_link_hash_table *htab;
   bfd *dynobj;
   asection *sdyn;
+  const struct elf_i386_backend_data *abed;
 
   htab = elf_i386_hash_table (info);
   if (htab == NULL)
@@ -4475,6 +4647,7 @@
 
   dynobj = htab->elf.dynobj;
   sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+  abed = get_elf_i386_backend_data (output_bfd);
 
   if (htab->elf.dynamic_sections_created)
     {
@@ -4495,8 +4668,8 @@
 	  switch (dyn.d_tag)
 	    {
 	    default:
-	      if (htab->is_vxworks
-		  && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn))
+	      if (abed->is_vxworks
+                  && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn))
 		break;
 	      continue;
 
@@ -4549,31 +4722,33 @@
 	{
 	  if (info->shared)
 	    {
-	      memcpy (htab->elf.splt->contents, elf_i386_pic_plt0_entry,
-		      sizeof (elf_i386_pic_plt0_entry));
-	      memset (htab->elf.splt->contents + sizeof (elf_i386_pic_plt0_entry),
-		      htab->plt0_pad_byte,
-		      PLT_ENTRY_SIZE - sizeof (elf_i386_pic_plt0_entry));
+	      memcpy (htab->elf.splt->contents, abed->plt->pic_plt0_entry,
+		      abed->plt->plt0_entry_size);
+	      memset (htab->elf.splt->contents + abed->plt->plt0_entry_size,
+		      abed->plt0_pad_byte,
+		      abed->plt->plt_entry_size - abed->plt->plt0_entry_size);
 	    }
 	  else
 	    {
-	      memcpy (htab->elf.splt->contents, elf_i386_plt0_entry,
-		      sizeof(elf_i386_plt0_entry));
-	      memset (htab->elf.splt->contents + sizeof (elf_i386_plt0_entry),
-		      htab->plt0_pad_byte,
-		      PLT_ENTRY_SIZE - sizeof (elf_i386_plt0_entry));
+	      memcpy (htab->elf.splt->contents, abed->plt->plt0_entry,
+		      abed->plt->plt0_entry_size);
+	      memset (htab->elf.splt->contents + abed->plt->plt0_entry_size,
+		      abed->plt0_pad_byte,
+		      abed->plt->plt_entry_size - abed->plt->plt0_entry_size);
 	      bfd_put_32 (output_bfd,
 			  (htab->elf.sgotplt->output_section->vma
 			   + htab->elf.sgotplt->output_offset
 			   + 4),
-			  htab->elf.splt->contents + 2);
+			  htab->elf.splt->contents
+                          + abed->plt->plt0_got1_offset);
 	      bfd_put_32 (output_bfd,
 			  (htab->elf.sgotplt->output_section->vma
 			   + htab->elf.sgotplt->output_offset
 			   + 8),
-			  htab->elf.splt->contents + 8);
+			  htab->elf.splt->contents
+                          + abed->plt->plt0_got2_offset);
 
-	      if (htab->is_vxworks)
+	      if (abed->is_vxworks)
 		{
 		  Elf_Internal_Rela rel;
 
@@ -4582,14 +4757,14 @@
 		     the PLT directly.  */
 		  rel.r_offset = (htab->elf.splt->output_section->vma
 				  + htab->elf.splt->output_offset
-				  + 2);
+				  + abed->plt->plt0_got1_offset);
 		  rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
 		  bfd_elf32_swap_reloc_out (output_bfd, &rel,
 					    htab->srelplt2->contents);
 		  /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 8.  */
 		  rel.r_offset = (htab->elf.splt->output_section->vma
 				  + htab->elf.splt->output_offset
-				  + 8);
+				  + abed->plt->plt0_got2_offset);
 		  rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
 		  bfd_elf32_swap_reloc_out (output_bfd, &rel,
 					    htab->srelplt2->contents +
@@ -4603,9 +4778,10 @@
 	    ->this_hdr.sh_entsize = 4;
 
 	  /* Correct the .rel.plt.unloaded relocations.  */
-	  if (htab->is_vxworks && !info->shared)
+	  if (abed->is_vxworks && !info->shared)
 	    {
-	      int num_plts = (htab->elf.splt->size / PLT_ENTRY_SIZE) - 1;
+	      int num_plts = (htab->elf.splt->size
+                              / abed->plt->plt_entry_size) - 1;
 	      unsigned char *p;
 
 	      p = htab->srelplt2->contents;
@@ -4654,6 +4830,33 @@
       elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = 4;
     }
 
+  /* Adjust .eh_frame for .plt section.  */
+  if (htab->plt_eh_frame != NULL)
+    {
+      if (htab->elf.splt != NULL
+	  && htab->elf.splt->size != 0
+	  && (htab->elf.splt->flags & SEC_EXCLUDE) == 0
+	  && htab->elf.splt->output_section != NULL
+	  && htab->plt_eh_frame->output_section != NULL)
+	{
+	  bfd_vma plt_start = htab->elf.splt->output_section->vma;
+	  bfd_vma eh_frame_start = htab->plt_eh_frame->output_section->vma
+				   + htab->plt_eh_frame->output_offset
+				   + PLT_FDE_START_OFFSET;
+	  bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+			     htab->plt_eh_frame->contents
+			     + PLT_FDE_START_OFFSET);
+	}
+      if (htab->plt_eh_frame->sec_info_type
+	  == ELF_INFO_TYPE_EH_FRAME)
+	{
+	  if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+						 htab->plt_eh_frame,
+						 htab->plt_eh_frame->contents))
+	    return FALSE;
+	}
+    }
+
   if (htab->elf.sgot && htab->elf.sgot->size > 0)
     elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
 
@@ -4672,7 +4875,7 @@
 elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
 		      const arelent *rel ATTRIBUTE_UNUSED)
 {
-  return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+  return plt->vma + (i + 1) * GET_PLT_ENTRY_SIZE (plt->owner);
 }
 
 /* Return TRUE if symbol should be hashed in the `.gnu.hash' section.  */
@@ -4701,8 +4904,9 @@
 			  bfd_vma * valp ATTRIBUTE_UNUSED)
 {
   if ((abfd->flags & DYNAMIC) == 0
-      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
-    elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
+      && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+	  || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
 
   return TRUE;
 }
@@ -4720,6 +4924,7 @@
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
+#define elf_backend_plt_alignment	4
 
 /* Support RELA for objdump of prelink objects.  */
 #define elf_info_to_howto		      elf_i386_info_to_howto_rel
@@ -4820,6 +5025,170 @@
 
 #include "elf32-target.h"
 
+/* Native Client support.  */
+
+#undef	TARGET_LITTLE_SYM
+#define	TARGET_LITTLE_SYM		bfd_elf32_i386_nacl_vec
+#undef	TARGET_LITTLE_NAME
+#define	TARGET_LITTLE_NAME		"elf32-i386-nacl"
+#undef	elf32_bed
+#define	elf32_bed			elf32_i386_nacl_bed
+
+#undef	ELF_MAXPAGESIZE
+#define	ELF_MAXPAGESIZE			0x10000
+
+/* Restore defaults.  */
+#undef	ELF_OSABI
+#undef	elf_backend_want_plt_sym
+#define elf_backend_want_plt_sym	0
+#undef	elf_backend_post_process_headers
+#define	elf_backend_post_process_headers	_bfd_elf_set_osabi
+#undef	elf_backend_static_tls_alignment
+
+/* NaCl uses substantially different PLT entries for the same effects.  */
+
+#undef	elf_backend_plt_alignment
+#define elf_backend_plt_alignment	5
+#define NACL_PLT_ENTRY_SIZE		64
+#define	NACLMASK			0xe0 /* 32-byte alignment mask.  */
+
+static const bfd_byte elf_i386_nacl_plt0_entry[] =
+  {
+    0xff, 0x35,			  /* pushl contents of address */
+    0, 0, 0, 0,			  /* replaced with address of .got + 4.	 */
+    0x8b, 0x0d,                   /* movl contents of address, %ecx */
+    0, 0, 0, 0,			  /* replaced with address of .got + 8.	 */
+    0x83, 0xe1, NACLMASK,	  /* andl $NACLMASK, %ecx */
+    0xff, 0xe1			  /* jmp *%ecx */
+  };
+
+static const bfd_byte elf_i386_nacl_plt_entry[NACL_PLT_ENTRY_SIZE] =
+  {
+    0x8b, 0x0d,				/* movl contents of address, %ecx */
+    0, 0, 0, 0,				/* replaced with GOT slot address.  */
+    0x83, 0xe1, NACLMASK,		/* andl $NACLMASK, %ecx */
+    0xff, 0xe1,				/* jmp *%ecx */
+
+    /* Pad to the next 32-byte boundary with nop instructions.	*/
+    0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+
+    /* Lazy GOT entries point here (32-byte aligned).  */
+    0x68,			       /* pushl immediate */
+    0, 0, 0, 0,			       /* replaced with reloc offset.  */
+    0xe9,			       /* jmp relative */
+    0, 0, 0, 0,			       /* replaced with offset to .plt.	 */
+
+    /* Pad to the next 32-byte boundary with nop instructions.	*/
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90
+  };
+
+static const bfd_byte
+elf_i386_nacl_pic_plt0_entry[sizeof (elf_i386_nacl_plt0_entry)] =
+  {
+    0xff, 0x73, 0x04,		/* pushl 4(%ebx) */
+    0x8b, 0x4b, 0x08,		/* mov 0x8(%ebx), %ecx */
+    0x83, 0xe1, 0xe0,		/* and $NACLMASK, %ecx */
+    0xff, 0xe1,			/* jmp *%ecx */
+    0x90                        /* nop */
+  };
+
+static const bfd_byte elf_i386_nacl_pic_plt_entry[NACL_PLT_ENTRY_SIZE] =
+  {
+    0x8b, 0x8b,          /* movl offset(%ebx), %ecx */
+    0, 0, 0, 0,          /* replaced with offset of this symbol in .got.  */
+    0x83, 0xe1, 0xe0,    /* andl $NACLMASK, %ecx */
+    0xff, 0xe1,          /* jmp *%ecx */
+
+    /* Pad to the next 32-byte boundary with nop instructions.	*/
+    0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+
+    /* Lazy GOT entries point here (32-byte aligned).  */
+    0x68,                /* pushl immediate */
+    0, 0, 0, 0,          /* replaced with offset into relocation table.  */
+    0xe9,                /* jmp relative */
+    0, 0, 0, 0,          /* replaced with offset to start of .plt.  */
+
+    /* Pad to the next 32-byte boundary with nop instructions.	*/
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
+    0x90, 0x90
+  };
+
+static const bfd_byte elf_i386_nacl_eh_frame_plt[] =
+  {
+#if (PLT_CIE_LENGTH != 20                               \
+     || PLT_FDE_LENGTH != 36                            \
+     || PLT_FDE_START_OFFSET != 4 + PLT_CIE_LENGTH + 8  \
+     || PLT_FDE_LEN_OFFSET != 4 + PLT_CIE_LENGTH + 12)
+# error "Need elf_i386_backend_data parameters for eh_frame_plt offsets!"
+#endif
+    PLT_CIE_LENGTH, 0, 0, 0,		/* CIE length */
+    0, 0, 0, 0,                         /* CIE ID */
+    1,                                  /* CIE version */
+    'z', 'R', 0,                        /* Augmentation string */
+    1,                                  /* Code alignment factor */
+    0x7c,                               /* Data alignment factor: -4 */
+    8,                                  /* Return address column */
+    1,					/* Augmentation size */
+    DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding */
+    DW_CFA_def_cfa, 4, 4,		/* DW_CFA_def_cfa: r4 (esp) ofs 4 */
+    DW_CFA_offset + 8, 1,		/* DW_CFA_offset: r8 (eip) at cfa-4 */
+    DW_CFA_nop, DW_CFA_nop,
+
+    PLT_FDE_LENGTH, 0, 0, 0,     /* FDE length */
+    PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */
+    0, 0, 0, 0,                  /* R_386_PC32 .plt goes here */
+    0, 0, 0, 0,                  /* .plt size goes here */
+    0,                           /* Augmentation size */
+    DW_CFA_def_cfa_offset, 8,    /* DW_CFA_def_cfa_offset: 8 */
+    DW_CFA_advance_loc + 6,      /* DW_CFA_advance_loc: 6 to __PLT__+6 */
+    DW_CFA_def_cfa_offset, 12,   /* DW_CFA_def_cfa_offset: 12 */
+    DW_CFA_advance_loc + 58,     /* DW_CFA_advance_loc: 58 to __PLT__+64 */
+    DW_CFA_def_cfa_expression,   /* DW_CFA_def_cfa_expression */
+    13,                          /* Block length */
+    DW_OP_breg4, 4,              /* DW_OP_breg4 (esp): 4 */
+    DW_OP_breg8, 0,              /* DW_OP_breg8 (eip): 0 */
+    DW_OP_const1u, 63, DW_OP_and, DW_OP_const1u, 37, DW_OP_ge,
+    DW_OP_lit2, DW_OP_shl, DW_OP_plus,
+    DW_CFA_nop, DW_CFA_nop
+  };
+
+static const struct elf_i386_plt_layout elf_i386_nacl_plt =
+  {
+    elf_i386_nacl_plt0_entry,		/* plt0_entry */
+    sizeof (elf_i386_nacl_plt0_entry),	/* plt0_entry_size */
+    2,					/* plt0_got1_offset */
+    8,					/* plt0_got2_offset */
+    elf_i386_nacl_plt_entry,		/* plt_entry */
+    NACL_PLT_ENTRY_SIZE,		/* plt_entry_size */
+    2,					/* plt_got_offset */
+    33,					/* plt_reloc_offset */
+    38,					/* plt_plt_offset */
+    32,					/* plt_lazy_offset */
+    elf_i386_nacl_pic_plt0_entry,	/* pic_plt0_entry */
+    elf_i386_nacl_pic_plt_entry,	/* pic_plt_entry */
+    elf_i386_nacl_eh_frame_plt,		/* eh_frame_plt */
+    sizeof (elf_i386_nacl_eh_frame_plt),/* eh_frame_plt_size */
+  };
+
+static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
+  {
+    &elf_i386_nacl_plt,                      /* plt */
+    0x90,				/* plt0_pad_byte: nop insn */
+    0,                                  /* is_vxworks */
+  };
+
+#undef	elf_backend_arch_data
+#define elf_backend_arch_data	&elf_i386_nacl_arch_bed
+
+#include "elf32-target.h"
+
 /* VxWorks support.  */
 
 #undef	TARGET_LITTLE_SYM
@@ -4827,32 +5196,21 @@
 #undef	TARGET_LITTLE_NAME
 #define TARGET_LITTLE_NAME		"elf32-i386-vxworks"
 #undef	ELF_OSABI
+#undef	elf_backend_plt_alignment
+#define elf_backend_plt_alignment	4
 
-/* Like elf_i386_link_hash_table_create but with tweaks for VxWorks.  */
+static const struct elf_i386_backend_data elf_i386_vxworks_arch_bed =
+  {
+    &elf_i386_plt,                      /* plt */
+    0x90,                               /* plt0_pad_byte */
+    1,                                  /* is_vxworks */
+  };
 
-static struct bfd_link_hash_table *
-elf_i386_vxworks_link_hash_table_create (bfd *abfd)
-{
-  struct bfd_link_hash_table *ret;
-  struct elf_i386_link_hash_table *htab;
-
-  ret = elf_i386_link_hash_table_create (abfd);
-  if (ret)
-    {
-      htab = (struct elf_i386_link_hash_table *) ret;
-      htab->is_vxworks = 1;
-      htab->plt0_pad_byte = 0x90;
-    }
-
-  return ret;
-}
-
+#undef	elf_backend_arch_data
+#define	elf_backend_arch_data	&elf_i386_vxworks_arch_bed
 
 #undef elf_backend_relocs_compatible
 #undef elf_backend_post_process_headers
-#undef bfd_elf32_bfd_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_create \
-  elf_i386_vxworks_link_hash_table_create
 #undef elf_backend_add_symbol_hook
 #define elf_backend_add_symbol_hook \
   elf_vxworks_add_symbol_hook
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index b6e8ba0..07add20 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -1,5 +1,5 @@
 /* Lattice Mico32-specific support for 32-bit ELF
-   Copyright 2008, 2009, 2010  Free Software Foundation, Inc.
+   Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Jon Beniston <[email protected]>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1918,12 +1918,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = lm32_elf_hash_table (info);
   if (htab == NULL)
@@ -2110,9 +2104,6 @@
   struct elf_lm32_link_hash_entry *eh;
   struct elf_lm32_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_lm32_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index e9cabaa..cf7ad99 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -1,5 +1,5 @@
 /* M16C/M32C specific support for 32-bit ELF.
-   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -989,9 +989,6 @@
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
@@ -1024,9 +1021,6 @@
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 0b114bd..51ef61e 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1,6 +1,6 @@
 /* M32R-specific support for 32-bit ELF.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1977,12 +1977,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = m32r_elf_hash_table (info);
   if (htab == NULL)
@@ -2169,9 +2163,6 @@
   struct elf_m32r_link_hash_entry *eh;
   struct elf_m32r_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_m32r_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 40b0c86..961dce4 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1,6 +1,6 @@
 /* Motorola 68HC11/HC12-specific support for 32-bit ELF
    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009, 2010  Free Software Foundation, Inc.
+   2009, 2010, 2011  Free Software Foundation, Inc.
    Contributed by Stephane Carrez ([email protected])
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1188,7 +1188,7 @@
   flagword new_flags;
   bfd_boolean ok = TRUE;
 
-  /* Check if we have the same endianess */
+  /* Check if we have the same endianness */
   if (!_bfd_generic_verify_endian_match (ibfd, obfd))
     return FALSE;
 
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 1d9d6a4..612525c 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1,6 +1,7 @@
 /* Motorola 68k series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -3466,9 +3467,6 @@
   struct bfd_link_info *info = (struct bfd_link_info *) inf;
   struct elf_m68k_pcrel_relocs_copied *s;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (!SYMBOL_CALLS_LOCAL (info, h))
     {
       if ((info->flags & DF_TEXTREL) == 0)
@@ -4390,6 +4388,11 @@
 		  break;
 
 		case R_68K_TLS_GD32:
+		  /* The value for this relocation is actually put in
+		     the second GOT slot.  */
+		  relocation = bfd_get_signed_32 (output_bfd,
+						  (sgot->contents
+						   + got_entry_offset + 4));
 		  relocation += dtpoff_base (info);
 		  break;
 
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 0863b44..31cc095 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -1,6 +1,6 @@
 /* Motorola MCore specific support for 32-bit ELF
    Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007 Free Software Foundation, Inc.
+   2007, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -55,7 +55,7 @@
   flagword old_flags;
   flagword new_flags;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return FALSE;
 
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index a6afcb5..6fecb25 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -1,6 +1,6 @@
 /* MeP-specific support for 32-bit ELF.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+   2010, 2011  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -154,13 +154,14 @@
 
     default:
       /* Pacify gcc -Wall.  */
-      fprintf (stderr, "mep: no reloc for code %d\n", code);
+      (*_bfd_error_handler) (_("mep: no reloc for code %d"), code);
       return NULL;
     }
 
   if (mep_elf_howto_table[type].type != type)
     {
-      fprintf (stderr, "MeP: howto %d has type %d\n", type, mep_elf_howto_table[type].type);
+      (*_bfd_error_handler) (_("MeP: howto %d has type %d"),
+			     type, mep_elf_howto_table[type].type);
       abort ();
     }
 
@@ -605,7 +606,7 @@
   flagword old_flags, new_flags;
   flagword old_partial, new_partial;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
     return FALSE;
 
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index f32e06e..b180dc4 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -1,6 +1,6 @@
 /* Xilinx MicroBlaze-specific support for 32-bit ELF
 
-   Copyright 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -824,7 +824,7 @@
 	    }
 
 	  /* Sanity check the address.  */
-	  if (offset > bfd_get_section_limit (output_bfd, input_section))
+	  if (offset > bfd_get_section_limit (input_bfd, input_section))
 	    {
 	      r = bfd_reloc_outofrange;
 	      goto check_reloc;
@@ -2382,12 +2382,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) dat;
   htab = elf32_mb_hash_table (info);
   if (htab == NULL)
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index aed0b4c..fd3d4ba 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -832,6 +832,508 @@
 	 FALSE),		/* pcrel_offset */
 };
 
+static reloc_howto_type elf_micromips_howto_table_rel[] =
+{
+  EMPTY_HOWTO (130),
+  EMPTY_HOWTO (131),
+  EMPTY_HOWTO (132),
+
+  /* 26 bit jump address.  */
+  HOWTO (R_MICROMIPS_26_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC.  */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_26_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x3ffffff,		/* src_mask */
+	 0x3ffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_HI16,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_hi16_reloc, /* special_function */
+	 "R_MICROMIPS_HI16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_lo16_reloc, /* special_function */
+	 "R_MICROMIPS_LO16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* GP relative reference.  */
+  HOWTO (R_MICROMIPS_GPREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_GPREL16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to literal section.  */
+  HOWTO (R_MICROMIPS_LITERAL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_LITERAL",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to global offset table.  */
+  HOWTO (R_MICROMIPS_GOT16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_got16_reloc, /* special_function */
+	 "R_MICROMIPS_GOT16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* This is for microMIPS branches.  */
+  HOWTO (R_MICROMIPS_PC7_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 7,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC7_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000007f,		/* src_mask */
+	 0x0000007f,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC10_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 10,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC10_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x000003ff,		/* src_mask */
+	 0x000003ff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC16_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* 16 bit call through global offset table.  */
+  HOWTO (R_MICROMIPS_CALL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (143),
+  EMPTY_HOWTO (144),
+
+  /* Displacement in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_DISP",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Displacement to page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_PAGE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_PAGE",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Offset from page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_OFST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_OFST",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_HI16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_LO16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* 64 bit subtraction.  Used in the N32 ABI.  */
+  HOWTO (R_MICROMIPS_SUB,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_SUB",	/* name */
+	 TRUE,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Get the higher value of a 64 bit addend.  */
+  HOWTO (R_MICROMIPS_HIGHER,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_HIGHER",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Get the highest value of a 64 bit addend.  */
+  HOWTO (R_MICROMIPS_HIGHEST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_HIGHEST",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_HI16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_LO16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Section displacement.  */
+  HOWTO (R_MICROMIPS_SCN_DISP,  /* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_SCN_DISP",/* name */
+	 TRUE,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Protected jump conversion.  This is an optimization hint.  No
+     relocation is required for correctness.  */
+  HOWTO (R_MICROMIPS_JALR,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_JALR",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x00000000,		/* src_mask */
+	 0x00000000,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  Note that the high 16 bits of symbol values
+     must be zero.  This is used for relaxation.  */
+  HOWTO (R_MICROMIPS_HI0_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_HI0_LO16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (158),
+  EMPTY_HOWTO (159),
+  EMPTY_HOWTO (160),
+  EMPTY_HOWTO (161),
+
+  /* TLS general dynamic variable reference.  */
+  HOWTO (R_MICROMIPS_TLS_GD,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_GD",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* TLS local dynamic variable reference.  */
+  HOWTO (R_MICROMIPS_TLS_LDM,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_LDM",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* TLS local dynamic offset.  */
+  HOWTO (R_MICROMIPS_TLS_DTPREL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_DTPREL_HI16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* TLS local dynamic offset.  */
+  HOWTO (R_MICROMIPS_TLS_DTPREL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_DTPREL_LO16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* TLS thread pointer offset.  */
+  HOWTO (R_MICROMIPS_TLS_GOTTPREL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_GOTTPREL",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (167),
+  EMPTY_HOWTO (168),
+
+  /* TLS thread pointer offset.  */
+  HOWTO (R_MICROMIPS_TLS_TPREL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_TPREL_HI16", /* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* TLS thread pointer offset.  */
+  HOWTO (R_MICROMIPS_TLS_TPREL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_TLS_TPREL_LO16", /* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (171),
+
+  /* GP- and PC-relative relocations.  */
+  HOWTO (R_MICROMIPS_GPREL7_S2,	/* type */
+	 2,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 7,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_GPREL7_S2",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000007f,		/* src_mask */
+	 0x0000007f,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC23_S2,	/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 23,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC23_S2",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x007fffff,		/* src_mask */
+	 0x007fffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+};
+
 /* 16 bit offset for pc-relative branches.  */
 static reloc_howto_type elf_mips_gnu_rel16_s2 =
   HOWTO (R_MIPS_GNU_REL16_S2,	/* type */
@@ -1033,10 +1535,12 @@
 {
   bfd_boolean relocatable;
   bfd_reloc_status_type ret;
+  bfd_byte *location;
   bfd_vma gp;
 
-  /* R_MIPS_LITERAL relocations are defined for local symbols only.  */
-  if (reloc_entry->howto->type == R_MIPS_LITERAL
+  /* R_MIPS_LITERAL/R_MICROMIPS_LITERAL relocations are defined for local
+     symbols only.  */
+  if (literal_reloc_p (reloc_entry->howto->type)
       && output_bfd != NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
       && (symbol->flags & BSF_LOCAL) != 0)
@@ -1059,9 +1563,16 @@
   if (ret != bfd_reloc_ok)
     return ret;
 
-  return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
-					input_section, relocatable,
-					data, gp);
+  location = (bfd_byte *) data + reloc_entry->address;
+  _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+				 location);
+  ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+				       input_section, relocatable,
+				       data, gp);
+  _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+			       location);
+
+  return ret;
 }
 
 /* Do a R_MIPS_GPREL32 relocation.  This is a 32 bit value which must
@@ -1219,13 +1730,13 @@
     return ret;
 
   location = (bfd_byte *) data + reloc_entry->address;
-  _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
-				   location);
+  _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+				 location);
   ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
 				       input_section, relocatable,
 				       data, gp);
-  _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
-				 location);
+  _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+			       location);
 
   return ret;
 }
@@ -1287,6 +1798,47 @@
   { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
 };
 
+static const struct elf_reloc_map micromips_reloc_map[] =
+{
+  { BFD_RELOC_MICROMIPS_JMP, R_MICROMIPS_26_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HI16_S, R_MICROMIPS_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_LO16, R_MICROMIPS_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GPREL16, R_MICROMIPS_GPREL16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_LITERAL, R_MICROMIPS_LITERAL - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT16, R_MICROMIPS_GOT16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_7_PCREL_S1, R_MICROMIPS_PC7_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_10_PCREL_S1, R_MICROMIPS_PC10_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_16_PCREL_S1, R_MICROMIPS_PC16_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL16, R_MICROMIPS_CALL16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_DISP, R_MICROMIPS_GOT_DISP - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_PAGE - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_OFST, R_MICROMIPS_GOT_OFST - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_LO16, R_MICROMIPS_GOT_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_SUB, R_MICROMIPS_SUB - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HIGHER, R_MICROMIPS_HIGHER - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HIGHEST, R_MICROMIPS_HIGHEST - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL_HI16, R_MICROMIPS_CALL_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL_LO16, R_MICROMIPS_CALL_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_SCN_DISP, R_MICROMIPS_SCN_DISP - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_JALR, R_MICROMIPS_JALR - R_MICROMIPS_min },
+  /* There is no BFD reloc for R_MICROMIPS_HI0_LO16.  */
+  { BFD_RELOC_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_GD - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_LDM, R_MICROMIPS_TLS_LDM - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
+    R_MICROMIPS_TLS_DTPREL_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
+    R_MICROMIPS_TLS_DTPREL_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
+    R_MICROMIPS_TLS_GOTTPREL - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
+    R_MICROMIPS_TLS_TPREL_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
+    R_MICROMIPS_TLS_TPREL_LO16 - R_MICROMIPS_min },
+  /* There is no BFD reloc for R_MICROMIPS_GPREL7_S2.  */
+  /* There is no BFD reloc for R_MICROMIPS_PC23_S2.  */
+};
+
 /* Given a BFD reloc type, return a howto structure.  */
 
 static reloc_howto_type *
@@ -1295,6 +1847,7 @@
   unsigned int i;
   reloc_howto_type *howto_table = elf_mips_howto_table_rel;
   reloc_howto_type *howto16_table = elf_mips16_howto_table_rel;
+  reloc_howto_type *howto_micromips_table = elf_micromips_howto_table_rel;
 
   for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
        i++)
@@ -1310,6 +1863,13 @@
 	return &howto16_table[(int) mips16_reloc_map[i].elf_val];
     }
 
+  for (i = 0; i < sizeof (micromips_reloc_map) / sizeof (struct elf_reloc_map);
+       i++)
+    {
+      if (micromips_reloc_map[i].bfd_val == code)
+	return &howto_micromips_table[(int) micromips_reloc_map[i].elf_val];
+    }
+
   switch (code)
     {
     default:
@@ -1361,6 +1921,14 @@
 	&& strcasecmp (elf_mips16_howto_table_rel[i].name, r_name) == 0)
       return &elf_mips16_howto_table_rel[i];
 
+  for (i = 0;
+       i < (sizeof (elf_micromips_howto_table_rel)
+	    / sizeof (elf_micromips_howto_table_rel[0]));
+       i++)
+    if (elf_micromips_howto_table_rel[i].name != NULL
+	&& strcasecmp (elf_micromips_howto_table_rel[i].name, r_name) == 0)
+      return &elf_micromips_howto_table_rel[i];
+
   if (strcasecmp (elf_mips_gnu_pcrel32.name, r_name) == 0)
     return &elf_mips_gnu_pcrel32;
   if (strcasecmp (elf_mips_gnu_rel16_s2.name, r_name) == 0)
@@ -1398,6 +1966,8 @@
     case R_MIPS_JUMP_SLOT:
       return &elf_mips_jump_slot_howto;
     default:
+      if (r_type >= R_MICROMIPS_min && r_type < R_MICROMIPS_max)
+	return &elf_micromips_howto_table_rel[r_type - R_MICROMIPS_min];
       if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max)
         return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
       BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
@@ -1422,7 +1992,7 @@
      when we do the relocation, because the symbol manipulations done
      by the linker may cause us to lose track of the input BFD.  */
   if (((*cache_ptr->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
-      && (gprel16_reloc_p (r_type) || r_type == (unsigned int) R_MIPS_LITERAL))
+      && (gprel16_reloc_p (r_type) || literal_reloc_p (r_type)))
     cache_ptr->addend = elf_gp (abfd);
 }
 
@@ -1671,6 +2241,8 @@
 #define elf_backend_mips_rtype_to_howto	mips_elf32_rtype_to_howto
 #define bfd_elf32_bfd_is_local_label_name \
 					mips_elf_is_local_label_name
+#define bfd_elf32_bfd_is_target_special_symbol \
+					_bfd_mips_elf_is_target_special_symbol
 #define bfd_elf32_find_nearest_line	_bfd_mips_elf_find_nearest_line
 #define bfd_elf32_find_inliner_info	_bfd_mips_elf_find_inliner_info
 #define bfd_elf32_new_section_hook	_bfd_mips_elf_new_section_hook
@@ -1685,6 +2257,7 @@
 #define bfd_elf32_bfd_set_private_flags	_bfd_mips_elf_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data \
 					_bfd_mips_elf_print_private_bfd_data
+#define bfd_elf32_bfd_relax_section	_bfd_mips_elf_relax_section
 
 /* Support for SGI-ish mips targets.  */
 #define TARGET_LITTLE_SYM		bfd_elf32_littlemips_vec
@@ -1725,6 +2298,37 @@
 /* Include the target file again for this target.  */
 #include "elf32-target.h"
 
+/* FreeBSD support.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define	TARGET_LITTLE_SYM		bfd_elf32_tradlittlemips_freebsd_vec
+#define	TARGET_LITTLE_NAME		"elf32-tradlittlemips-freebsd"
+#define	TARGET_BIG_SYM			bfd_elf32_tradbigmips_freebsd_vec
+#define	TARGET_BIG_NAME			"elf32-tradbigmips-freebsd"
+
+#undef	ELF_OSABI
+#define	ELF_OSABI			ELFOSABI_FREEBSD
+
+/* The kernel recognizes executables as valid only if they carry a
+   "FreeBSD" label in the ELF header.  So we put this label on all
+   executables and (for simplicity) also all other object files.  */
+
+static void
+elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
+{
+  _bfd_elf_set_osabi (abfd, info);
+}
+
+#undef	elf_backend_post_process_headers
+#define	elf_backend_post_process_headers	elf_fbsd_post_process_headers
+#undef	elf32_bed
+#define elf32_bed				elf32_fbsd_tradbed
+
+#include "elf32-target.h"
 /* Implement elf_backend_final_write_processing for VxWorks.  */
 
 static void
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index a3172bc..1be5d00 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -1,5 +1,5 @@
 /* Morpho Technologies MT specific support for 32-bit ELF
-   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -521,7 +521,7 @@
   flagword     old_flags, new_flags;
   bfd_boolean  ok = TRUE;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
     return FALSE;
 
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 77a9d1e..0c25c3e 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1,6 +1,7 @@
 /* PowerPC-specific support for 32-bit ELF
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -35,6 +36,7 @@
 #include "elf/ppc.h"
 #include "elf32-ppc.h"
 #include "elf-vxworks.h"
+#include "dwarf2.h"
 
 /* RELA relocations are used here.  */
 
@@ -1881,6 +1883,8 @@
       return FALSE;
 
     case 128:		/* Linux/PPC elf_prpsinfo.  */
+      elf_tdata (abfd)->core_pid
+	= bfd_get_32 (abfd, note->descdata + 16);
       elf_tdata (abfd)->core_program
 	= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
       elf_tdata (abfd)->core_command
@@ -2559,26 +2563,6 @@
    ppc_elf_finish_dynamic_sections is one of the last functions
    called.  */
 
-/* The PPC linker needs to keep track of the number of relocs that it
-   decides to copy as dynamic relocs in check_relocs for each symbol.
-   This is so that it can later discard them if they are found to be
-   unnecessary.  We store the information in a field extending the
-   regular ELF linker hash table.  */
-
-struct ppc_elf_dyn_relocs
-{
-  struct ppc_elf_dyn_relocs *next;
-
-  /* The input section of the reloc.  */
-  asection *sec;
-
-  /* Total number of relocs copied for the input section.  */
-  bfd_size_type count;
-
-  /* Number of pc-relative relocs copied for the input section.  */
-  bfd_size_type pc_count;
-};
-
 /* Track PLT entries needed for a given symbol.  We might need more
    than one glink entry per symbol when generating a pic binary.  */
 struct plt_entry
@@ -2653,7 +2637,7 @@
   elf_linker_section_pointers_t *linker_section_pointer;
 
   /* Track dynamic relocs copied for this symbol.  */
-  struct ppc_elf_dyn_relocs *dyn_relocs;
+  struct elf_dyn_relocs *dyn_relocs;
 
   /* Contexts in which symbol is used in the GOT (or TOC).
      TLS_GD .. TLS_TLS bits are or'd into the mask as the
@@ -2696,6 +2680,7 @@
   asection *relsbss;
   elf_linker_section_t sdata[2];
   asection *sbss;
+  asection *glink_eh_frame;
 
   /* The (unloaded but important) .rela.plt.unloaded on VxWorks.  */
   asection *srelplt2;
@@ -2785,6 +2770,7 @@
       ppc_elf_hash_entry (entry)->linker_section_pointer = NULL;
       ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
       ppc_elf_hash_entry (entry)->tls_mask = 0;
+      ppc_elf_hash_entry (entry)->has_sda_refs = 0;
     }
 
   return entry;
@@ -2885,6 +2871,17 @@
       || !bfd_set_section_alignment (abfd, s, 4))
     return FALSE;
 
+  if (!info->no_ld_generated_unwind_info)
+    {
+      flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+      s = bfd_make_section_anyway_with_flags (abfd, ".eh_frame", flags);
+      htab->glink_eh_frame = s;
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s, 2))
+	return FALSE;
+    }
+
   flags = SEC_ALLOC | SEC_LINKER_CREATED;
   s = bfd_make_section_anyway_with_flags (abfd, ".iplt", flags);
   htab->iplt = s;
@@ -2894,7 +2891,7 @@
 
   flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
 	   | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-  s = bfd_make_section_with_flags (abfd, ".rela.iplt", flags);
+  s = bfd_make_section_anyway_with_flags (abfd, ".rela.iplt", flags);
   htab->reliplt = s;
   if (s == NULL
       || ! bfd_set_section_alignment (abfd, s, 2))
@@ -2927,8 +2924,8 @@
     return FALSE;
 
   htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss");
-  s = bfd_make_section_with_flags (abfd, ".dynsbss",
-				   SEC_ALLOC | SEC_LINKER_CREATED);
+  s = bfd_make_section_anyway_with_flags (abfd, ".dynsbss",
+					  SEC_ALLOC | SEC_LINKER_CREATED);
   htab->dynsbss = s;
   if (s == NULL)
     return FALSE;
@@ -2938,7 +2935,7 @@
       htab->relbss = bfd_get_section_by_name (abfd, ".rela.bss");
       flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
 	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-      s = bfd_make_section_with_flags (abfd, ".rela.sbss", flags);
+      s = bfd_make_section_anyway_with_flags (abfd, ".rela.sbss", flags);
       htab->relsbss = s;
       if (s == NULL
 	  || ! bfd_set_section_alignment (abfd, s, 2))
@@ -2973,37 +2970,6 @@
   edir = (struct ppc_elf_link_hash_entry *) dir;
   eind = (struct ppc_elf_link_hash_entry *) ind;
 
-  if (eind->dyn_relocs != NULL)
-    {
-      if (edir->dyn_relocs != NULL)
-	{
-	  struct ppc_elf_dyn_relocs **pp;
-	  struct ppc_elf_dyn_relocs *p;
-
-	  /* Add reloc counts against the indirect sym to the direct sym
-	     list.  Merge any entries against the same section.  */
-	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
-	    {
-	      struct ppc_elf_dyn_relocs *q;
-
-	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
-		if (q->sec == p->sec)
-		  {
-		    q->pc_count += p->pc_count;
-		    q->count += p->count;
-		    *pp = p->next;
-		    break;
-		  }
-	      if (q == NULL)
-		pp = &p->next;
-	    }
-	  *pp = edir->dyn_relocs;
-	}
-
-      edir->dyn_relocs = eind->dyn_relocs;
-      eind->dyn_relocs = NULL;
-    }
-
   edir->tls_mask |= eind->tls_mask;
   edir->has_sda_refs |= eind->has_sda_refs;
 
@@ -3025,6 +2991,37 @@
   if (eind->elf.root.type != bfd_link_hash_indirect)
     return;
 
+  if (eind->dyn_relocs != NULL)
+    {
+      if (edir->dyn_relocs != NULL)
+	{
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
+
+	  /* Add reloc counts against the indirect sym to the direct sym
+	     list.  Merge any entries against the same section.  */
+	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      struct elf_dyn_relocs *q;
+
+	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
+		if (q->sec == p->sec)
+		  {
+		    q->pc_count += p->pc_count;
+		    q->count += p->count;
+		    *pp = p->next;
+		    break;
+		  }
+	      if (q == NULL)
+		pp = &p->next;
+	    }
+	  *pp = edir->dyn_relocs;
+	}
+
+      edir->dyn_relocs = eind->dyn_relocs;
+      eind->dyn_relocs = NULL;
+    }
+
   /* Copy over the GOT refcount entries that we may have already seen to
      the symbol which just became indirect.  */
   edir->elf.got.refcount += eind->elf.got.refcount;
@@ -3112,8 +3109,9 @@
     }
 
   if ((abfd->flags & DYNAMIC) == 0
-      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
-    elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
+      && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+	  || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
 
   return TRUE;
 }
@@ -3699,12 +3697,9 @@
 	    {
 	      /* It does not make sense to have a procedure linkage
 		 table entry for a local symbol.  */
-	      (*_bfd_error_handler) (_("%B(%A+0x%lx): %s reloc against "
-				       "local symbol"),
-				     abfd,
-				     sec,
-				     (long) rel->r_offset,
-				     ppc_elf_howto_table[r_type]->name);
+	      info->callbacks->einfo (_("%P: %H: %s reloc against local symbol\n"),
+				      abfd, sec, rel->r_offset,
+				      ppc_elf_howto_table[r_type]->name);
 	      bfd_set_error (bfd_error_bad_value);
 	      return FALSE;
 	    }
@@ -3929,8 +3924,8 @@
 		  && (h->root.type == bfd_link_hash_defweak
 		      || !h->def_regular)))
 	    {
-	      struct ppc_elf_dyn_relocs *p;
-	      struct ppc_elf_dyn_relocs **rel_head;
+	      struct elf_dyn_relocs *p;
+	      struct elf_dyn_relocs **rel_head;
 
 #ifdef DEBUG
 	      fprintf (stderr,
@@ -3976,7 +3971,7 @@
 		    s = sec;
 
 		  vpp = &elf_section_data (s)->local_dynrel;
-		  rel_head = (struct ppc_elf_dyn_relocs **) vpp;
+		  rel_head = (struct elf_dyn_relocs **) vpp;
 		}
 
 	      p = *rel_head;
@@ -4163,7 +4158,7 @@
   if (!is_ppc_elf (ibfd) || !is_ppc_elf (obfd))
     return TRUE;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return FALSE;
 
@@ -4261,8 +4256,27 @@
 
   if (htab->plt_type == PLT_UNSET)
     {
+      struct elf_link_hash_entry *h;
+
       if (plt_style == PLT_OLD)
 	htab->plt_type = PLT_OLD;
+      else if (info->shared
+	       && htab->elf.dynamic_sections_created
+	       && (h = elf_link_hash_lookup (&htab->elf, "_mcount",
+					     FALSE, FALSE, TRUE)) != NULL
+	       && (h->type == STT_FUNC
+		   || h->needs_plt)
+	       && h->ref_regular
+	       && !(SYMBOL_CALLS_LOCAL (info, h)
+		    || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+			&& h->root.type == bfd_link_hash_undefweak)))
+	{
+	  /* Profiling of shared libs (and pies) is not supported with
+	     secure plt, because ppc32 does profiling before a
+	     function prologue and a secure plt pic call stubs needs
+	     r30 to be set up.  */
+	  htab->plt_type = PLT_OLD;
+	}
       else
 	{
 	  bfd *ibfd;
@@ -4290,7 +4304,13 @@
 	}
     }
   if (htab->plt_type == PLT_OLD && plt_style == PLT_NEW)
-    info->callbacks->info (_("Using bss-plt due to %B"), htab->old_bfd);
+    {
+      if (htab->old_bfd != NULL)
+	info->callbacks->einfo (_("%P: bss-plt forced due to %B\n"),
+				htab->old_bfd);
+      else
+	info->callbacks->einfo (_("%P: bss-plt forced by profiling\n"));
+    }
 
   BFD_ASSERT (htab->plt_type != PLT_VXWORKS);
 
@@ -4380,7 +4400,7 @@
       r_symndx = ELF32_R_SYM (rel->r_info);
       if (r_symndx >= symtab_hdr->sh_info)
 	{
-	  struct ppc_elf_dyn_relocs **pp, *p;
+	  struct elf_dyn_relocs **pp, *p;
 	  struct ppc_elf_link_hash_entry *eh;
 
 	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
@@ -4630,10 +4650,15 @@
     return TRUE;
 
   htab = ppc_elf_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
   /* Make two passes through the relocs.  First time check that tls
      relocs involved in setting up a tls_get_addr call are indeed
-     followed by such a call.  If they are not, exclude them from
-     the optimizations done on the second pass.  */
+     followed by such a call.  If they are not, don't do any tls
+     optimization.  On the second pass twiddle tls_mask flags to
+     notify relocate_section that optimization can be done, and
+     adjust got and plt refcounts.  */
   for (pass = 0; pass < 2; ++pass)
     for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
       {
@@ -4645,6 +4670,7 @@
 	  if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
 	    {
 	      Elf_Internal_Rela *relstart, *rel, *relend;
+	      int expecting_tls_get_addr = 0;
 
 	      /* Read the relocations.  */
 	      relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
@@ -4661,7 +4687,6 @@
 		  char *tls_mask;
 		  char tls_set, tls_clear;
 		  bfd_boolean is_local;
-		  int expecting_tls_get_addr;
 		  bfd_signed_vma *got_count;
 
 		  r_symndx = ELF32_R_SYM (rel->r_info);
@@ -4676,13 +4701,34 @@
 			h = (struct elf_link_hash_entry *) h->root.u.i.link;
 		    }
 
-		  expecting_tls_get_addr = 0;
 		  is_local = FALSE;
 		  if (h == NULL
 		      || !h->def_dynamic)
 		    is_local = TRUE;
 
 		  r_type = ELF32_R_TYPE (rel->r_info);
+		  /* If this section has old-style __tls_get_addr calls
+		     without marker relocs, then check that each
+		     __tls_get_addr call reloc is preceded by a reloc
+		     that conceivably belongs to the __tls_get_addr arg
+		     setup insn.  If we don't find matching arg setup
+		     relocs, don't do any tls optimization.  */
+		  if (pass == 0
+		      && sec->has_tls_get_addr_call
+		      && h != NULL
+		      && h == htab->tls_get_addr
+		      && !expecting_tls_get_addr
+		      && is_branch_reloc (r_type))
+		    {
+		      info->callbacks->minfo ("%H __tls_get_addr lost arg, "
+					      "TLS optimization disabled\n",
+					      ibfd, sec, rel->r_offset);
+		      if (elf_section_data (sec)->relocs != relstart)
+			free (relstart);
+		      return TRUE;
+		    }
+
+		  expecting_tls_get_addr = 0;
 		  switch (r_type)
 		    {
 		    case R_PPC_GOT_TLSLD16:
@@ -4759,9 +4805,13 @@
 		      /* Uh oh, we didn't find the expected call.  We
 			 could just mark this symbol to exclude it
 			 from tls optimization but it's safer to skip
-			 the entire section.  */
-		      sec->has_tls_reloc = 0;
-		      break;
+			 the entire optimization.  */
+		      info->callbacks->minfo (_("%H arg lost __tls_get_addr, "
+						"TLS optimization disabled\n"),
+					      ibfd, sec, rel->r_offset);
+		      if (elf_section_data (sec)->relocs != relstart)
+			free (relstart);
+		      return TRUE;
 		    }
 
 		  if (expecting_tls_get_addr)
@@ -4848,7 +4898,7 @@
 static bfd_boolean
 readonly_dynrelocs (struct elf_link_hash_entry *h)
 {
-  struct ppc_elf_dyn_relocs *p;
+  struct elf_dyn_relocs *p;
 
   for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
     {
@@ -4991,8 +5041,8 @@
 
   if (h->size == 0)
     {
-      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
-			     h->root.root.string);
+      info->callbacks->einfo (_("%P: dynamic variable `%s' is zero size\n"),
+			      h->root.root.string);
       return TRUE;
     }
 
@@ -5132,17 +5182,11 @@
   struct bfd_link_info *info = inf;
   struct ppc_elf_link_hash_entry *eh;
   struct ppc_elf_link_hash_table *htab;
-  struct ppc_elf_dyn_relocs *p;
+  struct elf_dyn_relocs *p;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   htab = ppc_elf_hash_table (info);
   if (htab->elf.dynamic_sections_created
       || h->type == STT_GNU_IFUNC)
@@ -5390,7 +5434,7 @@
 	 then they should avoid writing weird assembly.  */
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
-	  struct ppc_elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs **pp;
 
 	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
 	    {
@@ -5405,7 +5449,7 @@
 
       if (htab->is_vxworks)
 	{
-	  struct ppc_elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs **pp;
 
 	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
 	    {
@@ -5492,9 +5536,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (readonly_dynrelocs (h))
     {
       ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
@@ -5505,6 +5546,20 @@
   return TRUE;
 }
 
+static const unsigned char glink_eh_frame_cie[] =
+{
+  0, 0, 0, 16,				/* length.  */
+  0, 0, 0, 0,				/* id.  */
+  1,					/* CIE version.  */
+  'z', 'R', 0,				/* Augmentation string.  */
+  4,					/* Code alignment.  */
+  0x7c,					/* Data alignment.  */
+  65,					/* RA reg.  */
+  1,					/* Augmentation size.  */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding.  */
+  DW_CFA_def_cfa, 1, 0			/* def_cfa: r1 offset 0.  */
+};
+
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
@@ -5557,9 +5612,9 @@
 
       for (s = ibfd->sections; s != NULL; s = s->next)
 	{
-	  struct ppc_elf_dyn_relocs *p;
+	  struct elf_dyn_relocs *p;
 
-	  for (p = ((struct ppc_elf_dyn_relocs *)
+	  for (p = ((struct elf_dyn_relocs *)
 		    elf_section_data (s)->local_dynrel);
 	       p != NULL;
 	       p = p->next)
@@ -5765,6 +5820,21 @@
 	}
     }
 
+  if (htab->glink != NULL
+      && htab->glink->size != 0
+      && htab->glink_eh_frame != NULL
+      && !bfd_is_abs_section (htab->glink_eh_frame->output_section))
+    {
+      s = htab->glink_eh_frame;
+      s->size = sizeof (glink_eh_frame_cie) + 20;
+      if (info->shared)
+	{
+	  s->size += 4;
+	  if (htab->glink->size - GLINK_PLTRESOLVE + 8 >= 256)
+	    s->size += 4;
+	}
+    }
+
   /* We've now determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
   relocs = FALSE;
@@ -5788,6 +5858,7 @@
 	}
       else if (s == htab->iplt
 	       || s == htab->glink
+	       || s == htab->glink_eh_frame
 	       || s == htab->sgotplt
 	       || s == htab->sbss
 	       || s == htab->dynbss
@@ -7188,8 +7259,8 @@
       switch (r_type)
 	{
 	default:
-	  (*_bfd_error_handler)
-	    (_("%B: unknown relocation type %d for symbol %s"),
+	  info->callbacks->einfo
+	    (_("%P: %B: unknown relocation type %d for symbol %s\n"),
 	     input_bfd, (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -7449,11 +7520,9 @@
 	       generated by a hash table traversal, the value in the
 	       got at entry m+n bears little relation to the entry m.  */
 	    if (addend != 0)
-	      (*_bfd_error_handler)
-		(_("%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"),
-		 input_bfd,
-		 input_section,
-		 (long) rel->r_offset,
+	      info->callbacks->einfo
+		(_("%P: %H: non-zero addend on %s reloc against `%s'\n"),
+		 input_bfd, input_section, rel->r_offset,
 		 howto->name,
 		 sym_name);
 	  }
@@ -7647,12 +7716,10 @@
 			     non-executable to apply text relocations.
 			     So we'll segfault when trying to run the
 			     indirection function to resolve the reloc.  */
-			  (*_bfd_error_handler)
-			    (_("%B(%A+0x%lx): relocation %s for indirect "
-			       "function %s unsupported"),
-			     input_bfd,
-			     input_section,
-			     (long) rel->r_offset,
+			  info->callbacks->einfo
+			    (_("%P: %H: relocation %s for indirect "
+			       "function %s unsupported\n"),
+			     input_bfd, input_section, rel->r_offset,
 			     howto->name,
 			     sym_name);
 			  ret = FALSE;
@@ -7877,9 +7944,9 @@
 		   || (CONST_STRNEQ (name, ".sbss")
 		       && (name[5] == 0 || name[5] == '.'))))
 	      {
-		(*_bfd_error_handler)
-		  (_("%B: the target (%s) of a %s relocation is "
-		     "in the wrong output section (%s)"),
+		info->callbacks->einfo
+		  (_("%P: %B: the target (%s) of a %s relocation is "
+		     "in the wrong output section (%s)\n"),
 		   input_bfd,
 		   sym_name,
 		   howto->name,
@@ -7907,9 +7974,9 @@
 	    if (! (CONST_STRNEQ (name, ".sdata2")
 		   || CONST_STRNEQ (name, ".sbss2")))
 	      {
-		(*_bfd_error_handler)
-		  (_("%B: the target (%s) of a %s relocation is "
-		     "in the wrong output section (%s)"),
+		info->callbacks->einfo
+		  (_("%P: %B: the target (%s) of a %s relocation is "
+		     "in the wrong output section (%s)\n"),
 		   input_bfd,
 		   sym_name,
 		   howto->name,
@@ -7954,9 +8021,9 @@
 	      }
 	    else
 	      {
-		(*_bfd_error_handler)
-		  (_("%B: the target (%s) of a %s relocation is "
-		     "in the wrong output section (%s)"),
+		info->callbacks->einfo
+		  (_("%P: %B: the target (%s) of a %s relocation is "
+		     "in the wrong output section (%s)\n"),
 		   input_bfd,
 		   sym_name,
 		   howto->name,
@@ -8026,8 +8093,8 @@
 	case R_PPC_EMB_RELST_HI:
 	case R_PPC_EMB_RELST_HA:
 	case R_PPC_EMB_BIT_FLD:
-	  (*_bfd_error_handler)
-	    (_("%B: relocation %s is not yet supported for symbol %s."),
+	  info->callbacks->einfo
+	    (_("%P: %B: relocation %s is not yet supported for symbol %s\n"),
 	     input_bfd,
 	     howto->name,
 	     sym_name);
@@ -8085,11 +8152,9 @@
 	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && h->def_dynamic))
 	{
-	  (*_bfd_error_handler)
-	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
-	     input_bfd,
-	     input_section,
-	     (long) rel->r_offset,
+	  info->callbacks->einfo
+	    (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"),
+	     input_bfd, input_section, rel->r_offset,
 	     howto->name,
 	     sym_name);
 	  ret = FALSE;
@@ -8134,10 +8199,10 @@
 	    }
 	  else
 	    {
-	      (*_bfd_error_handler)
-		(_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
-		 input_bfd, input_section,
-		 (long) rel->r_offset, howto->name, sym_name, (int) r);
+	      info->callbacks->einfo
+		(_("%P: %H: %s reloc against `%s': error %d\n"),
+		 input_bfd, input_section, rel->r_offset,
+		 howto->name, sym_name, (int) r);
 	      ret = FALSE;
 	    }
 	}
@@ -8626,10 +8691,10 @@
 	}
       else
 	{
-	  (*_bfd_error_handler) (_("%s not defined in linker created %s"),
-				 htab->elf.hgot->root.root.string,
-				 (htab->sgotplt != NULL
-				  ? htab->sgotplt->name : htab->got->name));
+	  info->callbacks->einfo (_("%P: %s not defined in linker created %s\n"),
+				  htab->elf.hgot->root.root.string,
+				  (htab->sgotplt != NULL
+				   ? htab->sgotplt->name : htab->got->name));
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = FALSE;
 	}
@@ -8918,6 +8983,78 @@
 	}
     }
 
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->contents != NULL)
+    {
+      unsigned char *p = htab->glink_eh_frame->contents;
+      bfd_vma val;
+
+      memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
+      /* CIE length (rewrite in case little-endian).  */
+      bfd_put_32 (htab->elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
+      p += sizeof (glink_eh_frame_cie);
+      /* FDE length.  */
+      val = htab->glink_eh_frame->size - 4 - sizeof (glink_eh_frame_cie);
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* CIE pointer.  */
+      val = p - htab->glink_eh_frame->contents;
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* Offset to .glink.  */
+      val = (htab->glink->output_section->vma
+	     + htab->glink->output_offset);
+      val -= (htab->glink_eh_frame->output_section->vma
+	      + htab->glink_eh_frame->output_offset);
+      val -= p - htab->glink_eh_frame->contents;
+      bfd_put_32 (htab->elf.dynobj, val, p);
+      p += 4;
+      /* .glink size.  */
+      bfd_put_32 (htab->elf.dynobj, htab->glink->size, p);
+      p += 4;
+      /* Augmentation.  */
+      p += 1;
+
+      if (info->shared
+	  && htab->elf.dynamic_sections_created)
+	{
+	  bfd_vma adv = (htab->glink->size - GLINK_PLTRESOLVE + 8) >> 2;
+	  if (adv < 64)
+	    *p++ = DW_CFA_advance_loc + adv;
+	  else if (adv < 256)
+	    {
+	      *p++ = DW_CFA_advance_loc1;
+	      *p++ = adv;
+	    }
+	  else if (adv < 65536)
+	    {
+	      *p++ = DW_CFA_advance_loc2;
+	      bfd_put_16 (htab->elf.dynobj, adv, p);
+	      p += 2;
+	    }
+	  else
+	    {
+	      *p++ = DW_CFA_advance_loc4;
+	      bfd_put_32 (htab->elf.dynobj, adv, p);
+	      p += 4;
+	    }
+	  *p++ = DW_CFA_register;
+	  *p++ = 65;
+	  p++;
+	  *p++ = DW_CFA_advance_loc + 4;
+	  *p++ = DW_CFA_restore_extended;
+	  *p++ = 65;
+	}
+      BFD_ASSERT ((bfd_vma) ((p + 3 - htab->glink_eh_frame->contents) & -4)
+		  == htab->glink_eh_frame->size);
+
+      if (htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+	  && !_bfd_elf_write_section_eh_frame (output_bfd, info,
+					       htab->glink_eh_frame,
+					       htab->glink_eh_frame->contents))
+	return FALSE;
+    }
+
   return ret;
 }
 
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index d7e15a0..f049f6e 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -1,5 +1,5 @@
 /* Renesas RX specific support for 32-bit ELF.
-   Copyright (C) 2008, 2009, 2010
+   Copyright (C) 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -20,6 +20,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#include "bfd_stdint.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/rx.h"
@@ -27,6 +28,11 @@
 
 #define RX_OPCODE_BIG_ENDIAN 0
 
+/* This is a meta-target that's used only with objcopy, to avoid the
+   endian-swap we would otherwise get.  We check for this in
+   rx_elf_object_p().  */
+const bfd_target bfd_elf32_rx_be_ns_vec;
+
 #ifdef DEBUG
 char * rx_get_reloc (long);
 void rx_dump_symtab (bfd *, void *, void *);
@@ -248,9 +254,12 @@
   { BFD_RELOC_RX_RELAX,		R_RX_RH_RELAX },
   { BFD_RELOC_RX_SYM,		R_RX_SYM },
   { BFD_RELOC_RX_OP_SUBTRACT,	R_RX_OPsub },
+  { BFD_RELOC_RX_OP_NEG,	R_RX_OPneg },
   { BFD_RELOC_RX_ABS8,		R_RX_ABS8 },
   { BFD_RELOC_RX_ABS16,		R_RX_ABS16 },
+  { BFD_RELOC_RX_ABS16_REV,	R_RX_ABS16_REV },
   { BFD_RELOC_RX_ABS32,		R_RX_ABS32 },
+  { BFD_RELOC_RX_ABS32_REV,	R_RX_ABS32_REV },
   { BFD_RELOC_RX_ABS16UL,	R_RX_ABS16UL },
   { BFD_RELOC_RX_ABS16UW,	R_RX_ABS16UW },
   { BFD_RELOC_RX_ABS16U,	R_RX_ABS16U }
@@ -2851,13 +2860,16 @@
 }
 
 static bfd_boolean no_warn_mismatch = FALSE;
+static bfd_boolean ignore_lma = TRUE;
 
-void bfd_elf32_rx_set_target_flags (bfd_boolean);
+void bfd_elf32_rx_set_target_flags (bfd_boolean, bfd_boolean);
 
 void
-bfd_elf32_rx_set_target_flags (bfd_boolean user_no_warn_mismatch)
+bfd_elf32_rx_set_target_flags (bfd_boolean user_no_warn_mismatch,
+			       bfd_boolean user_ignore_lma)
 {
   no_warn_mismatch = user_no_warn_mismatch;
+  ignore_lma = user_ignore_lma;
 }
 
 /* Merge backend specific data from an object file to the output
@@ -2947,8 +2959,65 @@
 static bfd_boolean
 rx_elf_object_p (bfd * abfd)
 {
+  int i;
+  unsigned int u;
+  Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;
+  int nphdrs = elf_elfheader (abfd)->e_phnum;
+  sec_ptr bsec;
+
+  /* We never want to automatically choose the non-swapping big-endian
+     target.  The user can only get that explicitly, such as with -I
+     and objcopy.  */
+  if (abfd->xvec == &bfd_elf32_rx_be_ns_vec
+      && abfd->target_defaulted)
+    return FALSE;
+
   bfd_default_set_arch_mach (abfd, bfd_arch_rx,
 			     elf32_rx_machine (abfd));
+
+  /* For each PHDR in the object, we must find some section that
+     corresponds (based on matching file offsets) and use its VMA
+     information to reconstruct the p_vaddr field we clobbered when we
+     wrote it out.  */
+  for (i=0; i<nphdrs; i++)
+    {
+      for (u=0; u<elf_tdata(abfd)->num_elf_sections; u++)
+	{
+	  Elf_Internal_Shdr *sec = elf_tdata(abfd)->elf_sect_ptr[u];
+
+	  if (phdr[i].p_offset <= (bfd_vma) sec->sh_offset
+	      && (bfd_vma)sec->sh_offset <= phdr[i].p_offset + (phdr[i].p_filesz - 1))
+	    {
+	      /* Found one!  The difference between the two addresses,
+		 plus the difference between the two file offsets, is
+		 enough information to reconstruct the lma.  */
+
+	      /* Example where they aren't:
+		 PHDR[1] = lma fffc0100 offset 00002010 size 00000100
+		 SEC[6]  = vma 00000050 offset 00002050 size 00000040
+
+		 The correct LMA for the section is fffc0140 + (2050-2010).
+	      */
+
+	      phdr[i].p_vaddr = sec->sh_addr + (sec->sh_offset - phdr[i].p_offset);
+	      break;
+	    }
+	}
+
+      /* We must update the bfd sections as well, so we don't stop
+	 with one match.  */
+      bsec = abfd->sections;
+      while (bsec)
+	{
+	  if (phdr[i].p_vaddr <= bsec->lma
+	      && bsec->vma <= phdr[i].p_vaddr + (phdr[i].p_filesz - 1))
+	    {
+	      bsec->lma = phdr[i].p_paddr + (bsec->vma - phdr[i].p_vaddr);
+	    }
+	  bsec = bsec->next;
+	}
+    }
+
   return TRUE;
 }
  
@@ -3301,13 +3370,12 @@
 #endif
       if (o->flags & SEC_CODE
 	  && bfd_big_endian (abfd)
-	  && (o->size % 4 || o->rawsize % 4))
+	  && o->size % 4)
 	{
 #ifdef DJDEBUG
 	  fprintf (stderr, "adjusting...\n");
 #endif
 	  o->size += 4 - (o->size % 4);
-	  o->rawsize += 4 - (o->rawsize % 4);
 	}
     }
 
@@ -3329,22 +3397,24 @@
   phdr = tdata->phdr;
   count = tdata->program_header_size / bed->s->sizeof_phdr;
 
-  for (i = count; i-- != 0; )
-    if (phdr[i].p_type == PT_LOAD)
-      {
-	/* The Renesas tools expect p_paddr to be zero.  However,
-	   there is no other way to store the writable data in ROM for
-	   startup initialization.  So, we let the linker *think*
-	   we're using paddr and vaddr the "usual" way, but at the
-	   last minute we move the paddr into the vaddr (which is what
-	   the simulator uses) and zero out paddr.  Note that this
-	   does not affect the section headers, just the program
-	   headers.  We hope.  */
+  if (ignore_lma)
+    for (i = count; i-- != 0;)
+      if (phdr[i].p_type == PT_LOAD)
+	{
+	  /* The Renesas tools expect p_paddr to be zero.  However,
+	     there is no other way to store the writable data in ROM for
+	     startup initialization.  So, we let the linker *think*
+	     we're using paddr and vaddr the "usual" way, but at the
+	     last minute we move the paddr into the vaddr (which is what
+	     the simulator uses) and zero out paddr.  Note that this
+	     does not affect the section headers, just the program
+	     headers.  We hope.  */
 	  phdr[i].p_vaddr = phdr[i].p_paddr;
-	  /* If we zero out p_paddr, then the LMA in the section table
+#if 0	  /* If we zero out p_paddr, then the LMA in the section table
 	     becomes wrong.  */
-	  /*phdr[i].p_paddr = 0;*/
-      }
+	  phdr[i].p_paddr = 0;
+#endif
+	}
 
   return TRUE;
 }
@@ -3378,3 +3448,21 @@
 #define bfd_elf32_bfd_relax_section		elf32_rx_relax_section_wrapper
 
 #include "elf32-target.h"
+
+/* We define a second big-endian target that doesn't have the custom
+   section get/set hooks, for times when we want to preserve the
+   pre-swapped .text sections (like objcopy).  */
+
+#undef  TARGET_BIG_SYM
+#define TARGET_BIG_SYM		bfd_elf32_rx_be_ns_vec
+#undef  TARGET_BIG_NAME
+#define TARGET_BIG_NAME		"elf32-rx-be-ns"
+#undef  TARGET_LITTLE_SYM
+
+#undef bfd_elf32_get_section_contents
+#undef bfd_elf32_set_section_contents
+
+#undef	elf32_bed
+#define elf32_bed				elf32_rx_be_ns_bed
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 46e9541..98437d0 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1,6 +1,6 @@
 /* IBM S/390-specific support for 32-bit ELF
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+   2011 Free Software Foundation, Inc.
    Contributed by Carl B. Pedersen and Martin Schwidefsky.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1696,12 +1696,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
 
@@ -1922,9 +1916,6 @@
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 1c08c8a..b437624 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -1,5 +1,6 @@
 /* 32-bit ELF support for S+core.
-   Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Contributed by
    Brain.lin ([email protected])
    Mei Ligang ([email protected])
@@ -1037,9 +1038,6 @@
 {
   struct score_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index 9ce3bf1..3e98bfc 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
-   Copyright 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by
    Brain.lin ([email protected])
    Mei Ligang ([email protected])
@@ -920,9 +920,6 @@
 {
   struct score_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
diff --git a/bfd/elf32-sh-symbian.c b/bfd/elf32-sh-symbian.c
index 25e3af9..0882d52 100644
--- a/bfd/elf32-sh-symbian.c
+++ b/bfd/elf32-sh-symbian.c
@@ -492,6 +492,7 @@
 	      new_sym.st_info  = ELF_ST_INFO (STB_GLOBAL, STT_FUNC);
 	      new_sym.st_other = ELF_ST_VISIBILITY (STV_DEFAULT);
 	      new_sym.st_shndx = SHN_UNDEF;
+	      new_sym.st_target_internal = 0;
 
 	      if (! _bfd_elf_merge_symbol (input_bfd, info,
 					   ptr->new_name, & new_sym,
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index e15f51c..ca2c4af 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -1,6 +1,6 @@
 /* Renesas / SuperH SH specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2977,12 +2977,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = sh_elf_hash_table (info);
   if (htab == NULL)
@@ -3321,9 +3315,6 @@
   struct elf_sh_link_hash_entry *eh;
   struct elf_sh_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_sh_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
@@ -5525,7 +5516,7 @@
 
 	    check_segment[0] = check_segment[1] = -1;
 
-	    if (! info->shared)
+	    if (! info->shared || info->pie)
 	      {
 		relocation = tpoff (info, relocation);
 		addend = rel->r_addend;
@@ -6623,7 +6614,7 @@
 	  break;
 
 	case R_SH_TLS_LE_32:
-	  if (info->shared)
+	  if (info->shared && !info->pie)
 	    {
 	      (*_bfd_error_handler)
 		(_("%B: TLS local exec code cannot be linked into shared objects"),
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 187d466..f722fcc 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1,6 +1,7 @@
 /* SPARC-specific support for 32-bit ELF
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2010, 2011
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -110,7 +111,7 @@
       return FALSE;
     }
 
-  return TRUE;
+  return _bfd_sparc_elf_merge_private_bfd_data (ibfd, obfd);
 }
 
 /* The final processing done just before writing out the object file.
@@ -180,8 +181,9 @@
 			     bfd_vma * valp ATTRIBUTE_UNUSED)
 {
   if ((abfd->flags & DYNAMIC) == 0
-      && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
-    elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
+      && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+	  || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
   return TRUE;
 }
 
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index bcee155..ae3ed10 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -4067,7 +4067,7 @@
   bfd *const *abfd1 = a;
   bfd *const *abfd2 = b;
 
-  return strcmp ((*abfd1)->filename, (*abfd2)->filename);
+  return filename_cmp ((*abfd1)->filename, (*abfd2)->filename);
 }
 
 static unsigned int
@@ -4299,7 +4299,7 @@
 
       qsort (bfd_arr, bfd_count, sizeof (*bfd_arr), sort_bfds);
       for (i = 1; i < bfd_count; ++i)
-	if (strcmp (bfd_arr[i - 1]->filename, bfd_arr[i]->filename) == 0)
+	if (filename_cmp (bfd_arr[i - 1]->filename, bfd_arr[i]->filename) == 0)
 	  {
 	    if (bfd_arr[i - 1]->my_archive == bfd_arr[i]->my_archive)
 	      {
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index 4e91d74..19287fe 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for TI C6X
-   Copyright 2010
+   Copyright 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Joseph Myers <[email protected]>
    		  Bernd Schmidt  <[email protected]>
@@ -22,6 +22,7 @@
    MA 02110-1301, USA.  */
 
 #include "sysdep.h"
+#include <limits.h>
 #include "bfd.h"
 #include "libbfd.h"
 #include "libiberty.h"
@@ -29,6 +30,98 @@
 #include "elf/tic6x.h"
 #include "elf32-tic6x.h"
 
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
+
+/* DSBT binaries have a default 128K stack.  */
+#define DEFAULT_STACK_SIZE 0x20000
+
+/* The size in bytes of an entry in the procedure linkage table.  */
+#define PLT_ENTRY_SIZE 24
+
+/* TI C6X ELF linker hash table.  */
+
+struct elf32_tic6x_link_hash_table
+{
+  struct elf_link_hash_table elf;
+
+  /* Short-cuts to get to dynamic linker sections.  */
+  asection *sdynbss;
+  asection *srelbss;
+
+  /* C6X specific command line arguments.  */
+  struct elf32_tic6x_params params;
+
+  /* Small local sym cache.  */
+  struct sym_cache sym_cache;
+
+  /* The output BFD, for convenience.  */
+  bfd *obfd;
+
+  /* The .dsbt section.  */
+  asection *dsbt;
+};
+
+/* Get the TI C6X ELF linker hash table from a link_info structure.  */
+
+#define elf32_tic6x_hash_table(p) \
+  ((struct elf32_tic6x_link_hash_table *) ((p)->hash))
+
+/* TI C6X ELF linker hash entry.  */
+
+struct elf32_tic6x_link_hash_entry
+{
+  struct elf_link_hash_entry elf;
+
+  /* Track dynamic relocs copied for this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+};
+
+typedef enum
+{
+  DELETE_EXIDX_ENTRY,
+  INSERT_EXIDX_CANTUNWIND_AT_END
+}
+tic6x_unwind_edit_type;
+
+/* A (sorted) list of edits to apply to an unwind table.  */
+typedef struct tic6x_unwind_table_edit
+{
+  tic6x_unwind_edit_type type;
+  /* Note: we sometimes want to insert an unwind entry corresponding to a
+     section different from the one we're currently writing out, so record the
+     (text) section this edit relates to here.  */
+  asection *linked_section;
+  unsigned int index;
+  struct tic6x_unwind_table_edit *next;
+}
+tic6x_unwind_table_edit;
+
+typedef struct _tic6x_elf_section_data
+{
+  /* Information about mapping symbols.  */
+  struct bfd_elf_section_data elf;
+  /* Information about unwind tables.  */
+  union
+  {
+    /* Unwind info attached to a text section.  */
+    struct
+    {
+      asection *tic6x_exidx_sec;
+    } text;
+
+    /* Unwind info attached to an .c6xabi.exidx section.  */
+    struct
+    {
+      tic6x_unwind_table_edit *unwind_edit_list;
+      tic6x_unwind_table_edit *unwind_edit_tail;
+    } exidx;
+  } u;
+}
+_tic6x_elf_section_data;
+
+#define elf32_tic6x_section_data(sec) \
+  ((_tic6x_elf_section_data *) elf_section_data (sec))
+
 struct elf32_tic6x_obj_tdata
 {
   struct elf_obj_tdata root;
@@ -42,6 +135,20 @@
 #define elf32_tic6x_tdata(abfd) \
   ((struct elf32_tic6x_obj_tdata *) (abfd)->tdata.any)
 
+#define is_tic6x_elf(bfd) \
+  (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
+   && elf_tdata (bfd) != NULL \
+   && elf_object_id (bfd) == TIC6X_ELF_DATA)
+
+/* C6X ELF uses two common sections.  One is the usual one, and the
+   other is for small objects.  All the small objects are kept
+   together, and then referenced via the gp pointer, which yields
+   faster assembler code.  This is what we use for the small common
+   section.  This approach is copied from ecoff.c.  */
+static asection tic6x_elf_scom_section;
+static asymbol  tic6x_elf_scom_symbol;
+static asymbol  *tic6x_elf_scom_symbol_ptr;
+
 static reloc_howto_type elf32_tic6x_howto_table[] =
 {
   HOWTO (R_C6000_NONE,		/* type */
@@ -373,7 +480,7 @@
 	 1,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 31,			/* bitsize */
-	 FALSE,			/* pc_relative */
+	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
@@ -381,7 +488,7 @@
 	 FALSE,			/* partial_inplace */
 	 0,			/* src_mask */
 	 0x7fffffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
+	 TRUE),			/* pcrel_offset */
   HOWTO (R_C6000_COPY,		/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -395,10 +502,58 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
-  EMPTY_HOWTO (27),
-  EMPTY_HOWTO (28),
-  EMPTY_HOWTO (29),
-  EMPTY_HOWTO (30),
+  HOWTO (R_C6000_JUMP_SLOT,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_JUMP_SLOT",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+  HOWTO (R_C6000_EHTYPE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_EHTYPE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+  HOWTO (R_C6000_PCR_H16,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 7,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_PCR_H16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x007fff80,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+  HOWTO (R_C6000_PCR_L16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 7,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_PCR_L16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x007fff80,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
   EMPTY_HOWTO (31),
   EMPTY_HOWTO (32),
   EMPTY_HOWTO (33),
@@ -933,7 +1088,7 @@
 	 1,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 31,			/* bitsize */
-	 FALSE,			/* pc_relative */
+	 TRUE,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
@@ -941,7 +1096,7 @@
 	 TRUE,			/* partial_inplace */
 	 0,			/* src_mask */
 	 0x7fffffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
+	 TRUE),			/* pcrel_offset */
   HOWTO (R_C6000_COPY,		/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -955,10 +1110,34 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
-  EMPTY_HOWTO (27),
-  EMPTY_HOWTO (28),
-  EMPTY_HOWTO (29),
-  EMPTY_HOWTO (30),
+  HOWTO (R_C6000_JUMP_SLOT,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_JUMP_SLOT",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+  HOWTO (R_C6000_EHTYPE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_C6000_EHTYPE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+  EMPTY_HOWTO (R_C6000_PCR_H16),
+  EMPTY_HOWTO (R_C6000_PCR_L16),
   EMPTY_HOWTO (31),
   EMPTY_HOWTO (32),
   EMPTY_HOWTO (33),
@@ -1259,6 +1438,10 @@
     { BFD_RELOC_C6000_DSBT_INDEX, R_C6000_DSBT_INDEX },
     { BFD_RELOC_C6000_PREL31, R_C6000_PREL31 },
     { BFD_RELOC_C6000_COPY, R_C6000_COPY },
+    { BFD_RELOC_C6000_JUMP_SLOT, R_C6000_JUMP_SLOT },
+    { BFD_RELOC_C6000_EHTYPE, R_C6000_EHTYPE },
+    { BFD_RELOC_C6000_PCR_H16, R_C6000_PCR_H16 },
+    { BFD_RELOC_C6000_PCR_L16, R_C6000_PCR_L16 },
     { BFD_RELOC_C6000_ALIGN, R_C6000_ALIGN },
     { BFD_RELOC_C6000_FPHEAD, R_C6000_FPHEAD },
     { BFD_RELOC_C6000_NOCMP, R_C6000_NOCMP }
@@ -1349,6 +1532,155 @@
   elf32_tic6x_tdata (abfd)->use_rela_p = use_rela_p;
 }
 
+/* Create an entry in a C6X ELF linker hash table.  */
+
+static struct bfd_hash_entry *
+elf32_tic6x_link_hash_newfunc (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 elf32_tic6x_link_hash_entry));
+      if (entry == NULL)
+	return entry;
+    }
+
+  /* Call the allocation method of the superclass.  */
+  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+  if (entry != NULL)
+    {
+      struct elf32_tic6x_link_hash_entry *eh;
+
+      eh = (struct elf32_tic6x_link_hash_entry *) entry;
+      eh->dyn_relocs = NULL;
+    }
+
+  return entry;
+}
+
+/* Create a C6X ELF linker hash table.  */
+
+static struct bfd_link_hash_table *
+elf32_tic6x_link_hash_table_create (bfd *abfd)
+{
+  struct elf32_tic6x_link_hash_table *ret;
+  bfd_size_type amt = sizeof (struct elf32_tic6x_link_hash_table);
+
+  ret = bfd_malloc (amt);
+  if (ret == NULL)
+    return NULL;
+
+  if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
+				      elf32_tic6x_link_hash_newfunc,
+				      sizeof (struct elf32_tic6x_link_hash_entry),
+				      TIC6X_ELF_DATA))
+    {
+      free (ret);
+      return NULL;
+    }
+
+  ret->sym_cache.abfd = NULL;
+  ret->obfd = abfd;
+  ret->elf.is_relocatable_executable = 1;
+
+  return &ret->elf.root;
+}
+
+static bfd_boolean
+elf32_tic6x_final_link (bfd *abfd, struct bfd_link_info *info)
+{
+  if (info->shared)
+    {
+      obj_attribute *out_attr;
+      out_attr = elf_known_obj_attributes_proc (abfd);
+      if (out_attr[Tag_ABI_PIC].i == 0)
+	{
+	  _bfd_error_handler (_("warning: generating a shared library "
+				"containing non-PIC code"));
+	}
+      if (out_attr[Tag_ABI_PID].i == 0)
+	{
+	  _bfd_error_handler (_("warning: generating a shared library "
+				"containing non-PID code"));
+	}
+    }
+  /* Invoke the regular ELF backend linker to do all the work.  */
+  if (!bfd_elf_final_link (abfd, info))
+    return FALSE;
+
+  return TRUE;
+}
+
+/* Destroy a C6X ELF linker hash table.  */
+
+static void
+elf32_tic6x_link_hash_table_free (struct bfd_link_hash_table *hash)
+{
+  _bfd_generic_link_hash_table_free (hash);
+}
+
+/* Called to pass PARAMS to the backend.  We store them in the hash table
+   associated with INFO.  */
+
+void
+elf32_tic6x_setup (struct bfd_link_info *info,
+		   struct elf32_tic6x_params *params)
+{
+  struct elf32_tic6x_link_hash_table *htab = elf32_tic6x_hash_table (info);
+  htab->params = *params;
+}
+
+/* Determine if we're dealing with a DSBT object.  */
+
+static bfd_boolean
+elf32_tic6x_using_dsbt (bfd *abfd)
+{
+  return bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC,
+				   Tag_ABI_DSBT);
+}
+
+/* Create .plt, .rela.plt, .got, .got.plt, .rela.got and .dsbt
+   sections in DYNOBJ, and set up shortcuts to them in our hash
+   table.  */
+
+static bfd_boolean
+elf32_tic6x_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  flagword flags;
+
+  htab = elf32_tic6x_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
+  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+    return FALSE;
+
+  /* Create .dsbt  */
+  flags = (SEC_ALLOC | SEC_LOAD
+	   | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+  htab->dsbt = bfd_make_section_anyway_with_flags (dynobj, ".dsbt",
+						   flags);
+  if (htab->dsbt == NULL
+      || ! bfd_set_section_alignment (dynobj, htab->dsbt, 2)
+      || ! bfd_set_section_alignment (dynobj, htab->elf.splt, 5))
+    return FALSE;
+
+  htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+  if (!info->shared)
+    htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+
+  if (!htab->sdynbss
+      || (!info->shared && !htab->srelbss))
+    abort ();
+
+  return TRUE;
+}
+
 static bfd_boolean
 elf32_tic6x_mkobject (bfd *abfd)
 {
@@ -1361,11 +1693,518 @@
   return ret;
 }
 
+/* Install relocation RELA into section SRELA, incrementing its
+   reloc_count.  */
+
+static void
+elf32_tic6x_install_rela (bfd *output_bfd, asection *srela,
+			  Elf_Internal_Rela *rela)
+{
+  bfd_byte *loc;
+  bfd_vma off = srela->reloc_count++ * sizeof (Elf32_External_Rela);
+  loc = srela->contents + off;
+  BFD_ASSERT (off < srela->size);
+  bfd_elf32_swap_reloca_out (output_bfd, rela, loc);
+}
+
+/* Create a dynamic reloc against the GOT at offset OFFSET.  The contents
+   of the GOT at this offset have been initialized with the relocation.  */
+
+static void
+elf32_tic6x_make_got_dynreloc (bfd *output_bfd,
+			       struct elf32_tic6x_link_hash_table *htab,
+			       asection *sym_sec, bfd_vma offset)
+{
+  asection *sgot = htab->elf.sgot;
+  Elf_Internal_Rela outrel;
+  int dynindx;
+
+  outrel.r_offset = sgot->output_section->vma + sgot->output_offset + offset;
+  outrel.r_addend = bfd_get_32 (output_bfd, sgot->contents + offset);
+  if (sym_sec && sym_sec->output_section
+      && ! bfd_is_abs_section (sym_sec->output_section)
+      && ! bfd_is_und_section (sym_sec->output_section))
+    {
+      dynindx = elf_section_data (sym_sec->output_section)->dynindx;
+      outrel.r_addend -= sym_sec->output_section->vma;
+    }
+  else
+    {
+      dynindx = 0;
+    }
+  outrel.r_info = ELF32_R_INFO (dynindx, R_C6000_ABS32);
+  elf32_tic6x_install_rela (output_bfd, htab->elf.srelgot, &outrel);
+}
+
+/* Finish up dynamic symbol handling.  We set the contents of various
+   dynamic sections here.  */
+
+static bfd_boolean
+elf32_tic6x_finish_dynamic_symbol (bfd * output_bfd,
+				   struct bfd_link_info *info,
+				   struct elf_link_hash_entry *h,
+				   Elf_Internal_Sym * sym)
+{
+  bfd *dynobj;
+  struct elf32_tic6x_link_hash_table *htab;
+
+  htab = elf32_tic6x_hash_table (info);
+  dynobj = htab->elf.dynobj;
+
+  if (h->plt.offset != (bfd_vma) -1)
+    {
+      bfd_vma plt_index;
+      bfd_vma got_section_offset, got_dp_offset, rela_offset;
+      Elf_Internal_Rela rela;
+      bfd_byte *loc;
+      asection *plt, *gotplt, *relplt;
+      const struct elf_backend_data *bed;
+
+      bed = get_elf_backend_data (output_bfd);
+
+      BFD_ASSERT (htab->elf.splt != NULL);
+      plt = htab->elf.splt;
+      gotplt = htab->elf.sgotplt;
+      relplt = htab->elf.srelplt;
+
+      /* This symbol has an entry in the procedure linkage table.  Set
+	 it up.  */
+
+      if ((h->dynindx == -1
+	   && !((h->forced_local || info->executable)
+		&& h->def_regular
+		&& h->type == STT_GNU_IFUNC))
+	  || plt == NULL
+	  || gotplt == NULL
+	  || relplt == NULL)
+	abort ();
+
+      /* Get the index in the procedure linkage table which
+	 corresponds to this symbol.  This is the index of this symbol
+	 in all the symbols for which we are making plt entries.  The
+	 first entry in the procedure linkage table is reserved.
+
+	 Get the offset into the .got table of the entry that
+	 corresponds to this function.  Each .got entry is 4 bytes.
+	 The first three are reserved.
+	 
+	 For static executables, we don't reserve anything.  */
+
+      plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
+      got_section_offset = plt_index + bed->got_header_size / 4;
+      got_dp_offset = got_section_offset + htab->params.dsbt_size;
+      rela_offset = plt_index * sizeof (Elf32_External_Rela);
+
+      got_section_offset *= 4;
+
+      /* Fill in the entry in the procedure linkage table.  */
+
+      /* ldw .d2t2 *+B14($GOT(f)), b2 */
+      bfd_put_32 (output_bfd, got_dp_offset << 8 | 0x0100006e,
+		  plt->contents + h->plt.offset);
+      /* mvk .s2 low(rela_offset), b0 */
+      bfd_put_32 (output_bfd, (rela_offset & 0xffff) << 7 | 0x0000002a,
+		  plt->contents + h->plt.offset + 4);
+      /* mvkh .s2 high(rela_offset), b0 */
+      bfd_put_32 (output_bfd, ((rela_offset >> 16) & 0xffff) << 7 | 0x0000006a,
+		  plt->contents + h->plt.offset + 8);
+      /* nop 2 */
+      bfd_put_32 (output_bfd, 0x00002000,
+		  plt->contents + h->plt.offset + 12);
+      /* b .s2 b2 */
+      bfd_put_32 (output_bfd, 0x00080362,
+		  plt->contents + h->plt.offset + 16);
+      /* nop 5 */
+      bfd_put_32 (output_bfd, 0x00008000,
+		  plt->contents + h->plt.offset + 20);
+
+      /* Fill in the entry in the global offset table.  */
+      bfd_put_32 (output_bfd,
+		  (plt->output_section->vma + plt->output_offset),
+		  gotplt->contents + got_section_offset);
+
+      /* Fill in the entry in the .rel.plt section.  */
+      rela.r_offset = (gotplt->output_section->vma
+		       + gotplt->output_offset
+		       + got_section_offset);
+      rela.r_info = ELF32_R_INFO (h->dynindx, R_C6000_JUMP_SLOT);
+      rela.r_addend = 0;
+      loc = relplt->contents + rela_offset;
+      bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+
+      if (!h->def_regular)
+	{
+	  /* Mark the symbol as undefined, rather than as defined in
+	     the .plt section.  */
+	  sym->st_shndx = SHN_UNDEF;
+	  sym->st_value = 0;
+	}
+    }
+
+  if (h->got.offset != (bfd_vma) -1)
+    {
+      asection *sgot;
+      asection *srela;
+
+      /* This symbol has an entry in the global offset table.
+         Set it up.  */
+
+      sgot = bfd_get_section_by_name (dynobj, ".got");
+      srela = bfd_get_section_by_name (dynobj, ".rela.got");
+      BFD_ASSERT (sgot != NULL && srela != NULL);
+
+      /* If this is a -Bsymbolic link, and the symbol is defined
+         locally, we just want to emit a RELATIVE reloc.  Likewise if
+         the symbol was forced to be local because of a version file.
+         The entry in the global offset table will already have been
+         initialized in the relocate_section function.  */
+      if (info->shared
+	  && (info->symbolic
+	      || h->dynindx == -1 || h->forced_local) && h->def_regular)
+	{
+	  asection *s = h->root.u.def.section;
+	  elf32_tic6x_make_got_dynreloc (output_bfd, htab, s,
+			     h->got.offset & ~(bfd_vma) 1);
+	}
+      else
+	{
+	  Elf_Internal_Rela outrel;
+	  bfd_put_32 (output_bfd, (bfd_vma) 0,
+		      sgot->contents + (h->got.offset & ~(bfd_vma) 1));
+	  outrel.r_offset = (sgot->output_section->vma
+			   + sgot->output_offset
+			   + (h->got.offset & ~(bfd_vma) 1));
+	  outrel.r_info = ELF32_R_INFO (h->dynindx, R_C6000_ABS32);
+	  outrel.r_addend = 0;
+
+	  elf32_tic6x_install_rela (output_bfd, srela, &outrel);
+	}
+    }
+
+  if (h->needs_copy)
+    {
+      Elf_Internal_Rela rel;
+
+      /* This symbol needs a copy reloc.  Set it up.  */
+
+      if (h->dynindx == -1
+	  || (h->root.type != bfd_link_hash_defined
+	      && h->root.type != bfd_link_hash_defweak)
+	  || htab->srelbss == NULL)
+	abort ();
+
+      rel.r_offset = (h->root.u.def.value
+		      + h->root.u.def.section->output_section->vma
+		      + h->root.u.def.section->output_offset);
+      rel.r_info = ELF32_R_INFO (h->dynindx, R_C6000_COPY);
+      rel.r_addend = 0;
+
+      elf32_tic6x_install_rela (output_bfd, htab->srelbss, &rel);
+    }
+
+  /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
+  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+      || h == elf_hash_table (info)->hgot)
+    sym->st_shndx = SHN_ABS;
+
+  return TRUE;
+}
+
+/* Unwinding tables are not referenced directly.  This pass marks them as
+   required if the corresponding code section is marked.  */
+
+static bfd_boolean
+elf32_tic6x_gc_mark_extra_sections (struct bfd_link_info *info,
+				    elf_gc_mark_hook_fn gc_mark_hook)
+{
+  bfd *sub;
+  Elf_Internal_Shdr **elf_shdrp;
+  bfd_boolean again;
+
+  _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook);
+
+  /* Marking EH data may cause additional code sections to be marked,
+     requiring multiple passes.  */
+  again = TRUE;
+  while (again)
+    {
+      again = FALSE;
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+	{
+	  asection *o;
+
+	  if (! is_tic6x_elf (sub))
+	    continue;
+
+	  elf_shdrp = elf_elfsections (sub);
+	  for (o = sub->sections; o != NULL; o = o->next)
+	    {
+	      Elf_Internal_Shdr *hdr;
+
+	      hdr = &elf_section_data (o)->this_hdr;
+	      if (hdr->sh_type == SHT_C6000_UNWIND
+		  && hdr->sh_link
+		  && hdr->sh_link < elf_numsections (sub)
+		  && !o->gc_mark
+		  && elf_shdrp[hdr->sh_link]->bfd_section->gc_mark)
+		{
+		  again = TRUE;
+		  if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
+		    return FALSE;
+		}
+	    }
+	}
+    }
+
+  return TRUE;
+}
+
+/* Return TRUE if this is an unwinding table index.  */
+
+static bfd_boolean
+is_tic6x_elf_unwind_section_name (const char *name)
+{
+  return (CONST_STRNEQ (name, ELF_STRING_C6000_unwind)
+	  || CONST_STRNEQ (name, ELF_STRING_C6000_unwind_once));
+}
+
+
+/* Set the type and flags for an unwinding index table.  We do this by
+   the section name, which is a hack, but ought to work.  */
+
+static bfd_boolean
+elf32_tic6x_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
+			   Elf_Internal_Shdr *hdr, asection *sec)
+{
+  const char * name;
+
+  name = bfd_get_section_name (abfd, sec);
+
+  if (is_tic6x_elf_unwind_section_name (name))
+    {
+      hdr->sh_type = SHT_C6000_UNWIND;
+      hdr->sh_flags |= SHF_LINK_ORDER;
+    }
+
+  return TRUE;
+}
+
+/* Update the got entry reference counts for the section being removed.  */
+
+static bfd_boolean
+elf32_tic6x_gc_sweep_hook (bfd *abfd,
+			   struct bfd_link_info *info,
+			   asection *sec,
+			   const Elf_Internal_Rela *relocs)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  bfd_signed_vma *local_got_refcounts;
+  const Elf_Internal_Rela *rel, *relend;
+
+  if (info->relocatable)
+    return TRUE;
+
+  htab = elf32_tic6x_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
+  elf_section_data (sec)->local_dynrel = NULL;
+
+  symtab_hdr = &elf_symtab_hdr (abfd);
+  sym_hashes = elf_sym_hashes (abfd);
+  local_got_refcounts = elf_local_got_refcounts (abfd);
+
+  relend = relocs + sec->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      unsigned long r_symndx;
+      unsigned int r_type;
+      struct elf_link_hash_entry *h = NULL;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      if (r_symndx >= symtab_hdr->sh_info)
+	{
+	  struct elf32_tic6x_link_hash_entry *eh;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
+
+	  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;
+	  eh = (struct elf32_tic6x_link_hash_entry *) h;
+
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+	    if (p->sec == sec)
+	      {
+		/* Everything must go for SEC.  */
+		*pp = p->next;
+		break;
+	      }
+	}
+
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      switch (r_type)
+	{
+	case R_C6000_SBR_GOT_U15_W:
+	case R_C6000_SBR_GOT_L16_W:
+	case R_C6000_SBR_GOT_H16_W:
+	case R_C6000_EHTYPE:
+	  if (h != NULL)
+	    {
+	      if (h->got.refcount > 0)
+		h->got.refcount -= 1;
+	    }
+	  else if (local_got_refcounts != NULL)
+	    {
+	      if (local_got_refcounts[r_symndx] > 0)
+		local_got_refcounts[r_symndx] -= 1;
+	    }
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+   regular object.  The current definition is in some section of the
+   dynamic object, but we're not including those sections.  We have to
+   change the definition to something the rest of the link can
+   understand.  */
+
+static bfd_boolean
+elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info,
+				   struct elf_link_hash_entry *h)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  bfd *dynobj;
+  asection *s;
+
+  dynobj = elf_hash_table (info)->dynobj;
+
+  /* Make sure we know what is going on here.  */
+  BFD_ASSERT (dynobj != NULL
+	      && (h->needs_plt
+		  || h->u.weakdef != NULL
+		  || (h->def_dynamic && h->ref_regular && !h->def_regular)));
+
+  /* If this is a function, put it in the procedure linkage table.  We
+     will fill in the contents of the procedure linkage table later,
+     when we know the address of the .got section.  */
+  if (h->type == STT_FUNC
+      || h->needs_plt)
+    {
+      if (h->plt.refcount <= 0
+	  || SYMBOL_CALLS_LOCAL (info, h)
+	  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+	      && h->root.type == bfd_link_hash_undefweak))
+	{
+	  /* 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, or if all references were garbage collected.  In
+	     such a case, we don't actually need to build a procedure
+	     linkage table, and we can just do a PC32 reloc instead.  */
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+
+      return TRUE;
+    }
+
+  /* If this is a weak symbol, and there is a real definition, the
+     processor independent code will have arranged for us to see the
+     real definition first, and we can just use the same value.  */
+  if (h->u.weakdef != NULL)
+    {
+      BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
+		  || h->u.weakdef->root.type == bfd_link_hash_defweak);
+      h->root.u.def.section = h->u.weakdef->root.u.def.section;
+      h->root.u.def.value = h->u.weakdef->root.u.def.value;
+      h->non_got_ref = h->u.weakdef->non_got_ref;
+      return TRUE;
+    }
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
+  /* If we are creating a shared library, we must presume that the
+     only references to the symbol are via the global offset table.
+     For such cases we need not do anything here; the relocations will
+     be handled correctly by relocate_section.  */
+  if (info->shared)
+    return TRUE;
+
+  /* If there are no references to this symbol that do not use the
+     GOT, we don't need to generate a copy reloc.  */
+  if (!h->non_got_ref)
+    return TRUE;
+
+  /* If -z nocopyreloc was given, we won't generate them either.  */
+  if (info->nocopyreloc)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  htab = elf32_tic6x_hash_table (info);
+  if (htab == NULL)
+    return FALSE;
+
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+			     h->root.root.string);
+      return TRUE;
+    }
+
+  /* We must allocate the symbol in our .dynbss section, which will
+     become part of the .bss section of the executable.  There will be
+     an entry for this symbol in the .dynsym section.  The dynamic
+     object will contain position independent code, so all references
+     from the dynamic object to this symbol will go through the global
+     offset table.  The dynamic linker will use the .dynsym entry to
+     determine the address it must put in the global offset table, so
+     both the dynamic object and the regular object will refer to the
+     same memory location for the variable.  */
+
+  /* We must generate a R_C6000_COPY reloc to tell the dynamic linker to
+     copy the initial value out of the dynamic object and into the
+     runtime process image.  */
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+    {
+      htab->srelbss->size += sizeof (Elf32_External_Rela);
+      h->needs_copy = 1;
+    }
+
+  s = htab->sdynbss;
+
+  return _bfd_elf_adjust_dynamic_copy (h, s);
+}
+
 static bfd_boolean
 elf32_tic6x_new_section_hook (bfd *abfd, asection *sec)
 {
   bfd_boolean ret;
 
+  /* Allocate target specific section data.  */
+  if (!sec->used_by_bfd)
+    {
+      _tic6x_elf_section_data *sdata;
+      bfd_size_type amt = sizeof (*sdata);
+
+      sdata = (_tic6x_elf_section_data *) bfd_zalloc (abfd, amt);
+      if (sdata == NULL)
+	return FALSE;
+      sec->used_by_bfd = sdata;
+    }
+
   ret = _bfd_elf_new_section_hook (abfd, sec);
   sec->use_rela_p = elf32_tic6x_tdata (abfd)->use_rela_p;
 
@@ -1394,6 +2233,29 @@
 	  < NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel);
 }
 
+/* We need dynamic symbols for every section, since segments can
+   relocate independently.  */
+static bfd_boolean
+elf32_tic6x_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
+				      struct bfd_link_info *info ATTRIBUTE_UNUSED,
+				      asection *p)
+{
+  switch (elf_section_data (p)->this_hdr.sh_type)
+    {
+    case SHT_PROGBITS:
+    case SHT_NOBITS:
+      /* If sh_type is yet undecided, assume it could be
+	 SHT_PROGBITS/SHT_NOBITS.  */
+    case SHT_NULL:
+      return FALSE;
+
+      /* There shouldn't be section relative relocations
+	 against any other section.  */
+    default:
+      return TRUE;
+    }
+}
+
 static bfd_boolean
 elf32_tic6x_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
@@ -1404,14 +2266,18 @@
 			      Elf_Internal_Sym *local_syms,
 			      asection **local_sections)
 {
+  struct elf32_tic6x_link_hash_table *htab;
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
+  bfd_vma *local_got_offsets;
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
   bfd_boolean ok = TRUE;
 
+  htab = elf32_tic6x_hash_table (info);
   symtab_hdr = & elf_symtab_hdr (input_bfd);
   sym_hashes = elf_sym_hashes (input_bfd);
+  local_got_offsets = elf_local_got_offsets (input_bfd);
 
   relend = relocs + input_section->reloc_count;
 
@@ -1424,7 +2290,7 @@
       Elf_Internal_Sym *sym;
       asection *sec;
       struct elf_link_hash_entry *h;
-      bfd_vma relocation;
+      bfd_vma off, off2, relocation;
       bfd_boolean unresolved_reloc;
       bfd_reloc_status_type r;
       struct bfd_link_hash_entry *sbh;
@@ -1497,22 +2363,150 @@
 	  continue;
 
 	case R_C6000_PCR_S21:
+	  /* A branch to an undefined weak symbol is turned into a
+	     "b .s2 B3" instruction if the existing insn is of the
+	     form "b .s2 symbol".  */
+	  if (h ? h->root.type == bfd_link_hash_undefweak
+	      && (htab->elf.splt == NULL || h->plt.offset == (bfd_vma) -1)
+	      : r_symndx != STN_UNDEF && bfd_is_und_section (sec))
+	    {
+	      unsigned long oldval;
+	      oldval = bfd_get_32 (input_bfd, contents + rel->r_offset);
+
+	      if ((oldval & 0x7e) == 0x12)
+		{
+		  oldval &= 0xF0000001;
+		  bfd_put_32 (input_bfd, oldval | 0x000c0362,
+			      contents + rel->r_offset);
+		  r = bfd_reloc_ok;
+		  goto done_reloc;
+		}
+	    }
+
 	case R_C6000_PCR_S12:
 	case R_C6000_PCR_S10:
 	case R_C6000_PCR_S7:
+	  if (h != NULL
+	      && h->plt.offset != (bfd_vma) -1
+	      && htab->elf.splt != NULL)
+	    {
+	      relocation = (htab->elf.splt->output_section->vma
+			    + htab->elf.splt->output_offset
+			    + h->plt.offset);
+	    }
+
 	  /* Generic PC-relative handling produces a value relative to
 	     the exact location of the relocation.  Adjust it to be
 	     relative to the start of the fetch packet instead.  */
 	  relocation += (input_section->output_section->vma
 			 + input_section->output_offset
 			 + rel->r_offset) & 0x1f;
-	  /* Fall through.  */
+	  unresolved_reloc = FALSE;
+	  break;
+
+	case R_C6000_PCR_H16:
+	case R_C6000_PCR_L16:
+	  off = (input_section->output_section->vma
+		 + input_section->output_offset
+		 + rel->r_offset);
+	  /* These must be calculated as R = S - FP(FP(PC) - A).
+	     PC, here, is the value we just computed in OFF.  RELOCATION
+	     has the address of S + A. */
+	  relocation -= rel->r_addend;
+	  off2 = ((off & ~(bfd_vma)0x1f) - rel->r_addend) & (bfd_vma)~0x1f;
+	  off2 = relocation - off2;
+	  relocation = off + off2;
+	  break;
+
+	case R_C6000_DSBT_INDEX:
+	  relocation = elf32_tic6x_hash_table (info)->params.dsbt_index;
+	  if (!info->shared || relocation != 0)
+	    break;
+
+	  /* fall through */
 	case R_C6000_ABS32:
 	case R_C6000_ABS16:
 	case R_C6000_ABS8:
 	case R_C6000_ABS_S16:
 	case R_C6000_ABS_L16:
 	case R_C6000_ABS_H16:
+	  /* When generating a shared object or relocatable executable, these
+	     relocations are copied into the output file to be resolved at
+	     run time.  */
+	  if ((info->shared || elf32_tic6x_using_dsbt (output_bfd))
+	      && (input_section->flags & SEC_ALLOC)
+	      && (h == NULL
+		  || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		  || h->root.type != bfd_link_hash_undefweak))
+	    {
+	      Elf_Internal_Rela outrel;
+	      bfd_boolean skip, relocate;
+	      asection *sreloc;
+
+	      unresolved_reloc = FALSE;
+
+	      sreloc = elf_section_data (input_section)->sreloc;
+	      BFD_ASSERT (sreloc != NULL && sreloc->contents != NULL);
+
+	      skip = FALSE;
+	      relocate = FALSE;
+
+	      outrel.r_offset =
+		_bfd_elf_section_offset (output_bfd, info, input_section,
+					 rel->r_offset);
+	      if (outrel.r_offset == (bfd_vma) -1)
+		skip = TRUE;
+	      else if (outrel.r_offset == (bfd_vma) -2)
+		skip = TRUE, relocate = TRUE;
+	      outrel.r_offset += (input_section->output_section->vma
+				  + input_section->output_offset);
+
+	      if (skip)
+		memset (&outrel, 0, sizeof outrel);
+	      else if (h != NULL
+		       && h->dynindx != -1
+		       && (!info->shared
+			   || !info->symbolic
+			   || !h->def_regular))
+		{
+		  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+		  outrel.r_addend = rel->r_addend;
+		}
+	      else
+		{
+		  long indx;
+
+		  outrel.r_addend = relocation + rel->r_addend;
+
+		  if (bfd_is_abs_section (sec))
+		    indx = 0;
+		  else if (sec == NULL || sec->owner == NULL)
+		    {
+		      bfd_set_error (bfd_error_bad_value);
+		      return FALSE;
+		    }
+		  else
+		    {
+		      asection *osec;
+
+		      osec = sec->output_section;
+		      indx = elf_section_data (osec)->dynindx;
+		      outrel.r_addend -= osec->vma;
+		      BFD_ASSERT (indx != 0);
+		    }
+
+		  outrel.r_info = ELF32_R_INFO (indx, r_type);
+		}
+
+	      elf32_tic6x_install_rela (output_bfd, sreloc, &outrel);
+
+	      /* If this reloc is against an external symbol, we do not want to
+		 fiddle with the addend.  Otherwise, we need to include the symbol
+		 value so that it becomes an addend for the dynamic reloc.  */
+	      if (! relocate)
+		continue;
+	    }
+
 	  /* Generic logic OK.  */
 	  break;
 
@@ -1531,9 +2525,17 @@
 	  if (sbh != NULL
 	      && (sbh->type == bfd_link_hash_defined
 		  || sbh->type == bfd_link_hash_defweak))
-	    relocation -= (sbh->u.def.value
-			   + sbh->u.def.section->output_section->vma
-			   + sbh->u.def.section->output_offset);
+	    {
+	      if (h ? (h->root.type == bfd_link_hash_undefweak
+		       && (htab->elf.splt == NULL
+			   || h->plt.offset == (bfd_vma) -1))
+		  : r_symndx != STN_UNDEF && bfd_is_und_section (sec))
+		relocation = 0;
+	      else
+		relocation -= (sbh->u.def.value
+			       + sbh->u.def.section->output_section->vma
+			       + sbh->u.def.section->output_offset);
+	    }
 	  else
 	    {
 	      (*_bfd_error_handler) (_("%B: SB-relative relocation but "
@@ -1547,14 +2549,133 @@
 	case R_C6000_SBR_GOT_U15_W:
 	case R_C6000_SBR_GOT_L16_W:
 	case R_C6000_SBR_GOT_H16_W:
-	case R_C6000_DSBT_INDEX:
+	case R_C6000_EHTYPE:
+	  /* Relocation is to the entry for this symbol in the global
+	     offset table.  */
+	  if (htab->elf.sgot == NULL)
+	    abort ();
+
+	  if (h != NULL)
+	    {
+	      bfd_boolean dyn;
+
+	      off = h->got.offset;
+	      dyn = htab->elf.dynamic_sections_created;
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+		  || (info->shared
+		      && SYMBOL_REFERENCES_LOCAL (info, h))
+		  || (ELF_ST_VISIBILITY (h->other)
+		      && h->root.type == bfd_link_hash_undefweak))
+		{
+		  /* This is actually a static link, or it is a
+		     -Bsymbolic link and the symbol is defined
+		     locally, or the symbol was forced to be local
+		     because of a version file.  We must initialize
+		     this entry in the global offset table.  Since the
+		     offset must always be a multiple of 4, we use the
+		     least significant bit to record whether we have
+		     initialized it already.
+
+		     When doing a dynamic link, we create a .rel.got
+		     relocation entry to initialize the value.  This
+		     is done in the finish_dynamic_symbol routine.  */
+		  if ((off & 1) != 0)
+		    off &= ~1;
+		  else
+		    {
+		      bfd_put_32 (output_bfd, relocation,
+				  htab->elf.sgot->contents + off);
+		      h->got.offset |= 1;
+
+		      if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+							    h)
+			  && !(ELF_ST_VISIBILITY (h->other)
+			       && h->root.type == bfd_link_hash_undefweak))
+			elf32_tic6x_make_got_dynreloc (output_bfd, htab, sec,
+						       off);
+		    }
+		}
+	      else
+		unresolved_reloc = FALSE;
+	    }
+	  else
+	    {
+	      if (local_got_offsets == NULL)
+		abort ();
+
+	      off = local_got_offsets[r_symndx];
+
+	      /* The offset must always be a multiple of 4.  We use
+		 the least significant bit to record whether we have
+		 already generated the necessary reloc.  */
+	      if ((off & 1) != 0)
+		off &= ~1;
+	      else
+		{
+		  bfd_put_32 (output_bfd, relocation,
+			      htab->elf.sgot->contents + off);
+
+		  if (info->shared || elf32_tic6x_using_dsbt (output_bfd))
+		    elf32_tic6x_make_got_dynreloc (output_bfd, htab, sec, off);
+
+		  local_got_offsets[r_symndx] |= 1;
+		}
+	    }
+
+	  if (off >= (bfd_vma) -2)
+	    abort ();
+
+	  if (htab->dsbt)
+	    relocation = (htab->elf.sgot->output_section->vma
+			  + htab->elf.sgot->output_offset + off
+			  - htab->dsbt->output_section->vma
+			  - htab->dsbt->output_offset);
+	  else
+	    relocation = (htab->elf.sgot->output_section->vma
+			  + htab->elf.sgot->output_offset + off
+			  - htab->elf.sgotplt->output_section->vma
+			  - htab->elf.sgotplt->output_offset);
+
+	  if (rel->r_addend != 0)
+	    {
+	      /* We can't do anything for a relocation which is against
+		 a symbol *plus offset*.  GOT holds relocations for
+		 symbols.  Make this an error; the compiler isn't
+		 allowed to pass us these kinds of things.  */
+	      if (h == NULL)
+		(*_bfd_error_handler)
+		  (_("%B, section %A: relocation %s with non-zero addend %d"
+		     " against local symbol"),
+		   input_bfd,
+		   input_section,
+		   elf32_tic6x_howto_table[r_type].name,
+		   rel->r_addend);
+	      else
+		(*_bfd_error_handler)
+		  (_("%B, section %A: relocation %s with non-zero addend %d"
+		     " against symbol `%s'"),
+		   input_bfd,
+		   input_section,
+		   elf32_tic6x_howto_table[r_type].name,
+		   rel->r_addend,
+		   h->root.root.string[0] != '\0' ? h->root.root.string
+		   : _("[whose name is lost]"));
+
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
+	  break;
+
 	case R_C6000_PREL31:
-	  /* Shared libraries and exception handling support not
-	     implemented.  */
-	  (*_bfd_error_handler) (_("%B: relocation type %d not implemented"),
-				 input_bfd, r_type);
-	  ok = FALSE;
-	  continue;
+	  if (h != NULL
+	      && h->plt.offset != (bfd_vma) -1
+	      && htab->elf.splt != NULL)
+	    {
+	      relocation = (htab->elf.splt->output_section->vma
+			    + htab->elf.splt->output_offset
+			    + h->plt.offset);
+	    }
+	  break;
 
 	case R_C6000_COPY:
 	  /* Invalid in relocatable object.  */
@@ -1658,6 +2779,930 @@
   return ok;
 }
 
+
+/* Look through the relocs for a section during the first phase, and
+   calculate needed space in the global offset table, procedure linkage
+   table, and dynamic reloc sections.  */
+
+static bfd_boolean
+elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
+			  asection *sec, const Elf_Internal_Rela *relocs)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  const Elf_Internal_Rela *rel;
+  const Elf_Internal_Rela *rel_end;
+  asection *sreloc;
+
+  if (info->relocatable)
+    return TRUE;
+
+  htab = elf32_tic6x_hash_table (info);
+  symtab_hdr = &elf_symtab_hdr (abfd);
+  sym_hashes = elf_sym_hashes (abfd);
+
+  /* Create dynamic sections for relocatable executables so that we can
+     copy relocations.  */
+  if ((info->shared || elf32_tic6x_using_dsbt (abfd))
+      && ! htab->elf.dynamic_sections_created)
+    {
+      if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
+	return FALSE;
+    }
+
+  sreloc = NULL;
+
+  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;
+      Elf_Internal_Sym *isym;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+	{
+	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+				 abfd,
+				 r_symndx);
+	  return FALSE;
+	}
+
+      if (r_symndx < symtab_hdr->sh_info)
+	{
+	  /* A local symbol.  */
+	  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
+					abfd, r_symndx);
+	  if (isym == NULL)
+	    return FALSE;
+	  h = NULL;
+	}
+      else
+	{
+	  isym = NULL;
+	  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;
+	}
+
+      switch (r_type)
+	{
+	case R_C6000_PCR_S21:
+	case R_C6000_PREL31:
+	  /* 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 which is
+	     never referenced by a dynamic object, in which case we
+	     don't need to generate a procedure linkage table entry
+	     after all.  */
+
+	  /* If this is a local symbol, we resolve it directly without
+	     creating a procedure linkage table entry.  */
+	  if (h == NULL)
+	    continue;
+
+	  h->needs_plt = 1;
+	  h->plt.refcount += 1;
+	  break;
+
+	case R_C6000_SBR_GOT_U15_W:
+	case R_C6000_SBR_GOT_L16_W:
+	case R_C6000_SBR_GOT_H16_W:
+	case R_C6000_EHTYPE:
+	  /* 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;
+
+		  size = symtab_hdr->sh_info;
+		  size *= (sizeof (bfd_signed_vma)
+			   + sizeof (bfd_vma) + sizeof(char));
+		  local_got_refcounts = 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;
+	    }
+
+	  if (htab->elf.sgot == NULL)
+	    {
+	      if (htab->elf.dynobj == NULL)
+		htab->elf.dynobj = abfd;
+	      if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
+		return FALSE;
+	    }
+	  break;
+
+	case R_C6000_DSBT_INDEX:
+	  /* We'd like to check for nonzero dsbt_index here, but it's
+	     set up only after check_relocs is called.  Instead, we
+	     store the number of R_C6000_DSBT_INDEX relocs in the
+	     pc_count field, and potentially discard the extra space
+	     in elf32_tic6x_allocate_dynrelocs.  */
+	  if (!info->shared)
+	    break;
+
+	  /* fall through */
+	case R_C6000_ABS32:
+	case R_C6000_ABS16:
+	case R_C6000_ABS8:
+	case R_C6000_ABS_S16:
+	case R_C6000_ABS_L16:
+	case R_C6000_ABS_H16:
+	  /* If we are creating a shared library, and this is a reloc
+	     against a global symbol, or a non PC relative reloc
+	     against a local symbol, then we need to copy the reloc
+	     into the shared library.  However, if we are linking with
+	     -Bsymbolic, we do not need to copy a reloc against a
+	     global symbol which is defined in an object we are
+	     including in the link (i.e., DEF_REGULAR is set).  At
+	     this point we have not seen all the input files, so it is
+	     possible that DEF_REGULAR is not set now but will be set
+	     later (it is never cleared).  In case of a weak definition,
+	     DEF_REGULAR may be cleared later by a strong definition in
+	     a shared library.  We account for that possibility below by
+	     storing information in the relocs_copied field of the hash
+	     table entry.  A similar situation occurs when creating
+	     shared libraries and symbol visibility changes render the
+	     symbol local.
+
+	     If on the other hand, we are creating an executable, we
+	     may need to keep relocations for symbols satisfied by a
+	     dynamic library if we manage to avoid copy relocs for the
+	     symbol.  */
+	  if ((info->shared || elf32_tic6x_using_dsbt (abfd))
+	      && (sec->flags & SEC_ALLOC) != 0)
+	    {
+	      struct elf_dyn_relocs *p;
+	      struct elf_dyn_relocs **head;
+
+	      /* We must copy these reloc types into the output file.
+		 Create a reloc section in dynobj and make room for
+		 this reloc.  */
+	      if (sreloc == NULL)
+		{
+		  if (htab->elf.dynobj == NULL)
+		    htab->elf.dynobj = abfd;
+
+		  sreloc = _bfd_elf_make_dynamic_reloc_section
+		    (sec, htab->elf.dynobj, 2, abfd, /*rela? */ TRUE);
+
+		  if (sreloc == NULL)
+		    return FALSE;
+		}
+
+	      /* If this is a global symbol, we count the number of
+		 relocations we need for this symbol.  */
+	      if (h != NULL)
+		{
+		  head = &((struct elf32_tic6x_link_hash_entry *) h)->dyn_relocs;
+		}
+	      else
+		{
+		  /* Track dynamic relocs needed for local syms too.
+		     We really need local syms available to do this
+		     easily.  Oh well.  */
+		  void **vpp;
+		  asection *s;
+
+		  s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+		  if (s == NULL)
+		    s = sec;
+
+		  vpp = &elf_section_data (s)->local_dynrel;
+		  head = (struct elf_dyn_relocs **)vpp;
+		}
+
+	      p = *head;
+	      if (p == NULL || p->sec != sec)
+		{
+		  bfd_size_type amt = sizeof *p;
+		  p = bfd_alloc (htab->elf.dynobj, amt);
+		  if (p == NULL)
+		    return FALSE;
+		  p->next = *head;
+		  *head = p;
+		  p->sec = sec;
+		  p->count = 0;
+		  p->pc_count = 0;
+		}
+
+	      p->count += 1;
+	      if (r_type == R_C6000_DSBT_INDEX)
+		p->pc_count += 1;
+	    }
+	  break;
+
+	case R_C6000_SBR_U15_B:
+	case R_C6000_SBR_U15_H:
+	case R_C6000_SBR_U15_W:
+	case R_C6000_SBR_S16:
+	case R_C6000_SBR_L16_B:
+	case R_C6000_SBR_L16_H:
+	case R_C6000_SBR_L16_W:
+	case R_C6000_SBR_H16_B:
+	case R_C6000_SBR_H16_H:
+	case R_C6000_SBR_H16_W:
+	  if (h != NULL && info->executable)
+	    {
+	      /* For B14-relative addresses, we might need a copy
+		 reloc.  */
+	      h->non_got_ref = 1;
+	    }
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+static bfd_boolean
+elf32_tic6x_add_symbol_hook (bfd *abfd,
+			     struct bfd_link_info *info ATTRIBUTE_UNUSED,
+			     Elf_Internal_Sym *sym,
+			     const char **namep ATTRIBUTE_UNUSED,
+			     flagword *flagsp ATTRIBUTE_UNUSED,
+			     asection **secp,
+			     bfd_vma *valp)
+{
+  switch (sym->st_shndx)
+    {
+    case SHN_TIC6X_SCOMMON:
+      *secp = bfd_make_section_old_way (abfd, ".scommon");
+      (*secp)->flags |= SEC_IS_COMMON;
+      *valp = sym->st_size;
+      bfd_set_section_alignment (abfd, *secp, bfd_log2 (sym->st_value));
+      break;
+    }
+
+  return TRUE;
+}
+
+static void
+elf32_tic6x_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym)
+{
+  elf_symbol_type *elfsym;
+
+  elfsym = (elf_symbol_type *) asym;
+  switch (elfsym->internal_elf_sym.st_shndx)
+    {
+    case SHN_TIC6X_SCOMMON:
+      if (tic6x_elf_scom_section.name == NULL)
+        {
+          /* Initialize the small common section.  */
+          tic6x_elf_scom_section.name = ".scommon";
+          tic6x_elf_scom_section.flags = SEC_IS_COMMON;
+          tic6x_elf_scom_section.output_section = &tic6x_elf_scom_section;
+          tic6x_elf_scom_section.symbol = &tic6x_elf_scom_symbol;
+          tic6x_elf_scom_section.symbol_ptr_ptr = &tic6x_elf_scom_symbol_ptr;
+          tic6x_elf_scom_symbol.name = ".scommon";
+          tic6x_elf_scom_symbol.flags = BSF_SECTION_SYM;
+          tic6x_elf_scom_symbol.section = &tic6x_elf_scom_section;
+          tic6x_elf_scom_symbol_ptr = &tic6x_elf_scom_symbol;
+        }
+      asym->section = &tic6x_elf_scom_section;
+      asym->value = elfsym->internal_elf_sym.st_size;
+      break;
+    }
+}
+
+static int
+elf32_tic6x_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+				     const char *name ATTRIBUTE_UNUSED,
+				     Elf_Internal_Sym *sym,
+				     asection *input_sec,
+				     struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
+{
+  /* If we see a common symbol, which implies a relocatable link, then
+     if a symbol was small common in an input file, mark it as small
+     common in the output file.  */
+  if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0)
+    sym->st_shndx = SHN_TIC6X_SCOMMON;
+
+  return 1;
+}
+
+static bfd_boolean
+elf32_tic6x_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
+				      asection *sec,
+				      int *retval)
+{
+  if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
+    {
+      *retval = SHN_TIC6X_SCOMMON;
+      return TRUE;
+    }
+
+  return FALSE;
+}
+
+/* Allocate space in .plt, .got and associated reloc sections for
+   dynamic relocs.  */
+
+static bfd_boolean
+elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct bfd_link_info *info;
+  struct elf32_tic6x_link_hash_table *htab;
+  struct elf32_tic6x_link_hash_entry *eh;
+  struct elf_dyn_relocs *p;
+
+  if (h->root.type == bfd_link_hash_indirect)
+    return TRUE;
+
+  eh = (struct elf32_tic6x_link_hash_entry *) h;
+  info = (struct bfd_link_info *) inf;
+  htab = elf32_tic6x_hash_table (info);
+
+  if (htab->elf.dynamic_sections_created && h->plt.refcount > 0)
+    {
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (h->dynindx == -1 && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      if (info->shared
+	  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
+	{
+	  asection *s = htab->elf.splt;
+
+	  /* If this is the first .plt entry, make room for the special
+	     first entry.  */
+	  if (s->size == 0)
+	    s->size += PLT_ENTRY_SIZE;
+
+	  h->plt.offset = s->size;
+
+	  /* If this symbol is not defined in a regular file, and we are
+	     not generating a shared library, then set the symbol to this
+	     location in the .plt.  This is required to make function
+	     pointers compare as equal between the normal executable and
+	     the shared library.  */
+	  if (! info->shared && !h->def_regular)
+	    {
+	      h->root.u.def.section = s;
+	      h->root.u.def.value = h->plt.offset;
+	    }
+
+	  /* Make room for this entry.  */
+	  s->size += PLT_ENTRY_SIZE;
+	  /* We also need to make an entry in the .got.plt section, which
+	     will be placed in the .got section by the linker script.  */
+	  htab->elf.sgotplt->size += 4;
+	  /* We also need to make an entry in the .rel.plt section.  */
+	  htab->elf.srelplt->size += sizeof (Elf32_External_Rela);
+	}
+      else
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+    }
+  else
+    {
+      h->plt.offset = (bfd_vma) -1;
+      h->needs_plt = 0;
+    }
+
+  if (h->got.refcount > 0)
+    {
+      asection *s;
+
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (h->dynindx == -1
+	  && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      s = htab->elf.sgot;
+      h->got.offset = s->size;
+      s->size += 4;
+
+      if (!(ELF_ST_VISIBILITY (h->other)
+	    && h->root.type == bfd_link_hash_undefweak))
+	htab->elf.srelgot->size += sizeof (Elf32_External_Rela);
+    }
+  else
+    h->got.offset = (bfd_vma) -1;
+
+  if (eh->dyn_relocs == NULL)
+    return TRUE;
+
+  /* Discard relocs on undefined weak syms with non-default
+     visibility.  */
+  if (info->shared || elf32_tic6x_using_dsbt (htab->obfd))
+    {
+      /* We use the pc_count field to hold the number of
+	 R_C6000_DSBT_INDEX relocs.  */
+      if (htab->params.dsbt_index != 0)
+	{
+	  struct elf_dyn_relocs **pp;
+
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      p->count -= p->pc_count;
+	      p->pc_count = 0;
+	      if (p->count == 0)
+		*pp = p->next;
+	      else
+		pp = &p->next;
+	    }
+	}
+
+      if (eh->dyn_relocs != NULL
+	  && h->root.type == bfd_link_hash_undefweak)
+	{
+	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+	    eh->dyn_relocs = NULL;
+
+	  /* Make sure undefined weak symbols are output as a dynamic
+	     symbol in PIEs.  */
+	  else if (h->dynindx == -1
+		   && !h->forced_local)
+	    {
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+	    }
+	}
+    }
+
+  /* Finally, allocate space.  */
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *sreloc;
+
+      sreloc = elf_section_data (p->sec)->sreloc;
+
+      BFD_ASSERT (sreloc != NULL);
+      sreloc->size += p->count * sizeof (Elf32_External_Rela);
+    }
+
+  return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections.  */
+
+static bfd_boolean
+elf32_tic6x_readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct elf32_tic6x_link_hash_entry *eh;
+  struct elf_dyn_relocs *p;
+
+  eh = (struct elf32_tic6x_link_hash_entry *) h;
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *s = p->sec->output_section;
+
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+	{
+	  struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+	  info->flags |= DF_TEXTREL;
+
+	  /* Not an error, just cut short the traversal.  */
+	  return FALSE;
+	}
+    }
+  return TRUE;
+}
+
+/* Set the sizes of the dynamic sections.  */
+
+static bfd_boolean
+elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  bfd *dynobj;
+  asection *s;
+  bfd_boolean relocs;
+  bfd *ibfd;
+
+  htab = elf32_tic6x_hash_table (info);
+  dynobj = htab->elf.dynobj;
+  if (dynobj == NULL)
+    abort ();
+
+  if (htab->elf.dynamic_sections_created)
+    {
+      /* Set the contents of the .interp section to the interpreter.  */
+      if (info->executable)
+	{
+	  s = bfd_get_section_by_name (dynobj, ".interp");
+	  if (s == NULL)
+	    abort ();
+	  s->size = sizeof ELF_DYNAMIC_INTERPRETER;
+	  s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+	}
+    }
+
+  /* Set up .got offsets for local syms, and space for local dynamic
+     relocs.  */
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    {
+      bfd_signed_vma *local_got;
+      bfd_signed_vma *end_local_got;
+      char *local_tls_type;
+      bfd_vma *local_tlsdesc_gotent;
+      bfd_size_type locsymcount;
+      Elf_Internal_Shdr *symtab_hdr;
+      asection *srel;
+
+      for (s = ibfd->sections; s != NULL; s = s->next)
+	{
+	  struct elf_dyn_relocs *p;
+
+	  for (p = ((struct elf_dyn_relocs *)
+		     elf_section_data (s)->local_dynrel);
+	       p != NULL;
+	       p = p->next)
+	    {
+	      if (!bfd_is_abs_section (p->sec)
+		  && bfd_is_abs_section (p->sec->output_section))
+		{
+		  /* Input section has been discarded, either because
+		     it is a copy of a linkonce section or due to
+		     linker script /DISCARD/, so we'll be discarding
+		     the relocs too.  */
+		}
+	      else if (p->count != 0)
+		{
+		  srel = elf_section_data (p->sec)->sreloc;
+		  srel->size += p->count * sizeof (Elf32_External_Rela);
+		  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
+		    info->flags |= DF_TEXTREL;
+		}
+	    }
+	}
+
+      local_got = elf_local_got_refcounts (ibfd);
+      if (!local_got)
+	continue;
+
+      symtab_hdr = &elf_symtab_hdr (ibfd);
+      locsymcount = symtab_hdr->sh_info;
+      end_local_got = local_got + locsymcount;
+      s = htab->elf.sgot;
+      srel = htab->elf.srelgot;
+      for (; local_got < end_local_got;
+	   ++local_got, ++local_tls_type, ++local_tlsdesc_gotent)
+	{
+	  if (*local_got > 0)
+	    {
+	      *local_got = s->size;
+	      s->size += 4;
+
+	      if (info->shared || elf32_tic6x_using_dsbt (output_bfd))
+		{
+		  srel->size += sizeof (Elf32_External_Rela);
+		}
+	    }
+	  else
+	    *local_got = (bfd_vma) -1;
+	}
+    }
+
+  /* Allocate global sym .plt and .got entries, and space for global
+     sym dynamic relocs.  */
+  elf_link_hash_traverse (&htab->elf, elf32_tic6x_allocate_dynrelocs, info);
+
+  /* We now have determined the sizes of the various dynamic sections.
+     Allocate memory for them.  */
+  relocs = FALSE;
+  for (s = dynobj->sections; s != NULL; s = s->next)
+    {
+      bfd_boolean strip_section = TRUE;
+
+      if ((s->flags & SEC_LINKER_CREATED) == 0)
+	continue;
+
+      if (s == htab->dsbt)
+	s->size = 4 * htab->params.dsbt_size;
+      else if (s == htab->elf.splt
+	       || s == htab->elf.sgot
+	       || s == htab->elf.sgotplt
+	       || s == htab->sdynbss)
+	{
+	  /* Strip this section if we don't need it; see the
+	     comment below.  */
+	  /* We'd like to strip these sections if they aren't needed, but if
+	     we've exported dynamic symbols from them we must leave them.
+	     It's too late to tell BFD to get rid of the symbols.  */
+
+	  if (htab->elf.hplt != NULL)
+	    strip_section = FALSE;
+
+	  /* Round up the size of the PLT section to a multiple of 32.  */
+	  if (s == htab->elf.splt && s->size > 0)
+	    s->size = (s->size + 31) & ~(bfd_vma)31;
+	}
+      else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+	{
+	  if (s->size != 0
+	      && s != htab->elf.srelplt)
+	    relocs = TRUE;
+
+	  /* We use the reloc_count field as a counter if we need
+	     to copy relocs into the output file.  */
+	  s->reloc_count = 0;
+	}
+      else
+	{
+	  /* It's not one of our sections, so don't allocate space.  */
+	  continue;
+	}
+
+      if (s->size == 0)
+	{
+	  /* If we don't need this section, strip it from the
+	     output file.  This is mostly to handle .rel.bss and
+	     .rel.plt.  We must create both sections in
+	     create_dynamic_sections, because they must be created
+	     before the linker maps input sections to output
+	     sections.  The linker does that before
+	     adjust_dynamic_symbol is called, and it is that
+	     function which decides whether anything needs to go
+	     into these sections.  */
+	  if (strip_section)
+	    s->flags |= SEC_EXCLUDE;
+	  continue;
+	}
+
+      if ((s->flags & SEC_HAS_CONTENTS) == 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_C6000_NONE reloc instead
+	 of garbage.  */
+      s->contents = bfd_zalloc (dynobj, s->size);
+      if (s->contents == NULL)
+	return FALSE;
+    }
+
+  if (htab->elf.dynamic_sections_created)
+    {
+      /* Add some entries to the .dynamic section.  We fill in the
+	 values later, in elf32_tic6x_finish_dynamic_sections, but we
+	 must add the entries now so that we get the correct size for
+	 the .dynamic section.  The DT_DEBUG entry is filled in by the
+	 dynamic linker and used by the debugger.  */
+#define add_dynamic_entry(TAG, VAL) \
+  _bfd_elf_add_dynamic_entry (info, TAG, VAL)
+
+      if (info->executable)
+	{
+	  if (!add_dynamic_entry (DT_DEBUG, 0))
+	    return FALSE;
+	}
+
+      if (!add_dynamic_entry (DT_C6000_DSBT_BASE, 0)
+	  || !add_dynamic_entry (DT_C6000_DSBT_SIZE, htab->params.dsbt_size)
+	  || !add_dynamic_entry (DT_C6000_DSBT_INDEX,
+				 htab->params.dsbt_index))
+	return FALSE;
+
+      if (htab->elf.splt->size != 0)
+	{
+	  if (!add_dynamic_entry (DT_PLTGOT, 0)
+	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
+	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+	      || !add_dynamic_entry (DT_JMPREL, 0))
+	    return FALSE;
+	}
+
+      if (relocs)
+	{
+	  if (!add_dynamic_entry (DT_RELA, 0)
+	      || !add_dynamic_entry (DT_RELASZ, 0)
+	      || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
+	    return FALSE;
+
+	  /* If any dynamic relocs apply to a read-only section,
+	     then we need a DT_TEXTREL entry.  */
+	  if ((info->flags & DF_TEXTREL) == 0)
+	    elf_link_hash_traverse (&htab->elf,
+				    elf32_tic6x_readonly_dynrelocs, info);
+
+	  if ((info->flags & DF_TEXTREL) != 0)
+	    {
+	      if (!add_dynamic_entry (DT_TEXTREL, 0))
+		return FALSE;
+	    }
+	}
+    }
+#undef add_dynamic_entry
+
+  return TRUE;
+}
+
+/* This function is called after all the input files have been read,
+   and the input sections have been assigned to output sections.  */
+
+static bfd_boolean
+elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+  if (elf32_tic6x_using_dsbt (output_bfd) && !info->relocatable)
+    {
+      struct elf_link_hash_entry *h;
+
+      /* Force a PT_GNU_STACK segment to be created.  */
+      if (! elf_tdata (output_bfd)->stack_flags)
+	elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
+
+      /* Define __stacksize if it's not defined yet.  */
+      h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
+				FALSE, FALSE, FALSE);
+      if (! h || h->root.type != bfd_link_hash_defined
+	  || h->type != STT_OBJECT
+	  || !h->def_regular)
+	{
+	  struct bfd_link_hash_entry *bh = NULL;
+
+	  if (!(_bfd_generic_link_add_one_symbol
+		(info, output_bfd, "__stacksize",
+		 BSF_GLOBAL, bfd_abs_section_ptr, DEFAULT_STACK_SIZE,
+		 (const char *) NULL, FALSE,
+		 get_elf_backend_data (output_bfd)->collect, &bh)))
+	    return FALSE;
+
+	  h = (struct elf_link_hash_entry *) bh;
+	  h->def_regular = 1;
+	  h->type = STT_OBJECT;
+	}
+    }
+  return TRUE;
+}
+
+static bfd_boolean
+elf32_tic6x_modify_program_headers (bfd *output_bfd,
+				    struct bfd_link_info *info)
+{
+  struct elf_obj_tdata *tdata = elf_tdata (output_bfd);
+  struct elf_segment_map *m;
+  Elf_Internal_Phdr *p;
+
+  /* objcopy and strip preserve what's already there using
+     elf32_tic6x_copy_private_bfd_data ().  */
+  if (! info)
+    return TRUE;
+
+  for (p = tdata->phdr, m = tdata->segment_map; m != NULL; m = m->next, p++)
+    if (m->p_type == PT_GNU_STACK)
+      break;
+
+  if (m)
+    {
+      struct elf_link_hash_entry *h;
+
+      /* Obtain the pointer to the __stacksize symbol.  */
+      h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
+				FALSE, FALSE, FALSE);
+      if (h)
+	{
+	  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;
+	  BFD_ASSERT (h->root.type == bfd_link_hash_defined);
+	}
+
+      /* Set the header p_memsz from the symbol value.  We
+	 intentionally ignore the symbol section.  */
+      if (h && h->root.type == bfd_link_hash_defined)
+	p->p_memsz = h->root.u.def.value;
+      else
+	p->p_memsz = DEFAULT_STACK_SIZE;
+
+      p->p_align = 8;
+    }
+
+  return TRUE;
+}
+
+static bfd_boolean
+elf32_tic6x_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+				     struct bfd_link_info *info)
+{
+  struct elf32_tic6x_link_hash_table *htab;
+  bfd *dynobj;
+  asection *sdyn;
+
+  htab = elf32_tic6x_hash_table (info);
+  dynobj = htab->elf.dynobj;
+  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      Elf32_External_Dyn * dyncon;
+      Elf32_External_Dyn * dynconend;
+
+      BFD_ASSERT (sdyn != NULL);
+
+      dyncon = (Elf32_External_Dyn *) sdyn->contents;
+      dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+
+      for (; dyncon < dynconend; dyncon++)
+	{
+	  Elf_Internal_Dyn dyn;
+	  asection *s;
+
+	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+	  switch (dyn.d_tag)
+	    {
+	    default:
+	      break;
+
+	    case DT_C6000_DSBT_BASE:
+	      s = htab->dsbt;
+	      dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset);
+	      break;
+
+	    case DT_PLTGOT:
+	      s = htab->elf.sgotplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	      break;
+
+	    case DT_JMPREL:
+	      s = htab->elf.srelplt;
+	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	      break;
+
+	    case DT_PLTRELSZ:
+	      s = htab->elf.srelplt;
+	      dyn.d_un.d_val = s->size;
+	      break;
+	    }
+	  bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+	}
+
+      /* Fill in the first entry in the procedure linkage table.  */
+      if (htab->elf.splt && htab->elf.splt->size > 0)
+	{
+	  bfd_vma got_offs = (htab->elf.sgotplt->output_section->vma
+			      + htab->elf.sgotplt->output_offset
+			      - htab->dsbt->output_section->vma
+			      - htab->dsbt->output_offset) / 4;
+
+	  /* ldw .D2T2 *+b14[$GOT(0)],b2 */
+	  bfd_put_32 (output_bfd, got_offs << 8 | 0x0100006e,
+		      htab->elf.splt->contents);
+	  /* ldw .D2T2 *+b14[$GOT(4)],b1 */
+	  bfd_put_32 (output_bfd, (got_offs + 1) << 8 | 0x0080006e,
+		      htab->elf.splt->contents + 4);
+	  /* nop 3 */
+	  bfd_put_32 (output_bfd, 0x00004000,
+		      htab->elf.splt->contents + 8);
+	  /* b .s2 b2 */
+	  bfd_put_32 (output_bfd, 0x00080362,
+		      htab->elf.splt->contents + 12);
+	  /* nop 5 */
+	  bfd_put_32 (output_bfd, 0x00008000,
+		      htab->elf.splt->contents + 16);
+
+	  elf_section_data (htab->elf.splt->output_section)
+	    ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+	}
+    }
+
+  return TRUE;
+}
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+   or (bfd_vma) -1 if it should not be included.  */
+
+static bfd_vma
+elf32_tic6x_plt_sym_val (bfd_vma i, const asection *plt,
+			 const arelent *rel ATTRIBUTE_UNUSED)
+{
+  return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
+
 static int
 elf32_tic6x_obj_attrs_arg_type (int tag)
 {
@@ -1679,6 +3724,26 @@
   return num;
 }
 
+static bfd_boolean
+elf32_tic6x_obj_attrs_handle_unknown (bfd *abfd, int tag)
+{
+  if ((tag & 127) < 64)
+    {
+      _bfd_error_handler
+	(_("%B: error: unknown mandatory EABI object attribute %d"),
+	 abfd, tag);
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+  else
+    {
+      _bfd_error_handler
+	(_("%B: warning: unknown EABI object attribute %d"),
+	 abfd, tag);
+      return TRUE;
+    }
+}
+
 /* Merge the Tag_ISA attribute values ARCH1 and ARCH2
    and return the merged value.  At present, all merges succeed, so no
    return value for errors is defined.  */
@@ -1891,24 +3956,10 @@
 	    }
 	  break;
 
-	case Tag_ABI_PID:
-	  if (out_attr[i].i != in_attr[i].i)
-	    {
-	      _bfd_error_handler
-		(_("warning: %B and %B differ in position-dependence of "
-		   "data addressing"),
-		 obfd, ibfd);
-	    }
-	  break;
-
 	case Tag_ABI_PIC:
-	  if (out_attr[i].i != in_attr[i].i)
-	    {
-	      _bfd_error_handler
-		(_("warning: %B and %B differ in position-dependence of "
-		   "code addressing"),
-		 obfd, ibfd);
-	    }
+	case Tag_ABI_PID:
+	  if (out_attr[i].i > in_attr[i].i)
+	    out_attr[i].i = in_attr[i].i;
 	  break;
 
 	case Tag_ABI_array_object_alignment:
@@ -1938,7 +3989,13 @@
 	    out_attr[i].s = NULL;
 	  break;
 
+	case Tag_ABI_compatibility:
+	  /* Merged in _bfd_elf_merge_object_attributes.  */
+	  break;
+
 	default:
+	  result
+	    = result && _bfd_elf_merge_unknown_attribute_low (ibfd, obfd, i);
 	  break;
 	}
 
@@ -1950,6 +4007,8 @@
   if (!_bfd_elf_merge_object_attributes (ibfd, obfd))
     return FALSE;
 
+  result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd);
+
   return result;
 }
 
@@ -1965,6 +4024,459 @@
   return TRUE;
 }
 
+static bfd_boolean
+elf32_tic6x_copy_private_data (bfd * ibfd, bfd * obfd)
+{
+  _bfd_elf_copy_private_bfd_data (ibfd, obfd);
+
+  if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (obfd))
+    return TRUE;
+
+  /* Copy the stack size.  */
+  if (elf_tdata (ibfd)->phdr && elf_tdata (obfd)->phdr
+      && elf32_tic6x_using_dsbt (ibfd) && elf32_tic6x_using_dsbt (obfd))
+    {
+      unsigned i;
+
+      for (i = 0; i < elf_elfheader (ibfd)->e_phnum; i++)
+	if (elf_tdata (ibfd)->phdr[i].p_type == PT_GNU_STACK)
+	  {
+	    Elf_Internal_Phdr *iphdr = &elf_tdata (ibfd)->phdr[i];
+
+	    for (i = 0; i < elf_elfheader (obfd)->e_phnum; i++)
+	      if (elf_tdata (obfd)->phdr[i].p_type == PT_GNU_STACK)
+		{
+		  memcpy (&elf_tdata (obfd)->phdr[i], iphdr, sizeof (*iphdr));
+
+		  /* Rewrite the phdrs, since we're only called after they
+		     were first written.  */
+		  if (bfd_seek (obfd,
+				(bfd_signed_vma) get_elf_backend_data (obfd)
+				->s->sizeof_ehdr, SEEK_SET) != 0
+		      || get_elf_backend_data (obfd)->s
+		      ->write_out_phdrs (obfd, elf_tdata (obfd)->phdr,
+					 elf_elfheader (obfd)->e_phnum) != 0)
+		    return FALSE;
+		  break;
+		}
+
+	    break;
+	  }
+    }
+
+  return TRUE;
+}
+
+/* Add a new unwind edit to the list described by HEAD, TAIL.  If TINDEX is zero,
+   adds the edit to the start of the list.  (The list must be built in order of
+   ascending TINDEX: the function's callers are primarily responsible for
+   maintaining that condition).  */
+
+static void
+elf32_tic6x_add_unwind_table_edit (tic6x_unwind_table_edit **head,
+				   tic6x_unwind_table_edit **tail,
+				   tic6x_unwind_edit_type type,
+				   asection *linked_section,
+				   unsigned int tindex)
+{
+  tic6x_unwind_table_edit *new_edit = (tic6x_unwind_table_edit *)
+      xmalloc (sizeof (tic6x_unwind_table_edit));
+  
+  new_edit->type = type;
+  new_edit->linked_section = linked_section;
+  new_edit->index = tindex;
+  
+  if (tindex > 0)
+    {
+      new_edit->next = NULL;
+
+      if (*tail)
+	(*tail)->next = new_edit;
+
+      (*tail) = new_edit;
+
+      if (!*head)
+	(*head) = new_edit;
+    }
+  else
+    {
+      new_edit->next = *head;
+
+      if (!*tail)
+	*tail = new_edit;
+
+      *head = new_edit;
+    }
+}
+
+static _tic6x_elf_section_data *
+get_tic6x_elf_section_data (asection * sec)
+{
+  if (sec && sec->owner && is_tic6x_elf (sec->owner))
+    return elf32_tic6x_section_data (sec);
+  else
+    return NULL;
+}
+
+
+/* Increase the size of EXIDX_SEC by ADJUST bytes.  ADJUST must be negative.  */
+static void
+elf32_tic6x_adjust_exidx_size (asection *exidx_sec, int adjust)
+{
+  asection *out_sec;
+
+  if (!exidx_sec->rawsize)
+    exidx_sec->rawsize = exidx_sec->size;
+
+  bfd_set_section_size (exidx_sec->owner, exidx_sec, exidx_sec->size + adjust);
+  out_sec = exidx_sec->output_section;
+  /* Adjust size of output section.  */
+  bfd_set_section_size (out_sec->owner, out_sec, out_sec->size +adjust);
+}
+
+/* Insert an EXIDX_CANTUNWIND marker at the end of a section.  */
+static void
+elf32_tic6x_insert_cantunwind_after (asection *text_sec, asection *exidx_sec)
+{
+  struct _tic6x_elf_section_data *exidx_data;
+
+  exidx_data = get_tic6x_elf_section_data (exidx_sec);
+  elf32_tic6x_add_unwind_table_edit (
+    &exidx_data->u.exidx.unwind_edit_list,
+    &exidx_data->u.exidx.unwind_edit_tail,
+    INSERT_EXIDX_CANTUNWIND_AT_END, text_sec, UINT_MAX);
+
+  elf32_tic6x_adjust_exidx_size (exidx_sec, 8);
+}
+
+/* Scan .cx6abi.exidx tables, and create a list describing edits which
+   should be made to those tables, such that:
+   
+     1. Regions without unwind data are marked with EXIDX_CANTUNWIND entries.
+     2. Duplicate entries are merged together (EXIDX_CANTUNWIND, or unwind
+        codes which have been inlined into the index).
+
+   If MERGE_EXIDX_ENTRIES is false, duplicate entries are not merged.
+
+   The edits are applied when the tables are written
+   (in elf32_tic6x_write_section).
+*/
+
+bfd_boolean
+elf32_tic6x_fix_exidx_coverage (asection **text_section_order,
+				unsigned int num_text_sections,
+				struct bfd_link_info *info,
+				bfd_boolean merge_exidx_entries)
+{
+  bfd *inp;
+  unsigned int last_second_word = 0, i;
+  asection *last_exidx_sec = NULL;
+  asection *last_text_sec = NULL;
+  int last_unwind_type = -1;
+
+  /* Walk over all EXIDX sections, and create backlinks from the corrsponding
+     text sections.  */
+  for (inp = info->input_bfds; inp != NULL; inp = inp->link_next)
+    {
+      asection *sec;
+      
+      for (sec = inp->sections; sec != NULL; sec = sec->next)
+        {
+	  struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
+	  Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
+	  
+	  if (!hdr || hdr->sh_type != SHT_C6000_UNWIND)
+	    continue;
+	  
+	  if (elf_sec->linked_to)
+	    {
+	      Elf_Internal_Shdr *linked_hdr
+	        = &elf_section_data (elf_sec->linked_to)->this_hdr;
+	      struct _tic6x_elf_section_data *linked_sec_tic6x_data
+	        = get_tic6x_elf_section_data (linked_hdr->bfd_section);
+
+	      if (linked_sec_tic6x_data == NULL)
+	        continue;
+
+	      /* Link this .c6xabi.exidx section back from the
+		 text section it describes.  */
+	      linked_sec_tic6x_data->u.text.tic6x_exidx_sec = sec;
+	    }
+	}
+    }
+
+  /* Walk all text sections in order of increasing VMA.  Eilminate duplicate
+     index table entries (EXIDX_CANTUNWIND and inlined unwind opcodes),
+     and add EXIDX_CANTUNWIND entries for sections with no unwind table data.  */
+
+  for (i = 0; i < num_text_sections; i++)
+    {
+      asection *sec = text_section_order[i];
+      asection *exidx_sec;
+      struct _tic6x_elf_section_data *tic6x_data
+       	= get_tic6x_elf_section_data (sec);
+      struct _tic6x_elf_section_data *exidx_data;
+      bfd_byte *contents = NULL;
+      int deleted_exidx_bytes = 0;
+      bfd_vma j;
+      tic6x_unwind_table_edit *unwind_edit_head = NULL;
+      tic6x_unwind_table_edit *unwind_edit_tail = NULL;
+      Elf_Internal_Shdr *hdr;
+      bfd *ibfd;
+
+      if (tic6x_data == NULL)
+        continue;
+
+      exidx_sec = tic6x_data->u.text.tic6x_exidx_sec;
+      if (exidx_sec == NULL)
+	{
+	  /* Section has no unwind data.  */
+	  if (last_unwind_type == 0 || !last_exidx_sec)
+	    continue;
+
+	  /* Ignore zero sized sections.  */
+	  if (sec->size == 0)
+	    continue;
+
+	  elf32_tic6x_insert_cantunwind_after (last_text_sec, last_exidx_sec);
+	  last_unwind_type = 0;
+	  continue;
+	}
+
+      /* Skip /DISCARD/ sections.  */
+      if (bfd_is_abs_section (exidx_sec->output_section))
+	continue;
+
+      hdr = &elf_section_data (exidx_sec)->this_hdr;
+      if (hdr->sh_type != SHT_C6000_UNWIND)
+        continue;
+      
+      exidx_data = get_tic6x_elf_section_data (exidx_sec);
+      if (exidx_data == NULL)
+        continue;
+      
+      ibfd = exidx_sec->owner;
+	  
+      if (hdr->contents != NULL)
+	contents = hdr->contents;
+      else if (! bfd_malloc_and_get_section (ibfd, exidx_sec, &contents))
+	/* An error?  */
+	continue;
+
+      for (j = 0; j < hdr->sh_size; j += 8)
+	{
+	  unsigned int second_word = bfd_get_32 (ibfd, contents + j + 4);
+	  int unwind_type;
+	  int elide = 0;
+
+	  /* An EXIDX_CANTUNWIND entry.  */
+	  if (second_word == 1)
+	    {
+	      if (last_unwind_type == 0)
+		elide = 1;
+	      unwind_type = 0;
+	    }
+	  /* Inlined unwinding data.  Merge if equal to previous.  */
+	  else if ((second_word & 0x80000000) != 0)
+	    {
+	      if (merge_exidx_entries
+		  && last_second_word == second_word
+		  && last_unwind_type == 1)
+		elide = 1;
+	      unwind_type = 1;
+	      last_second_word = second_word;
+	    }
+	  /* Normal table entry.  In theory we could merge these too,
+	     but duplicate entries are likely to be much less common.  */
+	  else
+	    unwind_type = 2;
+
+	  if (elide)
+	    {
+	      elf32_tic6x_add_unwind_table_edit (&unwind_edit_head,
+		  &unwind_edit_tail, DELETE_EXIDX_ENTRY, NULL, j / 8);
+
+	      deleted_exidx_bytes += 8;
+	    }
+
+	  last_unwind_type = unwind_type;
+	}
+
+      /* Free contents if we allocated it ourselves.  */
+      if (contents != hdr->contents)
+        free (contents);
+
+      /* Record edits to be applied later (in elf32_tic6x_write_section).  */
+      exidx_data->u.exidx.unwind_edit_list = unwind_edit_head;
+      exidx_data->u.exidx.unwind_edit_tail = unwind_edit_tail;
+	  
+      if (deleted_exidx_bytes > 0)
+	elf32_tic6x_adjust_exidx_size (exidx_sec, -deleted_exidx_bytes);
+
+      last_exidx_sec = exidx_sec;
+      last_text_sec = sec;
+    }
+
+  /* Add terminating CANTUNWIND entry.  */
+  if (last_exidx_sec && last_unwind_type != 0)
+    elf32_tic6x_insert_cantunwind_after (last_text_sec, last_exidx_sec);
+
+  return TRUE;
+}
+
+/* Add ADDEND to lower 31 bits of VAL, leaving other bits unmodified.  */
+
+static unsigned long
+elf32_tic6x_add_low31 (unsigned long val, bfd_vma addend)
+{
+  return (val & ~0x7ffffffful) | ((val + addend) & 0x7ffffffful);
+}
+
+/* Copy an .c6xabi.exidx table entry, adding OFFSET to (applied) PREL31
+   relocations.  OFFSET is in bytes, and will be scaled before encoding.  */
+
+
+static void
+elf32_tic6x_copy_exidx_entry (bfd *output_bfd, bfd_byte *to, bfd_byte *from,
+			      bfd_vma offset)
+{
+  unsigned long first_word = bfd_get_32 (output_bfd, from);
+  unsigned long second_word = bfd_get_32 (output_bfd, from + 4);
+
+  offset >>= 1;
+  /* High bit of first word is supposed to be zero.  */
+  if ((first_word & 0x80000000ul) == 0)
+    first_word = elf32_tic6x_add_low31 (first_word, offset);
+  
+  /* If the high bit of the first word is clear, and the bit pattern is not 0x1
+     (EXIDX_CANTUNWIND), this is an offset to an .c6xabi.extab entry.  */
+  if ((second_word != 0x1) && ((second_word & 0x80000000ul) == 0))
+    second_word = elf32_tic6x_add_low31 (second_word, offset);
+  
+  bfd_put_32 (output_bfd, first_word, to);
+  bfd_put_32 (output_bfd, second_word, to + 4);
+}
+
+/* Do the actual mangling of exception index tables.  */
+
+static bfd_boolean
+elf32_tic6x_write_section (bfd *output_bfd,
+			 struct bfd_link_info *link_info,
+			 asection *sec,
+			 bfd_byte *contents)
+{
+  _tic6x_elf_section_data *tic6x_data;
+  struct elf32_tic6x_link_hash_table *globals
+    = elf32_tic6x_hash_table (link_info);
+  bfd_vma offset = sec->output_section->vma + sec->output_offset;
+
+  if (globals == NULL)
+    return FALSE;
+
+  /* If this section has not been allocated an _tic6x_elf_section_data
+     structure then we cannot record anything.  */
+  tic6x_data = get_tic6x_elf_section_data (sec);
+  if (tic6x_data == NULL)
+    return FALSE;
+
+  if (tic6x_data->elf.this_hdr.sh_type != SHT_C6000_UNWIND)
+    return FALSE;
+
+  tic6x_unwind_table_edit *edit_node
+    = tic6x_data->u.exidx.unwind_edit_list;
+  /* Now, sec->size is the size of the section we will write.  The original
+     size (before we merged duplicate entries and inserted EXIDX_CANTUNWIND
+     markers) was sec->rawsize.  (This isn't the case if we perform no
+     edits, then rawsize will be zero and we should use size).  */
+  bfd_byte *edited_contents = (bfd_byte *) bfd_malloc (sec->size);
+  unsigned int input_size = sec->rawsize ? sec->rawsize : sec->size;
+  unsigned int in_index, out_index;
+  bfd_vma add_to_offsets = 0;
+
+  for (in_index = 0, out_index = 0; in_index * 8 < input_size || edit_node;)
+    {
+      if (edit_node)
+	{
+	  unsigned int edit_index = edit_node->index;
+	  
+	  if (in_index < edit_index && in_index * 8 < input_size)
+	    {
+	      elf32_tic6x_copy_exidx_entry (output_bfd,
+		  edited_contents + out_index * 8,
+		  contents + in_index * 8, add_to_offsets);
+	      out_index++;
+	      in_index++;
+	    }
+	  else if (in_index == edit_index
+		   || (in_index * 8 >= input_size
+		       && edit_index == UINT_MAX))
+	    {
+	      switch (edit_node->type)
+		{
+		case DELETE_EXIDX_ENTRY:
+		  in_index++;
+		  add_to_offsets += 8;
+		  break;
+		
+		case INSERT_EXIDX_CANTUNWIND_AT_END:
+		  {
+		    asection *text_sec = edit_node->linked_section;
+		    bfd_vma text_offset = text_sec->output_section->vma
+					  + text_sec->output_offset
+					  + text_sec->size;
+		    bfd_vma exidx_offset = offset + out_index * 8;
+		    unsigned long prel31_offset;
+
+		    /* Note: this is meant to be equivalent to an
+		       R_C6000_PREL31 relocation.  These synthetic
+		       EXIDX_CANTUNWIND markers are not relocated by the
+		       usual BFD method.  */
+		    prel31_offset = ((text_offset - exidx_offset) >> 1)
+				    & 0x7ffffffful;
+
+		    /* First address we can't unwind.  */
+		    bfd_put_32 (output_bfd, prel31_offset,
+				&edited_contents[out_index * 8]);
+
+		    /* Code for EXIDX_CANTUNWIND.  */
+		    bfd_put_32 (output_bfd, 0x1,
+				&edited_contents[out_index * 8 + 4]);
+
+		    out_index++;
+		    add_to_offsets -= 8;
+		  }
+		  break;
+		}
+	      
+	      edit_node = edit_node->next;
+	    }
+	}
+      else
+	{
+	  /* No more edits, copy remaining entries verbatim.  */
+	  elf32_tic6x_copy_exidx_entry (output_bfd,
+	      edited_contents + out_index * 8,
+	      contents + in_index * 8, add_to_offsets);
+	  out_index++;
+	  in_index++;
+	}
+    }
+
+  if (!(sec->flags & SEC_EXCLUDE) && !(sec->flags & SEC_NEVER_LOAD))
+    bfd_set_section_contents (output_bfd, sec->output_section,
+			      edited_contents,
+			      (file_ptr) sec->output_offset, sec->size);
+
+  return TRUE;
+}
+
+static void
+elf32_tic6x_set_osabi (bfd *abfd, struct bfd_link_info *link_info)
+{
+  if (link_info != NULL && link_info->relocatable)
+    return;
+  _bfd_elf_set_osabi (abfd, link_info);
+}
 
 #define TARGET_LITTLE_SYM	bfd_elf32_tic6x_le_vec
 #define TARGET_LITTLE_NAME	"elf32-tic6x-le"
@@ -1973,24 +4485,103 @@
 #define ELF_ARCH		bfd_arch_tic6x
 #define ELF_TARGET_ID		TIC6X_ELF_DATA
 #define ELF_MACHINE_CODE	EM_TI_C6000
-#define ELF_MAXPAGESIZE		1
+#define ELF_MAXPAGESIZE		0x1000
 #define bfd_elf32_bfd_reloc_type_lookup elf32_tic6x_reloc_type_lookup
 #define bfd_elf32_bfd_reloc_name_lookup elf32_tic6x_reloc_name_lookup
+#define bfd_elf32_bfd_copy_private_bfd_data	elf32_tic6x_copy_private_data
 #define bfd_elf32_bfd_merge_private_bfd_data	elf32_tic6x_merge_private_bfd_data
 #define bfd_elf32_mkobject		elf32_tic6x_mkobject
+#define bfd_elf32_bfd_link_hash_table_create  elf32_tic6x_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_free    elf32_tic6x_link_hash_table_free
 #define bfd_elf32_new_section_hook	elf32_tic6x_new_section_hook
 #define elf_backend_can_gc_sections	1
 #define elf_backend_default_use_rela_p	1
 #define elf_backend_may_use_rel_p	1
 #define elf_backend_may_use_rela_p	1
 #define elf_backend_obj_attrs_arg_type	elf32_tic6x_obj_attrs_arg_type
+#define elf_backend_obj_attrs_handle_unknown	elf32_tic6x_obj_attrs_handle_unknown
 #define elf_backend_obj_attrs_order	elf32_tic6x_obj_attrs_order
 #define elf_backend_obj_attrs_section	".c6xabi.attributes"
 #define elf_backend_obj_attrs_section_type	SHT_C6000_ATTRIBUTES
 #define elf_backend_obj_attrs_vendor	"c6xabi"
+#define elf_backend_can_refcount	1
+#define elf_backend_want_got_plt	1
+#define elf_backend_want_dynbss		1
+#define elf_backend_plt_readonly	1
 #define elf_backend_rela_normal		1
+#define elf_backend_got_header_size     8
+#define elf_backend_fake_sections       elf32_tic6x_fake_sections
+#define elf_backend_gc_sweep_hook	elf32_tic6x_gc_sweep_hook
+#define elf_backend_gc_mark_extra_sections elf32_tic6x_gc_mark_extra_sections
+#define elf_backend_modify_program_headers \
+  elf32_tic6x_modify_program_headers
+#define elf_backend_create_dynamic_sections \
+  elf32_tic6x_create_dynamic_sections
+#define elf_backend_adjust_dynamic_symbol \
+  elf32_tic6x_adjust_dynamic_symbol
+#define elf_backend_check_relocs        elf32_tic6x_check_relocs
+#define elf_backend_add_symbol_hook     elf32_tic6x_add_symbol_hook
+#define elf_backend_symbol_processing   elf32_tic6x_symbol_processing
+#define elf_backend_link_output_symbol_hook \
+  elf32_tic6x_link_output_symbol_hook
+#define elf_backend_section_from_bfd_section \
+  elf32_tic6x_section_from_bfd_section
 #define elf_backend_relocate_section	elf32_tic6x_relocate_section
+#define elf_backend_relocs_compatible	_bfd_elf_relocs_compatible
+#define elf_backend_finish_dynamic_symbol \
+  elf32_tic6x_finish_dynamic_symbol
+#define elf_backend_always_size_sections \
+  elf32_tic6x_always_size_sections
+#define elf_backend_size_dynamic_sections \
+  elf32_tic6x_size_dynamic_sections
+#define elf_backend_finish_dynamic_sections \
+  elf32_tic6x_finish_dynamic_sections
+#define bfd_elf32_bfd_final_link \
+	elf32_tic6x_final_link
+#define elf_backend_write_section	elf32_tic6x_write_section
 #define elf_info_to_howto		elf32_tic6x_info_to_howto
 #define elf_info_to_howto_rel		elf32_tic6x_info_to_howto_rel
 
+#undef elf_backend_omit_section_dynsym
+#define elf_backend_omit_section_dynsym elf32_tic6x_link_omit_section_dynsym
+#define elf_backend_plt_sym_val		elf32_tic6x_plt_sym_val
+
+#include "elf32-target.h"
+
+#undef elf32_bed
+#define	elf32_bed		elf32_tic6x_linux_bed
+
+#undef TARGET_LITTLE_SYM
+#define	TARGET_LITTLE_SYM		bfd_elf32_tic6x_linux_le_vec
+#undef TARGET_LITTLE_NAME
+#define	TARGET_LITTLE_NAME		"elf32-tic6x-linux-le"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM			bfd_elf32_tic6x_linux_be_vec
+#undef TARGET_BIG_NAME
+#define	TARGET_BIG_NAME			"elf32-tic6x-linux-be"
+#undef ELF_OSABI
+#define	ELF_OSABI			ELFOSABI_C6000_LINUX
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers	elf32_tic6x_set_osabi
+
+#include "elf32-target.h"
+
+#undef elf32_bed
+#define	elf32_bed		elf32_tic6x_elf_bed
+
+#undef TARGET_LITTLE_SYM
+#define	TARGET_LITTLE_SYM		bfd_elf32_tic6x_elf_le_vec
+#undef TARGET_LITTLE_NAME
+#define	TARGET_LITTLE_NAME		"elf32-tic6x-elf-le"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM			bfd_elf32_tic6x_elf_be_vec
+#undef TARGET_BIG_NAME
+#define	TARGET_BIG_NAME			"elf32-tic6x-elf-be"
+#undef ELF_OSABI
+#define	ELF_OSABI			ELFOSABI_C6000_ELFABI
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers	elf32_tic6x_set_osabi
+
 #include "elf32-target.h"
diff --git a/bfd/elf32-tic6x.h b/bfd/elf32-tic6x.h
index e8df4e2..be54308 100644
--- a/bfd/elf32-tic6x.h
+++ b/bfd/elf32-tic6x.h
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for TI C6X
-   Copyright 2010
+   Copyright 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -24,3 +24,12 @@
 /* This function is provided for use from the assembler.  */
 
 extern void elf32_tic6x_set_use_rela_p (bfd *, bfd_boolean);
+
+struct elf32_tic6x_params
+{
+  int dsbt_index;
+  int dsbt_size;
+};
+
+extern void elf32_tic6x_setup (struct bfd_link_info *,
+			       struct elf32_tic6x_params *);
diff --git a/bfd/elf32-tilegx.c b/bfd/elf32-tilegx.c
new file mode 100644
index 0000000..902e9ba
--- /dev/null
+++ b/bfd/elf32-tilegx.c
@@ -0,0 +1,132 @@
+/* TILE-Gx-specific support for 32-bit ELF.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elfxx-tilegx.h"
+#include "elf32-tilegx.h"
+
+
+/* Support for core dump NOTE sections.  */
+
+static bfd_boolean
+tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  int offset;
+  size_t size;
+
+  if (note->descsz != TILEGX_PRSTATUS_SIZEOF)
+    return FALSE;
+
+  /* pr_cursig */
+  elf_tdata (abfd)->core_signal =
+    bfd_get_16 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_CURSIG);
+
+  /* pr_pid */
+  elf_tdata (abfd)->core_pid =
+    bfd_get_32 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_PID);
+
+  /* pr_reg */
+  offset = TILEGX_PRSTATUS_OFFSET_PR_REG;
+  size   = TILEGX_GREGSET_T_SIZE;
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+					  size, note->descpos + offset);
+}
+
+static bfd_boolean
+tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  if (note->descsz != TILEGX_PRPSINFO_SIZEOF)
+    return FALSE;
+
+  elf_tdata (abfd)->core_program
+    = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16);
+  elf_tdata (abfd)->core_command
+    = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_PSARGS, ELF_PR_PSARGS_SIZE);
+
+
+  /* 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;
+}
+
+
+#define ELF_ARCH		bfd_arch_tilegx
+#define ELF_TARGET_ID		TILEGX_ELF_DATA
+#define ELF_MACHINE_CODE	EM_TILEGX
+#define ELF_MAXPAGESIZE		0x10000
+#define ELF_COMMONPAGESIZE	0x10000
+
+#define TARGET_LITTLE_SYM       bfd_elf32_tilegx_vec
+#define TARGET_LITTLE_NAME	"elf32-tilegx"
+
+#define elf_backend_reloc_type_class	     tilegx_reloc_type_class
+
+#define bfd_elf32_bfd_reloc_name_lookup      tilegx_reloc_name_lookup
+#define bfd_elf32_bfd_link_hash_table_create tilegx_elf_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup	     tilegx_reloc_type_lookup
+#define bfd_elf32_bfd_merge_private_bfd_data \
+  _bfd_tilegx_elf_merge_private_bfd_data
+
+#define elf_backend_copy_indirect_symbol     tilegx_elf_copy_indirect_symbol
+#define elf_backend_create_dynamic_sections  tilegx_elf_create_dynamic_sections
+#define elf_backend_check_relocs	     tilegx_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol    tilegx_elf_adjust_dynamic_symbol
+#define elf_backend_omit_section_dynsym	     tilegx_elf_omit_section_dynsym
+#define elf_backend_size_dynamic_sections    tilegx_elf_size_dynamic_sections
+#define elf_backend_relocate_section	     tilegx_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol    tilegx_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections  tilegx_elf_finish_dynamic_sections
+#define elf_backend_gc_mark_hook	     tilegx_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook            tilegx_elf_gc_sweep_hook
+#define elf_backend_plt_sym_val		     tilegx_elf_plt_sym_val
+#define elf_info_to_howto_rel                NULL
+#define elf_info_to_howto                    tilegx_info_to_howto_rela
+#define elf_backend_grok_prstatus            tilegx_elf_grok_prstatus
+#define elf_backend_grok_psinfo              tilegx_elf_grok_psinfo
+#define elf_backend_additional_program_headers tilegx_additional_program_headers
+
+#define elf_backend_init_index_section	_bfd_elf_init_1_index_section
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_plt_readonly 1
+/* Align PLT mod 64 byte L2 line size. */
+#define elf_backend_plt_alignment 6
+#define elf_backend_want_plt_sym 1
+#define elf_backend_got_header_size 4
+#define elf_backend_rela_normal 1
+#define elf_backend_default_execstack 0
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-tilegx.h b/bfd/elf32-tilegx.h
new file mode 100644
index 0000000..091bde1
--- /dev/null
+++ b/bfd/elf32-tilegx.h
@@ -0,0 +1,38 @@
+/* TILE-Gx-specific support for 32-bit ELF.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef _ELF32_TILEGX_H
+#define _ELF32_TILEGX_H
+
+/* This file contains sizes and offsets of Linux data structures.  */
+
+#define TILEGX_PRSTATUS_SIZEOF           592
+#define TILEGX_PRSTATUS_OFFSET_PR_CURSIG  12
+#define TILEGX_PRSTATUS_OFFSET_PR_PID     24
+#define TILEGX_PRSTATUS_OFFSET_PR_REG     72
+
+#define TILEGX_PRPSINFO_SIZEOF           128
+#define TILEGX_PRPSINFO_OFFSET_PR_FNAME   32
+#define TILEGX_PRPSINFO_OFFSET_PR_PSARGS  48
+#define ELF_PR_PSARGS_SIZE                80
+
+#define TILEGX_GREGSET_T_SIZE            512
+
+#endif /* _ELF32_TILEGX_H */
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
new file mode 100644
index 0000000..f2aed9c
--- /dev/null
+++ b/bfd/elf32-tilepro.c
@@ -0,0 +1,3604 @@
+/* TILEPro-specific support for 32-bit ELF.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/tilepro.h"
+#include "opcode/tilepro.h"
+#include "libiberty.h"
+#include "elf32-tilepro.h"
+
+#define TILEPRO_BYTES_PER_WORD 4
+
+static reloc_howto_type tilepro_elf_howto_table [] =
+{
+  /* This reloc does nothing.  */
+  HOWTO (R_TILEPRO_NONE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_NONE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* A 32 bit absolute relocation.  */
+  HOWTO (R_TILEPRO_32,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_32",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* A 16 bit absolute relocation.  */
+  HOWTO (R_TILEPRO_16,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* An 8 bit absolute relocation.  */
+  HOWTO (R_TILEPRO_8,	/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 8,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_unsigned, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_8",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xff,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* A 32 bit pc-relative relocation.  */
+  HOWTO (R_TILEPRO_32_PCREL,/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_32_PCREL", /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* A 16 bit pc-relative relocation.  */
+  HOWTO (R_TILEPRO_16_PCREL,/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_16_PCREL",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* An 8 bit pc-relative relocation.  */
+  HOWTO (R_TILEPRO_8_PCREL,	/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 8,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_8_PCREL",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xff,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* A 16 bit relocation without overflow.  */
+  HOWTO (R_TILEPRO_LO16,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_LO16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* The high order 16 bits of an address.  */
+  HOWTO (R_TILEPRO_HI16,	/* type */
+	 16,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_HI16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* The high order 16 bits of an address, plus 1 if the contents of
+     the low 16 bits, treated as a signed number, is negative.  */
+  HOWTO (R_TILEPRO_HA16,	/* type */
+	 16,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc, /* special_function */
+	 "R_TILEPRO_HA16",  /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_COPY,		/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_COPY",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_GLOB_DAT,	/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_GLOB_DAT",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_JMP_SLOT,	/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_JMP_SLOT",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_RELATIVE,	/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_RELATIVE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_BROFF_X1, /* type */
+	 TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 17,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc, /* special_function */
+	 "R_TILEPRO_BROFF_X1", /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_JOFFLONG_X1, /* type */
+	 TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 29,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed,/* complain_on_overflow */
+	 bfd_elf_generic_reloc, /* special_function */
+	 "R_TILEPRO_JOFFLONG_X1", /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE), 		/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_JOFFLONG_X1_PLT, /* type */
+	 TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 29,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed,/* complain_on_overflow */
+	 bfd_elf_generic_reloc, /* special_function */
+	 "R_TILEPRO_JOFFLONG_X1_PLT", /* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE), 		/* pcrel_offset */
+
+#define TILEPRO_IMM_HOWTO(name, size, bitsize) \
+  HOWTO (name, 0, size, bitsize, FALSE, 0, \
+         complain_overflow_signed, bfd_elf_generic_reloc, \
+         #name, FALSE, 0, -1, FALSE)
+
+#define TILEPRO_UIMM_HOWTO(name, size, bitsize) \
+  HOWTO (name, 0, size, bitsize, FALSE, 0, \
+         complain_overflow_unsigned, bfd_elf_generic_reloc, \
+         #name, FALSE, 0, -1, FALSE)
+
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X0,  0,  8),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_Y0,  0,  8),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X1,  0,  8),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_Y1,  0,  8),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MT_IMM15_X1, 1,  15),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MF_IMM15_X1, 1,  15),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM16_X0, 1, 16),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM16_X1, 1, 16),
+
+#define TILEPRO_IMM16_HOWTO(name, rshift) \
+  HOWTO (name, rshift, 1, 16, FALSE, 0, \
+         complain_overflow_dont, bfd_elf_generic_reloc, \
+         #name, FALSE, 0, 0xffff, FALSE)
+
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_HA, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_HA, 16),
+
+  /* PC-relative offsets. */
+
+  HOWTO (R_TILEPRO_IMM16_X0_PCREL,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X0_PCREL",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_IMM16_X1_PCREL,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X1_PCREL",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+#define TILEPRO_IMM16_HOWTO_PCREL(name, rshift) \
+  HOWTO (name, rshift, 1, 16, TRUE, 0, \
+         complain_overflow_dont, bfd_elf_generic_reloc, \
+         #name, FALSE, 0, 0xffff, TRUE)
+
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X0_LO_PCREL,  0),
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X1_LO_PCREL,  0),
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X0_HI_PCREL, 16),
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X1_HI_PCREL, 16),
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X0_HA_PCREL, 16),
+  TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X1_HA_PCREL, 16),
+
+  /* Byte offset into GOT for a particular symbol. */
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM16_X0_GOT, 1, 16),
+  TILEPRO_IMM_HOWTO(R_TILEPRO_IMM16_X1_GOT, 1, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_GOT_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_GOT_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_GOT_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_GOT_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_GOT_HA, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_GOT_HA, 16),
+
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MMSTART_X0, 0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MMEND_X0,   0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MMSTART_X1, 0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_MMEND_X1,   0, 5),
+
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_X0, 0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_X1, 0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y0, 0, 5),
+  TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y1, 0, 5),
+
+  TILEPRO_IMM_HOWTO(R_TILEPRO_DEST_IMM8_X1, 0, 8),
+
+  /* These relocs are currently not defined.  */
+  EMPTY_HOWTO (56),
+  EMPTY_HOWTO (57),
+  EMPTY_HOWTO (58),
+  EMPTY_HOWTO (59),
+  EMPTY_HOWTO (60),
+  EMPTY_HOWTO (61),
+  EMPTY_HOWTO (62),
+  EMPTY_HOWTO (63),
+  EMPTY_HOWTO (64),
+  EMPTY_HOWTO (65),
+
+  /* Offsets into the GOT of TLS Descriptors. */
+
+  HOWTO (R_TILEPRO_IMM16_X0_TLS_GD,/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X0_TLS_GD",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_IMM16_X1_TLS_GD,/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X1_TLS_GD",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_GD_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_GD_LO,  0),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_GD_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_GD_HI, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_GD_HA, 16),
+  TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_GD_HA, 16),
+
+  /* Offsets into the GOT of TLS Descriptors. */
+
+  HOWTO (R_TILEPRO_IMM16_X0_TLS_IE,/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X0_TLS_IE",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_TILEPRO_IMM16_X1_TLS_IE,/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_TILEPRO_IMM16_X1_TLS_IE",/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 -1,			/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+#define TILEPRO_IMM16_HOWTO_TLS_IE(name, rshift) \
+  HOWTO (name, rshift, 1, 16, FALSE, 0, \
+         complain_overflow_dont, bfd_elf_generic_reloc, \
+         #name, FALSE, 0, 0xffff, TRUE)
+
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_LO,  0),
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_LO,  0),
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_HI, 16),
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_HI, 16),
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_HA, 16),
+  TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_HA, 16),
+
+  /* These are common with the Solaris TLS implementation. */
+  HOWTO(R_TILEPRO_TLS_DTPMOD32, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+        bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPMOD32",
+        FALSE, 0, 0, TRUE),
+  HOWTO(R_TILEPRO_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+        bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPOFF32",
+        FALSE, 0, 0xFFFFFFFF, TRUE),
+  HOWTO(R_TILEPRO_TLS_TPOFF32, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+        bfd_elf_generic_reloc, "R_TILEPRO_TLS_TPOFF32",
+        FALSE, 0, 0, TRUE)
+
+};
+
+static reloc_howto_type tilepro_elf_howto_table2 [] =
+{
+  /* GNU extension to record C++ vtable hierarchy */
+  HOWTO (R_TILEPRO_GNU_VTINHERIT, /* type */
+         0,                     /* rightshift */
+         2,                     /* size (0 = byte, 1 = short, 2 = long) */
+         0,                     /* bitsize */
+         FALSE,                 /* pc_relative */
+         0,                     /* bitpos */
+         complain_overflow_dont, /* complain_on_overflow */
+         NULL,                  /* special_function */
+         "R_TILEPRO_GNU_VTINHERIT", /* name */
+         FALSE,                 /* partial_inplace */
+         0,                     /* src_mask */
+         0,                     /* dst_mask */
+         FALSE),                /* pcrel_offset */
+
+  /* GNU extension to record C++ vtable member usage */
+  HOWTO (R_TILEPRO_GNU_VTENTRY,     /* type */
+         0,                     /* rightshift */
+         2,                     /* size (0 = byte, 1 = short, 2 = long) */
+         0,                     /* bitsize */
+         FALSE,                 /* pc_relative */
+         0,                     /* bitpos */
+         complain_overflow_dont, /* complain_on_overflow */
+         _bfd_elf_rel_vtable_reloc_fn,  /* special_function */
+         "R_TILEPRO_GNU_VTENTRY",   /* name */
+         FALSE,                 /* partial_inplace */
+         0,                     /* src_mask */
+         0,                     /* dst_mask */
+         FALSE),                /* pcrel_offset */
+
+};
+
+/* Map BFD reloc types to TILEPRO ELF reloc types.  */
+
+typedef struct tilepro_reloc_map
+{
+  bfd_reloc_code_real_type  bfd_reloc_val;
+  unsigned int              tilepro_reloc_val;
+  reloc_howto_type *        table;
+} reloc_map;
+
+static const reloc_map tilepro_reloc_map [] =
+{
+#define TH_REMAP(bfd, tilepro) \
+  { bfd, tilepro, tilepro_elf_howto_table },
+
+  /* Standard relocations. */
+  TH_REMAP (BFD_RELOC_NONE,                    R_TILEPRO_NONE)
+  TH_REMAP (BFD_RELOC_32,                      R_TILEPRO_32)
+  TH_REMAP (BFD_RELOC_16,                      R_TILEPRO_16)
+  TH_REMAP (BFD_RELOC_8,                       R_TILEPRO_8)
+  TH_REMAP (BFD_RELOC_32_PCREL,                R_TILEPRO_32_PCREL)
+  TH_REMAP (BFD_RELOC_16_PCREL,                R_TILEPRO_16_PCREL)
+  TH_REMAP (BFD_RELOC_8_PCREL,                 R_TILEPRO_8_PCREL)
+  TH_REMAP (BFD_RELOC_LO16,                    R_TILEPRO_LO16)
+  TH_REMAP (BFD_RELOC_HI16,                    R_TILEPRO_HI16)
+  TH_REMAP (BFD_RELOC_HI16_S,                  R_TILEPRO_HA16)
+
+  /* Custom relocations. */
+  TH_REMAP (BFD_RELOC_TILEPRO_COPY,            R_TILEPRO_COPY)
+  TH_REMAP (BFD_RELOC_TILEPRO_GLOB_DAT,        R_TILEPRO_GLOB_DAT)
+  TH_REMAP (BFD_RELOC_TILEPRO_JMP_SLOT,        R_TILEPRO_JMP_SLOT)
+  TH_REMAP (BFD_RELOC_TILEPRO_RELATIVE,        R_TILEPRO_RELATIVE)
+  TH_REMAP (BFD_RELOC_TILEPRO_BROFF_X1,        R_TILEPRO_BROFF_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_JOFFLONG_X1,     R_TILEPRO_JOFFLONG_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT, R_TILEPRO_JOFFLONG_X1_PLT)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM8_X0,         R_TILEPRO_IMM8_X0)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM8_Y0,         R_TILEPRO_IMM8_Y0)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM8_X1,         R_TILEPRO_IMM8_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM8_Y1,         R_TILEPRO_IMM8_Y1)
+  TH_REMAP (BFD_RELOC_TILEPRO_DEST_IMM8_X1,    R_TILEPRO_DEST_IMM8_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_MT_IMM15_X1,     R_TILEPRO_MT_IMM15_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_MF_IMM15_X1,     R_TILEPRO_MF_IMM15_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0,        R_TILEPRO_IMM16_X0)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1,        R_TILEPRO_IMM16_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_LO,     R_TILEPRO_IMM16_X0_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_LO,     R_TILEPRO_IMM16_X1_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_HI,     R_TILEPRO_IMM16_X0_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_HI,     R_TILEPRO_IMM16_X1_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_HA,     R_TILEPRO_IMM16_X0_HA)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_HA,     R_TILEPRO_IMM16_X1_HA)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_PCREL,    R_TILEPRO_IMM16_X0_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_PCREL,    R_TILEPRO_IMM16_X1_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL, R_TILEPRO_IMM16_X0_LO_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL, R_TILEPRO_IMM16_X1_LO_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL, R_TILEPRO_IMM16_X0_HI_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL, R_TILEPRO_IMM16_X1_HI_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL, R_TILEPRO_IMM16_X0_HA_PCREL)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL, R_TILEPRO_IMM16_X1_HA_PCREL)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT, R_TILEPRO_IMM16_X0_GOT)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT, R_TILEPRO_IMM16_X1_GOT)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO, R_TILEPRO_IMM16_X0_GOT_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO, R_TILEPRO_IMM16_X1_GOT_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI, R_TILEPRO_IMM16_X0_GOT_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI, R_TILEPRO_IMM16_X1_GOT_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA, R_TILEPRO_IMM16_X0_GOT_HA)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA, R_TILEPRO_IMM16_X1_GOT_HA)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X0,  R_TILEPRO_MMSTART_X0)
+  TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X0,    R_TILEPRO_MMEND_X0)
+  TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X1,  R_TILEPRO_MMSTART_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X1,    R_TILEPRO_MMEND_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_X0,    R_TILEPRO_SHAMT_X0)
+  TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_X1,    R_TILEPRO_SHAMT_X1)
+  TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_Y0,    R_TILEPRO_SHAMT_Y0)
+  TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_Y1,    R_TILEPRO_SHAMT_Y1)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,    R_TILEPRO_IMM16_X0_TLS_GD)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,    R_TILEPRO_IMM16_X1_TLS_GD)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO, R_TILEPRO_IMM16_X0_TLS_GD_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO, R_TILEPRO_IMM16_X1_TLS_GD_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI, R_TILEPRO_IMM16_X0_TLS_GD_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI, R_TILEPRO_IMM16_X1_TLS_GD_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA, R_TILEPRO_IMM16_X0_TLS_GD_HA)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA, R_TILEPRO_IMM16_X1_TLS_GD_HA)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,    R_TILEPRO_IMM16_X0_TLS_IE)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,    R_TILEPRO_IMM16_X1_TLS_IE)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO, R_TILEPRO_IMM16_X0_TLS_IE_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO, R_TILEPRO_IMM16_X1_TLS_IE_LO)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI, R_TILEPRO_IMM16_X0_TLS_IE_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI, R_TILEPRO_IMM16_X1_TLS_IE_HI)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA, R_TILEPRO_IMM16_X0_TLS_IE_HA)
+  TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA, R_TILEPRO_IMM16_X1_TLS_IE_HA)
+
+  TH_REMAP (BFD_RELOC_TILEPRO_TLS_DTPMOD32, R_TILEPRO_TLS_DTPMOD32)
+  TH_REMAP (BFD_RELOC_TILEPRO_TLS_DTPOFF32, R_TILEPRO_TLS_DTPOFF32)
+  TH_REMAP (BFD_RELOC_TILEPRO_TLS_TPOFF32,  R_TILEPRO_TLS_TPOFF32)
+
+#undef TH_REMAP
+
+  { BFD_RELOC_VTABLE_INHERIT, R_TILEPRO_GNU_VTINHERIT, tilepro_elf_howto_table2 },
+  { BFD_RELOC_VTABLE_ENTRY,   R_TILEPRO_GNU_VTENTRY,   tilepro_elf_howto_table2 },
+};
+
+
+
+/* The TILEPro linker needs to keep track of the number of relocs that it
+   decides to copy as dynamic relocs in check_relocs for each symbol.
+   This is so that it can later discard them if they are found to be
+   unnecessary.  We store the information in a field extending the
+   regular ELF linker hash table.  */
+
+struct tilepro_elf_dyn_relocs
+{
+  struct tilepro_elf_dyn_relocs *next;
+
+  /* The input section of the reloc.  */
+  asection *sec;
+
+  /* Total number of relocs copied for the input section.  */
+  bfd_size_type count;
+
+  /* Number of pc-relative relocs copied for the input section.  */
+  bfd_size_type pc_count;
+};
+
+/* TILEPRO ELF linker hash entry.  */
+
+struct tilepro_elf_link_hash_entry
+{
+  struct elf_link_hash_entry elf;
+
+  /* Track dynamic relocs copied for this symbol.  */
+  struct tilepro_elf_dyn_relocs *dyn_relocs;
+
+#define GOT_UNKNOWN     0
+#define GOT_NORMAL      1
+#define GOT_TLS_GD      2
+#define GOT_TLS_IE      4
+  unsigned char tls_type;
+};
+
+#define tilepro_elf_hash_entry(ent) \
+  ((struct tilepro_elf_link_hash_entry *)(ent))
+
+struct _bfd_tilepro_elf_obj_tdata
+{
+  struct elf_obj_tdata root;
+
+  /* tls_type for each local got entry.  */
+  char *local_got_tls_type;
+};
+
+#define _bfd_tilepro_elf_tdata(abfd) \
+  ((struct _bfd_tilepro_elf_obj_tdata *) (abfd)->tdata.any)
+
+#define _bfd_tilepro_elf_local_got_tls_type(abfd) \
+  (_bfd_tilepro_elf_tdata (abfd)->local_got_tls_type)
+
+#define is_tilepro_elf(bfd)				\
+  (bfd_get_flavour (bfd) == bfd_target_elf_flavour	\
+   && elf_tdata (bfd) != NULL				\
+   && elf_object_id (bfd) == TILEPRO_ELF_DATA)
+
+#include "elf/common.h"
+#include "elf/internal.h"
+
+struct tilepro_elf_link_hash_table
+{
+  struct elf_link_hash_table elf;
+
+  /* Short-cuts to get to dynamic linker sections.  */
+  asection *sdynbss;
+  asection *srelbss;
+
+  /* Small local sym to section mapping cache.  */
+  struct sym_cache sym_cache;
+};
+
+/* Get the Tilepro ELF linker hash table from a link_info structure.  */
+#define tilepro_elf_hash_table(p) \
+  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
+  == TILEPRO_ELF_DATA \
+  ? ((struct tilepro_elf_link_hash_table *) ((p)->hash)) : NULL)
+
+static reloc_howto_type *
+tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
+                           bfd_reloc_code_real_type code)
+{
+  unsigned int i;
+
+  for (i = ARRAY_SIZE (tilepro_reloc_map); --i;)
+    {
+      const reloc_map * entry;
+
+      entry = tilepro_reloc_map + i;
+
+      if (entry->bfd_reloc_val == code)
+	return entry->table + (entry->tilepro_reloc_val
+			       - entry->table[0].type);
+    }
+
+  return NULL;
+}
+
+static reloc_howto_type *
+tilepro_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+			   const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < (sizeof (tilepro_elf_howto_table)
+            / sizeof (tilepro_elf_howto_table[0]));
+       i++)
+    if (tilepro_elf_howto_table[i].name != NULL
+        && strcasecmp (tilepro_elf_howto_table[i].name, r_name) == 0)
+      return &tilepro_elf_howto_table[i];
+
+  return NULL;
+}
+
+/* Set the howto pointer for an TILEPro ELF reloc.  */
+
+static void
+tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+                            arelent * cache_ptr,
+                            Elf_Internal_Rela * dst)
+{
+  unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+
+  if (r_type <= (unsigned int) R_TILEPRO_TLS_TPOFF32)
+    cache_ptr->howto = &tilepro_elf_howto_table [r_type];
+  else if (r_type - R_TILEPRO_GNU_VTINHERIT
+	   <= (unsigned int) R_TILEPRO_GNU_VTENTRY)
+    cache_ptr->howto
+      = &tilepro_elf_howto_table2 [r_type - R_TILEPRO_GNU_VTINHERIT];
+  else
+    abort ();
+}
+
+typedef tilepro_bundle_bits (*tilepro_create_func)(int);
+
+static const tilepro_create_func reloc_to_create_func[] =
+{
+  /* The first fourteen relocation types don't correspond to operands */
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+
+  /* The remaining relocations are used for immediate operands */
+  create_BrOff_X1,
+  create_JOffLong_X1,
+  create_JOffLong_X1,
+  create_Imm8_X0,
+  create_Imm8_Y0,
+  create_Imm8_X1,
+  create_Imm8_Y1,
+  create_MT_Imm15_X1,
+  create_MF_Imm15_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_MMStart_X0,
+  create_MMEnd_X0,
+  create_MMStart_X1,
+  create_MMEnd_X1,
+  create_ShAmt_X0,
+  create_ShAmt_X1,
+  create_ShAmt_Y0,
+  create_ShAmt_Y1,
+
+  create_Dest_Imm8_X1,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1,
+  create_Imm16_X0,
+  create_Imm16_X1
+};
+
+#define NELEMS(a)	((int) (sizeof (a) / sizeof ((a)[0])))
+
+/* Support for core dump NOTE sections.  */
+
+static bfd_boolean
+tilepro_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  int offset;
+  size_t size;
+
+  if (note->descsz != TILEPRO_PRSTATUS_SIZEOF)
+    return FALSE;
+
+  /* pr_cursig */
+  elf_tdata (abfd)->core_signal =
+    bfd_get_16 (abfd, note->descdata + TILEPRO_PRSTATUS_OFFSET_PR_CURSIG);
+
+  /* pr_pid */
+  elf_tdata (abfd)->core_pid =
+    bfd_get_32 (abfd, note->descdata + TILEPRO_PRSTATUS_OFFSET_PR_PID);
+
+  /* pr_reg */
+  offset = TILEPRO_PRSTATUS_OFFSET_PR_REG;
+  size   = TILEPRO_GREGSET_T_SIZE;
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+					  size, note->descpos + offset);
+}
+
+static bfd_boolean
+tilepro_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  if (note->descsz != TILEPRO_PRPSINFO_SIZEOF)
+    return FALSE;
+
+  elf_tdata (abfd)->core_program
+    = _bfd_elfcore_strndup (abfd,
+			    note->descdata + TILEPRO_PRPSINFO_OFFSET_PR_FNAME,
+			    16);
+  elf_tdata (abfd)->core_command
+    = _bfd_elfcore_strndup (abfd,
+			    note->descdata + TILEPRO_PRPSINFO_OFFSET_PR_PSARGS,
+			    ELF_PR_PSARGS_SIZE);
+
+
+  /* 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;
+}
+
+
+static void
+tilepro_elf_append_rela_32 (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
+{
+  Elf32_External_Rela *loc32;
+
+  loc32 = (Elf32_External_Rela *) s->contents;
+  loc32 += s->reloc_count++;
+  bfd_elf32_swap_reloca_out (abfd, rel, (bfd_byte *) loc32);
+}
+
+/* PLT/GOT stuff */
+
+/* The procedure linkage table starts with the following header:
+
+   {
+    rli     r29, r29, 16
+    lwadd   r28, r27, 4
+   }
+    lw      r27, r27
+   {
+    info    10            ## SP not offset, return PC in LR
+    jr      r27
+   }
+
+   Subsequent entries are the following, jumping to the header at the end:
+
+   lnk     r28
+1:
+   {
+    auli    r28, r28, <_GLOBAL_OFFSET_TABLE_ - 1b + MY_GOT_OFFSET>
+    auli    r27, r28, <_GLOBAL_OFFSET_TABLE_ - 1b>
+   }
+   {
+    addli   r28, r28, <_GLOBAL_OFFSET_TABLE_ - 1b + MY_GOT_OFFSET>
+    addli   r27, r27, <_GLOBAL_OFFSET_TABLE_ - 1b>
+   }
+   {
+    auli    r29, zero, MY_PLT_INDEX
+    lw      r28, r28
+   }
+   {
+    info    10            ## SP not offset, return PC in LR
+    jr      r28
+   }
+
+   We initially store MY_PLT_INDEX in the high bits so that we can use the all
+   16 bits as an unsigned offset; if we use the low bits we would get an
+   unwanted sign extension.  The PLT header then rotates the index to get the
+   right value, before calling the resolution routine.  This computation can
+   fit in unused bundle slots so it's free.
+
+   This code sequence lets the code at at the start of the PLT determine
+   which PLT entry was executed by examining 'r29'.
+
+   Note that MY_PLT_INDEX skips over the header entries, so the first
+   actual jump table entry has index zero.
+*/
+
+#define PLT_HEADER_SIZE_IN_BUNDLES 3
+#define PLT_ENTRY_SIZE_IN_BUNDLES  5
+
+#define PLT_HEADER_SIZE \
+  (PLT_HEADER_SIZE_IN_BUNDLES * TILEPRO_BUNDLE_SIZE_IN_BYTES)
+#define PLT_ENTRY_SIZE \
+  (PLT_ENTRY_SIZE_IN_BUNDLES * TILEPRO_BUNDLE_SIZE_IN_BYTES)
+
+/* The size in bytes of an entry in the global offset table.  */
+
+#define GOT_ENTRY_SIZE TILEPRO_BYTES_PER_WORD
+
+#define GOTPLT_HEADER_SIZE (2 * GOT_ENTRY_SIZE)
+
+
+static const bfd_byte
+tilepro_plt0_entry[PLT_HEADER_SIZE] =
+{
+  0x5d, 0x07, 0x03, 0x70,
+  0x6e, 0x23, 0xd0, 0x30, /* { rli r29, r29, 16 ; lwadd r28, r27, 4 } */
+  0x00, 0x50, 0xba, 0x6d,
+  0x00, 0x08, 0x6d, 0xdc, /* { lw r27, r27 } */
+  0xff, 0xaf, 0x10, 0x50,
+  0x60, 0x03, 0x18, 0x08, /* { info 10 ; jr r27 } */
+};
+
+static const bfd_byte
+tilepro_short_plt_entry[PLT_ENTRY_SIZE] =
+{
+  0x00, 0x50, 0x16, 0x70,
+  0x0e, 0x00, 0x1a, 0x08, /* { lnk r28 } */
+  0x1c, 0x07, 0x00, 0xa0,
+  0x8d, 0x03, 0x00, 0x18, /* { addli r28, r28, 0 ; addli r27, r28, 0 } */
+  0xdd, 0x0f, 0x00, 0x30,
+  0x8e, 0x73, 0x0b, 0x40, /* { auli r29, zero, 0 ; lw r28, r28 } */
+  0xff, 0xaf, 0x10, 0x50,
+  0x80, 0x03, 0x18, 0x08, /* { info 10 ; jr r28 } */
+  0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00,
+};
+
+static const bfd_byte
+tilepro_long_plt_entry[PLT_ENTRY_SIZE] =
+{
+  0x00, 0x50, 0x16, 0x70,
+  0x0e, 0x00, 0x1a, 0x08, /* { lnk r28 } */
+  0x1c, 0x07, 0x00, 0xb0,
+  0x8d, 0x03, 0x00, 0x20, /* { auli r28, r28, 0 ; auli r27, r28, 0 } */
+  0x1c, 0x07, 0x00, 0xa0,
+  0x6d, 0x03, 0x00, 0x18, /* { addli r28, r28, 0 ; addli r27, r27, 0 } */
+  0xdd, 0x0f, 0x00, 0x30,
+  0x8e, 0x73, 0x0b, 0x40, /* { auli r29, zero, 0 ; lw r28, r28 } */
+  0xff, 0xaf, 0x10, 0x50,
+  0x80, 0x03, 0x18, 0x08, /* { info 10 ; jr r28 } */
+};
+
+static bfd_vma
+tilepro_ha16(bfd_vma vma)
+{
+  return ((vma >> 16) + ((vma >> 15) & 1)) & 0xffff;
+}
+
+static int
+tilepro_plt_entry_build (asection *splt, asection *sgotplt, bfd_vma offset,
+		      bfd_vma *r_offset)
+{
+  int plt_index = (offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+  int got_offset = plt_index * GOT_ENTRY_SIZE + GOTPLT_HEADER_SIZE;
+  tilepro_bundle_bits *pc;
+
+  /* Compute the distance from the got entry to the lnk.  */
+  bfd_signed_vma dist_got_entry = sgotplt->output_section->vma
+    + sgotplt->output_offset
+    + got_offset
+    - splt->output_section->vma
+    - splt->output_offset
+    - offset
+    - TILEPRO_BUNDLE_SIZE_IN_BYTES;
+
+  /* Compute the distance to GOTPLT[0].  */
+  bfd_signed_vma dist_got0 = dist_got_entry - got_offset;
+
+  /* Check whether we can use the short plt entry with 16-bit offset.  */
+  bfd_boolean short_plt_entry =
+    (dist_got_entry <= 0x7fff && dist_got0 >= -0x8000);
+
+  /* Copy the plt entry template.  */
+  memcpy (splt->contents + offset,
+	  short_plt_entry ? tilepro_short_plt_entry : tilepro_long_plt_entry,
+	  PLT_ENTRY_SIZE);
+
+  /* Write the immediate offsets.  */
+  pc = (tilepro_bundle_bits *)(splt->contents + offset);
+  pc++;
+
+  if (!short_plt_entry)
+    {
+      /* { auli r28, r28, &GOTPLT[MY_GOT_INDEX] ; auli r27, r28, &GOTPLT[0] } */
+      *pc++ |= create_Imm16_X0 (tilepro_ha16 (dist_got_entry))
+	| create_Imm16_X1 (tilepro_ha16 (dist_got0));
+    }
+
+  /* { addli r28, r28, &GOTPLT[MY_GOT_INDEX] ; addli r27, r28, &GOTPLT[0] } or
+     { addli r28, r28, &GOTPLT[MY_GOT_INDEX] ; addli r27, r27, &GOTPLT[0] } */
+  *pc++ |= create_Imm16_X0 (dist_got_entry)
+    | create_Imm16_X1 (dist_got0);
+
+  /* { auli r29, zero, MY_PLT_INDEX ; lw r28, r28 } */
+  *pc |= create_Imm16_X0 (plt_index);
+
+  /* Set the relocation offset.  */
+  *r_offset = got_offset;
+
+  return plt_index;
+}
+
+#define TILEPRO_ELF_RELA_BYTES (sizeof(Elf32_External_Rela))
+
+
+/* Create an entry in an TILEPro ELF linker hash table.  */
+
+static struct bfd_hash_entry *
+link_hash_newfunc (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 tilepro_elf_link_hash_entry));
+      if (entry == NULL)
+	return entry;
+    }
+
+  /* Call the allocation method of the superclass.  */
+  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+  if (entry != NULL)
+    {
+      struct tilepro_elf_link_hash_entry *eh;
+
+      eh = (struct tilepro_elf_link_hash_entry *) entry;
+      eh->dyn_relocs = NULL;
+      eh->tls_type = GOT_UNKNOWN;
+    }
+
+  return entry;
+}
+
+/* Create a TILEPRO ELF linker hash table.  */
+
+static struct bfd_link_hash_table *
+tilepro_elf_link_hash_table_create (bfd *abfd)
+{
+  struct tilepro_elf_link_hash_table *ret;
+  bfd_size_type amt = sizeof (struct tilepro_elf_link_hash_table);
+
+  ret = (struct tilepro_elf_link_hash_table *) bfd_zmalloc (amt);
+  if (ret == NULL)
+    return NULL;
+
+  if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+				      sizeof (struct tilepro_elf_link_hash_entry),
+				      TILEPRO_ELF_DATA))
+    {
+      free (ret);
+      return NULL;
+    }
+
+  return &ret->elf.root;
+}
+
+/* Create the .got section.  */
+
+static bfd_boolean
+tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
+{
+  flagword flags;
+  asection *s, *s_got;
+  struct elf_link_hash_entry *h;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  /* This function may be called more than once.  */
+  s = bfd_get_section_by_name (abfd, ".got");
+  if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0)
+    return TRUE;
+
+  flags = bed->dynamic_sec_flags;
+
+  s = bfd_make_section_with_flags (abfd,
+				   (bed->rela_plts_and_copies_p
+				    ? ".rela.got" : ".rel.got"),
+				   (bed->dynamic_sec_flags
+				    | SEC_READONLY));
+  if (s == NULL
+      || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+    return FALSE;
+  htab->srelgot = s;
+
+  s = s_got = bfd_make_section_with_flags (abfd, ".got", flags);
+  if (s == NULL
+      || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+    return FALSE;
+  htab->sgot = s;
+
+  /* The first bit of the global offset table is the header.  */
+  s->size += bed->got_header_size;
+
+  if (bed->want_got_plt)
+    {
+      s = bfd_make_section_with_flags (abfd, ".got.plt", flags);
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s,
+					 bed->s->log_file_align))
+	return FALSE;
+      htab->sgotplt = s;
+
+      /* Reserve room for the header.  */
+      s->size += GOTPLT_HEADER_SIZE;
+    }
+
+  if (bed->want_got_sym)
+    {
+      /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
+	 section.  We don't do this in the linker script because we don't want
+	 to define the symbol if we are not creating a global offset
+	 table.  */
+      h = _bfd_elf_define_linkage_sym (abfd, info, s_got,
+				       "_GLOBAL_OFFSET_TABLE_");
+      elf_hash_table (info)->hgot = h;
+      if (h == NULL)
+	return FALSE;
+    }
+
+  return TRUE;
+}
+
+/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and
+   .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
+   hash table.  */
+
+static bfd_boolean
+tilepro_elf_create_dynamic_sections (bfd *dynobj,
+				     struct bfd_link_info *info)
+{
+  struct tilepro_elf_link_hash_table *htab;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (!tilepro_elf_create_got_section (dynobj, info))
+    return FALSE;
+
+  if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+    return FALSE;
+
+  htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+  if (!info->shared)
+    htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+
+  if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
+      || (!info->shared && !htab->srelbss))
+    abort ();
+
+  return TRUE;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry.  */
+
+static void
+tilepro_elf_copy_indirect_symbol (struct bfd_link_info *info,
+				  struct elf_link_hash_entry *dir,
+				  struct elf_link_hash_entry *ind)
+{
+  struct tilepro_elf_link_hash_entry *edir, *eind;
+
+  edir = (struct tilepro_elf_link_hash_entry *) dir;
+  eind = (struct tilepro_elf_link_hash_entry *) ind;
+
+  if (eind->dyn_relocs != NULL)
+    {
+      if (edir->dyn_relocs != NULL)
+	{
+	  struct tilepro_elf_dyn_relocs **pp;
+	  struct tilepro_elf_dyn_relocs *p;
+
+	  /* Add reloc counts against the indirect sym to the direct sym
+	     list.  Merge any entries against the same section.  */
+	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      struct tilepro_elf_dyn_relocs *q;
+
+	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
+		if (q->sec == p->sec)
+		  {
+		    q->pc_count += p->pc_count;
+		    q->count += p->count;
+		    *pp = p->next;
+		    break;
+		  }
+	      if (q == NULL)
+		pp = &p->next;
+	    }
+	  *pp = edir->dyn_relocs;
+	}
+
+      edir->dyn_relocs = eind->dyn_relocs;
+      eind->dyn_relocs = NULL;
+    }
+
+  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 (info, dir, ind);
+}
+
+/* Look through the relocs for a section during the first phase, and
+   allocate space in the global offset table or procedure linkage
+   table.  */
+
+static bfd_boolean
+tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+			  asection *sec, const Elf_Internal_Rela *relocs)
+{
+  struct tilepro_elf_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  const Elf_Internal_Rela *rel;
+  const Elf_Internal_Rela *rel_end;
+  asection *sreloc;
+  int num_relocs;
+
+  if (info->relocatable)
+    return TRUE;
+
+  htab = tilepro_elf_hash_table (info);
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (abfd);
+
+  sreloc = NULL;
+
+  num_relocs = sec->reloc_count;
+
+  BFD_ASSERT (is_tilepro_elf (abfd) || num_relocs == 0);
+
+  if (htab->elf.dynobj == NULL)
+    htab->elf.dynobj = abfd;
+
+  rel_end = relocs + num_relocs;
+  for (rel = relocs; rel < rel_end; rel++)
+    {
+      unsigned int r_type;
+      unsigned long r_symndx;
+      struct elf_link_hash_entry *h;
+      int tls_type;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+	{
+	  (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+				 abfd, r_symndx);
+	  return FALSE;
+	}
+
+      if (r_symndx < symtab_hdr->sh_info)
+	h = NULL;
+      else
+	{
+	  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;
+	}
+
+      switch (r_type)
+	{
+        case R_TILEPRO_IMM16_X0_TLS_GD:
+        case R_TILEPRO_IMM16_X1_TLS_GD:
+        case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+          tls_type = GOT_TLS_GD;
+          goto have_got_reference;
+
+        case R_TILEPRO_IMM16_X0_TLS_IE:
+        case R_TILEPRO_IMM16_X1_TLS_IE:
+        case R_TILEPRO_IMM16_X0_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X1_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+          tls_type = GOT_TLS_IE;
+          if (info->shared)
+            info->flags |= DF_STATIC_TLS;
+          goto have_got_reference;
+
+        case R_TILEPRO_IMM16_X0_GOT:
+        case R_TILEPRO_IMM16_X1_GOT:
+        case R_TILEPRO_IMM16_X0_GOT_LO:
+        case R_TILEPRO_IMM16_X1_GOT_LO:
+        case R_TILEPRO_IMM16_X0_GOT_HI:
+        case R_TILEPRO_IMM16_X1_GOT_HI:
+        case R_TILEPRO_IMM16_X0_GOT_HA:
+        case R_TILEPRO_IMM16_X1_GOT_HA:
+           tls_type = GOT_NORMAL;
+           /* Fall Through */
+
+        have_got_reference:
+	  /* This symbol requires a global offset table entry.  */
+	  {
+            int old_tls_type;
+
+	    if (h != NULL)
+	      {
+		h->got.refcount += 1;
+		old_tls_type = tilepro_elf_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;
+		    _bfd_tilepro_elf_local_got_tls_type (abfd)
+		      = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+		  }
+		local_got_refcounts[r_symndx] += 1;
+		old_tls_type =
+		  _bfd_tilepro_elf_local_got_tls_type (abfd) [r_symndx];
+	      }
+
+	    /* If a TLS symbol is accessed using IE at least once,
+	       there is no point to use dynamic model for it.  */
+	    if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
+		&& (old_tls_type != GOT_TLS_GD
+		    || tls_type != GOT_TLS_IE))
+	      {
+		if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
+		  tls_type = old_tls_type;
+		else
+		  {
+		    (*_bfd_error_handler)
+		      (_("%B: `%s' accessed both as normal and thread local symbol"),
+		       abfd, h ? h->root.root.string : "<local>");
+		    return FALSE;
+		  }
+	      }
+
+	    if (old_tls_type != tls_type)
+	      {
+		if (h != NULL)
+		  tilepro_elf_hash_entry (h)->tls_type = tls_type;
+		else
+		  _bfd_tilepro_elf_local_got_tls_type (abfd) [r_symndx] =
+		    tls_type;
+	      }
+	  }
+
+	  if (htab->elf.sgot == NULL)
+	    {
+	      if (!tilepro_elf_create_got_section (htab->elf.dynobj, info))
+		return FALSE;
+	    }
+	  break;
+
+        case R_TILEPRO_JOFFLONG_X1_PLT:
+	  /* 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.  */
+
+	  if (h != NULL)
+            {
+              h->needs_plt = 1;
+              h->plt.refcount += 1;
+            }
+	  break;
+
+        case R_TILEPRO_32_PCREL:
+        case R_TILEPRO_16_PCREL:
+        case R_TILEPRO_8_PCREL:
+        case R_TILEPRO_IMM16_X0_PCREL:
+        case R_TILEPRO_IMM16_X1_PCREL:
+        case R_TILEPRO_IMM16_X0_LO_PCREL:
+        case R_TILEPRO_IMM16_X1_LO_PCREL:
+        case R_TILEPRO_IMM16_X0_HI_PCREL:
+        case R_TILEPRO_IMM16_X1_HI_PCREL:
+        case R_TILEPRO_IMM16_X0_HA_PCREL:
+        case R_TILEPRO_IMM16_X1_HA_PCREL:
+	  if (h != NULL)
+	    h->non_got_ref = 1;
+
+	  if (h != NULL
+	      && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+	    break;
+	  /* Fall through.  */
+
+        case R_TILEPRO_32:
+        case R_TILEPRO_16:
+        case R_TILEPRO_8:
+        case R_TILEPRO_LO16:
+        case R_TILEPRO_HI16:
+        case R_TILEPRO_HA16:
+        case R_TILEPRO_COPY:
+        case R_TILEPRO_GLOB_DAT:
+        case R_TILEPRO_JMP_SLOT:
+        case R_TILEPRO_RELATIVE:
+        case R_TILEPRO_BROFF_X1:
+        case R_TILEPRO_JOFFLONG_X1:
+        case R_TILEPRO_IMM8_X0:
+        case R_TILEPRO_IMM8_Y0:
+        case R_TILEPRO_IMM8_X1:
+        case R_TILEPRO_IMM8_Y1:
+        case R_TILEPRO_DEST_IMM8_X1:
+        case R_TILEPRO_MT_IMM15_X1:
+        case R_TILEPRO_MF_IMM15_X1:
+        case R_TILEPRO_IMM16_X0:
+        case R_TILEPRO_IMM16_X1:
+        case R_TILEPRO_IMM16_X0_LO:
+        case R_TILEPRO_IMM16_X1_LO:
+        case R_TILEPRO_IMM16_X0_HI:
+        case R_TILEPRO_IMM16_X1_HI:
+        case R_TILEPRO_IMM16_X0_HA:
+        case R_TILEPRO_IMM16_X1_HA:
+        case R_TILEPRO_MMSTART_X0:
+        case R_TILEPRO_MMEND_X0:
+        case R_TILEPRO_MMSTART_X1:
+        case R_TILEPRO_MMEND_X1:
+        case R_TILEPRO_SHAMT_X0:
+        case R_TILEPRO_SHAMT_X1:
+        case R_TILEPRO_SHAMT_Y0:
+        case R_TILEPRO_SHAMT_Y1:
+	  if (h != NULL)
+            {
+              h->non_got_ref = 1;
+
+              if (!info->shared)
+                {
+                  /* We may need a .plt entry if the function this reloc
+                     refers to is in a shared lib.  */
+                  h->plt.refcount += 1;
+                }
+            }
+
+	  /* If we are creating a shared library, and this is a reloc
+	     against a global symbol, or a non PC relative reloc
+	     against a local symbol, then we need to copy the reloc
+	     into the shared library.  However, if we are linking with
+	     -Bsymbolic, we do not need to copy a reloc against a
+	     global symbol which is defined in an object we are
+	     including in the link (i.e., DEF_REGULAR is set).  At
+	     this point we have not seen all the input files, so it is
+	     possible that DEF_REGULAR is not set now but will be set
+	     later (it is never cleared).  In case of a weak definition,
+	     DEF_REGULAR may be cleared later by a strong definition in
+	     a shared library.  We account for that possibility below by
+	     storing information in the relocs_copied field of the hash
+	     table entry.  A similar situation occurs when creating
+	     shared libraries and symbol visibility changes render the
+	     symbol local.
+
+	     If on the other hand, we are creating an executable, we
+	     may need to keep relocations for symbols satisfied by a
+	     dynamic library if we manage to avoid copy relocs for the
+	     symbol.  */
+	  if ((info->shared
+	       && (sec->flags & SEC_ALLOC) != 0
+	       && (! tilepro_elf_howto_table[r_type].pc_relative
+		   || (h != NULL
+		       && (! info->symbolic
+			   || h->root.type == bfd_link_hash_defweak
+			   || !h->def_regular))))
+	      || (!info->shared
+		  && (sec->flags & SEC_ALLOC) != 0
+		  && h != NULL
+		  && (h->root.type == bfd_link_hash_defweak
+		      || !h->def_regular)))
+	    {
+	      struct tilepro_elf_dyn_relocs *p;
+	      struct tilepro_elf_dyn_relocs **head;
+
+	      /* When creating a shared object, we must copy these
+		 relocs into the output file.  We create a reloc
+		 section in dynobj and make room for the reloc.  */
+	      if (sreloc == NULL)
+		{
+		  sreloc = _bfd_elf_make_dynamic_reloc_section
+		    (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE);
+
+		  if (sreloc == NULL)
+		    return FALSE;
+		}
+
+	      /* If this is a global symbol, we count the number of
+		 relocations we need for this symbol.  */
+	      if (h != NULL)
+		head =
+                  &((struct tilepro_elf_link_hash_entry *) h)->dyn_relocs;
+	      else
+		{
+		  /* Track dynamic relocs needed for local syms too.
+		     We really need local syms available to do this
+		     easily.  Oh well.  */
+
+		  asection *s;
+		  void *vpp;
+		  Elf_Internal_Sym *isym;
+
+		  isym = bfd_sym_from_r_symndx (&htab->sym_cache,
+						abfd, r_symndx);
+		  if (isym == NULL)
+		    return FALSE;
+
+		  s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+		  if (s == NULL)
+		    s = sec;
+
+		  vpp = &elf_section_data (s)->local_dynrel;
+		  head = (struct tilepro_elf_dyn_relocs **) vpp;
+		}
+
+	      p = *head;
+	      if (p == NULL || p->sec != sec)
+		{
+		  bfd_size_type amt = sizeof *p;
+		  p = ((struct tilepro_elf_dyn_relocs *)
+		       bfd_alloc (htab->elf.dynobj, amt));
+		  if (p == NULL)
+		    return FALSE;
+		  p->next = *head;
+		  *head = p;
+		  p->sec = sec;
+		  p->count = 0;
+		  p->pc_count = 0;
+		}
+
+	      p->count += 1;
+	      if (tilepro_elf_howto_table[r_type].pc_relative)
+		p->pc_count += 1;
+	    }
+
+	  break;
+
+	case R_TILEPRO_GNU_VTINHERIT:
+	  if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+	    return FALSE;
+	  break;
+
+	case R_TILEPRO_GNU_VTENTRY:
+	  if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+	    return FALSE;
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+
+static asection *
+tilepro_elf_gc_mark_hook (asection *sec,
+                          struct bfd_link_info *info,
+                          Elf_Internal_Rela *rel,
+                          struct elf_link_hash_entry *h,
+                          Elf_Internal_Sym *sym)
+{
+  if (h != NULL)
+    {
+      switch (ELF32_R_TYPE (rel->r_info))
+      {
+      case R_TILEPRO_GNU_VTINHERIT:
+      case R_TILEPRO_GNU_VTENTRY:
+	break;
+      }
+    }
+
+  return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+}
+
+/* Update the got entry reference counts for the section being removed.  */
+static bfd_boolean
+tilepro_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+			   asection *sec, const Elf_Internal_Rela *relocs)
+{
+  struct tilepro_elf_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  bfd_signed_vma *local_got_refcounts;
+  const Elf_Internal_Rela *rel, *relend;
+
+  if (info->relocatable)
+    return TRUE;
+
+  BFD_ASSERT (is_tilepro_elf (abfd) || sec->reloc_count == 0);
+
+  elf_section_data (sec)->local_dynrel = NULL;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  symtab_hdr = &elf_symtab_hdr (abfd);
+  sym_hashes = elf_sym_hashes (abfd);
+  local_got_refcounts = elf_local_got_refcounts (abfd);
+
+  relend = relocs + sec->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      unsigned long r_symndx;
+      unsigned int r_type;
+      struct elf_link_hash_entry *h = NULL;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      if (r_symndx >= symtab_hdr->sh_info)
+	{
+	  struct tilepro_elf_link_hash_entry *eh;
+	  struct tilepro_elf_dyn_relocs **pp;
+	  struct tilepro_elf_dyn_relocs *p;
+
+	  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;
+	  eh = (struct tilepro_elf_link_hash_entry *) h;
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+	    if (p->sec == sec)
+	      {
+		/* Everything must go for SEC.  */
+		*pp = p->next;
+		break;
+	      }
+	}
+
+      r_type = ELF32_R_TYPE (rel->r_info);
+      switch (r_type)
+	{
+        case R_TILEPRO_IMM16_X0_GOT:
+        case R_TILEPRO_IMM16_X1_GOT:
+        case R_TILEPRO_IMM16_X0_GOT_LO:
+        case R_TILEPRO_IMM16_X1_GOT_LO:
+        case R_TILEPRO_IMM16_X0_GOT_HI:
+        case R_TILEPRO_IMM16_X1_GOT_HI:
+        case R_TILEPRO_IMM16_X0_GOT_HA:
+        case R_TILEPRO_IMM16_X1_GOT_HA:
+        case R_TILEPRO_IMM16_X0_TLS_GD:
+        case R_TILEPRO_IMM16_X1_TLS_GD:
+        case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+        case R_TILEPRO_IMM16_X0_TLS_IE:
+        case R_TILEPRO_IMM16_X1_TLS_IE:
+        case R_TILEPRO_IMM16_X0_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X1_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+	  if (h != NULL)
+	    {
+	      if (h->got.refcount > 0)
+		h->got.refcount--;
+	    }
+	  else
+	    {
+	      if (local_got_refcounts[r_symndx] > 0)
+		local_got_refcounts[r_symndx]--;
+	    }
+	  break;
+
+        case R_TILEPRO_32_PCREL:
+        case R_TILEPRO_16_PCREL:
+        case R_TILEPRO_8_PCREL:
+        case R_TILEPRO_IMM16_X0_PCREL:
+        case R_TILEPRO_IMM16_X1_PCREL:
+        case R_TILEPRO_IMM16_X0_LO_PCREL:
+        case R_TILEPRO_IMM16_X1_LO_PCREL:
+        case R_TILEPRO_IMM16_X0_HI_PCREL:
+        case R_TILEPRO_IMM16_X1_HI_PCREL:
+        case R_TILEPRO_IMM16_X0_HA_PCREL:
+        case R_TILEPRO_IMM16_X1_HA_PCREL:
+	  if (h != NULL
+	      && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+	    break;
+	  /* Fall through.  */
+
+        case R_TILEPRO_32:
+        case R_TILEPRO_16:
+        case R_TILEPRO_8:
+        case R_TILEPRO_LO16:
+        case R_TILEPRO_HI16:
+        case R_TILEPRO_HA16:
+        case R_TILEPRO_COPY:
+        case R_TILEPRO_GLOB_DAT:
+        case R_TILEPRO_JMP_SLOT:
+        case R_TILEPRO_RELATIVE:
+        case R_TILEPRO_BROFF_X1:
+        case R_TILEPRO_JOFFLONG_X1:
+        case R_TILEPRO_IMM8_X0:
+        case R_TILEPRO_IMM8_Y0:
+        case R_TILEPRO_IMM8_X1:
+        case R_TILEPRO_IMM8_Y1:
+        case R_TILEPRO_DEST_IMM8_X1:
+        case R_TILEPRO_MT_IMM15_X1:
+        case R_TILEPRO_MF_IMM15_X1:
+        case R_TILEPRO_IMM16_X0:
+        case R_TILEPRO_IMM16_X1:
+        case R_TILEPRO_IMM16_X0_LO:
+        case R_TILEPRO_IMM16_X1_LO:
+        case R_TILEPRO_IMM16_X0_HI:
+        case R_TILEPRO_IMM16_X1_HI:
+        case R_TILEPRO_IMM16_X0_HA:
+        case R_TILEPRO_IMM16_X1_HA:
+        case R_TILEPRO_MMSTART_X0:
+        case R_TILEPRO_MMEND_X0:
+        case R_TILEPRO_MMSTART_X1:
+        case R_TILEPRO_MMEND_X1:
+        case R_TILEPRO_SHAMT_X0:
+        case R_TILEPRO_SHAMT_X1:
+        case R_TILEPRO_SHAMT_Y0:
+        case R_TILEPRO_SHAMT_Y1:
+	  if (info->shared)
+	    break;
+	  /* Fall through.  */
+
+        case R_TILEPRO_JOFFLONG_X1_PLT:
+	  if (h != NULL)
+	    {
+	      if (h->plt.refcount > 0)
+		h->plt.refcount--;
+	    }
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+   regular object.  The current definition is in some section of the
+   dynamic object, but we're not including those sections.  We have to
+   change the definition to something the rest of the link can
+   understand.  */
+
+static bfd_boolean
+tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+				   struct elf_link_hash_entry *h)
+{
+  struct tilepro_elf_link_hash_table *htab;
+  struct tilepro_elf_link_hash_entry * eh;
+  struct tilepro_elf_dyn_relocs *p;
+  asection *s;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  /* Make sure we know what is going on here.  */
+  BFD_ASSERT (htab->elf.dynobj != NULL
+	      && (h->needs_plt
+		  || h->u.weakdef != NULL
+		  || (h->def_dynamic
+		      && h->ref_regular
+		      && !h->def_regular)));
+
+  /* If this is a function, put it in the procedure linkage table.  We
+     will fill in the contents of the procedure linkage table later
+     (although we could actually do it here). */
+  if (h->type == STT_FUNC || h->needs_plt)
+    {
+      if (h->plt.refcount <= 0
+	  || SYMBOL_CALLS_LOCAL (info, h)
+	  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+	      && h->root.type == bfd_link_hash_undefweak))
+	{
+	  /* This case can occur if we saw a R_TILEPRO_JOFFLONG_X1_PLT
+             reloc in an input file, but the symbol was never referred
+             to by a dynamic object, or if all references were garbage
+             collected.  In such a case, we don't actually need to build
+             a procedure linkage table, and we can just do a
+             R_TILEPRO_JOFFLONG_X1 relocation instead. */
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+
+      return TRUE;
+    }
+  else
+    h->plt.offset = (bfd_vma) -1;
+
+  /* If this is a weak symbol, and there is a real definition, the
+     processor independent code will have arranged for us to see the
+     real definition first, and we can just use the same value.  */
+  if (h->u.weakdef != NULL)
+    {
+      BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
+		  || h->u.weakdef->root.type == bfd_link_hash_defweak);
+      h->root.u.def.section = h->u.weakdef->root.u.def.section;
+      h->root.u.def.value = h->u.weakdef->root.u.def.value;
+      return TRUE;
+    }
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
+  /* If we are creating a shared library, we must presume that the
+     only references to the symbol are via the global offset table.
+     For such cases we need not do anything here; the relocations will
+     be handled correctly by relocate_section.  */
+  if (info->shared)
+    return TRUE;
+
+  /* If there are no references to this symbol that do not use the
+     GOT, we don't need to generate a copy reloc.  */
+  if (!h->non_got_ref)
+    return TRUE;
+
+  /* If -z nocopyreloc was given, we won't generate them either.  */
+  if (info->nocopyreloc)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  eh = (struct tilepro_elf_link_hash_entry *) h;
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      s = p->sec->output_section;
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+	break;
+    }
+
+  /* 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.  */
+  if (p == NULL)
+    {
+      h->non_got_ref = 0;
+      return TRUE;
+    }
+
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+			     h->root.root.string);
+      return TRUE;
+    }
+
+  /* We must allocate the symbol in our .dynbss section, which will
+     become part of the .bss section of the executable.  There will be
+     an entry for this symbol in the .dynsym section.  The dynamic
+     object will contain position independent code, so all references
+     from the dynamic object to this symbol will go through the global
+     offset table.  The dynamic linker will use the .dynsym entry to
+     determine the address it must put in the global offset table, so
+     both the dynamic object and the regular object will refer to the
+     same memory location for the variable.  */
+
+  /* We must generate a R_TILEPRO_COPY reloc to tell the dynamic linker
+     to copy the initial value out of the dynamic object and into the
+     runtime process image.  We need to remember the offset into the
+     .rel.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+    {
+      htab->srelbss->size += TILEPRO_ELF_RELA_BYTES;
+      h->needs_copy = 1;
+    }
+
+  return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss);
+}
+
+/* Allocate space in .plt, .got and associated reloc sections for
+   dynamic relocs.  */
+
+static bfd_boolean
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct bfd_link_info *info;
+  struct tilepro_elf_link_hash_table *htab;
+  struct tilepro_elf_link_hash_entry *eh;
+  struct tilepro_elf_dyn_relocs *p;
+
+  if (h->root.type == bfd_link_hash_indirect)
+    return TRUE;
+
+  info = (struct bfd_link_info *) inf;
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (htab->elf.dynamic_sections_created
+      && h->plt.refcount > 0)
+    {
+      /* Make sure this symbol is output as a dynamic symbol.
+	 Undefined weak syms won't yet be marked as dynamic.  */
+      if (h->dynindx == -1
+	  && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+	{
+	  asection *s = htab->elf.splt;
+
+	  /* Allocate room for the header.  */
+	  if (s->size == 0)
+	    {
+	      s->size = PLT_HEADER_SIZE;
+	    }
+
+          h->plt.offset = s->size;
+
+	  /* If this symbol is not defined in a regular file, and we are
+	     not generating a shared library, then set the symbol to this
+	     location in the .plt.  This is required to make function
+	     pointers compare as equal between the normal executable and
+	     the shared library.  */
+	  if (! info->shared
+	      && !h->def_regular)
+	    {
+	      h->root.u.def.section = s;
+	      h->root.u.def.value = h->plt.offset;
+	    }
+
+	  /* Make room for this entry.  */
+	  s->size += PLT_ENTRY_SIZE;
+
+	  /* We also need to make an entry in the .got.plt section.  */
+	  htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
+
+	  /* We also need to make an entry in the .rela.plt section.  */
+	  htab->elf.srelplt->size += TILEPRO_ELF_RELA_BYTES;
+	}
+      else
+	{
+	  h->plt.offset = (bfd_vma) -1;
+	  h->needs_plt = 0;
+	}
+    }
+  else
+    {
+      h->plt.offset = (bfd_vma) -1;
+      h->needs_plt = 0;
+    }
+
+  if (h->got.refcount > 0)
+    {
+      asection *s;
+      bfd_boolean dyn;
+      int tls_type = tilepro_elf_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.  */
+      if (h->dynindx == -1
+	  && !h->forced_local)
+	{
+	  if (! bfd_elf_link_record_dynamic_symbol (info, h))
+	    return FALSE;
+	}
+
+      s = htab->elf.sgot;
+      h->got.offset = s->size;
+      s->size += TILEPRO_BYTES_PER_WORD;
+      /* R_TILEPRO_IMM16_Xn_TLS_GD entries need 2 consecutive GOT slots. */
+      if (tls_type == GOT_TLS_GD)
+	s->size += TILEPRO_BYTES_PER_WORD;
+      dyn = htab->elf.dynamic_sections_created;
+      /* R_TILEPRO_IMM16_Xn_TLS_IE_xxx needs one dynamic relocation,
+	 R_TILEPRO_IMM16_Xn_TLS_GD_xxx needs two if local symbol and two if
+	 global.  */
+      if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE)
+	htab->elf.srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES;
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+	htab->elf.srelgot->size += TILEPRO_ELF_RELA_BYTES;
+    }
+  else
+    h->got.offset = (bfd_vma) -1;
+
+  eh = (struct tilepro_elf_link_hash_entry *) h;
+  if (eh->dyn_relocs == NULL)
+    return TRUE;
+
+  /* In the shared -Bsymbolic case, discard space allocated for
+     dynamic pc-relative relocs against symbols which turn out to be
+     defined in regular objects.  For the normal shared case, discard
+     space for pc-relative relocs that have become local due to symbol
+     visibility changes.  */
+
+  if (info->shared)
+    {
+      if (SYMBOL_CALLS_LOCAL (info, h))
+	{
+	  struct tilepro_elf_dyn_relocs **pp;
+
+	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      p->count -= p->pc_count;
+	      p->pc_count = 0;
+	      if (p->count == 0)
+		*pp = p->next;
+	      else
+		pp = &p->next;
+	    }
+	}
+
+      /* Also discard relocs on undefined weak syms with non-default
+	 visibility.  */
+      if (eh->dyn_relocs != NULL
+	  && h->root.type == bfd_link_hash_undefweak)
+	{
+	  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+	    eh->dyn_relocs = NULL;
+
+	  /* Make sure undefined weak symbols are output as a dynamic
+	     symbol in PIEs.  */
+	  else if (h->dynindx == -1
+		   && !h->forced_local)
+	    {
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+	    }
+	}
+    }
+  else
+    {
+      /* For the non-shared case, discard space for relocs against
+	 symbols which turn out to need copy relocs or are not
+	 dynamic.  */
+
+      if (!h->non_got_ref
+	  && ((h->def_dynamic
+	       && !h->def_regular)
+	      || (htab->elf.dynamic_sections_created
+		  && (h->root.type == bfd_link_hash_undefweak
+		      || h->root.type == bfd_link_hash_undefined))))
+	{
+	  /* Make sure this symbol is output as a dynamic symbol.
+	     Undefined weak syms won't yet be marked as dynamic.  */
+	  if (h->dynindx == -1
+	      && !h->forced_local)
+	    {
+	      if (! bfd_elf_link_record_dynamic_symbol (info, h))
+		return FALSE;
+	    }
+
+	  /* If that succeeded, we know we'll be keeping all the
+	     relocs.  */
+	  if (h->dynindx != -1)
+	    goto keep;
+	}
+
+      eh->dyn_relocs = NULL;
+
+    keep: ;
+    }
+
+  /* Finally, allocate space.  */
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *sreloc = elf_section_data (p->sec)->sreloc;
+      sreloc->size += p->count * TILEPRO_ELF_RELA_BYTES;
+    }
+
+  return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections.  */
+
+static bfd_boolean
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+{
+  struct tilepro_elf_link_hash_entry *eh;
+  struct tilepro_elf_dyn_relocs *p;
+
+  eh = (struct tilepro_elf_link_hash_entry *) h;
+  for (p = eh->dyn_relocs; p != NULL; p = p->next)
+    {
+      asection *s = p->sec->output_section;
+
+      if (s != NULL && (s->flags & SEC_READONLY) != 0)
+	{
+	  struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+	  info->flags |= DF_TEXTREL;
+
+	  /* Not an error, just cut short the traversal.  */
+	  return FALSE;
+	}
+    }
+  return TRUE;
+}
+
+/* Return true if the dynamic symbol for a given section should be
+   omitted when creating a shared library.  */
+
+static bfd_boolean
+tilepro_elf_omit_section_dynsym (bfd *output_bfd,
+				    struct bfd_link_info *info,
+				    asection *p)
+{
+  /* We keep the .got section symbol so that explicit relocations
+     against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode
+     can be turned into relocations against the .got symbol.  */
+  if (strcmp (p->name, ".got") == 0)
+    return FALSE;
+
+  return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
+}
+
+/* Set the sizes of the dynamic sections.  */
+
+#define ELF32_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+
+static bfd_boolean
+tilepro_elf_size_dynamic_sections (bfd *output_bfd,
+				      struct bfd_link_info *info)
+{
+  (void)output_bfd;
+
+  struct tilepro_elf_link_hash_table *htab;
+  bfd *dynobj;
+  asection *s;
+  bfd *ibfd;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  dynobj = htab->elf.dynobj;
+  BFD_ASSERT (dynobj != NULL);
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Set the contents of the .interp section to the interpreter.  */
+      if (info->executable)
+	{
+	  s = bfd_get_section_by_name (dynobj, ".interp");
+	  BFD_ASSERT (s != NULL);
+	  s->size = sizeof ELF32_DYNAMIC_INTERPRETER;
+	  s->contents = (unsigned char *) ELF32_DYNAMIC_INTERPRETER;
+	}
+    }
+
+  /* Set up .got offsets for local syms, and space for local dynamic
+     relocs.  */
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    {
+      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;
+
+      if (! is_tilepro_elf (ibfd))
+	continue;
+
+      for (s = ibfd->sections; s != NULL; s = s->next)
+	{
+	  struct tilepro_elf_dyn_relocs *p;
+
+	  for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
+	    {
+	      if (!bfd_is_abs_section (p->sec)
+		  && bfd_is_abs_section (p->sec->output_section))
+		{
+		  /* Input section has been discarded, either because
+		     it is a copy of a linkonce section or due to
+		     linker script /DISCARD/, so we'll be discarding
+		     the relocs too.  */
+		}
+	      else if (p->count != 0)
+		{
+		  srel = elf_section_data (p->sec)->sreloc;
+		  srel->size += p->count * TILEPRO_ELF_RELA_BYTES;
+		  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
+		    info->flags |= DF_TEXTREL;
+		}
+	    }
+	}
+
+      local_got = elf_local_got_refcounts (ibfd);
+      if (!local_got)
+	continue;
+
+      symtab_hdr = &elf_symtab_hdr (ibfd);
+      locsymcount = symtab_hdr->sh_info;
+      end_local_got = local_got + locsymcount;
+      local_tls_type = _bfd_tilepro_elf_local_got_tls_type (ibfd);
+      s = htab->elf.sgot;
+      srel = htab->elf.srelgot;
+      for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+	{
+	  if (*local_got > 0)
+	    {
+	      *local_got = s->size;
+	      s->size += TILEPRO_BYTES_PER_WORD;
+	      if (*local_tls_type == GOT_TLS_GD)
+		s->size += TILEPRO_BYTES_PER_WORD;
+	      if (info->shared
+		  || *local_tls_type == GOT_TLS_GD
+		  || *local_tls_type == GOT_TLS_IE)
+		srel->size += TILEPRO_ELF_RELA_BYTES;
+	    }
+	  else
+	    *local_got = (bfd_vma) -1;
+	}
+    }
+
+  /* Allocate global sym .plt and .got entries, and space for global
+     sym dynamic relocs.  */
+  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* If the .got section is more than 0x8000 bytes, we add
+	 0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16
+	 bit relocations have a greater chance of working. */
+      if (htab->elf.sgot->size >= 0x8000
+	  && elf_hash_table (info)->hgot->root.u.def.value == 0)
+	elf_hash_table (info)->hgot->root.u.def.value = 0x8000;
+    }
+
+  if (htab->elf.sgotplt)
+    {
+      struct elf_link_hash_entry *got;
+      got = elf_link_hash_lookup (elf_hash_table (info),
+				  "_GLOBAL_OFFSET_TABLE_",
+				  FALSE, FALSE, FALSE);
+
+      /* Don't allocate .got.plt section if there are no GOT nor PLT
+         entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.  */
+      if ((got == NULL
+	   || !got->ref_regular_nonweak)
+	  && (htab->elf.sgotplt->size
+	      == GOTPLT_HEADER_SIZE)
+	  && (htab->elf.splt == NULL
+	      || htab->elf.splt->size == 0)
+	  && (htab->elf.sgot == NULL
+	      || (htab->elf.sgot->size
+		  == get_elf_backend_data (output_bfd)->got_header_size)))
+	htab->elf.sgotplt->size = 0;
+    }
+
+  /* The check_relocs and adjust_dynamic_symbol entry points have
+     determined the sizes of the various dynamic sections.  Allocate
+     memory for them.  */
+  for (s = dynobj->sections; s != NULL; s = s->next)
+    {
+      if ((s->flags & SEC_LINKER_CREATED) == 0)
+	continue;
+
+      if (s == htab->elf.splt
+	  || s == htab->elf.sgot
+	  || s == htab->elf.sgotplt
+	  || s == htab->sdynbss)
+	{
+	  /* Strip this section if we don't need it; see the
+	     comment below.  */
+	}
+      else if (strncmp (s->name, ".rela", 5) == 0)
+	{
+	  if (s->size != 0)
+	    {
+	      /* We use the reloc_count field as a counter if we need
+		 to copy relocs into the output file.  */
+	      s->reloc_count = 0;
+	    }
+	}
+      else
+	{
+	  /* It's not one of our sections.  */
+	  continue;
+	}
+
+      if (s->size == 0)
+	{
+	  /* If we don't need this section, strip it from the
+	     output file.  This is mostly to handle .rela.bss and
+	     .rela.plt.  We must create both sections in
+	     create_dynamic_sections, because they must be created
+	     before the linker maps input sections to output
+	     sections.  The linker does that before
+	     adjust_dynamic_symbol is called, and it is that
+	     function which decides whether anything needs to go
+	     into these sections.  */
+	  s->flags |= SEC_EXCLUDE;
+	  continue;
+	}
+
+      if ((s->flags & SEC_HAS_CONTENTS) == 0)
+	continue;
+
+      /* Allocate memory for the section contents.  Zero the memory
+	 for the benefit of .rela.plt, which has 4 unused entries
+	 at the beginning, and we don't want garbage.  */
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+      if (s->contents == NULL)
+	return FALSE;
+    }
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Add some entries to the .dynamic section.  We fill in the
+	 values later, in tilepro_elf_finish_dynamic_sections, but we
+	 must add the entries now so that we get the correct size for
+	 the .dynamic section.  The DT_DEBUG entry is filled in by the
+	 dynamic linker and used by the debugger.  */
+#define add_dynamic_entry(TAG, VAL) \
+  _bfd_elf_add_dynamic_entry (info, TAG, VAL)
+
+      if (info->executable)
+	{
+	  if (!add_dynamic_entry (DT_DEBUG, 0))
+	    return FALSE;
+	}
+
+      if (htab->elf.srelplt->size != 0)
+	{
+	  if (!add_dynamic_entry (DT_PLTGOT, 0)
+	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
+	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+	      || !add_dynamic_entry (DT_JMPREL, 0))
+	    return FALSE;
+	}
+
+      if (!add_dynamic_entry (DT_RELA, 0)
+	  || !add_dynamic_entry (DT_RELASZ, 0)
+	  || !add_dynamic_entry (DT_RELAENT, TILEPRO_ELF_RELA_BYTES))
+	return FALSE;
+
+      /* If any dynamic relocs apply to a read-only section,
+	 then we need a DT_TEXTREL entry.  */
+      if ((info->flags & DF_TEXTREL) == 0)
+	elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
+
+      if (info->flags & DF_TEXTREL)
+	{
+	  if (!add_dynamic_entry (DT_TEXTREL, 0))
+	    return FALSE;
+	}
+    }
+#undef add_dynamic_entry
+
+  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 (struct bfd_link_info *info)
+{
+  /* If tls_sec is NULL, we should have signalled an error already.  */
+  if (elf_hash_table (info)->tls_sec == NULL)
+    return 0;
+  return elf_hash_table (info)->tls_sec->vma;
+}
+
+/* Return the relocation value for R_TILEPRO_TLS_TPOFF32. */
+
+static bfd_vma
+tpoff (struct bfd_link_info *info, bfd_vma address)
+{
+  struct elf_link_hash_table *htab = elf_hash_table (info);
+
+  /* If tls_sec is NULL, we should have signalled an error already.  */
+  if (htab->tls_sec == NULL)
+    return 0;
+
+  return (address - htab->tls_sec->vma);
+}
+
+/* Relocate an TILEPRO ELF section.
+
+   The RELOCATE_SECTION function is called by the new ELF backend linker
+   to handle the relocations for a section.
+
+   The relocs are always passed as Rela structures.
+
+   This function is responsible for adjusting the section contents as
+   necessary, and (if generating a relocatable output file) adjusting
+   the reloc addend as necessary.
+
+   This function does not have to worry about setting the reloc
+   address or the reloc symbol index.
+
+   LOCAL_SYMS is a pointer to the swapped in local symbols.
+
+   LOCAL_SECTIONS is an array giving the section in the input file
+   corresponding to the st_shndx field of each local symbol.
+
+   The global hash table entry for the global symbols can be found
+   via elf_sym_hashes (input_bfd).
+
+   When generating relocatable output, this function must handle
+   STB_LOCAL/STT_SECTION symbols specially.  The output symbol is
+   going to be the section symbol corresponding to the output
+   section, which means that the addend must be adjusted
+   accordingly.  */
+
+static bfd_boolean
+tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+                              bfd *input_bfd, asection *input_section,
+                              bfd_byte *contents, Elf_Internal_Rela *relocs,
+                              Elf_Internal_Sym *local_syms,
+                              asection **local_sections)
+{
+  struct tilepro_elf_link_hash_table *htab;
+  Elf_Internal_Shdr *symtab_hdr;
+  struct elf_link_hash_entry **sym_hashes;
+  bfd_vma *local_got_offsets;
+  bfd_vma got_base;
+  asection *sreloc;
+  Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *relend;
+  int num_relocs;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  symtab_hdr = &elf_symtab_hdr (input_bfd);
+  sym_hashes = elf_sym_hashes (input_bfd);
+  local_got_offsets = elf_local_got_offsets (input_bfd);
+
+  if (elf_hash_table (info)->hgot == NULL)
+    got_base = 0;
+  else
+    got_base = elf_hash_table (info)->hgot->root.u.def.value;
+
+  sreloc = elf_section_data (input_section)->sreloc;
+
+  rel = relocs;
+  num_relocs = input_section->reloc_count;
+  relend = relocs + num_relocs;
+  for (; rel < relend; rel++)
+    {
+      int r_type, tls_type;
+      reloc_howto_type *howto;
+      unsigned long r_symndx;
+      struct elf_link_hash_entry *h;
+      Elf_Internal_Sym *sym;
+      tilepro_create_func create_func;
+      asection *sec;
+      bfd_vma relocation;
+      bfd_reloc_status_type r;
+      const char *name;
+      bfd_vma off;
+      bfd_boolean is_plt = FALSE;
+
+      bfd_boolean unresolved_reloc;
+
+      r_type = ELF32_R_TYPE (rel->r_info);
+      if (r_type == R_TILEPRO_GNU_VTINHERIT
+	  || r_type == R_TILEPRO_GNU_VTENTRY)
+	continue;
+
+      if ((unsigned int)r_type >= NELEMS(tilepro_elf_howto_table))
+	{
+          /* Not clear if we need to check here, but just be paranoid. */
+	  (*_bfd_error_handler)
+	    (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+	     input_bfd, r_type, input_section);
+	  bfd_set_error (bfd_error_bad_value);
+	  return FALSE;
+	}
+
+      howto = tilepro_elf_howto_table + r_type;
+
+      /* This is a final link.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      h = NULL;
+      sym = NULL;
+      sec = NULL;
+      unresolved_reloc = FALSE;
+      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);
+	}
+      else
+	{
+	  bfd_boolean warned;
+
+	  RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+				   r_symndx, symtab_hdr, sym_hashes,
+				   h, sec, relocation,
+				   unresolved_reloc, warned);
+	  if (warned)
+	    {
+	      /* To avoid generating warning messages about truncated
+		 relocations, set the relocation's address to be the same as
+		 the start of this section.  */
+	      if (input_section->output_section != NULL)
+		relocation = input_section->output_section->vma;
+	      else
+		relocation = 0;
+	    }
+	}
+
+      if (sec != NULL && elf_discarded_section (sec))
+	RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+					 rel, relend, howto, contents);
+
+      if (info->relocatable)
+	continue;
+
+      if (h != NULL)
+	name = h->root.root.string;
+      else
+	{
+	  name = (bfd_elf_string_from_elf_section
+		  (input_bfd, symtab_hdr->sh_link, sym->st_name));
+	  if (name == NULL || *name == '\0')
+	    name = bfd_section_name (input_bfd, sec);
+	}
+
+      switch (r_type)
+	{
+        case R_TILEPRO_IMM16_X0_GOT:
+        case R_TILEPRO_IMM16_X1_GOT:
+        case R_TILEPRO_IMM16_X0_GOT_LO:
+        case R_TILEPRO_IMM16_X1_GOT_LO:
+        case R_TILEPRO_IMM16_X0_GOT_HI:
+        case R_TILEPRO_IMM16_X1_GOT_HI:
+        case R_TILEPRO_IMM16_X0_GOT_HA:
+        case R_TILEPRO_IMM16_X1_GOT_HA:
+	  /* Relocation is to the entry for this symbol in the global
+	     offset table.  */
+	  if (htab->elf.sgot == NULL)
+	    abort ();
+
+	  if (h != NULL)
+	    {
+	      bfd_boolean dyn;
+
+	      off = h->got.offset;
+	      BFD_ASSERT (off != (bfd_vma) -1);
+	      dyn = elf_hash_table (info)->dynamic_sections_created;
+
+	      if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+		  || (info->shared
+		      && SYMBOL_REFERENCES_LOCAL (info, h)))
+		{
+		  /* This is actually a static link, or it is a
+		     -Bsymbolic link and the symbol is defined
+		     locally, or the symbol was forced to be local
+		     because of a version file.  We must initialize
+		     this entry in the global offset table.  Since the
+		     offset must always be a multiple
+		     of 4 for 32-bit, we use the least significant bit
+		     to record whether we have initialized it already.
+
+		     When doing a dynamic link, we create a .rela.got
+		     relocation entry to initialize the value.  This
+		     is done in the finish_dynamic_symbol routine.  */
+		  if ((off & 1) != 0)
+		    off &= ~1;
+		  else
+		    {
+		      bfd_put_32 (output_bfd, relocation,
+					  htab->elf.sgot->contents + off);
+		      h->got.offset |= 1;
+		    }
+		}
+	      else
+		unresolved_reloc = FALSE;
+	    }
+	  else
+	    {
+	      BFD_ASSERT (local_got_offsets != NULL
+			  && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+	      off = local_got_offsets[r_symndx];
+
+	      /* The offset must always be a multiple of 4 on 32-bit.
+                 We use the least significant bit to record
+		 whether we have already processed this entry.  */
+	      if ((off & 1) != 0)
+		off &= ~1;
+	      else
+		{
+		  if (info->shared)
+		    {
+		      asection *s;
+		      Elf_Internal_Rela outrel;
+
+		      /* We need to generate a R_TILEPRO_RELATIVE reloc
+			 for the dynamic linker.  */
+		      s = htab->elf.srelgot;
+		      BFD_ASSERT (s != NULL);
+
+		      outrel.r_offset = (htab->elf.sgot->output_section->vma
+					 + htab->elf.sgot->output_offset
+					 + off);
+		      outrel.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE);
+		      outrel.r_addend = relocation;
+		      relocation = 0;
+		      tilepro_elf_append_rela_32 (output_bfd, s, &outrel);
+		    }
+
+		  bfd_put_32 (output_bfd, relocation,
+				      htab->elf.sgot->contents + off);
+		  local_got_offsets[r_symndx] |= 1;
+		}
+	    }
+	  relocation = htab->elf.sgot->output_offset + off - got_base;
+	  break;
+
+        case R_TILEPRO_JOFFLONG_X1_PLT:
+	  /* Relocation is to the entry for this symbol in the
+	     procedure linkage table.  */
+          BFD_ASSERT (h != NULL);
+
+	  if (h->plt.offset == (bfd_vma) -1 || htab->elf.splt == NULL)
+	    {
+	      /* We didn't make a PLT entry for this symbol.  This
+		 happens when statically linking PIC code, or when
+		 using -Bsymbolic.  */
+	      break;
+	    }
+
+	  relocation = (htab->elf.splt->output_section->vma
+			+ htab->elf.splt->output_offset
+			+ h->plt.offset);
+	  unresolved_reloc = FALSE;
+	  break;
+
+        case R_TILEPRO_32_PCREL:
+        case R_TILEPRO_16_PCREL:
+        case R_TILEPRO_8_PCREL:
+        case R_TILEPRO_IMM16_X0_PCREL:
+        case R_TILEPRO_IMM16_X1_PCREL:
+        case R_TILEPRO_IMM16_X0_LO_PCREL:
+        case R_TILEPRO_IMM16_X1_LO_PCREL:
+        case R_TILEPRO_IMM16_X0_HI_PCREL:
+        case R_TILEPRO_IMM16_X1_HI_PCREL:
+        case R_TILEPRO_IMM16_X0_HA_PCREL:
+        case R_TILEPRO_IMM16_X1_HA_PCREL:
+	  if (h != NULL
+	      && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+	    break;
+	  /* Fall through.  */
+        case R_TILEPRO_32:
+        case R_TILEPRO_16:
+        case R_TILEPRO_8:
+        case R_TILEPRO_LO16:
+        case R_TILEPRO_HI16:
+        case R_TILEPRO_HA16:
+        case R_TILEPRO_COPY:
+        case R_TILEPRO_GLOB_DAT:
+        case R_TILEPRO_JMP_SLOT:
+        case R_TILEPRO_RELATIVE:
+        case R_TILEPRO_BROFF_X1:
+        case R_TILEPRO_JOFFLONG_X1:
+        case R_TILEPRO_IMM8_X0:
+        case R_TILEPRO_IMM8_Y0:
+        case R_TILEPRO_IMM8_X1:
+        case R_TILEPRO_IMM8_Y1:
+        case R_TILEPRO_DEST_IMM8_X1:
+        case R_TILEPRO_MT_IMM15_X1:
+        case R_TILEPRO_MF_IMM15_X1:
+        case R_TILEPRO_IMM16_X0:
+        case R_TILEPRO_IMM16_X1:
+        case R_TILEPRO_IMM16_X0_LO:
+        case R_TILEPRO_IMM16_X1_LO:
+        case R_TILEPRO_IMM16_X0_HI:
+        case R_TILEPRO_IMM16_X1_HI:
+        case R_TILEPRO_IMM16_X0_HA:
+        case R_TILEPRO_IMM16_X1_HA:
+        case R_TILEPRO_MMSTART_X0:
+        case R_TILEPRO_MMEND_X0:
+        case R_TILEPRO_MMSTART_X1:
+        case R_TILEPRO_MMEND_X1:
+        case R_TILEPRO_SHAMT_X0:
+        case R_TILEPRO_SHAMT_X1:
+        case R_TILEPRO_SHAMT_Y0:
+        case R_TILEPRO_SHAMT_Y1:
+	  if ((input_section->flags & SEC_ALLOC) == 0)
+	    break;
+
+	  if ((info->shared
+	       && (h == NULL
+		   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		   || h->root.type != bfd_link_hash_undefweak)
+	       && (! howto->pc_relative
+		   || !SYMBOL_CALLS_LOCAL (info, h)))
+	      || (!info->shared
+		  && h != NULL
+		  && h->dynindx != -1
+		  && !h->non_got_ref
+		  && ((h->def_dynamic
+		       && !h->def_regular)
+		      || h->root.type == bfd_link_hash_undefweak
+		      || h->root.type == bfd_link_hash_undefined)))
+	    {
+	      Elf_Internal_Rela outrel;
+	      bfd_boolean skip, relocate = FALSE;
+
+	      /* When generating a shared object, these relocations
+		 are copied into the output file to be resolved at run
+		 time.  */
+
+	      BFD_ASSERT (sreloc != NULL);
+
+	      skip = FALSE;
+
+	      outrel.r_offset =
+		_bfd_elf_section_offset (output_bfd, info, input_section,
+					 rel->r_offset);
+	      if (outrel.r_offset == (bfd_vma) -1)
+		skip = TRUE;
+	      else if (outrel.r_offset == (bfd_vma) -2)
+		skip = TRUE, relocate = TRUE;
+	      outrel.r_offset += (input_section->output_section->vma
+				  + input_section->output_offset);
+
+	      switch (r_type)
+		{
+                case R_TILEPRO_32_PCREL:
+                case R_TILEPRO_16_PCREL:
+                case R_TILEPRO_8_PCREL:
+		  /* If the symbol is not dynamic, we should not keep
+		     a dynamic relocation.  But an .rela.* slot has been
+		     allocated for it, output R_TILEPRO_NONE.
+		     FIXME: Add code tracking needed dynamic relocs as
+		     e.g. i386 has.  */
+		  if (h->dynindx == -1)
+		    skip = TRUE, relocate = TRUE;
+		  break;
+		}
+
+	      if (skip)
+		memset (&outrel, 0, sizeof outrel);
+	      /* h->dynindx may be -1 if the symbol was marked to
+		 become local.  */
+	      else if (h != NULL &&
+		       h->dynindx != -1
+		       && (! is_plt
+			   || !info->shared
+			   || !SYMBOLIC_BIND (info, h)
+			   || !h->def_regular))
+		{
+		  BFD_ASSERT (h->dynindx != -1);
+		  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+		  outrel.r_addend = rel->r_addend;
+		}
+	      else
+		{
+		  if (r_type == R_TILEPRO_32)
+		    {
+		      outrel.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE);
+		      outrel.r_addend = relocation + rel->r_addend;
+		    }
+		  else
+		    {
+		      long indx;
+
+		      outrel.r_addend = relocation + rel->r_addend;
+
+		      if (is_plt)
+			sec = htab->elf.splt;
+
+		      if (bfd_is_abs_section (sec))
+			indx = 0;
+		      else if (sec == NULL || sec->owner == NULL)
+			{
+			  bfd_set_error (bfd_error_bad_value);
+			  return FALSE;
+			}
+		      else
+			{
+			  asection *osec;
+
+			  /* We are turning this relocation into one
+			     against a section symbol.  It would be
+			     proper to subtract the symbol's value,
+			     osec->vma, from the emitted reloc addend,
+			     but ld.so expects buggy relocs.  */
+			  osec = sec->output_section;
+			  indx = elf_section_data (osec)->dynindx;
+
+			  if (indx == 0)
+			    {
+			      osec = htab->elf.text_index_section;
+			      indx = elf_section_data (osec)->dynindx;
+			    }
+
+			  /* FIXME: we really should be able to link non-pic
+			     shared libraries.  */
+			  if (indx == 0)
+			    {
+			      BFD_FAIL ();
+			      (*_bfd_error_handler)
+				(_("%B: probably compiled without -fPIC?"),
+				 input_bfd);
+			      bfd_set_error (bfd_error_bad_value);
+			      return FALSE;
+			    }
+			}
+
+		      outrel.r_info = ELF32_R_INFO (indx, r_type);
+		    }
+		}
+
+	      tilepro_elf_append_rela_32 (output_bfd, sreloc, &outrel);
+
+	      /* This reloc will be computed at runtime, so there's no
+		 need to do anything now.  */
+	      if (! relocate)
+		continue;
+	    }
+	  break;
+
+        case R_TILEPRO_IMM16_X0_TLS_GD:
+        case R_TILEPRO_IMM16_X1_TLS_GD:
+        case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+        case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+        case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+          tls_type = GOT_TLS_GD;
+          goto have_tls_reference;
+
+        case R_TILEPRO_IMM16_X0_TLS_IE:
+        case R_TILEPRO_IMM16_X1_TLS_IE:
+        case R_TILEPRO_IMM16_X0_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X1_TLS_IE_LO:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HI:
+        case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+        case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+          tls_type = GOT_TLS_IE;
+          /* Fall through. */
+
+        have_tls_reference:
+	  if (h == NULL && local_got_offsets)
+	    tls_type
+	      = _bfd_tilepro_elf_local_got_tls_type (input_bfd) [r_symndx];
+	  else if (h != NULL)
+	    {
+	      tls_type = tilepro_elf_hash_entry(h)->tls_type;
+	    }
+	  if (tls_type == GOT_TLS_IE)
+	    switch (r_type)
+	      {
+              case R_TILEPRO_IMM16_X0_TLS_GD:
+                r_type = R_TILEPRO_IMM16_X0_TLS_IE;
+                break;
+              case R_TILEPRO_IMM16_X1_TLS_GD:
+                r_type = R_TILEPRO_IMM16_X1_TLS_IE;
+                break;
+              case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+                r_type = R_TILEPRO_IMM16_X0_TLS_IE_LO;
+                break;
+              case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+                r_type = R_TILEPRO_IMM16_X1_TLS_IE_LO;
+                break;
+              case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+                r_type = R_TILEPRO_IMM16_X0_TLS_IE_HI;
+                break;
+              case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+                r_type = R_TILEPRO_IMM16_X1_TLS_IE_HI;
+                break;
+              case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+                r_type = R_TILEPRO_IMM16_X0_TLS_IE_HA;
+                break;
+              case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+                r_type = R_TILEPRO_IMM16_X1_TLS_IE_HA;
+                break;
+	      }
+
+	  if (h != NULL)
+	    {
+	      off = h->got.offset;
+	      h->got.offset |= 1;
+	    }
+	  else
+	    {
+	      BFD_ASSERT (local_got_offsets != NULL);
+	      off = local_got_offsets[r_symndx];
+	      local_got_offsets[r_symndx] |= 1;
+	    }
+
+	  if (htab->elf.sgot == NULL)
+	    abort ();
+
+	  if ((off & 1) != 0)
+	    off &= ~1;
+	  else
+	    {
+	      Elf_Internal_Rela outrel;
+	      int indx = 0;
+	      bfd_boolean need_relocs = FALSE;
+
+	      if (htab->elf.srelgot == NULL)
+		abort ();
+
+	      if (h != NULL)
+	      {
+	        bfd_boolean dyn;
+	        dyn = htab->elf.dynamic_sections_created;
+
+		if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+		    && (!info->shared
+			|| !SYMBOL_REFERENCES_LOCAL (info, h)))
+		  {
+		    indx = h->dynindx;
+		  }
+	      }
+
+	      /* The GOT entries have not been initialized yet.  Do it
+	         now, and emit any relocations. */
+	      if ((info->shared || indx != 0)
+		  && (h == NULL
+		      || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		      || h->root.type != bfd_link_hash_undefweak))
+		    need_relocs = TRUE;
+
+              switch (r_type)
+                {
+                  case R_TILEPRO_IMM16_X0_TLS_IE:
+                  case R_TILEPRO_IMM16_X1_TLS_IE:
+                  case R_TILEPRO_IMM16_X0_TLS_IE_LO:
+                  case R_TILEPRO_IMM16_X1_TLS_IE_LO:
+                  case R_TILEPRO_IMM16_X0_TLS_IE_HI:
+                  case R_TILEPRO_IMM16_X1_TLS_IE_HI:
+                  case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+                  case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+		    if (need_relocs) {
+	              bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off);
+	              outrel.r_offset = (htab->elf.sgot->output_section->vma
+				       + htab->elf.sgot->output_offset + off);
+	              outrel.r_addend = 0;
+		      if (indx == 0)
+		        outrel.r_addend = relocation - dtpoff_base (info);
+		      outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_TPOFF32);
+		      tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot,
+						  &outrel);
+                    } else {
+		      bfd_put_32 (output_bfd, tpoff (info, relocation),
+				  htab->elf.sgot->contents + off);
+                    }
+                    break;
+
+		  case R_TILEPRO_IMM16_X0_TLS_GD:
+		  case R_TILEPRO_IMM16_X1_TLS_GD:
+		  case R_TILEPRO_IMM16_X0_TLS_GD_LO:
+		  case R_TILEPRO_IMM16_X1_TLS_GD_LO:
+		  case R_TILEPRO_IMM16_X0_TLS_GD_HI:
+		  case R_TILEPRO_IMM16_X1_TLS_GD_HI:
+		  case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+		  case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+		    if (need_relocs) {
+ 	              outrel.r_offset = (htab->elf.sgot->output_section->vma
+				       + htab->elf.sgot->output_offset + off);
+	              outrel.r_addend = 0;
+	              outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_DTPMOD32);
+	              bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off);
+	              tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot,
+						  &outrel);
+		      if (indx == 0)
+		        {
+		      	  BFD_ASSERT (! unresolved_reloc);
+		          bfd_put_32 (output_bfd,
+				      relocation - dtpoff_base (info),
+				      (htab->elf.sgot->contents + off +
+				       TILEPRO_BYTES_PER_WORD));
+		        }
+		      else
+		        {
+		          bfd_put_32 (output_bfd, 0,
+				      (htab->elf.sgot->contents + off +
+				       TILEPRO_BYTES_PER_WORD));
+		          outrel.r_info = ELF32_R_INFO (indx,
+							R_TILEPRO_TLS_DTPOFF32);
+			  outrel.r_offset += TILEPRO_BYTES_PER_WORD;
+		          tilepro_elf_append_rela_32 (output_bfd,
+						      htab->elf.srelgot, &outrel);
+		        }
+                    }
+
+		    else {
+		      /* If we are not emitting relocations for a
+		         general dynamic reference, then we must be in a
+		         static link or an executable link with the
+		         symbol binding locally.  Mark it as belonging
+		         to module 1, the executable.  */
+		      bfd_put_32 (output_bfd, 1,
+				  htab->elf.sgot->contents + off );
+		      bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
+				  htab->elf.sgot->contents + off +
+				  TILEPRO_BYTES_PER_WORD);
+		   }
+                   break;
+                }
+	    }
+
+	  if (off >= (bfd_vma) -2)
+	    abort ();
+
+	  relocation = htab->elf.sgot->output_offset + off - got_base;
+	  unresolved_reloc = FALSE;
+	  howto = tilepro_elf_howto_table + r_type;
+	  break;
+
+	default:
+	  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
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
+	       && h->def_dynamic))
+	(*_bfd_error_handler)
+	  (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+	   input_bfd,
+	   input_section,
+	   (long) rel->r_offset,
+	   howto->name,
+	   h->root.root.string);
+
+      r = bfd_reloc_continue;
+
+      /* For the _HA types, we add 0x8000 so that if bit 15 is set,
+       * we will increment bit 16.  The howto->rightshift takes care
+       * of the rest for us. */
+      switch (r_type)
+      {
+      case R_TILEPRO_HA16:
+      case R_TILEPRO_IMM16_X0_HA:
+      case R_TILEPRO_IMM16_X1_HA:
+      case R_TILEPRO_IMM16_X0_HA_PCREL:
+      case R_TILEPRO_IMM16_X1_HA_PCREL:
+      case R_TILEPRO_IMM16_X0_GOT_HA:
+      case R_TILEPRO_IMM16_X1_GOT_HA:
+      case R_TILEPRO_IMM16_X0_TLS_GD_HA:
+      case R_TILEPRO_IMM16_X1_TLS_GD_HA:
+      case R_TILEPRO_IMM16_X0_TLS_IE_HA:
+      case R_TILEPRO_IMM16_X1_TLS_IE_HA:
+        relocation += 0x8000;
+        break;
+      }
+
+      /* Get the operand creation function, if any. */
+      create_func = reloc_to_create_func[r_type];
+      if (create_func == NULL)
+      {
+        r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                      contents, rel->r_offset,
+                                      relocation, rel->r_addend);
+      }
+      else
+      {
+        if (howto->pc_relative)
+        {
+          relocation -=
+            input_section->output_section->vma + input_section->output_offset;
+          if (howto->pcrel_offset)
+            relocation -= rel->r_offset;
+        }
+
+        bfd_byte *data;
+
+        /* Add the relocation addend if any to the final target value */
+        relocation += rel->r_addend;
+
+        /* Do basic range checking */
+        r = bfd_check_overflow (howto->complain_on_overflow,
+                                howto->bitsize,
+                                howto->rightshift,
+                                32,
+                                relocation);
+
+        /*
+         * Write the relocated value out into the raw section data.
+         * Don't put a relocation out in the .rela section.
+         */
+        tilepro_bundle_bits mask = create_func(-1);
+        tilepro_bundle_bits value = create_func(relocation >> howto->rightshift);
+
+        /* Only touch bytes while the mask is not 0, so we
+           don't write to out of bounds memory if this is actually
+           a 16-bit switch instruction. */
+        for (data = contents + rel->r_offset; mask != 0; data++)
+          {
+            bfd_byte byte_mask = (bfd_byte)mask;
+            *data = (*data & ~byte_mask) | ((bfd_byte)value & byte_mask);
+            mask >>= 8;
+            value >>= 8;
+          }
+      }
+
+      if (r != bfd_reloc_ok)
+	{
+	  const char *msg = NULL;
+
+	  switch (r)
+	    {
+	    case bfd_reloc_overflow:
+	      r = info->callbacks->reloc_overflow
+		(info, (h ? &h->root : NULL), name, howto->name,
+		 (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
+	      break;
+
+	    case bfd_reloc_undefined:
+	      r = info->callbacks->undefined_symbol
+		(info, name, input_bfd, input_section, rel->r_offset,
+		 TRUE);
+	      break;
+
+	    case bfd_reloc_outofrange:
+	      msg = _("internal error: out of range error");
+	      break;
+
+	    case bfd_reloc_notsupported:
+	      msg = _("internal error: unsupported relocation error");
+	      break;
+
+	    case bfd_reloc_dangerous:
+	      msg = _("internal error: dangerous relocation");
+	      break;
+
+	    default:
+	      msg = _("internal error: unknown error");
+	      break;
+	    }
+
+	  if (msg)
+	    r = info->callbacks->warning
+	      (info, msg, name, input_bfd, input_section, rel->r_offset);
+
+	  if (! r)
+	    return FALSE;
+	}
+    }
+
+  return TRUE;
+}
+
+/* Finish up dynamic symbol handling.  We set the contents of various
+   dynamic sections here.  */
+
+static bfd_boolean
+tilepro_elf_finish_dynamic_symbol (bfd *output_bfd,
+				   struct bfd_link_info *info,
+				   struct elf_link_hash_entry *h,
+				   Elf_Internal_Sym *sym)
+{
+  struct tilepro_elf_link_hash_table *htab;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (h->plt.offset != (bfd_vma) -1)
+    {
+      asection *splt;
+      asection *srela;
+      asection *sgotplt;
+      Elf_Internal_Rela rela;
+      bfd_byte *loc;
+      bfd_vma r_offset;
+
+      int rela_index;
+
+      /* This symbol has an entry in the PLT.  Set it up.  */
+
+      BFD_ASSERT (h->dynindx != -1);
+
+      splt = htab->elf.splt;
+      srela = htab->elf.srelplt;
+      sgotplt = htab->elf.sgotplt;
+
+      if (splt == NULL || srela == NULL)
+       abort ();
+
+      /* Fill in the entry in the procedure linkage table.  */
+      rela_index = tilepro_plt_entry_build (splt, sgotplt, h->plt.offset,
+					    &r_offset);
+
+      /* Fill in the entry in the global offset table, which initially points
+	 to the beginning of the plt.  */
+      bfd_put_32 (output_bfd, splt->output_section->vma + splt->output_offset,
+		  sgotplt->contents + r_offset);
+
+      /* Fill in the entry in the .rela.plt section.  */
+      rela.r_offset = (sgotplt->output_section->vma
+		       + sgotplt->output_offset
+		       + r_offset);
+      rela.r_addend = 0;
+      rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_JMP_SLOT);
+
+      loc = srela->contents + rela_index * sizeof (Elf32_External_Rela);
+      bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+
+      if (!h->def_regular)
+	{
+	  /* Mark the symbol as undefined, rather than as defined in
+	     the .plt section.  Leave the value alone.  */
+	  sym->st_shndx = SHN_UNDEF;
+	  /* If the symbol is weak, we do need to clear the value.
+	     Otherwise, the PLT entry would provide a definition for
+	     the symbol even if the symbol wasn't defined anywhere,
+	     and so the symbol would never be NULL.  */
+	  if (!h->ref_regular_nonweak)
+	    sym->st_value = 0;
+	}
+    }
+
+  if (h->got.offset != (bfd_vma) -1
+      && tilepro_elf_hash_entry(h)->tls_type != GOT_TLS_GD
+      && tilepro_elf_hash_entry(h)->tls_type != GOT_TLS_IE)
+    {
+      asection *sgot;
+      asection *srela;
+      Elf_Internal_Rela rela;
+
+      /* This symbol has an entry in the GOT.  Set it up.  */
+
+      sgot = htab->elf.sgot;
+      srela = htab->elf.srelgot;
+      BFD_ASSERT (sgot != NULL && srela != NULL);
+
+      rela.r_offset = (sgot->output_section->vma
+		       + sgot->output_offset
+		       + (h->got.offset &~ (bfd_vma) 1));
+
+      /* If this is a -Bsymbolic link, and the symbol is defined
+	 locally, we just want to emit a RELATIVE reloc.  Likewise if
+	 the symbol was forced to be local because of a version file.
+	 The entry in the global offset table will already have been
+	 initialized in the relocate_section function.  */
+      if (info->shared
+	  && (info->symbolic || h->dynindx == -1)
+	  && h->def_regular)
+	{
+	  asection *sec = h->root.u.def.section;
+	  rela.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE);
+	  rela.r_addend = (h->root.u.def.value
+			   + sec->output_section->vma
+			   + sec->output_offset);
+	}
+      else
+	{
+	  rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_GLOB_DAT);
+	  rela.r_addend = 0;
+	}
+
+      bfd_put_32 (output_bfd, 0,
+			  sgot->contents + (h->got.offset & ~(bfd_vma) 1));
+      tilepro_elf_append_rela_32 (output_bfd, srela, &rela);
+    }
+
+  if (h->needs_copy)
+    {
+      asection *s;
+      Elf_Internal_Rela rela;
+
+      /* This symbols needs a copy reloc.  Set it up.  */
+      BFD_ASSERT (h->dynindx != -1);
+
+      s = bfd_get_section_by_name (h->root.u.def.section->owner,
+				   ".rela.bss");
+      BFD_ASSERT (s != NULL);
+
+      rela.r_offset = (h->root.u.def.value
+		       + h->root.u.def.section->output_section->vma
+		       + h->root.u.def.section->output_offset);
+      rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_COPY);
+      rela.r_addend = 0;
+      tilepro_elf_append_rela_32 (output_bfd, s, &rela);
+    }
+
+  /* Mark some specially defined symbols as absolute. */
+  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+      || (h == htab->elf.hgot || h == htab->elf.hplt))
+    sym->st_shndx = SHN_ABS;
+
+  return TRUE;
+}
+
+/* Finish up the dynamic sections.  */
+
+static bfd_boolean
+tilepro_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
+		    bfd *dynobj, asection *sdyn,
+		    asection *splt ATTRIBUTE_UNUSED)
+{
+  Elf32_External_Dyn *dyncon, *dynconend;
+  struct tilepro_elf_link_hash_table *htab;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  dyncon = (Elf32_External_Dyn *) sdyn->contents;
+  dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+  for (; dyncon < dynconend; dyncon++)
+    {
+      Elf_Internal_Dyn dyn;
+      asection *s;
+
+      bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+      switch (dyn.d_tag)
+	{
+	case DT_PLTGOT:
+	  s = htab->elf.sgotplt;
+	  dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	  break;
+	case DT_JMPREL:
+	  s = htab->elf.srelplt;
+	  dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+	  break;
+	case DT_PLTRELSZ:
+	  s = htab->elf.srelplt;
+	  dyn.d_un.d_val = s->size;
+	  break;
+	default:
+	  continue;
+	}
+
+      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+    }
+  return TRUE;
+}
+
+static bfd_boolean
+tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
+                                     struct bfd_link_info *info)
+{
+  bfd *dynobj;
+  asection *sdyn;
+  struct tilepro_elf_link_hash_table *htab;
+
+  htab = tilepro_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+  dynobj = htab->elf.dynobj;
+
+  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      asection *splt;
+      bfd_boolean ret;
+
+      splt = bfd_get_section_by_name (dynobj, ".plt");
+      BFD_ASSERT (splt != NULL && sdyn != NULL);
+
+      ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
+
+      if (ret != TRUE)
+	return ret;
+
+      /* Fill in the first entry in the procedure linkage table.  */
+      if (splt->size > 0)
+        memcpy (splt->contents, tilepro_plt0_entry, PLT_HEADER_SIZE);
+
+      elf_section_data (splt->output_section)->this_hdr.sh_entsize
+	= PLT_ENTRY_SIZE;
+    }
+
+  if (htab->elf.sgotplt)
+    {
+      if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
+	{
+	  (*_bfd_error_handler)
+	    (_("discarded output section: `%A'"), htab->elf.sgotplt);
+	  return FALSE;
+	}
+
+      if (htab->elf.sgotplt->size > 0)
+	{
+	  /* Write the first two entries in .got.plt, needed for the dynamic
+	     linker.  */
+	  bfd_put_32 (output_bfd, (bfd_vma) -1,
+		      htab->elf.sgotplt->contents);
+	  bfd_put_32 (output_bfd, (bfd_vma) 0,
+		      htab->elf.sgotplt->contents + GOT_ENTRY_SIZE);
+	}
+
+      elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize
+	= GOT_ENTRY_SIZE;
+    }
+
+  if (htab->elf.sgot)
+    {
+      if (htab->elf.sgot->size > 0)
+	{
+	  /* Set the first entry in the global offset table to the address of
+	     the dynamic section.  */
+	  bfd_vma val = (sdyn ?
+			 sdyn->output_section->vma + sdyn->output_offset :
+			 0);
+	  bfd_put_32 (output_bfd, val, htab->elf.sgot->contents);
+	}
+
+      elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize
+	= GOT_ENTRY_SIZE;
+    }
+
+  return TRUE;
+}
+
+
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+   or (bfd_vma) -1 if it should not be included.  */
+
+static bfd_vma
+tilepro_elf_plt_sym_val (bfd_vma i, const asection *plt,
+                      const arelent *rel ATTRIBUTE_UNUSED)
+{
+  return plt->vma + PLT_HEADER_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+static enum elf_reloc_type_class
+tilepro_reloc_type_class (const Elf_Internal_Rela *rela)
+{
+  switch ((int) ELF32_R_TYPE (rela->r_info))
+    {
+    case R_TILEPRO_RELATIVE:
+      return reloc_class_relative;
+    case R_TILEPRO_JMP_SLOT:
+      return reloc_class_plt;
+    case R_TILEPRO_COPY:
+      return reloc_class_copy;
+    default:
+      return reloc_class_normal;
+    }
+}
+
+static int
+tilepro_additional_program_headers (bfd *abfd,
+                                    struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+  /* Each .intrpt section specified by the user adds another PT_LOAD
+     header since the sections are discontiguous. */
+  static const char intrpt_sections[4][9] =
+    {
+      ".intrpt0", ".intrpt1", ".intrpt2", ".intrpt3"
+    };
+  int count = 0;
+  int i;
+
+  for (i = 0; i < 4; i++)
+    {
+      asection *sec = bfd_get_section_by_name (abfd, intrpt_sections[i]);
+      if (sec != NULL && (sec->flags & SEC_LOAD) != 0)
+	++count;
+    }
+
+  /* Add four "padding" headers in to leave room in case a custom linker
+     script does something fancy. Otherwise ld complains that it ran
+     out of program headers and refuses to link. */
+  count += 4;
+
+  return count;
+}
+
+#define ELF_ARCH		bfd_arch_tilepro
+#define ELF_TARGET_ID		TILEPRO_ELF_DATA
+#define ELF_MACHINE_CODE	EM_TILEPRO
+#define ELF_MAXPAGESIZE		0x10000
+#define ELF_COMMONPAGESIZE	0x10000
+
+#define TARGET_LITTLE_SYM	bfd_elf32_tilepro_vec
+#define TARGET_LITTLE_NAME	"elf32-tilepro"
+
+#define elf_backend_reloc_type_class	     tilepro_reloc_type_class
+
+#define bfd_elf32_bfd_reloc_name_lookup      tilepro_reloc_name_lookup
+#define bfd_elf32_bfd_link_hash_table_create tilepro_elf_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup	     tilepro_reloc_type_lookup
+
+#define elf_backend_copy_indirect_symbol     tilepro_elf_copy_indirect_symbol
+#define elf_backend_create_dynamic_sections  tilepro_elf_create_dynamic_sections
+#define elf_backend_check_relocs	     tilepro_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol    tilepro_elf_adjust_dynamic_symbol
+#define elf_backend_omit_section_dynsym	     tilepro_elf_omit_section_dynsym
+#define elf_backend_size_dynamic_sections    tilepro_elf_size_dynamic_sections
+#define elf_backend_relocate_section	     tilepro_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol    tilepro_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections  tilepro_elf_finish_dynamic_sections
+#define elf_backend_gc_mark_hook	     tilepro_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook            tilepro_elf_gc_sweep_hook
+#define elf_backend_plt_sym_val		     tilepro_elf_plt_sym_val
+#define elf_info_to_howto_rel                NULL
+#define elf_info_to_howto                    tilepro_info_to_howto_rela
+#define elf_backend_grok_prstatus            tilepro_elf_grok_prstatus
+#define elf_backend_grok_psinfo              tilepro_elf_grok_psinfo
+#define elf_backend_additional_program_headers tilepro_additional_program_headers
+
+#define elf_backend_init_index_section	_bfd_elf_init_1_index_section
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_plt_readonly 1
+/* Align PLT mod 64 byte L2 line size. */
+#define elf_backend_plt_alignment 6
+#define elf_backend_want_plt_sym 1
+#define elf_backend_got_header_size GOT_ENTRY_SIZE
+#define elf_backend_rela_normal 1
+#define elf_backend_default_execstack 0
+
+#include "elf32-target.h"
diff --git a/bfd/elf32-tilepro.h b/bfd/elf32-tilepro.h
new file mode 100644
index 0000000..bdfe2cd
--- /dev/null
+++ b/bfd/elf32-tilepro.h
@@ -0,0 +1,38 @@
+/* TILEPro-specific support for 32-bit ELF.
+   Copyright 2011 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 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef _ELF32_TILEPRO_H
+#define _ELF32_TILEPRO_H
+
+/* This file contains sizes and offsets of Linux data structures.  */
+
+#define TILEPRO_PRSTATUS_SIZEOF           332
+#define TILEPRO_PRSTATUS_OFFSET_PR_CURSIG  12
+#define TILEPRO_PRSTATUS_OFFSET_PR_PID     24
+#define TILEPRO_PRSTATUS_OFFSET_PR_REG     72
+
+#define TILEPRO_PRPSINFO_SIZEOF           128
+#define TILEPRO_PRPSINFO_OFFSET_PR_FNAME   32
+#define TILEPRO_PRPSINFO_OFFSET_PR_PSARGS  48
+#define ELF_PR_PSARGS_SIZE              80
+
+#define TILEPRO_GREGSET_T_SIZE            256
+
+#endif /* _ELF32_TILEPRO_H */
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 29b2311..9e6f77d 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1,6 +1,6 @@
 /* V850-specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -480,7 +480,7 @@
 	}
       else
 	{
-	  fprintf (stderr, _("FAILED to find previous HI16 reloc\n"));
+	  (*_bfd_error_handler) (_("FAILED to find previous HI16 reloc"));
 	  return FALSE;
 	}
     }
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 78f14ec..643381c 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1,6 +1,7 @@
 /* VAX series support for 32-bit ELF
    Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Contributed by Matt Thomas <[email protected]>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1272,9 +1273,6 @@
 {
   struct elf_vax_pcrel_relocs_copied *s;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct elf_vax_link_hash_entry *) h->root.root.u.i.link;
-
   /* We only discard relocs for symbols defined in a regular object.  */
   if (!h->root.def_regular)
     return TRUE;
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 09c894e..6141783 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -1,5 +1,5 @@
 /* Xstormy16-specific support for 32-bit ELF.
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -537,9 +537,6 @@
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
@@ -571,9 +568,6 @@
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index fd41244..c6e4fb4 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1,5 +1,5 @@
 /* Xtensa-specific support for 32-bit ELF.
-   Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1531,9 +1531,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) arg;
   htab = elf_xtensa_hash_table (info);
   if (htab == NULL)
@@ -3466,7 +3463,7 @@
   unsigned out_mach, in_mach;
   flagword out_flag, in_flag;
 
-  /* Check if we have the same endianess.  */
+  /* Check if we have the same endianness.  */
   if (!_bfd_generic_verify_endian_match (ibfd, obfd))
     return FALSE;
 
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index aaa6e20..f5a34c2 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1,6 +1,6 @@
 /* Alpha specific support for 64-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
    Contributed by Richard Henderson <[email protected]>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1450,7 +1450,7 @@
 
   if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
 				     filename_ptr, functionname_ptr,
-				     line_ptr, 0,
+				     line_ptr, NULL, 0,
 				     &elf_tdata (abfd)->dwarf2_find_line_info))
     return TRUE;
 
@@ -1553,9 +1553,6 @@
   bfd_boolean strip;
   asection *sec, *output_section;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   if (h->root.indx == -2)
     strip = FALSE;
   else if ((h->root.def_dynamic
@@ -1885,10 +1882,13 @@
 	  break;
 
 	case R_ALPHA_TPREL64:
-	  if (info->shared || maybe_dynamic)
+	  if (info->shared && !info->pie)
+	    {
+	      info->flags |= DF_STATIC_TLS;
+	      need = NEED_DYNREL;
+	    }
+	  else if (maybe_dynamic)
 	    need = NEED_DYNREL;
-	  if (info->shared)
-	    info->flags |= DF_STATIC_TLS;
 	  break;
 	}
 
@@ -1988,6 +1988,93 @@
   return TRUE;
 }
 
+/* Return the section that should be marked against GC for a given
+   relocation.  */
+
+static asection *
+elf64_alpha_gc_mark_hook (asection *sec, struct bfd_link_info *info,
+			  Elf_Internal_Rela *rel,
+			  struct elf_link_hash_entry *h, Elf_Internal_Sym *sym)
+{
+  /* These relocations don't really reference a symbol.  Instead we store
+     extra data in their addend slot.  Ignore the symbol.  */
+  switch (ELF64_R_TYPE (rel->r_info))
+    {
+    case R_ALPHA_LITUSE:
+    case R_ALPHA_GPDISP:
+    case R_ALPHA_HINT:
+      return NULL;
+    }
+
+  return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+}
+
+/* Update the got entry reference counts for the section being removed.  */
+
+static bfd_boolean
+elf64_alpha_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+			   asection *sec, const Elf_Internal_Rela *relocs)
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  struct alpha_elf_link_hash_entry **sym_hashes;
+  const Elf_Internal_Rela *rel, *relend;
+
+  if (info->relocatable)
+    return TRUE;
+
+  symtab_hdr = &elf_symtab_hdr (abfd);
+  sym_hashes = alpha_elf_sym_hashes (abfd);
+
+  relend = relocs + sec->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      unsigned long r_symndx, r_type;
+      struct alpha_elf_link_hash_entry *h = NULL;
+      struct alpha_elf_got_entry *gotent;
+
+      r_symndx = ELF64_R_SYM (rel->r_info);
+      if (r_symndx >= symtab_hdr->sh_info)
+	{
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+	  while (h->root.root.type == bfd_link_hash_indirect
+		 || h->root.root.type == bfd_link_hash_warning)
+	    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
+	}
+
+      r_type = ELF64_R_TYPE (rel->r_info);
+      switch (r_type)
+	{
+	case R_ALPHA_LITERAL:
+	  /* ??? Ignore re-computation of gotent_flags.  We're not
+	     carrying a use-count for each bit in that mask.  */
+
+	case R_ALPHA_TLSGD:
+	case R_ALPHA_GOTDTPREL:
+	case R_ALPHA_GOTTPREL:
+	  /* Fetch the got entry from the tables.  */
+	  gotent = get_got_entry (abfd, h, r_type, r_symndx, rel->r_addend);
+
+	  /* The got entry *must* exist, since we should have created it
+	     before during check_relocs.  Also note that get_got_entry
+	     assumed this was going to be another use, and so incremented
+	     the use count again.  Thus the use count must be at least the
+	     one real use and the "use" we just added.  */
+	  if (gotent == NULL || gotent->use_count < 2)
+	    {
+	      abort ();
+	      return FALSE;
+	    }
+	  gotent->use_count -= 2;
+	  break;
+
+	default:
+	  break;
+	}
+    }
+
+  return TRUE;
+}
+
 /* Adjust a symbol defined by a dynamic object and referenced by a
    regular object.  The current definition is in some section of the
    dynamic object, but we're not including those sections.  We have to
@@ -2064,23 +2151,29 @@
    indirect to the new ones.  Consolidate the got and reloc information
    in these situations.  */
 
-static bfd_boolean
-elf64_alpha_merge_ind_symbols (struct alpha_elf_link_hash_entry *hi,
-			       PTR dummy ATTRIBUTE_UNUSED)
+static void
+elf64_alpha_copy_indirect_symbol (struct bfd_link_info *info,
+				  struct elf_link_hash_entry *dir,
+				  struct elf_link_hash_entry *ind)
 {
-  struct alpha_elf_link_hash_entry *hs;
+  struct alpha_elf_link_hash_entry *hi
+    = (struct alpha_elf_link_hash_entry *) ind;
+  struct alpha_elf_link_hash_entry *hs
+    = (struct alpha_elf_link_hash_entry *) dir;
 
-  if (hi->root.root.type != bfd_link_hash_indirect)
-    return TRUE;
-  hs = hi;
-  do {
-    hs = (struct alpha_elf_link_hash_entry *)hs->root.root.u.i.link;
-  } while (hs->root.root.type == bfd_link_hash_indirect);
+  /* Do the merging in the superclass.  */
+  _bfd_elf_link_hash_copy_indirect(info, dir, ind);
 
   /* Merge the flags.  Whee.  */
-
   hs->flags |= hi->flags;
 
+  /* ??? It's unclear to me what's really supposed to happen when
+     "merging" defweak and defined symbols, given that we don't
+     actually throw away the defweak.  This more-or-less copies
+     the logic related to got and plt entries in the superclass.  */
+  if (ind->root.type != bfd_link_hash_indirect)
+    return;
+
   /* Merge the .got entries.  Cannibalize the old symbol's list in
      doing so, since we don't need it anymore.  */
 
@@ -2133,8 +2226,6 @@
 	}
     }
   hi->reloc_entries = NULL;
-
-  return TRUE;
 }
 
 /* Is it possible to merge two object file's .got tables?  */
@@ -2303,9 +2394,6 @@
 {
   struct alpha_elf_got_entry *gotent;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
   for (gotent = h->got_entries; gotent; gotent = gotent->next)
     if (gotent->use_count > 0)
       {
@@ -2544,10 +2632,6 @@
   if (htab == NULL)
     return FALSE;
 
-  /* First, take care of the indirect symbols created by versioning.  */
-  alpha_elf_link_hash_traverse (htab, elf64_alpha_merge_ind_symbols,
-				NULL);
-
   if (!elf64_alpha_size_got_sections (info))
     return FALSE;
 
@@ -2570,7 +2654,7 @@
 /* The number of dynamic relocations required by a static relocation.  */
 
 static int
-alpha_dynamic_entries_for_reloc (int r_type, int dynamic, int shared)
+alpha_dynamic_entries_for_reloc (int r_type, int dynamic, int shared, int pie)
 {
   switch (r_type)
     {
@@ -2580,16 +2664,18 @@
     case R_ALPHA_TLSLDM:
       return shared;
     case R_ALPHA_LITERAL:
-    case R_ALPHA_GOTTPREL:
       return dynamic || shared;
+    case R_ALPHA_GOTTPREL:
+      return dynamic || (shared && !pie);
     case R_ALPHA_GOTDTPREL:
       return dynamic;
 
     /* May appear in data sections.  */
     case R_ALPHA_REFLONG:
     case R_ALPHA_REFQUAD:
-    case R_ALPHA_TPREL64:
       return dynamic || shared;
+    case R_ALPHA_TPREL64:
+      return dynamic || (shared && !pie);
 
     /* Everything else is illegal.  We'll issue an error during
        relocate_section.  */
@@ -2608,9 +2694,6 @@
   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;
-
   /* If the symbol was defined as a common symbol in a regular object
      file, and there was no definition in any dynamic object, then the
      linker will have allocated space for the symbol in a common
@@ -2640,7 +2723,7 @@
   for (relent = h->reloc_entries; relent; relent = relent->next)
     {
       entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
-						 info->shared);
+						 info->shared, info->pie);
       if (entries)
 	{
 	  relent->srel->size +=
@@ -2664,9 +2747,6 @@
   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 we're using a plt for this symbol, then all of its relocations
      for its got entries go into .rela.plt.  */
   if (h->root.needs_plt)
@@ -2686,8 +2766,8 @@
   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);
+      entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type, dynamic,
+						  info->shared, info->pie);
 
   if (entries > 0)
     {
@@ -2737,7 +2817,7 @@
 		 gotent ; gotent = gotent->next)
 	      if (gotent->use_count > 0)
 		entries += (alpha_dynamic_entries_for_reloc
-			    (gotent->reloc_type, 0, info->shared));
+			    (gotent->reloc_type, 0, info->shared, info->pie));
 	}
     }
 
@@ -2840,7 +2920,8 @@
 	     linker does that before adjust_dynamic_symbol is called, and
 	     it is that function which decides whether anything needs to
 	     go into these sections.  */
-	  s->flags |= SEC_EXCLUDE;
+	  if (!CONST_STRNEQ (name, ".got"))
+	    s->flags |= SEC_EXCLUDE;
 	}
       else if ((s->flags & SEC_HAS_CONTENTS) != 0)
 	{
@@ -2968,7 +3049,8 @@
     return TRUE;
 
   /* Can't use local-exec relocations in shared libraries.  */
-  if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared)
+  if (r_type == R_ALPHA_GOTTPREL
+      && (info->link_info->shared && !info->link_info->pie))
     return TRUE;
 
   if (r_type == R_ALPHA_LITERAL)
@@ -3426,6 +3508,13 @@
   pos[3] = info->contents + gpdisp->r_offset;
   pos[4] = pos[3] + gpdisp->r_addend;
 
+  /* Beware of the compiler hoisting part of the sequence out a loop
+     and adjusting the destination register for the TLSGD insn.  If this
+     happens, there will be a move into $16 before the JSR insn, so only
+     transformations of the first insn pair should use this register.  */
+  tlsgd_reg = bfd_get_32 (info->abfd, pos[0]);
+  tlsgd_reg = (tlsgd_reg >> 21) & 31;
+
   /* Generally, the positions are not allowed to be out of order, lest the
      modified insn sequence have different register lifetimes.  We can make
      an exception when pos 1 is adjacent to pos 0.  */
@@ -3493,13 +3582,6 @@
   use_gottprel = FALSE;
   new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : STN_UNDEF;
 
-  /* Beware of the compiler hoisting part of the sequence out a loop
-     and adjusting the destination register for the TLSGD insn.  If this
-     happens, there will be a move into $16 before the JSR insn, so only
-     transformations of the first insn pair should use this register.  */
-  tlsgd_reg = bfd_get_32 (info->abfd, pos[0]);
-  tlsgd_reg = (tlsgd_reg >> 21) & 31;
-
   switch (!dynamic && !info->link_info->shared)
     {
     case 1:
@@ -4433,7 +4515,7 @@
 	    else if (r_type == R_ALPHA_TPREL64)
 	      {
 		BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
-		if (!info->shared)
+		if (!info->shared || info->pie)
 		  {
 		    value -= tp_base;
 		    goto default_reloc;
@@ -4554,7 +4636,7 @@
 	case R_ALPHA_TPRELHI:
 	case R_ALPHA_TPRELLO:
 	case R_ALPHA_TPREL16:
-	  if (info->shared)
+	  if (info->shared && !info->pie)
 	    {
 	      (*_bfd_error_handler)
 		(_("%B: TLS local exec code cannot be linked into shared objects"),
@@ -5367,6 +5449,8 @@
   elf64_alpha_adjust_dynamic_symbol
 #define elf_backend_merge_symbol_attribute \
   elf64_alpha_merge_symbol_attribute
+#define elf_backend_copy_indirect_symbol \
+  elf64_alpha_copy_indirect_symbol
 #define elf_backend_always_size_sections \
   elf64_alpha_always_size_sections
 #define elf_backend_size_dynamic_sections \
@@ -5384,6 +5468,10 @@
 #define elf_backend_reloc_type_class \
   elf64_alpha_reloc_type_class
 
+#define elf_backend_can_gc_sections	1
+#define elf_backend_gc_mark_hook	elf64_alpha_gc_mark_hook
+#define elf_backend_gc_sweep_hook	elf64_alpha_gc_sweep_hook
+
 #define elf_backend_ecoff_debug_swap \
   &elf64_alpha_ecoff_debug_swap
 
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 11289b1..057a92d 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -1,6 +1,6 @@
 /* Support for HPPA 64-bit ELF
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -329,9 +329,9 @@
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
     {
-      /* GCC on hppa-linux produces binaries with OSABI=Linux,
+      /* GCC on hppa-linux produces binaries with OSABI=GNU,
 	 but the kernel produces corefiles with OSABI=SysV.  */
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU
 	  && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
 	return FALSE;
     }
@@ -411,13 +411,6 @@
   if (srel_name == NULL)
     return FALSE;
 
-  BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela")
-	       && strcmp (bfd_get_section_name (abfd, sec),
-			  srel_name + 5) == 0)
-	      || (CONST_STRNEQ (srel_name, ".rel")
-		  && strcmp (bfd_get_section_name (abfd, sec),
-			     srel_name + 4) == 0));
-
   dynobj = hppa_info->root.dynobj;
   if (!dynobj)
     hppa_info->root.dynobj = dynobj = abfd;
@@ -944,9 +937,6 @@
   if (hppa_info == NULL)
     return FALSE;
 
-  if (eh->root.type == bfd_link_hash_warning)
-    eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
   if (eh
       && (eh->root.type == bfd_link_hash_defined
 	  || eh->root.type == bfd_link_hash_defweak)
@@ -1063,10 +1053,6 @@
 
   if (hh && hh->want_opd)
     {
-      while (hh->eh.root.type == bfd_link_hash_indirect
-	     || hh->eh.root.type == bfd_link_hash_warning)
-	hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
-
       /* We never need an opd entry for a symbol which is not
 	 defined by this output file.  */
       if (hh && (hh->eh.root.type == bfd_link_hash_undefined
@@ -1519,19 +1505,15 @@
 elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
 					      void *data)
 {
-  struct elf_link_hash_entry *elf = eh;
-  struct bfd_link_info *info = (struct bfd_link_info *)data;
+  struct bfd_link_info *info = (struct bfd_link_info *) data;
 
-  if (elf->root.type == bfd_link_hash_warning)
-    elf = (struct elf_link_hash_entry *) elf->root.u.i.link;
-
-  if (elf->type == STT_PARISC_MILLI)
+  if (eh->type == STT_PARISC_MILLI)
     {
-      if (elf->dynindx != -1)
+      if (eh->dynindx != -1)
 	{
-	  elf->dynindx = -1;
+	  eh->dynindx = -1;
 	  _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
-				  elf->dynstr_index);
+				  eh->dynstr_index);
 	}
       return TRUE;
     }
@@ -2846,9 +2828,6 @@
 {
   struct bfd_link_info *info = data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
@@ -2880,9 +2859,6 @@
 {
   struct bfd_link_info *info = data;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   /* If we are not creating a shared library, and this symbol is
      referenced by a shared library but is not defined anywhere, then
      the generic code will warn that it is undefined.
@@ -3296,13 +3272,13 @@
 	    && value + addend + max_branch_offset >= 2*max_branch_offset)
 	  {
 	    (*_bfd_error_handler)
-	      (_("%B(%A+0x%lx): cannot reach %s"),
+	      (_("%B(%A+0x" BFD_VMA_FMT "x): cannot reach %s"),
 	      input_bfd,
 	      input_section,
 	      offset,
-	      eh->root.root.string);
+	      eh ? eh->root.root.string : "unknown");
 	    bfd_set_error (bfd_error_bad_value);
-	    return bfd_reloc_notsupported;
+	    return bfd_reloc_overflow;
 	  }
 
 	/* Adjust for any field selectors.  */
@@ -4121,7 +4097,7 @@
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME			"elf64-hppa-linux"
 #undef ELF_OSABI
-#define ELF_OSABI			ELFOSABI_LINUX
+#define ELF_OSABI			ELFOSABI_GNU
 #undef elf_backend_post_process_headers
 #define elf_backend_post_process_headers _bfd_elf_set_osabi
 #undef elf64_bed
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 7ed54fa..3feb1bb 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1688,6 +1688,605 @@
 	 FALSE),		/* pcrel_offset */
 };
 
+static reloc_howto_type micromips_elf64_howto_table_rel[] =
+{
+  EMPTY_HOWTO (130),
+  EMPTY_HOWTO (131),
+  EMPTY_HOWTO (132),
+
+  /* 26 bit jump address.  */
+  HOWTO (R_MICROMIPS_26_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC.  */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_26_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x3ffffff,		/* src_mask */
+	 0x3ffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_HI16,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_hi16_reloc, /* special_function */
+	 "R_MICROMIPS_HI16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_lo16_reloc, /* special_function */
+	 "R_MICROMIPS_LO16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* GP relative reference.  */
+  HOWTO (R_MICROMIPS_GPREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_GPREL16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to literal section.  */
+  HOWTO (R_MICROMIPS_LITERAL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_LITERAL",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to global offset table.  */
+  HOWTO (R_MICROMIPS_GOT16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_got16_reloc, /* special_function */
+	 "R_MICROMIPS_GOT16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* This is for microMIPS branches.  */
+  HOWTO (R_MICROMIPS_PC7_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 7,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC7_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000007f,		/* src_mask */
+	 0x0000007f,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC10_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 10,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC10_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x000003ff,		/* src_mask */
+	 0x000003ff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC16_S1",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* 16 bit call through global offset table.  */
+  HOWTO (R_MICROMIPS_CALL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL16",	/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (143),
+  EMPTY_HOWTO (144),
+
+  /* Displacement in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_DISP",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Displacement to page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_PAGE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_PAGE",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Offset from page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_OFST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_OFST",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_HI16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_LO16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* 64 bit subtraction.  Used in the N32 ABI.  */
+  HOWTO (R_MICROMIPS_SUB,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_SUB",	/* name */
+	 TRUE,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* We don't support these for REL relocations, because it means building
+     the addend from a R_MICROMIPS_HIGHEST/R_MICROMIPS_HIGHER/
+     R_MICROMIPS_HI16/R_MICROMIPS_LO16 sequence with varying ordering,
+     using fallable heuristics.  */
+  EMPTY_HOWTO (R_MICROMIPS_HIGHER),
+  EMPTY_HOWTO (R_MICROMIPS_HIGHEST),
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_HI16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_LO16",/* name */
+	 TRUE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+};
+
+static reloc_howto_type micromips_elf64_howto_table_rela[] =
+{
+  EMPTY_HOWTO (130),
+  EMPTY_HOWTO (131),
+  EMPTY_HOWTO (132),
+
+  /* 26 bit jump address.  */
+  HOWTO (R_MICROMIPS_26_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC.  */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_26_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x3ffffff,		/* src_mask */
+	 0x3ffffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_HI16,	/* type */
+	 16,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_hi16_reloc, /* special_function */
+	 "R_MICROMIPS_HI16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  */
+  HOWTO (R_MICROMIPS_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_lo16_reloc, /* special_function */
+	 "R_MICROMIPS_LO16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* GP relative reference.  */
+  HOWTO (R_MICROMIPS_GPREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_GPREL16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to literal section.  */
+  HOWTO (R_MICROMIPS_LITERAL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf32_gprel16_reloc, /* special_function */
+	 "R_MICROMIPS_LITERAL",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Reference to global offset table.  */
+  HOWTO (R_MICROMIPS_GOT16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_got16_reloc, /* special_function */
+	 "R_MICROMIPS_GOT16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* This is for microMIPS branches.  */
+  HOWTO (R_MICROMIPS_PC7_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 7,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC7_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000007f,		/* src_mask */
+	 0x0000007f,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC10_S1,	/* type */
+	 1,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 10,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC10_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x000003ff,		/* src_mask */
+	 0x000003ff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_MICROMIPS_PC16_S1,	/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_PC16_S1",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 TRUE),			/* pcrel_offset */
+
+  /* 16 bit call through global offset table.  */
+  HOWTO (R_MICROMIPS_CALL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  EMPTY_HOWTO (143),
+  EMPTY_HOWTO (144),
+
+  /* Displacement in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_DISP",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Displacement to page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_PAGE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_PAGE",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Offset from page pointer in the global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_OFST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_OFST",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_HI16",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_GOT_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_GOT_LO16",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* 64 bit subtraction.  Used in the N32 ABI.  */
+  HOWTO (R_MICROMIPS_SUB,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_SUB",	/* name */
+	 FALSE,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Get the higher value of a 64 bit addend.  */
+  HOWTO (R_MICROMIPS_HIGHER,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_HIGHER",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Get the highest value of a 64 bit addend.  */
+  HOWTO (R_MICROMIPS_HIGHEST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_HIGHEST",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_HI16",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MICROMIPS_CALL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 _bfd_mips_elf_generic_reloc, /* special_function */
+	 "R_MICROMIPS_CALL_LO16",/* name */
+	 FALSE,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+};
+
 /* GNU extension to record C++ vtable hierarchy */
 static reloc_howto_type elf_mips_gnu_vtinherit_howto =
   HOWTO (R_MIPS_GNU_VTINHERIT,	/* type */
@@ -2231,13 +2830,13 @@
     return ret;
 
   location = (bfd_byte *) data + reloc_entry->address;
-  _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
-				   location);
+  _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+				 location);
   ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
 				       input_section, relocatable,
 				       data, gp);
-  _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
-				 location);
+  _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+			       location);
 
   return ret;
 }
@@ -2311,6 +2910,29 @@
   { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
 };
 
+static const struct elf_reloc_map micromips_reloc_map[] =
+{
+  { BFD_RELOC_MICROMIPS_JMP, R_MICROMIPS_26_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HI16_S, R_MICROMIPS_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_LO16, R_MICROMIPS_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GPREL16, R_MICROMIPS_GPREL16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_LITERAL, R_MICROMIPS_LITERAL - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT16, R_MICROMIPS_GOT16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_7_PCREL_S1, R_MICROMIPS_PC7_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_10_PCREL_S1, R_MICROMIPS_PC10_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_16_PCREL_S1, R_MICROMIPS_PC16_S1 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL16, R_MICROMIPS_CALL16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_DISP, R_MICROMIPS_GOT_DISP - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_PAGE - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_OFST, R_MICROMIPS_GOT_OFST - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_GOT_LO16, R_MICROMIPS_GOT_LO16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_SUB, R_MICROMIPS_SUB - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HIGHER, R_MICROMIPS_HIGHER - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_HIGHEST, R_MICROMIPS_HIGHEST - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL_HI16, R_MICROMIPS_CALL_HI16 - R_MICROMIPS_min },
+  { BFD_RELOC_MICROMIPS_CALL_LO16, R_MICROMIPS_CALL_LO16 - R_MICROMIPS_min },
+};
 /* Given a BFD reloc type, return a howto structure.  */
 
 static reloc_howto_type *
@@ -2322,6 +2944,7 @@
      relocation variant.  */
   reloc_howto_type *howto_table = mips_elf64_howto_table_rela;
   reloc_howto_type *howto16_table = mips16_elf64_howto_table_rela;
+  reloc_howto_type *howto_micromips_table = micromips_elf64_howto_table_rela;
 
   for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
        i++)
@@ -2337,6 +2960,13 @@
 	return &howto16_table[(int) mips16_reloc_map[i].elf_val];
     }
 
+  for (i = 0; i < sizeof (micromips_reloc_map) / sizeof (struct elf_reloc_map);
+       i++)
+    {
+      if (micromips_reloc_map[i].bfd_val == code)
+	return &howto_micromips_table[(int) micromips_reloc_map[i].elf_val];
+    }
+
   switch (code)
     {
     case BFD_RELOC_VTABLE_INHERIT:
@@ -2374,6 +3004,14 @@
 	&& strcasecmp (mips16_elf64_howto_table_rela[i].name, r_name) == 0)
       return &mips16_elf64_howto_table_rela[i];
 
+  for (i = 0;
+       i < (sizeof (micromips_elf64_howto_table_rela)
+	    / sizeof (micromips_elf64_howto_table_rela[0]));
+       i++)
+    if (micromips_elf64_howto_table_rela[i].name != NULL
+	&& strcasecmp (micromips_elf64_howto_table_rela[i].name, r_name) == 0)
+      return &micromips_elf64_howto_table_rela[i];
+
   if (strcasecmp (elf_mips_gnu_vtinherit_howto.name, r_name) == 0)
     return &elf_mips_gnu_vtinherit_howto;
   if (strcasecmp (elf_mips_gnu_vtentry_howto.name, r_name) == 0)
@@ -2411,6 +3049,13 @@
     case R_MIPS_JUMP_SLOT:
       return &elf_mips_jump_slot_howto;
     default:
+      if (r_type >= R_MICROMIPS_min && r_type < R_MICROMIPS_max)
+	{
+	  if (rela_p)
+	    return &micromips_elf64_howto_table_rela[r_type - R_MICROMIPS_min];
+	  else
+	    return &micromips_elf64_howto_table_rel[r_type - R_MICROMIPS_min];
+	}
       if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max)
 	{
 	  if (rela_p)
@@ -3279,6 +3924,8 @@
 /* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
    MIPS-specific function only applies to IRIX5, which had no 64-bit
    ABI.  */
+#define bfd_elf64_bfd_is_target_special_symbol \
+					_bfd_mips_elf_is_target_special_symbol
 #define bfd_elf64_find_nearest_line	_bfd_mips_elf_find_nearest_line
 #define bfd_elf64_find_inliner_info	_bfd_mips_elf_find_inliner_info
 #define bfd_elf64_new_section_hook	_bfd_mips_elf_new_section_hook
@@ -3354,3 +4001,36 @@
 
 /* Include the target file again for this target.  */
 #include "elf64-target.h"
+
+
+/* FreeBSD support.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define	TARGET_LITTLE_SYM		bfd_elf64_tradlittlemips_freebsd_vec
+#define	TARGET_LITTLE_NAME		"elf64-tradlittlemips-freebsd"
+#define	TARGET_BIG_SYM			bfd_elf64_tradbigmips_freebsd_vec
+#define	TARGET_BIG_NAME			"elf64-tradbigmips-freebsd"
+
+#undef	ELF_OSABI
+#define	ELF_OSABI			ELFOSABI_FREEBSD
+
+/* The kernel recognizes executables as valid only if they carry a
+   "FreeBSD" label in the ELF header.  So we put this label on all
+   executables and (for simplicity) also all other object files.  */
+
+static void
+elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
+{
+  _bfd_elf_set_osabi (abfd, info);
+}
+
+#undef	elf_backend_post_process_headers
+#define	elf_backend_post_process_headers	elf_fbsd_post_process_headers
+#undef	elf64_bed
+#define elf64_bed				elf64_fbsd_tradbed
+
+#include "elf64-target.h"
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 8c00a78..ecc9ad0 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -75,6 +75,13 @@
        stubs_size_sum for relocation.  */
     bfd_size_type stub_offset;
   } pjs;
+
+  /* Whether there has been a warning that this section could not be
+     linked due to a specific cause.  FIXME: a way to access the
+     linker info or output section, then stuff the limiter guard
+     there. */
+  bfd_boolean has_warned_bpo;
+  bfd_boolean has_warned_pushj;
 };
 
 #define mmix_elf_section_data(sec) \
@@ -190,11 +197,11 @@
 	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 
 static bfd_reloc_status_type mmix_final_link_relocate
-  PARAMS ((reloc_howto_type *, asection *, bfd_byte *,
-	   bfd_vma, bfd_signed_vma, bfd_vma, const char *, asection *));
+  (reloc_howto_type *, asection *, bfd_byte *, bfd_vma, bfd_signed_vma,
+   bfd_vma, const char *, asection *, char **);
 
 static bfd_reloc_status_type mmix_elf_perform_relocation
-  PARAMS ((asection *, reloc_howto_type *, PTR, bfd_vma, bfd_vma));
+  (asection *, reloc_howto_type *, void *, bfd_vma, bfd_vma, char **);
 
 static bfd_boolean mmix_elf_section_from_bfd_section
   PARAMS ((bfd *, asection *, int *));
@@ -934,12 +941,9 @@
    R_MMIX_ADDR19 and R_MMIX_ADDR27 are just filled in.  */
 
 static bfd_reloc_status_type
-mmix_elf_perform_relocation (isec, howto, datap, addr, value)
-     asection *isec;
-     reloc_howto_type *howto;
-     PTR datap;
-     bfd_vma addr;
-     bfd_vma value;
+mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto,
+			     void *datap, bfd_vma addr, bfd_vma value,
+			     char **error_message)
 {
   bfd *abfd = isec->owner;
   bfd_reloc_status_type flag = bfd_reloc_ok;
@@ -1013,6 +1017,36 @@
 	       + mmix_elf_section_data (isec)->pjs.stub_offset);
 	  bfd_vma stubaddr;
 
+	  if (mmix_elf_section_data (isec)->pjs.n_pushj_relocs == 0)
+	    {
+	      /* This shouldn't happen when linking to ELF or mmo, so
+		 this is an attempt to link to "binary", right?  We
+		 can't access the output bfd, so we can't verify that
+		 assumption.  We only know that the critical
+		 mmix_elf_check_common_relocs has not been called,
+		 which happens when the output format is different
+		 from the input format (and is not mmo).  */
+	      if (! mmix_elf_section_data (isec)->has_warned_pushj)
+		{
+		  /* For the first such error per input section, produce
+		     a verbose message.  */
+		  *error_message
+		    = _("invalid input relocation when producing"
+			" non-ELF, non-mmo format output."
+			"\n Please use the objcopy program to convert from"
+			" ELF or mmo,"
+			"\n or assemble using"
+			" \"-no-expand\" (for gcc, \"-Wa,-no-expand\"");
+		  mmix_elf_section_data (isec)->has_warned_pushj = TRUE;
+		  return bfd_reloc_dangerous;
+		}
+
+	      /* For subsequent errors, return this one, which is
+		 rate-limited but looks a little bit different,
+		 hopefully without affecting user-friendliness.  */
+	      return bfd_reloc_overflow;
+	    }
+
 	  /* The address doesn't fit, so redirect the PUSHJ to the
 	     location of the stub.  */
 	  r = mmix_elf_perform_relocation (isec,
@@ -1025,7 +1059,8 @@
 					   + size
 					   + (mmix_elf_section_data (isec)
 					      ->pjs.stub_offset)
-					   - addr);
+					   - addr,
+					   error_message);
 	  if (r != bfd_reloc_ok)
 	    return r;
 
@@ -1049,7 +1084,8 @@
 					       [R_MMIX_ADDR27],
 					       stubcontents,
 					       stubaddr,
-					       value + addr - stubaddr);
+					       value + addr - stubaddr,
+					       error_message);
 	      mmix_elf_section_data (isec)->pjs.stub_offset += 4;
 
 	      if (size + mmix_elf_section_data (isec)->pjs.stub_offset
@@ -1161,12 +1197,43 @@
       {
 	struct bpo_reloc_section_info *bpodata
 	  = mmix_elf_section_data (isec)->bpo.reloc;
-	asection *bpo_greg_section
-	  = bpodata->bpo_greg_section;
-	struct bpo_greg_section_info *gregdata
-	  = mmix_elf_section_data (bpo_greg_section)->bpo.greg;
-	size_t bpo_index
-	  = gregdata->bpo_reloc_indexes[bpodata->bpo_index++];
+	asection *bpo_greg_section;
+	struct bpo_greg_section_info *gregdata;
+	size_t bpo_index;
+
+	if (bpodata == NULL)
+	  {
+	    /* This shouldn't happen when linking to ELF or mmo, so
+	       this is an attempt to link to "binary", right?  We
+	       can't access the output bfd, so we can't verify that
+	       assumption.  We only know that the critical
+	       mmix_elf_check_common_relocs has not been called, which
+	       happens when the output format is different from the
+	       input format (and is not mmo).  */
+	    if (! mmix_elf_section_data (isec)->has_warned_bpo)
+	      {
+		/* For the first such error per input section, produce
+		   a verbose message.  */
+		*error_message
+		  = _("invalid input relocation when producing"
+		      " non-ELF, non-mmo format output."
+		      "\n Please use the objcopy program to convert from"
+		      " ELF or mmo,"
+		      "\n or compile using the gcc-option"
+		      " \"-mno-base-addresses\".");
+		mmix_elf_section_data (isec)->has_warned_bpo = TRUE;
+		return bfd_reloc_dangerous;
+	      }
+
+	    /* For subsequent errors, return this one, which is
+	       rate-limited but looks a little bit different,
+	       hopefully without affecting user-friendliness.  */
+	    return bfd_reloc_overflow;
+	  }
+
+	bpo_greg_section = bpodata->bpo_greg_section;
+	gregdata = mmix_elf_section_data (bpo_greg_section)->bpo.greg;
+	bpo_index = gregdata->bpo_reloc_indexes[bpodata->bpo_index++];
 
 	/* A consistency check: The value we now have in "relocation" must
 	   be the same as the value we stored for that relocation.  It
@@ -1260,7 +1327,7 @@
      PTR data;
      asection *input_section;
      bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+     char **error_message;
 {
   bfd_vma relocation;
   bfd_reloc_status_type r;
@@ -1322,7 +1389,8 @@
 				   data, reloc_entry->address,
 				   reloc_entry->addend, relocation,
 				   bfd_asymbol_name (symbol),
-				   reloc_target_output_section);
+				   reloc_target_output_section,
+				   error_message);
 }
 
 /* Relocate an MMIX ELF section.  Modified from elf32-fr30.c; look to it
@@ -1454,7 +1522,7 @@
 						+ size
 						+ mmix_elf_section_data (input_section)
 						->pjs.stub_offset,
-						NULL, NULL) != bfd_reloc_ok)
+						NULL, NULL, NULL) != bfd_reloc_ok)
 		    return FALSE;
 
 		  /* Put a JMP insn at the stub; it goes with the
@@ -1494,7 +1562,7 @@
 
       r = mmix_final_link_relocate (howto, input_section,
 				    contents, rel->r_offset,
-				    rel->r_addend, relocation, name, sec);
+				    rel->r_addend, relocation, name, sec, NULL);
 
       if (r != bfd_reloc_ok)
 	{
@@ -1551,16 +1619,11 @@
    routines.  A few relocs we have to do ourselves.  */
 
 static bfd_reloc_status_type
-mmix_final_link_relocate (howto, input_section, contents,
-			  r_offset, r_addend, relocation, symname, symsec)
-     reloc_howto_type *howto;
-     asection *input_section;
-     bfd_byte *contents;
-     bfd_vma r_offset;
-     bfd_signed_vma r_addend;
-     bfd_vma relocation;
-     const char *symname;
-     asection *symsec;
+mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
+			  bfd_byte *contents, bfd_vma r_offset,
+			  bfd_signed_vma r_addend, bfd_vma relocation,
+			  const char *symname, asection *symsec,
+			  char **error_message)
 {
   bfd_reloc_status_type r = bfd_reloc_ok;
   bfd_vma addr
@@ -1587,7 +1650,7 @@
 	       + r_offset);
 
       r = mmix_elf_perform_relocation (input_section, howto, contents,
-				       addr, srel);
+				       addr, srel, error_message);
       break;
 
     case R_MMIX_BASE_PLUS_OFFSET:
@@ -1669,7 +1732,7 @@
     do_mmix_reloc:
       contents += r_offset;
       r = mmix_elf_perform_relocation (input_section, howto, contents,
-				       addr, srel);
+				       addr, srel, error_message);
       break;
 
     case R_MMIX_LOCAL:
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index cef0ff1..c8c11a8 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1,6 +1,6 @@
 /* PowerPC64-specific support for 64-bit ELF.
    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009, 2010 Free Software Foundation, Inc.
+   2009, 2010, 2011 Free Software Foundation, Inc.
    Written by Linus Nordberg, Swox AB <[email protected]>,
    based on elf32-ppc.c by Ian Lance Taylor.
    Largely rewritten by Alan Modra.
@@ -34,6 +34,7 @@
 #include "elf-bfd.h"
 #include "elf/ppc64.h"
 #include "elf64-ppc.h"
+#include "dwarf2.h"
 
 static bfd_reloc_status_type ppc64_elf_ha_reloc
   (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@@ -54,7 +55,7 @@
 static bfd_reloc_status_type ppc64_elf_unhandled_reloc
   (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 static bfd_vma opd_entry_value
-  (asection *, bfd_vma, asection **, bfd_vma *);
+  (asection *, bfd_vma, asection **, bfd_vma *, bfd_boolean);
 
 #define TARGET_LITTLE_SYM	bfd_elf64_powerpcle_vec
 #define TARGET_LITTLE_NAME	"elf64-powerpcle"
@@ -79,12 +80,13 @@
 
 #define bfd_elf64_mkobject		      ppc64_elf_mkobject
 #define bfd_elf64_bfd_reloc_type_lookup	      ppc64_elf_reloc_type_lookup
-#define bfd_elf64_bfd_reloc_name_lookup ppc64_elf_reloc_name_lookup
-#define bfd_elf64_bfd_merge_private_bfd_data  ppc64_elf_merge_private_bfd_data
+#define bfd_elf64_bfd_reloc_name_lookup	      ppc64_elf_reloc_name_lookup
+#define bfd_elf64_bfd_merge_private_bfd_data  _bfd_generic_verify_endian_match
 #define bfd_elf64_new_section_hook	      ppc64_elf_new_section_hook
 #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 bfd_elf64_get_synthetic_symtab	      ppc64_elf_get_synthetic_symtab
+#define bfd_elf64_bfd_link_just_syms	      ppc64_elf_link_just_syms
 
 #define elf_backend_object_p		      ppc64_elf_object_p
 #define elf_backend_grok_prstatus	      ppc64_elf_grok_prstatus
@@ -103,6 +105,7 @@
 #define elf_backend_gc_sweep_hook	      ppc64_elf_gc_sweep_hook
 #define elf_backend_adjust_dynamic_symbol     ppc64_elf_adjust_dynamic_symbol
 #define elf_backend_hide_symbol		      ppc64_elf_hide_symbol
+#define elf_backend_maybe_function_sym	      ppc64_elf_maybe_function_sym
 #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_init_index_section	      _bfd_elf_init_2_index_sections
@@ -1280,6 +1283,20 @@
 	 0,			/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
+  HOWTO (R_PPC64_TOCSAVE,
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_PPC64_TOCSAVE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
   /* Computes the load module index of the load module that contains the
      definition of its TLS sym.  */
   HOWTO (R_PPC64_DTPMOD64,
@@ -2323,7 +2340,7 @@
     {
       bfd_vma dest = opd_entry_value (symbol->section,
 				      symbol->value + reloc_entry->addend,
-				      NULL, NULL);
+				      NULL, NULL, FALSE);
       if (dest != (bfd_vma) -1)
 	reloc_entry->addend = dest - (symbol->value
 				      + symbol->section->output_section->vma
@@ -2596,7 +2613,11 @@
 
   /* Nonzero if this bfd has small toc/got relocs, ie. that expect
      the reloc to be in the range -32768 to 32767.  */
-  unsigned int has_small_toc_reloc;
+  unsigned int has_small_toc_reloc : 1;
+
+  /* Set if toc/got ha relocs detected not using r2, or lo reloc
+     instruction not one we handle.  */
+  unsigned int unexpected_toc_insn : 1;
 };
 
 #define ppc64_elf_tdata(bfd) \
@@ -2669,6 +2690,8 @@
   if (note->descsz != 136)
     return FALSE;
 
+  elf_tdata (abfd)->core_pid
+    = bfd_get_32 (abfd, note->descdata + 24);
   elf_tdata (abfd)->core_program
     = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
   elf_tdata (abfd)->core_command
@@ -2724,35 +2747,6 @@
     }
 }
 
-/* Merge backend specific data from an object file to the output
-   object file when linking.  */
-
-static bfd_boolean
-ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
-{
-  /* Check if we have the same endianess.  */
-  if (ibfd->xvec->byteorder != obfd->xvec->byteorder
-      && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
-      && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
-    {
-      const char *msg;
-
-      if (bfd_big_endian (ibfd))
-	msg = _("%B: compiled for a big endian system "
-		"and target is little endian");
-      else
-	msg = _("%B: compiled for a little endian system "
-		"and target is big endian");
-
-      (*_bfd_error_handler) (msg, ibfd);
-
-      bfd_set_error (bfd_error_wrong_format);
-      return FALSE;
-    }
-
-  return TRUE;
-}
-
 /* Add extra PPC sections.  */
 
 static const struct bfd_elf_special_section ppc64_elf_special_sections[]=
@@ -3316,8 +3310,9 @@
 		{
 		  if (sec->vma > ent)
 		    break;
-		  if ((sec->flags & SEC_ALLOC) == 0
-		      || (sec->flags & SEC_LOAD) == 0)
+		  /* SEC_LOAD may not be set if SEC is from a separate debug
+		     info file.  */
+		  if ((sec->flags & SEC_ALLOC) == 0)
 		    break;
 		  if ((sec->flags & SEC_CODE) != 0)
 		    s->section = sec;
@@ -3483,26 +3478,6 @@
    calls may use the function descriptor symbol, ie. "bl foo".  This
    behaves exactly as "bl .foo".  */
 
-/* The linker needs to keep track of the number of relocs that it
-   decides to copy as dynamic relocs in check_relocs for each symbol.
-   This is so that it can later discard them if they are found to be
-   unnecessary.  We store the information in a field extending the
-   regular ELF linker hash table.  */
-
-struct ppc_dyn_relocs
-{
-  struct ppc_dyn_relocs *next;
-
-  /* The input section of the reloc.  */
-  asection *sec;
-
-  /* Total number of relocs copied for the input section.  */
-  bfd_size_type count;
-
-  /* Number of pc-relative relocs copied for the input section.  */
-  bfd_size_type pc_count;
-};
-
 /* Of those relocs that might be copied as dynamic relocs, this function
    selects those that must be copied when linking a shared library,
    even when the symbol is local.  */
@@ -3669,7 +3644,7 @@
   } u;
 
   /* Track dynamic relocs copied for this symbol.  */
-  struct ppc_dyn_relocs *dyn_relocs;
+  struct elf_dyn_relocs *dyn_relocs;
 
   /* Link between function code and descriptor symbols.  */
   struct ppc_link_hash_entry *oh;
@@ -3718,6 +3693,9 @@
   /* Another hash table for plt_branch stubs.  */
   struct bfd_hash_table branch_hash_table;
 
+  /* Hash table for function prologue tocsave.  */
+  htab_t tocsave_htab;
+
   /* Linker stub bfd.  */
   bfd *stub_bfd;
 
@@ -3765,6 +3743,7 @@
   asection *sfpr;
   asection *brlt;
   asection *relbrlt;
+  asection *glink_eh_frame;
 
   /* Shortcut to .__tls_get_addr and __tls_get_addr.  */
   struct ppc_link_hash_entry *tls_get_addr;
@@ -3779,6 +3758,9 @@
   /* Number of stubs against global syms.  */
   unsigned long stub_globals;
 
+  /* Set if PLT call stubs should load r11.  */
+  unsigned int plt_static_chain:1;
+
   /* Set if we should emit symbols for stubs.  */
   unsigned int emit_stub_syms:1;
 
@@ -3960,6 +3942,26 @@
   return entry;
 }
 
+struct tocsave_entry {
+  asection *sec;
+  bfd_vma offset;
+};
+
+static hashval_t
+tocsave_htab_hash (const void *p)
+{
+  const struct tocsave_entry *e = (const struct tocsave_entry *) p;
+  return ((bfd_vma)(intptr_t) e->sec ^ e->offset) >> 3;
+}
+
+static int
+tocsave_htab_eq (const void *p1, const void *p2)
+{
+  const struct tocsave_entry *e1 = (const struct tocsave_entry *) p1;
+  const struct tocsave_entry *e2 = (const struct tocsave_entry *) p2;
+  return e1->sec == e2->sec && e1->offset == e2->offset;
+}
+
 /* Create a ppc64 ELF linker hash table.  */
 
 static struct bfd_link_hash_table *
@@ -3990,6 +3992,13 @@
 			    sizeof (struct ppc_branch_hash_entry)))
     return NULL;
 
+  htab->tocsave_htab = htab_try_create (1024,
+					tocsave_htab_hash,
+					tocsave_htab_eq,
+					NULL);
+  if (htab->tocsave_htab == NULL)
+    return NULL;
+
   /* Initializing two fields of the union is just cosmetic.  We really
      only care about glist, but when compiled on a 32-bit host the
      bfd_vma fields are larger.  Setting the bfd_vma to zero makes
@@ -4011,10 +4020,12 @@
 static void
 ppc64_elf_link_hash_table_free (struct bfd_link_hash_table *hash)
 {
-  struct ppc_link_hash_table *ret = (struct ppc_link_hash_table *) hash;
+  struct ppc_link_hash_table *htab = (struct ppc_link_hash_table *) hash;
 
-  bfd_hash_table_free (&ret->stub_hash_table);
-  bfd_hash_table_free (&ret->branch_hash_table);
+  bfd_hash_table_free (&htab->stub_hash_table);
+  bfd_hash_table_free (&htab->branch_hash_table);
+  if (htab->tocsave_htab)
+    htab_delete (htab->tocsave_htab);
   _bfd_generic_link_hash_table_free (hash);
 }
 
@@ -4134,8 +4145,9 @@
 static struct ppc_stub_hash_entry *
 ppc_add_stub (const char *stub_name,
 	      asection *section,
-	      struct ppc_link_hash_table *htab)
+	      struct bfd_link_info *info)
 {
+  struct ppc_link_hash_table *htab = ppc_hash_table (info);
   asection *link_sec;
   asection *stub_sec;
   struct ppc_stub_hash_entry *stub_entry;
@@ -4172,8 +4184,8 @@
 				     TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
-			     section->owner, stub_name);
+      info->callbacks->einfo (_("%P: %B: cannot create stub entry %s\n"),
+			      section->owner, stub_name);
       return NULL;
     }
 
@@ -4211,6 +4223,18 @@
       || ! bfd_set_section_alignment (dynobj, htab->glink, 3))
     return FALSE;
 
+  if (!info->no_ld_generated_unwind_info)
+    {
+      flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+	       | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+      htab->glink_eh_frame = bfd_make_section_anyway_with_flags (dynobj,
+								 ".eh_frame",
+								 flags);
+      if (htab->glink_eh_frame == NULL
+	  || !bfd_set_section_alignment (abfd, htab->glink_eh_frame, 2))
+	return FALSE;
+    }
+
   flags = SEC_ALLOC | SEC_LINKER_CREATED;
   htab->iplt = bfd_make_section_anyway_with_flags (dynobj, ".iplt", flags);
   if (htab->iplt == NULL
@@ -4393,38 +4417,6 @@
   edir = (struct ppc_link_hash_entry *) dir;
   eind = (struct ppc_link_hash_entry *) ind;
 
-  /* Copy over any dynamic relocs we may have on the indirect sym.  */
-  if (eind->dyn_relocs != NULL)
-    {
-      if (edir->dyn_relocs != NULL)
-	{
-	  struct ppc_dyn_relocs **pp;
-	  struct ppc_dyn_relocs *p;
-
-	  /* Add reloc counts against the indirect sym to the direct sym
-	     list.  Merge any entries against the same section.  */
-	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
-	    {
-	      struct ppc_dyn_relocs *q;
-
-	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
-		if (q->sec == p->sec)
-		  {
-		    q->pc_count += p->pc_count;
-		    q->count += p->count;
-		    *pp = p->next;
-		    break;
-		  }
-	      if (q == NULL)
-		pp = &p->next;
-	    }
-	  *pp = edir->dyn_relocs;
-	}
-
-      edir->dyn_relocs = eind->dyn_relocs;
-      eind->dyn_relocs = NULL;
-    }
-
   edir->is_func |= eind->is_func;
   edir->is_func_descriptor |= eind->is_func_descriptor;
   edir->tls_mask |= eind->tls_mask;
@@ -4448,6 +4440,38 @@
   if (eind->elf.root.type != bfd_link_hash_indirect)
     return;
 
+  /* Copy over any dynamic relocs we may have on the indirect sym.  */
+  if (eind->dyn_relocs != NULL)
+    {
+      if (edir->dyn_relocs != NULL)
+	{
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
+
+	  /* Add reloc counts against the indirect sym to the direct sym
+	     list.  Merge any entries against the same section.  */
+	  for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+	    {
+	      struct elf_dyn_relocs *q;
+
+	      for (q = edir->dyn_relocs; q != NULL; q = q->next)
+		if (q->sec == p->sec)
+		  {
+		    q->pc_count += p->pc_count;
+		    q->count += p->count;
+		    *pp = p->next;
+		    break;
+		  }
+	      if (q == NULL)
+		pp = &p->next;
+	    }
+	  *pp = edir->dyn_relocs;
+	}
+
+      edir->dyn_relocs = eind->dyn_relocs;
+      eind->dyn_relocs = NULL;
+    }
+
   /* Copy over got entries that we may have already seen to the
      symbol which just became indirect.  */
   if (eind->elf.got.glist != NULL)
@@ -4568,10 +4592,14 @@
 			   asection **sec,
 			   bfd_vma *value ATTRIBUTE_UNUSED)
 {
+  if ((ibfd->flags & DYNAMIC) == 0
+      && ELF_ST_BIND (isym->st_info) == STB_GNU_UNIQUE)
+    elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+
   if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
     {
       if ((ibfd->flags & DYNAMIC) == 0)
-	elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
+	elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
     }
   else if (ELF_ST_TYPE (isym->st_info) == STT_FUNC)
     ;
@@ -4745,6 +4773,25 @@
   return TRUE;
 }
 
+/* If --just-symbols against a final linked binary, then assume we need
+   toc adjusting stubs when calling functions defined there.  */
+
+static void
+ppc64_elf_link_just_syms (asection *sec, struct bfd_link_info *info)
+{
+  if ((sec->flags & SEC_CODE) != 0
+      && (sec->owner->flags & (EXEC_P | DYNAMIC)) != 0
+      && is_ppc64_elf (sec->owner))
+    {
+      asection *got = bfd_get_section_by_name (sec->owner, ".got");
+      if (got != NULL
+	  && got->size >= elf_backend_got_header_size
+	  && bfd_get_section_by_name (sec->owner, ".opd") != NULL)
+	sec->has_toc_reloc = 1;
+    }
+  _bfd_elf_link_just_syms (sec, info);
+}
+
 static struct plt_entry **
 update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
 		       unsigned long r_symndx, bfd_vma r_addend, int tls_type)
@@ -5378,8 +5425,8 @@
 	      || (!info->shared
 		  && ifunc != NULL))
 	    {
-	      struct ppc_dyn_relocs *p;
-	      struct ppc_dyn_relocs **head;
+	      struct elf_dyn_relocs *p;
+	      struct elf_dyn_relocs **head;
 
 	      /* We must copy these reloc types into the output file.
 		 Create a reloc section in dynobj and make room for
@@ -5418,7 +5465,7 @@
 		    s = sec;
 
 		  vpp = &elf_section_data (s)->local_dynrel;
-		  head = (struct ppc_dyn_relocs **) vpp;
+		  head = (struct elf_dyn_relocs **) vpp;
 		}
 
 	      p = *head;
@@ -5455,27 +5502,43 @@
 opd_entry_value (asection *opd_sec,
 		 bfd_vma offset,
 		 asection **code_sec,
-		 bfd_vma *code_off)
+		 bfd_vma *code_off,
+		 bfd_boolean in_code_sec)
 {
   bfd *opd_bfd = opd_sec->owner;
   Elf_Internal_Rela *relocs;
   Elf_Internal_Rela *lo, *hi, *look;
   bfd_vma val;
 
-  /* No relocs implies we are linking a --just-symbols object.  */
+  /* No relocs implies we are linking a --just-symbols object, or looking
+     at a final linked executable with addr2line or somesuch.  */
   if (opd_sec->reloc_count == 0)
     {
-      if (!bfd_get_section_contents (opd_bfd, opd_sec, &val, offset, 8))
+      char buf[8];
+
+      if (!bfd_get_section_contents (opd_bfd, opd_sec, buf, offset, 8))
 	return (bfd_vma) -1;
 
+      val = bfd_get_64 (opd_bfd, buf);
       if (code_sec != NULL)
 	{
 	  asection *sec, *likely = NULL;
-	  for (sec = opd_bfd->sections; sec != NULL; sec = sec->next)
-	    if (sec->vma <= val
-		&& (sec->flags & SEC_LOAD) != 0
-		&& (sec->flags & SEC_ALLOC) != 0)
-	      likely = sec;
+
+	  if (in_code_sec)
+	    {
+	      sec = *code_sec;
+	      if (sec->vma <= val
+		  && val < sec->vma + sec->size)
+		likely = sec;
+	      else
+		val = -1;
+	    }
+	  else
+	    for (sec = opd_bfd->sections; sec != NULL; sec = sec->next)
+	      if (sec->vma <= val
+		  && (sec->flags & SEC_LOAD) != 0
+		  && (sec->flags & SEC_ALLOC) != 0)
+		likely = sec;
 	  if (likely != NULL)
 	    {
 	      *code_sec = likely;
@@ -5551,7 +5614,12 @@
 	      if (code_off != NULL)
 		*code_off = val;
 	      if (code_sec != NULL)
-		*code_sec = sec;
+		{
+		  if (in_code_sec && *code_sec != sec)
+		    return -1;
+		  else
+		    *code_sec = sec;
+		}
 	      if (sec != NULL && sec->output_section != NULL)
 		val += sec->output_section->vma + sec->output_offset;
 	    }
@@ -5562,6 +5630,55 @@
   return val;
 }
 
+/* If the ELF symbol SYM might be a function in SEC, return the
+   function size and set *CODE_OFF to the function's entry point,
+   otherwise return zero.  */
+
+static bfd_size_type
+ppc64_elf_maybe_function_sym (const asymbol *sym, asection *sec,
+			      bfd_vma *code_off)
+{
+  bfd_size_type size;
+
+  if ((sym->flags & (BSF_SECTION_SYM | BSF_FILE | BSF_OBJECT
+		     | BSF_THREAD_LOCAL | BSF_RELC | BSF_SRELC)) != 0)
+    return 0;
+
+  size = 0;
+  if (!(sym->flags & BSF_SYNTHETIC))
+    size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size;
+
+  if (strcmp (sym->section->name, ".opd") == 0)
+    {
+      if (opd_entry_value (sym->section, sym->value,
+			   &sec, code_off, TRUE) == (bfd_vma) -1)
+	return 0;
+      /* An old ABI binary with dot-syms has a size of 24 on the .opd
+	 symbol.  This size has nothing to do with the code size of the
+	 function, which is what we're supposed to return, but the
+	 code size isn't available without looking up the dot-sym.
+	 However, doing that would be a waste of time particularly
+	 since elf_find_function will look at the dot-sym anyway.
+	 Now, elf_find_function will keep the largest size of any
+	 function sym found at the code address of interest, so return
+	 1 here to avoid it incorrectly caching a larger function size
+	 for a small function.  This does mean we return the wrong
+	 size for a new-ABI function of size 24, but all that does is
+	 disable caching for such functions.  */
+      if (size == 24)
+	size = 1;
+    }
+  else
+    {
+      if (sym->section != sec)
+	return 0;
+      *code_off = sym->value;
+    }
+  if (size == 0)
+    size = 1;
+  return size;
+}
+
 /* Return true if symbol is defined in a regular object file.  */
 
 static bfd_boolean
@@ -5639,7 +5756,7 @@
       else if (get_opd_info (eh->elf.root.u.def.section) != NULL
 	       && opd_entry_value (eh->elf.root.u.def.section,
 				   eh->elf.root.u.def.value,
-				   &sec, NULL) != (bfd_vma) -1)
+				   &sec, NULL, FALSE) != (bfd_vma) -1)
 	sec->flags |= SEC_KEEP;
 
       sec = eh->elf.root.u.def.section;
@@ -5658,9 +5775,6 @@
   struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
   struct ppc_link_hash_entry *fdh;
 
-  if (eh->elf.root.type == bfd_link_hash_warning)
-    eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
-
   /* Dynamic linking info is on the func descriptor sym.  */
   fdh = defined_func_desc (eh);
   if (fdh != NULL)
@@ -5672,7 +5786,10 @@
 	  || (!info->executable
 	      && eh->elf.def_regular
 	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
-	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN)))
+	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN
+	      && (strchr (eh->elf.root.root.string, ELF_VER_CHR) != NULL
+		  || !bfd_hide_sym_by_version (info->version_info,
+					       eh->elf.root.root.string)))))
     {
       asection *code_sec;
       struct ppc_link_hash_entry *fh;
@@ -5690,7 +5807,7 @@
       else if (get_opd_info (eh->elf.root.u.def.section) != NULL
 	       && opd_entry_value (eh->elf.root.u.def.section,
 				   eh->elf.root.u.def.value,
-				   &code_sec, NULL) != (bfd_vma) -1)
+				   &code_sec, NULL, FALSE) != (bfd_vma) -1)
 	code_sec->flags |= SEC_KEEP;
     }
 
@@ -5750,7 +5867,7 @@
 	      else if (get_opd_info (eh->elf.root.u.def.section) != NULL
 		       && opd_entry_value (eh->elf.root.u.def.section,
 					   eh->elf.root.u.def.value,
-					   &rsec, NULL) != (bfd_vma) -1)
+					   &rsec, NULL, FALSE) != (bfd_vma) -1)
 		eh->elf.root.u.def.section->gc_mark = 1;
 	      else
 		rsec = h->root.u.def.section;
@@ -5824,8 +5941,8 @@
       if (r_symndx >= symtab_hdr->sh_info)
 	{
 	  struct ppc_link_hash_entry *eh;
-	  struct ppc_dyn_relocs **pp;
-	  struct ppc_dyn_relocs *p;
+	  struct elf_dyn_relocs **pp;
+	  struct elf_dyn_relocs *p;
 
 	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 	  h = elf_follow_link (h);
@@ -6203,9 +6320,6 @@
   if (fh->elf.root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (fh->elf.root.type == bfd_link_hash_warning)
-    fh = (struct ppc_link_hash_entry *) fh->elf.root.u.i.link;
-
   info = inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -6222,7 +6336,7 @@
       && opd_entry_value (fdh->elf.root.u.def.section,
 			  fdh->elf.root.u.def.value,
 			  &fh->elf.root.u.def.section,
-			  &fh->elf.root.u.def.value) != (bfd_vma) -1)
+			  &fh->elf.root.u.def.value, FALSE) != (bfd_vma) -1)
     {
       fh->elf.root.type = fdh->elf.root.type;
       fh->elf.forced_local = 1;
@@ -6443,7 +6557,7 @@
   if (ELIMINATE_COPY_RELOCS)
     {
       struct ppc_link_hash_entry * eh;
-      struct ppc_dyn_relocs *p;
+      struct elf_dyn_relocs *p;
 
       eh = (struct ppc_link_hash_entry *) h;
       for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -6469,9 +6583,9 @@
 	 function pointers, vtable refs and suchlike in read-only
 	 sections.  Allow them to proceed, but warn that this might
 	 break at runtime.  */
-      (*_bfd_error_handler)
-	(_("copy reloc against `%s' requires lazy plt linking; "
-	   "avoid setting LD_BIND_NOW=1 or upgrade gcc"),
+      info->callbacks->einfo
+	(_("%P: copy reloc against `%s' requires lazy plt linking; "
+	   "avoid setting LD_BIND_NOW=1 or upgrade gcc\n"),
 	 h->root.root.string);
     }
 
@@ -6480,8 +6594,8 @@
 
   if (h->size == 0)
     {
-      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
-			     h->root.root.string);
+      info->callbacks->einfo (_("%P: dynamic variable `%s' is zero size\n"),
+			      h->root.root.string);
       return TRUE;
     }
 
@@ -6718,6 +6832,55 @@
   return 1;
 }
 
+/* Find (or create) an entry in the tocsave hash table.  */
+
+static struct tocsave_entry *
+tocsave_find (struct ppc_link_hash_table *htab,
+	      enum insert_option insert,
+	      Elf_Internal_Sym **local_syms,
+	      const Elf_Internal_Rela *irela,
+	      bfd *ibfd)
+{
+  unsigned long r_indx;
+  struct elf_link_hash_entry *h;
+  Elf_Internal_Sym *sym;
+  struct tocsave_entry ent, *p;
+  hashval_t hash;
+  struct tocsave_entry **slot;
+
+  r_indx = ELF64_R_SYM (irela->r_info);
+  if (!get_sym_h (&h, &sym, &ent.sec, NULL, local_syms, r_indx, ibfd))
+    return NULL;
+  if (ent.sec == NULL || ent.sec->output_section == NULL)
+    {
+      (*_bfd_error_handler)
+	(_("%B: undefined symbol on R_PPC64_TOCSAVE relocation"));
+      return NULL;
+    }
+
+  if (h != NULL)
+    ent.offset = h->root.u.def.value;
+  else
+    ent.offset = sym->st_value;
+  ent.offset += irela->r_addend;
+
+  hash = tocsave_htab_hash (&ent);
+  slot = ((struct tocsave_entry **)
+	  htab_find_slot_with_hash (htab->tocsave_htab, &ent, hash, insert));
+  if (slot == NULL)
+    return NULL;
+
+  if (*slot == NULL)
+    {
+      p = (struct tocsave_entry *) bfd_alloc (ibfd, sizeof (*p));
+      if (p == NULL)
+	return NULL;
+      *p = ent;
+      *slot = p;
+    }
+  return *slot;
+}
+
 /* Adjust all global syms defined in opd sections.  In gcc generated
    code for the old ABI, these will already have been done.  */
 
@@ -6731,9 +6894,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (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)
     return TRUE;
@@ -6783,8 +6943,8 @@
 		  asection *sym_sec)
 {
   enum elf_ppc64_reloc_type r_type;
-  struct ppc_dyn_relocs *p;
-  struct ppc_dyn_relocs **pp;
+  struct elf_dyn_relocs *p;
+  struct elf_dyn_relocs **pp;
 
   /* Can this reloc be dynamic?  This switch, and later tests here
      should be kept in sync with the code in check_relocs.  */
@@ -6869,12 +7029,12 @@
       if (sym_sec != NULL)
 	{
 	  void *vpp = &elf_section_data (sym_sec)->local_dynrel;
-	  pp = (struct ppc_dyn_relocs **) vpp;
+	  pp = (struct elf_dyn_relocs **) vpp;
 	}
       else
 	{
 	  void *vpp = &elf_section_data (sec)->local_dynrel;
-	  pp = (struct ppc_dyn_relocs **) vpp;
+	  pp = (struct elf_dyn_relocs **) vpp;
 	}
 
       /* elf_gc_sweep may have already removed all dyn relocs associated
@@ -6898,8 +7058,8 @@
       pp = &p->next;
     }
 
-  (*_bfd_error_handler) (_("dynreloc miscount for %B, section %A"),
-			   sec->owner, sec);
+  info->callbacks->einfo (_("%P: dynreloc miscount for %B, section %A\n"),
+			  sec->owner, sec);
   bfd_set_error (bfd_error_bad_value);
   return FALSE;
 }
@@ -7450,6 +7610,7 @@
   bfd *ibfd;
   asection *sec;
   struct ppc_link_hash_table *htab;
+  unsigned char *toc_ref;
   int pass;
 
   if (info->relocatable || !info->executable)
@@ -7459,23 +7620,25 @@
   if (htab == NULL)
     return FALSE;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
-    {
-      Elf_Internal_Sym *locsyms = NULL;
-      asection *toc = bfd_get_section_by_name (ibfd, ".toc");
-      unsigned char *toc_ref = NULL;
+  /* Make two passes over the relocs.  On the first pass, mark toc
+     entries involved with tls relocs, and check that tls relocs
+     involved in setting up a tls_get_addr call are indeed followed by
+     such a call.  If they are not, we can't do any tls optimization.
+     On the second pass twiddle tls_mask flags to notify
+     relocate_section that optimization can be done, and adjust got
+     and plt refcounts.  */
+  toc_ref = NULL;
+  for (pass = 0; pass < 2; ++pass)
+    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+      {
+	Elf_Internal_Sym *locsyms = NULL;
+	asection *toc = bfd_get_section_by_name (ibfd, ".toc");
 
-      /* Look at all the sections for this file.  Make two passes over
-	 the relocs.  On the first pass, mark toc entries involved
-	 with tls relocs, and check that tls relocs involved in
-	 setting up a tls_get_addr call are indeed followed by such a
-	 call.  If they are not, exclude them from the optimizations
-	 done on the second pass.  */
-      for (pass = 0; pass < 2; ++pass)
 	for (sec = ibfd->sections; sec != NULL; sec = sec->next)
 	  if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
 	    {
 	      Elf_Internal_Rela *relstart, *rel, *relend;
+	      bfd_boolean found_tls_get_addr_arg = 0;
 
 	      /* Read the relocations.  */
 	      relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
@@ -7497,6 +7660,7 @@
 		  bfd_boolean ok_tprel, is_local;
 		  long toc_ref_index = 0;
 		  int expecting_tls_get_addr = 0;
+		  bfd_boolean ret = FALSE;
 
 		  r_symndx = ELF64_R_SYM (rel->r_info);
 		  if (!get_sym_h (&h, &sym, &sym_sec, &tls_mask, &locsyms,
@@ -7511,7 +7675,7 @@
 			  && (elf_symtab_hdr (ibfd).contents
 			      != (unsigned char *) locsyms))
 			free (locsyms);
-		      return FALSE;
+		      return ret;
 		    }
 
 		  if (h != NULL)
@@ -7522,7 +7686,10 @@
 		      else if (h->root.type == bfd_link_hash_undefweak)
 			value = 0;
 		      else
-			continue;
+			{
+			  found_tls_get_addr_arg = 0;
+			  continue;
+			}
 		    }
 		  else
 		    /* Symbols referenced by TLS relocs must be of type
@@ -7549,11 +7716,34 @@
 		    }
 
 		  r_type = ELF64_R_TYPE (rel->r_info);
+		  /* If this section has old-style __tls_get_addr calls
+		     without marker relocs, then check that each
+		     __tls_get_addr call reloc is preceded by a reloc
+		     that conceivably belongs to the __tls_get_addr arg
+		     setup insn.  If we don't find matching arg setup
+		     relocs, don't do any tls optimization.  */
+		  if (pass == 0
+		      && sec->has_tls_get_addr_call
+		      && h != NULL
+		      && (h == &htab->tls_get_addr->elf
+			  || h == &htab->tls_get_addr_fd->elf)
+		      && !found_tls_get_addr_arg
+		      && is_branch_reloc (r_type))
+		    {
+		      info->callbacks->minfo (_("%H __tls_get_addr lost arg, "
+						"TLS optimization disabled\n"),
+					      ibfd, sec, rel->r_offset);
+		      ret = TRUE;
+		      goto err_free_rel;
+		    }
+
+		  found_tls_get_addr_arg = 0;
 		  switch (r_type)
 		    {
 		    case R_PPC64_GOT_TLSLD16:
 		    case R_PPC64_GOT_TLSLD16_LO:
 		      expecting_tls_get_addr = 1;
+		      found_tls_get_addr_arg = 1;
 		      /* Fall thru */
 
 		    case R_PPC64_GOT_TLSLD16_HI:
@@ -7573,6 +7763,7 @@
 		    case R_PPC64_GOT_TLSGD16:
 		    case R_PPC64_GOT_TLSGD16_LO:
 		      expecting_tls_get_addr = 1;
+		      found_tls_get_addr_arg = 1;
 		      /* Fall thru */
 
 		    case R_PPC64_GOT_TLSGD16_HI:
@@ -7601,11 +7792,14 @@
 			}
 		      continue;
 
-		    case R_PPC64_TOC16:
-		    case R_PPC64_TOC16_LO:
-		    case R_PPC64_TLS:
 		    case R_PPC64_TLSGD:
 		    case R_PPC64_TLSLD:
+		      found_tls_get_addr_arg = 1;
+		      /* Fall thru */
+
+		    case R_PPC64_TLS:
+		    case R_PPC64_TOC16:
+		    case R_PPC64_TOC16_LO:
 		      if (sym_sec == NULL || sym_sec != toc)
 			continue;
 
@@ -7614,18 +7808,17 @@
 			 case of R_PPC64_TLS, and after checking for
 			 tls_get_addr for the TOC16 relocs.  */
 		      if (toc_ref == NULL)
-			{
-			  toc_ref = bfd_zmalloc (toc->size / 8);
-			  if (toc_ref == NULL)
-			    goto err_free_rel;
-			}
+			toc_ref = bfd_zmalloc (toc->output_section->rawsize / 8);
+		      if (toc_ref == NULL)
+			goto err_free_rel;
+
 		      if (h != NULL)
 			value = h->root.u.def.value;
 		      else
 			value = sym->st_value;
 		      value += rel->r_addend;
 		      BFD_ASSERT (value < toc->size && value % 8 == 0);
-		      toc_ref_index = value / 8;
+		      toc_ref_index = (value + toc->output_offset) / 8;
 		      if (r_type == R_PPC64_TLS
 			  || r_type == R_PPC64_TLSGD
 			  || r_type == R_PPC64_TLSLD)
@@ -7646,7 +7839,7 @@
 		      if (pass == 0
 			  || sec != toc
 			  || toc_ref == NULL
-			  || !toc_ref[rel->r_offset / 8])
+			  || !toc_ref[(rel->r_offset + toc->output_offset) / 8])
 			continue;
 		      if (ok_tprel)
 			{
@@ -7661,7 +7854,7 @@
 		      if (pass == 0
 			  || sec != toc
 			  || toc_ref == NULL
-			  || !toc_ref[rel->r_offset / 8])
+			  || !toc_ref[(rel->r_offset + toc->output_offset) / 8])
 			continue;
 		      if (rel + 1 < relend
 			  && (rel[1].r_info
@@ -7713,8 +7906,13 @@
 						     rel, ibfd);
 			      if (retval == 0)
 				goto err_free_rel;
-			      if (retval > 1 && toc_tls != NULL)
-				toc_ref[toc_ref_index] = 1;
+			      if (toc_tls != NULL)
+				{
+				  if ((*toc_tls & (TLS_GD | TLS_LD)) != 0)
+				    found_tls_get_addr_arg = 1;
+				  if (retval > 1)
+				    toc_ref[toc_ref_index] = 1;
+				}
 			    }
 			  continue;
 			}
@@ -7725,9 +7923,12 @@
 		      /* Uh oh, we didn't find the expected call.  We
 			 could just mark this symbol to exclude it
 			 from tls optimization but it's safer to skip
-			 the entire section.  */
-		      sec->has_tls_reloc = 0;
-		      break;
+			 the entire optimization.  */
+		      info->callbacks->minfo (_("%H arg lost __tls_get_addr, "
+						"TLS optimization disabled\n"),
+					      ibfd, sec, rel->r_offset);
+		      ret = TRUE;
+		      goto err_free_rel;
 		    }
 
 		  if (expecting_tls_get_addr && htab->tls_get_addr != NULL)
@@ -7813,18 +8014,18 @@
 		free (relstart);
 	    }
 
-      if (toc_ref != NULL)
-	free (toc_ref);
+	if (locsyms != NULL
+	    && (elf_symtab_hdr (ibfd).contents != (unsigned char *) locsyms))
+	  {
+	    if (!info->keep_memory)
+	      free (locsyms);
+	    else
+	      elf_symtab_hdr (ibfd).contents = (unsigned char *) locsyms;
+	  }
+      }
 
-      if (locsyms != NULL
-	  && (elf_symtab_hdr (ibfd).contents != (unsigned char *) locsyms))
-	{
-	  if (!info->keep_memory)
-	    free (locsyms);
-	  else
-	    elf_symtab_hdr (ibfd).contents = (unsigned char *) locsyms;
-	}
-    }
+  if (toc_ref != NULL)
+    free (toc_ref);
   return TRUE;
 }
 
@@ -7850,12 +8051,6 @@
   struct adjust_toc_info *toc_inf = (struct adjust_toc_info *) inf;
   unsigned long i;
 
-  if (h->root.type == bfd_link_hash_indirect)
-    return TRUE;
-
-  if (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)
     return TRUE;
@@ -7890,6 +8085,32 @@
   return TRUE;
 }
 
+/* Return TRUE iff INSN is one we expect on a _LO variety toc/got reloc.  */
+
+static bfd_boolean
+ok_lo_toc_insn (unsigned int insn)
+{
+  return ((insn & (0x3f << 26)) == 14u << 26 /* addi */
+	  || (insn & (0x3f << 26)) == 32u << 26 /* lwz */
+	  || (insn & (0x3f << 26)) == 34u << 26 /* lbz */
+	  || (insn & (0x3f << 26)) == 36u << 26 /* stw */
+	  || (insn & (0x3f << 26)) == 38u << 26 /* stb */
+	  || (insn & (0x3f << 26)) == 40u << 26 /* lhz */
+	  || (insn & (0x3f << 26)) == 42u << 26 /* lha */
+	  || (insn & (0x3f << 26)) == 44u << 26 /* sth */
+	  || (insn & (0x3f << 26)) == 46u << 26 /* lmw */
+	  || (insn & (0x3f << 26)) == 47u << 26 /* stmw */
+	  || (insn & (0x3f << 26)) == 48u << 26 /* lfs */
+	  || (insn & (0x3f << 26)) == 50u << 26 /* lfd */
+	  || (insn & (0x3f << 26)) == 52u << 26 /* stfs */
+	  || (insn & (0x3f << 26)) == 54u << 26 /* stfd */
+	  || ((insn & (0x3f << 26)) == 58u << 26 /* lwa,ld,lmd */
+	      && (insn & 3) != 1)
+	  || ((insn & (0x3f << 26)) == 62u << 26 /* std, stmd */
+	      && ((insn & 3) == 0 || (insn & 3) == 3))
+	  || (insn & (0x3f << 26)) == 12u << 26 /* addic */);
+}
+
 /* Examine all relocs referencing .toc sections in order to remove
    unused .toc entries.  */
 
@@ -7907,7 +8128,7 @@
       asection *toc, *sec;
       Elf_Internal_Shdr *symtab_hdr;
       Elf_Internal_Sym *local_syms;
-      Elf_Internal_Rela *relstart, *rel;
+      Elf_Internal_Rela *relstart, *rel, *toc_relocs;
       unsigned long *skip, *drop;
       unsigned char *used;
       unsigned char *keep, last, some_unused;
@@ -7922,6 +8143,7 @@
 	  || elf_discarded_section (toc))
 	continue;
 
+      toc_relocs = NULL;
       local_syms = NULL;
       symtab_hdr = &elf_symtab_hdr (ibfd);
 
@@ -8017,12 +8239,12 @@
 	  && toc->reloc_count != 0)
 	{
 	  /* Read toc relocs.  */
-	  relstart = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
-						info->keep_memory);
-	  if (relstart == NULL)
+	  toc_relocs = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
+						  info->keep_memory);
+	  if (toc_relocs == NULL)
 	    goto error_ret;
 
-	  for (rel = relstart; rel < relstart + toc->reloc_count; ++rel)
+	  for (rel = toc_relocs; rel < toc_relocs + toc->reloc_count; ++rel)
 	    {
 	      enum elf_ppc64_reloc_type r_type;
 	      unsigned long r_symndx;
@@ -8040,6 +8262,10 @@
 			      r_symndx, ibfd))
 		goto error_ret;
 
+	      if (sym_sec == NULL
+		  || elf_discarded_section (sym_sec))
+		continue;
+
 	      if (!SYMBOL_CALLS_LOCAL (info, h))
 		continue;
 
@@ -8078,11 +8304,8 @@
 		}
 
 	      skip[rel->r_offset >> 3]
-		|= can_optimize | ((rel - relstart) << 2);
+		|= can_optimize | ((rel - toc_relocs) << 2);
 	    }
-
-	  if (elf_section_data (toc)->relocs != relstart)
-	    free (relstart);
 	}
 
       if (skip == NULL)
@@ -8099,6 +8322,9 @@
 	      && relstart != NULL
 	      && elf_section_data (sec)->relocs != relstart)
 	    free (relstart);
+	  if (toc_relocs != NULL
+	      && elf_section_data (toc)->relocs != toc_relocs)
+	    free (toc_relocs);
 	  if (skip != NULL)
 	    free (skip);
 	  return FALSE;
@@ -8139,10 +8365,66 @@
 		struct elf_link_hash_entry *h;
 		Elf_Internal_Sym *sym;
 		bfd_vma val;
+		enum {no_check, check_lo, check_ha} insn_check;
 
 		r_type = ELF64_R_TYPE (rel->r_info);
 		switch (r_type)
 		  {
+		  default:
+		    insn_check = no_check;
+		    break;
+
+		  case R_PPC64_GOT_TLSLD16_HA:
+		  case R_PPC64_GOT_TLSGD16_HA:
+		  case R_PPC64_GOT_TPREL16_HA:
+		  case R_PPC64_GOT_DTPREL16_HA:
+		  case R_PPC64_GOT16_HA:
+		  case R_PPC64_TOC16_HA:
+		    insn_check = check_ha;
+		    break;
+
+		  case R_PPC64_GOT_TLSLD16_LO:
+		  case R_PPC64_GOT_TLSGD16_LO:
+		  case R_PPC64_GOT_TPREL16_LO_DS:
+		  case R_PPC64_GOT_DTPREL16_LO_DS:
+		  case R_PPC64_GOT16_LO:
+		  case R_PPC64_GOT16_LO_DS:
+		  case R_PPC64_TOC16_LO:
+		  case R_PPC64_TOC16_LO_DS:
+		    insn_check = check_lo;
+		    break;
+		  }
+
+		if (insn_check != no_check)
+		  {
+		    bfd_vma off = rel->r_offset & ~3;
+		    unsigned char buf[4];
+		    unsigned int insn;
+
+		    if (!bfd_get_section_contents (ibfd, sec, buf, off, 4))
+		      {
+			free (used);
+			goto error_ret;
+		      }
+		    insn = bfd_get_32 (ibfd, buf);
+		    if (insn_check == check_lo
+			? !ok_lo_toc_insn (insn)
+			: ((insn & ((0x3f << 26) | 0x1f << 16))
+			   != ((15u << 26) | (2 << 16)) /* addis rt,2,imm */))
+		      {
+			char str[12];
+
+			ppc64_elf_tdata (ibfd)->unexpected_toc_insn = 1;
+			sprintf (str, "%#08x", insn);
+			info->callbacks->einfo
+			  (_("%P: %H: toc optimization is not supported for"
+			     " %s instruction.\n"),
+			   ibfd, sec, rel->r_offset & ~3, str);
+		      }
+		  }
+
+		switch (r_type)
+		  {
 		  case R_PPC64_TOC16:
 		  case R_PPC64_TOC16_LO:
 		  case R_PPC64_TOC16_HI:
@@ -8190,7 +8472,10 @@
 		      case R_PPC64_TOC16_LO_DS:
 			off = rel->r_offset + (bfd_big_endian (ibfd) ? -2 : 3);
 			if (!bfd_get_section_contents (ibfd, sec, &opc, off, 1))
-			  return FALSE;
+			  {
+			    free (used);
+			    goto error_ret;
+			  }
 			if ((opc & (0x3f << 2)) == (58u << 2))
 			  break;
 			/* Fall thru */
@@ -8234,7 +8519,7 @@
 		some_unused = 1;
 	      last = 0;
 	    }
-	  else if (*drop)
+	  else if ((*drop & ref_from_discarded) != 0)
 	    {
 	      some_unused = 1;
 	      last = ref_from_discarded;
@@ -8338,7 +8623,7 @@
 		  else if ((skip[val >> 3] & can_optimize) != 0)
 		    {
 		      Elf_Internal_Rela *tocrel
-			= elf_section_data (toc)->relocs + (skip[val >> 3] >> 2);
+			= toc_relocs + (skip[val >> 3] >> 2);
 		      unsigned long tsym = ELF64_R_SYM (tocrel->r_info);
 
 		      switch (r_type)
@@ -8352,7 +8637,15 @@
 			  break;
 
 			default:
-			  abort ();
+			  if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
+			    ppc_howto_init ();
+			  info->callbacks->einfo
+			    (_("%P: %H: %s relocation references "
+			       "optimized away TOC entry\n"),
+			     ibfd, sec, rel->r_offset,
+			     ppc64_elf_howto_table[r_type]->name);
+			  bfd_set_error (bfd_error_bad_value);
+			  goto error_ret;
 			}
 		      rel->r_addend = tocrel->r_addend;
 		      elf_section_data (sec)->relocs = relstart;
@@ -8372,34 +8665,35 @@
 
 	  /* We shouldn't have local or global symbols defined in the TOC,
 	     but handle them anyway.  */
-	  for (sym = local_syms;
-	       sym < local_syms + symtab_hdr->sh_info;
-	       ++sym)
-	    if (sym->st_value != 0
-		&& bfd_section_from_elf_index (ibfd, sym->st_shndx) == toc)
-	      {
-		unsigned long i;
+	  if (local_syms != NULL)
+	    for (sym = local_syms;
+		 sym < local_syms + symtab_hdr->sh_info;
+		 ++sym)
+	      if (sym->st_value != 0
+		  && bfd_section_from_elf_index (ibfd, sym->st_shndx) == toc)
+		{
+		  unsigned long i;
 
-		if (sym->st_value > toc->rawsize)
-		  i = toc->rawsize >> 3;
-		else
-		  i = sym->st_value >> 3;
+		  if (sym->st_value > toc->rawsize)
+		    i = toc->rawsize >> 3;
+		  else
+		    i = sym->st_value >> 3;
 
-		if ((skip[i] & (ref_from_discarded | can_optimize)) != 0)
-		  {
-		    if (local_toc_syms)
-		      (*_bfd_error_handler)
-			(_("%s defined on removed toc entry"),
-			 bfd_elf_sym_name (ibfd, symtab_hdr, sym, NULL));
-		    do
-		      ++i;
-		    while ((skip[i] & (ref_from_discarded | can_optimize)));
-		    sym->st_value = (bfd_vma) i << 3;
-		  }
+		  if ((skip[i] & (ref_from_discarded | can_optimize)) != 0)
+		    {
+		      if (local_toc_syms)
+			(*_bfd_error_handler)
+			  (_("%s defined on removed toc entry"),
+			   bfd_elf_sym_name (ibfd, symtab_hdr, sym, NULL));
+		      do
+			++i;
+		      while ((skip[i] & (ref_from_discarded | can_optimize)));
+		      sym->st_value = (bfd_vma) i << 3;
+		    }
 
-		sym->st_value -= skip[i];
-		symtab_hdr->contents = (unsigned char *) local_syms;
-	      }
+		  sym->st_value -= skip[i];
+		  symtab_hdr->contents = (unsigned char *) local_syms;
+		}
 
 	  /* Adjust any global syms defined in this toc input section.  */
 	  if (toc_inf.global_toc_syms)
@@ -8417,15 +8711,15 @@
 	      Elf_Internal_Rela *wrel;
 	      bfd_size_type sz;
 
-	      /* Read toc relocs.  */
-	      relstart = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
-						    TRUE);
-	      if (relstart == NULL)
+	      /* Remove unused toc relocs, and adjust those we keep.  */
+	      if (toc_relocs == NULL)
+		toc_relocs = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
+							info->keep_memory);
+	      if (toc_relocs == NULL)
 		goto error_ret;
 
-	      /* Remove unused toc relocs, and adjust those we keep.  */
-	      wrel = relstart;
-	      for (rel = relstart; rel < relstart + toc->reloc_count; ++rel)
+	      wrel = toc_relocs;
+	      for (rel = toc_relocs; rel < toc_relocs + toc->reloc_count; ++rel)
 		if ((skip[rel->r_offset >> 3]
 		     & (ref_from_discarded | can_optimize)) == 0)
 		  {
@@ -8438,12 +8732,16 @@
 					    &local_syms, NULL, NULL))
 		  goto error_ret;
 
-	      toc->reloc_count = wrel - relstart;
+	      elf_section_data (toc)->relocs = toc_relocs;
+	      toc->reloc_count = wrel - toc_relocs;
 	      rel_hdr = _bfd_elf_single_rel_hdr (toc);
 	      sz = rel_hdr->sh_entsize;
 	      rel_hdr->sh_size = toc->reloc_count * sz;
 	    }
 	}
+      else if (toc_relocs != NULL
+	       && elf_section_data (toc)->relocs != toc_relocs)
+	free (toc_relocs);
 
       if (local_syms != NULL
 	  && symtab_hdr->contents != (unsigned char *) local_syms)
@@ -8535,15 +8833,12 @@
   struct ppc_link_hash_table *htab;
   asection *s;
   struct ppc_link_hash_entry *eh;
-  struct ppc_dyn_relocs *p;
+  struct elf_dyn_relocs *p;
   struct got_entry **pgent, *gent;
 
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = ppc_hash_table (info);
   if (htab == NULL)
@@ -8699,7 +8994,7 @@
 	 then they should avoid writing weird assembly.  */
       if (SYMBOL_CALLS_LOCAL (info, h))
 	{
-	  struct ppc_dyn_relocs **pp;
+	  struct elf_dyn_relocs **pp;
 
 	  for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
 	    {
@@ -8782,10 +9077,7 @@
 readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct ppc_link_hash_entry *eh;
-  struct ppc_dyn_relocs *p;
-
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  struct elf_dyn_relocs *p;
 
   eh = (struct ppc_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -8857,7 +9149,7 @@
 
       for (s = ibfd->sections; s != NULL; s = s->next)
 	{
-	  struct ppc_dyn_relocs *p;
+	  struct elf_dyn_relocs *p;
 
 	  for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
 	    {
@@ -9007,6 +9299,12 @@
 	  /* Strip this section if we don't need it; see the
 	     comment below.  */
 	}
+      else if (s == htab->glink_eh_frame)
+	{
+	  if (!bfd_is_abs_section (s->output_section))
+	    /* Not sized yet.  */
+	    continue;
+	}
       else if (CONST_STRNEQ (s->name, ".rela"))
 	{
 	  if (s->size != 0)
@@ -9238,7 +9536,8 @@
 /* Build a .plt call stub.  */
 
 static inline bfd_byte *
-build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r)
+build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r,
+		bfd_boolean plt_static_chain)
 {
 #define PPC_LO(v) ((v) & 0xffff)
 #define PPC_HI(v) (((v) >> 16) & 0xffff)
@@ -9248,11 +9547,12 @@
     {
       if (r != NULL)
 	{
+	  r[0].r_offset += 4;
 	  r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_HA);
-	  r[1].r_offset = r[0].r_offset + 8;
+	  r[1].r_offset = r[0].r_offset + 4;
 	  r[1].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_LO_DS);
 	  r[1].r_addend = r[0].r_addend;
-	  if (PPC_HA (offset + 16) != PPC_HA (offset))
+	  if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	    {
 	      r[2].r_offset = r[1].r_offset + 4;
 	      r[2].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_LO);
@@ -9263,22 +9563,26 @@
 	      r[2].r_offset = r[1].r_offset + 8;
 	      r[2].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_LO_DS);
 	      r[2].r_addend = r[0].r_addend + 8;
-	      r[3].r_offset = r[2].r_offset + 4;
-	      r[3].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_LO_DS);
-	      r[3].r_addend = r[0].r_addend + 16;
+	      if (plt_static_chain)
+		{
+		  r[3].r_offset = r[2].r_offset + 4;
+		  r[3].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_LO_DS);
+		  r[3].r_addend = r[0].r_addend + 16;
+		}
 	    }
 	}
-      bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p),	p += 4;
       bfd_put_32 (obfd, STD_R2_40R1, p),			p += 4;
+      bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p),	p += 4;
       bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p),	p += 4;
-      if (PPC_HA (offset + 16) != PPC_HA (offset))
+      if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	{
 	  bfd_put_32 (obfd, ADDI_R12_R12 | PPC_LO (offset), p),	p += 4;
 	  offset = 0;
 	}
       bfd_put_32 (obfd, MTCTR_R11, p),				p += 4;
       bfd_put_32 (obfd, LD_R2_0R12 | PPC_LO (offset + 8), p),	p += 4;
-      bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset + 16), p),	p += 4;
+      if (plt_static_chain)
+	bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset + 16), p), p += 4;
       bfd_put_32 (obfd, BCTR, p),				p += 4;
     }
   else
@@ -9287,7 +9591,7 @@
 	{
 	  r[0].r_offset += 4;
 	  r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
-	  if (PPC_HA (offset + 16) != PPC_HA (offset))
+	  if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	    {
 	      r[1].r_offset = r[0].r_offset + 4;
 	      r[1].r_info = ELF64_R_INFO (0, R_PPC64_TOC16);
@@ -9297,21 +9601,25 @@
 	    {
 	      r[1].r_offset = r[0].r_offset + 8;
 	      r[1].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
-	      r[1].r_addend = r[0].r_addend + 16;
-	      r[2].r_offset = r[1].r_offset + 4;
-	      r[2].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
-	      r[2].r_addend = r[0].r_addend + 8;
+	      r[1].r_addend = r[0].r_addend + 8 + 8 * plt_static_chain;
+	      if (plt_static_chain)
+		{
+		  r[2].r_offset = r[1].r_offset + 4;
+		  r[2].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
+		  r[2].r_addend = r[0].r_addend + 8;
+		}
 	    }
 	}
       bfd_put_32 (obfd, STD_R2_40R1, p),			p += 4;
       bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset), p),	p += 4;
-      if (PPC_HA (offset + 16) != PPC_HA (offset))
+      if (PPC_HA (offset + 8 + 8 * plt_static_chain) != PPC_HA (offset))
 	{
 	  bfd_put_32 (obfd, ADDI_R2_R2 | PPC_LO (offset), p),	p += 4;
 	  offset = 0;
 	}
       bfd_put_32 (obfd, MTCTR_R11, p),				p += 4;
-      bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset + 16), p),	p += 4;
+      if (plt_static_chain)
+	bfd_put_32 (obfd, LD_R11_0R2 | PPC_LO (offset + 16), p), p += 4;
       bfd_put_32 (obfd, LD_R2_0R2 | PPC_LO (offset + 8), p),	p += 4;
       bfd_put_32 (obfd, BCTR, p),				p += 4;
     }
@@ -9336,7 +9644,7 @@
 
 static inline bfd_byte *
 build_tls_get_addr_stub (bfd *obfd, bfd_byte *p, int offset,
-			 Elf_Internal_Rela *r)
+			 Elf_Internal_Rela *r, bfd_boolean plt_static_chain)
 {
   bfd_put_32 (obfd, LD_R11_0R3 + 0, p),		p += 4;
   bfd_put_32 (obfd, LD_R12_0R3 + 8, p),		p += 4;
@@ -9350,7 +9658,7 @@
 
   if (r != NULL)
     r[0].r_offset += 9 * 4;
-  p = build_plt_stub (obfd, p, offset, r);
+  p = build_plt_stub (obfd, p, offset, r, plt_static_chain);
   bfd_put_32 (obfd, BCTRL, p - 4);
 
   bfd_put_32 (obfd, LD_R11_0R1 + 32, p),	p += 4;
@@ -9391,6 +9699,38 @@
   return relocs;
 }
 
+static bfd_vma
+get_r2off (struct bfd_link_info *info,
+	   struct ppc_stub_hash_entry *stub_entry)
+{
+  struct ppc_link_hash_table *htab = ppc_hash_table (info);
+  bfd_vma r2off = htab->stub_group[stub_entry->target_section->id].toc_off;
+
+  if (r2off == 0)
+    {
+      /* Support linking -R objects.  Get the toc pointer from the
+	 opd entry.  */
+      char buf[8];
+      asection *opd = stub_entry->h->elf.root.u.def.section;
+      bfd_vma opd_off = stub_entry->h->elf.root.u.def.value;
+
+      if (strcmp (opd->name, ".opd") != 0
+	  || opd->reloc_count != 0)
+	{
+	  info->callbacks->einfo (_("%P: cannot find opd entry toc for %s\n"),
+				  stub_entry->h->elf.root.root.string);
+	  bfd_set_error (bfd_error_bad_value);
+	  return 0;
+	}
+      if (!bfd_get_section_contents (opd->owner, opd, buf, opd_off + 8, 8))
+	return 0;
+      r2off = bfd_get_64 (opd->owner, buf);
+      r2off -= elf_gp (info->output_bfd);
+    }
+  r2off -= htab->stub_group[stub_entry->id_sec->id].toc_off;
+  return r2off;
+}
+
 static bfd_boolean
 ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 {
@@ -9435,10 +9775,13 @@
       size = 4;
       if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
 	{
-	  bfd_vma r2off;
+	  bfd_vma r2off = get_r2off (info, stub_entry);
 
-	  r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
-		   - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	  if (r2off == 0)
+	    {
+	      htab->stub_error = TRUE;
+	      return FALSE;
+	    }
 	  bfd_put_32 (htab->stub_bfd, STD_R2_40R1, loc);
 	  loc += 4;
 	  size = 12;
@@ -9456,8 +9799,8 @@
 
       if (off + (1 << 25) >= (bfd_vma) (1 << 26))
 	{
-	  (*_bfd_error_handler) (_("long branch stub `%s' offset overflow"),
-				 stub_entry->root.string);
+	  info->callbacks->einfo (_("%P: long branch stub `%s' offset overflow\n"),
+				  stub_entry->root.string);
 	  htab->stub_error = TRUE;
 	  return FALSE;
 	}
@@ -9515,8 +9858,8 @@
 					 FALSE, FALSE);
       if (br_entry == NULL)
 	{
-	  (*_bfd_error_handler) (_("can't find branch stub `%s'"),
-				 stub_entry->root.string);
+	  info->callbacks->einfo (_("%P: can't find branch stub `%s'\n"),
+				  stub_entry->root.string);
 	  htab->stub_error = TRUE;
 	  return FALSE;
 	}
@@ -9576,8 +9919,8 @@
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
-	  (*_bfd_error_handler)
-	    (_("linkage table error against `%s'"),
+	  info->callbacks->einfo
+	    (_("%P: linkage table error against `%s'\n"),
 	     stub_entry->root.string);
 	  bfd_set_error (bfd_error_bad_value);
 	  htab->stub_error = TRUE;
@@ -9622,10 +9965,14 @@
 	}
       else
 	{
-	  bfd_vma r2off;
+	  bfd_vma r2off = get_r2off (info, stub_entry);
 
-	  r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
-		   - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	  if (r2off == 0)
+	    {
+	      htab->stub_error = TRUE;
+	      return FALSE;
+	    }
+
 	  bfd_put_32 (htab->stub_bfd, STD_R2_40R1, loc);
 	  loc += 4;
 	  size = 20;
@@ -9672,6 +10019,8 @@
 	     these checks could now disappear.  */
 	  if (fh->elf.root.type == bfd_link_hash_undefined)
 	    fh->elf.root.type = bfd_link_hash_undefweak;
+	  /* Stop undo_symbol_twiddle changing it back to undefined.  */
+	  fh->was_undefined = 0;
 	}
 
       /* Now build the stub.  */
@@ -9712,8 +10061,8 @@
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
-	  (*_bfd_error_handler)
-	    (_("linkage table error against `%s'"),
+	  info->callbacks->einfo
+	    (_("%P: linkage table error against `%s'\n"),
 	     stub_entry->h != NULL
 	     ? stub_entry->h->elf.root.root.string
 	     : "<local sym>");
@@ -9726,8 +10075,10 @@
       if (info->emitrelocations)
 	{
 	  r = get_relocs (stub_entry->stub_sec,
-			  (2 + (PPC_HA (off) != 0)
-			   + (PPC_HA (off + 16) == PPC_HA (off))));
+			  (2
+			   + (PPC_HA (off) != 0)
+			   + (htab->plt_static_chain
+			      && PPC_HA (off + 16) == PPC_HA (off))));
 	  if (r == NULL)
 	    return FALSE;
 	  r[0].r_offset = loc - stub_entry->stub_sec->contents;
@@ -9739,9 +10090,11 @@
 	  && (stub_entry->h == htab->tls_get_addr_fd
 	      || stub_entry->h == htab->tls_get_addr)
 	  && !htab->no_tls_get_addr_opt)
-	p = build_tls_get_addr_stub (htab->stub_bfd, loc, off, r);
+	p = build_tls_get_addr_stub (htab->stub_bfd, loc, off, r,
+				     htab->plt_static_chain);
       else
-	p = build_plt_stub (htab->stub_bfd, loc, off, r);
+	p = build_plt_stub (htab->stub_bfd, loc, off, r,
+			    htab->plt_static_chain);
       size = p - loc;
       break;
 
@@ -9828,9 +10181,11 @@
 	      - htab->stub_group[stub_entry->id_sec->id].toc_off);
 
       size = PLT_CALL_STUB_SIZE;
+      if (!htab->plt_static_chain)
+	size -= 4;
       if (PPC_HA (off) == 0)
 	size -= 4;
-      if (PPC_HA (off + 16) != PPC_HA (off))
+      if (PPC_HA (off + 8 + 8 * htab->plt_static_chain) != PPC_HA (off))
 	size += 4;
       if (stub_entry->h != NULL
 	  && (stub_entry->h == htab->tls_get_addr_fd
@@ -9840,7 +10195,10 @@
       if (info->emitrelocations)
 	{
 	  stub_entry->stub_sec->reloc_count
-	    += 2 + (PPC_HA (off) != 0) + (PPC_HA (off + 16) == PPC_HA (off));
+	    += (2
+		+ (PPC_HA (off) != 0)
+		+ (htab->plt_static_chain
+		   && PPC_HA (off + 16) == PPC_HA (off)));
 	  stub_entry->stub_sec->flags |= SEC_RELOC;
 	}
     }
@@ -9865,8 +10223,12 @@
       size = 4;
       if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
 	{
-	  r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
-		   - htab->stub_group[stub_entry->id_sec->id].toc_off);
+	  r2off = get_r2off (info, stub_entry);
+	  if (r2off == 0)
+	    {
+	      htab->stub_error = TRUE;
+	      return FALSE;
+	    }
 	  size = 12;
 	  if (PPC_HA (r2off) != 0)
 	    size = 16;
@@ -9883,8 +10245,8 @@
 					     TRUE, FALSE);
 	  if (br_entry == NULL)
 	    {
-	      (*_bfd_error_handler) (_("can't build branch stub `%s'"),
-				     stub_entry->root.string);
+	      info->callbacks->einfo (_("%P: can't build branch stub `%s'\n"),
+				      stub_entry->root.string);
 	      htab->stub_error = TRUE;
 	      return FALSE;
 	    }
@@ -10110,9 +10472,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   merge_got_entries (&h->got.glist);
 
   return TRUE;
@@ -10129,9 +10488,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   for (gent = h->got.glist; gent != NULL; gent = gent->next)
     if (!gent->is_indirect)
       allocate_got (h, (struct bfd_link_info *) inf, gent);
@@ -10447,7 +10803,8 @@
 		  sym_value += adjust;
 		}
 
-	      dest = opd_entry_value (sym_sec, sym_value, &sym_sec, NULL);
+	      dest = opd_entry_value (sym_sec, sym_value,
+				      &sym_sec, NULL, FALSE);
 	      if (dest == (bfd_vma) -1)
 		continue;
 	    }
@@ -10580,14 +10937,28 @@
 	  if (elf_gp (isec->owner) != 0)
 	    htab->toc_curr = elf_gp (isec->owner);
 	}
-      else if (!isec->call_check_done
-	       && toc_adjusting_stub_needed (info, isec) < 0)
-	return FALSE;
+      else
+	{
+	  if (!isec->call_check_done
+	      && toc_adjusting_stub_needed (info, isec) < 0)
+	    return FALSE;
+	  /* If we make a local call from this section, ie. a branch
+	     without a following nop, then we have no place to put a
+	     toc restoring insn.  We must use the same toc group as
+	     the callee.
+	     Testing makes_toc_func_call actually tests for *any*
+	     calls to functions that need a good toc pointer.  A more
+	     precise test would be better, as this one will set
+	     incorrect values for pasted .init/.fini fragments.
+	     (Fixed later in check_pasted_section.)  */
+	  if (isec->makes_toc_func_call
+	      && elf_gp (isec->owner) != 0)
+	    htab->toc_curr = elf_gp (isec->owner);
+	}
     }
 
   /* Functions that don't use the TOC can belong in any TOC group.
-     Use the last TOC base.  This happens to make _init and _fini
-     pasting work, because the fragments generally don't use the TOC.  */
+     Use the last TOC base.  */
   htab->stub_group[isec->id].toc_off = htab->toc_curr;
   return TRUE;
 }
@@ -10614,6 +10985,15 @@
 	    else if (toc_off != htab->stub_group[i->id].toc_off)
 	      return FALSE;
 	  }
+
+      if (toc_off == 0)
+	for (i = o->map_head.s; i != NULL; i = i->map_head.s)
+	  if (i->makes_toc_func_call)
+	    {
+	      toc_off = htab->stub_group[i->id].toc_off;
+	      break;
+	    }
+
       /* Make sure the whole pasted function uses the same toc offset.  */
       if (toc_off != 0)
 	for (i = o->map_head.s; i != NULL; i = i->map_head.s)
@@ -10739,6 +11119,40 @@
 #undef PREV_SEC
 }
 
+static const unsigned char glink_eh_frame_cie[] =
+{
+  0, 0, 0, 16,				/* length.  */
+  0, 0, 0, 0,				/* id.  */
+  1,					/* CIE version.  */
+  'z', 'R', 0,				/* Augmentation string.  */
+  4,					/* Code alignment.  */
+  0x78,					/* Data alignment.  */
+  65,					/* RA reg.  */
+  1,					/* Augmentation size.  */
+  DW_EH_PE_pcrel | DW_EH_PE_sdata4,	/* FDE encoding.  */
+  DW_CFA_def_cfa, 1, 0			/* def_cfa: r1 offset 0.  */
+};
+
+/* Stripping output sections is normally done before dynamic section
+   symbols have been allocated.  This function is called later, and
+   handles cases like htab->brlt which is mapped to its own output
+   section.  */
+
+static void
+maybe_strip_output (struct bfd_link_info *info, asection *isec)
+{
+  if (isec->size == 0
+      && isec->output_section->size == 0
+      && !bfd_section_removed_from_list (info->output_bfd,
+					 isec->output_section)
+      && elf_section_data (isec->output_section)->dynindx == 0)
+    {
+      isec->output_section->flags |= SEC_EXCLUDE;
+      bfd_section_list_remove (info->output_bfd, isec->output_section);
+      info->output_bfd->section_count--;
+    }
+}
+
 /* 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
@@ -10746,7 +11160,8 @@
    instruction.  */
 
 bfd_boolean
-ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size)
+ppc64_elf_size_stubs (struct bfd_link_info *info, bfd_signed_vma group_size,
+		      bfd_boolean plt_static_chain)
 {
   bfd_size_type stub_group_size;
   bfd_boolean stubs_always_before_branch;
@@ -10755,6 +11170,7 @@
   if (htab == NULL)
     return FALSE;
 
+  htab->plt_static_chain = plt_static_chain;
   stubs_always_before_branch = group_size < 0;
   if (group_size < 0)
     stub_group_size = -group_size;
@@ -10928,7 +11344,7 @@
 			  sym_value += adjust;
 			}
 		      dest = opd_entry_value (sym_sec, sym_value,
-					      &code_sec, &code_value);
+					      &code_sec, &code_value, FALSE);
 		      if (dest != (bfd_vma) -1)
 			{
 			  destination = dest;
@@ -10986,6 +11402,14 @@
 			continue;
 		    }
 
+		  if (stub_type == ppc_stub_plt_call
+		      && irela + 1 < irelaend
+		      && irela[1].r_offset == irela->r_offset + 4
+		      && ELF64_R_TYPE (irela[1].r_info) == R_PPC64_TOCSAVE
+		      && !tocsave_find (htab, INSERT,
+					&local_syms, irela + 1, input_bfd))
+		    goto error_ret_free_internal;
+
 		  /* Support for grouping stub sections.  */
 		  id_sec = htab->stub_group[section->id].link_sec;
 
@@ -11003,7 +11427,7 @@
 		      continue;
 		    }
 
-		  stub_entry = ppc_add_stub (stub_name, section, htab);
+		  stub_entry = ppc_add_stub (stub_name, section, info);
 		  if (stub_entry == NULL)
 		    {
 		      free (stub_name);
@@ -11080,6 +11504,25 @@
 	  htab->glink->flags |= SEC_RELOC;
 	}
 
+      if (htab->glink_eh_frame != NULL
+	  && !bfd_is_abs_section (htab->glink_eh_frame->output_section)
+	  && (htab->glink_eh_frame->flags & SEC_EXCLUDE) == 0)
+	{
+	  bfd_size_type size = 0;
+
+	  for (stub_sec = htab->stub_bfd->sections;
+	       stub_sec != NULL;
+	       stub_sec = stub_sec->next)
+	    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	      size += 20;
+	  if (htab->glink != NULL && htab->glink->size != 0)
+	    size += 24;
+	  if (size != 0)
+	    size += sizeof (glink_eh_frame_cie);
+	  htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
+	  htab->glink_eh_frame->size = size;
+	}
+
       for (stub_sec = htab->stub_bfd->sections;
 	   stub_sec != NULL;
 	   stub_sec = stub_sec->next)
@@ -11089,17 +11532,18 @@
 
       /* Exit from this loop when no stubs have been added, and no stubs
 	 have changed size.  */
-      if (stub_sec == NULL)
+      if (stub_sec == NULL
+	  && (htab->glink_eh_frame == NULL
+	      || htab->glink_eh_frame->rawsize == htab->glink_eh_frame->size))
 	break;
 
       /* Ask the linker to do its stuff.  */
       (*htab->layout_sections_again) ();
     }
 
-  /* It would be nice to strip htab->brlt 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.  */
+  maybe_strip_output (info, htab->brlt);
+  if (htab->glink_eh_frame != NULL)
+    maybe_strip_output (info, htab->glink_eh_frame);
 
   return TRUE;
 }
@@ -11304,6 +11748,100 @@
 	return FALSE;
     }
 
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->size != 0)
+    {
+      bfd_vma val;
+
+      p = bfd_zalloc (htab->glink_eh_frame->owner, htab->glink_eh_frame->size);
+      if (p == NULL)
+	return FALSE;
+      htab->glink_eh_frame->contents = p;
+
+      htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
+
+      memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
+      /* CIE length (rewrite in case little-endian).  */
+      bfd_put_32 (htab->elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
+      p += sizeof (glink_eh_frame_cie);
+
+      for (stub_sec = htab->stub_bfd->sections;
+	   stub_sec != NULL;
+	   stub_sec = stub_sec->next)
+	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+	  {
+	    /* FDE length.  */
+	    bfd_put_32 (htab->elf.dynobj, 16, p);
+	    p += 4;
+	    /* CIE pointer.  */
+	    val = p - htab->glink_eh_frame->contents;
+	    bfd_put_32 (htab->elf.dynobj, val, p);
+	    p += 4;
+	    /* Offset to stub section.  */
+	    val = (stub_sec->output_section->vma
+		   + stub_sec->output_offset);
+	    val -= (htab->glink_eh_frame->output_section->vma
+		    + htab->glink_eh_frame->output_offset);
+	    val -= p - htab->glink_eh_frame->contents;
+	    if (val + 0x80000000 > 0xffffffff)
+	      {
+		info->callbacks->einfo
+		  (_("%P: %s offset too large for .eh_frame sdata4 encoding"),
+		   stub_sec->name);
+		return FALSE;
+	      }
+	    bfd_put_32 (htab->elf.dynobj, val, p);
+	    p += 4;
+	    /* stub section size.  */
+	    bfd_put_32 (htab->elf.dynobj, stub_sec->rawsize, p);
+	    p += 4;
+	    /* Augmentation.  */
+	    p += 1;
+	    /* Pad.  */
+	    p += 3;
+	  }
+      if (htab->glink != NULL && htab->glink->size != 0)
+	{
+	  /* FDE length.  */
+	  bfd_put_32 (htab->elf.dynobj, 20, p);
+	  p += 4;
+	  /* CIE pointer.  */
+	  val = p - htab->glink_eh_frame->contents;
+	  bfd_put_32 (htab->elf.dynobj, val, p);
+	  p += 4;
+	  /* Offset to .glink.  */
+	  val = (htab->glink->output_section->vma
+		 + htab->glink->output_offset
+		 + 8);
+	  val -= (htab->glink_eh_frame->output_section->vma
+		  + htab->glink_eh_frame->output_offset);
+	  val -= p - htab->glink_eh_frame->contents;
+	  if (val + 0x80000000 > 0xffffffff)
+	    {
+	      info->callbacks->einfo
+		(_("%P: %s offset too large for .eh_frame sdata4 encoding"),
+		 htab->glink->name);
+	      return FALSE;
+	    }
+	  bfd_put_32 (htab->elf.dynobj, val, p);
+	  p += 4;
+	  /* .glink size.  */
+	  bfd_put_32 (htab->elf.dynobj, htab->glink->rawsize - 8, p);
+	  p += 4;
+	  /* Augmentation.  */
+	  p += 1;
+
+	  *p++ = DW_CFA_advance_loc + 1;
+	  *p++ = DW_CFA_register;
+	  *p++ = 65;
+	  *p++ = 12;
+	  *p++ = DW_CFA_advance_loc + 4;
+	  *p++ = DW_CFA_restore_extended;
+	  *p++ = 65;
+	}
+      htab->glink_eh_frame->size = p - htab->glink_eh_frame->contents;
+    }
+
   /* Build the stubs as directed by the stub hash table.  */
   bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
 
@@ -11321,10 +11859,12 @@
       }
 
   if (stub_sec != NULL
-      || htab->glink->rawsize != htab->glink->size)
+      || htab->glink->rawsize != htab->glink->size
+      || (htab->glink_eh_frame != NULL
+	  && htab->glink_eh_frame->rawsize != htab->glink_eh_frame->size))
     {
       htab->stub_error = TRUE;
-      (*_bfd_error_handler) (_("stubs don't match calculated size"));
+      info->callbacks->einfo (_("%P: stubs don't match calculated size\n"));
     }
 
   if (htab->stub_error)
@@ -11363,9 +11903,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct ppc_link_hash_entry *) h;
   if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
     return TRUE;
@@ -11401,63 +11938,6 @@
   return _bfd_elf_default_action_discarded (sec);
 }
 
-/* REL points to a low-part reloc on a largetoc instruction sequence.
-   Find the matching high-part reloc instruction and verify that it
-   is addis REG,x,imm.  If so, set *REG to x and return a pointer to
-   the high-part reloc.  */
-
-static const Elf_Internal_Rela *
-ha_reloc_match (const Elf_Internal_Rela *relocs,
-		const Elf_Internal_Rela *rel,
-		unsigned int *reg,
-		bfd_boolean match_addend,
-		const bfd *input_bfd,
-		const bfd_byte *contents)
-{
-  enum elf_ppc64_reloc_type r_type, r_type_ha;
-  bfd_vma r_info_ha, r_addend;
-
-  r_type = ELF64_R_TYPE (rel->r_info);
-  switch (r_type)
-    {
-    case R_PPC64_GOT_TLSLD16_LO:
-    case R_PPC64_GOT_TLSGD16_LO:
-    case R_PPC64_GOT_TPREL16_LO_DS:
-    case R_PPC64_GOT_DTPREL16_LO_DS:
-    case R_PPC64_GOT16_LO:
-    case R_PPC64_TOC16_LO:
-      r_type_ha = r_type + 2;
-      break;
-    case R_PPC64_GOT16_LO_DS:
-      r_type_ha = R_PPC64_GOT16_HA;
-      break;
-    case R_PPC64_TOC16_LO_DS:
-      r_type_ha = R_PPC64_TOC16_HA;
-      break;
-    default:
-      abort ();
-    }
-  r_info_ha = ELF64_R_INFO (ELF64_R_SYM (rel->r_info), r_type_ha);
-  r_addend = rel->r_addend;
-
-  while (--rel >= relocs)
-    if (rel->r_info == r_info_ha
-	&& (!match_addend
-	    || rel->r_addend == r_addend))
-      {
-	const bfd_byte *p = contents + (rel->r_offset & ~3);
-	unsigned int insn = bfd_get_32 (input_bfd, p);
-	if ((insn & (0x3f << 26)) == (15u << 26) /* addis rt,x,imm */
-	    && (insn & (0x1f << 21)) == (*reg << 21))
-	  {
-	    *reg = (insn >> 16) & 0x1f;
-	    return rel;
-	  }
-	break;
-      }
-  return NULL;
-}
-
 /* The RELOCATE_SECTION function is called by the ELF backend linker
    to handle the relocations for a section.
 
@@ -11505,9 +11985,7 @@
   Elf_Internal_Rela outrel;
   bfd_byte *loc;
   struct got_entry **local_got_ents;
-  unsigned char *ha_opt;
   bfd_vma TOCstart;
-  bfd_boolean no_ha_opt;
   bfd_boolean ret = TRUE;
   bfd_boolean is_opd;
   /* Disabled until we sort out how ld should choose 'y' vs 'at'.  */
@@ -11533,15 +12011,13 @@
   symtab_hdr = &elf_symtab_hdr (input_bfd);
   sym_hashes = elf_sym_hashes (input_bfd);
   is_opd = ppc64_elf_section_data (input_section)->sec_type == sec_opd;
-  ha_opt = NULL;
-  no_ha_opt = FALSE;
 
   rel = relocs;
   relend = relocs + input_section->reloc_count;
   for (; rel < relend; rel++)
     {
       enum elf_ppc64_reloc_type r_type;
-      bfd_vma addend, orig_addend;
+      bfd_vma addend;
       bfd_reloc_status_type r;
       Elf_Internal_Sym *sym;
       asection *sec;
@@ -11557,10 +12033,11 @@
       bfd_boolean unresolved_reloc;
       bfd_boolean warned;
       unsigned int insn;
-      bfd_vma mask;
+      unsigned int mask;
       struct ppc_stub_hash_entry *stub_entry;
       bfd_vma max_br_offset;
       bfd_vma from;
+      const Elf_Internal_Rela orig_rel = *rel;
 
       r_type = ELF64_R_TYPE (rel->r_info);
       r_symndx = ELF64_R_SYM (rel->r_info);
@@ -11580,7 +12057,6 @@
       sym_name = NULL;
       unresolved_reloc = FALSE;
       warned = FALSE;
-      orig_addend = rel->r_addend;
 
       if (r_symndx < symtab_hdr->sh_info)
 	{
@@ -11684,13 +12160,11 @@
 	    /* R_PPC64_TLS is OK against a symbol in the TOC.  */
 	    ;
 	  else
-	    (*_bfd_error_handler)
+	    info->callbacks->einfo
 	      (!IS_PPC64_TLS_RELOC (r_type)
-	       ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
-	       : _("%B(%A+0x%lx): %s used with non-TLS symbol %s"),
-	       input_bfd,
-	       input_section,
-	       (long) rel->r_offset,
+	       ? _("%P: %H: %s used with TLS symbol %s\n")
+	       : _("%P: %H: %s used with non-TLS symbol %s\n"),
+	       input_bfd, input_section, rel->r_offset,
 	       ppc64_elf_howto_table[r_type]->name,
 	       sym_name);
 	}
@@ -12100,6 +12574,21 @@
 	default:
 	  break;
 
+	case R_PPC64_TOCSAVE:
+	  if (relocation + addend == (rel->r_offset
+				      + input_section->output_offset
+				      + input_section->output_section->vma)
+	      && tocsave_find (htab, NO_INSERT,
+			       &local_syms, rel, input_bfd))
+	    {
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+	      if (insn == NOP
+		  || insn == CROR_151515 || insn == CROR_313131)
+		bfd_put_32 (input_bfd, STD_R2_40R1,
+			    contents + rel->r_offset);
+	    }
+	  break;
+
 	  /* Branch taken prediction relocations.  */
 	case R_PPC64_ADDR14_BRTAKEN:
 	case R_PPC64_REL14_BRTAKEN:
@@ -12129,7 +12618,8 @@
 	      && h->oh != NULL
 	      && h->oh->is_func_descriptor)
 	    fdh = ppc_follow_link (h->oh);
-	  stub_entry = ppc_get_stub_entry (input_section, sec, fdh, rel, htab);
+	  stub_entry = ppc_get_stub_entry (input_section, sec, fdh, &orig_rel,
+					   htab);
 	  if (stub_entry != NULL
 	      && (stub_entry->stub_type == ppc_stub_plt_call
 		  || stub_entry->stub_type == ppc_stub_plt_branch_r2off
@@ -12186,23 +12676,19 @@
 				  ".init") == 0
 			  || strcmp (input_section->output_section->name,
 				     ".fini") == 0)
-			(*_bfd_error_handler)
-			  (_("%B(%A+0x%lx): automatic multiple TOCs "
+			info->callbacks->einfo
+			  (_("%P: %H: automatic multiple TOCs "
 			     "not supported using your crt files; "
-			     "recompile with -mminimal-toc or upgrade gcc"),
-			   input_bfd,
-			   input_section,
-			   (long) rel->r_offset);
+			     "recompile with -mminimal-toc or upgrade gcc\n"),
+			   input_bfd, input_section, rel->r_offset);
 		      else
-			(*_bfd_error_handler)
-			  (_("%B(%A+0x%lx): sibling call optimization to `%s' "
+			info->callbacks->einfo
+			  (_("%P: %H: sibling call optimization to `%s' "
 			     "does not allow automatic multiple TOCs; "
 			     "recompile with -mminimal-toc or "
 			     "-fno-optimize-sibling-calls, "
-			     "or make `%s' extern"),
-			   input_bfd,
-			   input_section,
-			   (long) rel->r_offset,
+			     "or make `%s' extern\n"),
+			   input_bfd, input_section, rel->r_offset,
 			   sym_name,
 			   sym_name);
 		      bfd_set_error (bfd_error_bad_value);
@@ -12224,7 +12710,7 @@
 	      bfd_vma off = (relocation + addend
 			     - sec->output_section->vma
 			     - sec->output_offset);
-	      bfd_vma dest = opd_entry_value (sec, off, NULL, NULL);
+	      bfd_vma dest = opd_entry_value (sec, off, NULL, NULL, FALSE);
 	      if (dest != (bfd_vma) -1)
 		{
 		  relocation = dest;
@@ -12256,6 +12742,12 @@
 			    + stub_entry->stub_sec->output_offset
 			    + stub_entry->stub_sec->output_section->vma);
 	      addend = 0;
+
+ 	      if (stub_entry->stub_type == ppc_stub_plt_call
+		  && rel + 1 < relend
+		  && rel[1].r_offset == rel->r_offset + 4
+		  && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOCSAVE)
+		relocation += 4;
 	    }
 
 	  if (insn != 0)
@@ -12303,8 +12795,8 @@
       switch (r_type)
 	{
 	default:
-	  (*_bfd_error_handler)
-	    (_("%B: unknown relocation type %d for symbol %s"),
+	  info->callbacks->einfo
+	    (_("%P: %B: unknown relocation type %d for symbol %s\n"),
 	     input_bfd, (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -12315,6 +12807,7 @@
 	case R_PPC64_TLS:
 	case R_PPC64_TLSGD:
 	case R_PPC64_TLSLD:
+	case R_PPC64_TOCSAVE:
 	case R_PPC64_GNU_VTINHERIT:
 	case R_PPC64_GNU_VTENTRY:
 	  continue;
@@ -12401,7 +12894,7 @@
 		  }
 
 		for (; ent != NULL; ent = ent->next)
-		  if (ent->addend == orig_addend
+		  if (ent->addend == orig_rel.r_addend
 		      && ent->owner == input_bfd
 		      && ent->tls_type == tls_type)
 		    break;
@@ -12554,7 +13047,7 @@
 	    {
 	      struct plt_entry *ent;
 	      for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
-		if (ent->addend == orig_addend
+		if (ent->addend == orig_rel.r_addend
 		    && ent->plt.offset != (bfd_vma) -1)
 		  {
 		    relocation = (htab->plt->output_section->vma
@@ -12808,12 +13301,10 @@
 			  ? h->elf.type == STT_GNU_IFUNC
 			  : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
 			{
-			  (*_bfd_error_handler)
-			    (_("%B(%A+0x%lx): relocation %s for indirect "
-			       "function %s unsupported"),
-			     input_bfd,
-			     input_section,
-			     (long) rel->r_offset,
+			  info->callbacks->einfo
+			    (_("%P: %H: relocation %s for indirect "
+			       "function %s unsupported\n"),
+			     input_bfd, input_section, rel->r_offset,
 			     ppc64_elf_howto_table[r_type]->name,
 			     sym_name);
 			  ret = FALSE;
@@ -12915,8 +13406,8 @@
 	case R_PPC64_PLTREL64:
 	  /* These ones haven't been implemented yet.  */
 
-	  (*_bfd_error_handler)
-	    (_("%B: relocation %s is not supported for symbol %s."),
+	  info->callbacks->einfo
+	    (_("%P: %B: relocation %s is not supported for symbol %s\n"),
 	     input_bfd,
 	     ppc64_elf_howto_table[r_type]->name, sym_name);
 
@@ -12954,7 +13445,12 @@
 	case R_PPC64_GOT_DTPREL16_HA:
 	case R_PPC64_GOT16_HA:
 	case R_PPC64_TOC16_HA:
-	  /* nop is done later.  */
+	  if (htab->do_toc_opt && relocation + addend + 0x8000 < 0x10000
+	      && !ppc64_elf_tdata (input_bfd)->unexpected_toc_insn)
+	    {
+	      bfd_byte *p = contents + (rel->r_offset & ~3);
+	      bfd_put_32 (input_bfd, NOP, p);
+	    }
 	  break;
 
 	case R_PPC64_GOT_TLSLD16_LO:
@@ -12965,56 +13461,23 @@
 	case R_PPC64_GOT16_LO_DS:
 	case R_PPC64_TOC16_LO:
 	case R_PPC64_TOC16_LO_DS:
-	  if (htab->do_toc_opt && relocation + addend + 0x8000 < 0x10000)
+	  if (htab->do_toc_opt && relocation + addend + 0x8000 < 0x10000
+	      && !ppc64_elf_tdata (input_bfd)->unexpected_toc_insn)
 	    {
 	      bfd_byte *p = contents + (rel->r_offset & ~3);
 	      insn = bfd_get_32 (input_bfd, p);
-	      if ((insn & (0x3f << 26)) == 14u << 26 /* addi */
-		  || (insn & (0x3f << 26)) == 32u << 26 /* lwz */
-		  || (insn & (0x3f << 26)) == 34u << 26 /* lbz */
-		  || (insn & (0x3f << 26)) == 36u << 26 /* stw */
-		  || (insn & (0x3f << 26)) == 38u << 26 /* stb */
-		  || (insn & (0x3f << 26)) == 40u << 26 /* lhz */
-		  || (insn & (0x3f << 26)) == 42u << 26 /* lha */
-		  || (insn & (0x3f << 26)) == 44u << 26 /* sth */
-		  || (insn & (0x3f << 26)) == 46u << 26 /* lmw */
-		  || (insn & (0x3f << 26)) == 47u << 26 /* stmw */
-		  || (insn & (0x3f << 26)) == 48u << 26 /* lfs */
-		  || (insn & (0x3f << 26)) == 50u << 26 /* lfd */
-		  || (insn & (0x3f << 26)) == 52u << 26 /* stfs */
-		  || (insn & (0x3f << 26)) == 54u << 26 /* stfd */
-		  || ((insn & (0x3f << 26)) == 58u << 26 /* lwa,ld,lmd */
-		      && (insn & 3) != 1)
-		  || ((insn & (0x3f << 26)) == 62u << 26 /* std, stmd */
-		      && ((insn & 3) == 0 || (insn & 3) == 3)))
+	      if ((insn & (0x3f << 26)) == 12u << 26 /* addic */)
 		{
-		  unsigned int reg = (insn >> 16) & 0x1f;
-		  const Elf_Internal_Rela *ha;
-		  bfd_boolean match_addend;
-
-		  match_addend = (sym != NULL
-				  && ELF_ST_TYPE (sym->st_info) == STT_SECTION);
-		  ha = ha_reloc_match (relocs, rel, &reg, match_addend,
-				       input_bfd, contents);
-		  if (ha != NULL)
-		    {
-		      insn &= ~(0x1f << 16);
-		      insn |= reg << 16;
-		      bfd_put_32 (input_bfd, insn, p);
-		      if (ha_opt == NULL)
-			{
-			  ha_opt = bfd_zmalloc (input_section->reloc_count);
-			  if (ha_opt == NULL)
-			    return FALSE;
-			}
-		      ha_opt[ha - relocs] = 1;
-		    }
-		  else
-		    /* If we don't find a matching high part insn,
-		       something is fishy.  Refuse to nop any high
-		       part insn in this section.  */
-		    no_ha_opt = TRUE;
+		  /* Transform addic to addi when we change reg.  */
+		  insn &= ~((0x3f << 26) | (0x1f << 16));
+		  insn |= (14u << 26) | (2 << 16);
 		}
+	      else
+		{
+		  insn &= ~(0x1f << 16);
+		  insn |= 2 << 16;
+		}
+	      bfd_put_32 (input_bfd, insn, p);
 	    }
 	  break;
 	}
@@ -13092,9 +13555,9 @@
 	    mask = 15;
 	  if (((relocation + addend) & mask) != 0)
 	    {
-	      (*_bfd_error_handler)
-		(_("%B: error: relocation %s not a multiple of %d"),
-		 input_bfd,
+	      info->callbacks->einfo
+		(_("%P: %H: error: %s not a multiple of %u\n"),
+		 input_bfd, input_section, rel->r_offset,
 		 ppc64_elf_howto_table[r_type]->name,
 		 mask + 1);
 	      bfd_set_error (bfd_error_bad_value);
@@ -13113,11 +13576,9 @@
           && _bfd_elf_section_offset (output_bfd, info, input_section,
                                       rel->r_offset) != (bfd_vma) -1)
 	{
-	  (*_bfd_error_handler)
-	    (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
-	     input_bfd,
-	     input_section,
-	     (long) rel->r_offset,
+	  info->callbacks->einfo
+	    (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"),
+	     input_bfd, input_section, rel->r_offset,
 	     ppc64_elf_howto_table[(int) r_type]->name,
 	     h->elf.root.root.string);
 	  ret = FALSE;
@@ -13155,16 +13616,15 @@
 	      if (!((*info->callbacks->reloc_overflow)
 		    (info, (h ? &h->elf.root : NULL), sym_name,
 		     ppc64_elf_howto_table[r_type]->name,
-		     orig_addend, input_bfd, input_section, rel->r_offset)))
+		     orig_rel.r_addend, input_bfd, input_section,
+		     rel->r_offset)))
 		return FALSE;
 	    }
 	  else
 	    {
-	      (*_bfd_error_handler)
-		(_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
-		 input_bfd,
-		 input_section,
-		 (long) rel->r_offset,
+	      info->callbacks->einfo
+		(_("%P: %H: %s reloc against `%s': error %d\n"),
+		 input_bfd, input_section, rel->r_offset,
 		 ppc64_elf_howto_table[r_type]->name,
 		 sym_name,
 		 (int) r);
@@ -13173,23 +13633,6 @@
 	}
     }
 
-  if (ha_opt != NULL)
-    {
-      if (!no_ha_opt)
-	{
-	  unsigned char *opt = ha_opt;
-	  rel = relocs;
-	  relend = relocs + input_section->reloc_count;
-	  for (; rel < relend; opt++, rel++)
-	    if (*opt != 0)
-	      {
-		bfd_byte *p = contents + (rel->r_offset & ~3);
-		bfd_put_32 (input_bfd, NOP, p);
-	      }
-	}
-      free (ha_opt);
-    }
-
   /* If we're emitting relocations, then shortly after this function
      returns, reloc offsets and addends for this section will be
      adjusted.  Worse, reloc symbol indices will be for the output
@@ -13487,6 +13930,14 @@
 				       NULL))
     return FALSE;
 
+
+  if (htab->glink_eh_frame != NULL
+      && htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+      && !_bfd_elf_write_section_eh_frame (output_bfd, info,
+					   htab->glink_eh_frame,
+					   htab->glink_eh_frame->contents))
+    return FALSE;
+
   /* We need to handle writing out multiple GOT sections ourselves,
      since we didn't add them to DYNOBJ.  We know dynobj is the first
      bfd.  */
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index c905d30..9026c56 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -1,5 +1,5 @@
 /* PowerPC64-specific support for 64-bit ELF.
-   Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010
+   Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -49,7 +49,7 @@
 bfd_boolean ppc64_elf_next_input_section
   (struct bfd_link_info *, asection *);
 bfd_boolean ppc64_elf_size_stubs
-  (struct bfd_link_info *, bfd_signed_vma);
+  (struct bfd_link_info *, bfd_signed_vma, bfd_boolean);
 bfd_boolean ppc64_elf_build_stubs
   (bfd_boolean, struct bfd_link_info *, char **);
 void ppc64_elf_restore_symbols
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 671cb93..9884da0 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1,6 +1,6 @@
 /* IBM S/390-specific support for 64-bit ELF
    Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011 Free Software Foundation, Inc.
    Contributed Martin Schwidefsky ([email protected]).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1680,12 +1680,6 @@
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = elf_s390_hash_table (info);
   if (htab == NULL)
@@ -1907,9 +1901,6 @@
   struct elf_s390_link_hash_entry *eh;
   struct elf_s390_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct elf_s390_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
diff --git a/bfd/elf64-sh64.c