Pull-in binutils 2.24 @ 68761544.
Also include 2 local patches -
a) revert one upstream CL - which causes unbootable kernel -
d2667025dd30611514810c28bee9709e4623012a.
b) allow incbin by default.
Performance test performed for three boards - parrot, daisy and x86-alex.
Bootperf testing
PerfV2
No noticeable change introduced in this CL.
Firmware test of samus(TOT now) passes.
Correctness test cleared for daisy/parrot/x86-alex.
cbuildbot chromiumos-sdk
cbuildbot --hwtest daisy-release daisy_sping-release lumpy-release x86-alex-release, bootperf/perfv2
duck-release beaglebone-release
TEST=list above
BUG=None
CQ-DEPEND=CL:200779
CQ-DEPEND=CL:210353
Change-Id: Ied5d9f35142d05ead2ee2ba8be80595426a4d477
Reviewed-on: https://chromium-review.googlesource.com/203470
Reviewed-by: Mike Frysinger <[email protected]>
Tested-by: Mike Frysinger <[email protected]>
Commit-Queue: Mike Frysinger <[email protected]>
diff --git a/ChangeLog b/ChangeLog
index e572d95..e41638b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,588 @@
+2013-11-23 Alan Modra <[email protected]>
+
+ * config.sub, config.guess: Import from upstream.
+
+2013-09-20 Alan Modra <[email protected]>
+
+ * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
+ ppc host match. Support little-endian powerpc linux hosts.
+
+2013-08-16 Joel Brobecker <[email protected]>
+
+ * src-release (VER): When using $(TOOL)/common/create-version.sh,
+ strip the "-cvs" suffix from the version number if present.
+
+2013-08-12 Jan-Benedict Glaw <[email protected]>
+
+ * configure.ac: Sync with GCC repo.
+ * Makefile.def: Ditto.
+ * configure: Regenerate.
+ * Makefile.in: Ditto.
+
+2013-07-22 Joel Brobecker <[email protected]>
+
+ * src-release (VER): Use $(TOOL)/common/create-version.sh
+ if it exists.
+
+2013-06-22 Richard Sandiford <[email protected]>
+
+ * configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
+ (mips*-*-ecoff*, mips*-*-pe*, mips*-*-irix* [v4 and earlier])
+ (mips*-*-lnews*, mips*-*-riscos*): Add gas and ld to noconfigdirs.
+ * configure: Regenerate.
+
+2013-06-01 George Thomas <[email protected]>
+
+ * include/opcode/avr.h: Rename AVR_ISA_XCH to AVR_ISA_RMW. Remove
+ from AVR_ISA_XMEGA and add new AVR_ISA_XMEGAU
+
+2013-05-06 Sandra Loosemore <[email protected]>
+
+ * COPYING.NEWLIB: Add Altera Corporation copyright.
+
+2013-04-29 Jan-Benedict Glaw <[email protected]>
+
+ * config.guess: Update from config repo.
+ * config.sub: Ditto.
+
+2013-04-22 Jan-Benedict Glaw <[email protected]>
+
+ * Makefile.def: Sync with GCC.
+ * Makefile.in: Regenerate.
+
+2013-04-22 Jan-Benedict Glaw <[email protected]>
+
+ * configure.ac: Sync with GCC.
+ * configure: Regenerate.
+
+2013-03-22 Mike Frysinger <[email protected]>
+
+ * src-release (VER): Change bfd/configure.in sed to use the new
+ `bfd/configure --version` output.
+
+2013-02-15 Yufeng Zhang <[email protected]>
+
+ * configure.ac: Sync with GCC repo.
+ * configure: Ditto.
+
+2013-02-05 Ian Lance Taylor <[email protected]>
+
+ PR go/55969
+ * configure.ac: Disable libgo on some systems where it does not
+ work.
+ * configure: Rebuild.
+
+2013-02-05 Alan Modra <[email protected]>
+
+ * configure: Regenerate after syncing config/.
+
+2013-01-15 Jan-Benedict Glaw <[email protected]>
+
+ * configure.ac: Sync with GCC repo.
+ * configure: Ditto.
+ * Makefile.def: Ditto.
+ * Makefile.in: Ditto.
+
+2013-01-11 Joel Brobecker <[email protected]>
+
+ Sync with GCC, merge:
+
+ 2013-01-09 Jason Merrill <[email protected]>
+
+ * .gitignore: Import from gdb repository.
+
+2013-01-11 Jan-Benedict Glaw <[email protected]>
+
+ * config.sub: Update from config repo.
+
+2013-01-11 Eric Botcazou <[email protected]>
+
+ * Makefile.tpl (BOOT_ADAFLAGS): Remove -gnata.
+ * Makefile.in: Regenerate.
+
+2013-01-09 H.J. Lu <[email protected]>
+
+ * Makefile.def (configure-gcc): Depend on all-gmp.
+ (all-gcc): Remove dependency on all-gmp.
+ * Makefile.in: Regenerated.
+
+2013-01-08 Jan-Benedict Glaw <[email protected]>
+
+ * config.guess: Update from config repo.
+ * config.sub: Ditto.
+
+2013-01-07 Jeff Johnston <[email protected]>
+
+ * COPYING.LIBGLOSS: Remove license for mips/lsi33k-stub.h which no longer
+ exists and replace the new bfin license in its location.
+
+2013-01-07 H.J. Lu <[email protected]>
+
+ PR gas/14899
+ * Makefile.def (dependencies): Make all-binutils, all-gprof,
+ all-ld and all-gold depend on all-gas.
+ * Makefile.in: Regenerated.
+
+2012-12-29 Ben Elliston <[email protected]>
+
+ * config.guess: Update to 2012-12-29 version.
+ * config.sub: Likewise.
+
+2012-12-20 Jan-Benedict Glaw <[email protected]>
+
+ * Makefile.def (install-target-libgo): Depend on
+ install-target-libatomic. Merged from GCC repo.
+ * Makefile.in: Regenerate.
+
+2012-12-17 Jeff Johnston <[email protected]>
+
+ * COPYING.LIBGLOSS: Add license for bfin libgloss.
+
+2012-12-16 Thomas Schwinge <[email protected]>
+
+ * configure.ac (ENABLE_GOLD): Consider *-*-gnu* targets ELF.
+ * configure: Regenerate.
+
+2012-12-11 H.J. Lu <[email protected]>
+
+ * Makefile.def (target_modules): Add bootstrap=true and
+ raw_cxx=true to libsanitizer.
+ * configure.ac (bootstrap_target_libs): Add libsanitizer.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+
+2012-12-08 Jan-Benedict Glaw <[email protected]>
+
+ * config.sub: Merge from config repo.
+
+2012-11-30 Jan-Benedict Glaw <[email protected]>
+
+ * configure.ac: Merge from GCC.
+ * Makefile.tpl: Ditto.
+ * Makefile.in: Ditto.
+ * configure: Ditto.
+
+2012-11-28 Jan-Benedict Glaw <[email protected]>
+
+ * configure.ac (noconfigdirs): Merge from GCC.
+ * configure: Regenerate.
+
+2012-11-19 Jan-Benedict Glaw <[email protected]>
+
+ * config.sub (arm): Merge from upstream: Handle armv[6-8] targets.
+
+2012-11-14 Roland McGrath <[email protected]>
+
+ * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF.
+ * configure: Regenerate.
+
+2012-11-13 Richard Henderson <[email protected]>
+
+ * configure.ac: Move libsanitizer logic to subdirectory.
+ * configure: Regenerate.
+
+2012-11-13 Dodji Seketeli <[email protected]>
+
+ * configure.ac: Enable libsanitizer just on x86 linux for now.
+ * configure: Re-generate.
+
+2012-11-13 David Edelsohn <[email protected]>
+
+ * configure.ac: Merge libquadmath sections.
+ * configure: Regenerate.
+
+2012-11-12 Wei Mi <[email protected]>
+
+ * configure.ac: Add libsanitizer to target_libraries.
+ * Makefile.def: Ditto.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2012-11-03 H.J. Lu <[email protected]>
+
+ * configure: Regenerated.
+
+2012-11-03 Robert Mason <[email protected]>
+
+ * configure.ac: add --disable-libstdcxx configure option
+ and handle defaulted state only for VxWorks, ARM-wince-pe and AVR.
+
+2012-10-24 Corinna Vinschen <[email protected]>
+
+ * configure.ac (FLAGS_FOR_TARGET,target=cygwin): Fix for building
+ against Mingw64 w32api.
+ * configure: Regenerate.
+
+2012-10-23 Eric Botcazou <[email protected]>
+
+ PR bootstrap/54820
+ * configure.ac (have_static_libs): Force 'no' for GCC version < 4.5.
+ * configure: Regenerate.
+
+2012-10-22 Eric Botcazou <[email protected]>
+
+ PR bootstrap/54820
+ * Makefile.tpl (STAGE1_FLAGS_TO_PASS): New variable.
+ (all-[+prefix+][+module+]): Pass stage1_args to sub-makes.
+ (all-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false.
+ (clean-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false.
+ (host_modules): Set stage1_args to STAGE1_FLAGS_TO_PASS.
+ * Makefile.in: Regenerate.
+ * configure.ac (have_static_libs): New variable and associated check.
+ (stage1-ldflags): Move to after stage1_libs and set to -static-libstdc++
+ -static-libgcc if stage1_libs is empty and have_static_libs is yes.
+ * configure: Regenerate.
+
+2012-10-10 David Holsgrove <[email protected]>
+
+ * config.guess, config.sub: Include updated version from
+ config-patches. Adds microblaze little endian support.
+
+2012-09-28 Ian Lance Taylor <[email protected]>
+
+ * Makefile.def: Make all-target-libgo depend on
+ all-target-libbacktrace.
+ * Makefile.in: Rebuild.
+
+2012-09-26 Ian Lance Taylor <[email protected]>
+
+ * Makefile.def: Make all-gcc depend on all-libbacktrace.
+ * Makefile.in: Rebuild.
+
+2012-09-06 Diego Novillo <[email protected]>
+
+ * configure.ac: Bump minimum GMP version to 4.2.3.
+ * configure: Re-generate.
+
+2012-09-05 Georg-Johann Lay <[email protected]>
+
+ PR target/54461
+ * configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib,
+ target-libgloss if not configured --with-avrlibc=no.
+ * configure: Regenerate.
+
+2012-09-04 Jason Merrill <[email protected]>
+
+ * configure.ac: Fix --enable-languages=all.
+
+2012-09-03 Richard Guenther <[email protected]>
+
+ PR bootstrap/54138
+ * configure.ac: Re-organize ISL / CLOOG checks to allow
+ disabling with either --without-isl or --without-cloog.
+ * configure: Regenerated.
+
+2012-09-03 Georg-Johann Lay <[email protected]>
+
+ * configure.ac (noconfigdirs,target=avr): Add target-libquadmath.
+ * configure: Regenerate.
+
+2012-09-21 Steve Ellcey <[email protected]>
+
+ * configure.ac: Add mips*-mti-elf* target.
+ * configure: Regenerate.
+
+2012-09-19 Ian Lance Taylor <[email protected]>
+
+ * configure.ac (host_libs): Add libbacktrace.
+ (target_libraries): Add libbacktrace.
+ * Makefile.def (host_modules): Add libbacktrace.
+ (target_modules): Likewise.
+ * configure, Makefile.in: Rebuild.
+
+2012-09-15 Jiong Wang <[email protected]>
+
+ * configure.ac (ENABLE_GOLD): support tilegx*
+ * configure: rebuild
+
+2012-09-14 David Edelsohn <[email protected]>
+
+ PR target/38607
+ Merge upstream change.
+ * libtool.m4 (_LT_COMPILER_PIC): Add -fPIC to GCC and GXX for AIX.
+
+ * configure.ac: Add target-libquadmath to noconfigdirs for AIX.
+ Add libgomp*.o to compare_exclusions for AIX.
+ * configure: Regenerate.
+
+2012-08-26 H.J. Lu <[email protected]>
+
+ PR binutils/4970
+ * Makefile.def (host_modules): Rmove lib_path=.libs from bfd
+ and opcodes.
+ * Makefile.in: Regenerated.
+
+2012-08-14 Diego Novillo <[email protected]>
+
+ Merge from cxx-conversion branch.
+
+ * Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
+ POSTSTAGE1_CONFIGURE_FLAGS.
+ * Makefile.in: Regenerate.
+ * configure.ac (ENABLE_BUILD_WITH_CXX): Remove. Update all users.
+ Force C++ when bootstrapping.
+ * configure: Regenerate.
+
+2012-07-06 Richard Guenther <[email protected]>
+
+ * Makefile.def (cloog): Pass $(HOST_GMPINC) and $(HOST_ISLINC)
+ as CPPFLAGS, pass path to built gmp as LDFLAGS, always use
+ --with-gmp=system.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+
+2012-07-06 Richard Guenther <[email protected]>
+
+ * configure.ac (extra_isl_gmp_configure_flags): Initialize and subst.
+ * Makefile.def (isl): Use extra_isl_gmp_configure_flags and
+ supply V=1 as extra_make_flags.
+ * configure: Regenerated.
+ * Makefile.in: Likewise.
+
+2012-07-03 Richard Guenther <[email protected]>
+
+ * Makfile.def (isl): Remove not necessary extra_exports and
+ extra_make_flags.
+ (cloog): Use $$CPPFLAGS instead of ${CPPFLAGS}.
+ * Makefile.in: Regenerated.
+
+2012-07-03 Richard Guenther <[email protected]>
+
+ * Makefile.def (cloog): Add V=1 to extra_make_flags.
+ * configure.ac: If either the ISL or the CLooG check failed
+ do not try to build in-tree versions.
+ * Makefile.in: Regenerated.
+ * configure: Regenerated.
+
+2012-07-02 Richard Guenther <[email protected]>
+ Michael Matz <[email protected]>
+ Tobias Grosser <[email protected]>
+ Sebastian Pop <[email protected]>
+
+ * Makefile.def: Add ISL host module, remove PPL host module.
+ Adjust ClooG host module to use the proper ISL.
+ * Makefile.tpl: Pass ISL include flags instead of PPL ones.
+ * configure.ac: Include config/isl.m4. Add ISL host library,
+ remove PPL. Remove PPL configury, add ISL configury, adjust
+ ClooG configury.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+
+2012-07-02 Richard Guenther <[email protected]>
+
+ Merge from graphite branch
+ 2011-07-21 Tobias Grosser <[email protected]>
+
+ * configure: Regenerated.
+ * config/cloog.m4: Remove support for CLooG-ppl and CLooG-parma,
+ both cloog.org and legacy versions. The only supported version will
+ be CLooG with the isl backend.
+
+ 2011-07-21 Tobias Grosser <[email protected]>
+
+ * configure: Regenerated.
+ * configure.ac: Require cloog isl 0.17.0
+
+ 2011-07-21 Tobias Grosser <[email protected]>
+
+ * configure: Regenerated.
+ * config/cloog.m4: Do not define CLOOG_ORG
+
+2012-06-29 Steven Bosscher <[email protected]>
+
+ * configure.ac: Skip C if explicitly selected.
+ * configure: Regenerate.
+
+2012-06-28 Christophe Lyon <[email protected]>
+
+ * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure
+ they contain -O2.
+ * configure: Regenerate.
+
+2012-06-20 Jason Merrill <[email protected]>
+
+ * Makefile.tpl (check-target-libgomp-c++): New.
+ (check-target-libitm-c++): New.
+ * Makefile.def (c++): Add them.
+ * Makefile.in: Regenerate.
+
+2012-05-16 Olivier Hainque <[email protected]>
+
+ * Makefile.tpl (gcc-no-fixedincludes): Rename into ...
+ (gcc-install-no-fixedincludes): Now forwarder to local target in gcc/
+ (install-no-fixedincludes): Adjust accordingly.
+ * Makefile.in: Regenerate.
+
+2012-05-09 Nick Clifton <[email protected]>
+ Paul Smith <[email protected]>
+
+ PR bootstrap/50461
+ * configure.ac (mpfr-dir): When using in-tree MPFR sources
+ allow for the fact that from release v3.1.0 of MPFR the source
+ files were moved into a src sub-directory.
+ * configure: Regenerate.
+
+2012-05-07 Janne Blomqvist <[email protected]>
+
+ * configure.ac: Bump minimum MPFR version to 2.4.0.
+ * configure: Regenerated.
+
+2012-05-01 Richard Henderson <[email protected]>
+
+ * Makefile.def (libatomic): New target_module.
+ * configure.ac (target_libraries): Add libatomic.
+ (noconfigdirs): Check if libatomic is supported.
+ * Makefile.in, configure: Rebuild.
+
+2012-05-15 H.J. Lu <[email protected]>
+
+ Merge upstream change
+ * libtool.m4 (_LT_ENABLE_LOCK): Support x32.
+
+2011-11-21 Andreas Tobler <[email protected]>
+
+ * libtool.m4: Additional FreeBSD 10 fixes.
+
+2012-06-28 Christophe Lyon <[email protected]>
+
+ * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure
+ they contain -O2.
+ * configure: Regenerate.
+
+2012-05-14 Catherine Moore <[email protected]>
+
+ * NEWS: Mention PowerPC VLE port.
+
+2012-05-11 Mike Frysinger <[email protected]>
+
+ * MAINTAINERS (config/): Move to intl/ section.
+ (compile; depcomp; install-sh; missing; ylwrap): Likewise.
+
+2012-05-09 Nick Clifton <[email protected]>
+ Paul Smith <[email protected]>
+
+ PR bootstrap/50461
+ * configure.ac (mpfr-dir): When using in-tree MPFR sources
+ allow for the fact that from release v3.1.0 of MPFR the source
+ files were moved into a src sub-directory.
+ * configure: Regenerate.
+
+2012-05-02 Roland McGrath <[email protected]>
+
+ * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF.
+ * configure: Regenerate.
+
+2012-04-25 Joel Brobecker <[email protected]>
+
+ * config.sub: Update to 2012-04-18 version from official repo.
+
+2012-03-19 Tristan Gingold <[email protected]>
+
+ * configure.ac (ia64*-*-*vms*): Add support for ld.
+ * configure: Regenerate.
+
+2012-03-14 Rainer Orth <[email protected]>
+
+ * configure.ac (enable_libgomp): Remove *-*-irix6*.
+ (unsupported_languages): Remove mips-sgi-irix6.*.
+ (noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*.
+ (with_stabs): Remove.
+ * configure: Regenerate.
+
+2012-03-12 Rainer Orth <[email protected]>
+
+ * configure.ac (enable_libgomp): Remove *-*-osf*.
+ (with_stabs): Remove alpha*-*-osf*.
+ * configure: Regenerate.
+
+2012-03-09 Jeff Johnston <[email protected]>
+
+ * COPYING.NEWLIB: Modify DJ Delorie license to include
+ modification rights in clause as permitted by DJ Delorie.
+ * COPYING.LIBGLOSS: Ditto.
+
+2012-03-09 Jeff Johnston <[email protected]>
+
+ * COPYING.NEWLIB: Remove two unused licenses.
+
+2012-03-05 Tristan Gingold <[email protected]>
+
+ * configure.ac: Enable gdb and readline for ia64*-*-*vms*.
+ * configure: Regenerate.
+
+2012-02-21 Joern Rennecke <[email protected]>
+
+ * COPYING.NEWLIB: Add Adapteva notice.
+ * COPYING.LIBGLOSS: Add Adapteva notice.
+
+2011-12-18 Eric Botcazou <[email protected]>
+
+ * configure: Regenerate.
+
+2011-12-15 Jeff Johnston <[email protected]>
+
+ * COPYING.LIBGLOSS: Add GPL with exception license.
+
+2011-11-09 Roland McGrath <[email protected]>
+
+ * configure.ac: Add tool checks for READELF and READELF_FOR_TARGET.
+ * configure: Rebuild.
+ * Makefile.def (flags_to_pass): Add READELF_FOR_TARGET.
+ * Makefile.tpl (READELF, READELF_FOR_TARGET): New variables.
+ (HOST_EXPORTS): Add READELF, READELF_FOR_TARGET.
+ (BASE_FLAGS_TO_PASS): Add READELF_FOR_TARGET.
+ (BASE_TARGET_EXPORTS, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS):
+ Add READELF.
+ * Makefile.in: Rebuild.
+
+2011-11-08 Richard Henderson <[email protected]>
+
+ * configure.ac: Test for libitm directory present first.
+
+ * configure.ac: Adjust srcdir for running libitm/configure.tgt.
+
+ * configure.ac: Test libitm/configure.tgt to disable libitm.
+ * configure: Rebuild.
+
+2011-11-02 Rainer Orth <[email protected]>
+
+ * Makefile.tpl (EXTRA_GCC_FLAGS): Remove LIBGCC2_CFLAGS,
+ LIBGCC2_DEBUG_CFLAGS, LIBGCC2_INCLUDES.
+ * Makefile.in: Regenerate.
+
+2011-11-01 DJ Delorie <[email protected]>
+
+ * configure.ac (rl78-*-*) New case.
+ * configure: Regenerate.
+
+2011-11-01 DJ Delorie <[email protected]>
+
+ * config.sub: Update to version 2011-10-29 (added rl78)
+
+2011-10-27 Nick Clifton <[email protected]>
+
+ * config.sub: Import these changes from the config project:
+
+ 2011-10-08 Joern Rennecke <[email protected]>
+ Ben Elliston <[email protected]>
+
+ * config.sub (epiphany): New.
+
+ 2011-09-09 Linas Vepstas <[email protected]>
+ Ben Elliston <[email protected]>
+
+ * config.sub (hexagon, hexagon-*): New.
+
+ 2011-08-23 Roland McGrath <[email protected]>
+
+ * config.sub: Rename 32eb to be32, 32el to le32, 64el to le64, and
+ 64eb to be64.
+
+ 2011-08-16 Roland McGrath <[email protected]>
+
+ * config.sub (32eb, 32el, 64eb, 64el): New (pseudo-)CPUs.
+ (nacl): Grok as alias for 32el-unknown-nacl.
+
2011-08-19 Joel Brobecker <[email protected]>
* src-release (GDB_SUPPORT_DIRS): Add 'cpu'.
@@ -475,11 +1060,11 @@
* 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.
+ * configure.ac: Adjust test of with_ppl.
+ * configure: Regenerated.
2011-03-02 Sebastian Pop <[email protected]>
@@ -1086,11 +1671,11 @@
* lt~obsolete.m4: Likewise.
2010-01-07 Kaveh R. Ghazi <[email protected]>
- Francois-Xavier Coudert <[email protected]>
+ Francois-Xavier Coudert <[email protected]>
PR bootstrap/42424
* configure.ac: Include libtool m4 files.
- (_LT_CHECK_OBJDIR): Call it.
+ (_LT_CHECK_OBJDIR): Call it.
(extra_mpc_mpfr_configure_flags, extra_mpc_gmp_configure_flags,
gmplibs, ppllibs, clooglibs): Use $lt_cv_objdir.
@@ -1503,8 +2088,8 @@
2009-06-03 Jerome Guitton <[email protected]>
Ralf Wildenhues <[email protected]>
- * Makefile.tpl (all): Avoid a trailing backslash.
- * Makefile.in: Regenerate.
+ * Makefile.tpl (all): Avoid a trailing backslash.
+ * Makefile.in: Regenerate.
2009-06-03 Ben Elliston <[email protected]>
@@ -3667,7 +4252,7 @@
non-ported target libraries in noconfigdirs.
<cris-*, crisv32-*> Ditto, except for non-aout, non-elf,
non-linux-gnu. Remove libgcj_ex_libffi.
- <lang_frag loop>: Set add_this_lang=no if the language is in
+ <lang_frag loop>: Set add_this_lang=no if the language is in
unsupported_languages.
* configure: Regenerate.
@@ -4988,8 +5573,8 @@
2003-12-21 Bernardo Innocenti <[email protected]>
- * configure.in (*-*-uclinux): Exclude newlib, libgloss and rda.
- * configure: Regenerated.
+ * configure.in (*-*-uclinux): Exclude newlib, libgloss and rda.
+ * configure: Regenerated.
2003-12-19 Nathanael Nerode <[email protected]>
@@ -13078,8 +13663,8 @@
Sun May 9 17:47:57 1993 Rob Savoye (rob at darkstar.cygnus.com)
- * Makefile.in: Use srcroot to find runtest rather than rootme.
- Pass RUNTESTFLAGS and EXPECT down in BASE_FLAGS_TO_PASS.
+ * Makefile.in: Use srcroot to find runtest rather than rootme.
+ Pass RUNTESTFLAGS and EXPECT down in BASE_FLAGS_TO_PASS.
Fri May 7 14:55:59 1993 Ian Lance Taylor ([email protected])
diff --git a/MAINTAINERS b/MAINTAINERS
index 046c5ea..dd8601b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -49,7 +49,8 @@
include/
See binutils/, gdb/, sid/, gcc/, libiberty/ etc.
-intl/; config.rhost; libiberty/; libiberty's part of include/
+intl/; config.rhost; libiberty/; libiberty's part of include/;
+compile; depcomp; install-sh; missing; ylwrap; config/
gcc: http://gcc.gnu.org
Changes need to be done in tandem with the official GCC
sources or submitted to the master file maintainer and brought
@@ -104,13 +105,6 @@
Any global maintainer can approve changes to these
files and directories.
-compile; depcomp; install-sh; missing; ylwrap;
-config/
- Any global maintainer can approve changes to these
- files and directories, but they should be aware
- that they need to be kept in sync with their
- counterparts in the GCC repository.
-
modules file
If you understand the file format (or can cut-and-paste existing
entries), modify it. If it scares you, get someone who does
diff --git a/Makefile.def b/Makefile.def
index 2c119a0..3ba1a5b 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -4,8 +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, 2010, 2011
-// Free Software Foundation
+// Copyright 2002-2013 Free Software Foundation
//
// This file is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -61,13 +60,14 @@
host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
no_install= true; };
-host_modules= { module= ppl; lib_path=src/.libs; bootstrap=true;
- extra_configure_flags='--disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/';
+host_modules= { module= isl; lib_path=.libs; bootstrap=true;
+ extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@';
+ extra_make_flags='V=1';
no_install= true; };
host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl';
- extra_exports='CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; ';
- extra_make_flags='CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"';
+ extra_configure_flags='--disable-shared --with-gmp=system --with-bits=gmp --with-isl=system';
+ extra_exports='CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; ';
+ extra_make_flags='CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1';
no_install= true; };
host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared';
@@ -79,6 +79,7 @@
missing=mostlyclean; };
host_modules= { module= itcl; };
host_modules= { module= ld; bootstrap=true; };
+host_modules= { module= libbacktrace; bootstrap=true; };
host_modules= { module= libcpp; bootstrap=true; };
host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
@@ -117,9 +118,18 @@
lib_path=src/.libs;
raw_cxx=true; };
target_modules = { module= libmudflap; lib_path=.libs; };
+target_modules = { module= libsanitizer;
+ bootstrap=true;
+ lib_path=.libs;
+ raw_cxx=true; };
+target_modules = { module= libvtv;
+ bootstrap=true;
+ lib_path=.libs;
+ raw_cxx=true; };
target_modules = { module= libssp; lib_path=.libs; };
target_modules = { module= newlib; };
target_modules = { module= libgcc; bootstrap=true; no_check=true; };
+target_modules = { module= libbacktrace; };
target_modules = { module= libquadmath; };
target_modules = { module= libgfortran; };
target_modules = { module= libobjc; };
@@ -131,7 +141,7 @@
missing=maintainer-clean; };
target_modules = { module= winsup; };
target_modules = { module= libgloss; no_check=true; };
-target_modules = { module= libffi; };
+target_modules = { module= libffi; no_install=true; };
target_modules = { module= libjava; raw_cxx=true;
extra_configure_flags="$(EXTRA_CONFIGARGS_LIBJAVA)"; };
target_modules = { module= zlib; };
@@ -139,6 +149,8 @@
target_modules = { module= rda; };
target_modules = { module= libada; };
target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
+target_modules = { module= libitm; lib_path=.libs; };
+target_modules = { module= libatomic; lib_path=.libs; };
// These are (some of) the make targets to be done in each subdirectory.
// Not all; these are the ones which don't have special options.
@@ -259,6 +271,7 @@
flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= OBJDUMP_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
+flags_to_pass = { flag= READELF_FOR_TARGET ; };
flags_to_pass = { flag= STRIP_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
flags_to_pass = { flag= WINDMC_FOR_TARGET ; };
@@ -281,6 +294,7 @@
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=all-gmp; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
@@ -288,11 +302,9 @@
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
-dependencies = { module=all-gcc; on=all-gmp; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-mpc; };
-dependencies = { module=all-gcc; on=all-ppl; };
dependencies = { module=all-gcc; on=all-cloog; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
@@ -300,6 +312,7 @@
dependencies = { module=all-gcc; on=all-build-libiberty; };
dependencies = { module=all-gcc; on=all-build-fixincludes; };
dependencies = { module=all-gcc; on=all-zlib; };
+dependencies = { module=all-gcc; on=all-libbacktrace; hard=true; };
dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
dependencies = { module=all-gcc; on=all-libiberty; };
@@ -312,6 +325,7 @@
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=install-strip-gcc ; on=install-strip-lto-plugin; };
dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
dependencies = { module=configure-libcpp; on=configure-intl; };
@@ -328,9 +342,9 @@
dependencies = { module=configure-mpfr; on=all-gmp; };
dependencies = { module=configure-mpc; on=all-mpfr; };
-dependencies = { module=configure-ppl; on=all-gmp; };
-dependencies = { module=configure-ppl; on=all-mpfr; };
-dependencies = { module=configure-cloog; on=all-ppl; };
+dependencies = { module=configure-isl; on=all-gmp; };
+dependencies = { module=configure-cloog; on=all-isl; };
+dependencies = { module=configure-cloog; on=all-gmp; };
// Host modules specific to gdb.
dependencies = { module=configure-gdb; on=all-intl; };
@@ -362,6 +376,9 @@
dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; };
dependencies = { module=all-opcodes; on=all-libiberty; };
+// We must build gas before binutils, gprof, ld and gold to avoid race
+// condition in the prev-gcc/as script during bootstrap of combined tree
+// with GCC and binutils. See PR gas/14899 for details.
dependencies = { module=configure-binutils; on=configure-intl; };
dependencies = { module=all-binutils; on=all-libiberty; };
dependencies = { module=all-binutils; on=all-opcodes; };
@@ -369,6 +386,7 @@
dependencies = { module=all-binutils; on=all-build-flex; };
dependencies = { module=all-binutils; on=all-build-bison; };
dependencies = { module=all-binutils; on=all-intl; };
+dependencies = { module=all-binutils; on=all-gas; };
// We put install-opcodes before install-binutils because the installed
// binutils might be on PATH, and they might need the shared opcodes
@@ -390,6 +408,7 @@
dependencies = { module=all-gprof; on=all-bfd; };
dependencies = { module=all-gprof; on=all-opcodes; };
dependencies = { module=all-gprof; on=all-intl; };
+dependencies = { module=all-gprof; on=all-gas; };
dependencies = { module=configure-ld; on=configure-intl; };
dependencies = { module=all-ld; on=all-libiberty; };
dependencies = { module=all-ld; on=all-bfd; };
@@ -397,6 +416,7 @@
dependencies = { module=all-ld; on=all-build-bison; };
dependencies = { module=all-ld; on=all-build-flex; };
dependencies = { module=all-ld; on=all-intl; };
+dependencies = { module=all-ld; on=all-gas; };
dependencies = { module=install-ld; on=install-gold; };
dependencies = { module=install-strip-ld; on=install-strip-gold; };
dependencies = { module=configure-gold; on=configure-intl; };
@@ -404,6 +424,7 @@
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-gas; };
dependencies = { module=check-gold; on=all-binutils; };
dependencies = { module=check-gold; on=all-gas; };
@@ -470,6 +491,7 @@
// environment (e.g. on libstdc++). By default target modules depend
// on libgcc and newlib/libgloss.
lang_env_dependencies = { module=libjava; cxx=true; };
+lang_env_dependencies = { module=libitm; cxx=true; };
lang_env_dependencies = { module=newlib; no_c=true; };
lang_env_dependencies = { module=libgloss; no_c=true; };
lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
@@ -483,7 +505,9 @@
dependencies = { module=all-target-fastjar; on=all-target-zlib; };
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-libbacktrace; };
dependencies = { module=all-target-libgo; on=all-target-libffi; };
+dependencies = { module=all-target-libgo; on=all-target-libatomic; };
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-libffi; };
@@ -494,11 +518,25 @@
dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
+dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
+dependencies = { module=configure-target-libvtv; on=all-target-libstdc++-v3; };
// parallel_list.o and parallel_settings.o depend on omp.h, which is
// generated by the libgomp configure. Unfortunately, due to the use of
// recursive make, we can't be that specific.
dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; };
+dependencies = { module=install-target-libgo; on=install-target-libatomic; };
+dependencies = { module=install-target-libgfortran; on=install-target-libquadmath; };
+dependencies = { module=install-target-libgfortran; on=install-target-libgcc; };
+dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++-v3; };
+dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; };
+dependencies = { module=install-target-libvtv; on=install-target-libstdc++-v3; };
+dependencies = { module=install-target-libvtv; on=install-target-libgcc; };
+dependencies = { module=install-target-libjava; on=install-target-libgcc; };
+dependencies = { module=install-target-libitm; on=install-target-libgcc; };
+dependencies = { module=install-target-libobjc; on=install-target-libgcc; };
+dependencies = { module=install-target-libstdc++-v3; on=install-target-libgcc; };
+
// Target modules in the 'src' repository.
lang_env_dependencies = { module=libtermcap; };
lang_env_dependencies = { module=rda; };
@@ -511,9 +549,11 @@
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++ check-c++0x";
+languages = { language=c++; gcc-check-target=check-c++;
lib-check-target=check-target-libstdc++-v3;
- lib-check-target=check-target-libmudflap-c++; };
+ lib-check-target=check-target-libmudflap-c++;
+ lib-check-target=check-target-libitm-c++;
+ lib-check-target=check-target-libgomp-c++; };
languages = { language=fortran; gcc-check-target=check-fortran;
lib-check-target=check-target-libquadmath;
lib-check-target=check-target-libgfortran; };
diff --git a/Makefile.in b/Makefile.in
index 7e4915c..a13771d 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, 2010
+# 1999, 2000, 2001, 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
@@ -206,6 +206,7 @@
WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
@@ -213,12 +214,12 @@
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
- PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \
- PPLINC="$(HOST_PPLINC)"; export PPLINC; \
+ ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
@@ -234,7 +235,7 @@
@if target-libstdc++-v3-bootstrap
# Override the above if we're bootstrapping C++.
POSTSTAGE1_CXX_EXPORT = \
- CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(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 \
@@ -285,6 +286,7 @@
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
@@ -307,9 +309,8 @@
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@
-# Where to find PPL
-HOST_PPLLIBS = @ppllibs@
-HOST_PPLINC = @pplinc@
+# Where to find ISL
+HOST_ISLINC = @islinc@
# Where to find CLOOG
HOST_CLOOGLIBS = @clooglibs@
@@ -363,7 +364,7 @@
# here so that they can be overridden by Makefile fragments.
BOOT_CFLAGS= -g -O2
BOOT_LDFLAGS=
-BOOT_ADAFLAGS=-gnatpg -gnata
+BOOT_ADAFLAGS= -gnatpg
AWK = @AWK@
SED = @SED@
@@ -397,6 +398,7 @@
NM = @NM@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
+READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
WINDMC = @WINDMC@
@@ -418,7 +420,6 @@
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.
@@ -429,10 +430,7 @@
STAGE1_CXXFLAGS = $(STAGE1_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE1_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGE1_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGE1_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Defaults for stage 2; some are overridden below.
STAGE2_CFLAGS = $(STAGE_CFLAGS)
@@ -442,10 +440,7 @@
STAGE2_CXXFLAGS = $(STAGE2_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE2_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGE2_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGE2_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Defaults for stage 3; some are overridden below.
STAGE3_CFLAGS = $(STAGE_CFLAGS)
@@ -455,10 +450,7 @@
STAGE3_CXXFLAGS = $(STAGE3_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE3_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGE3_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGE3_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Defaults for stage 4; some are overridden below.
STAGE4_CFLAGS = $(STAGE_CFLAGS)
@@ -468,10 +460,7 @@
STAGE4_CXXFLAGS = $(STAGE4_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE4_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGE4_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGE4_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Defaults for stage profile; some are overridden below.
STAGEprofile_CFLAGS = $(STAGE_CFLAGS)
@@ -481,10 +470,7 @@
STAGEprofile_CXXFLAGS = $(STAGEprofile_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGEprofile_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGEprofile_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGEprofile_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Defaults for stage feedback; some are overridden below.
STAGEfeedback_CFLAGS = $(STAGE_CFLAGS)
@@ -494,10 +480,7 @@
STAGEfeedback_CXXFLAGS = $(STAGEfeedback_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGEfeedback_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGEfeedback_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
# Only build the C compiler for stage1, because that is the only one that
@@ -515,9 +498,6 @@
# 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)"
@@ -555,6 +535,7 @@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@
@@ -594,7 +575,7 @@
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the target machine work.
-TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
@@ -604,6 +585,14 @@
TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
@endif target-libmudflap
+@if target-libsanitizer
+TARGET_LIB_PATH_libsanitizer = $$r/$(TARGET_SUBDIR)/libsanitizer/.libs:
+@endif target-libsanitizer
+
+@if target-libvtv
+TARGET_LIB_PATH_libvtv = $$r/$(TARGET_SUBDIR)/libvtv/.libs:
+@endif target-libvtv
+
@if target-libssp
TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
@endif target-libssp
@@ -612,11 +601,19 @@
TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
@endif target-libgomp
+@if target-libitm
+TARGET_LIB_PATH_libitm = $$r/$(TARGET_SUBDIR)/libitm/.libs:
+@endif target-libitm
+
+@if target-libatomic
+TARGET_LIB_PATH_libatomic = $$r/$(TARGET_SUBDIR)/libatomic/.libs:
+@endif target-libatomic
+
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
-HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)
+HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)
# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
@if gcc
@@ -639,10 +636,10 @@
$$r/$(HOST_SUBDIR)/mpc/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/.libs:
@endif mpc
-@if ppl
-HOST_LIB_PATH_ppl = \
- $$r/$(HOST_SUBDIR)/ppl/src/.libs:$$r/$(HOST_SUBDIR)/prev-ppl/src/.libs:
-@endif ppl
+@if isl
+HOST_LIB_PATH_isl = \
+ $$r/$(HOST_SUBDIR)/isl/.libs:$$r/$(HOST_SUBDIR)/prev-isl/.libs:
+@endif isl
@if cloog
HOST_LIB_PATH_cloog = \
@@ -757,6 +754,7 @@
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+ "READELF_FOR_TARGET=$(READELF_FOR_TARGET)" \
"STRIP_FOR_TARGET=$(STRIP_FOR_TARGET)" \
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
"WINDMC_FOR_TARGET=$(WINDMC_FOR_TARGET)" \
@@ -805,12 +803,19 @@
'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)' \
'WINDMC=$(WINDMC)'
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
+# Flags to pass to stage1 or when not bootstrapping.
+
+STAGE1_FLAGS_TO_PASS = \
+ LDFLAGS="$${LDFLAGS}" \
+ HOST_LIBS="$${HOST_LIBS}"
+
# Flags to pass to stage2 and later makes.
POSTSTAGE1_FLAGS_TO_PASS = \
@@ -845,6 +850,7 @@
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
+ 'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
@@ -861,10 +867,7 @@
EXTRA_GCC_FLAGS = \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
@@ -892,7 +895,7 @@
maybe-configure-gmp \
maybe-configure-mpfr \
maybe-configure-mpc \
- maybe-configure-ppl \
+ maybe-configure-isl \
maybe-configure-cloog \
maybe-configure-libelf \
maybe-configure-gold \
@@ -901,6 +904,7 @@
maybe-configure-tcl \
maybe-configure-itcl \
maybe-configure-ld \
+ maybe-configure-libbacktrace \
maybe-configure-libcpp \
maybe-configure-libdecnumber \
maybe-configure-libgui \
@@ -924,9 +928,12 @@
configure-target: \
maybe-configure-target-libstdc++-v3 \
maybe-configure-target-libmudflap \
+ maybe-configure-target-libsanitizer \
+ maybe-configure-target-libvtv \
maybe-configure-target-libssp \
maybe-configure-target-newlib \
maybe-configure-target-libgcc \
+ maybe-configure-target-libbacktrace \
maybe-configure-target-libquadmath \
maybe-configure-target-libgfortran \
maybe-configure-target-libobjc \
@@ -940,7 +947,9 @@
maybe-configure-target-boehm-gc \
maybe-configure-target-rda \
maybe-configure-target-libada \
- maybe-configure-target-libgomp
+ maybe-configure-target-libgomp \
+ maybe-configure-target-libitm \
+ maybe-configure-target-libatomic
# The target built for a native non-bootstrap build.
.PHONY: all
@@ -1009,9 +1018,9 @@
@if mpc-no-bootstrap
all-host: maybe-all-mpc
@endif mpc-no-bootstrap
-@if ppl-no-bootstrap
-all-host: maybe-all-ppl
-@endif ppl-no-bootstrap
+@if isl-no-bootstrap
+all-host: maybe-all-isl
+@endif isl-no-bootstrap
@if cloog-no-bootstrap
all-host: maybe-all-cloog
@endif cloog-no-bootstrap
@@ -1030,6 +1039,9 @@
@if ld-no-bootstrap
all-host: maybe-all-ld
@endif ld-no-bootstrap
+@if libbacktrace-no-bootstrap
+all-host: maybe-all-libbacktrace
+@endif libbacktrace-no-bootstrap
@if libcpp-no-bootstrap
all-host: maybe-all-libcpp
@endif libcpp-no-bootstrap
@@ -1066,11 +1078,18 @@
all-target: maybe-all-target-libstdc++-v3
@endif target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libmudflap
+@if target-libsanitizer-no-bootstrap
+all-target: maybe-all-target-libsanitizer
+@endif target-libsanitizer-no-bootstrap
+@if target-libvtv-no-bootstrap
+all-target: maybe-all-target-libvtv
+@endif target-libvtv-no-bootstrap
all-target: maybe-all-target-libssp
all-target: maybe-all-target-newlib
@if target-libgcc-no-bootstrap
all-target: maybe-all-target-libgcc
@endif target-libgcc-no-bootstrap
+all-target: maybe-all-target-libbacktrace
all-target: maybe-all-target-libquadmath
all-target: maybe-all-target-libgfortran
all-target: maybe-all-target-libobjc
@@ -1087,6 +1106,8 @@
@if target-libgomp-no-bootstrap
all-target: maybe-all-target-libgomp
@endif target-libgomp-no-bootstrap
+all-target: maybe-all-target-libitm
+all-target: maybe-all-target-libatomic
# Do a target for all the subdirectories. A ``make do-X'' will do a
# ``make X'' in all subdirectories (because, in general, there is a
@@ -1119,7 +1140,7 @@
info-host: maybe-info-gmp
info-host: maybe-info-mpfr
info-host: maybe-info-mpc
-info-host: maybe-info-ppl
+info-host: maybe-info-isl
info-host: maybe-info-cloog
info-host: maybe-info-libelf
info-host: maybe-info-gold
@@ -1128,6 +1149,7 @@
info-host: maybe-info-tcl
info-host: maybe-info-itcl
info-host: maybe-info-ld
+info-host: maybe-info-libbacktrace
info-host: maybe-info-libcpp
info-host: maybe-info-libdecnumber
info-host: maybe-info-libgui
@@ -1152,9 +1174,12 @@
info-target: maybe-info-target-libstdc++-v3
info-target: maybe-info-target-libmudflap
+info-target: maybe-info-target-libsanitizer
+info-target: maybe-info-target-libvtv
info-target: maybe-info-target-libssp
info-target: maybe-info-target-newlib
info-target: maybe-info-target-libgcc
+info-target: maybe-info-target-libbacktrace
info-target: maybe-info-target-libquadmath
info-target: maybe-info-target-libgfortran
info-target: maybe-info-target-libobjc
@@ -1169,6 +1194,8 @@
info-target: maybe-info-target-rda
info-target: maybe-info-target-libada
info-target: maybe-info-target-libgomp
+info-target: maybe-info-target-libitm
+info-target: maybe-info-target-libatomic
.PHONY: do-dvi
do-dvi:
@@ -1196,7 +1223,7 @@
dvi-host: maybe-dvi-gmp
dvi-host: maybe-dvi-mpfr
dvi-host: maybe-dvi-mpc
-dvi-host: maybe-dvi-ppl
+dvi-host: maybe-dvi-isl
dvi-host: maybe-dvi-cloog
dvi-host: maybe-dvi-libelf
dvi-host: maybe-dvi-gold
@@ -1205,6 +1232,7 @@
dvi-host: maybe-dvi-tcl
dvi-host: maybe-dvi-itcl
dvi-host: maybe-dvi-ld
+dvi-host: maybe-dvi-libbacktrace
dvi-host: maybe-dvi-libcpp
dvi-host: maybe-dvi-libdecnumber
dvi-host: maybe-dvi-libgui
@@ -1229,9 +1257,12 @@
dvi-target: maybe-dvi-target-libstdc++-v3
dvi-target: maybe-dvi-target-libmudflap
+dvi-target: maybe-dvi-target-libsanitizer
+dvi-target: maybe-dvi-target-libvtv
dvi-target: maybe-dvi-target-libssp
dvi-target: maybe-dvi-target-newlib
dvi-target: maybe-dvi-target-libgcc
+dvi-target: maybe-dvi-target-libbacktrace
dvi-target: maybe-dvi-target-libquadmath
dvi-target: maybe-dvi-target-libgfortran
dvi-target: maybe-dvi-target-libobjc
@@ -1246,6 +1277,8 @@
dvi-target: maybe-dvi-target-rda
dvi-target: maybe-dvi-target-libada
dvi-target: maybe-dvi-target-libgomp
+dvi-target: maybe-dvi-target-libitm
+dvi-target: maybe-dvi-target-libatomic
.PHONY: do-pdf
do-pdf:
@@ -1273,7 +1306,7 @@
pdf-host: maybe-pdf-gmp
pdf-host: maybe-pdf-mpfr
pdf-host: maybe-pdf-mpc
-pdf-host: maybe-pdf-ppl
+pdf-host: maybe-pdf-isl
pdf-host: maybe-pdf-cloog
pdf-host: maybe-pdf-libelf
pdf-host: maybe-pdf-gold
@@ -1282,6 +1315,7 @@
pdf-host: maybe-pdf-tcl
pdf-host: maybe-pdf-itcl
pdf-host: maybe-pdf-ld
+pdf-host: maybe-pdf-libbacktrace
pdf-host: maybe-pdf-libcpp
pdf-host: maybe-pdf-libdecnumber
pdf-host: maybe-pdf-libgui
@@ -1306,9 +1340,12 @@
pdf-target: maybe-pdf-target-libstdc++-v3
pdf-target: maybe-pdf-target-libmudflap
+pdf-target: maybe-pdf-target-libsanitizer
+pdf-target: maybe-pdf-target-libvtv
pdf-target: maybe-pdf-target-libssp
pdf-target: maybe-pdf-target-newlib
pdf-target: maybe-pdf-target-libgcc
+pdf-target: maybe-pdf-target-libbacktrace
pdf-target: maybe-pdf-target-libquadmath
pdf-target: maybe-pdf-target-libgfortran
pdf-target: maybe-pdf-target-libobjc
@@ -1323,6 +1360,8 @@
pdf-target: maybe-pdf-target-rda
pdf-target: maybe-pdf-target-libada
pdf-target: maybe-pdf-target-libgomp
+pdf-target: maybe-pdf-target-libitm
+pdf-target: maybe-pdf-target-libatomic
.PHONY: do-html
do-html:
@@ -1350,7 +1389,7 @@
html-host: maybe-html-gmp
html-host: maybe-html-mpfr
html-host: maybe-html-mpc
-html-host: maybe-html-ppl
+html-host: maybe-html-isl
html-host: maybe-html-cloog
html-host: maybe-html-libelf
html-host: maybe-html-gold
@@ -1359,6 +1398,7 @@
html-host: maybe-html-tcl
html-host: maybe-html-itcl
html-host: maybe-html-ld
+html-host: maybe-html-libbacktrace
html-host: maybe-html-libcpp
html-host: maybe-html-libdecnumber
html-host: maybe-html-libgui
@@ -1383,9 +1423,12 @@
html-target: maybe-html-target-libstdc++-v3
html-target: maybe-html-target-libmudflap
+html-target: maybe-html-target-libsanitizer
+html-target: maybe-html-target-libvtv
html-target: maybe-html-target-libssp
html-target: maybe-html-target-newlib
html-target: maybe-html-target-libgcc
+html-target: maybe-html-target-libbacktrace
html-target: maybe-html-target-libquadmath
html-target: maybe-html-target-libgfortran
html-target: maybe-html-target-libobjc
@@ -1400,6 +1443,8 @@
html-target: maybe-html-target-rda
html-target: maybe-html-target-libada
html-target: maybe-html-target-libgomp
+html-target: maybe-html-target-libitm
+html-target: maybe-html-target-libatomic
.PHONY: do-TAGS
do-TAGS:
@@ -1427,7 +1472,7 @@
TAGS-host: maybe-TAGS-gmp
TAGS-host: maybe-TAGS-mpfr
TAGS-host: maybe-TAGS-mpc
-TAGS-host: maybe-TAGS-ppl
+TAGS-host: maybe-TAGS-isl
TAGS-host: maybe-TAGS-cloog
TAGS-host: maybe-TAGS-libelf
TAGS-host: maybe-TAGS-gold
@@ -1436,6 +1481,7 @@
TAGS-host: maybe-TAGS-tcl
TAGS-host: maybe-TAGS-itcl
TAGS-host: maybe-TAGS-ld
+TAGS-host: maybe-TAGS-libbacktrace
TAGS-host: maybe-TAGS-libcpp
TAGS-host: maybe-TAGS-libdecnumber
TAGS-host: maybe-TAGS-libgui
@@ -1460,9 +1506,12 @@
TAGS-target: maybe-TAGS-target-libstdc++-v3
TAGS-target: maybe-TAGS-target-libmudflap
+TAGS-target: maybe-TAGS-target-libsanitizer
+TAGS-target: maybe-TAGS-target-libvtv
TAGS-target: maybe-TAGS-target-libssp
TAGS-target: maybe-TAGS-target-newlib
TAGS-target: maybe-TAGS-target-libgcc
+TAGS-target: maybe-TAGS-target-libbacktrace
TAGS-target: maybe-TAGS-target-libquadmath
TAGS-target: maybe-TAGS-target-libgfortran
TAGS-target: maybe-TAGS-target-libobjc
@@ -1477,6 +1526,8 @@
TAGS-target: maybe-TAGS-target-rda
TAGS-target: maybe-TAGS-target-libada
TAGS-target: maybe-TAGS-target-libgomp
+TAGS-target: maybe-TAGS-target-libitm
+TAGS-target: maybe-TAGS-target-libatomic
.PHONY: do-install-info
do-install-info:
@@ -1504,7 +1555,7 @@
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-isl
install-info-host: maybe-install-info-cloog
install-info-host: maybe-install-info-libelf
install-info-host: maybe-install-info-gold
@@ -1513,6 +1564,7 @@
install-info-host: maybe-install-info-tcl
install-info-host: maybe-install-info-itcl
install-info-host: maybe-install-info-ld
+install-info-host: maybe-install-info-libbacktrace
install-info-host: maybe-install-info-libcpp
install-info-host: maybe-install-info-libdecnumber
install-info-host: maybe-install-info-libgui
@@ -1537,9 +1589,12 @@
install-info-target: maybe-install-info-target-libstdc++-v3
install-info-target: maybe-install-info-target-libmudflap
+install-info-target: maybe-install-info-target-libsanitizer
+install-info-target: maybe-install-info-target-libvtv
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-libbacktrace
install-info-target: maybe-install-info-target-libquadmath
install-info-target: maybe-install-info-target-libgfortran
install-info-target: maybe-install-info-target-libobjc
@@ -1554,6 +1609,8 @@
install-info-target: maybe-install-info-target-rda
install-info-target: maybe-install-info-target-libada
install-info-target: maybe-install-info-target-libgomp
+install-info-target: maybe-install-info-target-libitm
+install-info-target: maybe-install-info-target-libatomic
.PHONY: do-install-pdf
do-install-pdf:
@@ -1581,7 +1638,7 @@
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-isl
install-pdf-host: maybe-install-pdf-cloog
install-pdf-host: maybe-install-pdf-libelf
install-pdf-host: maybe-install-pdf-gold
@@ -1590,6 +1647,7 @@
install-pdf-host: maybe-install-pdf-tcl
install-pdf-host: maybe-install-pdf-itcl
install-pdf-host: maybe-install-pdf-ld
+install-pdf-host: maybe-install-pdf-libbacktrace
install-pdf-host: maybe-install-pdf-libcpp
install-pdf-host: maybe-install-pdf-libdecnumber
install-pdf-host: maybe-install-pdf-libgui
@@ -1614,9 +1672,12 @@
install-pdf-target: maybe-install-pdf-target-libstdc++-v3
install-pdf-target: maybe-install-pdf-target-libmudflap
+install-pdf-target: maybe-install-pdf-target-libsanitizer
+install-pdf-target: maybe-install-pdf-target-libvtv
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-libbacktrace
install-pdf-target: maybe-install-pdf-target-libquadmath
install-pdf-target: maybe-install-pdf-target-libgfortran
install-pdf-target: maybe-install-pdf-target-libobjc
@@ -1631,6 +1692,8 @@
install-pdf-target: maybe-install-pdf-target-rda
install-pdf-target: maybe-install-pdf-target-libada
install-pdf-target: maybe-install-pdf-target-libgomp
+install-pdf-target: maybe-install-pdf-target-libitm
+install-pdf-target: maybe-install-pdf-target-libatomic
.PHONY: do-install-html
do-install-html:
@@ -1658,7 +1721,7 @@
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-isl
install-html-host: maybe-install-html-cloog
install-html-host: maybe-install-html-libelf
install-html-host: maybe-install-html-gold
@@ -1667,6 +1730,7 @@
install-html-host: maybe-install-html-tcl
install-html-host: maybe-install-html-itcl
install-html-host: maybe-install-html-ld
+install-html-host: maybe-install-html-libbacktrace
install-html-host: maybe-install-html-libcpp
install-html-host: maybe-install-html-libdecnumber
install-html-host: maybe-install-html-libgui
@@ -1691,9 +1755,12 @@
install-html-target: maybe-install-html-target-libstdc++-v3
install-html-target: maybe-install-html-target-libmudflap
+install-html-target: maybe-install-html-target-libsanitizer
+install-html-target: maybe-install-html-target-libvtv
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-libbacktrace
install-html-target: maybe-install-html-target-libquadmath
install-html-target: maybe-install-html-target-libgfortran
install-html-target: maybe-install-html-target-libobjc
@@ -1708,6 +1775,8 @@
install-html-target: maybe-install-html-target-rda
install-html-target: maybe-install-html-target-libada
install-html-target: maybe-install-html-target-libgomp
+install-html-target: maybe-install-html-target-libitm
+install-html-target: maybe-install-html-target-libatomic
.PHONY: do-installcheck
do-installcheck:
@@ -1735,7 +1804,7 @@
installcheck-host: maybe-installcheck-gmp
installcheck-host: maybe-installcheck-mpfr
installcheck-host: maybe-installcheck-mpc
-installcheck-host: maybe-installcheck-ppl
+installcheck-host: maybe-installcheck-isl
installcheck-host: maybe-installcheck-cloog
installcheck-host: maybe-installcheck-libelf
installcheck-host: maybe-installcheck-gold
@@ -1744,6 +1813,7 @@
installcheck-host: maybe-installcheck-tcl
installcheck-host: maybe-installcheck-itcl
installcheck-host: maybe-installcheck-ld
+installcheck-host: maybe-installcheck-libbacktrace
installcheck-host: maybe-installcheck-libcpp
installcheck-host: maybe-installcheck-libdecnumber
installcheck-host: maybe-installcheck-libgui
@@ -1768,9 +1838,12 @@
installcheck-target: maybe-installcheck-target-libstdc++-v3
installcheck-target: maybe-installcheck-target-libmudflap
+installcheck-target: maybe-installcheck-target-libsanitizer
+installcheck-target: maybe-installcheck-target-libvtv
installcheck-target: maybe-installcheck-target-libssp
installcheck-target: maybe-installcheck-target-newlib
installcheck-target: maybe-installcheck-target-libgcc
+installcheck-target: maybe-installcheck-target-libbacktrace
installcheck-target: maybe-installcheck-target-libquadmath
installcheck-target: maybe-installcheck-target-libgfortran
installcheck-target: maybe-installcheck-target-libobjc
@@ -1785,6 +1858,8 @@
installcheck-target: maybe-installcheck-target-rda
installcheck-target: maybe-installcheck-target-libada
installcheck-target: maybe-installcheck-target-libgomp
+installcheck-target: maybe-installcheck-target-libitm
+installcheck-target: maybe-installcheck-target-libatomic
.PHONY: do-mostlyclean
do-mostlyclean:
@@ -1812,7 +1887,7 @@
mostlyclean-host: maybe-mostlyclean-gmp
mostlyclean-host: maybe-mostlyclean-mpfr
mostlyclean-host: maybe-mostlyclean-mpc
-mostlyclean-host: maybe-mostlyclean-ppl
+mostlyclean-host: maybe-mostlyclean-isl
mostlyclean-host: maybe-mostlyclean-cloog
mostlyclean-host: maybe-mostlyclean-libelf
mostlyclean-host: maybe-mostlyclean-gold
@@ -1821,6 +1896,7 @@
mostlyclean-host: maybe-mostlyclean-tcl
mostlyclean-host: maybe-mostlyclean-itcl
mostlyclean-host: maybe-mostlyclean-ld
+mostlyclean-host: maybe-mostlyclean-libbacktrace
mostlyclean-host: maybe-mostlyclean-libcpp
mostlyclean-host: maybe-mostlyclean-libdecnumber
mostlyclean-host: maybe-mostlyclean-libgui
@@ -1845,9 +1921,12 @@
mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3
mostlyclean-target: maybe-mostlyclean-target-libmudflap
+mostlyclean-target: maybe-mostlyclean-target-libsanitizer
+mostlyclean-target: maybe-mostlyclean-target-libvtv
mostlyclean-target: maybe-mostlyclean-target-libssp
mostlyclean-target: maybe-mostlyclean-target-newlib
mostlyclean-target: maybe-mostlyclean-target-libgcc
+mostlyclean-target: maybe-mostlyclean-target-libbacktrace
mostlyclean-target: maybe-mostlyclean-target-libquadmath
mostlyclean-target: maybe-mostlyclean-target-libgfortran
mostlyclean-target: maybe-mostlyclean-target-libobjc
@@ -1862,6 +1941,8 @@
mostlyclean-target: maybe-mostlyclean-target-rda
mostlyclean-target: maybe-mostlyclean-target-libada
mostlyclean-target: maybe-mostlyclean-target-libgomp
+mostlyclean-target: maybe-mostlyclean-target-libitm
+mostlyclean-target: maybe-mostlyclean-target-libatomic
.PHONY: do-clean
do-clean:
@@ -1889,7 +1970,7 @@
clean-host: maybe-clean-gmp
clean-host: maybe-clean-mpfr
clean-host: maybe-clean-mpc
-clean-host: maybe-clean-ppl
+clean-host: maybe-clean-isl
clean-host: maybe-clean-cloog
clean-host: maybe-clean-libelf
clean-host: maybe-clean-gold
@@ -1898,6 +1979,7 @@
clean-host: maybe-clean-tcl
clean-host: maybe-clean-itcl
clean-host: maybe-clean-ld
+clean-host: maybe-clean-libbacktrace
clean-host: maybe-clean-libcpp
clean-host: maybe-clean-libdecnumber
clean-host: maybe-clean-libgui
@@ -1922,9 +2004,12 @@
clean-target: maybe-clean-target-libstdc++-v3
clean-target: maybe-clean-target-libmudflap
+clean-target: maybe-clean-target-libsanitizer
+clean-target: maybe-clean-target-libvtv
clean-target: maybe-clean-target-libssp
clean-target: maybe-clean-target-newlib
clean-target: maybe-clean-target-libgcc
+clean-target: maybe-clean-target-libbacktrace
clean-target: maybe-clean-target-libquadmath
clean-target: maybe-clean-target-libgfortran
clean-target: maybe-clean-target-libobjc
@@ -1939,6 +2024,8 @@
clean-target: maybe-clean-target-rda
clean-target: maybe-clean-target-libada
clean-target: maybe-clean-target-libgomp
+clean-target: maybe-clean-target-libitm
+clean-target: maybe-clean-target-libatomic
.PHONY: do-distclean
do-distclean:
@@ -1966,7 +2053,7 @@
distclean-host: maybe-distclean-gmp
distclean-host: maybe-distclean-mpfr
distclean-host: maybe-distclean-mpc
-distclean-host: maybe-distclean-ppl
+distclean-host: maybe-distclean-isl
distclean-host: maybe-distclean-cloog
distclean-host: maybe-distclean-libelf
distclean-host: maybe-distclean-gold
@@ -1975,6 +2062,7 @@
distclean-host: maybe-distclean-tcl
distclean-host: maybe-distclean-itcl
distclean-host: maybe-distclean-ld
+distclean-host: maybe-distclean-libbacktrace
distclean-host: maybe-distclean-libcpp
distclean-host: maybe-distclean-libdecnumber
distclean-host: maybe-distclean-libgui
@@ -1999,9 +2087,12 @@
distclean-target: maybe-distclean-target-libstdc++-v3
distclean-target: maybe-distclean-target-libmudflap
+distclean-target: maybe-distclean-target-libsanitizer
+distclean-target: maybe-distclean-target-libvtv
distclean-target: maybe-distclean-target-libssp
distclean-target: maybe-distclean-target-newlib
distclean-target: maybe-distclean-target-libgcc
+distclean-target: maybe-distclean-target-libbacktrace
distclean-target: maybe-distclean-target-libquadmath
distclean-target: maybe-distclean-target-libgfortran
distclean-target: maybe-distclean-target-libobjc
@@ -2016,6 +2107,8 @@
distclean-target: maybe-distclean-target-rda
distclean-target: maybe-distclean-target-libada
distclean-target: maybe-distclean-target-libgomp
+distclean-target: maybe-distclean-target-libitm
+distclean-target: maybe-distclean-target-libatomic
.PHONY: do-maintainer-clean
do-maintainer-clean:
@@ -2043,7 +2136,7 @@
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-isl
maintainer-clean-host: maybe-maintainer-clean-cloog
maintainer-clean-host: maybe-maintainer-clean-libelf
maintainer-clean-host: maybe-maintainer-clean-gold
@@ -2052,6 +2145,7 @@
maintainer-clean-host: maybe-maintainer-clean-tcl
maintainer-clean-host: maybe-maintainer-clean-itcl
maintainer-clean-host: maybe-maintainer-clean-ld
+maintainer-clean-host: maybe-maintainer-clean-libbacktrace
maintainer-clean-host: maybe-maintainer-clean-libcpp
maintainer-clean-host: maybe-maintainer-clean-libdecnumber
maintainer-clean-host: maybe-maintainer-clean-libgui
@@ -2076,9 +2170,12 @@
maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3
maintainer-clean-target: maybe-maintainer-clean-target-libmudflap
+maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer
+maintainer-clean-target: maybe-maintainer-clean-target-libvtv
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-libbacktrace
maintainer-clean-target: maybe-maintainer-clean-target-libquadmath
maintainer-clean-target: maybe-maintainer-clean-target-libgfortran
maintainer-clean-target: maybe-maintainer-clean-target-libobjc
@@ -2093,6 +2190,8 @@
maintainer-clean-target: maybe-maintainer-clean-target-rda
maintainer-clean-target: maybe-maintainer-clean-target-libada
maintainer-clean-target: maybe-maintainer-clean-target-libgomp
+maintainer-clean-target: maybe-maintainer-clean-target-libitm
+maintainer-clean-target: maybe-maintainer-clean-target-libatomic
# Here are the targets which correspond to the do-X targets.
@@ -2175,7 +2274,7 @@
maybe-check-gmp \
maybe-check-mpfr \
maybe-check-mpc \
- maybe-check-ppl \
+ maybe-check-isl \
maybe-check-cloog \
maybe-check-libelf \
maybe-check-gold \
@@ -2184,6 +2283,7 @@
maybe-check-tcl \
maybe-check-itcl \
maybe-check-ld \
+ maybe-check-libbacktrace \
maybe-check-libcpp \
maybe-check-libdecnumber \
maybe-check-libgui \
@@ -2208,9 +2308,12 @@
check-target: \
maybe-check-target-libstdc++-v3 \
maybe-check-target-libmudflap \
+ maybe-check-target-libsanitizer \
+ maybe-check-target-libvtv \
maybe-check-target-libssp \
maybe-check-target-newlib \
maybe-check-target-libgcc \
+ maybe-check-target-libbacktrace \
maybe-check-target-libquadmath \
maybe-check-target-libgfortran \
maybe-check-target-libobjc \
@@ -2224,7 +2327,9 @@
maybe-check-target-boehm-gc \
maybe-check-target-rda \
maybe-check-target-libada \
- maybe-check-target-libgomp
+ maybe-check-target-libgomp \
+ maybe-check-target-libitm \
+ maybe-check-target-libatomic
do-check:
@: $(MAKE); $(unstage)
@@ -2278,7 +2383,7 @@
maybe-install-gmp \
maybe-install-mpfr \
maybe-install-mpc \
- maybe-install-ppl \
+ maybe-install-isl \
maybe-install-cloog \
maybe-install-libelf \
maybe-install-gold \
@@ -2287,6 +2392,7 @@
maybe-install-tcl \
maybe-install-itcl \
maybe-install-ld \
+ maybe-install-libbacktrace \
maybe-install-libcpp \
maybe-install-libdecnumber \
maybe-install-libgui \
@@ -2324,7 +2430,7 @@
maybe-install-gmp \
maybe-install-mpfr \
maybe-install-mpc \
- maybe-install-ppl \
+ maybe-install-isl \
maybe-install-cloog \
maybe-install-libelf \
maybe-install-gold \
@@ -2333,6 +2439,7 @@
maybe-install-tcl \
maybe-install-itcl \
maybe-install-ld \
+ maybe-install-libbacktrace \
maybe-install-libcpp \
maybe-install-libdecnumber \
maybe-install-libgui \
@@ -2357,9 +2464,12 @@
install-target: \
maybe-install-target-libstdc++-v3 \
maybe-install-target-libmudflap \
+ maybe-install-target-libsanitizer \
+ maybe-install-target-libvtv \
maybe-install-target-libssp \
maybe-install-target-newlib \
maybe-install-target-libgcc \
+ maybe-install-target-libbacktrace \
maybe-install-target-libquadmath \
maybe-install-target-libgfortran \
maybe-install-target-libobjc \
@@ -2373,7 +2483,9 @@
maybe-install-target-boehm-gc \
maybe-install-target-rda \
maybe-install-target-libada \
- maybe-install-target-libgomp
+ maybe-install-target-libgomp \
+ maybe-install-target-libitm \
+ maybe-install-target-libatomic
uninstall:
@echo "the uninstall target is not supported in this tree"
@@ -2390,11 +2502,12 @@
true ; \
fi
-# install-no-fixedincludes is used because Cygnus can not distribute
-# the fixed header files.
+# install-no-fixedincludes is used to allow the elaboration of binary packages
+# suitable for distribution, where we cannot include the fixed system header
+# files.
.PHONY: install-no-fixedincludes
install-no-fixedincludes: installdirs install-host-nogcc \
- install-target gcc-no-fixedincludes
+ install-target gcc-install-no-fixedincludes
.PHONY: install-strip
install-strip:
@@ -2420,7 +2533,7 @@
maybe-install-strip-gmp \
maybe-install-strip-mpfr \
maybe-install-strip-mpc \
- maybe-install-strip-ppl \
+ maybe-install-strip-isl \
maybe-install-strip-cloog \
maybe-install-strip-libelf \
maybe-install-strip-gold \
@@ -2429,6 +2542,7 @@
maybe-install-strip-tcl \
maybe-install-strip-itcl \
maybe-install-strip-ld \
+ maybe-install-strip-libbacktrace \
maybe-install-strip-libcpp \
maybe-install-strip-libdecnumber \
maybe-install-strip-libgui \
@@ -2453,9 +2567,12 @@
install-strip-target: \
maybe-install-strip-target-libstdc++-v3 \
maybe-install-strip-target-libmudflap \
+ maybe-install-strip-target-libsanitizer \
+ maybe-install-strip-target-libvtv \
maybe-install-strip-target-libssp \
maybe-install-strip-target-newlib \
maybe-install-strip-target-libgcc \
+ maybe-install-strip-target-libbacktrace \
maybe-install-strip-target-libquadmath \
maybe-install-strip-target-libgfortran \
maybe-install-strip-target-libobjc \
@@ -2469,7 +2586,9 @@
maybe-install-strip-target-boehm-gc \
maybe-install-strip-target-rda \
maybe-install-strip-target-libada \
- maybe-install-strip-target-libgomp
+ maybe-install-strip-target-libgomp \
+ maybe-install-strip-target-libitm \
+ maybe-install-strip-target-libatomic
### other supporting targets
@@ -2563,7 +2682,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-libiberty))
@endif build-libiberty
@@ -2619,7 +2738,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/bison && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-bison))
@endif build-bison
@@ -2675,7 +2794,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/flex && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-flex))
@endif build-flex
@@ -2731,7 +2850,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/m4 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-m4))
@endif build-m4
@@ -2787,7 +2906,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/texinfo && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-texinfo))
@endif build-texinfo
@@ -2843,7 +2962,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/fixincludes && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-fixincludes))
@endif build-fixincludes
@@ -3099,7 +3218,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-bfd))
@endif bfd
@@ -3127,7 +3246,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-bfd)
@@ -3142,7 +3262,7 @@
fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3183,9 +3303,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3226,9 +3344,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3269,9 +3385,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3312,9 +3426,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3355,9 +3467,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif bfd-bootstrap
@@ -3980,7 +4090,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-opcodes))
@endif opcodes
@@ -4008,7 +4118,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-opcodes)
@@ -4023,7 +4134,7 @@
fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4064,9 +4175,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4107,9 +4216,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4150,9 +4257,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4193,9 +4298,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4236,9 +4339,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif opcodes-bootstrap
@@ -4861,7 +4962,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-binutils))
@endif binutils
@@ -4889,7 +4990,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-binutils)
@@ -4904,7 +5006,7 @@
fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -4945,9 +5047,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -4988,9 +5088,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -5031,9 +5129,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -5074,9 +5170,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -5117,9 +5211,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif binutils-bootstrap
@@ -5546,7 +5638,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bison && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-bison))
@endif bison
@@ -5989,7 +6081,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/cgen && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-cgen))
@endif cgen
@@ -6429,7 +6521,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/dejagnu && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-dejagnu))
@endif dejagnu
@@ -6869,7 +6961,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/etc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-etc))
@endif etc
@@ -7309,7 +7401,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fastjar && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-fastjar))
@endif fastjar
@@ -7752,7 +7844,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fixincludes && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-fixincludes))
@endif fixincludes
@@ -8176,7 +8268,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/flex && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-flex))
@endif flex
@@ -8815,7 +8907,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gas))
@endif gas
@@ -8843,7 +8935,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-gas)
@@ -8858,7 +8951,7 @@
fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -8899,9 +8992,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -8942,9 +9033,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -8985,9 +9074,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -9028,9 +9115,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -9071,9 +9156,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gas-bootstrap
@@ -9696,7 +9779,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-gcc))
@endif gcc
@@ -9724,7 +9807,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-gcc)
@@ -9739,7 +9823,7 @@
fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(STAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -9780,9 +9864,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -9823,9 +9905,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -9866,9 +9946,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -9909,9 +9987,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -9952,9 +10028,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -10583,7 +10657,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gmp))
@endif gmp
@@ -10611,7 +10685,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-gmp)
@@ -10626,7 +10701,7 @@
fi; \
cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -10667,9 +10742,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -10710,9 +10783,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -10753,9 +10824,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -10796,9 +10865,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -10839,9 +10906,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gmp-bootstrap
@@ -11458,7 +11523,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-mpfr))
@endif mpfr
@@ -11486,7 +11551,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-mpfr)
@@ -11501,7 +11567,7 @@
fi; \
cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -11542,9 +11608,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -11585,9 +11649,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -11628,9 +11690,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -11671,9 +11731,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -11714,9 +11772,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpfr-bootstrap
@@ -12333,7 +12389,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-mpc))
@endif mpc
@@ -12361,7 +12417,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-mpc)
@@ -12376,7 +12433,7 @@
fi; \
cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12417,9 +12474,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12460,9 +12515,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12503,9 +12556,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12546,9 +12597,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12589,9 +12638,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif mpc-bootstrap
@@ -12959,276 +13006,276 @@
-.PHONY: configure-ppl maybe-configure-ppl
-maybe-configure-ppl:
+.PHONY: configure-isl maybe-configure-isl
+maybe-configure-isl:
@if gcc-bootstrap
-configure-ppl: stage_current
+configure-isl: stage_current
@endif gcc-bootstrap
-@if ppl
-maybe-configure-ppl: configure-ppl
-configure-ppl:
+@if isl
+maybe-configure-isl: configure-isl
+configure-isl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
$(HOST_EXPORTS) \
- echo Configuring in $(HOST_SUBDIR)/ppl; \
- cd "$(HOST_SUBDIR)/ppl" || exit 1; \
+ echo Configuring in $(HOST_SUBDIR)/isl; \
+ cd "$(HOST_SUBDIR)/isl" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/ \
+ --target=${target_alias} $${srcdiroption} --disable-shared @extra_isl_gmp_configure_flags@ \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: configure-stage1-ppl maybe-configure-stage1-ppl
-maybe-configure-stage1-ppl:
-@if ppl-bootstrap
-maybe-configure-stage1-ppl: configure-stage1-ppl
-configure-stage1-ppl:
+.PHONY: configure-stage1-isl maybe-configure-stage1-isl
+maybe-configure-stage1-isl:
+@if isl-bootstrap
+maybe-configure-stage1-isl: configure-stage1-isl
+configure-stage1-isl:
@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
$(STAGE1_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: configure-stage2-ppl maybe-configure-stage2-ppl
-maybe-configure-stage2-ppl:
-@if ppl-bootstrap
-maybe-configure-stage2-ppl: configure-stage2-ppl
-configure-stage2-ppl:
+.PHONY: configure-stage2-isl maybe-configure-stage2-isl
+maybe-configure-stage2-isl:
+@if isl-bootstrap
+maybe-configure-stage2-isl: configure-stage2-isl
+configure-stage2-isl:
@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: configure-stage3-ppl maybe-configure-stage3-ppl
-maybe-configure-stage3-ppl:
-@if ppl-bootstrap
-maybe-configure-stage3-ppl: configure-stage3-ppl
-configure-stage3-ppl:
+.PHONY: configure-stage3-isl maybe-configure-stage3-isl
+maybe-configure-stage3-isl:
+@if isl-bootstrap
+maybe-configure-stage3-isl: configure-stage3-isl
+configure-stage3-isl:
@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: configure-stage4-ppl maybe-configure-stage4-ppl
-maybe-configure-stage4-ppl:
-@if ppl-bootstrap
-maybe-configure-stage4-ppl: configure-stage4-ppl
-configure-stage4-ppl:
+.PHONY: configure-stage4-isl maybe-configure-stage4-isl
+maybe-configure-stage4-isl:
+@if isl-bootstrap
+maybe-configure-stage4-isl: configure-stage4-isl
+configure-stage4-isl:
@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: configure-stageprofile-ppl maybe-configure-stageprofile-ppl
-maybe-configure-stageprofile-ppl:
-@if ppl-bootstrap
-maybe-configure-stageprofile-ppl: configure-stageprofile-ppl
-configure-stageprofile-ppl:
+.PHONY: configure-stageprofile-isl maybe-configure-stageprofile-isl
+maybe-configure-stageprofile-isl:
+@if isl-bootstrap
+maybe-configure-stageprofile-isl: configure-stageprofile-isl
+configure-stageprofile-isl:
@[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: configure-stagefeedback-ppl maybe-configure-stagefeedback-ppl
-maybe-configure-stagefeedback-ppl:
-@if ppl-bootstrap
-maybe-configure-stagefeedback-ppl: configure-stagefeedback-ppl
-configure-stagefeedback-ppl:
+.PHONY: configure-stagefeedback-isl maybe-configure-stagefeedback-isl
+maybe-configure-stagefeedback-isl:
+@if isl-bootstrap
+maybe-configure-stagefeedback-isl: configure-stagefeedback-isl
+configure-stagefeedback-isl:
@[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/ppl/Makefile || exit 0; \
+ test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/ppl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ppl ; \
- cd $(HOST_SUBDIR)/ppl || exit 1; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/ppl/ | \
+ *) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ppl"; \
- libsrcdir="$$s/ppl"; \
+ srcdiroption="--srcdir=$${topdir}/isl"; \
+ libsrcdir="$$s/isl"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
- --disable-shared --with-libgmp-prefix=$$r/$(HOST_SUBDIR)/gmp/ --with-libgmpxx-prefix=$$r/$(HOST_SUBDIR)/gmp/
-@endif ppl-bootstrap
+ --disable-shared @extra_isl_gmp_configure_flags@
+@endif isl-bootstrap
-.PHONY: all-ppl maybe-all-ppl
-maybe-all-ppl:
+.PHONY: all-isl maybe-all-isl
+maybe-all-isl:
@if gcc-bootstrap
-all-ppl: stage_current
+all-isl: stage_current
@endif gcc-bootstrap
-@if ppl
-TARGET-ppl=all
-maybe-all-ppl: all-ppl
-all-ppl: configure-ppl
+@if isl
+TARGET-isl=all
+maybe-all-isl: all-isl
+all-isl: configure-isl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- (cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
- $(TARGET-ppl))
-@endif ppl
+ (cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) V=1 \
+ $(TARGET-isl))
+@endif isl
-.PHONY: all-stage1-ppl maybe-all-stage1-ppl
-.PHONY: clean-stage1-ppl maybe-clean-stage1-ppl
-maybe-all-stage1-ppl:
-maybe-clean-stage1-ppl:
-@if ppl-bootstrap
-maybe-all-stage1-ppl: all-stage1-ppl
-all-stage1: all-stage1-ppl
-TARGET-stage1-ppl = $(TARGET-ppl)
-all-stage1-ppl: configure-stage1-ppl
+.PHONY: all-stage1-isl maybe-all-stage1-isl
+.PHONY: clean-stage1-isl maybe-clean-stage1-isl
+maybe-all-stage1-isl:
+maybe-clean-stage1-isl:
+@if isl-bootstrap
+maybe-all-stage1-isl: all-stage1-isl
+all-stage1: all-stage1-isl
+TARGET-stage1-isl = $(TARGET-isl)
+all-stage1-isl: configure-stage1-isl
@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
$(HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" \
CXXFLAGS="$(STAGE1_CXXFLAGS)" \
@@ -13236,41 +13283,42 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGE1_TFLAGS)" \
- $(TARGET-stage1-ppl)
+ $(TARGET-stage1-isl)
-maybe-clean-stage1-ppl: clean-stage1-ppl
-clean-stage1: clean-stage1-ppl
-clean-stage1-ppl:
+maybe-clean-stage1-isl: clean-stage1-isl
+clean-stage1: clean-stage1-isl
+clean-stage1-isl:
@if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stage1-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stage1-isl/Makefile ] || exit 0; \
$(MAKE) stage1-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
-@endif ppl-bootstrap
+ $(STAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: all-stage2-ppl maybe-all-stage2-ppl
-.PHONY: clean-stage2-ppl maybe-clean-stage2-ppl
-maybe-all-stage2-ppl:
-maybe-clean-stage2-ppl:
-@if ppl-bootstrap
-maybe-all-stage2-ppl: all-stage2-ppl
-all-stage2: all-stage2-ppl
-TARGET-stage2-ppl = $(TARGET-ppl)
-all-stage2-ppl: configure-stage2-ppl
+.PHONY: all-stage2-isl maybe-all-stage2-isl
+.PHONY: clean-stage2-isl maybe-clean-stage2-isl
+maybe-all-stage2-isl:
+maybe-clean-stage2-isl:
+@if isl-bootstrap
+maybe-all-stage2-isl: all-stage2-isl
+all-stage2: all-stage2-isl
+TARGET-stage2-isl = $(TARGET-isl)
+all-stage2-isl: configure-stage2-isl
@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE2_CFLAGS)" \
CXXFLAGS="$(STAGE2_CXXFLAGS)" \
@@ -13278,42 +13326,40 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGE2_TFLAGS)" \
- $(TARGET-stage2-ppl)
+ $(TARGET-stage2-isl)
-maybe-clean-stage2-ppl: clean-stage2-ppl
-clean-stage2: clean-stage2-ppl
-clean-stage2-ppl:
+maybe-clean-stage2-isl: clean-stage2-isl
+clean-stage2: clean-stage2-isl
+clean-stage2-isl:
@if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stage2-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stage2-isl/Makefile ] || exit 0; \
$(MAKE) stage2-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
-@endif ppl-bootstrap
+ cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: all-stage3-ppl maybe-all-stage3-ppl
-.PHONY: clean-stage3-ppl maybe-clean-stage3-ppl
-maybe-all-stage3-ppl:
-maybe-clean-stage3-ppl:
-@if ppl-bootstrap
-maybe-all-stage3-ppl: all-stage3-ppl
-all-stage3: all-stage3-ppl
-TARGET-stage3-ppl = $(TARGET-ppl)
-all-stage3-ppl: configure-stage3-ppl
+.PHONY: all-stage3-isl maybe-all-stage3-isl
+.PHONY: clean-stage3-isl maybe-clean-stage3-isl
+maybe-all-stage3-isl:
+maybe-clean-stage3-isl:
+@if isl-bootstrap
+maybe-all-stage3-isl: all-stage3-isl
+all-stage3: all-stage3-isl
+TARGET-stage3-isl = $(TARGET-isl)
+all-stage3-isl: configure-stage3-isl
@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE3_CFLAGS)" \
CXXFLAGS="$(STAGE3_CXXFLAGS)" \
@@ -13321,42 +13367,40 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGE3_TFLAGS)" \
- $(TARGET-stage3-ppl)
+ $(TARGET-stage3-isl)
-maybe-clean-stage3-ppl: clean-stage3-ppl
-clean-stage3: clean-stage3-ppl
-clean-stage3-ppl:
+maybe-clean-stage3-isl: clean-stage3-isl
+clean-stage3: clean-stage3-isl
+clean-stage3-isl:
@if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stage3-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stage3-isl/Makefile ] || exit 0; \
$(MAKE) stage3-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
-@endif ppl-bootstrap
+ cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: all-stage4-ppl maybe-all-stage4-ppl
-.PHONY: clean-stage4-ppl maybe-clean-stage4-ppl
-maybe-all-stage4-ppl:
-maybe-clean-stage4-ppl:
-@if ppl-bootstrap
-maybe-all-stage4-ppl: all-stage4-ppl
-all-stage4: all-stage4-ppl
-TARGET-stage4-ppl = $(TARGET-ppl)
-all-stage4-ppl: configure-stage4-ppl
+.PHONY: all-stage4-isl maybe-all-stage4-isl
+.PHONY: clean-stage4-isl maybe-clean-stage4-isl
+maybe-all-stage4-isl:
+maybe-clean-stage4-isl:
+@if isl-bootstrap
+maybe-all-stage4-isl: all-stage4-isl
+all-stage4: all-stage4-isl
+TARGET-stage4-isl = $(TARGET-isl)
+all-stage4-isl: configure-stage4-isl
@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE4_CFLAGS)" \
CXXFLAGS="$(STAGE4_CXXFLAGS)" \
@@ -13364,42 +13408,40 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGE4_TFLAGS)" \
- $(TARGET-stage4-ppl)
+ $(TARGET-stage4-isl)
-maybe-clean-stage4-ppl: clean-stage4-ppl
-clean-stage4: clean-stage4-ppl
-clean-stage4-ppl:
+maybe-clean-stage4-isl: clean-stage4-isl
+clean-stage4: clean-stage4-isl
+clean-stage4-isl:
@if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stage4-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stage4-isl/Makefile ] || exit 0; \
$(MAKE) stage4-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
-@endif ppl-bootstrap
+ cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: all-stageprofile-ppl maybe-all-stageprofile-ppl
-.PHONY: clean-stageprofile-ppl maybe-clean-stageprofile-ppl
-maybe-all-stageprofile-ppl:
-maybe-clean-stageprofile-ppl:
-@if ppl-bootstrap
-maybe-all-stageprofile-ppl: all-stageprofile-ppl
-all-stageprofile: all-stageprofile-ppl
-TARGET-stageprofile-ppl = $(TARGET-ppl)
-all-stageprofile-ppl: configure-stageprofile-ppl
+.PHONY: all-stageprofile-isl maybe-all-stageprofile-isl
+.PHONY: clean-stageprofile-isl maybe-clean-stageprofile-isl
+maybe-all-stageprofile-isl:
+maybe-clean-stageprofile-isl:
+@if isl-bootstrap
+maybe-all-stageprofile-isl: all-stageprofile-isl
+all-stageprofile: all-stageprofile-isl
+TARGET-stageprofile-isl = $(TARGET-isl)
+all-stageprofile-isl: configure-stageprofile-isl
@[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGEprofile_CFLAGS)" \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
@@ -13407,42 +13449,40 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGEprofile_TFLAGS)" \
- $(TARGET-stageprofile-ppl)
+ $(TARGET-stageprofile-isl)
-maybe-clean-stageprofile-ppl: clean-stageprofile-ppl
-clean-stageprofile: clean-stageprofile-ppl
-clean-stageprofile-ppl:
+maybe-clean-stageprofile-isl: clean-stageprofile-isl
+clean-stageprofile: clean-stageprofile-isl
+clean-stageprofile-isl:
@if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stageprofile-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stageprofile-isl/Makefile ] || exit 0; \
$(MAKE) stageprofile-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
-@endif ppl-bootstrap
+ cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: all-stagefeedback-ppl maybe-all-stagefeedback-ppl
-.PHONY: clean-stagefeedback-ppl maybe-clean-stagefeedback-ppl
-maybe-all-stagefeedback-ppl:
-maybe-clean-stagefeedback-ppl:
-@if ppl-bootstrap
-maybe-all-stagefeedback-ppl: all-stagefeedback-ppl
-all-stagefeedback: all-stagefeedback-ppl
-TARGET-stagefeedback-ppl = $(TARGET-ppl)
-all-stagefeedback-ppl: configure-stagefeedback-ppl
+.PHONY: all-stagefeedback-isl maybe-all-stagefeedback-isl
+.PHONY: clean-stagefeedback-isl maybe-clean-stagefeedback-isl
+maybe-all-stagefeedback-isl:
+maybe-clean-stagefeedback-isl:
+@if isl-bootstrap
+maybe-all-stagefeedback-isl: all-stagefeedback-isl
+all-stagefeedback: all-stagefeedback-isl
+TARGET-stagefeedback-isl = $(TARGET-isl)
+all-stagefeedback-isl: configure-stagefeedback-isl
@[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
- cd $(HOST_SUBDIR)/ppl && \
+ cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGEfeedback_CFLAGS)" \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
@@ -13450,80 +13490,78 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 \
TFLAGS="$(STAGEfeedback_TFLAGS)" \
- $(TARGET-stagefeedback-ppl)
+ $(TARGET-stagefeedback-isl)
-maybe-clean-stagefeedback-ppl: clean-stagefeedback-ppl
-clean-stagefeedback: clean-stagefeedback-ppl
-clean-stagefeedback-ppl:
+maybe-clean-stagefeedback-isl: clean-stagefeedback-isl
+clean-stagefeedback: clean-stagefeedback-isl
+clean-stagefeedback-isl:
@if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/isl/Makefile ] || exit 0; \
else \
- [ -f $(HOST_SUBDIR)/stagefeedback-ppl/Makefile ] || exit 0; \
+ [ -f $(HOST_SUBDIR)/stagefeedback-isl/Makefile ] || exit 0; \
$(MAKE) stagefeedback-start; \
fi; \
- cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
-@endif ppl-bootstrap
+ cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) V=1 clean
+@endif isl-bootstrap
-.PHONY: check-ppl maybe-check-ppl
-maybe-check-ppl:
-@if ppl
-maybe-check-ppl: check-ppl
+.PHONY: check-isl maybe-check-isl
+maybe-check-isl:
+@if isl
+maybe-check-isl: check-isl
-check-ppl:
+check-isl:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- (cd $(HOST_SUBDIR)/ppl && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ (cd $(HOST_SUBDIR)/isl && \
+ $(MAKE) $(FLAGS_TO_PASS) V=1 check)
-@endif ppl
+@endif isl
-.PHONY: install-ppl maybe-install-ppl
-maybe-install-ppl:
-@if ppl
-maybe-install-ppl: install-ppl
+.PHONY: install-isl maybe-install-isl
+maybe-install-isl:
+@if isl
+maybe-install-isl: install-isl
-install-ppl:
+install-isl:
-@endif ppl
+@endif isl
-.PHONY: install-strip-ppl maybe-install-strip-ppl
-maybe-install-strip-ppl:
-@if ppl
-maybe-install-strip-ppl: install-strip-ppl
+.PHONY: install-strip-isl maybe-install-strip-isl
+maybe-install-strip-isl:
+@if isl
+maybe-install-strip-isl: install-strip-isl
-install-strip-ppl:
+install-strip-isl:
-@endif ppl
+@endif isl
# Other targets (info, dvi, pdf, etc.)
-.PHONY: maybe-info-ppl info-ppl
-maybe-info-ppl:
-@if ppl
-maybe-info-ppl: info-ppl
+.PHONY: maybe-info-isl info-isl
+maybe-info-isl:
+@if isl
+maybe-info-isl: info-isl
-info-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+info-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing info in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13531,24 +13569,24 @@
info) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-dvi-ppl dvi-ppl
-maybe-dvi-ppl:
-@if ppl
-maybe-dvi-ppl: dvi-ppl
+.PHONY: maybe-dvi-isl dvi-isl
+maybe-dvi-isl:
+@if isl
+maybe-dvi-isl: dvi-isl
-dvi-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+dvi-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing dvi in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13556,24 +13594,24 @@
dvi) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-pdf-ppl pdf-ppl
-maybe-pdf-ppl:
-@if ppl
-maybe-pdf-ppl: pdf-ppl
+.PHONY: maybe-pdf-isl pdf-isl
+maybe-pdf-isl:
+@if isl
+maybe-pdf-isl: pdf-isl
-pdf-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+pdf-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing pdf in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13581,24 +13619,24 @@
pdf) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-html-ppl html-ppl
-maybe-html-ppl:
-@if ppl
-maybe-html-ppl: html-ppl
+.PHONY: maybe-html-isl html-isl
+maybe-html-isl:
+@if isl
+maybe-html-isl: html-isl
-html-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+html-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing html in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13606,24 +13644,24 @@
html) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-TAGS-ppl TAGS-ppl
-maybe-TAGS-ppl:
-@if ppl
-maybe-TAGS-ppl: TAGS-ppl
+.PHONY: maybe-TAGS-isl TAGS-isl
+maybe-TAGS-isl:
+@if isl
+maybe-TAGS-isl: TAGS-isl
-TAGS-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+TAGS-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing TAGS in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13631,25 +13669,25 @@
TAGS) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-install-info-ppl install-info-ppl
-maybe-install-info-ppl:
-@if ppl
-maybe-install-info-ppl: install-info-ppl
+.PHONY: maybe-install-info-isl install-info-isl
+maybe-install-info-isl:
+@if isl
+maybe-install-info-isl: install-info-isl
-install-info-ppl: \
- configure-ppl \
- info-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+install-info-isl: \
+ configure-isl \
+ info-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing install-info in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13657,25 +13695,25 @@
install-info) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-install-pdf-ppl install-pdf-ppl
-maybe-install-pdf-ppl:
-@if ppl
-maybe-install-pdf-ppl: install-pdf-ppl
+.PHONY: maybe-install-pdf-isl install-pdf-isl
+maybe-install-pdf-isl:
+@if isl
+maybe-install-pdf-isl: install-pdf-isl
-install-pdf-ppl: \
- configure-ppl \
- pdf-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+install-pdf-isl: \
+ configure-isl \
+ pdf-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing install-pdf in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13683,25 +13721,25 @@
install-pdf) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-install-html-ppl install-html-ppl
-maybe-install-html-ppl:
-@if ppl
-maybe-install-html-ppl: install-html-ppl
+.PHONY: maybe-install-html-isl install-html-isl
+maybe-install-html-isl:
+@if isl
+maybe-install-html-isl: install-html-isl
-install-html-ppl: \
- configure-ppl \
- html-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+install-html-isl: \
+ configure-isl \
+ html-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing install-html in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13709,24 +13747,24 @@
install-html) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-installcheck-ppl installcheck-ppl
-maybe-installcheck-ppl:
-@if ppl
-maybe-installcheck-ppl: installcheck-ppl
+.PHONY: maybe-installcheck-isl installcheck-isl
+maybe-installcheck-isl:
+@if isl
+maybe-installcheck-isl: installcheck-isl
-installcheck-ppl: \
- configure-ppl
- @[ -f ./ppl/Makefile ] || exit 0; \
+installcheck-isl: \
+ configure-isl
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing installcheck in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13734,23 +13772,23 @@
installcheck) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-mostlyclean-ppl mostlyclean-ppl
-maybe-mostlyclean-ppl:
-@if ppl
-maybe-mostlyclean-ppl: mostlyclean-ppl
+.PHONY: maybe-mostlyclean-isl mostlyclean-isl
+maybe-mostlyclean-isl:
+@if isl
+maybe-mostlyclean-isl: mostlyclean-isl
-mostlyclean-ppl:
- @[ -f ./ppl/Makefile ] || exit 0; \
+mostlyclean-isl:
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing mostlyclean in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13758,23 +13796,23 @@
mostlyclean) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-clean-ppl clean-ppl
-maybe-clean-ppl:
-@if ppl
-maybe-clean-ppl: clean-ppl
+.PHONY: maybe-clean-isl clean-isl
+maybe-clean-isl:
+@if isl
+maybe-clean-isl: clean-isl
-clean-ppl:
- @[ -f ./ppl/Makefile ] || exit 0; \
+clean-isl:
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing clean in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13782,23 +13820,23 @@
clean) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-distclean-ppl distclean-ppl
-maybe-distclean-ppl:
-@if ppl
-maybe-distclean-ppl: distclean-ppl
+.PHONY: maybe-distclean-isl distclean-isl
+maybe-distclean-isl:
+@if isl
+maybe-distclean-isl: distclean-isl
-distclean-ppl:
- @[ -f ./ppl/Makefile ] || exit 0; \
+distclean-isl:
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing distclean in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13806,23 +13844,23 @@
distclean) \
|| exit 1
-@endif ppl
+@endif isl
-.PHONY: maybe-maintainer-clean-ppl maintainer-clean-ppl
-maybe-maintainer-clean-ppl:
-@if ppl
-maybe-maintainer-clean-ppl: maintainer-clean-ppl
+.PHONY: maybe-maintainer-clean-isl maintainer-clean-isl
+maybe-maintainer-clean-isl:
+@if isl
+maybe-maintainer-clean-isl: maintainer-clean-isl
-maintainer-clean-ppl:
- @[ -f ./ppl/Makefile ] || exit 0; \
+maintainer-clean-isl:
+ @[ -f ./isl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in ppl" ; \
- (cd $(HOST_SUBDIR)/ppl && \
+ echo "Doing maintainer-clean in isl" ; \
+ (cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -13830,7 +13868,7 @@
maintainer-clean) \
|| exit 1
-@endif ppl
+@endif isl
@@ -13846,7 +13884,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- $(HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring in $(HOST_SUBDIR)/cloog; \
cd "$(HOST_SUBDIR)/cloog" || exit 1; \
case $(srcdir) in \
@@ -13858,7 +13896,7 @@
libsrcdir="$$s/cloog"; \
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl \
+ --target=${target_alias} $${srcdiroption} --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system \
|| exit 1
@endif cloog
@@ -13878,7 +13916,7 @@
$(HOST_EXPORTS) \
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -13893,7 +13931,7 @@
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
--target=${target_alias} $${srcdiroption} \
$(STAGE1_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
.PHONY: configure-stage2-cloog maybe-configure-stage2-cloog
@@ -13911,7 +13949,7 @@
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -13927,7 +13965,7 @@
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
.PHONY: configure-stage3-cloog maybe-configure-stage3-cloog
@@ -13945,7 +13983,7 @@
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -13961,7 +13999,7 @@
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
.PHONY: configure-stage4-cloog maybe-configure-stage4-cloog
@@ -13979,7 +14017,7 @@
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -13995,7 +14033,7 @@
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
.PHONY: configure-stageprofile-cloog maybe-configure-stageprofile-cloog
@@ -14013,7 +14051,7 @@
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -14029,7 +14067,7 @@
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
.PHONY: configure-stagefeedback-cloog maybe-configure-stagefeedback-cloog
@@ -14047,7 +14085,7 @@
$(POSTSTAGE1_HOST_EXPORTS) \
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/cloog ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
cd $(HOST_SUBDIR)/cloog || exit 1; \
@@ -14063,7 +14101,7 @@
--target=${target_alias} $${srcdiroption} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp --with-ppl
+ --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
@endif cloog-bootstrap
@@ -14081,9 +14119,9 @@
all-cloog: configure-cloog
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
(cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
$(TARGET-cloog))
@endif cloog
@@ -14102,7 +14140,7 @@
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
- $(HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" \
@@ -14111,7 +14149,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-cloog)
@@ -14126,7 +14165,7 @@
fi; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14144,7 +14183,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
$(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE2_CFLAGS)" \
@@ -14153,7 +14192,7 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGE2_TFLAGS)" \
$(TARGET-stage2-cloog)
@@ -14167,9 +14206,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14187,7 +14224,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
$(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE3_CFLAGS)" \
@@ -14196,7 +14233,7 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGE3_TFLAGS)" \
$(TARGET-stage3-cloog)
@@ -14210,9 +14247,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14230,7 +14265,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
$(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGE4_CFLAGS)" \
@@ -14239,7 +14274,7 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGE4_TFLAGS)" \
$(TARGET-stage4-cloog)
@@ -14253,9 +14288,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14273,7 +14306,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
$(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGEprofile_CFLAGS)" \
@@ -14282,7 +14315,7 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGEprofile_TFLAGS)" \
$(TARGET-stageprofile-cloog)
@@ -14296,9 +14329,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14316,7 +14347,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
$(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}"; export CPPFLAGS; LDFLAGS="$$LDFLAGS ${HOST_PPLLIBS}"; export LDFLAGS; \
+ $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
cd $(HOST_SUBDIR)/cloog && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="$(STAGEfeedback_CFLAGS)" \
@@ -14325,7 +14356,7 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
TFLAGS="$(STAGEfeedback_TFLAGS)" \
$(TARGET-stagefeedback-cloog)
@@ -14339,9 +14370,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
@endif cloog-bootstrap
@@ -14359,7 +14388,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(FLAGS_TO_PASS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS" check)
+ $(MAKE) $(FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 check)
@endif cloog
@@ -14394,7 +14423,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing info in cloog" ; \
@@ -14419,7 +14448,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing dvi in cloog" ; \
@@ -14444,7 +14473,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing pdf in cloog" ; \
@@ -14469,7 +14498,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing html in cloog" ; \
@@ -14494,7 +14523,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing TAGS in cloog" ; \
@@ -14520,7 +14549,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-info in cloog" ; \
@@ -14546,7 +14575,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-pdf in cloog" ; \
@@ -14572,7 +14601,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing install-html in cloog" ; \
@@ -14597,7 +14626,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing installcheck in cloog" ; \
@@ -14621,7 +14650,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in cloog" ; \
@@ -14645,7 +14674,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in cloog" ; \
@@ -14669,7 +14698,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing distclean in cloog" ; \
@@ -14693,7 +14722,7 @@
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="${CPPFLAGS} ${HOST_PPLINC}" LDFLAGS="$$LDFLAGS"; do \
+ for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing maintainer-clean in cloog" ; \
@@ -14958,7 +14987,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libelf))
@endif libelf
@@ -14986,7 +15015,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-libelf)
@@ -15001,7 +15031,7 @@
fi; \
cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15042,9 +15072,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15085,9 +15113,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15128,9 +15154,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15171,9 +15195,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15214,9 +15236,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libelf-bootstrap
@@ -15827,7 +15847,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gold))
@endif gold
@@ -15855,7 +15875,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-gold)
@@ -15870,7 +15891,7 @@
fi; \
cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -15911,9 +15932,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -15954,9 +15973,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -15997,9 +16014,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -16040,9 +16055,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -16083,9 +16096,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gold-bootstrap
@@ -16512,7 +16523,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gprof && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gprof))
@endif gprof
@@ -17148,7 +17159,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-intl))
@endif intl
@@ -17176,7 +17187,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-intl)
@@ -17191,7 +17203,7 @@
fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17232,9 +17244,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17275,9 +17285,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17318,9 +17326,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17361,9 +17367,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17404,9 +17408,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif intl-bootstrap
@@ -17833,7 +17835,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tcl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-tcl))
@endif tcl
@@ -18258,7 +18260,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/itcl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-itcl))
@endif itcl
@@ -18894,7 +18896,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-ld))
@endif ld
@@ -18922,7 +18924,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-ld)
@@ -18937,7 +18940,7 @@
fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -18978,9 +18981,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -19021,9 +19022,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -19064,9 +19063,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -19107,9 +19104,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -19150,9 +19145,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif ld-bootstrap
@@ -19532,6 +19525,878 @@
+.PHONY: configure-libbacktrace maybe-configure-libbacktrace
+maybe-configure-libbacktrace:
+@if gcc-bootstrap
+configure-libbacktrace: stage_current
+@endif gcc-bootstrap
+@if libbacktrace
+maybe-configure-libbacktrace: configure-libbacktrace
+configure-libbacktrace:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libbacktrace; \
+ cd "$(HOST_SUBDIR)/libbacktrace" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ || exit 1
+@endif libbacktrace
+
+
+
+.PHONY: configure-stage1-libbacktrace maybe-configure-stage1-libbacktrace
+maybe-configure-stage1-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stage1-libbacktrace: configure-stage1-libbacktrace
+configure-stage1-libbacktrace:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+.PHONY: configure-stage2-libbacktrace maybe-configure-stage2-libbacktrace
+maybe-configure-stage2-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stage2-libbacktrace: configure-stage2-libbacktrace
+configure-stage2-libbacktrace:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+.PHONY: configure-stage3-libbacktrace maybe-configure-stage3-libbacktrace
+maybe-configure-stage3-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stage3-libbacktrace: configure-stage3-libbacktrace
+configure-stage3-libbacktrace:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+.PHONY: configure-stage4-libbacktrace maybe-configure-stage4-libbacktrace
+maybe-configure-stage4-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stage4-libbacktrace: configure-stage4-libbacktrace
+configure-stage4-libbacktrace:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+.PHONY: configure-stageprofile-libbacktrace maybe-configure-stageprofile-libbacktrace
+maybe-configure-stageprofile-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stageprofile-libbacktrace: configure-stageprofile-libbacktrace
+configure-stageprofile-libbacktrace:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+.PHONY: configure-stagefeedback-libbacktrace maybe-configure-stagefeedback-libbacktrace
+maybe-configure-stagefeedback-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-configure-stagefeedback-libbacktrace: configure-stagefeedback-libbacktrace
+configure-stagefeedback-libbacktrace:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif libbacktrace-bootstrap
+
+
+
+
+
+.PHONY: all-libbacktrace maybe-all-libbacktrace
+maybe-all-libbacktrace:
+@if gcc-bootstrap
+all-libbacktrace: stage_current
+@endif gcc-bootstrap
+@if libbacktrace
+TARGET-libbacktrace=all
+maybe-all-libbacktrace: all-libbacktrace
+all-libbacktrace: configure-libbacktrace
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(TARGET-libbacktrace))
+@endif libbacktrace
+
+
+
+.PHONY: all-stage1-libbacktrace maybe-all-stage1-libbacktrace
+.PHONY: clean-stage1-libbacktrace maybe-clean-stage1-libbacktrace
+maybe-all-stage1-libbacktrace:
+maybe-clean-stage1-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stage1-libbacktrace: all-stage1-libbacktrace
+all-stage1: all-stage1-libbacktrace
+TARGET-stage1-libbacktrace = $(TARGET-libbacktrace)
+all-stage1-libbacktrace: configure-stage1-libbacktrace
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-libbacktrace)
+
+maybe-clean-stage1-libbacktrace: clean-stage1-libbacktrace
+clean-stage1: clean-stage1-libbacktrace
+clean-stage1-libbacktrace:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+.PHONY: all-stage2-libbacktrace maybe-all-stage2-libbacktrace
+.PHONY: clean-stage2-libbacktrace maybe-clean-stage2-libbacktrace
+maybe-all-stage2-libbacktrace:
+maybe-clean-stage2-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stage2-libbacktrace: all-stage2-libbacktrace
+all-stage2: all-stage2-libbacktrace
+TARGET-stage2-libbacktrace = $(TARGET-libbacktrace)
+all-stage2-libbacktrace: configure-stage2-libbacktrace
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-libbacktrace)
+
+maybe-clean-stage2-libbacktrace: clean-stage2-libbacktrace
+clean-stage2: clean-stage2-libbacktrace
+clean-stage2-libbacktrace:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+.PHONY: all-stage3-libbacktrace maybe-all-stage3-libbacktrace
+.PHONY: clean-stage3-libbacktrace maybe-clean-stage3-libbacktrace
+maybe-all-stage3-libbacktrace:
+maybe-clean-stage3-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stage3-libbacktrace: all-stage3-libbacktrace
+all-stage3: all-stage3-libbacktrace
+TARGET-stage3-libbacktrace = $(TARGET-libbacktrace)
+all-stage3-libbacktrace: configure-stage3-libbacktrace
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-libbacktrace)
+
+maybe-clean-stage3-libbacktrace: clean-stage3-libbacktrace
+clean-stage3: clean-stage3-libbacktrace
+clean-stage3-libbacktrace:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+.PHONY: all-stage4-libbacktrace maybe-all-stage4-libbacktrace
+.PHONY: clean-stage4-libbacktrace maybe-clean-stage4-libbacktrace
+maybe-all-stage4-libbacktrace:
+maybe-clean-stage4-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stage4-libbacktrace: all-stage4-libbacktrace
+all-stage4: all-stage4-libbacktrace
+TARGET-stage4-libbacktrace = $(TARGET-libbacktrace)
+all-stage4-libbacktrace: configure-stage4-libbacktrace
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-libbacktrace)
+
+maybe-clean-stage4-libbacktrace: clean-stage4-libbacktrace
+clean-stage4: clean-stage4-libbacktrace
+clean-stage4-libbacktrace:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+.PHONY: all-stageprofile-libbacktrace maybe-all-stageprofile-libbacktrace
+.PHONY: clean-stageprofile-libbacktrace maybe-clean-stageprofile-libbacktrace
+maybe-all-stageprofile-libbacktrace:
+maybe-clean-stageprofile-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stageprofile-libbacktrace: all-stageprofile-libbacktrace
+all-stageprofile: all-stageprofile-libbacktrace
+TARGET-stageprofile-libbacktrace = $(TARGET-libbacktrace)
+all-stageprofile-libbacktrace: configure-stageprofile-libbacktrace
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)" \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-libbacktrace)
+
+maybe-clean-stageprofile-libbacktrace: clean-stageprofile-libbacktrace
+clean-stageprofile: clean-stageprofile-libbacktrace
+clean-stageprofile-libbacktrace:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+.PHONY: all-stagefeedback-libbacktrace maybe-all-stagefeedback-libbacktrace
+.PHONY: clean-stagefeedback-libbacktrace maybe-clean-stagefeedback-libbacktrace
+maybe-all-stagefeedback-libbacktrace:
+maybe-clean-stagefeedback-libbacktrace:
+@if libbacktrace-bootstrap
+maybe-all-stagefeedback-libbacktrace: all-stagefeedback-libbacktrace
+all-stagefeedback: all-stagefeedback-libbacktrace
+TARGET-stagefeedback-libbacktrace = $(TARGET-libbacktrace)
+all-stagefeedback-libbacktrace: configure-stagefeedback-libbacktrace
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-libbacktrace)
+
+maybe-clean-stagefeedback-libbacktrace: clean-stagefeedback-libbacktrace
+clean-stagefeedback: clean-stagefeedback-libbacktrace
+clean-stagefeedback-libbacktrace:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libbacktrace/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libbacktrace-bootstrap
+
+
+
+
+
+.PHONY: check-libbacktrace maybe-check-libbacktrace
+maybe-check-libbacktrace:
+@if libbacktrace
+maybe-check-libbacktrace: check-libbacktrace
+
+check-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libbacktrace
+
+.PHONY: install-libbacktrace maybe-install-libbacktrace
+maybe-install-libbacktrace:
+@if libbacktrace
+maybe-install-libbacktrace: install-libbacktrace
+
+install-libbacktrace: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libbacktrace
+
+.PHONY: install-strip-libbacktrace maybe-install-strip-libbacktrace
+maybe-install-strip-libbacktrace:
+@if libbacktrace
+maybe-install-strip-libbacktrace: install-strip-libbacktrace
+
+install-strip-libbacktrace: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(FLAGS_TO_PASS) install-strip)
+
+@endif libbacktrace
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libbacktrace info-libbacktrace
+maybe-info-libbacktrace:
+@if libbacktrace
+maybe-info-libbacktrace: info-libbacktrace
+
+info-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-dvi-libbacktrace dvi-libbacktrace
+maybe-dvi-libbacktrace:
+@if libbacktrace
+maybe-dvi-libbacktrace: dvi-libbacktrace
+
+dvi-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-pdf-libbacktrace pdf-libbacktrace
+maybe-pdf-libbacktrace:
+@if libbacktrace
+maybe-pdf-libbacktrace: pdf-libbacktrace
+
+pdf-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-html-libbacktrace html-libbacktrace
+maybe-html-libbacktrace:
+@if libbacktrace
+maybe-html-libbacktrace: html-libbacktrace
+
+html-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-TAGS-libbacktrace TAGS-libbacktrace
+maybe-TAGS-libbacktrace:
+@if libbacktrace
+maybe-TAGS-libbacktrace: TAGS-libbacktrace
+
+TAGS-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-install-info-libbacktrace install-info-libbacktrace
+maybe-install-info-libbacktrace:
+@if libbacktrace
+maybe-install-info-libbacktrace: install-info-libbacktrace
+
+install-info-libbacktrace: \
+ configure-libbacktrace \
+ info-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-install-pdf-libbacktrace install-pdf-libbacktrace
+maybe-install-pdf-libbacktrace:
+@if libbacktrace
+maybe-install-pdf-libbacktrace: install-pdf-libbacktrace
+
+install-pdf-libbacktrace: \
+ configure-libbacktrace \
+ pdf-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-install-html-libbacktrace install-html-libbacktrace
+maybe-install-html-libbacktrace:
+@if libbacktrace
+maybe-install-html-libbacktrace: install-html-libbacktrace
+
+install-html-libbacktrace: \
+ configure-libbacktrace \
+ html-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-installcheck-libbacktrace installcheck-libbacktrace
+maybe-installcheck-libbacktrace:
+@if libbacktrace
+maybe-installcheck-libbacktrace: installcheck-libbacktrace
+
+installcheck-libbacktrace: \
+ configure-libbacktrace
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-mostlyclean-libbacktrace mostlyclean-libbacktrace
+maybe-mostlyclean-libbacktrace:
+@if libbacktrace
+maybe-mostlyclean-libbacktrace: mostlyclean-libbacktrace
+
+mostlyclean-libbacktrace:
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-clean-libbacktrace clean-libbacktrace
+maybe-clean-libbacktrace:
+@if libbacktrace
+maybe-clean-libbacktrace: clean-libbacktrace
+
+clean-libbacktrace:
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-distclean-libbacktrace distclean-libbacktrace
+maybe-distclean-libbacktrace:
+@if libbacktrace
+maybe-distclean-libbacktrace: distclean-libbacktrace
+
+distclean-libbacktrace:
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+.PHONY: maybe-maintainer-clean-libbacktrace maintainer-clean-libbacktrace
+maybe-maintainer-clean-libbacktrace:
+@if libbacktrace
+maybe-maintainer-clean-libbacktrace: maintainer-clean-libbacktrace
+
+maintainer-clean-libbacktrace:
+ @[ -f ./libbacktrace/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; 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 libbacktrace" ; \
+ (cd $(HOST_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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 libbacktrace
+
+
+
.PHONY: configure-libcpp maybe-configure-libcpp
maybe-configure-libcpp:
@if gcc-bootstrap
@@ -19775,7 +20640,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libcpp))
@endif libcpp
@@ -19803,7 +20668,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-libcpp)
@@ -19818,7 +20684,7 @@
fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -19859,9 +20725,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -19902,9 +20766,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -19945,9 +20807,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -19988,9 +20848,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -20031,9 +20889,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libcpp-bootstrap
@@ -20656,7 +21512,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libdecnumber))
@endif libdecnumber
@@ -20684,7 +21540,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-libdecnumber)
@@ -20699,7 +21556,7 @@
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -20740,9 +21597,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -20783,9 +21638,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -20826,9 +21679,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -20869,9 +21720,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -20912,9 +21761,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libdecnumber-bootstrap
@@ -21341,7 +22188,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libgui && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libgui))
@endif libgui
@@ -21983,7 +22830,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libiberty))
@endif libiberty
@@ -22011,7 +22858,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-libiberty)
@@ -22026,7 +22874,7 @@
fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22067,9 +22915,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22110,9 +22956,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22153,9 +22997,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22196,9 +23038,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22239,9 +23079,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif libiberty-bootstrap
@@ -22668,7 +23506,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiconv && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libiconv))
@endif libiconv
@@ -23045,7 +23883,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/m4 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-m4))
@endif m4
@@ -23485,7 +24323,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/readline && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-readline))
@endif readline
@@ -23925,7 +24763,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sid && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-sid))
@endif sid
@@ -24365,7 +25203,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sim && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-sim))
@endif sim
@@ -24805,7 +25643,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/texinfo && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-texinfo))
@endif texinfo
@@ -25429,7 +26267,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-zlib))
@endif zlib
@@ -25457,7 +26295,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-zlib)
@@ -25472,7 +26311,7 @@
fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -25513,9 +26352,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -25556,9 +26393,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -25599,9 +26434,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -25642,9 +26475,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -25685,9 +26516,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif zlib-bootstrap
@@ -26096,7 +26925,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gdb && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gdb))
@endif gdb
@@ -26536,7 +27365,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/expect && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-expect))
@endif expect
@@ -26976,7 +27805,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/guile && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-guile))
@endif guile
@@ -27416,7 +28245,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tk && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-tk))
@endif tk
@@ -27856,7 +28685,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libtermcap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-libtermcap))
@endif libtermcap
@@ -28230,7 +29059,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/utils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-utils))
@endif utils
@@ -28664,7 +29493,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gnattools && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gnattools))
@endif gnattools
@@ -29306,7 +30135,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-lto-plugin))
@endif lto-plugin
@@ -29334,7 +30163,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-lto-plugin)
@@ -29349,7 +30179,7 @@
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- clean
+ $(STAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -29390,9 +30220,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -29433,9 +30261,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -29476,9 +30302,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -29519,9 +30343,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -29562,9 +30384,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif lto-plugin-bootstrap
@@ -30280,7 +31100,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
$(TARGET-target-libstdc++-v3))
@endif target-libstdc++-v3
@@ -30308,7 +31128,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-target-libstdc++-v3)
@@ -30323,7 +31144,7 @@
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
$(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- clean
+ clean
@endif target-libstdc++-v3-bootstrap
@@ -30364,9 +31185,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
@endif target-libstdc++-v3-bootstrap
@@ -30407,9 +31226,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
@endif target-libstdc++-v3-bootstrap
@@ -30450,9 +31267,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
@endif target-libstdc++-v3-bootstrap
@@ -30493,9 +31308,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
@endif target-libstdc++-v3-bootstrap
@@ -30536,9 +31349,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
@endif target-libstdc++-v3-bootstrap
@@ -30995,7 +31806,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libmudflap))
@endif target-libmudflap
@@ -31391,6 +32202,1954 @@
+.PHONY: configure-target-libsanitizer maybe-configure-target-libsanitizer
+maybe-configure-target-libsanitizer:
+@if gcc-bootstrap
+configure-target-libsanitizer: stage_current
+@endif gcc-bootstrap
+@if target-libsanitizer
+maybe-configure-target-libsanitizer: configure-target-libsanitizer
+configure-target-libsanitizer:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libsanitizer; \
+ cd "$(TARGET_SUBDIR)/libsanitizer" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ 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-libsanitizer
+
+
+
+.PHONY: configure-stage1-target-libsanitizer maybe-configure-stage1-target-libsanitizer
+maybe-configure-stage1-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stage1-target-libsanitizer: configure-stage1-target-libsanitizer
+configure-stage1-target-libsanitizer:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+.PHONY: configure-stage2-target-libsanitizer maybe-configure-stage2-target-libsanitizer
+maybe-configure-stage2-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stage2-target-libsanitizer: configure-stage2-target-libsanitizer
+configure-stage2-target-libsanitizer:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+.PHONY: configure-stage3-target-libsanitizer maybe-configure-stage3-target-libsanitizer
+maybe-configure-stage3-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stage3-target-libsanitizer: configure-stage3-target-libsanitizer
+configure-stage3-target-libsanitizer:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+.PHONY: configure-stage4-target-libsanitizer maybe-configure-stage4-target-libsanitizer
+maybe-configure-stage4-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stage4-target-libsanitizer: configure-stage4-target-libsanitizer
+configure-stage4-target-libsanitizer:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+.PHONY: configure-stageprofile-target-libsanitizer maybe-configure-stageprofile-target-libsanitizer
+maybe-configure-stageprofile-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stageprofile-target-libsanitizer: configure-stageprofile-target-libsanitizer
+configure-stageprofile-target-libsanitizer:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+.PHONY: configure-stagefeedback-target-libsanitizer maybe-configure-stagefeedback-target-libsanitizer
+maybe-configure-stagefeedback-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-configure-stagefeedback-target-libsanitizer: configure-stagefeedback-target-libsanitizer
+configure-stagefeedback-target-libsanitizer:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ echo "Checking multilib configuration for libsanitizer..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libsanitizer/Makefile; \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
+ libsrcdir="$$s/libsanitizer"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif target-libsanitizer-bootstrap
+
+
+
+
+
+.PHONY: all-target-libsanitizer maybe-all-target-libsanitizer
+maybe-all-target-libsanitizer:
+@if gcc-bootstrap
+all-target-libsanitizer: stage_current
+@endif gcc-bootstrap
+@if target-libsanitizer
+TARGET-target-libsanitizer=all
+maybe-all-target-libsanitizer: all-target-libsanitizer
+all-target-libsanitizer: configure-target-libsanitizer
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-target-libsanitizer))
+@endif target-libsanitizer
+
+
+
+.PHONY: all-stage1-target-libsanitizer maybe-all-stage1-target-libsanitizer
+.PHONY: clean-stage1-target-libsanitizer maybe-clean-stage1-target-libsanitizer
+maybe-all-stage1-target-libsanitizer:
+maybe-clean-stage1-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stage1-target-libsanitizer: all-stage1-target-libsanitizer
+all-stage1: all-stage1-target-libsanitizer
+TARGET-stage1-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stage1-target-libsanitizer: configure-stage1-target-libsanitizer
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-target-libsanitizer)
+
+maybe-clean-stage1-target-libsanitizer: clean-stage1-target-libsanitizer
+clean-stage1: clean-stage1-target-libsanitizer
+clean-stage1-target-libsanitizer:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage1-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ clean
+@endif target-libsanitizer-bootstrap
+
+
+.PHONY: all-stage2-target-libsanitizer maybe-all-stage2-target-libsanitizer
+.PHONY: clean-stage2-target-libsanitizer maybe-clean-stage2-target-libsanitizer
+maybe-all-stage2-target-libsanitizer:
+maybe-clean-stage2-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stage2-target-libsanitizer: all-stage2-target-libsanitizer
+all-stage2: all-stage2-target-libsanitizer
+TARGET-stage2-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stage2-target-libsanitizer: configure-stage2-target-libsanitizer
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-target-libsanitizer)
+
+maybe-clean-stage2-target-libsanitizer: clean-stage2-target-libsanitizer
+clean-stage2: clean-stage2-target-libsanitizer
+clean-stage2-target-libsanitizer:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage2-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libsanitizer-bootstrap
+
+
+.PHONY: all-stage3-target-libsanitizer maybe-all-stage3-target-libsanitizer
+.PHONY: clean-stage3-target-libsanitizer maybe-clean-stage3-target-libsanitizer
+maybe-all-stage3-target-libsanitizer:
+maybe-clean-stage3-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stage3-target-libsanitizer: all-stage3-target-libsanitizer
+all-stage3: all-stage3-target-libsanitizer
+TARGET-stage3-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stage3-target-libsanitizer: configure-stage3-target-libsanitizer
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-target-libsanitizer)
+
+maybe-clean-stage3-target-libsanitizer: clean-stage3-target-libsanitizer
+clean-stage3: clean-stage3-target-libsanitizer
+clean-stage3-target-libsanitizer:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage3-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libsanitizer-bootstrap
+
+
+.PHONY: all-stage4-target-libsanitizer maybe-all-stage4-target-libsanitizer
+.PHONY: clean-stage4-target-libsanitizer maybe-clean-stage4-target-libsanitizer
+maybe-all-stage4-target-libsanitizer:
+maybe-clean-stage4-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stage4-target-libsanitizer: all-stage4-target-libsanitizer
+all-stage4: all-stage4-target-libsanitizer
+TARGET-stage4-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stage4-target-libsanitizer: configure-stage4-target-libsanitizer
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-target-libsanitizer)
+
+maybe-clean-stage4-target-libsanitizer: clean-stage4-target-libsanitizer
+clean-stage4: clean-stage4-target-libsanitizer
+clean-stage4-target-libsanitizer:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage4-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libsanitizer-bootstrap
+
+
+.PHONY: all-stageprofile-target-libsanitizer maybe-all-stageprofile-target-libsanitizer
+.PHONY: clean-stageprofile-target-libsanitizer maybe-clean-stageprofile-target-libsanitizer
+maybe-all-stageprofile-target-libsanitizer:
+maybe-clean-stageprofile-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stageprofile-target-libsanitizer: all-stageprofile-target-libsanitizer
+all-stageprofile: all-stageprofile-target-libsanitizer
+TARGET-stageprofile-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stageprofile-target-libsanitizer: configure-stageprofile-target-libsanitizer
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-target-libsanitizer)
+
+maybe-clean-stageprofile-target-libsanitizer: clean-stageprofile-target-libsanitizer
+clean-stageprofile: clean-stageprofile-target-libsanitizer
+clean-stageprofile-target-libsanitizer:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageprofile-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libsanitizer-bootstrap
+
+
+.PHONY: all-stagefeedback-target-libsanitizer maybe-all-stagefeedback-target-libsanitizer
+.PHONY: clean-stagefeedback-target-libsanitizer maybe-clean-stagefeedback-target-libsanitizer
+maybe-all-stagefeedback-target-libsanitizer:
+maybe-clean-stagefeedback-target-libsanitizer:
+@if target-libsanitizer-bootstrap
+maybe-all-stagefeedback-target-libsanitizer: all-stagefeedback-target-libsanitizer
+all-stagefeedback: all-stagefeedback-target-libsanitizer
+TARGET-stagefeedback-target-libsanitizer = $(TARGET-target-libsanitizer)
+all-stagefeedback-target-libsanitizer: configure-stagefeedback-target-libsanitizer
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-target-libsanitizer)
+
+maybe-clean-stagefeedback-target-libsanitizer: clean-stagefeedback-target-libsanitizer
+clean-stagefeedback: clean-stagefeedback-target-libsanitizer
+clean-stagefeedback-target-libsanitizer:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stagefeedback-libsanitizer/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libsanitizer-bootstrap
+
+
+
+
+
+
+.PHONY: check-target-libsanitizer maybe-check-target-libsanitizer
+maybe-check-target-libsanitizer:
+@if target-libsanitizer
+maybe-check-target-libsanitizer: check-target-libsanitizer
+
+check-target-libsanitizer:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+
+@endif target-libsanitizer
+
+.PHONY: install-target-libsanitizer maybe-install-target-libsanitizer
+maybe-install-target-libsanitizer:
+@if target-libsanitizer
+maybe-install-target-libsanitizer: install-target-libsanitizer
+
+install-target-libsanitizer: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libsanitizer
+
+.PHONY: install-strip-target-libsanitizer maybe-install-strip-target-libsanitizer
+maybe-install-strip-target-libsanitizer:
+@if target-libsanitizer
+maybe-install-strip-target-libsanitizer: install-strip-target-libsanitizer
+
+install-strip-target-libsanitizer: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libsanitizer
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libsanitizer info-target-libsanitizer
+maybe-info-target-libsanitizer:
+@if target-libsanitizer
+maybe-info-target-libsanitizer: info-target-libsanitizer
+
+info-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-dvi-target-libsanitizer dvi-target-libsanitizer
+maybe-dvi-target-libsanitizer:
+@if target-libsanitizer
+maybe-dvi-target-libsanitizer: dvi-target-libsanitizer
+
+dvi-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-pdf-target-libsanitizer pdf-target-libsanitizer
+maybe-pdf-target-libsanitizer:
+@if target-libsanitizer
+maybe-pdf-target-libsanitizer: pdf-target-libsanitizer
+
+pdf-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-html-target-libsanitizer html-target-libsanitizer
+maybe-html-target-libsanitizer:
+@if target-libsanitizer
+maybe-html-target-libsanitizer: html-target-libsanitizer
+
+html-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-TAGS-target-libsanitizer TAGS-target-libsanitizer
+maybe-TAGS-target-libsanitizer:
+@if target-libsanitizer
+maybe-TAGS-target-libsanitizer: TAGS-target-libsanitizer
+
+TAGS-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-install-info-target-libsanitizer install-info-target-libsanitizer
+maybe-install-info-target-libsanitizer:
+@if target-libsanitizer
+maybe-install-info-target-libsanitizer: install-info-target-libsanitizer
+
+install-info-target-libsanitizer: \
+ configure-target-libsanitizer \
+ info-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-install-pdf-target-libsanitizer install-pdf-target-libsanitizer
+maybe-install-pdf-target-libsanitizer:
+@if target-libsanitizer
+maybe-install-pdf-target-libsanitizer: install-pdf-target-libsanitizer
+
+install-pdf-target-libsanitizer: \
+ configure-target-libsanitizer \
+ pdf-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-install-html-target-libsanitizer install-html-target-libsanitizer
+maybe-install-html-target-libsanitizer:
+@if target-libsanitizer
+maybe-install-html-target-libsanitizer: install-html-target-libsanitizer
+
+install-html-target-libsanitizer: \
+ configure-target-libsanitizer \
+ html-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-installcheck-target-libsanitizer installcheck-target-libsanitizer
+maybe-installcheck-target-libsanitizer:
+@if target-libsanitizer
+maybe-installcheck-target-libsanitizer: installcheck-target-libsanitizer
+
+installcheck-target-libsanitizer: \
+ configure-target-libsanitizer
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-mostlyclean-target-libsanitizer mostlyclean-target-libsanitizer
+maybe-mostlyclean-target-libsanitizer:
+@if target-libsanitizer
+maybe-mostlyclean-target-libsanitizer: mostlyclean-target-libsanitizer
+
+mostlyclean-target-libsanitizer:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-clean-target-libsanitizer clean-target-libsanitizer
+maybe-clean-target-libsanitizer:
+@if target-libsanitizer
+maybe-clean-target-libsanitizer: clean-target-libsanitizer
+
+clean-target-libsanitizer:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-distclean-target-libsanitizer distclean-target-libsanitizer
+maybe-distclean-target-libsanitizer:
+@if target-libsanitizer
+maybe-distclean-target-libsanitizer: distclean-target-libsanitizer
+
+distclean-target-libsanitizer:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+.PHONY: maybe-maintainer-clean-target-libsanitizer maintainer-clean-target-libsanitizer
+maybe-maintainer-clean-target-libsanitizer:
+@if target-libsanitizer
+maybe-maintainer-clean-target-libsanitizer: maintainer-clean-target-libsanitizer
+
+maintainer-clean-target-libsanitizer:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libsanitizer && \
+ $(MAKE) $(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-libsanitizer
+
+
+
+
+
+.PHONY: configure-target-libvtv maybe-configure-target-libvtv
+maybe-configure-target-libvtv:
+@if gcc-bootstrap
+configure-target-libvtv: stage_current
+@endif gcc-bootstrap
+@if target-libvtv
+maybe-configure-target-libvtv: configure-target-libvtv
+configure-target-libvtv:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libvtv; \
+ cd "$(TARGET_SUBDIR)/libvtv" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ 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-libvtv
+
+
+
+.PHONY: configure-stage1-target-libvtv maybe-configure-stage1-target-libvtv
+maybe-configure-stage1-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stage1-target-libvtv: configure-stage1-target-libvtv
+configure-stage1-target-libvtv:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+.PHONY: configure-stage2-target-libvtv maybe-configure-stage2-target-libvtv
+maybe-configure-stage2-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stage2-target-libvtv: configure-stage2-target-libvtv
+configure-stage2-target-libvtv:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+.PHONY: configure-stage3-target-libvtv maybe-configure-stage3-target-libvtv
+maybe-configure-stage3-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stage3-target-libvtv: configure-stage3-target-libvtv
+configure-stage3-target-libvtv:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+.PHONY: configure-stage4-target-libvtv maybe-configure-stage4-target-libvtv
+maybe-configure-stage4-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stage4-target-libvtv: configure-stage4-target-libvtv
+configure-stage4-target-libvtv:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+.PHONY: configure-stageprofile-target-libvtv maybe-configure-stageprofile-target-libvtv
+maybe-configure-stageprofile-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stageprofile-target-libvtv: configure-stageprofile-target-libvtv
+configure-stageprofile-target-libvtv:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+.PHONY: configure-stagefeedback-target-libvtv maybe-configure-stagefeedback-target-libvtv
+maybe-configure-stagefeedback-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-configure-stagefeedback-target-libvtv: configure-stagefeedback-target-libvtv
+configure-stagefeedback-target-libvtv:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ echo "Checking multilib configuration for libvtv..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libvtv/Makefile; \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ cd $(TARGET_SUBDIR)/libvtv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libvtv"; \
+ libsrcdir="$$s/libvtv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif target-libvtv-bootstrap
+
+
+
+
+
+.PHONY: all-target-libvtv maybe-all-target-libvtv
+maybe-all-target-libvtv:
+@if gcc-bootstrap
+all-target-libvtv: stage_current
+@endif gcc-bootstrap
+@if target-libvtv
+TARGET-target-libvtv=all
+maybe-all-target-libvtv: all-target-libvtv
+all-target-libvtv: configure-target-libvtv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-target-libvtv))
+@endif target-libvtv
+
+
+
+.PHONY: all-stage1-target-libvtv maybe-all-stage1-target-libvtv
+.PHONY: clean-stage1-target-libvtv maybe-clean-stage1-target-libvtv
+maybe-all-stage1-target-libvtv:
+maybe-clean-stage1-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stage1-target-libvtv: all-stage1-target-libvtv
+all-stage1: all-stage1-target-libvtv
+TARGET-stage1-target-libvtv = $(TARGET-target-libvtv)
+all-stage1-target-libvtv: configure-stage1-target-libvtv
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-target-libvtv)
+
+maybe-clean-stage1-target-libvtv: clean-stage1-target-libvtv
+clean-stage1: clean-stage1-target-libvtv
+clean-stage1-target-libvtv:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage1-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ clean
+@endif target-libvtv-bootstrap
+
+
+.PHONY: all-stage2-target-libvtv maybe-all-stage2-target-libvtv
+.PHONY: clean-stage2-target-libvtv maybe-clean-stage2-target-libvtv
+maybe-all-stage2-target-libvtv:
+maybe-clean-stage2-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stage2-target-libvtv: all-stage2-target-libvtv
+all-stage2: all-stage2-target-libvtv
+TARGET-stage2-target-libvtv = $(TARGET-target-libvtv)
+all-stage2-target-libvtv: configure-stage2-target-libvtv
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-target-libvtv)
+
+maybe-clean-stage2-target-libvtv: clean-stage2-target-libvtv
+clean-stage2: clean-stage2-target-libvtv
+clean-stage2-target-libvtv:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage2-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libvtv-bootstrap
+
+
+.PHONY: all-stage3-target-libvtv maybe-all-stage3-target-libvtv
+.PHONY: clean-stage3-target-libvtv maybe-clean-stage3-target-libvtv
+maybe-all-stage3-target-libvtv:
+maybe-clean-stage3-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stage3-target-libvtv: all-stage3-target-libvtv
+all-stage3: all-stage3-target-libvtv
+TARGET-stage3-target-libvtv = $(TARGET-target-libvtv)
+all-stage3-target-libvtv: configure-stage3-target-libvtv
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-target-libvtv)
+
+maybe-clean-stage3-target-libvtv: clean-stage3-target-libvtv
+clean-stage3: clean-stage3-target-libvtv
+clean-stage3-target-libvtv:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage3-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libvtv-bootstrap
+
+
+.PHONY: all-stage4-target-libvtv maybe-all-stage4-target-libvtv
+.PHONY: clean-stage4-target-libvtv maybe-clean-stage4-target-libvtv
+maybe-all-stage4-target-libvtv:
+maybe-clean-stage4-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stage4-target-libvtv: all-stage4-target-libvtv
+all-stage4: all-stage4-target-libvtv
+TARGET-stage4-target-libvtv = $(TARGET-target-libvtv)
+all-stage4-target-libvtv: configure-stage4-target-libvtv
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-target-libvtv)
+
+maybe-clean-stage4-target-libvtv: clean-stage4-target-libvtv
+clean-stage4: clean-stage4-target-libvtv
+clean-stage4-target-libvtv:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage4-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libvtv-bootstrap
+
+
+.PHONY: all-stageprofile-target-libvtv maybe-all-stageprofile-target-libvtv
+.PHONY: clean-stageprofile-target-libvtv maybe-clean-stageprofile-target-libvtv
+maybe-all-stageprofile-target-libvtv:
+maybe-clean-stageprofile-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stageprofile-target-libvtv: all-stageprofile-target-libvtv
+all-stageprofile: all-stageprofile-target-libvtv
+TARGET-stageprofile-target-libvtv = $(TARGET-target-libvtv)
+all-stageprofile-target-libvtv: configure-stageprofile-target-libvtv
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-target-libvtv)
+
+maybe-clean-stageprofile-target-libvtv: clean-stageprofile-target-libvtv
+clean-stageprofile: clean-stageprofile-target-libvtv
+clean-stageprofile-target-libvtv:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageprofile-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libvtv-bootstrap
+
+
+.PHONY: all-stagefeedback-target-libvtv maybe-all-stagefeedback-target-libvtv
+.PHONY: clean-stagefeedback-target-libvtv maybe-clean-stagefeedback-target-libvtv
+maybe-all-stagefeedback-target-libvtv:
+maybe-clean-stagefeedback-target-libvtv:
+@if target-libvtv-bootstrap
+maybe-all-stagefeedback-target-libvtv: all-stagefeedback-target-libvtv
+all-stagefeedback: all-stagefeedback-target-libvtv
+TARGET-stagefeedback-target-libvtv = $(TARGET-target-libvtv)
+all-stagefeedback-target-libvtv: configure-stagefeedback-target-libvtv
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-target-libvtv)
+
+maybe-clean-stagefeedback-target-libvtv: clean-stagefeedback-target-libvtv
+clean-stagefeedback: clean-stagefeedback-target-libvtv
+clean-stagefeedback-target-libvtv:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stagefeedback-libvtv/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' clean
+@endif target-libvtv-bootstrap
+
+
+
+
+
+
+.PHONY: check-target-libvtv maybe-check-target-libvtv
+maybe-check-target-libvtv:
+@if target-libvtv
+maybe-check-target-libvtv: check-target-libvtv
+
+check-target-libvtv:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+
+@endif target-libvtv
+
+.PHONY: install-target-libvtv maybe-install-target-libvtv
+maybe-install-target-libvtv:
+@if target-libvtv
+maybe-install-target-libvtv: install-target-libvtv
+
+install-target-libvtv: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libvtv
+
+.PHONY: install-strip-target-libvtv maybe-install-strip-target-libvtv
+maybe-install-strip-target-libvtv:
+@if target-libvtv
+maybe-install-strip-target-libvtv: install-strip-target-libvtv
+
+install-strip-target-libvtv: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libvtv
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libvtv info-target-libvtv
+maybe-info-target-libvtv:
+@if target-libvtv
+maybe-info-target-libvtv: info-target-libvtv
+
+info-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-dvi-target-libvtv dvi-target-libvtv
+maybe-dvi-target-libvtv:
+@if target-libvtv
+maybe-dvi-target-libvtv: dvi-target-libvtv
+
+dvi-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-pdf-target-libvtv pdf-target-libvtv
+maybe-pdf-target-libvtv:
+@if target-libvtv
+maybe-pdf-target-libvtv: pdf-target-libvtv
+
+pdf-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-html-target-libvtv html-target-libvtv
+maybe-html-target-libvtv:
+@if target-libvtv
+maybe-html-target-libvtv: html-target-libvtv
+
+html-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-TAGS-target-libvtv TAGS-target-libvtv
+maybe-TAGS-target-libvtv:
+@if target-libvtv
+maybe-TAGS-target-libvtv: TAGS-target-libvtv
+
+TAGS-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-install-info-target-libvtv install-info-target-libvtv
+maybe-install-info-target-libvtv:
+@if target-libvtv
+maybe-install-info-target-libvtv: install-info-target-libvtv
+
+install-info-target-libvtv: \
+ configure-target-libvtv \
+ info-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-install-pdf-target-libvtv install-pdf-target-libvtv
+maybe-install-pdf-target-libvtv:
+@if target-libvtv
+maybe-install-pdf-target-libvtv: install-pdf-target-libvtv
+
+install-pdf-target-libvtv: \
+ configure-target-libvtv \
+ pdf-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-install-html-target-libvtv install-html-target-libvtv
+maybe-install-html-target-libvtv:
+@if target-libvtv
+maybe-install-html-target-libvtv: install-html-target-libvtv
+
+install-html-target-libvtv: \
+ configure-target-libvtv \
+ html-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-installcheck-target-libvtv installcheck-target-libvtv
+maybe-installcheck-target-libvtv:
+@if target-libvtv
+maybe-installcheck-target-libvtv: installcheck-target-libvtv
+
+installcheck-target-libvtv: \
+ configure-target-libvtv
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-mostlyclean-target-libvtv mostlyclean-target-libvtv
+maybe-mostlyclean-target-libvtv:
+@if target-libvtv
+maybe-mostlyclean-target-libvtv: mostlyclean-target-libvtv
+
+mostlyclean-target-libvtv:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-clean-target-libvtv clean-target-libvtv
+maybe-clean-target-libvtv:
+@if target-libvtv
+maybe-clean-target-libvtv: clean-target-libvtv
+
+clean-target-libvtv:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-distclean-target-libvtv distclean-target-libvtv
+maybe-distclean-target-libvtv:
+@if target-libvtv
+maybe-distclean-target-libvtv: distclean-target-libvtv
+
+distclean-target-libvtv:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+.PHONY: maybe-maintainer-clean-target-libvtv maintainer-clean-target-libvtv
+maybe-maintainer-clean-target-libvtv:
+@if target-libvtv
+maybe-maintainer-clean-target-libvtv: maintainer-clean-target-libvtv
+
+maintainer-clean-target-libvtv:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libvtv" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libvtv && \
+ $(MAKE) $(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-libvtv
+
+
+
+
+
.PHONY: configure-target-libssp maybe-configure-target-libssp
maybe-configure-target-libssp:
@if gcc-bootstrap
@@ -31452,7 +34211,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libssp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libssp))
@endif target-libssp
@@ -31909,7 +34668,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-newlib))
@endif target-newlib
@@ -32634,7 +35393,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libgcc))
@endif target-libgcc
@@ -32662,7 +35421,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_TARGET_FLAGS) \
+ $(EXTRA_TARGET_FLAGS) \
+ \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-target-libgcc)
@@ -32677,7 +35437,7 @@
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(EXTRA_TARGET_FLAGS) \
- clean
+ clean
@endif target-libgcc-bootstrap
@@ -32718,9 +35478,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgcc-bootstrap
@@ -32761,9 +35519,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgcc-bootstrap
@@ -32804,9 +35560,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgcc-bootstrap
@@ -32847,9 +35601,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgcc-bootstrap
@@ -32890,9 +35642,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(TARGET_SUBDIR)/libgcc && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgcc-bootstrap
@@ -33283,6 +36033,463 @@
+.PHONY: configure-target-libbacktrace maybe-configure-target-libbacktrace
+maybe-configure-target-libbacktrace:
+@if gcc-bootstrap
+configure-target-libbacktrace: stage_current
+@endif gcc-bootstrap
+@if target-libbacktrace
+maybe-configure-target-libbacktrace: configure-target-libbacktrace
+configure-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libbacktrace..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \
+ mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libbacktrace; \
+ cd "$(TARGET_SUBDIR)/libbacktrace" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
+ libsrcdir="$$s/libbacktrace"; \
+ 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-libbacktrace
+
+
+
+
+
+.PHONY: all-target-libbacktrace maybe-all-target-libbacktrace
+maybe-all-target-libbacktrace:
+@if gcc-bootstrap
+all-target-libbacktrace: stage_current
+@endif gcc-bootstrap
+@if target-libbacktrace
+TARGET-target-libbacktrace=all
+maybe-all-target-libbacktrace: all-target-libbacktrace
+all-target-libbacktrace: configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-libbacktrace))
+@endif target-libbacktrace
+
+
+
+
+
+.PHONY: check-target-libbacktrace maybe-check-target-libbacktrace
+maybe-check-target-libbacktrace:
+@if target-libbacktrace
+maybe-check-target-libbacktrace: check-target-libbacktrace
+
+check-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libbacktrace
+
+.PHONY: install-target-libbacktrace maybe-install-target-libbacktrace
+maybe-install-target-libbacktrace:
+@if target-libbacktrace
+maybe-install-target-libbacktrace: install-target-libbacktrace
+
+install-target-libbacktrace: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libbacktrace
+
+.PHONY: install-strip-target-libbacktrace maybe-install-strip-target-libbacktrace
+maybe-install-strip-target-libbacktrace:
+@if target-libbacktrace
+maybe-install-strip-target-libbacktrace: install-strip-target-libbacktrace
+
+install-strip-target-libbacktrace: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libbacktrace
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libbacktrace info-target-libbacktrace
+maybe-info-target-libbacktrace:
+@if target-libbacktrace
+maybe-info-target-libbacktrace: info-target-libbacktrace
+
+info-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-dvi-target-libbacktrace dvi-target-libbacktrace
+maybe-dvi-target-libbacktrace:
+@if target-libbacktrace
+maybe-dvi-target-libbacktrace: dvi-target-libbacktrace
+
+dvi-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-pdf-target-libbacktrace pdf-target-libbacktrace
+maybe-pdf-target-libbacktrace:
+@if target-libbacktrace
+maybe-pdf-target-libbacktrace: pdf-target-libbacktrace
+
+pdf-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-html-target-libbacktrace html-target-libbacktrace
+maybe-html-target-libbacktrace:
+@if target-libbacktrace
+maybe-html-target-libbacktrace: html-target-libbacktrace
+
+html-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-TAGS-target-libbacktrace TAGS-target-libbacktrace
+maybe-TAGS-target-libbacktrace:
+@if target-libbacktrace
+maybe-TAGS-target-libbacktrace: TAGS-target-libbacktrace
+
+TAGS-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-install-info-target-libbacktrace install-info-target-libbacktrace
+maybe-install-info-target-libbacktrace:
+@if target-libbacktrace
+maybe-install-info-target-libbacktrace: install-info-target-libbacktrace
+
+install-info-target-libbacktrace: \
+ configure-target-libbacktrace \
+ info-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/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)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-install-pdf-target-libbacktrace install-pdf-target-libbacktrace
+maybe-install-pdf-target-libbacktrace:
+@if target-libbacktrace
+maybe-install-pdf-target-libbacktrace: install-pdf-target-libbacktrace
+
+install-pdf-target-libbacktrace: \
+ configure-target-libbacktrace \
+ pdf-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/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)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-install-html-target-libbacktrace install-html-target-libbacktrace
+maybe-install-html-target-libbacktrace:
+@if target-libbacktrace
+maybe-install-html-target-libbacktrace: install-html-target-libbacktrace
+
+install-html-target-libbacktrace: \
+ configure-target-libbacktrace \
+ html-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/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)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-installcheck-target-libbacktrace installcheck-target-libbacktrace
+maybe-installcheck-target-libbacktrace:
+@if target-libbacktrace
+maybe-installcheck-target-libbacktrace: installcheck-target-libbacktrace
+
+installcheck-target-libbacktrace: \
+ configure-target-libbacktrace
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-mostlyclean-target-libbacktrace mostlyclean-target-libbacktrace
+maybe-mostlyclean-target-libbacktrace:
+@if target-libbacktrace
+maybe-mostlyclean-target-libbacktrace: mostlyclean-target-libbacktrace
+
+mostlyclean-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-clean-target-libbacktrace clean-target-libbacktrace
+maybe-clean-target-libbacktrace:
+@if target-libbacktrace
+maybe-clean-target-libbacktrace: clean-target-libbacktrace
+
+clean-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-distclean-target-libbacktrace distclean-target-libbacktrace
+maybe-distclean-target-libbacktrace:
+@if target-libbacktrace
+maybe-distclean-target-libbacktrace: distclean-target-libbacktrace
+
+distclean-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+.PHONY: maybe-maintainer-clean-target-libbacktrace maintainer-clean-target-libbacktrace
+maybe-maintainer-clean-target-libbacktrace:
+@if target-libbacktrace
+maybe-maintainer-clean-target-libbacktrace: maintainer-clean-target-libbacktrace
+
+maintainer-clean-target-libbacktrace:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/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)/libbacktrace" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libbacktrace && \
+ $(MAKE) $(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-libbacktrace
+
+
+
+
+
.PHONY: configure-target-libquadmath maybe-configure-target-libquadmath
maybe-configure-target-libquadmath:
@if gcc-bootstrap
@@ -33344,7 +36551,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libquadmath && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libquadmath))
@endif target-libquadmath
@@ -33801,7 +37008,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgfortran && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libgfortran))
@endif target-libgfortran
@@ -34258,7 +37465,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libobjc))
@endif target-libobjc
@@ -34715,7 +37922,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgo && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libgo))
@endif target-libgo
@@ -35172,7 +38379,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libtermcap))
@endif target-libtermcap
@@ -35564,7 +38771,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-winsup))
@endif target-winsup
@@ -36021,7 +39228,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libgloss))
@endif target-libgloss
@@ -36473,7 +39680,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libffi))
@endif target-libffi
@@ -36501,13 +39708,8 @@
@if target-libffi
maybe-install-target-libffi: install-target-libffi
-install-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)
+# Dummy target for uninstallable.
+install-target-libffi:
@endif target-libffi
@@ -36516,13 +39718,8 @@
@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)
+# Dummy target for uninstallable.
+install-strip-target-libffi:
@endif target-libffi
@@ -36930,7 +40127,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
$(TARGET-target-libjava))
@endif target-libjava
@@ -37387,7 +40584,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-zlib))
@endif target-zlib
@@ -37844,7 +41041,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-boehm-gc))
@endif target-boehm-gc
@@ -38301,7 +41498,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-rda))
@endif target-rda
@@ -38758,7 +41955,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libada))
@endif target-libada
@@ -39483,7 +42680,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
$(TARGET-target-libgomp))
@endif target-libgomp
@@ -39511,7 +42708,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_TARGET_FLAGS) \
+ $(EXTRA_TARGET_FLAGS) \
+ \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-target-libgomp)
@@ -39526,7 +42724,7 @@
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(EXTRA_TARGET_FLAGS) \
- clean
+ clean
@endif target-libgomp-bootstrap
@@ -39567,9 +42765,7 @@
$(MAKE) stage2-start; \
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgomp-bootstrap
@@ -39610,9 +42806,7 @@
$(MAKE) stage3-start; \
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgomp-bootstrap
@@ -39653,9 +42847,7 @@
$(MAKE) stage4-start; \
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgomp-bootstrap
@@ -39696,9 +42888,7 @@
$(MAKE) stageprofile-start; \
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgomp-bootstrap
@@ -39739,9 +42929,7 @@
$(MAKE) stagefeedback-start; \
fi; \
cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(EXTRA_TARGET_FLAGS) \
- \
- clean
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
@endif target-libgomp-bootstrap
@@ -40135,6 +43323,920 @@
+
+
+.PHONY: configure-target-libitm maybe-configure-target-libitm
+maybe-configure-target-libitm:
+@if gcc-bootstrap
+configure-target-libitm: stage_current
+@endif gcc-bootstrap
+@if target-libitm
+maybe-configure-target-libitm: configure-target-libitm
+configure-target-libitm:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libitm..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libitm/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libitm/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libitm/multilib.tmp $(TARGET_SUBDIR)/libitm/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libitm/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libitm/Makefile; \
+ mv $(TARGET_SUBDIR)/libitm/multilib.tmp $(TARGET_SUBDIR)/libitm/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libitm/multilib.tmp $(TARGET_SUBDIR)/libitm/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libitm/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libitm; \
+ cd "$(TARGET_SUBDIR)/libitm" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libitm/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libitm"; \
+ libsrcdir="$$s/libitm"; \
+ 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-libitm
+
+
+
+
+
+.PHONY: all-target-libitm maybe-all-target-libitm
+maybe-all-target-libitm:
+@if gcc-bootstrap
+all-target-libitm: stage_current
+@endif gcc-bootstrap
+@if target-libitm
+TARGET-target-libitm=all
+maybe-all-target-libitm: all-target-libitm
+all-target-libitm: configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-libitm))
+@endif target-libitm
+
+
+
+
+
+.PHONY: check-target-libitm maybe-check-target-libitm
+maybe-check-target-libitm:
+@if target-libitm
+maybe-check-target-libitm: check-target-libitm
+
+check-target-libitm:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libitm
+
+.PHONY: install-target-libitm maybe-install-target-libitm
+maybe-install-target-libitm:
+@if target-libitm
+maybe-install-target-libitm: install-target-libitm
+
+install-target-libitm: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libitm
+
+.PHONY: install-strip-target-libitm maybe-install-strip-target-libitm
+maybe-install-strip-target-libitm:
+@if target-libitm
+maybe-install-strip-target-libitm: install-strip-target-libitm
+
+install-strip-target-libitm: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libitm
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libitm info-target-libitm
+maybe-info-target-libitm:
+@if target-libitm
+maybe-info-target-libitm: info-target-libitm
+
+info-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-dvi-target-libitm dvi-target-libitm
+maybe-dvi-target-libitm:
+@if target-libitm
+maybe-dvi-target-libitm: dvi-target-libitm
+
+dvi-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-pdf-target-libitm pdf-target-libitm
+maybe-pdf-target-libitm:
+@if target-libitm
+maybe-pdf-target-libitm: pdf-target-libitm
+
+pdf-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-html-target-libitm html-target-libitm
+maybe-html-target-libitm:
+@if target-libitm
+maybe-html-target-libitm: html-target-libitm
+
+html-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-TAGS-target-libitm TAGS-target-libitm
+maybe-TAGS-target-libitm:
+@if target-libitm
+maybe-TAGS-target-libitm: TAGS-target-libitm
+
+TAGS-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-install-info-target-libitm install-info-target-libitm
+maybe-install-info-target-libitm:
+@if target-libitm
+maybe-install-info-target-libitm: install-info-target-libitm
+
+install-info-target-libitm: \
+ configure-target-libitm \
+ info-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/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)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-install-pdf-target-libitm install-pdf-target-libitm
+maybe-install-pdf-target-libitm:
+@if target-libitm
+maybe-install-pdf-target-libitm: install-pdf-target-libitm
+
+install-pdf-target-libitm: \
+ configure-target-libitm \
+ pdf-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/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)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-install-html-target-libitm install-html-target-libitm
+maybe-install-html-target-libitm:
+@if target-libitm
+maybe-install-html-target-libitm: install-html-target-libitm
+
+install-html-target-libitm: \
+ configure-target-libitm \
+ html-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/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)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-installcheck-target-libitm installcheck-target-libitm
+maybe-installcheck-target-libitm:
+@if target-libitm
+maybe-installcheck-target-libitm: installcheck-target-libitm
+
+installcheck-target-libitm: \
+ configure-target-libitm
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-mostlyclean-target-libitm mostlyclean-target-libitm
+maybe-mostlyclean-target-libitm:
+@if target-libitm
+maybe-mostlyclean-target-libitm: mostlyclean-target-libitm
+
+mostlyclean-target-libitm:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-clean-target-libitm clean-target-libitm
+maybe-clean-target-libitm:
+@if target-libitm
+maybe-clean-target-libitm: clean-target-libitm
+
+clean-target-libitm:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-distclean-target-libitm distclean-target-libitm
+maybe-distclean-target-libitm:
+@if target-libitm
+maybe-distclean-target-libitm: distclean-target-libitm
+
+distclean-target-libitm:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+.PHONY: maybe-maintainer-clean-target-libitm maintainer-clean-target-libitm
+maybe-maintainer-clean-target-libitm:
+@if target-libitm
+maybe-maintainer-clean-target-libitm: maintainer-clean-target-libitm
+
+maintainer-clean-target-libitm:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libitm/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)/libitm" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libitm && \
+ $(MAKE) $(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-libitm
+
+
+
+
+
+.PHONY: configure-target-libatomic maybe-configure-target-libatomic
+maybe-configure-target-libatomic:
+@if gcc-bootstrap
+configure-target-libatomic: stage_current
+@endif gcc-bootstrap
+@if target-libatomic
+maybe-configure-target-libatomic: configure-target-libatomic
+configure-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libatomic..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \
+ mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libatomic; \
+ cd "$(TARGET_SUBDIR)/libatomic" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libatomic"; \
+ libsrcdir="$$s/libatomic"; \
+ 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-libatomic
+
+
+
+
+
+.PHONY: all-target-libatomic maybe-all-target-libatomic
+maybe-all-target-libatomic:
+@if gcc-bootstrap
+all-target-libatomic: stage_current
+@endif gcc-bootstrap
+@if target-libatomic
+TARGET-target-libatomic=all
+maybe-all-target-libatomic: all-target-libatomic
+all-target-libatomic: configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-libatomic))
+@endif target-libatomic
+
+
+
+
+
+.PHONY: check-target-libatomic maybe-check-target-libatomic
+maybe-check-target-libatomic:
+@if target-libatomic
+maybe-check-target-libatomic: check-target-libatomic
+
+check-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libatomic
+
+.PHONY: install-target-libatomic maybe-install-target-libatomic
+maybe-install-target-libatomic:
+@if target-libatomic
+maybe-install-target-libatomic: install-target-libatomic
+
+install-target-libatomic: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libatomic
+
+.PHONY: install-strip-target-libatomic maybe-install-strip-target-libatomic
+maybe-install-strip-target-libatomic:
+@if target-libatomic
+maybe-install-strip-target-libatomic: install-strip-target-libatomic
+
+install-strip-target-libatomic: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libatomic
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libatomic info-target-libatomic
+maybe-info-target-libatomic:
+@if target-libatomic
+maybe-info-target-libatomic: info-target-libatomic
+
+info-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-dvi-target-libatomic dvi-target-libatomic
+maybe-dvi-target-libatomic:
+@if target-libatomic
+maybe-dvi-target-libatomic: dvi-target-libatomic
+
+dvi-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-pdf-target-libatomic pdf-target-libatomic
+maybe-pdf-target-libatomic:
+@if target-libatomic
+maybe-pdf-target-libatomic: pdf-target-libatomic
+
+pdf-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-html-target-libatomic html-target-libatomic
+maybe-html-target-libatomic:
+@if target-libatomic
+maybe-html-target-libatomic: html-target-libatomic
+
+html-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-TAGS-target-libatomic TAGS-target-libatomic
+maybe-TAGS-target-libatomic:
+@if target-libatomic
+maybe-TAGS-target-libatomic: TAGS-target-libatomic
+
+TAGS-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-install-info-target-libatomic install-info-target-libatomic
+maybe-install-info-target-libatomic:
+@if target-libatomic
+maybe-install-info-target-libatomic: install-info-target-libatomic
+
+install-info-target-libatomic: \
+ configure-target-libatomic \
+ info-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/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)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-install-pdf-target-libatomic install-pdf-target-libatomic
+maybe-install-pdf-target-libatomic:
+@if target-libatomic
+maybe-install-pdf-target-libatomic: install-pdf-target-libatomic
+
+install-pdf-target-libatomic: \
+ configure-target-libatomic \
+ pdf-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/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)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-install-html-target-libatomic install-html-target-libatomic
+maybe-install-html-target-libatomic:
+@if target-libatomic
+maybe-install-html-target-libatomic: install-html-target-libatomic
+
+install-html-target-libatomic: \
+ configure-target-libatomic \
+ html-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/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)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-installcheck-target-libatomic installcheck-target-libatomic
+maybe-installcheck-target-libatomic:
+@if target-libatomic
+maybe-installcheck-target-libatomic: installcheck-target-libatomic
+
+installcheck-target-libatomic: \
+ configure-target-libatomic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-mostlyclean-target-libatomic mostlyclean-target-libatomic
+maybe-mostlyclean-target-libatomic:
+@if target-libatomic
+maybe-mostlyclean-target-libatomic: mostlyclean-target-libatomic
+
+mostlyclean-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-clean-target-libatomic clean-target-libatomic
+maybe-clean-target-libatomic:
+@if target-libatomic
+maybe-clean-target-libatomic: clean-target-libatomic
+
+clean-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-distclean-target-libatomic distclean-target-libatomic
+maybe-distclean-target-libatomic:
+@if target-libatomic
+maybe-distclean-target-libatomic: distclean-target-libatomic
+
+distclean-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+.PHONY: maybe-maintainer-clean-target-libatomic maintainer-clean-target-libatomic
+maybe-maintainer-clean-target-libatomic:
+@if target-libatomic
+maybe-maintainer-clean-target-libatomic: maintainer-clean-target-libatomic
+
+maintainer-clean-target-libatomic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libatomic/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)/libatomic" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libatomic && \
+ $(MAKE) $(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-libatomic
+
+
+
@if target-libmudflap
.PHONY: check-target-libmudflap-c++
check-target-libmudflap-c++:
@@ -40142,6 +44244,20 @@
@endif target-libmudflap
+@if target-libgomp
+.PHONY: check-target-libgomp-c++
+check-target-libgomp-c++:
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp
+
+@endif target-libgomp
+
+@if target-libitm
+.PHONY: check-target-libitm-c++
+check-target-libitm-c++:
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libitm
+
+@endif target-libitm
+
# ----------
# GCC module
# ----------
@@ -40175,8 +44291,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++0x);
-check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
+check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++ check-target-libitm-c++ check-target-libgomp-c++
.PHONY: check-gcc-fortran check-fortran
check-gcc-fortran:
@@ -40227,25 +44343,16 @@
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
-# dependent on the workings of the gcc Makefile.in.
-.PHONY: gcc-no-fixedincludes
-gcc-no-fixedincludes:
+# The gcc part of install-no-fixedincludes, which relies on an intimate
+# knowledge of how a number of gcc internal targets (inter)operate. Delegate.
+.PHONY: gcc-install-no-fixedincludes
+gcc-install-no-fixedincludes:
@if [ -f ./gcc/Makefile ]; then \
- rm -rf gcc/tmp-include; \
- mv gcc/include gcc/tmp-include 2>/dev/null; \
- mkdir gcc/include; \
- cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
- touch gcc/stmp-fixinc gcc/include/fixed; \
- rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- (cd ./gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- rm -rf gcc/include; \
- mv gcc/tmp-include gcc/include 2>/dev/null; \
+ (cd ./gcc \
+ && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \
else true; fi
@endif gcc
@@ -40347,11 +44454,11 @@
mkdir stage1-mpc; \
mv stage1-mpc mpc
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stage1-ppl ] || \
- mkdir stage1-ppl; \
- mv stage1-ppl ppl
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stage1-isl ] || \
+ mkdir stage1-isl; \
+ mv stage1-isl isl
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stage1-cloog ] || \
mkdir stage1-cloog; \
@@ -40377,6 +44484,11 @@
mkdir stage1-ld; \
mv stage1-ld ld
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stage1-libbacktrace ] || \
+ mkdir stage1-libbacktrace; \
+ mv stage1-libbacktrace libbacktrace
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \
mkdir stage1-libcpp; \
@@ -40447,11 +44559,11 @@
cd $(HOST_SUBDIR); mv mpc stage1-mpc ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stage1-ppl ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stage1-isl ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stage1-cloog ; \
@@ -40477,6 +44589,11 @@
cd $(HOST_SUBDIR); mv ld stage1-ld ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage1-libbacktrace ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stage1-libcpp ; \
@@ -40598,12 +44715,12 @@
mv stage2-mpc mpc ; \
mv stage1-mpc prev-mpc || test -f stage1-lean
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stage2-ppl ] || \
- mkdir stage2-ppl; \
- mv stage2-ppl ppl ; \
- mv stage1-ppl prev-ppl || test -f stage1-lean
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stage2-isl ] || \
+ mkdir stage2-isl; \
+ mv stage2-isl isl ; \
+ mv stage1-isl prev-isl || test -f stage1-lean
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stage2-cloog ] || \
mkdir stage2-cloog; \
@@ -40634,6 +44751,12 @@
mv stage2-ld ld ; \
mv stage1-ld prev-ld || test -f stage1-lean
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stage2-libbacktrace ] || \
+ mkdir stage2-libbacktrace; \
+ mv stage2-libbacktrace libbacktrace ; \
+ mv stage1-libbacktrace prev-libbacktrace || test -f stage1-lean
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage2-libcpp ] || \
mkdir stage2-libcpp; \
@@ -40718,12 +44841,12 @@
mv prev-mpc stage1-mpc ; : ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stage2-ppl ; \
- mv prev-ppl stage1-ppl ; : ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stage2-isl ; \
+ mv prev-isl stage1-isl ; : ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stage2-cloog ; \
@@ -40754,6 +44877,12 @@
mv prev-ld stage1-ld ; : ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage2-libbacktrace ; \
+ mv prev-libbacktrace stage1-libbacktrace ; : ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stage2-libcpp ; \
@@ -40904,12 +45033,12 @@
mv stage3-mpc mpc ; \
mv stage2-mpc prev-mpc || test -f stage2-lean
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stage3-ppl ] || \
- mkdir stage3-ppl; \
- mv stage3-ppl ppl ; \
- mv stage2-ppl prev-ppl || test -f stage2-lean
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stage3-isl ] || \
+ mkdir stage3-isl; \
+ mv stage3-isl isl ; \
+ mv stage2-isl prev-isl || test -f stage2-lean
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stage3-cloog ] || \
mkdir stage3-cloog; \
@@ -40940,6 +45069,12 @@
mv stage3-ld ld ; \
mv stage2-ld prev-ld || test -f stage2-lean
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stage3-libbacktrace ] || \
+ mkdir stage3-libbacktrace; \
+ mv stage3-libbacktrace libbacktrace ; \
+ mv stage2-libbacktrace prev-libbacktrace || test -f stage2-lean
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage3-libcpp ] || \
mkdir stage3-libcpp; \
@@ -41024,12 +45159,12 @@
mv prev-mpc stage2-mpc ; : ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stage3-ppl ; \
- mv prev-ppl stage2-ppl ; : ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stage3-isl ; \
+ mv prev-isl stage2-isl ; : ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stage3-cloog ; \
@@ -41060,6 +45195,12 @@
mv prev-ld stage2-ld ; : ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage3-libbacktrace ; \
+ mv prev-libbacktrace stage2-libbacktrace ; : ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stage3-libcpp ; \
@@ -41266,12 +45407,12 @@
mv stage4-mpc mpc ; \
mv stage3-mpc prev-mpc || test -f stage3-lean
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stage4-ppl ] || \
- mkdir stage4-ppl; \
- mv stage4-ppl ppl ; \
- mv stage3-ppl prev-ppl || test -f stage3-lean
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stage4-isl ] || \
+ mkdir stage4-isl; \
+ mv stage4-isl isl ; \
+ mv stage3-isl prev-isl || test -f stage3-lean
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stage4-cloog ] || \
mkdir stage4-cloog; \
@@ -41302,6 +45443,12 @@
mv stage4-ld ld ; \
mv stage3-ld prev-ld || test -f stage3-lean
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stage4-libbacktrace ] || \
+ mkdir stage4-libbacktrace; \
+ mv stage4-libbacktrace libbacktrace ; \
+ mv stage3-libbacktrace prev-libbacktrace || test -f stage3-lean
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage4-libcpp ] || \
mkdir stage4-libcpp; \
@@ -41386,12 +45533,12 @@
mv prev-mpc stage3-mpc ; : ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stage4-ppl ; \
- mv prev-ppl stage3-ppl ; : ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stage4-isl ; \
+ mv prev-isl stage3-isl ; : ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stage4-cloog ; \
@@ -41422,6 +45569,12 @@
mv prev-ld stage3-ld ; : ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage4-libbacktrace ; \
+ mv prev-libbacktrace stage3-libbacktrace ; : ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stage4-libcpp ; \
@@ -41616,12 +45769,12 @@
mv stageprofile-mpc mpc ; \
mv stage1-mpc prev-mpc || test -f stage1-lean
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stageprofile-ppl ] || \
- mkdir stageprofile-ppl; \
- mv stageprofile-ppl ppl ; \
- mv stage1-ppl prev-ppl || test -f stage1-lean
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stageprofile-isl ] || \
+ mkdir stageprofile-isl; \
+ mv stageprofile-isl isl ; \
+ mv stage1-isl prev-isl || test -f stage1-lean
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stageprofile-cloog ] || \
mkdir stageprofile-cloog; \
@@ -41652,6 +45805,12 @@
mv stageprofile-ld ld ; \
mv stage1-ld prev-ld || test -f stage1-lean
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libbacktrace ] || \
+ mkdir stageprofile-libbacktrace; \
+ mv stageprofile-libbacktrace libbacktrace ; \
+ mv stage1-libbacktrace prev-libbacktrace || test -f stage1-lean
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stageprofile-libcpp ] || \
mkdir stageprofile-libcpp; \
@@ -41736,12 +45895,12 @@
mv prev-mpc stage1-mpc ; : ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stageprofile-ppl ; \
- mv prev-ppl stage1-ppl ; : ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stageprofile-isl ; \
+ mv prev-isl stage1-isl ; : ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stageprofile-cloog ; \
@@ -41772,6 +45931,12 @@
mv prev-ld stage1-ld ; : ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stageprofile-libbacktrace ; \
+ mv prev-libbacktrace stage1-libbacktrace ; : ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stageprofile-libcpp ; \
@@ -41899,12 +46064,12 @@
mv stagefeedback-mpc mpc ; \
mv stageprofile-mpc prev-mpc || test -f stageprofile-lean
@endif mpc
-@if ppl
- @cd $(HOST_SUBDIR); [ -d stagefeedback-ppl ] || \
- mkdir stagefeedback-ppl; \
- mv stagefeedback-ppl ppl ; \
- mv stageprofile-ppl prev-ppl || test -f stageprofile-lean
-@endif ppl
+@if isl
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-isl ] || \
+ mkdir stagefeedback-isl; \
+ mv stagefeedback-isl isl ; \
+ mv stageprofile-isl prev-isl || test -f stageprofile-lean
+@endif isl
@if cloog
@cd $(HOST_SUBDIR); [ -d stagefeedback-cloog ] || \
mkdir stagefeedback-cloog; \
@@ -41935,6 +46100,12 @@
mv stagefeedback-ld ld ; \
mv stageprofile-ld prev-ld || test -f stageprofile-lean
@endif ld
+@if libbacktrace
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libbacktrace ] || \
+ mkdir stagefeedback-libbacktrace; \
+ mv stagefeedback-libbacktrace libbacktrace ; \
+ mv stageprofile-libbacktrace prev-libbacktrace || test -f stageprofile-lean
+@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \
mkdir stagefeedback-libcpp; \
@@ -42019,12 +46190,12 @@
mv prev-mpc stageprofile-mpc ; : ; \
fi
@endif mpc
-@if ppl
- @if test -d $(HOST_SUBDIR)/ppl ; then \
- cd $(HOST_SUBDIR); mv ppl stagefeedback-ppl ; \
- mv prev-ppl stageprofile-ppl ; : ; \
+@if isl
+ @if test -d $(HOST_SUBDIR)/isl ; then \
+ cd $(HOST_SUBDIR); mv isl stagefeedback-isl ; \
+ mv prev-isl stageprofile-isl ; : ; \
fi
-@endif ppl
+@endif isl
@if cloog
@if test -d $(HOST_SUBDIR)/cloog ; then \
cd $(HOST_SUBDIR); mv cloog stagefeedback-cloog ; \
@@ -42055,6 +46226,12 @@
mv prev-ld stageprofile-ld ; : ; \
fi
@endif ld
+@if libbacktrace
+ @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stagefeedback-libbacktrace ; \
+ mv prev-libbacktrace stageprofile-libbacktrace ; : ; \
+ fi
+@endif libbacktrace
@if libcpp
@if test -d $(HOST_SUBDIR)/libcpp ; then \
cd $(HOST_SUBDIR); mv libcpp stagefeedback-libcpp ; \
@@ -42199,6 +46376,18 @@
configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-gcc
configure-target-libmudflap: stage_last
+configure-stage1-target-libsanitizer: maybe-all-stage1-gcc
+configure-stage2-target-libsanitizer: maybe-all-stage2-gcc
+configure-stage3-target-libsanitizer: maybe-all-stage3-gcc
+configure-stage4-target-libsanitizer: maybe-all-stage4-gcc
+configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-gcc
+configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-gcc
+configure-stage1-target-libvtv: maybe-all-stage1-gcc
+configure-stage2-target-libvtv: maybe-all-stage2-gcc
+configure-stage3-target-libvtv: maybe-all-stage3-gcc
+configure-stage4-target-libvtv: maybe-all-stage4-gcc
+configure-stageprofile-target-libvtv: maybe-all-stageprofile-gcc
+configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-gcc
configure-target-libssp: stage_last
configure-target-newlib: stage_last
configure-stage1-target-libgcc: maybe-all-stage1-gcc
@@ -42207,6 +46396,7 @@
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-libbacktrace: stage_last
configure-target-libquadmath: stage_last
configure-target-libgfortran: stage_last
configure-target-libobjc: stage_last
@@ -42226,14 +46416,19 @@
configure-stage4-target-libgomp: maybe-all-stage4-gcc
configure-stageprofile-target-libgomp: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-gcc
+configure-target-libitm: stage_last
+configure-target-libatomic: stage_last
@endif gcc-bootstrap
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-gcc
configure-target-libmudflap: maybe-all-gcc
+configure-target-libsanitizer: maybe-all-gcc
+configure-target-libvtv: maybe-all-gcc
configure-target-libssp: maybe-all-gcc
configure-target-newlib: maybe-all-gcc
configure-target-libgcc: maybe-all-gcc
+configure-target-libbacktrace: maybe-all-gcc
configure-target-libquadmath: maybe-all-gcc
configure-target-libgfortran: maybe-all-gcc
configure-target-libobjc: maybe-all-gcc
@@ -42248,6 +46443,8 @@
configure-target-rda: maybe-all-gcc
configure-target-libada: maybe-all-gcc
configure-target-libgomp: maybe-all-gcc
+configure-target-libitm: maybe-all-gcc
+configure-target-libatomic: maybe-all-gcc
@endif gcc-no-bootstrap
@@ -42283,6 +46480,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-gmp
+
+configure-stage1-gcc: maybe-all-stage1-gmp
+configure-stage2-gcc: maybe-all-stage2-gmp
+configure-stage3-gcc: maybe-all-stage3-gmp
+configure-stage4-gcc: maybe-all-stage4-gmp
+configure-stageprofile-gcc: maybe-all-stageprofile-gmp
+configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
configure-gcc: maybe-all-lto-plugin
configure-stage1-gcc: maybe-all-stage1-lto-plugin
@@ -42339,14 +46544,6 @@
all-stage4-gcc: all-stage4-libiberty
all-stageprofile-gcc: all-stageprofile-libiberty
all-stagefeedback-gcc: all-stagefeedback-libiberty
-all-gcc: maybe-all-gmp
-
-all-stage1-gcc: maybe-all-stage1-gmp
-all-stage2-gcc: maybe-all-stage2-gmp
-all-stage3-gcc: maybe-all-stage3-gmp
-all-stage4-gcc: maybe-all-stage4-gmp
-all-stageprofile-gcc: maybe-all-stageprofile-gmp
-all-stagefeedback-gcc: maybe-all-stagefeedback-gmp
all-gcc: maybe-all-intl
all-stage1-gcc: maybe-all-stage1-intl
@@ -42371,14 +46568,6 @@
all-stage4-gcc: maybe-all-stage4-mpc
all-stageprofile-gcc: maybe-all-stageprofile-mpc
all-stagefeedback-gcc: maybe-all-stagefeedback-mpc
-all-gcc: maybe-all-ppl
-
-all-stage1-gcc: maybe-all-stage1-ppl
-all-stage2-gcc: maybe-all-stage2-ppl
-all-stage3-gcc: maybe-all-stage3-ppl
-all-stage4-gcc: maybe-all-stage4-ppl
-all-stageprofile-gcc: maybe-all-stageprofile-ppl
-all-stagefeedback-gcc: maybe-all-stagefeedback-ppl
all-gcc: maybe-all-cloog
all-stage1-gcc: maybe-all-stage1-cloog
@@ -42435,6 +46624,14 @@
all-stage4-gcc: maybe-all-stage4-zlib
all-stageprofile-gcc: maybe-all-stageprofile-zlib
all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
+all-gcc: all-libbacktrace
+
+all-stage1-gcc: all-stage1-libbacktrace
+all-stage2-gcc: all-stage2-libbacktrace
+all-stage3-gcc: all-stage3-libbacktrace
+all-stage4-gcc: all-stage4-libbacktrace
+all-stageprofile-gcc: all-stageprofile-libbacktrace
+all-stagefeedback-gcc: all-stagefeedback-libbacktrace
all-gcc: all-libcpp
all-stage1-gcc: all-stage1-libcpp
@@ -42503,6 +46700,7 @@
install-gcc: maybe-install-fixincludes
install-gcc: maybe-install-lto-plugin
install-strip-gcc: maybe-install-strip-fixincludes
+install-strip-gcc: maybe-install-strip-lto-plugin
configure-libcpp: configure-libiberty
configure-stage1-libcpp: configure-stage1-libiberty
@@ -42562,30 +46760,30 @@
configure-stage4-mpc: maybe-all-stage4-mpfr
configure-stageprofile-mpc: maybe-all-stageprofile-mpfr
configure-stagefeedback-mpc: maybe-all-stagefeedback-mpfr
-configure-ppl: maybe-all-gmp
+configure-isl: maybe-all-gmp
-configure-stage1-ppl: maybe-all-stage1-gmp
-configure-stage2-ppl: maybe-all-stage2-gmp
-configure-stage3-ppl: maybe-all-stage3-gmp
-configure-stage4-ppl: maybe-all-stage4-gmp
-configure-stageprofile-ppl: maybe-all-stageprofile-gmp
-configure-stagefeedback-ppl: maybe-all-stagefeedback-gmp
-configure-ppl: maybe-all-mpfr
+configure-stage1-isl: maybe-all-stage1-gmp
+configure-stage2-isl: maybe-all-stage2-gmp
+configure-stage3-isl: maybe-all-stage3-gmp
+configure-stage4-isl: maybe-all-stage4-gmp
+configure-stageprofile-isl: maybe-all-stageprofile-gmp
+configure-stagefeedback-isl: maybe-all-stagefeedback-gmp
+configure-cloog: maybe-all-isl
-configure-stage1-ppl: maybe-all-stage1-mpfr
-configure-stage2-ppl: maybe-all-stage2-mpfr
-configure-stage3-ppl: maybe-all-stage3-mpfr
-configure-stage4-ppl: maybe-all-stage4-mpfr
-configure-stageprofile-ppl: maybe-all-stageprofile-mpfr
-configure-stagefeedback-ppl: maybe-all-stagefeedback-mpfr
-configure-cloog: maybe-all-ppl
+configure-stage1-cloog: maybe-all-stage1-isl
+configure-stage2-cloog: maybe-all-stage2-isl
+configure-stage3-cloog: maybe-all-stage3-isl
+configure-stage4-cloog: maybe-all-stage4-isl
+configure-stageprofile-cloog: maybe-all-stageprofile-isl
+configure-stagefeedback-cloog: maybe-all-stagefeedback-isl
+configure-cloog: maybe-all-gmp
-configure-stage1-cloog: maybe-all-stage1-ppl
-configure-stage2-cloog: maybe-all-stage2-ppl
-configure-stage3-cloog: maybe-all-stage3-ppl
-configure-stage4-cloog: maybe-all-stage4-ppl
-configure-stageprofile-cloog: maybe-all-stageprofile-ppl
-configure-stagefeedback-cloog: maybe-all-stagefeedback-ppl
+configure-stage1-cloog: maybe-all-stage1-gmp
+configure-stage2-cloog: maybe-all-stage2-gmp
+configure-stage3-cloog: maybe-all-stage3-gmp
+configure-stage4-cloog: maybe-all-stage4-gmp
+configure-stageprofile-cloog: maybe-all-stageprofile-gmp
+configure-stagefeedback-cloog: maybe-all-stagefeedback-gmp
configure-gdb: maybe-all-intl
configure-gdb: maybe-configure-sim
configure-gdb: maybe-all-bfd
@@ -42707,6 +46905,14 @@
all-stage4-binutils: maybe-all-stage4-intl
all-stageprofile-binutils: maybe-all-stageprofile-intl
all-stagefeedback-binutils: maybe-all-stagefeedback-intl
+all-binutils: maybe-all-gas
+
+all-stage1-binutils: maybe-all-stage1-gas
+all-stage2-binutils: maybe-all-stage2-gas
+all-stage3-binutils: maybe-all-stage3-gas
+all-stage4-binutils: maybe-all-stage4-gas
+all-stageprofile-binutils: maybe-all-stageprofile-gas
+all-stagefeedback-binutils: maybe-all-stagefeedback-gas
install-binutils: maybe-install-opcodes
install-strip-binutils: maybe-install-strip-opcodes
install-opcodes: maybe-install-bfd
@@ -42756,6 +46962,7 @@
all-gprof: maybe-all-bfd
all-gprof: maybe-all-opcodes
all-gprof: maybe-all-intl
+all-gprof: maybe-all-gas
configure-ld: maybe-configure-intl
configure-stage1-ld: maybe-configure-stage1-intl
@@ -42812,6 +47019,14 @@
all-stage4-ld: maybe-all-stage4-intl
all-stageprofile-ld: maybe-all-stageprofile-intl
all-stagefeedback-ld: maybe-all-stagefeedback-intl
+all-ld: maybe-all-gas
+
+all-stage1-ld: maybe-all-stage1-gas
+all-stage2-ld: maybe-all-stage2-gas
+all-stage3-ld: maybe-all-stage3-gas
+all-stage4-ld: maybe-all-stage4-gas
+all-stageprofile-ld: maybe-all-stageprofile-gas
+all-stagefeedback-ld: maybe-all-stagefeedback-gas
install-ld: maybe-install-gold
install-strip-ld: maybe-install-strip-gold
configure-gold: maybe-configure-intl
@@ -42854,6 +47069,14 @@
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-gas
+
+all-stage1-gold: maybe-all-stage1-gas
+all-stage2-gold: maybe-all-stage2-gas
+all-stage3-gold: maybe-all-stage3-gas
+all-stage4-gold: maybe-all-stage4-gas
+all-stageprofile-gold: maybe-all-stageprofile-gas
+all-stagefeedback-gold: maybe-all-stagefeedback-gas
check-gold: maybe-all-binutils
check-stage1-gold: maybe-all-stage1-binutils
@@ -42949,7 +47172,9 @@
all-target-fastjar: maybe-all-target-zlib
configure-target-libgo: maybe-configure-target-libffi
configure-target-libgo: maybe-all-target-libstdc++-v3
+all-target-libgo: maybe-all-target-libbacktrace
all-target-libgo: maybe-all-target-libffi
+all-target-libgo: maybe-all-target-libatomic
configure-target-libjava: maybe-configure-target-zlib
configure-target-libjava: maybe-configure-target-boehm-gc
configure-target-libjava: maybe-configure-target-libffi
@@ -42967,6 +47192,22 @@
configure-stage4-target-libstdc++-v3: maybe-configure-stage4-target-libgomp
configure-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
configure-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
+configure-target-libsanitizer: maybe-all-target-libstdc++-v3
+
+configure-stage1-target-libsanitizer: maybe-all-stage1-target-libstdc++-v3
+configure-stage2-target-libsanitizer: maybe-all-stage2-target-libstdc++-v3
+configure-stage3-target-libsanitizer: maybe-all-stage3-target-libstdc++-v3
+configure-stage4-target-libsanitizer: maybe-all-stage4-target-libstdc++-v3
+configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-target-libstdc++-v3
+configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libstdc++-v3
+configure-target-libvtv: maybe-all-target-libstdc++-v3
+
+configure-stage1-target-libvtv: maybe-all-stage1-target-libstdc++-v3
+configure-stage2-target-libvtv: maybe-all-stage2-target-libstdc++-v3
+configure-stage3-target-libvtv: maybe-all-stage3-target-libstdc++-v3
+configure-stage4-target-libvtv: maybe-all-stage4-target-libstdc++-v3
+configure-stageprofile-target-libvtv: maybe-all-stageprofile-target-libstdc++-v3
+configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libstdc++-v3
all-target-libstdc++-v3: maybe-configure-target-libgomp
all-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
@@ -42975,6 +47216,17 @@
all-stage4-target-libstdc++-v3: maybe-configure-stage4-target-libgomp
all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
+install-target-libgo: maybe-install-target-libatomic
+install-target-libgfortran: maybe-install-target-libquadmath
+install-target-libgfortran: maybe-install-target-libgcc
+install-target-libsanitizer: maybe-install-target-libstdc++-v3
+install-target-libsanitizer: maybe-install-target-libgcc
+install-target-libvtv: maybe-install-target-libstdc++-v3
+install-target-libvtv: maybe-install-target-libgcc
+install-target-libjava: maybe-install-target-libgcc
+install-target-libitm: maybe-install-target-libgcc
+install-target-libobjc: maybe-install-target-libgcc
+install-target-libstdc++-v3: maybe-install-target-libgcc
all-target-libgloss: maybe-all-target-newlib
all-target-winsup: maybe-all-target-libtermcap
configure-target-newlib: maybe-all-binutils
@@ -42994,6 +47246,18 @@
configure-stage4-target-libstdc++-v3: maybe-all-stage4-target-libgcc
configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-target-libgcc
configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-target-libgcc
+configure-stage1-target-libsanitizer: maybe-all-stage1-target-libgcc
+configure-stage2-target-libsanitizer: maybe-all-stage2-target-libgcc
+configure-stage3-target-libsanitizer: maybe-all-stage3-target-libgcc
+configure-stage4-target-libsanitizer: maybe-all-stage4-target-libgcc
+configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-target-libgcc
+configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libgcc
+configure-stage1-target-libvtv: maybe-all-stage1-target-libgcc
+configure-stage2-target-libvtv: maybe-all-stage2-target-libgcc
+configure-stage3-target-libvtv: maybe-all-stage3-target-libgcc
+configure-stage4-target-libvtv: maybe-all-stage4-target-libgcc
+configure-stageprofile-target-libvtv: maybe-all-stageprofile-target-libgcc
+configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libgcc
configure-stage1-target-libgomp: maybe-all-stage1-target-libgcc
configure-stage2-target-libgomp: maybe-all-stage2-target-libgcc
configure-stage3-target-libgomp: maybe-all-stage3-target-libgcc
@@ -43005,8 +47269,11 @@
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-target-libgcc
configure-target-libmudflap: maybe-all-target-libgcc
+configure-target-libsanitizer: maybe-all-target-libgcc
+configure-target-libvtv: maybe-all-target-libgcc
configure-target-libssp: maybe-all-target-libgcc
configure-target-newlib: maybe-all-target-libgcc
+configure-target-libbacktrace: 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
@@ -43021,6 +47288,8 @@
configure-target-rda: maybe-all-target-libgcc
configure-target-libada: maybe-all-target-libgcc
configure-target-libgomp: maybe-all-target-libgcc
+configure-target-libitm: maybe-all-target-libgcc
+configure-target-libatomic: maybe-all-target-libgcc
@endif gcc-no-bootstrap
@@ -43028,10 +47297,16 @@
configure-target-libmudflap: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libsanitizer: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss
+
configure-target-libssp: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libbacktrace: maybe-all-target-newlib maybe-all-target-libgloss
+
configure-target-libquadmath: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
@@ -43060,6 +47335,11 @@
configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libitm: maybe-all-target-libstdc++-v3
+
+configure-target-libatomic: maybe-all-target-newlib maybe-all-target-libgloss
+
CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
GDB_TK = @GDB_TK@
diff --git a/Makefile.tpl b/Makefile.tpl
index 4dd2391..3233a78 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, 2010
+# 1999, 2000, 2001, 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
@@ -209,6 +209,7 @@
WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
@@ -216,12 +217,12 @@
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
- PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \
- PPLINC="$(HOST_PPLINC)"; export PPLINC; \
+ ISLINC="$(HOST_ISLINC)"; export ISLINC; \
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
@@ -237,7 +238,7 @@
@if target-libstdc++-v3-bootstrap
# Override the above if we're bootstrapping C++.
POSTSTAGE1_CXX_EXPORT = \
- CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(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 \
@@ -288,6 +289,7 @@
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
@@ -310,9 +312,8 @@
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@
-# Where to find PPL
-HOST_PPLLIBS = @ppllibs@
-HOST_PPLINC = @pplinc@
+# Where to find ISL
+HOST_ISLINC = @islinc@
# Where to find CLOOG
HOST_CLOOGLIBS = @clooglibs@
@@ -366,7 +367,7 @@
# here so that they can be overridden by Makefile fragments.
BOOT_CFLAGS= -g -O2
BOOT_LDFLAGS=
-BOOT_ADAFLAGS=-gnatpg -gnata
+BOOT_ADAFLAGS= -gnatpg
AWK = @AWK@
SED = @SED@
@@ -400,6 +401,7 @@
NM = @NM@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
+READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
WINDMC = @WINDMC@
@@ -421,7 +423,6 @@
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.
@@ -432,10 +433,7 @@
STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS)
@endif target-libstdc++-v3-bootstrap
STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use
-# POSTSTAGE1_CONFIGURE_FLAGS here.
-STAGE[+id+]_CONFIGURE_FLAGS = \
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS)
+STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
[+ ENDFOR bootstrap-stage +]
# Only build the C compiler for stage1, because that is the only one that
@@ -453,9 +451,6 @@
# 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)"
@@ -493,6 +488,7 @@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@
@@ -612,12 +608,19 @@
'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)' \
'WINDMC=$(WINDMC)'
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
+# Flags to pass to stage1 or when not bootstrapping.
+
+STAGE1_FLAGS_TO_PASS = \
+ LDFLAGS="$${LDFLAGS}" \
+ HOST_LIBS="$${HOST_LIBS}"
+
# Flags to pass to stage2 and later makes.
POSTSTAGE1_FLAGS_TO_PASS = \
@@ -652,6 +655,7 @@
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
+ 'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
@@ -668,10 +672,7 @@
EXTRA_GCC_FLAGS = \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
@@ -902,11 +903,12 @@
true ; \
fi
-# install-no-fixedincludes is used because Cygnus can not distribute
-# the fixed header files.
+# install-no-fixedincludes is used to allow the elaboration of binary packages
+# suitable for distribution, where we cannot include the fixed system header
+# files.
.PHONY: install-no-fixedincludes
install-no-fixedincludes: installdirs install-host-nogcc \
- install-target gcc-no-fixedincludes
+ install-target gcc-install-no-fixedincludes
.PHONY: install-strip
install-strip:
@@ -1080,7 +1082,7 @@
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
[+exports+] [+extra_exports+] \
(cd [+subdir+]/[+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \
$(TARGET-[+prefix+][+module+]))
@endif [+prefix+][+module+]
@@ -1113,9 +1115,8 @@
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- [+args+] [+
- IF prev +][+poststage1_args+][+ ENDIF prev
- +] [+extra_make_flags+] \
+ [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \
TFLAGS="$(STAGE[+id+]_TFLAGS)" \
$(TARGET-stage[+id+]-[+prefix+][+module+])
@@ -1129,9 +1130,8 @@
$(MAKE) stage[+id+]-start; \
fi; \
cd [+subdir+]/[+module+] && \
- $(MAKE) [+args+] [+ IF prev +] \
- [+poststage1_args+] [+ ENDIF prev +] \
- [+extra_make_flags+] clean
+ $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean
@endif [+prefix+][+module+]-bootstrap
[+ ENDFOR bootstrap_stage +]
@@ -1166,6 +1166,7 @@
exports="$(HOST_EXPORTS)"
poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
args="$(EXTRA_HOST_FLAGS)"
+ stage1_args="$(STAGE1_FLAGS_TO_PASS)"
poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
.PHONY: check-[+module+] maybe-check-[+module+]
@@ -1410,6 +1411,20 @@
@endif target-libmudflap
+@if target-libgomp
+.PHONY: check-target-libgomp-c++
+check-target-libgomp-c++:
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp
+
+@endif target-libgomp
+
+@if target-libitm
+.PHONY: check-target-libitm-c++
+check-target-libitm-c++:
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libitm
+
+@endif target-libitm
+
# ----------
# GCC module
# ----------
@@ -1439,25 +1454,16 @@
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,
-# which Cygnus is not allowed to distribute. This rule is very
-# dependent on the workings of the gcc Makefile.in.
-.PHONY: gcc-no-fixedincludes
-gcc-no-fixedincludes:
+# The gcc part of install-no-fixedincludes, which relies on an intimate
+# knowledge of how a number of gcc internal targets (inter)operate. Delegate.
+.PHONY: gcc-install-no-fixedincludes
+gcc-install-no-fixedincludes:
@if [ -f ./gcc/Makefile ]; then \
- rm -rf gcc/tmp-include; \
- mv gcc/include gcc/tmp-include 2>/dev/null; \
- mkdir gcc/include; \
- cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
- touch gcc/stmp-fixinc gcc/include/fixed; \
- rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- (cd ./gcc && \
- $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- rm -rf gcc/include; \
- mv gcc/tmp-include gcc/include 2>/dev/null; \
+ (cd ./gcc \
+ && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \
else true; fi
@endif gcc
diff --git a/OWNERS b/OWNERS
deleted file mode 100644
index fdf94a7..0000000
--- a/OWNERS
+++ /dev/null
@@ -1,6 +0,0 @@
-set noparent
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/README.google b/README.google
index d6bc446..39998e0 100644
--- a/README.google
+++ b/README.google
@@ -1,4 +1,4 @@
-Patches applied to binutils-2.22:
+Patches applied to binutils-2.24:
Please include a change to this file with each patch, *and* each
subsequent modification of the patch. Do NOT combine patch
@@ -17,35 +17,6 @@
DO NOT add entries to the GNU ChangeLog files.
gas/as.c
- Status: local
- Owner: eraman
- Ignore --save-temps flag (to enable use of the GNU assembler with a
- compiler that passes --save-temps for MAO).
-
-
-gold/dwarf_reader.cc
-gold/i386.cc
-gold/resolve.cc
-gold/x86_64.cc
- Status: Upstream
- Owner: ccoutant
- Fix C++11 warnings about narrowing in initializers.
- http://sourceware.org/ml/binutils-cvs/2011-12/msg00095.html
-
-gold/options.cc
- Status: Backport
- Owner: ccoutant
- Backport dnovillo's patch to fix bug in option parsing.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00006.html
-
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
- Status: local
- Owner: aaw
- Disable the initpri3b test. GCC 4.7 no longer executes functions from the
- .ctors and .dtors sections when built against binutils-2.22.
-
-gas/as.c
gas/as.h
gas/doc/as.texinfo
gas/read.c
@@ -54,9 +25,15 @@
Owner: aaw
Disable .incbin, unless explicitly enabled with new flag --allow-incbin.
-bfd/doc/bfd.info
binutils/doc/Makefile.am
binutils/doc/Makefile.in
+gas/doc/Makefile.am
+gas/doc/Makefile.in
+gprof/Makefile.am
+gprof/Makefile.in
+ld/Makefile.am
+ld/Makefile.in
+bfd/doc/bfd.info # delete this and all following:
binutils/doc/addr2line.1
binutils/doc/ar.1
binutils/doc/binutils.info
@@ -75,1016 +52,44 @@
binutils/doc/windres.1
etc/configure.info
etc/standards.info
-gas/doc/Makefile.am
-gas/doc/Makefile.in
gas/doc/as.1
gas/doc/as.info
-gprof/Makefile.am
-gprof/Makefile.in
gprof/gprof.1
gprof/gprof.info
-ld/Makefile.am
-ld/Makefile.in
ld/ld.1
ld/ld.info
Status: local
- Owner: aaw
+ Owner: bmoses
Remove all pre-formatted manual and info pages so that they will
consistently be formatted during the build process. When formatting them,
pass --date=" " to pod2man to avoid including build dates.
-gas/config/tc-arm.c
- Status: local workaround
- Owner: kbaclawski
- Fixed an uninitialized variable warning in line 6569 (under gcc 4.4.3), that
- prevented arm-linux-gnueabi targeted cross compiler to build cleanly.
-
-ltmain.sh
- Status: libtool 74c8993c178a1386ea5e2363a01d919738402f30 (not in binutils yet)
- Owner: cgd
- Sort output of 'find' to ensure deterministic builds.
-
-gold/Makefile.am
-gold/Makefile.in
-gold/configure
-gold/configure.ac
-gold/testsuite/Makefile.in
- Status: Backport
- Owner: simonb
- Backport upstream fix that adds --with-gold-ldflags and --with-gold-ldadd.
- http://sourceware.org/ml/binutils/2011-09/msg00123.html
-
-gold/gold.cc
-gold/options.cc
-gold/incremental.cc
-gold/symtab.cc
- Status: Backport
- Owner: ccoutant
- Integrate CLs 55764 and 55815 from binutils-2.21.
- (55764) Backport upstream patch to fix problem with incremental linking and
- --gc-sections.
- http://sourceware.org/ml/binutils-cvs/2011-09/msg00099.html
- (55815) Backport upstream patch to fix problems with incremental linking and
- shared libraries when all references to a PLT come from changed files.
- Also fixes a problem when a changed object file references a versioned
- symbol defined in an unchanged shared library.
- http://sourceware.org/ml/binutils-cvs/2011-09/msg00124.html
-
-gold/gold.cc
-gold/plugin.cc
-gold/layout.cc
-gold/layout.h
-gold/plugin.cc
-gold/plugin.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/plugin_final_layout.sh
-gold/testsuite/plugin_final_layout.cc
-gold/testsuite/plugin_section_order.c
- Status: Backport
- Owner: tmsriram
- Integrate CL 55837 from binutils-2.21.
- Backport upstream patch to fix a bug in plugin section order and delayed
- layout.
- http://www.cygwin.com/ml/binutils/2011-09/msg00265.html
-
-include/demangle.h
-libiberty/cp-demangle.c
-libiberty/testsuite/demangle-expected
- Status: Backport
- Owner: ppluzhnikov
- Integrate CLs 55889 and 55914 from binutils-2.21.
- For http://b/2713120, backport Cary's upstream fix to demangle cloned
- functions.
- http://gcc.gnu.org/ml/gcc-patches/2011-02/msg01545.html
- http://gcc.gnu.org/viewcvs?view=revision&revision=179132
-
-gold/output.cc
-gold/output.h
-gold/powerpc.cc
-gold/sparc.cc
-gold/x86_64.cc
- Status: Backport
- Owner: ccoutant
- [Originally backported to binutils-2.21 as part of CL 56015.]
- Backport upstream patch for PR gold/13249 (gold creates incorrect RELATIVE
- dynamic relocation for local IFUNC GOT entries).
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00040.html
-
-gold/fileread.cc
-gold/incremental.cc
-gold/incremental.h
-gold/output.cc
-gold/plugin.cc
-gold/readsyms.cc
- Status: Backport
- Owner: ccoutant
- Integrate CLs 56018, 56036, 56110, 56146, 56151 from binutils-2.21.
- (56018) Backport upstream patch to add support for --print-symbol-counts
- for incremental links and plugins.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00041.html
- (56036) Backport upstream patch to fix problem with --incremental-base when
- base file is too large.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00055.html
- (56110) Backport upstream patch to fix problem detecting truncated or
- corrupt files.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00078.html
- (56146) Backport upstream patch to fix crash when member of lib group
- can't be opened.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00080.html
- (56151) Backport upstream patch to fix problem detecting out-of-space
- condition when calling posix_fallocate.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00086.html
-
-gold/expression.cc
-gold/i386.cc
-gold/options.h
-gold/script.cc
-gold/script.h
-gold/script-sections.cc
-gold/symtab.cc
-gold/symtab.cc
-gold/symtab.h
-gold/x86_64.cc
-gold/testsuite/script_test_2.t
- Status: Backport
- Owner: ccoutant
- Integrate CLs 56268, 56366, 56367, 56368, 56708 from binutils-2.21.
- (56268) Add --no-gnu-unique option to disable STB_GNU_UNIQUE binding.
- (Adapted from CL 49473.)
- (56366) Backport upstream patch to fix internal error on TLS relocation.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00186.html
- (56367) Backport upstream patch to fix problems with assignment to dot in
- linker scripts.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00188.html
- (56368) Backport upstream patch to not gc symbols that go into dynamic
- symbol table.
- http://cygwin.com/ml/binutils/2011-10/msg00306.html
- (56708) Backport upstream patch to fix linker crash.
- http://www.cygwin.com/ml/binutils-cvs/2011-10/msg00095.html
-
-gprof/hist.c
- Status: Backport
- Owner: carrot
- Integrate CL 56274 from binutils-2.21.
- Backport upstream patch to fix the out of range of an array index in gprof.
- http://sourceware.org/bugzilla/show_bug.cgi?id=13325.
-
-binutils/Makefile.am
-binutils/Makefile.in
- Status: Backport
- Owner: yunlian
- Integrate CL 56431 from binutils-2.21.
- Backport upstream patch to fix out of treebuilding with syslex regens.
- http://sourceware.org/ml/binutils-cvs/2011-10/msg00158.html
-
-gold/arm.cc
- Status: Upstream
- Owner: dougkwan
- Integrate CL 58241 from binutils-2.21.
- Fix PIE crashes on ARM.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00012.html
-
-gas/config/tc-i386.c
-gas/config/tc-i386.h
+gas/testsuite/gas/aarch64/mapmisc.d
Status: local
- Owner: martint
- Move types/enums/structs/macros used by MAO into header-file.
+ Owner: bmoses
+ Add "--allow-incbin" directive to avoid errors with .incbin patch.
-gold/dirsearch.cc
-gold/dirsearch.h
-gold/script.cc.cc
-gold/yyscript.y
- Status: Backport
- Owner: saugustine
- Integrate CLs 56741, 56860 from binutils-2.21.
- (56741) Backport upstream patch to fix INCLUDE syntax errors.
- http://sourceware.org/ml/binutils/2011-11/msg00089.html
- (56860) Backport upstream patch to implement INCLUDE directive.
- http://sourceware.org/ml/binutils/2011-11/msg00165.html
-
-ld/lexsup.c
- Status: Local
- Owner: dougkwan
- Add dummy --icf option to ld for gold compatibility.
-
-elfcpp/dwarf.h
-gold/dwarf_reader.cc
-gold/reduced_debug_output.cc
- Status: Backport
- Update DWARF enums with DWARF-4 and Fission extensions.
- Fix bug in handling of DW_LNE_define_file opcode.
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00043.html
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00044.html
-
-gas/testsuite/gas/arm/mapmisc.d
- Status: Google local
- Owner: dougkwan
- Integrate CL 55082 from binutils-2.21.
- Enable .incbin to make test pass.
-
-gold/int_encoding.cc
-gold/int_encoding.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/leb128_unittest.cc
- Status: Backport
- Owner: ccoutant
- Port CL 58078 from binutils-2.21.
- Add inlined fast path for decoding LEB128 numbers.
- Backport from upstream patch:
- http://sourceware.org/ml/binutils-cvs/2012-01/msg00118.html
-
-gold/arm.cc
- Status: Backport
- Owner: dougkwan
- Backport fix from upstream for ARM regression.
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00059.html
-
-gold/arm.cc
-gold/gold.cc
-gold/target.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/arm_exidx_test.s
-gold/testsuite/arm_exidx_test.sh
- Status: Backport
- Owner: dougkwan
- Backport fix from upstream for __exidx_start & __exidx_end section
- symbols on ARM.
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00086.html
-
-gold/arm.cc
-gold/layout.cc
- Status: Backport
- Owner: dougkwan
- Backport fix from upstream for -z relro.
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00064.html
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00067.html
-
-gold/incremental.cc
- Status: Local
- Owner: ccoutant
- Incremental linker performance:
- Don't store section names in incremental info (unless debugging).
-
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
-gold/gdb-index.cc
-gold/gdb-index.h
-gold/merge.cc
-gold/object.cc
-gold/object.h
-gold/readsyms.cc
-gold/testsuite/gdb_index_test.cc
-gold/testsuite/gdb_index_test_1.sh
-gold/testsuite/gdb_index_test_2.sh
- Status: Backport
- Owner: ccoutant
- Backport support for pre-decompressed debug sections and --gdb-index option.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00137.html
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00001.html
- http://sourceware.org/ml/binutils-cvs/2012-03/msg00094.html
-
-gold/Makefile.am
-gold/Makefile.in
-gold/dynobj.h
-gold/incremental.cc
-gold/incremental.h
-gold/layout.cc
-gold/layout.h
-gold/main.cc
-gold/options.h
-gold/plugin.cc
-gold/plugin.h
-gold/reloc.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/gdb_index_test.cc
-gold/testsuite/gdb_index_test_1.sh
-gold/testsuite/gdb_index_test_2.sh
- Status: Backport
- Owner: ccoutant
- Checkin rest of above patch to support --gdb-index option.
-
-gold/gdb-index.cc
- Status: Backport
- Owner: ccoutant
- Fix problem with --gdb-index where DW_AT_low_pc/high_pc is ignored.
- http://sourceware.org/ml/binutils-cvs/2012-04/msg00031.html
-
-gold/archive.cc
-gold/options.h
-gold/symtab.cc
- Status: Backport
- Owner: ccoutant
- Add --export-dynamic-symbol option.
- http://sourceware.org/ml/binutils/2012-04/msg00128.html
-
-binutils/doc/binutils.texi
-binutils/objcopy.c
- Status: Backport
- Owner: ccoutant
- Fix strip/objcopy to produce deterministic output when stripping archives.
- http://sourceware.org/ml/binutils-cvs/2012-04/msg00102.html
-
-bfd/elfcode.h
- Status: backport
- Owner: ppluzhnikov
- For b/6410576, backport fix for PR binutils/12451
- http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfcode.h.diff?cvsroot=src&r1=1.109&r2=1.111
-
-gold/options.cc
- Status: Upstream
- Owner: ccoutant
- Integrate CL 58455 from binutils-2.21.
- Backport fix for internal error when -pie and -static are both on.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00074.html
-
-binutils/doc/binutils.texi
-binutils/dwarf.c
-binutils/dwarf.h
-binutils/objdump.c
-binutils/readelf.c
-include/dwarf2.h
- Status: Upstream
- Owner: ccoutant
- Backport Fission support for objdump/readelf.
- http://sourceware.org/ml/binutils-cvs/2012-01/msg00123.html
- http://sourceware.org/ml/binutils-cvs/2012-01/msg00123.html
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00009.html
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00072.html
-
-binutils/doc/binutils.texi
-binutils/objcopy.c
- Status: Upstream
- Owner: ccoutant
- Backport Fission support for objcopy/strip.
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00049.html
-
-gold/layout.cc
-gold/testsuite/relro_test.cc
- Status: Backport
- Owner: ccoutant
- Backport fix for problem with -z relro.
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00087.html
-
-gold/symtab.cc
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to fix problem with --export-dynamic-symbol when
- a versioned symbol is found in a shared object (b/6529486).
- http://sourceware.org/ml/binutils/2012-05/msg00331.html
-
-gold/symtab.cc
- Status: Backport
- Owner: ccoutant
- Update fix for b/6529486 to match upstream commit.
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00170.html
-
-ld/scripttempl/armbpabi.sc
-ld/scripttempl/elf.sc
-ld/scripttempl/elf64hppa.sc
-ld/scripttempl/elfxtensa.sc
-ld/scripttempl/mep.sc
-gold/layout.cc
- Status: Backport
- Owner: ccoutant
- Backport gold and gnu ld fixes for problem with relro and symbols that
- begin with "ro" (b/6543153).
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00173.html
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00176.html
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00177.html
-
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
-gold/gdb-index.cc
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/gdb_index_test_3.c
-gold/testsuite/gdb_index_test_3.sh
- Status: Backport
- Owner: ccoutant
- Backport patches to support DW_AT_high_pc as a constant offset.
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00003.html
- http://sourceware.org/ml/binutils-cvs/2012-05/msg00004.html
-
-gold/testsuite/gdb_index_test_3.sh
- Status: Backport
- Owner: ccoutant
- Make shell script executable.
-
-gold/dynobj.cc
- Status: Backport
- Owner: ccoutant
- Fix internal error with --output-symbol-counts.
- http://sourceware.org/ml/binutils/2012-06/msg00035.html
-
-gold/options.h
-gold/output.cc
- Status: Upstream
- Add --[no-]posix-fallocate and --[no-]mmap-output-file options;
- set --no-posix-fallocate as the default (b/4080187).
-
-gold/layout.cc
-gold/options.h
- Status: Backport
- Owner: ccoutant
- Fix --strip-debug-gdb to work with compressed debug sections;
- automatically strip pubnames, pubtypes and aranges sections when
- generating .gdb_index; add .debug_macro to list of gdb sections.
- http://sourceware.org/ml/binutils-cvs/2012-06/msg00026.html
-
-gold/gold.cc
-gold/layout.cc
-gold/layout.h
-gold/object.h
-gold/reloc.cc
- Status: Local
- Owner: ccoutant
- Add --build-id=md5-incr option to implement incremental build-id
- generation for incremental links.
-
+bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
-bfd/coff-rs6000.c
-bfd/coff64-rs6000.c
-bfd/coffgen.c
-bfd/dwarf2.c
-bfd/elf-bfd.h
-bfd/elf.c
-bfd/elf32-arm.c
-bfd/elf64-alpha.c
-bfd/elfxx-mips.c
-bfd/libbfd-in.h
-bfd/libbfd.c
-bfd/libbfd.h
-bfd/targets.c
-binutils/addr2line.c
-binutils/objdump.c
- Status: Backport
- Owner: tejohnson
- Add a new interface bfd_find_nearest_line_discriminator() to
- also return the discriminator (which was previously being ignored when
- reading the dwarf), and also add support to print non-zero
- discriminators along with the source position information from objdump
- and addr2line.
- http://sourceware.org/ml/binutils-cvs/2012-07/msg00089.html
+bfd/section.c
+ Status: backport
+ Owner: ppluzhnikov
+ Backport commit 27b829ee701e29804216b3803fbaeb629be27491:
+ Replace the various bfd_xxx_set macros with static inline functions,
+ so that we can avoid compile time warnings about comma expressions
+ with unused values.
-bfd/dwarf2.c
- Status: Backport
- Owner: tejohnson
- Missing initialization caused failures for the mips target.
- http://sourceware.org/ml/binutils-cvs/2012-07/msg00101.html
-
-gas/config/tc-i386.c
-gas/doc/c-i386.texi
-gas/testsuite/gas/i386/i386.exp
-gas/testsuite/gas/i386/vmfunc.d
-gas/testsuite/gas/i386/vmfunc.s
-gas/testsuite/gas/i386/x86-64-vmfunc.d
-opcodes/i386-dis.c
-opcodes/i386-gen.c
-opcodes/i386-init.h
-opcodes/i386-opc.h
-opcodes/i386-opc.tbl
-opcodes/i386-tbl.h
- Status: Backport
- Owner: eraman
- Add vmfunc.
- http://sourceware.org/ml/binutils-cvs/2012-01/msg00071.html
-
-gas/config/tc-i386.c
-gas/config/tc-i386.h
-gas/doc/c-i386.texi
-gas/testsuite/gas/i386/hle-intel.d
-gas/testsuite/gas/i386/hle.d
-gas/testsuite/gas/i386/hlebad.l
-gas/testsuite/gas/i386/hlebad.s
-gas/testsuite/gas/i386/rtm-intel.d
-gas/testsuite/gas/i386/rtm.d
-gas/testsuite/gas/i386/rtm.s
-gas/testsuite/gas/i386/x86-64-hle-intel.d
-gas/testsuite/gas/i386/x86-64-hle.d
-gas/testsuite/gas/i386/x86-64-hle.s
-gas/testsuite/gas/i386/x86-64-hlebad.l
-gas/testsuite/gas/i386/x86-64-hlebad.s
-gas/testsuite/gas/i386/x86-64-rtm-intel.d
-gas/testsuite/gas/i386/x86-64-rtm.d
-gas/testsuite/gas/i386/x86-64-rtm.s
-include/opcode/i386.h
-opcodes/i386-dis.c
-opcodes/i386-gen.c
-opcodes/i386-init.h
-opcodes/i386-opc.h
-opcodes/i386-opc.tbl
-opcodes/i386-tbl.h
- Status: Backport
- Owner: eraman
- ImplementIntel Transactional Synchronization Extensions.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00030.html
-
-gas/config/tc-i386.c
-opcodes/i386-opc.h
- Status: Backport
- Owner: eraman
- Add HLEPrefixNone/HLEPrefixLock/HLEPrefixAny/HLEPrefixRelease.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00103.html
-
-gold/configure
-gold/configure.ac
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/gdb_index_test_1.sh
-gold/testsuite/gdb_index_test_2.sh
+gold/dwarf_reader.cc
+gold/dwarf_reader.h
+gold/gdb-index.cc
+gold/gdb-index.h
gold/testsuite/gdb_index_test_3.sh
-gold/testsuite/gdb_index_test_4.sh
gold/testsuite/gdb_index_test_comm.sh
- Status: Backport
+ Status: backport
Owner: ccoutant
- Backport upstream configure change to disable gdb_index tests
- where GCC is not recent enough.
- http://sourceware.org/ml/binutils-cvs/2012-07/msg00072.html
-
-binutils/dwarf.c
-include/gdb/gdb-index.h
- Status: Backport
- Owner: saugustine
- Backport change to display gdb_index v7.
- http://sourceware.org/ml/binutils-cvs/2012-07/msg00007.html
-
-gold/symtab.cc
- Status: Backport
- Owner: ccoutant
- Backport fix for internal error with --gc-sections and undefined
- symbol named by --export-dynamic-symbol.
- http://sourceware.org/ml/binutils-cvs/2012-08/msg00141.html
-
-gold/layout.cc
- Status: Backport
- Owner: ccoutant
- Backport fix for internal error with --emit-relocs and GROUP sections.
- http://sourceware.org/ml/binutils-cvs/2012-08/msg00146.html
-
-binutils/dwarf.c
- Status: Upstream
- Owner: dje
- Pretty-print static/global flag of .gdb_index symbols.
- http://sourceware.org/ml/binutils/2012-09/msg00114.html
-
-gold/gdb-index.cc
-gold/gdb-index.h
- Status: Backport
- Owner: saugustine
- Backport fix for relobject/section/offset bug in pubnames reading.
- http://sourceware.org/ml/binutils/2012-09/msg00092.html
-
-gold/gdb-index.cc
-gold/gdb-index.h
- Status: Local
- Owner: saugustine
- Generate gdb-index from .debug_gnu_pubnames.
-
-bfd/elf64-ppc.c
- Status: Backport
- Owner: dougkwan
- Backport upstream fix for b/7120813.
- http://sourceware.org/ml/binutils-cvs/2012-09/msg00077.html
-
-bfd/dwarf2.c
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to support relative form of DW_AT_high_pc.
- http://sourceware.org/ml/binutils-cvs/2012-04/msg00119.html
-
-bfd/elf-bfd.h
-bfd/elf.c
-bfd/elf64-ppc.c
-bfd/elfxx-target.h
- Status: Backport
- Owner: dougkwan
- Backport upstream patch to fix addr2line on PowerPC64.
- http://sourceware.org/ml/binutils-cvs/2012-01/msg00109.html
-
-bfd/elf64-ppc.c
- Status: Backport
- Owner: dougkwan
- Backport upstream performance fix for PR 13897
- http://sourceware.org/ml/binutils-cvs/2012-04/msg00038.html
- http://sourceware.org/ml/binutils-cvs/2012-06/msg00004.html
-
-bfd/elf-bfd.h
-bfd/elf.c
-bfd/elf64-ppc.c
- Status: Backport
- Owner: dougwan
- Backport a dependent change for PR 13897's fix.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00026.html
-
-bfd/elf-bfd.h
-bfd/elf.c
-bfd/elf64-ppc.c
- Status: Backport
- Owner: dougwan
- Backport last patch for upstream performance fix for PR 13897
- http://sourceware.org/ml/binutils-cvs/2012-06/msg00011.html
-
-gold/layout.cc
- Status: Local
- Owner: ccoutant
- Fix linker to strip .debug_gnu_pubnames/pubtypes when generating
- .gdb_index.
-
-bfd/elf.c
- Status: Backport
- Owner: dje
- Fix http://sourceware.org/bugzilla/show_bug.cgi?id=14662
- to make strip remove .gdb_index.
-
-binutils/dwarf.h
- Status: Backport
- Owner: ccoutant
- Add missing enum for gdb_index section.
- http://sourceware.org/ml/binutils-cvs/2011-09/msg00130.html
-
-binutils/dwarf.c
-include/dwarf2.h
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to add readelf support for DW_OP_GNU_const_index.
- http://sourceware.org/ml/binutils-cvs/2012-09/msg00036.html
-
-gold/layout.cc
- Status: Backport
- Owner: tmsriram
- Keep SHF_EXCLUDE sections when doing relocatable links.
- http://sourceware.org/ml/binutils/2012-10/msg00172.html
-
-binutils/dwarf.c
-binutils/dwarf.h
-binutils/elfcomm.c
-binutils/elfcomm.h
-binutils/objdump.c
-binutils/readelf.c
- Status: Upstream
- Backport patches to add readelf support for dwp files.
- http://sourceware.org/ml/binutils-cvs/2012-02/msg00075.html
- http://sourceware.org/ml/binutils/2012-10/msg00233.html
-
-gold/Makefile.am
-gold/Makefile.in
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
-gold/dwp.cc
-gold/dwp.h
-gold/fileread.cc
-gold/fileread.h
-gold/gdb-index.cc
-gold/object.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/dwp_test.h
-gold/testsuite/dwp_test_1.cc
-gold/testsuite/dwp_test_1.s
-gold/testsuite/dwp_test_1.sh
-gold/testsuite/dwp_test_1b.cc
-gold/testsuite/dwp_test_1b.s
-gold/testsuite/dwp_test_2.cc
-gold/testsuite/dwp_test_2.s
-gold/testsuite/dwp_test_2.sh
-gold/testsuite/dwp_test_main.cc
-gold/testsuite/dwp_test_main.s
- Status: Upstream
- Backport patches to add dwp utility to binutils/gold.
- http://sourceware.org/ml/binutils/2012-10/msg00229.html
- http://sourceware.org/ml/binutils/2012-10/msg00230.html
- http://sourceware.org/ml/binutils/2012-10/msg00231.html
- http://sourceware.org/ml/binutils/2012-10/msg00232.html
- http://sourceware.org/ml/binutils/2012-10/msg00234.html
- http://sourceware.org/ml/binutils/2012-10/msg00235.html
-
-gold/dwp.cc
- Status: Upstream
- Fix C++11 warning.
-
-gold/Makefile.am
-gold/Makefile.in
- Status: Upstream
- Add install commands for dwp utility.
-
-gas/as.c
- Status: Backport
- Owner: simonb
- Backport upstream patch for as -statistics.
- http://sourceware.org/ml/binutils/2012-10/msg00248.html
-
-binutils/objcopy.c
-binutils/testsuite/binutils-all/i386/compressed-1b.d
-binutils/testsuite/binutils-all/i386/compressed-1c.d
-binutils/testsuite/binutils-all/x86-64/compressed-1b.d
-binutils/testsuite/binutils-all/x86-64/compressed-1c.d
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to handle empty relocations sections properly
- in objcopy.
- http://sourceware.org/ml/binutils-cvs/2012-04/msg00049.html
-
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
- Status: Local
- Owner: ccoutant
- Fix DWARF reader to recognize compressed debug sections everywhere.
- When reading GNU-style pubnames tables, read to end of table
- instead of stopping when die_offset == 0.
-
-gold/dwarf_reader.cc
- Status: Local
- Owner: ccoutant
- Fix "set but not used" error.
-
-ld/ldmain.c
- Status: Backport
- Owner: simonb
- Backport upstream patch for ld -stats
- http://sourceware.org/ml/binutils/2012-10/msg00378.html
-
-gold/arm.cc
-gold/common.cc
-gold/dwarf_reader.cc
-gold/ehframe.cc
-gold/incremental.cc
-gold/powerpc.cc
- Status: Backport
- Owner: saugustine
- Backport upstream patch for unused typedefs
- http://sourceware.org/ml/binutils/2012-07/msg00108.html
-
-gold/gold.cc
-gold/layout.cc
-gold/layout.h
-gold/object.cc
-gold/output.cc
-gold/plugin.cc
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/plugin_final_layout.sh
-gold/testsuite/plugin_section_order.c
-include/plugin-api.h
- Status: Backport
- Owner: tmsriram
- Backport upstream patch to enable plugin APIs to map specific
- function sections to unique segments.
- http://sourceware.org/ml/binutils/2012-08/msg00447.html
-
-Makefile.def
-Makefile.in
- Status: Backport
- Owner: shenhan
- Backport upstream patch for PR binutils/4970.
- http://sourceware.org/ml/binutils/2012-08/msg00451.html
-
-gold/dwp.cc
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to fix dwp internal error when adding
- a duplicate CU.
- http://sourceware.org/ml/binutils-cvs/2012-12/msg00082.html
-
-gold/layout.cc
-gold/layout.h
-gold/output.cc
-testsuite/Makefile.am
-testsuite/Makefile.in
-testsuite/text_section_grouping.cc
-testsuite/text_section_grouping.sh
- Status:Backport
- Owner:tmsriram
- Backport patches http://sourceware.org/ml/binutils/2012-11/msg00319.html
- and http://sourceware.org/ml/binutils/2012-12/msg00227.html to allow gold
- to group ".text.hot", ".text.unlikely", ".text.startup" and ".text.exit"
- sections by default.
-
-gold/output.cc
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to fix incremental update problem exposed by
- text section reordering.
- http://sourceware.org/ml/binutils-cvs/2013-01/msg00039.html
-
-gold/output.h
-gold/script-sections.cc
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
- Status: Backport
- Owner: tmsriram
- Backport patch http://sourceware.org/ml/binutils/2013-01/msg00108.html
- to allow linker scripts and section ordering to co-exist.
-
-gold/dwp.cc
- Status: Backport
- Owner: ccoutant
- Backport patches to fix 32-bit build problem, check for bad fwrite return
- value, and add --help option.
- http://sourceware.org/ml/binutils-cvs/2012-10/msg00132.html
- http://sourceware.org/ml/binutils-cvs/2012-10/msg00133.html
- http://sourceware.org/ml/binutils-cvs/2012-10/msg00162.html
-
-gold/layout.cc
-gold/testsuite/plugin_final_layout.cc
- Status: Backport
- Owner: tmsriram
- Backport patch http://sourceware.org/ml/binutils/2013-01/msg00252.html to
- fix a bug in function reordering.
-
-gold/layout.cc
-gold/options.h
-gold/output.cc
-gold/output.h
-testsuite/Makefile.am
-testsuite/Makefile.in
-testsuite/text_section_grouping.sh
- Status: Backport
- Owner: tmsriram
- Backport patch http://sourceware.org/ml/binutils/2013-01/msg00357.html to
- fix a bug in default text section ordering in gold.
-
-binutils/dwarf.c
- Status: Backport
- Owner: ccoutant
- Backport patches to fix problems with readelf dumping of loclists and
- addr tables.
- http://sourceware.org/ml/binutils/2013-01/msg00379.html
- http://sourceware.org/ml/binutils/2013-01/msg00388.html
-
-gold/dwp.cc
- Status: Backport
- Owner: ccoutant
- Backport patch to add --exec option to dwp.
- http://sourceware.org/ml/binutils-cvs/2013-01/msg00181.html
-
-include/plugin-api.h
- Status: Backport
- Owner: tmsriram
- Backport to get plugin-api.h in sync with upstream binutils.
- http://sourceware.org/ml/binutils/2013-02/msg00136.html
- http://sourceware.org/ml/binutils/2012-06/msg00129.html
-
-binutils/dwarf.c
-binutils/dwarf.h
-binutils/objdump.c
-binutils/readelf.c
- Status: Local
- Owner: saugustine
- Dump new accelerator tables .debug_[names|typenames|namespaces].
-
-binutils/dwarf.c
-elfcpp/dwarf.h
-include/dwarf2.h
- Status: Backport
- Owner: ccoutant
- Add support for version 2 DWARF package file format.
- http://sourceware.org/ml/binutils-cvs/2013-03/msg00000.html
- http://sourceware.org/ml/binutils-cvs/2013-03/msg00001.html
- http://sourceware.org/ml/binutils-cvs/2013-03/msg00002.html
-
-gold/dwp.cc
-gold/fileread.cc
-gold/fileread.h
- Status: Local
- Owner: ccoutant
- Make dwp print warning instead of fatal error when it can't open
- an input .dwo file.
-
-gold/dwarf_reader.cc
-gold/object.cc
-gold/testsuite/gdb_index_test.cc
-gold/testsuite/gdb_index_test_comm.sh
- Status: Backport
- Owner: ccoutant
- Backport patch to support new FORM codes in DWARF reader.
- http://sourceware.org/ml/binutils-cvs/2012-09/msg00038.html
-
-gold/archive.cc
- Status: Backport
- Owner: tmsriram
- Backport patch to make linker plugin APIs work with archives:
- http://sourceware.org/ml/binutils/2013-03/msg00322.html
-
-gold/layout.cc
-gold/script-sections.cc
-gold/symtab.cc
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/script_test_11.c
-gold/testsuite/script_test_11.t
- Status: Backport
- Owner: ccoutant
- Backport patches to fix problems with dot assignment in scripts
- used with -r option.
- http://sourceware.org/ml/binutils-cvs/2013-04/msg00069.html
- http://sourceware.org/ml/binutils-cvs/2013-04/msg00070.html
- http://sourceware.org/ml/binutils-cvs/2013-04/msg00071.html
-
-gold/layout.cc
- Status: Local
- Owner: tmsriram
- Map input section name prefixes "_function_patch_prologue." and
- "_function_patch_epilogue." to output section names
- "_function_patch_prologue" and "_function_patch_epilogue".
- The compiler patch that creates these sections:
- http://gcc.gnu.org/ml/gcc-patches/2013-04/msg01835.html
-
-gold/dwp.h
-gold/dwp.cc
- Status: Local
- Owner: ccoutant
- Add --verify-only option to dwp.
-
-gold/object.cc
-gold/object.h
-gold/symtab.h
-gold/target-reloc.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/debug_msg.sh
-gold/testsuite/missing_key_func.cc
-gold/testsuite/missing_key_func.sh
- Status: Backport
- Owner: ccoutant
- Backport upstream patches to fix problem where non-function symbols
- in error messages are labelled as "function", and to add an extra
- line of info when vtable symbols are undefined.
- http://sourceware.org/ml/binutils-cvs/2013-05/msg00099.html
- http://sourceware.org/ml/binutils-cvs/2013-05/msg00100.html
-
-include/demangle.h
-libiberty/cp-demangle.c
-libiberty/testsuite/demangle-expected
- Status: Backport
- Owner: ccoutant
- Backport demangler patches to sync binutils with GCC 4.8.
- r179772 | ian | 2011-10-10 13:34:20 -0700 (Mon, 10 Oct 2011) | 5 lines
- r180944 | jason | 2011-11-04 05:54:08 -0700 (Fri, 04 Nov 2011) | 20 lines
- r181154 | aldyh | 2011-11-08 03:13:41 -0800 (Tue, 08 Nov 2011) | 2 lines
- r182969 | jason | 2012-01-06 13:39:34 -0800 (Fri, 06 Jan 2012) | 3 lines
- r182970 | jason | 2012-01-06 13:39:43 -0800 (Fri, 06 Jan 2012) | 32 lines
- r183072 | jason | 2012-01-10 09:02:52 -0800 (Tue, 10 Jan 2012) | 2 lines
- r185082 | jason | 2012-03-07 15:19:06 -0800 (Wed, 07 Mar 2012) | 2 lines
- r185595 | jason | 2012-03-20 21:04:39 -0700 (Tue, 20 Mar 2012) | 6 lines
- r187773 | tromey | 2012-05-22 06:55:02 -0700 (Tue, 22 May 2012) | 4 lines
- r189630 | jason | 2012-07-18 12:51:36 -0700 (Wed, 18 Jul 2012) | 3 lines
- r192211 | jason | 2012-10-08 07:45:37 -0700 (Mon, 08 Oct 2012) | 24 lines
- r193367 | jason | 2012-11-09 08:14:37 -0800 (Fri, 09 Nov 2012) | 22 lines
- r193401 | jason | 2012-11-10 18:11:15 -0800 (Sat, 10 Nov 2012) | 2 lines
- r196065 | jason | 2013-02-14 17:26:44 -0800 (Thu, 14 Feb 2013) | 8 lines
- r197436 | jason | 2013-04-03 10:24:12 -0700 (Wed, 03 Apr 2013) | 16 lines
-
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
- Status: Backport
- Owner: ccoutant
- Backport upstream patch to fix problem building gdb index on piii.
- http://sourceware.org/ml/binutils-cvs/2013-07/msg00004.html
-
-gold/dwarf_reader.cc
-gold/dwarf_reader.h
-gold/gdb-index.cc
-gold/gdb-index.h
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
- Status: local in two patches
- Owner: saugustine
- Newer editions of GCC generate DW_AT_gnu_pubnames attribute
- with a DW_FORM_flag_present, rather than as
- DW_FORM_sec_offset. Add support for reading them as such.
-
-gold/resolve.cc
-gold/testsuite/Makefile.am
-gold/testsuite/Makefile.in
-gold/testsuite/plugin_test_tls.sh
-gold/testsuite/two_file_test_2_tls.cc
-gold/testsuite/two_file_test_tls.cc
- Status: Backport
- Owner: ccoutant
- Backport patch to fix LTO problem with __thread variables.
- http://sourceware.org/ml/binutils-cvs/2013-06/msg00058.html
-
-gold/Makefile.am
-gold/Makefile.in
- Status: Backport
- Owner: bmoses
- Backport changes made to the (above-backported) dwp Makefile
- targets during upstream review. Namely, to put it in
- bin_PROGRAMS so that it gets installed correctly when we are
- building a cross-compiler. See discussion here:
- http://sourceware.org/ml/binutils/2012-10/msg00261.html
- http://sourceware.org/ml/binutils/2012-10/msg00262.html
-
-binutils/dwarf.c
- Status: Backport
- Owner: saugustine
- Backport handling for gdb_index version 8.
- https://sourceware.org/ml/binutils/2013-01/msg00350.html
+ Backport upstream patch to add support for .gdb_index version 7.
+ https://sourceware.org/ml/binutils-cvs/2014-01/msg00156.html
gold/configure.ac
gold/configure
@@ -1098,24 +103,12 @@
build tools, even if we are building for a non-native
target.
-libiberty/cp-demangle.c
-libiberty/testsuite/demangle-expected
- Status: Backport
- Owner: ppluzhnikov
- Backport cxxfilter fix for local source name demangling.
- http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=203476
-
-gas/write.c
- Status: Backport
- Owner: bmoses
- Backport fix to avoid uninitialized variable warning.
- https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4fc0b46e62cec696390862c9eb7d80b35d24f0f8
-
gold/options.cc
gold/options.h
gold/symtab.cc
gold/symtab.h
gold/testsuite/Makefile.am
+gold/testsuite/Makefile.in
gold/testsuite/dynamic_list_2.cc
gold/testsuite/dynamic_list_2.t
gold/testsuite/dynamic_list_lib1.cc
@@ -1123,7 +116,6 @@
gold/testsuite/gc_dynamic_list_test.c
gold/testsuite/gc_dynamic_list_test.sh
gold/testsuite/gc_dynamic_list_test.t
-gold/testsuite/Makefile.in
Status: Backport
Owner: ccoutant
Fix problems with --dynamic-list option.
@@ -1159,6 +151,20 @@
Backported from:
https://sourceware.org/ml/binutils-cvs/2014-02/msg00031.html
+gold/testsuite/Makefile.am
+gold/testsuite/Makefile.in
+ Status: backport
+ Owner: ccoutant
+ Backport upstream patch to fix dependencies in gold testsuite.
+ https://sourceware.org/ml/binutils-cvs/2013-10/msg00022.html
+
+binutils/dwarf.c
+ Status: backport
+ Owner: ccoutant
+ Backport upstream patch to fix bogus complaint about corrupt attribute
+ when DW_FORM_flag_present falls at end of section.
+ https://sourceware.org/ml/binutils-cvs/2014-02/msg00054.html
+
libiberty/cp-demangle.c
libiberty/cp-demangle.h
libiberty/testsuite/demangle-expected
@@ -1166,3 +172,64 @@
Owner: ccoutant
Fix demangler to handle conversion operators correctly.
Backported from GCC trunk at r205292.
+
+gold/configure
+gold/configure.ac
+gold/testsuite/Makefile.am
+gold/testsuite/Makefile.in
+ Status: backport
+ Owner: ccoutant
+ Modify gold testsuite to disable plugins added by GCC driver.
+ https://sourceware.org/ml/binutils-cvs/2014-04/msg00010.html
+
+gold/icf.cc
+ Status: backport
+ Owner: tmsriram
+ Use references to reloc info vectors in icf.cc. This also fixes
+ bug b/13588967
+ https://sourceware.org/ml/binutils/2014-04/msg00026.html
+
+gold/x86_64.cc
+ Status: backport
+ Owner: ccoutant
+ Add missing break statement (PR gold/16870).
+ https://sourceware.org/ml/binutils-cvs/2014-04/msg00141.html
+
+gold/options.h
+ Status: local
+ Owner: ccoutant
+ Make --disable-new-dtags the default. See b/12844098.
+
+gold/gdb-index.cc
+ Status: backport
+ Owner: ccoutant
+ Don't complain about the source language when we have pubnames/pubtypes info.
+ https://sourceware.org/ml/binutils-cvs/2014-05/msg00025.html
+
+gold/layout.cc
+ Status: Local
+ Owner: ccoutant
+ Fix linker to strip .debug_gnu_pubnames/pubtypes when generating
+ .gdb_index.
+
+gold/arm.cc
+gold/i386.cc
+gold/powerpc.cc
+gold/sparc.cc
+gold/x86_64.cc
+gold/symtab.h
+testsuite/Makefile.am
+testsuite/Makefile.in
+testsuite/pie_copyrelocs_test.cc
+testsuite/pie_copyrelocs_shared_test.cc
+ Status: backport
+ Owner: tmsriram
+ Backport fix to allow copy relocations with pie links when possible.
+ https://sourceware.org/ml/binutils/2014-05/msg00092.html
+
+libiberty/configure.ac
+libiberty/configure
+ Status: backport
+ Owner: bmoses
+ Fix bug that prevented --enable-install-libiberty from working.
+ https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00213.html
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 65db027..2c4719c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,2699 +1,2785 @@
-2011-11-21 Tristan Gingold <[email protected]>
+2013-12-02 Tristan Gingold <[email protected]>
- * configure.in: Bump version to 2.22
+ * configure.in: Bump version to 2.24
* Makefile.am (RELEASE): Set.
* configure, Makefile.in: Regenerate.
-2011-11-15 Maxim Kuvyrkov <[email protected]>
+2013-11-26 Tristan Gingold <[email protected]>
- Backport from mainline:
-
- 2011-11-14 Maxim Kuvyrkov <[email protected]>
- * elfxx-mips.c (mips_n64_exe_plt0_entry): Use 64-bit move.
-
-2011-11-15 Alan Modra <[email protected]>
- Andreas Tobler <[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.
-
-2011-11-09 Alan Modra <[email protected]>
-
- * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
- executables when export_dynamic.
-
-2011-11-08 Alan Modra <[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.
-
-2011-10-25 Alan Modra <[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.
-
- 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.
-
- 2011-10-19 Alan Modra <[email protected]>
- PR ld/13254
- * elflink.c (bfd_elf_final_link): Emit error_textrel error.
-
- 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.
-
- 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.
-
- 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.in: Bump version to 2.23.92
* configure: Regenerate.
-2011-09-21 David S. Miller <[email protected]>
+2013-11-22 Cory Fields <[email protected]>
- * 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.
-
-2011-09-21 Tristan Gingold <[email protected]>
-
- * 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.
-
-2011-09-15 H.J. Lu <[email protected]>
-
- PR ld/13177
- * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
- nor GOT references.
-
-2011-09-15 H.J. Lu <[email protected]>
-
- PR ld/12975
- * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
- to struct bfd_elf_version_tree.
-
- * 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.
-
- * linker.c (bfd_hide_sym_by_version): New.
-
- * bfd-in2.h: Regenerated.
-
-2011-09-12 H.J. Lu <[email protected]>
-
- PR ld/13178
- * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
- if there are no GOT relocations.
-
-2011-09-09 Kai Tietz <[email protected]>
-
- * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
- for targets without symbol_leading_char.
-
-2011-09-08 Bernd Jendrissek <[email protected]>
-
- * bfdwin.c (bfd_get_file_window): Fix memory leak.
-
-2011-09-07 Alan Modra <[email protected]>
-
- PR ld/13131
- * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
- is initialized.
-
-2011-09-06 Alan Modra <[email protected]>
-
- 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.
-
-2011-09-01 Christophe Lyon <[email protected]>
-
- * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
- sections.
-
-2011-08-26 Nick Clifton <[email protected]>
-
- * po/es.po: Updated Spanish translation.
-
-2011-08-19 Alan Modra <[email protected]>
-
- * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
- we haven't seen expected -mcmodel=medium/large code relocs.
-
-2011-08-18 Tristan Gingold <[email protected]>
-
- * mach-o.c (bfd_mach_o_read_segment): Initialize list.
-
-2011-08-17 Tristan Gingold <[email protected]>
-
- * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
-
-2011-08-17 Alan Modra <[email protected]>
-
- 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-in.h: Add insert_timestamp flag to the pe_data struct.
* libcoff.h: Regenerate.
- * bfd-in2.h: Regenerate.
+ * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real
+ timestamp if --insert-timestamp was used.
-2011-08-14 Alan Modra <[email protected]>
+2013-11-19 Roland McGrath <[email protected]>
- * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
- shared and call to _mcount will go via plt.
+ * elf-nacl.c (nacl_modify_segment_map): Calculate SIZEOF_HEADERS
+ when not doing linking (i.e. INFO is a null pointer).
-2011-08-14 Alan Modra <[email protected]>
+2013-11-18 Tristan Gingold <[email protected]>
- * 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.
+ * configure.in: Bump version to 2.23.91
+ * configure: Regenerate.
-2011-08-12 H.J. Lu <[email protected]>
+2013-11-17 H.J. Lu <[email protected]>
- 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.
-
-2011-08-09 Matthew Gretton-Dann <[email protected]>
-
- * 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.
-
-2011-08-08 Tristan Gingold <[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.
-
-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.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND
+ and R_X86_64_PLT32_BND.
+ (R_X86_64_standard): Replace R_X86_64_RELATIVE64 with
+ R_X86_64_PLT32_BND.
+ (IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND.
+ (x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and
+ BFD_RELOC_X86_64_PLT32_BND.
+ (elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and
+ R_X86_64_PLT32_BND.
+ (elf_x86_64_gc_sweep_hook): 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.
-
-2011-07-22 H.J. Lu <[email protected]>
-
- * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
- (ALL_MACHINES_CFILES): Add cpu-k1om.c.
- * Makefile.in: Regenerated.
-
- * archures.c (bfd_architecture): Add bfd_arch_k1om.
- (bfd_k1om_arch): New.
- (bfd_archures_list): Add &bfd_k1om_arch.
+ * reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND
+ and BFD_RELOC_X86_64_PLT32_BND.
* bfd-in2.h: Regenerated.
+ * libbfd.h: Likewise.
- * 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.
+2013-11-15 Alan Modra <[email protected]>
- * configure.in: Support bfd_elf64_k1om_vec and
- bfd_elf64_k1om_freebsd_vec.
- * configure: Regenerated.
+ Apply changes from mainline to 2.24
+ 2013-11-11 Alan Modra <[email protected]>
+ * elf64-ppc.c (allocate_dynrelocs): Revert 2013-11-04 change.
- * cpu-k1om.c: New.
+ 2013-11-11 Ulrich Weigand <[email protected]>
+ * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_REFERENCES_LOCAL
+ here, not SYMBOL_CALLS_LOCAL.
+ (ppc64_elf_relocate_section): Likewise.
+ (size_global_entry_stubs): Set undefined symbols on their global
+ entry stubs here..
+ (build_global_entry_stubs): ..rather than here.
+ (ppc64_elf_build_stubs): Don't reset glink->size before calling
+ build_global_entry_stubs.
- * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
- (bfd_elf64_k1om_vec): Likewise.
- (bfd_elf64_k1om_freebsd_vec): Likewise.
+ 2013-11-05 Alan Modra <[email protected]>
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Make .TOC. defined and
+ hidden.
+ (ppc64_elf_set_toc): Adjust.
- * 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.
+ 2013-11-05 Alan Modra <[email protected]>
+ * elf64-ppc.c (struct ppc_link_hash_table): Remove got, plt, relplt,
+ iplt, reliplt. Update all references to use elf.sgot, elf.splt,
+ elf.srelplt, elf.iplt and elf.irelplt.
-2011-07-20 Jan Kratochvil <[email protected]>
+ 2013-11-04 Alan Modra <[email protected]>
+ * elf64-ppc.c (ppc64_elf_relocate_section): Edit global entry
+ prologue to non-PIC in non-PIC executables.
- 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.
+ 2013-11-04 Alan Modra <[email protected]>
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Copy
+ pointer_equality_needed flag.
+ (ppc64_elf_check_relocs): For ELFv2 arrange to emit plt
+ entries for references to functions in shared libraries on
+ non-call relocs.
+ (readonly_dynrelocs): Split into function of the same name and..
+ (maybe_set_textrel): ..this new function. Update call.
+ (ppc64_elf_adjust_dynamic_symbol): Don't emit dynrelocs for
+ ELFv2 in most cases if we have a plt entry. Use new
+ readonly_relocs.
+ (allocate_dynrelocs): For ELFv2, don't allocate dynreloc space
+ for ifunc in static executables.
+ (size_global_entry_stubs): New function.
+ (ppc64_elf_size_dynamic_sections): Call size_global_entry_stubs.
+ Save end of glink branch table.
+ (ppc64_elf_hash_symbol): New function.
+ (build_global_entry_stubs): New function.
+ (ppc64_elf_build_stubs): Call build_global_entry_stubs. Adjust
+ glink sizing.
+ (ppc64_elf_relocate_section): Tidy plt16/32/64 reloc code.
+ (ppc64_elf_finish_dynamic_symbol): For ELFv2, adjust symbols
+ defined on plt code.
-2011-07-15 Alan Modra <[email protected]>
+ 2013-11-02 Alan Modra <[email protected]>
+ * elf64-ppc.c (ppc64_elf_next_input_section): Always set toc_off
+ to value for object file.
- * configure.in: Bump version.
- * configure: Regenerate.
+ 2013-10-30 Alan Modra <[email protected]>
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Use new DT_PPC_OPT
+ tag to specify tls optimisation.
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
+ (ppc64_elf_finish_dynamic_sections): Specify whether multiple
+ toc pointers are used via DT_PPC64_OPT.
-2011-07-14 Alan Modra <[email protected]>
+ 2013-10-30 Alan Modra <[email protected]>
+ * elf64-ppc.c (STK_LR, STK_TOC, STK_LINKER): Define.
+ (savegpr0_tail, restgpr0_tail, savefpr0_tail, restfpr0_tail)
+ build_plt_stub, build_tls_get_addr_stub, ppc_build_one_stub,
+ ppc64_elf_relocate_section): Use new defines.
- * linker.c (_bfd_generic_section_already_linked): Set l_flags.
- * elf-bfd.h (struct already_linked): Forward declare.
+ 2013-10-30 Alan Modra <[email protected]>
+ * elf64-ppc.c (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE): Add htab
+ parameter and adjust for ELFv2. Update all uses.
+ (PLT_CALL_STUB_SIZE): Delete.
+ (ppc64_elf_get_synthetic_symtab): Support new glink layout.
+ (allocate_dynrelocs): Likewise.
+ (plt_stub_size, build_plt_stub): Adjust for ELFv2.
+ (get_r2off): Return 0 for ELFv2 -R.
+ (ppc_build_one_stub, ppc_size_one_stub): Adjust for ELFv2.
+ (ppc64_elf_size_stubs): Likewise.
+ (ppc64_elf_build_stubs): Add new ELFv2 glink.
-2011-07-14 Alan Modra <[email protected]>
-
- * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
- (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
-
-2011-07-14 Alan Modra <[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.
-
-2011-07-12 Nick Clifton <[email protected]>
-
- * elf32-arm.c (elf32_arm_section_flags): Delete.
- (elf_backend_section_flags): Remove.
-
-2011-07-11 H.J. Lu <[email protected]>
-
- PR ld/12982
- * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
- when setting stack_flags.
-
-2011-07-11 Catherine Moore <[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.
-
-2011-07-11 H.J. Lu <[email protected]>
-
- PR ld/12978
- * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
-
-2011-07-09 Alan Modra <[email protected]>
-
- 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.
-
-2011-07-09 H.J. Lu <[email protected]>
-
- 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.
-
-2011-06-15 Ulrich Weigand <[email protected]>
-
- * 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.
-
-2011-06-14 Richard Henderson <[email protected]>
-
- * 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.
-
-2011-06-14 Alan Modra <[email protected]>
-
- 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.
-
-2011-06-14 Alan Modra <[email protected]>
-
- * 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
+ 2013-10-30 Alan Modra <[email protected]>
+ Ulrich Weigand <[email protected]>
+ * elf64-ppc.c (struct ppc_stub_hash_entry): Add "other".
+ (stub_hash_newfunc): Init new ppc_stub_hash_entry field, and one
+ we forgot, "plt_ent".
+ (ppc64_elf_add_symbol_hook): Check ELFv1 objects don't have
+ st_other bits only valid in ELFv2.
+ (ppc64_elf_merge_symbol_attribute): New function.
+ (ppc_type_of_stub): Add local_off param to test branch range.
+ (ppc_build_one_stub): Adjust destinations for ELFv2 locals.
+ (ppc_size_one_stub, toc_adjusting_stub_needed): Similarly.
+ (ppc64_elf_size_stubs): Pass local_off to ppc_type_of_stub.
+ Set "other" field.
+ (ppc64_elf_relocate_section): Adjust destination for ELFv2 local
calls.
-2011-04-18 Tristan Gingold <[email protected]>
+ 2013-10-30 Alan Modra <[email protected]>
+ * elf64-ppc.c (abiversion, set_abiversion): New functions.
+ (ppc64_elf_get_synthetic_symtab): Handle ELFv2 objects without .opd.
+ (struct ppc_link_hash_table): Add opd_abi.
+ (ppc64_elf_check_relocs): Check no .opd with ELFv2.
+ (ppc64_elf_merge_private_bfd_data): New function.
+ (ppc64_elf_print_private_bfd_data): New function.
+ (ppc64_elf_tls_setup): Set htab->opd_abi.
+ (ppc64_elf_size_dynamic_sections): Don't emit OPD related dynamic
+ tags for ELFv2.
+ (ppc_build_one_stub): Use R_PPC64_IRELATIVE for ELFv2 ifunc.
+ (ppc64_elf_finish_dynamic_symbol): Likewise
- * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
+ 2013-10-30 Alan Modra <[email protected]>
+ * elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base
+ reg and r12 as destination.
+ (ppc_build_one_stub): Likewise.
+ (ppc64_elf_build_stubs): Likewise for glink.
-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 (elf_x86_64_add_symbol_hook): Likewise.
-
-2011-04-11 Alan Modra <[email protected]>
-
- * 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.
-
-2011-04-10 Richard Sandiford <[email protected]>
-
- 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.
-
-2011-04-09 H.J. Lu <[email protected]>
-
- * elf32-i386.c: Update copyright year.
- * elf64-x86-64.c: Likewise.
-
-2011-04-09 Kai Tietz <[email protected]>
-
- * 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.
-
-2011-04-09 H.J. Lu <[email protected]>
-
- * elf32-i386.c (elf_i386_relocate_section): Return relocation
- error on unsupported relocation.
- * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
-
-2011-04-09 H.J. Lu <[email protected]>
-
- PR binutils/12657
- * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
- pid_t.
-
-2011-04-08 H.J. Lu <[email protected]>
-
- PR ld/12654
- * elf32-i386.c (elf_i386_relocate_section): Check !executable
- instead of shared for R_386_TLS_LDO_32.
-
-2011-04-08 Tristan Gingold <[email protected]>
-
- * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
- * coff-pmac: Remove
- * xcoff-target.h: Remove
- * Makefile.in: Regenerate.
-
-2011-04-07 Cary Coutant <[email protected]>
-
- * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
-
-2011-04-07 Paul Brook <[email protected]>
-
- * 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.
-
-2011-04-06 Joseph Myers <[email protected]>
-
- * 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.
-
-2011-04-01 Tristan Gingold <[email protected]>
-
- * elfxx-ia64.c: include bfd_stdint.h
-
-2011-03-31 Jan Kratochvil <[email protected]>
-
- * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
- dynobj and its initialization.
-
-2011-03-31 Tristan Gingold <[email protected]>
-
- * 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.
-
-2011-03-31 Tristan Gingold <[email protected]>
-
- * 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
-
-2011-03-31 Bernd Schmidt <[email protected]>
-
- * 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.
-
- * 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.
-
-2011-03-31 Tristan Gingold <[email protected]>
-
- * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
- entry on xcoff when value is C_NULL_VALUE.
-
-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.
-
-2011-03-25 Michael Snyder <[email protected]>
-
- * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
-
-2011-03-25 Tristan Gingold <[email protected]>
-
- * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
- of find_nearest_line on object files.
-
-2011-03-25 Tristan Gingold <[email protected]>
-
- * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
- Minor reordering.
- (alpha_vms_create_eisd_for_section): Make code sections read-only.
-
-2011-03-24 Alan Modra <[email protected]>
-
- * 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.
-
-2011-03-22 Eric B. Weddington <[email protected]>
-
- * bfd-in2.h: Regenerate.
-
-2011-03-22 Eric B. Weddington <[email protected]>
-
- * 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.
-
-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.
+ 2013-10-30 Alan Modra <[email protected]>
+ * reloc.c (BFD_RELOC_PPC64_ADDR16_HIGH, BFD_RELOC_PPC64_ADDR16_HIGHA,
+ BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA,
+ BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA): New.
+ * elf64-ppc.c (ppc64_elf_howto_raw): Add entries for new relocs.
+ Make all _HA and _HI relocs report signed overflow.
+ (ppc64_elf_reloc_type_lookup): Handle new relocs.
+ (must_be_dyn_reloc, ppc64_elf_check_relocs): Likewise.
+ (dec_dynrel_count, ppc64_elf_relocate_section): Likewise.
+ (ppc64_elf_relocate_section): Don't apply 0x8000 adjust to
+ R_PPC64_TPREL16_HIGHER, R_PPC64_TPREL16_HIGHEST,
+ R_PPC64_DTPREL16_HIGHER, and R_PPC64_DTPREL16_HIGHEST.
* 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]>
+2013-11-13 Yufeng Zhang <[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.
+ * elfnn-aarch64.c (elfNN_aarch64_howto_table): Use
+ R_AARCH64_TLS_DTPMOD64 instead of R_AARCH64_TLS_DTPMOD;
+ likewise for R_AARCH64_TLS_DTPREL and R_AARCH64_TLS_TPREL.
-For older changes see ChangeLog-2010
+2013-11-12 Matthew Leach <[email protected]>
+
+ * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
+ size of struct elf_prstatus.
+
+2013-11-07 Roland McGrath <[email protected]>
+
+ * archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
+ collide with bfd_mach_l1om.
+ * bfd-in2.h: Regenerate.
+
+ * elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
+ (elf_backend_object_p): Use that in elf32-i386-nacl definition.
+ * elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
+ (elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
+ (elf32_x86_64_nacl_elf_object_p): New function.
+ (elf_backend_object_p): Use that in elf32-x86-64-nacl definition.
+
+2013-11-01 Roland McGrath <[email protected]>
+
+ * elf-nacl.c (segment_eligible_for_headers): Drop requirement that
+ some section have SEC_HAS_CONTENTS set. It's not set for
+ .note.gnu.build-id, and a segment of only read-only SHT_NOBITS
+ sections is implausible and not really supportable anyway.
+
+2013-10-29 Roland McGrath <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Correct 9-byte nop
+ sequence to match what the assembler generates.
+
+2013-10-17 Alan Modra <[email protected]>
+
+ PR 16056
+ * elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
+ when finding lowest_section.
+
+2013-10-09 Roland McGrath <[email protected]>
+
+ * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch
+ expression to int to silence over-eager compiler warnings.
+
+2013-10-09 Roland McGrath <[email protected]>
+
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in
+ loop that doesn't use (or initialize) it.
+
+2013-10-09 Roland McGrath <[email protected]>
+
+ * elfxx-tilegx.c (tilegx32_plt_tail_entry, tilegx32_plt_tail_entry):
+ Move second const qualifier so it applies to the pointer.
+
+2013-10-05 Gregory Fong <[email protected]>
+
+ * elfxx-mips.c (mips_elf_create_got_section): Hide
+ _GLOBAL_OFFSET_TABLE_.
+
+2013-10-04 Will Newton <[email protected]>
+
+ * configure: Regenerate.
+ * configure.in: Build elf-ifunc.o for AArch64.
+ * elfnn-aarch64.c: Include objalloc.h.
+ (elfNN_aarch64_local_htab_hash): New function.
+ (elfNN_aarch64_local_htab_eq): New function.
+ (elfNN_aarch64_get_local_sym_hash): New function.
+ (elfNN_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
+ symbol hash.
+ (elfNN_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
+ (elfNN_aarch64_final_link_relocate): Add sym argument. Add support
+ for handling STT_GNU_IFUNC symbols.
+ (elfNN_aarch64_gc_sweep_hook): Add support for garbage collecting
+ references to STT_GNU_IFUNC symbols.
+ (elfNN_aarch64_adjust_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols.
+ (elfNN_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
+ symbols. Ensure we don't increase plt.refcount from -1 to 0.
+ (elfNN_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
+ (elfNN_aarch64_is_function_type): Remove function.
+ (elfNN_aarch64_allocate_dynrelocs): Handle STT_GNU_IFUNC symbols.
+ (elfNN_aarch64_allocate_ifunc_dynrelocs): New function.
+ (elfNN_aarch64_allocate_local_dynrelocs): New function.
+ (elfNN_aarch64_allocate_local_ifunc_dynrelocs): New function.
+ (elfNN_aarch64_size_dynamic_sections): Call
+ elfNN_aarch64_allocate_local_dynrelocs.
+ (elfNN_aarch64_create_small_pltn_entry): Add info argument.
+ Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
+ (elfNN_aarch64_finish_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols and .iplt.
+ (elfNN_aarch64_finish_local_dynamic_symbol): New function.
+ (elfNN_aarch64_finish_dynamic_sections): Call
+ elfNN_aarch64_finish_local_dynamic_symbol.
+
+2013-09-24 Alan Modra <[email protected]>
+
+ * elf32-mips.c (ELF_OSABI): Undef for vxworks.
+
+2013-09-20 Alan Modra <[email protected]>
+
+ * configure: Regenerate.
+
+2013-09-18 Tristan Gingold <[email protected]>
+
+ * configure.in: Bump version to 2.23.90
+ * configure: Regenerate.
+
+2013-09-17 Doug Gilmore <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Handle
+ EF_MIPS_FP64.
+
+2013-08-31 John David Anglin <[email protected]>
+
+ * elf64-hppa.c (elf_hppa_final_link_relocate): Add missing '%' to
+ format string.
+
+2013-08-29 Jakub Jelinek <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
+ 64-bit -mcmodel=large -fpic TLS GD and LD sequences.
+ (elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
+ TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
+
+2013-08-27 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
+ Add notice_as_needed.
+ * elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define.
+ (elf_backend_notice_as_needed): Define.
+ (ppc64_elf_as_needed_cleanup): Rename and adjust..
+ (ppc64_elf_notice_as_needed): ..to this.
+ * elflink.c (_bfd_elf_notice_as_needed): New function, extracted..
+ (elf_link_add_object_symbols): ..from here.
+ * elfxx-target.h (elf_backend_as_needed_cleanup): Don't define.
+ (elf_backend_notice_as_needed): Define..
+ (elfNN_bed): ..and use here.
+
+2013-08-26 Roland McGrath <[email protected]>
+
+ * archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros.
+ (bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros.
+ * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function.
+ (bfd_i386_nacl_arch): New variable.
+ (bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables.
+ (bfd_x64_32_arch_intel_syntax): Link them into the list.
+ * bfd-in2.h: Regenerate.
+
+2013-08-26 Roland McGrath <[email protected]>
+
+ * elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the
+ elf_segment_map list. If an executable segment is page-aligned
+ but does not end with a full page, then append a fake section into
+ the segment map entry that pads out the page.
+ (nacl_final_write_processing): New function. Write the code fill
+ laid out in nacl_modify_segment_map.
+ * elf-nacl.h: Declare it.
+ * elf32-arm.c (elf32_arm_nacl_final_write_processing): New function.
+ (elf_backend_final_write_processing): Define it for NaCl backend.
+ * elf32-i386.c (elf_backend_final_write_processing): Likewise.
+ * elf64-x86-64.c (elf_backend_final_write_processing): Likewise.
+
+ * elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE
+ parameter to MINPAGESIZE.
+ (nacl_modify_segment_map): Use minpagesize instead of maxpagesize.
+
+ * elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): #undef for NaCl.
+
+2013-08-24 Maciej W. Rozycki <[email protected]>
+
+ * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
+ set GOT's entry size if there is no ELF section data.
+ * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
+ Likewise.
+
+2013-08-23 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (get_elf_x86_64_arch_data): New.
+ (get_elf_x86_64_backend_data): Use it.
+ (elf_x86_64_size_dynamic_sections): Likewise.
+
+2013-08-23 Yuri Chornoivan <[email protected]>
+
+ PR binutils/15834
+ * bfdio.c: Fix typos.
+ * elf32-spu.c: Likewise.
+ * elfnn-aarch64.c: Likewise.
+
+2013-08-21 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Also count
+ .ovrflo sections.
+ * coffcode.h (coff_compute_section_file_positions): Force
+ match between file offset and vma offset.
+
+2013-08-21 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
+ and *poldalignment before exiting when !relocs_compatible.
+
+2013-08-21 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
+ symbols to STV_HIDDEN.
+
+2013-08-14 John Tytgat <[email protected]>
+
+ PR ld/15787
+ * elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output
+ segment containing the relocating symbol instead of assuming 0 for
+ sb group relocations.
+
+2013-08-09 Nick Clifton <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10
+ flag bits do not match.
+ (rl78_elf_print_private_bfd_data): Describe G10 flag.
+
+2013-08-05 John Tytgat <[email protected]>
+
+ * po/BLD-POTFILES.in: Regenerate.
+ * po/SRC-POTFILES.in: Likewise.
+
+2013-07-31 John Tytgat <[email protected]>
+
+ PR ld/15787
+ * elf32-arm.c (elf32_arm_final_link_relocate): Base SB on the
+ output section VMA.
+
+2013-07-28 Maciej W. Rozycki <[email protected]>
+
+ * elf64-hppa.c (elf64_hppa_finish_dynamic_sections)
+ <DT_HP_LOAD_MAP>: Return unsuccessfully if there's no `.data'
+ section.
+
+2013-07-27 Andrew Pinski <[email protected]>
+
+ * elfnn-aarch64.c (elfNN_aarch64_check_relocs):
+ Use the correct alignment for
+ _bfd_elf_make_dynamic_reloc_section for ILP32.
+
+2013-07-27 Andrew Pinski <[email protected]>
+
+ * elfnn-aarch64.c (elfNN_aarch64_howto_from_bfd_reloc): Handle
+ BFD_RELOC_AARCH64_NONE explicitly.
+
+2013-07-27 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_finish_dynamic_sections): Don't set GOT's
+ entry size if there is no ELF section data.
+
+2013-07-27 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32, R_VAX_PLT32>:
+ Don't check symbol visibility here. Remove a check already
+ asserted for.
+ (elf_vax_instantiate_got_entries): Use SYMBOL_REFERENCES_LOCAL
+ instead of individual checks.
+ (elf_vax_relocate_section) <R_VAX_GOT32, R_VAX_PLT32>: Only
+ check the offset to decide if produce a GOT or PLT entry.
+ Remove redundant assertions. Remove code to produce GOT entries
+ for local symbols. Remove a duplicate comment and add a comment
+ on GOT relocations.
+ (elf_vax_finish_dynamic_symbol): Remove code to produce RELATIVE
+ dynamic relocs.
+
+2013-07-27 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_always_size_sections): Correct a comment
+ typo.
+
+2013-07-27 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_discard_got_entries): New function.
+ (elf_vax_always_size_sections): Likewise.
+ (elf_vax_size_dynamic_sections): Remove code moved to
+ elf_vax_always_size_sections. Make comment on
+ elf_vax_instantiate_got_entries match reality.
+ (elf_vax_instantiate_got_entries): Assert that rather than check
+ if dynobj is null. Don't check for dynamic_sections_created.
+ Make function description match reality.
+ (elf_backend_always_size_sections): New macro.
+
+2013-07-25 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (struct ppc64_elf_obj_tdata): Replace opd_relocs
+ with a union.
+ (opd_entry_value): Cache .opd section contents.
+ (ppc64_elf_relocate_section): Adjust.
+
+2013-07-25 Alan Modra <[email protected]>
+
+ PR ld/15762
+ PR ld/12761
+ * elflink.c (elf_link_add_object_symbols): Correct test in
+ last patch. Remove unnecessary code.
+
+2013-07-24 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
+ R_RBR. Add numbers in comments.
+ (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16.
+ * coff64-rs6000.c: Likewise.
+
+2013-07-20 Alan Modra <[email protected]>
+
+ PR ld/15762
+ PR ld/12761
+ * elflink.c (elf_link_add_object_symbols): Don't clobber
+ .gnu.warning.symbol sections when shared.
+
+2013-07-19 Nick Clifton <[email protected]>
+
+ * elf32-rx.c (rx_elf_relocate_section): Fix typo: move
+ saw_subtract from R_RX_OPdiv to R_RX_OPneg.
+
+2013-07-18 Travis Snoozy <[email protected]>
+
+ PR ld/15721
+ * elf32-msp430.c (R_MSP430_10_PCREL): Use 10-bit source and
+ destination masks.
+ * R_MSP430_2X_PCREL: Likewise.
+ * R_MSP430X_10_PCREL: Likewise.
+ * R_MSP430X_2X_PCREL: Likewise.
+
+2013-07-18 Terry Guo <[email protected]>
+
+ * elf32-arm.c (arm_type_of_stub): Don't use ST_BRANCH_TO_ARM for
+ thumb only targets.
+ (elf32_arm_final_link_relocate): Likewise.
+
+2013-07-18 Bill Neubauer <[email protected]>
+
+ * mach-o.c (mach_o_section_name_xlat dw): Add entry for
+ .debug_gdb_scripts
+
+2013-07-18 Roland McGrath <[email protected]>
+
+ * elf32-arm.c (elf32_arm_stub_long_branch_arm_nacl): New variable.
+ (elf32_arm_stub_long_branch_arm_nacl_pic): New variable.
+ (arm_build_one_stub): Increase MAXRELOCS to 3.
+ (arm_type_of_stub): Use them if GLOBALS->nacl_p.
+ (struct elf32_arm_link_hash_table): Give add_stub_section member's
+ pointee type a third argument.
+ (elf32_arm_create_or_find_stub_sec): Update caller.
+ (elf32_arm_size_stubs): Update argument type.
+ * bfd-in.h (elf32_arm_size_stubs): Update decl.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2013-07-15 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded
+ magic numbers with enum values.
+
+2013-07-12 Roland McGrath <[email protected]>
+
+ * reloc.c: Add BFD_RELOC_390_PC12DBL, BFD_RELOC_390_PLT12DBL,
+ BFD_RELOC_390_PC24DBL, BFD_RELOC_390_PLT24DBL (should have
+ been added here with 2013-07-05 elf32-s390.c change).
+ * bfd-in2.h: Regenerate (no-op).
+ * libbfd.h: Regenerate (no-op).
+
+2013-07-12 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
+ EF_MIPS_NAN2008.
+ (_bfd_mips_elf_print_private_bfd_data): Likewise.
+
+2013-07-09 Tristan Gingold <[email protected]>
+
+ * vms-alpha.c (struct vms_private_data_struct): Remove
+ flag_hash_long_names and flag_show_after_trunc.
+ (hash_string): Remove.
+ (_bfd_vms_length_hash_symbol): Remove.
+ (alpha_vms_write_exec): Remove call to _bfd_vms_length_hash_symbol.
+ (_bfd_vms_write_egsd): Likewise. Rewrite condition.
+ (_bfd_vms_write_ehdr): Remove code that set removed flags.
+ (_bfd_vms_write_etir): Remove call to _bfd_vms_length_hash_symbol.
+ (vms_bfd_is_local_label_name): Remove trace call.
+
+2013-07-09 Tristan Gingold <[email protected]>
+
+ * hosts/alphavms.h: Include config.h and ansidecl.h, remove useless
+ macros.
+ * configure.com: Adjust to match changes in configure.
+ * makefile.vms (OBJS): Update list.
+
+2013-07-05 Tristan Gingold <[email protected]>
+
+ * coffcode.h (coff_write_object_contents): Use ".ovrflo" name for
+ overflow sections.
+
+2013-07-05 Andreas Krebbel <[email protected]>
+
+ * elf32-s390.c: Add new relocation definitions R_390_PC12DBL,
+ R_390_PLT12DBL, R_390_PC24DBL, and R_390_PLT24DBL.
+ (elf_s390_reloc_type_lookup, elf_s390_check_relocs)
+ (elf_s390_gc_sweep_hook, elf_s390_relocate_section): Support new
+ relocations.
+ * elf64-s390.c: See elf32-s390.c
+ * bfd-in2.h: Add new relocs to enum bfd_reloc_code_real.
+ * libbfd.h: Add new reloc strings.
+
+2013-07-03 Marcus Shawcroft <[email protected]>
+
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reorder case
+ values.
+ (elfNN_aarch64_relocate_section): Likewise.
+ (elfNN_aarch64_gc_sweep_hook): Likewise.
+ (elfNN_aarch64_check_relocs): Likewise.
+
+2013-07-03 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
+ when relocatable. Don't change root.type or type here.
+ (ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.
+
+2013-07-03 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
+ (ppc64_elf_size_stubs): Don't set "addend".
+ (ppc64_elf_relocate_section): Don't allow calls via
+ toc-adjusting stubs without a following nop even in an
+ executable, except for self-calls and both libc_start_main
+ and .libc_start_main.
+
+2013-07-03 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".
+
+2013-07-02 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (xcoff_find_nearest_line_discriminator): Add missing
+ line.
+
+2013-07-02 Tristan Gingold <[email protected]>
+
+ * vms-alpha.c (_bfd_generic_find_nearest_line_discriminator): Define.
+ (_bfd_vms_find_nearest_line_discriminator): New function.
+
+2013-07-02 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.
+
+2013-07-02 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function.
+ (rs6000coff_vec): Reference it.
+
+2013-07-02 Marcus Shawcroft <[email protected]>
+
+ * elfnn-aarch64.c (aarch64_elf_create_got_section): New.
+ (elfNN_aarch64_check_relocs): Use aarch64_elf_create_got_section.
+ (elfNN_aarch64_create_dynamic_sections): Do not define
+ _GLOBAL_OFFSET_TABLE_; call aarch64_elf_create_got_section.
+
+2013-07-02 Marcus Shawcroft <[email protected]>
+
+ * ld-aarch64/emit-relocs-309-low.d: Adjust .text address.
+ * ld-aarch64/emit-relocs-309-up.d: Adjust .got address.
+ * ld-aarch64/emit-relocs-312.d: Adjust offsets into .got.
+ * ld-aarch64/tls-relax-all.d: Likewise.
+ * ld-aarch64/gc-got-relocs.d: Adjust expected .got content.
+ * ld-aarch64/gc-tls-relocs.d: Likewise.
+ * ld-aarch64/tls-relax-gd-ie.d: Likewise.
+ * ld-aarch64/tls-relax-gdesc-ie-2.d: Likewise.
+ * ld-aarch64/tls-relax-gdesc-ie.d: Likewise.
+
+2013-07-02 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
+ .TOC. after relocatable check.
+
+2013-07-01 Alan Modra <[email protected]>
+
+ * elf64-ppc.h (ppc64_elf_toc): Delete.
+ (ppc64_elf_set_toc): Declare.
+ * elf64-ppc.c (ppc64_elf_toc_reloc): Replace call to ppc64_elf_toc
+ with call the ppc64_elf_set_toc.
+ (ppc64_elf_toc_ha_reloc, ppc64_elf_toc64_reloc): Likewise.
+ (ppc64_elf_start_multitoc_partition): Likewise.
+ (struct ppc_link_hash_table): Delete dot_toc_dot. Replace all uses
+ with elf.hgot.
+ (ppc64_elf_process_dot_syms): Don't make a fake function descriptor
+ for ".TOC.".
+ (ppc64_elf_check_relocs): Mark sections with a reference to .TOC.
+ as needing a toc pointer.
+ (ppc64_elf_size_stubs): Don't set dot_toc_dot here.
+ (ppc64_elf_set_toc): Rename from ppc64_elf_toc. Add info param.
+ Set elf.hgot value.
+
+2013-06-28 H.J. Lu <[email protected]>
+
+ PR ld/15685
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
+ R_X86_64_DTPOFF64.
+
+2013-06-28 Nick Clifton <[email protected]>
+
+ PR ld/15302
+ * elf32-arm.c (allocate_dynrelocs_for_symbol): Revert previous patch.
+
+2013-06-27 Marcus Shawcroft <[email protected]>
+
+ * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Reserve one slot
+ in sgot.
+ (elfNN_aarch64_finish_dynamic_sections): Place the &_DYNAMIC reference
+ in sgot[0] rather than sgotplt[0].
+
+2013-06-26 Yufeng Zhang <[email protected]>
+
+ * Makefile.am (elf32-aarch64.c): Add a #line cpp directive at the
+ beginning of the generated file.
+ (elf64-aarch64.c): Likewise.
+ * Makefile.in: Re-generated.
+
+2013-06-26 Yufeng Zhang <[email protected]>
+
+ * Makefile.am (BFD64_BACKENDS): Add elfxx-aarch64.c.
+ (BFD64_BACKENDS_CFILES): Add elfxx-aarch64.lo.
+ * Makefile.in: Re-generated.
+ * configure.in (bfd_elf64_bigaarch64_vec): Add elfxx-aarch64.lo.
+ (bfd_elf64_littleaarch64_vec): Likewise.
+ (bfd_elf32_bigaarch64_vec): Likewise.
+ (bfd_elf32_littleaarch64_vec): Likewise.
+ * configure: Re-generated.
+ * elfxx-aarch64.c: New file; split from elf64-aarch64.c.
+ * elfxx-aarch64.h: New file.
+ * elfnn-aarch64.c: Include "elfxx-aarch64.h"; move the following
+ stuff to elfxx-aarch64.c.
+ (bfd_elf_aarch64_put_addend): Removed.
+ (PG_OFFSET, PG): Likewise.
+ (elfNN_aarch64_small_plt0_entry): Support ELF32.
+ (elfNN_aarch64_tlsdesc_small_plt_entry): Likewise.
+ (elf64_aarch64_grok_prstatus): Removed.
+ (elf_backend_grok_prstatus): Removed.
+ (insn32): Likewise.
+ (aarch64_unsigned_overflow): Likewise.
+ (aarch64_signed_overflow): Likewise.
+ (aarch64_resolve_relocation): Likewise.
+ (MASK): Likewise.
+ (decode_branch_ofs_26): Likewise.
+ (decode_cond_branch_ofs_19): Likewise.
+ (decode_ld_lit_ofs_19): Likewise.
+ (decode_tst_branch_ofs_14): Likewise.
+ (decode_movw_imm): Likewise.
+ (decode_adr_imm): Likewise.
+ (decode_add_imm): Likewise.
+ (reencode_branch_ofs_26): Likewise.
+ (reencode_cond_branch_ofs_19): Likewise.
+ (reencode_ld_lit_ofs_19): Likewise.
+ (reencode_tst_branch_ofs_14): Likewise.
+ (reencode_movw_imm): Likewise.
+ (reencode_adr_imm): Likewise.
+ (reencode_ldst_pos_imm): Likewise.
+ (reencode_add_imm): Likewise.
+ (reencode_movzn_to_movz): Likewise.
+ (reencode_movzn_to_movn): Likewise.
+ (aarch64_relocate): Update to call the new function names in
+ elfxx-aarch64.c.
+ (aarch64_calculate_got_entry_vma): Likewise.
+ (elfNN_aarch64_final_link_relocate): Likewise.
+ (elf64_aarch64_update_plt_entry): Likewise; change the type of the
+ parameter 'r_type' to bfd_reloc_code_real_type; rename to ...
+ (elf_aarch64_update_plt_entry): ... this.
+ (elfNN_aarch64_create_small_pltn_entry): Update.
+ (elfNN_aarch64_init_small_plt0_entry): Remove plt_got_base; add
+ bfd_vma plt_got_2nd_ent; update to call elf_aarch64_update_plt_entry.
+ (elfNN_aarch64_finish_dynamic_sections): Add plt_entry; update to
+ call elf_aarch64_update_plt_entry.
+
+2013-06-26 Yufeng Zhang <[email protected]>
+
+ * bfd-in2.h: Re-generated.
+ * elfnn-aarch64.c (HOWTO64, HOWTO32): New define.
+ (IS_AARCH64_TLS_RELOC): Change to be based on the
+ bfd reloc enumerators.
+ (IS_AARCH64_TLSDESC_RELOC): Likewise.
+ (PG, PG_OFFSET): Cast literal to bfd_vma.
+ (elf64_aarch64_howto_table): Removed.
+ (elf64_aarch64_howto_dynrelocs): Removed.
+ (elf64_aarch64_tls_howto_table): Removed.
+ (elf64_aarch64_tlsdesc_howto_table): Removed.
+ (elfNN_aarch64_howto_table): New table to host all howto entires..
+ (R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*).
+ (elfNN_aarch64_bfd_reloc_from_howto): New function.
+ (elfNN_aarch64_bfd_reloc_from_type): Ditto.
+ (struct elf_aarch64_reloc_map): New.
+ (elf_aarch64_reloc_map): New table.
+ (elfNN_aarch64_howto_from_bfd_reloc): New function.
+ (elfNN_aarch64_howto_from_type): Update to look up the new table
+ elfNN_aarch64_howto_table.
+ (struct elf64_aarch64_reloc_map): Remove.
+ (elf64_aarch64_reloc_map): Remove.
+ (elfNN_aarch64_reloc_type_lookup): Change to call
+ elfNN_aarch64_howto_from_bfd_reloc.
+ (elfNN_aarch64_reloc_name_lookup): Change to look up the new table
+ elfNN_aarch64_howto_table.
+ (aarch64_resolve_relocation): Refactor to switch on the bfd
+ reloc enumerators.
+ (bfd_elf_aarch64_put_addend): Likewise.
+ (elfNN_aarch64_final_link_relocate): Likewise.
+ (aarch64_tls_transition_without_check): Likewise.
+ (aarch64_reloc_got_type): Likewise.
+ (aarch64_can_relax_tls): Likewise.
+ (aarch64_tls_transition): Likewise.
+ (elfNN_aarch64_tls_relax): Likewise.
+ (elfNN_aarch64_final_link_relocate): Likewise.
+ (elfNN_aarch64_relocate_section): Likewise.
+ (elfNN_aarch64_gc_sweep_hook): Likewise.
+ (elfNN_aarch64_check_relocs): Likewise.
+ (aarch64_tls_transition): Change to return a bfd reloc enumerator.
+ * libbfd.h: Re-generated.
+ * reloc.c: Re-order the AArch64 bfd reloc enumerators.
+ (BFD_RELOC_AARCH64_RELOC_START)
+ (BFD_RELOC_AARCH64_RELOC_END)
+ (BFD_RELOC_AARCH64_LD_GOT_LO12_NC)
+ (BFD_RELOC_AARCH64_LD32_GOT_LO12_NC)
+ (BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC)
+ (BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC)
+ (BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC)
+ (BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC)
+ (BFD_RELOC_AARCH64_IRELATIVE): New relocs.
+
+2013-06-26 Yufeng Zhang <[email protected]>
+
+ * Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo.
+ (BUILD_CFILES): Add elf32-aarch64.c.
+ (elf32-aarch64.c): New rule for generating from elfnn-aarch64.c.
+ * Makefile.in: Re-generated.
+ * archures.c (bfd_mach_aarch64_ilp32): New define.
+ * bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration.
+ (bfd_elf32_aarch64_set_options): Ditto.
+ (elf32_aarch64_setup_section_lists): Ditto.
+ (elf32_aarch64_next_input_section): Ditto.
+ (elf32_aarch64_size_stubs): Ditto.
+ (elf32_aarch64_build_stubs): Ditto.
+ * bfd-in2.h: Re-generated.
+ * config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec
+ and bfd_elf32_bigaarch64_vec.
+ (aarch64-*-linux*): Likewise.
+ (aarch64_be-*-elf): Likewise.
+ (aarch64_be-*-linux*): Likewise.
+ * configure.in (bfd_elf32_bigaarch64_vec)
+ (bfd_elf32_littleaarch64_vec): New.
+ * configure: Re-generated.
+ * cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with
+ lp64 ones.
+ (bfd_aarch64_arch_ilp32): New.
+ (bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32.
+ * elfnn-aarch64.c (ARCH_SIZE): New define.
+ (AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines.
+ (GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8).
+ (elf64_aarch64_*): Rename to elfNN_aarch64_*.
+ (ELF64_R_*): Rename to ELFNN_R_*.
+ Plus other paramaterization.
+ * targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec):
+ New declarations.
+ (_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and
+ bfd_elf32_littleaarch64_vec.
+
+2013-06-26 Yufeng Zhang <[email protected]>
+
+ * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-aarch64.c.
+ (BUILD_CFILES): Add elf64-aarch64.c.
+ (elf64-aarch64.c): New rule for generating from elfnn-aarch64.c.
+ * Makefile.in: Re-generated.
+ * elf64-aarch64.c: Rename to ...
+ * elfnn-aarch64.c: ... this.
+
+2013-06-25 Maciej W. Rozycki <[email protected]>
+ Paul Brook <[email protected]>
+
+ * elfxx-mips.h (_bfd_mips_elf_insn32): New prototype.
+ * elfxx-mips.c (mips_elf_link_hash_table): Add insn32 member.
+ (STUB_MOVE32_MICROMIPS, STUB_JALR32_MICROMIPS): New macros.
+ (MICROMIPS_INSN32_FUNCTION_STUB_NORMAL_SIZE): Likewise.
+ (MICROMIPS_INSN32_FUNCTION_STUB_BIG_SIZE): Likewise.
+ (micromips_insn32_o32_exec_plt0_entry): New variable.
+ (micromips_insn32_o32_exec_plt_entry): Likewise.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Handle insn32 mode.
+ (mips_elf_estimate_stub_size): Likewise.
+ (_bfd_mips_elf_size_dynamic_sections): Likewise.
+ (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
+ (mips_finish_exec_plt): Likewise.
+ (_bfd_mips_elf_relax_section): Likewise.
+ (_bfd_mips_elf_insn32): New function.
+ (_bfd_mips_elf_get_synthetic_symtab): Handle insn32 PLT.
+
+2013-06-24 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New
+ prototype.
+ * elf32-mips.c (elf_backend_plt_sym_val): Remove macro.
+ (bfd_elf32_get_synthetic_symtab): New macro.
+ * elfxx-mips.c (plt_entry): New structure.
+ (mips_elf_link_hash_entry): Add use_plt_entry member.
+ (mips_elf_link_hash_table): Rename plt_entry_size member to
+ plt_mips_entry_size. Add plt_comp_entry_size, plt_mips_offset,
+ plt_comp_offset, plt_got_index entries and plt_header_is_comp
+ members.
+ (STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros.
+ (STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise.
+ (STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise.
+ (STUB_LI16S_MICROMIPS): Likewise.
+ (MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise.
+ (MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
+ (micromips_o32_exec_plt0_entry): New variable.
+ (mips16_o32_exec_plt_entry): Likewise.
+ (micromips_o32_exec_plt_entry): Likewise.
+ (mips_elf_link_hash_newfunc): Initialize use_plt_entry.
+ (mips_elf_output_extsym): Update to use gotplt_union's plist
+ member rather than offset.
+ (mips_elf_gotplt_index): Likewise. Remove the VxWorks
+ restriction. Use MIPS_ELF_GOT_SIZE to calculate GOT address.
+ (mips_elf_count_got_symbols): Update to use gotplt_union's plist
+ member rather than offset.
+ (mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT
+ entries.
+ (_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes
+ here.
+ (mips_elf_make_plt_record): New function.
+ (_bfd_mips_elf_check_relocs): Update comment. Record occurences
+ of JAL relocations that might need a PLT entry.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Update to use
+ gotplt_union's plist member rather than offset. Set individual
+ PLT entry sizes here. Handle MIPS16/microMIPS PLT entries.
+ Don't set the symbol's value in the symbol table for PLT
+ references here. Don't set the PLT or PLT GOT section sizes
+ here.
+ (mips_elf_estimate_stub_size): Handle microMIPS stubs.
+ (mips_elf_allocate_lazy_stub): Likewise.
+ (mips_elf_lay_out_lazy_stubs): Likewise. Define a _MIPS_STUBS_
+ magic symbol.
+ (mips_elf_set_plt_sym_value): New function.
+ (_bfd_mips_elf_size_dynamic_sections): Set PLT header size and
+ PLT and PLT GOT section sizes here. Set the symbol values in
+ the symbol table for PLT references here. Handle microMIPS
+ annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol.
+ (_bfd_mips_elf_finish_dynamic_symbol): Update to use
+ gotplt_union's plist member rather than offset. Handle
+ MIPS16/microMIPS PLT entries. Handle microMIPS stubs.
+ (_bfd_mips_vxworks_finish_dynamic_symbol): Update to use
+ gotplt_union's plist member rather than offset. Use
+ MIPS_ELF_GOT_SIZE to calculate GOT address.
+ (mips_finish_exec_plt): Handle microMIPS PLT. Return status.
+ (_bfd_mips_elf_finish_dynamic_sections): Handle result from
+ mips_finish_exec_plt.
+ (_bfd_mips_elf_link_hash_table_create): Update to use
+ gotplt_union's plist member rather than offset.
+ (_bfd_mips_elf_get_synthetic_symtab): New function.
+
+2013-06-24 Wawa <[email protected]>
+
+ PR 15657
+ * hash.c (_bfd_stringtab_add): Copy the string if COPY is true.
+
+2013-06-23 Richard Sandiford <[email protected]>
+
+ * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
+ files to...
+ (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
+ * Makefile.in: Regenerate.
+ * config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
+ Set want64 to true for them at the end.
+ * targets.c (_bfd_target_vector): Protect MIPS ELF targets with
+ #ifdef BFD64.
+
+2013-06-22 Sandra Loosemore <[email protected]>
+
+ * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Don't
+ set sh_entsize for PLT section.
+
+2013-06-20 Yufeng Zhang <[email protected]>
+
+ * bfd-in.h (bfd_elf64_aarch64_set_options): Add 'extern'.
+ * bfd-in2.h: Re-generated.
+ * elf64-aarch64.c (RELOC_SECTION): Removed.
+ (SWAP_RELOC_IN, SWAP_RELOC_OUT): Ditto.
+ (AARCH64_ELF_OS_ABI_VERSION): Ditto.
+ (elf64_aarch64_link_hash_traverse): Ditto.
+ (elf64_aarch64_size_stubs): Change 'Aarch64' to 'AArch64' in the
+ comment.
+
+2013-06-19 Will Newton <[email protected]>
+
+ * configure: Regenerated.
+ * configure.in: Remove aarch64 dependency on elf-ifunc.c.
+ * elf64-aarch64.c: Remove objalloc.h include.
+ (elf64_aarch64_howto_dynrelocs): Remove R_AARCH64_IRELATIVE howto.
+ (struct elf64_aarch64_link_hash_table): Remove ifunc related
+ members. (elf_aarch64_local_htab_hash): Remove function.
+ (elf_aarch64_local_htab_eq): Remove function.
+ (elf_aarch64_get_local_sym_hash): Remove function.
+ (elf64_aarch64_link_hash_table_create): Remove local hash
+ table initialization.
+ (elf64_aarch64_final_link_relocate): Remove sym argument and
+ handling of ifunc symbols.
+ (elf64_aarch64_relocate_section): Don't pass sym argument to
+ elf64_aarch64_final_link_relocate.
+ (elf64_aarch64_gc_sweep_hook): Remove handling of ifunc symbols.
+ (elf64_aarch64_adjust_dynamic_symbol): Likewise.
+ (elf64_aarch64_check_relocs): Likewise.
+ (elf64_aarch64_post_process_headers): Remove call to
+ _bfd_elf_set_osabi.
+ (elf64_aarch64_is_function_type): New function.
+ (elf64_aarch64_allocate_dynrelocs): Remove handling of ifunc
+ symbols. (elf_aarch64_allocate_local_dynrelocs): Remove function.
+ (elf64_aarch64_size_dynamic_sections): Remove call to
+ elf_aarch64_allocate_local_dynrelocs.
+ (elf64_aarch64_create_small_pltn_entry): Remove info argument.
+ Remove creation of R_AARCH64_IRELATIVE dynamic relocs.
+ (elf64_aarch64_finish_dynamic_symbol): Remove handling of ifunc
+ symbols. (elf_aarch64_finish_local_dynamic_symbol): Remove
+ function. (elf64_aarch64_finish_dynamic_sections): Remove call to
+ elf_aarch64_finish_local_dynamic_symbol.
+ (elf64_aarch64_add_symbol_hook): Remove function.
+
+2013-06-14 Yufeng Zhang <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
+ aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
+ handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
+ R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
+ R_AARCH64_GOT_LD_PREL19.
+
+2013-06-13 Terry Guo <[email protected]>
+
+ PR ld/15302
+ * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
+ ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
+ supports thumb instructions.
+
+2013-06-11 DJ Delorie <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
+
+2013-06-11 Will Newton <[email protected]>
+
+ * elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
+ ELF64_R_SYM instead of ELF32_R_SYM.
+
+2013-06-11 Nick Clifton <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
+ checks if the dynamic sections have been created and relaxation
+ has not been performed.
+
+2013-06-07 Will Newton <[email protected]>
+
+ * configure: Regenerate.
+ * configure.in: Build elf-ifunc.o for AArch64.
+ * elf64-aarch64.c: Include objalloc.h.
+ (elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
+ (struct elf64_aarch64_link_hash_table): Add members for handling
+ R_AARCH64_IRELATIVE relocations.
+ (elf_aarch64_local_htab_hash): New function.
+ (elf_aarch64_local_htab_eq): New function.
+ (elf_aarch64_get_local_sym_hash): New function.
+ (elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
+ symbol hash.
+ (elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
+ (elf64_aarch64_final_link_relocate): Add sym argument. Add support
+ for handling STT_GNU_IFUNC symbols.
+ (elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
+ references to STT_GNU_IFUNC symbols.
+ (elf64_aarch64_adjust_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols.
+ (elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
+ symbols. Ensure we don't increase plt.refcount from -1 to 0.
+ (elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
+ (elf64_aarch64_is_function_type): Remove function.
+ (elf64_aarch64_allocate_dynrelocs): Call
+ _bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
+ (elf_aarch64_allocate_local_dynrelocs): New function.
+ (elf64_aarch64_size_dynamic_sections): Call
+ elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
+ (elf64_aarch64_create_small_pltn_entry): Add info argument.
+ Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
+ (elf64_aarch64_finish_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols and .iplt.
+ (elf_aarch64_finish_local_dynamic_symbol): New function.
+ (elf64_aarch64_finish_dynamic_sections): Call
+ elf_aarch64_finish_local_dynamic_symbol.
+ (elf64_aarch64_add_symbol_hook): New function.
+
+2013-06-03 Alan Modra <[email protected]>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Add last_str
+ var. Use it with last_stab.
+
+2013-05-30 Paul Brook <[email protected]>
+
+ * bfd-in2.h: Regenerate.
+ * elf32-mips.c (elf_mips_eh_howto): New.
+ (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
+ (bfd_elf32_bfd_reloc_name_lookup): Likewise.
+ (mips_elf32_rtype_to_howto): Support R_MIPS_EH.
+ * elf64-mips.c (elf_mips_eh_howto): New.
+ (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
+ (bfd_elf64_bfd_reloc_name_lookup): Likewise.
+ (mips_elf64_rtype_to_howto): Support R_MIPS_EH.
+ * libbfd.h: Regenerate.
+ * reloc.c (BFD_RELOC_MIPS_EH): New.
+
+2013-05-29 Nick Clifton <[email protected]>
+
+ * dwarf2.c (struct dwarf2_debug): Add fields for handling
+ alternate debug info source.
+ (dwarf_debug_sections): Add entries for alternate .debug_str and
+ .debug_info sections.
+ (dwarf_debug_section_enum): Likewise.
+ (read_alt_indirect_string): New function. Handles a
+ DW_FORM_GNU_strp_alt attribute.
+ (read_alt_indirect_ref): New function. Handles a
+ DW_FORM_GNU_ref_alt attribute.
+ (read_attribute_value): Process DW_FORM_GNU_ref_alt and
+ DW_FORM_GNU_strp_alt.
+ (find_abstract_instance_name): Handle DW_FORM_GNU_ref_alt
+ attributes.
+ (_bfd_dwarf2_cleanup_debug_info): Free alternate debug info
+ sources.
+ * opncls.c (GNU_DEBUGALTLINK): Define.
+ (bfd_get_alt_debug_link_info): New function.
+ (separate_alt_debug_file_exists): New function.
+ (find_separate_debug_file): Add parameters for fetch and check
+ functions.
+ (bfd_follow_gnu_debugaltlink): New function.
+ * bfd-in2.h: Regenerate.
+
+2013-05-28 Yufeng Zhang <[email protected]>
+
+ * reloc.c (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
+ (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21): ... this.
+ (BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
+ (BFD_RELOC_AARCH64_TLSDESC_LD_PREL19): ... this.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf64-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Update to use
+ the correct names.
+ (elf64_aarch64_tlsdesc_howto_table): Likewise.
+ (elf64_aarch64_reloc_map): Likewise.
+ (aarch64_resolve_relocation): Likewise.
+ (bfd_elf_aarch64_put_addend): Likewise.
+ (aarch64_tls_transition_without_check): Likewise.
+ (aarch64_reloc_got_type): Likewise.
+ (elf64_aarch64_final_link_relocate): Likewise.
+ (elf64_aarch64_tls_relax): Likewise.
+ (elf64_aarch64_relocate_section): Likewise.
+ (elf64_aarch64_gc_sweep_hook): Likewise.
+ (elf64_aarch64_check_relocs): Likewise.
+
+2013-05-26 Mark Wielaard <[email protected]>
+
+ * cache.c (BFD_CACHE_MAX_OPEN): Remove define.
+ (max_open_files): New static int initialized to zero.
+ (bfd_cache_max_open): New static function to set and return
+ max_open_files.
+ (bfd_cache_init): Use bfd_cache_max_open.
+ (bfd_open_file): Likewise.
+ * configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
+ (AC_CHECK_FUNCS): Add getrlimit.
+ * configure: Regenerated.
+ * config.in: Likewise.
+ * sysdep.h: Check and include sys/resource.h for getrlimit.
+
+2013-05-23 Alan Modra <[email protected]>
+
+ * format.c (bfd_check_format_matches): Don't match a target in
+ targ_selvecs if some other target is a better match. If
+ targets implement match priority, fall back to the first of
+ the best matches.
+
+2013-05-22 Eric Herman <[email protected]>
+
+ PR binutils/15462
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
+
+2013-05-22 Ralf Dreesen <[email protected]>
+
+ PR binutils/15474
+ * srec.c (srec_set_section_contents): Properly convert size
+ and offset to address when octets_per_byte is not unity.
+
+2013-05-20 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
+ refcount member of the gotplt_union when resetting the reference
+ count. Adjust comment.
+
+2013-05-20 Will Newton <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
+ relocs_copied member.
+ (elf64_aarch64_link_hash_newfunc): Remove initialization of
+ relocs_copied member.
+ (elf64_aarch64_copy_indirect_symbol): Remove code to copy
+ relocs_copied member.
+
+2013-05-19 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
+ function definition.
+
+2013-05-16 Cary Coutant <[email protected]>
+
+ * ecoff.c (ecoff_link_check_archive_element): Add initializers for
+ external_ext_size and esize.
+
+2013-05-16 Tristan Gingold <[email protected]>
+
+ * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
+ * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
+
+2013-05-15 Andreas Schwab <[email protected]>
+
+ * elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
+
+2013-05-10 Joel Brobecker <[email protected]>
+
+ * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
+ of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.
+
+2013-05-09 Joel Brobecker <[email protected]>
+
+ * bfd.c (_bfd_default_error_handler): Replace use of putc
+ by fputc. Add comment explaining why.
+
+2013-05-09 Alan Modra <[email protected]>
+
+ * elflink.c (elf_link_add_object_symbols): Don't omit reading
+ of symbols when hashes already exist.
+
+2013-05-07 Will Newton <[email protected]>
+
+ * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
+ plt_header_size argument for ports where it differs from
+ plt_entry_size.
+ * elf-bfd.h: Likewise.
+ * elf32-i386.c: Pass plt_header_size to
+ _bfd_elf_allocate_ifunc_dyn_relocs.
+ * elf64-x86-64.c: Likewise.
+
+2013-05-07 Will Newton <[email protected]>
+
+ * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
+ function.
+ * elf-bfd.h: Likewise.
+
+2013-05-06 Paul Brook <[email protected]>
+
+ * elf64-mips.c (elf_mips_gnu_pcrel32): New.
+ (bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
+ mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
+ * elfn32-mips.c (elf_mips_gnu_pcrel32): New.
+ (bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
+ mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.
+
+2013-05-06 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (opd_entry_value): Handle case where symbol
+ hashes are not available.
+
+2013-05-06 Alan Modra <[email protected]>
+
+ * elflink.c (elf_link_add_object_symbols): Don't save symbol
+ hashes around loading as-needed library. Zero them on allocation,
+ and restore to initial all-zero state if library not needed.
+ Arrange to reuse hashes if we load library again later.
+
+2013-05-04 Richard Sandiford <[email protected]>
+
+ * elf32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto):
+ Use _bfd_mips_elf_generic_reloc instead of bfd_elf_generic_reloc.
+ * elfn32-mips.c: Likewise.
+ * elf64-mips.c: Likewise.
+
+2013-05-02 Nick Clifton <[email protected]>
+
+ * archures.c: Add some more MSP430 machine numbers.
+ * config.bfd (msp430): Define targ_selvecs.
+ * configure.in: Add bfd_elf32_msp430_ti_vec.
+ * cpu-msp430.c: Add some more MSP430 machine numbers.
+ * elf32-msp430.c Add support for MSP430X relocations.
+ Add support for TI compiler generated relocations.
+ Add support for sym_diff relocations.
+ Add support for relaxing out of range short branches into long
+ branches.
+ Add support for MSP430 attribute section.
+ * reloc.c: Add MSP430X relocations.
+ * targets.c: Add bfd_elf32_msp430_ti_vec.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * libbfd.h: Regenerate.
+
+2013-05-01 Maciej W. Rozycki <[email protected]>
+
+ * config.bfd: Replace alpha*-*-linuxecoff* pattern with
+ alpha*-*-linux*ecoff*.
+
+2013-04-30 Olaf Flebbe <[email protected]>
+
+ PR binutils/15417
+ * elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
+ zero.
+
+2013-04-30 Alan Modra <[email protected]>
+
+ * elflink.c (bfd_elf_record_link_assignment): Dont make
+ STV_INTERNAL symbols STV_HIDDEN.
+
+2013-04-29 Nick Clifton <[email protected]>
+
+ * elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
+ fragmented .debug_line sections associated with unmarked code
+ sections.
+
+2013-04-29 Will Newton <[email protected]>
+
+ * elf32-arm.c (elf32_arm_populate_plt_entry): Call
+ elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs.
+
+2013-04-29 Will Newton <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
+ error check up and add error message.
+
+2013-04-26 Will Newton <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
+
+2013-04-25 Alan Modra <[email protected]>
+
+ * config.bfd: Add powerpc64le-linux.
+
+2013-04-24 H.J. Lu <[email protected]>
+
+ * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for
+ x86_64-*-elf*.
+
+2013-04-24 Roland McGrath <[email protected]>
+
+ * elf32-arm.c (elf32_arm_allocate_plt_entry): If HTAB->nacl_p,
+ allocate space for PLT header even if IS_IPLT_ENTRY.
+ (arm_nacl_put_plt0): New function, broken out of ...
+ (elf32_arm_finish_dynamic_sections): ... here. Call it.
+ If HTAB->nacl_p, set up the PLT header in .iplt too.
+ (elf32_arm_output_arch_local_syms): If HTAB->nacl_p, write
+ a mapping symbol for the start of .iplt too.
+
+2013-04-19 Luca Pizzamiglio <[email protected]>
+
+ * ecoff.c (_bfd_ecoff_sizeof_headers): Cast the return value of
+ BFD_ALIGN to int.
+ * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Remove unused
+ variables.
+ * elf32-v850.c (v850_elf_relax_section): Redefine the type of 'i'
+ to bfd_vma.
+ * vms-alpha.c (evax_bfd_print_etir): Initialize sec_len.
+
+2013-04-22 Alan Modra <[email protected]>
+
+ PR ld/15382
+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply
+ sh_size or reloc_count adjustment by count.
+
+2013-04-22 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_check_relocs): Don't call
+ create_linkage_sections here..
+ (ppc64_elf_init_stub_bfd): ..do so here. Return status.
+ (create_linkage_sections): Move earlier in file.
+ (ppc64_elf_setup_section_lists): Remove now useless htab->brlt test.
+ * elf64-ppc.h (ppc64_elf_init_stub_bfd): Update proto.
+
+2013-04-19 Nick Clifton <[email protected]>
+
+ PR binutils/15356
+ * compress.c (decompress_contents): Always call inflateEnd, even
+ when another inflation operation fails.
+
+2013-04-17 H.J. Lu <[email protected]>
+
+ * elf-ifunc.c: Update copyright year.
+
+2013-04-17 Luca Pizzamiglio <[email protected]>
+
+ * coffcode.h: Added a cast to void when a bfd_set_section_*()
+ macro's return value is ignored.
+ * elf32-hppa.c: Likewise.
+ * elf32-tic6x.c: Likewise.
+ * mach-o.c: Likewise.
+ * mmo.c: Likewise.
+ * opncls.c: Likewise.
+ * peicode.h: Likewise.
+ * elf32-m32r.c: Check return value of bfd_set_section_*().
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * vms-alpha.c: Likewise.
+
+2013-04-15 H.J. Lu <[email protected]>
+
+ PR ld/15371
+ * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Check
+ regular reference without non-GOT reference when building
+ shared library.
+
+2013-04-15 Alan Modra <[email protected]>
+
+ * archive.c (_bfd_archive_close_and_cleanup): Clear parent
+ cache slot for archives.
+
+2013-04-14 Hans-Peter Nilsson <[email protected]>
+
+ * mmo.c (mmo_write_chunk): Break out abfd->tdata.mmo_data to new
+ local variable mmop.
+
+2013-04-09 Senthil Kumar Selvaraj <[email protected]>
+
+ PR ld/12494
+ * elf32-avr.c: Consider all sections to determine if linker
+ relaxation can safely delete a ret after a call/jmp
+
+2013-04-09 Mingjie Xing <[email protected]>
+
+ * bfd.c (typedef bfd, Error reporting, Miscellaneous): Add
+ INODEs.
+
+2013-04-08 Tom Tromey <[email protected]>
+
+ * som.c (bfd_section_from_som_symbol): No longer static.
+ * som.h (bfd_section_from_som_symbol): Declare.
+
+2013-04-06 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
+ * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
+
+2013-04-05 Nick Clifton <[email protected]>
+
+ * elflink.c (elf_link_add_object_symbols): Revert accidental commit.
+
+2013-04-04 Alan Modra <[email protected]>
+
+ * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
+ * bfd-in2.h: Regenerate.
+ * elflink.c (elf_link_add_object_symbols): Use new error.
+
+2013-04-03 Nick Clifton <[email protected]>
+
+ * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
+ (bfd_elf32_bfd_is_target_special_symbol): Define.
+
+2013-04-03 Venkataramanan Kumar <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
+ elf64_aarch64_locals to get local GOT reference counts.
+
+2013-04-02 DJ Delorie <[email protected]>
+
+ * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
+ (rl78_elf_relax_section): Only fetch the next reloc if there is
+ one expected.
+
+2013-03-30 Alan Modra <[email protected]>
+
+ PR ld/15323
+ * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
+ global symbols referenced by relocs.
+ * elf32-arm.c (elf32_arm_check_relocs): Likewise.
+ * elf32-bfin.c (bfin_check_relocs): Likewise.
+ * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
+ * elf32-cris.c (cris_elf_check_relocs): Likewise.
+ * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
+ * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
+ * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
+ * elf32-frv.c (elf32_frv_check_relocs): Likewise.
+ * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
+ * elf32-i370.c (i370_elf_check_relocs): Likewise.
+ * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
+ * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
+ * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
+ * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
+ * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
+ * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
+ * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
+ * elf32-metag.c (elf_metag_check_relocs): Likewise.
+ * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
+ * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
+ * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
+ * elf32-mt.c (mt_elf_check_relocs): Likewise.
+ * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
+ * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
+ * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
+ * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
+ * elf32-s390.c (elf_s390_check_relocs): Likewise.
+ * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
+ * elf32-sh.c (sh_elf_check_relocs): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
+ * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
+ * elf32-v850.c (v850_elf_check_relocs): Likewise.
+ * elf32-vax.c (elf_vax_check_relocs): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
+ * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
+ * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
+ * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
+ * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
+ * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+ * elf64-s390.c (elf_s390_check_relocs): Likewise.
+ * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
+ test indirect/warning links for NULL.
+
+2013-03-29 H.J. Lu <[email protected]>
+
+ PR ld/15323
+ * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
+ symbol is referenced by a non-shared object.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2013-03-28 Joe Seymour <[email protected]>
+
+ * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
+ R_SH_REL32 relocations against undefined weak symbols.
+
+2013-03-28 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (struct ppc_dyn_relocs): New.
+ (ppc64_elf_check_relocs): Separate dynrel counts for local syms
+ into ifunc and non-ifunc.
+ (dec_dynrel_count): Pass in sym rather than sym_sec. Handle
+ separate ifunc/non-ifunc dynrel counts.
+ (allocate_got): Always use reliplt for ifunc.
+ (allocate_dynrelocs): Likewise.
+ (ppc64_elf_size_dynamic_sections): Likewise.
+ (ppc64_elf_layout_multitoc): Likewise.
+ (ppc64_elf_relocate_section): Likewise.
+
+2013-03-28 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (struct ppc_dyn_relocs): New.
+ (ppc_elf_check_relocs): Separate dynrel counts for local syms
+ into ifunc and non-ifunc.
+ (allocate_dynrelocs): Always put ifunc relocs into reliplt.
+ (ppc_elf_size_dynamic_sections): Likewise.
+ (ppc_elf_relocate_section): Likewise.
+
+2013-03-28 Alan Modra <[email protected]>
+
+ * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
+ (struct elf_backend_data <elf_backed_reloc_type_class>): Add
+ bfd_link_info* and asection* params.
+ (_bfd_elf_reloc_type_class): Likewise.
+ * elf.c (_bfd_elf_reloc_type_class): Likewise.
+ * elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
+ (elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
+ * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
+ for any reliplt reloc. Don't return reloc_class_plt for
+ R_PPC_REL24 and R_PPC_ADDR24.
+ * elf64-ppc.c (allocate_got): Formatting.
+ (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
+ reliplt reloc.
+ * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
+ * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
+ * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
+ * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
+ * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
+ * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
+ * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
+ Add extra params to the various reloc_type_class functions.
+
+2013-03-27 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
+ masks for all local ifunc syms.
+ (allocate_dynrelocs): Don't use htab->relgot for ifunc.
+ (ppc_elf_size_dynamic_sections): Likewise.
+ (ppc_elf_relocate_section): Likewise.
+
+2013-03-27 Will Newton <[email protected]>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
+ dynamic reloc for symbols with dynindx == -1.
+ (allocate_dynrelocs_for_symbol): Avoid allocating space for a
+ dynamic reloc for symbols with dynindx == -1.
+
+2013-03-27 Will Newton <[email protected]>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
+ dynamic reloc for non-default visibility undefined weaks.
+ (allocate_dynrelocs_for_symbol): Avoid allocating space for a
+ dynamic reloc for non-default visibility undefined weaks.
+
+2013-03-26 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_add_default_symbol): Preserve section
+ over _bfd_elf_merge_symbol calls.
+
+2013-03-26 Alan Modra <[email protected]>
+
+ * elflink.c (elf_link_add_object_symbols): Add assertion for
+ common override alignment check code. Formatting.
+
+2013-03-25 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
+ usual common symbols as well as for dynamic. Add poldbfd param.
+ Save old bfd. Adjust callers.
+ (_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section"
+ and "value" by value, not pointer. Adjust caller.
+ (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
+ Delete code to set same. Use old_bfd and old_alignment from
+ _bfd_elf_merge_symbol instead. Add default symbol before
+ alignment and size checks. Wrap overlong lines.
+
+2013-03-25 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
+ (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
+ when override is true.
+
+2013-03-25 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
+ of *sym_hash.
+
+2013-03-25 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
+ Wrap long lines.
+ (elf_link_add_object_symbols): Discard TLS symbols for --just-syms
+ early in symbol loop.
+
+2013-03-25 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
+ (_bfd_elf_init_reloc_shdr): Delete.
+ * elf.c (_bfd_elf_init_reloc_shdr): Make static.
+ * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
+ just what is needed.
+ * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
+
+2013-03-23 Alan Modra <[email protected]>
+
+ * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
+ * elflink.c (_bfd_elf_merge_symbol): Make static.
+ * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
+ _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
+
+2013-03-23 Alan Modra <[email protected]>
+
+ PR ld/15270
+ * elflink.c (elf_link_add_object_symbols): Don't set def_regular
+ or ref_regular for BFD_PLUGIN owned syms, or have them affect
+ def_dynamic/ref_dynamic.
+ (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
+ owned syms.
+
+2013-03-22 David S. Miller <[email protected]>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
+ hwcaps attribute.
+
+2013-03-22 Achille Fouilleul <[email protected]>
+
+ PR ld/14902
+ * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
+ errors adjusting relocs and symbols.
+
+2013-03-21 Michael Schewe <[email protected]>
+
+ * elf32-h8300 (h8_relax_section): Add new relaxation of mov
+ @(disp:32,ERx) to mov @(disp:16,ERx).
+ (R_H8_DISP32A16): New reloc.
+ Comments added and corrected.
+ * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2013-03-21 Kai Tietz <[email protected]>
+
+ * coffgen.c (coff_real_object_p): Make global.
+ * peicode.h (coff_real_object_p): Add prototype.
+ (FILHDR): Defined for COFF_IMAGE_WITH_PE as
+ external_PEI_IMAGE_hdr structure.
+ (coff_swap_filehdr_in): Handle variable header-size.
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
+ of directory-entiries as specified in pe-header.
+
+2013-03-21 Nick Clifton <[email protected]>
+
+ PR sim/15286
+ * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
+ iWMMXt and iWMMXt2 processors from attributes.
+
+2013-03-20 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
+ sh_type according to is_rela.
+
+2013-03-18 Alan Modra <[email protected]>
+
+ PR ld/12549
+ * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
+ considering whether an --as-needed library is needed.
+
+2013-03-14 Tom Tromey <[email protected]>
+
+ * opncls.c (bfd_get_debug_link_info): Rename from
+ get_debug_link_info. Export. Update comment.
+ (find_separate_debug_file): Update.
+ * bfd-in2.h: Rebuild.
+
+2013-03-08 Venkataramanan Kumar <[email protected]>
+
+ * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
+ support.
+ (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
+ relocs.
+
+2013-03-08 Andreas Arnez <[email protected]>
+
+ * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
+ * elf.c (elfcore_write_s390_tdb): New function.
+ (elfcore_write_register_note): Call it.
+ (elfcore_grok_s390_tdb): New function.
+ (elfcore_grok_note): Call it.
+
+2013-03-08 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
+
+2013-03-05 Corinna Vinschen <[email protected]>
+
+ * config.bfd: Add x86_64-*-cygwin to list of supported targets.
+
+2013-03-04 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
+ non-zero addends when relocatable, rather than addends >= 32768.
+ Always zero "addend" before applying relocation.
+
+2013-03-04 Nick Clifton <[email protected]>
+
+ * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
+ file pointer offsets for thin archives.
+
+2013-02-28 Nathan Sidwell <[email protected]>
+
+ * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
+ elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
+
+2013-02-27 DJ Delorie <[email protected]>
+
+ * reloc.c (BFD_RELOC_RL78_CODE): Add.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
+ references in compuated relocs.
+
+2013-02-26 Anthony Green <[email protected]>
+
+ * config.bfd: Extend moxie-rtems target triplet name support.
+
+2013-02-21 H.J. Lu <[email protected]>
+
+ PR ld/15167
+ * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
+ unique_global only for definition.
+ * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
+ here.
+ (elf_link_add_object_symbols): Set unique_global only
+ for definition.
+
+2013-02-21 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_build_id): Extracted from..
+ (struct elf_build_id_info): ..here. Delete.
+ (struct output_elf_obj_tdata): New, extracted from..
+ (struct elf_obj_tdata): ..here. Reorganize for better packing.
+ Add "o" field.
+ (elf_program_header_size): Reference tdata->o.
+ (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
+ elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
+ elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
+ * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
+ when opening bfd in any mode that might write.
+ (_bfd_elf_write_object_contents): Use build_id field in
+ output_elf_obj_tdata.
+ (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
+ (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
+
+2013-02-21 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct core_elf_obj_tdata): New.
+ (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
+ core_program, and core_command. Add "core".
+ * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
+ Update all refs to tdata core fields.
+ * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
+ * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
+ * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
+ * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
+ * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
+ * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
+ * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
+ to tdata core fields.
+
+2013-02-21 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
+ Delete num_locals and num_globals.
+ (elf_num_locals, elf_num_globals): Don't define.
+ (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
+ elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
+ * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
+ * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
+ * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
+ * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
+ accessor macros.
+ * elf.c (elf_map_symbols): Add pnum_locals param. Return
+ number of locals syms via new param.
+ (swap_out_syms): Adjust to suit elf_map_symbols change.
+
+2013-02-19 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
+ STO_MICROMIPS annotation.
+
+2013-02-19 Alan Modra <[email protected]>
+
+ * configure.in: Bump version to 2.23.52.
+ * elf-bfd.h (struct elf_build_id_info): New.
+ (struct elf_obj_tdata): Delete after_write_object_contents,
+ after_write_object_contents_info and build_id_size. Make build_id
+ a pointer to struct elf_build_id_info.
+ * elf.c (_bfd_elf_write_object_contents): Style. Update
+ after_write_ibject_contents invocation.
+ (elfobj_grok_gnu_build_id): Update for new build_id struct. Don't
+ allow zero size notes.
+ * configure: Regenerate.
+
+2013-02-18 Maciej W. Rozycki <[email protected]>
+
+ * elf64-mips.c (micromips_elf64_howto_table_rel): Add
+ R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
+ (micromips_elf64_howto_table_rela): Likewise.
+ (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
+ * elfn32-mips.c (elf_micromips_howto_table_rel): Add
+ R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
+ (elf_micromips_howto_table_rela): Likewise.
+ (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
+
+2013-02-18 Paul Brook <[email protected]>
+
+ * elfxx-mips.c (MICROMIPS_P): New macro.
+ (_bfd_mips_elf_symbol_processing): Use it.
+
+2013-02-18 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
+ comment on _PROCEDURE_LINKAGE_TABLE_ creation.
+
+2013-02-18 Alan Modra <[email protected]>
+
+ PR ld/12549
+ * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
+ (_bfd_elf_strtab_clear_all_refs): Declare.
+ (_bfd_elf_strtab_resize): Declare.
+ * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
+ (_bfd_elf_strtab_clear_all_refs): New function.
+ (_bfd_elf_strtab_resize): Likewise.
+ * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
+
+2013-02-18 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
+ local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
+ and elf_text_section to..
+ * elfxx-mips.c (struct mips_elf_obj_tdata): ..here. Update all refs.
+ * elf64-alpha.c (struct mips_elf_find_line): Rename to..
+ (struct alpha_elf_find_line): ..this.
+ (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
+
+2013-02-16 H.J. Lu <[email protected]>
+
+ PR ld/15146
+ * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
+ for references from the dummy bfd.
+
+2013-02-16 H.J. Lu <[email protected]>
+
+ PR ld/15149
+ * elflink.c (elf_link_add_object_symbols): Also track weak
+ references.
+
+2013-02-15 H.J. Lu <[email protected]>
+
+ PR binutils/15151
+ * archive.c (_bfd_find_nested_archive): Don't allow a nested
+ archive pointing to itself.
+ (_bfd_get_elt_at_filepos): Revert the last 2 changes.
+
+2013-02-15 Nick Clifton <[email protected]>
+
+ PR binutils/15140
+ * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
+ accessing a corrupt nested archive.
+
+2013-02-13 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_page_ref): New structure.
+ (mips_got_page_entry): Use a section rather than a (bfd, symndx)
+ pair to represent the anchor point.
+ (mips_got_info): Add a got_page_refs field.
+ (mips_elf_link_hash_table): Add a sym_cache field.
+ (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
+ (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
+ new anchor representation.
+ (mips_elf_create_got_info): Create got_page_refs rather than
+ got_page_entries.
+ (mips_elf_record_got_page_ref): New function.
+ (mips_elf_pages_for_range): Move further down file.
+ (mips_elf_record_got_page_entry): Likewise. Take a got as argument.
+ Use a section rather than a (bfd, symndx) pair to represent the
+ anchor point.
+ (mips_elf_resolve_got_page_ref): New function.
+ (mips_elf_resolve_final_got_entries): Use it to populate
+ got_page_entries.
+ (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
+ rather than mips_elf_record_got_page_entry. Only nullify h
+ afterwards.
+ (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
+ earlier.
+
+2013-02-12 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
+ in g->relocs.
+
+2013-02-12 Alan Modra <[email protected]>
+
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
+ suitable definition when using generic linker hash table.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_count_got_entries): Delete.
+ (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
+ mips_elf_traverse_got_arg. Count GOT entries.
+ (mips_elf_resolve_final_got_entries): Take the bfd_link_info
+ as argument. Update after above changes.
+ (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
+ mips_elf_count_got_entries. Update the calls to
+ mips_elf_resolve_final_got_entries.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_tls_type): New enum.
+ (mips_got_entry): Add tls_initialized.
+ (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
+ (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
+ GOT_TLS_TYPE masks.
+ (mips_elf_reloc_tls_type, mips_tls_got_entries)
+ (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
+ (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
+ than GOT_NORMAL.
+ (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
+ arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use
+ tls_initialized rather than GOT_TLS_DONE.
+ (mips_tls_got_index): Delete.
+ (mips_elf_local_got_index, mips_elf_global_got_index): Use
+ mips_elf_initialize_tls_slots rather than mips_tls_got_index.
+ (mips_elf_record_got_entry): Initialize tls_initialized.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
+ (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
+ tls_ie_got_offset and tls_gd_got_offset.
+ (mips_elf_link_hash_newfunc): Remove initialization.
+ (mips_elf_create_got_info): Likewise.
+ (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
+ (mips_tls_single_got_index): Delete.
+ (mips_elf_local_got_index): Always use the GOT entry to track
+ GOT indices.
+ (mips_elf_global_got_index): Likewise.
+ (mips_elf_create_local_got_entry): Assert that TLS entries have
+ already been allocated.
+ (mips_elf_record_global_got_symbol): Don't initialize
+ tls_ie_type or tls_gd_type.
+ (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
+ (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
+ entry.
+ (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
+ the GOT entries.
+ (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
+ have been allocated.
+ (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
+ tls_ie_type and tls_gd_type.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
+ aliasing violation. Check for htab allocation failures.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
+ split out from...
+ (mips_elf_global_got_index): ...here. Reorder arguments so that
+ the output bfd and info come first.
+ (mips_elf_calculate_relocation): Update the call to
+ mips_elf_global_got_index accordingly.
+ (_bfd_mips_elf_finish_dynamic_symbol): Use
+ mips_elf_primary_global_got_index rather than
+ mips_elf_global_got_index.
+ (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_entry): Update comments.
+ (mips_elf_multi_got_entry_eq): Rename to...
+ (mips_elf_got_entry_eq): ...this, deleting the old definition.
+ (mips_elf_create_got_info): Remove master_got_p argument.
+ Always use mips_elf_got_entry_eq.
+ (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
+ Update calls accordingly.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_info): Remove bfd2got.
+ (mips_elf_bfd2got_hash): Delete.
+ (mips_elf_got_per_bfd_arg): Remove bfd2got.
+ (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
+ (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
+ g->next to test for the multigot case. Use mips_elf_bfd_got rather
+ than mips_elf_got_for_ibfd.
+ (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
+ (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
+ (mips_elf_make_got_per_bfd): Replace with...
+ (mips_elf_add_got_entry): ...this new function.
+ (mips_elf_make_got_pages_per_bfd): Replace with...
+ (mips_elf_add_got_page_entry): ...this new function.
+ (mips_elf_merge_got_with): Replace bfd2got argument with separate
+ bfd and GOT arguments. Use mips_elf_add_got_entry and
+ mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
+ and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got
+ to set the BFD's GOT and free the old table.
+ (mips_elf_merge_got): Replace bfd2got argument with separate
+ bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries.
+ Use mips_elf_count_got_entries to count the number of entries in
+ each GOT. Update the calls to mips_elf_merge_got_with.
+ (mips_elf_adjust_gp): Use g->next to test for the multigot case.
+ Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
+ (mips_elf_multi_got): Don't create the bfd2got hash table.
+ Replace hash table traversal with a walk over the input bfds,
+ updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got
+ to set the output bfd's GOT.
+ (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all
+ bfds use the master GOT in the single-GOT case.
+ (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
+ rather than mips_elf_got_for_ibfd.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
+ (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
+ (mips_elf_record_global_got_symbol): Update the hash entry before
+ adding the mips_got_entry. Use mips_elf_record_got_entry to do
+ the latter.
+ (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
+ (mips_elf_record_got_page_entry): Record the entry in both the
+ master and bfd GOTs.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
+ create another one if necessary.
+ (mips_elf_set_gotidx): New function.
+ (mips_elf_set_global_gotidx): Use it.
+ (mips_elf_initialize_tls_index): Likewise. Take a
+ mips_elf_traverse_got_arg as argument.
+ (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
+ (mips_elf_multi_got): Likewise. Cope with error returns from
+ mips_elf_set_global_gotidx.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_info): Add relocs field.
+ (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
+ with...
+ (mips_elf_traverse_got_arg): ...this new structure.
+ (mips_elf_count_local_tls_relocs): Delete.
+ (mips_elf_count_global_tls_relocs): Likewise.
+ (mips_elf_count_got_entry): New function.
+ (mips_elf_count_local_got_entries): Likewise.
+ (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
+ rather than a mips_elf_count_tls_arg. Count both relocs and entries.
+ (mips_elf_record_local_got_symbol): Don't count got entries here.
+ (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
+ (mips_elf_set_global_got_offset): Split into...
+ (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
+ new functions. Take a mips_elf_traverse_got_arg rather than a
+ mips_elf_set_global_got_offset_arg. Don't count TLS relocs here.
+ Use g->relocs to record the number of relocs needed for global GOT
+ entries.
+ (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
+ mips_elf_set_global_got_offset_arg. Use the relocs field to count
+ relocations. Update for above function split.
+ (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
+ to count both the number of GOT entries and the number of TLS
+ relocs required by local entries. Likewise
+ mips_elf_count_global_tls_entries and global entries.
+ Remove uses of mips_elf_count_local_tls_relocs and
+ mips_elf_count_global_tls_relocs.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
+ to say that each structure represents only one type of TLS reference.
+ (GOT_TLS_TYPE): New define.
+ (mips_elf_link_hash_entry): Temporarily split tls_type and
+ tls_got_offset into two variables each.
+ (mips_elf_link_hash_newfunc): Update accordingly.
+ (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
+ (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
+ (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
+ (mips_tls_got_relocs): Use a switch statement.
+ (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
+ (mips_elf_initialize_tls_slots): Use a switch statement. Avoid
+ local "offset" variable.
+ (mips_tls_got_index): Remove r_type argument and assert. Remove
+ code that handled entries with two TLS types; always use the
+ original got_index instead.
+ (mips_tls_single_got_index): New function.
+ (mips_elf_local_got_index): Use entry->tls_type to check for
+ TLS entries. Use mips_tls_single_got_index. Update call to
+ mips_tls_got_index.
+ (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
+ Use p->tls_type to check for TLS entries. Update call to
+ mips_tls_got_index. Use mips_tls_single_got_index.
+ (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
+ Use entry.tls_type to check for TLS entries.
+ (mips_elf_record_global_got_symbol): Replace tls_flag argument
+ with r_type argument. Use mips_elf_reloc_tls_type.
+ Set up the new hash entry fields.
+ (mips_elf_record_local_got_symbol): Replace tls_flag argument
+ with r_type argument. Use mips_elf_reloc_tls_type and
+ mips_tls_got_entries. Remove code that handled entries
+ with multiple TLS types.
+ (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
+ (mips_elf_initialize_tls_index): Handle new hash entry fields.
+ Use equality rather than masks when checking for specific TLS types.
+ Use mips_tls_got_entries. Remove code that handled entries
+ with multiple TLS types.
+ (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
+ testing the hash table entry.
+ (_bfd_mips_elf_check_relocs): Update calls to
+ mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
+ (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
+ (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
+ (mips_elf_got_entry_hash): ...this, deleting the old version.
+ (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
+ both types of GOT.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_create_got_info): New function.
+ (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
+ (mips_elf_create_got_section): Likewise.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
+ gotidx to -1.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_got_info): Move global_gotsym to...
+ (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_count_global_tls_entries)
+ (mips_elf_count_global_tls_relocs): Don't count indirect or
+ warning symbols.
+ (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
+ number of TLS entries were allocated.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
+ if there are TLS relocations.
+
+2013-02-11 Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_recreate_got): Remove free.
+ (mips_elf_resolve_final_got_entries): Remove bogus comment.
+
+2013-02-11 Alan Modra <[email protected]>
+
+ * elfcode.h (elf_checksum_contents): Free contents.
+ * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
+ * elflink.c (_bfd_elf_link_hash_table_free): New function.
+ (elf_final_link_free): New function, extracted from..
+ (bfd_elf_final_link): ..here. Always call
+ _bfd_elf_write_section_eh_frame_hdr.
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
+ _bfd_elf_link_hash_table_free.
+ * libbfd-in.h (_bfd_merge_sections_free): Declare.
+ * libbfd.h: Regenerate.
+ * merge.c (_bfd_merge_sections_free): New function.
+ * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
+ hdr_info->array.
+ * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
+ _bfd_elf_link_hash_table_free.
+ * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
+ * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
+ * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
+ * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
+ * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
+ * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
+ * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
+ * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
+ * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
+ * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
+ * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
+ * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
+ (bfd_elf32_bfd_link_hash_table_free): Don't define.
+ * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
+ (bfd_elf32_bfd_link_hash_table_free): Dont' define.
+
+2013-02-10 Alan Modra <[email protected]>
+
+ * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
+ * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
+ * m68klinux.c (linux_link_hash_table_create): Likewise.
+ * sparclinux.c (linux_link_hash_table_create): Likewise.
+ * sunos.c (sunos_link_hash_table_create): Likewise.
+ * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
+ * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
+ * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
+ * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
+ * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
+ * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
+ * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
+ * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
+ * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
+ * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
+ * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
+ * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
+ * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
+ * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
+ * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
+ * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
+ * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
+ * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
+ * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
+ * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
+ * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
+ * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
+ * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
+ * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
+ * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
+ (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
+
+2013-02-10 Alan Modra <[email protected]>
+
+ * i386linux.c (linux_link_hash_table_create): Allocate table
+ with bfd_zmalloc, not bfd_alloc.
+ * pdp11.c (link_hash_table_create): Allocate table with
+ bfd_malloc, not bfd_alloc.
+ * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
+ with bfd_zmalloc, not bfd_zalloc.
+ (bfin_link_hash_table_create): Likewise.
+ * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
+ * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
+
+2013-02-10 Alan Modra <[email protected]>
+
+ PR ld/15113
+ * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
+
+2013-02-08 Markos Chandras <[email protected]>
+
+ * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
+ sections.
+ (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
+ symbol.
+
+2013-02-08 Yufeng Zhang <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
+ 288 to 272.
+
+2013-02-08 Alan Modra <[email protected]>
+
+ PR binutils/15106
+ * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
+ * elf.c (elf_find_function): Revert last change. Use new
+ tdata field rather than static vars for cache.
+
+2013-02-07 H.J. Lu <[email protected]>
+
+ PR ld/15107
+ * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
+ symbol is defined in regular object.
+
+2013-02-07 Roberto Agostino Vitillo <[email protected]>
+
+ PR binutils/15106
+ * elf.c (elf_find_function): Don't cache if symbols change.
+
+2013-02-07 Alan Modra <[email protected]>
+
+ PR binutils/14873
+ * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
+ copy attributes from or to non-ELF.
+
+2013-02-06 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
+ for non-zero TLS symbol.
+ (elf_i386_relocate_section): Don't resolve size relocation against
+ non-zero TLS symbol.
+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
+ pc_count for non-zero TLS symbol.
+ (elf_x86_64_relocate_section): Don't resolve size relocation
+ against non-zero TLS symbol.
+
+2013-02-06 Sandra Loosemore <[email protected]>
+ Andrew Jenner <[email protected]>
+
+ Based on patches from Altera Corporation.
+
+ * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
+ (ALL_MACHINES_CFILES): Add cpu-nios2.c.
+ (BFD_BACKENDS): Add elf32-nios2.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
+ * Makefile.in: Regenerated.
+ * configure.in: Add entries for bfd_elf32_bignios2_vec and
+ bfd_elf32_littlenios2_vec.
+ * configure: Regenerated.
+ * config.bfd: Add cases for nios2.
+ * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
+ (bfd_mach_nios2): Define.
+ (bfd_nios2_arch): Declare.
+ (bfd_archures_list): Add bfd_nios2_arch.
+ * targets.c (bfd_elf32_bignios2_vec): Declare.
+ (bfd_elf32_littlenios2_vec): Declare.
+ (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
+ bfd_elf32_littlenios2_vec.
+ * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
+ * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Regenerated.
+ * cpu-nios2.c: New file.
+ * elf32-nios2.c: New file.
+
+2013-02-06 Alan Modra <[email protected]>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
+ stubs in stub_bfd.
+
+2013-02-06 Alan Modra <[email protected]>
+
+ * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
+ * Makefile.in: Regenerate.
+
+2013-02-04 Sergio Durigan Junior <[email protected]>
+ Pedro Alves <[email protected]>
+
+ * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
+ * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
+ declaration.
+ (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
+ (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
+ * elf-linux-psinfo.h: New file.
+ * elf.c: Include elf-linux-psinfo.h.
+ (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
+ New functions.
+ * elf32-ppc.c: Include `elf-linux-psinfo.h'.
+ (elf_external_ppc_linux_prpsinfo32): New structure declaration.
+ (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
+ (elfcore_write_ppc_linux_prpsinfo32): New function.
+
+2013-02-04 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
+ start address.
+
+2013-02-04 Alan Modra <[email protected]>
+
+ * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
+ (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2013-02-04 Alan Modra <[email protected]>
+
+ * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
+ * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
+
+2013-02-01 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
+ clears def_regular.
+
+2013-01-31 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
+ earlier. Fix status checking of bfd_mach_o_scan_start_address.
+ (bfd_mach_o_scan_start_address): Handle LC_MAIN.
+
+2013-01-31 Alan Modra <[email protected]>
+ David S. Miller <[email protected]>
+
+ PR ld/15056
+ * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
+ references to __tls_get_addr.
+ * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct
+ vtinherit and vtentry reloc handling too.
+ * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
+
+2013-01-31 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
+
+2013-01-31 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
+
+2013-01-28 Alan Modra <[email protected]>
+
+ * elf64-ppc.c: Use %T to print symbols names and remove redundant
+ "relocation" in error messages throughout file.
+ (ppc64_elf_relocate_section): Remove sibling call error message,
+ replace with "call lacks nop". Specially report errors for
+ branches to function entry points via OPD lookup and branches
+ to stubs. Remove NULL symbol handling now done by %T.
+
+2013-01-28 Alan Modra <[email protected]>
+
+ * archive.c (bfd_generic_archive_p): Return target and keep
+ ardata on partial matches.
+ * format.c (bfd_check_format_matches): Adjust for above
+ change. Remove bfd_error_file_ambiguously_recognized dead
+ code.
+
+2013-01-26 Alan Modra <[email protected]>
+
+ * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
+ bfd_preserve_finish): Move to..
+ * format.c: ..here, splitting out..
+ (bfd_reinit): ..this. New function.
+ (bfd_check_format_matches): Use bfd_preserve_save/restore to
+ keep bfd state for a match.
+ * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
+ * elfcore.h (elf_core_file_p): Likewise.
+ * mach-o.c (bfd_mach_o_header_p): Likewise.
+ * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
+ * xsym.c (bfd_sym_object_p): Likewise.
+ * mmo.c (mmo_scan): Clear abfd->symcount.
+ * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
+ * section.c (bfd_section_list_clear): Clear section_htab.count.
+ * bfd-in2.h: Regenerate.
+
+2013-01-25 Michael Schewe <[email protected]>
+
+ * elf32-h8300.c (elf32_h8_relax_section): When checking for a
+ second reloc, make sure that the reloc potentially exists first.
+
+2013-01-24 Nick Clifton <[email protected]>
+
+ * archures.c: Add bfd_mach_v850e3v5.
+ * bfd-in2.h: Regenerate.
+ * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
+ * cpu-v850_rh850.c: Likewise.
+ * elf32-v850.c: Add support for v850e3v5 architecture.
+
+2013-01-23 Markos Chandras <[email protected]>
+
+ * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
+
+2013-01-23 Leif Ekblad <[email protected]>
+
+ * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
+
+2013-01-18 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
+ non-zero TLS symbol.
+ (elf_i386_relocate_section): Resolve size relocation against
+ non-zero TLS symbol.
+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
+ for non-zero TLS symbol.
+ (elf_x86_64_relocate_section): Resolve size relocation against
+ non-zero TLS symbol.
+
+2013-01-18 Mike Frysinger <[email protected]>
+
+ * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
+ when new_dtags is false. Only add DT_RUNPATH when new_dtags is
+ true.
+
+2013-01-17 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
+ PC-relative relocation.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
+ as PC-relative relocation.
+
+2013-01-16 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
+ check.
+ (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
+
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
+ and R_X86_64_SIZE64 check.
+ (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
+ nor R_X86_64_SIZE64.
+
+2013-01-16 H.J. Lu <[email protected]>
+
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Likewise.
+
+ * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
+ (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
+ (elf_i386_check_relocs): Handle R_386_SIZE32.
+ (elf_i386_gc_sweep_hook): Likewise.
+ (elf_i386_relocate_section): Likewise.
+
+ * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
+ and R_X86_64_SIZE64 entries.
+ (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
+ (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
+ (elf_x86_64_reloc_name_lookup): Likewise.
+ (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
+ R_X86_64_SIZE64.
+ (elf_x86_64_gc_sweep_hook): Likewise.
+ (elf_x86_64_relocate_section): Likewise.
+
+ * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
+ BFD_RELOC_SIZE64.
+
+2013-01-15 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
+ with R_X86_64_RELATIVE64.
+
+2013-01-15 Nick Clifton <[email protected]>
+
+ * elf32-msp430.c: Fix spelling typo.
+
+2013-01-15 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
+ plt-thread-safe.
+
+2013-01-14 Alan Modra <[email protected]>
+
+ PR binutils/14813
+ * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
+ (memory_bclose): Likewise. Return 0 on success.
+ * cache.c (cache_bclose): Likewise.
+ * opncls.c (opncls_bclose, bfd_close): Likewise.
+ * vms-lib.c (vms_lib_bclose): Likewise.
+ * libbfd.h: Regenerate.
+
+2013-01-13 Alan Modra <[email protected]>
+
+ * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
+ Add ref_dynamic_nonweak.
+ * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
+ (_bfd_elf_merge_symbol): Don't call above function. Move
+ setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
+ clear dynamic_def.
+ (elf_link_add_object_symbols): Delete redundant "override" test.
+ Don't set dynamic_def here.
+ (elf_link_output_extsym): Update.
+
+2013-01-12 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
+ normal and TLS symbol access.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2013-01-12 Alan Modra <[email protected]>
+
+ * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
+ * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
+ * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
+
+2013-01-12 Alan Modra <[email protected]>
+
+ PR ld/12549
+ * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
+ (_bfd_elf_strtab_clear_all_refs): Define.
+ * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
+ (_bfd_elf_strtab_clear_all_refs): Delete.
+ * elflink.c (elf_link_add_object_symbols): Clear out added
+ strtab refs. Correct handling of warning common symbols.
+
+2013-01-10 H.J. Lu <[email protected]>
+
+ * aout0.c: Remove trailing white spaces.
+ * archive.c: Likewise.
+ * archures.c: Likewise.
+ * bfd-in.h: Likewise.
+ * bfd-in2.h: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-x86_64.c: Likewise.
+ * coff-z80.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * compress.c: Likewise.
+ * corefile.c: Likewise.
+ * cpu-arm.c: Likewise.
+ * cpu-avr.c: Likewise.
+ * cpu-bfin.c: Likewise.
+ * cpu-cr16.c: Likewise.
+ * cpu-cr16c.c: Likewise.
+ * cpu-crx.c: Likewise.
+ * cpu-h8300.c: Likewise.
+ * cpu-i386.c: Likewise.
+ * cpu-lm32.c: Likewise.
+ * cpu-m68k.c: Likewise.
+ * cpu-moxie.c: Likewise.
+ * cpu-msp430.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-xc16x.c: Likewise.
+ * dwarf2.c: Likewise.
+ * ecofflink.c: Likewise.
+ * ecoffswap.h: Likewise.
+ * elf-ifunc.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf-vxworks.c: Likewise.
+ * elf32-avr.c: Likewise.
+ * elf32-avr.h: Likewise.
+ * elf32-cr16.c: Likewise.
+ * elf32-cr16c.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-crx.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-ip2k.c: Likewise.
+ * elf32-iq2000.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-msp430.c: Likewise.
+ * elf32-mt.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-rl78.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-score.h: Likewise.
+ * elf32-sh-symbian.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-spu.c: Likewise.
+ * elf32-tic6x.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-xc16x.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elfcore.h: Likewise.
+ * elflink.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * elfxx-tilegx.c: Likewise.
+ * ieee.c: Likewise.
+ * libcoff.h: Likewise.
+ * libpei.h: Likewise.
+ * libxcoff.h: Likewise.
+ * linker.c: Likewise.
+ * mach-o-i386.c: Likewise.
+ * mach-o-target.c: Likewise.
+ * mach-o.c: Likewise.
+ * mach-o.h: Likewise.
+ * mmo.c: Likewise.
+ * opncls.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-x86_64.c: Likewise.
+ * peXXigen.c: Likewise.
+ * pef-traceback.h: Likewise.
+ * pei-x86_64.c: Likewise.
+ * peicode.h: Likewise.
+ * plugin.c: Likewise.
+ * reloc.c: Likewise.
+ * riscix.c: Likewise.
+ * section.c: Likewise.
+ * som.c: Likewise.
+ * syms.c: Likewise.
+ * tekhex.c: Likewise.
+ * ticoff.h: Likewise.
+ * vaxbsd.c: Likewise.
+ * xcofflink.c: Likewise.
+ * xtensa-isa.c: Likewise.
+
+2013-01-10 Will Newton <[email protected]>
+
+ * Makefile.am: Add Meta.
+ * Makefile.in: Regenerate.
+ * archures.c (bfd_mach_metag): New.
+ * bfd-in2.h: Regenerate.
+ * config.bfd: Add Meta.
+ * configure: Regenerate.
+ * configure.in: Add Meta.
+ * cpu-metag.c: New file.
+ * elf-bfd.h: Add Meta.
+ * elf32-metag.c: New file.
+ * elf32-metag.h: New file.
+ * libbfd.h: Regenerate.
+ * reloc.c: Add Meta relocations.
+ * targets.c: Add Meta.
+
+2013-01-08 Yufeng Zhang <[email protected]>
+
+ * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
+ (elfcore_write_aarch_hw_break): Likewise.
+ (elfcore_write_aarch_hw_watch): Likewise.
+ * elf.c (elfcore_grok_aarch_tls): New function.
+ (elfcore_grok_aarch_hw_break): Likewise.
+ (elfcore_grok_aarch_hw_watch): Likewise.
+ (elfcore_grok_note): Call the new functions to handle the
+ corresponding notes.
+ (elfcore_write_aarch_tls): New function.
+ (elfcore_write_aarch_hw_break): Likewise.
+ (elfcore_write_aarch_hw_watch): Likewise.
+ (elfcore_write_register_note): Call the new functions to handle the
+ corresponding pseudo sections.
+
+2013-01-07 Tom Tromey <[email protected]>
+
+ * section.c (_bfd_std_section): Rename from std_section.
+ (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
+ (STD_SECTION): Update.
+ * bfd-in2.h: Rebuild.
+
+2013-01-04 Juergen Urban <[email protected]>
+
+ * archures.c (bfd_mach_mips5900): Define.
+ * bfd-in2.h: Regenerate.
+ * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
+ * cpu-mips.c: Add support for MIPS r5900.
+ * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
+
+2013-01-03 Nickolai Zeldovich <[email protected]>
+ Nick Clifton <[email protected]>
+
+ * elflink.c (get_value): Prevent the use of an undefined shift
+ operation. Add sanity checks.
+
+2013-01-02 Kaushik Phatak <[email protected]>
+
+ * config.bfd (cr16*-*-uclinux*): New target support.
+
+
+For older changes see ChangeLog-2012
+Copyright (C) 2013 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-0001 b/bfd/ChangeLog-0001
index b5a3475..63015db 100644
--- a/bfd/ChangeLog-0001
+++ b/bfd/ChangeLog-0001
@@ -9584,6 +9584,12 @@
For older changes see ChangeLog-9899
+Copyright (C) 2002 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-0203 b/bfd/ChangeLog-0203
index 1b1abb1..20b0e30 100644
--- a/bfd/ChangeLog-0203
+++ b/bfd/ChangeLog-0203
@@ -1303,7 +1303,7 @@
(elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
(elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
(final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
- non-shared link. Convert instructions that use the the linkage table
+ non-shared link. Convert instructions that use the linkage table
pointer, or a facsimile thereof, to use the global data pointer when
the reloc has been changed.
@@ -11397,6 +11397,12 @@
For older changes see ChangeLog-0001
+Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2004 b/bfd/ChangeLog-2004
index 0c47096..09d816f 100644
--- a/bfd/ChangeLog-2004
+++ b/bfd/ChangeLog-2004
@@ -5055,6 +5055,12 @@
For older changes see ChangeLog-0203
+Copyright (C) 2004 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2005 b/bfd/ChangeLog-2005
index 95746fc..7c9b0d3 100644
--- a/bfd/ChangeLog-2005
+++ b/bfd/ChangeLog-2005
@@ -5261,6 +5261,12 @@
For older changes see ChangeLog-2004
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2006 b/bfd/ChangeLog-2006
index 82216d6..dc15581 100644
--- a/bfd/ChangeLog-2006
+++ b/bfd/ChangeLog-2006
@@ -30,7 +30,7 @@
EF_M68K_CPU32_FIDO_A.
2006-12-25 Mei Ligang <[email protected]>
-
+
* elf32-score.c (score_elf_got_lo16_reloc): Change some variables
type from unsigned to signed.
(score_elf_final_link_relocate): Fix bugs of handling relocation
@@ -3593,6 +3593,12 @@
For older changes see ChangeLog-2005
+Copyright (C) 2006 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2007 b/bfd/ChangeLog-2007
index be94259..85076b9 100644
--- a/bfd/ChangeLog-2007
+++ b/bfd/ChangeLog-2007
@@ -23,7 +23,7 @@
* elf32-frv.c (_frvfdpic_osec_to_segment): Use new function.
* elf32-hppa.c (hppa_record_segment_addr): Use new function.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Use new function.
-
+
2007-12-28 John David Anglin <[email protected]>
PR binutils/5146
@@ -65,7 +65,7 @@
* elf32-xtensa.c (relax_section): Update DIFF relocations in the
same way as other relocations.
-
+
2007-12-18 Daniel Jacobowitz <[email protected]>
* section.c (BFD_FAKE_SECTION): Update.
@@ -91,7 +91,7 @@
when clearing the removed flag.
(_bfd_elf_eh_frame_section_offset): Remove offsets_adjusted handling.
(_bfd_elf_write_section_eh_frame): Likewise. Apply output_offsets
- where appropriate.
+ where appropriate.
2007-12-15 Richard Sandiford <[email protected]>
@@ -229,7 +229,7 @@
(elf_xtensa_relocate_section): Check for R_XTENSA_32_PCREL for dynamic
symbols.
(check_section_ebb_pcrels_fit): Ignore R_XTENSA_32_PCREL relocations.
-
+
2007-12-05 Alan Modra <[email protected]>
* elf32-spu.c (spu_elf_size_stubs): Do consider branches to
@@ -262,7 +262,7 @@
and Loongson-2F flags.
(mips_set_isa_flags): Likewise.
(mips_mach_extensions): Add Loongson-2E and Loongson-2F
- entries.
+ entries.
2007-11-29 Nick Clifton <[email protected]>
@@ -491,7 +491,7 @@
* elf-m10300.h: Handle R_MN10300_ALIGN relocs.
(mn10300_elf_relax_delete_bytes): Honour R_MN10300_ALIGN relocs.
Re-fix off by one error in comparisons.
-
+
2007-10-25 Pedro Alves <[email protected]>
* bfd-in.h (STRING_COMMA_LEN): Don't handle NULL STR case.
@@ -538,7 +538,7 @@
(mn10300_elf_check_relocs): Do not create dynamic relocs for
symbol differences or relocations against absolute symbols.
(mn10300_elf_final_link_relocate): Likewise.
- Handle R_MN10300_SYM_DIFF relocs.
+ Handle R_MN10300_SYM_DIFF relocs.
(mn10300_elf_relocate_section): Fix for creating local copys of
dynamic relocs.
(mn10300_elf_relax_delete_bytes): Adjust symbols at the end of the
@@ -575,23 +575,23 @@
* elf32-xtensa.c (relax_section): Check for a reference to a discarded
DWARF section and anticipate its replacement with the kept section.
-
+
2007-10-16 Bob Wilson <[email protected]>
* elf32-xtensa.c (elf_xtensa_discard_info_for_section): Remove
unnecessary size variables. Set sec->rawsize.
(relax_section, relax_property_section): Likewise.
-
+
2007-10-16 Bob Wilson <[email protected]>
* section.c (struct bfd_section): Clarify comment for rawsize field.
* bfd-in2.h: Regenerate.
-
+
2007-10-16 Bob Wilson <[email protected]>
* elflink.c (_bfd_elf_check_kept_section): Use the section rawsize
values if they are set.
-
+
2007-10-16 Nick Clifton <[email protected]>
PR 5146
@@ -613,7 +613,7 @@
the type of emitted common symbols to STT_COMMON.
* elfcode.h (elf_slurp_symbol_table): Accept STT_COMMON symbol
types.
-
+
2007-10-15 Alan Modra <[email protected]>
* coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
@@ -653,7 +653,7 @@
segment only when needed.
2007-10-05 Bob Wilson <[email protected]>
-
+
* elf32-xtensa.c (relax_section): Call pin_internal_relocs when
changing a relocation's offset. Adjust call to translate_reloc. Do
not add a fix record for a DIFF reloc. For other relocs, only add a
@@ -665,21 +665,21 @@
assertion. Compute separate offset adjustments for the base symbol
and the addend, and set the new relocation's addend correctly. Return
the new target section.
-
+
2007-10-05 Bob Wilson <[email protected]>
-
+
* elf32-xtensa.c (elf_xtensa_relocate_section): Remove updates of
r_type and howto after calling do_fix_for_relocateable_link and
do_fix_for_final_link.
-
+
2007-10-05 Bob Wilson <[email protected]>
-
+
* elf32-xtensa.c (removed_by_actions): New.
(offset_with_removed_text): Reimplement using removed_by_actions.
(offset_with_removed_text_before_fill): Delete.
(relax_property_section): Use removed_by_actions. Rearrange logic.
(relax_section_symbols): Likewise.
-
+
2007-10-04 Bob Wilson <[email protected]>
* elf32-xtensa.c (reloc_bfd_fix_struct): Delete target_abfd field.
@@ -860,7 +860,7 @@
* Makefile.in: Regenerate.
* arange-set.c: New file.
* arange-set.h: New file.
- * dwarf2.c: Include arange-set.h.
+ * dwarf2.c: Include arange-set.h.
(struct dwarf2_debug) Add new fields comp_unit_count and
comp_unit_arange_set.
(struct comp_unit) Replace field arange with a new field arange_set.
@@ -893,8 +893,8 @@
2007-09-21 Olivier Hainque <[email protected]>
Tristan Gingold <[email protected]>
-
- * syms.c (_bfd_stab_section_find_nearest_line): Look at the
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Look at the
specific SOM sections for stabs if the regular ones are not found.
* som.h (struct somdata): Add a line_info field, to be used by
som_find_nearest_line.
@@ -949,7 +949,7 @@
PT_GNU_RELRO segment for copying executable/shared library.
(rewrite_elf_program_header): Remove PT_GNU_RELRO segment.
(copy_elf_program_header): Set p_size and p_size_valid fields for
- PT_GNU_RELRO segment.
+ PT_GNU_RELRO segment.
2007-09-17 Nick Clifton <[email protected]>
@@ -1035,7 +1035,7 @@
2007-09-04 Michael Snyder <[email protected]>
- * elf32-bfin.c (howto_table): Cut and paste error?
+ * elf32-bfin.c (howto_table): Cut and paste error?
Name field of reloc is wrong.
2007-09-04 Alan Modra <[email protected]>
@@ -1319,7 +1319,7 @@
(elf32_arm_gc_sweep_hook): Call check_use_blx. Update plt counts
for R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19.
(elf32_arm_check_relocs): Update plt counts for R_ARM_THM_JUMP24
- and R_ARM_THM_JUMP19.
+ and R_ARM_THM_JUMP19.
(allocate_dynrelocs): Use plt_maybe_thumb_refcount.
(elf32_arm_finish_dynamic_symbol): Ditto.
(elf32_arm_output_plt_map): Ditto.
@@ -1412,7 +1412,7 @@
* coff-i386.c (coff_i386_rtype_to_howto): Guard against null.
- * linker.c (bfd_section_already_linked_table_insert): Change
+ * linker.c (bfd_section_already_linked_table_insert): Change
return type from void to boolean. Return FALSE on failure.
(_bfd_generic_section_already_linked): Test return value of
bfd_section_already_linked_table_insert, call fatal on error.
@@ -1435,10 +1435,10 @@
* linker.c (already_linked_newfunc): Check for NULL return from
bfd_hash_allocate.
- * coffgen.c (fixup_symbol_value): Guard against null;
+ * coffgen.c (fixup_symbol_value): Guard against null;
bfd_is_com_section will dereference the section pointer.
- * syms.c (bfd_decode_symclass): Guard against NULL, since
+ * syms.c (bfd_decode_symclass): Guard against NULL, since
bfd_is_com_section dereferences the pointer.
* srec.c (srec_scan): Check for EOF (critical because return value
@@ -1452,7 +1452,7 @@
* tekhex.c (first_phase): Check return value for null.
- * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
+ * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
pointer increment.
2007-07-26 Alan Modra <[email protected]>
@@ -3553,6 +3553,12 @@
For older changes see ChangeLog-2006
+Copyright (C) 2007 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2008 b/bfd/ChangeLog-2008
index eb63e09..b61a790 100644
--- a/bfd/ChangeLog-2008
+++ b/bfd/ChangeLog-2008
@@ -22,7 +22,7 @@
PR ld/7036
* elfxx-ia64.c (elfNN_ia64_relax_section): Assume linker will
always insert 32byte between the .plt and .text sections after
- the the first relaxation pass.
+ the first relaxation pass.
2008-12-23 Nick Clifton <[email protected]>
@@ -3378,6 +3378,12 @@
For older changes see ChangeLog-2007
+Copyright (C) 2008 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2009 b/bfd/ChangeLog-2009
index cc33261..a3f7b24 100644
--- a/bfd/ChangeLog-2009
+++ b/bfd/ChangeLog-2009
@@ -408,7 +408,8 @@
PR binutils/10802
* opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
-2009-10-19 Hans-Peter Nilsson <[email protected]>
+2009-10-19 Edgar E. Iglesias <[email protected]>
+ Hans-Peter Nilsson <[email protected]>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
Don't subtract the size of the TLS block for non-shared objects
@@ -3606,7 +3607,7 @@
(bfd_xcoff_set_archive_import_path): Likewise.
(xcoff_set_import_path): Move earlier in file.
(xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
- object to the the directory part of the bfd's filename. Get the
+ object to the directory part of the bfd's filename. Get the
import path and filename of an archive object from the archive's
xcoff_tdata, initializing it if necessary. Update use of
import_file_id.
@@ -5146,6 +5147,12 @@
For older changes see ChangeLog-2008
+Copyright (C) 2009 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2010 b/bfd/ChangeLog-2010
index c486f58..4dd4cb1 100644
--- a/bfd/ChangeLog-2010
+++ b/bfd/ChangeLog-2010
@@ -1173,11 +1173,11 @@
* 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,
+ (elf64_x86_64_grok_psinfo): Extract 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
+ (elf_i386_grok_psinfo): Extract 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
@@ -3554,6 +3554,12 @@
For older changes see ChangeLog-2009
+Copyright (C) 2010 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-2011 b/bfd/ChangeLog-2011
new file mode 100644
index 0000000..e4e2cc0
--- /dev/null
+++ b/bfd/ChangeLog-2011
@@ -0,0 +1,3389 @@
+2011-12-24 Jan Kratochvil <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_relocate_section, rl78_dump_symtab)
+ (rl78_elf_relax_section): Remove debug prints.
+
+2011-12-23 Jan Kratochvil <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_relocate_section, rl78_elf_relax_section): Use
+ BFD_VMA_FMT.
+
+2011-12-23 Jan Kratochvil <[email protected]>
+
+ * elf32-rl78.c (prev_alignment, sec_start): Remove unused variables.
+
+2011-12-23 Tristan Gingold <[email protected]>
+
+ * vms-lib.c (vms_traverse_index): Move pointer update code.
+
+2011-12-22 DJ Delorie <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_howto_table): Add R_RL78_RH_RELAX.
+ (rl78_reloc_map): Add BFD_RELOC_RL78_RELAX.
+ (rl78_elf_relocate_section): Add R_RL78_RH_RELAX, R_RL78_RH_SFR,
+ and R_RL78_RH_SADDR.
+ (rl78_elf_finish_dynamic_sections): Only validate PLT section if
+ we didn't relax anything, as relaxing might remove a PLT reference
+ after we've set up the table.
+ (elf32_rl78_relax_delete_bytes): New.
+ (reloc_bubblesort): New.
+ (rl78_offset_for_reloc): New.
+ (relax_addr16): New.
+ (rl78_elf_relax_section): Add support for relaxing long
+ instructions into short ones.
+
+2011-12-22 Martin Schwidefsky <[email protected]>
+
+ * elf32-s390.c (elf_s390_relocate_section): Add check for debugging
+ section in LD to LE linker relaxation for R_390_TLS_LDO32.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise for
+ R_390_TLS_LDO64.
+
+2011-12-21 Ulrich Weigand <[email protected]>
+
+ * elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.
+
+2011-12-19 Iain Sandoe <[email protected]>
+
+ * mach-o-i386.c (bfd_mach_o_section_type_valid_for_tgt): Define NULL.
+ * mach-o-target.c (bfd_mach_o_backend_data): Initialize
+ bfd_mach_o_section_type_valid_for_tgt
+ * mach-o-x86-64.c (bfd_mach_o_section_type_valid_for_x86_64): New.
+ (bfd_mach_o_section_type_valid_for_tgt): Set to
+ bfd_mach_o_section_type_valid_for_x86_64.
+ * mach-o.c (bfd_mach_o_section_type_name): Reorder and eliminate dup.
+ (bfd_mach_o_section_attribute_name): Reorder.
+ (bfd_mach_o_get_section_type_from_name): If the target has defined a
+ validator for section types, then use it.
+ * mach-o.h (bfd_mach_o_get_section_type_from_name): Alter declaration
+ to include the bfd.
+
+2011-12-19 Chung-Lin Tang <[email protected]>
+
+ * reloc.c (BFD_RELOC_MIPS16_TLS_GD,BFD_RELOC_MIPS16_TLS_LDM,
+ BFD_RELOC_MIPS16_TLS_DTPREL_HI16,BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
+ BFD_RELOC_MIPS16_TLS_GOTTPREL,BFD_RELOC_MIPS16_TLS_TPREL_HI16,
+ BFD_RELOC_MIPS16_TLS_TPREL_LO16): New relocations for MIPS16 TLS.
+ * bfd-in2.h (bfd_reloc_code_real): Regenerate.
+ * libbfd.h (bfd_reloc_code_real_names): Regenerate.
+ * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_TLS_*
+ entries.
+ (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
+ mappings.
+ * elfn32-mips.c (elf_mips16_howto_table_rel,
+ elf_mips16_howto_table_rela): Add R_MIPS16_TLS_* entries.
+ (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
+ mappings.
+ * elf64-mips.c (mips16_elf64_howto_table_rel,
+ mips16_elf64_howto_table_rela): Add R_MIPS16_TLS_* entries.
+ (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
+ mappings.
+ * elfxx-mips.c (TLS_RELOC_P,mips16_reloc_p,
+ _bfd_mips_elf_check_relocs): Add cases for R_MIPS16_TLS_* relocations.
+ (tls_gd_reloc_p): Add R_MIPS16_TLS_GD case.
+ (tls_ldm_reloc_p): Add R_MIPS16_TLS_LDM case.
+ (tls_gottprel_reloc_p): Add R_MIPS16_TLS_GOTTPREL case.
+ (mips_elf_calculate_relocation): Add cases for R_MIPS16_TLS_*,
+ R_MIPS_TLS_DTPREL32/64, and R_MIPS_TLS_TPREL32/64 relocations.
+
+2011-12-19 Chung-Lin Tang <[email protected]>
+ Catherine Moore <[email protected]>
+ Sandra Loosemore <[email protected]>
+ Richard Sandiford <[email protected]>
+
+ * elfxx-mips.c (mips_elf_local_pic_function_p): Return true when
+ H is a MIPS16 function with a kept 32-bit stub. Update comments.
+ (mips_elf_get_la25_target): New function.
+ (mips_elf_add_la25_intro): Change to use mips_elf_get_la25_target().
+ (mips_elf_add_la25_stub): Move compute of use_trampoline_p down,
+ change to use mips_elf_get_la25_target().
+ (mips_elf_relocation_needs_la25_stub): Add target_is_16_bit_code_p
+ parameter, add switch case for R_MIPS16_26.
+ (mips_elf_calculate_relocation): Redirect relocation to point to the
+ LA25 stub if it exists, instead of the MIPS16 stub. Update arguments
+ of call to mips_elf_relocation_needs_la25_stub(), don't use la25 stub
+ for mips16->mips16 calls.
+ (_bfd_mips_elf_check_relocs): Update arguments of call to
+ mips_elf_relocation_needs_la25_stub().
+ (mips_elf_create_la25_stub): Change to use mips_elf_get_la25_target().
+
+2011-12-16 Shinichiro Hamaji <[email protected]>
+
+ * mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority)
+ * mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY
+ * mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority)
+ * mach-o.c (bfd_mach_o_header_p): Remove special handling for
+ mach-o-i386.
+ (TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for
+ mach-o-fat.
+
+2011-12-15 Kevin Buettner <[email protected]>
+
+ * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Add case
+ to correspond to a smaller ELF_NGREG defined by the kernel.
+
+2011-12-15 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (ELF32_DYNAMIC_INTERPRETER): Set to
+ "/lib/ldx32.so.1".
+
+2011-12-15 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_mkobject_init): Initialize dyn_reloc_cache.
+ (bfd_mach_o_close_and_cleanup): Only cleanup Mach-O private data
+ for object files.
+
+2011-12-15 Shinichiro Hamaji <[email protected]>
+
+ * mach-o.c (bfd_mach_o_canonicalize_reloc): Update relocation
+ table only when there isn't the cahce.
+ (bfd_mach_o_get_dynamic_reloc_upper_bound): Need one more space
+ for a pointer for the watchdog.
+ (bfd_mach_o_canonicalize_dynamic_reloc): Utilize cache like
+ bfd_mach_o_canonicalize_reloc.
+ (bfd_mach_o_close_and_cleanup): Call bfd_mach_o_free_cached_info.
+ (bfd_mach_o_free_cached_info): Free up cache data.
+ * mach-o.h (reloc_cache): A place to store cache of dynamic relocs.
+ (bfd_mach_o_free_cached_info): Add declaration.
+
+2011-12-15 Iain Sandoe <[email protected]>
+
+ * mach-o-target.c (bfd_mach_o_bfd_set_private_flags): Use
+ bfd_mach_o_bfd_set_private_flags.
+ * mach-o.c (bfd_mach_o_bfd_set_private_flags): New.
+ * mach-o.h (bfd_mach_o_bfd_set_private_flags): Declare.
+
+2011-12-14 Nick Clifton <[email protected]>
+
+ PR ld/12451
+ * elfcode.h (elf_checksum_contents): Read in the section's
+ contents if they are not already available, and the section
+ actually has some contents.
+
+ * compress.c (bfd_get_full_section_contents): Use zmalloc to
+ allocate the buffers so that excess bytes are guaranteed to be
+ zero.
+
+2011-12-14 Iain Sandoe <[email protected]>
+
+ * mach-o-i386.c (text_section_names_xlat): New table.
+ (data_section_names_xlat): Likewise.
+ (import_section_names_xlat): Likewise.
+ (mach_o_i386_segsec_names_xlat): Likewise.
+ (bfd_mach_o_tgt_seg_table): Use new tables.
+ * mach-o-x86-64.c (bfd_mach_o_tgt_seg_table): Set NULL.
+ * mach-o.c (mach_o_section_name_xlat, mach_o_segment_name_xlat):
+ Move to mach-o.h as typedefs.
+ (text_section_names_xlat): Update for current GCC usage.
+ (data_section_names_xlat): Likewise.
+ (dwarf_section_names_xlat): Likewise.
+ (objc_section_names_xlat): New table.
+ (segsec_names_xlat): Add objc table.
+ (bfd_mach_o_normalize_section_name): Replace with...
+ (bfd_mach_o_section_data_for_mach_sect): New.
+ (bfd_mach_o_section_data_for_bfd_name): New.
+ (bfd_mach_o_section_data_for_bfd_name): Update to use additional data.
+ (bfd_mach_o_convert_section_name_to_mach_o): Likewise.
+ (bfd_mach_o_bfd_copy_private_section_data): Implement.
+ (bfd_mach_o_write_symtab): Write a zero-length string as the first entry
+ for compatibility with system tools.
+ (bfd_mach_o_build_commands): Update section alignment info.
+ (bfd_mach_o_new_section_hook): Use translation table data to define
+ default section flags, type, attributes and alignment, when available.
+ (bfd_mach_o_init_section_from_mach_o): Add TODO comment.
+ (bfd_mach_o_section_type_name): Add 'symbol_stubs'.
+ (bfd_mach_o_section_attribute_name): Add 'self_modifying_code'.
+ (bfd_mach_o_get_section_type_from_name): Change "not-found" return
+ value.
+ (bfd_mach_o_tgt_seg_table): Set default NULL.
+ * mach-o.h (bfd_mach_o_segment_command): Use define for name length.
+ (bfd_mach_o_backend_data): Move until after contents are defined.
+ (bfd_mach_o_normalize_section_name): Remove.
+ (bfd_mach_o_convert_section_name_to_bfd): Declare.
+ (mach_o_section_name_xlat): Declare.
+ (mach_o_segment_name_xlat): Declare.
+ (bfd_mach_o_section_data_for_mach_sect): Declare.
+ (bfd_mach_o_section_data_for_bfd_name): Declare.
+
+2011-12-13 Shinichiro Hamaji <[email protected]>
+
+ * dwarf2.c (bfd_dwarf2_cleanup_debug_info): Accept stash as an
+ argument like other functions to support formats other than ELF.
+ * elf-bfd.h (bfd_dwarf2_cleanup_debug_info): Move to bfd-in.h.
+ * elf.c (_bfd_elf_close_and_cleanup): Pass dwarf2_find_line_info
+ in tdata as a parameter.
+ * libbfd-in.h (bfd_dwarf2_cleanup_debug_info): Move from
+ elf-bfd.h.
+ * libbfd.h (bfd_dwarf2_cleanup_debug_info): Regenerate.
+ * mach-o-target.c (bfd_mach_o_close_and_cleanup): Remove the
+ fallback macro.
+ (bfd_mach_o_find_nearest_line): Likewise.
+ * mach-o.c (bfd_mach_o_find_nearest_line): Add the definition
+ which calls _bfd_dwarf2_find_nearest_line.
+ (bfd_mach_o_close_and_cleanup): Likewise.
+ * mach-o.h (mach_o_data_struct): Add dwarf2_find_line_info.
+ (bfd_mach_o_find_nearest_line): Add declaration.
+ (bfd_mach_o_close_and_cleanup): Add declaration.
+
+2011-12-13 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_symtab_symbols): Make global. Remove
+ prototype.
+ (bfd_mach_o_section_get_entry_size): Make global.
+ (bfd_mach_o_section_get_nbr_indirect): Likewise.
+ (bfd_mach_o_read_symtab_strtab): Likewise.
+ (struct bfd_mach_o_xlat_name): Move to mach-o.h
+ (bfd_mach_o_print_flags): Move to binutils/od-macho.c
+ (bfd_mach_o_get_name_of_null, bfd_mach_o_get_name): Likewise.
+ (bfd_mach_o_cpu_name, bfd_mach_o_filetype_name): Likewise.
+ (bfd_mach_o_header_flags_name): Likewise.
+ (bfd_mach_o_load_command_name): Likewise.
+ (bfd_mach_o_print_private_header): Likewise.
+ (bfd_mach_o_print_section_map, bfd_mach_o_print_section): Likwise.
+ (bfd_mach_o_print_segment, bfd_mach_o_print_dysymtab): Likewise.
+ (bfd_mach_o_print_dyld_info): Likewise.
+ (bfd_mach_o_print_private_bfd_data): Remove.
+ (bfd_mach_o_type_name): Make global.
+ (bfd_mach_o_section_attribute_name): Likewise.
+ * mach-o.h (bfd_mach_o_xlat_name): Added.
+ (bfd_mach_o_section_get_nbr_indirect)
+ (bfd_mach_o_section_get_entry_size)
+ (bfd_mach_o_read_symtab_symbols)
+ (bfd_mach_o_read_symtab_strtab)
+ (bfd_mach_o_section_attribute_name)
+ (bfd_mach_o_section_type_name): Likewise.
+ * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Define.
+
+2011-12-13 Chung-Lin Tang <[email protected]>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Correct
+ R_MIPS16_HI16/R_MIPS16_LO16 handling of two cleared lower bits,
+ update comments.
+
+2011-12-12 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_section_32): Null-terminate sectname.
+ (bfd_mach_o_read_section_64): Likewise.
+
+2011-12-11 John Davis Anglin <[email protected]>
+
+ PR binutils/13476
+ * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
+ R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
+ R_PARISC_DPREL21L when not doing a shared link. Likewise convert
+ R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
+ R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
+ and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
+
+2011-12-10 David Daney <[email protected]>
+
+ * elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove.
+ (mips_elf_link_hash_table.rld_symbol): New field;
+ (MIPS_ELF_RLD_MAP_SIZE): New macro.
+ (_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol
+ in rld_symbol.
+ (_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol
+ in rld_symbol.
+ (_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map.
+ (_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling.
+ (_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to
+ calculate DT_MIPS_RLD_MAP value.
+ (_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol,
+ quit initializing rld_value.
+
+2011-12-08 Andrew Pinski <[email protected]>
+ Adam Nemet <[email protected]>
+
+ * archures.c (bfd_mach_mips_octeon2): New macro
+ * bfd-in2.h: Regenerate.
+ * cpu-mips.c (I_mipsocteon2): New enum value.
+ (arch_info_struct): Add bfd_mach_mips_octeon2.
+ * elfxx-mips.c (_bfd_elf_mips_mach): Support E_MIPS_MACH_OCTEON2.
+ (mips_set_isa_flags): Add bfd_mach_mips_octeon2.
+ (mips_mach_extensions): Add bfd_mach_mips_octeon2.
+
+2011-12-07 Alan Modra <[email protected]>
+
+ PR ld/12772
+ * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
+ defined in shared libraries.
+
+2011-12-07 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_canonicalize_symtab): Fix indentation.
+ Adjust the condition.
+ (bfd_mach_o_read_symtab_symbol): Now returns a bfd_boolean.
+ Adjust return statements.
+ (bfd_mach_o_read_symtab_strtab): Likewise.
+ (bfd_mach_o_read_symtab_symbols): Likewise.
+ (bfd_mach_o_scan_start_address): Likewise. Make it static.
+ (bfd_mach_o_scan): Likewise.
+ (bfd_mach_o_read_dysymtab_symbol): Remove unused function.
+ (bfd_mach_o_header_p): Adjust call.
+ (bfd_mach_o_cpu_name): Make it const.
+ (bfd_mach_o_filetype_name): Likewise.
+ (bfd_mach_o_header_flags_name): Likewise.
+ (bfd_mach_o_section_type_name): Likewise.
+ (bfd_mach_o_section_attribute_name): Likewise.
+ (bfd_mach_o_load_command_name): Likewise.
+ (bfd_mach_o_get_section_type_from_name): Add a const qualifier
+ after above change.
+ (bfd_mach_o_get_section_attribute_from_name): Likewise.
+ * mach-o.h (bfd_mach_o_read_dysymtab_symbol)
+ (bfd_mach_o_scan_start_address, bfd_mach_o_scan): Remove.
+
+2011-12-06 Ulrich Weigand <[email protected]>
+
+ * elf-bfd.h (elfcore_write_s390_last_break): Add prototype.
+ (elfcore_write_s390_system_call): Likewise.
+ * elf.c (elfcore_write_s390_last_break): New function.
+ (elfcore_write_s390_system_call): Likewise.
+ (elfcore_write_register_note): Call them.
+ (elfcore_grok_s390_last_break): New function.
+ (elfcore_grok_s390_system_call): Likewise.
+ (elfcore_grok_note): Call them.
+
+2011-12-05 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
+
+2011-12-05 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_write_contents): Handle LC_LOAD_UPWARD_DYLIB.
+ (bfd_mach_o_read_dylib): Likewise.
+ (bfd_mach_o_read_command): Likewise.
+ (bfd_mach_o_bfd_print_private_bfd_data): Likewise.
+
+2011-12-05 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_command): Add the bfd in the error
+ message.
+ (bfd_mach_o_openr_next_archived_file): Use arch name as member name.
+ (bfd_mach_o_fat_extract): Ditto.
+
+2011-12-03 Alan Modra <[email protected]>
+
+ PR ld/13468
+ * elflink.c (bfd_elf_final_link): Don't segfault when checking
+ for DT_TEXTREL and .dynamic does not exist.
+
+2011-12-03 Alan Modra <[email protected]>
+
+ PR ld/13470
+ * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive
+ change in 2011-07-01 commit. Comment.
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+
+2011-12-01 Mikael Pettersson <[email protected]>
+
+ * elf32-m68k.c (elf_m68k_check_relocs) <R_68K_8, R68K_16, R_68K_32>: For
+ non-SEC_ALLOC sections break before GOT and PLT accounting.
+
+2011-12-01 Hans-Peter Nilsson <[email protected]>
+
+ * elf32-cris.c (cris_elf_check_relocs) <plt accounting for
+ R_CRIS_8, R_CRIS_16, and R_CRIS_32>: Move early break for
+ non-SEC_ALLOC sections before GOT and PLT accounting.
+
+2011-11-29 Andrew Pinski <[email protected]>
+
+ * archures.c (bfd_mach_mips_octeonp): New macro.
+ * bfd-in2.h: Regenerate.
+ * bfd/cpu-mips.c (I_mipsocteonp): New enum value.
+ (arch_info_struct): Add bfd_mach_mips_octeonp.
+ * elfxx-mips.c (mips_set_isa_flags): Add bfd_mach_mips_octeonp.
+ (mips_mach_extensions): Add bfd_mach_mips_octeonp.
+
+2011-11-23 Tristan Gingold <[email protected]>
+
+ * vms-lib.c (get_idxlen): Add comments. Fix type in sizeof.
+ (vms_write_index): Add comments.
+
+2011-11-22 DJ Delorie <[email protected]>
+
+ * elf32-rx.c (rx_elf_object_p): Add more checks for "scanning" to
+ avoid using the special non-swapping target when not explicitly
+ requested.
+
+2011-11-22 Daniel Calcoen <[email protected]>
+
+ * elf32-rx.c (rx_elf_object_p): Correct typo: lma->vma.
+
+2011-11-22 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_print_symbol): Display COM for common
+ symbols. Print section name in brackets.
+
+2011-11-21 Andreas Tobler <[email protected]>
+
+ * config.bfd: Add vectors for powerpc and powerpc64-freebsd.
+ * configure.in (TDEFINES): Add rules for powerpc*-freebsd.
+ * configure: Regenerate.
+ * elf32-ppc.c: Add powerpc-freebsd definitions.
+ * elf64-ppc.c: Add powerpc64-freebsd definitions.
+ * targets.c: Add bits for powerpc and powerpc64-freebsd.
+
+2011-11-17 Philipp Thomas <[email protected]>
+
+ * elf32-arm.c (elf32_thumb_to_arm_stub): Sync message so that it
+ needs to be translated only once.
+
+2011-11-16 Maciej W. Rozycki <[email protected]>
+
+ * elf64-mips.c (mips_elf64_howto_table_rela): Set src_mask to
+ zero throughout.
+ (mips16_elf64_howto_table_rela): Likewise.
+ (micromips_elf64_howto_table_rela): Likewise.
+ * elfn32-mips.c (elf_mips_howto_table_rela): Likewise.
+ (elf_mips16_howto_table_rela): Likewise.
+ (elf_micromips_howto_table_rela): Likewise.
+
+2011-11-15 Alan Modra <[email protected]>
+ Andreas Tobler <[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.
+
+2011-11-14 Maxim Kuvyrkov <[email protected]>
+
+ * elfxx-mips.c (mips_n64_exec_plt0_entry): Use 64-bit move.
+
+2011-11-08 Nick Clifton <[email protected]>
+
+ * elf-m10300.c (mn10300_elf_relax_section): Fix check for an
+ immediate move into an address register.
+
+2011-11-09 Alan Modra <[email protected]>
+
+ * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
+ executables when export_dynamic.
+
+2011-11-08 Alan Modra <[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.
+
+2011-11-06 John David Anglin <[email protected]>
+
+ PR ld/13387
+ * elf32-hppa.c (elf32_hppa_hide_symbol): Make STT_GNU_IFUNC symbol
+ go through PLT. Reset plt field with init_plt_offset.
+ (elf32_hppa_adjust_dynamic_symbol): Ensure that a PLT slot is
+ allocated for symbols referenced by a plabel.
+
+2011-11-02 DJ Delorie <[email protected]>
+
+ * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Delete unused
+ variable.
+
+2011-11-02 Jan Beulich <[email protected]>
+
+ * coffgen.c (coff_write_alien_symbol): Make public. Add 'struct
+ internal_syment *' parameter. Extend 'dummy' to an array with two
+ elements. Set n_numaux early. Handle BSF_FILE.
+ (coff_write_symbols): Pass NULL as new third argument to
+ coff_write_alien_symbol().
+ * cofflink.c (_bfd_coff_final_link): Don't use COFF-specific
+ obj_raw_syment_count() on non-COFF input BFD. Insert local symbols
+ from non-COFF input BFDs.
+ * libcoff-in.h (coff_write_alien_symbol): Declare.
+ * libcoff.h (coff_write_alien_symbol): Re-generate.
+
+2011-11-01 DJ Delorie <[email protected]>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-rl78.lo.
+ (ALL_MACHINES_CFILES): Add cpu-rl78.c.
+ (BFD32_BACKENDS): Add elf32-rl78.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-rl78.c.
+ (Makefile.in): Regenerate.
+ * archures.c (bfd_architecture): Define bfd_arch_rl78.
+ (bfd_archures_list): Add bfd_rl78_arch.
+ * config.bfd: Add rl78-*-elf.
+ * configure.in: Add bfd_elf32_rl78_vec.
+ * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_RL78_* relocations.
+ * targets.c (bfd_target_vector): Add bfd_elf32_rl78_vec.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * libbfd.h: Regenerate.
+ * cpu-rl78.c: New file.
+ * elf32-rl78.c: New file.
+
+2011-10-26 Nick Clifton <[email protected]>
+
+ PR ld/13049
+ * elf64-ppc.c (STUB_SUFFIX): Revert previous delta.
+ * elf32-hppa.c (STUB_SUFFIX): Likewise.
+
+2011-10-25 Joern Rennecke <[email protected]>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-epiphany.lo.
+ (ALL_MACHINES_CFILES): Add cpu-epiphany.c.
+ (BFD32_BACKENDS): Add elf32-epiphany.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-epiphany.c.
+ * archures.c (bfd_arch_epiphany): Add.
+ (bfd_mach_epiphany16, bfd_mach_epiphany32): Define.
+ (bfd_epiphany_arch): Declare.
+ (bfd_archures_list): Add &bfd_epiphany_arch.
+ * config.bfd (epiphany-*-elf): New target case.
+ * configure.in (bfd_elf32_epiphany_vec): New target vector case.
+ * reloc.c (BFD_RELOC_EPIPHANY_SIMM8): New relocation.
+ (BFD_RELOC_EPIPHANY_SIMM24, BFD_RELOC_EPIPHANY_HIGH): Likewise.
+ (BFD_RELOC_EPIPHANY_LOW, BFD_RELOC_EPIPHANY_SIMM11): Likewise.
+ (BFD_RELOC_EPIPHANY_IMM11, BFD_RELOC_EPIPHANY_IMM8): Likewise.
+ * targets.c (bfd_elf32_epiphany_vec): Declare.
+ (_bfd_target_vector): Add bfd_elf32_epiphany_vec.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * libbfd.h: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+ * po/bfd.pot: Regenerate.
+ * cpu-epiphany.c: New file.
+ * elf32-epiphany.c: New file.
+
+2011-10-24 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Remove
+ assertions.
+
+2011-10-24 Eugeniy Meshcheryakov <[email protected]>
+
+ PR ld/13273
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Do not warn about
+ identical TAG_PCS_config attributes.
+
+2011-10-24 Nick Clifton <[email protected]>
+
+ * po/ja.po: Updated Japanese translation.
+
+2011-10-24 Pau Garcia i Quiles <[email protected]>
+
+ PR binutils/13292
+ * bfd-in.h: Include <sys/stat.h> rather than forward defining
+ struct stat.
+ * bfd-in2.h: Regenerate.
+
+2011-10-21 H.J. Lu <[email protected]>
+
+ PR ld/13302
+ * elf32-i386.c (elf_i386_relocate_section): Replace
+ R_386_IRELATIVE with R_386_RELATIVE.
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Replace
+ R_X86_64_IRELATIVE with R_X86_64_RELATIVE.
+
+2011-10-21 H.J. Lu <[email protected]>.
+
+ * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
+ comments.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2011-10-21 H.J. Lu <[email protected]>
+
+ PR ld/13302
+ * elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
+ and next_irelative_index.
+ (elf_i386_link_hash_table_create): Initialize next_jump_slot_index
+ and next_irelative_index.
+ (elf_i386_allocate_dynrelocs): Increment reloc_count instead of
+ next_tls_desc_index.
+ (elf_i386_size_dynamic_sections): Set next_tls_desc_index and
+ next_irelative_index from reloc_count.
+ (elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
+ R_386_JUMP_SLOT.
+
+ * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
+ next_jump_slot_index and next_irelative_index.
+ (elf_x86_64_link_hash_table_create): Initialize
+ next_jump_slot_index and next_irelative_index.
+ (elf_x86_64_size_dynamic_sections): Set next_irelative_index
+ from reloc_count.
+ (elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
+ R_X86_64_JUMP_SLOT.
+
+2011-10-20 Nick Clifton <[email protected]>
+
+ PR ld/13049
+ * elf32-arm.c (STUB_SUFFIX): Avoid collision with user namespace
+ symbol names.
+ * elf64-ppc.c (STUB_SUFFIX): Likewise.
+ * elf32-hppa.c (STUB_SUFFIX): Likewise.
+
+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.
+
+2011-10-19 Alan Modra <[email protected]>
+
+ PR ld/13177
+ * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
+ (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
+ "mark". Hide undefweak too. Clear def_regular and ref_regular.
+ * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
+ reloc errors from garbage-collected code.
+ * elf32-arm.c (elf32_arm_relocate_section): Likewise.
+ * elf32-bfin.c (bfin_relocate_section): Likewise.
+ (bfinfdpic_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-spu.c (spu_elf_relocate_section): Likewise.
+ * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_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.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
+
+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.
+
+2011-10-19 Alan Modra <[email protected]>
+
+ PR ld/13254
+ * elflink.c (bfd_elf_final_link): Emit error_textrel error.
+
+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-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.
+
+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-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.
+
+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 Nick Clifton <[email protected]>
+
+ * po/es.po: Updated Spanish translation.
+ * po/fi.po: Updated Finnish translation.
+ * po/fr.po: Updated French translation.
+ * po/ru.po: Updated Russian translation.
+
+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]>
+
+ PR ld/13229
+ * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
+ even when strip_discarded is false.
+
+2011-10-05 Kai Tietz <[email protected]>
+
+ * coffgen.c (coff_write_alien_symbol): Don't write
+ symbol for discarded sections, if strip_discarded isn't
+ explicit set to false.
+ (coff_write_native_symbol): Likewise.
+
+2011-10-05 DJ Delorie <[email protected]>
+ Nick Clifton <[email protected]>
+
+ * elf32-rx.c: Add support for PID mode.
+ (rx_elf_relocate_section): Add checks for unsafe PID relocations.
+ Include addend in R_RX_SYM relocations.
+
+2011-09-30 Tristan Gingold <[email protected]>
+
+ * dwarf2.c (struct dwarf2_debug): Add field debug_sections.
+ (read_section): Add sec argument. Adjust the code to get section
+ names from it.
+ (read_indirect_string): Adjust call to read_section.
+ (read_abbrevs): Ditto.
+ (decode_line_info): Ditto.
+ (read_debug_ranges): Ditto.
+ (DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
+ (find_debug_info): Add debug_sections parameter. Use it instead
+ the above macros.
+ (place_sections): Get section names from stash.
+ (find_line): Add debug_sections argument. Initialize
+ debug_sections field of stash from it.
+ Adjust calls to find_debug_info.
+ (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
+ Adjust call to find_line.
+ (_bfd_dwarf2_find_line): Adjust call to find_line.
+ * libcoff-in.h (struct dwarf_debug_section): New declaration.
+ (coff_find_nearest_line_with_names): Likewise.
+ * libcoff.h: Regenerate.
+ * libbfd-in.h (struct dwarf_debug_section): Move declaration.
+ (dwarf_debug_sections): Likewise.
+ (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
+ * libbfd.h: Regenerate.
+ * elf.c (_bfd_elf_find_nearest_line): Adjust call to
+ _bfd_dwarf2_find_nearest_line.
+ * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
+ * elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
+ * elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
+ * coffgen.c (coff_find_nearest_line_with_names): New function.
+ (coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
+ * coff-rs6000.c (xcoff_debug_sections): New constant.
+ (xcoff_find_nearest_line): New function.
+ (rs6000coff_vec): Use xcoff_find_nearest_line.
+ (pmac_xcoff_vec): Ditto.
+
+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-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-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-27 Kai Tietz <[email protected]>
+
+ * coffcode.h (sec_to_styp_flags): Handle
+ SEC_LINK_DUPLICATES_SAME_CONTENTS, and
+ SEC_LINK_DUPLICATES_SAME_SIZE.
+
+2011-09-22 Tristan Gingold <[email protected]>
+
+ * configure.in: Bump version to 2.22.51
+ * configure: Regenerate.
+
+2011-09-21 David S. Miller <[email protected]>
+
+ * 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.
+
+2011-09-21 Tristan Gingold <[email protected]>
+
+ * 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.
+
+2011-09-15 H.J. Lu <[email protected]>
+
+ PR ld/13177
+ * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
+ nor GOT references.
+
+2011-09-15 H.J. Lu <[email protected]>
+
+ PR ld/12975
+ * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
+ to struct bfd_elf_version_tree.
+
+ * 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.
+
+ * linker.c (bfd_hide_sym_by_version): New.
+
+ * bfd-in2.h: Regenerated.
+
+2011-09-12 H.J. Lu <[email protected]>
+
+ PR ld/13178
+ * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
+ if there are no GOT relocations.
+
+2011-09-09 Kai Tietz <[email protected]>
+
+ * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
+ for targets without symbol_leading_char.
+
+2011-09-08 Bernd Jendrissek <[email protected]>
+
+ * bfdwin.c (bfd_get_file_window): Fix memory leak.
+
+2011-09-07 Alan Modra <[email protected]>
+
+ PR ld/13131
+ * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
+ is initialized.
+
+2011-09-06 Alan Modra <[email protected]>
+
+ 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.
+
+2011-09-01 Christophe Lyon <[email protected]>
+
+ * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
+ sections.
+
+2011-08-26 Nick Clifton <[email protected]>
+
+ * po/es.po: Updated Spanish translation.
+
+2011-08-19 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
+ we haven't seen expected -mcmodel=medium/large code relocs.
+
+2011-08-18 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_segment): Initialize list.
+
+2011-08-17 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
+
+2011-08-17 Alan Modra <[email protected]>
+
+ 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.
+
+2011-08-14 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
+ shared and call to _mcount will go via plt.
+
+2011-08-14 Alan Modra <[email protected]>
+
+ * 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.
+
+2011-08-12 H.J. Lu <[email protected]>
+
+ 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.
+
+2011-08-09 Matthew Gretton-Dann <[email protected]>
+
+ * 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.
+
+2011-08-08 Tristan Gingold <[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.
+
+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.
+
+2011-07-22 H.J. Lu <[email protected]>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
+ (ALL_MACHINES_CFILES): Add cpu-k1om.c.
+ * Makefile.in: Regenerated.
+
+ * archures.c (bfd_architecture): Add bfd_arch_k1om.
+ (bfd_k1om_arch): New.
+ (bfd_archures_list): Add &bfd_k1om_arch.
+ * bfd-in2.h: Regenerated.
+
+ * 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.
+
+ * configure.in: Support bfd_elf64_k1om_vec and
+ bfd_elf64_k1om_freebsd_vec.
+ * configure: Regenerated.
+
+ * cpu-k1om.c: New.
+
+ * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
+ (bfd_elf64_k1om_vec): Likewise.
+ (bfd_elf64_k1om_freebsd_vec): Likewise.
+
+ * 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.
+
+2011-07-20 Jan Kratochvil <[email protected]>
+
+ 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.
+
+2011-07-15 Alan Modra <[email protected]>
+
+ * configure.in: Bump version.
+ * configure: Regenerate.
+
+2011-07-14 Alan Modra <[email protected]>
+
+ * linker.c (_bfd_generic_section_already_linked): Set l_flags.
+ * elf-bfd.h (struct already_linked): Forward declare.
+
+2011-07-14 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
+ (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
+
+2011-07-14 Alan Modra <[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.
+
+2011-07-12 Nick Clifton <[email protected]>
+
+ * elf32-arm.c (elf32_arm_section_flags): Delete.
+ (elf_backend_section_flags): Remove.
+
+2011-07-11 H.J. Lu <[email protected]>
+
+ PR ld/12982
+ * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
+ when setting stack_flags.
+
+2011-07-11 Catherine Moore <[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.
+
+2011-07-11 H.J. Lu <[email protected]>
+
+ PR ld/12978
+ * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
+
+2011-07-09 Alan Modra <[email protected]>
+
+ 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.
+
+2011-07-09 H.J. Lu <[email protected]>
+
+ 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.
+
+2011-06-15 Ulrich Weigand <[email protected]>
+
+ * 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.
+
+2011-06-14 Richard Henderson <[email protected]>
+
+ * 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.
+
+2011-06-14 Alan Modra <[email protected]>
+
+ 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.
+
+2011-06-14 Alan Modra <[email protected]>
+
+ * 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 (elf_x86_64_add_symbol_hook): Likewise.
+
+2011-04-11 Alan Modra <[email protected]>
+
+ * 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.
+
+2011-04-10 Richard Sandiford <[email protected]>
+
+ 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.
+
+2011-04-09 H.J. Lu <[email protected]>
+
+ * elf32-i386.c: Update copyright year.
+ * elf64-x86-64.c: Likewise.
+
+2011-04-09 Kai Tietz <[email protected]>
+
+ * 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.
+
+2011-04-09 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_relocate_section): Return relocation
+ error on unsupported relocation.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+
+2011-04-09 H.J. Lu <[email protected]>
+
+ PR binutils/12657
+ * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
+ pid_t.
+
+2011-04-08 H.J. Lu <[email protected]>
+
+ PR ld/12654
+ * elf32-i386.c (elf_i386_relocate_section): Check !executable
+ instead of shared for R_386_TLS_LDO_32.
+
+2011-04-08 Tristan Gingold <[email protected]>
+
+ * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
+ * coff-pmac: Remove
+ * xcoff-target.h: Remove
+ * Makefile.in: Regenerate.
+
+2011-04-07 Cary Coutant <[email protected]>
+
+ * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
+
+2011-04-07 Paul Brook <[email protected]>
+
+ * 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.
+
+2011-04-06 Joseph Myers <[email protected]>
+
+ * 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.
+
+2011-04-01 Tristan Gingold <[email protected]>
+
+ * elfxx-ia64.c: include bfd_stdint.h
+
+2011-03-31 Jan Kratochvil <[email protected]>
+
+ * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
+ dynobj and its initialization.
+
+2011-03-31 Tristan Gingold <[email protected]>
+
+ * 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.
+
+2011-03-31 Tristan Gingold <[email protected]>
+
+ * 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
+
+2011-03-31 Bernd Schmidt <[email protected]>
+
+ * 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.
+
+ * 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.
+
+2011-03-31 Tristan Gingold <[email protected]>
+
+ * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
+ entry on xcoff when value is C_NULL_VALUE.
+
+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.
+
+2011-03-25 Michael Snyder <[email protected]>
+
+ * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
+
+2011-03-25 Tristan Gingold <[email protected]>
+
+ * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
+ of find_nearest_line on object files.
+
+2011-03-25 Tristan Gingold <[email protected]>
+
+ * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
+ Minor reordering.
+ (alpha_vms_create_eisd_for_section): Make code sections read-only.
+
+2011-03-24 Alan Modra <[email protected]>
+
+ * 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.
+
+2011-03-22 Eric B. Weddington <[email protected]>
+
+ * bfd-in2.h: Regenerate.
+
+2011-03-22 Eric B. Weddington <[email protected]>
+
+ * 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.
+
+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
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/bfd/ChangeLog-2012 b/bfd/ChangeLog-2012
new file mode 100644
index 0000000..7d82ace
--- /dev/null
+++ b/bfd/ChangeLog-2012
@@ -0,0 +1,3300 @@
+2012-12-23 Mike Frysinger <[email protected]>
+
+ * config.bfd (i[3-7]86-*-linux-*): Add x86_64pei_vec to
+ targ64_selvecs.
+
+2012-12-21 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Check
+ R_X86_64_standard instead of R_X86_64_max for unrecognized
+ relocation.
+
+2012-12-21 H.J. Lu <[email protected]>
+
+ PR ld/14980
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly
+ adjust h->plt.refcount.
+ * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
+
+2012-12-19 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_relocate_section): Replace
+ bfd_elf32_swap_reloc_out with elf_append_rel.
+ (elf_i386_finish_dynamic_symbol): Likewise.
+
+ * elflink.c (elf_append_rel): Call swap_reloc_out instead of
+ swap_reloca_out.
+
+2012-12-18 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Reindent.
+
+2012-12-18 Edgar E. Iglesias <[email protected]>
+
+ PR ld/14736
+ * elf32-microblaze.c (calc_fixup): Add end range.
+
+2012-12-18 Alan Modra <[email protected]>
+
+ * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of
+ the special MAP_* values.
+
+2012-12-17 Roland McGrath <[email protected]>
+ Alan Modra <[email protected]>
+
+ * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are
+ not ARM ELF.
+
+2012-12-17 Nick Clifton <[email protected]>
+
+ * MAINTAINERS: Add copyright notice.
+ * Makefile.am: Likewise.
+ * PORTING: Likewise.
+ * README: Likewise.
+ * TODO: Likewise.
+ * acinclude.m4: Likewise.
+ * bfd.m4: Likewise.
+ * config.bfd: Likewise.
+ * configure.com: Likewise.
+ * configure.host: Likewise.
+ * configure.in: Likewise.
+ * makefile.vms: Likewise.
+ * warning.m4: Likewise.
+ * elf64-hppa.c: Fix copyright notice.
+ * Makefile.in: Regenerate.
+
+2012-12-16 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_check_relocs): Don't check IFUNC
+ relocations here.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
+2012-12-16 H.J. Lu <[email protected]>
+
+ PR ld/14968
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check
+ local IFUNC references.
+ * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
+
+2012-12-14 Tom Tromey <[email protected]>
+
+ * elf.c (elfcore_grok_note) <NT_FILE>: New case.
+
+2012-12-13 H.J. Lu <[email protected]>
+
+ PR ld/14956
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local
+ IFUNC calls.
+ * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
+
+2012-12-10 Edgar E. Iglesias <[email protected]>
+
+ * reloc.c (MICROBLAZE): Document new relocations
+ * bfd-in2.h: Regenerated
+ * libbfd.h: Regenerated
+ * elf32-microblaze.c (microblaze_elf_howto_raw): Add TLS relocations
+ (microblaze_elf_reloc_type_lookup): Likewise
+ (elf32_mb_link_hash_entry): define TLS reference types
+ (elf32_mb_link_hash_table): add TLS Local dynamic GOT entry
+ #define has_tls_reloc if section has TLS relocs
+ (dtprel_base), (check_unique_offset): New
+ (microblaze_elf_output_dynamic_relocation): output simple
+ dynamic relocation into SRELOC.
+ (microblaze_elf_relocate_section): Accommodate TLS relocations.
+ (microblaze_elf_check_relocs): Likewise
+ (update_local_sym_info): New
+ (microblaze_elf_copy_indirect_symbol): Add tls_mask.
+ (allocate_dynrelocs): Handle TLS symbol
+ (microblaze_elf_size_dynamic_sections): Set size and offset
+ (microblaze_elf_finish_dynamic_symbol): Use
+ microblaze_elf_output_dynamic_relocation
+
+2012-12-09 H.J. Lu <[email protected]>
+
+ PR binutils/14933
+ * archive.c (bsd_write_armap): Properly check indicies bigger
+ than 4Gb.
+
+2012-12-07 Alan Modra <[email protected]>
+
+ PR ld/14926
+ * elf.c (_bfd_elf_map_sections_to_segments): Include elf header
+ size when determining phdr_in_segment.
+
+2012-12-06 Yufeng Zhang <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_grok_prstatus): New function.
+ (elf_backend_grok_prstatus): Define to elf64_aarch64_grok_prstatus.
+
+2012-12-06 Alan Modra <[email protected]>
+
+ * elfxx-mips.c (allocate_dynrelocs): Correct test for symbol
+ defined in a regular file to include common symbols.
+
+2012-12-05 Leif Ekblad <[email protected]>
+
+ * config.bfd: Add x86_64-*-rdos.
+
+2012-12-05 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (build_plt_stub): Fix off by one error in branch
+ to glink.
+
+2012-12-03 Maciej W. Rozycki <[email protected]>
+
+ PR ld/10629
+ * elfxx-mips.c (mips_elf_link_hash_table): Update comment for
+ use_rld_obj_head.
+ (_bfd_mips_elf_create_dynamic_sections): Always create a
+ .rld_map section if no __rld_obj_head symbol has been seen.
+
+2012-12-03 Maciej W. Rozycki <[email protected]>
+
+ * elf32-mips.c (mips_elf32_object_p): Return right away when the
+ ABI is not compatible.
+ * elfn32-mips.c (mips_elf_n32_object_p): Likewise.
+
+2012-12-03 Maciej W. Rozycki <[email protected]>
+
+ * elf32-tilepro.c (tilepro_elf_mkobject): New function.
+ (bfd_elf32_mkobject): New macro.
+
+2012-12-03 Maciej W. Rozycki <[email protected]>
+
+ * elf32-mips.c (bfd_elf32_mkobject): New macro.
+ * elf64-mips.c (bfd_elf64_mkobject): Likewise.
+ * elfn32-mips.c (bfd_elf32_mkobject): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_mkobject): New prototype.
+ * elfxx-mips.c (mips_elf_obj_tdata): New struct.
+ (mips_elf_tdata): New macro.
+ (_bfd_mips_elf_mkobject): New function.
+ (mips_elf_merge_obj_attributes): Report the originating input BFD
+ on attribute conflicts.
+
+2012-12-03 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips_elf_merge_obj_attributes): Correct messages
+ for the -mdouble-float and -msingle-float cases throughout; make
+ all the messages report the output file consistently on the
+ left-hand side.
+
+2012-11-29 Roland McGrath <[email protected]>
+
+ * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments.
+
+2012-11-26 Roland McGrath <[email protected]>
+
+ * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.
+
+2012-11-21 H.J. Lu <[email protected]>
+
+ PR binutils/14493
+ * elf.c (copy_elf_program_header): When rewriting program
+ header, set the output maxpagesize to the maximum alignment
+ of input PT_LOAD segments.
+
+2012-11-21 Roland McGrath <[email protected]>
+
+ * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
+ (segment_eligible_for_headers): ... this. Take new arguments
+ MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's
+ start address doesn't leave space for the headers.
+ (nacl_modify_segment_map): Update caller.
+
+2012-11-20 H.J. Lu <[email protected]>
+
+ PR ld/14862
+ * elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
+ added by accident.
+ (elf_link_add_object_symbols): Don't set nor check
+ ref_dynamic_nonweak.
+
+2012-11-20 Alan Modra <[email protected]>
+
+ * elf32-rx.c (rx_elf_print_private_bfd_data): Warning fix.
+
+2012-11-16 Joey Ye <[email protected]>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate
+ <case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12>): Align address of
+ the place being relocated.
+ (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
+ of the place being relocated and truncate addend.
+ (Pa): New macro.
+
+2012-11-14 Roland McGrath <[email protected]>
+
+ * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc
+ instruction for data sandboxing.
+
+2012-11-14 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_main)
+ (bfd_mach_o_read_source_version): New functions.
+ (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DATA_IN_CODE,
+ BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS, BFD_MACH_O_LC_MAIN,
+ BFD_MACH_O_LC_SOURCE_VERSION.
+ * mach-o.h (bfd_mach_o_main_command)
+ (bfd_mach_o_source_version_command): New types.
+ (bfd_mach_o_load_command): Add fields for these new types.
+
+2012-11-14 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Add a special
+ handling for non-scattered pairs. Update comments.
+
+2012-11-13 Joe Seymour <[email protected]>
+
+ * elf.c (rewrite_elf_program_header): Allocate elf_segment_map
+ with bfd_zalloc, instead of bfd_alloc.
+
+2012-11-09 Nick Clifton <[email protected]>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
+ (ALL_MACHINES_CFILES): Add cpu-v850-rh850.c.
+ * archures.c (bfd_arch_info): Add bfd_v850_rh850_arch.
+ * config.bfd: Likewise.
+ * configure.in: Add bfd_elf32_v850_rh850_vec.
+ * cpu-v850.c: Update printed description.
+ * cpu-v850_rh850.c: New file.
+ * elf32-v850.c (v850_elf_check_relocs): Add support for RH850 ABI
+ relocs.
+ (v850_elf_perform_relocation): Likewise.
+ (v850_elf_final_link_relocate): Likewise.
+ (v850_elf_relocate_section): Likewise.
+ (v850_elf_relax_section): Likewise.
+ (v800_elf_howto_table): New.
+ (v850_elf_object_p): Add support for RH850 ABI values.
+ (v850_elf_final_write_processing): Likewise.
+ (v850_elf_merge_private_bfd_data): Likewise.
+ (v850_elf_print_private_bfd_data): Likewise.
+ (v800_elf_reloc_map): New.
+ (v800_elf_reloc_type_lookup): New.
+ (v800_elf_reloc_name_lookup): New.
+ (v800_elf_info_to_howto): New.
+ (bfd_elf32_v850_rh850_vec): New.
+ (bfd_arch_v850_rh850): New.
+ * targets.c (_bfd_targets): Add bfd_elf32_v850_rh850_vec.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+
+ * elf32-rx.c (describe_flags): New function. Returns a buffer
+ containing a description of the E_FLAG_RX_... values set.
+ (rx_elf_merge_private_bfd_data): Use it.
+ (rx_elf_print_private_bfd_data): Likewise.
+ (elf32_rx_machine): Skip EF_RX_CPU_RX check.
+ (elf32_rx_special_sections): Define.
+ (elf_backend_special_sections): Define.
+
+2012-11-09 Edgar E. Iglesias <[email protected]>
+
+ * config.bfd: Add microblazeel-*-*
+ * configure.in: Likewise.
+ * configure: Regenerate.
+ * elf32-microblaze.c (microblaze_elf_relocate_section): Add endian awareness.
+ (microblaze_elf_merge_private_bfd_data): New.
+ (microblaze_bfd_write_imm_value_32): New.
+ (microblaze_bfd_write_imm_value_64): New.
+ (microblaze_elf_relax_section): Add endian awareness.
+ (microblaze_elf_add_symbol_hook): Define TARGET_LITTLE_NAME,
+ TARGET_LITTLE_SYM and bfd_elf32_bfd_merge_private_bfd_data.
+ * targets.c: Add bfd target bfd_elf32_microblazeel_vec.
+
+2012-11-09 H.J. Lu <[email protected]>
+
+ * aout-tic30.c (MY_final_link_callback): Remove trailing
+ redundant `;'.
+ * coff-h8500.c (extra_case): Likewise.
+ (bfd_coff_reloc16_get_value): Likewise.
+ * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Likewise.
+ * elf.c (_bfd_elf_slurp_version_tables): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_perform_relocation): Likewise.
+ * opncls.c (bfd_calc_gnu_debuglink_crc32): Likewise.
+ * plugin.c (add_symbols): Likewise.
+ * reloc.c (bfd_check_overflow): Likewise.
+ * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
+
+2012-11-08 Tom Tromey <[email protected]>
+
+ * elf.c (elfcore_grok_note) <NT_SIGINFO>: New case; make
+ pseudosection.
+
+2012-11-08 Alan Modra <[email protected]>
+
+ * aclocal.m4: Regenerate.
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2012-11-07 H.J. Lu <[email protected]>
+
+ * section.c (bfd_get_section_contents): Replace memcpy
+ with memmove.
+
+2012-11-07 Hans-Peter Nilsson <[email protected]>
+
+ PR binutils/14481
+ * aout-target.h (MY_close_and_cleanup): Make local function
+ instead of alias of MY_bfd_free_cached_info. Also call
+ _bfd_generic_close_and_cleanup.
+
+2012-11-06 H.J. Lu <[email protected]>
+
+ PR binutils/14813
+ * bfdio.c (bfd_iovec): Change return type of bclose to
+ bfd_boolean.
+ (memory_bclose): Change return type to bfd_boolean.
+ * cache.c (cache_bclose): Likewise.
+ * opncls.c (opncls_bclose): Likewise. Return TRUE on success.
+ * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE.
+ * libbfd.h: Regenerated.
+
+2012-11-06 Tristan Gingold <[email protected]>
+
+ * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
+ Define as coff_find_nearest_line_discriminator.
+
+2012-11-06 Alan Modra <[email protected]>
+
+ PR binutils/14567
+ * opncls.c (opncls_iovec): Forward declare.
+ (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
+ to new bfd.
+
+2012-11-06 Alan Modra <[email protected]>
+
+ * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call
+ _bfd_generic_close_and_cleanup for mach_o_fat archives.
+
+2012-11-06 Alan Modra <[email protected]>
+
+ * coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
+ tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
+ tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
+ section flags.
+ * coff-ppc.c (TARGET_LITTLE_SYM): Likewise.
+ (TARGET_BIG_SYM): Likewise.
+
+2012-11-06 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
+ (ppc64_elf_size_stubs): Lookup ".TOC.".
+ (ppc64_elf_relocate_section): Resolve special symbol ".TOC.".
+
+2012-11-06 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP.
+
+2012-11-05 Andreas Krebbel <[email protected]>
+
+ PR target/14788
+ * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for
+ local ifunc symbols.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+
+2012-11-05 Alan Modra <[email protected]>
+
+ * configure.in: Apply 2012-09-10 change to config.in here.
+
+2012-11-05 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside
+ loop. Really mark toc entry referring to another toc entry
+ only if the first is used.
+
+2012-10-30 H.J. Lu <[email protected]>
+
+ * configure.in: Also handle --enable-64-bit-bfd when setting
+ CORE_HEADER for 'i[3-7]86-*-linux-*'.
+
+2012-10-30 Steve McIntyre <[email protected]>
+
+ * elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
+ display the new ARM hard-float/soft-float ABI flags for EABI_VER5
+ (elf32_arm_post_process_headers): Add the hard-float/soft-float
+ ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
+
+2012-10-30 Yao Qi <[email protected]>
+ H.J. Lu <[email protected]>
+
+ * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
+ 'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
+ * configure: Regenerated.
+
+ * elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
+ 'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
+ 'prstatus64_t' respectively.
+
+ * hosts/x86-64linux.h (a8_uint64_t): New.
+ (user_regsx32_struct): Renamed to ...
+ (user_regs64_struct): This. Replace uint64_t with a8_uint64_t.
+ (elf_gregx32_t): Renamed to ...
+ (elf_greg64_t): This. Replace uint64_t with a8_uint64_t.
+ (ELF_NGREGX32): Removed.
+ (ELF_NGREG64): New.
+ (elf_gregx32_t): Removed.
+ (elf_greg64_t): New.
+ (struct prstatus64_timeval): New.
+ (elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
+ (elf_prstatus64): New.
+ (elf_prpsinfo64): New.
+ (prstatus64_t, prpsinfo64_t): New typedef.
+
+2012-10-29 Sean Keys <[email protected]>
+
+ * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
+ R_XGATE_16
+
+2012-10-29 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
+ R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
+ R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
+ R_PPC_VLE_SDAREL_HA16A reloc howtos.
+
+2012-10-26 Nick Clifton <[email protected]>
+
+ * po/uk.po: Updated Ukranian translation.
+
+2012-10-26 Alan Modra <[email protected]>
+
+ PR gas/14758
+ * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS
+ bfd_reloc values. Map to corresponding D-form relocs.
+ (is_insn_ds_form, is_insn_qs_form): New functions.
+ (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form
+ fields using D-form reloc.
+
+2012-10-25 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Replace
+ _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+
+2012-10-24 H.J. Lu <[email protected]>
+
+ * compress.c (bfd_is_section_compressed): Don't decompress the
+ section.
+
+2012-10-23 Nathan Sidwell <[email protected]>
+
+ * bfd-in.h (bfd_elf_stack_segment_size): Declare.
+ * bfd-in2.h: Rebuilt.
+ * elfxx-target.h (elf_backend_stack_align): New.
+ (elfNN_bed): Add it.
+ * elf-bfd.h (struct elf_backend_data): Add stack_align field.
+ * elf.c (bfd_elf_map_sections_to_segments): Pay attention to
+ stack_align and stacksize for PT_GNU_STACK segment.
+ (assign_file_positions_for_non_load_sections): Set p_memsz for
+ PT_GNU_STACK segment.
+ (copy_elf_program_header): Copy PT_GNU_STACK size.
+ * elflink.c (bfd_elf_stack_segment_size): New function, taken from
+ uclinux backends.
+ (bfd_elf_size_dynamic_sections): Determine
+ PT_GNU_STACK requirements after calling backend. Pay attention to
+ stacksize.
+ * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
+ bfd_elf_stack_segment_size.
+ (elf32_bfinfdpic_modify_program_headers): Delete.
+ (elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
+ here.
+ (elf_backend_stack_align): Override.
+ (elf_backend_modify_program_headers): Don't override.
+ * elf32-frv.c (frvfdpic_always_size_sections): Call
+ bfd_elf_stack_segment_size.
+ (elf32_frvfdpic_modify_program_headers): Delete.
+ (elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
+ here.
+ (elf_backend_stack_align): Override.
+ (elf_backend_modify_program_headers): Don't override.
+ * elf32-lm32.c (lm32_elf_always_size_sections): Leave
+ PT_GNU_STACK creation to underlying elf support. Check
+ __stacksize here for backwards compatibility, and set it if
+ needed.
+ (lm32_elf_modify_segment_map): Delete.
+ (lm32_elf_modify_program_headers): Delete.
+ (elf_backend_stack_align): Override.
+ (elf_backend_modify_segment_map): Don't override.
+ (elf_backend_modify_program_headers): Don't override.
+ * elf32-sh.c (sh_elf_always_size_sections): Call
+ bfd_elf_stack_segment_size.
+ (sh_elf_modify_program_headers): Delete.
+ (sh_elf_copy_private_data): Don't copy PT_GNU_STACK
+ here.
+ (elf_backend_stack_align): Override.
+ (elf_backend_modify_program_headers): Don't override.
+ * elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
+ bfd_elf_stack_segment_size.
+ (elf32_tic6x_modify_program_headers): Delete.
+ (elf32_tic6x_copy_private_data): Delete.
+ (elf_backend_stack_align): Override.
+ (bfd_elf32_bfd_copy_private_bfd_data): Don't override.
+ (elf_backend_modify_program_headers): Don't override.
+
+2012-10-22 Alan Modra <[email protected]>
+
+ * cache.c (cache_bmmap): Don't use void* arithmetic.
+
+2012-10-21 Alan Modra <[email protected]>
+
+ * compress.c (bfd_cache_section_contents): New function.
+ * bfd-in2.h: Regenerate.
+
+2012-10-21 Hans-Peter Nilsson <[email protected]>
+
+ * linker.c (_bfd_generic_link_output_symbols): Handle a
+ no-longer-global symbol entered through a plugin.
+
+2012-10-20 Alan Modra <[email protected]>
+
+ * compress.c: Reinstate 2012-10-19 change.
+ (bfd_get_full_section_contents): Don't free unless we alloc.
+ Use proper decompress size. Delete some vars, rename others.
+
+2012-10-19 Tom Tromey <[email protected]>
+
+ * compress.c: Revert previous patch.
+
+2012-10-19 Tom Tromey <[email protected]>
+
+ * compress.c (bfd_get_full_section_contents): Don't cache
+ decompressed contents.
+
+2012-10-18 Kai Tietz <[email protected]>
+
+ PR binutils/14067
+ * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
+ Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
+ * coff-x86_64.c: Likewise.
+ * coffcode.h (DOT_ZDEBUG): New define.
+ (sec_to_styp_flags): Check for .zdebug.
+ (styp_to_sec_flags): Likewise.
+ * coffgen.c (make_a_section): Handle .debug_* section
+ compression/decompression flags.
+ * cofflink.c (mark_relocs): Ignore relocations
+ for a section, which isn't marked as used.
+ (_bfd_coff_link_input_bfd): Add support of compressed
+ debug sections.
+ * compress.c (decompress_contents): Loop as long
+ as there is input available and there is room for
+ output.
+ * bfd/pe-arm.c: Add .zdebug_ partial match entry.
+ * pe-i386.c: Likewise.
+ * pe-x86_64.c: Likewise.
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
+ data-directories as this might destroy content.
+
+ * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
+ define as coff_find_nearest_line_discriminator.
+ * libcoff-in.h (coff_find_nearest_line_discriminator): New
+ * libcoff.h: Regenerated.
+ * coff-x86_64.c: Likewise.
+ * coffgen.c (coff_find_nearest_line_discriminator): New function.
+ prototype.
+
+2012-10-16 Joel Brobecker <[email protected]>
+
+ * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
+ field to _bfd_archive_close_and_cleanup.
+ (aix5coff64_vec): Likewise.
+
+2012-10-16 Joel Brobecker <[email protected]>
+
+ * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
+ field to _bfd_archive_close_and_cleanup.
+ (pmac_xcoff_vec): Likewise.
+
+2012-10-16 Sofiane Naci <[email protected]>
+
+ * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
+ R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
+ R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
+ R_AARCH64_TLSLE_ADD_TPREL_HI12.
+ (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
+ R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
+ (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
+ AARCH64_TLSLE_*_TPREL_* relocations.
+
+2012-10-16 Alan Modra <[email protected]>
+
+ * elf32-xtensa.c (free_section_cache): Renamed from
+ clear_section_cache. Don't zero cache.
+ (section_cache_section): Remove ineffectual zero of cache.
+ Call init_section_cache instead.
+
+2012-10-15 Doug Evans <[email protected]>
+
+ * elf.c (special_sections_d): Add comment.
+
+2012-10-13 H.J. Lu <[email protected]>
+
+ PR bfd/14430
+ * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
+ * configure.in (lt_cv_dlopen_libs): AC_SUBST.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+
+2012-10-08 Alan Modra <[email protected]>
+
+ PR binutils/14662
+ * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
+ SEC_DEBUGGING.
+
+2012-09-20 Walter Lee <[email protected]>
+
+ * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
+ relocations with value of hgot.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
+
+2012-09-19 Steve Ellcey <[email protected]>
+
+ * config.bfd: Add mips*-mti-elf* target.
+
+2012-09-18 H.J. Lu <[email protected]>
+
+ PR ld/14591
+ * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
+ if the old symbol is weak.
+
+ * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
+ _bfd_elf_merge_symbol call.
+
+ * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
+ if the old symbol is weak.
+ (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
+ call.
+ (elf_link_add_object_symbols): Don't update symbol type from a
+ weak definition. Update symbol type from a common symbol when
+ overriding a weak symbol.
+
+2012-09-17 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
+ section.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
+2012-09-17 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
+ FALSE with abort.
+ * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
+
+2012-09-17 Walter Lee <[email protected]>
+
+ * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
+ got_base variable.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
+
+2012-09-17 Walter Lee <[email protected]>
+
+ * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
+ of got relocations for when .got.plt section is merged with .got.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
+
+2012-09-14 David Edelsohn <[email protected]>
+
+ * configure: Regenerate.
+
+2012-09-13 Anthony Green <[email protected]>
+
+ * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
+ Define.
+ (bfd_elf32_moxie_vec): Remove.
+ * config.bfd, configure.in: Add bi-endian support for moxie.
+ * configure: Rebuilt.
+ * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
+ (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
+
+2012-09-12 Doug Kwan <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
+ relocation for stub lookup.
+
+2012-09-12 Chris Schlumberger-Socha <[email protected]>
+
+ * bfd-in2.h: Regenerated.
+ * elf64-aarch64.c
+ (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
+ (elf64_aarch64_reloc_map): Add reloc entry.
+ (aarch64_resolve_relocation): Likewise.
+ (bfd_elf_aarch64_put_addend): Likewise.
+ (aarch64_reloc_got_type): Likewise.
+ (elf64_aarch64_final_link_relocate): Likewise.
+ (lf64_aarch64_check_relocs): Likewise.
+ (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
+ reloc.
+ * libbfd.h: Regenerated.
+ * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
+
+2012-09-10 Matthias Klose <[email protected]>
+
+ * config.in: Disable sanity check for kfreebsd.
+
+2012-09-10 H.J. Lu <[email protected]>
+
+ * configure: Regenerated.
+
+2012-09-04 Sergey A. Guriev <[email protected]>
+
+ * cpu-ia64-opc.c (ins_cnt6a): New function.
+ (ext_cnt6a): Ditto.
+ (ins_strd5b): Ditto.
+ (ext_strd5b): Ditto.
+ (elf64_ia64_operands): Add new operand types.
+
+2012-09-04 H.J. Lu <[email protected]>
+
+ PR binutils/14493
+ * elf.c (ignore_section_sym): Also ignore section symbols without
+ a BFD section.
+
+2012-09-03 Andreas Krebbel <[email protected]>
+
+ * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
+ local and global ifunc symbols.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+
+2012-09-02 H.J. Lu <[email protected]>
+
+ * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
+ _DYNAMIC symbol.
+
+ * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
+ hdynamic.
+
+ * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
+ hdynamic instead of "_DYNAMIC".
+ * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
+ * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
+ * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
+ * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
+ * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+ * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
+ * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
+ * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
+ * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
+ * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
+ * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+ * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
+
+ * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
+ hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
+ _PROCEDURE_LINKAGE_TABLE_.
+ * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
+
+2012-08-31 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
+ _DYNAMIC.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
+2012-08-31 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
+ (elf_i386_size_dynamic_sections): Use it on input sections.
+ (elf_i386_relocate_section): Don't convert
+ "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
+ for local symbols here.
+
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
+ (elf_x86_64_size_dynamic_sections): Use it on input sections.
+ (elf_x86_64_relocate_section): Don't convert
+ "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
+ for local symbols here.
+
+2012-08-30 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_relocate_section): Convert
+ "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
+ for local symbols.
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
+ "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
+ for local symbols.
+
+2012-08-31 Alan Modra <[email protected]>
+
+ PR ld/14464
+ * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
+ by a linker script in .opd to corresponding input .opd section.
+
+2012-08-28 Maciej W. Rozycki <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
+ not minus one.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+
+2012-08-28 Maciej W. Rozycki <[email protected]>
+
+ * elflink.c (_bfd_elf_merge_symbol): Also override the version
+ a dynamic symbol defaulted to if preempted with a hidden or
+ internal definition.
+
+2012-08-28 Walter Lee <[email protected]>
+
+ * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
+ of header.
+ (tilepro_plt_entry_build): Account for new header size.
+ (tilepro_elf_finish_dynamic_sections): Ditto.
+ (tilepro_elf_plt_sym_val): Ditto.
+ * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
+ of header + tail.
+ (tilegx_elf_finish_dynamic_sections): Account for new padding.
+
+2012-08-27 Walter Lee <[email protected]>
+
+ * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
+ * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
+ (tilegx_reloc_map): Ditto.
+ (reloc_to_create_func): Ditto.
+ (tilegx_elf_check_relocs): Ditto.
+ (tilegx_elf_gc_sweep_hook): Ditto.
+ (tilegx_elf_relocate_section): Ditto.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2012-08-24 Matthew Gretton-Dann <[email protected]>
+
+ * elf32-arm.c (v8): New array.
+ (tag_cpu_arch_combine): Add support for ARMv8 attributes.
+ (elf32_arm_merge_eabi_attributes): Likewise.
+ (VFP_VERSION_COUNT): New define.
+
+2012-08-20 Tom Tromey <[email protected]>
+
+ * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
+ areltdata.
+ * opncls.c (_bfd_delete_bfd): Free arelt_data.
+ * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
+ areltdata.
+ * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
+ * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
+ areltdata.
+ (xcoff_write_archive_contents_old): Likewise.
+ (xcoff_write_archive_contents_big): Likewise.
+ * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
+ areltdata.
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
+ free for areltdata.
+ (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
+ failure.
+ (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
+ (do_slurp_coff_armap): Likewise.
+ (_bfd_slurp_extended_name_table): Likewise.
+ (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
+
+2012-08-17 Nick Clifton <[email protected]>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2012-08-17 Yuri Chornoivan <[email protected]>
+
+ * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
+ * elfxx-mips.c, * vms-alpha.c: Typo fixes.
+
+2012-08-17 Alan Modra <[email protected]>
+
+ PR binutils/14475:
+ * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
+ Instead malloc areltdata.
+
+2012-08-16 Tom Tromey <[email protected]>
+
+ PR binutils/14475:
+ * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
+ 'member' BFD. Don't try to free 'ared'.
+
+2012-08-14 Nick Clifton <[email protected]>
+
+ * po/uk.po: Updated Ukranian translation.
+
+2012-08-13 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
+ the options section in the output rather than input BFD to
+ decide if to add a DT_MIPS_OPTIONS tag.
+
+2012-08-13 Maciej W. Rozycki <[email protected]>
+
+ * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
+ #ifdef BFD64.
+
+2012-08-13 Ian Bolton <[email protected]>
+ Laurent Desnogues <[email protected]>
+ Jim MacArthur <[email protected]>
+ Marcus Shawcroft <[email protected]>
+ Nigel Stephens <[email protected]>
+ Ramana Radhakrishnan <[email protected]>
+ Richard Earnshaw <[email protected]>
+ Sofiane Naci <[email protected]>
+ Tejas Belagod <[email protected]>
+ Yufeng Zhang <[email protected]>
+
+ * Makefile.am: Add AArch64 files.
+ * Makefile.in: Regenerate.
+ * archures.c (bfd_aarch64_arch): New declaration.
+ (bfd_archures_list): Use bfd_archures_list.
+ * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
+ (bfd_aarch64_process_before_allocation): New declaration.
+ (bfd_elf64_aarch64_process_before_allocation): New declaration.
+ (bfd_elf64_aarch64_set_options): New declaration.
+ (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
+ (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
+ (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
+ (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
+ (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
+ (bfd_is_aarch64_special_symbol_name): New declaration.
+ (bfd_aarch64_merge_machines): New declaration.
+ (bfd_aarch64_update_notes): New declaration.
+ (int bfd_aarch64_get_mach_from_notes): New declaration.
+ (elf64_aarch64_setup_section_lists): New declaration.
+ (elf64_aarch64_next_input_section): New declaration.
+ (elf64_aarch64_size_stubs): New declaration.
+ (elf64_aarch64_build_stubs): New declaration.
+ * config.bfd: Add AArch64.
+ * configure.in: Add AArch64.
+ * configure: Regenerate.
+ * cpu-aarch64.c: New file.
+ * elf-bfd.h: Add AArch64.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf64-aarch64.c: New file.
+ * reloc.c: Add AArch64 relocations.
+ * targets.c: Add AArch64.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2012-08-13 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
+ of protected symbols.
+
+2012-08-10 Alan Modra <[email protected]>
+
+ PR binutils/14444
+ * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
+ (setup_group): Adjust uses.
+ (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
+ word.
+
+2012-08-09 Nick Clifton <[email protected]>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2012-08-09 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
+ Remove macros, folding them into...
+ (LA25_LUI_MICROMIPS): ... this new macro.
+ (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
+ (LA25_J_MICROMIPS): ... this new macro.
+ (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
+ into...
+ (LA25_ADDIU_MICROMIPS): ... this new macro.
+ (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
+ (mips_elf_create_la25_stub): Use them.
+ (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
+ (_bfd_mips_elf_relax_section): Likewise.
+
+2012-08-09 Alan Modra <[email protected]>
+ Tom Tromey <[email protected]>
+
+ * archive.c (SECTION Archives): Update documentation.
+ (_bfd_delete_archive_data): Remove.
+ (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
+ (archive_close_worker, _bfd_archive_close_and_cleanup): New
+ functions.
+ * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
+ (_bfd_delete_archive_data): Don't declare.
+ (_bfd_archive_close_and_cleanup): Declare.
+ (_bfd_generic_close_and_cleanup): Redefine.
+ * libbfd.h: Rebuild.
+ * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
+ (bfd_close): Don't close nested thin archives here.
+
+2012-08-07 Tom Tromey <[email protected]>
+
+ * archive.c (_bfd_delete_archive_data): New function.
+ * libbfd-in.h (_bfd_delete_archive_data): Declare.
+ * libbfd.h: Rebuild.
+ * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
+
+2012-08-07 Nick Clifton <[email protected]>
+
+ * po/uk.po: Updated Ukranian translation.
+
+2012-08-06 Maciej W. Rozycki <[email protected]>
+
+ * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
+ symbols special case.
+
+2012-08-05 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
+ PLT slots for local symbols.
+
+2012-08-03 Maciej W. Rozycki <[email protected]>
+
+ * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
+ field initializers throughout.
+ * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
+
+2012-08-03 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips_elf_perform_relocation): Update the
+ cross-mode jump message.
+
+2012-08-03 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
+ comment on DT_MIPS_RLD_MAP.
+
+2012-08-03 Tom Tromey <[email protected]>
+
+ * opncls.c (_bfd_delete_bfd): Now static.
+ * libbfd-in.h (_bfd_delete_bfd): Don't declare.
+ * libbfd.h: Rebuild.
+
+2012-08-02 Sean Keys <[email protected]>
+
+ * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
+ conditional statment to allow suppression of mismatched bank
+ warning.
+
+2012-08-01 Alan Modra <[email protected]>
+
+ * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
+ (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
+ gnu_debuglink bfd.
+ (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
+
+2012-07-30 Nick Clifton <[email protected]>
+
+ * po/bfd.pot: Updated template.
+ * po/es.po: Updated Spanish translation.
+ * po/fi.po: Updated Finnish translation.
+ * po/fr.po: Updated French translation.
+ * po/ru.po: Updated Russian translation.
+ * po/uk.po: Updated Ukranian translation.
+
+2012-07-27 Mike Frysinger <[email protected]>
+
+ * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
+ (AM_INIT_AUTOMAKE): Remove args.
+ * configure: Regenerate.
+
+2012-07-27 Andreas Krebbel <[email protected]>
+
+ * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
+ arch depending on the target size.
+
+2012-07-27 Tristan Gingold <[email protected]>
+
+ * configure.in: Bump version to 2.23.51
+ * configure: Regenerate.
+
+2012-07-26 Teresa Johnson <[email protected]>
+
+ * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
+ if it is non-NULL.
+
+2012-07-26 Meador Inge <[email protected]>
+ Nick Clifton <[email protected]>
+
+ PR ld/14397
+ * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
+ if a required section is missing from the linker script.
+
+2012-07-24 Jan Waclawek <[email protected]>
+ PR 13899
+ * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
+ _bfd_elf_link_read_relocs with keep_memory as TRUE.
+
+2012-07-24 Teresa Johnson <[email protected]>
+
+ * bfd.c (bfd_find_nearest_line_discriminator): New macro.
+ * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
+ * coff64-rs6000.c: Likewise.
+ * dwarf2.c (struct line_info): Add discriminator field.
+ (add_line_info): Fill in new discriminator field.
+ (decode_line_info): Record discriminator information instead
+ of ignoring it.
+ (lookup_address_in_line_info_table): Return discriminator field if
+ requested.
+ (comp_unit_find_nearest_line): Add discriminator argument.
+ (find_line): Likewise.
+ (_bfd_dwarf2_find_nearest_line): Likewise.
+ (_bfd_dwarf2_find_line): Likewise.
+ * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
+ (_bfd_elf_find_line_discriminator): Likewise.
+ (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
+ * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
+ that invokes _bfd_elf_find_nearest_line_discriminator with correct
+ arguments.
+ (_bfd_elf_find_nearest_line_discriminator): New.
+ (_bfd_elf_find_line): Change to a wrapper
+ that invokes _bfd_elf_find_line_discriminator with correct
+ arguments.
+ (_bfd_elf_find_line_discriminator): New.
+ * coffgen.c (coff_find_nearest_line_with_names): Handle
+ new discriminator argument.
+ * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
+ * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
+ * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
+ * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
+ argument.
+ (_bfd_dwarf2_find_line): Likewise.
+ (_bfd_generic_find_nearest_line_discriminator): New.
+ * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Likewise.
+ * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
+ _bfd_find_nearest_line_discriminator with
+ _bfd_generic_find_nearest_line_discriminator.
+ (bfd_target): Add _bfd_find_nearest_line_discriminator.
+
+2012-07-24 Sean Keys <[email protected]>
+
+ * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
+ that enables the linker to offset addresses, when linking against
+ symbols from the XGATE processor and vice versa.
+
+2012-07-23 Nick Clifton <[email protected]>
+
+ * cisco-core.c (cisco_core_file_failing_command): Make static.
+ (cisco_core_file_failing_signal): Make static.
+
+2012-07-18 H.J. Lu <[email protected]>
+
+ * bfd-in2.h: Regenerated.
+
+2012-07-18 Nicolàs Alejandro Di Risio <[email protected]>
+
+ PR binutils/14335
+ * section.c: Fix a typo in comments.
+
+2012-07-13 Andreas Krebbel <[email protected]>
+
+ * elf64-s390.c: Include elf-s390-common.c.
+ (R_390_IRELATIVE): New reloc.
+ (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
+ (RELA_ENTRY_SIZE): New macro.
+ (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
+ *ifunc_resolver_section.
+ (struct plt_entry): New struct.
+ (struct elf_s390_obj_tdata): New field local_plt.
+ (elf_s390_local_plt): New macro.
+ (struct elf_s390_link_hash_table): New field irelifunc.
+ (ELF64): New macro.
+ (link_hash_newfunc): Initialize new fields.
+ (elf_s390_check_relocs): Handle IFUNC symbols.
+ (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
+ symbols.
+ (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
+ IFUNC symbols.
+ (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
+ (elf_s390_relocate_section): Likewise.
+ (elf_s390_finish_dynamic_symbol): Likewise.
+ (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
+ (elf_s390_finish_ifunc_symbol): New function.
+ (elf_s390_gc_sweep_hook): Handle local plt entries.
+ (elf_backend_add_symbol_hook): Define.
+ * elf32-s390.c: See elf64-s390.c changes.
+ * elf-s390-common.c: New file.
+ * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
+ * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
+ BFD_RELOC_390_IRELATIVE.
+ * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
+
+2012-07-13 Nick Clifton <[email protected]>
+
+ * aix386-core.c: Remove use of PTR and PARAMS macros.
+ * archive.c: Likewise.
+ * cache.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-apollo.c: Likewise.
+ * coff-aux.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * coff-h8500.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+ * coff-m68k.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-or32.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-sparc.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic4x.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-w65.c: Likewise.
+ * cofflink.c: Likewise.
+ * cpu-arc.c: Likewise.
+ * cpu-cris.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-msp430.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * cpu-powerpc.c: Likewise.
+ * cpu-rs6000.c: Likewise.
+ * cpu-tic4x.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-crx.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-h8300.c: Likewise.
+ * elf32-i960.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc12.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-rl78.c: Likewise.
+ * elf32-rx.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * hash.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
+ * i386dynix.c: Likewise.
+ * i386linux.c: Likewise.
+ * i386lynx.c: Likewise.
+ * i386mach3.c: Likewise.
+ * i386msdos.c: Likewise.
+ * i386os9k.c: Likewise.
+ * irix-core.c: Likewise.
+ * lynx-core.c: Likewise.
+ * m68klinux.c: Likewise.
+ * mach-o.h: Likewise.
+ * mipsbsd.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * osf-core.c: Likewise.
+ * pc532-mach.c: Likewise.
+ * pef.c: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
+ * reloc16.c: Likewise.
+ * sco5-core.c: Likewise.
+ * som.h: Likewise.
+ * sparclinux.c: Likewise.
+ * sparclynx.c: Likewise.
+ * ticoff.h: Likewise.
+ * trad-core.c: Likewise.
+ * vms-lib.c: Likewise.
+ * xsym.h: Likewise.
+
+2012-07-09 Alan Modra <[email protected]>
+
+ PR ld/14323
+ * elflink.c (elf_sort_symbol): Sort by size too.
+ (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
+ Do not depend on ordering of symbol aliases. Match largest size.
+
+2012-07-03 H.J. Lu <[email protected]>
+
+ * elf.c (assign_section_numbers): Check if number of sections
+ >= SHN_LORESERVE.
+ * elfcode.h (elf_object_p): Likewise.
+
+2012-07-03 Nick Clifton <[email protected]>
+
+ * archive.c (bsd_write_armap): Catch attempts to create an archive
+ with indicies bigger than 4Gb.
+ (coff_write_armap): Likewise.
+
+2012-07-03 H.J. Lu <[email protected]>
+
+ PR binutils/14319
+ * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
+ debug section.
+
+2012-07-03 H.J. Lu <[email protected]>
+
+ PR ld/3351
+ * elflink.c (_bfd_elf_update_dynamic_flags): New.
+ (_bfd_elf_merge_symbol): Update both real and indirect symbol
+ dynamic flags.
+ (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
+ the indirect symbol is defined in a shared library.
+ (elf_link_add_object_symbols): Likewise. If the indirect
+ symbol has been forced local, don't make the real symbol
+ dynamic.
+ (elf_link_check_versioned_symbol): Check indirect symbol.
+ (elf_link_output_extsym): Use real symbol definition when
+ reporting indirect symbol error. Check version info for
+ dynamic versioned symbol.
+
+2012-07-03 Alan Modra <[email protected]>
+
+ PR ld/14207
+ * elf.c (assign_file_positions_for_load_sections): Remove assertions
+ that only PT_LOAD headers include file header and section headers.
+ (assign_file_positions_for_non_load_sections): Similarly don't
+ assert PT_GNU_RELRO header does not include file and section headers.
+ Compare first section vma rather than PT_LOAD p_vaddr against
+ relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
+ abort with assertion.
+
+2012-07-02 Alan Modra <[email protected]>
+
+ * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
+ "anyway" variant when creating .plt.
+ (m32c_elf_relax_plt_section): Remove redundant test and unused param.
+ (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
+ m32c_elf_relax_plt_section.
+ * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
+ when creating .got and .got.plt.
+ (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
+ bfd_get_linker_section.
+ * sunos.c: Similarly throughout.
+
+2012-07-01 Andreas Schwab <[email protected]>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
+ message.
+
+2012-06-29 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
+ on unresolvable relocation.
+
+2012-06-29 H.J. Lu <[email protected]>
+
+ * archive.c (_bfd_compute_and_write_armap): Simplify global
+ symbol handling.
+
+2012-06-29 Nick Clifton <[email protected]>
+
+ PR ld/14189
+ * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
+ for locally bound symbols.
+
+2012-06-29 Alan Modra <[email protected]>
+
+ * section.c (bfd_get_linker_section): New function.
+ * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
+ the above throughout rather than bfd_get_section_by_name. Use
+ bfd_make_section_anyway rather than bfd_make_section when creating
+ them.
+ * elf32-bfin.c: Likewise.
+ * elf32-cr16.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-lm32.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-microblaze.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-rl78.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-score.c: Likewise.
+ * elf32-score7.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-tic6x.c: Likewise.
+ * elf32-tilepro.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * elfxx-tilegx.c: Likewise.
+ * elflink.c: Likewise.
+ * elf-vxworks.c: Likewise.
+ * elf-m10300.c: Likewise. Also make use of htab plt, got and
+ gotplt shortcuts.
+ * bfd-in2.h: Regenerate.
+ * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
+ calling create_rofixup_section.
+ * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
+
+2012-06-29 Alan Modra <[email protected]>
+
+ * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
+ section for bss type sections, except for .rela.bss.
+ * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
+ * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
+ * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
+ * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
+ * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
+
+2012-06-28 Roland McGrath <[email protected]>
+
+ * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
+ displacement calculation in nacl_p case.
+
+2012-06-28 Nick Clifton <[email protected]>
+
+ * po/uk.po: New Ukranian translation.
+ * configure.in (ALL_LINGUAS): Add uk.
+ * configure: Regenerate.
+
+2012-06-26 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
+ file has multiple .got/.toc sections and all don't fit in
+ current toc group.
+
+2012-06-22 Roland McGrath <[email protected]>
+
+ * elf.c (assign_file_positions_for_non_load_sections): Define
+ __ehdr_start symbol if it's referenced and there's a PT_LOAD
+ segment that covers both the file and program headers.
+
+2012-06-22 Andreas Schwab <[email protected]>
+
+ * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
+ _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
+
+2012-06-22 Alan Modra <[email protected]>
+
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
+ save/restore functions when relocatable. Make "funcs" static.
+
+2012-06-18 Hans-Peter Nilsson <[email protected]>
+
+ * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
+ of merged .got and .got.plt entries.
+
+2012-06-18 John Szakmeister <[email protected]>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
+
+2012-06-17 Hans-Peter Nilsson <[email protected]>
+
+ * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
+ <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
+ thread common symbols.
+
+2012-06-13 Nick Clifton <[email protected]>
+
+ * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
+ (elf32_arm_object_p): If the machine number could not be deduced
+ from the notes, call bfd_arm_get_mach_from_attributes to get the
+ number from the attributes.
+
+2012-06-12 H.J. Lu <[email protected]>
+
+ PR bfd/14207
+ * elf.c (assign_file_positions_for_non_load_sections): Abort if
+ PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
+
+2012-06-12 Alan Modra <[email protected]>
+
+ PR ld/14207
+ * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
+ sections at end of PT_LOAD segment when searching for segment
+ that contains end of relro extent.
+
+2012-06-11 H.J. Lu <[email protected]>
+
+ * elf.c (assign_file_positions_for_non_load_sections): Reindent.
+
+2012-06-11 H.J. Lu <[email protected]>
+
+ * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
+
+2012-06-06 Alan Modra <[email protected]>
+
+ * elflink.c (elf_link_input_bfd): Provide a file symbol for
+ each input file with local syms, if the input lacks such.
+ (bfd_elf_final_link): Add a file symbol to mark end of locals
+ for which we can associate with input files.
+ (struct elf_final_link_info): Add filesym_count field.
+ (struct elf_outext_info): Add need_second_pass and second_pass.
+ (elf_link_output_extsym): Detect symbols defined in the output
+ file, emit them on second pass over locals.
+
+2012-06-04 Jan Kratochvil <[email protected]>
+
+ * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
+ of target_read_memory as bfd_size_type.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
+ argument of target_read_memory as bfd_size_type.
+ (_bfd_elf32_bfd_from_remote_memory): Likewise.
+ (_bfd_elf64_bfd_from_remote_memory): Likewise.
+ * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
+ * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
+
+2012-06-03 Alan Modra <[email protected]>
+
+ PR binutils/13897
+ * elf.c (elf_find_function): Cache last function sym info.
+ (_bfd_elf_maybe_function_sym): Return function size, pass in
+ section of interest.
+ * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
+ (_bfd_elf_maybe_function_sym): Likewise.
+ * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
+ (opd_entry_value): Add in_code_sec param. Revert caching code.
+ Return -1 if in_code_sec and function found in wrong section.
+ Update all calls.
+
+2012-06-01 Siddhesh Poyarekar <[email protected]>
+
+ * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
+ of target_read_memory as size_t.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
+ argument of target_read_memory as size_t.
+ (_bfd_elf32_bfd_from_remote_memory): Likewise.
+ (_bfd_elf64_bfd_from_remote_memory): Likewise.
+ * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
+ * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
+
+2012-06-01 Alan Modra <[email protected]>
+
+ PR binutils/13897
+ * elf64-ppc.c (opd_entry_value): Rewrite cache code.
+
+2012-05-29 Tom Tromey <[email protected]>
+
+ * opncls.c (bfd_fopen): Always close fd on failure.
+ (bfd_fdopenr): Likewise.
+
+2012-05-27 Alan Modra <[email protected]>
+
+ PR ld/14170
+ * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
+ a dynamic library finds a new instance with non-default
+ visibility in a regular object, correctly handle symbols
+ already on the undefs list and undo dynamic symbol state when
+ the new symbol is hidden or internal.
+
+2012-05-25 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
+ dynamic_sec_flags to create PLT .eh_frame section.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
+2012-05-25 Alan Modra <[email protected]>
+
+ PR ld/13909
+ * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
+ (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
+ * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
+ * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
+ size dynamic sections before stripping eh_frame_hdr.
+ (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
+ if no other .eh_frame sections exist.
+ * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
+ or alloc plt_eh_frame here..
+ (elf_i386_size_dynamic_sections): ..do it here instead. Don't
+ specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
+ (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
+ before writing plt offset.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
+ or alloc plt_eh_frame here..
+ (elf_x86_64_size_dynamic_sections): ..do it here instead.
+ (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
+ before writing plt offset.
+
+2012-05-24 Alan Modra <[email protected]>
+
+ PR ld/14158
+ * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
+ size to output section alignment.
+ (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
+
+2012-05-23 Alan Modra <[email protected]>
+
+ * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
+ BFDs with multiple .eh_frame sections.
+
+2012-05-23 Alan Modra <[email protected]>
+
+ PR ld/13909
+ * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
+
+2012-05-22 H.J. Lu <[email protected]>
+
+ PR ld/13909
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
+ last change.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
+2012-05-22 Alan Modra <[email protected]>
+
+ * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
+ first one is zero size or discarded.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
+ glink_eh_frame contents here..
+ (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
+ offset to .glink.
+
+2012-05-22 H.J. Lu <[email protected]>
+
+ PR ld/13909
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
+ eh_frame section if there is an input .eh_frame section.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
+2012-05-22 H.J. Lu <[email protected]>
+
+ PR ld/14105
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Always
+ create PLT eh_frame section with SEC_LINKER_CREATED.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
+2012-05-22 Alan Modra <[email protected]>
+
+ * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
+ sections attached to a BFD.
+ * section.c (bfd_get_section_by_name): Rewrite description.
+ (bfd_get_next_section_by_name): New function.
+ * bfd-in2.h: Regenerate.
+
+2012-05-21 Andreas Schwab <[email protected]>
+
+ * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
+ (elf_m68k_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Define.
+
+2012-05-19 Maciej W. Rozycki <[email protected]>
+
+ * elf64-mips.c (elf_backend_got_header_size): Correct definition.
+ * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
+ backend's GOT header size instead of hardcoding it.
+
+2012-05-19 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_relocate_section)
+ <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
+
+2012-05-19 Maciej W. Rozycki <[email protected]>
+
+ * elf32-vax.c (elf_vax_relocate_section)
+ <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
+ its name as the check for text sections.
+
+2012-05-19 Maciej W. Rozycki <[email protected]>
+
+ * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
+ the third reloc offset is the same as the first.
+
+2012-05-19 Alan Modra <[email protected]>
+
+ * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
+ (has_tls_reloc, has_tls_get_addr_call): Move back to..
+ * elf32-ppc.c: ..here.
+ (ppc_elf_section_flags, elf_backend_section_flags): Delete.
+ (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
+
+2012-05-18 H.J. Lu <[email protected]>
+
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
+ _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
+ * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
+
+2012-05-18 Roland McGrath <[email protected]>
+
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
+ not to clobber the ar_fmag field stored in ARED->arch_header.
+
+2012-05-18 Pedro Alves <[email protected]>
+
+ * mach-o.h: Don't include sysdep.h.
+
+2012-05-18 Nick Clifton <[email protected]>
+
+ PR 14072
+ * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
+ complaining about config.h not having been included.
+ * bfd-in2.h: Regenerate.
+
+2012-05-18 Andreas Schwab <[email protected]>
+
+ * aclocal.m4: Regenerate.
+ * Makefile.in: Regenerate.
+
+2012-05-17 Daniel Richard G. <[email protected]>
+ Nick Clifton <[email protected]>
+
+ PR 14072
+ * configure.in: Add check that sysdep.h has been included before
+ any system header files.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * bfd-in.h: Generate an error if included before config.h.
+ * sysdep.h: Likewise.
+ * bfd-in2.h: Regenerate.
+ * compress.c: Remove #include "config.h".
+ * plugin.c: Likewise.
+ * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
+ * elf64-hppa.c: Likewise.
+ * som.c: Likewise.
+ * xsymc.c: Likewise.
+
+2012-05-17 Maciej W. Rozycki <[email protected]>
+ Alan Modra <[email protected]>
+
+ * elf.c (ignore_section_sym): Correct comment. Don't return
+ true for absolute section.
+ (elf_map_symbols): Move stray comment. Adjust for above change.
+ Don't discard global section symbols.
+
+2012-05-17 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
+ _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
+ * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
+ absolute.
+
+2012-05-17 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
+ is_ppc_vle): Move to..
+ * elf32-ppc.h: ..here, making is_ppc_vle a macro.
+
+2012-05-16 Sergio Durigan Junior <[email protected]>
+
+ * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
+ bfd_get_section_lma, bfd_get_section_alignment,
+ bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
+ in order to use the `bfd' argument.
+ * bfd-in2.h: Regenerate.
+ * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
+ as the first argument for `bfd_get_section_alignment'.
+ * elf32-arm.c (create_ifunc_sections): Likewise, for
+ `bfd_set_section_alignment'.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
+ `bfd_get_section_name'.
+ * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ (ppc_elf_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
+ `bfd_get_section_vma'.
+ * elf64-ppc.c (create_linkage_sections): Likewise, for
+ `bfd_set_section_alignment'.
+
+2012-05-16 Georg-Johann Lay <[email protected]>
+
+ PR target/13503
+ * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
+ R_AVR_8_HLO8.
+ (avr_reloc_map): Likewise.
+
+2012-05-16 Daniel Richard G. <[email protected]>
+
+ PR binutils/13558
+ * bfd/aout-cris.c: Include sysdep.h before bfd.h.
+ * bfd/aout-ns32k.c: Likewise.
+ * bfd/aout-sparcle.c: Likewise.
+ * bfd/aout0.c: Likewise.
+ * bfd/bfd-in2.h: Likewise.
+ * bfd/coff-stgo32.c: Likewise.
+ * bfd/cpu-lm32.c: Likewise.
+ * bfd/cpu-microblaze.c: Likewise.
+ * bfd/cpu-score.c: Likewise.
+ * bfd/cpu-tilegx.c: Likewise.
+ * bfd/cpu-tilepro.c: Likewise.
+ * bfd/elf32-lm32.c: Likewise.
+ * bfd/elf32-microblaze.c: Likewise.
+ * bfd/elf32-score7.c: Likewise.
+ * bfd/elf32-tilepro.c: Likewise.
+ * bfd/elfxx-tilegx.c: Likewise.
+ * bfd/mach-o.h: Likewise.
+ * bfd/nlm32-ppc.c: Likewise.
+ * bfd/ns32knetbsd.c: Likewise.
+ * bfd/pef.h: Likewise.
+ * bfd/plugin.c: Likewise.
+ * bfd/stab-syms.c: Likewise.
+ * bfd/sunos.c: Likewise.
+ * bfd/syms.c: Likewise.
+ * bfd/xsym.h: Likewise.
+
+2012-05-16 Alan Modra <[email protected]>
+
+ * elflink.c: Rename flaginfo to flinfo throughout, except..
+ (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
+ Formatting, style. Simplify flag match.
+
+2012-05-16 Alan Modra <[email protected]>
+
+ * dwarf2.c: Formatting.
+ (arange_add): Pass in unit rather than bfd. Update callers.
+ Ignore empty ranges. Don't ask for cleared memory.
+ (parse_comp_unit): Only set unit->base_address if processing
+ DW_TAG_compile_unit.
+ (find_debug_info): Optimise section lookup.
+ (place_sections): Use bfd_alloc for stash->adjusted_sections.
+ (find_line): Match previously parsed comp unit addresses as we
+ do for newly parsed comp units.
+
+2012-05-16 Alan Modra <[email protected]>
+
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
+ stops at end of ar_size field.
+
+2012-05-16 Alan Modra <[email protected]>
+
+ PR ld/13962
+ PR ld/7023
+ * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
+ out of range. As a special case, fix sh_info for zero sh_size.
+ Do the same for .symtab.
+
+2012-05-15 James Murray <[email protected]>
+ Stephane Carrez <[email protected]>
+
+ * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
+ * config.bfd: Likewise.
+ * cpu-m9s12x.c: New.
+ * cpu-m9s12xg.c: New.
+ * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
+ Add option to offset S12 addresses into XGATE memory space.
+ Fix carry bug in IMM16 (IMM8 low/high) relocate.
+ * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
+ (ALL_MACHINES_CFILES): Likewise.
+ * reloc.c: Add S12X relocs.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2012-05-14 James Lemke <[email protected]>
+ Catherine Moore <[email protected]>
+
+ * bfd.c (bfd_lookup_section_flags): Add section parm.
+ * ecoff.c (bfd_debug_section): Remove flag_info initializer.
+ * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
+ (bfd_elf_lookup_section_flags): Add section parm.
+ * elf32-ppc.c (is_ppc_vle): New function.
+ (ppc_elf_modify_segment_map): New function.
+ (elf_backend_modify_segment_map): Define.
+ (has_vle_insns): New define.
+ * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
+ * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
+ Move in logic to omit / include a section.
+ * libbfd-in.h (bfd_link_info): Add section parm.
+ (bfd_generic_lookup_section_flags): Likewise.
+ * reloc.c (bfd_generic_lookup_section_flags): Likewise.
+ * section.c (bfd_section): Move out section_flag_info.
+ (BFD_FAKE_SECTION): Remove flag_info initializer.
+ * targets.c (_bfd_lookup_section_flags): Add section parm.
+
+2012-05-14 Catherine Moore <[email protected]>
+
+ * archures.c (bfd_mach_ppc_vle): New.
+ * bfd-in2.h: Regenerated.
+ * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
+ * elf32-ppc.c (split16_format_type): New enumeration.
+ (ppc_elf_vle_split16): New function.
+ (HOWTO): Add entries for R_PPC_VLE relocations.
+ (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
+ (ppc_elf_section_flags): New function.
+ (ppc_elf_lookup_section_flags): New function.
+ (ppc_elf_section_processing): New function.
+ (ppc_elf_check_relocs): Handle PPC_VLE relocations.
+ (ppc_elf_relocation_section): Likewise.
+ (elf_backend_lookup_section_flags_hook): Define.
+ (elf_backend_section_flags): Define.
+ (elf_backend_section_processing): Define.
+ * elf32-ppc.h (ppc_elf_section_processing): Declare.
+ * libbfd.h: Regenerated.
+ * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
+ BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
+ BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
+ BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
+ BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
+ BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
+ BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
+ BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
+ BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
+
+2012-05-11 Georg-Johann Lay <[email protected]>
+
+ PR target/13503
+ * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
+ BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-avr.c (elf_avr_howto_table): Add entries for
+ R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
+ (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
+ R_AVR_8_HHI8.
+
+2012-05-10 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
+ addend overflow check.
+
+2012-05-10 DJ Delorie <[email protected]>
+
+ * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
+
+2012-05-10 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
+ hex number in x32 addend overflow check.
+
+2012-05-10 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
+ R_X86_64_RELATIVE64.
+
+2012-05-09 H.J. Lu <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
+ overflow for R_X86_64_RELATIVE64.
+
+2012-05-08 Ben Cheng <[email protected]>
+
+ * elf.c: Preserve the original p_align and p_flags if they are
+ valid.
+
+2012-05-07 Alan Modra <[email protected]>
+
+ * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
+ RELOC_AGAINST_DISCARDED_SECTION invocation.
+
+2012-05-07 Hans-Peter Nilsson <[email protected]>
+
+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
+ local variable i_ instead of assuming and using a variable i.
+
+2012-05-07 Maciej W. Rozycki <[email protected]>
+
+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
+ relocations.
+ * elfxx-mips.c (mips_reloc_against_discarded_section): New
+ function.
+ (_bfd_mips_elf_relocate_section): Call it, in place of
+ RELOC_AGAINST_DISCARDED_SECTION.
+ * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
+ to RELOC_AGAINST_DISCARDED_SECTION.
+ * 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-epiphany.c (epiphany_elf_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-i386.c (elf_i386_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-rl78.c (rl78_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-tilepro.c (tilepro_elf_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.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
+
+2012-05-05 Alan Modra <[email protected]>
+
+ PR ld/14052
+ PR ld/13621
+ * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
+
+2012-05-05 Alan Modra <[email protected]>
+
+ * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
+ bfd_und_section and bfd_ind_section with their _ptr variants, or
+ use corresponding bfd_is_* macros.
+ * aout-ns32k.c: Likewise.
+ * aout-tic30.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * elf-attrs.c: Likewise.
+ * elfcode.h: Likewise.
+ * peicode.h: Likewise.
+ * reloc.c: Likewise.
+ * riscix.c: Likewise.
+ * versados.c: Likewise.
+ * section.c: Likewise.
+ (bfd_abs_section, bfd_ind_section, bfd_com_section,
+ bfd_ind_section): Delete.
+ (std_section): New array replacing above.
+ (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
+ bfd_ind_section_ptr, STD_SECTION): Update.
+ (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
+ * bfd-in2.h: Regenerate.
+
+2012-05-03 Sean Keys <[email protected]>
+
+ * cpu-xgate.c: New file. Added XGATE support.
+ * archures.c (bfd_architecture): Add XGATE architecture.
+ (bfd_archures_list): Add reference to XGATE architecture info.
+ * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
+ * reloc.c: Add various XGATE relocation enums.
+ * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
+ list.
+ * Makefile.am: Add support for XGATE elf.
+ * configure.in: Ditto.
+ * config.bfd: Ditto.
+ * Makefile.in: Regenerate.
+ * configure: Ditto.
+ * bfd-in2.h: Ditto.
+ * libbfd.h: Ditto.
+ Added files for XGATE relocations.
+ * elf32-xgate.c: Created minimal relocation file.
+ * elf32-xgate.h: Created minimal header file for elf32-xgate.
+
+2012-05-03 Tristan Gingold <[email protected]>
+
+ * dwarf2.c (decode_line_info): Ignore
+ DW_LNE_HP_source_file_correlation.
+
+2012-05-01 Nick Clifton <[email protected]>
+
+ PR binutils/13121
+ * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
+ AIX system headers.
+ * coff-ppc.c: Likewise.
+ * cofflink.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elflink.c: Likewise.
+ * pdp11.c: Likewise.
+ * rescoff.c: Likewise.
+
+2012-04-26 Mark Wielaard <[email protected]>
+
+ * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
+ possibly being relative to DW_AT_low_pc.
+ (parse_comp_unit): Likewise.
+
+2012-04-26 Andreas Schwab <[email protected]>
+
+ * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
+ also when generating PIE.
+ (elf_m68k_discard_copies): Mark undefined weak symbols referenced
+ by relocations as dynamic.
+
+2012-04-26 Hans-Peter Nilsson <[email protected]>
+
+ Provide a way for programs to recognize BFD_ASSERT calls.
+ * bfd.c (bfd_assert_handler_type): New API type.
+ (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
+ (_bfd_assert_handler): New variable.
+ (_bfd_default_assert_handler): New function.
+ (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
+ * libbfd-in.h (_bfd_assert_handler): Declare.
+ * libbfd.h, bfd-in2.h: Regenerate.
+
+2012-04-24 Hans-Peter Nilsson <[email protected]>
+
+ PR ld/13990
+ * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
+ symbol, where PLT refcount is set to -1.
+
+2012-04-24 Alan Modra <[email protected]>
+
+ PR ld/13991
+ * elf-bfd.h (_bfd_elf_link_just_syms): Define as
+ _bfd_generic_link_just_syms.
+ * elflink.c (_bfd_elf_link_just_syms): Delete.
+ * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
+
+ * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
+ * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
+ SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
+ SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
+ * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
+ * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
+ * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
+ * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
+ * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
+ * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
+ * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
+ * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
+ * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
+ * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
+ * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
+ * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
+ * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
+ * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
+ * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
+ * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
+ * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
+ * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
+ * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
+ * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
+ * reloc.c: Update all references.
+ * bfd-in2.h: Regenerate.
+
+2012-04-20 Andreas Krebbel <[email protected]>
+
+ * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
+ * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
+
+2012-04-19 Thomas Schwinge <[email protected]>
+
+ * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
+ got_type.
+ (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
+ it.
+
+2012-04-17 Kaz Kojima <[email protected]>
+
+ * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
+ relocations when LE conversion happens on the IE tls symbol.
+
+2012-04-17 Roland McGrath <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
+ so that 32-byte boundary is a proper instruction boundary.
+
+2012-04-17 Tristan Gingold <[email protected]>
+
+ * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
+ member of an object archive.<
+
+2012-04-17 Tristan Gingold <[email protected]>
+
+ * vms-lib.c (MAX_EKEYLEN): Define.
+ (MAX_KEYLEN): Fix value.
+ (vms_write_index): Add comments and fix indentation.
+ Adjust comparaison. Add assertions. Free kbn_blk.
+ (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
+ Compense MAX_KEYLEN adjustment.
+
+2012-04-16 Maciej W. Rozycki <[email protected]>
+
+ * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
+ (_bfd_mips_elf_check_relocs): Update accordingly.
+
+2012-04-13 Alan Modra <[email protected]>
+
+ PR ld/13947
+ * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
+ reloc sections.
+
+2012-04-12 David S. Miller <[email protected]>
+
+ * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
+ BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Likewise.
+ * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
+ (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
+ R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
+ (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
+ (_bfd_sparc_elf_check_relocs): Likewise.
+ (_bfd_sparc_elf_gc_sweep_hook): Likewise.
+ (_bfd_sparc_elf_relocate_section): Likewise.
+
+2012-04-12 Roland McGrath <[email protected]>
+
+ * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
+ New variables.
+ (struct elf32_arm_link_hash_table): New member `nacl_p'.
+ (elf32_arm_link_hash_table_create): Initialize it.
+ (elf32_arm_nacl_link_hash_table_create): New function.
+ (arm_movw_immediate, arm_movt_immediate): New functions.
+ (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
+ (elf32_arm_finish_dynamic_sections): Likewise.
+ (elf32_arm_output_plt_map_1): Likewise.
+ (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
+ New backend vector stanza.
+ (elf32_arm_nacl_modify_segment_map): New function.
+ * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
+ * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
+ * configure.in: Likewise.
+ (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
+ (bfd_elf32_littlearm_nacl_vec): Likewise.
+ (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
+ (bfd_elf32_bigarm_symbian_vec): Likewise.
+ (bfd_elf32_littlearm_symbian_vec): Likewise.
+ (bfd_elf32_bigarm_vxworks_vec): Likewise.
+ (bfd_elf32_littlearm_vxworks_vec): Likewise.
+ * configure: Regenerated.
+
+2012-04-12 Tristan Gingold <[email protected]>
+
+ * elflink.c (elf_link_output_extsym): Add a guard.
+ (bfd_elf_final_link): Remove assertion.
+ (bfd_elf_final_link): Add a guard.
+ * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
+ (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
+ (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
+ (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
+ Remove.
+ (elfNN-ia64-vms target): Move to ...
+ * elf64-ia64-vms.c: New file.
+ * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
+ * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
+ (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2012-04-11 Nick Clifton <[email protected]>
+
+ PR binutils/13897
+ * elf64-ppc.c (opd_entry_value): When dealing with sections
+ without relocs, keep the last section loaded in order to avoid
+ unnecessary reloads.
+
+2012-04-09 Roland McGrath <[email protected]>
+
+ * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
+ * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
+ (nacl_modify_program_headers): Likewise.
+
+2012-04-03 Roland McGrath <[email protected]>
+
+ * elf-nacl.c: New file.
+ * elf-nacl.h: New file.
+ * elf32-i386.c (elf_backend_modify_segment_map): Define for
+ bfd_elf32_i386_nacl_vec.
+ (elf_backend_modify_program_headers): Likewise.
+ * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
+ bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
+ (elf_backend_modify_program_headers): Likewise.
+ * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
+ (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
+ * Makefile.in: Regenerated.
+ * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
+ (bfd_elf32_x86_64_nacl_vec): Likewise.
+ (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
+ (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
+ (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
+ (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
+ (bfd_elf32_i386_nacl_vec): Likewise.
+ (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
+ (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
+ * configure: Regenerated.
+
+2012-03-31 Andreas Schwab <[email protected]>
+
+ * elf32-m68k.c (elf_m68k_relocate_section): Allow
+ R_68K_TLS_LE{8,16,32} for PIE.
+
+2012-03-30 Andreas Krebbel <[email protected]>
+
+ * elf64-s390.c: Fix several comments regarding PLT entry
+ description.
+ * elf32-s390.c: Likewise.
+
+2012-03-30 Andreas Krebbel <[email protected]>
+
+ * elf64-s390.c: Use the section pointer shortcuts in
+ elf_link_hash_table and remove them from the target specific
+ variant.
+ * elf32-s390.c: Likewise.
+
+2012-03-30 Andreas Krebbel <[email protected]>
+
+ * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
+ New definitions.
+ (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
+ (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
+ (elf_s390_finish_dynamic_sections): Likewise.
+ * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
+ (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
+ (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
+ (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
+ (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
+
+2012-03-30 Andreas Krebbel <[email protected]>
+
+ * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
+ Rename all occurrences in the file to elf_dyn_relocs.
+ * elf64-s390.c: Likewise.
+
+2012-03-30 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
+ libraries.
+
+2012-03-29 Alan Modra <[email protected]>
+
+ * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
+ * bfd-in2.h: Regenerate.
+
+2012-03-23 Alan Modra <[email protected]>
+
+ * elf.c (assign_file_positions_for_non_load_sections): Don't warn
+ on empty alloc sections.
+
+2012-03-23 Alan Modra <[email protected]>
+
+ * linker.c (_bfd_nearby_section): New function, split out from..
+ (fix_syms): ..here.
+ * bfd-in.h (_bfd_nearby_section): Declare.
+ * bfd-in2.h: Regenerate.
+ * elflink.c (elf_link_input_bfd): Don't use text_index_section or
+ data_index_section with ld -q or ld -r output relocs against
+ stripped output sections. Instead use _bfd_nearby_section.
+
+2012-03-23 Alan Modra <[email protected]>
+
+ PR binutils/13894
+ * elf64-ppc.c (opd_entry_value): Read full symbol table when
+ sym hashes unavailable.
+
+2012-03-21 Eliot Dresselhaus <[email protected]>
+
+ * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
+ for non-C6X objects.
+
+2012-03-20 Kai Tietz <[email protected]>
+
+ PR ld/12742
+ * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
+ * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
+ Add windows.h header include if HAVE_WINDOWS_H is defined.
+ (dlerror): New static function if windows variant is used instead
+ of dlfcn.h.
+ (dlclose): Likewise.
+ (dlopen): Likewise.
+ (dlsym): Likewise.
+ * configure: Regenerated.
+ * config.in: Regenerated.
+
+2012-03-20 H.J. Lu <[email protected]>
+
+ PR ld/13880
+ * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
+ for R_386_GOTOFF relocation against protected function if
+ SYMBOLIC_BIND is true.
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
+ error for R_X86_64_GOTOFF64 relocation against protected function
+ when building executable or SYMBOLIC_BIND is true.
+
+2012-03-16 Roland McGrath <[email protected]>
+
+ * config.bfd: Handle x86_64-*-nacl*.
+ * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
+ (bfd_elf32_x86_64_nacl_vec): Likewise.
+ * targets.c: Support them.
+ * configure.in: Likewise.
+ * configure: Regenerated.
+
+2012-03-16 Matthew Gretton-Dann <[email protected]>
+
+ * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
+ (elf32_arm_attributes_forbid_div): Likewise.
+ (elf32_arm_merge_eabi_attributes): Correct handling of
+ Tag_DIV_use.
+
+2012-03-15 Roland McGrath <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
+ elf_x86_64_backend_data parameters for plt_eh_frame.
+
+ * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
+ (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
+ (elf_x86_64_arch_bed): New variable.
+ (elf_backend_arch_data): New macro.
+ (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
+ (elf_x86_64_allocate_dynrelocs): Likewise.
+ (elf_x86_64_relocate_section): Likewise.
+ (elf_x86_64_plt_sym_val): Likewise.
+ (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
+ parameters for PLT details.
+ (elf_x86_64_finish_dynamic_sections): Likewise.
+
+2012-03-14 Roland McGrath <[email protected]>
+
+ * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
+ to the full size, padding out with nop instructions.
+
+2012-03-12 Alan Modra <[email protected]>
+
+ * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
+ on zero size dynbss symbol.
+ * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
+ * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
+ * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
+ * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
+
+2012-03-10 Edmar Wienskoski <[email protected]>
+
+ * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
+ * bfd-in2.h: Regenerate.
+ * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
+ bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
+
+2012-03-09 H.J. Lu <[email protected]>
+
+ PR ld/13817
+ * elf32-i386.c (elf_i386_relocate_section): Restore
+ R_386_IRELATIVE.
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
+ R_X86_64_IRELATIVE.
+
+2012-03-08 Tristan Gingold <[email protected]>
+
+ * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
+ keylen according to archive kind. Set nextvbn and nextrfa lhd
+ fields. Add comments.
+
+2012-03-07 Nick Clifton <[email protected]>
+
+ * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
+ field.
+ (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
+ (elf_mn10300_tdata): Define.
+ (elf_mn10300_local_got_tls_type): Define.
+ (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
+ R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
+ R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
+ R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
+ (mn10300_reloc_map): Likewise.
+ (elf_mn10300_tls_transition): New function.
+ (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
+ (mn10300_elf_check_relocs): Add TLS support.
+ (mn10300_elf_final_link_relocate): Likewise.
+ (mn10300_elf_relocate_section): Likewise.
+ (mn10300_elf_relax_section): Likewise.
+ (elf32_mn10300_link_hash_newfunc): Initialise new field.
+ (_bfd_mn10300_copy_indirect_symbol): New function.
+ (elf32_mn10300_link_hash_table_create): Initialise new fields.
+ (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
+ (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
+ (_bfd_mn10300_elf_reloc_type_class): Allocate an
+ elf_mn10300_obj_tdata structure.
+ (elf_backend_copy_indirect_symbol): Define.
+ * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
+ BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
+ BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
+ BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
+ (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
+ alongside other MN10300 relocations.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2012-03-06 Jakub Jelinek <[email protected]>
+
+ * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
+ set relocate to TRUE.
+
+2012-03-05 Rainer Orth <[email protected]>
+
+ PR ld/12152
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
+ overflows for R_SPARC_UA32 in .stab sections.
+
+2012-03-01 Alan Modra <[email protected]>
+
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
+
+2012-02-27 Alan Modra <[email protected]>
+
+ * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
+ before calling elf specific function.
+ (sh_elf_osec_readonly_p): Test for error return from above.
+
+2012-02-27 Alan Modra <[email protected]>
+
+ * elf32-spu.c (build_stub): Fix malloc under-allocation.
+
+2012-02-25 Walter Lee <[email protected]>
+ * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
+ BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
+ BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
+ BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
+ BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
+ Delete 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_HW2_LAST_GOT,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
+ 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_HW2_LAST_TLS_GD,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
+ 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_HW2_LAST_TLS_IE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
+ * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
+ relocations.
+ (tilepro_reloc_map): Ditto.
+ (tilepro_info_to_howto_rela): Ditto.
+ (reloc_to_create_func): Ditto.
+ (tilepro_tls_translate_to_le): New.
+ (tilepro_tls_translate_to_ie): New.
+ (tilepro_elf_tls_transition): New.
+ (tilepro_elf_check_relocs): Handle new tls relocations.
+ (tilepro_elf_gc_sweep_hook): Ditto.
+ (allocate_dynrelocs): Ditto.
+ (tilepro_elf_relocate_section): Ditto.
+ (tilepro_replace_insn): New.
+ (insn_mask_X1): New.
+ (insn_mask_X0_no_dest_no_srca): New
+ (insn_mask_X1_no_dest_no_srca): New
+ (insn_mask_Y0_no_dest_no_srca): New
+ (insn_mask_Y1_no_dest_no_srca): New
+ (srca_mask_X0): New
+ (srca_mask_X1): New
+ (insn_tls_le_move_X1): New
+ (insn_tls_le_move_zero_X0X1): New
+ (insn_tls_ie_lw_X1): New
+ (insn_tls_ie_add_X0X1): New
+ (insn_tls_ie_add_Y0Y1): New
+ (insn_tls_gd_add_X0X1): New
+ (insn_tls_gd_add_Y0Y1): New
+ * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
+ relocations.
+ (tilegx_reloc_map): Ditto.
+ (tilegx_info_to_howto_rela): Ditto.
+ (reloc_to_create_func): Ditto.
+ (tilegx_elf_link_hash_table): New field disable_le_transition.
+ (tilegx_tls_translate_to_le): New.
+ (tilegx_tls_translate_to_ie): New.
+ (tilegx_elf_tls_transition): New.
+ (tilegx_elf_check_relocs): Handle new tls relocations.
+ (tilegx_elf_gc_sweep_hook): Ditto.
+ (allocate_dynrelocs): Ditto.
+ (tilegx_elf_relocate_section): Ditto.
+ (tilegx_copy_bits): New.
+ (tilegx_replace_insn): New.
+ (insn_mask_X1): New.
+ (insn_mask_X0_no_dest_no_srca): New.
+ (insn_mask_X1_no_dest_no_srca): New.
+ (insn_mask_Y0_no_dest_no_srca): New.
+ (insn_mask_Y1_no_dest_no_srca): New.
+ (insn_mask_X0_no_operand): New.
+ (insn_mask_X1_no_operand): New.
+ (insn_mask_Y0_no_operand): New.
+ (insn_mask_Y1_no_operand): New.
+ (insn_tls_ie_ld_X1): New.
+ (insn_tls_ie_ld4s_X1): New.
+ (insn_tls_ie_add_X0X1): New.
+ (insn_tls_ie_add_Y0Y1): New.
+ (insn_tls_ie_addx_X0X1): New.
+ (insn_tls_ie_addx_Y0Y1): New.
+ (insn_tls_gd_add_X0X1): New.
+ (insn_tls_gd_add_Y0Y1): New.
+ (insn_move_X0X1): New.
+ (insn_move_Y0Y1): New.
+ (insn_add_X0X1): New.
+ (insn_add_Y0Y1): New.
+ (insn_addx_X0X1): New.
+ (insn_addx_Y0Y1): New.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2012-02-25 Walter Lee <[email protected]>
+
+ * config.bfd (tilegx-*-*): rename little endian vector; add big
+ endian vector.
+ (tilegxbe-*-*): New case.
+ * configure.in (bfd_elf32_tilegx_vec): Rename...
+ (bfd_elf32_tilegx_le_vec): ... to this.
+ (bfd_elf32_tilegx_be_vec): New vector.
+ (bfd_elf64_tilegx_vec): Rename...
+ (bfd_elf64_tilegx_le_vec): ... to this.
+ (bfd_elf64_tilegx_be_vec): New vector.
+ * configure: Regenerate.
+ * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
+ (TARGET_LITTLE_NAME): Ditto.
+ (TARGET_BIG_SYM): Define.
+ (TARGET_BIG_NAME): Define.
+ * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
+ (TARGET_LITTLE_NAME): Ditto.
+ (TARGET_BIG_SYM): Define.
+ (TARGET_BIG_NAME): Define.
+ * targets.c (bfd_elf32_tilegx_vec): Rename...
+ (bfd_elf32_tilegx_le_vec): ... to this.
+ (bfd_elf32_tilegx_be_vec): Declare.
+ (bfd_elf64_tilegx_vec): Rename...
+ (bfd_elf64_tilegx_le_vec): ... to this.
+ (bfd_elf64_tilegx_be_vec): Declare.
+ (_bfd_target_vector): Add / rename above vectors.
+ * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
+ * bfd-in2.h: Regenerate.
+ * cpu-tilegx.c (bfd_tilegx32_arch): define.
+ (bfd_tilegx_arch): link to bfd_tilegx32_arch.
+
+2012-02-24 Nick Clifton <[email protected]>
+
+ PR ld/13730
+ * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
+ error message instead of aborting, when an outofrange reloc is
+ encountered.
+
+2012-02-23 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
+ (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
+ bit-fields when target and host differ in endian-ness. When
+ PAIRs are non-scattered find the 'symbol' from the preceding
+ reloc. Add FIXME re. reloc symbols on section boundaries.
+ (bfd_mach_o_swap_out_non_scattered_reloc): New.
+ (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
+
+2012-02-17 Iain Sandoe <[email protected]>
+
+ * mach-o-i386.c (i386_howto_table): Add support for 16 bit
+ sect-diffs.
+ (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
+ (bfd_mach_o_i386_swap_reloc_out): Likewise.
+
+2012-02-17 Tristan Gingold <[email protected]>
+
+ * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
+ * libbfd.h: Regenerated.
+ * bfd-in2.h: Likewise.
+ * mach-o-i386.c (i386_howto_table): Include local sectdiff.
+ (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
+ (bfd_mach_o_i386_swap_reloc_out): Likewise.
+
+2012-02-17 Andreas Krebbel <[email protected]>
+
+ * elf32-s390.c (elf_s390_relocate_section): Support basr in the
+ GD->LE and LD->LE optimizations.
+
+2012-02-16 Alan Modra <[email protected]>
+
+ PR binutils/13355
+ * elf32-rx.c (elf32_rx_relax_section): Correct width check.
+
+2012-02-13 Richard Henderson <[email protected]>
+
+ PR ld/13621
+ * linker.c (fix_syms): Force symbols outside any section into
+ bfd_abs_section_ptr.
+
+2012-02-13 Alan Modra <[email protected]>
+
+ * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
+ * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
+ * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
+ * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
+
+2012-02-11 Jan Kratochvil <[email protected]>
+ Nick Clifton <[email protected]>
+
+ * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
+ memset.
+
+2012-02-10 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
+ vma additions in their logical, rather than physical order.
+
+2012-02-10 Iain Sandoe <[email protected]>
+
+ * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
+ parameters.
+ * mach-o-x86-64.c (text_section_names_xlat): New.
+ (mach_o_x86_64_segsec_names_xlat): New.
+ (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
+ * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
+
+2012-02-10 Tristan Gingold <[email protected]>
+
+ * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
+ to avoid infinite loop. Add comments.
+
+2012-02-09 H.J. Lu <[email protected]>
+
+ PR ld/13675
+ * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
+ nop instructions.
+ (bfd_arch_i386_short_nop_fill): New.
+ (bfd_arch_i386_long_nop_fill): Likewise.
+ Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
+ initializers. Use bfd_arch_i386_long_nop_fill on 64bit
+ bfd_arch_info initializers.
+
+ * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
+ (bfd_arch_i386_short_nop_fill): This.
+ Update bfd_arch_info initializers.
+ * cpu-l1om.c: Likewise.
+
+2012-02-08 Alan Modra <[email protected]>
+
+ * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
+ (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
+ the correct h->u.weakdef.
+
+2012-02-07 Alan Modra <[email protected]>
+
+ * elf.c (elf_find_function): Don't use internal_elf_sym.
+ (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
+ parameter with asymbol.
+ * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
+ * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
+ (struct elf_backend_data <maybe_function_sym>): Likewise.
+
+2012-02-02 Vidya Praveen ([email protected])
+
+ PR bfd/13410
+ * elf32-avr.c (elf32_avr_relax_section): Correct the
+ condition that qualifies the candidates for relaxation.
+
+2012-02-02 Tristan Gingold <[email protected]>
+
+ * bfdio.c (real_fopen): Remove unused vms_modes variable.
+
+2012-02-02 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
+ variable warning.
+
+2012-02-02 Tristan Gingold <[email protected]>
+
+ * archive.c (bfd_slurp_armap): Fix thinko in cast.
+
+2012-01-31 H.J. Lu <[email protected]>
+
+ PR ld/13616
+ * archures.c (bfd_arch_info): Add fill.
+ (bfd_default_arch_struct): Add bfd_arch_default_fill.
+ (bfd_arch_default_fill): New.
+
+ * configure.in: Set bfd version to 2.22.52.
+ * configure: Regenerated.
+
+ * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
+ initializer.
+ * cpu-arc.c: Likewise.
+ * cpu-arm.c: Likewise.
+ * cpu-avr.c: Likewise.
+ * cpu-bfin.c: Likewise.
+ * cpu-cr16.c: Likewise.
+ * cpu-cr16c.c: Likewise.
+ * cpu-cris.c: Likewise.
+ * cpu-crx.c: Likewise.
+ * cpu-d10v.c: Likewise.
+ * cpu-d30v.c: Likewise.
+ * cpu-dlx.c: Likewise.
+ * cpu-epiphany.c: Likewise.
+ * cpu-fr30.c: Likewise.
+ * cpu-frv.c: Likewise.
+ * cpu-h8300.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-hppa.c: Likewise.
+ * cpu-i370.c: Likewise.
+ * cpu-i860.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-ia64.c: Likewise.
+ * cpu-ip2k.c: Likewise.
+ * cpu-iq2000.c: Likewise.
+ * cpu-lm32.c: Likewise.
+ * cpu-m10200.c: Likewise.
+ * cpu-m10300.c: Likewise.
+ * cpu-m32c.c: Likewise.
+ * cpu-m32r.c: Likewise.
+ * cpu-m68hc11.c: Likewise.
+ * cpu-m68hc12.c: Likewise.
+ * cpu-m68k.c: Likewise.
+ * cpu-m88k.c: Likewise.
+ * cpu-mcore.c: Likewise.
+ * cpu-mep.c: Likewise.
+ * cpu-microblaze.c: Likewise.
+ * cpu-mips.c: Likewise.
+ * cpu-mmix.c: Likewise.
+ * cpu-moxie.c: Likewise.
+ * cpu-msp430.c: Likewise.
+ * cpu-mt.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * cpu-openrisc.c: Likewise.
+ * cpu-or32.c: Likewise.
+ * cpu-pdp11.c: Likewise.
+ * cpu-pj.c: Likewise.
+ * cpu-plugin.c: Likewise.
+ * cpu-powerpc.c: Likewise.
+ * cpu-rl78.c: Likewise.
+ * cpu-rs6000.c: Likewise.
+ * cpu-rx.c: Likewise.
+ * cpu-s390.c: Likewise.
+ * cpu-score.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-sparc.c: Likewise.
+ * cpu-spu.c: Likewise.
+ * cpu-tic30.c: Likewise.
+ * cpu-tic4x.c: Likewise.
+ * cpu-tic54x.c: Likewise.
+ * cpu-tic6x.c: Likewise.
+ * cpu-tic80.c: Likewise.
+ * cpu-tilegx.c: Likewise.
+ * cpu-tilepro.c: Likewise.
+ * cpu-v850.c: Likewise.
+ * cpu-vax.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * cpu-we32k.c: Likewise.
+ * cpu-xc16x.c: Likewise.
+ * cpu-xstormy16.c: Likewise.
+ * cpu-xtensa.c: Likewise.
+ * cpu-z80.c: Likewise.
+ * cpu-z8k.c: Likewise.
+
+ * cpu-i386.c: Include "libiberty.h".
+ (bfd_arch_i386_fill): New.
+ Add bfd_arch_i386_fill to bfd_arch_info initializer.
+
+ * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
+ * cpu-l1om.c: Likewise.
+
+ * linker.c (default_data_link_order): Call abfd->arch_info->fill
+ if fill size is 0.
+
+ * bfd-in2.h: Regenerated.
+
+2012-01-27 Michael Eager <[email protected]>
+
+ * elf32-microblaze.c (create_got_section):
+ Reuse existing .rela.got section.
+
+2012-01-23 Alan Modra <[email protected]>
+
+ * elf-bfd.h: Formatting.
+ (struct elf_backend_data): Add "maybe_function_sym".
+ (_bfd_elf_maybe_function_sym): Declare.
+ * elfxx-target.h (elf_backend_maybe_function_sym): Define.
+ (elfNN_bed): Init new field.
+ * elf.c (elf_find_function): Use maybe_function_sym.
+ (_bfd_elf_maybe_function_sym): New function.
+ * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
+ (ppc64_elf_maybe_function_sym): New function.
+
+2012-01-20 Francois Gouget <[email protected]>
+
+ PR binutils/13534
+ * archive.c (_bfd_ar_sizepad): New function. Correctly install and
+ pad the size field in an archive header.
+ (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
+ function for the archive size field.
+ (bfd_generic_openr_next_archived_file): Likewise.
+ (do_slurp_coff_armap): Likewise.
+ (_bfd_write_archive_contents): Likewise.
+ (_bfd_bsd44_write_ar_hdr): Use the new function.
+ (bfd_ar_hdr_from_filesystem): Likewise.
+ (_bfd_write_archive_contents): Likewise.
+ (bsd_write_armap): Likewise.
+ (coff_write_armap): Likewise.
+ * archive64.c (bfd_elf64_archive_write_armap): Likewise.
+ * bfdio.c (bfd_bread): Use correct type for archive element
+ sizes.
+ * ar.c (open_inarch): Likewise.
+ (extract_file): Likewise.
+ * libbfd-in.h (struct areltdata): Use correct types for
+ parsed_size and extra_size fields.
+ Prototype _bfd_ar_sizepad function.
+ * libbfd.h: Regenerate.
+
+2012-01-20 Ulrich Weigand <[email protected]>
+
+ * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
+ Return NULL if core file generation is unsupported.
+ (elfcore_write_prstatus): Likewise.
+ * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
+ (elf_backend_write_core_note): Define.
+
+2012-01-19 Tristan Gingold <[email protected]>
+
+ * pef.c: Add a comment.
+ * xsym.c: Likewise.
+
+2012-01-17 Alan Modra <[email protected]>
+
+ * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
+ trailing garbage in the note.
+ * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
+
+2012-01-16 Daniel Green <[email protected]>
+
+ PR ld/13491
+ * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
+ h->root.type not h->type.
+ * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
+
+2012-01-13 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
+ indirect symbols.
+
+2012-01-13 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
+ position from here... to (bfd_mach_o_build_seg_command): Here.
+
+2012-01-12 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
+ (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
+ * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
+ file. (bfd_mach_o_section): Add indirect_syms field.
+
+2012-01-11 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
+ vmsize from filesize. Don't compute offsets or file sizes for
+ zerofill sections.
+
+2012-01-11 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_build_commands): Make the building of each
+ command type independent.
+
+2012-01-11 Alan Modra <[email protected]>
+
+ * elf64-ppc.c: Define more insns used in plt call stubs.
+ (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
+ (ppc64_elf_relocate_section): Likewise.
+ (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
+ (struct ppc_link_hash_table): Increase size of stub_count array.
+ Add plt_stub_align and plt_thread_safe.
+ (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
+ (plt_stub_size, plt_stub_pad): New functions.
+ (build_plt_stub): Emit barriers for power7 thread safety. Don't
+ emit needless save of r2.
+ (build_tls_get_addr_stub): Adjust params.
+ (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
+ plt stubs. Adjust build_*plt_stub calls.
+ (ppc_size_one_stub): Similarly.
+ (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
+ params. Choose default for plt_thread_safe based on existence of
+ calls to thread creation functions. Modify plt_call to
+ plt_call_r2save when no tocsave reloc found. Align tail of stub
+ sections.
+ (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
+ output of stub statistics.
+ (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
+ * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
+
+2012-01-10 H.J. Lu <[email protected]>
+
+ PR ld/13581
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
+ check on R_X86_64_PCXX.
+
+2012-01-10 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
+ warning.
+
+2012-01-10 Tristan Gingold <[email protected]>
+
+ * bfdio.c (bfd_tell): Handle nested archives.
+ (bfd_seek): Ditto.
+ * cache.c (bfd_cache_lookup_worker): Ditto.
+ * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
+ nested archives.
+ (bfd_generic_openr_next_archived_file): Likewise.
+
+2012-01-09 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
+ (bfd_mach_o_write_symtab): Remove handling for indirect syms.
+ (bfd_mach_o_primary_symbol_sort_key): Likewise.
+ (bfd_mach_o_cf_symbols): Likewise.
+ (bfd_mach_o_sort_symbol_table): Remove.
+ (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
+ for indirect and dysymtab counts. Do the symbol sorting here.
+ (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
+ Make the indirect symbols a TODO.
+ (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
+ (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
+ a non-zero value.
+ (bfd_mach_o_read_symtab_symbol): Record the symbol index.
+ (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
+ * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
+ (IS_MACHO_INDIRECT): Remove.
+ (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
+
+2012-01-06 Nick Clifton <[email protected]>
+
+ PR binutils/13121
+ * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
+ 'flaginfo' to avoid conflicts with AIX system headers.
+
+2012-01-06 Tristan Gingold <[email protected]>
+
+ * bfdio.c (bfd_bread): Use arelt_size macro.
+
+2012-01-06 Tristan Gingold <[email protected]>
+
+ * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
+
+2012-01-05 Nick Clifton <[email protected]>
+
+ PR ld/12161
+ * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
+ necessary.
+
+2012-01-05 Jan Kratochvil <[email protected]>
+
+ Fix zero registers core files when built by gcc-4.7.
+ * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
+ size. Call elfcore_write_note for the local variables. Remove the
+ final elfcore_write_note call. Add NOTREACHED comments.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
+ (bfd_mach_o_generic_stat_arch_elt): Adjust.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_fat_member_init): New function.
+ (bfd_mach_o_openr_next_archived_file): Reindent.
+ Adjust to call bfd_mach_o_fat_member_init.
+ (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
+ BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
+ BFD_RELOC_MACH_O_X86_64_PCREL32_2,
+ BFD_RELOC_MACH_O_X86_64_PCREL32_4,
+ BFD_RELOC_MACH_O_X86_64_BRANCH32,
+ BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
+ BFD_RELOC_MACH_O_X86_64_GOT.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
+ (bfd_mach_o_load_command): Add fvmlib field.
+
+ * mach-o.c (bfd_mach_o_read_fvmlib): New function.
+ (bfd_mach_o_read_command): Handle fvmlib.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
+ Decode msubtype for ARM.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
+
+2012-01-04 Tristan Gingold <[email protected]>
+
+ * mach-o.h: Reindent header.
+ (bfd_mach_o_encryption_info_command): New structure.
+ (bfd_mach_o_load_command): Add encryption_info field.
+
+ * mach-o.c (bfd_mach_o_read_encryption_info): New function.
+ (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
+ (bfd_mach_o_read_command): Adjust error message.
+
+2012-01-04 Shinichiro Hamaji <[email protected]>
+
+ * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
+ which reads DWARF2 and stores in stash from find_line.
+ (find_line) Call _bfd_dwarf2_slurp_debug_info.
+ * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
+ * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
+ * mach-o.c (dsym_subdir): The name of subdir where debug
+ information may be stored.
+ (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
+ type is UUID.
+ (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
+ corresponding to the executable.
+ (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
+ specified binary file.
+ (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
+ the original BFD.
+ (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
+ executables, dylibs, and bundles.
+ (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
+ * mach-o.h (dsym_bfd): The BFD of the dSYM file.
+
+2012-01-03 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
+ for stabd symbols.
+ (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
+ (bfd_mach_o_cf_symbols): Likewise.
+
+2012-01-03 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
+
+2012-01-03 Iain Sandoe <[email protected]>
+
+ * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
+ as the value of an indirect symbol. Keep the string table index in
+ non-indirect syms for reference.
+ (bfd_mach_o_write_dysymtab): New.
+ (bfd_mach_o_primary_symbol_sort_key): New.
+ (bfd_mach_o_cf_symbols): New.
+ (bfd_mach_o_sort_symbol_table): New.
+ (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
+ If we are emitting a dysymtab, process indirect symbols and count the
+ number of each other kind.
+ (bfd_mach_o_mangle_sections): New.
+ (bfd_mach_o_write_contents): Split out some pre-requisite code into
+ the command builder. Write dysymtab if the command is present.
+ (bfd_mach_o_count_sections_for_seg): New.
+ (bfd_mach_o_build_seg_command): New.
+ (bfd_mach_o_build_dysymtab_command): New.
+ (bfd_mach_o_build_commands): Reorganize to support the fact that some
+ commands are optional and should not be emitted if there are no
+ sections or symbols.
+ (bfd_mach_o_set_section_contents): Amend comment.
+ * mach-o.h: Amend and add to comments.
+ (mach_o_data_struct): Add fields for dysymtab symbols counts and a
+ pointer to the indirects, when present.
+ (bfd_mach_o_should_emit_dysymtab): New macro.
+ (IS_MACHO_INDIRECT): Likewise.
+
+For older changes see ChangeLog-2011
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/bfd/ChangeLog-9193 b/bfd/ChangeLog-9193
index 01863de..31aa237 100644
--- a/bfd/ChangeLog-9193
+++ b/bfd/ChangeLog-9193
@@ -7840,6 +7840,12 @@
(_write_symbol_table): Initialize <idx> counter.
(foop): Eliminate debugging code.
+Copyright (C) 1991-1993 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-9495 b/bfd/ChangeLog-9495
index a208f42..1af501c 100644
--- a/bfd/ChangeLog-9495
+++ b/bfd/ChangeLog-9495
@@ -10035,6 +10035,12 @@
For older changes see ChangeLog-9193
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-9697 b/bfd/ChangeLog-9697
index e9a5c1d..add810b 100644
--- a/bfd/ChangeLog-9697
+++ b/bfd/ChangeLog-9697
@@ -6721,6 +6721,12 @@
For older changes see ChangeLog-9495
+Copyright (C) 1996,1997 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/ChangeLog-9899 b/bfd/ChangeLog-9899
index 6d7f5cd..fdc2d89 100644
--- a/bfd/ChangeLog-9899
+++ b/bfd/ChangeLog-9899
@@ -5591,6 +5591,12 @@
For older changes see ChangeLog-9697
+Copyright (C) 1998,1999 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/MAINTAINERS b/bfd/MAINTAINERS
index d59a3bd..e7d8ff8 100644
--- a/bfd/MAINTAINERS
+++ b/bfd/MAINTAINERS
@@ -1 +1,7 @@
See ../binutils/MAINTAINERS
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index ea4fd28..c645563 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -1,4 +1,21 @@
## Process this file with automake to generate Makefile.in
+#
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
AUTOMAKE_OPTIONS = 1.11 no-dist foreign
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
@@ -35,7 +52,7 @@
AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
if PLUGINS
bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
-LIBDL = -ldl
+LIBDL = @lt_cv_dlopen_libs@
endif
# bfd.h goes here, for now
@@ -71,6 +88,7 @@
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
+ cpu-aarch64.lo \
cpu-alpha.lo \
cpu-arc.lo \
cpu-arm.lo \
@@ -83,6 +101,7 @@
cpu-d10v.lo \
cpu-d30v.lo \
cpu-dlx.lo \
+ cpu-epiphany.lo \
cpu-fr30.lo \
cpu-frv.lo \
cpu-h8300.lo \
@@ -104,16 +123,20 @@
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
+ cpu-m9s12x.lo \
+ cpu-m9s12xg.lo \
cpu-m68k.lo \
cpu-m88k.lo \
cpu-mcore.lo \
cpu-mep.lo \
+ cpu-metag.lo \
cpu-microblaze.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-moxie.lo \
cpu-msp430.lo \
cpu-mt.lo \
+ cpu-nios2.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-or32.lo \
@@ -122,6 +145,7 @@
cpu-plugin.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-rl78.lo \
cpu-rx.lo \
cpu-s390.lo \
cpu-score.lo \
@@ -136,16 +160,19 @@
cpu-tilegx.lo \
cpu-tilepro.lo \
cpu-v850.lo \
+ cpu-v850_rh850.lo \
cpu-vax.lo \
cpu-w65.lo \
cpu-we32k.lo \
cpu-xc16x.lo \
+ cpu-xgate.lo \
cpu-xstormy16.lo \
cpu-xtensa.lo \
cpu-z80.lo \
cpu-z8k.lo
ALL_MACHINES_CFILES = \
+ cpu-aarch64.c \
cpu-alpha.c \
cpu-arc.c \
cpu-arm.c \
@@ -158,6 +185,7 @@
cpu-d10v.c \
cpu-d30v.c \
cpu-dlx.c \
+ cpu-epiphany.c \
cpu-fr30.c \
cpu-frv.c \
cpu-h8300.c \
@@ -179,10 +207,13 @@
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
+ cpu-m9s12x.c \
+ cpu-m9s12xg.c \
cpu-m68k.c \
cpu-m88k.c \
cpu-mcore.c \
cpu-mep.c \
+ cpu-metag.c \
cpu-microblaze.c \
cpu-mips.c \
cpu-mmix.c \
@@ -190,6 +221,7 @@
cpu-msp430.c \
cpu-mt.c \
cpu-ns32k.c \
+ cpu-nios2.c \
cpu-openrisc.c \
cpu-or32.c \
cpu-pdp11.c \
@@ -197,6 +229,7 @@
cpu-plugin.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-rl78.c \
cpu-rx.c \
cpu-s390.c \
cpu-score.c \
@@ -211,10 +244,12 @@
cpu-tilegx.c \
cpu-tilepro.c \
cpu-v850.c \
+ cpu-v850_rh850.c \
cpu-vax.c \
cpu-w65.c \
cpu-we32k.c \
cpu-xc16x.c \
+ cpu-xgate.c \
cpu-xstormy16.c \
cpu-xtensa.c \
cpu-z80.c \
@@ -271,6 +306,7 @@
elf-ifunc.lo \
elf-m10200.lo \
elf-m10300.lo \
+ elf-nacl.lo \
elf-strtab.lo \
elf-vxworks.lo \
elf.lo \
@@ -286,6 +322,7 @@
elf32-d10v.lo \
elf32-d30v.lo \
elf32-dlx.lo \
+ elf32-epiphany.lo \
elf32-fr30.lo \
elf32-frv.lo \
elf32-gen.lo \
@@ -307,15 +344,17 @@
elf32-m88k.lo \
elf32-mcore.lo \
elf32-mep.lo \
+ elf32-metag.lo \
elf32-microblaze.lo \
- elf32-mips.lo \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
+ elf32-nios2.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-rl78.lo \
elf32-rx.lo \
elf32-s390.lo \
elf32-sh-symbian.lo \
@@ -330,11 +369,11 @@
elf32-v850.lo \
elf32-vax.lo \
elf32-xc16x.lo \
+ elf32-xgate.lo \
elf32-xstormy16.lo \
elf32-xtensa.lo \
elf32.lo \
elflink.lo \
- elfxx-mips.lo \
elfxx-sparc.lo \
elfxx-tilegx.lo \
epoc-pe-arm.lo \
@@ -455,6 +494,7 @@
elf-ifunc.c \
elf-m10200.c \
elf-m10300.c \
+ elf-nacl.c \
elf-strtab.c \
elf-vxworks.c \
elf.c \
@@ -470,6 +510,7 @@
elf32-d10v.c \
elf32-d30v.c \
elf32-dlx.c \
+ elf32-epiphany.c \
elf32-fr30.c \
elf32-frv.c \
elf32-gen.c \
@@ -491,15 +532,17 @@
elf32-m88k.c \
elf32-mcore.c \
elf32-mep.c \
+ elf32-metag.c \
elf32-microblaze.c \
- elf32-mips.c \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
+ elf32-nios2.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-rl78.c \
elf32-rx.c \
elf32-s390.c \
elf32-sh-symbian.c \
@@ -514,11 +557,11 @@
elf32-v850.c \
elf32-vax.c \
elf32-xc16x.c \
+ elf32-xgate.c \
elf32-xstormy16.c \
elf32-xtensa.c \
elf32.c \
elflink.c \
- elfxx-mips.c \
elfxx-sparc.c \
elfxx-tilegx.c \
epoc-pe-arm.c \
@@ -595,6 +638,9 @@
# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
# BFD32_BACKENDS.
BFD64_BACKENDS = \
+ elf32-aarch64.lo \
+ elf64-aarch64.lo \
+ elfxx-aarch64.lo \
aix5ppc-core.lo \
aout64.lo \
coff-alpha.lo \
@@ -602,12 +648,14 @@
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
+ elf32-mips.lo \
elf32-score.lo \
elf32-score7.lo \
elf64-alpha.lo \
elf64-gen.lo \
elf64-hppa.lo \
elf64-ia64.lo \
+ elf64-ia64-vms.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-ppc.lo \
@@ -619,6 +667,7 @@
elf64.lo \
elfn32-mips.lo \
elfxx-ia64.lo \
+ elfxx-mips.lo \
mach-o-x86-64.lo \
mmo.lo \
nlm32-alpha.lo \
@@ -637,11 +686,13 @@
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
+ elf32-mips.c \
elf32-score.c \
elf32-score7.c \
elf64-alpha.c \
elf64-gen.c \
elf64-hppa.c \
+ elf64-ia64-vms.c \
elf64-mips.c \
elf64-mmix.c \
elf64-ppc.c \
@@ -652,7 +703,9 @@
elf64-x86-64.c \
elf64.c \
elfn32-mips.c \
+ elfxx-aarch64.c \
elfxx-ia64.c \
+ elfxx-mips.c \
mach-o-x86-64.c \
mmo.c \
nlm32-alpha.c \
@@ -713,6 +766,7 @@
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
+ elf32-aarch64.c elf64-aarch64.c \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
@@ -720,7 +774,7 @@
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-hppa.h \
+ elf-bfd.h elf-hppa.h elf-linux-psinfo.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -861,6 +915,18 @@
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
+elf32-aarch64.c : elfnn-aarch64.c
+ rm -f elf32-aarch64.c
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf32-aarch64.new
+ sed -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
+ mv -f elf32-aarch64.new elf32-aarch64.c
+
+elf64-aarch64.c : elfnn-aarch64.c
+ rm -f elf64-aarch64.c
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf64-aarch64.new
+ sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
+ mv -f elf64-aarch64.new elf64-aarch64.c
+
elf32-ia64.c : elfnn-ia64.c
rm -f elf32-ia64.c
sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 741809c..78d2d2c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -15,6 +15,24 @@
@SET_MAKE@
+#
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
VPATH = @srcdir@
@@ -293,6 +311,7 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -336,7 +355,7 @@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
-@PLUGINS_TRUE@LIBDL = -ldl
+@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
# bfd.h goes here, for now
BFD_H = bfd.h
@@ -370,6 +389,7 @@
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
+ cpu-aarch64.lo \
cpu-alpha.lo \
cpu-arc.lo \
cpu-arm.lo \
@@ -382,6 +402,7 @@
cpu-d10v.lo \
cpu-d30v.lo \
cpu-dlx.lo \
+ cpu-epiphany.lo \
cpu-fr30.lo \
cpu-frv.lo \
cpu-h8300.lo \
@@ -403,16 +424,20 @@
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
+ cpu-m9s12x.lo \
+ cpu-m9s12xg.lo \
cpu-m68k.lo \
cpu-m88k.lo \
cpu-mcore.lo \
cpu-mep.lo \
+ cpu-metag.lo \
cpu-microblaze.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-moxie.lo \
cpu-msp430.lo \
cpu-mt.lo \
+ cpu-nios2.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-or32.lo \
@@ -421,6 +446,7 @@
cpu-plugin.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-rl78.lo \
cpu-rx.lo \
cpu-s390.lo \
cpu-score.lo \
@@ -435,16 +461,19 @@
cpu-tilegx.lo \
cpu-tilepro.lo \
cpu-v850.lo \
+ cpu-v850_rh850.lo \
cpu-vax.lo \
cpu-w65.lo \
cpu-we32k.lo \
cpu-xc16x.lo \
+ cpu-xgate.lo \
cpu-xstormy16.lo \
cpu-xtensa.lo \
cpu-z80.lo \
cpu-z8k.lo
ALL_MACHINES_CFILES = \
+ cpu-aarch64.c \
cpu-alpha.c \
cpu-arc.c \
cpu-arm.c \
@@ -457,6 +486,7 @@
cpu-d10v.c \
cpu-d30v.c \
cpu-dlx.c \
+ cpu-epiphany.c \
cpu-fr30.c \
cpu-frv.c \
cpu-h8300.c \
@@ -478,10 +508,13 @@
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
+ cpu-m9s12x.c \
+ cpu-m9s12xg.c \
cpu-m68k.c \
cpu-m88k.c \
cpu-mcore.c \
cpu-mep.c \
+ cpu-metag.c \
cpu-microblaze.c \
cpu-mips.c \
cpu-mmix.c \
@@ -489,6 +522,7 @@
cpu-msp430.c \
cpu-mt.c \
cpu-ns32k.c \
+ cpu-nios2.c \
cpu-openrisc.c \
cpu-or32.c \
cpu-pdp11.c \
@@ -496,6 +530,7 @@
cpu-plugin.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-rl78.c \
cpu-rx.c \
cpu-s390.c \
cpu-score.c \
@@ -510,10 +545,12 @@
cpu-tilegx.c \
cpu-tilepro.c \
cpu-v850.c \
+ cpu-v850_rh850.c \
cpu-vax.c \
cpu-w65.c \
cpu-we32k.c \
cpu-xc16x.c \
+ cpu-xgate.c \
cpu-xstormy16.c \
cpu-xtensa.c \
cpu-z80.c \
@@ -571,6 +608,7 @@
elf-ifunc.lo \
elf-m10200.lo \
elf-m10300.lo \
+ elf-nacl.lo \
elf-strtab.lo \
elf-vxworks.lo \
elf.lo \
@@ -586,6 +624,7 @@
elf32-d10v.lo \
elf32-d30v.lo \
elf32-dlx.lo \
+ elf32-epiphany.lo \
elf32-fr30.lo \
elf32-frv.lo \
elf32-gen.lo \
@@ -607,15 +646,17 @@
elf32-m88k.lo \
elf32-mcore.lo \
elf32-mep.lo \
+ elf32-metag.lo \
elf32-microblaze.lo \
- elf32-mips.lo \
elf32-moxie.lo \
elf32-msp430.lo \
elf32-mt.lo \
+ elf32-nios2.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-rl78.lo \
elf32-rx.lo \
elf32-s390.lo \
elf32-sh-symbian.lo \
@@ -630,11 +671,11 @@
elf32-v850.lo \
elf32-vax.lo \
elf32-xc16x.lo \
+ elf32-xgate.lo \
elf32-xstormy16.lo \
elf32-xtensa.lo \
elf32.lo \
elflink.lo \
- elfxx-mips.lo \
elfxx-sparc.lo \
elfxx-tilegx.lo \
epoc-pe-arm.lo \
@@ -755,6 +796,7 @@
elf-ifunc.c \
elf-m10200.c \
elf-m10300.c \
+ elf-nacl.c \
elf-strtab.c \
elf-vxworks.c \
elf.c \
@@ -770,6 +812,7 @@
elf32-d10v.c \
elf32-d30v.c \
elf32-dlx.c \
+ elf32-epiphany.c \
elf32-fr30.c \
elf32-frv.c \
elf32-gen.c \
@@ -791,15 +834,17 @@
elf32-m88k.c \
elf32-mcore.c \
elf32-mep.c \
+ elf32-metag.c \
elf32-microblaze.c \
- elf32-mips.c \
elf32-moxie.c \
elf32-msp430.c \
elf32-mt.c \
+ elf32-nios2.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-rl78.c \
elf32-rx.c \
elf32-s390.c \
elf32-sh-symbian.c \
@@ -814,11 +859,11 @@
elf32-v850.c \
elf32-vax.c \
elf32-xc16x.c \
+ elf32-xgate.c \
elf32-xstormy16.c \
elf32-xtensa.c \
elf32.c \
elflink.c \
- elfxx-mips.c \
elfxx-sparc.c \
elfxx-tilegx.c \
epoc-pe-arm.c \
@@ -896,6 +941,9 @@
# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
# BFD32_BACKENDS.
BFD64_BACKENDS = \
+ elf32-aarch64.lo \
+ elf64-aarch64.lo \
+ elfxx-aarch64.lo \
aix5ppc-core.lo \
aout64.lo \
coff-alpha.lo \
@@ -903,12 +951,14 @@
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
+ elf32-mips.lo \
elf32-score.lo \
elf32-score7.lo \
elf64-alpha.lo \
elf64-gen.lo \
elf64-hppa.lo \
elf64-ia64.lo \
+ elf64-ia64-vms.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-ppc.lo \
@@ -920,6 +970,7 @@
elf64.lo \
elfn32-mips.lo \
elfxx-ia64.lo \
+ elfxx-mips.lo \
mach-o-x86-64.lo \
mmo.lo \
nlm32-alpha.lo \
@@ -938,11 +989,13 @@
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
+ elf32-mips.c \
elf32-score.c \
elf32-score7.c \
elf64-alpha.c \
elf64-gen.c \
elf64-hppa.c \
+ elf64-ia64-vms.c \
elf64-mips.c \
elf64-mmix.c \
elf64-ppc.c \
@@ -953,7 +1006,9 @@
elf64-x86-64.c \
elf64.c \
elfn32-mips.c \
+ elfxx-aarch64.c \
elfxx-ia64.c \
+ elfxx-mips.c \
mach-o-x86-64.c \
mmo.c \
nlm32-alpha.c \
@@ -1016,12 +1071,13 @@
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
+ elf32-aarch64.c elf64-aarch64.c \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-hppa.h \
+ elf-bfd.h elf-hppa.h elf-linux-psinfo.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -1248,6 +1304,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cofflink.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corefile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-aarch64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-alpha.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-arc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-arm.Plo@am__quote@
@@ -1260,6 +1317,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-d10v.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-d30v.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-dlx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-epiphany.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-fr30.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-frv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-h8300.Plo@am__quote@
@@ -1283,14 +1341,18 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m68hc12.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m68k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m88k.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m9s12x.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m9s12xg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mcore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mep.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-metag.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-microblaze.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mips.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mmix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-moxie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-msp430.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nios2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or32.Plo@am__quote@
@@ -1298,6 +1360,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-plugin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-powerpc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rl78.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rs6000.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-s390.Plo@am__quote@
@@ -1313,10 +1376,12 @@
@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-v850_rh850.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@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-we32k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xc16x.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xgate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xstormy16.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xtensa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-z80.Plo@am__quote@
@@ -1331,9 +1396,11 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-ifunc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10200.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10300.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-nacl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-strtab.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-vxworks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-aarch64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-am33lin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-arc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-arm.Plo@am__quote@
@@ -1346,6 +1413,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-d10v.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-d30v.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-dlx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-epiphany.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-fr30.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-frv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-gen.Plo@am__quote@
@@ -1368,15 +1436,18 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m88k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mcore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mep.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-metag.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-microblaze.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mips.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-moxie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nios2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ppc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rl78.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-s390.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-score.Plo@am__quote@
@@ -1393,12 +1464,15 @@
@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@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xgate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xstormy16.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xtensa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-aarch64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-alpha.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-gen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-hppa.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ia64-vms.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ia64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mips.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mmix.Plo@am__quote@
@@ -1411,6 +1485,7 @@
@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-aarch64.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@
@@ -1919,6 +1994,18 @@
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
+elf32-aarch64.c : elfnn-aarch64.c
+ rm -f elf32-aarch64.c
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf32-aarch64.new
+ sed -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c >> elf32-aarch64.new
+ mv -f elf32-aarch64.new elf32-aarch64.c
+
+elf64-aarch64.c : elfnn-aarch64.c
+ rm -f elf64-aarch64.c
+ echo "#line 1 \"$(srcdir)/elfnn-aarch64.c\"" > elf64-aarch64.new
+ sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c >> elf64-aarch64.new
+ mv -f elf64-aarch64.new elf64-aarch64.c
+
elf32-ia64.c : elfnn-ia64.c
rm -f elf32-ia64.c
sed -e s/NN/32/g < $(srcdir)/elfnn-ia64.c > elf32-ia64.new
diff --git a/bfd/PORTING b/bfd/PORTING
index c8bfd77..b820525 100644
--- a/bfd/PORTING
+++ b/bfd/PORTING
@@ -81,3 +81,9 @@
TARGETNAME
The name of the target, for run-time lookups.
Usually "a.out-<target>"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/bfd/README b/bfd/README
index fe6b6f3..5ecfd29 100644
--- a/bfd/README
+++ b/bfd/README
@@ -47,3 +47,9 @@
Bug reports without patches will be remembered, but they may never get
fixed until somebody volunteers to fix them.
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/bfd/TODO b/bfd/TODO
index 7a12735..012d624 100644
--- a/bfd/TODO
+++ b/bfd/TODO
@@ -19,7 +19,9 @@
the stupid quips and fill in all the blanks.
o - upgrade the reloc handling as per Steve's suggestion.
+
+Copyright (C) 2012 Free Software Foundation, Inc.
-
-
-
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4
index d9813bd..3518592 100644
--- a/bfd/acinclude.m4
+++ b/bfd/acinclude.m4
@@ -1,3 +1,21 @@
+dnl
+dnl Copyright 2012 Free Software Foundation
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3. If not see
+dnl <http://www.gnu.org/licenses/>.
+dnl
+
sinclude([../config/zlib.m4])
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c
index 121d623..947ab80 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, 2010, 2011
+ 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Minh Tran-Le <[email protected]>.
Converted to back end form by Ian Lance Taylor <[email protected]>.
@@ -59,32 +59,31 @@
(((bfd)->tdata.trad_core_data)->reg2_section)
/* These are stored in the bfd's tdata. */
-struct trad_core_struct {
+struct trad_core_struct
+{
struct corehdr *hdr; /* core file header */
asection *reg_section;
asection *reg2_section;
asection *sections[MAX_CORE_SEGS];
};
-static void swap_abort PARAMS ((void));
-
static const bfd_target *
-aix386_core_file_p (abfd)
- bfd *abfd;
+aix386_core_file_p (bfd *abfd)
{
int i, n;
unsigned char longbuf[4]; /* Raw bytes of various header fields */
bfd_size_type core_size = sizeof (struct corehdr);
bfd_size_type amt;
struct corehdr *core;
- struct mergem {
+ struct mergem
+ {
struct trad_core_struct coredata;
struct corehdr internal_core;
} *mergem;
flagword flags;
amt = sizeof (longbuf);
- if (bfd_bread ((PTR) longbuf, amt, abfd) != amt)
+ if (bfd_bread (longbuf, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -104,7 +103,7 @@
core = &mergem->internal_core;
- if ((bfd_bread ((PTR) core, core_size, abfd)) != core_size)
+ if ((bfd_bread (core, core_size, abfd)) != core_size)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -196,15 +195,13 @@
}
static char *
-aix386_core_file_failing_command (abfd)
- bfd *abfd;
+aix386_core_file_failing_command (bfd *abfd)
{
return core_hdr (abfd)->cd_comm;
}
static int
-aix386_core_file_failing_signal (abfd)
- bfd *abfd;
+aix386_core_file_failing_signal (bfd *abfd)
{
return core_hdr (abfd)->cd_cursig;
}
@@ -216,7 +213,7 @@
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort ()
+swap_abort (void)
{
/* This way doesn't require any declaration for ANSI to fuck up. */
abort ();
@@ -229,7 +226,8 @@
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
-const bfd_target aix386_core_vec = {
+const bfd_target aix386_core_vec =
+{
"aix386-core",
bfd_target_unknown_flavour,
BFD_ENDIAN_BIG, /* target byte order */
@@ -269,5 +267,5 @@
NULL,
- (PTR) 0
+ NULL
};
diff --git a/bfd/aout-arm.c b/bfd/aout-arm.c
index fd93603..9eb9488 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, 2011 Free Software Foundation, Inc.
+ 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by Richard Earnshaw ([email protected])
This file is part of BFD, the Binary File Descriptor library.
@@ -247,7 +247,7 @@
bfd_reloc_status_type flag = bfd_reloc_ok;
/* If this is an undefined symbol, return error. */
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& (symbol->flags & BSF_WEAK) == 0)
return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
@@ -409,10 +409,10 @@
check for that here. */
if (bfd_is_com_section (output_section)
- || output_section == &bfd_abs_section
- || output_section == &bfd_und_section)
+ || bfd_is_abs_section (output_section)
+ || bfd_is_und_section (output_section))
{
- if (bfd_abs_section.symbol == sym)
+ if (bfd_abs_section_ptr->symbol == sym)
{
/* Whoops, looked like an abs symbol, but is really an offset
from the abs section. */
diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c
index f1f3060..3e3d21a 100644
--- a/bfd/aout-cris.c
+++ b/bfd/aout-cris.c
@@ -1,5 +1,5 @@
/* BFD backend for CRIS a.out binaries.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2012
Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson.
@@ -66,6 +66,7 @@
#define MY(OP) CONCAT2 (cris_aout_,OP)
#define NAME(x, y) CONCAT3 (cris_aout,_32_,y)
+#include "sysdep.h"
#include "bfd.h"
/* Version 1 of the header. */
diff --git a/bfd/aout-ns32k.c b/bfd/aout-ns32k.c
index 9a0737d..75886bc 100644
--- a/bfd/aout-ns32k.c
+++ b/bfd/aout-ns32k.c
@@ -1,6 +1,6 @@
/* BFD back-end for ns32k a.out-ish binaries.
Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
+ 2002, 2003, 2005, 2006, 2007, 2010, 2012 Free Software Foundation, Inc.
Contributed by Ian Dall ([email protected]).
This file is part of BFD, the Binary File Descriptor library.
@@ -20,6 +20,7 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "aout/aout64.h"
#include "ns32k.h"
@@ -303,10 +304,10 @@
from the abs section, or as a symbol which has an abs value.
Check for that here. */
if (bfd_is_com_section (output_section)
- || output_section == &bfd_abs_section
- || output_section == &bfd_und_section)
+ || bfd_is_abs_section (output_section)
+ || bfd_is_und_section (output_section))
{
- if (bfd_abs_section.symbol == sym)
+ if (bfd_abs_section_ptr->symbol == sym)
{
/* Whoops, looked like an abs symbol, but is really an offset
from the abs section. */
diff --git a/bfd/aout-sparcle.c b/bfd/aout-sparcle.c
index afcc342..e050423 100644
--- a/bfd/aout-sparcle.c
+++ b/bfd/aout-sparcle.c
@@ -1,5 +1,5 @@
/* BFD backend for sparc little-endian aout binaries.
- Copyright 1996, 2001, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 1996, 2001, 2005, 2007, 2012 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,6 +25,7 @@
the tokens. */
#define MY(OP) CONCAT2 (sparcle_aout_,OP)
+#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
#include "libaout.h"
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index f6e8bd2..1ffef87 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -577,7 +577,18 @@
#endif
#ifndef MY_close_and_cleanup
-#define MY_close_and_cleanup MY_bfd_free_cached_info
+
+/* Handle closing of a BFD including the resource-releasing parts. */
+
+static bfd_boolean
+MY_close_and_cleanup (bfd *abfd)
+{
+ if (!MY_bfd_free_cached_info (abfd))
+ return FALSE;
+
+ return _bfd_generic_close_and_cleanup (abfd);
+}
+
#endif
#ifndef MY_get_dynamic_symtab_upper_bound
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index 0b01177..d8ce9be 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, 2011
+ 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Steven Haworth ([email protected])
@@ -189,7 +189,7 @@
bfd_vma relocation;
/* Make sure that the symbol's section is defined. */
- if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0)
+ if (bfd_is_und_section (symbol->section) && (symbol->flags & BSF_WEAK) == 0)
return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
/* Get the size of the input section and turn it into the TMS320C30
32-bit address format. */
@@ -214,7 +214,7 @@
bfd_vma relocation;
/* Make sure that the symbol's section is defined. */
- if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0)
+ if (bfd_is_und_section (symbol->section) && (symbol->flags & BSF_WEAK) == 0)
return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
/* Get the size of the input section and turn it into the TMS320C30
32-bit address format. */
@@ -701,7 +701,7 @@
*ptreloff = obj_datasec (abfd)->filepos + execp->a_data;
*pdreloff = *ptreloff + execp->a_trsize;
- *psymoff = *pdreloff + execp->a_drsize;;
+ *psymoff = *pdreloff + execp->a_drsize;
}
#endif
diff --git a/bfd/aout0.c b/bfd/aout0.c
index e87af00..be73fa0 100644
--- a/bfd/aout0.c
+++ b/bfd/aout0.c
@@ -1,10 +1,10 @@
/* BFD backend for SunOS style a.out with flags set to 0
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2005, 2007
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2005, 2007, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
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
@@ -27,6 +27,7 @@
the tokens. */
#define MY(OP) CONCAT2 (aout0_big_,OP)
+#include "sysdep.h"
#include "bfd.h"
#define MY_exec_hdr_flags 0
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 1efb715..1e0ad38 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -3554,7 +3554,7 @@
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;
+ struct aout_final_link_info *flaginfo = (struct aout_final_link_info *) data;
bfd *output_bfd;
int type;
bfd_vma val;
@@ -3569,12 +3569,12 @@
return TRUE;
}
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
if (aout_backend_info (output_bfd)->write_dynamic_symbol != NULL)
{
if (! ((*aout_backend_info (output_bfd)->write_dynamic_symbol)
- (output_bfd, finfo->info, h)))
+ (output_bfd, flaginfo->info, h)))
{
/* FIXME: No way to handle errors. */
abort ();
@@ -3588,9 +3588,9 @@
/* An indx of -2 means the symbol must be written. */
if (h->indx != -2
- && (finfo->info->strip == strip_all
- || (finfo->info->strip == strip_some
- && bfd_hash_lookup (finfo->info->keep_hash, h->root.root.string,
+ && (flaginfo->info->strip == strip_all
+ || (flaginfo->info->strip == strip_some
+ && bfd_hash_lookup (flaginfo->info->keep_hash, h->root.root.string,
FALSE, FALSE) == NULL)))
return TRUE;
@@ -3648,7 +3648,7 @@
H_PUT_8 (output_bfd, type, outsym.e_type);
H_PUT_8 (output_bfd, 0, outsym.e_other);
H_PUT_16 (output_bfd, 0, outsym.e_desc);
- indx = add_to_stringtab (output_bfd, finfo->strtab, h->root.root.string,
+ indx = add_to_stringtab (output_bfd, flaginfo->strtab, h->root.root.string,
FALSE);
if (indx == - (bfd_size_type) 1)
/* FIXME: No way to handle errors. */
@@ -3658,12 +3658,12 @@
PUT_WORD (output_bfd, val, outsym.e_value);
amt = EXTERNAL_NLIST_SIZE;
- if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0
+ if (bfd_seek (output_bfd, flaginfo->symoff, SEEK_SET) != 0
|| bfd_bwrite ((void *) &outsym, amt, output_bfd) != amt)
/* FIXME: No way to handle errors. */
abort ();
- finfo->symoff += EXTERNAL_NLIST_SIZE;
+ flaginfo->symoff += EXTERNAL_NLIST_SIZE;
h->indx = obj_aout_external_sym_count (output_bfd);
++obj_aout_external_sym_count (output_bfd);
@@ -3673,7 +3673,7 @@
/* Handle a link order which is supposed to generate a reloc. */
static bfd_boolean
-aout_link_reloc_link_order (struct aout_final_link_info *finfo,
+aout_link_reloc_link_order (struct aout_final_link_info *flaginfo,
asection *o,
struct bfd_link_order *p)
{
@@ -3696,7 +3696,7 @@
r_index = N_ABS | N_EXT;
else
{
- BFD_ASSERT (pr->u.section->owner == finfo->output_bfd);
+ BFD_ASSERT (pr->u.section->owner == flaginfo->output_bfd);
r_index = pr->u.section->target_index;
}
}
@@ -3707,7 +3707,7 @@
BFD_ASSERT (p->type == bfd_symbol_reloc_link_order);
r_extern = 1;
h = ((struct aout_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (finfo->output_bfd, finfo->info,
+ bfd_wrapped_link_hash_lookup (flaginfo->output_bfd, flaginfo->info,
pr->u.name, FALSE, FALSE, TRUE));
if (h != NULL
&& h->indx >= 0)
@@ -3720,37 +3720,37 @@
symbol. */
h->indx = -2;
h->written = FALSE;
- if (!aout_link_write_other_symbol (&h->root.root, finfo))
+ if (!aout_link_write_other_symbol (&h->root.root, flaginfo))
return FALSE;
r_index = h->indx;
}
else
{
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
+ if (! ((*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
return FALSE;
r_index = 0;
}
}
- howto = bfd_reloc_type_lookup (finfo->output_bfd, pr->reloc);
+ howto = bfd_reloc_type_lookup (flaginfo->output_bfd, pr->reloc);
if (howto == 0)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
- if (o == obj_textsec (finfo->output_bfd))
- reloff_ptr = &finfo->treloff;
- else if (o == obj_datasec (finfo->output_bfd))
- reloff_ptr = &finfo->dreloff;
+ if (o == obj_textsec (flaginfo->output_bfd))
+ reloff_ptr = &flaginfo->treloff;
+ else if (o == obj_datasec (flaginfo->output_bfd))
+ reloff_ptr = &flaginfo->dreloff;
else
abort ();
- if (obj_reloc_entry_size (finfo->output_bfd) == RELOC_STD_SIZE)
+ if (obj_reloc_entry_size (flaginfo->output_bfd) == RELOC_STD_SIZE)
{
#ifdef MY_put_reloc
- MY_put_reloc (finfo->output_bfd, r_extern, r_index, p->offset, howto,
+ MY_put_reloc (flaginfo->output_bfd, r_extern, r_index, p->offset, howto,
&srel);
#else
{
@@ -3766,8 +3766,8 @@
r_relative = (howto->type & 32) != 0;
r_length = howto->size;
- PUT_WORD (finfo->output_bfd, p->offset, srel.r_address);
- if (bfd_header_big_endian (finfo->output_bfd))
+ PUT_WORD (flaginfo->output_bfd, p->offset, srel.r_address);
+ if (bfd_header_big_endian (flaginfo->output_bfd))
{
srel.r_index[0] = r_index >> 16;
srel.r_index[1] = r_index >> 8;
@@ -3813,7 +3813,7 @@
buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == NULL)
return FALSE;
- r = MY_relocate_contents (howto, finfo->output_bfd,
+ r = MY_relocate_contents (howto, flaginfo->output_bfd,
(bfd_vma) pr->addend, buf);
switch (r)
{
@@ -3823,10 +3823,10 @@
case bfd_reloc_outofrange:
abort ();
case bfd_reloc_overflow:
- if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, NULL,
+ if (! ((*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, NULL,
(p->type == bfd_section_reloc_link_order
- ? bfd_section_name (finfo->output_bfd,
+ ? bfd_section_name (flaginfo->output_bfd,
pr->u.section)
: pr->u.name),
howto->name, pr->addend, NULL, NULL, (bfd_vma) 0)))
@@ -3836,7 +3836,7 @@
}
break;
}
- ok = bfd_set_section_contents (finfo->output_bfd, o, (void *) buf,
+ ok = bfd_set_section_contents (flaginfo->output_bfd, o, (void *) buf,
(file_ptr) p->offset, size);
free (buf);
if (! ok)
@@ -3846,12 +3846,12 @@
else
{
#ifdef MY_put_ext_reloc
- MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
+ MY_put_ext_reloc (flaginfo->output_bfd, r_extern, r_index, p->offset,
howto, &erel, pr->addend);
#else
- PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
+ PUT_WORD (flaginfo->output_bfd, p->offset, erel.r_address);
- if (bfd_header_big_endian (finfo->output_bfd))
+ if (bfd_header_big_endian (flaginfo->output_bfd))
{
erel.r_index[0] = r_index >> 16;
erel.r_index[1] = r_index >> 8;
@@ -3870,25 +3870,25 @@
| (howto->type << RELOC_EXT_BITS_TYPE_SH_LITTLE);
}
- PUT_WORD (finfo->output_bfd, (bfd_vma) pr->addend, erel.r_addend);
+ PUT_WORD (flaginfo->output_bfd, (bfd_vma) pr->addend, erel.r_addend);
#endif /* MY_put_ext_reloc */
rel_ptr = (void *) &erel;
}
- amt = obj_reloc_entry_size (finfo->output_bfd);
- if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0
- || bfd_bwrite (rel_ptr, amt, finfo->output_bfd) != amt)
+ amt = obj_reloc_entry_size (flaginfo->output_bfd);
+ if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0
+ || bfd_bwrite (rel_ptr, amt, flaginfo->output_bfd) != amt)
return FALSE;
- *reloff_ptr += obj_reloc_entry_size (finfo->output_bfd);
+ *reloff_ptr += obj_reloc_entry_size (flaginfo->output_bfd);
/* Assert that the relocs have not run into the symbols, and that n
the text relocs have not run into the data relocs. */
- BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
- && (reloff_ptr != &finfo->treloff
+ BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (flaginfo->output_bfd)
+ && (reloff_ptr != &flaginfo->treloff
|| (*reloff_ptr
- <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+ <= obj_datasec (flaginfo->output_bfd)->rel_filepos)));
return TRUE;
}
@@ -3913,7 +3913,7 @@
/* Relocate an a.out section using standard a.out relocs. */
static bfd_boolean
-aout_link_input_section_std (struct aout_final_link_info *finfo,
+aout_link_input_section_std (struct aout_final_link_info *flaginfo,
bfd *input_bfd,
asection *input_section,
struct reloc_std_external *relocs,
@@ -3934,18 +3934,18 @@
struct reloc_std_external *rel;
struct reloc_std_external *rel_end;
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
BFD_ASSERT (obj_reloc_entry_size (input_bfd) == RELOC_STD_SIZE);
BFD_ASSERT (input_bfd->xvec->header_byteorder
== output_bfd->xvec->header_byteorder);
- relocatable = finfo->info->relocatable;
+ relocatable = flaginfo->info->relocatable;
syms = obj_aout_external_syms (input_bfd);
strings = obj_aout_external_strings (input_bfd);
sym_hashes = obj_aout_sym_hashes (input_bfd);
- symbol_map = finfo->symbol_map;
+ symbol_map = flaginfo->symbol_map;
reloc_count = rel_size / RELOC_STD_SIZE;
rel = relocs;
@@ -4014,7 +4014,7 @@
if (howto == NULL)
{
- (*finfo->info->callbacks->einfo)
+ (*flaginfo->info->callbacks->einfo)
(_("%P: %B: unexpected relocation type\n"), input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -4079,7 +4079,7 @@
h->indx = -2;
h->written = FALSE;
if (!aout_link_write_other_symbol (&h->root.root,
- finfo))
+ flaginfo))
return FALSE;
}
r_index = h->indx;
@@ -4090,8 +4090,8 @@
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, name, input_bfd, input_section,
+ if (! ((*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name, input_bfd, input_section,
r_addr)))
return FALSE;
r_index = 0;
@@ -4197,7 +4197,7 @@
bfd_boolean skip;
if (! ((*check_dynamic_reloc)
- (finfo->info, input_bfd, input_section, h,
+ (flaginfo->info, input_bfd, input_section, h,
(void *) rel, contents, &skip, &relocation)))
return FALSE;
if (skip)
@@ -4207,7 +4207,7 @@
/* Now warn if a global symbol is undefined. We could not
do this earlier, because check_dynamic_reloc might want
to skip this reloc. */
- if (hundef && ! finfo->info->shared && ! r_baserel)
+ if (hundef && ! flaginfo->info->shared && ! r_baserel)
{
const char *name;
@@ -4215,8 +4215,8 @@
name = h->root.root.string;
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
- if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section,
+ if (! ((*flaginfo->info->callbacks->undefined_symbol)
+ (flaginfo->info, name, input_bfd, input_section,
r_addr, TRUE)))
return FALSE;
}
@@ -4250,8 +4250,8 @@
s = aout_reloc_index_to_section (input_bfd, r_index);
name = bfd_section_name (input_bfd, s);
}
- if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, (h ? &h->root : NULL), name,
+ if (! ((*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, (h ? &h->root : NULL), name,
howto->name, (bfd_vma) 0, input_bfd,
input_section, r_addr)))
return FALSE;
@@ -4267,7 +4267,7 @@
/* Relocate an a.out section using extended a.out relocs. */
static bfd_boolean
-aout_link_input_section_ext (struct aout_final_link_info *finfo,
+aout_link_input_section_ext (struct aout_final_link_info *flaginfo,
bfd *input_bfd,
asection *input_section,
struct reloc_ext_external *relocs,
@@ -4288,18 +4288,18 @@
struct reloc_ext_external *rel;
struct reloc_ext_external *rel_end;
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
BFD_ASSERT (obj_reloc_entry_size (input_bfd) == RELOC_EXT_SIZE);
BFD_ASSERT (input_bfd->xvec->header_byteorder
== output_bfd->xvec->header_byteorder);
- relocatable = finfo->info->relocatable;
+ relocatable = flaginfo->info->relocatable;
syms = obj_aout_external_syms (input_bfd);
strings = obj_aout_external_strings (input_bfd);
sym_hashes = obj_aout_sym_hashes (input_bfd);
- symbol_map = finfo->symbol_map;
+ symbol_map = flaginfo->symbol_map;
reloc_count = rel_size / RELOC_EXT_SIZE;
rel = relocs;
@@ -4340,7 +4340,7 @@
if (r_type >= TABLE_SIZE (howto_table_ext))
{
- (*finfo->info->callbacks->einfo)
+ (*flaginfo->info->callbacks->einfo)
(_("%P: %B: unexpected relocation type\n"), input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -4421,7 +4421,7 @@
h->indx = -2;
h->written = FALSE;
if (!aout_link_write_other_symbol (&h->root.root,
- finfo))
+ flaginfo))
return FALSE;
}
r_index = h->indx;
@@ -4432,8 +4432,8 @@
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, name, input_bfd, input_section,
+ if (! ((*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name, input_bfd, input_section,
r_addr)))
return FALSE;
r_index = 0;
@@ -4600,7 +4600,7 @@
bfd_boolean skip;
if (! ((*check_dynamic_reloc)
- (finfo->info, input_bfd, input_section, h,
+ (flaginfo->info, input_bfd, input_section, h,
(void *) rel, contents, &skip, &relocation)))
return FALSE;
if (skip)
@@ -4611,7 +4611,7 @@
do this earlier, because check_dynamic_reloc might want
to skip this reloc. */
if (hundef
- && ! finfo->info->shared
+ && ! flaginfo->info->shared
&& r_type != (unsigned int) RELOC_BASE10
&& r_type != (unsigned int) RELOC_BASE13
&& r_type != (unsigned int) RELOC_BASE22)
@@ -4622,8 +4622,8 @@
name = h->root.root.string;
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
- if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section,
+ if (! ((*flaginfo->info->callbacks->undefined_symbol)
+ (flaginfo->info, name, input_bfd, input_section,
r_addr, TRUE)))
return FALSE;
}
@@ -4669,8 +4669,8 @@
s = aout_reloc_index_to_section (input_bfd, r_index);
name = bfd_section_name (input_bfd, s);
}
- if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, (h ? &h->root : NULL), name,
+ if (! ((*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, (h ? &h->root : NULL), name,
howto_table_ext[r_type].name,
r_addend, input_bfd, input_section, r_addr)))
return FALSE;
@@ -4687,7 +4687,7 @@
/* Link an a.out section into the output file. */
static bfd_boolean
-aout_link_input_section (struct aout_final_link_info *finfo,
+aout_link_input_section (struct aout_final_link_info *flaginfo,
bfd *input_bfd,
asection *input_section,
file_ptr *reloff_ptr,
@@ -4699,7 +4699,7 @@
/* Get the section contents. */
input_size = input_section->size;
if (! bfd_get_section_contents (input_bfd, input_section,
- (void *) finfo->contents,
+ (void *) flaginfo->contents,
(file_ptr) 0, input_size))
return FALSE;
@@ -4709,7 +4709,7 @@
relocs = aout_section_data (input_section)->relocs;
else
{
- relocs = finfo->relocs;
+ relocs = flaginfo->relocs;
if (rel_size > 0)
{
if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
@@ -4721,44 +4721,44 @@
/* Relocate the section contents. */
if (obj_reloc_entry_size (input_bfd) == RELOC_STD_SIZE)
{
- if (! aout_link_input_section_std (finfo, input_bfd, input_section,
+ if (! aout_link_input_section_std (flaginfo, input_bfd, input_section,
(struct reloc_std_external *) relocs,
- rel_size, finfo->contents))
+ rel_size, flaginfo->contents))
return FALSE;
}
else
{
- if (! aout_link_input_section_ext (finfo, input_bfd, input_section,
+ if (! aout_link_input_section_ext (flaginfo, input_bfd, input_section,
(struct reloc_ext_external *) relocs,
- rel_size, finfo->contents))
+ rel_size, flaginfo->contents))
return FALSE;
}
/* Write out the section contents. */
- if (! bfd_set_section_contents (finfo->output_bfd,
+ if (! bfd_set_section_contents (flaginfo->output_bfd,
input_section->output_section,
- (void *) finfo->contents,
+ (void *) flaginfo->contents,
(file_ptr) input_section->output_offset,
input_size))
return FALSE;
/* If we are producing relocatable output, the relocs were
modified, and we now write them out. */
- if (finfo->info->relocatable && rel_size > 0)
+ if (flaginfo->info->relocatable && rel_size > 0)
{
- if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
+ if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite (relocs, rel_size, finfo->output_bfd) != rel_size)
+ if (bfd_bwrite (relocs, rel_size, flaginfo->output_bfd) != rel_size)
return FALSE;
*reloff_ptr += rel_size;
/* Assert that the relocs have not run into the symbols, and
that if these are the text relocs they have not run into the
data relocs. */
- BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
- && (reloff_ptr != &finfo->treloff
+ BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (flaginfo->output_bfd)
+ && (reloff_ptr != &flaginfo->treloff
|| (*reloff_ptr
- <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+ <= obj_datasec (flaginfo->output_bfd)->rel_filepos)));
}
return TRUE;
@@ -4768,7 +4768,7 @@
symbol indices into a symbol_map. */
static bfd_boolean
-aout_link_write_symbols (struct aout_final_link_info *finfo, bfd *input_bfd)
+aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd)
{
bfd *output_bfd;
bfd_size_type sym_count;
@@ -4784,25 +4784,25 @@
bfd_boolean pass;
bfd_boolean skip_next;
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
sym_count = obj_aout_external_sym_count (input_bfd);
strings = obj_aout_external_strings (input_bfd);
- strip = finfo->info->strip;
- discard = finfo->info->discard;
- outsym = finfo->output_syms;
+ strip = flaginfo->info->strip;
+ discard = flaginfo->info->discard;
+ outsym = flaginfo->output_syms;
/* First write out a symbol for this object file, unless we are
discarding such symbols. */
if (strip != strip_all
&& (strip != strip_some
- || bfd_hash_lookup (finfo->info->keep_hash, input_bfd->filename,
+ || bfd_hash_lookup (flaginfo->info->keep_hash, input_bfd->filename,
FALSE, FALSE) != NULL)
&& discard != discard_all)
{
H_PUT_8 (output_bfd, N_TEXT, outsym->e_type);
H_PUT_8 (output_bfd, 0, outsym->e_other);
H_PUT_16 (output_bfd, 0, outsym->e_desc);
- strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
+ strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab,
input_bfd->filename, FALSE);
if (strtab_index == (bfd_size_type) -1)
return FALSE;
@@ -4821,7 +4821,7 @@
sym = obj_aout_external_syms (input_bfd);
sym_end = sym + sym_count;
sym_hash = obj_aout_sym_hashes (input_bfd);
- symbol_map = finfo->symbol_map;
+ symbol_map = flaginfo->symbol_map;
memset (symbol_map, 0, (size_t) sym_count * sizeof *symbol_map);
for (; sym < sym_end; sym++, sym_hash++, symbol_map++)
{
@@ -4920,7 +4920,7 @@
skip = TRUE;
break;
case strip_some:
- if (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, FALSE)
+ if (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE, FALSE)
== NULL)
skip = TRUE;
break;
@@ -5148,8 +5148,8 @@
/* If we have already included a header file with the
same value, then replace this one with an N_EXCL
symbol. */
- copy = (bfd_boolean) (! finfo->info->keep_memory);
- incl_entry = aout_link_includes_lookup (&finfo->includes,
+ copy = (bfd_boolean) (! flaginfo->info->keep_memory);
+ incl_entry = aout_link_includes_lookup (&flaginfo->includes,
name, TRUE, copy);
if (incl_entry == NULL)
return FALSE;
@@ -5161,7 +5161,7 @@
/* This is the first time we have seen this header
file with this set of stabs strings. */
t = (struct aout_link_includes_totals *)
- bfd_hash_allocate (&finfo->includes.root,
+ bfd_hash_allocate (&flaginfo->includes.root,
sizeof *t);
if (t == NULL)
return FALSE;
@@ -5210,7 +5210,7 @@
H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_other), outsym->e_other);
H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc);
copy = FALSE;
- if (! finfo->info->keep_memory)
+ if (! flaginfo->info->keep_memory)
{
/* name points into a string table which we are going to
free. If there is a hash table entry, use that string.
@@ -5220,7 +5220,7 @@
else
copy = TRUE;
}
- strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
+ strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab,
name, copy);
if (strtab_index == (bfd_size_type) -1)
return FALSE;
@@ -5232,18 +5232,18 @@
}
/* Write out the output symbols we have just constructed. */
- if (outsym > finfo->output_syms)
+ if (outsym > flaginfo->output_syms)
{
bfd_size_type outsym_size;
- if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0)
+ if (bfd_seek (output_bfd, flaginfo->symoff, SEEK_SET) != 0)
return FALSE;
- outsym_size = outsym - finfo->output_syms;
+ outsym_size = outsym - flaginfo->output_syms;
outsym_size *= EXTERNAL_NLIST_SIZE;
- if (bfd_bwrite ((void *) finfo->output_syms, outsym_size, output_bfd)
+ if (bfd_bwrite ((void *) flaginfo->output_syms, outsym_size, output_bfd)
!= outsym_size)
return FALSE;
- finfo->symoff += outsym_size;
+ flaginfo->symoff += outsym_size;
}
return TRUE;
@@ -5252,7 +5252,7 @@
/* Link an a.out input BFD into the output file. */
static bfd_boolean
-aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
+aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd)
{
BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
@@ -5260,16 +5260,16 @@
if ((input_bfd->flags & DYNAMIC) != 0
&& aout_backend_info (input_bfd)->link_dynamic_object != NULL)
return ((*aout_backend_info (input_bfd)->link_dynamic_object)
- (finfo->info, input_bfd));
+ (flaginfo->info, input_bfd));
/* Get the symbols. We probably have them already, unless
- finfo->info->keep_memory is FALSE. */
+ flaginfo->info->keep_memory is FALSE. */
if (! aout_get_external_symbols (input_bfd))
return FALSE;
/* Write out the symbols and get a map of the new indices. The map
- is placed into finfo->symbol_map. */
- if (! aout_link_write_symbols (finfo, input_bfd))
+ is placed into flaginfo->symbol_map. */
+ if (! aout_link_write_symbols (flaginfo, input_bfd))
return FALSE;
/* Relocate and write out the sections. These functions use the
@@ -5278,17 +5278,17 @@
link, which will normally be the case. */
if (obj_textsec (input_bfd)->linker_mark)
{
- if (! aout_link_input_section (finfo, input_bfd,
+ if (! aout_link_input_section (flaginfo, input_bfd,
obj_textsec (input_bfd),
- &finfo->treloff,
+ &flaginfo->treloff,
exec_hdr (input_bfd)->a_trsize))
return FALSE;
}
if (obj_datasec (input_bfd)->linker_mark)
{
- if (! aout_link_input_section (finfo, input_bfd,
+ if (! aout_link_input_section (flaginfo, input_bfd,
obj_datasec (input_bfd),
- &finfo->dreloff,
+ &flaginfo->dreloff,
exec_hdr (input_bfd)->a_drsize))
return FALSE;
}
@@ -5296,7 +5296,7 @@
/* If we are not keeping memory, we don't need the symbols any
longer. We still need them if we are keeping memory, because the
strings in the hash table point into them. */
- if (! finfo->info->keep_memory)
+ if (! flaginfo->info->keep_memory)
{
if (! aout_link_free_symbols (input_bfd))
return FALSE;
diff --git a/bfd/archive.c b/bfd/archive.c
index 3e333c7..32b07a7 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1,7 +1,5 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,11 +40,17 @@
have to read the entire archive if you don't want
to! Read it until you find what you want.
+ A BFD returned by <<bfd_openr_next_archived_file>> can be
+ closed manually with <<bfd_close>>. If you do not close it,
+ then a second iteration through the members of an archive may
+ return the same BFD. If you close the archive BFD, then all
+ the member BFDs will automatically be closed as well.
+
Archive contents of output BFDs are chained through the
- <<next>> pointer in a BFD. The first one is findable through
- the <<archive_head>> slot of the archive. Set it with
- <<bfd_set_archive_head>> (q.v.). A given BFD may be in only one
- open output archive at a time.
+ <<archive_next>> pointer in a BFD. The first one is findable
+ through the <<archive_head>> slot of the archive. Set it with
+ <<bfd_set_archive_head>> (q.v.). A given BFD may be in only
+ one open output archive at a time.
As expected, the BFD archive code is more general than the
archive code of any given environment. BFD archives may
@@ -147,7 +151,8 @@
it's generally short enough to search linearly.
Note that the pointers here point to the front of the ar_hdr, not
to the front of the contents! */
-struct ar_cache {
+struct ar_cache
+{
file_ptr ptr;
bfd *arbfd;
};
@@ -168,6 +173,7 @@
{
static char buf[20];
size_t len;
+
snprintf (buf, sizeof (buf), fmt, val);
len = strlen (buf);
if (len < n)
@@ -178,6 +184,29 @@
else
memcpy (p, buf, n);
}
+
+bfd_boolean
+_bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
+{
+ static char buf[21];
+ size_t len;
+
+ snprintf (buf, sizeof (buf), "%-10" BFD_VMA_FMT "u", size);
+ len = strlen (buf);
+ if (len > n)
+ {
+ bfd_set_error (bfd_error_file_too_big);
+ return FALSE;
+ }
+ if (len < n)
+ {
+ memcpy (p, buf, len);
+ memset (p + len, ' ', n - len);
+ }
+ else
+ memcpy (p, buf, n);
+ return TRUE;
+}
bfd_boolean
_bfd_generic_mkarchive (bfd *abfd)
@@ -273,6 +302,7 @@
{
htab_t hash_table = bfd_ardata (arch_bfd)->cache;
struct ar_cache m;
+
m.ptr = filepos;
if (hash_table)
@@ -288,7 +318,7 @@
}
static hashval_t
-hash_file_ptr (const PTR p)
+hash_file_ptr (const void * p)
{
return (hashval_t) (((struct ar_cache *) p)->ptr);
}
@@ -296,7 +326,7 @@
/* Returns non-zero if P1 and P2 are equal. */
static int
-eq_file_ptr (const PTR p1, const PTR p2)
+eq_file_ptr (const void * p1, const void * p2)
{
struct ar_cache *arc1 = (struct ar_cache *) p1;
struct ar_cache *arc2 = (struct ar_cache *) p2;
@@ -336,6 +366,10 @@
cache->arbfd = new_elt;
*htab_find_slot (hash_table, (const void *) cache, INSERT) = cache;
+ /* Provide a means of accessing this from child. */
+ arch_eltdata (new_elt)->parent_cache = hash_table;
+ arch_eltdata (new_elt)->key = filepos;
+
return TRUE;
}
@@ -345,12 +379,19 @@
bfd *abfd;
const char *target;
+ /* PR 15140: Don't allow a nested archive pointing to itself. */
+ if (filename_cmp (filename, arch_bfd->filename) == 0)
+ {
+ bfd_set_error (bfd_error_malformed_archive);
+ return NULL;
+ }
+
for (abfd = arch_bfd->nested_archives;
abfd != NULL;
abfd = abfd->archive_next)
{
if (filename_cmp (filename, abfd->filename) == 0)
- return abfd;
+ return abfd;
}
target = NULL;
if (!arch_bfd->target_defaulted)
@@ -390,10 +431,10 @@
file_ptr origin = strtol (endp + 1, NULL, 10);
if (errno != 0)
- {
- bfd_set_error (bfd_error_malformed_archive);
- return NULL;
- }
+ {
+ bfd_set_error (bfd_error_malformed_archive);
+ return NULL;
+ }
*originp = origin;
}
else
@@ -424,7 +465,7 @@
{
struct ar_hdr hdr;
char *hdrp = (char *) &hdr;
- size_t parsed_size;
+ bfd_size_type parsed_size;
struct areltdata *ared;
char *filename = NULL;
bfd_size_type namelen = 0;
@@ -432,6 +473,8 @@
char *allocptr = 0;
file_ptr origin = 0;
unsigned int extra_size = 0;
+ char fmag_save;
+ int scan;
if (bfd_bread (hdrp, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr))
{
@@ -448,8 +491,11 @@
}
errno = 0;
- parsed_size = strtol (hdr.ar_size, NULL, 10);
- if (errno != 0)
+ fmag_save = hdr.ar_fmag[0];
+ hdr.ar_fmag[0] = 0;
+ scan = sscanf (hdr.ar_size, "%" BFD_VMA_FMT "u", &parsed_size);
+ hdr.ar_fmag[0] = fmag_save;
+ if (scan != 1)
{
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -476,7 +522,7 @@
parsed_size -= namelen;
extra_size = namelen;
- allocptr = (char *) bfd_zalloc (abfd, allocsize);
+ allocptr = (char *) bfd_zmalloc (allocsize);
if (allocptr == NULL)
return NULL;
filename = (allocptr
@@ -484,6 +530,7 @@
+ sizeof (struct ar_hdr));
if (bfd_bread (filename, namelen, abfd) != namelen)
{
+ free (allocptr);
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_no_more_archived_files);
return NULL;
@@ -519,7 +566,7 @@
if (!allocptr)
{
- allocptr = (char *) bfd_zalloc (abfd, allocsize);
+ allocptr = (char *) bfd_zmalloc (allocsize);
if (allocptr == NULL)
return NULL;
}
@@ -581,12 +628,6 @@
bfd *n_nfd;
char *filename;
- if (archive->my_archive)
- {
- filepos += archive->origin;
- archive = archive->my_archive;
- }
-
n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
if (n_nfd)
return n_nfd;
@@ -605,35 +646,38 @@
/* This is a proxy entry for an external file. */
if (! IS_ABSOLUTE_PATH (filename))
- {
- filename = _bfd_append_relative_path (archive, filename);
- if (filename == NULL)
- return NULL;
- }
+ {
+ filename = _bfd_append_relative_path (archive, filename);
+ if (filename == NULL)
+ {
+ free (new_areldata);
+ return NULL;
+ }
+ }
if (new_areldata->origin > 0)
- {
- /* This proxy entry refers to an element of a nested archive.
- Locate the member of that archive and return a bfd for it. */
- bfd *ext_arch = _bfd_find_nested_archive (archive, filename);
+ {
+ /* This proxy entry refers to an element of a nested archive.
+ Locate the member of that archive and return a bfd for it. */
+ bfd *ext_arch = _bfd_find_nested_archive (archive, filename);
- if (ext_arch == NULL
- || ! bfd_check_format (ext_arch, bfd_archive))
- {
- bfd_release (archive, new_areldata);
- return NULL;
- }
- n_nfd = _bfd_get_elt_at_filepos (ext_arch, new_areldata->origin);
- if (n_nfd == NULL)
- {
- bfd_release (archive, new_areldata);
- return NULL;
- }
- n_nfd->proxy_origin = bfd_tell (archive);
- return n_nfd;
- }
+ if (ext_arch == NULL
+ || ! bfd_check_format (ext_arch, bfd_archive))
+ {
+ free (new_areldata);
+ return NULL;
+ }
+ n_nfd = _bfd_get_elt_at_filepos (ext_arch, new_areldata->origin);
+ if (n_nfd == NULL)
+ {
+ free (new_areldata);
+ return NULL;
+ }
+ n_nfd->proxy_origin = bfd_tell (archive);
+ return n_nfd;
+ }
/* It's not an element of a nested archive;
- open the external file as a bfd. */
+ open the external file as a bfd. */
target = NULL;
if (!archive->target_defaulted)
target = archive->xvec->name;
@@ -648,7 +692,7 @@
if (n_nfd == NULL)
{
- bfd_release (archive, new_areldata);
+ free (new_areldata);
return NULL;
}
@@ -672,7 +716,8 @@
if (_bfd_add_bfd_to_archive_cache (archive, filepos, n_nfd))
return n_nfd;
- bfd_release (archive, new_areldata);
+ free (new_areldata);
+ n_nfd->arelt_data = NULL;
return NULL;
}
@@ -727,13 +772,11 @@
filestart = bfd_ardata (archive)->first_file_filepos;
else
{
- unsigned int size = arelt_size (last_file);
+ bfd_size_type size = arelt_size (last_file);
filestart = last_file->proxy_origin;
if (! bfd_is_thin_archive (archive))
- filestart += size;
- if (archive->my_archive)
- filestart -= archive->origin;
+ filestart += size;
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd size. */
@@ -814,11 +857,7 @@
first->target_defaulted = FALSE;
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
- {
- bfd_set_error (bfd_error_wrong_object_format);
- bfd_ardata (abfd) = tdata_hold;
- return NULL;
- }
+ bfd_set_error (bfd_error_wrong_object_format);
/* And we ought to close `first' here too. */
}
}
@@ -861,7 +900,7 @@
if (mapdata == NULL)
return FALSE;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, mapdata); /* Don't need it any more. */
+ free (mapdata);
raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size);
if (raw_armap == NULL)
@@ -925,7 +964,7 @@
struct artdata *ardata = bfd_ardata (abfd);
char *stringbase;
bfd_size_type stringsize;
- unsigned int parsed_size;
+ bfd_size_type parsed_size;
carsym *carsyms;
bfd_size_type nsymz; /* Number of symbols in armap. */
bfd_vma (*swap) (const void *);
@@ -937,7 +976,7 @@
if (mapdata == NULL)
return FALSE;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, mapdata); /* Don't need it any more. */
+ free (mapdata);
if (bfd_bread (int_buf, 4, abfd) != 4)
{
@@ -979,7 +1018,7 @@
return FALSE;
ardata->symdefs = (struct carsym *) bfd_zalloc (abfd,
- carsym_size + stringsize + 1);
+ carsym_size + stringsize + 1);
if (ardata->symdefs == NULL)
return FALSE;
carsyms = ardata->symdefs;
@@ -1030,7 +1069,7 @@
ardata->first_file_filepos +=
(tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~(unsigned) 1;
}
- bfd_release (abfd, tmp);
+ free (tmp);
}
}
@@ -1079,21 +1118,21 @@
else if (CONST_STRNEQ (nextname, "#1/20 "))
{
/* Mach-O has a special name for armap when the map is sorted by name.
- However because this name has a space it is slightly more difficult
- to check it. */
+ However because this name has a space it is slightly more difficult
+ to check it. */
struct ar_hdr hdr;
char extname[21];
if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr))
- return FALSE;
+ return FALSE;
/* Read the extended name. We know its length. */
if (bfd_bread (extname, 20, abfd) != 20)
- return FALSE;
- if (bfd_seek (abfd, (file_ptr) -(sizeof (hdr) + 20), SEEK_CUR) != 0)
- return FALSE;
+ return FALSE;
+ if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0)
+ return FALSE;
if (CONST_STRNEQ (extname, "__.SYMDEF SORTED")
- || CONST_STRNEQ (extname, "__.SYMDEF"))
- return do_slurp_bsd_armap (abfd);
+ || CONST_STRNEQ (extname, "__.SYMDEF"))
+ return do_slurp_bsd_armap (abfd);
}
bfd_has_map (abfd) = FALSE;
@@ -1147,15 +1186,17 @@
if (mapdata->parsed_size < HPUX_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE)
{
+ free (mapdata);
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;
+ free (mapdata);
+
raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
if (raw_armap == NULL)
goto byebye;
@@ -1250,14 +1291,14 @@
amt = namedata->parsed_size;
if (amt + 1 == 0)
- goto byebye;
+ goto byebye;
bfd_ardata (abfd)->extended_names_size = amt;
bfd_ardata (abfd)->extended_names = (char *) bfd_zalloc (abfd, amt + 1);
if (bfd_ardata (abfd)->extended_names == NULL)
{
byebye:
- bfd_release (abfd, namedata);
+ free (namedata);
return FALSE;
}
@@ -1276,7 +1317,7 @@
trailing '/'. DOS/NT created archive often have \ in them
We'll fix all problems here.. */
{
- char *ext_names = bfd_ardata (abfd)->extended_names;
+ char *ext_names = bfd_ardata (abfd)->extended_names;
char *temp = ext_names;
char *limit = temp + namedata->parsed_size;
for (; temp < limit; ++temp)
@@ -1294,8 +1335,7 @@
bfd_ardata (abfd)->first_file_filepos +=
(bfd_ardata (abfd)->first_file_filepos) % 2;
- /* FIXME, we can't release namedata here because it was allocated
- below extended_names on the objalloc... */
+ free (namedata);
}
return TRUE;
}
@@ -1366,7 +1406,7 @@
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)
{
@@ -1389,7 +1429,7 @@
rpath = lrealpath (ref_path);
refp = rpath == NULL ? ref_path : rpath;
-
+
/* Remove common leading path elements. */
for (;;)
{
@@ -1415,7 +1455,7 @@
{
/* PR 12710: If the path element is "../" then instead of
inserting "../" we need to insert the name of the directory
- at the current level. */
+ at the current level. */
if (refp > ref_path + 1
&& refp[-1] == '.'
&& refp[-2] == '.')
@@ -1426,7 +1466,7 @@
/* 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)
@@ -1531,40 +1571,40 @@
unsigned int thislen;
if (bfd_is_thin_archive (abfd))
- {
- const char *filename = current->filename;
+ {
+ const char *filename = current->filename;
- /* If the element being added is a member of another archive
- (i.e., we are flattening), use the containing archive's name. */
- if (current->my_archive
- && ! bfd_is_thin_archive (current->my_archive))
- filename = current->my_archive->filename;
+ /* If the element being added is a member of another archive
+ (i.e., we are flattening), use the containing archive's name. */
+ if (current->my_archive
+ && ! bfd_is_thin_archive (current->my_archive))
+ filename = current->my_archive->filename;
- /* 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 && filename_cmp (last_filename, filename) == 0)
- continue;
+ /* 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 && filename_cmp (last_filename, filename) == 0)
+ continue;
- last_filename = filename;
+ last_filename = filename;
- /* If the path is relative, adjust it relative to
- the containing archive. */
- if (! IS_ABSOLUTE_PATH (filename)
- && ! IS_ABSOLUTE_PATH (abfd->filename))
- normal = adjust_relative_path (filename, abfd->filename);
- else
- normal = filename;
+ /* If the path is relative, adjust it relative to
+ the containing archive. */
+ if (! IS_ABSOLUTE_PATH (filename)
+ && ! IS_ABSOLUTE_PATH (abfd->filename))
+ normal = adjust_relative_path (filename, abfd->filename);
+ else
+ normal = filename;
- /* In a thin archive, always store the full pathname
- in the extended name table. */
- total_namelen += strlen (normal) + 1;
+ /* In a thin archive, always store the full pathname
+ in the extended name table. */
+ total_namelen += strlen (normal) + 1;
if (trailing_slash)
/* Leave room for trailing slash. */
++total_namelen;
- continue;
- }
+ continue;
+ }
normal = normalize (current, current->filename);
if (normal == NULL)
@@ -1594,7 +1634,7 @@
&& hdr->ar_name[thislen] != ar_padchar (current)))
{
/* Must have been using extended format even though it
- didn't need to. Fix it to use normal format. */
+ didn't need to. Fix it to use normal format. */
memcpy (hdr->ar_name, normal, thislen);
if (thislen < maxname
|| (thislen == maxname && thislen < sizeof hdr->ar_name))
@@ -1626,31 +1666,31 @@
const char *filename = current->filename;
if (bfd_is_thin_archive (abfd))
- {
- /* If the element being added is a member of another archive
- (i.e., we are flattening), use the containing archive's name. */
- if (current->my_archive
- && ! bfd_is_thin_archive (current->my_archive))
- filename = current->my_archive->filename;
- /* 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 the path is relative, adjust it relative to
- the containing archive. */
- if (last_filename && filename_cmp (last_filename, filename) == 0)
- normal = last_filename;
- else if (! IS_ABSOLUTE_PATH (filename)
- && ! IS_ABSOLUTE_PATH (abfd->filename))
- normal = adjust_relative_path (filename, abfd->filename);
- else
- normal = filename;
- }
+ {
+ /* If the element being added is a member of another archive
+ (i.e., we are flattening), use the containing archive's name. */
+ if (current->my_archive
+ && ! bfd_is_thin_archive (current->my_archive))
+ filename = current->my_archive->filename;
+ /* 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 the path is relative, adjust it relative to
+ the containing archive. */
+ if (last_filename && filename_cmp (last_filename, filename) == 0)
+ normal = last_filename;
+ else if (! IS_ABSOLUTE_PATH (filename)
+ && ! IS_ABSOLUTE_PATH (abfd->filename))
+ normal = adjust_relative_path (filename, abfd->filename);
+ else
+ normal = filename;
+ }
else
- {
- normal = normalize (current, filename);
- if (normal == NULL)
- return FALSE;
- }
+ {
+ normal = normalize (current, filename);
+ if (normal == NULL)
+ return FALSE;
+ }
thislen = strlen (normal);
if (thislen > maxname || bfd_is_thin_archive (abfd))
@@ -1661,16 +1701,16 @@
struct ar_hdr *hdr = arch_hdr (current);
if (normal == last_filename)
stroff = last_stroff;
- else
- {
+ else
+ {
strcpy (strptr, normal);
if (! trailing_slash)
- strptr[thislen] = ARFMAG[1];
+ strptr[thislen] = ARFMAG[1];
else
- {
- strptr[thislen] = '/';
- strptr[thislen + 1] = ARFMAG[1];
- }
+ {
+ strptr[thislen] = '/';
+ strptr[thislen + 1] = ARFMAG[1];
+ }
stroff = strptr - *tabloc;
last_stroff = stroff;
}
@@ -1678,19 +1718,19 @@
if (bfd_is_thin_archive (abfd) && current->origin > 0)
{
int len = snprintf (hdr->ar_name + 1, maxname - 1, "%-ld:",
- stroff);
+ stroff);
_bfd_ar_spacepad (hdr->ar_name + 1 + len, maxname - 1 - len,
- "%-ld",
- current->origin - sizeof (struct ar_hdr));
+ "%-ld",
+ current->origin - sizeof (struct ar_hdr));
}
else
- _bfd_ar_spacepad (hdr->ar_name + 1, maxname - 1, "%-ld", stroff);
- if (normal != last_filename)
- {
+ _bfd_ar_spacepad (hdr->ar_name + 1, maxname - 1, "%-ld", stroff);
+ if (normal != last_filename)
+ {
strptr += thislen + 1;
if (trailing_slash)
- ++strptr;
- last_filename = filename;
+ ++strptr;
+ last_filename = filename;
}
}
}
@@ -1703,9 +1743,9 @@
bfd_boolean
_bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
- char **tabloc,
- bfd_size_type *tablen,
- const char **name)
+ char **tabloc,
+ bfd_size_type *tablen,
+ const char **name)
{
unsigned int maxname = ar_maxnamelen (abfd);
bfd *current;
@@ -1726,16 +1766,16 @@
return FALSE;
for (len = 0; normal[len]; len++)
- if (normal[len] == ' ')
- has_space = 1;
+ if (normal[len] == ' ')
+ has_space = 1;
if (len > maxname || has_space)
{
- struct ar_hdr *hdr = arch_hdr (current);
+ struct ar_hdr *hdr = arch_hdr (current);
- len = (len + 3) & ~3;
- arch_eltdata (current)->extra_size = len;
- _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%lu", len);
+ len = (len + 3) & ~3;
+ arch_eltdata (current)->extra_size = len;
+ _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%lu", len);
}
}
@@ -1770,27 +1810,29 @@
BFD_ASSERT (padded_len == arch_eltdata (abfd)->extra_size);
- _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld",
- arch_eltdata (abfd)->parsed_size + padded_len);
+ if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size),
+ arch_eltdata (abfd)->parsed_size + padded_len))
+ return FALSE;
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
- return FALSE;
+ return FALSE;
if (bfd_bwrite (fullname, len, archive) != len)
- return FALSE;
- if (len & 3)
- {
- static const char pad[3] = { 0, 0, 0 };
+ return FALSE;
- len = 4 - (len & 3);
- if (bfd_bwrite (pad, len, archive) != len)
- return FALSE;
- }
+ if (len & 3)
+ {
+ static const char pad[3] = { 0, 0, 0 };
+
+ len = 4 - (len & 3);
+ if (bfd_bwrite (pad, len, archive) != len)
+ return FALSE;
+ }
}
else
{
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
- return FALSE;
+ return FALSE;
}
return TRUE;
}
@@ -1861,7 +1903,7 @@
}
amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
- ared = (struct areltdata *) bfd_zalloc (abfd, amt);
+ ared = (struct areltdata *) bfd_zmalloc (amt);
if (ared == NULL)
return NULL;
hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
@@ -1870,7 +1912,7 @@
memset (hdr, ' ', sizeof (struct ar_hdr));
_bfd_ar_spacepad (hdr->ar_date, sizeof (hdr->ar_date), "%-12ld",
- status.st_mtime);
+ status.st_mtime);
#ifdef HPUX_LARGE_AR_IDS
/* HP has a very "special" way to handle UID/GID's with numeric values
> 99999. */
@@ -1879,7 +1921,7 @@
else
#endif
_bfd_ar_spacepad (hdr->ar_uid, sizeof (hdr->ar_uid), "%ld",
- status.st_uid);
+ status.st_uid);
#ifdef HPUX_LARGE_AR_IDS
/* HP has a very "special" way to handle UID/GID's with numeric values
> 99999. */
@@ -1888,11 +1930,14 @@
else
#endif
_bfd_ar_spacepad (hdr->ar_gid, sizeof (hdr->ar_gid), "%ld",
- status.st_gid);
+ status.st_gid);
_bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo",
- status.st_mode);
- _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld",
- status.st_size);
+ status.st_mode);
+ if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), status.st_size))
+ {
+ free (ared);
+ return NULL;
+ }
memcpy (hdr->ar_fmag, ARFMAG, 2);
ared->parsed_size = status.st_size;
ared->arch_header = (char *) hdr;
@@ -2132,8 +2177,9 @@
memset (&hdr, ' ', sizeof (struct ar_hdr));
memcpy (hdr.ar_name, ename, strlen (ename));
/* Round size up to even number in archive header. */
- _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
- (elength + 1) & ~(bfd_size_type) 1);
+ if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size),
+ (elength + 1) & ~(bfd_size_type) 1))
+ return FALSE;
memcpy (hdr.ar_fmag, ARFMAG, 2);
if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
@@ -2151,13 +2197,13 @@
current = current->archive_next)
{
char buffer[DEFAULT_BUFFERSIZE];
- unsigned int remaining = arelt_size (current);
+ bfd_size_type remaining = arelt_size (current);
/* Write ar header. */
if (!_bfd_write_ar_hdr (arch, current))
- return FALSE;
+ return FALSE;
if (bfd_is_thin_archive (arch))
- continue;
+ continue;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
goto input_err;
@@ -2282,16 +2328,16 @@
goto error_return;
/* Now map over all the symbols, picking out the ones we
- want. */
+ want. */
for (src_count = 0; src_count < symcount; src_count++)
{
flagword flags = (syms[src_count])->flags;
asection *sec = syms[src_count]->section;
- if ((flags & BSF_GLOBAL
- || flags & BSF_WEAK
- || flags & BSF_INDIRECT
- || flags & BSF_GNU_UNIQUE
+ if (((flags & (BSF_GLOBAL
+ | BSF_WEAK
+ | BSF_INDIRECT
+ | BSF_GNU_UNIQUE)) != 0
|| bfd_is_com_section (sec))
&& ! bfd_is_und_section (sec))
{
@@ -2316,7 +2362,7 @@
if (map[orl_count].name == NULL)
goto error_return;
*(map[orl_count].name) = (char *) bfd_alloc (arch,
- namelen + 1);
+ namelen + 1);
if (*(map[orl_count].name) == NULL)
goto error_return;
strcpy (*(map[orl_count].name), syms[src_count]->name);
@@ -2406,10 +2452,11 @@
bfd_ardata (arch)->armap_datepos = (SARMAG
+ offsetof (struct ar_hdr, ar_date[0]));
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
- bfd_ardata (arch)->armap_timestamp);
+ bfd_ardata (arch)->armap_timestamp);
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid);
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid);
- _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize);
+ if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
+ return FALSE;
memcpy (hdr.ar_fmag, ARFMAG, 2);
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
@@ -2420,22 +2467,33 @@
for (count = 0; count < orl_count; count++)
{
+ unsigned int offset;
bfd_byte buf[BSD_SYMDEF_SIZE];
if (map[count].u.abfd != last_elt)
{
do
{
- struct areltdata *ared = arch_eltdata (current);
+ struct areltdata *ared = arch_eltdata (current);
firstreal += (ared->parsed_size + ared->extra_size
- + sizeof (struct ar_hdr));
+ + sizeof (struct ar_hdr));
firstreal += firstreal % 2;
current = current->archive_next;
}
while (current != map[count].u.abfd);
}
+ /* The archive file format only has 4 bytes to store the offset
+ of the member. Check to make sure that firstreal has not grown
+ too big. */
+ offset = (unsigned int) firstreal;
+ if (firstreal != (file_ptr) offset)
+ {
+ bfd_set_error (bfd_error_file_truncated);
+ return FALSE;
+ }
+
last_elt = current;
H_PUT_32 (arch, map[count].namidx, buf);
H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
@@ -2503,7 +2561,7 @@
/* Prepare an ASCII version suitable for writing. */
memset (hdr.ar_date, ' ', sizeof (hdr.ar_date));
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
- bfd_ardata (arch)->armap_timestamp);
+ bfd_ardata (arch)->armap_timestamp);
/* Write it into the file. */
bfd_ardata (arch)->armap_datepos = (SARMAG
@@ -2547,7 +2605,7 @@
unsigned int ranlibsize = (symbol_count * 4) + 4;
unsigned int stringsize = stridx;
unsigned int mapsize = stringsize + ranlibsize;
- unsigned int archive_member_file_ptr;
+ file_ptr archive_member_file_ptr;
bfd *current = arch->archive_head;
unsigned int count;
struct ar_hdr hdr;
@@ -2564,11 +2622,11 @@
memset (&hdr, ' ', sizeof (struct ar_hdr));
hdr.ar_name[0] = '/';
- _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
- mapsize);
+ if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
+ return FALSE;
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
- ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
- ? time (NULL) : 0));
+ ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
+ ? time (NULL) : 0));
/* This, at least, is what Intel coff sets the values to. */
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);
@@ -2598,18 +2656,26 @@
while (count < symbol_count && map[count].u.abfd == current)
{
- if (!bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr))
+ unsigned int offset = (unsigned int) archive_member_file_ptr;
+
+ /* Catch an attempt to grow an archive past its 4Gb limit. */
+ if (archive_member_file_ptr != (file_ptr) offset)
+ {
+ bfd_set_error (bfd_error_file_truncated);
+ return FALSE;
+ }
+ if (!bfd_write_bigendian_4byte_int (arch, offset))
return FALSE;
count++;
}
archive_member_file_ptr += sizeof (struct ar_hdr);
if (! bfd_is_thin_archive (arch))
- {
- /* Add size of this archive entry. */
- archive_member_file_ptr += arelt_size (current);
- /* Remember about the even alignment. */
- archive_member_file_ptr += archive_member_file_ptr % 2;
- }
+ {
+ /* Add size of this archive entry. */
+ archive_member_file_ptr += arelt_size (current);
+ /* Remember about the even alignment. */
+ archive_member_file_ptr += archive_member_file_ptr % 2;
+ }
current = current->archive_next;
}
@@ -2632,3 +2698,58 @@
return TRUE;
}
+
+static int
+archive_close_worker (void **slot, void *inf ATTRIBUTE_UNUSED)
+{
+ struct ar_cache *ent = (struct ar_cache *) *slot;
+
+ bfd_close_all_done (ent->arbfd);
+ return 1;
+}
+
+bfd_boolean
+_bfd_archive_close_and_cleanup (bfd *abfd)
+{
+ if (bfd_read_p (abfd) && abfd->format == bfd_archive)
+ {
+ bfd *nbfd;
+ bfd *next;
+ htab_t htab;
+
+ /* Close nested archives (if this bfd is a thin archive). */
+ for (nbfd = abfd->nested_archives; nbfd; nbfd = next)
+ {
+ next = nbfd->archive_next;
+ bfd_close (nbfd);
+ }
+
+ htab = bfd_ardata (abfd)->cache;
+ if (htab)
+ {
+ htab_traverse_noresize (htab, archive_close_worker, NULL);
+ htab_delete (htab);
+ bfd_ardata (abfd)->cache = NULL;
+ }
+ }
+ if (arch_eltdata (abfd) != NULL)
+ {
+ struct areltdata *ared = arch_eltdata (abfd);
+ htab_t htab = (htab_t) ared->parent_cache;
+
+ if (htab)
+ {
+ struct ar_cache ent;
+ void **slot;
+
+ ent.ptr = ared->key;
+ slot = htab_find_slot (htab, &ent, NO_INSERT);
+ if (slot != NULL)
+ {
+ BFD_ASSERT (((struct ar_cache *) *slot)->arbfd == abfd);
+ htab_clear_slot (htab, slot);
+ }
+ }
+ }
+ return TRUE;
+}
diff --git a/bfd/archive64.c b/bfd/archive64.c
index bbc4c3f..be64e0d 100644
--- a/bfd/archive64.c
+++ b/bfd/archive64.c
@@ -1,6 +1,5 @@
-/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
- 2010 Free Software Foundation, Inc.
+/* Support for 64-bit ELF archives.
+ Copyright 1996-2013 Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
<[email protected]>
@@ -77,7 +76,7 @@
if (mapdata == NULL)
return FALSE;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, mapdata);
+ free (mapdata);
if (bfd_bread (int_buf, 8, abfd) != 8)
{
@@ -169,8 +168,8 @@
memset (&hdr, ' ', sizeof (struct ar_hdr));
memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/"));
- _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
- mapsize);
+ if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
+ return FALSE;
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
time (NULL));
/* This, at least, is what Intel coff sets the values to.: */
@@ -200,7 +199,7 @@
current = current->archive_next)
{
/* For each symbol which is used defined in this object, write out
- the object file's address in the archive */
+ the object file's address in the archive. */
for (;
count < symbol_count && map[count].u.abfd == current;
@@ -210,9 +209,11 @@
if (bfd_bwrite (buf, 8, arch) != 8)
return FALSE;
}
+
/* Add size of this archive entry */
- archive_member_file_ptr += (arelt_size (current)
- + sizeof (struct ar_hdr));
+ archive_member_file_ptr += sizeof (struct ar_hdr);
+ if (! bfd_is_thin_archive (arch))
+ archive_member_file_ptr += arelt_size (current);
/* remember about the even alignment */
archive_member_file_ptr += archive_member_file_ptr % 2;
}
diff --git a/bfd/archures.c b/bfd/archures.c
index 44850e7..97c540a 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,7 +1,5 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -145,7 +143,7 @@
.#define bfd_mach_sparc_64bit_p(mach) \
. ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
. bfd_arch_spu, {* PowerPC SPU *}
-.#define bfd_mach_spu 256
+.#define bfd_mach_spu 256
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
@@ -161,6 +159,7 @@
.#define bfd_mach_mips5000 5000
.#define bfd_mach_mips5400 5400
.#define bfd_mach_mips5500 5500
+.#define bfd_mach_mips5900 5900
.#define bfd_mach_mips6000 6000
.#define bfd_mach_mips7000 7000
.#define bfd_mach_mips8000 8000
@@ -176,6 +175,8 @@
.#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_octeonp 6601
+.#define bfd_mach_mips_octeon2 6502
.#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
.#define bfd_mach_mipsisa32 32
.#define bfd_mach_mipsisa32r2 33
@@ -197,6 +198,10 @@
. 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)
+.#define bfd_mach_i386_nacl (1 << 7)
+.#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
+.#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
+.#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
. bfd_arch_we32k, {* AT&T WE32xxx *}
. bfd_arch_tahoe, {* CCI/Harris Tahoe *}
. bfd_arch_i860, {* Intel 860 *}
@@ -239,7 +244,10 @@
.#define bfd_mach_ppc_e500 500
.#define bfd_mach_ppc_e500mc 5001
.#define bfd_mach_ppc_e500mc64 5005
+.#define bfd_mach_ppc_e5500 5006
+.#define bfd_mach_ppc_e6500 5007
.#define bfd_mach_ppc_titan 83
+.#define bfd_mach_ppc_vle 84
. bfd_arch_rs6000, {* IBM RS/6000 *}
.#define bfd_mach_rs6k 6000
.#define bfd_mach_rs6k_rs1 6001
@@ -261,6 +269,8 @@
.#define bfd_mach_m6812_default 0
.#define bfd_mach_m6812 1
.#define bfd_mach_m6812s 2
+. bfd_arch_m9s12x, {* Freescale S12X *}
+. bfd_arch_m9s12xg, {* Freescale XGATE *}
. bfd_arch_z8k, {* Zilog Z8000 *}
.#define bfd_mach_z8001 1
.#define bfd_mach_z8002 2
@@ -316,11 +326,13 @@
. bfd_arch_tic6x, {* Texas Instruments TMS320C6X *}
. bfd_arch_tic80, {* TI TMS320c80 (MVP) *}
. bfd_arch_v850, {* NEC V850 *}
+. bfd_arch_v850_rh850,{* NEC V850 (using RH850 ABI) *}
.#define bfd_mach_v850 1
.#define bfd_mach_v850e 'E'
.#define bfd_mach_v850e1 '1'
.#define bfd_mach_v850e2 0x4532
.#define bfd_mach_v850e2v3 0x45325633
+.#define bfd_mach_v850e3v5 0x45335635 {* ('E'|'3'|'V'|'5') *}
. bfd_arch_arc, {* ARC Cores *}
.#define bfd_mach_arc_5 5
.#define bfd_mach_arc_6 6
@@ -356,6 +368,8 @@
.#define bfd_mach_mep 1
.#define bfd_mach_mep_h1 0x6831
.#define bfd_mach_mep_c5 0x6335
+. bfd_arch_metag,
+.#define bfd_mach_metag 1
. bfd_arch_ia64, {* HP/Intel ia64 *}
.#define bfd_mach_ia64_elf64 64
.#define bfd_mach_ia64_elf32 32
@@ -365,6 +379,9 @@
. bfd_arch_iq2000, {* Vitesse IQ2000. *}
.#define bfd_mach_iq2000 1
.#define bfd_mach_iq10 2
+. bfd_arch_epiphany, {* Adapteva EPIPHANY *}
+.#define bfd_mach_epiphany16 1
+.#define bfd_mach_epiphany32 2
. bfd_arch_mt,
.#define bfd_mach_ms1 1
.#define bfd_mach_mrisc2 2
@@ -400,12 +417,14 @@
.#define bfd_mach_cris_v0_v10 255
.#define bfd_mach_cris_v32 32
.#define bfd_mach_cris_v10_v32 1032
+. bfd_arch_rl78,
+.#define bfd_mach_rl78 0x75
. bfd_arch_rx, {* Renesas RX. *}
.#define bfd_mach_rx 0x75
. bfd_arch_s390, {* IBM s390 *}
.#define bfd_mach_s390_31 31
.#define bfd_mach_s390_64 64
-. bfd_arch_score, {* Sunplus score *}
+. bfd_arch_score, {* Sunplus score *}
.#define bfd_mach_score3 3
.#define bfd_mach_score7 7
. bfd_arch_openrisc, {* OpenRISC *}
@@ -420,7 +439,12 @@
.#define bfd_mach_msp14 14
.#define bfd_mach_msp15 15
.#define bfd_mach_msp16 16
+.#define bfd_mach_msp20 20
.#define bfd_mach_msp21 21
+.#define bfd_mach_msp22 22
+.#define bfd_mach_msp23 23
+.#define bfd_mach_msp24 24
+.#define bfd_mach_msp26 26
.#define bfd_mach_msp31 31
.#define bfd_mach_msp32 32
.#define bfd_mach_msp33 33
@@ -428,10 +452,16 @@
.#define bfd_mach_msp42 42
.#define bfd_mach_msp43 43
.#define bfd_mach_msp44 44
+.#define bfd_mach_msp430x 45
+.#define bfd_mach_msp46 46
+.#define bfd_mach_msp47 47
+.#define bfd_mach_msp54 54
. bfd_arch_xc16x, {* Infineon's XC16X Series. *}
.#define bfd_mach_xc16x 1
.#define bfd_mach_xc16xl 2
-.#define bfd_mach_xc16xs 3
+.#define bfd_mach_xc16xs 3
+. bfd_arch_xgate, {* Freescale XGATE *}
+.#define bfd_mach_xgate 1
. bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
.#define bfd_mach_xtensa 1
. bfd_arch_z80,
@@ -446,6 +476,12 @@
. bfd_arch_tilegx, {* Tilera TILE-Gx *}
.#define bfd_mach_tilepro 1
.#define bfd_mach_tilegx 1
+.#define bfd_mach_tilegx32 2
+. bfd_arch_aarch64, {* AArch64 *}
+.#define bfd_mach_aarch64 0
+.#define bfd_mach_aarch64_ilp32 32
+. bfd_arch_nios2,
+.#define bfd_mach_nios2 0
. bfd_arch_last
. };
*/
@@ -478,12 +514,19 @@
.
. bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
.
+. {* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
+. IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
+. TRUE, the buffer contains code. *}
+. void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
+. bfd_boolean code);
+.
. const struct bfd_arch_info *next;
.}
.bfd_arch_info_type;
.
*/
+extern const bfd_arch_info_type bfd_aarch64_arch;
extern const bfd_arch_info_type bfd_alpha_arch;
extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
@@ -496,6 +539,7 @@
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_dlx_arch;
+extern const bfd_arch_info_type bfd_epiphany_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_frv_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
@@ -515,10 +559,13 @@
extern const bfd_arch_info_type bfd_m32r_arch;
extern const bfd_arch_info_type bfd_m68hc11_arch;
extern const bfd_arch_info_type bfd_m68hc12_arch;
+extern const bfd_arch_info_type bfd_m9s12x_arch;
+extern const bfd_arch_info_type bfd_m9s12xg_arch;
extern const bfd_arch_info_type bfd_m68k_arch;
extern const bfd_arch_info_type bfd_m88k_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_mep_arch;
+extern const bfd_arch_info_type bfd_metag_arch;
extern const bfd_arch_info_type bfd_mips_arch;
extern const bfd_arch_info_type bfd_microblaze_arch;
extern const bfd_arch_info_type bfd_mmix_arch;
@@ -527,6 +574,7 @@
extern const bfd_arch_info_type bfd_moxie_arch;
extern const bfd_arch_info_type bfd_msp430_arch;
extern const bfd_arch_info_type bfd_mt_arch;
+extern const bfd_arch_info_type bfd_nios2_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_or32_arch;
@@ -536,6 +584,7 @@
extern const bfd_arch_info_type bfd_powerpc_archs[];
#define bfd_powerpc_arch bfd_powerpc_archs[0]
extern const bfd_arch_info_type bfd_rs6000_arch;
+extern const bfd_arch_info_type bfd_rl78_arch;
extern const bfd_arch_info_type bfd_rx_arch;
extern const bfd_arch_info_type bfd_s390_arch;
extern const bfd_arch_info_type bfd_score_arch;
@@ -550,12 +599,14 @@
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_v850_rh850_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
extern const bfd_arch_info_type bfd_xtensa_arch;
extern const bfd_arch_info_type bfd_xc16x_arch;
+extern const bfd_arch_info_type bfd_xgate_arch;
extern const bfd_arch_info_type bfd_z80_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
@@ -564,6 +615,7 @@
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
+ &bfd_aarch64_arch,
&bfd_alpha_arch,
&bfd_arc_arch,
&bfd_arm_arch,
@@ -576,6 +628,7 @@
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_dlx_arch,
+ &bfd_epiphany_arch,
&bfd_fr30_arch,
&bfd_frv_arch,
&bfd_h8300_arch,
@@ -595,10 +648,13 @@
&bfd_m32r_arch,
&bfd_m68hc11_arch,
&bfd_m68hc12_arch,
+ &bfd_m9s12x_arch,
+ &bfd_m9s12xg_arch,
&bfd_m68k_arch,
&bfd_m88k_arch,
&bfd_mcore_arch,
&bfd_mep_arch,
+ &bfd_metag_arch,
&bfd_microblaze_arch,
&bfd_mips_arch,
&bfd_mmix_arch,
@@ -607,12 +663,14 @@
&bfd_moxie_arch,
&bfd_msp430_arch,
&bfd_mt_arch,
+ &bfd_nios2_arch,
&bfd_ns32k_arch,
&bfd_openrisc_arch,
&bfd_or32_arch,
&bfd_pdp11_arch,
&bfd_powerpc_arch,
&bfd_rs6000_arch,
+ &bfd_rl78_arch,
&bfd_rx_arch,
&bfd_s390_arch,
&bfd_score_arch,
@@ -627,12 +685,14 @@
&bfd_tilegx_arch,
&bfd_tilepro_arch,
&bfd_v850_arch,
+ &bfd_v850_rh850_arch,
&bfd_vax_arch,
&bfd_w65_arch,
&bfd_we32k_arch,
&bfd_xstormy16_arch,
&bfd_xtensa_arch,
&bfd_xc16x_arch,
+ &bfd_xgate_arch,
&bfd_z80_arch,
&bfd_z8k_arch,
#endif
@@ -803,6 +863,7 @@
32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -1298,3 +1359,29 @@
return ap->bits_per_byte / 8;
return 1;
}
+
+/*
+INTERNAL_FUNCTION
+ bfd_arch_default_fill
+
+SYNOPSIS
+ void *bfd_arch_default_fill (bfd_size_type count,
+ bfd_boolean is_bigendian,
+ bfd_boolean code);
+
+DESCRIPTION
+ Allocate via bfd_malloc and return a fill buffer of size COUNT.
+ If IS_BIGENDIAN is TRUE, the order of bytes is big endian. If
+ CODE is TRUE, the buffer contains code.
+*/
+
+void *
+bfd_arch_default_fill (bfd_size_type count,
+ bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
+ bfd_boolean code ATTRIBUTE_UNUSED)
+{
+ void *fill = bfd_malloc (count);
+ if (fill != NULL)
+ memset (fill, 0, count);
+ return fill;
+}
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index a477b49..c7c5a7d 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1,8 +1,6 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -25,12 +23,19 @@
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
+/* PR 14072: Ensure that config.h is included first. */
+#if !defined PACKAGE && !defined PACKAGE_VERSION
+#error config.h must be included before this header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include "ansidecl.h"
#include "symcat.h"
+#include <sys/stat.h>
+
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
#ifndef SABER
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
@@ -55,7 +60,7 @@
problem for example when trying to use STRING_COMMA_LEN to build
the arguments to the strncmp() macro. Hence this alternative
definition of strncmp is provided here.
-
+
Note - these macros do NOT work if STR2 is not a constant string. */
#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
/* strcpy() can have a similar problem, but since we know we are
@@ -271,38 +276,33 @@
typedef struct bfd_section *sec_ptr;
-#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
-#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
-#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
-#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
+#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
+#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
+#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
+#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
+ (ptr)->alignment_power)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
#define bfd_section_size(bfd, ptr) ((ptr)->size)
#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
-#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
+#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
+#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((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) \
+#define discarded_section(sec) \
(!bfd_is_abs_section (sec) \
&& bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
-
-/* Forward define. */
-struct stat;
+ && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
typedef enum bfd_print_symbol
{
@@ -514,8 +514,6 @@
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
@@ -643,6 +641,8 @@
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
+extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
+ const char *, bfd_vma);
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 **);
@@ -693,19 +693,15 @@
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
-
-/* Return the arch_size field of an elf bfd, or -1 if not elf. */
-extern int bfd_get_arch_size
- (bfd *);
-
-/* Return TRUE if address "naturally" sign extends, or -1 if not elf. */
-extern int bfd_get_sign_extend_vma
- (bfd *);
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
+ bfd_size_type len));
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
+extern struct bfd_section *
+_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
+
extern void _bfd_fix_excluded_sec_syms
(bfd *, struct bfd_link_info *);
@@ -908,7 +904,8 @@
(struct bfd_link_info *, struct bfd_section *);
extern bfd_boolean elf32_arm_size_stubs
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void));
+ struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+ void (*) (void));
extern bfd_boolean elf32_arm_build_stubs
(struct bfd_link_info *);
@@ -927,6 +924,50 @@
extern unsigned int _bfd_elf_ppc_at_tprel_transform
(unsigned int, unsigned int);
+extern void bfd_elf64_aarch64_init_maps
+ (bfd *);
+
+extern void bfd_elf32_aarch64_init_maps
+ (bfd *);
+
+extern void bfd_elf64_aarch64_set_options
+ (bfd *, struct bfd_link_info *, int, int, int);
+
+extern void bfd_elf32_aarch64_set_options
+ (bfd *, struct bfd_link_info *, int, int, int);
+
+/* ELF AArch64 mapping symbol support. */
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
+extern bfd_boolean bfd_is_aarch64_special_symbol_name
+ (const char * name, int type);
+
+/* AArch64 stub generation support for ELF64. Called from the linker. */
+extern int elf64_aarch64_setup_section_lists
+ (bfd *, struct bfd_link_info *);
+extern void elf64_aarch64_next_input_section
+ (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf64_aarch64_size_stubs
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ struct bfd_section * (*) (const char *, struct bfd_section *),
+ void (*) (void));
+extern bfd_boolean elf64_aarch64_build_stubs
+ (struct bfd_link_info *);
+/* AArch64 stub generation support for ELF32. Called from the linker. */
+extern int elf32_aarch64_setup_section_lists
+ (bfd *, struct bfd_link_info *);
+extern void elf32_aarch64_next_input_section
+ (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf32_aarch64_size_stubs
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ struct bfd_section * (*) (const char *, struct bfd_section *),
+ void (*) (void));
+extern bfd_boolean elf32_aarch64_build_stubs
+ (struct bfd_link_info *);
+
+
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
(struct bfd_section *, int);
@@ -962,6 +1003,5 @@
long symbol;
};
-extern struct coff_comdat_info *bfd_coff_get_comdat_section
+extern struct coff_comdat_info * bfd_coff_get_comdat_section
(bfd *, struct bfd_section *);
-
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 523ad9c..99c5bf8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7,9 +7,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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -32,12 +30,19 @@
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
+/* PR 14072: Ensure that config.h is included first. */
+#if !defined PACKAGE && !defined PACKAGE_VERSION
+#error config.h must be included before this header
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include "ansidecl.h"
#include "symcat.h"
+#include <sys/stat.h>
+
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
#ifndef SABER
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
@@ -62,7 +67,7 @@
problem for example when trying to use STRING_COMMA_LEN to build
the arguments to the strncmp() macro. Hence this alternative
definition of strncmp is provided here.
-
+
Note - these macros do NOT work if STR2 is not a constant string. */
#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
/* strcpy() can have a similar problem, but since we know we are
@@ -278,38 +283,33 @@
typedef struct bfd_section *sec_ptr;
-#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
-#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
-#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
-#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
+#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
+#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
+#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
+#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
+ (ptr)->alignment_power)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
#define bfd_section_size(bfd, ptr) ((ptr)->size)
#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
-#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
+#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
+#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((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) \
+#define discarded_section(sec) \
(!bfd_is_abs_section (sec) \
&& bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
-
-/* Forward define. */
-struct stat;
+ && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
typedef enum bfd_print_symbol
{
@@ -521,8 +521,6 @@
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
@@ -650,6 +648,8 @@
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
+extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
+ const char *, bfd_vma);
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 **);
@@ -700,19 +700,15 @@
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
-
-/* Return the arch_size field of an elf bfd, or -1 if not elf. */
-extern int bfd_get_arch_size
- (bfd *);
-
-/* Return TRUE if address "naturally" sign extends, or -1 if not elf. */
-extern int bfd_get_sign_extend_vma
- (bfd *);
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
+ bfd_size_type len));
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
+extern struct bfd_section *
+_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
+
extern void _bfd_fix_excluded_sec_syms
(bfd *, struct bfd_link_info *);
@@ -915,7 +911,8 @@
(struct bfd_link_info *, struct bfd_section *);
extern bfd_boolean elf32_arm_size_stubs
(bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void));
+ struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+ void (*) (void));
extern bfd_boolean elf32_arm_build_stubs
(struct bfd_link_info *);
@@ -934,6 +931,50 @@
extern unsigned int _bfd_elf_ppc_at_tprel_transform
(unsigned int, unsigned int);
+extern void bfd_elf64_aarch64_init_maps
+ (bfd *);
+
+extern void bfd_elf32_aarch64_init_maps
+ (bfd *);
+
+extern void bfd_elf64_aarch64_set_options
+ (bfd *, struct bfd_link_info *, int, int, int);
+
+extern void bfd_elf32_aarch64_set_options
+ (bfd *, struct bfd_link_info *, int, int, int);
+
+/* ELF AArch64 mapping symbol support. */
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
+extern bfd_boolean bfd_is_aarch64_special_symbol_name
+ (const char * name, int type);
+
+/* AArch64 stub generation support for ELF64. Called from the linker. */
+extern int elf64_aarch64_setup_section_lists
+ (bfd *, struct bfd_link_info *);
+extern void elf64_aarch64_next_input_section
+ (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf64_aarch64_size_stubs
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ struct bfd_section * (*) (const char *, struct bfd_section *),
+ void (*) (void));
+extern bfd_boolean elf64_aarch64_build_stubs
+ (struct bfd_link_info *);
+/* AArch64 stub generation support for ELF32. Called from the linker. */
+extern int elf32_aarch64_setup_section_lists
+ (bfd *, struct bfd_link_info *);
+extern void elf32_aarch64_next_input_section
+ (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf32_aarch64_size_stubs
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ struct bfd_section * (*) (const char *, struct bfd_section *),
+ void (*) (void));
+extern bfd_boolean elf32_aarch64_build_stubs
+ (struct bfd_link_info *);
+
+
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
(struct bfd_section *, int);
@@ -969,9 +1010,8 @@
long symbol;
};
-extern struct coff_comdat_info *bfd_coff_get_comdat_section
+extern struct coff_comdat_info * bfd_coff_get_comdat_section
(bfd *, struct bfd_section *);
-
/* Extracted from init.c. */
void bfd_init (void);
@@ -984,7 +1024,7 @@
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-bfd *bfd_openstreamr (const char *, const char *, void *);
+bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
bfd *bfd_openr_iovec (const char *filename, const char *target,
void *(*open_func) (struct bfd *nbfd,
@@ -1020,8 +1060,14 @@
unsigned long bfd_calc_gnu_debuglink_crc32
(unsigned long crc, const unsigned char *buf, bfd_size_type len);
+char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
+
+char *bfd_get_alt_debug_link_info (bfd *abfd, unsigned long *crc32_out);
+
char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
+char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
+
struct bfd_section *bfd_create_gnu_debuglink_section
(bfd *abfd, const char *filename);
@@ -1384,11 +1430,11 @@
/* Type of sec_info information. */
unsigned int sec_info_type:3;
-#define ELF_INFO_TYPE_NONE 0
-#define ELF_INFO_TYPE_STABS 1
-#define ELF_INFO_TYPE_MERGE 2
-#define ELF_INFO_TYPE_EH_FRAME 3
-#define ELF_INFO_TYPE_JUST_SYMS 4
+#define SEC_INFO_TYPE_NONE 0
+#define SEC_INFO_TYPE_STABS 1
+#define SEC_INFO_TYPE_MERGE 2
+#define SEC_INFO_TYPE_EH_FRAME 3
+#define SEC_INFO_TYPE_JUST_SYMS 4
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
@@ -1518,9 +1564,6 @@
/* 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;
@@ -1536,40 +1579,63 @@
} asection;
/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
+ be removed by relaxation -- replacing a long address with a
short address. */
struct relax_table {
/* Address where bytes may be deleted. */
bfd_vma addr;
-
+
/* Number of bytes to be deleted. */
int size;
};
+/* Note: the following are provided as inline functions rather than macros
+ because not all callers use the return value. A macro implementation
+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+ compilers will complain about comma expressions that have no effect. */
+static inline bfd_boolean
+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+{
+ ptr->userdata = val;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+{
+ ptr->vma = ptr->lma = val;
+ ptr->user_set_vma = TRUE;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+{
+ ptr->alignment_power = val;
+ return TRUE;
+}
+
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
- than referring directly to the const sections. The const sections
- may eventually vanish. */
+ these sections. */
+extern asection _bfd_std_section[4];
+
#define BFD_ABS_SECTION_NAME "*ABS*"
#define BFD_UND_SECTION_NAME "*UND*"
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
-/* The absolute section. */
-extern asection bfd_abs_section;
-#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-/* Pointer to the undefined section. */
-extern asection bfd_und_section;
-#define bfd_und_section_ptr ((asection *) &bfd_und_section)
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
/* Pointer to the common section. */
-extern asection bfd_com_section;
-#define bfd_com_section_ptr ((asection *) &bfd_com_section)
+#define bfd_com_section_ptr (&_bfd_std_section[0])
+/* Pointer to the undefined section. */
+#define bfd_und_section_ptr (&_bfd_std_section[1])
+/* Pointer to the absolute section. */
+#define bfd_abs_section_ptr (&_bfd_std_section[2])
/* Pointer to the indirect section. */
-extern asection bfd_ind_section;
-#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
+#define bfd_ind_section_ptr (&_bfd_std_section[3])
+
+#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
+#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
#define bfd_is_const_section(SEC) \
@@ -1684,8 +1750,8 @@
/* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
0, 0, 0, 0, 0, 0, 0, \
\
- /* output_offset, output_section, alignment_power, */ \
- 0, (struct bfd_section *) &SEC, 0, \
+ /* output_offset, output_section, alignment_power, */ \
+ 0, &SEC, 0, \
\
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
NULL, NULL, 0, 0, 0, \
@@ -1699,9 +1765,6 @@
/* 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 +1776,10 @@
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
+asection *bfd_get_next_section_by_name (asection *sec);
+
+asection *bfd_get_linker_section (bfd *abfd, const char *name);
+
asection *bfd_get_section_by_name_if
(bfd *abfd,
const char *name,
@@ -1852,7 +1919,7 @@
#define bfd_mach_sparc_64bit_p(mach) \
((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
bfd_arch_spu, /* PowerPC SPU */
-#define bfd_mach_spu 256
+#define bfd_mach_spu 256
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -1868,6 +1935,7 @@
#define bfd_mach_mips5000 5000
#define bfd_mach_mips5400 5400
#define bfd_mach_mips5500 5500
+#define bfd_mach_mips5900 5900
#define bfd_mach_mips6000 6000
#define bfd_mach_mips7000 7000
#define bfd_mach_mips8000 8000
@@ -1883,6 +1951,8 @@
#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_octeonp 6601
+#define bfd_mach_mips_octeon2 6502
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
@@ -1904,6 +1974,10 @@
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)
+#define bfd_mach_i386_nacl (1 << 7)
+#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
+#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
+#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
bfd_arch_we32k, /* AT&T WE32xxx */
bfd_arch_tahoe, /* CCI/Harris Tahoe */
bfd_arch_i860, /* Intel 860 */
@@ -1946,7 +2020,10 @@
#define bfd_mach_ppc_e500 500
#define bfd_mach_ppc_e500mc 5001
#define bfd_mach_ppc_e500mc64 5005
+#define bfd_mach_ppc_e5500 5006
+#define bfd_mach_ppc_e6500 5007
#define bfd_mach_ppc_titan 83
+#define bfd_mach_ppc_vle 84
bfd_arch_rs6000, /* IBM RS/6000 */
#define bfd_mach_rs6k 6000
#define bfd_mach_rs6k_rs1 6001
@@ -1968,6 +2045,8 @@
#define bfd_mach_m6812_default 0
#define bfd_mach_m6812 1
#define bfd_mach_m6812s 2
+ bfd_arch_m9s12x, /* Freescale S12X */
+ bfd_arch_m9s12xg, /* Freescale XGATE */
bfd_arch_z8k, /* Zilog Z8000 */
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
@@ -2023,11 +2102,13 @@
bfd_arch_tic6x, /* Texas Instruments TMS320C6X */
bfd_arch_tic80, /* TI TMS320c80 (MVP) */
bfd_arch_v850, /* NEC V850 */
+ bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI) */
#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
#define bfd_mach_v850e1 '1'
#define bfd_mach_v850e2 0x4532
#define bfd_mach_v850e2v3 0x45325633
+#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5') */
bfd_arch_arc, /* ARC Cores */
#define bfd_mach_arc_5 5
#define bfd_mach_arc_6 6
@@ -2063,6 +2144,8 @@
#define bfd_mach_mep 1
#define bfd_mach_mep_h1 0x6831
#define bfd_mach_mep_c5 0x6335
+ bfd_arch_metag,
+#define bfd_mach_metag 1
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 64
#define bfd_mach_ia64_elf32 32
@@ -2072,6 +2155,9 @@
bfd_arch_iq2000, /* Vitesse IQ2000. */
#define bfd_mach_iq2000 1
#define bfd_mach_iq10 2
+ bfd_arch_epiphany, /* Adapteva EPIPHANY */
+#define bfd_mach_epiphany16 1
+#define bfd_mach_epiphany32 2
bfd_arch_mt,
#define bfd_mach_ms1 1
#define bfd_mach_mrisc2 2
@@ -2107,12 +2193,14 @@
#define bfd_mach_cris_v0_v10 255
#define bfd_mach_cris_v32 32
#define bfd_mach_cris_v10_v32 1032
+ bfd_arch_rl78,
+#define bfd_mach_rl78 0x75
bfd_arch_rx, /* Renesas RX. */
#define bfd_mach_rx 0x75
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score */
+ bfd_arch_score, /* Sunplus score */
#define bfd_mach_score3 3
#define bfd_mach_score7 7
bfd_arch_openrisc, /* OpenRISC */
@@ -2127,7 +2215,12 @@
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
#define bfd_mach_msp16 16
+#define bfd_mach_msp20 20
#define bfd_mach_msp21 21
+#define bfd_mach_msp22 22
+#define bfd_mach_msp23 23
+#define bfd_mach_msp24 24
+#define bfd_mach_msp26 26
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
@@ -2135,10 +2228,16 @@
#define bfd_mach_msp42 42
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
+#define bfd_mach_msp430x 45
+#define bfd_mach_msp46 46
+#define bfd_mach_msp47 47
+#define bfd_mach_msp54 54
bfd_arch_xc16x, /* Infineon's XC16X Series. */
#define bfd_mach_xc16x 1
#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
+#define bfd_mach_xc16xs 3
+ bfd_arch_xgate, /* Freescale XGATE */
+#define bfd_mach_xgate 1
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_z80,
@@ -2153,6 +2252,12 @@
bfd_arch_tilegx, /* Tilera TILE-Gx */
#define bfd_mach_tilepro 1
#define bfd_mach_tilegx 1
+#define bfd_mach_tilegx32 2
+ bfd_arch_aarch64, /* AArch64 */
+#define bfd_mach_aarch64 0
+#define bfd_mach_aarch64_ilp32 32
+ bfd_arch_nios2,
+#define bfd_mach_nios2 0
bfd_arch_last
};
@@ -2175,6 +2280,12 @@
bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
+ /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
+ IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
+ TRUE, the buffer contains code. */
+ void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
+ bfd_boolean code);
+
const struct bfd_arch_info *next;
}
bfd_arch_info_type;
@@ -2472,6 +2583,10 @@
BFD_RELOC_HI16_S_PLTOFF,
BFD_RELOC_8_PLTOFF,
+/* Size relocations. */
+ BFD_RELOC_SIZE32,
+ BFD_RELOC_SIZE64,
+
/* Relocations used by 68K ELF. */
BFD_RELOC_68K_GLOB_DAT,
BFD_RELOC_68K_JMP_SLOT,
@@ -2585,6 +2700,10 @@
BFD_RELOC_SPARC_M44,
BFD_RELOC_SPARC_L44,
BFD_RELOC_SPARC_REGISTER,
+ BFD_RELOC_SPARC_H34,
+ BFD_RELOC_SPARC_SIZE32,
+ BFD_RELOC_SPARC_SIZE64,
+ BFD_RELOC_SPARC_WDISP10,
/* SPARC little endian relocation */
BFD_RELOC_SPARC_REV32,
@@ -2780,6 +2899,15 @@
/* MIPS16 low 16 bits. */
BFD_RELOC_MIPS16_LO16,
+/* MIPS16 TLS relocations */
+ BFD_RELOC_MIPS16_TLS_GD,
+ BFD_RELOC_MIPS16_TLS_LDM,
+ BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
+ BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
+ BFD_RELOC_MIPS16_TLS_GOTTPREL,
+ BFD_RELOC_MIPS16_TLS_TPREL_HI16,
+ BFD_RELOC_MIPS16_TLS_TPREL_LO16,
+
/* Relocation against a MIPS literal section. */
BFD_RELOC_MIPS_LITERAL,
BFD_RELOC_MICROMIPS_LITERAL,
@@ -2851,6 +2979,7 @@
BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
BFD_RELOC_MIPS_TLS_TPREL_LO16,
BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
+ BFD_RELOC_MIPS_EH,
/* MIPS ELF relocations (VxWorks and PLT extensions). */
@@ -2941,6 +3070,25 @@
relaxation. */
BFD_RELOC_MN10300_ALIGN,
+/* Various TLS-related relocations. */
+ BFD_RELOC_MN10300_TLS_GD,
+ BFD_RELOC_MN10300_TLS_LD,
+ BFD_RELOC_MN10300_TLS_LDO,
+ BFD_RELOC_MN10300_TLS_GOTIE,
+ BFD_RELOC_MN10300_TLS_IE,
+ BFD_RELOC_MN10300_TLS_LE,
+ BFD_RELOC_MN10300_TLS_DTPMOD,
+ BFD_RELOC_MN10300_TLS_DTPOFF,
+ BFD_RELOC_MN10300_TLS_TPOFF,
+
+/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+ BFD_RELOC_MN10300_32_PCREL,
+
+/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+ BFD_RELOC_MN10300_16_PCREL,
+
/* i386/elf relocations */
BFD_RELOC_386_GOT32,
@@ -2996,6 +3144,8 @@
BFD_RELOC_X86_64_TLSDESC_CALL,
BFD_RELOC_X86_64_TLSDESC,
BFD_RELOC_X86_64_IRELATIVE,
+ BFD_RELOC_X86_64_PC32_BND,
+ BFD_RELOC_X86_64_PLT32_BND,
/* ns32k relocations */
BFD_RELOC_NS32K_IMM_8,
@@ -3054,6 +3204,23 @@
BFD_RELOC_PPC_EMB_RELST_HA,
BFD_RELOC_PPC_EMB_BIT_FLD,
BFD_RELOC_PPC_EMB_RELSDA,
+ BFD_RELOC_PPC_VLE_REL8,
+ BFD_RELOC_PPC_VLE_REL15,
+ BFD_RELOC_PPC_VLE_REL24,
+ BFD_RELOC_PPC_VLE_LO16A,
+ BFD_RELOC_PPC_VLE_LO16D,
+ BFD_RELOC_PPC_VLE_HI16A,
+ BFD_RELOC_PPC_VLE_HI16D,
+ BFD_RELOC_PPC_VLE_HA16A,
+ BFD_RELOC_PPC_VLE_HA16D,
+ BFD_RELOC_PPC_VLE_SDA21,
+ BFD_RELOC_PPC_VLE_SDA21_LO,
+ BFD_RELOC_PPC_VLE_SDAREL_LO16A,
+ BFD_RELOC_PPC_VLE_SDAREL_LO16D,
+ BFD_RELOC_PPC_VLE_SDAREL_HI16A,
+ BFD_RELOC_PPC_VLE_SDAREL_HI16D,
+ BFD_RELOC_PPC_VLE_SDAREL_HA16A,
+ BFD_RELOC_PPC_VLE_SDAREL_HA16D,
BFD_RELOC_PPC64_HIGHER,
BFD_RELOC_PPC64_HIGHER_S,
BFD_RELOC_PPC64_HIGHEST,
@@ -3077,6 +3244,8 @@
BFD_RELOC_PPC64_TOC16_LO_DS,
BFD_RELOC_PPC64_PLTGOT16_DS,
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
+ BFD_RELOC_PPC64_ADDR16_HIGH,
+ BFD_RELOC_PPC64_ADDR16_HIGHA,
/* PowerPC and PowerPC64 thread-local storage relocations. */
BFD_RELOC_PPC_TLS,
@@ -3121,6 +3290,10 @@
BFD_RELOC_PPC64_DTPREL16_HIGHERA,
BFD_RELOC_PPC64_DTPREL16_HIGHEST,
BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
+ BFD_RELOC_PPC64_TPREL16_HIGH,
+ BFD_RELOC_PPC64_TPREL16_HIGHA,
+ BFD_RELOC_PPC64_DTPREL16_HIGH,
+ BFD_RELOC_PPC64_DTPREL16_HIGHA,
/* IBM 370/390 relocations */
BFD_RELOC_I370_D12,
@@ -3776,14 +3949,6 @@
/* start data in text. */
BFD_RELOC_V850_DATA,
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
/* This is a 8bit DP reloc for the tms320c30, where the most
significant 8 bits of a 24 bit word are placed into the least
significant 8 bits of the opcode. */
@@ -3906,6 +4071,46 @@
BFD_RELOC_MEP_GNU_VTENTRY,
+/* Imagination Technologies Meta relocations. */
+ BFD_RELOC_METAG_HIADDR16,
+ BFD_RELOC_METAG_LOADDR16,
+ BFD_RELOC_METAG_RELBRANCH,
+ BFD_RELOC_METAG_GETSETOFF,
+ BFD_RELOC_METAG_HIOG,
+ BFD_RELOC_METAG_LOOG,
+ BFD_RELOC_METAG_REL8,
+ BFD_RELOC_METAG_REL16,
+ BFD_RELOC_METAG_HI16_GOTOFF,
+ BFD_RELOC_METAG_LO16_GOTOFF,
+ BFD_RELOC_METAG_GETSET_GOTOFF,
+ BFD_RELOC_METAG_GETSET_GOT,
+ BFD_RELOC_METAG_HI16_GOTPC,
+ BFD_RELOC_METAG_LO16_GOTPC,
+ BFD_RELOC_METAG_HI16_PLT,
+ BFD_RELOC_METAG_LO16_PLT,
+ BFD_RELOC_METAG_RELBRANCH_PLT,
+ BFD_RELOC_METAG_GOTOFF,
+ BFD_RELOC_METAG_PLT,
+ BFD_RELOC_METAG_COPY,
+ BFD_RELOC_METAG_JMP_SLOT,
+ BFD_RELOC_METAG_RELATIVE,
+ BFD_RELOC_METAG_GLOB_DAT,
+ BFD_RELOC_METAG_TLS_GD,
+ BFD_RELOC_METAG_TLS_LDM,
+ BFD_RELOC_METAG_TLS_LDO_HI16,
+ BFD_RELOC_METAG_TLS_LDO_LO16,
+ BFD_RELOC_METAG_TLS_LDO,
+ BFD_RELOC_METAG_TLS_IE,
+ BFD_RELOC_METAG_TLS_IENONPIC,
+ BFD_RELOC_METAG_TLS_IENONPIC_HI16,
+ BFD_RELOC_METAG_TLS_IENONPIC_LO16,
+ BFD_RELOC_METAG_TLS_TPOFF,
+ BFD_RELOC_METAG_TLS_DTPMOD,
+ BFD_RELOC_METAG_TLS_DTPOFF,
+ BFD_RELOC_METAG_TLS_LE,
+ BFD_RELOC_METAG_TLS_LE_HI16,
+ BFD_RELOC_METAG_TLS_LE_LO16,
+
/* These are relocations for the GETA instruction. */
BFD_RELOC_MMIX_GETA,
BFD_RELOC_MMIX_GETA_1,
@@ -4005,7 +4210,7 @@
command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_LO8_LDI_PM,
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
+/* This is a 16 bit reloc for the AVR that stores 8 bit value
(command address) into 8 bit immediate value of LDI insn. If the address
is beyond the 128k boundary, the linker inserts a jump stub for this reloc
in the lower 128k. */
@@ -4055,6 +4260,53 @@
instructions */
BFD_RELOC_AVR_6_ADIW,
+/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
+in .byte lo8(symbol) */
+ BFD_RELOC_AVR_8_LO,
+
+/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
+in .byte hi8(symbol) */
+ BFD_RELOC_AVR_8_HI,
+
+/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
+in .byte hlo8(symbol) */
+ BFD_RELOC_AVR_8_HLO,
+
+/* Renesas RL78 Relocations. */
+ BFD_RELOC_RL78_NEG8,
+ BFD_RELOC_RL78_NEG16,
+ BFD_RELOC_RL78_NEG24,
+ BFD_RELOC_RL78_NEG32,
+ BFD_RELOC_RL78_16_OP,
+ BFD_RELOC_RL78_24_OP,
+ BFD_RELOC_RL78_32_OP,
+ BFD_RELOC_RL78_8U,
+ BFD_RELOC_RL78_16U,
+ BFD_RELOC_RL78_24U,
+ BFD_RELOC_RL78_DIR3U_PCREL,
+ BFD_RELOC_RL78_DIFF,
+ BFD_RELOC_RL78_GPRELB,
+ BFD_RELOC_RL78_GPRELW,
+ BFD_RELOC_RL78_GPRELL,
+ BFD_RELOC_RL78_SYM,
+ BFD_RELOC_RL78_OP_SUBTRACT,
+ BFD_RELOC_RL78_OP_NEG,
+ BFD_RELOC_RL78_OP_AND,
+ BFD_RELOC_RL78_OP_SHRA,
+ BFD_RELOC_RL78_ABS8,
+ BFD_RELOC_RL78_ABS16,
+ BFD_RELOC_RL78_ABS16_REV,
+ BFD_RELOC_RL78_ABS32,
+ BFD_RELOC_RL78_ABS32_REV,
+ BFD_RELOC_RL78_ABS16U,
+ BFD_RELOC_RL78_ABS16UW,
+ BFD_RELOC_RL78_ABS16UL,
+ BFD_RELOC_RL78_RELAX,
+ BFD_RELOC_RL78_HI16,
+ BFD_RELOC_RL78_HI8,
+ BFD_RELOC_RL78_LO16,
+ BFD_RELOC_RL78_CODE,
+
/* Renesas RX Relocations. */
BFD_RELOC_RX_NEG8,
BFD_RELOC_RX_NEG16,
@@ -4111,12 +4363,24 @@
/* 16 bit GOT offset. */
BFD_RELOC_390_GOT16,
+/* PC relative 12 bit shifted by 1. */
+ BFD_RELOC_390_PC12DBL,
+
+/* 12 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT12DBL,
+
/* PC relative 16 bit shifted by 1. */
BFD_RELOC_390_PC16DBL,
/* 16 bit PC rel. PLT shifted by 1. */
BFD_RELOC_390_PLT16DBL,
+/* PC relative 24 bit shifted by 1. */
+ BFD_RELOC_390_PC24DBL,
+
+/* 24 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT24DBL,
+
/* PC relative 32 bit shifted by 1. */
BFD_RELOC_390_PC32DBL,
@@ -4190,6 +4454,9 @@
BFD_RELOC_390_GOTPLT20,
BFD_RELOC_390_TLS_GOTIE20,
+/* STT_GNU_IFUNC relocation. */
+ BFD_RELOC_390_IRELATIVE,
+
/* Score relocations
Low 16 bit for load/store */
BFD_RELOC_SCORE_GPREL15,
@@ -4404,6 +4671,83 @@
This is the 5 bits of a value. */
BFD_RELOC_M68HC12_5B,
+/* Freescale XGATE reloc.
+This reloc marks the beginning of a bra/jal instruction. */
+ BFD_RELOC_XGATE_RL_JUMP,
+
+/* Freescale XGATE reloc.
+This reloc marks a group of several instructions that gcc generates
+and for which the linker relaxation pass can modify and/or remove
+some of them. */
+ BFD_RELOC_XGATE_RL_GROUP,
+
+/* Freescale XGATE reloc.
+This is the 16-bit lower part of an address. It is used for the '16-bit'
+instructions. */
+ BFD_RELOC_XGATE_LO16,
+
+/* Freescale XGATE reloc. */
+ BFD_RELOC_XGATE_GPAGE,
+
+/* Freescale XGATE reloc. */
+ BFD_RELOC_XGATE_24,
+
+/* Freescale XGATE reloc.
+This is a 9-bit pc-relative reloc. */
+ BFD_RELOC_XGATE_PCREL_9,
+
+/* Freescale XGATE reloc.
+This is a 10-bit pc-relative reloc. */
+ BFD_RELOC_XGATE_PCREL_10,
+
+/* Freescale XGATE reloc.
+This is the 16-bit lower part of an address. It is used for the '16-bit'
+instructions. */
+ BFD_RELOC_XGATE_IMM8_LO,
+
+/* Freescale XGATE reloc.
+This is the 16-bit higher part of an address. It is used for the '16-bit'
+instructions. */
+ BFD_RELOC_XGATE_IMM8_HI,
+
+/* Freescale XGATE reloc.
+This is a 3-bit pc-relative reloc. */
+ BFD_RELOC_XGATE_IMM3,
+
+/* Freescale XGATE reloc.
+This is a 4-bit pc-relative reloc. */
+ BFD_RELOC_XGATE_IMM4,
+
+/* Freescale XGATE reloc.
+This is a 5-bit pc-relative reloc. */
+ BFD_RELOC_XGATE_IMM5,
+
+/* Motorola 68HC12 reloc.
+This is the 9 bits of a value. */
+ BFD_RELOC_M68HC12_9B,
+
+/* Motorola 68HC12 reloc.
+This is the 16 bits of a value. */
+ BFD_RELOC_M68HC12_16B,
+
+/* Motorola 68HC12/XGATE reloc.
+This is a PCREL9 branch. */
+ BFD_RELOC_M68HC12_9_PCREL,
+
+/* Motorola 68HC12/XGATE reloc.
+This is a PCREL10 branch. */
+ BFD_RELOC_M68HC12_10_PCREL,
+
+/* Motorola 68HC12/XGATE reloc.
+This is the 8 bit low part of an absolute address and immediately precedes
+a matching HI8XG part. */
+ BFD_RELOC_M68HC12_LO8XG,
+
+/* Motorola 68HC12/XGATE reloc.
+This is the 8 bit high part of an absolute address and immediately follows
+a matching LO8XG part. */
+ BFD_RELOC_M68HC12_HI8XG,
+
/* NS CR16C Relocations. */
BFD_RELOC_16C_NUM08,
BFD_RELOC_16C_NUM08_C,
@@ -4601,6 +4945,7 @@
BFD_RELOC_H8_DIR24A8,
BFD_RELOC_H8_DIR24R8,
BFD_RELOC_H8_DIR32A16,
+ BFD_RELOC_H8_DISP32A16,
/* Sony Xstormy16 Relocations. */
BFD_RELOC_XSTORMY16_REL_12,
@@ -4649,6 +4994,57 @@
BFD_RELOC_MSP430_16_BYTE,
BFD_RELOC_MSP430_2X_PCREL,
BFD_RELOC_MSP430_RL_PCREL,
+ BFD_RELOC_MSP430_ABS8,
+ BFD_RELOC_MSP430X_PCR20_EXT_SRC,
+ BFD_RELOC_MSP430X_PCR20_EXT_DST,
+ BFD_RELOC_MSP430X_PCR20_EXT_ODST,
+ BFD_RELOC_MSP430X_ABS20_EXT_SRC,
+ BFD_RELOC_MSP430X_ABS20_EXT_DST,
+ BFD_RELOC_MSP430X_ABS20_EXT_ODST,
+ BFD_RELOC_MSP430X_ABS20_ADR_SRC,
+ BFD_RELOC_MSP430X_ABS20_ADR_DST,
+ BFD_RELOC_MSP430X_PCR16,
+ BFD_RELOC_MSP430X_PCR20_CALL,
+ BFD_RELOC_MSP430X_ABS16,
+ BFD_RELOC_MSP430_ABS_HI16,
+ BFD_RELOC_MSP430_PREL31,
+ BFD_RELOC_MSP430_SYM_DIFF,
+
+/* Relocations used by the Altera Nios II core. */
+ BFD_RELOC_NIOS2_S16,
+ BFD_RELOC_NIOS2_U16,
+ BFD_RELOC_NIOS2_CALL26,
+ BFD_RELOC_NIOS2_IMM5,
+ BFD_RELOC_NIOS2_CACHE_OPX,
+ BFD_RELOC_NIOS2_IMM6,
+ BFD_RELOC_NIOS2_IMM8,
+ BFD_RELOC_NIOS2_HI16,
+ BFD_RELOC_NIOS2_LO16,
+ BFD_RELOC_NIOS2_HIADJ16,
+ BFD_RELOC_NIOS2_GPREL,
+ BFD_RELOC_NIOS2_UJMP,
+ BFD_RELOC_NIOS2_CJMP,
+ BFD_RELOC_NIOS2_CALLR,
+ BFD_RELOC_NIOS2_ALIGN,
+ BFD_RELOC_NIOS2_GOT16,
+ BFD_RELOC_NIOS2_CALL16,
+ BFD_RELOC_NIOS2_GOTOFF_LO,
+ BFD_RELOC_NIOS2_GOTOFF_HA,
+ BFD_RELOC_NIOS2_PCREL_LO,
+ BFD_RELOC_NIOS2_PCREL_HA,
+ BFD_RELOC_NIOS2_TLS_GD16,
+ BFD_RELOC_NIOS2_TLS_LDM16,
+ BFD_RELOC_NIOS2_TLS_LDO16,
+ BFD_RELOC_NIOS2_TLS_IE16,
+ BFD_RELOC_NIOS2_TLS_LE16,
+ BFD_RELOC_NIOS2_TLS_DTPMOD,
+ BFD_RELOC_NIOS2_TLS_DTPREL,
+ BFD_RELOC_NIOS2_TLS_TPREL,
+ BFD_RELOC_NIOS2_COPY,
+ BFD_RELOC_NIOS2_GLOB_DAT,
+ BFD_RELOC_NIOS2_JUMP_SLOT,
+ BFD_RELOC_NIOS2_RELATIVE,
+ BFD_RELOC_NIOS2_GOTOFF,
/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
@@ -4770,6 +5166,9 @@
BFD_RELOC_MACH_O_PAIR. */
BFD_RELOC_MACH_O_SECTDIFF,
+/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
+ BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
+
/* Pair of relocation. Contains the first symbol. */
BFD_RELOC_MACH_O_PAIR,
@@ -4800,52 +5199,52 @@
/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-/* This is a 32 bit reloc for the microblaze that stores the
+/* This is a 32 bit reloc for the microblaze that stores the
low 16 bits of a value */
BFD_RELOC_MICROBLAZE_32_LO,
-/* This is a 32 bit pc-relative reloc for the microblaze that
+/* This is a 32 bit pc-relative reloc for the microblaze that
stores the low 16 bits of a value */
BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-/* This is a 32 bit reloc for the microblaze that stores a
+/* This is a 32 bit reloc for the microblaze that stores a
value relative to the read-only small data area anchor */
BFD_RELOC_MICROBLAZE_32_ROSDA,
-/* This is a 32 bit reloc for the microblaze that stores a
+/* This is a 32 bit reloc for the microblaze that stores a
value relative to the read-write small data area anchor */
BFD_RELOC_MICROBLAZE_32_RWSDA,
-/* This is a 32 bit reloc for the microblaze to handle
+/* This is a 32 bit reloc for the microblaze to handle
expressions of the form "Symbol Op Symbol" */
BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
+/* This is a 64 bit reloc that stores the 32 bit pc relative
+value in two words (with an imm instruction). No relocation is
done here - only used for relaxing */
BFD_RELOC_MICROBLAZE_64_NONE,
-/* This is a 64 bit reloc that stores the 32 bit pc relative
+/* This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
PC-relative GOT offset */
BFD_RELOC_MICROBLAZE_64_GOTPC,
-/* This is a 64 bit reloc that stores the 32 bit pc relative
+/* This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
GOT offset */
BFD_RELOC_MICROBLAZE_64_GOT,
-/* This is a 64 bit reloc that stores the 32 bit pc relative
+/* This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
PC-relative offset into PLT */
BFD_RELOC_MICROBLAZE_64_PLT,
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
+/* This is a 64 bit reloc that stores the 32 bit GOT relative
value in two words (with an imm instruction). The relocation is
relative offset from _GLOBAL_OFFSET_TABLE_ */
BFD_RELOC_MICROBLAZE_64_GOTOFF,
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
+/* This is a 32 bit reloc that stores the 32 bit GOT relative
value in a word. The relocation is relative offset from */
BFD_RELOC_MICROBLAZE_32_GOTOFF,
@@ -4853,6 +5252,325 @@
the dynamic object into the runtime process image. */
BFD_RELOC_MICROBLAZE_COPY,
+/* Unused Reloc */
+ BFD_RELOC_MICROBLAZE_64_TLS,
+
+/* This is a 64 bit reloc that stores the 32 bit GOT relative value
+of the GOT TLS GD info entry in two words (with an imm instruction). The
+relocation is GOT offset. */
+ BFD_RELOC_MICROBLAZE_64_TLSGD,
+
+/* This is a 64 bit reloc that stores the 32 bit GOT relative value
+of the GOT TLS LD info entry in two words (with an imm instruction). The
+relocation is GOT offset. */
+ BFD_RELOC_MICROBLAZE_64_TLSLD,
+
+/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
+ BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
+
+/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
+ BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
+
+/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
+instruction) */
+ BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
+
+/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
+to two words (uses imm instruction). */
+ BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
+
+/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
+to two words (uses imm instruction). */
+ BFD_RELOC_MICROBLAZE_64_TLSTPREL,
+
+/* AArch64 pseudo relocation code to mark the start of the AArch64
+relocation enumerators. N.B. the order of the enumerators is
+important as several tables in the AArch64 bfd backend are indexed
+by these enumerators; make sure they are all synced. */
+ BFD_RELOC_AARCH64_RELOC_START,
+
+/* AArch64 null relocation code. */
+ BFD_RELOC_AARCH64_NONE,
+
+/* Basic absolute relocations of N bits. These are equivalent to
+BFD_RELOC_N and they were added to assist the indexing of the howto
+table. */
+ BFD_RELOC_AARCH64_64,
+ BFD_RELOC_AARCH64_32,
+ BFD_RELOC_AARCH64_16,
+
+/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
+and they were added to assist the indexing of the howto table. */
+ BFD_RELOC_AARCH64_64_PCREL,
+ BFD_RELOC_AARCH64_32_PCREL,
+ BFD_RELOC_AARCH64_16_PCREL,
+
+/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
+of an unsigned address/value. */
+ BFD_RELOC_AARCH64_MOVW_G0,
+
+/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
+an address/value. No overflow checking. */
+ BFD_RELOC_AARCH64_MOVW_G0_NC,
+
+/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
+of an unsigned address/value. */
+ BFD_RELOC_AARCH64_MOVW_G1,
+
+/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
+of an address/value. No overflow checking. */
+ BFD_RELOC_AARCH64_MOVW_G1_NC,
+
+/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
+of an unsigned address/value. */
+ BFD_RELOC_AARCH64_MOVW_G2,
+
+/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
+of an address/value. No overflow checking. */
+ BFD_RELOC_AARCH64_MOVW_G2_NC,
+
+/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
+of a signed or unsigned address/value. */
+ BFD_RELOC_AARCH64_MOVW_G3,
+
+/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign. */
+ BFD_RELOC_AARCH64_MOVW_G0_S,
+
+/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign. */
+ BFD_RELOC_AARCH64_MOVW_G1_S,
+
+/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign. */
+ BFD_RELOC_AARCH64_MOVW_G2_S,
+
+/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
+offset. The lowest two bits must be zero and are not stored in the
+instruction, giving a 21 bit signed byte offset. */
+ BFD_RELOC_AARCH64_LD_LO19_PCREL,
+
+/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
+ BFD_RELOC_AARCH64_ADR_LO21_PCREL,
+
+/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
+offset, giving a 4KB aligned page base address. */
+ BFD_RELOC_AARCH64_ADR_HI21_PCREL,
+
+/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
+offset, giving a 4KB aligned page base address, but with no overflow
+checking. */
+ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
+
+/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
+Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_ADD_LO12,
+
+/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST8_LO12,
+
+/* AArch64 14 bit pc-relative test bit and branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 16 bit signed byte offset. */
+ BFD_RELOC_AARCH64_TSTBR14,
+
+/* AArch64 19 bit pc-relative conditional branch and compare & branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 21 bit signed byte offset. */
+ BFD_RELOC_AARCH64_BRANCH19,
+
+/* AArch64 26 bit pc-relative unconditional branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 28 bit signed byte offset. */
+ BFD_RELOC_AARCH64_JUMP26,
+
+/* AArch64 26 bit pc-relative unconditional branch and link.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 28 bit signed byte offset. */
+ BFD_RELOC_AARCH64_CALL26,
+
+/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST16_LO12,
+
+/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST32_LO12,
+
+/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST64_LO12,
+
+/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST128_LO12,
+
+/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
+offset of the global offset table entry for a symbol. The lowest two
+bits must be zero and are not stored in the instruction, giving a 21
+bit signed byte offset. This relocation type requires signed overflow
+checking. */
+ BFD_RELOC_AARCH64_GOT_LD_PREL19,
+
+/* Get to the page base of the global offset table entry for a symbol as
+part of an ADRP instruction using a 21 bit PC relative value.Used in
+conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
+ BFD_RELOC_AARCH64_ADR_GOT_PAGE,
+
+/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
+the GOT entry for this symbol. Used in conjunction with
+BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in LP64 ABI only. */
+ BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
+
+/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
+the GOT entry for this symbol. Used in conjunction with
+BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in ILP32 ABI only. */
+ BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
+
+/* Get to the page base of the global offset table entry for a symbols
+tls_index structure as part of an adrp instruction using a 21 bit PC
+relative value. Used in conjunction with
+BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
+ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
+
+/* Unsigned 12 bit byte offset to global offset table entry for a symbols
+tls_index structure. Used in conjunction with
+BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
+ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
+
+/* AArch64 TLS INITIAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
+
+/* AArch64 TLS LOCAL EXEC relocation. */
+ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_LDR,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_ADD,
+
+/* AArch64 TLS DESC relocation. */
+ BFD_RELOC_AARCH64_TLSDESC_CALL,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_COPY,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_GLOB_DAT,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_JUMP_SLOT,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_RELATIVE,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_TLS_DTPMOD,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_TLS_DTPREL,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_TLS_TPREL,
+
+/* AArch64 TLS relocation. */
+ BFD_RELOC_AARCH64_TLSDESC,
+
+/* AArch64 support for STT_GNU_IFUNC. */
+ BFD_RELOC_AARCH64_IRELATIVE,
+
+/* AArch64 pseudo relocation code to mark the end of the AArch64
+relocation enumerators that have direct mapping to ELF reloc codes.
+There are a few more enumerators after this one; those are mainly
+used by the AArch64 assembler for the internal fixup or to select
+one of the above enumerators. */
+ BFD_RELOC_AARCH64_RELOC_END,
+
+/* AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files. */
+ BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
+
+/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
+ BFD_RELOC_AARCH64_LDST_LO12,
+
+/* AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files. */
+ BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
+
+/* AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files. */
+ BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
+
+/* AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files. */
+ BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
+
/* Tilera TILEPro Relocations. */
BFD_RELOC_TILEPRO_COPY,
BFD_RELOC_TILEPRO_GLOB_DAT,
@@ -4900,6 +5618,12 @@
BFD_RELOC_TILEPRO_SHAMT_X1,
BFD_RELOC_TILEPRO_SHAMT_Y0,
BFD_RELOC_TILEPRO_SHAMT_Y1,
+ BFD_RELOC_TILEPRO_TLS_GD_CALL,
+ BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
+ BFD_RELOC_TILEPRO_TLS_IE_LOAD,
BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
@@ -4919,6 +5643,14 @@
BFD_RELOC_TILEPRO_TLS_DTPMOD32,
BFD_RELOC_TILEPRO_TLS_DTPOFF32,
BFD_RELOC_TILEPRO_TLS_TPOFF32,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
+ BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
+ BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
/* Tilera TILE-Gx Relocations. */
BFD_RELOC_TILEGX_HW0,
@@ -4978,52 +5710,79 @@
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_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
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_HW3_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
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_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
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_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
+ BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
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_TILEGX_TLS_GD_CALL,
+ BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
+ BFD_RELOC_TILEGX_TLS_IE_LOAD,
+ BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
+ BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
+ BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
+
+/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
+ BFD_RELOC_EPIPHANY_SIMM8,
+
+/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
+ BFD_RELOC_EPIPHANY_SIMM24,
+
+/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
+ BFD_RELOC_EPIPHANY_HIGH,
+
+/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
+ BFD_RELOC_EPIPHANY_LOW,
+
+/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
+ BFD_RELOC_EPIPHANY_SIMM11,
+
+/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
+ BFD_RELOC_EPIPHANY_IMM11,
+
+/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
+ BFD_RELOC_EPIPHANY_IMM8,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *bfd_reloc_type_lookup
@@ -5497,6 +6256,14 @@
unsigned int selective_search : 1;
};
+/* See note beside bfd_set_section_userdata. */
+static inline bfd_boolean
+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+{
+ abfd->cacheable = val;
+ return TRUE;
+}
+
typedef enum bfd_error
{
bfd_error_no_error = 0,
@@ -5510,6 +6277,7 @@
bfd_error_no_armap,
bfd_error_no_more_archived_files,
bfd_error_malformed_archive,
+ bfd_error_missing_dso,
bfd_error_file_not_recognized,
bfd_error_file_ambiguously_recognized,
bfd_error_no_contents,
@@ -5539,6 +6307,15 @@
bfd_error_handler_type bfd_get_error_handler (void);
+typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
+ const char *bfd_version,
+ const char *bfd_file,
+ int bfd_line);
+
+bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
+
+bfd_assert_handler_type bfd_get_assert_handler (void);
+
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
long bfd_canonicalize_reloc
@@ -5624,8 +6401,8 @@
#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_lookup_section_flags(link_info, flag_info, section) \
+ BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
@@ -5679,24 +6456,6 @@
bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-struct bfd_preserve
-{
- void *marker;
- void *tdata;
- flagword flags;
- const struct bfd_arch_info *arch_info;
- struct bfd_section *sections;
- struct bfd_section *section_last;
- unsigned int section_count;
- struct bfd_hash_table section_htab;
-};
-
-bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
-
-void bfd_preserve_restore (bfd *, struct bfd_preserve *);
-
-void bfd_preserve_finish (bfd *, struct bfd_preserve *);
-
bfd_vma bfd_emul_get_maxpagesize (const char *);
void bfd_emul_set_maxpagesize (const char *, bfd_vma);
@@ -6105,8 +6864,9 @@
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 *);
+ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
+ struct flag_info *,
+ asection *);
/* Attempt to merge SEC_MERGE sections. */
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
@@ -6222,6 +6982,9 @@
bfd_boolean bfd_get_full_section_contents
(bfd *abfd, asection *section, bfd_byte **ptr);
+void bfd_cache_section_contents
+ (asection *sec, void *contents);
+
bfd_boolean bfd_is_section_compressed
(bfd *abfd, asection *section);
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 2871e2e..2d174f3 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,7 +1,5 @@
/* 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, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,6 +20,9 @@
MA 02110-1301, USA. */
/*
+INODE
+typedef bfd, Error reporting, BFD front end, BFD front end
+
SECTION
<<typedef bfd>>
@@ -310,6 +311,14 @@
. unsigned int selective_search : 1;
.};
.
+.{* See note beside bfd_set_section_userdata. *}
+.static inline bfd_boolean
+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+.{
+. abfd->cacheable = val;
+. return TRUE;
+.}
+.
*/
#include "sysdep.h"
@@ -340,6 +349,9 @@
where it is needed. The typedef's used are defined in bfd.h */
/*
+INODE
+Error reporting, Miscellaneous, typedef bfd, BFD front end
+
SECTION
Error reporting
@@ -374,6 +386,7 @@
. bfd_error_no_armap,
. bfd_error_no_more_archived_files,
. bfd_error_malformed_archive,
+. bfd_error_missing_dso,
. bfd_error_file_not_recognized,
. bfd_error_file_ambiguously_recognized,
. bfd_error_no_contents,
@@ -406,6 +419,7 @@
N_("Archive has no index; run ranlib to add one"),
N_("No more archived files"),
N_("Malformed archive"),
+ N_("DSO missing from command line"),
N_("File format not recognized"),
N_("File format is ambiguous"),
N_("Section has no contents"),
@@ -727,7 +741,9 @@
vfprintf (stderr, new_fmt, ap);
va_end (ap);
- putc ('\n', stderr);
+ /* On AIX, putc is implemented as a macro that triggers a -Wunused-value
+ warning, so use the fputc function to avoid it. */
+ fputc ('\n', stderr);
fflush (stderr);
}
@@ -797,8 +813,93 @@
{
return _bfd_error_handler;
}
+
+/*
+SUBSECTION
+ BFD assert handler
+
+ If BFD finds an internal inconsistency, the bfd assert
+ handler is called with information on the BFD version, BFD
+ source file and line. If this happens, most programs linked
+ against BFD are expected to want to exit with an error, or mark
+ the current BFD operation as failed, so it is recommended to
+ override the default handler, which just calls
+ _bfd_error_handler and continues.
+
+CODE_FRAGMENT
+.
+.typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
+. const char *bfd_version,
+. const char *bfd_file,
+. int bfd_line);
+.
+*/
+
+/* Note the use of bfd_ prefix on the parameter names above: we want to
+ show which one is the message and which is the version by naming the
+ parameters, but avoid polluting the program-using-bfd namespace as
+ the typedef is visible in the exported headers that the program
+ includes. Below, it's just for consistency. */
+
+static void
+_bfd_default_assert_handler (const char *bfd_formatmsg,
+ const char *bfd_version,
+ const char *bfd_file,
+ int bfd_line)
+
+{
+ (*_bfd_error_handler) (bfd_formatmsg, bfd_version, bfd_file, bfd_line);
+}
+
+/* Similar to _bfd_error_handler, a program can decide to exit on an
+ internal BFD error. We use a non-variadic type to simplify passing
+ on parameters to other functions, e.g. _bfd_error_handler. */
+
+bfd_assert_handler_type _bfd_assert_handler = _bfd_default_assert_handler;
+
+/*
+FUNCTION
+ bfd_set_assert_handler
+
+SYNOPSIS
+ bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
+
+DESCRIPTION
+ Set the BFD assert handler function. Returns the previous
+ function.
+*/
+
+bfd_assert_handler_type
+bfd_set_assert_handler (bfd_assert_handler_type pnew)
+{
+ bfd_assert_handler_type pold;
+
+ pold = _bfd_assert_handler;
+ _bfd_assert_handler = pnew;
+ return pold;
+}
+
+/*
+FUNCTION
+ bfd_get_assert_handler
+
+SYNOPSIS
+ bfd_assert_handler_type bfd_get_assert_handler (void);
+
+DESCRIPTION
+ Return the BFD assert handler function.
+*/
+
+bfd_assert_handler_type
+bfd_get_assert_handler (void)
+{
+ return _bfd_assert_handler;
+}
/*
+INODE
+Miscellaneous, Memory Usage, Error reporting, BFD front end
+
SECTION
Miscellaneous
@@ -942,8 +1043,8 @@
void
bfd_assert (const char *file, int line)
{
- (*_bfd_error_handler) (_("BFD %s assertion fail %s:%d"),
- BFD_VERSION_STRING, file, line);
+ (*_bfd_assert_handler) (_("BFD %s assertion fail %s:%d"),
+ BFD_VERSION_STRING, file, line);
}
/* A more or less friendly abort message. In libbfd.h abort is
@@ -1379,8 +1480,8 @@
.#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_lookup_section_flags(link_info, flag_info, section) \
+. BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
.
.#define bfd_merge_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
@@ -1498,7 +1599,7 @@
if (count > 0)
memcpy (m->sections, secs, count * sizeof (asection *));
- for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
+ for (pm = &elf_seg_map (abfd); *pm != NULL; pm = &(*pm)->next)
;
*pm = m;
@@ -1605,128 +1706,6 @@
}
/*
-CODE_FRAGMENT
-
-.struct bfd_preserve
-.{
-. void *marker;
-. void *tdata;
-. flagword flags;
-. const struct bfd_arch_info *arch_info;
-. struct bfd_section *sections;
-. struct bfd_section *section_last;
-. unsigned int section_count;
-. struct bfd_hash_table section_htab;
-.};
-.
-*/
-
-/*
-FUNCTION
- bfd_preserve_save
-
-SYNOPSIS
- bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
-
-DESCRIPTION
- When testing an object for compatibility with a particular
- target back-end, the back-end object_p function needs to set
- up certain fields in the bfd on successfully recognizing the
- object. This typically happens in a piecemeal fashion, with
- failures possible at many points. On failure, the bfd is
- supposed to be restored to its initial state, which is
- virtually impossible. However, restoring a subset of the bfd
- state works in practice. This function stores the subset and
- reinitializes the bfd.
-
-*/
-
-bfd_boolean
-bfd_preserve_save (bfd *abfd, struct bfd_preserve *preserve)
-{
- preserve->tdata = abfd->tdata.any;
- preserve->arch_info = abfd->arch_info;
- preserve->flags = abfd->flags;
- preserve->sections = abfd->sections;
- preserve->section_last = abfd->section_last;
- preserve->section_count = abfd->section_count;
- preserve->section_htab = abfd->section_htab;
-
- if (! bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc,
- sizeof (struct section_hash_entry)))
- return FALSE;
-
- abfd->tdata.any = NULL;
- abfd->arch_info = &bfd_default_arch_struct;
- abfd->flags &= BFD_FLAGS_SAVED;
- abfd->sections = NULL;
- abfd->section_last = NULL;
- abfd->section_count = 0;
-
- return TRUE;
-}
-
-/*
-FUNCTION
- bfd_preserve_restore
-
-SYNOPSIS
- void bfd_preserve_restore (bfd *, struct bfd_preserve *);
-
-DESCRIPTION
- This function restores bfd state saved by bfd_preserve_save.
- If MARKER is non-NULL in struct bfd_preserve then that block
- and all subsequently bfd_alloc'd memory is freed.
-
-*/
-
-void
-bfd_preserve_restore (bfd *abfd, struct bfd_preserve *preserve)
-{
- bfd_hash_table_free (&abfd->section_htab);
-
- abfd->tdata.any = preserve->tdata;
- abfd->arch_info = preserve->arch_info;
- abfd->flags = preserve->flags;
- abfd->section_htab = preserve->section_htab;
- abfd->sections = preserve->sections;
- abfd->section_last = preserve->section_last;
- abfd->section_count = preserve->section_count;
-
- /* bfd_release frees all memory more recently bfd_alloc'd than
- its arg, as well as its arg. */
- if (preserve->marker != NULL)
- {
- bfd_release (abfd, preserve->marker);
- preserve->marker = NULL;
- }
-}
-
-/*
-FUNCTION
- bfd_preserve_finish
-
-SYNOPSIS
- void bfd_preserve_finish (bfd *, struct bfd_preserve *);
-
-DESCRIPTION
- This function should be called when the bfd state saved by
- bfd_preserve_save is no longer needed. ie. when the back-end
- object_p function returns with success.
-
-*/
-
-void
-bfd_preserve_finish (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_preserve *preserve)
-{
- /* It would be nice to be able to free more memory here, eg. old
- tdata, but that's not possible since these blocks are sitting
- inside bfd_alloc'd memory. The section hash is on a separate
- objalloc. */
- bfd_hash_table_free (&preserve->section_htab);
-}
-
-/*
FUNCTION
bfd_emul_get_maxpagesize
diff --git a/bfd/bfd.m4 b/bfd/bfd.m4
index 394c41a..7f86aab 100644
--- a/bfd/bfd.m4
+++ b/bfd/bfd.m4
@@ -1,5 +1,21 @@
dnl This file was derived from acinclude.m4.
-
+dnl
+dnl Copyright 2012 Free Software Foundation
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3. If not see
+dnl <http://www.gnu.org/licenses/>.
+dnl
dnl Check for existence of a type $1 in sys/procfs.h
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index 841c781..363402e 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -1,8 +1,6 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -87,10 +85,9 @@
real_fopen (const char *filename, const char *modes)
{
#ifdef VMS
- char vms_modes[4];
char *vms_attr;
- /* On VMS, fopen allows file attributes as optionnal arguments.
+ /* On VMS, fopen allows file attributes as optional arguments.
We need to use them but we'd better to use the common prototype.
In fopen-vms.h, they are separated from the mode with a comma.
Split here. */
@@ -185,7 +182,8 @@
this element. */
if (abfd->arelt_data != NULL)
{
- size_t maxbytes = ((struct areltdata *) abfd->arelt_data)->parsed_size;
+ bfd_size_type maxbytes = arelt_size (abfd);
+
if (abfd->where + size > maxbytes)
{
if (abfd->where >= maxbytes)
@@ -233,10 +231,14 @@
if (abfd->iovec)
{
+ bfd *parent_bfd = abfd;
ptr = abfd->iovec->btell (abfd);
- if (abfd->my_archive)
- ptr -= abfd->origin;
+ while (parent_bfd->my_archive != NULL)
+ {
+ ptr -= parent_bfd->origin;
+ parent_bfd = parent_bfd->my_archive;
+ }
}
else
ptr = 0;
@@ -308,8 +310,16 @@
}
file_position = position;
- if (direction == SEEK_SET && abfd->my_archive != NULL)
- file_position += abfd->origin;
+ if (direction == SEEK_SET)
+ {
+ bfd *parent_bfd = abfd;
+
+ while (parent_bfd->my_archive != NULL)
+ {
+ file_position += parent_bfd->origin;
+ parent_bfd = parent_bfd->my_archive;
+ }
+ }
if (abfd->iovec)
result = abfd->iovec->bseek (abfd, file_position, direction);
@@ -574,7 +584,7 @@
free (bim);
abfd->iostream = NULL;
- return TRUE;
+ return 0;
}
static int
diff --git a/bfd/cache.c b/bfd/cache.c
index 5ddbbe4..4d46936 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -31,7 +31,7 @@
regard to the underlying operating system's file descriptor
limit (often as low as 20 open files). The module in
<<cache.c>> maintains a least recently used list of
- <<BFD_CACHE_MAX_OPEN>> files, and exports the name
+ <<bfd_cache_max_open>> files, and exports the name
<<bfd_cache_lookup>>, which runs around and makes sure that
the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
@@ -67,9 +67,35 @@
};
/* The maximum number of files which the cache will keep open at
- one time. */
+ one time. When needed call bfd_cache_max_open to initialize. */
-#define BFD_CACHE_MAX_OPEN 10
+static int max_open_files = 0;
+
+/* Set max_open_files, if not already set, to 12.5% of the allowed open
+ file descriptors, but at least 10, and return the value. */
+static int
+bfd_cache_max_open (void)
+{
+ if (max_open_files == 0)
+ {
+ int max;
+#ifdef HAVE_GETRLIMIT
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && rlim.rlim_cur != RLIM_INFINITY)
+ max = rlim.rlim_cur / 8;
+ else
+#endif /* HAVE_GETRLIMIT */
+#ifdef _SC_OPEN_MAX
+ max = sysconf (_SC_OPEN_MAX) / 8;
+#else
+ max = 10;
+#endif /* _SC_OPEN_MAX */
+ max_open_files = max < 10 ? 10 : max;
+ }
+
+ return max_open_files;
+}
/* The number of BFD files we have open. */
@@ -187,7 +213,7 @@
/* Called when the macro <<bfd_cache_lookup>> fails to find a
quick answer. Find a file descriptor for @var{abfd}. If
necessary, it open it. If there are already more than
- <<BFD_CACHE_MAX_OPEN>> files open, it tries to close one first, to
+ <<bfd_cache_max_open>> files open, it tries to close one first, to
avoid running out of file descriptors. It will return NULL
if it is unable to (re)open the @var{abfd}. */
@@ -198,7 +224,7 @@
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();
- if (abfd->my_archive)
+ while (abfd->my_archive)
abfd = abfd->my_archive;
if (abfd->iostream != NULL)
@@ -362,7 +388,7 @@
static int
cache_bclose (struct bfd *abfd)
{
- return bfd_cache_close (abfd);
+ return bfd_cache_close (abfd) - 1;
}
static int
@@ -437,7 +463,7 @@
{
*map_addr = ret;
*map_len = pg_len;
- ret += offset & pagesize_m1;
+ ret = (char *) ret + (offset & pagesize_m1);
}
}
#endif
@@ -466,7 +492,7 @@
bfd_cache_init (bfd *abfd)
{
BFD_ASSERT (abfd->iostream != NULL);
- if (open_files >= BFD_CACHE_MAX_OPEN)
+ if (open_files >= bfd_cache_max_open ())
{
if (! close_one ())
return FALSE;
@@ -553,7 +579,7 @@
{
abfd->cacheable = TRUE; /* Allow it to be closed later. */
- if (open_files >= BFD_CACHE_MAX_OPEN)
+ if (open_files >= bfd_cache_max_open ())
{
if (! close_one ())
return NULL;
@@ -563,15 +589,15 @@
{
case read_direction:
case no_direction:
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_RB);
break;
case both_direction:
case write_direction:
if (abfd->opened_once)
{
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_RUB);
if (abfd->iostream == NULL)
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
}
else
{
@@ -601,7 +627,7 @@
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink_if_ordinary (abfd->filename);
#endif
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = TRUE;
}
break;
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index 40eaca9..5d0454c 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -1,6 +1,6 @@
/* BFD back-end for CISCO crash dumps.
Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007,
- 2010, 2011
+ 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -38,7 +38,8 @@
# define SIGBUS 10
#endif
-int crash_info_locs[] = {
+int crash_info_locs[] =
+{
0x0250, /* mips, ppc, x86, i960 */
0x0400, /* m68k, mips, x86, i960 */
0x0FFC, /* m68k, mips, ppc, x86, i960 */
@@ -50,13 +51,15 @@
#define CRASH_MAGIC 0xdead1234
#define MASK_ADDR(x) ((x) & 0x0fffffff) /* Mask crash info address */
-typedef enum {
- CRASH_REASON_NOTCRASHED = 0,
- CRASH_REASON_EXCEPTION = 1,
- CRASH_REASON_CORRUPT = 2,
+typedef enum
+{
+ CRASH_REASON_NOTCRASHED = 0,
+ CRASH_REASON_EXCEPTION = 1,
+ CRASH_REASON_CORRUPT = 2,
} crashreason;
-typedef struct {
+typedef struct
+{
char magic[4]; /* Magic number */
char version[4]; /* Version number */
char reason[4]; /* Crash reason */
@@ -73,10 +76,6 @@
int sig;
};
-static const bfd_target *cisco_core_file_validate PARAMS ((bfd *, int));
-static const bfd_target *cisco_core_file_p PARAMS ((bfd *));
-char *cisco_core_file_failing_command PARAMS ((bfd *));
-int cisco_core_file_failing_signal PARAMS ((bfd *));
#define cisco_core_file_matches_executable_p generic_core_file_matches_executable_p
#define cisco_core_file_pid _bfd_nocore_core_file_pid
@@ -84,9 +83,7 @@
CRASH_INFO_LOC. */
static const bfd_target *
-cisco_core_file_validate (abfd, crash_info_loc)
- bfd *abfd;
- int crash_info_loc;
+cisco_core_file_validate (bfd *abfd, int crash_info_loc)
{
char buf[4];
unsigned int crashinfo_offset;
@@ -292,8 +289,7 @@
}
static const bfd_target *
-cisco_core_file_p (abfd)
- bfd *abfd;
+cisco_core_file_p (bfd *abfd)
{
int *crash_info_locp;
const bfd_target *target = NULL;
@@ -307,16 +303,14 @@
return (target);
}
-char *
-cisco_core_file_failing_command (abfd)
- bfd *abfd ATTRIBUTE_UNUSED;
+static char *
+cisco_core_file_failing_command (bfd *abfd ATTRIBUTE_UNUSED)
{
return NULL;
}
-int
-cisco_core_file_failing_signal (abfd)
- bfd *abfd ATTRIBUTE_UNUSED;
+static int
+cisco_core_file_failing_signal (bfd *abfd ATTRIBUTE_UNUSED)
{
return abfd->tdata.cisco_core_data->sig;
}
@@ -324,7 +318,7 @@
extern const bfd_target cisco_core_little_vec;
const bfd_target cisco_core_big_vec =
- {
+{
"cisco-ios-core-big",
bfd_target_unknown_flavour,
BFD_ENDIAN_BIG, /* target byte order */
@@ -371,11 +365,11 @@
& cisco_core_little_vec,
- (PTR) 0 /* backend_data */
+ NULL /* backend_data */
};
const bfd_target cisco_core_little_vec =
- {
+{
"cisco-ios-core-little",
bfd_target_unknown_flavour,
BFD_ENDIAN_LITTLE, /* target byte order */
@@ -422,5 +416,5 @@
&cisco_core_big_vec,
- (PTR) 0 /* backend_data */
+ NULL /* backend_data */
};
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 4466e4d..028e703 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, 2011
+ 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <[email protected]> and
Ian Lance Taylor <[email protected]>.
@@ -37,40 +37,7 @@
/* Prototypes for static functions. */
-static const bfd_target *alpha_ecoff_object_p
- PARAMS ((bfd *));
-static bfd_boolean alpha_ecoff_bad_format_hook
- PARAMS ((bfd *abfd, PTR filehdr));
-static PTR alpha_ecoff_mkobject_hook
- PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
-static void alpha_ecoff_swap_reloc_in
- PARAMS ((bfd *, PTR, struct internal_reloc *));
-static void alpha_ecoff_swap_reloc_out
- PARAMS ((bfd *, const struct internal_reloc *, PTR));
-static void alpha_adjust_reloc_in
- PARAMS ((bfd *, const struct internal_reloc *, arelent *));
-static void alpha_adjust_reloc_out
- PARAMS ((bfd *, const arelent *, struct internal_reloc *));
-static reloc_howto_type *alpha_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static bfd_byte *alpha_ecoff_get_relocated_section_contents
- PARAMS ((bfd *abfd, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *data, bfd_boolean relocatable, asymbol **symbols));
-static bfd_vma alpha_convert_external_reloc
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, struct external_reloc *,
- struct ecoff_link_hash_entry *));
-static bfd_boolean alpha_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
-static bfd_boolean alpha_adjust_headers
- PARAMS ((bfd *, struct internal_filehdr *, struct internal_aouthdr *));
-static PTR alpha_ecoff_read_ar_hdr
- PARAMS ((bfd *));
-static bfd *alpha_ecoff_get_elt_at_filepos
- PARAMS ((bfd *, file_ptr));
-static bfd *alpha_ecoff_openr_next_archived_file
- PARAMS ((bfd *, bfd *));
-static bfd *alpha_ecoff_get_elt_at_index
- PARAMS ((bfd *, symindex));
+
/* ECOFF has COFF sections, but the debugging information is stored in
a completely different format. ECOFF targets use some of the
@@ -128,18 +95,14 @@
/* How to process the various reloc types. */
-static bfd_reloc_status_type reloc_nil
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
static bfd_reloc_status_type
-reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc ATTRIBUTE_UNUSED;
- asymbol *sym ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+reloc_nil (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc ATTRIBUTE_UNUSED,
+ asymbol *sym ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
return bfd_reloc_ok;
}
@@ -438,8 +401,7 @@
/* Recognize an Alpha ECOFF file. */
static const bfd_target *
-alpha_ecoff_object_p (abfd)
- bfd *abfd;
+alpha_ecoff_object_p (bfd *abfd)
{
static const bfd_target *ret;
@@ -477,9 +439,8 @@
/* See whether the magic number matches. */
static bfd_boolean
-alpha_ecoff_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
+alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ void * filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -498,13 +459,10 @@
/* This is a hook called by coff_real_object_p to create any backend
specific information. */
-static PTR
-alpha_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
- bfd *abfd;
- PTR filehdr;
- PTR aouthdr;
+static void *
+alpha_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr)
{
- PTR ecoff;
+ void * ecoff;
ecoff = _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr);
@@ -534,10 +492,9 @@
/* Swap a reloc in. */
static void
-alpha_ecoff_swap_reloc_in (abfd, ext_ptr, intern)
- bfd *abfd;
- PTR ext_ptr;
- struct internal_reloc *intern;
+alpha_ecoff_swap_reloc_in (bfd *abfd,
+ void * ext_ptr,
+ struct internal_reloc *intern)
{
const RELOC *ext = (RELOC *) ext_ptr;
@@ -582,10 +539,9 @@
/* Swap a reloc out. */
static void
-alpha_ecoff_swap_reloc_out (abfd, intern, dst)
- bfd *abfd;
- const struct internal_reloc *intern;
- PTR dst;
+alpha_ecoff_swap_reloc_out (bfd *abfd,
+ const struct internal_reloc *intern,
+ void * dst)
{
RELOC *ext = (RELOC *) dst;
long symndx;
@@ -637,10 +593,9 @@
this backend routine. It must fill in the howto field. */
static void
-alpha_adjust_reloc_in (abfd, intern, rptr)
- bfd *abfd;
- const struct internal_reloc *intern;
- arelent *rptr;
+alpha_adjust_reloc_in (bfd *abfd,
+ const struct internal_reloc *intern,
+ arelent *rptr)
{
if (intern->r_type > ALPHA_R_GPVALUE)
{
@@ -729,10 +684,9 @@
not need to undo. */
static void
-alpha_adjust_reloc_out (abfd, rel, intern)
- bfd *abfd ATTRIBUTE_UNUSED;
- const arelent *rel;
- struct internal_reloc *intern;
+alpha_adjust_reloc_out (bfd *abfd ATTRIBUTE_UNUSED,
+ const arelent *rel,
+ struct internal_reloc *intern)
{
switch (intern->r_type)
{
@@ -771,14 +725,12 @@
assembler is going to handle this. */
static bfd_byte *
-alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
- data, relocatable, symbols)
- bfd *abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- bfd_boolean relocatable;
- asymbol **symbols;
+alpha_ecoff_get_relocated_section_contents (bfd *abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
{
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
@@ -1195,9 +1147,8 @@
/* Get the howto structure for a generic reloc type. */
static reloc_howto_type *
-alpha_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+alpha_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
int alpha_type;
@@ -1268,12 +1219,11 @@
relocation amount. */
static bfd_vma
-alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- struct external_reloc *ext_rel;
- struct ecoff_link_hash_entry *h;
+alpha_convert_external_reloc (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ struct external_reloc *ext_rel,
+ struct ecoff_link_hash_entry *h)
{
unsigned long r_symndx;
bfd_vma relocation;
@@ -1385,14 +1335,12 @@
could be combined somehow. */
static bfd_boolean
-alpha_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, external_relocs)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- PTR external_relocs;
+alpha_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ void * external_relocs)
{
asection **symndx_to_section, *lita_sec;
struct ecoff_link_hash_entry **sym_hashes;
@@ -1562,14 +1510,14 @@
input_bfd);
bfd_set_error (bfd_error_bad_value);
continue;
-
+
case ALPHA_R_GPRELLOW:
(*_bfd_error_handler)
(_("%B: unsupported relocation: ALPHA_R_GPRELLOW"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
continue;
-
+
default:
(*_bfd_error_handler)
(_("%B: unknown relocation type %d"),
@@ -2042,10 +1990,9 @@
sets the dynamic bits in the file header. */
static bfd_boolean
-alpha_adjust_headers (abfd, fhdr, ahdr)
- bfd *abfd;
- struct internal_filehdr *fhdr;
- struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED;
+alpha_adjust_headers (bfd *abfd,
+ struct internal_filehdr *fhdr,
+ struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED)
{
if ((abfd->flags & (DYNAMIC | EXEC_P)) == (DYNAMIC | EXEC_P))
fhdr->f_flags |= F_ALPHA_CALL_SHARED;
@@ -2077,9 +2024,8 @@
/* Read an archive header. This is like the standard routine, but it
also accepts ARFZMAG. */
-static PTR
-alpha_ecoff_read_ar_hdr (abfd)
- bfd *abfd;
+static void *
+alpha_ecoff_read_ar_hdr (bfd *abfd)
{
struct areltdata *ret;
struct ar_hdr *h;
@@ -2103,16 +2049,14 @@
ret->parsed_size = H_GET_64 (abfd, ab);
}
- return (PTR) ret;
+ return ret;
}
/* Get an archive element at a specified file position. This is where
we uncompress the archive element if necessary. */
static bfd *
-alpha_ecoff_get_elt_at_filepos (archive, filepos)
- bfd *archive;
- file_ptr filepos;
+alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos)
{
bfd *nbfd = NULL;
struct areltdata *tdata;
@@ -2225,7 +2169,7 @@
nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10);
nbfd->flags |= BFD_IN_MEMORY;
- nbfd->iostream = (PTR) bim;
+ nbfd->iostream = bim;
nbfd->iovec = &_bfd_memory_iovec;
nbfd->origin = 0;
BFD_ASSERT (! nbfd->cacheable);
@@ -2243,9 +2187,7 @@
/* Open the next archived file. */
static bfd *
-alpha_ecoff_openr_next_archived_file (archive, last_file)
- bfd *archive;
- bfd *last_file;
+alpha_ecoff_openr_next_archived_file (bfd *archive, bfd *last_file)
{
file_ptr filestart;
@@ -2291,16 +2233,16 @@
{
/* COFF backend structure. */
{
- (void (*) PARAMS ((bfd *,PTR,int,int,int,int,PTR))) bfd_void, /* aux_in */
- (void (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_in */
- (void (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_in */
- (unsigned (*) PARAMS ((bfd *,PTR,int,int,int,int,PTR)))bfd_void,/*aux_out*/
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_out */
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_out */
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
+ (void (*) (bfd *,void *,int,int,int,int,void *)) bfd_void, /* aux_in */
+ (void (*) (bfd *,void *,void *)) bfd_void, /* sym_in */
+ (void (*) (bfd *,void *,void *)) bfd_void, /* lineno_in */
+ (unsigned (*) (bfd *,void *,int,int,int,int,void *)) bfd_void,/*aux_out*/
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* sym_out */
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* lineno_out */
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* reloc_out */
alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
alpha_ecoff_swap_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2,
alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
alpha_ecoff_swap_scnhdr_in, NULL,
@@ -2448,5 +2390,5 @@
NULL,
- (PTR) &alpha_ecoff_backend_data
+ & alpha_ecoff_backend_data
};
diff --git a/bfd/coff-apollo.c b/bfd/coff-apollo.c
index e177099..46cf5ea 100644
--- a/bfd/coff-apollo.c
+++ b/bfd/coff-apollo.c
@@ -1,6 +1,6 @@
/* BFD back-end for Apollo 68000 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
- 2005, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
By Troy Rollo ([email protected])
Based on m68k standard COFF version Written by Cygnus Support.
@@ -52,14 +52,12 @@
/* Turn a howto into a reloc number. */
-extern void apollo_rtype2howto PARAMS ((arelent *, int));
-extern int apollo_howto2rtype PARAMS ((reloc_howto_type *));
+extern void apollo_rtype2howto (arelent *, int);
+extern int apollo_howto2rtype (reloc_howto_type *);
#ifndef ONLY_DECLARE_RELOCS
void
-apollo_rtype2howto (internal, relocentry)
- arelent *internal;
- int relocentry;
+apollo_rtype2howto (arelent *internal, int relocentry)
{
switch (relocentry)
{
@@ -74,8 +72,7 @@
}
int
-apollo_howto2rtype (internal)
- reloc_howto_type *internal;
+apollo_howto2rtype (reloc_howto_type *internal)
{
if (internal->pc_relative)
{
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index bdadfb2..efcf522 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1,6 +1,6 @@
/* BFD back-end for ARM COFF 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, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -599,7 +599,7 @@
bfd_reloc_status_type flag = bfd_reloc_ok;
/* If this is an undefined symbol, return error. */
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& (symbol->flags & BSF_WEAK) == 0)
return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
@@ -687,7 +687,7 @@
}
/* If this is an undefined symbol, return error. */
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& (symbol->flags & BSF_WEAK) == 0)
return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
@@ -918,7 +918,7 @@
struct coff_arm_link_hash_table * ret;
bfd_size_type amt = sizeof (struct coff_arm_link_hash_table);
- ret = bfd_malloc (amt);
+ ret = bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
@@ -931,10 +931,6 @@
return NULL;
}
- ret->thumb_glue_size = 0;
- ret->arm_glue_size = 0;
- ret->bfd_of_glue_owner = NULL;
-
return & ret->root.root;
}
diff --git a/bfd/coff-aux.c b/bfd/coff-aux.c
index 84805a8..852f585 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, 2011
+ Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
Written by Richard Henderson <[email protected]>.
@@ -42,12 +42,12 @@
#include "sysdep.h"
#include "bfd.h"
-static bfd_boolean coff_m68k_aux_link_add_one_symbol
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
- asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
-
#define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol
+static bfd_boolean
+coff_m68k_aux_link_add_one_symbol
+ (struct bfd_link_info *, bfd *, const char *, flagword, asection *,
+ bfd_vma, const char *, bfd_boolean, bfd_boolean,
+ struct bfd_link_hash_entry **);
#ifndef bfd_pe_print_pdata
#define bfd_pe_print_pdata NULL
@@ -63,18 +63,16 @@
what you include in the shared object. */
static bfd_boolean
-coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
- string, copy, collect, hashp)
- struct bfd_link_info *info;
- bfd *abfd;
- const char *name;
- flagword flags;
- asection *section;
- bfd_vma value;
- const char *string;
- bfd_boolean copy;
- bfd_boolean collect;
- struct bfd_link_hash_entry **hashp;
+coff_m68k_aux_link_add_one_symbol (struct bfd_link_info *info,
+ bfd *abfd,
+ const char *name,
+ flagword flags,
+ asection *section,
+ bfd_vma value,
+ const char *string,
+ bfd_boolean copy,
+ bfd_boolean collect,
+ struct bfd_link_hash_entry **hashp)
{
struct bfd_link_hash_entry *h;
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index e2a10a6..1e34275 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -1,6 +1,6 @@
/* BFD back-end for Renesas H8/300 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2012
Free Software Foundation, Inc.
Written by Steve Chamberlain, <[email protected]>.
@@ -60,28 +60,6 @@
unsigned int offset;
};
-static struct bfd_hash_entry *
-funcvec_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-static bfd_reloc_status_type special
- (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
-static int select_reloc
- (reloc_howto_type *);
-static void rtype2howto
- (arelent *, struct internal_reloc *);
-static void reloc_processing
- (arelent *, struct internal_reloc *, asymbol **, bfd *, asection *);
-static bfd_boolean h8300_symbol_address_p
- (bfd *, asection *, bfd_vma);
-static int h8300_reloc16_estimate
- (bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *);
-static void h8300_reloc16_extra_cases
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *);
-static bfd_boolean h8300_bfd_link_add_symbols
- (bfd *, struct bfd_link_info *);
/* To lookup a value in the function vector hash table. */
#define funcvec_hash_lookup(table, string, create, copy) \
@@ -195,7 +173,7 @@
struct h8300_coff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct h8300_coff_link_hash_table);
- ret = (struct h8300_coff_link_hash_table *) bfd_malloc (amt);
+ ret = (struct h8300_coff_link_hash_table *) bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
if (!_bfd_link_hash_table_init (&ret->root.root, abfd,
@@ -206,11 +184,6 @@
return NULL;
}
- /* Initialize our data. */
- ret->vectors_sec = NULL;
- ret->funcvec_hash_table = NULL;
-
- /* OK. Everything's initialized, return the base pointer. */
return &ret->root.root;
}
@@ -224,13 +197,13 @@
the addend until the final link. */
static bfd_reloc_status_type
-special (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *reloc_entry ATTRIBUTE_UNUSED,
- asymbol *symbol ATTRIBUTE_UNUSED,
- PTR data ATTRIBUTE_UNUSED,
- asection *input_section ATTRIBUTE_UNUSED,
- bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
+special (bfd * abfd ATTRIBUTE_UNUSED,
+ arelent * reloc_entry ATTRIBUTE_UNUSED,
+ asymbol * symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection * input_section ATTRIBUTE_UNUSED,
+ bfd * output_bfd,
+ char ** error_message ATTRIBUTE_UNUSED)
{
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
@@ -240,7 +213,8 @@
return bfd_reloc_ok;
}
-static reloc_howto_type howto_table[] = {
+static reloc_howto_type howto_table[] =
+{
HOWTO (R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, special, "8", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, special, "16", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, special, "32", FALSE, 0xffffffff, 0xffffffff, FALSE),
diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c
index 139a8ed..9b64599 100644
--- a/bfd/coff-h8500.c
+++ b/bfd/coff-h8500.c
@@ -1,6 +1,6 @@
/* BFD back-end for Renesas H8/500 COFF binaries.
Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <[email protected]>.
@@ -29,10 +29,6 @@
#include "coff/internal.h"
#include "libcoff.h"
-static int coff_h8500_select_reloc PARAMS ((reloc_howto_type *));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-static void extra_case PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, bfd_byte *, unsigned int *, unsigned int *));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
@@ -73,8 +69,7 @@
/* Turn a howto into a reloc number. */
static int
-coff_h8500_select_reloc (howto)
- reloc_howto_type *howto;
+coff_h8500_select_reloc (reloc_howto_type *howto)
{
return howto->type;
}
@@ -96,9 +91,7 @@
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static void
-rtype2howto (internal, dst)
- arelent * internal;
- struct internal_reloc *dst;
+rtype2howto (arelent * internal, struct internal_reloc *dst)
{
switch (dst->r_type)
{
@@ -145,12 +138,12 @@
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
-static void reloc_processing (relent, reloc, symbols, abfd, section)
- arelent * relent;
- struct internal_reloc *reloc;
- asymbol ** symbols;
- bfd * abfd;
- asection * section;
+static void
+reloc_processing (arelent * relent,
+ struct internal_reloc *reloc,
+ asymbol ** symbols,
+ bfd * abfd,
+ asection * section)
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
@@ -165,14 +158,13 @@
}
static void
-extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
- bfd *in_abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- arelent *reloc;
- bfd_byte *data;
- unsigned int *src_ptr;
- unsigned int *dst_ptr;
+extra_case (bfd *in_abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ arelent *reloc,
+ bfd_byte *data,
+ unsigned int *src_ptr,
+ unsigned int *dst_ptr)
{
bfd_byte *d = data+*dst_ptr;
asection *input_section = link_order->u.indirect.section;
@@ -230,7 +222,7 @@
v = (v & 0x00ffffff) | (o & 0xff00000);
bfd_put_32 (in_abfd, (bfd_vma) v, data + *dst_ptr -1);
(*dst_ptr) += 3;
- (*src_ptr) += 3;;
+ (*src_ptr) += 3;
}
break;
case R_H8500_IMM32:
@@ -238,7 +230,7 @@
int v = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
bfd_put_32 (in_abfd, (bfd_vma) v, data + *dst_ptr);
(*dst_ptr) += 4;
- (*src_ptr) += 4;;
+ (*src_ptr) += 4;
}
break;
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 2f17a55..af92b40 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, 2010, 2011
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -43,8 +43,6 @@
#include "libcoff.h"
-static bfd_reloc_status_type coff_i386_reloc
- (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
static reloc_howto_type *coff_i386_rtype_to_howto
(bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
@@ -67,15 +65,13 @@
reloc type to make any required adjustments. */
static bfd_reloc_status_type
-coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+coff_i386_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
symvalue diff;
@@ -189,11 +185,8 @@
/* Return TRUE if this relocation should appear in the output .reloc
section. */
-static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
-
-static bfd_boolean in_reloc_p (abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type *howto;
+static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
+ reloc_howto_type *howto)
{
return ! howto->pc_relative && howto->type != R_IMAGEBASE
&& howto->type != R_SECREL32;
@@ -413,22 +406,15 @@
and the regular routine is that we don't want to do anything for a
relocatable link. */
-static bfd_boolean coff_pe_i386_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-
static bfd_boolean
-coff_pe_i386_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;
+coff_pe_i386_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)
{
if (info->relocatable)
return TRUE;
@@ -445,13 +431,12 @@
/* Convert an rtype to howto for the COFF backend linker. */
static reloc_howto_type *
-coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h;
- struct internal_syment *sym;
- bfd_vma *addendp;
+coff_i386_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h,
+ struct internal_syment *sym,
+ bfd_vma *addendp)
{
reloc_howto_type *howto;
@@ -528,8 +513,8 @@
{
bfd_vma osect_vma;
- if (h && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak))
+ if (h && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
osect_vma = h->root.u.def.section->output_section->vma;
else
{
@@ -556,9 +541,8 @@
#define coff_bfd_reloc_name_lookup coff_i386_reloc_name_lookup
static reloc_howto_type *
-coff_i386_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+coff_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -608,13 +592,8 @@
a leading dot for local labels, so if TARGET_UNDERSCORE is defined
we treat all symbols starting with L as local. */
-static bfd_boolean coff_i386_is_local_label_name
- PARAMS ((bfd *, const char *));
-
static bfd_boolean
-coff_i386_is_local_label_name (abfd, name)
- bfd *abfd;
- const char *name;
+coff_i386_is_local_label_name (bfd *abfd, const char *name)
{
if (name[0] == 'L')
return TRUE;
@@ -628,6 +607,9 @@
#include "coffcode.h"
+#define _bfd_generic_find_nearest_line_discriminator \
+ coff_find_nearest_line_discriminator
+
const bfd_target
#ifdef TARGET_SYM
TARGET_SYM =
@@ -646,13 +628,13 @@
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
#ifdef COFF_WITH_PE
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING
#endif
- | SEC_CODE | SEC_DATA),
+ | SEC_CODE | SEC_DATA | SEC_EXCLUDE ),
#ifdef TARGET_UNDERSCORE
TARGET_UNDERSCORE, /* leading underscore */
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index 9eb39a5..79b4a7e 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -131,7 +131,7 @@
return bfd_reloc_continue;
}
-/* This is just a temporary measure until we teach bfd to generate
+/* This is just a temporary measure until we teach bfd to generate
these relocations. */
static bfd_reloc_status_type
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index 928315f..5205caf 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -1,6 +1,6 @@
/* 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, 2009, 2011
+ 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -36,22 +36,6 @@
#include "libcoff.h" /* To allow easier abstraction-breaking. */
-static bfd_boolean coff_i960_is_local_label_name
- PARAMS ((bfd *, const char *));
-static bfd_reloc_status_type optcall_callback
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type coff_i960_relocate
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static reloc_howto_type *coff_i960_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static bfd_boolean coff_i960_start_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean coff_i960_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static bfd_boolean coff_i960_adjust_symndx
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
#define COFF_ALIGN_IN_SECTION_HEADER 1
@@ -68,9 +52,7 @@
/* This set of local label names is taken from gas. */
static bfd_boolean
-coff_i960_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+coff_i960_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
{
return (name[0] == 'L'
|| (name[0] == '.'
@@ -108,15 +90,13 @@
#define BAL_MASK 0x00ffffff
static bfd_reloc_status_type
-optcall_callback (abfd, reloc_entry, symbol_in, data,
- input_section, ignore_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *ignore_bfd ATTRIBUTE_UNUSED;
- char **error_message;
+optcall_callback (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol_in,
+ void * data,
+ asection *input_section,
+ bfd *ignore_bfd ATTRIBUTE_UNUSED,
+ char **error_message)
{
/* This item has already been relocated correctly, but we may be
* able to patch in yet better code - done by digging out the
@@ -198,15 +178,13 @@
COFF specific backend linker. */
static bfd_reloc_status_type
-coff_i960_relocate (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+coff_i960_relocate (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
asection *osec;
@@ -261,11 +239,11 @@
if (coff_section_data (output_bfd, osec) == NULL)
{
bfd_size_type amt = sizeof (struct coff_section_tdata);
- osec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ osec->used_by_bfd = bfd_zalloc (abfd, amt);
if (osec->used_by_bfd == NULL)
return bfd_reloc_overflow;
}
- coff_section_data (output_bfd, osec)->tdata = (PTR) syms;
+ coff_section_data (output_bfd, osec)->tdata = syms;
}
/* Let bfd_perform_relocation do its thing, which will include
@@ -285,9 +263,8 @@
optcall_callback, "optcall", TRUE, 0x00ffffff, 0x00ffffff, 0);
static reloc_howto_type *
-coff_i960_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+coff_i960_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -341,9 +318,7 @@
necessary symbols. */
static bfd_boolean
-coff_i960_start_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+coff_i960_start_final_link (bfd *abfd, struct bfd_link_info *info)
{
bfd_size_type symesz = bfd_coff_symesz (abfd);
asection *o;
@@ -370,7 +345,7 @@
isym.n_sclass = C_STAT;
isym.n_numaux = 0;
- bfd_coff_swap_sym_out (abfd, (PTR) &isym, (PTR) esym);
+ bfd_coff_swap_sym_out (abfd, &isym, esym);
if (bfd_bwrite (esym, symesz, abfd) != symesz)
{
@@ -389,16 +364,14 @@
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
-coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, syms, sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ 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;
@@ -530,9 +503,9 @@
BFD_ASSERT (sym->n_numaux == 2);
esyms = (bfd_byte *) obj_coff_external_syms (input_bfd);
esyms += (symndx + 2) * bfd_coff_symesz (input_bfd);
- bfd_coff_swap_aux_in (input_bfd, (PTR) esyms, sym->n_type,
+ bfd_coff_swap_aux_in (input_bfd, esyms, sym->n_type,
sym->n_sclass, 1, sym->n_numaux,
- (PTR) &aux);
+ &aux);
olf = aux.x_bal.x_balntry;
}
@@ -601,13 +574,12 @@
for the section. */
static bfd_boolean
-coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *ibfd;
- asection *sec ATTRIBUTE_UNUSED;
- struct internal_reloc *irel;
- bfd_boolean *adjustedp;
+coff_i960_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *ibfd,
+ asection *sec ATTRIBUTE_UNUSED,
+ struct internal_reloc *irel,
+ bfd_boolean *adjustedp)
{
struct coff_link_hash_entry *h;
diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c
index 86e7617..3f172bd 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, 2011
+ Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Contributed by David Mosberger <[email protected]>
@@ -54,12 +54,9 @@
/* Return TRUE if this relocation should
appear in the output .reloc section. */
-static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
-
static bfd_boolean
-in_reloc_p(abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type *howto ATTRIBUTE_UNUSED;
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
+ reloc_howto_type *howto ATTRIBUTE_UNUSED)
{
return FALSE; /* We don't do relocs for now... */
}
@@ -71,11 +68,8 @@
#include "coffcode.h"
-static const bfd_target *ia64coff_object_p PARAMS ((bfd *));
-
static const bfd_target *
-ia64coff_object_p (abfd)
- bfd *abfd;
+ia64coff_object_p (bfd *abfd)
{
#ifdef COFF_IMAGE_WITH_PE
{
diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c
index b53cc5f..5287beb 100644
--- a/bfd/coff-m68k.c
+++ b/bfd/coff-m68k.c
@@ -1,6 +1,6 @@
/* BFD back-end for Motorola 68000 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
- 2000, 2001, 2002, 2003, 2005, 2007, 2008
+ 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -60,25 +60,19 @@
#define RELOC_SPECIAL_FN 0
#else
static bfd_reloc_status_type m68kcoff_common_addend_special_fn
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static reloc_howto_type *m68kcoff_common_addend_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+
#define RELOC_SPECIAL_FN m68kcoff_common_addend_special_fn
#endif
-static bfd_boolean m68k_coff_is_local_label_name
- PARAMS ((bfd *, const char *));
+static bfd_boolean m68k_coff_is_local_label_name (bfd *, const char *);
/* On the delta, a symbol starting with L% is local. We won't see
such a symbol on other platforms, so it should be safe to always
consider it local here. */
static bfd_boolean
-m68k_coff_is_local_label_name (abfd, name)
- bfd *abfd;
- const char *name;
+m68k_coff_is_local_label_name (bfd *abfd, const char *name)
{
if (name[0] == 'L' && name[1] == '%')
return TRUE;
@@ -121,12 +115,11 @@
/* Turn a howto into a reloc number */
#ifdef ONLY_DECLARE_RELOCS
-extern void m68k_rtype2howto PARAMS ((arelent *internal, int relocentry));
-extern int m68k_howto2rtype PARAMS ((reloc_howto_type *));
-extern reloc_howto_type *m68k_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-extern reloc_howto_type *m68k_reloc_name_lookup
- PARAMS ((bfd *, const char *));
+extern void m68k_rtype2howto (arelent *internal, int relocentry);
+extern int m68k_howto2rtype (reloc_howto_type *);
+extern reloc_howto_type * m68k_reloc_type_lookup
+ (bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type * m68k_reloc_name_lookup (bfd *, const char *);
#else
#ifdef STATIC_RELOCS
@@ -135,16 +128,13 @@
#define STAT_REL
#endif
-STAT_REL reloc_howto_type * m68k_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
-STAT_REL reloc_howto_type * m68k_reloc_name_lookup PARAMS ((bfd *, const char *));
-STAT_REL int m68k_howto2rtype PARAMS ((reloc_howto_type *));
-STAT_REL void m68k_rtype2howto PARAMS ((arelent *, int));
-
+STAT_REL void m68k_rtype2howto (arelent *, int);
+STAT_REL int m68k_howto2rtype (reloc_howto_type *);
+STAT_REL reloc_howto_type * m68k_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
+STAT_REL reloc_howto_type * m68k_reloc_name_lookup (bfd *, const char *);
STAT_REL void
-m68k_rtype2howto(internal, relocentry)
- arelent *internal;
- int relocentry;
+m68k_rtype2howto (arelent *internal, int relocentry)
{
switch (relocentry)
{
@@ -159,8 +149,7 @@
}
STAT_REL int
-m68k_howto2rtype (internal)
- reloc_howto_type *internal;
+m68k_howto2rtype (reloc_howto_type * internal)
{
if (internal->pc_relative)
{
@@ -184,9 +173,8 @@
}
STAT_REL reloc_howto_type *
-m68k_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+m68k_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -235,19 +223,13 @@
#define coff_rtype_to_howto m68kcoff_rtype_to_howto
-static reloc_howto_type *m68kcoff_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-
static reloc_howto_type *
-m68kcoff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+m68kcoff_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
arelent relent;
reloc_howto_type *howto;
@@ -279,15 +261,13 @@
reloc type to make any required adjustments. */
static bfd_reloc_status_type
-m68kcoff_common_addend_special_fn (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+m68kcoff_common_addend_special_fn (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
symvalue diff;
@@ -402,13 +382,12 @@
adjust common symbols. */
static reloc_howto_type *
-m68kcoff_common_addend_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h;
- struct internal_syment *sym;
- bfd_vma *addendp;
+m68kcoff_common_addend_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h,
+ struct internal_syment *sym,
+ bfd_vma *addendp)
{
arelent relent;
reloc_howto_type *howto;
@@ -456,12 +435,11 @@
objects, and before the final_link entry point is called. */
bfd_boolean
-bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *datasec;
- asection *relsec;
- char **errmsg;
+bfd_m68k_coff_create_embedded_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *datasec,
+ asection *relsec,
+ char **errmsg)
{
char *extsyms;
bfd_size_type symesz;
diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c
index 3855b52..e51bd05 100644
--- a/bfd/coff-m88k.c
+++ b/bfd/coff-m88k.c
@@ -1,6 +1,6 @@
/* BFD back-end for Motorola 88000 COFF "Binary Compatibility Standard" files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,12 +28,8 @@
#include "coff/internal.h"
#include "libcoff.h"
-static bfd_boolean m88k_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_reloc_status_type m88k_special_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static void reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
@@ -45,23 +41,19 @@
#define coff_bfd_is_local_label_name m88k_is_local_label_name
static bfd_boolean
-m88k_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+m88k_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
{
return name[0] == '@';
}
static bfd_reloc_status_type
-m88k_special_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+m88k_special_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
reloc_howto_type *howto = reloc_entry->howto;
@@ -236,9 +228,7 @@
/* Code to turn an external r_type into a pointer to an entry in the
above howto table. */
static void
-rtype2howto (cache_ptr, dst)
- arelent *cache_ptr;
- struct internal_reloc *dst;
+rtype2howto (arelent *cache_ptr, struct internal_reloc *dst)
{
if (dst->r_type >= R_PCR16L && dst->r_type <= R_VRT32)
{
@@ -260,12 +250,11 @@
reloc_processing(relent, reloc, symbols, abfd, section)
static void
-reloc_processing (relent, reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+reloc_processing (arelent *relent,
+ struct internal_reloc *reloc,
+ asymbol **symbols,
+ bfd *abfd,
+ asection *section)
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 27b2ec3..9431e46 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, 2011
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -39,19 +39,10 @@
/* This file is compiled more than once, but we only compile the
final_link routine once. */
extern bfd_boolean mcore_bfd_coff_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_reloc_status_type mcore_coff_unsupported_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean coff_mcore_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static reloc_howto_type *mcore_coff_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static reloc_howto_type *coff_mcore_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+
/* The NT loader points the toc register to &toc + 32768, in order to
use the complete range of a 16-bit displacement. We have to adjust
@@ -241,15 +232,13 @@
}
static bfd_reloc_status_type
-mcore_coff_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd * abfd;
- arelent * reloc_entry;
- asymbol * symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection * input_section ATTRIBUTE_UNUSED;
- bfd * output_bfd ATTRIBUTE_UNUSED;
- char ** error_message ATTRIBUTE_UNUSED;
+mcore_coff_unsupported_reloc (bfd * abfd,
+ arelent * reloc_entry,
+ asymbol * symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection * input_section ATTRIBUTE_UNUSED,
+ bfd * output_bfd ATTRIBUTE_UNUSED,
+ char ** error_message ATTRIBUTE_UNUSED)
{
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
@@ -266,9 +255,8 @@
case bfd_rtype: return & mcore_coff_howto_table [mcore_rtype]
static reloc_howto_type *
-mcore_coff_reloc_type_lookup (abfd, code)
- bfd * abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+mcore_coff_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -307,13 +295,12 @@
(cache_ptr)->howto = mcore_coff_howto_table + (dst)->r_type;
static reloc_howto_type *
-coff_mcore_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd * abfd ATTRIBUTE_UNUSED;
- asection * sec;
- struct internal_reloc * rel;
- struct coff_link_hash_entry * h ATTRIBUTE_UNUSED;
- struct internal_syment * sym;
- bfd_vma * addendp;
+coff_mcore_rtype_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * sec,
+ struct internal_reloc * rel,
+ struct coff_link_hash_entry * h ATTRIBUTE_UNUSED,
+ struct internal_syment * sym,
+ bfd_vma * addendp)
{
reloc_howto_type * howto;
@@ -348,25 +335,21 @@
This function is referenced in pe_mkobject in peicode.h. */
static bfd_boolean
-in_reloc_p (abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type * howto;
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto)
{
return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA;
}
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
-coff_mcore_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;
+coff_mcore_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;
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 4048ca8..ec4d1a5 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, 2011
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, [email protected].
@@ -35,37 +35,19 @@
#include "libecoff.h"
/* Prototypes for static functions. */
+static bfd_reloc_status_type
+mips_generic_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type
+mips_refhi_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type
+mips_reflo_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type
+mips_gprel_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_boolean mips_ecoff_bad_format_hook
- PARAMS ((bfd *abfd, PTR filehdr));
-static void mips_ecoff_swap_reloc_in
- PARAMS ((bfd *, PTR, struct internal_reloc *));
-static void mips_ecoff_swap_reloc_out
- PARAMS ((bfd *, const struct internal_reloc *, PTR));
-static void mips_adjust_reloc_in
- PARAMS ((bfd *, const struct internal_reloc *, arelent *));
-static void mips_adjust_reloc_out
- PARAMS ((bfd *, const arelent *, struct internal_reloc *));
-static bfd_reloc_status_type mips_generic_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_refhi_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_reflo_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_gprel_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static void mips_relocate_hi
- PARAMS ((struct internal_reloc *refhi, struct internal_reloc *reflo,
- bfd *input_bfd, asection *input_section, bfd_byte *contents,
- bfd_vma relocation));
-static bfd_boolean mips_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
-static reloc_howto_type *mips_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
/* ECOFF has COFF sections, but the debugging information is stored in
a completely different format. ECOFF targets use some of the
@@ -79,12 +61,12 @@
#define NO_COFF_RELOCS
#define NO_COFF_SYMBOLS
#define NO_COFF_LINENOS
-#define coff_swap_filehdr_in mips_ecoff_swap_filehdr_in
+#define coff_swap_filehdr_in mips_ecoff_swap_filehdr_in
#define coff_swap_filehdr_out mips_ecoff_swap_filehdr_out
-#define coff_swap_aouthdr_in mips_ecoff_swap_aouthdr_in
+#define coff_swap_aouthdr_in mips_ecoff_swap_aouthdr_in
#define coff_swap_aouthdr_out mips_ecoff_swap_aouthdr_out
-#define coff_swap_scnhdr_in mips_ecoff_swap_scnhdr_in
-#define coff_swap_scnhdr_out mips_ecoff_swap_scnhdr_out
+#define coff_swap_scnhdr_in mips_ecoff_swap_scnhdr_in
+#define coff_swap_scnhdr_out mips_ecoff_swap_scnhdr_out
#include "coffswap.h"
@@ -253,9 +235,7 @@
/* See whether the magic number matches. */
static bfd_boolean
-mips_ecoff_bad_format_hook (abfd, filehdr)
- bfd *abfd;
- PTR filehdr;
+mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -287,10 +267,9 @@
/* Swap a reloc in. */
static void
-mips_ecoff_swap_reloc_in (abfd, ext_ptr, intern)
- bfd *abfd;
- PTR ext_ptr;
- struct internal_reloc *intern;
+mips_ecoff_swap_reloc_in (bfd * abfd,
+ void * ext_ptr,
+ struct internal_reloc *intern)
{
const RELOC *ext = (RELOC *) ext_ptr;
@@ -326,10 +305,9 @@
/* Swap a reloc out. */
static void
-mips_ecoff_swap_reloc_out (abfd, intern, dst)
- bfd *abfd;
- const struct internal_reloc *intern;
- PTR dst;
+mips_ecoff_swap_reloc_out (bfd * abfd,
+ const struct internal_reloc * intern,
+ void * dst)
{
RELOC *ext = (RELOC *) dst;
long r_symndx;
@@ -367,10 +345,9 @@
this backend routine. It must fill in the howto field. */
static void
-mips_adjust_reloc_in (abfd, intern, rptr)
- bfd *abfd;
- const struct internal_reloc *intern;
- arelent *rptr;
+mips_adjust_reloc_in (bfd *abfd,
+ const struct internal_reloc *intern,
+ arelent *rptr)
{
if (intern->r_type > MIPS_R_PCREL16)
abort ();
@@ -392,10 +369,9 @@
are needed for MIPS. */
static void
-mips_adjust_reloc_out (abfd, rel, intern)
- bfd *abfd ATTRIBUTE_UNUSED;
- const arelent *rel ATTRIBUTE_UNUSED;
- struct internal_reloc *intern ATTRIBUTE_UNUSED;
+mips_adjust_reloc_out (bfd *abfd ATTRIBUTE_UNUSED,
+ const arelent *rel ATTRIBUTE_UNUSED,
+ struct internal_reloc *intern ATTRIBUTE_UNUSED)
{
}
@@ -411,20 +387,13 @@
relocatable output against an external symbol. */
static bfd_reloc_status_type
-mips_generic_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+mips_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -458,20 +427,13 @@
static struct mips_hi *mips_refhi_list;
static bfd_reloc_status_type
-mips_refhi_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+mips_refhi_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_reloc_status_type ret;
bfd_vma relocation;
@@ -524,20 +486,13 @@
relocation described above. */
static bfd_reloc_status_type
-mips_reflo_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+mips_reflo_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (mips_refhi_list != NULL)
{
@@ -592,20 +547,13 @@
the offset from the gp register. */
static bfd_reloc_status_type
-mips_gprel_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_boolean relocatable;
bfd_vma gp;
@@ -732,9 +680,8 @@
/* Get the howto structure for a generic reloc type. */
static reloc_howto_type *
-mips_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+mips_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
int mips_type;
@@ -794,14 +741,12 @@
instructions. */
static void
-mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents,
- relocation)
- struct internal_reloc *refhi;
- struct internal_reloc *reflo;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma relocation;
+mips_relocate_hi (struct internal_reloc *refhi,
+ struct internal_reloc *reflo,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ bfd_vma relocation)
{
unsigned long insn;
unsigned long val;
@@ -841,14 +786,12 @@
/* Relocate a section while linking a MIPS ECOFF file. */
static bfd_boolean
-mips_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, external_relocs)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- PTR external_relocs;
+mips_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ void * external_relocs)
{
asection **symndx_to_section;
struct ecoff_link_hash_entry **sym_hashes;
@@ -928,7 +871,7 @@
bfd_reloc_status_type r;
if (! got_lo)
- mips_ecoff_swap_reloc_in (input_bfd, (PTR) ext_rel, &int_rel);
+ mips_ecoff_swap_reloc_in (input_bfd, ext_rel, &int_rel);
else
{
int_rel = lo_int_rel;
@@ -951,7 +894,7 @@
lo_ext_rel < ext_rel_end;
lo_ext_rel++)
{
- mips_ecoff_swap_reloc_in (input_bfd, (PTR) lo_ext_rel,
+ mips_ecoff_swap_reloc_in (input_bfd, lo_ext_rel,
&lo_int_rel);
if (lo_int_rel.r_type != int_rel.r_type)
break;
@@ -1190,7 +1133,7 @@
- input_section->vma);
/* Save the changed reloc information. */
- mips_ecoff_swap_reloc_out (input_bfd, &int_rel, (PTR) ext_rel);
+ mips_ecoff_swap_reloc_out (input_bfd, &int_rel, ext_rel);
}
else
{
@@ -1303,16 +1246,16 @@
{
/* COFF backend structure. */
{
- (void (*) PARAMS ((bfd *,PTR,int,int,int,int,PTR))) bfd_void, /* aux_in */
- (void (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_in */
- (void (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_in */
- (unsigned (*) PARAMS ((bfd *,PTR,int,int,int,int,PTR)))bfd_void,/*aux_out*/
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_out */
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_out */
- (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
+ (void (*) (bfd *,void *,int,int,int,int,void *)) bfd_void, /* aux_in */
+ (void (*) (bfd *,void *,void *)) bfd_void, /* sym_in */
+ (void (*) (bfd *,void *,void *)) bfd_void, /* lineno_in */
+ (unsigned (*) (bfd *,void *,int,int,int,int,void *)) bfd_void,/*aux_out*/
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* sym_out */
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* lineno_out */
+ (unsigned (*) (bfd *,void *,void *)) bfd_void, /* reloc_out */
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2,
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
mips_ecoff_swap_scnhdr_in, NULL,
@@ -1466,7 +1409,7 @@
& ecoff_big_vec,
- (PTR) &mips_ecoff_backend_data
+ & mips_ecoff_backend_data
};
const bfd_target ecoff_big_vec =
@@ -1510,7 +1453,7 @@
& ecoff_little_vec,
- (PTR) &mips_ecoff_backend_data
+ & mips_ecoff_backend_data
};
const bfd_target ecoff_biglittle_vec =
@@ -1555,5 +1498,5 @@
NULL,
- (PTR) &mips_ecoff_backend_data
+ & mips_ecoff_backend_data
};
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index a9683df..18835e1 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, 2011
+ Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
Contributed by Ivan Guzvinec <[email protected]>
@@ -29,18 +29,8 @@
#include "coff/internal.h"
#include "libcoff.h"
-static long get_symbol_value
- PARAMS ((asymbol *));
static bfd_reloc_status_type or32_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean coff_or32_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static bfd_boolean coff_or32_adjust_symndx
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
-static void reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
@@ -61,8 +51,7 @@
/* Provided the symbol, returns the value reffed. */
static long
-get_symbol_value (symbol)
- asymbol *symbol;
+get_symbol_value (asymbol *symbol)
{
long relocation = 0;
@@ -79,15 +68,13 @@
/* This function is in charge of performing all the or32 relocations. */
static bfd_reloc_status_type
-or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+or32_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol_in,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
/* The consth relocation comes in two parts, we have to remember
the state between calls, in these variables. */
@@ -289,12 +276,11 @@
reloc_processing (relent, reloc, symbols, abfd, section)
static void
-reloc_processing (relent,reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+reloc_processing (arelent *relent,
+ struct internal_reloc *reloc,
+ asymbol **symbols,
+ bfd *abfd,
+ asection *section)
{
static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
@@ -333,16 +319,14 @@
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
-coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, syms, sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+coff_or32_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ 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;
@@ -554,13 +538,12 @@
is actually an addend, not a symbol index at all. */
static bfd_boolean
-coff_or32_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *ibfd ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- struct internal_reloc *irel;
- bfd_boolean *adjustedp;
+coff_or32_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *ibfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ struct internal_reloc *irel,
+ bfd_boolean *adjustedp)
{
if (irel->r_type == R_IHCONST)
*adjustedp = TRUE;
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index b37a224..eb1aa81 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1,7 +1,7 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila ([email protected])
@@ -52,9 +52,8 @@
/* This file is compiled more than once, but we only compile the
final_link routine once. */
-extern bfd_boolean ppc_bfd_coff_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-extern void dump_toc PARAMS ((PTR));
+extern bfd_boolean ppc_bfd_coff_final_link (bfd *, struct bfd_link_info *);
+extern void dump_toc (void *);
/* The toc is a set of bfd_vma fields. We use the fact that valid
addresses are even (i.e. the bit representing "1" is off) to allow
@@ -123,26 +122,12 @@
struct coff_link_hash_table root; /* First entry, as required. */
};
-static struct bfd_hash_entry *ppc_coff_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *));
-static struct bfd_link_hash_table *ppc_coff_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_boolean coff_ppc_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static reloc_howto_type *coff_ppc_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-
/* Routine to create an entry in the link hash table. */
static struct bfd_hash_entry *
-ppc_coff_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+ppc_coff_link_hash_newfunc (struct bfd_hash_entry * entry,
+ struct bfd_hash_table * table,
+ const char * string)
{
struct ppc_coff_link_hash_entry *ret =
(struct ppc_coff_link_hash_entry *) entry;
@@ -180,9 +165,10 @@
static bfd_boolean
ppc_coff_link_hash_table_init (struct ppc_coff_link_hash_table *table,
bfd *abfd,
- struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
+ struct bfd_hash_entry *(*newfunc)
+ (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
unsigned int entsize)
{
return _bfd_coff_link_hash_table_init (&table->root, abfd, newfunc, entsize);
@@ -191,8 +177,7 @@
/* Create a PE linker hash table. */
static struct bfd_link_hash_table *
-ppc_coff_link_hash_table_create (abfd)
- bfd *abfd;
+ppc_coff_link_hash_table_create (bfd *abfd)
{
struct ppc_coff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct ppc_coff_link_hash_table);
@@ -314,60 +299,24 @@
/* Static helper functions to make relocation work. */
/* (Work In Progress) */
-static bfd_reloc_status_type ppc_refhi_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-
-static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
+static bfd_reloc_status_type ppc_refhi_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc_pair_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc_toc16_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc_section_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc_secrel_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc_imglue_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type ppc_section_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-
-static bfd_reloc_status_type ppc_secrel_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-
-static bfd_reloc_status_type ppc_imglue_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-
-static bfd_boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
-
/* FIXME: It'll take a while to get through all of these. I only need a few to
get us started, so those I'll make sure work. Those marked FIXME are either
completely unverified or have a specific unknown marked in the comment. */
-/* Relocation entries for Windows/NT on PowerPC.
+/* Relocation entries for Windows/NT on PowerPC.
From the document "" we find the following listed as used relocs:
@@ -816,15 +765,11 @@
extern struct list_ele *head;
extern struct list_ele *tail;
-static void record_toc
- PARAMS ((asection *, bfd_signed_vma, enum ref_category, const char *));
-
static void
-record_toc (toc_section, our_toc_offset, cat, name)
- asection *toc_section;
- bfd_signed_vma our_toc_offset;
- enum ref_category cat;
- const char *name;
+record_toc (asection *toc_section,
+ bfd_signed_vma our_toc_offset,
+ enum ref_category cat,
+ const char *name)
{
/* Add this entry to our toc addr-offset-name list. */
bfd_size_type amt = sizeof (struct list_ele);
@@ -852,19 +797,13 @@
#ifdef COFF_IMAGE_WITH_PE
-static bfd_boolean ppc_record_toc_entry
- PARAMS ((bfd *, struct bfd_link_info *, asection *, int, enum toc_type));
-static void ppc_mark_symbol_as_glue
- PARAMS ((bfd *, int, struct internal_reloc *));
-
/* Record a toc offset against a symbol. */
static bfd_boolean
-ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- int sym;
- enum toc_type toc_kind ATTRIBUTE_UNUSED;
+ppc_record_toc_entry (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ int sym,
+ enum toc_type toc_kind ATTRIBUTE_UNUSED)
{
struct ppc_coff_link_hash_entry *h;
int *local_syms;
@@ -937,10 +876,9 @@
/* Record a toc offset against a symbol. */
static void
-ppc_mark_symbol_as_glue(abfd, sym, rel)
- bfd *abfd;
- int sym;
- struct internal_reloc *rel;
+ppc_mark_symbol_as_glue (bfd *abfd,
+ int sym,
+ struct internal_reloc *rel)
{
struct ppc_coff_link_hash_entry *h;
@@ -959,9 +897,9 @@
/* Return TRUE if this relocation should
appear in the output .reloc section. */
-static bfd_boolean in_reloc_p(abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type *howto;
+static bfd_boolean
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
+ reloc_howto_type *howto)
{
return
(! howto->pc_relative)
@@ -993,16 +931,14 @@
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
-coff_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;
+coff_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;
@@ -1264,7 +1200,7 @@
{
/* To solve this, we need to know whether or not the symbol
appearing on the call instruction is a glue function or not.
- A glue function must announce itself via a IMGLUE reloc, and
+ A glue function must announce itself via a IMGLUE reloc, and
the reloc contains the required toc restore instruction. */
DUMP_RELOC2 (howto->name, rel);
@@ -1523,8 +1459,7 @@
h3 = N_(" Offset spelling (if present)\n");
void
-dump_toc (vfile)
- PTR vfile;
+dump_toc (void * vfile)
{
FILE *file = (FILE *) vfile;
struct list_ele *t;
@@ -1570,8 +1505,7 @@
}
bfd_boolean
-ppc_allocate_toc_section (info)
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ppc_allocate_toc_section (struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
bfd_byte *foo;
@@ -1601,9 +1535,8 @@
}
bfd_boolean
-ppc_process_before_allocation (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+ppc_process_before_allocation (bfd *abfd,
+ struct bfd_link_info *info)
{
asection *sec;
struct internal_reloc *i, *rel;
@@ -1664,15 +1597,13 @@
#endif
static bfd_reloc_status_type
-ppc_refhi_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_refhi_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
UN_IMPL("REFHI");
DUMP_RELOC("REFHI",reloc_entry);
@@ -1684,15 +1615,13 @@
}
static bfd_reloc_status_type
-ppc_pair_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_pair_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
UN_IMPL("PAIR");
DUMP_RELOC("PAIR",reloc_entry);
@@ -1702,17 +1631,15 @@
return bfd_reloc_undefined;
}
-
+
static bfd_reloc_status_type
-ppc_toc16_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_toc16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
UN_IMPL ("TOCREL16");
DUMP_RELOC ("TOCREL16",reloc_entry);
@@ -1724,15 +1651,13 @@
}
static bfd_reloc_status_type
-ppc_secrel_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_secrel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
UN_IMPL("SECREL");
DUMP_RELOC("SECREL",reloc_entry);
@@ -1744,15 +1669,13 @@
}
static bfd_reloc_status_type
-ppc_section_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_section_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
UN_IMPL("SECTION");
DUMP_RELOC("SECTION",reloc_entry);
@@ -1764,15 +1687,14 @@
}
static bfd_reloc_status_type
-ppc_imglue_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_imglue_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+
{
UN_IMPL("IMGLUE");
DUMP_RELOC("IMGLUE",reloc_entry);
@@ -1789,12 +1711,9 @@
/* FIXME: There is a possibility that when we read in a reloc from a file,
that there are some bits encoded in the upper portion of the
type field. Not yet implemented. */
-static void ppc_coff_rtype2howto PARAMS ((arelent *, struct internal_reloc *));
static void
-ppc_coff_rtype2howto (relent, internal)
- arelent *relent;
- struct internal_reloc *internal;
+ppc_coff_rtype2howto (arelent *relent, struct internal_reloc *internal)
{
/* We can encode one of three things in the type field, aside from the
type:
@@ -1854,13 +1773,12 @@
}
static reloc_howto_type *
-coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+coff_ppc_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
reloc_howto_type *howto;
@@ -1929,13 +1847,9 @@
#define HOW2MAP(bfd_rtype,ppc_rtype) \
case bfd_rtype: return &ppc_coff_howto_table[ppc_rtype]
-static reloc_howto_type *ppc_coff_reloc_type_lookup
-PARAMS ((bfd *, bfd_reloc_code_real_type));
-
static reloc_howto_type *
-ppc_coff_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+ppc_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -2012,12 +1926,8 @@
#ifndef COFF_IMAGE_WITH_PE
-static bfd_boolean ppc_do_last PARAMS ((bfd *));
-static bfd *ppc_get_last PARAMS ((void));
-
static bfd_boolean
-ppc_do_last (abfd)
- bfd *abfd;
+ppc_do_last (bfd *abfd)
{
if (abfd == bfd_of_toc_owner)
return TRUE;
@@ -2026,7 +1936,7 @@
}
static bfd *
-ppc_get_last()
+ppc_get_last (void)
{
return bfd_of_toc_owner;
}
@@ -2045,12 +1955,10 @@
/* Do the final link step. */
bfd_boolean
-ppc_bfd_coff_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+ppc_bfd_coff_final_link (bfd *abfd, struct bfd_link_info *info)
{
bfd_size_type symesz;
- struct coff_final_link_info finfo;
+ struct coff_final_link_info flaginfo;
bfd_boolean debug_merge_allocated;
asection *o;
struct bfd_link_order *p;
@@ -2070,29 +1978,29 @@
symesz = bfd_coff_symesz (abfd);
- finfo.info = info;
- finfo.output_bfd = abfd;
- finfo.strtab = NULL;
- finfo.section_info = NULL;
- finfo.last_file_index = -1;
- finfo.last_bf_index = -1;
- finfo.internal_syms = NULL;
- finfo.sec_ptrs = NULL;
- finfo.sym_indices = NULL;
- finfo.outsyms = NULL;
- finfo.linenos = NULL;
- finfo.contents = NULL;
- finfo.external_relocs = NULL;
- finfo.internal_relocs = NULL;
+ flaginfo.info = info;
+ flaginfo.output_bfd = abfd;
+ flaginfo.strtab = NULL;
+ flaginfo.section_info = NULL;
+ flaginfo.last_file_index = -1;
+ flaginfo.last_bf_index = -1;
+ flaginfo.internal_syms = NULL;
+ flaginfo.sec_ptrs = NULL;
+ flaginfo.sym_indices = NULL;
+ flaginfo.outsyms = NULL;
+ flaginfo.linenos = NULL;
+ flaginfo.contents = NULL;
+ flaginfo.external_relocs = NULL;
+ flaginfo.internal_relocs = NULL;
debug_merge_allocated = FALSE;
coff_data (abfd)->link_info = info;
- finfo.strtab = _bfd_stringtab_init ();
- if (finfo.strtab == NULL)
+ flaginfo.strtab = _bfd_stringtab_init ();
+ if (flaginfo.strtab == NULL)
goto error_return;
- if (! coff_debug_merge_hash_table_init (&finfo.debug_merge))
+ if (! coff_debug_merge_hash_table_init (&flaginfo.debug_merge))
goto error_return;
debug_merge_allocated = TRUE;
@@ -2171,15 +2079,15 @@
the target_index fields are 1 based. */
amt = abfd->section_count + 1;
amt *= sizeof (struct coff_link_section_info);
- finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
+ flaginfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
- if (finfo.section_info == NULL)
+ if (flaginfo.section_info == NULL)
goto error_return;
for (i = 0; i <= abfd->section_count; i++)
{
- finfo.section_info[i].relocs = NULL;
- finfo.section_info[i].rel_hashes = NULL;
+ flaginfo.section_info[i].relocs = NULL;
+ flaginfo.section_info[i].rel_hashes = NULL;
}
}
@@ -2217,14 +2125,14 @@
BFD_ASSERT (info->relocatable);
amt = o->reloc_count;
amt *= sizeof (struct internal_reloc);
- finfo.section_info[o->target_index].relocs =
+ flaginfo.section_info[o->target_index].relocs =
(struct internal_reloc *) bfd_malloc (amt);
amt = o->reloc_count;
amt *= sizeof (struct coff_link_hash_entry *);
- finfo.section_info[o->target_index].rel_hashes =
+ flaginfo.section_info[o->target_index].rel_hashes =
(struct coff_link_hash_entry **) bfd_malloc (amt);
- if (finfo.section_info[o->target_index].relocs == NULL
- || finfo.section_info[o->target_index].rel_hashes == NULL)
+ if (flaginfo.section_info[o->target_index].relocs == NULL
+ || flaginfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
if (o->reloc_count > max_output_reloc_count)
@@ -2255,31 +2163,31 @@
/* Allocate some buffers used while linking. */
amt = max_sym_count * sizeof (struct internal_syment);
- finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
+ flaginfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
amt = max_sym_count * sizeof (asection *);
- finfo.sec_ptrs = (asection **) bfd_malloc (amt);
+ flaginfo.sec_ptrs = (asection **) bfd_malloc (amt);
amt = max_sym_count * sizeof (long);
- finfo.sym_indices = (long *) bfd_malloc (amt);
+ flaginfo.sym_indices = (long *) bfd_malloc (amt);
amt = (max_sym_count + 1) * symesz;
- finfo.outsyms = (bfd_byte *) bfd_malloc (amt);
+ flaginfo.outsyms = (bfd_byte *) bfd_malloc (amt);
amt = max_lineno_count * bfd_coff_linesz (abfd);
- finfo.linenos = (bfd_byte *) bfd_malloc (amt);
- finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
- finfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
+ flaginfo.linenos = (bfd_byte *) bfd_malloc (amt);
+ flaginfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
+ flaginfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
if (! info->relocatable)
{
amt = max_reloc_count * sizeof (struct internal_reloc);
- finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
+ flaginfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
}
- if ((finfo.internal_syms == NULL && max_sym_count > 0)
- || (finfo.sec_ptrs == NULL && max_sym_count > 0)
- || (finfo.sym_indices == NULL && max_sym_count > 0)
- || finfo.outsyms == NULL
- || (finfo.linenos == NULL && max_lineno_count > 0)
- || (finfo.contents == NULL && max_contents_size > 0)
- || (finfo.external_relocs == NULL && max_reloc_count > 0)
+ if ((flaginfo.internal_syms == NULL && max_sym_count > 0)
+ || (flaginfo.sec_ptrs == NULL && max_sym_count > 0)
+ || (flaginfo.sym_indices == NULL && max_sym_count > 0)
+ || flaginfo.outsyms == NULL
+ || (flaginfo.linenos == NULL && max_lineno_count > 0)
+ || (flaginfo.contents == NULL && max_contents_size > 0)
+ || (flaginfo.external_relocs == NULL && max_reloc_count > 0)
|| (! info->relocatable
- && finfo.internal_relocs == NULL
+ && flaginfo.internal_relocs == NULL
&& max_reloc_count > 0))
goto error_return;
@@ -2311,7 +2219,7 @@
if (! sub->output_has_begun)
#endif
{
- if (! _bfd_coff_link_input_bfd (&finfo, sub))
+ if (! _bfd_coff_link_input_bfd (&flaginfo, sub))
goto error_return;
sub->output_has_begun = TRUE;
}
@@ -2319,7 +2227,7 @@
else if (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order)
{
- if (! _bfd_coff_reloc_link_order (abfd, &finfo, o, p))
+ if (! _bfd_coff_reloc_link_order (abfd, &flaginfo, o, p))
goto error_return;
}
else
@@ -2335,7 +2243,7 @@
bfd* last_one = ppc_get_last();
if (last_one)
{
- if (! _bfd_coff_link_input_bfd (&finfo, last_one))
+ if (! _bfd_coff_link_input_bfd (&flaginfo, last_one))
goto error_return;
}
last_one->output_has_begun = TRUE;
@@ -2343,73 +2251,73 @@
#endif
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
- coff_debug_merge_hash_table_free (&finfo.debug_merge);
+ coff_debug_merge_hash_table_free (&flaginfo.debug_merge);
debug_merge_allocated = FALSE;
- if (finfo.internal_syms != NULL)
+ if (flaginfo.internal_syms != NULL)
{
- free (finfo.internal_syms);
- finfo.internal_syms = NULL;
+ free (flaginfo.internal_syms);
+ flaginfo.internal_syms = NULL;
}
- if (finfo.sec_ptrs != NULL)
+ if (flaginfo.sec_ptrs != NULL)
{
- free (finfo.sec_ptrs);
- finfo.sec_ptrs = NULL;
+ free (flaginfo.sec_ptrs);
+ flaginfo.sec_ptrs = NULL;
}
- if (finfo.sym_indices != NULL)
+ if (flaginfo.sym_indices != NULL)
{
- free (finfo.sym_indices);
- finfo.sym_indices = NULL;
+ free (flaginfo.sym_indices);
+ flaginfo.sym_indices = NULL;
}
- if (finfo.linenos != NULL)
+ if (flaginfo.linenos != NULL)
{
- free (finfo.linenos);
- finfo.linenos = NULL;
+ free (flaginfo.linenos);
+ flaginfo.linenos = NULL;
}
- if (finfo.contents != NULL)
+ if (flaginfo.contents != NULL)
{
- free (finfo.contents);
- finfo.contents = NULL;
+ free (flaginfo.contents);
+ flaginfo.contents = NULL;
}
- if (finfo.external_relocs != NULL)
+ if (flaginfo.external_relocs != NULL)
{
- free (finfo.external_relocs);
- finfo.external_relocs = NULL;
+ free (flaginfo.external_relocs);
+ flaginfo.external_relocs = NULL;
}
- if (finfo.internal_relocs != NULL)
+ if (flaginfo.internal_relocs != NULL)
{
- free (finfo.internal_relocs);
- finfo.internal_relocs = NULL;
+ free (flaginfo.internal_relocs);
+ flaginfo.internal_relocs = NULL;
}
/* The value of the last C_FILE symbol is supposed to be the symbol
index of the first external symbol. Write it out again if
necessary. */
- if (finfo.last_file_index != -1
- && (unsigned int) finfo.last_file.n_value != obj_raw_syment_count (abfd))
+ if (flaginfo.last_file_index != -1
+ && (unsigned int) flaginfo.last_file.n_value != obj_raw_syment_count (abfd))
{
file_ptr pos;
- finfo.last_file.n_value = obj_raw_syment_count (abfd);
- bfd_coff_swap_sym_out (abfd, (PTR) &finfo.last_file,
- (PTR) finfo.outsyms);
- pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
+ flaginfo.last_file.n_value = obj_raw_syment_count (abfd);
+ bfd_coff_swap_sym_out (abfd, &flaginfo.last_file,
+ flaginfo.outsyms);
+ pos = obj_sym_filepos (abfd) + flaginfo.last_file_index * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
+ || bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz)
return FALSE;
}
/* Write out the global symbols. */
- finfo.failed = FALSE;
- bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
- if (finfo.failed)
+ flaginfo.failed = FALSE;
+ bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &flaginfo);
+ if (flaginfo.failed)
goto error_return;
/* The outsyms buffer is used by _bfd_coff_write_global_sym. */
- if (finfo.outsyms != NULL)
+ if (flaginfo.outsyms != NULL)
{
- free (finfo.outsyms);
- finfo.outsyms = NULL;
+ free (flaginfo.outsyms);
+ flaginfo.outsyms = NULL;
}
if (info->relocatable)
@@ -2432,9 +2340,9 @@
if (o->reloc_count == 0)
continue;
- irel = finfo.section_info[o->target_index].relocs;
+ irel = flaginfo.section_info[o->target_index].relocs;
irelend = irel + o->reloc_count;
- rel_hash = finfo.section_info[o->target_index].rel_hashes;
+ rel_hash = flaginfo.section_info[o->target_index].rel_hashes;
erel = external_relocs;
for (; irel < irelend; irel++, rel_hash++, erel += relsz)
{
@@ -2443,12 +2351,12 @@
BFD_ASSERT ((*rel_hash)->indx >= 0);
irel->r_symndx = (*rel_hash)->indx;
}
- bfd_coff_swap_reloc_out (abfd, (PTR) irel, (PTR) erel);
+ bfd_coff_swap_reloc_out (abfd, irel, erel);
}
amt = relsz * o->reloc_count;
if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || bfd_bwrite ((PTR) external_relocs, amt, abfd) != amt)
+ || bfd_bwrite (external_relocs, amt, abfd) != amt)
goto error_return;
}
@@ -2457,19 +2365,19 @@
}
/* Free up the section information. */
- if (finfo.section_info != NULL)
+ if (flaginfo.section_info != NULL)
{
unsigned int i;
for (i = 0; i < abfd->section_count; i++)
{
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
+ if (flaginfo.section_info[i].relocs != NULL)
+ free (flaginfo.section_info[i].relocs);
+ if (flaginfo.section_info[i].rel_hashes != NULL)
+ free (flaginfo.section_info[i].rel_hashes);
}
- free (finfo.section_info);
- finfo.section_info = NULL;
+ free (flaginfo.section_info);
+ flaginfo.section_info = NULL;
}
/* If we have optimized stabs strings, output them. */
@@ -2490,7 +2398,7 @@
#if STRING_SIZE_SIZE == 4
H_PUT_32 (abfd,
- _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ _bfd_stringtab_size (flaginfo.strtab) + STRING_SIZE_SIZE,
strbuf);
#else
#error Change H_PUT_32 above
@@ -2500,11 +2408,11 @@
!= STRING_SIZE_SIZE)
return FALSE;
- if (! _bfd_stringtab_emit (abfd, finfo.strtab))
+ if (! _bfd_stringtab_emit (abfd, flaginfo.strtab))
return FALSE;
}
- _bfd_stringtab_free (finfo.strtab);
+ _bfd_stringtab_free (flaginfo.strtab);
/* Setting bfd_get_symcount to 0 will cause write_object_contents to
not try to write out the symbols. */
@@ -2514,38 +2422,38 @@
error_return:
if (debug_merge_allocated)
- coff_debug_merge_hash_table_free (&finfo.debug_merge);
- if (finfo.strtab != NULL)
- _bfd_stringtab_free (finfo.strtab);
- if (finfo.section_info != NULL)
+ coff_debug_merge_hash_table_free (&flaginfo.debug_merge);
+ if (flaginfo.strtab != NULL)
+ _bfd_stringtab_free (flaginfo.strtab);
+ if (flaginfo.section_info != NULL)
{
unsigned int i;
for (i = 0; i < abfd->section_count; i++)
{
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
+ if (flaginfo.section_info[i].relocs != NULL)
+ free (flaginfo.section_info[i].relocs);
+ if (flaginfo.section_info[i].rel_hashes != NULL)
+ free (flaginfo.section_info[i].rel_hashes);
}
- free (finfo.section_info);
+ free (flaginfo.section_info);
}
- if (finfo.internal_syms != NULL)
- free (finfo.internal_syms);
- if (finfo.sec_ptrs != NULL)
- free (finfo.sec_ptrs);
- if (finfo.sym_indices != NULL)
- free (finfo.sym_indices);
- if (finfo.outsyms != NULL)
- free (finfo.outsyms);
- if (finfo.linenos != NULL)
- free (finfo.linenos);
- if (finfo.contents != NULL)
- free (finfo.contents);
- if (finfo.external_relocs != NULL)
- free (finfo.external_relocs);
- if (finfo.internal_relocs != NULL)
- free (finfo.internal_relocs);
+ if (flaginfo.internal_syms != NULL)
+ free (flaginfo.internal_syms);
+ if (flaginfo.sec_ptrs != NULL)
+ free (flaginfo.sec_ptrs);
+ if (flaginfo.sym_indices != NULL)
+ free (flaginfo.sym_indices);
+ if (flaginfo.outsyms != NULL)
+ free (flaginfo.outsyms);
+ if (flaginfo.linenos != NULL)
+ free (flaginfo.linenos);
+ if (flaginfo.contents != NULL)
+ free (flaginfo.contents);
+ if (flaginfo.external_relocs != NULL)
+ free (flaginfo.external_relocs);
+ if (flaginfo.internal_relocs != NULL)
+ free (flaginfo.internal_relocs);
if (external_relocs != NULL)
free (external_relocs);
return FALSE;
@@ -2572,10 +2480,11 @@
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_RELOC), /* section flags */
#else
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_RELOC | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
#endif
0, /* leading char */
@@ -2632,10 +2541,11 @@
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_RELOC), /* section flags */
#else
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_RELOC | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
#endif
0, /* leading char */
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 035812e..0386e9a 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, 2011
+ 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
Archive support from Damon A. Permezel.
@@ -24,6 +24,7 @@
MA 02110-1301, USA. */
#include "sysdep.h"
+#include "libiberty.h"
#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
@@ -40,20 +41,20 @@
(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 void * _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
(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 void _bfd_xcoff_swap_sym_in (bfd *, void *, void *);
+extern unsigned int _bfd_xcoff_swap_sym_out (bfd *, void *, void *);
+extern void _bfd_xcoff_swap_aux_in (bfd *, void *, int, int, int, int, void *);
extern unsigned int _bfd_xcoff_swap_aux_out
- (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);
+ (bfd *, void *, int, int, int, int, void *);
+static void xcoff_swap_reloc_in (bfd *, void *, void *);
+static unsigned int xcoff_swap_reloc_out (bfd *, void *, void *);
/* Forward declare xcoff_rtype2howto for coffcode.h macro. */
void xcoff_rtype2howto (arelent *, struct internal_reloc *);
@@ -129,12 +130,12 @@
(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 void xcoff_swap_ldhdr_in (bfd *, const void *, struct internal_ldhdr *);
+static void xcoff_swap_ldhdr_out (bfd *, const struct internal_ldhdr *, void *);
+static void xcoff_swap_ldsym_in (bfd *, const void *, struct internal_ldsym *);
+static void xcoff_swap_ldsym_out (bfd *, const struct internal_ldsym *, void *);
+static void xcoff_swap_ldrel_in (bfd *, const void *, struct internal_ldrel *);
+static void xcoff_swap_ldrel_out (bfd *, const struct internal_ldrel *, void *);
static bfd_boolean xcoff_ppc_relocate_section
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **);
@@ -405,9 +406,70 @@
{
return FALSE;
}
+
+static const struct dwarf_debug_section xcoff_debug_sections[] =
+{
+ { ".dwabrev", NULL },
+ { ".dwarnge", NULL },
+ { NULL, NULL }, /* .debug_frame */
+ { ".dwinfo", NULL },
+ { ".dwline", NULL },
+ { NULL, NULL }, /* .debug_loc */
+ { NULL, NULL }, /* .debug_macinfo */
+ { NULL, NULL }, /* .debug_macro */
+ { ".dwpbnms", NULL },
+ { ".dwpbtyp", NULL },
+ { ".dwrnges", NULL },
+ { NULL, NULL }, /* .debug_static_func */
+ { NULL, NULL }, /* .debug_static_vars */
+ { ".dwstr", NULL },
+ { NULL, NULL }, /* .debug_types */
+ /* GNU DWARF 1 extensions */
+ { NULL, NULL }, /* .debug_sfnames */
+ { NULL, NULL }, /* .debug_srcinfo */
+ /* SGI/MIPS DWARF 2 extensions */
+ { NULL, NULL }, /* .debug_funcnames */
+ { NULL, NULL }, /* .debug_typenames */
+ { NULL, NULL }, /* .debug_varnames */
+ { NULL, NULL }, /* .debug_weaknames */
+ { NULL, NULL },
+};
+
+static bfd_boolean
+xcoff_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections,
+ section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr);
+}
+
+static bfd_boolean
+xcoff_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)
+{
+ *discriminator = 0;
+ return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections,
+ section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr);
+}
+
void
-_bfd_xcoff_swap_sym_in (bfd *abfd, PTR ext1, PTR in1)
+_bfd_xcoff_swap_sym_in (bfd *abfd, void * ext1, void * in1)
{
SYMENT *ext = (SYMENT *)ext1;
struct internal_syment * in = (struct internal_syment *)in1;
@@ -430,7 +492,7 @@
}
unsigned int
-_bfd_xcoff_swap_sym_out (bfd *abfd, PTR inp, PTR extp)
+_bfd_xcoff_swap_sym_out (bfd *abfd, void * inp, void * extp)
{
struct internal_syment *in = (struct internal_syment *)inp;
SYMENT *ext =(SYMENT *)extp;
@@ -454,8 +516,8 @@
}
void
-_bfd_xcoff_swap_aux_in (bfd *abfd, PTR ext1, int type, int in_class,
- int indx, int numaux, PTR in1)
+_bfd_xcoff_swap_aux_in (bfd *abfd, void * ext1, int type, int in_class,
+ int indx, int numaux, void * in1)
{
AUXENT * ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1;
@@ -564,15 +626,15 @@
}
unsigned int
-_bfd_xcoff_swap_aux_out (bfd *abfd, PTR inp, int type, int in_class,
+_bfd_xcoff_swap_aux_out (bfd *abfd, void * inp, int type, int in_class,
int indx ATTRIBUTE_UNUSED,
int numaux ATTRIBUTE_UNUSED,
- PTR extp)
+ void * extp)
{
union internal_auxent *in = (union internal_auxent *)inp;
AUXENT *ext = (AUXENT *)extp;
- memset ((PTR)ext, 0, bfd_coff_auxesz (abfd));
+ memset (ext, 0, bfd_coff_auxesz (abfd));
switch (in_class)
{
case C_FILE:
@@ -669,7 +731,7 @@
reloc_howto_type xcoff_howto_table[] =
{
- /* Standard 32 bit relocation. */
+ /* 0x00: Standard 32 bit relocation. */
HOWTO (R_POS, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -684,7 +746,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 32 bit relocation, but store negative value. */
+ /* 0x01: 32 bit relocation, but store negative value. */
HOWTO (R_NEG, /* type */
0, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -699,7 +761,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 32 bit PC relative relocation. */
+ /* 0x02: 32 bit PC relative relocation. */
HOWTO (R_REL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -714,7 +776,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit TOC relative relocation. */
+ /* 0x03: 16 bit TOC relative relocation. */
HOWTO (R_TOC, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -729,7 +791,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* I don't really know what this is. */
+ /* 0x04: I don't really know what this is. */
HOWTO (R_RTB, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -744,7 +806,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* External TOC relative symbol. */
+ /* 0x05: External TOC relative symbol. */
HOWTO (R_GL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -759,7 +821,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Local TOC relative symbol. */
+ /* 0x06: Local TOC relative symbol. */
HOWTO (R_TCL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -776,7 +838,7 @@
EMPTY_HOWTO (7),
- /* Non modifiable absolute branch. */
+ /* 0x08: Non modifiable absolute branch. */
HOWTO (R_BA, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -793,7 +855,7 @@
EMPTY_HOWTO (9),
- /* Non modifiable relative branch. */
+ /* 0x0a: Non modifiable relative branch. */
HOWTO (R_BR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -810,7 +872,7 @@
EMPTY_HOWTO (0xb),
- /* Indirect load. */
+ /* 0x0c: Indirect load. */
HOWTO (R_RL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -825,7 +887,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Load address. */
+ /* 0x0d: Load address. */
HOWTO (R_RLA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -842,7 +904,7 @@
EMPTY_HOWTO (0xe),
- /* Non-relocating reference. Bitsize is 1 so that r_rsize is 0. */
+ /* 0x0f: Non-relocating reference. Bitsize is 1 so that r_rsize is 0. */
HOWTO (R_REF, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
@@ -860,7 +922,7 @@
EMPTY_HOWTO (0x10),
EMPTY_HOWTO (0x11),
- /* TOC relative indirect load. */
+ /* 0x12: TOC relative indirect load. */
HOWTO (R_TRL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -875,7 +937,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* TOC relative load address. */
+ /* 0x13: TOC relative load address. */
HOWTO (R_TRLA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -890,7 +952,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable relative branch. */
+ /* 0x14: Modifiable relative branch. */
HOWTO (R_RRTBI, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -905,7 +967,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable absolute branch. */
+ /* 0x15: Modifiable absolute branch. */
HOWTO (R_RRTBA, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -920,7 +982,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable call absolute indirect. */
+ /* 0x16: Modifiable call absolute indirect. */
HOWTO (R_CAI, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -935,7 +997,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable call relative. */
+ /* 0x17: Modifiable call relative. */
HOWTO (R_CREL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -950,7 +1012,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x18: Modifiable branch absolute. */
HOWTO (R_RBA, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -965,7 +1027,7 @@
0x03fffffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x19: Modifiable branch absolute. */
HOWTO (R_RBAC, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -980,7 +1042,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch relative. */
+ /* 0x1a: Modifiable branch relative. */
HOWTO (R_RBR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -995,7 +1057,7 @@
0x03fffffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x1b: Modifiable branch absolute. */
HOWTO (R_RBRC, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1010,7 +1072,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit Non modifiable absolute branch. */
+ /* 0x1c: 16 bit Non modifiable absolute branch. */
HOWTO (R_BA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1025,22 +1087,22 @@
0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch relative. */
+ /* 0x1d: Modifiable branch relative. */
HOWTO (R_RBR, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- FALSE, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"R_RBR_16", /* name */
TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* src_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch relative. */
+ /* 0x1e: Modifiable branch relative. */
HOWTO (R_RBA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1054,7 +1116,6 @@
0xffff, /* src_mask */
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
};
void
@@ -1102,6 +1163,11 @@
return &xcoff_howto_table[8];
case BFD_RELOC_PPC_TOC16:
return &xcoff_howto_table[3];
+ case BFD_RELOC_16:
+ /* Note that this relocation is only internally used by gas. */
+ return &xcoff_howto_table[0xc];
+ case BFD_RELOC_PPC_B16:
+ return &xcoff_howto_table[0x1d];
case BFD_RELOC_32:
case BFD_RELOC_CTOR:
return &xcoff_howto_table[0];
@@ -1219,7 +1285,7 @@
return FALSE;
/* The symbol table starts with a normal archive header. */
- if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
!= SIZEOF_AR_HDR)
return FALSE;
@@ -1235,7 +1301,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 a four byte count. */
@@ -1274,7 +1340,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;
@@ -1293,7 +1359,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. */
@@ -1346,7 +1412,7 @@
char magic[SXCOFFARMAG];
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);
@@ -1385,7 +1451,7 @@
/* Now read the rest of the file header. */
amt = SIZEOF_AR_FILE_HDR - 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);
@@ -1412,7 +1478,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);
@@ -1445,14 +1511,14 @@
/* Read the archive header in an XCOFF archive. */
-PTR
+void *
_bfd_xcoff_read_ar_hdr (bfd *abfd)
{
bfd_size_type namlen;
struct areltdata *ret;
bfd_size_type amt = sizeof (struct areltdata);
- ret = (struct areltdata *) bfd_alloc (abfd, amt);
+ ret = (struct areltdata *) bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
@@ -1461,7 +1527,7 @@
struct xcoff_ar_hdr hdr;
struct xcoff_ar_hdr *hdrp;
- if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
!= SIZEOF_AR_HDR)
{
free (ret);
@@ -1493,7 +1559,7 @@
struct xcoff_ar_hdr_big hdr;
struct xcoff_ar_hdr_big *hdrp;
- 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)
{
free (ret);
@@ -1528,7 +1594,7 @@
if (bfd_seek (abfd, (file_ptr) ((namlen & 1) + SXCOFFARFMAG), SEEK_CUR) != 0)
return NULL;
- return (PTR) ret;
+ return ret;
}
/* Open the next element in an XCOFF archive. */
@@ -1669,7 +1735,7 @@
if (*p == '\0')
*p = ' ';
- if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ if (bfd_bwrite (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
!= SIZEOF_AR_HDR
|| (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
!= SXCOFFARFMAG))
@@ -2069,7 +2135,7 @@
total_namlen += strlen (normalize_filename (sub)) + 1;
if (sub->arelt_data == NULL)
{
- sub->arelt_data = bfd_zalloc (sub, sizeof (struct areltdata));
+ sub->arelt_data = bfd_zmalloc (sizeof (struct areltdata));
if (sub->arelt_data == NULL)
return FALSE;
}
@@ -2186,20 +2252,20 @@
if (*p == '\0')
*p = ' ';
- if ((bfd_bwrite ((PTR) &ahdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ if ((bfd_bwrite (&ahdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
!= SIZEOF_AR_HDR)
- || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
+ || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
!= SXCOFFARFMAG))
return FALSE;
sprintf (decbuf, "%-12ld", (long) count);
- if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd)
+ if (bfd_bwrite (decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd)
!= XCOFFARMAG_ELEMENT_SIZE)
return FALSE;
for (i = 0; i < (size_t) count; i++)
{
sprintf (decbuf, "%-12ld", (long) offsets[i]);
- if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
+ if (bfd_bwrite (decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
abfd) != XCOFFARMAG_ELEMENT_SIZE)
return FALSE;
}
@@ -2210,7 +2276,7 @@
name = normalize_filename (sub);
namlen = strlen (name);
- if (bfd_bwrite ((PTR) name, namlen + 1, abfd) != namlen + 1)
+ if (bfd_bwrite (name, namlen + 1, abfd) != namlen + 1)
return FALSE;
}
@@ -2224,7 +2290,7 @@
{
BFD_ASSERT (nextoff == bfd_tell (abfd));
sprintf (fhdr.symoff, "%ld", (long) nextoff);
- bfd_ardata (abfd)->tdata = (PTR) &fhdr;
+ bfd_ardata (abfd)->tdata = &fhdr;
if (! _bfd_compute_and_write_armap (abfd, 0))
return FALSE;
}
@@ -2237,7 +2303,7 @@
*p = ' ';
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR, abfd)
+ || (bfd_bwrite (&fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR, abfd)
!= SIZEOF_AR_FILE_HDR))
return FALSE;
@@ -2285,7 +2351,7 @@
if (current_bfd->arelt_data == NULL)
{
size = sizeof (struct areltdata);
- current_bfd->arelt_data = bfd_zalloc (current_bfd, size);
+ current_bfd->arelt_data = bfd_zmalloc (size);
if (current_bfd->arelt_data == NULL)
return FALSE;
}
@@ -2465,7 +2531,7 @@
/* Save nextoff in fhdr.symoff so the armap routine can use it. */
PRINT20 (fhdr.symoff, nextoff);
- bfd_ardata (abfd)->tdata = (PTR) &fhdr;
+ bfd_ardata (abfd)->tdata = &fhdr;
if (! _bfd_compute_and_write_armap (abfd, 0))
return FALSE;
}
@@ -2473,7 +2539,7 @@
/* Write out the archive file header. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
+ || (bfd_bwrite (&fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
abfd) != SIZEOF_AR_FILE_HDR_BIG))
return FALSE;
@@ -2504,6 +2570,60 @@
else
size += SMALL_AOUTSZ;
size += abfd->section_count * SCNHSZ;
+
+ if (info->strip != strip_all)
+ {
+ /* There can be additional sections just for dealing with overflow in
+ reloc and lineno counts. But the numbers of relocs and lineno aren't
+ known when bfd_sizeof_headers is called, so we compute them by
+ summing the numbers from input sections. */
+ struct nbr_reloc_lineno
+ {
+ unsigned int reloc_count;
+ unsigned int lineno_count;
+ };
+ struct nbr_reloc_lineno *n_rl;
+ bfd *sub;
+ int max_index;
+ asection *s;
+
+ /* Although the number of sections is known, the maximum value of
+ section->index isn't (because some sections may have been removed).
+ Don't try to renumber sections, just compute the upper bound. */
+ max_index = 0;
+ for (s = abfd->sections; s != NULL; s = s->next)
+ if (s->index > max_index)
+ max_index = s->index;
+
+ /* Allocate the per section counters. It could be possible to use a
+ preallocated array as the number of sections is limited on XCOFF,
+ but this creates a maintainance issue. */
+ n_rl = bfd_zmalloc ((max_index + 1) * sizeof (*n_rl));
+ if (n_rl == NULL)
+ return -1;
+
+ /* Sum. */
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ for (s = sub->sections; s != NULL; s = s->next)
+ {
+ struct nbr_reloc_lineno *e = &n_rl[s->output_section->index];
+ e->reloc_count += s->reloc_count;
+ e->lineno_count += s->lineno_count;
+ }
+
+ /* Add the size of a section for each section with an overflow. */
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ struct nbr_reloc_lineno *e = &n_rl[s->index];
+
+ if (e->reloc_count >= 0xffff
+ || (e->lineno_count >= 0xffff && info->strip != strip_debugger))
+ size += SCNHSZ;
+ }
+
+ free (n_rl);
+ }
+
return size;
}
@@ -2515,7 +2635,7 @@
/* Swap in the ldhdr structure. */
static void
-xcoff_swap_ldhdr_in (bfd *abfd, const PTR s, struct internal_ldhdr *dst)
+xcoff_swap_ldhdr_in (bfd *abfd, const void * s, struct internal_ldhdr *dst)
{
const struct external_ldhdr *src = (const struct external_ldhdr *) s;
@@ -2532,7 +2652,7 @@
/* Swap out the ldhdr structure. */
static void
-xcoff_swap_ldhdr_out (bfd *abfd, const struct internal_ldhdr *src, PTR d)
+xcoff_swap_ldhdr_out (bfd *abfd, const struct internal_ldhdr *src, void * d)
{
struct external_ldhdr *dst = (struct external_ldhdr *) d;
@@ -2549,7 +2669,7 @@
/* Swap in the ldsym structure. */
static void
-xcoff_swap_ldsym_in (bfd *abfd, const PTR s, struct internal_ldsym *dst)
+xcoff_swap_ldsym_in (bfd *abfd, const void * s, struct internal_ldsym *dst)
{
const struct external_ldsym *src = (const struct external_ldsym *) s;
@@ -2570,7 +2690,7 @@
/* Swap out the ldsym structure. */
static void
-xcoff_swap_ldsym_out (bfd *abfd, const struct internal_ldsym *src, PTR d)
+xcoff_swap_ldsym_out (bfd *abfd, const struct internal_ldsym *src, void * d)
{
struct external_ldsym *dst = (struct external_ldsym *) d;
@@ -2591,7 +2711,7 @@
}
static void
-xcoff_swap_reloc_in (bfd *abfd, PTR s, PTR d)
+xcoff_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;
@@ -2605,7 +2725,7 @@
}
static unsigned int
-xcoff_swap_reloc_out (bfd *abfd, PTR s, PTR d)
+xcoff_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;
@@ -2621,7 +2741,7 @@
/* Swap in the ldrel structure. */
static void
-xcoff_swap_ldrel_in (bfd *abfd, const PTR s, struct internal_ldrel *dst)
+xcoff_swap_ldrel_in (bfd *abfd, const void * s, struct internal_ldrel *dst)
{
const struct external_ldrel *src = (const struct external_ldrel *) s;
@@ -2634,7 +2754,7 @@
/* Swap out the ldrel structure. */
static void
-xcoff_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, PTR d)
+xcoff_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, void * d)
{
struct external_ldrel *dst = (struct external_ldrel *) d;
@@ -3493,14 +3613,14 @@
/* .sv64 = x_smclas == 17
This is an invalid csect for 32 bit apps. */
- static const char *names[19] =
- {
- ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo",
- ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0",
- ".td", NULL, ".sv3264"
- };
-
- if ((19 >= aux->x_csect.x_smclas)
+ static const char * const names[] =
+ {
+ ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo", /* 0 - 7 */
+ ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0", /* 8 - 15 */
+ ".td", NULL, ".sv3264", NULL, ".tl", ".ul", ".te"
+ };
+
+ if ((aux->x_csect.x_smclas < ARRAY_SIZE (names))
&& (NULL != names[aux->x_csect.x_smclas]))
{
return_value = bfd_make_section_anyway
@@ -4032,7 +4152,7 @@
},
/* Generic */
- bfd_true,
+ _bfd_archive_close_and_cleanup,
bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
@@ -4073,8 +4193,8 @@
_bfd_xcoff_is_local_label_name,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
- coff_find_nearest_line,
- _bfd_generic_find_nearest_line_discriminator,
+ xcoff_find_nearest_line,
+ xcoff_find_nearest_line_discriminator,
_bfd_generic_find_line,
coff_find_inliner_info,
coff_bfd_make_debug_symbol,
@@ -4120,7 +4240,7 @@
/* Opposite endian version, none exists */
NULL,
- (void *) &bfd_xcoff_backend_data,
+ & bfd_xcoff_backend_data,
};
/* xcoff-powermac target
@@ -4288,7 +4408,7 @@
},
/* Generic */
- bfd_true,
+ _bfd_archive_close_and_cleanup,
bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
@@ -4329,7 +4449,7 @@
_bfd_xcoff_is_local_label_name,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
- coff_find_nearest_line,
+ xcoff_find_nearest_line,
_bfd_generic_find_nearest_line_discriminator,
_bfd_generic_find_line,
coff_find_inliner_info,
@@ -4376,5 +4496,5 @@
/* Opposite endian version, none exists */
NULL,
- (void *) &bfd_pmac_xcoff_backend_data,
+ & bfd_pmac_xcoff_backend_data,
};
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index e707add..f5e07a5 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -1,6 +1,6 @@
/* 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, 2011
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <[email protected]>.
@@ -38,9 +38,9 @@
#ifndef COFF_IMAGE_WITH_PE
static bfd_boolean sh_align_load_span
- PARAMS ((bfd *, asection *, bfd_byte *,
- bfd_boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
- PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *));
+ (bfd *, asection *, bfd_byte *,
+ bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
+ void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#define _bfd_sh_align_load_span sh_align_load_span
#endif
@@ -56,28 +56,6 @@
#include "libcoff.h"
/* Internal functions. */
-static bfd_reloc_status_type sh_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static long get_symbol_value PARAMS ((asymbol *));
-static bfd_boolean sh_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean sh_relax_delete_bytes
- PARAMS ((bfd *, asection *, bfd_vma, int));
-#ifndef COFF_IMAGE_WITH_PE
-static const struct sh_opcode *sh_insn_info PARAMS ((unsigned int));
-#endif
-static bfd_boolean sh_align_loads
- PARAMS ((bfd *, asection *, struct internal_reloc *, bfd_byte *,
- bfd_boolean *));
-static bfd_boolean sh_swap_insns
- PARAMS ((bfd *, asection *, PTR, bfd_byte *, bfd_vma));
-static bfd_boolean sh_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static bfd_byte *sh_coff_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **));
-static reloc_howto_type * sh_coff_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
#ifdef COFF_WITH_PE
/* Can't build import tables with 2**4 alignment. */
@@ -96,17 +74,27 @@
#define COFF_LONG_FILENAMES
#ifdef COFF_WITH_PE
-static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* Return TRUE if this relocation should
appear in the output .reloc section. */
-static bfd_boolean in_reloc_p (abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type * howto;
+
+static bfd_boolean
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
+ reloc_howto_type * howto)
{
return ! howto->pc_relative && howto->type != R_SH_IMAGEBASE;
}
#endif
+static bfd_reloc_status_type
+sh_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_boolean
+sh_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *,
+ bfd_byte *, struct internal_reloc *,
+ struct internal_syment *, asection **);
+static bfd_boolean
+sh_align_loads (bfd *, asection *, struct internal_reloc *,
+ bfd_byte *, bfd_boolean *);
+
/* The supported relocations. There are a lot of relocations defined
in coff/internal.h which we do not expect to ever see. */
static reloc_howto_type sh_coff_howtos[] =
@@ -407,8 +395,7 @@
/* Get the value of a symbol, when performing a relocation. */
static long
-get_symbol_value (symbol)
- asymbol *symbol;
+get_symbol_value (asymbol *symbol)
{
bfd_vma relocation;
@@ -426,16 +413,15 @@
/* Convert an rtype to howto for the COFF backend linker.
Copied from coff-i386. */
#define coff_rtype_to_howto coff_sh_rtype_to_howto
-static reloc_howto_type * coff_sh_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
+
static reloc_howto_type *
-coff_sh_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd * abfd ATTRIBUTE_UNUSED;
- asection * sec;
- struct internal_reloc * rel;
- struct coff_link_hash_entry * h;
- struct internal_syment * sym;
- bfd_vma * addendp;
+coff_sh_rtype_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * sec,
+ struct internal_reloc * rel,
+ struct coff_link_hash_entry * h,
+ struct internal_syment * sym,
+ bfd_vma * addendp)
{
reloc_howto_type * howto;
@@ -508,9 +494,8 @@
#define coff_bfd_reloc_name_lookup sh_coff_reloc_name_lookup
static reloc_howto_type *
-sh_coff_reloc_type_lookup (abfd, code)
- bfd * abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+sh_coff_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
@@ -575,15 +560,13 @@
/* This is the howto function for the SH relocations. */
static bfd_reloc_status_type
-sh_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+sh_reloc (bfd * abfd,
+ arelent * reloc_entry,
+ asymbol * symbol_in,
+ void * data,
+ asection * input_section,
+ bfd * output_bfd,
+ char ** error_message ATTRIBUTE_UNUSED)
{
unsigned long insn;
bfd_vma sym_value;
@@ -673,6 +656,9 @@
#include "coffcode.h"
+static bfd_boolean
+sh_relax_delete_bytes (bfd *, asection *, bfd_vma, int);
+
/* This function handles relaxing on the SH.
Function calls on the SH look like this:
@@ -717,11 +703,10 @@
can, by swapping them with one of the adjacent instructions. */
static bfd_boolean
-sh_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+sh_relax_section (bfd *abfd,
+ asection *sec,
+ struct bfd_link_info *link_info,
+ bfd_boolean *again)
{
struct internal_reloc *internal_relocs;
bfd_boolean have_code;
@@ -738,7 +723,7 @@
if (coff_section_data (abfd, sec) == NULL)
{
bfd_size_type amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ sec->used_by_bfd = bfd_zalloc (abfd, amt);
if (sec->used_by_bfd == NULL)
return FALSE;
}
@@ -1074,11 +1059,10 @@
/* Delete some bytes from a section while relaxing. */
static bfd_boolean
-sh_relax_delete_bytes (abfd, sec, addr, count)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- int count;
+sh_relax_delete_bytes (bfd *abfd,
+ asection *sec,
+ bfd_vma addr,
+ int count)
{
bfd_byte *contents;
struct internal_reloc *irel, *irelend;
@@ -1470,7 +1454,7 @@
{
struct internal_syment isym;
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym);
+ bfd_coff_swap_sym_in (abfd, esym, &isym);
if (isym.n_scnum == sec->target_index
&& (bfd_vma) isym.n_value > addr
@@ -1478,7 +1462,7 @@
{
isym.n_value -= count;
- bfd_coff_swap_sym_out (abfd, (PTR) &isym, (PTR) esym);
+ bfd_coff_swap_sym_out (abfd, &isym, esym);
if (*sym_hash != NULL)
{
@@ -1628,24 +1612,6 @@
#define MAP(a) a, sizeof a / sizeof a[0]
#ifndef COFF_IMAGE_WITH_PE
-static bfd_boolean sh_insn_uses_reg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insn_sets_reg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insn_uses_or_sets_reg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insn_uses_freg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insn_sets_freg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insn_uses_or_sets_freg
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
-static bfd_boolean sh_insns_conflict
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int,
- const struct sh_opcode *));
-static bfd_boolean sh_load_use
- PARAMS ((unsigned int, const struct sh_opcode *, unsigned int,
- const struct sh_opcode *));
/* The opcode maps. */
@@ -2054,8 +2020,7 @@
recognized. */
static const struct sh_opcode *
-sh_insn_info (insn)
- unsigned int insn;
+sh_insn_info (unsigned int insn)
{
const struct sh_major_opcode *maj;
const struct sh_minor_opcode *min, *minend;
@@ -2082,27 +2047,12 @@
return NULL;
}
-/* See whether an instruction uses or sets a general purpose register */
-
-static bfd_boolean
-sh_insn_uses_or_sets_reg (insn, op, reg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int reg;
-{
- if (sh_insn_uses_reg (insn, op, reg))
- return TRUE;
-
- return sh_insn_sets_reg (insn, op, reg);
-}
-
/* See whether an instruction uses a general purpose register. */
static bfd_boolean
-sh_insn_uses_reg (insn, op, reg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int reg;
+sh_insn_uses_reg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int reg)
{
unsigned int f;
@@ -2128,10 +2078,9 @@
/* See whether an instruction sets a general purpose register. */
static bfd_boolean
-sh_insn_sets_reg (insn, op, reg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int reg;
+sh_insn_sets_reg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int reg)
{
unsigned int f;
@@ -2152,27 +2101,25 @@
return FALSE;
}
-/* See whether an instruction uses or sets a floating point register */
+/* See whether an instruction uses or sets a general purpose register */
static bfd_boolean
-sh_insn_uses_or_sets_freg (insn, op, reg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int reg;
+sh_insn_uses_or_sets_reg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int reg)
{
- if (sh_insn_uses_freg (insn, op, reg))
+ if (sh_insn_uses_reg (insn, op, reg))
return TRUE;
- return sh_insn_sets_freg (insn, op, reg);
+ return sh_insn_sets_reg (insn, op, reg);
}
/* See whether an instruction uses a floating point register. */
static bfd_boolean
-sh_insn_uses_freg (insn, op, freg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int freg;
+sh_insn_uses_freg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int freg)
{
unsigned int f;
@@ -2203,10 +2150,9 @@
/* See whether an instruction sets a floating point register. */
static bfd_boolean
-sh_insn_sets_freg (insn, op, freg)
- unsigned int insn;
- const struct sh_opcode *op;
- unsigned int freg;
+sh_insn_sets_freg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int freg)
{
unsigned int f;
@@ -2228,17 +2174,29 @@
return FALSE;
}
+/* See whether an instruction uses or sets a floating point register */
+
+static bfd_boolean
+sh_insn_uses_or_sets_freg (unsigned int insn,
+ const struct sh_opcode *op,
+ unsigned int reg)
+{
+ if (sh_insn_uses_freg (insn, op, reg))
+ return TRUE;
+
+ return sh_insn_sets_freg (insn, op, reg);
+}
+
/* See whether instructions I1 and I2 conflict, assuming I1 comes
before I2. OP1 and OP2 are the corresponding sh_opcode structures.
This should return TRUE if there is a conflict, or FALSE if the
instructions can be swapped safely. */
static bfd_boolean
-sh_insns_conflict (i1, op1, i2, op2)
- unsigned int i1;
- const struct sh_opcode *op1;
- unsigned int i2;
- const struct sh_opcode *op2;
+sh_insns_conflict (unsigned int i1,
+ const struct sh_opcode *op1,
+ unsigned int i2,
+ const struct sh_opcode *op2)
{
unsigned int f1, f2;
@@ -2300,11 +2258,10 @@
TRUE if I1 loads a register which I2 uses. */
static bfd_boolean
-sh_load_use (i1, op1, i2, op2)
- unsigned int i1;
- const struct sh_opcode *op1;
- unsigned int i2;
- const struct sh_opcode *op2;
+sh_load_use (unsigned int i1,
+ const struct sh_opcode *op1,
+ unsigned int i2,
+ const struct sh_opcode *op2)
{
unsigned int f1;
@@ -2346,18 +2303,16 @@
static
#endif
bfd_boolean
-_bfd_sh_align_load_span (abfd, sec, contents, swap, relocs,
- plabel, label_end, start, stop, pswapped)
- bfd *abfd;
- asection *sec;
- bfd_byte *contents;
- bfd_boolean (*swap) PARAMS ((bfd *, asection *, PTR, bfd_byte *, bfd_vma));
- PTR relocs;
- bfd_vma **plabel;
- bfd_vma *label_end;
- bfd_vma start;
- bfd_vma stop;
- bfd_boolean *pswapped;
+_bfd_sh_align_load_span (bfd *abfd,
+ asection *sec,
+ bfd_byte *contents,
+ bfd_boolean (*swap) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
+ void * relocs,
+ bfd_vma **plabel,
+ bfd_vma *label_end,
+ bfd_vma start,
+ bfd_vma stop,
+ bfd_boolean *pswapped)
{
int dsp = (abfd->arch_info->mach == bfd_mach_sh_dsp
|| abfd->arch_info->mach == bfd_mach_sh3_dsp);
@@ -2557,91 +2512,14 @@
}
#endif /* not COFF_IMAGE_WITH_PE */
-/* Look for loads and stores which we can align to four byte
- boundaries. See the longer comment above sh_relax_section for why
- this is desirable. This sets *PSWAPPED if some instruction was
- swapped. */
-
-static bfd_boolean
-sh_align_loads (abfd, sec, internal_relocs, contents, pswapped)
- bfd *abfd;
- asection *sec;
- struct internal_reloc *internal_relocs;
- bfd_byte *contents;
- bfd_boolean *pswapped;
-{
- struct internal_reloc *irel, *irelend;
- bfd_vma *labels = NULL;
- bfd_vma *label, *label_end;
- bfd_size_type amt;
-
- *pswapped = FALSE;
-
- irelend = internal_relocs + sec->reloc_count;
-
- /* Get all the addresses with labels on them. */
- amt = (bfd_size_type) sec->reloc_count * sizeof (bfd_vma);
- labels = (bfd_vma *) bfd_malloc (amt);
- if (labels == NULL)
- goto error_return;
- label_end = labels;
- for (irel = internal_relocs; irel < irelend; irel++)
- {
- if (irel->r_type == R_SH_LABEL)
- {
- *label_end = irel->r_vaddr - sec->vma;
- ++label_end;
- }
- }
-
- /* Note that the assembler currently always outputs relocs in
- address order. If that ever changes, this code will need to sort
- the label values and the relocs. */
-
- label = labels;
-
- for (irel = internal_relocs; irel < irelend; irel++)
- {
- bfd_vma start, stop;
-
- if (irel->r_type != R_SH_CODE)
- continue;
-
- start = irel->r_vaddr - sec->vma;
-
- for (irel++; irel < irelend; irel++)
- if (irel->r_type == R_SH_DATA)
- break;
- if (irel < irelend)
- stop = irel->r_vaddr - sec->vma;
- else
- stop = sec->size;
-
- if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_swap_insns,
- (PTR) internal_relocs, &label,
- label_end, start, stop, pswapped))
- goto error_return;
- }
-
- free (labels);
-
- return TRUE;
-
- error_return:
- if (labels != NULL)
- free (labels);
- return FALSE;
-}
-
/* Swap two SH instructions. */
static bfd_boolean
-sh_swap_insns (abfd, sec, relocs, contents, addr)
- bfd *abfd;
- asection *sec;
- PTR relocs;
- bfd_byte *contents;
- bfd_vma addr;
+sh_swap_insns (bfd * abfd,
+ asection * sec,
+ void * relocs,
+ bfd_byte * contents,
+ bfd_vma addr)
{
struct internal_reloc *internal_relocs = (struct internal_reloc *) relocs;
unsigned short i1, i2;
@@ -2764,21 +2642,94 @@
return TRUE;
}
+
+/* Look for loads and stores which we can align to four byte
+ boundaries. See the longer comment above sh_relax_section for why
+ this is desirable. This sets *PSWAPPED if some instruction was
+ swapped. */
+
+static bfd_boolean
+sh_align_loads (bfd *abfd,
+ asection *sec,
+ struct internal_reloc *internal_relocs,
+ bfd_byte *contents,
+ bfd_boolean *pswapped)
+{
+ struct internal_reloc *irel, *irelend;
+ bfd_vma *labels = NULL;
+ bfd_vma *label, *label_end;
+ bfd_size_type amt;
+
+ *pswapped = FALSE;
+
+ irelend = internal_relocs + sec->reloc_count;
+
+ /* Get all the addresses with labels on them. */
+ amt = (bfd_size_type) sec->reloc_count * sizeof (bfd_vma);
+ labels = (bfd_vma *) bfd_malloc (amt);
+ if (labels == NULL)
+ goto error_return;
+ label_end = labels;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ if (irel->r_type == R_SH_LABEL)
+ {
+ *label_end = irel->r_vaddr - sec->vma;
+ ++label_end;
+ }
+ }
+
+ /* Note that the assembler currently always outputs relocs in
+ address order. If that ever changes, this code will need to sort
+ the label values and the relocs. */
+
+ label = labels;
+
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma start, stop;
+
+ if (irel->r_type != R_SH_CODE)
+ continue;
+
+ start = irel->r_vaddr - sec->vma;
+
+ for (irel++; irel < irelend; irel++)
+ if (irel->r_type == R_SH_DATA)
+ break;
+ if (irel < irelend)
+ stop = irel->r_vaddr - sec->vma;
+ else
+ stop = sec->size;
+
+ if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_swap_insns,
+ internal_relocs, &label,
+ label_end, start, stop, pswapped))
+ goto error_return;
+ }
+
+ free (labels);
+
+ return TRUE;
+
+ error_return:
+ if (labels != NULL)
+ free (labels);
+ return FALSE;
+}
/* This is a modification of _bfd_coff_generic_relocate_section, which
will handle SH relaxing. */
static bfd_boolean
-sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
- relocs, syms, sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ 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;
@@ -2942,14 +2893,12 @@
which uses sh_relocate_section. */
static bfd_byte *
-sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocatable, symbols)
- bfd *output_bfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- bfd_boolean relocatable;
- asymbol **symbols;
+sh_coff_get_relocated_section_contents (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
{
asection *input_section = link_order->u.indirect.section;
bfd *input_bfd = input_section->owner;
@@ -3006,7 +2955,7 @@
esymend = esym + obj_raw_syment_count (input_bfd) * symesz;
while (esym < esymend)
{
- bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
+ bfd_coff_swap_sym_in (input_bfd, esym, isymp);
if (isymp->n_scnum != 0)
*secpp = coff_section_from_bfd_index (input_bfd, isymp->n_scnum);
@@ -3073,8 +3022,7 @@
#endif
#ifndef TARGET_SHL_SYM
-static const bfd_target * coff_small_object_p PARAMS ((bfd *));
-static bfd_boolean coff_small_new_section_hook PARAMS ((bfd *, asection *));
+
/* Some people want versions of the SH COFF target which do not align
to 16 byte boundaries. We implement that by adding a couple of new
target vectors. These are just like the ones above, but they
@@ -3090,8 +3038,7 @@
Otherwise we won't recognize the non default endianness. */
static const bfd_target *
-coff_small_object_p (abfd)
- bfd *abfd;
+coff_small_object_p (bfd *abfd)
{
if (abfd->target_defaulted)
{
@@ -3104,9 +3051,7 @@
/* Set the section alignment for the small versions. */
static bfd_boolean
-coff_small_new_section_hook (abfd, section)
- bfd *abfd;
- asection *section;
+coff_small_new_section_hook (bfd *abfd, asection *section)
{
if (! coff_new_section_hook (abfd, section))
return FALSE;
@@ -3212,7 +3157,7 @@
& shlcoff_small_vec,
- (PTR) &bfd_coff_small_swap_table
+ & bfd_coff_small_swap_table
};
const bfd_target shlcoff_small_vec =
@@ -3257,6 +3202,6 @@
& shcoff_small_vec,
- (PTR) &bfd_coff_small_swap_table
+ & bfd_coff_small_swap_table
};
#endif
diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c
index a9a699a..d3802c0 100644
--- a/bfd/coff-sparc.c
+++ b/bfd/coff-sparc.c
@@ -1,6 +1,6 @@
/* BFD back-end for Sparc COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
- 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+ 2002, 2003, 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -34,11 +34,6 @@
/* The page size is a guess based on ELF. */
#define COFF_PAGE_SIZE 0x10000
-
-static reloc_howto_type *coff_sparc_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-
enum reloc_type
{
R_SPARC_NONE = 0,
@@ -58,20 +53,15 @@
};
/* This is stolen pretty directly from elf.c. */
-static bfd_reloc_status_type
-bfd_coff_generic_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR,
- asection *, bfd *, char **));
static bfd_reloc_status_type
-bfd_coff_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+bfd_coff_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0)
@@ -111,7 +101,8 @@
HOWTO(R_SPARC_UA32, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_UA32", FALSE,0,0x00000000,TRUE),
};
-struct coff_reloc_map {
+struct coff_reloc_map
+{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char coff_reloc_val;
};
@@ -145,9 +136,8 @@
};
static reloc_howto_type *
-coff_sparc_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+coff_sparc_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct coff_reloc_map); i++)
@@ -178,9 +168,7 @@
#define coff_bfd_reloc_name_lookup coff_sparc_reloc_name_lookup
static void
-rtype2howto (cache_ptr, dst)
- arelent *cache_ptr;
- struct internal_reloc *dst;
+rtype2howto (arelent *cache_ptr, struct internal_reloc *dst)
{
BFD_ASSERT (dst->r_type < (unsigned int) R_SPARC_max);
cache_ptr->howto = &coff_sparc_howto_table[dst->r_type];
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index c10194e..882ddd2 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,
- 2011 Free Software Foundation, Inc.
+ 2011, 2012 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of BFD, the Binary File Descriptor library.
@@ -54,35 +54,34 @@
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
+#include "sysdep.h"
#include "bfd.h"
-/* At first the prototypes. */
-
-static void
-adjust_filehdr_in_post PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_filehdr_out_pre PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_filehdr_out_post PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_scnhdr_in_post PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_scnhdr_out_pre PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_scnhdr_out_post PARAMS ((bfd *, PTR, PTR));
-static void
-adjust_aux_in_post PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-static void
-adjust_aux_out_pre PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-static void
-adjust_aux_out_post PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-static void
-create_go32_stub PARAMS ((bfd *));
-
/* All that ..._PRE and ...POST functions are called from the corresponding
coff_swap... functions. The ...PRE functions are called at the beginning
of the function and the ...POST functions at the end of the swap routines. */
+static void
+adjust_filehdr_in_post (bfd *, void *, void *);
+static void
+adjust_filehdr_out_pre (bfd *, void *, void *);
+static void
+adjust_filehdr_out_post (bfd *, void *, void *);
+static void
+adjust_scnhdr_in_post (bfd *, void *, void *);
+static void
+adjust_scnhdr_out_pre (bfd *, void *, void *);
+static void
+adjust_scnhdr_out_post (bfd *, void *, void *);
+static void
+adjust_aux_in_post (bfd *, void *, int, int, int, int, void *);
+static void
+adjust_aux_out_pre (bfd *, void *, int, int, int, int, void *);
+static void
+adjust_aux_out_post (bfd *, void *, int, int, int, int, void *);
+static void
+create_go32_stub (bfd *);
+
#define COFF_ADJUST_FILEHDR_IN_POST adjust_filehdr_in_post
#define COFF_ADJUST_FILEHDR_OUT_PRE adjust_filehdr_out_pre
#define COFF_ADJUST_FILEHDR_OUT_POST adjust_filehdr_out_post
@@ -95,12 +94,12 @@
#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);
+static const bfd_target *go32_check_format (bfd *);
#define COFF_CHECK_FORMAT go32_check_format
static bfd_boolean
- go32_stubbed_coff_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
+ go32_stubbed_coff_bfd_copy_private_bfd_data (bfd *, bfd *);
#define coff_bfd_copy_private_bfd_data go32_stubbed_coff_bfd_copy_private_bfd_data
@@ -132,10 +131,9 @@
if (val != 0) val += diff
static void
-adjust_filehdr_in_post (abfd, src, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR src;
- PTR dst;
+adjust_filehdr_in_post (bfd * abfd ATTRIBUTE_UNUSED,
+ void * src,
+ void * dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
@@ -150,10 +148,7 @@
}
static void
-adjust_filehdr_out_pre (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+adjust_filehdr_out_pre (bfd * abfd, void * in, void * out)
{
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
FILHDR *filehdr_out = (FILHDR *) out;
@@ -172,10 +167,9 @@
}
static void
-adjust_filehdr_out_post (abfd, in, out)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR in;
- PTR out ATTRIBUTE_UNUSED;
+adjust_filehdr_out_post (bfd * abfd ATTRIBUTE_UNUSED,
+ void * in,
+ void * out ATTRIBUTE_UNUSED)
{
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
/* Undo the above change. */
@@ -183,10 +177,9 @@
}
static void
-adjust_scnhdr_in_post (abfd, ext, in)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR ext ATTRIBUTE_UNUSED;
- PTR in;
+adjust_scnhdr_in_post (bfd * abfd ATTRIBUTE_UNUSED,
+ void * ext ATTRIBUTE_UNUSED,
+ void * in)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -196,10 +189,9 @@
}
static void
-adjust_scnhdr_out_pre (abfd, in, out)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR in;
- PTR out ATTRIBUTE_UNUSED;
+adjust_scnhdr_out_pre (bfd * abfd ATTRIBUTE_UNUSED,
+ void * in,
+ void * out ATTRIBUTE_UNUSED)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -209,10 +201,9 @@
}
static void
-adjust_scnhdr_out_post (abfd, in, out)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR in;
- PTR out ATTRIBUTE_UNUSED;
+adjust_scnhdr_out_post (bfd * abfd ATTRIBUTE_UNUSED,
+ void * in,
+ void * out ATTRIBUTE_UNUSED)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -222,14 +213,13 @@
}
static void
-adjust_aux_in_post (abfd, ext1, type, in_class, indx, numaux, in1)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR ext1 ATTRIBUTE_UNUSED;
- int type;
- int in_class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR in1;
+adjust_aux_in_post (bfd * abfd ATTRIBUTE_UNUSED,
+ void * ext1 ATTRIBUTE_UNUSED,
+ int type,
+ int in_class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * in1)
{
union internal_auxent *in = (union internal_auxent *) in1;
@@ -241,14 +231,13 @@
}
static void
-adjust_aux_out_pre (abfd, inp, type, in_class, indx, numaux, extp)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR inp;
- int type;
- int in_class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR extp ATTRIBUTE_UNUSED;
+adjust_aux_out_pre (bfd *abfd ATTRIBUTE_UNUSED,
+ void * inp,
+ int type,
+ int in_class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * extp ATTRIBUTE_UNUSED)
{
union internal_auxent *in = (union internal_auxent *) inp;
@@ -260,14 +249,13 @@
}
static void
-adjust_aux_out_post (abfd, inp, type, in_class, indx, numaux, extp)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR inp;
- int type;
- int in_class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR extp ATTRIBUTE_UNUSED;
+adjust_aux_out_post (bfd *abfd ATTRIBUTE_UNUSED,
+ void * inp,
+ int type,
+ int in_class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * extp ATTRIBUTE_UNUSED)
{
union internal_auxent *in = (union internal_auxent *) inp;
@@ -291,8 +279,7 @@
is taken. */
static void
-create_go32_stub (abfd)
- bfd *abfd;
+create_go32_stub (bfd *abfd)
{
/* Do it only once. */
if (coff_data (abfd)->go32stub == NULL)
@@ -393,9 +380,7 @@
to the new obfd. */
static bfd_boolean
-go32_stubbed_coff_bfd_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+go32_stubbed_coff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
/* Check if both are the same targets. */
if (ibfd->xvec != obfd->xvec)
diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c
index 497d340..de09b30 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, 2011
+ Copyright 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
Contributed by Steven Haworth ([email protected])
@@ -28,12 +28,6 @@
#include "coff/internal.h"
#include "libcoff.h"
-static int coff_tic30_select_reloc PARAMS ((reloc_howto_type *));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-
-reloc_howto_type * tic30_coff_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
-
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
reloc_howto_type tic30_coff_howto_table[] =
@@ -59,10 +53,9 @@
map to the howto table entries that match those in both the aout
and coff implementations. */
-reloc_howto_type *
-tic30_coff_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+static reloc_howto_type *
+tic30_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -104,8 +97,7 @@
/* Turn a howto into a reloc number. */
static int
-coff_tic30_select_reloc (howto)
- reloc_howto_type *howto;
+coff_tic30_select_reloc (reloc_howto_type *howto)
{
return howto->type;
}
@@ -125,9 +117,7 @@
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static void
-rtype2howto (internal, dst)
- arelent *internal;
- struct internal_reloc *dst;
+rtype2howto (arelent *internal, struct internal_reloc *dst)
{
switch (dst->r_type)
{
@@ -163,12 +153,11 @@
reloc_processing(relent, reloc, symbols, abfd, section)
static void
-reloc_processing (relent, reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+reloc_processing (arelent *relent,
+ struct internal_reloc *reloc,
+ asymbol **symbols,
+ bfd *abfd,
+ asection *section)
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
index 4259dd9..c59894a 100644
--- a/bfd/coff-tic4x.c
+++ b/bfd/coff-tic4x.c
@@ -1,6 +1,6 @@
/* BFD back-end for TMS320C4X coff binaries.
Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2012 Free Software Foundation, Inc.
Contributed by Michael Hayes ([email protected])
@@ -32,26 +32,19 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
-static bfd_boolean ticoff_bfd_is_local_label_name
- PARAMS ((bfd *, const char *));
-static bfd_reloc_status_type tic4x_relocation
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char ** ));
-static reloc_howto_type *tic4x_coff_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type ));
-static void tic4x_lookup_howto
- PARAMS ((arelent *, struct internal_reloc * ));
-static reloc_howto_type *coff_tic4x_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma * ));
-static void tic4x_reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection * ));
-
+static reloc_howto_type *
+coff_tic4x_rtype_to_howto (bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *,
+ struct internal_syment *, bfd_vma *);
+static void
+tic4x_reloc_processing (arelent *, struct internal_reloc *,
+ asymbol **, bfd *, asection *);
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
static bfd_boolean
-ticoff_bfd_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *name)
{
if (TICOFF_LOCAL_LABEL_P(name))
return TRUE;
@@ -79,15 +72,13 @@
#include "coffcode.h"
static bfd_reloc_status_type
-tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+tic4x_relocation (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL)
{
@@ -128,9 +119,8 @@
bfd/reloc.c) to map to the howto table entries. */
static reloc_howto_type *
-tic4x_coff_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+tic4x_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int type;
unsigned int i;
@@ -176,9 +166,8 @@
Called after some initial checking by the tic4x_rtype_to_howto fn
below. */
static void
-tic4x_lookup_howto (internal, dst)
- arelent *internal;
- struct internal_reloc *dst;
+tic4x_lookup_howto (arelent *internal,
+ struct internal_reloc *dst)
{
unsigned int i;
int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
@@ -198,13 +187,12 @@
}
static reloc_howto_type *
-coff_tic4x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+coff_tic4x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
arelent genrel;
@@ -221,12 +209,11 @@
static void
-tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+tic4x_reloc_processing (arelent *relent,
+ struct internal_reloc *reloc,
+ asymbol **symbols,
+ bfd *abfd,
+ asection *section)
{
asymbol *ptr;
@@ -274,19 +261,31 @@
/* TI COFF v0, DOS tools (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, (PTR)&ticoff0_swap_table);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ NULL, &ticoff0_swap_table);
/* TI COFF v0, SPARC tools (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_vec, (PTR)&ticoff0_swap_table);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff0_vec, &ticoff0_swap_table);
/* TI COFF v1, DOS tools (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_beh_vec, (PTR)&ticoff1_swap_table);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff0_beh_vec, &ticoff1_swap_table);
/* TI COFF v1, SPARC tools (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_vec, (PTR)&ticoff1_swap_table);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff1_vec, &ticoff1_swap_table);
/* TI COFF v2, TI DOS tools output (little-endian headers). */
-CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
/* TI COFF v2, TI SPARC tools output (big-endian headers). */
-CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff2_vec, COFF_SWAP_TABLE);
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x",
+ HAS_LOAD_PAGE, SEC_CODE | SEC_READONLY, '_',
+ &tic4x_coff2_vec, COFF_SWAP_TABLE);
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index 3c353da..8efdc20 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, 2011
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
Contributed by Timothy Wall ([email protected])
@@ -31,22 +31,9 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
-static void tic54x_reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-static bfd_reloc_status_type tic54x_relocation
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean tic54x_set_section_contents
- PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
-static reloc_howto_type *coff_tic54x_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
-static bfd_boolean tic54x_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-static reloc_howto_type * tic54x_coff_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void tic54x_lookup_howto
- PARAMS ((arelent *, struct internal_reloc *));
-static bfd_boolean ticoff_bfd_is_local_label_name
- PARAMS ((bfd *, const char *));
+static void
+tic54x_reloc_processing (arelent *, struct internal_reloc *,
+ asymbol **, bfd *, asection *);
/* 32-bit operations
The octet order is screwy. words are LSB first (LS octet, actually), but
@@ -97,26 +84,24 @@
#define coff_set_section_load_page bfd_ticoff_set_section_load_page
void
-bfd_ticoff_set_section_load_page (sect, page)
- asection *sect;
- int page;
+bfd_ticoff_set_section_load_page (asection *sect,
+ int page)
{
sect->lma = (sect->lma & ADDR_MASK) | PG_TO_FLAG(page);
}
int
-bfd_ticoff_get_section_load_page (sect)
- asection *sect;
+bfd_ticoff_get_section_load_page (asection *sect)
{
int page;
/* Provide meaningful defaults for predefined sections. */
- if (sect == &bfd_com_section)
+ if (sect == bfd_com_section_ptr)
page = PG_DATA;
- else if (sect == &bfd_und_section
- || sect == &bfd_abs_section
- || sect == &bfd_ind_section)
+ else if (bfd_is_und_section (sect)
+ || bfd_is_abs_section (sect)
+ || bfd_is_ind_section (sect))
page = PG_PROG;
else
@@ -129,10 +114,9 @@
(e.g. binary). */
static bfd_boolean
-tic54x_set_arch_mach (abfd, arch, machine)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+tic54x_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
if (arch == bfd_arch_unknown)
arch = bfd_arch_tic54x;
@@ -144,15 +128,13 @@
}
static bfd_reloc_status_type
-tic54x_relocation (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+tic54x_relocation (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL)
{
@@ -234,10 +216,9 @@
/* For the case statement use the code values used tc_gen_reloc (defined in
bfd/reloc.c) to map to the howto table entries. */
-reloc_howto_type *
-tic54x_coff_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+static reloc_howto_type *
+tic54x_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -280,9 +261,8 @@
Called after some initial checking by the tic54x_rtype_to_howto fn below. */
static void
-tic54x_lookup_howto (internal, dst)
- arelent *internal;
- struct internal_reloc *dst;
+tic54x_lookup_howto (arelent *internal,
+ struct internal_reloc *dst)
{
unsigned i;
int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
@@ -307,13 +287,12 @@
#define coff_rtype_to_howto coff_tic54x_rtype_to_howto
static reloc_howto_type *
-coff_tic54x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+coff_tic54x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
arelent genrel;
@@ -334,9 +313,8 @@
labels. */
static bfd_boolean
-ticoff_bfd_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *name)
{
if (TICOFF_LOCAL_LABEL_P(name))
return TRUE;
@@ -345,15 +323,6 @@
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
-/* Clear the r_reserved field in relocs. */
-#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
- do \
- { \
- dst->r_reserved[0] = 0; \
- dst->r_reserved[1] = 0; \
- } \
- while (0)
-
/* Customize coffcode.h; the default coff_ functions are set up to use COFF2;
coff_bad_format_hook uses BADMAG, so set that for COFF2. The COFF1
and COFF0 vectors use custom _bad_format_hook procs instead of setting
@@ -367,24 +336,22 @@
#include "coffcode.h"
static bfd_boolean
-tic54x_set_section_contents (abfd, section, location, offset, bytes_to_do)
- bfd *abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type bytes_to_do;
+tic54x_set_section_contents (bfd *abfd,
+ sec_ptr section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type bytes_to_do)
{
return coff_set_section_contents (abfd, section, location,
offset, bytes_to_do);
}
static void
-tic54x_reloc_processing (relent, reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+tic54x_reloc_processing (arelent *relent,
+ struct internal_reloc *reloc,
+ asymbol **symbols,
+ bfd *abfd,
+ asection *section)
{
asymbol *ptr;
@@ -472,7 +439,7 @@
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
- (PTR) & ticoff0_swap_table
+ & ticoff0_swap_table
};
/* TI COFF v0, SPARC tools (big-endian headers). */
@@ -518,7 +485,7 @@
& tic54x_coff0_vec,
- (PTR) & ticoff0_swap_table
+ & ticoff0_swap_table
};
/* TI COFF v1, DOS tools (little-endian headers). */
@@ -564,7 +531,7 @@
& tic54x_coff0_beh_vec,
- (PTR) & ticoff1_swap_table
+ & ticoff1_swap_table
};
/* TI COFF v1, SPARC tools (big-endian headers). */
@@ -610,7 +577,7 @@
& tic54x_coff1_vec,
- (PTR) & ticoff1_swap_table
+ & ticoff1_swap_table
};
/* TI COFF v2, TI DOS tools output (little-endian headers). */
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 6455e49..c8fa5c0 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -1,6 +1,6 @@
/* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
- Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
+ 2012 Free Software Foundation, Inc.
Written by Fred Fish ([email protected])
@@ -32,7 +32,7 @@
/* Newlib-based hosts define _CONST as a STDC-safe alias for const,
but to the tic80 toolchain it means something altogether different.
Since sysdep.h will have pulled in stdio.h and hence _ansi.h which
- contains this definition, we must undef it before including the
+ contains this definition, we must undef it before including the
tic80-specific definition. */
#undef _CONST
#endif /* _CONST */
@@ -47,23 +47,15 @@
#define GET_SCNHDR_FLAGS H_GET_16
#define PUT_SCNHDR_FLAGS H_PUT_16
-static void rtype2howto
- PARAMS ((arelent *cache_ptr, struct internal_reloc *dst));
static bfd_reloc_status_type ppbase_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type glob15_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type glob16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type local16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean coff_tic80_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static reloc_howto_type * coff_tic80_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+
static reloc_howto_type tic80_howto_table[] =
{
@@ -370,15 +362,13 @@
relocations. */
static bfd_reloc_status_type
-ppbase_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol_in ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+ppbase_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol_in ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* FIXME. */
abort ();
@@ -387,15 +377,13 @@
/* This special function is used for the global 15 bit relocations. */
static bfd_reloc_status_type
-glob15_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol_in ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+glob15_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol_in ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* FIXME. */
abort ();
@@ -404,15 +392,13 @@
/* This special function is used for the global 16 bit relocations. */
static bfd_reloc_status_type
-glob16_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol_in ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+glob16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol_in ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* FIXME. */
abort ();
@@ -421,15 +407,13 @@
/* This special function is used for the local 16 bit relocations. */
static bfd_reloc_status_type
-local16_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol_in ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+local16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol_in ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* FIXME. */
abort ();
@@ -440,9 +424,7 @@
to generate an output file. */
static void
-rtype2howto (cache_ptr, dst)
- arelent *cache_ptr;
- struct internal_reloc *dst;
+rtype2howto (arelent *cache_ptr, struct internal_reloc *dst)
{
unsigned int i;
@@ -464,13 +446,12 @@
#define coff_rtype_to_howto coff_tic80_rtype_to_howto
static reloc_howto_type *
-coff_tic80_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+coff_tic80_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
arelent genrel;
@@ -495,17 +476,14 @@
of this is a copy of _bfd_coff_generic_relocate_section. */
static bfd_boolean
-coff_tic80_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;
+coff_tic80_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;
@@ -722,15 +700,6 @@
return TRUE;
}
-/* Clear the r_reserved field in relocs. */
-#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
- do \
- { \
- dst->r_reserved[0] = 0; \
- dst->r_reserved[1] = 0; \
- } \
- while (0)
-
#define TIC80COFF 1 /* Customize coffcode.h */
#undef C_AUTOARG /* Clashes with TIc80's C_UEXT */
#undef C_LASTENT /* Clashes with TIc80's C_STATLAB */
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index 308d448..71d946c 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -1,6 +1,6 @@
/* BFD back-end for WDC 65816 COFF binaries.
Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2012 Free Software Foundation, Inc.
Written by Steve Chamberlain, <[email protected]>.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,16 +28,10 @@
#include "coff/internal.h"
#include "libcoff.h"
-static int select_reloc PARAMS ((reloc_howto_type *));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-static int w65_reloc16_estimate PARAMS ((bfd *, asection *, arelent *, unsigned int, struct bfd_link_info *));
-static void w65_reloc16_extra_cases PARAMS ((bfd *,struct bfd_link_info *, struct bfd_link_order *, arelent *, bfd_byte *, unsigned int *, unsigned int *));
-
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type howto_table[] =
- {
- HOWTO (R_W65_ABS8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
+{
+ HOWTO (R_W65_ABS8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_W65_ABS16, 1, 0, 16, FALSE, 0, complain_overflow_bitfield, 0, "abs16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_W65_ABS24, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "abs24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO (R_W65_ABS8S8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, ">abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
@@ -66,8 +60,7 @@
dst->r_stuff[1] = 'C';
static int
-select_reloc (howto)
- reloc_howto_type *howto;
+select_reloc (reloc_howto_type *howto)
{
return howto->type ;
}
@@ -75,9 +68,8 @@
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static void
-rtype2howto (internal, dst)
- arelent *internal;
- struct internal_reloc *dst;
+rtype2howto (arelent *internal,
+ struct internal_reloc *dst)
{
internal->howto = howto_table + dst->r_type - 1;
}
@@ -93,12 +85,11 @@
reloc_processing(relent, reloc, symbols, abfd, section)
static void
-reloc_processing (relent, reloc, symbols, abfd, section)
- arelent * relent;
- struct internal_reloc *reloc;
- asymbol ** symbols;
- bfd * abfd;
- asection * section;
+reloc_processing (arelent * relent,
+ struct internal_reloc *reloc,
+ asymbol ** symbols,
+ bfd * abfd,
+ asection * section)
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
@@ -115,21 +106,20 @@
}
static int
-w65_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
- bfd *abfd;
- asection *input_section;
- arelent *reloc;
- unsigned int shrink;
- struct bfd_link_info *link_info;
+w65_reloc16_estimate (bfd *abfd,
+ asection *input_section,
+ arelent *reloc,
+ unsigned int shrink,
+ struct bfd_link_info *link_info)
{
bfd_vma value;
bfd_vma dot;
bfd_vma gap;
/* The address of the thing to be relocated will have moved back by
- the size of the shrink - but we don't change reloc->address here,
- since we need it to know where the relocation lives in the source
- uncooked section. */
+ the size of the shrink - but we don't change reloc->address here,
+ since we need it to know where the relocation lives in the source
+ uncooked section. */
/* reloc->address -= shrink; conceptual */
@@ -222,15 +212,13 @@
R_MOV24B1 R_MOV24B2 24 or 8 bit reloc for mov.b */
static void
-w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
- dst_ptr)
- bfd *abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- arelent *reloc;
- bfd_byte *data;
- unsigned int *src_ptr;
- unsigned int *dst_ptr;
+w65_reloc16_extra_cases (bfd *abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ arelent *reloc,
+ bfd_byte *data,
+ unsigned int *src_ptr,
+ unsigned int *dst_ptr)
{
unsigned int src_address = *src_ptr;
unsigned int dst_address = *dst_ptr;
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index d8a8a2e..946880e 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -18,7 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
Written by Kai Tietz, OneVision Software GmbH&CoKg. */
#ifndef COFF_WITH_pex64
@@ -619,7 +619,8 @@
{
bfd_vma osect_vma;
- if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak))
+ if (h && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
osect_vma = h->root.u.def.section->output_section->vma;
else
{
@@ -730,6 +731,9 @@
#define amd64coff_object_p coff_object_p
#endif
+#define _bfd_generic_find_nearest_line_discriminator \
+ coff_find_nearest_line_discriminator
+
const bfd_target
#ifdef TARGET_SYM
TARGET_SYM =
@@ -748,13 +752,13 @@
(HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
#if defined(COFF_WITH_PE)
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING
#endif
- | SEC_CODE | SEC_DATA),
+ | SEC_CODE | SEC_DATA | SEC_EXCLUDE ),
#ifdef TARGET_UNDERSCORE
TARGET_UNDERSCORE, /* Leading underscore. */
diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c
index 05008cd..6af3e19 100644
--- a/bfd/coff-z80.c
+++ b/bfd/coff-z80.c
@@ -4,7 +4,7 @@
This file is part of BFD, the Binary File Descriptor library.
- This program is free software; you can redistribute it and/or modify
+ 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.
@@ -50,12 +50,12 @@
FALSE);
static reloc_howto_type r_jr =
-HOWTO (R_JR, 0, 0, 8, TRUE, 0,
+HOWTO (R_JR, 0, 0, 8, TRUE, 0,
complain_overflow_signed, 0, "r_jr", FALSE, 0, 0xFF,
FALSE);
static reloc_howto_type r_off8 =
-HOWTO (R_OFF8, 0, 0, 8, FALSE, 0,
+HOWTO (R_OFF8, 0, 0, 8, FALSE, 0,
complain_overflow_signed, 0,"r_off8", FALSE, 0, 0xff,
FALSE);
@@ -284,6 +284,6 @@
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
CREATE_LITTLE_COFF_TARGET_VEC (z80coff_vec, "coff-z80", 0,
- SEC_CODE | SEC_DATA, '\0', NULL,
+ SEC_CODE | SEC_DATA, '\0', NULL,
COFF_SWAP_TABLE)
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 0821b6f..6c92e26 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1373,7 +1373,7 @@
reloc_howto_type xcoff64_howto_table[] =
{
- /* Standard 64 bit relocation. */
+ /* 0x00: Standard 64 bit relocation. */
HOWTO (R_POS, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1388,7 +1388,7 @@
MINUS_ONE, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 64 bit relocation, but store negative value. */
+ /* 0x01: 64 bit relocation, but store negative value. */
HOWTO (R_NEG, /* type */
0, /* rightshift */
-4, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1403,7 +1403,7 @@
MINUS_ONE, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 32 bit PC relative relocation. */
+ /* 0x02: 32 bit PC relative relocation. */
HOWTO (R_REL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1418,7 +1418,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit TOC relative relocation. */
+ /* 0x03: 16 bit TOC relative relocation. */
HOWTO (R_TOC, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1433,7 +1433,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* I don't really know what this is. */
+ /* 0x04: I don't really know what this is. */
HOWTO (R_RTB, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1448,7 +1448,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* External TOC relative symbol. */
+ /* 0x05: External TOC relative symbol. */
HOWTO (R_GL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1463,7 +1463,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Local TOC relative symbol. */
+ /* 0x06: Local TOC relative symbol. */
HOWTO (R_TCL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1480,7 +1480,7 @@
EMPTY_HOWTO (7),
- /* Non modifiable absolute branch. */
+ /* 0x08: Non modifiable absolute branch. */
HOWTO (R_BA, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1497,7 +1497,7 @@
EMPTY_HOWTO (9),
- /* Non modifiable relative branch. */
+ /* 0x0a: Non modifiable relative branch. */
HOWTO (R_BR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1514,7 +1514,7 @@
EMPTY_HOWTO (0xb),
- /* Indirect load. */
+ /* 0x0c: Indirect load. */
HOWTO (R_RL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1529,7 +1529,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Load address. */
+ /* 0x0d: Load address. */
HOWTO (R_RLA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1546,7 +1546,7 @@
EMPTY_HOWTO (0xe),
- /* Non-relocating reference. Bitsize is 1 so that r_rsize is 0. */
+ /* 0x0f: Non-relocating reference. Bitsize is 1 so that r_rsize is 0. */
HOWTO (R_REF, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1564,7 +1564,7 @@
EMPTY_HOWTO (0x10),
EMPTY_HOWTO (0x11),
- /* TOC relative indirect load. */
+ /* 0x12: TOC relative indirect load. */
HOWTO (R_TRL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1579,7 +1579,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* TOC relative load address. */
+ /* 0x13: TOC relative load address. */
HOWTO (R_TRLA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1594,7 +1594,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable relative branch. */
+ /* 0x14: Modifiable relative branch. */
HOWTO (R_RRTBI, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1609,7 +1609,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable absolute branch. */
+ /* 0x15: Modifiable absolute branch. */
HOWTO (R_RRTBA, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1624,7 +1624,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable call absolute indirect. */
+ /* 0x16: Modifiable call absolute indirect. */
HOWTO (R_CAI, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1639,7 +1639,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable call relative. */
+ /* 0x17: Modifiable call relative. */
HOWTO (R_CREL, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1654,7 +1654,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x18: Modifiable branch absolute. */
HOWTO (R_RBA, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1669,7 +1669,7 @@
0x03fffffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x19: Modifiable branch absolute. */
HOWTO (R_RBAC, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1684,7 +1684,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch relative. */
+ /* 0x1a: Modifiable branch relative. */
HOWTO (R_RBR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1699,7 +1699,7 @@
0x03fffffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x1b: Modifiable branch absolute. */
HOWTO (R_RBRC, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1714,6 +1714,7 @@
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* 0x1c: Standard 32 bit relocation. */
HOWTO (R_POS, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1728,7 +1729,7 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit Non modifiable absolute branch. */
+ /* 0x1d: 16 bit Non modifiable absolute branch. */
HOWTO (R_BA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1743,22 +1744,22 @@
0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch relative. */
+ /* 0x1e: Modifiable branch relative. */
HOWTO (R_RBR, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- FALSE, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"R_RBR_16", /* name */
TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* src_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Modifiable branch absolute. */
+ /* 0x1f: Modifiable branch absolute. */
HOWTO (R_RBA, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1826,6 +1827,11 @@
return &xcoff64_howto_table[8];
case BFD_RELOC_PPC_TOC16:
return &xcoff64_howto_table[3];
+ case BFD_RELOC_16:
+ /* Note that this relocation is only internally used by gas. */
+ return &xcoff64_howto_table[0xc];
+ case BFD_RELOC_PPC_B16:
+ return &xcoff64_howto_table[0x1e];
case BFD_RELOC_32:
case BFD_RELOC_CTOR:
return &xcoff64_howto_table[0x1c];
@@ -2668,7 +2674,7 @@
},
/* Generic */
- bfd_true,
+ _bfd_archive_close_and_cleanup,
bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
@@ -2926,7 +2932,7 @@
},
/* Generic */
- bfd_true,
+ _bfd_archive_close_and_cleanup,
bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 6f9685b..542b5b7 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1,7 +1,5 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -119,11 +117,11 @@
The Microsoft PE variants of the Coff object file format add
an extension to support the use of long section names. This
- extension is defined in section 4 of the Microsoft PE/COFF
+ extension is defined in section 4 of the Microsoft PE/COFF
specification (rev 8.1). If a section name is too long to fit
into the section header's @code{s_name} field, it is instead
placed into the string table, and the @code{s_name} field is
- filled with a slash ("/") followed by the ASCII decimal
+ filled with a slash ("/") followed by the ASCII decimal
representation of the offset of the full name relative to the
string table base.
@@ -140,11 +138,11 @@
expecting the MS standard format may become confused; @file{PEview} is
one known example.
- The functionality is supported in BFD by code implemented under
+ The functionality is supported in BFD by code implemented under
the control of the macro @code{COFF_LONG_SECTION_NAMES}. If not
defined, the format does not support long section names in any way.
- If defined, it is used to initialise a flag,
- @code{_bfd_coff_long_section_names}, and a hook function pointer,
+ If defined, it is used to initialise a flag,
+ @code{_bfd_coff_long_section_names}, and a hook function pointer,
@code{_bfd_coff_set_long_section_names}, in the Coff backend data
structure. The flag controls the generation of long section names
in output BFDs at runtime; if it is false, as it will be by default
@@ -153,7 +151,7 @@
points to a function that allows the value of the flag to be altered
at runtime, on formats that support long section names at all; on
other formats it points to a stub that returns an error indication.
-
+
With input BFDs, the flag is set according to whether any long section
names are detected while reading the section headers. For a completely
new BFD, the flag is set to the default for the target format. This
@@ -372,6 +370,7 @@
#define STRING_SIZE_SIZE 4
#define DOT_DEBUG ".debug"
+#define DOT_ZDEBUG ".zdebug"
#define GNU_LINKONCE_WI ".gnu.linkonce.wi."
#define GNU_LINKONCE_WT ".gnu.linkonce.wt."
#define DOT_RELOC ".reloc"
@@ -545,7 +544,8 @@
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (CONST_STRNEQ (sec_name, DOT_DEBUG))
+ else if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+ || CONST_STRNEQ (sec_name, DOT_ZDEBUG))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
@@ -652,6 +652,7 @@
bfd_boolean is_dbg = FALSE;
if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+ || CONST_STRNEQ (sec_name, DOT_ZDEBUG)
#ifdef COFF_LONG_SECTION_NAMES
|| CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
|| CONST_STRNEQ (sec_name, GNU_LINKONCE_WT)
@@ -670,7 +671,9 @@
/* FIXME: There is no gas syntax to specify the debug section flag. */
if (is_dbg)
{
- sec_flags &= (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD);
+ sec_flags &= (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD
+ | SEC_LINK_DUPLICATES_SAME_CONTENTS
+ | SEC_LINK_DUPLICATES_SAME_SIZE);
sec_flags |= SEC_DEBUGGING | SEC_READONLY;
}
@@ -698,7 +701,11 @@
/* skip SORT */
if (sec_flags & SEC_LINK_ONCE)
styp_flags |= IMAGE_SCN_LNK_COMDAT;
- /* skip LINK_DUPLICATES */
+ if ((sec_flags
+ & (SEC_LINK_DUPLICATES_DISCARD | SEC_LINK_DUPLICATES_SAME_CONTENTS
+ | SEC_LINK_DUPLICATES_SAME_SIZE)) != 0)
+ styp_flags |= IMAGE_SCN_LNK_COMDAT;
+
/* skip LINKER_CREATED */
if ((sec_flags & SEC_COFF_NOREAD) == 0)
@@ -788,6 +795,12 @@
else if (styp_flags & STYP_PAD)
sec_flags = 0;
#ifdef RS6000COFF_C
+ else if (styp_flags & STYP_EXCEPT)
+ sec_flags |= SEC_LOAD;
+ else if (styp_flags & STYP_LOADER)
+ sec_flags |= SEC_LOAD;
+ else if (styp_flags & STYP_TYPCHK)
+ sec_flags |= SEC_LOAD;
else if (styp_flags & STYP_DWARF)
sec_flags |= SEC_DEBUGGING;
#endif
@@ -815,6 +828,7 @@
sec_flags |= SEC_ALLOC;
}
else if (CONST_STRNEQ (name, DOT_DEBUG)
+ || CONST_STRNEQ (name, DOT_ZDEBUG)
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
@@ -1152,6 +1166,7 @@
bfd_boolean is_dbg = FALSE;
if (CONST_STRNEQ (name, DOT_DEBUG)
+ || CONST_STRNEQ (name, DOT_ZDEBUG)
#ifdef COFF_LONG_SECTION_NAMES
|| CONST_STRNEQ (name, GNU_LINKONCE_WI)
|| CONST_STRNEQ (name, GNU_LINKONCE_WT)
@@ -1374,7 +1389,7 @@
. bfd_boolean _bfd_coff_long_section_names;
. bfd_boolean (*_bfd_coff_set_long_section_names)
. (bfd *, int);
-.
+.
. unsigned int _bfd_coff_default_section_alignment_power;
. bfd_boolean _bfd_coff_force_symnames_in_strings;
. unsigned int _bfd_coff_debug_string_prefix_length;
@@ -3348,36 +3363,38 @@
padding the previous section up if necessary. */
old_sofar = sofar;
+ sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+
#ifdef RS6000COFF_C
- /* AIX loader checks the text section alignment of (vma - filepos)
- So even though the filepos may be aligned wrt the o_algntext, for
- AIX executables, this check fails. This shows up when a native
- AIX executable is stripped with gnu strip because the default vma
- of native is 0x10000150 but default for gnu is 0x10000140. Gnu
- stripped gnu excutable passes this check because the filepos is
- 0x0140. This problem also show up with 64 bit shared objects. The
- data section must also be aligned. */
+ /* Make sure the file offset and the vma of .text/.data are at the
+ same page offset, so that the file can be mmap'ed without being
+ relocated. Failing that, AIX is able to load and execute the
+ program, but it will be silently relocated (possible as
+ executables are PIE). But the relocation is slightly costly and
+ complexify the use of addr2line or gdb. So better to avoid it,
+ like does the native linker. Usually gnu ld makes sure that
+ the vma of .text is the file offset so this issue shouldn't
+ appear unless you are stripping such an executable.
+
+ AIX loader checks the text section alignment of (vma - filepos),
+ and the native linker doesn't try to align the text sections.
+ For example:
+
+ 0 .text 000054cc 10000128 10000128 00000128 2**5
+ CONTENTS, ALLOC, LOAD, CODE
+ */
+
if (!strcmp (current->name, _TEXT)
|| !strcmp (current->name, _DATA))
{
- bfd_vma pad;
- bfd_vma align;
+ bfd_vma align = 4096;
+ bfd_vma sofar_off = sofar % align;
+ bfd_vma vma_off = current->vma % align;
- sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
-
- align = 1 << current->alignment_power;
- pad = abs (current->vma - sofar) % align;
-
- if (pad)
- {
- pad = align - pad;
- sofar += pad;
- }
- }
- else
-#else
- {
- sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+ if (vma_off > sofar_off)
+ sofar += vma_off - sofar_off;
+ else if (vma_off < sofar_off)
+ sofar += align + vma_off - sofar_off;
}
#endif
if (previous != NULL)
@@ -3436,7 +3453,7 @@
incremented in coff_set_section_contents. This is right for
SVR3.2. */
if (strcmp (current->name, _LIB) == 0)
- bfd_set_section_vma (abfd, current, 0);
+ (void) bfd_set_section_vma (abfd, current, 0);
#endif
#ifdef ALIGN_SECTIONS_IN_FILE
@@ -3938,7 +3955,7 @@
bfd_size_type amt;
internal_f.f_nscns++;
- strncpy (&(scnhdr.s_name[0]), current->name, 8);
+ memcpy (scnhdr.s_name, ".ovrflo", 8);
scnhdr.s_paddr = current->reloc_count;
scnhdr.s_vaddr = current->lineno_count;
scnhdr.s_size = 0;
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index a9f3b47..07a527d 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -91,7 +91,7 @@
don't know the length of the string table. */
strings += strindex;
name = (char *) bfd_alloc (abfd,
- (bfd_size_type) strlen (strings) + 1);
+ (bfd_size_type) strlen (strings) + 1 + 1);
if (name == NULL)
return FALSE;
strcpy (name, strings);
@@ -102,7 +102,7 @@
{
/* Assorted wastage to null-terminate the name, thanks AT&T! */
name = (char *) bfd_alloc (abfd,
- (bfd_size_type) sizeof (hdr->s_name) + 1);
+ (bfd_size_type) sizeof (hdr->s_name) + 1 + 1);
if (name == NULL)
return FALSE;
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
@@ -146,13 +146,87 @@
if (hdr->s_scnptr != 0)
return_section->flags |= SEC_HAS_CONTENTS;
+ /* Compress/decompress DWARF debug sections with names: .debug_* and
+ .zdebug_*, after the section flags is set. */
+ if ((flags & SEC_DEBUGGING)
+ && ((name[1] == 'd' && name[6] == '_')
+ || (name[1] == 'z' && name[7] == '_')))
+ {
+ enum { nothing, compress, decompress } action = nothing;
+ char *new_name = NULL;
+
+ if (bfd_is_section_compressed (abfd, return_section))
+ {
+ /* Compressed section. Check if we should decompress. */
+ if ((abfd->flags & BFD_DECOMPRESS))
+ action = decompress;
+ }
+ else if (!bfd_is_section_compressed (abfd, return_section))
+ {
+ /* Normal section. Check if we should compress. */
+ if ((abfd->flags & BFD_COMPRESS) && return_section->size != 0)
+ action = compress;
+ }
+
+ switch (action)
+ {
+ case nothing:
+ break;
+ case compress:
+ if (!bfd_init_section_compress_status (abfd, return_section))
+ {
+ (*_bfd_error_handler)
+ (_("%B: unable to initialize compress status for section %s"),
+ 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, return_section))
+ {
+ (*_bfd_error_handler)
+ (_("%B: unable to initialize decompress status for section %s"),
+ 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, return_section, new_name);
+ }
+
return result;
}
/* Read in a COFF object and make it into a BFD. This is used by
ECOFF as well. */
-
-static const bfd_target *
+const bfd_target *
+coff_real_object_p (bfd *,
+ unsigned,
+ struct internal_filehdr *,
+ struct internal_aouthdr *);
+const bfd_target *
coff_real_object_p (bfd *abfd,
unsigned nscns,
struct internal_filehdr *internal_f,
@@ -577,7 +651,7 @@
struct internal_syment *syment)
{
/* Normalize the symbol flags. */
- if (coff_symbol_ptr->symbol.section
+ if (coff_symbol_ptr->symbol.section
&& bfd_is_com_section (coff_symbol_ptr->symbol.section))
{
/* A common symbol is undefined with a value. */
@@ -983,23 +1057,36 @@
file originally. This symbol may have been created by the linker,
or we may be linking a non COFF file to a COFF file. */
-static bfd_boolean
+bfd_boolean
coff_write_alien_symbol (bfd *abfd,
asymbol *symbol,
+ struct internal_syment *isym,
bfd_vma *written,
bfd_size_type *string_size_p,
asection **debug_string_section_p,
bfd_size_type *debug_string_size_p)
{
combined_entry_type *native;
- combined_entry_type dummy;
+ combined_entry_type dummy[2];
asection *output_section = symbol->section->output_section
? symbol->section->output_section
: symbol->section;
+ struct bfd_link_info *link_info = coff_data (abfd)->link_info;
+ bfd_boolean ret;
- native = &dummy;
+ if ((!link_info || link_info->strip_discarded)
+ && !bfd_is_abs_section (symbol->section)
+ && symbol->section->output_section == bfd_abs_section_ptr)
+ {
+ symbol->name = "";
+ if (isym != NULL)
+ memset (isym, 0, sizeof(*isym));
+ return TRUE;
+ }
+ native = dummy;
native->u.syment.n_type = T_NULL;
native->u.syment.n_flags = 0;
+ native->u.syment.n_numaux = 0;
if (bfd_is_und_section (symbol->section))
{
native->u.syment.n_scnum = N_UNDEF;
@@ -1010,6 +1097,11 @@
native->u.syment.n_scnum = N_UNDEF;
native->u.syment.n_value = symbol->value;
}
+ else if (symbol->flags & BSF_FILE)
+ {
+ native->u.syment.n_scnum = N_DEBUG;
+ native->u.syment.n_numaux = 1;
+ }
else if (symbol->flags & BSF_DEBUGGING)
{
/* There isn't much point to writing out a debugging symbol
@@ -1017,6 +1109,8 @@
format. So, we just ignore them. We must clobber the symbol
name to keep it from being put in the string table. */
symbol->name = "";
+ if (isym != NULL)
+ memset (isym, 0, sizeof(*isym));
return TRUE;
}
else
@@ -1037,16 +1131,20 @@
}
native->u.syment.n_type = 0;
- if (symbol->flags & BSF_LOCAL)
+ if (symbol->flags & BSF_FILE)
+ native->u.syment.n_sclass = C_FILE;
+ else if (symbol->flags & BSF_LOCAL)
native->u.syment.n_sclass = C_STAT;
else if (symbol->flags & BSF_WEAK)
native->u.syment.n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT;
else
native->u.syment.n_sclass = C_EXT;
- native->u.syment.n_numaux = 0;
- return coff_write_symbol (abfd, symbol, native, written, string_size_p,
- debug_string_section_p, debug_string_size_p);
+ ret = coff_write_symbol (abfd, symbol, native, written, string_size_p,
+ debug_string_section_p, debug_string_size_p);
+ if (isym != NULL)
+ *isym = native->u.syment;
+ return ret;
}
/* Write a native symbol to a COFF file. */
@@ -1061,6 +1159,15 @@
{
combined_entry_type *native = symbol->native;
alent *lineno = symbol->lineno;
+ struct bfd_link_info *link_info = coff_data (abfd)->link_info;
+
+ if ((!link_info || link_info->strip_discarded)
+ && !bfd_is_abs_section (symbol->symbol.section)
+ && symbol->symbol.section->output_section == bfd_abs_section_ptr)
+ {
+ symbol->symbol.name = "";
+ return TRUE;
+ }
/* If this symbol has an associated line number, we must store the
symbol index in the line number field. We also tag the auxent to
@@ -1153,8 +1260,8 @@
if (c_symbol == (coff_symbol_type *) NULL
|| c_symbol->native == (combined_entry_type *) NULL)
{
- if (!coff_write_alien_symbol (abfd, symbol, &written, &string_size,
- &debug_string_section,
+ if (!coff_write_alien_symbol (abfd, symbol, NULL, &written,
+ &string_size, &debug_string_section,
&debug_string_size))
return FALSE;
}
@@ -1416,7 +1523,7 @@
/* Otherwise patch up. */
#define N_TMASK coff_data (abfd)->local_n_tmask
#define N_BTSHFT coff_data (abfd)->local_n_btshft
-
+
if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK
|| n_sclass == C_FCN)
&& auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0)
@@ -1839,7 +1946,7 @@
new_symbol->lineno = NULL;
new_symbol->done_lineno = FALSE;
new_symbol->symbol.the_bfd = abfd;
-
+
return & new_symbol->symbol;
}
@@ -2085,13 +2192,14 @@
nearest to the wanted location. */
bfd_boolean
-coff_find_nearest_line (bfd *abfd,
- asection *section,
- asymbol **symbols,
- bfd_vma offset,
- const char **filename_ptr,
- const char **functionname_ptr,
- unsigned int *line_ptr)
+coff_find_nearest_line_with_names (bfd *abfd,
+ const struct dwarf_debug_section *debug_sections,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
{
bfd_boolean found;
unsigned int i;
@@ -2116,7 +2224,8 @@
return TRUE;
/* Also try examining DWARF2 debugging information. */
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ if (_bfd_dwarf2_find_nearest_line (abfd, debug_sections,
+ section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr, NULL, 0,
&coff_data(abfd)->dwarf2_find_line_info))
@@ -2299,6 +2408,39 @@
}
bfd_boolean
+coff_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ return coff_find_nearest_line_with_names (abfd, dwarf_debug_sections,
+ section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr);
+}
+
+bfd_boolean
+coff_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)
+{
+ *discriminator = 0;
+ return coff_find_nearest_line_with_names (abfd, dwarf_debug_sections,
+ section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr);
+}
+
+
+bfd_boolean
coff_find_inliner_info (bfd *abfd,
const char **filename_ptr,
const char **functionname_ptr,
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index bca1364..948b4cd 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -605,7 +605,7 @@
{
bfd_size_type string_offset = 0;
asection *stab;
-
+
for (stab = abfd->sections; stab; stab = stab->next)
if (CONST_STRNEQ (stab->name, ".stab")
&& (!stab->name[5]
@@ -614,7 +614,7 @@
struct coff_link_hash_table *table;
struct coff_section_tdata *secdata
= coff_section_data (abfd, stab);
-
+
if (secdata == NULL)
{
amt = sizeof (struct coff_section_tdata);
@@ -651,7 +651,7 @@
struct bfd_link_info *info)
{
bfd_size_type symesz;
- struct coff_final_link_info finfo;
+ struct coff_final_link_info flaginfo;
bfd_boolean debug_merge_allocated;
bfd_boolean long_section_names;
asection *o;
@@ -672,30 +672,30 @@
symesz = bfd_coff_symesz (abfd);
- finfo.info = info;
- finfo.output_bfd = abfd;
- finfo.strtab = NULL;
- finfo.section_info = NULL;
- finfo.last_file_index = -1;
- finfo.last_bf_index = -1;
- finfo.internal_syms = NULL;
- finfo.sec_ptrs = NULL;
- finfo.sym_indices = NULL;
- finfo.outsyms = NULL;
- finfo.linenos = NULL;
- finfo.contents = NULL;
- finfo.external_relocs = NULL;
- finfo.internal_relocs = NULL;
- finfo.global_to_static = FALSE;
+ flaginfo.info = info;
+ flaginfo.output_bfd = abfd;
+ flaginfo.strtab = NULL;
+ flaginfo.section_info = NULL;
+ flaginfo.last_file_index = -1;
+ flaginfo.last_bf_index = -1;
+ flaginfo.internal_syms = NULL;
+ flaginfo.sec_ptrs = NULL;
+ flaginfo.sym_indices = NULL;
+ flaginfo.outsyms = NULL;
+ flaginfo.linenos = NULL;
+ flaginfo.contents = NULL;
+ flaginfo.external_relocs = NULL;
+ flaginfo.internal_relocs = NULL;
+ flaginfo.global_to_static = FALSE;
debug_merge_allocated = FALSE;
coff_data (abfd)->link_info = info;
- finfo.strtab = _bfd_stringtab_init ();
- if (finfo.strtab == NULL)
+ flaginfo.strtab = _bfd_stringtab_init ();
+ if (flaginfo.strtab == NULL)
goto error_return;
- if (! coff_debug_merge_hash_table_init (&finfo.debug_merge))
+ if (! coff_debug_merge_hash_table_init (&flaginfo.debug_merge))
goto error_return;
debug_merge_allocated = TRUE;
@@ -775,7 +775,7 @@
coff_write_object_contents which puts the string index
into the s_name field of the section header. That is why
we pass hash as FALSE. */
- if (_bfd_stringtab_add (finfo.strtab, o->name, FALSE, FALSE)
+ if (_bfd_stringtab_add (flaginfo.strtab, o->name, FALSE, FALSE)
== (bfd_size_type) -1)
goto error_return;
long_section_names = TRUE;
@@ -792,13 +792,13 @@
the target_index fields are 1 based. */
amt = abfd->section_count + 1;
amt *= sizeof (struct coff_link_section_info);
- finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
- if (finfo.section_info == NULL)
+ flaginfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
+ if (flaginfo.section_info == NULL)
goto error_return;
for (i = 0; i <= abfd->section_count; i++)
{
- finfo.section_info[i].relocs = NULL;
- finfo.section_info[i].rel_hashes = NULL;
+ flaginfo.section_info[i].relocs = NULL;
+ flaginfo.section_info[i].rel_hashes = NULL;
}
}
@@ -835,14 +835,14 @@
BFD_ASSERT (info->relocatable);
amt = o->reloc_count;
amt *= sizeof (struct internal_reloc);
- finfo.section_info[o->target_index].relocs =
+ flaginfo.section_info[o->target_index].relocs =
(struct internal_reloc *) bfd_malloc (amt);
amt = o->reloc_count;
amt *= sizeof (struct coff_link_hash_entry *);
- finfo.section_info[o->target_index].rel_hashes =
+ flaginfo.section_info[o->target_index].rel_hashes =
(struct coff_link_hash_entry **) bfd_malloc (amt);
- if (finfo.section_info[o->target_index].relocs == NULL
- || finfo.section_info[o->target_index].rel_hashes == NULL)
+ if (flaginfo.section_info[o->target_index].relocs == NULL
+ || flaginfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
if (o->reloc_count > max_output_reloc_count)
@@ -866,38 +866,38 @@
size_t sz;
sub->output_has_begun = FALSE;
- sz = obj_raw_syment_count (sub);
+ sz = bfd_family_coff (sub) ? obj_raw_syment_count (sub) : 2;
if (sz > max_sym_count)
max_sym_count = sz;
}
/* Allocate some buffers used while linking. */
amt = max_sym_count * sizeof (struct internal_syment);
- finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
+ flaginfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
amt = max_sym_count * sizeof (asection *);
- finfo.sec_ptrs = (asection **) bfd_malloc (amt);
+ flaginfo.sec_ptrs = (asection **) bfd_malloc (amt);
amt = max_sym_count * sizeof (long);
- finfo.sym_indices = (long int *) bfd_malloc (amt);
- finfo.outsyms = (bfd_byte *) bfd_malloc ((max_sym_count + 1) * symesz);
+ flaginfo.sym_indices = (long int *) bfd_malloc (amt);
+ flaginfo.outsyms = (bfd_byte *) bfd_malloc ((max_sym_count + 1) * symesz);
amt = max_lineno_count * bfd_coff_linesz (abfd);
- finfo.linenos = (bfd_byte *) bfd_malloc (amt);
- finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
+ flaginfo.linenos = (bfd_byte *) bfd_malloc (amt);
+ flaginfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
amt = max_reloc_count * relsz;
- finfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
+ flaginfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
if (! info->relocatable)
{
amt = max_reloc_count * sizeof (struct internal_reloc);
- finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
+ flaginfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
}
- if ((finfo.internal_syms == NULL && max_sym_count > 0)
- || (finfo.sec_ptrs == NULL && max_sym_count > 0)
- || (finfo.sym_indices == NULL && max_sym_count > 0)
- || finfo.outsyms == NULL
- || (finfo.linenos == NULL && max_lineno_count > 0)
- || (finfo.contents == NULL && max_contents_size > 0)
- || (finfo.external_relocs == NULL && max_reloc_count > 0)
+ if ((flaginfo.internal_syms == NULL && max_sym_count > 0)
+ || (flaginfo.sec_ptrs == NULL && max_sym_count > 0)
+ || (flaginfo.sym_indices == NULL && max_sym_count > 0)
+ || flaginfo.outsyms == NULL
+ || (flaginfo.linenos == NULL && max_lineno_count > 0)
+ || (flaginfo.contents == NULL && max_contents_size > 0)
+ || (flaginfo.external_relocs == NULL && max_reloc_count > 0)
|| (! info->relocatable
- && finfo.internal_relocs == NULL
+ && flaginfo.internal_relocs == NULL
&& max_reloc_count > 0))
goto error_return;
@@ -922,9 +922,9 @@
&& bfd_family_coff (p->u.indirect.section->owner))
{
sub = p->u.indirect.section->owner;
- if (! bfd_coff_link_output_has_begun (sub, & finfo))
+ if (! bfd_coff_link_output_has_begun (sub, & flaginfo))
{
- if (! _bfd_coff_link_input_bfd (&finfo, sub))
+ if (! _bfd_coff_link_input_bfd (&flaginfo, sub))
goto error_return;
sub->output_has_begun = TRUE;
}
@@ -932,7 +932,7 @@
else if (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order)
{
- if (! _bfd_coff_reloc_link_order (abfd, &finfo, o, p))
+ if (! _bfd_coff_reloc_link_order (abfd, &flaginfo, o, p))
goto error_return;
}
else
@@ -943,65 +943,151 @@
}
}
- if (! bfd_coff_final_link_postscript (abfd, & finfo))
+ if (flaginfo.info->strip != strip_all && flaginfo.info->discard != discard_all)
+ {
+ /* Add local symbols from foreign inputs. */
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ unsigned int i;
+
+ if (bfd_family_coff (sub) || ! bfd_get_outsymbols (sub))
+ continue;
+ for (i = 0; i < bfd_get_symcount (sub); ++i)
+ {
+ asymbol *sym = bfd_get_outsymbols (sub) [i];
+ file_ptr pos;
+ struct internal_syment isym;
+ bfd_size_type string_size = 0;
+ bfd_vma written = 0;
+ bfd_boolean rewrite = FALSE;
+
+ if (! (sym->flags & BSF_LOCAL)
+ || (sym->flags & (BSF_SECTION_SYM | BSF_DEBUGGING_RELOC
+ | BSF_THREAD_LOCAL | BSF_RELC | BSF_SRELC
+ | BSF_SYNTHETIC))
+ || ((sym->flags & BSF_DEBUGGING)
+ && ! (sym->flags & BSF_FILE)))
+ continue;
+
+ /* See if we are discarding symbols with this name. */
+ if ((flaginfo.info->strip == strip_some
+ && (bfd_hash_lookup (flaginfo.info->keep_hash,
+ bfd_asymbol_name(sym), FALSE, FALSE)
+ == NULL))
+ || (((flaginfo.info->discard == discard_sec_merge
+ && (bfd_get_section (sym)->flags & SEC_MERGE)
+ && ! flaginfo.info->relocatable)
+ || flaginfo.info->discard == discard_l)
+ && bfd_is_local_label_name (sub, bfd_asymbol_name(sym))))
+ continue;
+
+ pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd)
+ * symesz;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0)
+ goto error_return;
+ if (! coff_write_alien_symbol(abfd, sym, &isym, &written,
+ &string_size, NULL, NULL))
+ goto error_return;
+
+ if (string_size)
+ {
+ bfd_boolean hash = ! (abfd->flags & BFD_TRADITIONAL_FORMAT);
+ bfd_size_type indx;
+
+ indx = _bfd_stringtab_add (flaginfo.strtab,
+ bfd_asymbol_name (sym), hash,
+ FALSE);
+ if (indx == (bfd_size_type) -1)
+ goto error_return;
+ isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
+ bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms);
+ rewrite = TRUE;
+ }
+
+ if (isym.n_sclass == C_FILE)
+ {
+ if (flaginfo.last_file_index != -1)
+ {
+ flaginfo.last_file.n_value = obj_raw_syment_count (abfd);
+ bfd_coff_swap_sym_out (abfd, &flaginfo.last_file,
+ flaginfo.outsyms);
+ pos = obj_sym_filepos (abfd) + flaginfo.last_file_index
+ * symesz;
+ rewrite = TRUE;
+ }
+ flaginfo.last_file_index = obj_raw_syment_count (abfd);
+ flaginfo.last_file = isym;
+ }
+
+ if (rewrite
+ && (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz))
+ goto error_return;
+
+ obj_raw_syment_count (abfd) += written;
+ }
+ }
+ }
+
+ if (! bfd_coff_final_link_postscript (abfd, & flaginfo))
goto error_return;
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
- coff_debug_merge_hash_table_free (&finfo.debug_merge);
+ coff_debug_merge_hash_table_free (&flaginfo.debug_merge);
debug_merge_allocated = FALSE;
- if (finfo.internal_syms != NULL)
+ if (flaginfo.internal_syms != NULL)
{
- free (finfo.internal_syms);
- finfo.internal_syms = NULL;
+ free (flaginfo.internal_syms);
+ flaginfo.internal_syms = NULL;
}
- if (finfo.sec_ptrs != NULL)
+ if (flaginfo.sec_ptrs != NULL)
{
- free (finfo.sec_ptrs);
- finfo.sec_ptrs = NULL;
+ free (flaginfo.sec_ptrs);
+ flaginfo.sec_ptrs = NULL;
}
- if (finfo.sym_indices != NULL)
+ if (flaginfo.sym_indices != NULL)
{
- free (finfo.sym_indices);
- finfo.sym_indices = NULL;
+ free (flaginfo.sym_indices);
+ flaginfo.sym_indices = NULL;
}
- if (finfo.linenos != NULL)
+ if (flaginfo.linenos != NULL)
{
- free (finfo.linenos);
- finfo.linenos = NULL;
+ free (flaginfo.linenos);
+ flaginfo.linenos = NULL;
}
- if (finfo.contents != NULL)
+ if (flaginfo.contents != NULL)
{
- free (finfo.contents);
- finfo.contents = NULL;
+ free (flaginfo.contents);
+ flaginfo.contents = NULL;
}
- if (finfo.external_relocs != NULL)
+ if (flaginfo.external_relocs != NULL)
{
- free (finfo.external_relocs);
- finfo.external_relocs = NULL;
+ free (flaginfo.external_relocs);
+ flaginfo.external_relocs = NULL;
}
- if (finfo.internal_relocs != NULL)
+ if (flaginfo.internal_relocs != NULL)
{
- free (finfo.internal_relocs);
- finfo.internal_relocs = NULL;
+ free (flaginfo.internal_relocs);
+ flaginfo.internal_relocs = NULL;
}
/* The value of the last C_FILE symbol is supposed to be the symbol
index of the first external symbol. Write it out again if
necessary. */
- if (finfo.last_file_index != -1
- && (unsigned int) finfo.last_file.n_value != obj_raw_syment_count (abfd))
+ if (flaginfo.last_file_index != -1
+ && (unsigned int) flaginfo.last_file.n_value != obj_raw_syment_count (abfd))
{
file_ptr pos;
- finfo.last_file.n_value = obj_raw_syment_count (abfd);
- bfd_coff_swap_sym_out (abfd, &finfo.last_file,
- finfo.outsyms);
+ flaginfo.last_file.n_value = obj_raw_syment_count (abfd);
+ bfd_coff_swap_sym_out (abfd, &flaginfo.last_file,
+ flaginfo.outsyms);
- pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
+ pos = obj_sym_filepos (abfd) + flaginfo.last_file_index * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
+ || bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz)
return FALSE;
}
@@ -1010,24 +1096,24 @@
static. */
if (info->task_link)
{
- finfo.failed = FALSE;
+ flaginfo.failed = FALSE;
coff_link_hash_traverse (coff_hash_table (info),
- _bfd_coff_write_task_globals, &finfo);
- if (finfo.failed)
+ _bfd_coff_write_task_globals, &flaginfo);
+ if (flaginfo.failed)
goto error_return;
}
/* Write out the global symbols. */
- finfo.failed = FALSE;
- bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &finfo);
- if (finfo.failed)
+ flaginfo.failed = FALSE;
+ bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &flaginfo);
+ if (flaginfo.failed)
goto error_return;
/* The outsyms buffer is used by _bfd_coff_write_global_sym. */
- if (finfo.outsyms != NULL)
+ if (flaginfo.outsyms != NULL)
{
- free (finfo.outsyms);
- finfo.outsyms = NULL;
+ free (flaginfo.outsyms);
+ flaginfo.outsyms = NULL;
}
if (info->relocatable && max_output_reloc_count > 0)
@@ -1050,9 +1136,9 @@
if (o->reloc_count == 0)
continue;
- irel = finfo.section_info[o->target_index].relocs;
+ irel = flaginfo.section_info[o->target_index].relocs;
irelend = irel + o->reloc_count;
- rel_hash = finfo.section_info[o->target_index].rel_hashes;
+ rel_hash = flaginfo.section_info[o->target_index].rel_hashes;
erel = external_relocs;
for (; irel < irelend; irel++, rel_hash++, erel += relsz)
{
@@ -1073,10 +1159,10 @@
elsewhere. */
struct internal_reloc incount;
bfd_byte *excount = (bfd_byte *)bfd_malloc (relsz);
-
+
memset (&incount, 0, sizeof (incount));
incount.r_vaddr = o->reloc_count + 1;
- bfd_coff_swap_reloc_out (abfd, (PTR) &incount, (PTR) excount);
+ bfd_coff_swap_reloc_out (abfd, &incount, excount);
if (bfd_bwrite (excount, relsz, abfd) != relsz)
/* We'll leak, but it's an error anyway. */
goto error_return;
@@ -1093,19 +1179,19 @@
}
/* Free up the section information. */
- if (finfo.section_info != NULL)
+ if (flaginfo.section_info != NULL)
{
unsigned int i;
for (i = 0; i < abfd->section_count; i++)
{
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
+ if (flaginfo.section_info[i].relocs != NULL)
+ free (flaginfo.section_info[i].relocs);
+ if (flaginfo.section_info[i].rel_hashes != NULL)
+ free (flaginfo.section_info[i].rel_hashes);
}
- free (finfo.section_info);
- finfo.section_info = NULL;
+ free (flaginfo.section_info);
+ flaginfo.section_info = NULL;
}
/* If we have optimized stabs strings, output them. */
@@ -1126,7 +1212,7 @@
#if STRING_SIZE_SIZE == 4
H_PUT_32 (abfd,
- _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ _bfd_stringtab_size (flaginfo.strtab) + STRING_SIZE_SIZE,
strbuf);
#else
#error Change H_PUT_32 above
@@ -1136,13 +1222,13 @@
!= STRING_SIZE_SIZE)
return FALSE;
- if (! _bfd_stringtab_emit (abfd, finfo.strtab))
+ if (! _bfd_stringtab_emit (abfd, flaginfo.strtab))
return FALSE;
obj_coff_strings_written (abfd) = TRUE;
}
- _bfd_stringtab_free (finfo.strtab);
+ _bfd_stringtab_free (flaginfo.strtab);
/* Setting bfd_get_symcount to 0 will cause write_object_contents to
not try to write out the symbols. */
@@ -1152,38 +1238,38 @@
error_return:
if (debug_merge_allocated)
- coff_debug_merge_hash_table_free (&finfo.debug_merge);
- if (finfo.strtab != NULL)
- _bfd_stringtab_free (finfo.strtab);
- if (finfo.section_info != NULL)
+ coff_debug_merge_hash_table_free (&flaginfo.debug_merge);
+ if (flaginfo.strtab != NULL)
+ _bfd_stringtab_free (flaginfo.strtab);
+ if (flaginfo.section_info != NULL)
{
unsigned int i;
for (i = 0; i < abfd->section_count; i++)
{
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
+ if (flaginfo.section_info[i].relocs != NULL)
+ free (flaginfo.section_info[i].relocs);
+ if (flaginfo.section_info[i].rel_hashes != NULL)
+ free (flaginfo.section_info[i].rel_hashes);
}
- free (finfo.section_info);
+ free (flaginfo.section_info);
}
- if (finfo.internal_syms != NULL)
- free (finfo.internal_syms);
- if (finfo.sec_ptrs != NULL)
- free (finfo.sec_ptrs);
- if (finfo.sym_indices != NULL)
- free (finfo.sym_indices);
- if (finfo.outsyms != NULL)
- free (finfo.outsyms);
- if (finfo.linenos != NULL)
- free (finfo.linenos);
- if (finfo.contents != NULL)
- free (finfo.contents);
- if (finfo.external_relocs != NULL)
- free (finfo.external_relocs);
- if (finfo.internal_relocs != NULL)
- free (finfo.internal_relocs);
+ if (flaginfo.internal_syms != NULL)
+ free (flaginfo.internal_syms);
+ if (flaginfo.sec_ptrs != NULL)
+ free (flaginfo.sec_ptrs);
+ if (flaginfo.sym_indices != NULL)
+ free (flaginfo.sym_indices);
+ if (flaginfo.outsyms != NULL)
+ free (flaginfo.outsyms);
+ if (flaginfo.linenos != NULL)
+ free (flaginfo.linenos);
+ if (flaginfo.contents != NULL)
+ free (flaginfo.contents);
+ if (flaginfo.external_relocs != NULL)
+ free (flaginfo.external_relocs);
+ if (flaginfo.internal_relocs != NULL)
+ free (flaginfo.internal_relocs);
if (external_relocs != NULL)
free (external_relocs);
return FALSE;
@@ -1325,7 +1411,7 @@
that symbol. */
static void
-mark_relocs (struct coff_final_link_info *finfo, bfd *input_bfd)
+mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
asection * a;
@@ -1338,7 +1424,8 @@
struct internal_reloc * irel;
struct internal_reloc * irelend;
- if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
+ if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1
+ || a->linker_mark == 0)
continue;
/* Don't mark relocs in excluded sections. */
if (a->output_section == bfd_abs_section_ptr)
@@ -1347,11 +1434,11 @@
/* Read in the relocs. */
internal_relocs = _bfd_coff_read_internal_relocs
(input_bfd, a, FALSE,
- finfo->external_relocs,
- finfo->info->relocatable,
- (finfo->info->relocatable
- ? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
- : finfo->internal_relocs)
+ flaginfo->external_relocs,
+ flaginfo->info->relocatable,
+ (flaginfo->info->relocatable
+ ? (flaginfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
+ : flaginfo->internal_relocs)
);
if (internal_relocs == NULL)
@@ -1365,7 +1452,7 @@
in the relocation table. This will then be picked up in the
skip/don't-skip pass. */
for (; irel < irelend; irel++)
- finfo->sym_indices[ irel->r_symndx ] = -1;
+ flaginfo->sym_indices[ irel->r_symndx ] = -1;
}
}
@@ -1373,7 +1460,7 @@
handles all the sections and relocations of the input file at once. */
bfd_boolean
-_bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
+_bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
@@ -1399,7 +1486,7 @@
/* Move all the symbols to the output file. */
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
strings = NULL;
syment_base = obj_raw_syment_count (output_bfd);
isymesz = bfd_coff_symesz (input_bfd);
@@ -1408,7 +1495,7 @@
BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd));
copy = FALSE;
- if (! finfo->info->keep_memory)
+ if (! flaginfo->info->keep_memory)
copy = TRUE;
hash = TRUE;
if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
@@ -1419,27 +1506,27 @@
esym = (bfd_byte *) obj_coff_external_syms (input_bfd);
esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz;
- isymp = finfo->internal_syms;
- secpp = finfo->sec_ptrs;
- indexp = finfo->sym_indices;
+ isymp = flaginfo->internal_syms;
+ secpp = flaginfo->sec_ptrs;
+ indexp = flaginfo->sym_indices;
output_index = syment_base;
- outsym = finfo->outsyms;
+ outsym = flaginfo->outsyms;
if (coff_data (output_bfd)->pe
- && ! process_embedded_commands (output_bfd, finfo->info, input_bfd))
+ && ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd))
return FALSE;
/* If we are going to perform relocations and also strip/discard some
symbols then we must make sure that we do not strip/discard those
symbols that are going to be involved in the relocations. */
- if (( finfo->info->strip != strip_none
- || finfo->info->discard != discard_none)
- && finfo->info->relocatable)
+ if (( flaginfo->info->strip != strip_none
+ || flaginfo->info->discard != discard_none)
+ && flaginfo->info->relocatable)
{
/* Mark the symbol array as 'not-used'. */
memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
- mark_relocs (finfo, input_bfd);
+ mark_relocs (flaginfo, input_bfd);
}
while (esym < esym_end)
@@ -1479,9 +1566,9 @@
/* Extract the flag indicating if this symbol is used by a
relocation. */
- if ((finfo->info->strip != strip_none
- || finfo->info->discard != discard_none)
- && finfo->info->relocatable)
+ if ((flaginfo->info->strip != strip_none
+ || flaginfo->info->discard != discard_none)
+ && flaginfo->info->relocatable)
dont_skip_symbol = *indexp;
else
dont_skip_symbol = FALSE;
@@ -1493,7 +1580,7 @@
add = 1 + isym.n_numaux;
/* If we are stripping all symbols, we want to skip this one. */
- if (finfo->info->strip == strip_all && ! dont_skip_symbol)
+ if (flaginfo->info->strip == strip_all && ! dont_skip_symbol)
skip = TRUE;
if (! skip)
@@ -1523,7 +1610,7 @@
case COFF_SYMBOL_LOCAL:
/* This is a local symbol. Skip it if we are discarding
local symbols. */
- if (finfo->info->discard == discard_all && ! dont_skip_symbol)
+ if (flaginfo->info->discard == discard_all && ! dont_skip_symbol)
skip = TRUE;
break;
}
@@ -1548,7 +1635,7 @@
for some types of debugging symbols; I don't know if this is
a bug or not. In any case, we handle it here. */
if (! skip
- && finfo->info->strip == strip_debugger
+ && flaginfo->info->strip == strip_debugger
&& ! dont_skip_symbol
&& (isym.n_scnum == N_DEBUG
|| (isym.n_scnum == N_ABS
@@ -1566,8 +1653,8 @@
/* If some symbols are stripped based on the name, work out the
name and decide whether to skip this symbol. */
if (! skip
- && (finfo->info->strip == strip_some
- || finfo->info->discard == discard_l))
+ && (flaginfo->info->strip == strip_some
+ || flaginfo->info->discard == discard_l))
{
const char *name;
char buf[SYMNMLEN + 1];
@@ -1577,11 +1664,11 @@
return FALSE;
if (! dont_skip_symbol
- && ((finfo->info->strip == strip_some
- && (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE,
+ && ((flaginfo->info->strip == strip_some
+ && (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE,
FALSE) == NULL))
|| (! global
- && finfo->info->discard == discard_l
+ && flaginfo->info->discard == discard_l
&& bfd_is_local_label_name (input_bfd, name))))
skip = TRUE;
}
@@ -1589,7 +1676,7 @@
/* If this is an enum, struct, or union tag, see if we have
already output an identical type. */
if (! skip
- && (finfo->output_bfd->flags & BFD_TRADITIONAL_FORMAT) == 0
+ && (flaginfo->output_bfd->flags & BFD_TRADITIONAL_FORMAT) == 0
&& (isym.n_sclass == C_ENTAG
|| isym.n_sclass == C_STRTAG
|| isym.n_sclass == C_UNTAG)
@@ -1616,7 +1703,7 @@
&& (name[1] == '~' || name[1] == '.' || name[1] == '$')))
name = "";
- mh = coff_debug_merge_hash_lookup (&finfo->debug_merge, name,
+ mh = coff_debug_merge_hash_lookup (&flaginfo->debug_merge, name,
TRUE, TRUE);
if (mh == NULL)
return FALSE;
@@ -1693,7 +1780,7 @@
(bfd_byte *) obj_coff_external_syms (input_bfd))
/ (long) isymesz)))
{
- (*epp)->tagndx = finfo->sym_indices[indx];
+ (*epp)->tagndx = flaginfo->sym_indices[indx];
if ((*epp)->tagndx < 0)
(*epp)->tagndx = 0;
}
@@ -1772,7 +1859,7 @@
name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL);
if (name == NULL)
return FALSE;
- indx = _bfd_stringtab_add (finfo->strtab, name, hash, copy);
+ indx = _bfd_stringtab_add (flaginfo->strtab, name, hash, copy);
if (indx == (bfd_size_type) -1)
return FALSE;
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
@@ -1827,7 +1914,7 @@
isym.n_value += (*secpp)->output_offset;
if (! obj_pe (input_bfd))
isym.n_value -= (*secpp)->vma;
- if (! obj_pe (finfo->output_bfd))
+ if (! obj_pe (flaginfo->output_bfd))
isym.n_value += (*secpp)->output_section->vma;
}
break;
@@ -1842,19 +1929,19 @@
it). We try to get this right, below, just before we
write the symbols out, but in the general case we may
have to write the symbol out twice. */
- if (finfo->last_file_index != -1
- && finfo->last_file.n_value != (bfd_vma) output_index)
+ if (flaginfo->last_file_index != -1
+ && flaginfo->last_file.n_value != (bfd_vma) output_index)
{
/* We must correct the value of the last C_FILE
entry. */
- finfo->last_file.n_value = output_index;
- if ((bfd_size_type) finfo->last_file_index >= syment_base)
+ flaginfo->last_file.n_value = output_index;
+ if ((bfd_size_type) flaginfo->last_file_index >= syment_base)
{
/* The last C_FILE symbol is in this input file. */
bfd_coff_swap_sym_out (output_bfd,
- &finfo->last_file,
- (finfo->outsyms
- + ((finfo->last_file_index
+ &flaginfo->last_file,
+ (flaginfo->outsyms
+ + ((flaginfo->last_file_index
- syment_base)
* osymesz)));
}
@@ -1866,23 +1953,23 @@
symbol. We need to write it out again. We
borrow *outsym temporarily. */
bfd_coff_swap_sym_out (output_bfd,
- &finfo->last_file, outsym);
+ &flaginfo->last_file, outsym);
pos = obj_sym_filepos (output_bfd);
- pos += finfo->last_file_index * osymesz;
+ pos += flaginfo->last_file_index * osymesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (outsym, osymesz, output_bfd) != osymesz)
return FALSE;
}
}
- finfo->last_file_index = output_index;
- finfo->last_file = isym;
+ flaginfo->last_file_index = output_index;
+ flaginfo->last_file = isym;
break;
}
/* If doing task linking, convert normal global function symbols to
static functions. */
- if (finfo->info->task_link && IS_EXTERNAL (input_bfd, isym))
+ if (flaginfo->info->task_link && IS_EXTERNAL (input_bfd, isym))
isym.n_sclass = C_STAT;
/* Output the symbol. */
@@ -1928,10 +2015,10 @@
already decided which symbols we are going to keep. */
esym = (bfd_byte *) obj_coff_external_syms (input_bfd);
esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz;
- isymp = finfo->internal_syms;
- indexp = finfo->sym_indices;
+ isymp = flaginfo->internal_syms;
+ indexp = flaginfo->sym_indices;
sym_hash = obj_coff_sym_hashes (input_bfd);
- outsym = finfo->outsyms;
+ outsym = flaginfo->outsyms;
while (esym < esym_end)
{
@@ -2002,7 +2089,7 @@
return FALSE;
}
filename = strings + auxp->x_file.x_n.x_offset;
- indx = _bfd_stringtab_add (finfo->strtab, filename,
+ indx = _bfd_stringtab_add (flaginfo->strtab, filename,
hash, copy);
if (indx == (bfd_size_type) -1)
return FALSE;
@@ -2027,15 +2114,15 @@
the index of the next symbol we are going
to include. I don't know if this is
entirely right. */
- while ((finfo->sym_indices[indx] < 0
- || ((bfd_size_type) finfo->sym_indices[indx]
+ while ((flaginfo->sym_indices[indx] < 0
+ || ((bfd_size_type) flaginfo->sym_indices[indx]
< syment_base))
&& indx < obj_raw_syment_count (input_bfd))
++indx;
if (indx >= obj_raw_syment_count (input_bfd))
indx = output_index;
else
- indx = finfo->sym_indices[indx];
+ indx = flaginfo->sym_indices[indx];
auxp->x_sym.x_fcnary.x_fcn.x_endndx.l = indx;
}
}
@@ -2045,7 +2132,7 @@
{
long symindx;
- symindx = finfo->sym_indices[indx];
+ symindx = flaginfo->sym_indices[indx];
if (symindx < 0)
auxp->x_sym.x_tagndx.l = 0;
else
@@ -2065,12 +2152,12 @@
&& isymp->_n._n_name[2] == 'f'
&& isymp->_n._n_name[3] == '\0')
{
- if (finfo->last_bf_index != -1)
+ if (flaginfo->last_bf_index != -1)
{
- finfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.l =
+ flaginfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.l =
*indexp;
- if ((bfd_size_type) finfo->last_bf_index
+ if ((bfd_size_type) flaginfo->last_bf_index
>= syment_base)
{
void *auxout;
@@ -2079,13 +2166,13 @@
file. This will only happen if the
assembler did not set up the .bf
endndx symbols correctly. */
- auxout = (finfo->outsyms
- + ((finfo->last_bf_index
+ auxout = (flaginfo->outsyms
+ + ((flaginfo->last_bf_index
- syment_base)
* osymesz));
bfd_coff_swap_aux_out (output_bfd,
- &finfo->last_bf,
+ &flaginfo->last_bf,
isymp->n_type,
isymp->n_sclass,
0, isymp->n_numaux,
@@ -2101,13 +2188,13 @@
temporarily. FIXME: This case should
be made faster. */
bfd_coff_swap_aux_out (output_bfd,
- &finfo->last_bf,
+ &flaginfo->last_bf,
isymp->n_type,
isymp->n_sclass,
0, isymp->n_numaux,
outsym);
pos = obj_sym_filepos (output_bfd);
- pos += finfo->last_bf_index * osymesz;
+ pos += flaginfo->last_bf_index * osymesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| (bfd_bwrite (outsym, osymesz, output_bfd)
!= osymesz))
@@ -2116,14 +2203,14 @@
}
if (auxp->x_sym.x_fcnary.x_fcn.x_endndx.l != 0)
- finfo->last_bf_index = -1;
+ flaginfo->last_bf_index = -1;
else
{
/* The endndx field of this aux entry must
be updated with the symbol number of the
next .bf symbol. */
- finfo->last_bf = *auxp;
- finfo->last_bf_index = (((outsym - finfo->outsyms)
+ flaginfo->last_bf = *auxp;
+ flaginfo->last_bf_index = (((outsym - flaginfo->outsyms)
/ osymesz)
+ syment_base);
}
@@ -2148,8 +2235,8 @@
}
/* Relocate the line numbers, unless we are stripping them. */
- if (finfo->info->strip == strip_none
- || finfo->info->strip == strip_some)
+ if (flaginfo->info->strip == strip_none
+ || flaginfo->info->strip == strip_some)
{
for (o = input_bfd->sections; o != NULL; o = o->next)
{
@@ -2175,13 +2262,13 @@
continue;
if (bfd_seek (input_bfd, o->line_filepos, SEEK_SET) != 0
- || bfd_bread (finfo->linenos, linesz * o->lineno_count,
+ || bfd_bread (flaginfo->linenos, linesz * o->lineno_count,
input_bfd) != linesz * o->lineno_count)
return FALSE;
offset = o->output_section->vma + o->output_offset - o->vma;
- eline = finfo->linenos;
- oeline = finfo->linenos;
+ eline = flaginfo->linenos;
+ oeline = flaginfo->linenos;
elineend = eline + linesz * o->lineno_count;
skipping = FALSE;
for (; eline < elineend; eline += linesz)
@@ -2198,7 +2285,7 @@
{
long indx;
- indx = finfo->sym_indices[iline.l_addr.l_symndx];
+ indx = flaginfo->sym_indices[iline.l_addr.l_symndx];
if (indx < 0)
{
@@ -2224,7 +2311,7 @@
of the line numbers rather than an absolute
file index. */
bfd_coff_swap_sym_in (output_bfd,
- (finfo->outsyms
+ (flaginfo->outsyms
+ ((indx - syment_base)
* osymesz)), &is);
if ((ISFCN (is.n_type)
@@ -2233,7 +2320,7 @@
{
void *auxptr;
- auxptr = (finfo->outsyms
+ auxptr = (flaginfo->outsyms
+ ((indx - syment_base + 1)
* osymesz));
bfd_coff_swap_aux_in (output_bfd, auxptr,
@@ -2242,7 +2329,7 @@
ia.x_sym.x_fcnary.x_fcn.x_lnnoptr =
(o->output_section->line_filepos
+ o->output_section->lineno_count * linesz
- + eline - finfo->linenos);
+ + eline - flaginfo->linenos);
bfd_coff_swap_aux_out (output_bfd, &ia,
is.n_type, is.n_sclass, 0,
is.n_numaux, auxptr);
@@ -2263,9 +2350,9 @@
pos = o->output_section->line_filepos;
pos += o->output_section->lineno_count * linesz;
- amt = oeline - finfo->linenos;
+ amt = oeline - flaginfo->linenos;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo->linenos, amt, output_bfd) != amt)
+ || bfd_bwrite (flaginfo->linenos, amt, output_bfd) != amt)
return FALSE;
o->output_section->lineno_count += amt / linesz;
@@ -2276,30 +2363,30 @@
symbol will be the first symbol in the next input file. In the
normal case, this will save us from writing out the C_FILE symbol
again. */
- if (finfo->last_file_index != -1
- && (bfd_size_type) finfo->last_file_index >= syment_base)
+ if (flaginfo->last_file_index != -1
+ && (bfd_size_type) flaginfo->last_file_index >= syment_base)
{
- finfo->last_file.n_value = output_index;
- bfd_coff_swap_sym_out (output_bfd, &finfo->last_file,
- (finfo->outsyms
- + ((finfo->last_file_index - syment_base)
+ flaginfo->last_file.n_value = output_index;
+ bfd_coff_swap_sym_out (output_bfd, &flaginfo->last_file,
+ (flaginfo->outsyms
+ + ((flaginfo->last_file_index - syment_base)
* osymesz)));
}
/* Write the modified symbols to the output file. */
- if (outsym > finfo->outsyms)
+ if (outsym > flaginfo->outsyms)
{
file_ptr pos;
bfd_size_type amt;
pos = obj_sym_filepos (output_bfd) + syment_base * osymesz;
- amt = outsym - finfo->outsyms;
+ amt = outsym - flaginfo->outsyms;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo->outsyms, amt, output_bfd) != amt)
+ || bfd_bwrite (flaginfo->outsyms, amt, output_bfd) != amt)
return FALSE;
BFD_ASSERT ((obj_raw_syment_count (output_bfd)
- + (outsym - finfo->outsyms) / osymesz)
+ + (outsym - flaginfo->outsyms) / osymesz)
== output_index);
obj_raw_syment_count (output_bfd) = output_index;
@@ -2340,10 +2427,9 @@
contents = secdata->contents;
else
{
- bfd_size_type x = o->rawsize ? o->rawsize : o->size;
- if (! bfd_get_section_contents (input_bfd, o, finfo->contents, 0, x))
+ contents = flaginfo->contents;
+ if (! bfd_get_full_section_contents (input_bfd, o, &contents))
return FALSE;
- contents = finfo->contents;
}
if ((o->flags & SEC_RELOC) != 0)
@@ -2355,13 +2441,14 @@
/* Read in the relocs. */
target_index = o->output_section->target_index;
internal_relocs = (_bfd_coff_read_internal_relocs
- (input_bfd, o, FALSE, finfo->external_relocs,
- finfo->info->relocatable,
- (finfo->info->relocatable
- ? (finfo->section_info[target_index].relocs
+ (input_bfd, o, FALSE, flaginfo->external_relocs,
+ flaginfo->info->relocatable,
+ (flaginfo->info->relocatable
+ ? (flaginfo->section_info[target_index].relocs
+ o->output_section->reloc_count)
- : finfo->internal_relocs)));
- if (internal_relocs == NULL)
+ : flaginfo->internal_relocs)));
+ if (internal_relocs == NULL
+ && o->reloc_count > 0)
return FALSE;
/* Run through the relocs looking for relocs against symbols
@@ -2387,7 +2474,7 @@
continue;
/* Complain if definition comes from an excluded section. */
if (ps->flags & SEC_EXCLUDE)
- (*finfo->info->callbacks->einfo)
+ (*flaginfo->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);
@@ -2395,15 +2482,15 @@
/* Call processor specific code to relocate the section
contents. */
- if (! bfd_coff_relocate_section (output_bfd, finfo->info,
+ if (! bfd_coff_relocate_section (output_bfd, flaginfo->info,
input_bfd, o,
contents,
internal_relocs,
- finfo->internal_syms,
- finfo->sec_ptrs))
+ flaginfo->internal_syms,
+ flaginfo->sec_ptrs))
return FALSE;
- if (finfo->info->relocatable)
+ if (flaginfo->info->relocatable)
{
bfd_vma offset;
struct internal_reloc *irelend;
@@ -2412,7 +2499,7 @@
offset = o->output_section->vma + o->output_offset - o->vma;
irel = internal_relocs;
irelend = irel + o->reloc_count;
- rel_hash = (finfo->section_info[target_index].rel_hashes
+ rel_hash = (flaginfo->section_info[target_index].rel_hashes
+ o->output_section->reloc_count);
for (; irel < irelend; irel++, rel_hash++)
{
@@ -2429,7 +2516,7 @@
if (adjust_symndx)
{
- if (! (*adjust_symndx) (output_bfd, finfo->info,
+ if (! (*adjust_symndx) (output_bfd, flaginfo->info,
input_bfd, o, irel,
&adjusted))
return FALSE;
@@ -2459,7 +2546,7 @@
{
long indx;
- indx = finfo->sym_indices[irel->r_symndx];
+ indx = flaginfo->sym_indices[irel->r_symndx];
if (indx != -1)
irel->r_symndx = indx;
else
@@ -2472,15 +2559,15 @@
stripping. This should have been handled
by the 'dont_skip_symbol' code in the while
loop at the top of this function. */
- is = finfo->internal_syms + irel->r_symndx;
+ is = flaginfo->internal_syms + irel->r_symndx;
name = (_bfd_coff_internal_syment_name
(input_bfd, is, buf));
if (name == NULL)
return FALSE;
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, name, input_bfd, o,
+ if (! ((*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name, input_bfd, o,
irel->r_vaddr)))
return FALSE;
}
@@ -2502,13 +2589,13 @@
else
{
if (! (_bfd_write_section_stabs
- (output_bfd, &coff_hash_table (finfo->info)->stab_info,
+ (output_bfd, &coff_hash_table (flaginfo->info)->stab_info,
o, &secdata->stab_info, contents)))
return FALSE;
}
}
- if (! finfo->info->keep_memory
+ if (! flaginfo->info->keep_memory
&& ! _bfd_coff_free_symbols (input_bfd))
return FALSE;
@@ -2521,14 +2608,14 @@
_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;
+ struct coff_final_link_info *flaginfo = (struct coff_final_link_info *) data;
bfd *output_bfd;
struct internal_syment isym;
bfd_size_type symesz;
unsigned int i;
file_ptr pos;
- output_bfd = finfo->output_bfd;
+ output_bfd = flaginfo->output_bfd;
if (h->root.type == bfd_link_hash_warning)
{
@@ -2541,9 +2628,9 @@
return TRUE;
if (h->indx != -2
- && (finfo->info->strip == strip_all
- || (finfo->info->strip == strip_some
- && (bfd_hash_lookup (finfo->info->keep_hash,
+ && (flaginfo->info->strip == strip_all
+ || (flaginfo->info->strip == strip_some
+ && (bfd_hash_lookup (flaginfo->info->keep_hash,
h->root.root.string, FALSE, FALSE)
== NULL))))
return TRUE;
@@ -2574,7 +2661,7 @@
isym.n_scnum = sec->target_index;
isym.n_value = (h->root.u.def.value
+ h->root.u.def.section->output_offset);
- if (! obj_pe (finfo->output_bfd))
+ if (! obj_pe (flaginfo->output_bfd))
isym.n_value += sec->vma;
}
break;
@@ -2599,11 +2686,11 @@
hash = TRUE;
if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
hash = FALSE;
- indx = _bfd_stringtab_add (finfo->strtab, h->root.root.string, hash,
+ indx = _bfd_stringtab_add (flaginfo->strtab, h->root.root.string, hash,
FALSE);
if (indx == (bfd_size_type) -1)
{
- finfo->failed = TRUE;
+ flaginfo->failed = TRUE;
return FALSE;
}
isym._n._n_n._n_zeroes = 0;
@@ -2620,7 +2707,7 @@
defined globals to statics, then do that conversion now. If the
symbol is not being converted, just ignore it and it will be
output during a later pass. */
- if (finfo->global_to_static)
+ if (flaginfo->global_to_static)
{
if (! IS_EXTERNAL (output_bfd, isym))
return TRUE;
@@ -2631,23 +2718,23 @@
/* When a weak symbol is not overridden by a strong one,
turn it into an external symbol when not building a
shared or relocatable object. */
- if (! finfo->info->shared
- && ! finfo->info->relocatable
- && IS_WEAK_EXTERNAL (finfo->output_bfd, isym))
+ if (! flaginfo->info->shared
+ && ! flaginfo->info->relocatable
+ && IS_WEAK_EXTERNAL (flaginfo->output_bfd, isym))
isym.n_sclass = C_EXT;
isym.n_numaux = h->numaux;
- bfd_coff_swap_sym_out (output_bfd, &isym, finfo->outsyms);
+ bfd_coff_swap_sym_out (output_bfd, &isym, flaginfo->outsyms);
symesz = bfd_coff_symesz (output_bfd);
pos = obj_sym_filepos (output_bfd);
pos += obj_raw_syment_count (output_bfd) * symesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo->outsyms, symesz, output_bfd) != symesz)
+ || bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz)
{
- finfo->failed = TRUE;
+ flaginfo->failed = TRUE;
return FALSE;
}
@@ -2685,7 +2772,7 @@
not matter. FIXME: Why not? */
if (sec->reloc_count > 0xffff
&& (! obj_pe (output_bfd)
- || finfo->info->relocatable))
+ || flaginfo->info->relocatable))
(*_bfd_error_handler)
(_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd),
@@ -2694,7 +2781,7 @@
if (sec->lineno_count > 0xffff
&& (! obj_pe (output_bfd)
- || finfo->info->relocatable))
+ || flaginfo->info->relocatable))
(*_bfd_error_handler)
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd),
@@ -2711,10 +2798,10 @@
bfd_coff_swap_aux_out (output_bfd, auxp, isym.n_type,
isym.n_sclass, (int) i, isym.n_numaux,
- finfo->outsyms);
- if (bfd_bwrite (finfo->outsyms, symesz, output_bfd) != symesz)
+ flaginfo->outsyms);
+ if (bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz)
{
- finfo->failed = TRUE;
+ flaginfo->failed = TRUE;
return FALSE;
}
++obj_raw_syment_count (output_bfd);
@@ -2730,7 +2817,7 @@
bfd_boolean
_bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
{
- struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
+ struct coff_final_link_info *flaginfo = (struct coff_final_link_info *) data;
bfd_boolean rtnval = TRUE;
bfd_boolean save_global_to_static;
@@ -2743,10 +2830,10 @@
{
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
- save_global_to_static = finfo->global_to_static;
- finfo->global_to_static = TRUE;
+ save_global_to_static = flaginfo->global_to_static;
+ flaginfo->global_to_static = TRUE;
rtnval = _bfd_coff_write_global_sym (&h->root.root, data);
- finfo->global_to_static = save_global_to_static;
+ flaginfo->global_to_static = save_global_to_static;
break;
default:
break;
@@ -2759,7 +2846,7 @@
bfd_boolean
_bfd_coff_reloc_link_order (bfd *output_bfd,
- struct coff_final_link_info *finfo,
+ struct coff_final_link_info *flaginfo,
asection *output_section,
struct bfd_link_order *link_order)
{
@@ -2798,8 +2885,8 @@
case bfd_reloc_outofrange:
abort ();
case bfd_reloc_overflow:
- if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, NULL,
+ if (! ((*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (output_bfd,
link_order->u.reloc.p->u.section)
@@ -2822,9 +2909,9 @@
/* Store the reloc information in the right place. It will get
swapped and written out at the end of the final_link routine. */
- irel = (finfo->section_info[output_section->target_index].relocs
+ irel = (flaginfo->section_info[output_section->target_index].relocs
+ output_section->reloc_count);
- rel_hash_ptr = (finfo->section_info[output_section->target_index].rel_hashes
+ rel_hash_ptr = (flaginfo->section_info[output_section->target_index].rel_hashes
+ output_section->reloc_count);
memset (irel, 0, sizeof (struct internal_reloc));
@@ -2847,7 +2934,7 @@
struct coff_link_hash_entry *h;
h = ((struct coff_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (output_bfd, finfo->info,
+ bfd_wrapped_link_hash_lookup (output_bfd, flaginfo->info,
link_order->u.reloc.p->u.name,
FALSE, FALSE, TRUE));
if (h != NULL)
@@ -2865,8 +2952,8 @@
}
else
{
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
+ if (! ((*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
(asection *) NULL, (bfd_vma) 0)))
return FALSE;
irel->r_symndx = 0;
diff --git a/bfd/compress.c b/bfd/compress.c
index a82a8bc..46c2bcb 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -1,5 +1,5 @@
/* Compressed section support (intended for debug sections).
- Copyright 2008, 2010, 2011
+ Copyright 2008, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,7 +19,6 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "config.h"
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
@@ -46,19 +45,20 @@
strm.next_in = (Bytef*) compressed_buffer + 12;
strm.avail_out = uncompressed_size;
+ BFD_ASSERT (Z_OK == 0);
rc = inflateInit (&strm);
- while (strm.avail_in > 0)
+ while (strm.avail_in > 0 && strm.avail_out > 0)
{
if (rc != Z_OK)
- return FALSE;
+ break;
strm.next_out = ((Bytef*) uncompressed_buffer
+ (uncompressed_size - strm.avail_out));
rc = inflate (&strm, Z_FINISH);
if (rc != Z_STREAM_END)
- return FALSE;
+ break;
rc = inflateReset (&strm);
}
- rc = inflateEnd (&strm);
+ rc |= inflateEnd (&strm);
return rc == Z_OK && strm.avail_out == 0;
}
#endif
@@ -80,7 +80,7 @@
field was allocated using bfd_malloc() or equivalent. If zlib
is not installed on this machine, the input is unmodified.
- Return @code{TRUE} if the full section contents is compressed
+ Return @code{TRUE} if the full section contents is compressed
successfully.
*/
@@ -149,7 +149,7 @@
DESCRIPTION
Read all data from @var{section} in BFD @var{abfd}, decompress
if needed, and store in @var{*ptr}. If @var{*ptr} is NULL,
- return @var{*ptr} with memory malloc'd by this function.
+ return @var{*ptr} with memory malloc'd by this function.
Return @code{TRUE} if the full section contents is retrieved
successfully.
@@ -162,11 +162,9 @@
bfd_byte *p = *ptr;
#ifdef HAVE_ZLIB_H
bfd_boolean ret;
- bfd_size_type compressed_size;
- bfd_size_type uncompressed_size;
- bfd_size_type rawsize;
+ bfd_size_type save_size;
+ bfd_size_type save_rawsize;
bfd_byte *compressed_buffer;
- bfd_byte *uncompressed_buffer;
#endif
if (abfd->direction != write_direction && sec->rawsize != 0)
@@ -200,45 +198,44 @@
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);
+ compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size);
if (compressed_buffer == NULL)
return FALSE;
- rawsize = sec->rawsize;
+ save_rawsize = sec->rawsize;
+ save_size = sec->size;
/* 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->size = sec->compressed_size;
sec->compress_status = COMPRESS_SECTION_NONE;
ret = bfd_get_section_contents (abfd, sec, compressed_buffer,
- 0, compressed_size);
+ 0, sec->compressed_size);
/* Restore rawsize and size. */
- sec->rawsize = rawsize;
- sec->size = uncompressed_size;
+ sec->rawsize = save_rawsize;
+ sec->size = save_size;
sec->compress_status = DECOMPRESS_SECTION_SIZED;
if (!ret)
goto fail_compressed;
- uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
- if (uncompressed_buffer == NULL)
+ if (p == NULL)
+ p = (bfd_byte *) bfd_malloc (sz);
+ if (p == NULL)
goto fail_compressed;
- if (!decompress_contents (compressed_buffer, compressed_size,
- uncompressed_buffer, uncompressed_size))
+ if (!decompress_contents (compressed_buffer, sec->compressed_size, p, sz))
{
bfd_set_error (bfd_error_bad_value);
- free (uncompressed_buffer);
+ if (p != *ptr)
+ free (p);
fail_compressed:
free (compressed_buffer);
return FALSE;
}
free (compressed_buffer);
- sec->contents = uncompressed_buffer;
- sec->compress_status = COMPRESS_SECTION_DONE;
- /* Fall thru */
+ *ptr = p;
+ return TRUE;
#endif
case COMPRESS_SECTION_DONE:
@@ -259,6 +256,29 @@
/*
FUNCTION
+ bfd_cache_section_contents
+
+SYNOPSIS
+ void bfd_cache_section_contents
+ (asection *sec, void *contents);
+
+DESCRIPTION
+ Stash @var(contents) so any following reads of @var(sec) do
+ not need to decompress again.
+*/
+
+void
+bfd_cache_section_contents (asection *sec, void *contents)
+{
+ if (sec->compress_status == DECOMPRESS_SECTION_SIZED)
+ sec->compress_status = COMPRESS_SECTION_DONE;
+ sec->contents = contents;
+ sec->flags |= SEC_IN_MEMORY;
+}
+
+
+/*
+FUNCTION
bfd_is_section_compressed
SYNOPSIS
@@ -273,11 +293,20 @@
bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
{
bfd_byte compressed_buffer [12];
+ unsigned int saved = sec->compress_status;
+ bfd_boolean compressed;
+
+ /* Don't decompress the section. */
+ sec->compress_status = COMPRESS_SECTION_NONE;
/* Read the zlib header. In this case, it should be "ZLIB" followed
by the uncompressed section size, 8 bytes in big-endian order. */
- return (bfd_get_section_contents (abfd, sec, compressed_buffer, 0, 12)
- && CONST_STRNEQ ((char*) compressed_buffer, "ZLIB"));
+ compressed = (bfd_get_section_contents (abfd, sec, compressed_buffer, 0, 12)
+ && CONST_STRNEQ ((char*) compressed_buffer, "ZLIB"));
+
+ /* Restore compress_status. */
+ sec->compress_status = saved;
+ return compressed;
}
/*
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 3b9872a..5324d39 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1,4 +1,21 @@
# config.bfd
+#
+# Copyright 2012, 2013 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
# Convert a canonical host type into a BFD host type.
# Set shell variable targ to canonical target name, and run
# using ``. config.bfd''.
@@ -69,6 +86,7 @@
targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
+aarch64*) targ_archs="bfd_aarch64_arch bfd_arm_arch";;
alpha*) targ_archs=bfd_alpha_arch ;;
am34*|am33_2.0*) targ_archs=bfd_mn10300_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
@@ -85,12 +103,13 @@
i[3-7]86) targ_archs=bfd_i386_arch ;;
i370) targ_archs=bfd_i370_arch ;;
lm32) targ_archs=bfd_lm32_arch ;;
-m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
-m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
+m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
+m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
microblaze*) targ_archs=bfd_microblaze_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
+nios2*) targ_archs=bfd_nios2_arch ;;
or32*) targ_archs=bfd_or32_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
@@ -102,9 +121,10 @@
spu*) targ_archs=bfd_spu_arch ;;
tilegx*) targ_archs=bfd_tilegx_arch ;;
tilepro*) targ_archs=bfd_tilepro_arch ;;
-v850*) targ_archs=bfd_v850_arch ;;
+v850*) targ_archs="bfd_v850_arch bfd_v850_rh850_arch" ;;
x86_64*) targ_archs=bfd_i386_arch ;;
xtensa*) targ_archs=bfd_xtensa_arch ;;
+xgate) targ_archs=bfd_xgate_arch ;;
z80|r800) targ_archs=bfd_z80_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
@@ -142,6 +162,26 @@
# START OF targmatch.h
#ifdef BFD64
+ aarch64-*-elf)
+ targ_defvec=bfd_elf64_littleaarch64_vec
+ targ_selvecs="bfd_elf64_bigaarch64_vec bfd_elf32_littleaarch64_vec bfd_elf32_bigaarch64_vec bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
+ want64=true
+ ;;
+ aarch64_be-*-elf)
+ targ_defvec=bfd_elf64_bigaarch64_vec
+ targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_littleaarch64_vec bfd_elf32_bigaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
+ want64=true
+ ;;
+ aarch64-*-linux*)
+ targ_defvec=bfd_elf64_littleaarch64_vec
+ targ_selvecs="bfd_elf64_bigaarch64_vec bfd_elf32_littleaarch64_vec bfd_elf32_bigaarch64_vec bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
+ want64=true
+ ;;
+ aarch64_be-*-linux*)
+ targ_defvec=bfd_elf64_bigaarch64_vec
+ targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_littleaarch64_vec bfd_elf32_bigaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
+ want64=true
+ ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_alpha_freebsd_vec
targ_selvecs="bfd_elf64_alpha_vec ecoffalpha_little_vec"
@@ -162,7 +202,7 @@
targ_selvecs=nlm32_alpha_vec
want64=true
;;
- alpha*-*-linuxecoff*)
+ alpha*-*-linux*ecoff*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
want64=true
@@ -216,6 +256,18 @@
targ_selvecs=bfd_elf32_bigarc_vec
;;
+ arm-*-nacl*)
+ targ_defvec=bfd_elf32_littlearm_nacl_vec
+ targ_selvecs="bfd_elf32_bigarm_nacl_vec bfd_elf32_i386_nacl_vec"
+ targ64_selvecs="bfd_elf32_x86_64_nacl_vec bfd_elf64_x86_64_nacl_vec"
+ targ_archs="$targ_archs bfd_i386_arch"
+ ;;
+ armeb-*-nacl*)
+ targ_defvec=bfd_elf32_bigarm_nacl_vec
+ targ_selvecs="bfd_elf32_littlearm_nacl_vec bfd_elf32_i386_nacl_vec"
+ targ64_selvecs="bfd_elf32_x86_64_nacl_vec bfd_elf64_x86_64_nacl_vec"
+ targ_archs="$targ_archs bfd_i386_arch"
+ ;;
armeb-*-netbsdelf*)
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec"
@@ -327,7 +379,7 @@
targ_underscore=yes
;;
- cr16-*-elf*)
+ cr16-*-elf* | cr16*-*-uclinux*)
targ_defvec=bfd_elf32_cr16_vec
targ_underscore=yes
;;
@@ -361,6 +413,10 @@
targ_defvec=bfd_elf32_d30v_vec
;;
+ epiphany-*-elf)
+ targ_defvec=bfd_elf32_epiphany_vec
+ ;;
+
fido-*-elf* )
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68kcoff_vec ieee_vec"
@@ -380,8 +436,9 @@
targ_selvecs=bfd_elf32_frv_vec
;;
- moxie-*-elf | moxie-*-rtems | moxie-*-uclinux)
- targ_defvec=bfd_elf32_moxie_vec
+ moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux)
+ targ_defvec=bfd_elf32_bigmoxie_vec
+ targ_selvecs=bfd_elf32_littlemoxie_vec
;;
h8300*-*-rtemscoff*)
@@ -503,9 +560,10 @@
i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*)
targ_defvec=mach_o_i386_vec
targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
+ targ64_selvecs=mach_o_x86_64_vec
targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
;;
- i[3-7]86-sequent-bsd*)
+ i[3-7]86-sequent-bsd*)
targ_defvec=i386dynix_vec
targ_underscore=yes
;;
@@ -564,11 +622,13 @@
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_elf32_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
+ targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf32_x86_64_vec x86_64pei_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"
+ targ_selvecs="bfd_elf32_bigarm_nacl_vec bfd_elf32_littlearm_nacl_vec"
+ targ64_selvecs="bfd_elf64_x86_64_nacl_vec bfd_elf32_x86_64_nacl_vec"
+ targ_archs="$targ_archs bfd_arm_arch"
;;
#ifdef BFD64
x86_64-*-darwin*)
@@ -584,7 +644,7 @@
;;
x86_64-*-elf*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386coff_vec"
+ targ_selvecs="bfd_elf32_i386_vec bfd_elf32_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
want64=true
;;
x86_64-*-dragonfly*)
@@ -607,12 +667,22 @@
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-*-pe | x86_64-*-pep)
+ x86_64-*-nacl*)
+ targ_defvec=bfd_elf32_x86_64_nacl_vec
+ targ_selvecs="bfd_elf32_i386_nacl_vec bfd_elf64_x86_64_nacl_vec bfd_elf32_bigarm_nacl_vec bfd_elf32_littlearm_nacl_vec"
+ targ_archs="$targ_archs bfd_arm_arch"
+ want64=true
+ ;;
+ x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
targ_defvec=x86_64pe_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
;;
+ x86_64-*-rdos*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ want64=true
+ ;;
#endif
i[3-7]86-*-lynxos*)
targ_defvec=bfd_elf32_i386_vec
@@ -868,14 +938,26 @@
targ_selvecs=bfd_elf32_mep_little_vec
;;
+ metag-*-*)
+ targ_defvec=bfd_elf32_metag_vec
+ targ_underscore=yes
+ ;;
+
+ microblazeel*-*)
+ targ_defvec=bfd_elf32_microblazeel_vec
+ targ_selvecs=bfd_elf32_microblaze_vec
+ ;;
+
microblaze*-*)
targ_defvec=bfd_elf32_microblaze_vec
+ targ_selvecs=bfd_elf32_microblazeel_vec
;;
mips*-big-*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
+#ifdef BFD64
mips*el-*-netbsd*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -884,6 +966,7 @@
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-dec-* | mips*el-*-ecoff*)
targ_defvec=ecoff_little_vec
targ_selvecs=ecoff_big_vec
@@ -896,13 +979,20 @@
mips*-*-irix6*)
targ_defvec=bfd_elf32_nbigmips_vec
targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
-#endif
+ mips64*-ps2-elf*)
+ targ_defvec=bfd_elf32_nlittlemips_vec
+ targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf32_nbigmips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+ ;;
+ mips*-ps2-elf*)
+ targ_defvec=bfd_elf32_littlemips_vec
+ targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+ ;;
mips*-*-irix5*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-sgi-* | mips*-*-bsd*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -911,10 +1001,12 @@
targ_defvec=ecoff_biglittle_vec
targ_selvecs="ecoff_little_vec ecoff_big_vec"
;;
+#ifdef BFD64
mips*-*-sysv4*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+#endif
mips*-*-sysv* | mips*-*-riscos*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -923,23 +1015,18 @@
mips*el-*-vxworks*)
targ_defvec=bfd_elf32_littlemips_vxworks_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf32_bigmips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
mips*-*-vxworks*)
targ_defvec=bfd_elf32_bigmips_vxworks_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
- want64=true
;;
-#endif
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*)
+ mips*-sde-elf* | mips*-mti-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"
- want64=true
;;
mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
targ_defvec=bfd_elf32_littlemips_vec
@@ -953,13 +1040,10 @@
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
-#ifdef BFD64
mips64*-*-openbsd*)
targ_defvec=bfd_elf64_tradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
- want64=true
;;
-#endif
mips*el-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -968,36 +1052,28 @@
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
-#ifdef BFD64
mips64*el-*-linux*)
targ_defvec=bfd_elf32_ntradlittlemips_vec
targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips64*-*-linux*)
targ_defvec=bfd_elf32_ntradbigmips_vec
targ_selvecs="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-*-linux*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
- want64=true
;;
mips*-*-linux*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
- 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
@@ -1005,16 +1081,13 @@
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
@@ -1022,9 +1095,7 @@
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
@@ -1046,6 +1117,7 @@
msp430-*-*)
targ_defvec=bfd_elf32_msp430_vec
+ targ_selvecs=bfd_elf32_msp430_ti_vec
;;
ns32k-pc532-mach* | ns32k-pc532-ux*)
@@ -1057,6 +1129,21 @@
targ_underscore=yes
;;
+ nios2eb-*-*)
+ targ_defvec=bfd_elf32_bignios2_vec
+ targ_selvecs=bfd_elf32_littlenios2_vec
+ ;;
+
+ nios2el-*-*)
+ targ_defvec=bfd_elf32_littlenios2_vec
+ targ_selvecs=bfd_elf32_bignios2_vec
+ ;;
+
+ nios2-*-*)
+ targ_defvec=bfd_elf32_littlenios2_vec
+ targ_selvecs=bfd_elf32_bignios2_vec
+ ;;
+
openrisc-*-elf)
targ_defvec=bfd_elf32_openrisc_vec
;;
@@ -1128,18 +1215,29 @@
targ_selvecs=rs6000coff_vec
want64=true
;;
+ powerpc64-*-freebsd*)
+ targ_defvec=bfd_elf64_powerpc_freebsd_vec
+ targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpc_vec bfd_elf32_powerpc_freebsd_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
+ want64=true
+ ;;
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 aix5coff64_vec"
want64=true
;;
- powerpc64le-*-elf* | powerpcle-*-elf64*)
+ powerpc64le-*-elf* | powerpcle-*-elf64* | powerpc64le-*-linux* | \
+ powerpc64le-*-*bsd*)
targ_defvec=bfd_elf64_powerpcle_vec
targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
want64=true
;;
#endif
+ powerpc-*-*freebsd*)
+ targ_defvec=bfd_elf32_powerpc_freebsd_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec bfd_elf64_powerpc_freebsd_vec"
+ ;;
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
powerpc-*-chorus*)
@@ -1193,6 +1291,10 @@
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
+ rl78-*-elf)
+ targ_defvec=bfd_elf32_rl78_vec
+ ;;
+
rx-*-elf)
targ_defvec=bfd_elf32_rx_le_vec
targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec bfd_elf32_rx_be_ns_vec"
@@ -1488,8 +1590,12 @@
#ifdef BFD64
tilegx-*-*)
- targ_defvec=bfd_elf64_tilegx_vec
- targ_selvecs=bfd_elf32_tilegx_vec
+ targ_defvec=bfd_elf64_tilegx_le_vec
+ targ_selvecs="bfd_elf64_tilegx_be_vec bfd_elf32_tilegx_be_vec bfd_elf32_tilegx_le_vec"
+ ;;
+ tilegxbe-*-*)
+ targ_defvec=bfd_elf64_tilegx_be_vec
+ targ_selvecs="bfd_elf64_tilegx_le_vec bfd_elf32_tilegx_be_vec bfd_elf32_tilegx_le_vec"
;;
#endif
@@ -1499,6 +1605,7 @@
v850*-*-*)
targ_defvec=bfd_elf32_v850_vec
+ targ_selvecs="bfd_elf32_v850_rh850_vec"
;;
vax-*-netbsdelf*)
@@ -1533,7 +1640,12 @@
w65-*-*)
targ_defvec=w65_vec
;;
-
+
+ xgate-*-*)
+ targ_defvec=bfd_elf32_xgate_vec
+ targ_selvecs="bfd_elf32_xgate_vec"
+ ;;
+
xstormy16-*-elf)
targ_defvec=bfd_elf32_xstormy16_vec
;;
@@ -1582,6 +1694,13 @@
;;
esac
+# All MIPS ELF targets need a 64-bit bfd_vma.
+case "${targ_defvec} ${targ_selvecs}" in
+ *elf*mips*)
+ want64=true
+ ;;
+esac
+
case "${host64}${want64}" in
*true*)
targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
diff --git a/bfd/config.in b/bfd/config.in
index 98157e1..65fb044 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -1,5 +1,12 @@
/* config.in. Generated from configure.in by autoheader. */
+/* Check that config.h is #included before system headers
+ (this works only for glibc, but that should be enough). */
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
+# error config.h must be #included before system headers
+#endif
+#define __CONFIG_H__ 1
+
/* Name of host specific core header file to include in elf.c. */
#undef CORE_HEADER
@@ -105,6 +112,9 @@
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have the `getrlimit' function. */
+#undef HAVE_GETRLIMIT
+
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
@@ -227,6 +237,9 @@
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -245,6 +258,9 @@
/* Define if <sys/procfs.h> has win32_pstatus_t. */
#undef HAVE_WIN32_PSTATUS_T
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_H
+
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
diff --git a/bfd/configure b/bfd/configure
index bc242b9..90cd397 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64.
+# Generated by GNU Autoconf 2.64 for bfd 2.24.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -554,12 +554,12 @@
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='bfd'
+PACKAGE_TARNAME='bfd'
+PACKAGE_VERSION='2.24'
+PACKAGE_STRING='bfd 2.24'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
ac_unique_file="libbfd.c"
# Factoring default headers for most tests.
@@ -606,6 +606,7 @@
tdefaults
bfd_ufile_ptr
bfd_file_ptr
+lt_cv_dlopen_libs
supports_plugins
bfd_default_target_size
bfd_machines
@@ -847,7 +848,7 @@
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1348,7 +1349,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures bfd 2.24 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1397,7 @@
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/bfd]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1418,7 +1419,9 @@
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of bfd 2.24:";;
+ esac
cat <<\_ACEOF
Optional Features:
@@ -1538,7 +1541,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
+bfd configure 2.24
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2180,7 +2183,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
+It was created by bfd $as_me 2.24, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3987,8 +3990,8 @@
# Define the identity of the package.
- PACKAGE=bfd
- VERSION=2.22
+ PACKAGE='bfd'
+ VERSION='2.24'
cat >>confdefs.h <<_ACEOF
@@ -7203,7 +7206,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -7219,9 +7222,19 @@
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7240,7 +7253,10 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -8458,6 +8474,7 @@
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
+ lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -9639,7 +9656,7 @@
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -10552,7 +10569,7 @@
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -10570,7 +10587,7 @@
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11404,7 +11421,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11407 "configure"
+#line 11424 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11510,7 +11527,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11513 "configure"
+#line 11530 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12217,6 +12234,9 @@
ac_config_headers="$ac_config_headers config.h:config.in"
+# PR 14072
+
+
if test -z "$target" ; then
as_fn_error "Unrecognized target system type; please check config.sub." "$LINENO" 5
fi
@@ -12316,7 +12336,7 @@
# host stuff:
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk"
# If we haven't got the data from the intl directory,
# assume NLS is disabled.
USE_NLS=no
@@ -12894,7 +12914,7 @@
done
-for ac_header in fcntl.h sys/file.h sys/time.h sys/stat.h
+for ac_header in fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -13508,6 +13528,22 @@
fi
+
+for ac_header in windows.h dlfcn.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
if test "${gcc_cv_header_string+set}" = set; then :
@@ -13553,12 +13589,14 @@
fi
done
-for ac_func in strtoull
+for ac_func in strtoull getrlimit
do :
- ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
-if test "x$ac_cv_func_strtoull" = x""yes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOULL 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -13897,6 +13935,10 @@
i[3-7]86-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
+ case "$enable_targets"-"$want64" in
+ *x86_64-*linux*|*-true)
+ CORE_HEADER='"hosts/x86-64linux.h"'
+ esac
;;
i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
@@ -15184,14 +15226,17 @@
bfd_elf32_bfinfdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_nacl_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_bigarm_symbian_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_bigarm_vxworks_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
+ bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
@@ -15199,20 +15244,20 @@
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
+ bfd_elf32_epiphany_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
- bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_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_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_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.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" ;;
@@ -15225,13 +15270,16 @@
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_symbian_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_littlearm_vxworks_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_nacl_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_littlemips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
+ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -15245,11 +15293,14 @@
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
+ bfd_elf32_metag_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;;
+ bfd_elf32_microblazeel_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
bfd_elf32_microblaze_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_ti_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 | bfd_elf32_ntradbigmips_freebsd_vec)
@@ -15262,7 +15313,9 @@
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_rl78_vec) tb="$tb elf32-rl78.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" ;;
@@ -15299,7 +15352,8 @@
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_tilegx_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
+ bfd_elf32_tilegx_le_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" ;;
@@ -15307,13 +15361,17 @@
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_v850_rh850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
bfd_elf32_xc16x_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
+ bfd_elf32_xgate_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_bigaarch64_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo 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 ;;
@@ -15321,12 +15379,15 @@
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_ia64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
+ bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_littleaarch64_vec)tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.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 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
@@ -15337,19 +15398,22 @@
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_tilegx_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+ bfd_elf64_tilegx_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+ bfd_elf64_tilegx_le_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_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+ bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_k1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.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" ;;
@@ -15590,6 +15654,7 @@
fi
+
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
@@ -16416,7 +16481,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
+This file was extended by bfd $as_me 2.24, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16480,7 +16545,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-config.status
+bfd config.status 2.24
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -18744,4 +18809,3 @@
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
diff --git a/bfd/configure.com b/bfd/configure.com
index a19dadd..e1c3242 100644
--- a/bfd/configure.com
+++ b/bfd/configure.com
@@ -7,6 +7,22 @@
$! Written by Klaus K"ampf ([email protected])
$! Rewritten by Tristan Gingold ([email protected])
$!
+$! Copyright 2012 Free Software Foundation
+$!
+$! This file is free software; you can redistribute it and/or modify
+$! it under the terms of the GNU General Public License as published by
+$! 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; see the file COPYING3. If not see
+$! <http://www.gnu.org/licenses/>.
+$!
$ arch=F$GETSYI("ARCH_NAME")
$ arch=F$EDIT(arch,"LOWERCASE")
$if arch .eqs. "alpha" then target = "alpha"
@@ -28,26 +44,10 @@
!
!
set (success,off);
- vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
- rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
- match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
- IF match_pos <> 0 THEN;
- POSITION(BEGINNING_OF(match_pos));
- ERASE(match_pos);
- vers := CURRENT_LINE-")";
- ELSE;
- vers := "unknown";
- ENDIF;
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
- match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
- IF match_pos <> 0 THEN;
- POSITION(BEGINNING_OF(match_pos));
- ERASE(match_pos);
- COPY_TEXT(vers);
- ENDIF;
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
@@ -82,27 +82,25 @@
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- COPY_TEXT('__DECC');
- SPLIT_LINE;
- COPY_TEXT('#include <ints.h>');
+ COPY_TEXT('1');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- COPY_TEXT('int64');
+ COPY_TEXT('__int64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- COPY_TEXT('uint64');
+ COPY_TEXT('unsigned __int64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- COPY_TEXT('uint64');
+ COPY_TEXT('unsigned __int64');
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
@@ -142,26 +140,10 @@
!
!
set (success,off);
- vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
- rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
- match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
- IF match_pos <> 0 THEN;
- POSITION(BEGINNING_OF(match_pos));
- ERASE(match_pos);
- vers := CURRENT_LINE-")";
- ELSE;
- vers := "unknown";
- ENDIF;
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
- match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
- IF match_pos <> 0 THEN;
- POSITION(BEGINNING_OF(match_pos));
- ERASE(match_pos);
- COPY_TEXT(vers);
- ENDIF;
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
@@ -213,11 +195,11 @@
set (success,off);
vfile := CREATE_BUFFER("vfile", "configure.in");
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
- match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
+ match_pos := SEARCH_QUIETLY('AC_INIT([bfd], [', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
- vers := CURRENT_LINE-")";
+ vers := CURRENT_LINE-"])";
ELSE;
vers := "unknown";
ENDIF;
@@ -324,6 +306,20 @@
#define HAVE_UNISTD_H 1
/* Disable NLS */
#undef ENABLE_NLS
+/* Name of package */
+#define PACKAGE "bfd"
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "bfd"
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "bfd"
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "bfd"
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "(package version)"
$!
$ write sys$output "Copy sysdep.h"
$ copy [.hosts]alphavms.h sysdep.h
@@ -365,9 +361,6 @@
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
QUIT
$ EOD
-$ write sys$output "Generate elf64-ia64.c from elfxx-ia64.c"
-$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
- []elfXX-ia64.c /output=[]elf64-ia64.c
$ write sys$output "Generate elf64-target.h from elfxx-target.h"
$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
[]elfXX-target.h /output=[]elf64-target.h
diff --git a/bfd/configure.host b/bfd/configure.host
index 7c63de5..7868c24 100644
--- a/bfd/configure.host
+++ b/bfd/configure.host
@@ -1,3 +1,20 @@
+#
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
# This file is a shell script that overrides some of the tools and
# flags used on a host specific basis.
diff --git a/bfd/configure.in b/bfd/configure.in
index 435aaaa..0e88d78 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -1,14 +1,30 @@
dnl Process this file with autoconf to produce a configure script.
dnl
+dnl Copyright 2012-2013 Free Software Foundation
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3. If not see
+dnl <http://www.gnu.org/licenses/>.
+dnl
AC_PREREQ(2.59)
-AC_INIT
+AC_INIT([bfd], [2.24])
AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.22)
+AM_INIT_AUTOMAKE
dnl These must be called before LT_INIT, because it may want
dnl to call AC_CHECK_PROG.
@@ -109,7 +125,7 @@
AC_DEFINE(USE_STT_COMMON, 1,
[Define if we may generate symbols with ELF's STT_COMMON type])
fi
-
+
ACX_PKGVERSION([GNU Binutils])
ACX_BUGURL([http://www.sourceware.org/bugzilla/])
@@ -117,6 +133,15 @@
AC_CONFIG_HEADERS(config.h:config.in)
+# PR 14072
+AH_VERBATIM([00_CONFIG_H_CHECK],
+[/* Check that config.h is #included before system headers
+ (this works only for glibc, but that should be enough). */
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
+# error config.h must be #included before system headers
+#endif
+#define __CONFIG_H__ 1])
+
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
@@ -132,7 +157,7 @@
# host stuff:
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk"
ZW_GNU_GETTEXT_SISTER_DIR
AM_PO_SUBDIRS
@@ -186,13 +211,16 @@
BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h)
-AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h)
+AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h)
GCC_HEADER_STDINT(bfd_stdint.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
+
+AC_CHECK_HEADERS(windows.h dlfcn.h)
+
ACX_HEADER_STRING
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
-AC_CHECK_FUNCS(strtoull)
+AC_CHECK_FUNCS(strtoull getrlimit)
AC_CHECK_DECLS(basename)
AC_CHECK_DECLS(ftello)
@@ -319,6 +347,10 @@
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
+ case "$enable_targets"-"$want64" in
+ *x86_64-*linux*|*-true)
+ CORE_HEADER='"hosts/x86-64linux.h"'
+ esac
;;
changequote(,)dnl
i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
@@ -683,35 +715,38 @@
bfd_elf32_bfinfdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
- bfd_elf32_bigarm_symbian_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
- bfd_elf32_bigarm_vxworks_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_nacl_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_symbian_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_vxworks_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
+ bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
- bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
+ bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
+ bfd_elf32_epiphany_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
- bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_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_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_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.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" ;;
@@ -724,13 +759,16 @@
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_symbian_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_littlearm_vxworks_vec)
- tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_nacl_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_littlemips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
+ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -744,11 +782,14 @@
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
+ bfd_elf32_metag_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;;
+ bfd_elf32_microblazeel_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
bfd_elf32_microblaze_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_ti_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 | bfd_elf32_ntradbigmips_freebsd_vec)
@@ -761,7 +802,9 @@
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_rl78_vec) tb="$tb elf32-rl78.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" ;;
@@ -798,7 +841,8 @@
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_tilegx_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
+ bfd_elf32_tilegx_le_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" ;;
@@ -806,13 +850,17 @@
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_v850_rh850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
bfd_elf32_xc16x_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
+ bfd_elf32_xgate_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_bigaarch64_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo 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 ;;
@@ -820,12 +868,15 @@
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_ia64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
+ bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_littleaarch64_vec)tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.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 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
@@ -836,19 +887,22 @@
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_tilegx_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+ bfd_elf64_tilegx_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
+ bfd_elf64_tilegx_le_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_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf32_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+ bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_k1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.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" ;;
@@ -1074,6 +1128,7 @@
supports_plugins=0
fi
AC_SUBST(supports_plugins)
+AC_SUBST(lt_cv_dlopen_libs)
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
@@ -1144,4 +1199,3 @@
AC_SUBST(pdfdir)
AC_OUTPUT
-
diff --git a/bfd/corefile.c b/bfd/corefile.c
index bba0d1c..8d62938 100644
--- a/bfd/corefile.c
+++ b/bfd/corefile.c
@@ -169,7 +169,7 @@
of the const char * returned by bfd_core_file_failing_command to a
non-const char *. In this case, the assignement does not lead to
breaking the const, as we're only reading the string. */
-
+
core = (char *) bfd_core_file_failing_command (core_bfd);
if (core == NULL)
return TRUE;
@@ -185,7 +185,7 @@
last_slash = strrchr (exec, '/');
if (last_slash != NULL)
exec = last_slash + 1;
-
+
return filename_cmp (exec, core) == 0;
}
diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c
new file mode 100644
index 0000000..9ec18a0
--- /dev/null
+++ b/bfd/cpu-aarch64.c
@@ -0,0 +1,127 @@
+/* BFD support for AArch64.
+ Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Contributed by ARM Ltd.
+
+ 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; see the file COPYING3. If not,
+ see <http://www.gnu.org/licenses/>. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "libiberty.h"
+
+/* This routine is provided two arch_infos and works out which Aarch64
+ machine which would be compatible with both and returns a pointer
+ to its info structure. */
+
+static const bfd_arch_info_type *
+compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b)
+{
+ /* If a & b are for different architecture we can do nothing. */
+ if (a->arch != b->arch)
+ return NULL;
+
+ /* If a & b are for the same machine then all is well. */
+ if (a->mach == b->mach)
+ return a;
+
+ /* Don't allow mixing ilp32 with lp64. */
+ if ((a->mach & bfd_mach_aarch64_ilp32) != (b->mach & bfd_mach_aarch64_ilp32))
+ return NULL;
+
+ /* Otherwise if either a or b is the 'default' machine
+ then it can be polymorphed into the other. */
+ if (a->the_default)
+ return b;
+
+ if (b->the_default)
+ return a;
+
+ /* So far all newer cores are
+ supersets of previous cores. */
+ if (a->mach < b->mach)
+ return b;
+ else if (a->mach > b->mach)
+ return a;
+
+ /* Never reached! */
+ return NULL;
+}
+
+static struct
+{
+ unsigned int mach;
+ char *name;
+}
+processors[] =
+{
+ /* These two are example CPUs supported in GCC, once we have real
+ CPUs they will be removed. */
+ { bfd_mach_aarch64, "example-1" },
+ { bfd_mach_aarch64, "example-2" }
+};
+
+static bfd_boolean
+scan (const struct bfd_arch_info *info, const char *string)
+{
+ int i;
+
+ /* First test for an exact match. */
+ if (strcasecmp (string, info->printable_name) == 0)
+ return TRUE;
+
+ /* Next check for a processor name instead of an Architecture name. */
+ for (i = sizeof (processors) / sizeof (processors[0]); i--;)
+ {
+ if (strcasecmp (string, processors[i].name) == 0)
+ break;
+ }
+
+ if (i != -1 && info->mach == processors[i].mach)
+ return TRUE;
+
+ /* Finally check for the default architecture. */
+ if (strcasecmp (string, "aarch64") == 0)
+ return info->the_default;
+
+ return FALSE;
+}
+
+#define N(NUMBER, PRINT, DEFAULT, NEXT) \
+ { 64, 64, 8, bfd_arch_aarch64, NUMBER, \
+ "aarch64", PRINT, 4, DEFAULT, compatible, scan, \
+ bfd_arch_default_fill, NEXT }
+
+static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
+ N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", FALSE, NULL);
+
+const bfd_arch_info_type bfd_aarch64_arch =
+ N (0, "aarch64", TRUE, &bfd_aarch64_arch_ilp32);
+
+bfd_boolean
+bfd_is_aarch64_special_symbol_name (const char *name, int type)
+{
+ if (!name || name[0] != '$')
+ return FALSE;
+ if (name[1] == 'x' || name[1] == 'd')
+ type &= BFD_AARCH64_SPECIAL_SYM_TYPE_MAP;
+ else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
+ type &= BFD_AARCH64_SPECIAL_SYM_TYPE_TAG;
+ else
+ return FALSE;
+
+ return (type != 0 && (name[2] == 0 || name[2] == '.'));
+}
diff --git a/bfd/cpu-alpha.c b/bfd/cpu-alpha.c
index 9456b65..902eb8d 100644
--- a/bfd/cpu-alpha.c
+++ b/bfd/cpu-alpha.c
@@ -36,6 +36,7 @@
DEFAULT, \
bfd_default_compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
NEXT, \
}
diff --git a/bfd/cpu-arc.c b/bfd/cpu-arc.c
index 820c948..02b4d98 100644
--- a/bfd/cpu-arc.c
+++ b/bfd/cpu-arc.c
@@ -1,5 +1,5 @@
/* BFD support for the ARC processor
- Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007
+ Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007, 2012
Free Software Foundation, Inc.
Contributed by Doug Evans ([email protected]).
@@ -37,6 +37,7 @@
default_p, \
bfd_default_compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
next, \
}
@@ -57,11 +58,10 @@
/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
Returns -1 if not found. */
-int arc_get_mach PARAMS ((char *));
+int arc_get_mach (char *);
int
-arc_get_mach (name)
- char *name;
+arc_get_mach (char *name)
{
const bfd_arch_info_type *p;
diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c
index 2238720..4f18336 100644
--- a/bfd/cpu-arm.c
+++ b/bfd/cpu-arm.c
@@ -124,7 +124,8 @@
}
#define N(number, print, default, next) \
-{ 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next }
+{ 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, \
+ scan, bfd_arch_default_fill, next }
static const bfd_arch_info_type arch_info_struct[] =
{
@@ -251,10 +252,10 @@
return FALSE;
}
else
- {
+ {
if (namesz != ((strlen (expected_name) + 1 + 3) & ~3))
return FALSE;
-
+
if (strcmp (descr, expected_name) != 0)
return FALSE;
diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c
index 07ba6dc..8083538 100644
--- a/bfd/cpu-avr.c
+++ b/bfd/cpu-avr.c
@@ -54,7 +54,7 @@
if (a->mach <= b->mach)
return b;
-
+
if (a->mach >= b->mach)
return a;
}
@@ -63,7 +63,7 @@
return a;
if (a->mach == bfd_mach_avr25 && b->mach == bfd_mach_avr2)
return b;
-
+
if (a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr31)
return a;
if (a->mach == bfd_mach_avr31 && b->mach == bfd_mach_avr3)
@@ -96,6 +96,7 @@
default, /* Is this the default ? */ \
compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
next \
}
@@ -111,7 +112,7 @@
N (16, bfd_mach_avr25, "avr:25", FALSE, & arch_info_struct[3]),
/* Classic, > 8K, <= 64K. */
- /* TODO: addr_bits should be 16, but set to 22 for some following
+ /* TODO: addr_bits should be 16, but set to 22 for some following
version of GCC (from 4.3) for backward compatibility. */
N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[4]),
@@ -125,37 +126,37 @@
N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[7]),
/* Enhanced, > 8K, <= 64K. */
- /* TODO: addr_bits should be 16, but set to 22 for some following
+ /* TODO: addr_bits should be 16, but set to 22 for some following
version of GCC (from 4.3) for backward compatibility. */
N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[8]),
-
+
/* Enhanced, == 128K. */
N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]),
/* 3-Byte PC. */
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-bfin.c b/bfd/cpu-bfin.c
index 37e314b..e2e7f89 100644
--- a/bfd/cpu-bfin.c
+++ b/bfd/cpu-bfin.c
@@ -34,7 +34,8 @@
"bfin", /* Arch printable name. */
4, /* Section align power. */
TRUE, /* The one and only. */
- bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-cr16.c b/bfd/cpu-cr16.c
index 6c77738..3e54eaa 100644
--- a/bfd/cpu-cr16.c
+++ b/bfd/cpu-cr16.c
@@ -34,7 +34,8 @@
"cr16", /* Printable name. */
1, /* Unsigned int section alignment power. */
TRUE, /* The one and only. */
- bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-cr16c.c b/bfd/cpu-cr16c.c
index e8ee1db..943edfd 100644
--- a/bfd/cpu-cr16c.c
+++ b/bfd/cpu-cr16c.c
@@ -33,7 +33,8 @@
"cr16c",
1,
TRUE, /* The one and only. */
- bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-cris.c b/bfd/cpu-cris.c
index c77e8f5..045425d 100644
--- a/bfd/cpu-cris.c
+++ b/bfd/cpu-cris.c
@@ -1,5 +1,5 @@
/* BFD support for the Axis CRIS architecture.
- Copyright 2000, 2002, 2004, 2005, 2007
+ Copyright 2000, 2002, 2004, 2005, 2007, 2012
Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson.
@@ -30,12 +30,11 @@
there's a compatible subset for which we provide an arch_info. */
static const bfd_arch_info_type * get_compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+ (const bfd_arch_info_type *, const bfd_arch_info_type *);
static const bfd_arch_info_type *
-get_compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
+get_compatible (const bfd_arch_info_type *a,
+ const bfd_arch_info_type *b)
{
/* Arches must match. */
if (a->arch != b->arch)
@@ -69,7 +68,7 @@
#define N(NUMBER, PRINT, NEXT) \
{ 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \
- get_compatible, bfd_default_scan, NEXT }
+ get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT }
static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 =
N (bfd_mach_cris_v10_v32, "cris:common_v10_v32", NULL);
@@ -98,6 +97,7 @@
bfd_arch_info_type. */
bfd_default_scan, /* Check if a bfd_arch_info_type is a
match. */
+ bfd_arch_default_fill, /* Default fill. */
&bfd_cris_arch_v32 /* Pointer to next bfd_arch_info_type in
the same family. */
};
diff --git a/bfd/cpu-crx.c b/bfd/cpu-crx.c
index 3201c3c..631c5fa 100644
--- a/bfd/cpu-crx.c
+++ b/bfd/cpu-crx.c
@@ -34,7 +34,8 @@
"crx", /* Printable name. */
1, /* Unsigned int section alignment power. */
TRUE, /* The one and only. */
- bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-d10v.c b/bfd/cpu-d10v.c
index b161115..7bc208e 100644
--- a/bfd/cpu-d10v.c
+++ b/bfd/cpu-d10v.c
@@ -37,6 +37,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -53,6 +54,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
& d10v_ts3_info,
};
@@ -69,5 +71,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
& d10v_ts2_info,
};
diff --git a/bfd/cpu-d30v.c b/bfd/cpu-d30v.c
index d528e9b..69515eb 100644
--- a/bfd/cpu-d30v.c
+++ b/bfd/cpu-d30v.c
@@ -36,5 +36,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-dlx.c b/bfd/cpu-dlx.c
index fda48dc..2c17849 100644
--- a/bfd/cpu-dlx.c
+++ b/bfd/cpu-dlx.c
@@ -35,6 +35,7 @@
4,
TRUE, /* The one and only. */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-epiphany.c b/bfd/cpu-epiphany.c
new file mode 100644
index 0000000..9cf723e
--- /dev/null
+++ b/bfd/cpu-epiphany.c
@@ -0,0 +1,58 @@
+/* BFD support for the Adapteva EPIPHANY processor.
+ Copyright 2009, 2011 Free Software Foundation, Inc.
+ Contributed by Embecosm on behalf of Adapteva, 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"
+
+const bfd_arch_info_type bfd_epiphany16_arch =
+{
+ 32, /* Bits per word */
+ 32, /* Bits per address. */
+ 8, /* Bits per byte. */
+ bfd_arch_epiphany, /* Architecture. */
+ bfd_mach_epiphany16, /* Machine. */
+ "epiphany", /* Architecture name. */
+ "epiphany16", /* Machine name. */
+ 1, /* Section align power. */
+ FALSE, /* The default ? */
+ bfd_default_compatible, /* Architecture comparison fn. */
+ bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
+ NULL /* Next in list. */
+};
+
+const bfd_arch_info_type bfd_epiphany_arch =
+{
+ 32, /* Bits per word - not really true. */
+ 32, /* Bits per address. */
+ 8, /* Bits per byte. */
+ bfd_arch_epiphany, /* Architecture. */
+ bfd_mach_epiphany32, /* Machine. */
+ "epiphany", /* Architecture name. */
+ "epiphany32", /* Machine name. */
+ 2, /* Section align power. */
+ TRUE, /* The default ? */
+ bfd_default_compatible, /* Architecture comparison fn. */
+ bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
+ & bfd_epiphany16_arch /* Next in list. */
+};
diff --git a/bfd/cpu-fr30.c b/bfd/cpu-fr30.c
index b60e43e..dc2e5fa 100644
--- a/bfd/cpu-fr30.c
+++ b/bfd/cpu-fr30.c
@@ -35,5 +35,6 @@
TRUE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
bfd_default_scan, /* string to architecture convert fn */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* next in list */
};
diff --git a/bfd/cpu-frv.c b/bfd/cpu-frv.c
index fd2aedb..ac4d898 100644
--- a/bfd/cpu-frv.c
+++ b/bfd/cpu-frv.c
@@ -35,6 +35,7 @@
DEFAULT, /* is this the default? */ \
bfd_default_compatible, /* architecture comparison fn */ \
bfd_default_scan, /* string to architecture convert fn */ \
+ bfd_arch_default_fill, /* Default fill. */ \
NEXT /* next in list */ \
}
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 0fd77d6..5f33856 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -83,7 +83,7 @@
return (info->mach == bfd_mach_h8300sx);
}
-
+
return (info->mach == bfd_mach_h8300s);
}
else
@@ -127,6 +127,7 @@
FALSE, /* the default machine */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
0
};
@@ -143,6 +144,7 @@
FALSE, /* the default machine */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
&h8300sxn_info_struct
};
@@ -159,6 +161,7 @@
FALSE, /* The default machine. */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
&h8300sx_info_struct
};
@@ -175,6 +178,7 @@
FALSE, /* The default machine. */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
&h8300sn_info_struct
};
@@ -191,6 +195,7 @@
FALSE, /* The default machine. */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
& h8300hn_info_struct
};
@@ -207,6 +212,7 @@
FALSE, /* The default machine. */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
&h8300s_info_struct
};
@@ -223,6 +229,7 @@
TRUE, /* The default machine. */
compatible,
h8300_scan,
+ bfd_arch_default_fill,
&h8300h_info_struct
};
diff --git a/bfd/cpu-h8500.c b/bfd/cpu-h8500.c
index 362d369..1312831 100644
--- a/bfd/cpu-h8500.c
+++ b/bfd/cpu-h8500.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the H8/500 architecture.
- Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003, 2005, 2007
+ Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2012
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@@ -25,12 +25,11 @@
#include "libbfd.h"
static bfd_boolean scan_mach
- PARAMS ((const struct bfd_arch_info *, const char *));
+ (const struct bfd_arch_info *, const char *);
static bfd_boolean
-scan_mach (info, string)
- const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
- const char *string;
+scan_mach (const struct bfd_arch_info *info ATTRIBUTE_UNUSED,
+ const char *string)
{
if (strcmp (string,"h8/500") == 0)
return TRUE;
@@ -56,5 +55,6 @@
TRUE, /* the default machine */
bfd_default_compatible,
scan_mach,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-hppa.c b/bfd/cpu-hppa.c
index 034e321..885a11a 100644
--- a/bfd/cpu-hppa.c
+++ b/bfd/cpu-hppa.c
@@ -35,7 +35,8 @@
3,
TRUE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -52,7 +53,8 @@
3,
FALSE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_hppa10_arch,
};
@@ -69,7 +71,8 @@
3,
FALSE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_hppa20_arch,
};
@@ -85,6 +88,7 @@
3,
FALSE, /* 1.1 specific features used */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_hppa20w_arch,
};
diff --git a/bfd/cpu-i370.c b/bfd/cpu-i370.c
index d12b9ae..99daf88 100644
--- a/bfd/cpu-i370.c
+++ b/bfd/cpu-i370.c
@@ -40,6 +40,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[1]
},
{
@@ -54,6 +55,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0
},
};
@@ -71,5 +73,6 @@
TRUE, /* The default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
& arch_info_struct[0]
};
diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c
index f98c0e5..2a6bb97 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, 2010, 2011
+ 2007, 2009, 2010, 2011, 2013
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,6 +23,10 @@
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
+#include "libiberty.h"
+
+extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
+ bfd_boolean);
static const bfd_arch_info_type *
bfd_i386_compatible (const bfd_arch_info_type *a,
@@ -38,6 +42,148 @@
return compat;
}
+/* Fill the buffer with zero or nop instruction if CODE is TRUE. Use
+ multi byte nop instructions if LONG_NOP is TRUE. */
+
+static void *
+bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code,
+ bfd_boolean long_nop)
+{
+ /* nop */
+ static const char nop_1[] = { 0x90 };
+ /* xchg %ax,%ax */
+ static const char nop_2[] = { 0x66, 0x90 };
+ /* nopl (%[re]ax) */
+ static const char nop_3[] = { 0x0f, 0x1f, 0x00 };
+ /* nopl 0(%[re]ax) */
+ static const char nop_4[] = { 0x0f, 0x1f, 0x40, 0x00 };
+ /* nopl 0(%[re]ax,%[re]ax,1) */
+ static const char nop_5[] = { 0x0f, 0x1f, 0x44, 0x00, 0x00 };
+ /* nopw 0(%[re]ax,%[re]ax,1) */
+ static const char nop_6[] = { 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 };
+ /* nopl 0L(%[re]ax) */
+ static const char nop_7[] = { 0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00 };
+ /* nopl 0L(%[re]ax,%[re]ax,1) */
+ static const char nop_8[] =
+ { 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00};
+ /* nopw 0L(%[re]ax,%[re]ax,1) */
+ static const char nop_9[] =
+ { 0x66, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ /* nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char nop_10[] =
+ { 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ static const char *const nops[] =
+ { nop_1, nop_2, nop_3, nop_4, nop_5,
+ nop_6, nop_7, nop_8, nop_9, nop_10 };
+ bfd_size_type nop_size = long_nop ? ARRAY_SIZE (nops) : 2;
+
+ void *fill = bfd_malloc (count);
+ if (fill == NULL)
+ return fill;
+
+ if (code)
+ {
+ bfd_byte *p = fill;
+ while (count >= nop_size)
+ {
+ memcpy (p, nops[nop_size - 1], nop_size);
+ p += nop_size;
+ count -= nop_size;
+ }
+ if (count != 0)
+ memcpy (p, nops[count - 1], count);
+ }
+ else
+ memset (fill, 0, count);
+
+ return fill;
+}
+
+/* Fill the buffer with zero or short nop instruction if CODE is TRUE. */
+
+void *
+bfd_arch_i386_short_nop_fill (bfd_size_type count,
+ bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
+ bfd_boolean code)
+{
+ return bfd_arch_i386_fill (count, code, FALSE);
+}
+
+/* Fill the buffer with zero or long nop instruction if CODE is TRUE. */
+
+static void *
+bfd_arch_i386_long_nop_fill (bfd_size_type count,
+ bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
+ bfd_boolean code)
+{
+ return bfd_arch_i386_fill (count, code, TRUE);
+}
+
+/* Fill the buffer with zero, or one-byte nop instructions if CODE is TRUE. */
+
+static void *
+bfd_arch_i386_onebyte_nop_fill (bfd_size_type count,
+ bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
+ bfd_boolean code)
+{
+ void *fill = bfd_malloc (count);
+ if (fill != NULL)
+ memset (fill, code ? 0x90 : 0, count);
+ return fill;
+}
+
+
+static const bfd_arch_info_type bfd_x64_32_nacl_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_nacl,
+ "i386",
+ "i386:x64-32:nacl",
+ 3,
+ FALSE,
+ bfd_i386_compatible,
+ bfd_default_scan,
+ bfd_arch_i386_onebyte_nop_fill,
+ NULL
+};
+
+static const bfd_arch_info_type bfd_x86_64_nacl_arch =
+{
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_x86_64_nacl,
+ "i386",
+ "i386:x86-64:nacl",
+ 3,
+ FALSE,
+ bfd_i386_compatible,
+ bfd_default_scan,
+ bfd_arch_i386_onebyte_nop_fill,
+ &bfd_x64_32_nacl_arch
+};
+
+const bfd_arch_info_type bfd_i386_nacl_arch =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_i386_i386_nacl,
+ "i386",
+ "i386:nacl",
+ 3,
+ TRUE,
+ bfd_i386_compatible,
+ bfd_default_scan,
+ bfd_arch_i386_onebyte_nop_fill,
+ &bfd_x86_64_nacl_arch
+};
+
static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
{
64, /* 64 bits in a word */
@@ -51,7 +197,8 @@
FALSE,
bfd_i386_compatible,
bfd_default_scan,
- 0
+ bfd_arch_i386_long_nop_fill,
+ &bfd_i386_nacl_arch
};
static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
@@ -67,6 +214,7 @@
FALSE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_long_nop_fill,
&bfd_x64_32_arch_intel_syntax,
};
@@ -83,6 +231,7 @@
TRUE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
&bfd_x86_64_arch_intel_syntax
};
@@ -99,6 +248,7 @@
FALSE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
&bfd_i386_arch_intel_syntax
};
@@ -115,6 +265,7 @@
FALSE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_long_nop_fill,
&i8086_arch
};
@@ -131,6 +282,7 @@
FALSE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_long_nop_fill,
&bfd_x64_32_arch
};
@@ -147,5 +299,6 @@
TRUE,
bfd_i386_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
&bfd_x86_64_arch
};
diff --git a/bfd/cpu-i860.c b/bfd/cpu-i860.c
index ae9ebcd..77c5e84 100644
--- a/bfd/cpu-i860.c
+++ b/bfd/cpu-i860.c
@@ -38,5 +38,6 @@
TRUE, /* Is this the default architecture? */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0, /* Next in list */
};
diff --git a/bfd/cpu-i960.c b/bfd/cpu-i960.c
index c7d9231..9c4a974 100644
--- a/bfd/cpu-i960.c
+++ b/bfd/cpu-i960.c
@@ -1,6 +1,6 @@
/* BFD library support routines for the i960 architecture.
Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2005, 2006,
- 2007 Free Software Foundation, Inc.
+ 2007, 2012 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,19 +24,13 @@
#include "bfd.h"
#include "libbfd.h"
-static bfd_boolean scan_960_mach
- PARAMS ((const bfd_arch_info_type *, const char *));
-static const bfd_arch_info_type *compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
-
/* This routine is provided a string, and tries to work out if it
could possibly refer to the i960 machine pointed at in the
info_struct pointer */
static bfd_boolean
-scan_960_mach (ap, string)
- const bfd_arch_info_type *ap;
- const char *string;
+scan_960_mach (const bfd_arch_info_type *ap,
+ const char *string)
{
unsigned long machine;
int fail_because_not_80960 = FALSE;
@@ -117,9 +111,8 @@
to its info structure */
static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
+compatible (const bfd_arch_info_type *a,
+ const bfd_arch_info_type *b)
{
/* The i960 has distinct subspecies which may not interbreed:
@@ -156,17 +149,14 @@
};
if (a->arch != b->arch || matrix[a->mach][b->mach] == ERROR)
- {
return NULL;
- }
- else
- {
- return (a->mach == matrix[a->mach][b->mach]) ? a : b;
- }
+
+ return (a->mach == matrix[a->mach][b->mach]) ? a : b;
}
#define N(a,b,d,n) \
-{ 32, 32, 8,bfd_arch_i960,a,"i960",b,3,d,compatible,scan_960_mach,n,}
+{ 32, 32, 8,bfd_arch_i960,a,"i960",b,3,d,compatible,scan_960_mach, \
+ bfd_arch_default_fill, n,}
static const bfd_arch_info_type arch_info_struct[] =
{
diff --git a/bfd/cpu-ia64-opc.c b/bfd/cpu-ia64-opc.c
index b797e44..dcc318e 100644
--- a/bfd/cpu-ia64-opc.c
+++ b/bfd/cpu-ia64-opc.c
@@ -380,6 +380,46 @@
}
static const char*
+ins_cnt6a (const struct ia64_operand *self, ia64_insn value,
+ ia64_insn *code)
+{
+ if (value < 1 || value > 64)
+ return "value must be between 1 and 64";
+ return ins_immu (self, value - 1, code);
+}
+
+static const char*
+ext_cnt6a (const struct ia64_operand *self, ia64_insn code,
+ ia64_insn *valuep)
+{
+ const char *result;
+
+ result = ext_immu (self, code, valuep);
+ if (result)
+ return result;
+
+ *valuep = *valuep + 1;
+ return 0;
+}
+
+static const char*
+ins_strd5b (const struct ia64_operand *self, ia64_insn value,
+ ia64_insn *code)
+{
+ if ( value & 0x3f )
+ return "value must be a multiple of 64";
+ return ins_imms_scaled (self, value, code, 6);
+}
+
+static const char*
+ext_strd5b (const struct ia64_operand *self, ia64_insn code,
+ ia64_insn *valuep)
+{
+ return ext_imms_scaled (self, code, valuep, 6);
+}
+
+
+static const char*
ins_inc3 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)
{
BFD_HOST_64_BIT val = value;
@@ -480,6 +520,8 @@
"a general register" },
{ REG, ins_reg, ext_reg, "r", {{ 2, 20}}, 0, /* R3_2 */
"a general register r0-r3" },
+ { REG, ins_reg, ext_reg, "dahr", {{ 3, 23}}, 0, /* DAHR */
+ "a dahr register dahr0-7" },
/* memory operands: */
{ IND, ins_reg, ext_reg, "", {{7, 20}}, 0, /* MR3 */
@@ -504,6 +546,8 @@
"a pmc register" },
{ IND, ins_reg, ext_reg, "pmd", {{7, 20}}, 0, /* PMD_R3 */
"a pmd register" },
+ { IND, ins_reg, ext_reg, "dahr", {{7, 20}}, 0, /* DAHR_R3 */
+ "a dahr register" },
{ IND, ins_reg, ext_reg, "rr", {{7, 20}}, 0, /* RR_R3 */
"an rr register" },
@@ -568,9 +612,15 @@
{ ABS, ins_imms, ext_imms, 0, /* IMM14 */
{{ 7, 13}, { 6, 27}, { 1, 36}}, SDEC,
"a 14-bit integer (-8192-8191)" },
+ { ABS, ins_immu, ext_immu, 0, /* IMMU16 */
+ {{4, 6}, {11, 12}, { 1, 36}}, UDEC,
+ "a 16-bit unsigned" },
{ ABS, ins_imms1, ext_imms1, 0, /* IMM17 */
{{ 7, 6}, { 8, 24}, { 1, 36}}, 0,
"a 17-bit integer (-65536-65535)" },
+ { ABS, ins_immu, ext_immu, 0, /* IMMU19 */
+ {{4, 6}, {14, 12}, { 1, 36}}, UDEC,
+ "a 19-bit unsigned" },
{ ABS, ins_immu, ext_immu, 0, {{20, 6}, { 1, 36}}, 0, /* IMMU21 */
"a 21-bit unsigned" },
{ ABS, ins_imms, ext_imms, 0, /* IMM22 */
@@ -613,4 +663,8 @@
{ ABS, ins_const, ext_const, 0, {{0, 0}}, 0, /* LDXMOV */
"ldxmov target" },
+ { ABS, ins_cnt6a, ext_cnt6a, 0, {{6, 6}}, UDEC, /* CNT6a */
+ "lfetch count" },
+ { ABS, ins_strd5b, ext_strd5b, 0, {{5, 13}}, SDEC, /* STRD5b*/
+ "lfetch stride" },
};
diff --git a/bfd/cpu-ia64.c b/bfd/cpu-ia64.c
index c97de1a..4ea37c7 100644
--- a/bfd/cpu-ia64.c
+++ b/bfd/cpu-ia64.c
@@ -35,7 +35,8 @@
3, /* log2 of section alignment */
TRUE, /* the one and only */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -51,7 +52,8 @@
3, /* log2 of section alignment */
TRUE, /* the one and only */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_ia64_elf32_arch,
};
diff --git a/bfd/cpu-ip2k.c b/bfd/cpu-ip2k.c
index 0b959bd..d8eaf3c 100644
--- a/bfd/cpu-ip2k.c
+++ b/bfd/cpu-ip2k.c
@@ -35,6 +35,7 @@
FALSE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
};
@@ -51,5 +52,6 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
& bfd_ip2k_nonext_arch /* Next in list. */
};
diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c
index 72d8363..648380e 100644
--- a/bfd/cpu-iq2000.c
+++ b/bfd/cpu-iq2000.c
@@ -36,6 +36,7 @@
FALSE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
bfd_default_scan, /* string to architecture convert fn */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* next in list */
}
};
@@ -53,5 +54,6 @@
TRUE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
bfd_default_scan, /* string to architecture convert fn */
+ bfd_arch_default_fill, /* Default fill. */
&arch_info_struct[0], /* next in list */
};
diff --git a/bfd/cpu-k1om.c b/bfd/cpu-k1om.c
index fa030ae..54b6e58 100644
--- a/bfd/cpu-k1om.c
+++ b/bfd/cpu-k1om.c
@@ -23,6 +23,9 @@
#include "bfd.h"
#include "libbfd.h"
+extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
+ bfd_boolean);
+
static const bfd_arch_info_type bfd_k1om_arch_intel_syntax =
{
64, /* 64 bits in a word */
@@ -36,6 +39,7 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
0
};
@@ -52,5 +56,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
&bfd_k1om_arch_intel_syntax
};
diff --git a/bfd/cpu-l1om.c b/bfd/cpu-l1om.c
index c1057c4..46ac3a0 100644
--- a/bfd/cpu-l1om.c
+++ b/bfd/cpu-l1om.c
@@ -23,6 +23,9 @@
#include "bfd.h"
#include "libbfd.h"
+extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
+ bfd_boolean);
+
static const bfd_arch_info_type bfd_l1om_arch_intel_syntax =
{
64, /* 64 bits in a word */
@@ -36,6 +39,7 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
0
};
@@ -52,5 +56,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_i386_short_nop_fill,
&bfd_l1om_arch_intel_syntax
};
diff --git a/bfd/cpu-lm32.c b/bfd/cpu-lm32.c
index 227612f..d0fd93a 100644
--- a/bfd/cpu-lm32.c
+++ b/bfd/cpu-lm32.c
@@ -1,5 +1,5 @@
/* BFD support for the Lattice Mico32 architecture.
- Copyright 2008 Free Software Foundation, Inc.
+ Copyright 2008, 2012 Free Software Foundation, Inc.
Contributed by Jon Beniston <[email protected]>
This file is part of BFD, the Binary File Descriptor library.
@@ -19,16 +19,16 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
-const bfd_arch_info_type bfd_lm32_arch =
+const bfd_arch_info_type bfd_lm32_arch =
{
32, /* Bits in word. */
32, /* Bits in address. */
8, /* Bits in byte. */
- bfd_arch_lm32, /* Enum bfd_architecture. */
+ bfd_arch_lm32, /* Enum bfd_architecture. */
bfd_mach_lm32, /* Machine number. */
"lm32", /* Architecture name. */
"lm32", /* Printable name. */
@@ -36,6 +36,7 @@
TRUE, /* Is this the default machine for the target. */
bfd_default_compatible, /* Function callback to test if two files have compatible machines. */
bfd_default_scan,
+ bfd_arch_default_fill,
NULL /* Next. */
};
diff --git a/bfd/cpu-m10200.c b/bfd/cpu-m10200.c
index 218891d..f42a5ea 100644
--- a/bfd/cpu-m10200.c
+++ b/bfd/cpu-m10200.c
@@ -34,6 +34,7 @@
2,
TRUE, /* the one and only */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-m10300.c b/bfd/cpu-m10300.c
index 7f89665..6fd8c67 100644
--- a/bfd/cpu-m10300.c
+++ b/bfd/cpu-m10300.c
@@ -36,6 +36,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -52,6 +53,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_am33_2_arch,
};
@@ -68,5 +70,6 @@
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_am33_arch,
};
diff --git a/bfd/cpu-m32c.c b/bfd/cpu-m32c.c
index d2f9cb1..9c26938 100644
--- a/bfd/cpu-m32c.c
+++ b/bfd/cpu-m32c.c
@@ -49,6 +49,7 @@
FALSE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
m32c_scan, /* string to architecture convert fn */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* next in list */
},
};
@@ -66,5 +67,6 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
m32c_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
&arch_info_struct[0], /* Next in list. */
};
diff --git a/bfd/cpu-m32r.c b/bfd/cpu-m32r.c
index 8180d6c..8f373b4 100644
--- a/bfd/cpu-m32r.c
+++ b/bfd/cpu-m32r.c
@@ -25,7 +25,7 @@
#define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_m32r, number, "m32r", print, 4, default, \
- bfd_default_compatible, bfd_default_scan, next }
+ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
#define M32R2_NEXT & arch_info_struct [1]
#define NEXT & arch_info_struct [0]
diff --git a/bfd/cpu-m68hc11.c b/bfd/cpu-m68hc11.c
index 313d820..7f3c074 100644
--- a/bfd/cpu-m68hc11.c
+++ b/bfd/cpu-m68hc11.c
@@ -35,5 +35,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-m68hc12.c b/bfd/cpu-m68hc12.c
index 2a115b9..2dbf627 100644
--- a/bfd/cpu-m68hc12.c
+++ b/bfd/cpu-m68hc12.c
@@ -35,6 +35,7 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
@@ -51,5 +52,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_m68hc12s_arch,
};
diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c
index ec9bccd..4c7b845 100644
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -30,7 +30,8 @@
const bfd_arch_info_type *b);
#define N(name, print,d,next) \
-{ 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_m68k_compatible,bfd_default_scan, next, }
+{ 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_m68k_compatible, \
+ bfd_default_scan, bfd_arch_default_fill, next, }
static const bfd_arch_info_type arch_info_struct[] =
{
@@ -110,7 +111,7 @@
/* Table indexed by bfd_mach_arch number indicating which
architectural features are supported. */
-static const unsigned m68k_arch_features[] =
+static const unsigned m68k_arch_features[] =
{
0,
m68000|m68881|m68851,
@@ -185,7 +186,7 @@
ix++)
{
unsigned this_extra, this_missing;
-
+
if (m68k_arch_features[ix] == features)
return ix;
this_extra = bit_count (m68k_arch_features[ix] & ~features);
@@ -194,7 +195,7 @@
extra = this_extra;
superset = ix;
}
-
+
this_missing = bit_count (features & ~m68k_arch_features[ix]);
if (this_missing < missing)
{
@@ -219,7 +220,7 @@
return b;
if (!b->mach)
return a;
-
+
if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060)
/* Merge m68k machine. */
return a->mach > b->mach ? a : b;
diff --git a/bfd/cpu-m88k.c b/bfd/cpu-m88k.c
index 7e7c18d..d345902 100644
--- a/bfd/cpu-m88k.c
+++ b/bfd/cpu-m88k.c
@@ -36,6 +36,7 @@
3,
TRUE, /* the one and only */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-m9s12x.c b/bfd/cpu-m9s12x.c
new file mode 100644
index 0000000..d224b83
--- /dev/null
+++ b/bfd/cpu-m9s12x.c
@@ -0,0 +1,41 @@
+/* BFD support for the Freescale 9S12X processor
+ Copyright 2008, 2009, 2010, 2011, 2012 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"
+
+const bfd_arch_info_type bfd_m9s12x_arch =
+{
+ 16, /* 16 bits in a word. */
+ 32, /* 16 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_m9s12x,
+ 0,
+ "m9s12x",
+ "m9s12x",
+ 4, /* Section alignment power. */
+ TRUE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ 0,
+};
+
diff --git a/bfd/cpu-m9s12xg.c b/bfd/cpu-m9s12xg.c
new file mode 100644
index 0000000..6958a13
--- /dev/null
+++ b/bfd/cpu-m9s12xg.c
@@ -0,0 +1,41 @@
+/* BFD support for the Freescale 9S12-XGATE co-processor
+ Copyright 2008, 2009, 2010, 2011, 2012 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"
+
+const bfd_arch_info_type bfd_m9s12xg_arch =
+{
+ 16, /* 16 bits in a word. */
+ 32, /* 16 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_m9s12xg,
+ 0,
+ "m9s12xg",
+ "m9s12xg",
+ 4, /* Section alignment power. */
+ TRUE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ 0,
+};
+
diff --git a/bfd/cpu-mcore.c b/bfd/cpu-mcore.c
index c01dd10..80b3290 100644
--- a/bfd/cpu-mcore.c
+++ b/bfd/cpu-mcore.c
@@ -35,5 +35,6 @@
TRUE, /* Is this the default architecture ? */
bfd_default_compatible, /* Architecture comparison function */
bfd_default_scan, /* String to architecture conversion */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list */
};
diff --git a/bfd/cpu-mep.c b/bfd/cpu-mep.c
index 7ac871f..94cb080 100644
--- a/bfd/cpu-mep.c
+++ b/bfd/cpu-mep.c
@@ -22,7 +22,8 @@
#include "libbfd.h"
#define MA(x, n, def, y) { 32, 32, 8, bfd_arch_mep, x, "mep", n, \
- 2, def, bfd_default_compatible, bfd_default_scan, y }
+ 2, def, bfd_default_compatible, bfd_default_scan, \
+ bfd_arch_default_fill, y }
static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", FALSE, NULL);
static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, & bfd_c5_arch);
diff --git a/bfd/cpu-metag.c b/bfd/cpu-metag.c
new file mode 100644
index 0000000..a8dbfaa
--- /dev/null
+++ b/bfd/cpu-metag.c
@@ -0,0 +1,41 @@
+/* BFD support for the Imagination Technologies Meta processor.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ Contributed by Imagination Technologies Ltd.
+
+ 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"
+
+const bfd_arch_info_type bfd_metag_arch =
+{
+ 32, /* Bits per word. */
+ 32, /* Bits per address. */
+ 8, /* Bits per byte. */
+ bfd_arch_metag, /* Architecture. */
+ bfd_mach_metag, /* Machine. */
+ "metag", /* Architecture name. */
+ "metag", /* Printable name. */
+ 4, /* Section align power. */
+ TRUE, /* The default ? */
+ bfd_default_compatible, /* Architecture comparison fn. */
+ bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
+ NULL /* Next in list. */
+};
diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c
index 45a4a2b..2cf6bc6 100644
--- a/bfd/cpu-microblaze.c
+++ b/bfd/cpu-microblaze.c
@@ -1,6 +1,6 @@
/* BFD Xilinx MicroBlaze architecture definition
- Copyright 2009 Free Software Foundation, Inc.
+ Copyright 2009, 2012 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
const bfd_arch_info_type bfd_microblaze_arch =
@@ -36,5 +36,6 @@
TRUE, /* Is this the default architecture ? */
bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
};
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index 42d43a9..59a7c16 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -1,6 +1,7 @@
/* bfd back-end for mips support
Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2013
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -55,6 +56,7 @@
DEFAULT, \
mips_compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
NEXT, \
}
@@ -74,6 +76,7 @@
I_mips5000,
I_mips5400,
I_mips5500,
+ I_mips5900,
I_mips6000,
I_mips7000,
I_mips8000,
@@ -93,6 +96,8 @@
I_loongson_2f,
I_loongson_3a,
I_mipsocteon,
+ I_mipsocteonp,
+ I_mipsocteon2,
I_xlr,
I_micromips
};
@@ -115,6 +120,7 @@
N (64, 64, bfd_mach_mips5000, "mips:5000", FALSE, NN(I_mips5000)),
N (64, 64, bfd_mach_mips5400, "mips:5400", FALSE, NN(I_mips5400)),
N (64, 64, bfd_mach_mips5500, "mips:5500", FALSE, NN(I_mips5500)),
+ N (64, 32, bfd_mach_mips5900, "mips:5900", FALSE, NN(I_mips5900)),
N (32, 32, bfd_mach_mips6000, "mips:6000", FALSE, NN(I_mips6000)),
N (64, 64, bfd_mach_mips7000, "mips:7000", FALSE, NN(I_mips7000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", FALSE, NN(I_mips8000)),
@@ -134,6 +140,8 @@
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_octeonp,"mips:octeon+", FALSE, NN(I_mipsocteonp)),
+ N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)),
N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
};
diff --git a/bfd/cpu-mmix.c b/bfd/cpu-mmix.c
index 6cf8753..f706b49 100644
--- a/bfd/cpu-mmix.c
+++ b/bfd/cpu-mmix.c
@@ -38,5 +38,6 @@
TRUE, /* This is the default architecture. */
bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
};
diff --git a/bfd/cpu-moxie.c b/bfd/cpu-moxie.c
index 39debbc..103a56a 100644
--- a/bfd/cpu-moxie.c
+++ b/bfd/cpu-moxie.c
@@ -34,7 +34,8 @@
"moxie", /* Printable name. */
2, /* Unsigned int section alignment power. */
TRUE, /* The one and only. */
- bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c
index 63c301a..73b6e66 100644
--- a/bfd/cpu-msp430.c
+++ b/bfd/cpu-msp430.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the MSP architecture.
- Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Dmitry Diky <[email protected]>
This file is part of BFD, the Binary File Descriptor library.
@@ -23,8 +23,23 @@
#include "bfd.h"
#include "libbfd.h"
-static const bfd_arch_info_type *compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+/* This routine is provided two arch_infos and works out which MSP
+ machine which would be compatible with both and returns a pointer
+ to its info structure. */
+
+static const bfd_arch_info_type *
+compatible (const bfd_arch_info_type * a,
+ const bfd_arch_info_type * b)
+{
+ /* If a & b are for different architectures we can do nothing. */
+ if (a->arch != b->arch)
+ return NULL;
+
+ if (a->mach <= b->mach)
+ return b;
+
+ return a;
+}
#define N(addr_bits, machine, print, default, next) \
{ \
@@ -39,6 +54,7 @@
default, /* The default machine. */ \
compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
next \
}
@@ -61,53 +77,62 @@
/* msp430x15x. */
N (16, bfd_mach_msp15, "msp:15", FALSE, & arch_info_struct[6]),
-
+
/* msp430x16x. */
N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[7]),
+ /* msp430x20x. */
+ N (16, bfd_mach_msp20, "msp:20", FALSE, & arch_info_struct[8]),
+
/* msp430x21x. */
- N (16, bfd_mach_msp21, "msp:21", FALSE, & arch_info_struct[8]),
+ N (16, bfd_mach_msp21, "msp:21", FALSE, & arch_info_struct[9]),
+
+ /* msp430x22x. */
+ N (16, bfd_mach_msp22, "msp:22", FALSE, & arch_info_struct[10]),
+
+ /* msp430x23x. */
+ N (16, bfd_mach_msp23, "msp:23", FALSE, & arch_info_struct[11]),
+
+ /* msp430x24x. */
+ N (16, bfd_mach_msp24, "msp:24", FALSE, & arch_info_struct[12]),
+
+ /* msp430x26x. */
+ N (16, bfd_mach_msp26, "msp:26", FALSE, & arch_info_struct[13]),
/* msp430x31x. */
- N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[9]),
+ N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[14]),
/* msp430x32x. */
- N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[10]),
+ N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[15]),
/* msp430x33x. */
- N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[11]),
-
+ N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[16]),
+
/* msp430x41x. */
- N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[12]),
+ N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[17]),
/* msp430x42x. */
- N (16, bfd_mach_msp42, "msp:42", FALSE, & arch_info_struct[13]),
+ N (16, bfd_mach_msp42, "msp:42", FALSE, & arch_info_struct[18]),
/* msp430x43x. */
- N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[14]),
+ N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[19]),
/* msp430x44x. */
- N (16, bfd_mach_msp43, "msp:44", FALSE, NULL)
+ N (16, bfd_mach_msp43, "msp:44", FALSE, & arch_info_struct[20]),
+
+ /* msp430x46x. */
+ N (16, bfd_mach_msp46, "msp:46", FALSE, & arch_info_struct[21]),
+
+ /* msp430x47x. */
+ N (16, bfd_mach_msp47, "msp:47", FALSE, & arch_info_struct[22]),
+
+ /* msp430x54x. */
+ N (16, bfd_mach_msp54, "msp:54", FALSE, & arch_info_struct[23]),
+
+ N (32, bfd_mach_msp430x, "msp:430X", FALSE, NULL)
+
};
const bfd_arch_info_type bfd_msp430_arch =
N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]);
-/* This routine is provided two arch_infos and works out which MSP
- machine which would be compatible with both and returns a pointer
- to its info structure. */
-
-static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type * a;
- const bfd_arch_info_type * b;
-{
- /* If a & b are for different architectures we can do nothing. */
- if (a->arch != b->arch)
- return NULL;
-
- if (a->mach <= b->mach)
- return b;
-
- return a;
-}
diff --git a/bfd/cpu-mt.c b/bfd/cpu-mt.c
index 519871d..0ec10c8 100644
--- a/bfd/cpu-mt.c
+++ b/bfd/cpu-mt.c
@@ -36,6 +36,7 @@
FALSE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
&arch_info_struct[1] /* Next in list. */
},
{
@@ -50,6 +51,7 @@
FALSE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
},
};
@@ -67,6 +69,7 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
&arch_info_struct[0] /* Next in list. */
};
diff --git a/bfd/cpu-nios2.c b/bfd/cpu-nios2.c
new file mode 100644
index 0000000..fa4c859
--- /dev/null
+++ b/bfd/cpu-nios2.c
@@ -0,0 +1,44 @@
+/* BFD support for the Altera Nios II processor.
+ Copyright (C) 2012, 2013 Free Software Foundation, Inc.
+ Contributed by Nigel Gray ([email protected]).
+ Contributed by Mentor Graphics, 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"
+
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
+ { \
+ BITS_WORD, /* bits in a word */ \
+ BITS_ADDR, /* bits in an address */ \
+ 8, /* 8 bits in a byte */ \
+ bfd_arch_nios2, \
+ NUMBER, \
+ "nios2", \
+ PRINT, \
+ 3, \
+ DEFAULT, \
+ bfd_default_compatible, \
+ bfd_default_scan, \
+ bfd_arch_default_fill, \
+ NEXT \
+ }
+
+const bfd_arch_info_type bfd_nios2_arch = N (32, 32, 0, "nios2", TRUE, NULL);
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 216b248..48a6bc6 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -1,6 +1,6 @@
/* BFD support for the ns32k architecture.
Copyright 1990, 1991, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2007 Free Software Foundation, Inc.
+ 2004, 2005, 2007, 2012 Free Software Foundation, Inc.
Almost totally rewritten by Ian Dall from initial work
by Andrew Cagney.
@@ -27,7 +27,8 @@
#include "ns32k.h"
#define N(machine, printable, d, next) \
-{ 32, 32, 8, bfd_arch_ns32k, machine, "ns32k",printable,3,d,bfd_default_compatible,bfd_default_scan, next, }
+{ 32, 32, 8, bfd_arch_ns32k, machine, "ns32k",printable,3,d, \
+ bfd_default_compatible,bfd_default_scan,bfd_arch_default_fill,next, }
static const bfd_arch_info_type arch_info_struct[] =
{
@@ -37,16 +38,8 @@
const bfd_arch_info_type bfd_ns32k_arch =
N(32032,"ns32k:32032",FALSE, &arch_info_struct[0]);
-static bfd_reloc_status_type do_ns32k_reloc
- PARAMS ((bfd *, arelent *, struct bfd_symbol *, PTR, asection *,
- bfd *, char **,
- bfd_vma (*) (bfd_byte *, int),
- void (*) (bfd_vma, bfd_byte *, int)));
-
bfd_vma
-_bfd_ns32k_get_displacement (buffer, size)
- bfd_byte *buffer;
- int size;
+_bfd_ns32k_get_displacement (bfd_byte *buffer, int size)
{
bfd_signed_vma value;
@@ -77,10 +70,7 @@
}
void
-_bfd_ns32k_put_displacement (value, buffer, size)
- bfd_vma value;
- bfd_byte *buffer;
- int size;
+_bfd_ns32k_put_displacement (bfd_vma value, bfd_byte *buffer, int size)
{
switch (size)
{
@@ -108,9 +98,7 @@
}
bfd_vma
-_bfd_ns32k_get_immediate (buffer, size)
- bfd_byte *buffer;
- int size;
+_bfd_ns32k_get_immediate (bfd_byte *buffer, int size)
{
bfd_vma value = 0;
@@ -131,10 +119,7 @@
}
void
-_bfd_ns32k_put_immediate (value, buffer, size)
- bfd_vma value;
- bfd_byte *buffer;
- int size;
+_bfd_ns32k_put_immediate (bfd_vma value, bfd_byte *buffer, int size)
{
buffer += size - 1;
switch (size)
@@ -155,17 +140,15 @@
needs to be! */
static bfd_reloc_status_type
-do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message, get_data, put_data)
- bfd *abfd;
- arelent *reloc_entry;
- struct bfd_symbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
- bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
- void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+do_ns32k_reloc (bfd * abfd,
+ arelent * reloc_entry,
+ struct bfd_symbol * symbol,
+ void * data,
+ asection * input_section,
+ bfd * output_bfd,
+ char ** error_message ATTRIBUTE_UNUSED,
+ bfd_vma (* get_data) (bfd_byte *, int),
+ void (* put_data) (bfd_vma, bfd_byte *, int))
{
int overflow = 0;
bfd_vma relocation;
@@ -176,7 +159,7 @@
asection *reloc_target_output_section;
bfd_byte *location;
- if ((symbol->section == &bfd_abs_section)
+ if (bfd_is_abs_section (symbol->section)
&& output_bfd != (bfd *) NULL)
{
reloc_entry->address += input_section->output_offset;
@@ -186,7 +169,7 @@
/* If we are not producing relocatable output, return an error if
the symbol is not defined. An undefined weak symbol is
considered to have a value of zero (SVR4 ABI, p. 4-27). */
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& (symbol->flags & BSF_WEAK) == 0
&& output_bfd == (bfd *) NULL)
flag = bfd_reloc_undefined;
@@ -582,14 +565,12 @@
/* Relocate a given location using a given value and howto. */
bfd_reloc_status_type
-_bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
- get_data, put_data)
- reloc_howto_type *howto;
- bfd *input_bfd ATTRIBUTE_UNUSED;
- bfd_vma relocation;
- bfd_byte *location;
- bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
- void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+_bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
+ bfd *input_bfd ATTRIBUTE_UNUSED,
+ bfd_vma relocation,
+ bfd_byte *location,
+ bfd_vma (*get_data) (bfd_byte *, int),
+ void (*put_data) (bfd_vma, bfd_byte *, int))
{
int size;
bfd_vma x;
@@ -757,15 +738,13 @@
}
bfd_reloc_status_type
-_bfd_ns32k_reloc_disp (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- struct bfd_symbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+_bfd_ns32k_reloc_disp (bfd *abfd,
+ arelent *reloc_entry,
+ struct bfd_symbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
return do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message,
@@ -774,15 +753,13 @@
}
bfd_reloc_status_type
-_bfd_ns32k_reloc_imm (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- struct bfd_symbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+_bfd_ns32k_reloc_imm (bfd *abfd,
+ arelent *reloc_entry,
+ struct bfd_symbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
return do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message, _bfd_ns32k_get_immediate,
@@ -790,15 +767,13 @@
}
bfd_reloc_status_type
-_bfd_ns32k_final_link_relocate (howto, input_bfd, input_section, contents,
- address, value, addend)
- reloc_howto_type *howto;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma address;
- bfd_vma value;
- bfd_vma addend;
+_bfd_ns32k_final_link_relocate (reloc_howto_type *howto,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ bfd_vma address,
+ bfd_vma value,
+ bfd_vma addend)
{
bfd_vma relocation;
diff --git a/bfd/cpu-openrisc.c b/bfd/cpu-openrisc.c
index a430349..8e3e878 100644
--- a/bfd/cpu-openrisc.c
+++ b/bfd/cpu-openrisc.c
@@ -36,6 +36,7 @@
DEFAULT, \
bfd_default_compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
NEXT, \
}
diff --git a/bfd/cpu-or32.c b/bfd/cpu-or32.c
index b9803ed..34ea52b 100644
--- a/bfd/cpu-or32.c
+++ b/bfd/cpu-or32.c
@@ -35,7 +35,8 @@
4,
TRUE, /* The one and only. */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-pdp11.c b/bfd/cpu-pdp11.c
index 3147f56..57c3068 100644
--- a/bfd/cpu-pdp11.c
+++ b/bfd/cpu-pdp11.c
@@ -34,7 +34,8 @@
1, /* aligment = 16 bit */
TRUE, /* the one and only */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-pj.c b/bfd/cpu-pj.c
index bb5c85b..3576227 100644
--- a/bfd/cpu-pj.c
+++ b/bfd/cpu-pj.c
@@ -37,5 +37,6 @@
TRUE, /* the default machine */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0
};
diff --git a/bfd/cpu-plugin.c b/bfd/cpu-plugin.c
index f0f7dbd..6b25c58 100644
--- a/bfd/cpu-plugin.c
+++ b/bfd/cpu-plugin.c
@@ -36,5 +36,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0
};
diff --git a/bfd/cpu-powerpc.c b/bfd/cpu-powerpc.c
index 9bd60af..3e9acf1 100644
--- a/bfd/cpu-powerpc.c
+++ b/bfd/cpu-powerpc.c
@@ -1,6 +1,6 @@
/* BFD PowerPC CPU definition
- Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2010
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2007, 2008,
+ 2010, 2012 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,13 +26,9 @@
/* The common PowerPC architecture is compatible with the RS/6000. */
-static const bfd_arch_info_type *powerpc_compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
-
static const bfd_arch_info_type *
-powerpc_compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
+powerpc_compatible (const bfd_arch_info_type *a,
+ const bfd_arch_info_type *b)
{
BFD_ASSERT (a->arch == bfd_arch_powerpc);
switch (b->arch)
@@ -65,6 +61,7 @@
TRUE, /* default for 64 bit target */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[1]
},
/* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
@@ -81,6 +78,7 @@
FALSE,
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[2],
},
#else
@@ -97,6 +95,7 @@
TRUE, /* default for 32 bit target */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[1],
},
/* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
@@ -113,6 +112,7 @@
FALSE,
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[2]
},
#endif
@@ -128,6 +128,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[3]
},
{
@@ -142,6 +143,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[4]
},
{
@@ -156,6 +158,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[5]
},
{
@@ -170,6 +173,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[6]
},
{
@@ -184,6 +188,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[7]
},
{
@@ -198,6 +203,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[8]
},
{
@@ -212,6 +218,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[9]
},
{
@@ -226,6 +233,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[10]
},
{
@@ -240,6 +248,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[11]
},
{
@@ -254,6 +263,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[12]
},
{
@@ -268,6 +278,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[13]
},
{
@@ -282,6 +293,7 @@
FALSE,
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[14]
},
{
@@ -296,6 +308,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[15]
},
{
@@ -310,6 +323,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[16]
},
{
@@ -324,6 +338,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[17]
},
{
@@ -338,6 +353,7 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_powerpc_archs[18]
},
{
@@ -352,6 +368,52 @@
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
+ &bfd_powerpc_archs[19]
+ },
+ {
+ 16, /* 16 or 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_vle,
+ "powerpc",
+ "powerpc:vle",
+ 3,
+ FALSE, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ &bfd_powerpc_archs[20]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_e5500,
+ "powerpc",
+ "powerpc:e5500",
+ 3,
+ FALSE, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ &bfd_powerpc_archs[21]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_e6500,
+ "powerpc",
+ "powerpc:e6500",
+ 3,
+ FALSE, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
0
}
};
diff --git a/bfd/cpu-rl78.c b/bfd/cpu-rl78.c
new file mode 100644
index 0000000..6fb72e6
--- /dev/null
+++ b/bfd/cpu-rl78.c
@@ -0,0 +1,40 @@
+/* BFD support for the RL78 processor.
+ Copyright (C) 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"
+
+const bfd_arch_info_type bfd_rl78_arch =
+{
+ 32, /* Bits per word. */
+ 32, /* Bits per address. */
+ 8, /* Bits per byte. */
+ bfd_arch_rl78, /* Architecture. */
+ bfd_mach_rl78, /* Machine. */
+ "rl78", /* Architecture name. */
+ "rl78", /* Printable name. */
+ 4, /* Section align power. */
+ TRUE, /* The default ? */
+ bfd_default_compatible, /* Architecture comparison fn. */
+ bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
+ NULL /* Next in list. */
+};
diff --git a/bfd/cpu-rs6000.c b/bfd/cpu-rs6000.c
index 91d0431..ba1df36 100644
--- a/bfd/cpu-rs6000.c
+++ b/bfd/cpu-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for rs6000 support
- Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003, 2005, 2007
+ Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003, 2005, 2007, 2012
Free Software Foundation, Inc.
Written by Mimi Phuong-Thao Vo of IBM
and John Gilmore of Cygnus Support.
@@ -28,13 +28,9 @@
/* The RS/6000 architecture is compatible with the PowerPC common
architecture. */
-static const bfd_arch_info_type *rs6000_compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
-
static const bfd_arch_info_type *
-rs6000_compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
+rs6000_compatible (const bfd_arch_info_type *a,
+ const bfd_arch_info_type *b)
{
BFD_ASSERT (a->arch == bfd_arch_rs6000);
switch (b->arch)
@@ -65,6 +61,7 @@
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[1]
},
{
@@ -79,6 +76,7 @@
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[2]
},
{
@@ -93,6 +91,7 @@
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0
}
};
@@ -110,5 +109,6 @@
TRUE, /* the default */
rs6000_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[0]
};
diff --git a/bfd/cpu-rx.c b/bfd/cpu-rx.c
index 92eebb0..31489ad 100644
--- a/bfd/cpu-rx.c
+++ b/bfd/cpu-rx.c
@@ -36,6 +36,7 @@
FALSE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
},
};
@@ -53,5 +54,6 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
& arch_info_struct[0], /* Next in list. */
};
diff --git a/bfd/cpu-s390.c b/bfd/cpu-s390.c
index 805e825..1cd3af1 100644
--- a/bfd/cpu-s390.c
+++ b/bfd/cpu-s390.c
@@ -33,9 +33,14 @@
"s390",
"s390:64-bit",
3, /* section alignment power */
+#if BFD_DEFAULT_TARGET_SIZE == 64
TRUE, /* the default */
+#else
+ FALSE, /* the default */
+#endif
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
NULL
};
@@ -49,8 +54,13 @@
"s390",
"s390:31-bit",
3, /* section alignment power */
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ FALSE, /* the default */
+#else
TRUE, /* the default */
+#endif
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&bfd_s390_64_arch
};
diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c
index 0ed4095..329c97c 100644
--- a/bfd/cpu-score.c
+++ b/bfd/cpu-score.c
@@ -1,5 +1,5 @@
/* BFD support for the score processor
- Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2006, 2007, 2008, 2009, 2012 Free Software Foundation, Inc.
Contributed by
Brain.lin ([email protected])
Mei Ligang ([email protected])
@@ -22,8 +22,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/* This routine is provided two arch_infos and works out which Score
@@ -56,6 +56,7 @@
default, /* The default machine. */ \
compatible, \
bfd_default_scan, \
+ bfd_arch_default_fill, \
next \
}
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index af97a47..6ca7840 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -61,6 +61,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2_NEXT
},
{
@@ -75,6 +76,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2E_NEXT
},
{
@@ -89,6 +91,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH_DSP_NEXT
},
{
@@ -103,6 +106,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH3_NEXT
},
{
@@ -117,6 +121,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH3_NOMMU_NEXT
},
{
@@ -131,6 +136,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH3_DSP_NEXT
},
{
@@ -145,6 +151,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH3E_NEXT
},
{
@@ -159,6 +166,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4_NEXT
},
{
@@ -173,6 +181,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4A_NEXT
},
{
@@ -187,6 +196,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4AL_DSP_NEXT
},
{
@@ -201,6 +211,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4_NOFPU_NEXT
},
{
@@ -215,6 +226,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4_NOMMU_NOFPU_NEXT
},
{
@@ -229,6 +241,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH4A_NOFPU_NEXT
},
{
@@ -243,6 +256,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_NEXT
},
{
@@ -257,6 +271,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_NOFPU_NEXT
},
{
@@ -271,6 +286,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_NOFPU_OR_SH4_NOMMU_NOFPU_NEXT
},
{
@@ -285,6 +301,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_NOFPU_OR_SH3_NOMMU_NEXT
},
{
@@ -299,6 +316,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_OR_SH4_NEXT
},
{
@@ -313,6 +331,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH2A_OR_SH3E_NEXT
},
{
@@ -327,6 +346,7 @@
FALSE, /* Not the default. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH64_NEXT
},
};
@@ -344,6 +364,7 @@
TRUE, /* The default machine. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
SH_NEXT
};
@@ -367,7 +388,7 @@
{ bfd_mach_sh2a_nofpu_or_sh3_nommu, arch_sh2a_nofpu_or_sh3_nommu, arch_sh2a_nofpu_or_sh3_nommu_up },
{ bfd_mach_sh2a_or_sh4, arch_sh2a_or_sh4, arch_sh2a_or_sh4_up },
{ bfd_mach_sh2a_or_sh3e, arch_sh2a_or_sh3e, arch_sh2a_or_sh3e_up },
-
+
{ bfd_mach_sh3, arch_sh3, arch_sh3_up },
{ bfd_mach_sh3_nommu, arch_sh3_nommu, arch_sh3_nommu_up },
{ bfd_mach_sh3_dsp, arch_sh3_dsp, arch_sh3_dsp_up },
@@ -520,6 +541,6 @@
bfd_default_set_arch_mach (obfd, bfd_arch_sh,
sh_get_bfd_mach_from_arch_set (merged_arch));
-
+
return TRUE;
}
diff --git a/bfd/cpu-sparc.c b/bfd/cpu-sparc.c
index f86ccc5..ccdd7d1 100644
--- a/bfd/cpu-sparc.c
+++ b/bfd/cpu-sparc.c
@@ -37,6 +37,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[1],
},
{
@@ -51,6 +52,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[2],
},
{
@@ -65,6 +67,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[3],
},
{
@@ -79,6 +82,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[4],
},
{
@@ -93,6 +97,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[5],
},
{
@@ -107,6 +112,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[6],
},
{
@@ -121,6 +127,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[7],
},
{
@@ -135,6 +142,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[8],
},
{
@@ -149,6 +157,7 @@
FALSE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
}
};
@@ -166,5 +175,6 @@
TRUE, /* the default */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
&arch_info_struct[0],
};
diff --git a/bfd/cpu-spu.c b/bfd/cpu-spu.c
index 64ba357..b3dfc62 100644
--- a/bfd/cpu-spu.c
+++ b/bfd/cpu-spu.c
@@ -49,6 +49,7 @@
TRUE, /* the default machine for the architecture */
spu_compatible, /* the spu is only compatible with itself, see above */
bfd_default_scan,
+ bfd_arch_default_fill,
0, /* next -- there are none! */
}
};
diff --git a/bfd/cpu-tic30.c b/bfd/cpu-tic30.c
index e08cf47..a9d291d 100644
--- a/bfd/cpu-tic30.c
+++ b/bfd/cpu-tic30.c
@@ -35,5 +35,6 @@
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-tic4x.c b/bfd/cpu-tic4x.c
index bd8b8f4..a90594c 100644
--- a/bfd/cpu-tic4x.c
+++ b/bfd/cpu-tic4x.c
@@ -1,5 +1,6 @@
/* bfd back-end for TMS320C[34]x support
- Copyright 1996, 1997, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2002, 2003, 2005, 2007, 2012
+ Free Software Foundation, Inc.
Contributed by Michael Hayes ([email protected])
@@ -24,14 +25,9 @@
#include "bfd.h"
#include "libbfd.h"
-static bfd_boolean tic4x_scan
- PARAMS ((const struct bfd_arch_info *, const char * ));
-
-
static bfd_boolean
-tic4x_scan (info, string)
- const struct bfd_arch_info *info;
- const char *string;
+tic4x_scan (const struct bfd_arch_info *info,
+ const char *string)
{
/* Allow strings of form [ti][Cc][34][0-9], let's not be too picky
about strange numbered machines in C3x or C4x series. */
@@ -64,6 +60,7 @@
FALSE, /* Not the default architecture. */
bfd_default_compatible,
tic4x_scan,
+ bfd_arch_default_fill,
0
};
@@ -80,6 +77,7 @@
TRUE, /* The default architecture. */
bfd_default_compatible,
tic4x_scan,
+ bfd_arch_default_fill,
&bfd_tic3x_arch,
};
diff --git a/bfd/cpu-tic54x.c b/bfd/cpu-tic54x.c
index b7e316c..95d990e 100644
--- a/bfd/cpu-tic54x.c
+++ b/bfd/cpu-tic54x.c
@@ -35,5 +35,6 @@
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-tic6x.c b/bfd/cpu-tic6x.c
index 163f4b3..d5a9cb9 100644
--- a/bfd/cpu-tic6x.c
+++ b/bfd/cpu-tic6x.c
@@ -36,5 +36,6 @@
TRUE, /* Default machine for this architecture. */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-tic80.c b/bfd/cpu-tic80.c
index f030ce1..c11233d 100644
--- a/bfd/cpu-tic80.c
+++ b/bfd/cpu-tic80.c
@@ -35,6 +35,7 @@
2, /* section alignment power */
TRUE, /* default machine for architecture */
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
+ bfd_arch_default_fill,
NULL, /* Pointer to next in chain */
};
diff --git a/bfd/cpu-tilegx.c b/bfd/cpu-tilegx.c
index aa2fe80..11234ec 100644
--- a/bfd/cpu-tilegx.c
+++ b/bfd/cpu-tilegx.c
@@ -1,5 +1,5 @@
/* BFD support for the TILE-Gx processor.
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright 2011, 2012 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,10 +18,27 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
+const bfd_arch_info_type bfd_tilegx32_arch =
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_tilegx,
+ bfd_mach_tilegx32,
+ "tilegx32",
+ "tilegx32",
+ 3,
+ FALSE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ 0,
+ };
+
const bfd_arch_info_type bfd_tilegx_arch =
{
64, /* 64 bits in a word */
@@ -35,5 +52,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
- 0,
+ bfd_arch_default_fill,
+ &bfd_tilegx32_arch,
};
diff --git a/bfd/cpu-tilepro.c b/bfd/cpu-tilepro.c
index cadd006..4066fc1 100644
--- a/bfd/cpu-tilepro.c
+++ b/bfd/cpu-tilepro.c
@@ -1,5 +1,5 @@
/* BFD support for the TILEPro processor.
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright 2011, 2012 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
const bfd_arch_info_type bfd_tilepro_arch =
@@ -35,5 +35,6 @@
TRUE,
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c
index 6ebc96c..c2f52f1 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -1,6 +1,5 @@
/* BFD support for the NEC V850 processor
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007,
- 2010 Free Software Foundation, Inc.
+ Copyright 1996-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,16 +24,18 @@
#include "safe-ctype.h"
#define N(number, print, default, next) \
-{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \
- bfd_default_compatible, bfd_default_scan, next }
+{ 32, 32, 8, bfd_arch_v850, number, "v850", print " (using old gcc ABI)", 2, default, \
+ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
#define NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
{
- N (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[1]),
- N (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[2]),
- N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[3]),
+ N (bfd_mach_v850e3v5, "v850e3v5", FALSE, & arch_info_struct[1]),
+ N (bfd_mach_v850e3v5, "v850e2v4", FALSE, & arch_info_struct[2]),
+ N (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[3]),
+ N (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[4]),
+ N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[5]),
N (bfd_mach_v850e, "v850e", FALSE, NULL)
};
diff --git a/bfd/cpu-v850_rh850.c b/bfd/cpu-v850_rh850.c
new file mode 100644
index 0000000..9402f23
--- /dev/null
+++ b/bfd/cpu-v850_rh850.c
@@ -0,0 +1,41 @@
+/* BFD support for the NEC V850 processor with the RH850 ABI.
+ Copyright 2012-2013 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 "safe-ctype.h"
+
+#define R(number, print, default, next) \
+{ 32, 32, 8, bfd_arch_v850_rh850, number, "v850", print, 2, default, \
+ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+ R (bfd_mach_v850e3v5, "v850e3v5", FALSE, & arch_info_struct[1]),
+ R (bfd_mach_v850e3v5, "v850e2v4", FALSE, & arch_info_struct[2]),
+ R (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[3]),
+ R (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[4]),
+ R (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[5]),
+ R (bfd_mach_v850e, "v850e", FALSE, NULL)
+};
+
+const bfd_arch_info_type bfd_v850_rh850_arch =
+ R (bfd_mach_v850, "v850-rh850", TRUE, & arch_info_struct[0]);
diff --git a/bfd/cpu-vax.c b/bfd/cpu-vax.c
index c9d9c8d..9e2b19d 100644
--- a/bfd/cpu-vax.c
+++ b/bfd/cpu-vax.c
@@ -37,5 +37,6 @@
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-w65.c b/bfd/cpu-w65.c
index e5e78d9..8b0618b 100644
--- a/bfd/cpu-w65.c
+++ b/bfd/cpu-w65.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the WDC 65816 architecture.
- Copyright 1995, 1999, 2000, 2001, 2002, 2005, 2007
+ Copyright 1995, 1999, 2000, 2001, 2002, 2005, 2007, 2012
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@@ -24,13 +24,9 @@
#include "bfd.h"
#include "libbfd.h"
-static bfd_boolean scan_mach
- PARAMS ((const struct bfd_arch_info *, const char *));
-
static bfd_boolean
-scan_mach (info, string)
- const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
- const char *string;
+scan_mach (const struct bfd_arch_info *info ATTRIBUTE_UNUSED,
+ const char *string)
{
if (strcmp(string,"w65") == 0)
return TRUE;
@@ -52,5 +48,6 @@
TRUE, /* the default machine */
bfd_default_compatible,
scan_mach,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-we32k.c b/bfd/cpu-we32k.c
index d93d76a..99a8ff0 100644
--- a/bfd/cpu-we32k.c
+++ b/bfd/cpu-we32k.c
@@ -36,5 +36,6 @@
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
+ bfd_arch_default_fill,
0,
};
diff --git a/bfd/cpu-xc16x.c b/bfd/cpu-xc16x.c
index 552952c..3c74232 100644
--- a/bfd/cpu-xc16x.c
+++ b/bfd/cpu-xc16x.c
@@ -1,6 +1,6 @@
/* BFD support for the Infineon XC16X Microcontroller.
Copyright 2006, 2007 Free Software Foundation, Inc.
- Contributed by KPIT Cummins Infosystems
+ Contributed by KPIT Cummins Infosystems
This file is part of BFD, the Binary File Descriptor library.
Contributed by Anil Paranjpe([email protected])
@@ -37,6 +37,7 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
};
@@ -53,6 +54,7 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
& xc16xs_info_struct /* Next in list. */
};
@@ -69,5 +71,6 @@
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
& xc16xl_info_struct /* Next in list. */
};
diff --git a/bfd/cpu-xgate.c b/bfd/cpu-xgate.c
new file mode 100644
index 0000000..11653fa
--- /dev/null
+++ b/bfd/cpu-xgate.c
@@ -0,0 +1,40 @@
+/* BFD support for the Freescale XGATE processor
+ Copyright 2010, 2011, 2012 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"
+
+const bfd_arch_info_type bfd_xgate_arch =
+{
+ 16, /* 16 bits in a word. */
+ 32, /* 32 bits used as 16 bit address and PPAGE value. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_xgate,
+ bfd_mach_xgate,
+ "xgate",
+ "xgate",
+ 4, /* Section alignment power. */
+ TRUE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ bfd_arch_default_fill,
+ 0,
+};
diff --git a/bfd/cpu-xstormy16.c b/bfd/cpu-xstormy16.c
index d1c7e56..94de989 100644
--- a/bfd/cpu-xstormy16.c
+++ b/bfd/cpu-xstormy16.c
@@ -35,5 +35,6 @@
TRUE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
bfd_default_scan, /* string to architecture convert fn */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* next in list */
};
diff --git a/bfd/cpu-xtensa.c b/bfd/cpu-xtensa.c
index ee3767a..5c1008e 100644
--- a/bfd/cpu-xtensa.c
+++ b/bfd/cpu-xtensa.c
@@ -35,5 +35,6 @@
TRUE, /* The default? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
+ bfd_arch_default_fill, /* Default fill. */
NULL /* Next in list. */
};
diff --git a/bfd/cpu-z80.c b/bfd/cpu-z80.c
index 5da39f1..a46f71d 100644
--- a/bfd/cpu-z80.c
+++ b/bfd/cpu-z80.c
@@ -42,7 +42,7 @@
#define N(name,print,default,next) \
{ 16, 16, 8, bfd_arch_z80, name, "z80", print, 0, default, \
- compatible, bfd_default_scan, next }
+ compatible, bfd_default_scan, bfd_arch_default_fill, next }
#define M(n) &arch_info_struct[n]
diff --git a/bfd/cpu-z8k.c b/bfd/cpu-z8k.c
index 6e910e9..fd34218 100644
--- a/bfd/cpu-z8k.c
+++ b/bfd/cpu-z8k.c
@@ -38,11 +38,12 @@
static const bfd_arch_info_type arch_info_struct[] =
{
{ 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, FALSE,
- compatible, bfd_default_scan, 0 }
+ compatible, bfd_default_scan, bfd_arch_default_fill, 0 }
};
const bfd_arch_info_type bfd_z8k_arch =
{
32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, TRUE,
- compatible, bfd_default_scan, &arch_info_struct[0]
+ compatible, bfd_default_scan, bfd_arch_default_fill,
+ &arch_info_struct[0]
};
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index 87e2a2e..c33eb3b 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -1,3 +1,32 @@
+2013-04-15 Alan Modra <[email protected]>
+
+ * Makefile.am ($(MKDOC)): Append $(EXEEXT_FOR_BUILD) to temp file.
+ * Makefile.in: Regenerate.
+
+2013-04-09 Mingjie Xing <[email protected]>
+
+ * bfd.texinfo (typedef bfd, Error reporting, Miscellaneous):
+ Add menu items.
+
+2013-01-07 Patrice Dumas <[email protected]>
+
+ * bfd.texinfo: Replace @ with @@ when it is part of the text.
+
+2012-12-17 Nick Clifton <[email protected]>
+
+ * Makefile.am: Add copyright notice.
+ * bfdsumm.texi: Likewise.
+ * makefile.vms: Likewise.
+ * Makefile.in: Regenerate.
+
+2012-11-08 Alan Modra <[email protected]>
+
+ * Makefile.in: Regenerate.
+
+2012-02-27 Alan Modra <[email protected]>
+
+ * chew.c (print_stack_level, main): Use %ld to print stack delta.
+
2010-10-28 Matthias Klose <[email protected]>
* bfd.texinfo: Add directory section for info document.
@@ -234,6 +263,12 @@
For older changes see ChangeLog-9103
+Copyright (C) 2004-2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
mode: change-log
left-margin: 8
diff --git a/bfd/doc/ChangeLog-9103 b/bfd/doc/ChangeLog-9103
index 3636ed8..0b5d836 100644
--- a/bfd/doc/ChangeLog-9103
+++ b/bfd/doc/ChangeLog-9103
@@ -589,6 +589,12 @@
and mandir now keyed off datadir by default.
+Copyright (C) 1991-2003 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
Local Variables:
version-control: never
End:
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 7476ee5..670d69a 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -1,4 +1,21 @@
## Process this file with automake to generate Makefile.in
+#
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
AUTOMAKE_OPTIONS = 1.9 cygnus
@@ -60,9 +77,9 @@
-I$(srcdir)/../../intl -I../../intl
$(MKDOC): $(srcdir)/chew.c
- $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
- $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
- $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
+ $(CC_FOR_BUILD) -o chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
+ $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
+ $(SHELL) $(srcdir)/../../move-if-change chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC)
protos: libbfd.h libcoff.h bfd.h
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 68e17f7..5156ba7 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -14,6 +14,24 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
+#
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -247,6 +265,7 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -757,9 +776,9 @@
$(MKDOC): $(srcdir)/chew.c
- $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
- $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
- $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
+ $(CC_FOR_BUILD) -o chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
+ $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
+ $(SHELL) $(srcdir)/../../move-if-change chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC)
protos: libbfd.h libcoff.h bfd.h
diff --git a/bfd/doc/archive.texi b/bfd/doc/archive.texi
index 3d0a97d..cfb391c 100644
--- a/bfd/doc/archive.texi
+++ b/bfd/doc/archive.texi
@@ -18,11 +18,17 @@
have to read the entire archive if you don't want
to! Read it until you find what you want.
+A BFD returned by @code{bfd_openr_next_archived_file} can be
+closed manually with @code{bfd_close}. If you do not close it,
+then a second iteration through the members of an archive may
+return the same BFD. If you close the archive BFD, then all
+the member BFDs will automatically be closed as well.
+
Archive contents of output BFDs are chained through the
-@code{next} pointer in a BFD. The first one is findable through
-the @code{archive_head} slot of the archive. Set it with
-@code{bfd_set_archive_head} (q.v.). A given BFD may be in only one
-open output archive at a time.
+@code{archive_next} pointer in a BFD. The first one is findable
+through the @code{archive_head} slot of the archive. Set it with
+@code{bfd_set_archive_head} (q.v.). A given BFD may be in only
+one open output archive at a time.
As expected, the BFD archive code is more general than the
archive code of any given environment. BFD archives may
diff --git a/bfd/doc/archures.texi b/bfd/doc/archures.texi
index 683d165..b91c27c 100644
--- a/bfd/doc/archures.texi
+++ b/bfd/doc/archures.texi
@@ -110,7 +110,7 @@
#define bfd_mach_sparc_64bit_p(mach) \
((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
bfd_arch_spu, /* PowerPC SPU */
-#define bfd_mach_spu 256
+#define bfd_mach_spu 256
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -126,6 +126,7 @@
#define bfd_mach_mips5000 5000
#define bfd_mach_mips5400 5400
#define bfd_mach_mips5500 5500
+#define bfd_mach_mips5900 5900
#define bfd_mach_mips6000 6000
#define bfd_mach_mips7000 7000
#define bfd_mach_mips8000 8000
@@ -141,6 +142,8 @@
#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_octeonp 6601
+#define bfd_mach_mips_octeon2 6502
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
@@ -162,6 +165,10 @@
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)
+#define bfd_mach_i386_nacl (1 << 7)
+#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
+#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
+#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
bfd_arch_we32k, /* AT&T WE32xxx */
bfd_arch_tahoe, /* CCI/Harris Tahoe */
bfd_arch_i860, /* Intel 860 */
@@ -204,7 +211,10 @@
#define bfd_mach_ppc_e500 500
#define bfd_mach_ppc_e500mc 5001
#define bfd_mach_ppc_e500mc64 5005
+#define bfd_mach_ppc_e5500 5006
+#define bfd_mach_ppc_e6500 5007
#define bfd_mach_ppc_titan 83
+#define bfd_mach_ppc_vle 84
bfd_arch_rs6000, /* IBM RS/6000 */
#define bfd_mach_rs6k 6000
#define bfd_mach_rs6k_rs1 6001
@@ -226,6 +236,8 @@
#define bfd_mach_m6812_default 0
#define bfd_mach_m6812 1
#define bfd_mach_m6812s 2
+ bfd_arch_m9s12x, /* Freescale S12X */
+ bfd_arch_m9s12xg, /* Freescale XGATE */
bfd_arch_z8k, /* Zilog Z8000 */
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
@@ -281,11 +293,13 @@
bfd_arch_tic6x, /* Texas Instruments TMS320C6X */
bfd_arch_tic80, /* TI TMS320c80 (MVP) */
bfd_arch_v850, /* NEC V850 */
+ bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI) */
#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
#define bfd_mach_v850e1 '1'
#define bfd_mach_v850e2 0x4532
#define bfd_mach_v850e2v3 0x45325633
+#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5') */
bfd_arch_arc, /* ARC Cores */
#define bfd_mach_arc_5 5
#define bfd_mach_arc_6 6
@@ -321,6 +335,8 @@
#define bfd_mach_mep 1
#define bfd_mach_mep_h1 0x6831
#define bfd_mach_mep_c5 0x6335
+ bfd_arch_metag,
+#define bfd_mach_metag 1
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 64
#define bfd_mach_ia64_elf32 32
@@ -330,6 +346,9 @@
bfd_arch_iq2000, /* Vitesse IQ2000. */
#define bfd_mach_iq2000 1
#define bfd_mach_iq10 2
+ bfd_arch_epiphany, /* Adapteva EPIPHANY */
+#define bfd_mach_epiphany16 1
+#define bfd_mach_epiphany32 2
bfd_arch_mt,
#define bfd_mach_ms1 1
#define bfd_mach_mrisc2 2
@@ -365,12 +384,14 @@
#define bfd_mach_cris_v0_v10 255
#define bfd_mach_cris_v32 32
#define bfd_mach_cris_v10_v32 1032
+ bfd_arch_rl78,
+#define bfd_mach_rl78 0x75
bfd_arch_rx, /* Renesas RX. */
#define bfd_mach_rx 0x75
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score */
+ bfd_arch_score, /* Sunplus score */
#define bfd_mach_score3 3
#define bfd_mach_score7 7
bfd_arch_openrisc, /* OpenRISC */
@@ -385,7 +406,12 @@
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
#define bfd_mach_msp16 16
+#define bfd_mach_msp20 20
#define bfd_mach_msp21 21
+#define bfd_mach_msp22 22
+#define bfd_mach_msp23 23
+#define bfd_mach_msp24 24
+#define bfd_mach_msp26 26
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
@@ -393,10 +419,16 @@
#define bfd_mach_msp42 42
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
+#define bfd_mach_msp430x 45
+#define bfd_mach_msp46 46
+#define bfd_mach_msp47 47
+#define bfd_mach_msp54 54
bfd_arch_xc16x, /* Infineon's XC16X Series. */
#define bfd_mach_xc16x 1
#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
+#define bfd_mach_xc16xs 3
+ bfd_arch_xgate, /* Freescale XGATE */
+#define bfd_mach_xgate 1
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_z80,
@@ -411,6 +443,12 @@
bfd_arch_tilegx, /* Tilera TILE-Gx */
#define bfd_mach_tilepro 1
#define bfd_mach_tilegx 1
+#define bfd_mach_tilegx32 2
+ bfd_arch_aarch64, /* AArch64 */
+#define bfd_mach_aarch64 0
+#define bfd_mach_aarch64_ilp32 32
+ bfd_arch_nios2,
+#define bfd_mach_nios2 0
bfd_arch_last
@};
@end example
@@ -442,6 +480,12 @@
bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
+ /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
+ IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
+ TRUE, the buffer contains code. */
+ void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
+ bfd_boolean code);
+
const struct bfd_arch_info *next;
@}
bfd_arch_info_type;
@@ -647,3 +691,16 @@
This routine is provided for those cases where a bfd * is not
available
+@findex bfd_arch_default_fill
+@subsubsection @code{bfd_arch_default_fill}
+@strong{Synopsis}
+@example
+void *bfd_arch_default_fill (bfd_size_type count,
+ bfd_boolean is_bigendian,
+ bfd_boolean code);
+@end example
+@strong{Description}@*
+Allocate via bfd_malloc and return a fill buffer of size COUNT.
+If IS_BIGENDIAN is TRUE, the order of bytes is big endian. If
+CODE is TRUE, the buffer contains code.
+
diff --git a/bfd/doc/bfd.texinfo b/bfd/doc/bfd.texinfo
index 45ffa73..ec709c1 100644
--- a/bfd/doc/bfd.texinfo
+++ b/bfd/doc/bfd.texinfo
@@ -1,8 +1,6 @@
\input texinfo.tex
@setfilename bfd.info
-@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000,
-@c 2001, 2002, 2003, 2006, 2007, 2008, 2009
-@c Free Software Foundation, Inc.
+@c Copyright 1988-2013 Free Software Foundation, Inc.
@c
@synindex fn cp
@@ -16,7 +14,7 @@
@copying
This file documents the BFD library.
-Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 1991 - 2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -64,7 +62,7 @@
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 2001, 2003, 2006, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 1991 - 2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@@ -196,10 +194,11 @@
@node BFD front end, BFD back ends, Overview, Top
@chapter BFD Front End
-@include bfdt.texi
-@include bfdio.texi
@menu
+* typedef bfd::
+* Error reporting::
+* Miscellaneous::
* Memory Usage::
* Initialization::
* Sections::
@@ -217,7 +216,10 @@
* Hash Tables::
@end menu
-@node Memory Usage, Initialization, BFD front end, BFD front end
+@include bfdt.texi
+@include bfdio.texi
+
+@node Memory Usage, Initialization, Miscellaneous, BFD front end
@section Memory Usage
BFD keeps all of its internal structures in obstacks. There is one obstack
per open BFD file, into which the current state is stored. When a BFD is
@@ -322,7 +324,7 @@
@printindex cp
@tex
-% I think something like @colophon should be in texinfo. In the
+% I think something like @@colophon should be in texinfo. In the
% meantime:
\long\def\colophon{\hbox to0pt{}\vfill
\centerline{The body of this manual is set in}
@@ -333,7 +335,7 @@
\centerline{{\sl\fontname\tensl\/}}
\centerline{are used for emphasis.}\vfill}
\page\colophon
-% Blame: [email protected], 28mar91.
+% Blame: doc@@cygnus.com, 28mar91.
@end tex
@bye
diff --git a/bfd/doc/bfdsumm.texi b/bfd/doc/bfdsumm.texi
index 77a5f09..0cd0252 100644
--- a/bfd/doc/bfdsumm.texi
+++ b/bfd/doc/bfdsumm.texi
@@ -1,4 +1,7 @@
@c This summary of BFD is shared by the BFD and LD docs.
+@c Copyright 2012
+@c Free Software Foundation, Inc.
+
When an object file is opened, BFD subroutines automatically determine
the format of the input object file. They then build a descriptor in
memory with pointers to routines that will be used to access elements of
diff --git a/bfd/doc/bfdt.texi b/bfd/doc/bfdt.texi
index 8b82750..a4ef522 100644
--- a/bfd/doc/bfdt.texi
+++ b/bfd/doc/bfdt.texi
@@ -1,3 +1,4 @@
+@node typedef bfd, Error reporting, BFD front end, BFD front end
@section @code{typedef bfd}
A BFD has type @code{bfd}; objects of this type are the
cornerstone of any application using BFD. Using BFD
@@ -286,6 +287,7 @@
@};
@end example
+@node Error reporting, Miscellaneous, typedef bfd, BFD front end
@section Error reporting
Most BFD functions return nonzero on success (check their
individual documentation for precise semantics). On an error,
@@ -317,6 +319,7 @@
bfd_error_no_armap,
bfd_error_no_more_archived_files,
bfd_error_malformed_archive,
+ bfd_error_missing_dso,
bfd_error_file_not_recognized,
bfd_error_file_ambiguously_recognized,
bfd_error_no_contents,
@@ -419,6 +422,44 @@
@strong{Description}@*
Return the BFD error handler function.
+@subsection BFD assert handler
+If BFD finds an internal inconsistency, the bfd assert
+handler is called with information on the BFD version, BFD
+source file and line. If this happens, most programs linked
+against BFD are expected to want to exit with an error, or mark
+the current BFD operation as failed, so it is recommended to
+override the default handler, which just calls
+_bfd_error_handler and continues.
+
+
+@example
+
+typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
+ const char *bfd_version,
+ const char *bfd_file,
+ int bfd_line);
+
+@end example
+@findex bfd_set_assert_handler
+@subsubsection @code{bfd_set_assert_handler}
+@strong{Synopsis}
+@example
+bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
+@end example
+@strong{Description}@*
+Set the BFD assert handler function. Returns the previous
+function.
+
+@findex bfd_get_assert_handler
+@subsubsection @code{bfd_get_assert_handler}
+@strong{Synopsis}
+@example
+bfd_assert_handler_type bfd_get_assert_handler (void);
+@end example
+@strong{Description}@*
+Return the BFD assert handler function.
+
+@node Miscellaneous, Memory Usage, Error reporting, BFD front end
@section Miscellaneous
@@ -681,6 +722,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))
@@ -713,8 +759,8 @@
#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_lookup_section_flags(link_info, flag_info, section) \
+ BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
@@ -781,60 +827,6 @@
only ELF supports this feature, with up to two alternate
machine codes.
-
-@example
-struct bfd_preserve
-@{
- void *marker;
- void *tdata;
- flagword flags;
- const struct bfd_arch_info *arch_info;
- struct bfd_section *sections;
- struct bfd_section *section_last;
- unsigned int section_count;
- struct bfd_hash_table section_htab;
-@};
-
-@end example
-@findex bfd_preserve_save
-@subsubsection @code{bfd_preserve_save}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-When testing an object for compatibility with a particular
-target back-end, the back-end object_p function needs to set
-up certain fields in the bfd on successfully recognizing the
-object. This typically happens in a piecemeal fashion, with
-failures possible at many points. On failure, the bfd is
-supposed to be restored to its initial state, which is
-virtually impossible. However, restoring a subset of the bfd
-state works in practice. This function stores the subset and
-reinitializes the bfd.
-
-@findex bfd_preserve_restore
-@subsubsection @code{bfd_preserve_restore}
-@strong{Synopsis}
-@example
-void bfd_preserve_restore (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-This function restores bfd state saved by bfd_preserve_save.
-If MARKER is non-NULL in struct bfd_preserve then that block
-and all subsequently bfd_alloc'd memory is freed.
-
-@findex bfd_preserve_finish
-@subsubsection @code{bfd_preserve_finish}
-@strong{Synopsis}
-@example
-void bfd_preserve_finish (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-This function should be called when the bfd state saved by
-bfd_preserve_save is no longer needed. ie. when the back-end
-object_p function returns with success.
-
@findex bfd_emul_get_maxpagesize
@subsubsection @code{bfd_emul_get_maxpagesize}
@strong{Synopsis}
diff --git a/bfd/doc/bfdver.texi b/bfd/doc/bfdver.texi
index 0529522..3dedf6f 100644
--- a/bfd/doc/bfdver.texi
+++ b/bfd/doc/bfdver.texi
@@ -1,4 +1,4 @@
-@set VERSION 2.22
+@set VERSION 2.24
@set VERSION_PACKAGE (GNU Binutils)
-@set UPDATED November 2011
+@set UPDATED December 2013
@set BUGURL @uref{http://www.sourceware.org/bugzilla/}
diff --git a/bfd/doc/cache.texi b/bfd/doc/cache.texi
index 5820a2a..05b627e 100644
--- a/bfd/doc/cache.texi
+++ b/bfd/doc/cache.texi
@@ -4,7 +4,7 @@
regard to the underlying operating system's file descriptor
limit (often as low as 20 open files). The module in
@code{cache.c} maintains a least recently used list of
-@code{BFD_CACHE_MAX_OPEN} files, and exports the name
+@code{bfd_cache_max_open} files, and exports the name
@code{bfd_cache_lookup}, which runs around and makes sure that
the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c
index 2276c8a..f949e1f 100644
--- a/bfd/doc/chew.c
+++ b/bfd/doc/chew.c
@@ -1,6 +1,6 @@
/* chew
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002, 2003, 2005, 2007, 2009
+ 2002, 2003, 2005, 2007, 2009, 2012
Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
@@ -476,8 +476,8 @@
static void
print_stack_level ()
{
- fprintf (stderr, "current string stack depth = %d, ", tos - stack);
- fprintf (stderr, "current integer stack depth = %d\n", isp - istack);
+ fprintf (stderr, "current string stack depth = %ld, ", tos - stack);
+ fprintf (stderr, "current integer stack depth = %ld\n", isp - istack);
pc++;
}
@@ -1563,7 +1563,7 @@
write_buffer (stack + 0, stdout);
if (tos != stack)
{
- fprintf (stderr, "finishing with current stack level %d\n",
+ fprintf (stderr, "finishing with current stack level %ld\n",
tos - stack);
return 1;
}
diff --git a/bfd/doc/coffcode.texi b/bfd/doc/coffcode.texi
index e487d84..0be85e7 100644
--- a/bfd/doc/coffcode.texi
+++ b/bfd/doc/coffcode.texi
@@ -85,11 +85,11 @@
The Microsoft PE variants of the Coff object file format add
an extension to support the use of long section names. This
-extension is defined in section 4 of the Microsoft PE/COFF
+extension is defined in section 4 of the Microsoft PE/COFF
specification (rev 8.1). If a section name is too long to fit
into the section header's @code{s_name} field, it is instead
placed into the string table, and the @code{s_name} field is
-filled with a slash ("/") followed by the ASCII decimal
+filled with a slash ("/") followed by the ASCII decimal
representation of the offset of the full name relative to the
string table base.
@@ -106,11 +106,11 @@
expecting the MS standard format may become confused; @file{PEview} is
one known example.
-The functionality is supported in BFD by code implemented under
+The functionality is supported in BFD by code implemented under
the control of the macro @code{COFF_LONG_SECTION_NAMES}. If not
defined, the format does not support long section names in any way.
-If defined, it is used to initialise a flag,
-@code{_bfd_coff_long_section_names}, and a hook function pointer,
+If defined, it is used to initialise a flag,
+@code{_bfd_coff_long_section_names}, and a hook function pointer,
@code{_bfd_coff_set_long_section_names}, in the Coff backend data
structure. The flag controls the generation of long section names
in output BFDs at runtime; if it is false, as it will be by default
@@ -119,6 +119,7 @@
points to a function that allows the value of the flag to be altered
at runtime, on formats that support long section names at all; on
other formats it points to a stub that returns an error indication.
+
With input BFDs, the flag is set according to whether any long section
names are detected while reading the section headers. For a completely
new BFD, the flag is set to the default for the target format. This
@@ -389,7 +390,7 @@
bfd_boolean _bfd_coff_long_section_names;
bfd_boolean (*_bfd_coff_set_long_section_names)
(bfd *, int);
-
+
unsigned int _bfd_coff_default_section_alignment_power;
bfd_boolean _bfd_coff_force_symnames_in_strings;
unsigned int _bfd_coff_debug_string_prefix_length;
diff --git a/bfd/doc/linker.texi b/bfd/doc/linker.texi
index eae1662..8cc22ba 100644
--- a/bfd/doc/linker.texi
+++ b/bfd/doc/linker.texi
@@ -405,8 +405,8 @@
@end example
-@findex bfd_find_version_for_sym
-@subsubsection @code{bfd_find_version_for_sym }
+@findex bfd_find_version_for_sym
+@subsubsection @code{bfd_find_version_for_sym}
@strong{Synopsis}
@example
struct bfd_elf_version_tree * bfd_find_version_for_sym
diff --git a/bfd/doc/makefile.vms b/bfd/doc/makefile.vms
index a0857c0..267af6b 100644
--- a/bfd/doc/makefile.vms
+++ b/bfd/doc/makefile.vms
@@ -1,3 +1,20 @@
+# Copyright 2012 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
CFLAGS = /noopt/include=([],[-],[-.-.include])
LDFLAGS = /nomap
LDLIBS = ,sys$$library:vaxcrtl.olb/lib
diff --git a/bfd/doc/opncls.texi b/bfd/doc/opncls.texi
index eddf66a..d56f4cb 100644
--- a/bfd/doc/opncls.texi
+++ b/bfd/doc/opncls.texi
@@ -21,7 +21,7 @@
Return a pointer to the created BFD. If @var{fd} is not -1,
then @code{fdopen} is used to open the file; otherwise, @code{fopen}
is used. @var{mode} is passed directly to @code{fopen} or
-@code{fdopen}.
+@code{fdopen}.
Calls @code{bfd_find_target}, so @var{target} is interpreted as by
that function.
@@ -32,6 +32,8 @@
are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or
@code{system_call} error.
+On error, @var{fd} is always closed.
+
@findex bfd_openr
@subsubsection @code{bfd_openr}
@strong{Synopsis}
@@ -73,6 +75,8 @@
Possible errors are @code{bfd_error_no_memory},
@code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
+On error, @var{fd} is closed.
+
@findex bfd_openstreamr
@subsubsection @code{bfd_openstreamr}
@strong{Synopsis}
@@ -284,16 +288,31 @@
@strong{Returns}@*
Return the updated CRC32 value.
-@findex get_debug_link_info
-@subsubsection @code{get_debug_link_info}
+@findex bfd_get_debug_link_info
+@subsubsection @code{bfd_get_debug_link_info}
@strong{Synopsis}
@example
-char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
+char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
@end example
@strong{Description}@*
fetch the filename and CRC32 value for any separate debuginfo
associated with @var{abfd}. Return NULL if no such info found,
-otherwise return filename and update @var{crc32_out}.
+otherwise return filename and update @var{crc32_out}. The
+returned filename is allocated with @code{malloc}; freeing it
+is the responsibility of the caller.
+
+@findex bfd_get_alt_debug_link_info
+@subsubsection @code{bfd_get_alt_debug_link_info}
+@strong{Synopsis}
+@example
+char *bfd_get_alt_debug_link_info (bfd *abfd, unsigned long *crc32_out);
+@end example
+@strong{Description}@*
+Fetch the filename and BuildID value for any alternate debuginfo
+associated with @var{abfd}. Return NULL if no such info found,
+otherwise return filename and update @var{buildid_out}. The
+returned filename is allocated with @code{malloc}; freeing it
+is the responsibility of the caller.
@findex separate_debug_file_exists
@subsubsection @code{separate_debug_file_exists}
@@ -306,6 +325,17 @@
Checks to see if @var{name} is a file and if its contents
match @var{crc32}.
+@findex separate_alt_debug_file_exists
+@subsubsection @code{separate_alt_debug_file_exists}
+@strong{Synopsis}
+@example
+bfd_boolean separate_alt_debug_file_exists
+ (char *name, unsigned long crc32);
+@end example
+@strong{Description}@*
+Checks to see if @var{name} is a file and if its BuildID
+matches @var{buildid}.
+
@findex find_separate_debug_file
@subsubsection @code{find_separate_debug_file}
@strong{Synopsis}
@@ -313,12 +343,14 @@
char *find_separate_debug_file (bfd *abfd);
@end example
@strong{Description}@*
-Searches @var{abfd} for a reference to separate debugging
-information, scans various locations in the filesystem, including
-the file tree rooted at @var{debug_file_directory}, and returns a
-filename of such debugging information if the file is found and has
-matching CRC32. Returns NULL if no reference to debugging file
-exists, or file cannot be found.
+Searches @var{abfd} for a section called @var{section_name} which
+is expected to contain a reference to a file containing separate
+debugging information. The function scans various locations in
+the filesystem, including the file tree rooted at
+@var{debug_file_directory}, and returns the first matching
+filename that it finds. If @var{check_crc} is TRUE then the
+contents of the file must also match the CRC value contained in
+@var{section_name}. Returns NULL if no valid file could be found.
@findex bfd_follow_gnu_debuglink
@subsubsection @code{bfd_follow_gnu_debuglink}
@@ -343,6 +375,29 @@
otherwise a pointer to a heap-allocated string containing the
filename. The caller is responsible for freeing this string.
+@findex bfd_follow_gnu_debugaltlink
+@subsubsection @code{bfd_follow_gnu_debugaltlink}
+@strong{Synopsis}
+@example
+char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
+@end example
+@strong{Description}@*
+Takes a BFD and searches it for a .gnu_debugaltlink section. If this
+section is found, it examines the section for the name of a file
+containing auxiliary debugging information. It then searches the
+filesystem for this file in a set of standard locations, including
+the directory tree rooted at @var{dir}, and if found returns the
+full filename.
+
+If @var{dir} is NULL, it will search a default path configured into
+libbfd at build time. [FIXME: This feature is not currently
+implemented].
+
+@strong{Returns}@*
+@code{NULL} on any errors or failure to locate the debug file,
+otherwise a pointer to a heap-allocated string containing the
+filename. The caller is responsible for freeing this string.
+
@findex bfd_create_gnu_debuglink_section
@subsubsection @code{bfd_create_gnu_debuglink_section}
@strong{Synopsis}
diff --git a/bfd/doc/reloc.texi b/bfd/doc/reloc.texi
index 566a8e0..331f631 100644
--- a/bfd/doc/reloc.texi
+++ b/bfd/doc/reloc.texi
@@ -550,6 +550,10 @@
@deffnx {} BFD_RELOC_8_PLTOFF
For ELF.
@end deffn
+@deffn {} BFD_RELOC_SIZE32
+@deffnx {} BFD_RELOC_SIZE64
+Size relocations.
+@end deffn
@deffn {} BFD_RELOC_68K_GLOB_DAT
@deffnx {} BFD_RELOC_68K_JMP_SLOT
@deffnx {} BFD_RELOC_68K_RELATIVE
@@ -662,6 +666,10 @@
@deffnx {} BFD_RELOC_SPARC_M44
@deffnx {} BFD_RELOC_SPARC_L44
@deffnx {} BFD_RELOC_SPARC_REGISTER
+@deffnx {} BFD_RELOC_SPARC_H34
+@deffnx {} BFD_RELOC_SPARC_SIZE32
+@deffnx {} BFD_RELOC_SPARC_SIZE64
+@deffnx {} BFD_RELOC_SPARC_WDISP10
SPARC64 relocations
@end deffn
@deffn {} BFD_RELOC_SPARC_REV32
@@ -858,6 +866,15 @@
@deffn {} BFD_RELOC_MIPS16_LO16
MIPS16 low 16 bits.
@end deffn
+@deffn {} BFD_RELOC_MIPS16_TLS_GD
+@deffnx {} BFD_RELOC_MIPS16_TLS_LDM
+@deffnx {} BFD_RELOC_MIPS16_TLS_DTPREL_HI16
+@deffnx {} BFD_RELOC_MIPS16_TLS_DTPREL_LO16
+@deffnx {} BFD_RELOC_MIPS16_TLS_GOTTPREL
+@deffnx {} BFD_RELOC_MIPS16_TLS_TPREL_HI16
+@deffnx {} BFD_RELOC_MIPS16_TLS_TPREL_LO16
+MIPS16 TLS relocations
+@end deffn
@deffn {} BFD_RELOC_MIPS_LITERAL
@deffnx {} BFD_RELOC_MICROMIPS_LITERAL
Relocation against a MIPS literal section.
@@ -928,6 +945,7 @@
@deffnx {} BFD_RELOC_MICROMIPS_TLS_TPREL_HI16
@deffnx {} BFD_RELOC_MIPS_TLS_TPREL_LO16
@deffnx {} BFD_RELOC_MICROMIPS_TLS_TPREL_LO16
+@deffnx {} BFD_RELOC_MIPS_EH
MIPS ELF relocations.
@end deffn
@deffn {} BFD_RELOC_MIPS_COPY
@@ -1015,6 +1033,25 @@
be honoured at the offset's location, regardless of linker
relaxation.
@end deffn
+@deffn {} BFD_RELOC_MN10300_TLS_GD
+@deffnx {} BFD_RELOC_MN10300_TLS_LD
+@deffnx {} BFD_RELOC_MN10300_TLS_LDO
+@deffnx {} BFD_RELOC_MN10300_TLS_GOTIE
+@deffnx {} BFD_RELOC_MN10300_TLS_IE
+@deffnx {} BFD_RELOC_MN10300_TLS_LE
+@deffnx {} BFD_RELOC_MN10300_TLS_DTPMOD
+@deffnx {} BFD_RELOC_MN10300_TLS_DTPOFF
+@deffnx {} BFD_RELOC_MN10300_TLS_TPOFF
+Various TLS-related relocations.
+@end deffn
+@deffn {} BFD_RELOC_MN10300_32_PCREL
+This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction.
+@end deffn
+@deffn {} BFD_RELOC_MN10300_16_PCREL
+This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction.
+@end deffn
@deffn {} BFD_RELOC_386_GOT32
@deffnx {} BFD_RELOC_386_PLT32
@deffnx {} BFD_RELOC_386_COPY
@@ -1068,6 +1105,8 @@
@deffnx {} BFD_RELOC_X86_64_TLSDESC_CALL
@deffnx {} BFD_RELOC_X86_64_TLSDESC
@deffnx {} BFD_RELOC_X86_64_IRELATIVE
+@deffnx {} BFD_RELOC_X86_64_PC32_BND
+@deffnx {} BFD_RELOC_X86_64_PLT32_BND
x86-64/elf relocations
@end deffn
@deffn {} BFD_RELOC_NS32K_IMM_8
@@ -1126,6 +1165,23 @@
@deffnx {} BFD_RELOC_PPC_EMB_RELST_HA
@deffnx {} BFD_RELOC_PPC_EMB_BIT_FLD
@deffnx {} BFD_RELOC_PPC_EMB_RELSDA
+@deffnx {} BFD_RELOC_PPC_VLE_REL8
+@deffnx {} BFD_RELOC_PPC_VLE_REL15
+@deffnx {} BFD_RELOC_PPC_VLE_REL24
+@deffnx {} BFD_RELOC_PPC_VLE_LO16A
+@deffnx {} BFD_RELOC_PPC_VLE_LO16D
+@deffnx {} BFD_RELOC_PPC_VLE_HI16A
+@deffnx {} BFD_RELOC_PPC_VLE_HI16D
+@deffnx {} BFD_RELOC_PPC_VLE_HA16A
+@deffnx {} BFD_RELOC_PPC_VLE_HA16D
+@deffnx {} BFD_RELOC_PPC_VLE_SDA21
+@deffnx {} BFD_RELOC_PPC_VLE_SDA21_LO
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_LO16A
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_LO16D
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HI16A
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HI16D
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HA16A
+@deffnx {} BFD_RELOC_PPC_VLE_SDAREL_HA16D
@deffnx {} BFD_RELOC_PPC64_HIGHER
@deffnx {} BFD_RELOC_PPC64_HIGHER_S
@deffnx {} BFD_RELOC_PPC64_HIGHEST
@@ -1149,6 +1205,8 @@
@deffnx {} BFD_RELOC_PPC64_TOC16_LO_DS
@deffnx {} BFD_RELOC_PPC64_PLTGOT16_DS
@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO_DS
+@deffnx {} BFD_RELOC_PPC64_ADDR16_HIGH
+@deffnx {} BFD_RELOC_PPC64_ADDR16_HIGHA
Power(rs6000) and PowerPC relocations.
@end deffn
@deffn {} BFD_RELOC_PPC_TLS
@@ -1193,6 +1251,10 @@
@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHERA
@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHEST
@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHESTA
+@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGH
+@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHA
+@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGH
+@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHA
PowerPC and PowerPC64 thread-local storage relocations.
@end deffn
@deffn {} BFD_RELOC_I370_D12
@@ -1849,14 +1911,6 @@
@deffn {} BFD_RELOC_V850_DATA
start data in text.
@end deffn
-@deffn {} BFD_RELOC_MN10300_32_PCREL
-This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_16_PCREL
-This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction.
-@end deffn
@deffn {} BFD_RELOC_TIC30_LDP
This is a 8bit DP reloc for the tms320c30, where the most
significant 8 bits of a 24 bit word are placed into the least
@@ -1978,6 +2032,46 @@
@deffnx {} BFD_RELOC_MEP_GNU_VTENTRY
Toshiba Media Processor Relocations.
@end deffn
+@deffn {} BFD_RELOC_METAG_HIADDR16
+@deffnx {} BFD_RELOC_METAG_LOADDR16
+@deffnx {} BFD_RELOC_METAG_RELBRANCH
+@deffnx {} BFD_RELOC_METAG_GETSETOFF
+@deffnx {} BFD_RELOC_METAG_HIOG
+@deffnx {} BFD_RELOC_METAG_LOOG
+@deffnx {} BFD_RELOC_METAG_REL8
+@deffnx {} BFD_RELOC_METAG_REL16
+@deffnx {} BFD_RELOC_METAG_HI16_GOTOFF
+@deffnx {} BFD_RELOC_METAG_LO16_GOTOFF
+@deffnx {} BFD_RELOC_METAG_GETSET_GOTOFF
+@deffnx {} BFD_RELOC_METAG_GETSET_GOT
+@deffnx {} BFD_RELOC_METAG_HI16_GOTPC
+@deffnx {} BFD_RELOC_METAG_LO16_GOTPC
+@deffnx {} BFD_RELOC_METAG_HI16_PLT
+@deffnx {} BFD_RELOC_METAG_LO16_PLT
+@deffnx {} BFD_RELOC_METAG_RELBRANCH_PLT
+@deffnx {} BFD_RELOC_METAG_GOTOFF
+@deffnx {} BFD_RELOC_METAG_PLT
+@deffnx {} BFD_RELOC_METAG_COPY
+@deffnx {} BFD_RELOC_METAG_JMP_SLOT
+@deffnx {} BFD_RELOC_METAG_RELATIVE
+@deffnx {} BFD_RELOC_METAG_GLOB_DAT
+@deffnx {} BFD_RELOC_METAG_TLS_GD
+@deffnx {} BFD_RELOC_METAG_TLS_LDM
+@deffnx {} BFD_RELOC_METAG_TLS_LDO_HI16
+@deffnx {} BFD_RELOC_METAG_TLS_LDO_LO16
+@deffnx {} BFD_RELOC_METAG_TLS_LDO
+@deffnx {} BFD_RELOC_METAG_TLS_IE
+@deffnx {} BFD_RELOC_METAG_TLS_IENONPIC
+@deffnx {} BFD_RELOC_METAG_TLS_IENONPIC_HI16
+@deffnx {} BFD_RELOC_METAG_TLS_IENONPIC_LO16
+@deffnx {} BFD_RELOC_METAG_TLS_TPOFF
+@deffnx {} BFD_RELOC_METAG_TLS_DTPMOD
+@deffnx {} BFD_RELOC_METAG_TLS_DTPOFF
+@deffnx {} BFD_RELOC_METAG_TLS_LE
+@deffnx {} BFD_RELOC_METAG_TLS_LE_HI16
+@deffnx {} BFD_RELOC_METAG_TLS_LE_LO16
+Imagination Technologies Meta relocations.
+@end deffn
@deffn {} BFD_RELOC_MMIX_GETA
@deffnx {} BFD_RELOC_MMIX_GETA_1
@deffnx {} BFD_RELOC_MMIX_GETA_2
@@ -2078,7 +2172,7 @@
command address) into 8 bit immediate value of LDI insn.
@end deffn
@deffn {} BFD_RELOC_AVR_LO8_LDI_GS
-This is a 16 bit reloc for the AVR that stores 8 bit value
+This is a 16 bit reloc for the AVR that stores 8 bit value
(command address) into 8 bit immediate value of LDI insn. If the address
is beyond the 128k boundary, the linker inserts a jump stub for this reloc
in the lower 128k.
@@ -2127,6 +2221,53 @@
This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
instructions
@end deffn
+@deffn {} BFD_RELOC_AVR_8_LO
+This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
+in .byte lo8(symbol)
+@end deffn
+@deffn {} BFD_RELOC_AVR_8_HI
+This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
+in .byte hi8(symbol)
+@end deffn
+@deffn {} BFD_RELOC_AVR_8_HLO
+This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
+in .byte hlo8(symbol)
+@end deffn
+@deffn {} BFD_RELOC_RL78_NEG8
+@deffnx {} BFD_RELOC_RL78_NEG16
+@deffnx {} BFD_RELOC_RL78_NEG24
+@deffnx {} BFD_RELOC_RL78_NEG32
+@deffnx {} BFD_RELOC_RL78_16_OP
+@deffnx {} BFD_RELOC_RL78_24_OP
+@deffnx {} BFD_RELOC_RL78_32_OP
+@deffnx {} BFD_RELOC_RL78_8U
+@deffnx {} BFD_RELOC_RL78_16U
+@deffnx {} BFD_RELOC_RL78_24U
+@deffnx {} BFD_RELOC_RL78_DIR3U_PCREL
+@deffnx {} BFD_RELOC_RL78_DIFF
+@deffnx {} BFD_RELOC_RL78_GPRELB
+@deffnx {} BFD_RELOC_RL78_GPRELW
+@deffnx {} BFD_RELOC_RL78_GPRELL
+@deffnx {} BFD_RELOC_RL78_SYM
+@deffnx {} BFD_RELOC_RL78_OP_SUBTRACT
+@deffnx {} BFD_RELOC_RL78_OP_NEG
+@deffnx {} BFD_RELOC_RL78_OP_AND
+@deffnx {} BFD_RELOC_RL78_OP_SHRA
+@deffnx {} BFD_RELOC_RL78_ABS8
+@deffnx {} BFD_RELOC_RL78_ABS16
+@deffnx {} BFD_RELOC_RL78_ABS16_REV
+@deffnx {} BFD_RELOC_RL78_ABS32
+@deffnx {} BFD_RELOC_RL78_ABS32_REV
+@deffnx {} BFD_RELOC_RL78_ABS16U
+@deffnx {} BFD_RELOC_RL78_ABS16UW
+@deffnx {} BFD_RELOC_RL78_ABS16UL
+@deffnx {} BFD_RELOC_RL78_RELAX
+@deffnx {} BFD_RELOC_RL78_HI16
+@deffnx {} BFD_RELOC_RL78_HI8
+@deffnx {} BFD_RELOC_RL78_LO16
+@deffnx {} BFD_RELOC_RL78_CODE
+Renesas RL78 Relocations.
+@end deffn
@deffn {} BFD_RELOC_RX_NEG8
@deffnx {} BFD_RELOC_RX_NEG16
@deffnx {} BFD_RELOC_RX_NEG24
@@ -2183,12 +2324,24 @@
@deffn {} BFD_RELOC_390_GOT16
16 bit GOT offset.
@end deffn
+@deffn {} BFD_RELOC_390_PC12DBL
+PC relative 12 bit shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT12DBL
+12 bit PC rel. PLT shifted by 1.
+@end deffn
@deffn {} BFD_RELOC_390_PC16DBL
PC relative 16 bit shifted by 1.
@end deffn
@deffn {} BFD_RELOC_390_PLT16DBL
16 bit PC rel. PLT shifted by 1.
@end deffn
+@deffn {} BFD_RELOC_390_PC24DBL
+PC relative 24 bit shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT24DBL
+24 bit PC rel. PLT shifted by 1.
+@end deffn
@deffn {} BFD_RELOC_390_PC32DBL
PC relative 32 bit shifted by 1.
@end deffn
@@ -2262,6 +2415,9 @@
@deffnx {} BFD_RELOC_390_TLS_GOTIE20
Long displacement extension.
@end deffn
+@deffn {} BFD_RELOC_390_IRELATIVE
+STT_GNU_IFUNC relocation.
+@end deffn
@deffn {} BFD_RELOC_SCORE_GPREL15
Score relocations
Low 16 bit for load/store
@@ -2476,6 +2632,83 @@
Motorola 68HC12 reloc.
This is the 5 bits of a value.
@end deffn
+@deffn {} BFD_RELOC_XGATE_RL_JUMP
+Freescale XGATE reloc.
+This reloc marks the beginning of a bra/jal instruction.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_RL_GROUP
+Freescale XGATE reloc.
+This reloc marks a group of several instructions that gcc generates
+and for which the linker relaxation pass can modify and/or remove
+some of them.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_LO16
+Freescale XGATE reloc.
+This is the 16-bit lower part of an address. It is used for the '16-bit'
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_GPAGE
+Freescale XGATE reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_24
+Freescale XGATE reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_PCREL_9
+Freescale XGATE reloc.
+This is a 9-bit pc-relative reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_PCREL_10
+Freescale XGATE reloc.
+This is a 10-bit pc-relative reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_IMM8_LO
+Freescale XGATE reloc.
+This is the 16-bit lower part of an address. It is used for the '16-bit'
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_IMM8_HI
+Freescale XGATE reloc.
+This is the 16-bit higher part of an address. It is used for the '16-bit'
+instructions.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_IMM3
+Freescale XGATE reloc.
+This is a 3-bit pc-relative reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_IMM4
+Freescale XGATE reloc.
+This is a 4-bit pc-relative reloc.
+@end deffn
+@deffn {} BFD_RELOC_XGATE_IMM5
+Freescale XGATE reloc.
+This is a 5-bit pc-relative reloc.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_9B
+Motorola 68HC12 reloc.
+This is the 9 bits of a value.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_16B
+Motorola 68HC12 reloc.
+This is the 16 bits of a value.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_9_PCREL
+Motorola 68HC12/XGATE reloc.
+This is a PCREL9 branch.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_10_PCREL
+Motorola 68HC12/XGATE reloc.
+This is a PCREL10 branch.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_LO8XG
+Motorola 68HC12/XGATE reloc.
+This is the 8 bit low part of an absolute address and immediately precedes
+a matching HI8XG part.
+@end deffn
+@deffn {} BFD_RELOC_M68HC12_HI8XG
+Motorola 68HC12/XGATE reloc.
+This is the 8 bit high part of an absolute address and immediately follows
+a matching LO8XG part.
+@end deffn
@deffn {} BFD_RELOC_16C_NUM08
@deffnx {} BFD_RELOC_16C_NUM08_C
@deffnx {} BFD_RELOC_16C_NUM16
@@ -2672,6 +2905,7 @@
@deffnx {} BFD_RELOC_H8_DIR24A8
@deffnx {} BFD_RELOC_H8_DIR24R8
@deffnx {} BFD_RELOC_H8_DIR32A16
+@deffnx {} BFD_RELOC_H8_DISP32A16
H8 elf Relocations.
@end deffn
@deffn {} BFD_RELOC_XSTORMY16_REL_12
@@ -2719,8 +2953,59 @@
@deffnx {} BFD_RELOC_MSP430_16_BYTE
@deffnx {} BFD_RELOC_MSP430_2X_PCREL
@deffnx {} BFD_RELOC_MSP430_RL_PCREL
+@deffnx {} BFD_RELOC_MSP430_ABS8
+@deffnx {} BFD_RELOC_MSP430X_PCR20_EXT_SRC
+@deffnx {} BFD_RELOC_MSP430X_PCR20_EXT_DST
+@deffnx {} BFD_RELOC_MSP430X_PCR20_EXT_ODST
+@deffnx {} BFD_RELOC_MSP430X_ABS20_EXT_SRC
+@deffnx {} BFD_RELOC_MSP430X_ABS20_EXT_DST
+@deffnx {} BFD_RELOC_MSP430X_ABS20_EXT_ODST
+@deffnx {} BFD_RELOC_MSP430X_ABS20_ADR_SRC
+@deffnx {} BFD_RELOC_MSP430X_ABS20_ADR_DST
+@deffnx {} BFD_RELOC_MSP430X_PCR16
+@deffnx {} BFD_RELOC_MSP430X_PCR20_CALL
+@deffnx {} BFD_RELOC_MSP430X_ABS16
+@deffnx {} BFD_RELOC_MSP430_ABS_HI16
+@deffnx {} BFD_RELOC_MSP430_PREL31
+@deffnx {} BFD_RELOC_MSP430_SYM_DIFF
msp430 specific relocation codes
@end deffn
+@deffn {} BFD_RELOC_NIOS2_S16
+@deffnx {} BFD_RELOC_NIOS2_U16
+@deffnx {} BFD_RELOC_NIOS2_CALL26
+@deffnx {} BFD_RELOC_NIOS2_IMM5
+@deffnx {} BFD_RELOC_NIOS2_CACHE_OPX
+@deffnx {} BFD_RELOC_NIOS2_IMM6
+@deffnx {} BFD_RELOC_NIOS2_IMM8
+@deffnx {} BFD_RELOC_NIOS2_HI16
+@deffnx {} BFD_RELOC_NIOS2_LO16
+@deffnx {} BFD_RELOC_NIOS2_HIADJ16
+@deffnx {} BFD_RELOC_NIOS2_GPREL
+@deffnx {} BFD_RELOC_NIOS2_UJMP
+@deffnx {} BFD_RELOC_NIOS2_CJMP
+@deffnx {} BFD_RELOC_NIOS2_CALLR
+@deffnx {} BFD_RELOC_NIOS2_ALIGN
+@deffnx {} BFD_RELOC_NIOS2_GOT16
+@deffnx {} BFD_RELOC_NIOS2_CALL16
+@deffnx {} BFD_RELOC_NIOS2_GOTOFF_LO
+@deffnx {} BFD_RELOC_NIOS2_GOTOFF_HA
+@deffnx {} BFD_RELOC_NIOS2_PCREL_LO
+@deffnx {} BFD_RELOC_NIOS2_PCREL_HA
+@deffnx {} BFD_RELOC_NIOS2_TLS_GD16
+@deffnx {} BFD_RELOC_NIOS2_TLS_LDM16
+@deffnx {} BFD_RELOC_NIOS2_TLS_LDO16
+@deffnx {} BFD_RELOC_NIOS2_TLS_IE16
+@deffnx {} BFD_RELOC_NIOS2_TLS_LE16
+@deffnx {} BFD_RELOC_NIOS2_TLS_DTPMOD
+@deffnx {} BFD_RELOC_NIOS2_TLS_DTPREL
+@deffnx {} BFD_RELOC_NIOS2_TLS_TPREL
+@deffnx {} BFD_RELOC_NIOS2_COPY
+@deffnx {} BFD_RELOC_NIOS2_GLOB_DAT
+@deffnx {} BFD_RELOC_NIOS2_JUMP_SLOT
+@deffnx {} BFD_RELOC_NIOS2_RELATIVE
+@deffnx {} BFD_RELOC_NIOS2_GOTOFF
+Relocations used by the Altera Nios II core.
+@end deffn
@deffn {} BFD_RELOC_IQ2000_OFFSET_16
@deffnx {} BFD_RELOC_IQ2000_OFFSET_21
@deffnx {} BFD_RELOC_IQ2000_UHI16
@@ -2841,6 +3126,9 @@
Difference between two section addreses. Must be followed by a
BFD_RELOC_MACH_O_PAIR.
@end deffn
+@deffn {} BFD_RELOC_MACH_O_LOCAL_SECTDIFF
+Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol.
+@end deffn
@deffn {} BFD_RELOC_MACH_O_PAIR
Pair of relocation. Contains the first symbol.
@end deffn
@@ -2872,58 +3160,377 @@
Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_LO
-This is a 32 bit reloc for the microblaze that stores the
+This is a 32 bit reloc for the microblaze that stores the
low 16 bits of a value
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_LO_PCREL
-This is a 32 bit pc-relative reloc for the microblaze that
+This is a 32 bit pc-relative reloc for the microblaze that
stores the low 16 bits of a value
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_ROSDA
-This is a 32 bit reloc for the microblaze that stores a
+This is a 32 bit reloc for the microblaze that stores a
value relative to the read-only small data area anchor
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_RWSDA
-This is a 32 bit reloc for the microblaze that stores a
+This is a 32 bit reloc for the microblaze that stores a
value relative to the read-write small data area anchor
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM
-This is a 32 bit reloc for the microblaze to handle
+This is a 32 bit reloc for the microblaze to handle
expressions of the form "Symbol Op Symbol"
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_64_NONE
-This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
+This is a 64 bit reloc that stores the 32 bit pc relative
+value in two words (with an imm instruction). No relocation is
done here - only used for relaxing
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_64_GOTPC
-This is a 64 bit reloc that stores the 32 bit pc relative
+This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
PC-relative GOT offset
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_64_GOT
-This is a 64 bit reloc that stores the 32 bit pc relative
+This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
GOT offset
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_64_PLT
-This is a 64 bit reloc that stores the 32 bit pc relative
+This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). The relocation is
PC-relative offset into PLT
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_64_GOTOFF
-This is a 64 bit reloc that stores the 32 bit GOT relative
+This is a 64 bit reloc that stores the 32 bit GOT relative
value in two words (with an imm instruction). The relocation is
relative offset from _GLOBAL_OFFSET_TABLE_
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_32_GOTOFF
-This is a 32 bit reloc that stores the 32 bit GOT relative
+This is a 32 bit reloc that stores the 32 bit GOT relative
value in a word. The relocation is relative offset from
@end deffn
@deffn {} BFD_RELOC_MICROBLAZE_COPY
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_MICROBLAZE_64_TLS
+Unused Reloc
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_64_TLSGD
+This is a 64 bit reloc that stores the 32 bit GOT relative value
+of the GOT TLS GD info entry in two words (with an imm instruction). The
+relocation is GOT offset.
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_64_TLSLD
+This is a 64 bit reloc that stores the 32 bit GOT relative value
+of the GOT TLS LD info entry in two words (with an imm instruction). The
+relocation is GOT offset.
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_32_TLSDTPMOD
+This is a 32 bit reloc that stores the Module ID to GOT(n).
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_32_TLSDTPREL
+This is a 32 bit reloc that stores TLS offset to GOT(n+1).
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_64_TLSDTPREL
+This is a 32 bit reloc for storing TLS offset to two words (uses imm
+instruction)
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL
+This is a 64 bit reloc that stores 32-bit thread pointer relative offset
+to two words (uses imm instruction).
+@end deffn
+@deffn {} BFD_RELOC_MICROBLAZE_64_TLSTPREL
+This is a 64 bit reloc that stores 32-bit thread pointer relative offset
+to two words (uses imm instruction).
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_RELOC_START
+AArch64 pseudo relocation code to mark the start of the AArch64
+relocation enumerators. N.B. the order of the enumerators is
+important as several tables in the AArch64 bfd backend are indexed
+by these enumerators; make sure they are all synced.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_NONE
+AArch64 null relocation code.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_64
+@deffnx {} BFD_RELOC_AARCH64_32
+@deffnx {} BFD_RELOC_AARCH64_16
+Basic absolute relocations of N bits. These are equivalent to
+BFD_RELOC_N and they were added to assist the indexing of the howto
+table.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_64_PCREL
+@deffnx {} BFD_RELOC_AARCH64_32_PCREL
+@deffnx {} BFD_RELOC_AARCH64_16_PCREL
+PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
+and they were added to assist the indexing of the howto table.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G0
+AArch64 MOV[NZK] instruction with most significant bits 0 to 15
+of an unsigned address/value.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G0_NC
+AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
+an address/value. No overflow checking.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G1
+AArch64 MOV[NZK] instruction with most significant bits 16 to 31
+of an unsigned address/value.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G1_NC
+AArch64 MOV[NZK] instruction with less significant bits 16 to 31
+of an address/value. No overflow checking.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G2
+AArch64 MOV[NZK] instruction with most significant bits 32 to 47
+of an unsigned address/value.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G2_NC
+AArch64 MOV[NZK] instruction with less significant bits 32 to 47
+of an address/value. No overflow checking.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G3
+AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
+of a signed or unsigned address/value.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G0_S
+AArch64 MOV[NZ] instruction with most significant bits 0 to 15
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G1_S
+AArch64 MOV[NZ] instruction with most significant bits 16 to 31
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_MOVW_G2_S
+AArch64 MOV[NZ] instruction with most significant bits 32 to 47
+of a signed value. Changes instruction to MOVZ or MOVN depending on the
+value's sign.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LD_LO19_PCREL
+AArch64 Load Literal instruction, holding a 19 bit pc-relative word
+offset. The lowest two bits must be zero and are not stored in the
+instruction, giving a 21 bit signed byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_ADR_LO21_PCREL
+AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_ADR_HI21_PCREL
+AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
+offset, giving a 4KB aligned page base address.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL
+AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
+offset, giving a 4KB aligned page base address, but with no overflow
+checking.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_ADD_LO12
+AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
+Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST8_LO12
+AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TSTBR14
+AArch64 14 bit pc-relative test bit and branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 16 bit signed byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_BRANCH19
+AArch64 19 bit pc-relative conditional branch and compare & branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 21 bit signed byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_JUMP26
+AArch64 26 bit pc-relative unconditional branch.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 28 bit signed byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_CALL26
+AArch64 26 bit pc-relative unconditional branch and link.
+The lowest two bits must be zero and are not stored in the instruction,
+giving a 28 bit signed byte offset.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST16_LO12
+AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST32_LO12
+AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST64_LO12
+AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST128_LO12
+AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_GOT_LD_PREL19
+AArch64 Load Literal instruction, holding a 19 bit PC relative word
+offset of the global offset table entry for a symbol. The lowest two
+bits must be zero and are not stored in the instruction, giving a 21
+bit signed byte offset. This relocation type requires signed overflow
+checking.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_ADR_GOT_PAGE
+Get to the page base of the global offset table entry for a symbol as
+part of an ADRP instruction using a 21 bit PC relative value.Used in
+conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LD64_GOT_LO12_NC
+Unsigned 12 bit byte offset for 64 bit load/store from the page of
+the GOT entry for this symbol. Used in conjunction with
+BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in LP64 ABI only.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LD32_GOT_LO12_NC
+Unsigned 12 bit byte offset for 32 bit load/store from the page of
+the GOT entry for this symbol. Used in conjunction with
+BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in ILP32 ABI only.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21
+Get to the page base of the global offset table entry for a symbols
+tls_index structure as part of an adrp instruction using a 21 bit PC
+relative value. Used in conjunction with
+BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC
+Unsigned 12 bit byte offset to global offset table entry for a symbols
+tls_index structure. Used in conjunction with
+BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19
+AArch64 TLS INITIAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC
+AArch64 TLS LOCAL EXEC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_LD_PREL19
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_OFF_G1
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_LDR
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_ADD
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_CALL
+AArch64 TLS DESC relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_COPY
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_GLOB_DAT
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_JUMP_SLOT
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_RELATIVE
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLS_DTPMOD
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLS_DTPREL
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLS_TPREL
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC
+AArch64 TLS relocation.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_IRELATIVE
+AArch64 support for STT_GNU_IFUNC.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_RELOC_END
+AArch64 pseudo relocation code to mark the end of the AArch64
+relocation enumerators that have direct mapping to ELF reloc codes.
+There are a few more enumerators after this one; those are mainly
+used by the AArch64 assembler for the internal fixup or to select
+one of the above enumerators.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP
+AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LDST_LO12
+AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
+address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_LD_GOT_LO12_NC
+AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC
+AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files.
+@end deffn
+@deffn {} BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC
+AArch64 pseudo relocation code to be used internally by the AArch64
+assembler and not (currently) written to any object files.
+@end deffn
@deffn {} BFD_RELOC_TILEPRO_COPY
@deffnx {} BFD_RELOC_TILEPRO_GLOB_DAT
@deffnx {} BFD_RELOC_TILEPRO_JMP_SLOT
@@ -2970,6 +3577,12 @@
@deffnx {} BFD_RELOC_TILEPRO_SHAMT_X1
@deffnx {} BFD_RELOC_TILEPRO_SHAMT_Y0
@deffnx {} BFD_RELOC_TILEPRO_SHAMT_Y1
+@deffnx {} BFD_RELOC_TILEPRO_TLS_GD_CALL
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEPRO_TLS_IE_LOAD
@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
@@ -2989,6 +3602,14 @@
@deffnx {} BFD_RELOC_TILEPRO_TLS_DTPMOD32
@deffnx {} BFD_RELOC_TILEPRO_TLS_DTPOFF32
@deffnx {} BFD_RELOC_TILEPRO_TLS_TPOFF32
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA
+@deffnx {} BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA
Tilera TILEPro Relocations.
@end deffn
@deffn {} BFD_RELOC_TILEGX_HW0
@@ -3048,54 +3669,81 @@
@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_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL
@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_HW3_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL
@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_TLS_LE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE
@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_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL
+@deffnx {} BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL
@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
+@deffnx {} BFD_RELOC_TILEGX_TLS_GD_CALL
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD
+@deffnx {} BFD_RELOC_TILEGX_TLS_IE_LOAD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD
+@deffnx {} BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD
Tilera TILE-Gx Relocations.
@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_SIMM8
+Adapteva EPIPHANY - 8 bit signed pc-relative displacement
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_SIMM24
+Adapteva EPIPHANY - 24 bit signed pc-relative displacement
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_HIGH
+Adapteva EPIPHANY - 16 most-significant bits of absolute address
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_LOW
+Adapteva EPIPHANY - 16 least-significant bits of absolute address
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_SIMM11
+Adapteva EPIPHANY - 11 bit signed number - add/sub immediate
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_IMM11
+Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement)
+@end deffn
+@deffn {} BFD_RELOC_EPIPHANY_IMM8
+Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction.
+@end deffn
@example
@@ -3164,12 +3812,13 @@
@subsubsection @code{bfd_generic_lookup_section_flags}
@strong{Synopsis}
@example
-void bfd_generic_lookup_section_flags
- (struct bfd_link_info *, struct flag_info *);
+bfd_boolean bfd_generic_lookup_section_flags
+ (struct bfd_link_info *, struct flag_info *, asection *);
@end example
@strong{Description}@*
Provides default handling for section flags lookup
-- i.e., does nothing.
+Returns FALSE if the section should be omitted, otherwise TRUE.
@findex bfd_generic_merge_sections
@subsubsection @code{bfd_generic_merge_sections}
diff --git a/bfd/doc/section.texi b/bfd/doc/section.texi
index 5013701..60b62cf 100644
--- a/bfd/doc/section.texi
+++ b/bfd/doc/section.texi
@@ -339,11 +339,11 @@
/* Type of sec_info information. */
unsigned int sec_info_type:3;
-#define ELF_INFO_TYPE_NONE 0
-#define ELF_INFO_TYPE_STABS 1
-#define ELF_INFO_TYPE_MERGE 2
-#define ELF_INFO_TYPE_EH_FRAME 3
-#define ELF_INFO_TYPE_JUST_SYMS 4
+#define SEC_INFO_TYPE_NONE 0
+#define SEC_INFO_TYPE_STABS 1
+#define SEC_INFO_TYPE_MERGE 2
+#define SEC_INFO_TYPE_EH_FRAME 3
+#define SEC_INFO_TYPE_JUST_SYMS 4
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
@@ -473,9 +473,6 @@
/* 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;
@@ -491,40 +488,37 @@
@} asection;
/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
+ be removed by relaxation -- replacing a long address with a
short address. */
struct relax_table @{
/* Address where bytes may be deleted. */
bfd_vma addr;
-
+
/* Number of bytes to be deleted. */
int size;
@};
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
- than referring directly to the const sections. The const sections
- may eventually vanish. */
+ these sections. */
+extern asection _bfd_std_section[4];
+
#define BFD_ABS_SECTION_NAME "*ABS*"
#define BFD_UND_SECTION_NAME "*UND*"
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
-/* The absolute section. */
-extern asection bfd_abs_section;
-#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-/* Pointer to the undefined section. */
-extern asection bfd_und_section;
-#define bfd_und_section_ptr ((asection *) &bfd_und_section)
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
/* Pointer to the common section. */
-extern asection bfd_com_section;
-#define bfd_com_section_ptr ((asection *) &bfd_com_section)
+#define bfd_com_section_ptr (&_bfd_std_section[0])
+/* Pointer to the undefined section. */
+#define bfd_und_section_ptr (&_bfd_std_section[1])
+/* Pointer to the absolute section. */
+#define bfd_abs_section_ptr (&_bfd_std_section[2])
/* Pointer to the indirect section. */
-extern asection bfd_ind_section;
-#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
+#define bfd_ind_section_ptr (&_bfd_std_section[3])
+
+#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
+#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
#define bfd_is_const_section(SEC) \
@@ -639,8 +633,8 @@
/* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
0, 0, 0, 0, 0, 0, 0, \
\
- /* output_offset, output_section, alignment_power, */ \
- 0, (struct bfd_section *) &SEC, 0, \
+ /* output_offset, output_section, alignment_power, */ \
+ 0, &SEC, 0, \
\
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
NULL, NULL, 0, 0, 0, \
@@ -654,9 +648,6 @@
/* 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, \
\
@@ -687,14 +678,29 @@
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
@end example
@strong{Description}@*
-Run through @var{abfd} and return the one of the
-@code{asection}s whose name matches @var{name}, otherwise @code{NULL}.
-@xref{Sections}, for more information.
+Return the most recently created section attached to @var{abfd}
+named @var{name}. Return NULL if no such section exists.
-This should only be used in special cases; the normal way to process
-all sections of a given name is to use @code{bfd_map_over_sections} and
-@code{strcmp} on the name (or better yet, base it on the section flags
-or something else) for each section.
+@findex bfd_get_next_section_by_name
+@subsubsection @code{bfd_get_next_section_by_name}
+@strong{Synopsis}
+@example
+asection *bfd_get_next_section_by_name (asection *sec);
+@end example
+@strong{Description}@*
+Given @var{sec} is a section returned by @code{bfd_get_section_by_name},
+return the next most recently created section attached to the same
+BFD with the same name. Return NULL if no such section exists.
+
+@findex bfd_get_linker_section
+@subsubsection @code{bfd_get_linker_section}
+@strong{Synopsis}
+@example
+asection *bfd_get_linker_section (bfd *abfd, const char *name);
+@end example
+@strong{Description}@*
+Return the linker created section attached to @var{abfd}
+named @var{name}. Return NULL if no such section exists.
@findex bfd_get_section_by_name_if
@subsubsection @code{bfd_get_section_by_name_if}
@@ -881,7 +887,7 @@
alternative would be to use a loop:
@example
- section *p;
+ asection *p;
for (p = abfd->sections; p != NULL; p = p->next)
func (abfd, p, ...)
@end example
diff --git a/bfd/doc/syms.texi b/bfd/doc/syms.texi
index d5dc659..6834d10 100644
--- a/bfd/doc/syms.texi
+++ b/bfd/doc/syms.texi
@@ -49,7 +49,7 @@
if (storage_needed == 0)
return;
-
+
symbol_table = xmalloc (storage_needed);
...
number_of_symbols =
@@ -78,6 +78,7 @@
example showing the creation of a symbol table with only one element:
@example
+ #include "sysdep.h"
#include "bfd.h"
int main (void)
@{
diff --git a/bfd/doc/targets.texi b/bfd/doc/targets.texi
index b25f2f8..890f31b 100644
--- a/bfd/doc/targets.texi
+++ b/bfd/doc/targets.texi
@@ -339,6 +339,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, \
@@ -362,6 +363,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 *);
@@ -467,8 +471,9 @@
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 *);
+ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
+ struct flag_info *,
+ asection *);
/* Attempt to merge SEC_MERGE sections. */
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 6dec4c1..c9349da 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1,6 +1,5 @@
/* DWARF 2 support.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright 1994-2013 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
([email protected]).
@@ -90,6 +89,9 @@
/* Last comp unit in list above. */
struct comp_unit *last_comp_unit;
+ /* Names of the debug sections. */
+ const struct dwarf_debug_section *debug_sections;
+
/* The next unread compilation unit within the .debug_info section.
Zero indicates that the .debug_info section has not been loaded
into a buffer yet. */
@@ -105,6 +107,16 @@
asection *sec;
bfd_byte *sec_info_ptr;
+ /* Support for alternate debug info sections created by the DWZ utility:
+ This includes a pointer to an alternate bfd which contains *extra*,
+ possibly duplicate debug sections, and pointers to the loaded
+ .debug_str and .debug_info sections from this bfd. */
+ bfd * alt_bfd_ptr;
+ bfd_byte * alt_dwarf_str_buffer;
+ bfd_size_type alt_dwarf_str_size;
+ bfd_byte * alt_dwarf_info_buffer;
+ bfd_size_type alt_dwarf_info_size;
+
/* A pointer to the memory block allocated for info_ptr. Neither
info_ptr nor sec_info_ptr are guaranteed to stay pointing to the
beginning of the malloc block. This is used only to free the
@@ -170,6 +182,9 @@
#define STASH_INFO_HASH_OFF 0
#define STASH_INFO_HASH_ON 1
#define STASH_INFO_HASH_DISABLED 2
+
+ /* True if we opened bfd_ptr. */
+ bfd_boolean close_on_cleanup;
};
struct arange
@@ -284,6 +299,7 @@
{ ".debug_aranges", ".zdebug_aranges" },
{ ".debug_frame", ".zdebug_frame" },
{ ".debug_info", ".zdebug_info" },
+ { ".debug_info", ".zdebug_info" },
{ ".debug_line", ".zdebug_line" },
{ ".debug_loc", ".zdebug_loc" },
{ ".debug_macinfo", ".zdebug_macinfo" },
@@ -294,6 +310,7 @@
{ ".debug_static_func", ".zdebug_static_func" },
{ ".debug_static_vars", ".zdebug_static_vars" },
{ ".debug_str", ".zdebug_str", },
+ { ".debug_str", ".zdebug_str", },
{ ".debug_types", ".zdebug_types" },
/* GNU DWARF 1 extensions */
{ ".debug_sfnames", ".zdebug_sfnames" },
@@ -306,12 +323,15 @@
{ NULL, NULL },
};
+/* NB/ Numbers in this enum must match up with indicies
+ into the dwarf_debug_sections[] array above. */
enum dwarf_debug_section_enum
{
debug_abbrev = 0,
debug_aranges,
debug_frame,
debug_info,
+ debug_info_alt,
debug_line,
debug_loc,
debug_macinfo,
@@ -322,6 +342,7 @@
debug_static_func,
debug_static_vars,
debug_str,
+ debug_str_alt,
debug_types,
debug_sfnames,
debug_srcinfo,
@@ -402,8 +423,8 @@
{
struct info_hash_table *hash_table;
- hash_table = (struct info_hash_table *)
- bfd_alloc (abfd, sizeof (struct info_hash_table));
+ hash_table = ((struct info_hash_table *)
+ bfd_alloc (abfd, sizeof (struct info_hash_table)));
if (!hash_table)
return hash_table;
@@ -469,27 +490,29 @@
static bfd_boolean
read_section (bfd * abfd,
- enum dwarf_debug_section_enum sec,
+ const struct dwarf_debug_section *sec,
asymbol ** syms,
bfd_uint64_t offset,
bfd_byte ** section_buffer,
bfd_size_type * section_size)
{
asection *msec;
- const char *section_name = dwarf_debug_sections[sec].uncompressed_name;
+ const char *section_name = sec->uncompressed_name;
- /* read_section is a noop if the section has already been read. */
- if (!*section_buffer)
+ /* The section may have already been read. */
+ if (*section_buffer == NULL)
{
msec = bfd_get_section_by_name (abfd, section_name);
if (! msec)
{
- section_name = dwarf_debug_sections[sec].compressed_name;
- msec = bfd_get_section_by_name (abfd, section_name);
+ section_name = sec->compressed_name;
+ if (section_name != NULL)
+ msec = bfd_get_section_by_name (abfd, section_name);
}
if (! msec)
{
- (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."), section_name);
+ (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."),
+ sec->uncompressed_name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -498,7 +521,7 @@
if (syms)
{
*section_buffer
- = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms);
+ = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms);
if (! *section_buffer)
return FALSE;
}
@@ -517,7 +540,8 @@
that the client wants. Validate it here to avoid trouble later. */
if (offset != 0 && offset >= *section_size)
{
- (*_bfd_error_handler) (_("Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)."),
+ (*_bfd_error_handler) (_("Dwarf Error: Offset (%lu)"
+ " greater than or equal to %s size (%lu)."),
(long) offset, section_name, *section_size);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -606,7 +630,8 @@
*bytes_read_ptr = unit->offset_size;
- if (! read_section (unit->abfd, debug_str, stash->syms, offset,
+ if (! read_section (unit->abfd, &stash->debug_sections[debug_str],
+ stash->syms, offset,
&stash->dwarf_str_buffer, &stash->dwarf_str_size))
return NULL;
@@ -616,6 +641,104 @@
return str;
}
+/* Like read_indirect_string but uses a .debug_str located in
+ an alternate filepointed to by the .gnu_debuglink section.
+ Used to impement DW_FORM_GNU_strp_alt. */
+
+static char *
+read_alt_indirect_string (struct comp_unit * unit,
+ bfd_byte * buf,
+ unsigned int * bytes_read_ptr)
+{
+ bfd_uint64_t offset;
+ struct dwarf2_debug *stash = unit->stash;
+ char *str;
+
+ if (unit->offset_size == 4)
+ offset = read_4_bytes (unit->abfd, buf);
+ else
+ offset = read_8_bytes (unit->abfd, buf);
+
+ *bytes_read_ptr = unit->offset_size;
+
+ if (stash->alt_bfd_ptr == NULL)
+ {
+ bfd * debug_bfd;
+ char * debug_filename = bfd_follow_gnu_debugaltlink (unit->abfd, DEBUGDIR);
+
+ if (debug_filename == NULL)
+ return NULL;
+
+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
+ || ! bfd_check_format (debug_bfd, bfd_object))
+ {
+ if (debug_bfd)
+ bfd_close (debug_bfd);
+
+ /* FIXME: Should we report our failure to follow the debuglink ? */
+ free (debug_filename);
+ return NULL;
+ }
+ stash->alt_bfd_ptr = debug_bfd;
+ }
+
+ if (! read_section (unit->stash->alt_bfd_ptr,
+ stash->debug_sections + debug_str_alt,
+ NULL, /* FIXME: Do we need to load alternate symbols ? */
+ offset,
+ &stash->alt_dwarf_str_buffer,
+ &stash->alt_dwarf_str_size))
+ return NULL;
+
+ str = (char *) stash->alt_dwarf_str_buffer + offset;
+ if (*str == '\0')
+ return NULL;
+
+ return str;
+}
+
+/* Resolve an alternate reference from UNIT at OFFSET.
+ Returns a pointer into the loaded alternate CU upon success
+ or NULL upon failure. */
+
+static bfd_byte *
+read_alt_indirect_ref (struct comp_unit * unit,
+ bfd_uint64_t offset)
+{
+ struct dwarf2_debug *stash = unit->stash;
+
+ if (stash->alt_bfd_ptr == NULL)
+ {
+ bfd * debug_bfd;
+ char * debug_filename = bfd_follow_gnu_debugaltlink (unit->abfd, DEBUGDIR);
+
+ if (debug_filename == NULL)
+ return FALSE;
+
+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
+ || ! bfd_check_format (debug_bfd, bfd_object))
+ {
+ if (debug_bfd)
+ bfd_close (debug_bfd);
+
+ /* FIXME: Should we report our failure to follow the debuglink ? */
+ free (debug_filename);
+ return NULL;
+ }
+ stash->alt_bfd_ptr = debug_bfd;
+ }
+
+ if (! read_section (unit->stash->alt_bfd_ptr,
+ stash->debug_sections + debug_info_alt,
+ NULL, /* FIXME: Do we need to load alternate symbols ? */
+ offset,
+ &stash->alt_dwarf_info_buffer,
+ &stash->alt_dwarf_info_size))
+ return NULL;
+
+ return stash->alt_dwarf_info_buffer + offset;
+}
+
static bfd_uint64_t
read_address (struct comp_unit *unit, bfd_byte *buf)
{
@@ -688,7 +811,8 @@
unsigned int abbrev_form, hash_number;
bfd_size_type amt;
- if (! read_section (abfd, debug_abbrev, stash->syms, offset,
+ if (! read_section (abfd, &stash->debug_sections[debug_abbrev],
+ stash->syms, offset,
&stash->dwarf_abbrev_buffer, &stash->dwarf_abbrev_size))
return NULL;
@@ -818,6 +942,7 @@
attr->u.val = read_address (unit, info_ptr);
info_ptr += unit->addr_size;
break;
+ case DW_FORM_GNU_ref_alt:
case DW_FORM_sec_offset:
if (unit->offset_size == 4)
attr->u.val = read_4_bytes (unit->abfd, info_ptr);
@@ -867,6 +992,10 @@
attr->u.str = read_indirect_string (unit, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
+ case DW_FORM_GNU_strp_alt:
+ attr->u.str = read_alt_indirect_string (unit, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
case DW_FORM_exprloc:
case DW_FORM_block:
amt = sizeof (struct dwarf_block);
@@ -939,7 +1068,7 @@
info_ptr = read_attribute_value (attr, form, unit, info_ptr);
break;
default:
- (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %u."),
+ (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %#x."),
form);
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1008,20 +1137,27 @@
/* Remember some information about each function. If the function is
inlined (DW_TAG_inlined_subroutine) it may have two additional
attributes, DW_AT_call_file and DW_AT_call_line, which specify the
- source code location where this function was inlined. */
+ source code location where this function was inlined. */
struct funcinfo
{
- struct funcinfo *prev_func; /* Pointer to previous function in list of all functions */
- struct funcinfo *caller_func; /* Pointer to function one scope higher */
- char *caller_file; /* Source location file name where caller_func inlines this func */
- int caller_line; /* Source location line number where caller_func inlines this func */
- char *file; /* Source location file name */
- int line; /* Source location line number */
+ /* Pointer to previous function in list of all functions. */
+ struct funcinfo *prev_func;
+ /* Pointer to function one scope higher. */
+ struct funcinfo *caller_func;
+ /* Source location file name where caller_func inlines this func. */
+ char *caller_file;
+ /* Source location line number where caller_func inlines this func. */
+ int caller_line;
+ /* Source location file name. */
+ char *file;
+ /* Source location line number. */
+ int line;
int tag;
char *name;
struct arange arange;
- asection *sec; /* Where the symbol is defined */
+ /* Where the symbol is defined. */
+ asection *sec;
};
struct varinfo
@@ -1244,12 +1380,16 @@
}
static bfd_boolean
-arange_add (bfd *abfd, struct arange *first_arange,
+arange_add (const struct comp_unit *unit, struct arange *first_arange,
bfd_vma low_pc, bfd_vma high_pc)
{
struct arange *arange;
- /* If the first arange is empty, use it. */
+ /* Ignore empty ranges. */
+ if (low_pc == high_pc)
+ return TRUE;
+
+ /* If the first arange is empty, use it. */
if (first_arange->high == 0)
{
first_arange->low = low_pc;
@@ -1277,7 +1417,7 @@
/* Need to allocate a new arange and insert it into the arange list.
Order isn't significant, so just insert after the first arange. */
- arange = (struct arange *) bfd_zalloc (abfd, sizeof (*arange));
+ arange = (struct arange *) bfd_alloc (unit->abfd, sizeof (*arange));
if (arange == NULL)
return FALSE;
arange->low = low_pc;
@@ -1397,9 +1537,11 @@
unsigned int i, bytes_read, offset_size;
char *cur_file, *cur_dir;
unsigned char op_code, extended_op, adj_opcode;
+ unsigned int exop_len;
bfd_size_type amt;
- if (! read_section (abfd, debug_line, stash->syms, unit->line_offset,
+ if (! read_section (abfd, &stash->debug_sections[debug_line],
+ stash->syms, unit->line_offset,
&stash->dwarf_line_buffer, &stash->dwarf_line_size))
return NULL;
@@ -1577,15 +1719,15 @@
/* Special operand. */
adj_opcode = op_code - lh.opcode_base;
if (lh.maximum_ops_per_insn == 1)
- address += (adj_opcode / lh.line_range)
- * lh.minimum_instruction_length;
+ address += (adj_opcode / lh.line_range
+ * lh.minimum_instruction_length);
else
{
- address += ((op_index + (adj_opcode / lh.line_range))
- / lh.maximum_ops_per_insn)
- * lh.minimum_instruction_length;
- op_index = (op_index + (adj_opcode / lh.line_range))
- % lh.maximum_ops_per_insn;
+ address += ((op_index + adj_opcode / lh.line_range)
+ / lh.maximum_ops_per_insn
+ * lh.minimum_instruction_length);
+ op_index = ((op_index + adj_opcode / lh.line_range)
+ % lh.maximum_ops_per_insn);
}
line += lh.line_base + (adj_opcode % lh.line_range);
/* Append row to matrix using current values. */
@@ -1601,8 +1743,8 @@
else switch (op_code)
{
case DW_LNS_extended_op:
- /* Ignore length. */
- line_ptr += 1;
+ exop_len = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
extended_op = read_1_byte (abfd, line_ptr);
line_ptr += 1;
@@ -1618,7 +1760,7 @@
low_pc = address;
if (address > high_pc)
high_pc = address;
- if (!arange_add (unit->abfd, &unit->arange, low_pc, high_pc))
+ if (!arange_add (unit, &unit->arange, low_pc, high_pc))
goto line_fail;
break;
case DW_LNE_set_address:
@@ -1657,8 +1799,12 @@
read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
line_ptr += bytes_read;
break;
+ case DW_LNE_HP_source_file_correlation:
+ line_ptr += exop_len - 1;
+ break;
default:
- (*_bfd_error_handler) (_("Dwarf Error: mangled line number section."));
+ (*_bfd_error_handler)
+ (_("Dwarf Error: mangled line number section."));
bfd_set_error (bfd_error_bad_value);
line_fail:
if (filename != NULL)
@@ -1678,15 +1824,15 @@
break;
case DW_LNS_advance_pc:
if (lh.maximum_ops_per_insn == 1)
- address += lh.minimum_instruction_length
- * read_unsigned_leb128 (abfd, line_ptr,
- &bytes_read);
+ address += (lh.minimum_instruction_length
+ * read_unsigned_leb128 (abfd, line_ptr,
+ &bytes_read));
else
{
bfd_vma adjust = read_unsigned_leb128 (abfd, line_ptr,
&bytes_read);
- address = ((op_index + adjust) / lh.maximum_ops_per_insn)
- * lh.minimum_instruction_length;
+ address = ((op_index + adjust) / lh.maximum_ops_per_insn
+ * lh.minimum_instruction_length);
op_index = (op_index + adjust) % lh.maximum_ops_per_insn;
}
line_ptr += bytes_read;
@@ -1719,13 +1865,14 @@
break;
case DW_LNS_const_add_pc:
if (lh.maximum_ops_per_insn == 1)
- address += lh.minimum_instruction_length
- * ((255 - lh.opcode_base) / lh.line_range);
+ address += (lh.minimum_instruction_length
+ * ((255 - lh.opcode_base) / lh.line_range));
else
{
bfd_vma adjust = ((255 - lh.opcode_base) / lh.line_range);
- address += lh.minimum_instruction_length
- * ((op_index + adjust) / lh.maximum_ops_per_insn);
+ address += (lh.minimum_instruction_length
+ * ((op_index + adjust)
+ / lh.maximum_ops_per_insn));
op_index = (op_index + adjust) % lh.maximum_ops_per_insn;
}
break;
@@ -1822,7 +1969,8 @@
read_debug_ranges (struct comp_unit *unit)
{
struct dwarf2_debug *stash = unit->stash;
- return read_section (unit->abfd, debug_ranges, stash->syms, 0,
+ return read_section (unit->abfd, &stash->debug_sections[debug_ranges],
+ stash->syms, 0,
&stash->dwarf_ranges_buffer, &stash->dwarf_ranges_size);
}
@@ -1853,8 +2001,9 @@
{
if (addr >= arange->low && addr < arange->high)
{
- if (!best_fit ||
- ((arange->high - arange->low) < (best_fit->arange.high - best_fit->arange.low)))
+ if (!best_fit
+ || (arange->high - arange->low
+ < best_fit->arange.high - best_fit->arange.low))
best_fit = each_func;
}
}
@@ -1902,8 +2051,8 @@
&& each_func->name
&& strcmp (name, each_func->name) == 0
&& (!best_fit
- || ((arange->high - arange->low)
- < (best_fit->arange.high - best_fit->arange.low))))
+ || (arange->high - arange->low
+ < best_fit->arange.high - best_fit->arange.low)))
best_fit = each_func;
}
}
@@ -1965,7 +2114,7 @@
struct abbrev_info *abbrev;
bfd_uint64_t die_ref = attr_ptr->u.val;
struct attribute attr;
- char *name = 0;
+ char *name = NULL;
/* DW_FORM_ref_addr can reference an entry in a different CU. It
is an offset from the .debug_info section, not the current CU. */
@@ -1978,8 +2127,20 @@
info_ptr = unit->sec_info_ptr + die_ref;
}
- else
+ else if (attr_ptr->form == DW_FORM_GNU_ref_alt)
+ {
+ info_ptr = read_alt_indirect_ref (unit, die_ref);
+ if (info_ptr == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("Dwarf Error: Unable to read alt ref %u."), die_ref);
+ bfd_set_error (bfd_error_bad_value);
+ return name;
+ }
+ }
+ else
info_ptr = unit->info_ptr_unit + die_ref;
+
abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
@@ -1988,8 +2149,8 @@
abbrev = lookup_abbrev (abbrev_number, unit->abbrevs);
if (! abbrev)
{
- (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."),
- abbrev_number);
+ (*_bfd_error_handler)
+ (_("Dwarf Error: Could not find abbrev number %u."), abbrev_number);
bfd_set_error (bfd_error_bad_value);
}
else
@@ -2054,7 +2215,7 @@
base_address = high_pc;
else
{
- if (!arange_add (unit->abfd, arange,
+ if (!arange_add (unit, arange,
base_address + low_pc, base_address + high_pc))
return FALSE;
}
@@ -2080,7 +2241,7 @@
can use to set the caller_func field. */
nested_funcs_size = 32;
nested_funcs = (struct funcinfo **)
- bfd_malloc (nested_funcs_size * sizeof (struct funcinfo *));
+ bfd_malloc (nested_funcs_size * sizeof (struct funcinfo *));
if (nested_funcs == NULL)
return FALSE;
nested_funcs[nesting_level] = 0;
@@ -2284,7 +2445,7 @@
if (func && high_pc != 0)
{
- if (!arange_add (unit->abfd, &func->arange, low_pc, high_pc))
+ if (!arange_add (unit, &func->arange, low_pc, high_pc))
goto fail;
}
@@ -2298,8 +2459,8 @@
nested_funcs_size *= 2;
tmp = (struct funcinfo **)
- bfd_realloc (nested_funcs,
- (nested_funcs_size * sizeof (struct funcinfo *)));
+ bfd_realloc (nested_funcs,
+ nested_funcs_size * sizeof (struct funcinfo *));
if (tmp == NULL)
goto fail;
nested_funcs = tmp;
@@ -2360,23 +2521,29 @@
if (version != 2 && version != 3 && version != 4)
{
- (*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%u', this reader only handles version 2, 3 and 4 information."), version);
+ (*_bfd_error_handler)
+ (_("Dwarf Error: found dwarf version '%u', this reader"
+ " only handles version 2, 3 and 4 information."), version);
bfd_set_error (bfd_error_bad_value);
return 0;
}
if (addr_size > sizeof (bfd_vma))
{
- (*_bfd_error_handler) (_("Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."),
- addr_size,
- (unsigned int) sizeof (bfd_vma));
+ (*_bfd_error_handler)
+ (_("Dwarf Error: found address size '%u', this reader"
+ " can not handle sizes greater than '%u'."),
+ addr_size,
+ (unsigned int) sizeof (bfd_vma));
bfd_set_error (bfd_error_bad_value);
return 0;
}
if (addr_size != 2 && addr_size != 4 && addr_size != 8)
{
- (*_bfd_error_handler) ("Dwarf Error: found address size '%u', this reader can only handle address sizes '2', '4' and '8'.", addr_size);
+ (*_bfd_error_handler)
+ ("Dwarf Error: found address size '%u', this reader"
+ " can only handle address sizes '2', '4' and '8'.", addr_size);
bfd_set_error (bfd_error_bad_value);
return 0;
}
@@ -2384,14 +2551,14 @@
/* Read the abbrevs for this compilation unit into a table. */
abbrevs = read_abbrevs (abfd, abbrev_offset, stash);
if (! abbrevs)
- return 0;
+ return 0;
abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
if (! abbrev_number)
{
(*_bfd_error_handler) (_("Dwarf Error: Bad abbrev number: %u."),
- abbrev_number);
+ abbrev_number);
bfd_set_error (bfd_error_bad_value);
return 0;
}
@@ -2400,7 +2567,7 @@
if (! abbrev)
{
(*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."),
- abbrev_number);
+ abbrev_number);
bfd_set_error (bfd_error_bad_value);
return 0;
}
@@ -2443,7 +2610,8 @@
/* If the compilation unit DIE has a DW_AT_low_pc attribute,
this is the base address to use when reading location
lists or range lists. */
- unit->base_address = low_pc;
+ if (abbrev->tag == DW_TAG_compile_unit)
+ unit->base_address = low_pc;
break;
case DW_AT_high_pc:
@@ -2480,7 +2648,7 @@
high_pc += low_pc;
if (high_pc != 0)
{
- if (!arange_add (unit->abfd, &unit->arange, low_pc, high_pc))
+ if (!arange_add (unit, &unit->arange, low_pc, high_pc))
return NULL;
}
@@ -2739,35 +2907,56 @@
/* Locate a section in a BFD containing debugging info. The search starts
from the section after AFTER_SEC, or from the first section in the BFD if
AFTER_SEC is NULL. The search works by examining the names of the
- sections. There are two permissiable names. The first is .debug_info.
- This is the standard DWARF2 name. The second is a prefix .gnu.linkonce.wi.
+ sections. There are three permissiable names. The first two are given
+ by DEBUG_SECTIONS[debug_info] (whose standard DWARF2 names are .debug_info
+ and .zdebug_info). The third is a prefix .gnu.linkonce.wi.
This is a variation on the .debug_info section which has a checksum
describing the contents appended onto the name. This allows the linker to
identify and discard duplicate debugging sections for different
compilation units. */
-#define DWARF2_DEBUG_INFO ".debug_info"
-#define DWARF2_COMPRESSED_DEBUG_INFO ".zdebug_info"
#define GNU_LINKONCE_INFO ".gnu.linkonce.wi."
static asection *
-find_debug_info (bfd *abfd, asection *after_sec)
+find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
+ asection *after_sec)
{
- asection * msec;
+ asection *msec;
+ const char *look;
- msec = after_sec != NULL ? after_sec->next : abfd->sections;
-
- while (msec)
+ if (after_sec == NULL)
{
- if (strcmp (msec->name, DWARF2_DEBUG_INFO) == 0)
+ look = debug_sections[debug_info].uncompressed_name;
+ msec = bfd_get_section_by_name (abfd, look);
+ if (msec != NULL)
return msec;
- if (strcmp (msec->name, DWARF2_COMPRESSED_DEBUG_INFO) == 0)
+ look = debug_sections[debug_info].compressed_name;
+ if (look != NULL)
+ {
+ msec = bfd_get_section_by_name (abfd, look);
+ if (msec != NULL)
+ return msec;
+ }
+
+ for (msec = abfd->sections; msec != NULL; msec = msec->next)
+ if (CONST_STRNEQ (msec->name, GNU_LINKONCE_INFO))
+ return msec;
+
+ return NULL;
+ }
+
+ for (msec = after_sec->next; msec != NULL; msec = msec->next)
+ {
+ look = debug_sections[debug_info].uncompressed_name;
+ if (strcmp (msec->name, look) == 0)
+ return msec;
+
+ look = debug_sections[debug_info].compressed_name;
+ if (look != NULL && strcmp (msec->name, look) == 0)
return msec;
if (CONST_STRNEQ (msec->name, GNU_LINKONCE_INFO))
return msec;
-
- msec = msec->next;
}
return NULL;
@@ -2808,7 +2997,9 @@
asection *sect;
bfd_vma last_vma = 0, last_dwarf = 0;
bfd_size_type amt;
+ const char *debug_info_name;
+ debug_info_name = stash->debug_sections[debug_info].uncompressed_name;
i = 0;
for (sect = abfd->sections; sect != NULL; sect = sect->next)
{
@@ -2821,7 +3012,7 @@
/* We need to adjust the VMAs of any .debug_info sections.
Skip compressed ones, since no relocations could target
them - they should not appear in object files anyway. */
- if (strcmp (sect->name, DWARF2_DEBUG_INFO) == 0)
+ if (strcmp (sect->name, debug_info_name) == 0)
is_debug_info = 1;
else if (CONST_STRNEQ (sect->name, GNU_LINKONCE_INFO))
is_debug_info = 1;
@@ -2839,7 +3030,7 @@
}
amt = i * sizeof (struct adjusted_section);
- p = (struct adjusted_section *) bfd_zalloc (abfd, amt);
+ p = (struct adjusted_section *) bfd_alloc (abfd, amt);
if (! p)
return FALSE;
@@ -2857,7 +3048,7 @@
/* We need to adjust the VMAs of any .debug_info sections.
Skip compressed ones, since no relocations could target
them - they should not appear in object files anyway. */
- if (strcmp (sect->name, DWARF2_DEBUG_INFO) == 0)
+ if (strcmp (sect->name, debug_info_name) == 0)
is_debug_info = 1;
else if (CONST_STRNEQ (sect->name, GNU_LINKONCE_INFO))
is_debug_info = 1;
@@ -2933,8 +3124,8 @@
&& addr >= arange->low
&& addr < arange->high
&& (!best_fit
- || ((arange->high - arange->low)
- < (best_fit->arange.high - best_fit->arange.low))))
+ || (arange->high - arange->low
+ < best_fit->arange.high - best_fit->arange.low)))
best_fit = each_func;
}
}
@@ -3125,6 +3316,122 @@
filename_ptr, linenumber_ptr);
}
+/* Read debug information from DEBUG_BFD when DEBUG_BFD is specified.
+ If DEBUG_BFD is not specified, we read debug information from ABFD
+ or its gnu_debuglink. The results will be stored in PINFO.
+ The function returns TRUE iff debug information is ready. */
+
+bfd_boolean
+_bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
+ const struct dwarf_debug_section *debug_sections,
+ asymbol **symbols,
+ void **pinfo)
+{
+ bfd_size_type amt = sizeof (struct dwarf2_debug);
+ bfd_size_type total_size;
+ asection *msec;
+ struct dwarf2_debug *stash = (struct dwarf2_debug *) *pinfo;
+
+ if (stash != NULL)
+ return TRUE;
+
+ stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt);
+ if (! stash)
+ return FALSE;
+ stash->debug_sections = debug_sections;
+ stash->syms = symbols;
+
+ *pinfo = stash;
+
+ if (debug_bfd == NULL)
+ debug_bfd = abfd;
+
+ msec = find_debug_info (debug_bfd, debug_sections, NULL);
+ if (msec == NULL && abfd == debug_bfd)
+ {
+ char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
+
+ if (debug_filename == NULL)
+ /* No dwarf2 info, and no gnu_debuglink to follow.
+ Note that at this point the stash has been allocated, but
+ contains zeros. This lets future calls to this function
+ fail more quickly. */
+ return FALSE;
+
+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
+ || ! bfd_check_format (debug_bfd, bfd_object)
+ || (msec = find_debug_info (debug_bfd,
+ debug_sections, NULL)) == NULL)
+ {
+ if (debug_bfd)
+ bfd_close (debug_bfd);
+ /* FIXME: Should we report our failure to follow the debuglink ? */
+ free (debug_filename);
+ return FALSE;
+ }
+ stash->close_on_cleanup = TRUE;
+ }
+ stash->bfd_ptr = debug_bfd;
+
+ /* There can be more than one DWARF2 info section in a BFD these
+ days. First handle the easy case when there's only one. If
+ there's more than one, try case two: none of the sections is
+ compressed. In that case, read them all in and produce one
+ large stash. We do this in two passes - in the first pass we
+ just accumulate the section sizes, and in the second pass we
+ read in the section's contents. (The allows us to avoid
+ reallocing the data as we add sections to the stash.) If
+ some or all sections are compressed, then do things the slow
+ way, with a bunch of reallocs. */
+
+ if (! find_debug_info (debug_bfd, debug_sections, msec))
+ {
+ /* Case 1: only one info section. */
+ total_size = msec->size;
+ if (! read_section (debug_bfd, &stash->debug_sections[debug_info],
+ symbols, 0,
+ &stash->info_ptr_memory, &total_size))
+ return FALSE;
+ }
+ else
+ {
+ /* Case 2: multiple sections. */
+ for (total_size = 0;
+ msec;
+ msec = find_debug_info (debug_bfd, debug_sections, msec))
+ total_size += msec->size;
+
+ stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
+ if (stash->info_ptr_memory == NULL)
+ return FALSE;
+
+ total_size = 0;
+ for (msec = find_debug_info (debug_bfd, debug_sections, NULL);
+ msec;
+ msec = find_debug_info (debug_bfd, debug_sections, msec))
+ {
+ bfd_size_type size;
+
+ size = msec->size;
+ if (size == 0)
+ continue;
+
+ if (!(bfd_simple_get_relocated_section_contents
+ (debug_bfd, msec, stash->info_ptr_memory + total_size,
+ symbols)))
+ return FALSE;
+
+ total_size += size;
+ }
+ }
+
+ stash->info_ptr = stash->info_ptr_memory;
+ stash->info_ptr_end = stash->info_ptr + total_size;
+ stash->sec = find_debug_info (debug_bfd, debug_sections, NULL);
+ stash->sec_info_ptr = stash->info_ptr;
+ return TRUE;
+}
+
/* Find the source code location of SYMBOL. If SYMBOL is NULL
then find the nearest source code location corresponding to
the address SECTION + OFFSET.
@@ -3132,12 +3439,14 @@
FILENAME_PTR and LINENUMBER_PTR. In the case where SYMBOL was
NULL the FUNCTIONNAME_PTR is also filled in.
SYMBOLS contains the symbol table for ABFD.
+ DEBUG_SECTIONS contains the name of the dwarf debug sections.
ADDR_SIZE is the number of bytes in the initial .debug_info length
field and in the abbreviation offset, or zero to indicate that the
default value should be used. */
static bfd_boolean
find_line (bfd *abfd,
+ const struct dwarf_debug_section *debug_sections,
asection *section,
bfd_vma offset,
asymbol *symbol,
@@ -3164,17 +3473,19 @@
bfd_vma found = FALSE;
bfd_boolean do_line;
+ *filename_ptr = NULL;
+ if (functionname_ptr != NULL)
+ *functionname_ptr = NULL;
+ *linenumber_ptr = 0;
+ if (discriminator_ptr)
+ *discriminator_ptr = 0;
+
+ if (! _bfd_dwarf2_slurp_debug_info (abfd, NULL,
+ debug_sections, symbols, pinfo))
+ return FALSE;
+
stash = (struct dwarf2_debug *) *pinfo;
- if (! stash)
- {
- bfd_size_type amt = sizeof (struct dwarf2_debug);
-
- stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt);
- if (! stash)
- return FALSE;
- }
-
/* In a relocatable file, 2 functions may have the same address.
We change the section vma so that they won't overlap. */
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
@@ -3203,108 +3514,11 @@
addr += section->output_section->vma + section->output_offset;
else
addr += section->vma;
- *filename_ptr = NULL;
- if (! do_line)
- *functionname_ptr = NULL;
- *linenumber_ptr = 0;
- if (discriminator_ptr)
- *discriminator_ptr = 0;
-
- if (! *pinfo)
- {
- bfd *debug_bfd;
- bfd_size_type total_size;
- asection *msec;
-
- *pinfo = stash;
-
- msec = find_debug_info (abfd, NULL);
- if (msec == NULL)
- {
- char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
-
- if (debug_filename == NULL)
- /* No dwarf2 info, and no gnu_debuglink to follow.
- Note that at this point the stash has been allocated, but
- contains zeros. This lets future calls to this function
- fail more quickly. */
- goto done;
-
- if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
- || ! bfd_check_format (debug_bfd, bfd_object)
- || (msec = find_debug_info (debug_bfd, NULL)) == NULL)
- {
- if (debug_bfd)
- bfd_close (debug_bfd);
- /* FIXME: Should we report our failure to follow the debuglink ? */
- free (debug_filename);
- goto done;
- }
- }
- else
- debug_bfd = abfd;
-
- /* There can be more than one DWARF2 info section in a BFD these
- days. First handle the easy case when there's only one. If
- there's more than one, try case two: none of the sections is
- compressed. In that case, read them all in and produce one
- large stash. We do this in two passes - in the first pass we
- just accumulate the section sizes, and in the second pass we
- read in the section's contents. (The allows us to avoid
- reallocing the data as we add sections to the stash.) If
- some or all sections are compressed, then do things the slow
- way, with a bunch of reallocs. */
-
- if (! find_debug_info (debug_bfd, msec))
- {
- /* Case 1: only one info section. */
- total_size = msec->size;
- if (! read_section (debug_bfd, debug_info, symbols, 0,
- &stash->info_ptr_memory, &total_size))
- goto done;
- }
- else
- {
- /* Case 2: multiple sections. */
- for (total_size = 0; msec; msec = find_debug_info (debug_bfd, msec))
- total_size += msec->size;
-
- stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
- if (stash->info_ptr_memory == NULL)
- goto done;
-
- total_size = 0;
- for (msec = find_debug_info (debug_bfd, NULL);
- msec;
- msec = find_debug_info (debug_bfd, msec))
- {
- bfd_size_type size;
-
- size = msec->size;
- if (size == 0)
- continue;
-
- if (!(bfd_simple_get_relocated_section_contents
- (debug_bfd, msec, stash->info_ptr_memory + total_size,
- symbols)))
- goto done;
-
- total_size += size;
- }
- }
-
- stash->info_ptr = stash->info_ptr_memory;
- stash->info_ptr_end = stash->info_ptr + total_size;
- stash->sec = find_debug_info (debug_bfd, NULL);
- stash->sec_info_ptr = stash->info_ptr;
- stash->syms = symbols;
- stash->bfd_ptr = debug_bfd;
- }
/* A null info_ptr indicates that there is no dwarf2 info
(or that an error occured while setting up the stash). */
if (! stash->info_ptr)
- goto done;
+ return FALSE;
stash->inliner_chain = NULL;
@@ -3334,6 +3548,7 @@
/* Check the previously read comp. units first. */
for (each = stash->all_comp_units; each; each = each->next_unit)
if ((symbol->flags & BSF_FUNCTION) == 0
+ || each->arange.high == 0
|| comp_unit_contains_address (each, addr))
{
found = comp_unit_find_line (each, symbol, addr, filename_ptr,
@@ -3347,7 +3562,8 @@
{
for (each = stash->all_comp_units; each; each = each->next_unit)
{
- found = (comp_unit_contains_address (each, addr)
+ found = ((each->arange.high == 0
+ || comp_unit_contains_address (each, addr))
&& comp_unit_find_nearest_line (each, addr,
filename_ptr,
functionname_ptr,
@@ -3422,10 +3638,10 @@
stash->all_comp_units->prev_unit = each;
else
stash->last_comp_unit = each;
-
+
each->next_unit = stash->all_comp_units;
stash->all_comp_units = each;
-
+
/* DW_AT_low_pc and DW_AT_high_pc are optional for
compilation units. If we don't have them (i.e.,
unit->high == 0), we need to consult the line info table
@@ -3452,7 +3668,8 @@
if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
== stash->sec->size)
{
- stash->sec = find_debug_info (stash->bfd_ptr, stash->sec);
+ stash->sec = find_debug_info (stash->bfd_ptr, debug_sections,
+ stash->sec);
stash->sec_info_ptr = stash->info_ptr;
}
@@ -3461,7 +3678,7 @@
}
}
-done:
+ done:
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
unset_sections (stash);
@@ -3473,6 +3690,7 @@
bfd_boolean
_bfd_dwarf2_find_nearest_line (bfd *abfd,
+ const struct dwarf_debug_section *debug_sections,
asection *section,
asymbol **symbols,
bfd_vma offset,
@@ -3483,8 +3701,8 @@
unsigned int addr_size,
void **pinfo)
{
- return find_line (abfd, section, offset, NULL, symbols, filename_ptr,
- functionname_ptr, linenumber_ptr,
+ return find_line (abfd, debug_sections, section, offset, NULL, symbols,
+ filename_ptr, functionname_ptr, linenumber_ptr,
discriminator_ptr, addr_size, pinfo);
}
@@ -3501,8 +3719,8 @@
unsigned int addr_size,
void **pinfo)
{
- return find_line (abfd, NULL, 0, symbol, symbols, filename_ptr,
- NULL, linenumber_ptr, discriminator_ptr,
+ return find_line (abfd, dwarf_debug_sections, NULL, 0, symbol, symbols,
+ filename_ptr, NULL, linenumber_ptr, discriminator_ptr,
addr_size, pinfo);
}
@@ -3534,17 +3752,12 @@
}
void
-_bfd_dwarf2_cleanup_debug_info (bfd *abfd)
+_bfd_dwarf2_cleanup_debug_info (bfd *abfd, void **pinfo)
{
+ struct dwarf2_debug *stash = (struct dwarf2_debug *) *pinfo;
struct comp_unit *each;
- struct dwarf2_debug *stash;
- if (abfd == NULL || elf_tdata (abfd) == NULL)
- return;
-
- stash = (struct dwarf2_debug *) elf_tdata (abfd)->dwarf2_find_line_info;
-
- if (stash == NULL)
+ if (abfd == NULL || stash == NULL)
return;
for (each = stash->all_comp_units; each; each = each->next_unit)
@@ -3609,4 +3822,12 @@
free (stash->dwarf_ranges_buffer);
if (stash->info_ptr_memory)
free (stash->info_ptr_memory);
+ if (stash->close_on_cleanup)
+ bfd_close (stash->bfd_ptr);
+ if (stash->alt_dwarf_str_buffer)
+ free (stash->alt_dwarf_str_buffer);
+ if (stash->alt_dwarf_info_buffer)
+ free (stash->alt_dwarf_info_buffer);
+ if (stash->alt_bfd_ptr)
+ bfd_close (stash->alt_bfd_ptr);
}
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index b76266d..7bfb333 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1,7 +1,5 @@
/* 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, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, [email protected].
@@ -73,8 +71,6 @@
0, NULL, 0,
/* target_index, used_by_bfd, constructor_chain, owner, */
0, NULL, NULL, NULL,
- /* flag_info, */
- NULL,
/* symbol, */
NULL,
/* symbol_ptr_ptr, */
@@ -236,9 +232,7 @@
}
bfd_boolean
-_bfd_ecoff_no_long_sections (abfd, enable)
- bfd *abfd;
- int enable;
+_bfd_ecoff_no_long_sections (bfd *abfd, int enable)
{
(void) abfd;
(void) enable;
@@ -1892,7 +1886,7 @@
ret = (bfd_coff_filhsz (abfd)
+ bfd_coff_aoutsz (abfd)
+ c * bfd_coff_scnhsz (abfd));
- return BFD_ALIGN (ret, 16);
+ return (int) BFD_ALIGN (ret, 16);
}
/* Get the contents of a section. */
@@ -2908,7 +2902,7 @@
if (mapdata == NULL)
return FALSE;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, (void *) mapdata);
+ free (mapdata);
raw_armap = (char *) bfd_alloc (abfd, parsed_size);
if (raw_armap == NULL)
@@ -3567,9 +3561,9 @@
void (* const swap_ext_in) (bfd *, void *, EXTR *)
= backend->debug_swap.swap_ext_in;
HDRR *symhdr;
- bfd_size_type external_ext_size;
+ bfd_size_type external_ext_size = 0;
void * external_ext = NULL;
- bfd_size_type esize;
+ bfd_size_type esize = 0;
char *ssext = NULL;
char *ext_ptr;
char *ext_end;
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index 25b67fa..e48fcc8 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -1,6 +1,6 @@
/* Routines to link ECOFF debugging information.
Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <[email protected]>.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,28 +33,6 @@
#include "libcoff.h"
#include "libecoff.h"
-static bfd_boolean ecoff_add_bytes
- PARAMS ((char **buf, char **bufend, size_t need));
-static struct bfd_hash_entry *string_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *));
-static void ecoff_align_debug
- PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap));
-static bfd_boolean ecoff_write_symhdr
- PARAMS ((bfd *, struct ecoff_debug_info *, const struct ecoff_debug_swap *,
- file_ptr where));
-static int cmp_fdrtab_entry
- PARAMS ((const PTR, const PTR));
-static bfd_boolean mk_fdrtab
- PARAMS ((bfd *, struct ecoff_debug_info * const,
- const struct ecoff_debug_swap * const, struct ecoff_find_line *));
-static long fdrtab_lookup
- PARAMS ((struct ecoff_find_line *, bfd_vma));
-static bfd_boolean lookup_line
- PARAMS ((bfd *, struct ecoff_debug_info * const,
- const struct ecoff_debug_swap * const, struct ecoff_find_line *));
-
/* Routines to swap auxiliary information in and out. I am assuming
that the auxiliary information format is always going to be target
independent. */
@@ -64,51 +42,52 @@
info comes from the file header record (fh-fBigendian). */
void
-_bfd_ecoff_swap_tir_in (bigend, ext_copy, intern)
- int bigend;
- const struct tir_ext *ext_copy;
- TIR *intern;
+_bfd_ecoff_swap_tir_in (int bigend, const struct tir_ext *ext_copy,
+ TIR *intern)
{
struct tir_ext ext[1];
*ext = *ext_copy; /* Make it reasonable to do in-place. */
/* now the fun stuff... */
- if (bigend) {
- intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_BIG);
- intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_BIG);
- intern->bt = (ext->t_bits1[0] & TIR_BITS1_BT_BIG)
- >> TIR_BITS1_BT_SH_BIG;
- intern->tq4 = (ext->t_tq45[0] & TIR_BITS_TQ4_BIG)
- >> TIR_BITS_TQ4_SH_BIG;
- intern->tq5 = (ext->t_tq45[0] & TIR_BITS_TQ5_BIG)
- >> TIR_BITS_TQ5_SH_BIG;
- intern->tq0 = (ext->t_tq01[0] & TIR_BITS_TQ0_BIG)
- >> TIR_BITS_TQ0_SH_BIG;
- intern->tq1 = (ext->t_tq01[0] & TIR_BITS_TQ1_BIG)
- >> TIR_BITS_TQ1_SH_BIG;
- intern->tq2 = (ext->t_tq23[0] & TIR_BITS_TQ2_BIG)
- >> TIR_BITS_TQ2_SH_BIG;
- intern->tq3 = (ext->t_tq23[0] & TIR_BITS_TQ3_BIG)
- >> TIR_BITS_TQ3_SH_BIG;
- } else {
- intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_LITTLE);
- intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_LITTLE);
- intern->bt = (ext->t_bits1[0] & TIR_BITS1_BT_LITTLE)
- >> TIR_BITS1_BT_SH_LITTLE;
- intern->tq4 = (ext->t_tq45[0] & TIR_BITS_TQ4_LITTLE)
- >> TIR_BITS_TQ4_SH_LITTLE;
- intern->tq5 = (ext->t_tq45[0] & TIR_BITS_TQ5_LITTLE)
- >> TIR_BITS_TQ5_SH_LITTLE;
- intern->tq0 = (ext->t_tq01[0] & TIR_BITS_TQ0_LITTLE)
- >> TIR_BITS_TQ0_SH_LITTLE;
- intern->tq1 = (ext->t_tq01[0] & TIR_BITS_TQ1_LITTLE)
- >> TIR_BITS_TQ1_SH_LITTLE;
- intern->tq2 = (ext->t_tq23[0] & TIR_BITS_TQ2_LITTLE)
- >> TIR_BITS_TQ2_SH_LITTLE;
- intern->tq3 = (ext->t_tq23[0] & TIR_BITS_TQ3_LITTLE)
- >> TIR_BITS_TQ3_SH_LITTLE;
- }
+ if (bigend)
+ {
+ intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_BIG);
+ intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_BIG);
+ intern->bt = (ext->t_bits1[0] & TIR_BITS1_BT_BIG)
+ >> TIR_BITS1_BT_SH_BIG;
+ intern->tq4 = (ext->t_tq45[0] & TIR_BITS_TQ4_BIG)
+ >> TIR_BITS_TQ4_SH_BIG;
+ intern->tq5 = (ext->t_tq45[0] & TIR_BITS_TQ5_BIG)
+ >> TIR_BITS_TQ5_SH_BIG;
+ intern->tq0 = (ext->t_tq01[0] & TIR_BITS_TQ0_BIG)
+ >> TIR_BITS_TQ0_SH_BIG;
+ intern->tq1 = (ext->t_tq01[0] & TIR_BITS_TQ1_BIG)
+ >> TIR_BITS_TQ1_SH_BIG;
+ intern->tq2 = (ext->t_tq23[0] & TIR_BITS_TQ2_BIG)
+ >> TIR_BITS_TQ2_SH_BIG;
+ intern->tq3 = (ext->t_tq23[0] & TIR_BITS_TQ3_BIG)
+ >> TIR_BITS_TQ3_SH_BIG;
+ }
+ else
+ {
+ intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_LITTLE);
+ intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_LITTLE);
+ intern->bt = (ext->t_bits1[0] & TIR_BITS1_BT_LITTLE)
+ >> TIR_BITS1_BT_SH_LITTLE;
+ intern->tq4 = (ext->t_tq45[0] & TIR_BITS_TQ4_LITTLE)
+ >> TIR_BITS_TQ4_SH_LITTLE;
+ intern->tq5 = (ext->t_tq45[0] & TIR_BITS_TQ5_LITTLE)
+ >> TIR_BITS_TQ5_SH_LITTLE;
+ intern->tq0 = (ext->t_tq01[0] & TIR_BITS_TQ0_LITTLE)
+ >> TIR_BITS_TQ0_SH_LITTLE;
+ intern->tq1 = (ext->t_tq01[0] & TIR_BITS_TQ1_LITTLE)
+ >> TIR_BITS_TQ1_SH_LITTLE;
+ intern->tq2 = (ext->t_tq23[0] & TIR_BITS_TQ2_LITTLE)
+ >> TIR_BITS_TQ2_SH_LITTLE;
+ intern->tq3 = (ext->t_tq23[0] & TIR_BITS_TQ3_LITTLE)
+ >> TIR_BITS_TQ3_SH_LITTLE;
+ }
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -121,51 +100,53 @@
info comes from the file header record (fh-fBigendian). */
void
-_bfd_ecoff_swap_tir_out (bigend, intern_copy, ext)
- int bigend;
- const TIR *intern_copy;
- struct tir_ext *ext;
+_bfd_ecoff_swap_tir_out (int bigend,
+ const TIR *intern_copy,
+ struct tir_ext *ext)
{
TIR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
/* now the fun stuff... */
- if (bigend) {
- ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_BIG : 0)
+ if (bigend)
+ {
+ ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_BIG : 0)
| (intern->continued ? TIR_BITS1_CONTINUED_BIG : 0)
| ((intern->bt << TIR_BITS1_BT_SH_BIG)
& TIR_BITS1_BT_BIG));
- ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_BIG)
+ ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_BIG)
& TIR_BITS_TQ4_BIG)
| ((intern->tq5 << TIR_BITS_TQ5_SH_BIG)
& TIR_BITS_TQ5_BIG));
- ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_BIG)
+ ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_BIG)
& TIR_BITS_TQ0_BIG)
| ((intern->tq1 << TIR_BITS_TQ1_SH_BIG)
& TIR_BITS_TQ1_BIG));
- ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_BIG)
+ ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_BIG)
& TIR_BITS_TQ2_BIG)
| ((intern->tq3 << TIR_BITS_TQ3_SH_BIG)
& TIR_BITS_TQ3_BIG));
- } else {
- ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_LITTLE : 0)
+ }
+ else
+ {
+ ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_LITTLE : 0)
| (intern->continued ? TIR_BITS1_CONTINUED_LITTLE : 0)
| ((intern->bt << TIR_BITS1_BT_SH_LITTLE)
& TIR_BITS1_BT_LITTLE));
- ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_LITTLE)
+ ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_LITTLE)
& TIR_BITS_TQ4_LITTLE)
| ((intern->tq5 << TIR_BITS_TQ5_SH_LITTLE)
& TIR_BITS_TQ5_LITTLE));
- ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_LITTLE)
+ ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_LITTLE)
& TIR_BITS_TQ0_LITTLE)
| ((intern->tq1 << TIR_BITS_TQ1_SH_LITTLE)
& TIR_BITS_TQ1_LITTLE));
- ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_LITTLE)
+ ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_LITTLE)
& TIR_BITS_TQ2_LITTLE)
| ((intern->tq3 << TIR_BITS_TQ3_SH_LITTLE)
& TIR_BITS_TQ3_LITTLE));
- }
+ }
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -177,34 +158,36 @@
big-endian or little-endian format.*/
void
-_bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern)
- int bigend;
- const struct rndx_ext *ext_copy;
- RNDXR *intern;
+_bfd_ecoff_swap_rndx_in (int bigend,
+ const struct rndx_ext *ext_copy,
+ RNDXR *intern)
{
struct rndx_ext ext[1];
*ext = *ext_copy; /* Make it reasonable to do in-place. */
/* now the fun stuff... */
- if (bigend) {
- intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG)
+ if (bigend)
+ {
+ intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG)
| ((ext->r_bits[1] & RNDX_BITS1_RFD_BIG)
>> RNDX_BITS1_RFD_SH_BIG);
- intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_BIG)
+ intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_BIG)
<< RNDX_BITS1_INDEX_SH_LEFT_BIG)
| (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_BIG)
| (ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_BIG);
- } else {
- intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_LITTLE)
+ }
+ else
+ {
+ intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_LITTLE)
| ((ext->r_bits[1] & RNDX_BITS1_RFD_LITTLE)
<< RNDX_BITS1_RFD_SH_LEFT_LITTLE);
- intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_LITTLE)
+ intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_LITTLE)
>> RNDX_BITS1_INDEX_SH_LITTLE)
| (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_LITTLE)
| ((unsigned int) ext->r_bits[3]
<< RNDX_BITS3_INDEX_SH_LEFT_LITTLE);
- }
+ }
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -216,33 +199,35 @@
big-endian or little-endian format.*/
void
-_bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext)
- int bigend;
- const RNDXR *intern_copy;
- struct rndx_ext *ext;
+_bfd_ecoff_swap_rndx_out (int bigend,
+ const RNDXR *intern_copy,
+ struct rndx_ext *ext)
{
RNDXR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
/* now the fun stuff... */
- if (bigend) {
- ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_BIG;
- ext->r_bits[1] = (((intern->rfd << RNDX_BITS1_RFD_SH_BIG)
+ if (bigend)
+ {
+ ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_BIG;
+ ext->r_bits[1] = (((intern->rfd << RNDX_BITS1_RFD_SH_BIG)
& RNDX_BITS1_RFD_BIG)
| ((intern->index >> RNDX_BITS1_INDEX_SH_LEFT_BIG)
& RNDX_BITS1_INDEX_BIG));
- ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_BIG;
- ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_BIG;
- } else {
- ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_LITTLE;
- ext->r_bits[1] = (((intern->rfd >> RNDX_BITS1_RFD_SH_LEFT_LITTLE)
+ ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_BIG;
+ ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_BIG;
+ }
+ else
+ {
+ ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_LITTLE;
+ ext->r_bits[1] = (((intern->rfd >> RNDX_BITS1_RFD_SH_LEFT_LITTLE)
& RNDX_BITS1_RFD_LITTLE)
| ((intern->index << RNDX_BITS1_INDEX_SH_LITTLE)
& RNDX_BITS1_INDEX_LITTLE));
- ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_LITTLE;
- ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_LITTLE;
- }
+ ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_LITTLE;
+ ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_LITTLE;
+ }
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -256,10 +241,7 @@
/* Add bytes to a buffer. Return success. */
static bfd_boolean
-ecoff_add_bytes (buf, bufend, need)
- char **buf;
- char **bufend;
- size_t need;
+ecoff_add_bytes (char **buf, char **bufend, size_t need)
{
size_t have;
size_t want;
@@ -303,10 +285,9 @@
/* Routine to create an entry in a string hash table. */
static struct bfd_hash_entry *
-string_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+string_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct string_hash_entry *ret = (struct string_hash_entry *) entry;
@@ -360,7 +341,7 @@
file_ptr offset;
} file;
/* The data to be written out. */
- PTR memory;
+ void * memory;
} u;
};
@@ -402,18 +383,13 @@
/* Add a file entry to a shuffle list. */
-static bfd_boolean add_file_shuffle
- PARAMS ((struct accumulate *, struct shuffle **, struct shuffle **,
- bfd *, file_ptr, unsigned long));
-
static bfd_boolean
-add_file_shuffle (ainfo, head, tail, input_bfd, offset, size)
- struct accumulate *ainfo;
- struct shuffle **head;
- struct shuffle **tail;
- bfd *input_bfd;
- file_ptr offset;
- unsigned long size;
+add_file_shuffle (struct accumulate *ainfo,
+ struct shuffle **head,
+ struct shuffle **tail,
+ bfd *input_bfd,
+ file_ptr offset,
+ unsigned long size)
{
struct shuffle *n;
@@ -453,17 +429,12 @@
/* Add a memory entry to a shuffle list. */
-static bfd_boolean add_memory_shuffle
- PARAMS ((struct accumulate *, struct shuffle **head, struct shuffle **tail,
- bfd_byte *data, unsigned long size));
-
static bfd_boolean
-add_memory_shuffle (ainfo, head, tail, data, size)
- struct accumulate *ainfo;
- struct shuffle **head;
- struct shuffle **tail;
- bfd_byte *data;
- unsigned long size;
+add_memory_shuffle (struct accumulate *ainfo,
+ struct shuffle **head,
+ struct shuffle **tail,
+ bfd_byte *data,
+ unsigned long size)
{
struct shuffle *n;
@@ -477,7 +448,7 @@
n->next = NULL;
n->size = size;
n->filep = FALSE;
- n->u.memory = (PTR) data;
+ n->u.memory = data;
if (*head == (struct shuffle *) NULL)
*head = n;
if (*tail != (struct shuffle *) NULL)
@@ -489,12 +460,11 @@
/* Initialize the FDR hash table. This returns a handle which is then
passed in to bfd_ecoff_debug_accumulate, et. al. */
-PTR
-bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct ecoff_debug_info *output_debug;
- const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+void *
+bfd_ecoff_debug_init (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct ecoff_debug_info *output_debug,
+ const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct accumulate *ainfo;
bfd_size_type amt = sizeof (struct accumulate);
@@ -544,18 +514,17 @@
return NULL;
}
- return (PTR) ainfo;
+ return ainfo;
}
/* Free the accumulated debugging information. */
void
-bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
- PTR handle;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct ecoff_debug_info *output_debug ATTRIBUTE_UNUSED;
- const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+bfd_ecoff_debug_free (void * handle,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct ecoff_debug_info *output_debug ATTRIBUTE_UNUSED,
+ const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -578,28 +547,25 @@
bfd_ecoff_debug_init. */
bfd_boolean
-bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
- input_bfd, input_debug, input_swap,
- info)
- PTR handle;
- bfd *output_bfd;
- struct ecoff_debug_info *output_debug;
- const struct ecoff_debug_swap *output_swap;
- bfd *input_bfd;
- struct ecoff_debug_info *input_debug;
- const struct ecoff_debug_swap *input_swap;
- struct bfd_link_info *info;
+bfd_ecoff_debug_accumulate (void * handle,
+ bfd *output_bfd,
+ struct ecoff_debug_info *output_debug,
+ const struct ecoff_debug_swap *output_swap,
+ bfd *input_bfd,
+ struct ecoff_debug_info *input_debug,
+ const struct ecoff_debug_swap *input_swap,
+ struct bfd_link_info *info)
{
struct accumulate *ainfo = (struct accumulate *) handle;
- void (* const swap_sym_in) PARAMS ((bfd *, PTR, SYMR *))
+ void (* const swap_sym_in) (bfd *, void *, SYMR *)
= input_swap->swap_sym_in;
- void (* const swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *))
+ void (* const swap_rfd_in) (bfd *, void *, RFDT *)
= input_swap->swap_rfd_in;
- void (* const swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR))
+ void (* const swap_sym_out) (bfd *, const SYMR *, void *)
= output_swap->swap_sym_out;
- void (* const swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR))
+ void (* const swap_fdr_out) (bfd *, const FDR *, void *)
= output_swap->swap_fdr_out;
- void (* const swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR))
+ void (* const swap_rfd_out) (bfd *, const RFDT *, void *)
= output_swap->swap_rfd_out;
bfd_size_type external_pdr_size = output_swap->external_pdr_size;
bfd_size_type external_sym_size = output_swap->external_sym_size;
@@ -627,7 +593,7 @@
/* Use section_adjust to hold the value to add to a symbol in a
particular section. */
- memset ((PTR) section_adjust, 0, sizeof section_adjust);
+ memset (section_adjust, 0, sizeof section_adjust);
#define SET(name, indx) \
sec = bfd_get_section_by_name (input_bfd, name); \
@@ -697,7 +663,7 @@
if (input_debug->fdr != (FDR *) NULL)
fdr = *(FDR *) fdr_ptr;
else
- (*input_swap->swap_fdr_in) (input_bfd, (PTR) fdr_ptr, &fdr);
+ (*input_swap->swap_fdr_in) (input_bfd, fdr_ptr, &fdr);
/* See if this FDR can be merged with an existing one. */
if (fdr.cbLine == 0 && fdr.rss != -1 && fdr.fMerge)
@@ -729,8 +695,7 @@
if (fh->val != -1)
{
input_debug->ifdmap[i] = fh->val;
- (*swap_rfd_out) (output_bfd, input_debug->ifdmap + i,
- (PTR) rfd_out);
+ (*swap_rfd_out) (output_bfd, input_debug->ifdmap + i, rfd_out);
/* Don't copy this FDR. */
continue;
@@ -740,7 +705,7 @@
}
input_debug->ifdmap[i] = output_symhdr->ifdMax + copied;
- (*swap_rfd_out) (output_bfd, input_debug->ifdmap + i, (PTR) rfd_out);
+ (*swap_rfd_out) (output_bfd, input_debug->ifdmap + i, rfd_out);
++copied;
}
@@ -758,10 +723,10 @@
{
RFDT rfd;
- (*swap_rfd_in) (input_bfd, (PTR) rfd_in, &rfd);
+ (*swap_rfd_in) (input_bfd, rfd_in, &rfd);
BFD_ASSERT (rfd >= 0 && rfd < input_symhdr->ifdMax);
rfd = input_debug->ifdmap[rfd];
- (*swap_rfd_out) (output_bfd, &rfd, (PTR) rfd_out);
+ (*swap_rfd_out) (output_bfd, &rfd, rfd_out);
rfd_out += external_rfd_size;
}
@@ -798,7 +763,7 @@
if (input_debug->fdr != (FDR *) NULL)
fdr = *(FDR *) fdr_ptr;
else
- (*input_swap->swap_fdr_in) (input_bfd, (PTR) fdr_ptr, &fdr);
+ (*input_swap->swap_fdr_in) (input_bfd, fdr_ptr, &fdr);
/* FIXME: It is conceivable that this FDR points to the .init or
.fini section, in which case this will not do the right
@@ -825,7 +790,7 @@
{
SYMR internal_sym;
- (*swap_sym_in) (input_bfd, (PTR) lraw_src, &internal_sym);
+ (*swap_sym_in) (input_bfd, lraw_src, &internal_sym);
BFD_ASSERT (internal_sym.sc != scCommon
&& internal_sym.sc != scSCommon);
@@ -1007,8 +972,8 @@
{
PDR pdr;
- (*input_swap->swap_pdr_in) (input_bfd, (PTR) in, &pdr);
- (*output_swap->swap_pdr_out) (output_bfd, &pdr, (PTR) out);
+ (*input_swap->swap_pdr_in) (input_bfd, in, &pdr);
+ (*output_swap->swap_pdr_out) (output_bfd, &pdr, out);
}
/* Swap over the optimization information. */
@@ -1031,8 +996,8 @@
{
OPTR opt;
- (*input_swap->swap_opt_in) (input_bfd, (PTR) in, &opt);
- (*output_swap->swap_opt_out) (output_bfd, &opt, (PTR) out);
+ (*input_swap->swap_opt_in) (input_bfd, in, &opt);
+ (*output_swap->swap_opt_out) (output_bfd, &opt, out);
}
}
@@ -1064,17 +1029,12 @@
/* Add a string to the debugging information we are accumulating.
Return the offset from the fdr string base. */
-static long ecoff_add_string
- PARAMS ((struct accumulate *, struct bfd_link_info *,
- struct ecoff_debug_info *, FDR *fdr, const char *string));
-
static long
-ecoff_add_string (ainfo, info, debug, fdr, string)
- struct accumulate *ainfo;
- struct bfd_link_info *info;
- struct ecoff_debug_info *debug;
- FDR *fdr;
- const char *string;
+ecoff_add_string (struct accumulate *ainfo,
+ struct bfd_link_info *info,
+ struct ecoff_debug_info *debug,
+ FDR *fdr,
+ const char *string)
{
HDRR *symhdr;
size_t len;
@@ -1118,17 +1078,15 @@
/* Add debugging information from a non-ECOFF file. */
bfd_boolean
-bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
- output_swap, input_bfd, info)
- PTR handle;
- bfd *output_bfd;
- struct ecoff_debug_info *output_debug;
- const struct ecoff_debug_swap *output_swap;
- bfd *input_bfd;
- struct bfd_link_info *info;
+bfd_ecoff_debug_accumulate_other (void * handle,
+ bfd *output_bfd,
+ struct ecoff_debug_info *output_debug,
+ const struct ecoff_debug_swap *output_swap,
+ bfd *input_bfd,
+ struct bfd_link_info *info)
{
struct accumulate *ainfo = (struct accumulate *) handle;
- void (* const swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR))
+ void (* const swap_sym_out) (bfd *, const SYMR *, void *)
= output_swap->swap_sym_out;
HDRR *output_symhdr = &output_debug->symbolic_header;
FDR fdr;
@@ -1138,9 +1096,9 @@
asymbol **sym_end;
long symsize;
long symcount;
- PTR external_fdr;
+ void * external_fdr;
- memset ((PTR) &fdr, 0, sizeof fdr);
+ memset (&fdr, 0, sizeof fdr);
sec = bfd_get_section_by_name (input_bfd, ".text");
if (sec != NULL)
@@ -1177,11 +1135,11 @@
for (sym_ptr = symbols; sym_ptr != sym_end; sym_ptr++)
{
SYMR internal_sym;
- PTR external_sym;
+ void * external_sym;
if (((*sym_ptr)->flags & BSF_EXPORT) != 0)
continue;
- memset ((PTR) &internal_sym, 0, sizeof internal_sym);
+ memset (&internal_sym, 0, sizeof internal_sym);
internal_sym.iss = ecoff_add_string (ainfo, info, output_debug, &fdr,
(*sym_ptr)->name);
@@ -1198,8 +1156,8 @@
internal_sym.sc = scUndefined;
internal_sym.index = indexNil;
- external_sym = (PTR) objalloc_alloc (ainfo->memory,
- output_swap->external_sym_size);
+ external_sym = objalloc_alloc (ainfo->memory,
+ output_swap->external_sym_size);
if (!external_sym)
{
bfd_set_error (bfd_error_no_memory);
@@ -1213,14 +1171,14 @@
++output_symhdr->isymMax;
}
- bfd_release (output_bfd, (PTR) symbols);
+ bfd_release (output_bfd, symbols);
/* Leave everything else in the FDR zeroed out. This will cause
the lang field to be langC. The fBigendian field will
indicate little endian format, but it doesn't matter because
it only applies to aux fields and there are none. */
- external_fdr = (PTR) objalloc_alloc (ainfo->memory,
- output_swap->external_fdr_size);
+ external_fdr = objalloc_alloc (ainfo->memory,
+ output_swap->external_fdr_size);
if (!external_fdr)
{
bfd_set_error (bfd_error_no_memory);
@@ -1242,14 +1200,12 @@
this interface, so that must be changed to do something else. */
bfd_boolean
-bfd_ecoff_debug_externals (abfd, debug, swap, relocatable, get_extr,
- set_index)
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
- bfd_boolean relocatable;
- bfd_boolean (*get_extr) PARAMS ((asymbol *, EXTR *));
- void (*set_index) PARAMS ((asymbol *, bfd_size_type));
+bfd_ecoff_debug_externals (bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap,
+ bfd_boolean relocatable,
+ bfd_boolean (*get_extr) (asymbol *, EXTR *),
+ void (*set_index) (asymbol *, bfd_size_type))
{
HDRR * const symhdr = &debug->symbolic_header;
asymbol **sym_ptr_ptr;
@@ -1311,15 +1267,14 @@
/* Add a single external symbol to the debugging information. */
bfd_boolean
-bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
- const char *name;
- EXTR *esym;
+bfd_ecoff_debug_one_external (bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap,
+ const char *name,
+ EXTR *esym)
{
const bfd_size_type external_ext_size = swap->external_ext_size;
- void (* const swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR))
+ void (* const swap_ext_out) (bfd *, const EXTR *, void *)
= swap->swap_ext_out;
HDRR * const symhdr = &debug->symbolic_header;
size_t namelen;
@@ -1365,10 +1320,9 @@
/* Align the ECOFF debugging information. */
static void
-ecoff_align_debug (abfd, debug, swap)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
+ecoff_align_debug (bfd *abfd ATTRIBUTE_UNUSED,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap)
{
HDRR * const symhdr = &debug->symbolic_header;
bfd_size_type debug_align, aux_align, rfd_align;
@@ -1383,7 +1337,7 @@
if (add != debug_align)
{
if (debug->line != (unsigned char *) NULL)
- memset ((PTR) (debug->line + symhdr->cbLine), 0, add);
+ memset ((debug->line + symhdr->cbLine), 0, add);
symhdr->cbLine += add;
}
@@ -1391,7 +1345,7 @@
if (add != debug_align)
{
if (debug->ss != (char *) NULL)
- memset ((PTR) (debug->ss + symhdr->issMax), 0, add);
+ memset ((debug->ss + symhdr->issMax), 0, add);
symhdr->issMax += add;
}
@@ -1399,7 +1353,7 @@
if (add != debug_align)
{
if (debug->ssext != (char *) NULL)
- memset ((PTR) (debug->ssext + symhdr->issExtMax), 0, add);
+ memset ((debug->ssext + symhdr->issExtMax), 0, add);
symhdr->issExtMax += add;
}
@@ -1407,7 +1361,7 @@
if (add != aux_align)
{
if (debug->external_aux != (union aux_ext *) NULL)
- memset ((PTR) (debug->external_aux + symhdr->iauxMax), 0,
+ memset ((debug->external_aux + symhdr->iauxMax), 0,
add * sizeof (union aux_ext));
symhdr->iauxMax += add;
}
@@ -1415,9 +1369,9 @@
add = rfd_align - (symhdr->crfd & (rfd_align - 1));
if (add != rfd_align)
{
- if (debug->external_rfd != (PTR) NULL)
- memset ((PTR) ((char *) debug->external_rfd
- + symhdr->crfd * swap->external_rfd_size),
+ if (debug->external_rfd != NULL)
+ memset (((char *) debug->external_rfd
+ + symhdr->crfd * swap->external_rfd_size),
0, (size_t) (add * swap->external_rfd_size));
symhdr->crfd += add;
}
@@ -1426,10 +1380,9 @@
/* Return the size required by the ECOFF debugging information. */
bfd_size_type
-bfd_ecoff_debug_size (abfd, debug, swap)
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
+bfd_ecoff_debug_size (bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap)
{
bfd_size_type tot;
@@ -1461,11 +1414,10 @@
correctly. */
static bfd_boolean
-ecoff_write_symhdr (abfd, debug, swap, where)
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
- file_ptr where;
+ecoff_write_symhdr (bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap,
+ file_ptr where)
{
HDRR * const symhdr = &debug->symbolic_header;
char *buff = NULL;
@@ -1528,11 +1480,10 @@
symbolic header. */
bfd_boolean
-bfd_ecoff_write_debug (abfd, debug, swap, where)
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
- file_ptr where;
+bfd_ecoff_write_debug (bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap,
+ file_ptr where)
{
HDRR * const symhdr = &debug->symbolic_header;
@@ -1542,7 +1493,7 @@
#define WRITE(ptr, count, size, offset) \
BFD_ASSERT (symhdr->offset == 0 \
|| (bfd_vma) bfd_tell (abfd) == symhdr->offset); \
- if (bfd_bwrite ((PTR) debug->ptr, (bfd_size_type) size * symhdr->count, abfd)\
+ if (bfd_bwrite (debug->ptr, (bfd_size_type) size * symhdr->count, abfd)\
!= size * symhdr->count) \
return FALSE;
@@ -1565,18 +1516,14 @@
/* Write out a shuffle list. */
-static bfd_boolean ecoff_write_shuffle
- PARAMS ((bfd *, const struct ecoff_debug_swap *, struct shuffle *,
- PTR space));
static bfd_boolean
-ecoff_write_shuffle (abfd, swap, shuffle, space)
- bfd *abfd;
- const struct ecoff_debug_swap *swap;
- struct shuffle *shuffle;
- PTR space;
+ecoff_write_shuffle (bfd *abfd,
+ const struct ecoff_debug_swap *swap,
+ struct shuffle *shuffle,
+ void * space)
{
- register struct shuffle *l;
+ struct shuffle *l;
unsigned long total;
total = 0;
@@ -1609,7 +1556,7 @@
if (s == NULL && i != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
+ if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i)
{
free (s);
return FALSE;
@@ -1624,23 +1571,22 @@
information. */
bfd_boolean
-bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
- PTR handle;
- bfd *abfd;
- struct ecoff_debug_info *debug;
- const struct ecoff_debug_swap *swap;
- struct bfd_link_info *info;
- file_ptr where;
+bfd_ecoff_write_accumulated_debug (void * handle,
+ bfd *abfd,
+ struct ecoff_debug_info *debug,
+ const struct ecoff_debug_swap *swap,
+ struct bfd_link_info *info,
+ file_ptr where)
{
struct accumulate *ainfo = (struct accumulate *) handle;
- PTR space = NULL;
+ void * space = NULL;
bfd_size_type amt;
if (! ecoff_write_symhdr (abfd, debug, swap, where))
goto error_return;
amt = ainfo->largest_file_shuffle;
- space = (PTR) bfd_malloc (amt);
+ space = bfd_malloc (amt);
if (space == NULL && ainfo->largest_file_shuffle != 0)
goto error_return;
@@ -1667,7 +1613,7 @@
BFD_ASSERT (ainfo->ss == (struct shuffle *) NULL);
null = 0;
- if (bfd_bwrite ((PTR) &null, (bfd_size_type) 1, abfd) != 1)
+ if (bfd_bwrite (&null, (bfd_size_type) 1, abfd) != 1)
goto error_return;
total = 1;
BFD_ASSERT (ainfo->ss_hash == NULL || ainfo->ss_hash->val == 1);
@@ -1679,7 +1625,7 @@
len = strlen (sh->root.string);
amt = len + 1;
- if (bfd_bwrite ((PTR) sh->root.string, amt, abfd) != amt)
+ if (bfd_bwrite (sh->root.string, amt, abfd) != amt)
goto error_return;
total += len + 1;
}
@@ -1694,7 +1640,7 @@
if (s == NULL && i != 0)
goto error_return;
- if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
+ if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i)
{
free (s);
goto error_return;
@@ -1719,7 +1665,7 @@
if (s == NULL && i != 0)
goto error_return;
- if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
+ if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i)
{
free (s);
goto error_return;
@@ -1755,9 +1701,7 @@
/* Compare FDR entries. This is called via qsort. */
static int
-cmp_fdrtab_entry (leftp, rightp)
- const PTR leftp;
- const PTR rightp;
+cmp_fdrtab_entry (const void * leftp, const void * rightp)
{
const struct ecoff_fdrtab_entry *lp =
(const struct ecoff_fdrtab_entry *) leftp;
@@ -1778,11 +1722,10 @@
search. */
static bfd_boolean
-mk_fdrtab (abfd, debug_info, debug_swap, line_info)
- bfd *abfd;
- struct ecoff_debug_info * const debug_info;
- const struct ecoff_debug_swap * const debug_swap;
- struct ecoff_find_line *line_info;
+mk_fdrtab (bfd *abfd,
+ struct ecoff_debug_info * const debug_info,
+ const struct ecoff_debug_swap * const debug_swap,
+ struct ecoff_find_line *line_info)
{
struct ecoff_fdrtab_entry *tab;
FDR *fdr_ptr;
@@ -1845,7 +1788,7 @@
'lookup_line'. */
/* The address of the first PDR is the offset of that
procedure relative to the beginning of file FDR. */
- tab->base_addr = fdr_ptr->adr;
+ tab->base_addr = fdr_ptr->adr;
}
else
{
@@ -1861,7 +1804,7 @@
The table is mostly sorted already, but there are cases (e.g.,
static functions in include files), where this does not hold.
Use "odump -PFv" to verify... */
- qsort ((PTR) line_info->fdrtab, (size_t) len,
+ qsort (line_info->fdrtab, (size_t) len,
sizeof (struct ecoff_fdrtab_entry), cmp_fdrtab_entry);
return TRUE;
@@ -1870,9 +1813,7 @@
/* Return index of first FDR that covers to OFFSET. */
static long
-fdrtab_lookup (line_info, offset)
- struct ecoff_find_line *line_info;
- bfd_vma offset;
+fdrtab_lookup (struct ecoff_find_line *line_info, bfd_vma offset)
{
long low, high, len;
long mid = -1;
@@ -1920,11 +1861,10 @@
LINE_INFO->cache. */
static bfd_boolean
-lookup_line (abfd, debug_info, debug_swap, line_info)
- bfd *abfd;
- struct ecoff_debug_info * const debug_info;
- const struct ecoff_debug_swap * const debug_swap;
- struct ecoff_find_line *line_info;
+lookup_line (bfd *abfd,
+ struct ecoff_debug_info * const debug_info,
+ const struct ecoff_debug_swap * const debug_swap,
+ struct ecoff_find_line *line_info)
{
struct ecoff_fdrtab_entry *tab;
bfd_vma offset;
@@ -1947,7 +1887,7 @@
i = fdrtab_lookup (line_info, offset);
if (i < 0)
return FALSE; /* no FDR, no fun... */
-
+
/* eraxxon: 'fdrtab_lookup' doesn't give what we want, at least for Compaq's
C++ compiler 6.2. Consider three FDRs with starting addresses of x, y,
and z, respectively, such that x < y < z. Assume further that
@@ -2112,7 +2052,7 @@
read stabs FDRs as ECOFF ones. However, I don't think this will
harm anything. */
i = 0;
-
+
/* Search FDR list starting at tab[i] for the PDR that best matches
OFFSET. Normally, the FDR list is only one entry long. */
best_fdr = NULL;
@@ -2130,7 +2070,7 @@
pdr_ptr = ((char *) debug_info->external_pdr
+ fdr_ptr->ipdFirst * external_pdr_size);
pdr_end = pdr_ptr + fdr_ptr->cpd * external_pdr_size;
- (*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
+ (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr);
/* Find PDR that is closest to OFFSET. If pdr.prof is set,
the procedure entry-point *may* be 0x10 below pdr.adr. We
simply pretend that pdr.prof *implies* a lower entry-point.
@@ -2139,7 +2079,7 @@
for (pdr_hold = NULL;
pdr_ptr < pdr_end;
(pdr_ptr += external_pdr_size,
- (*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr)))
+ (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr)))
{
if (offset >= (pdr.adr - 0x10 * pdr.prof))
{
@@ -2157,7 +2097,7 @@
if (!best_pdr || (min_dist >= 0 && min_dist < best_dist))
{
- best_dist = (bfd_vma) min_dist;
+ best_dist = (bfd_vma) min_dist;
best_fdr = fdr_ptr;
best_pdr = pdr_hold;
}
@@ -2173,7 +2113,7 @@
/* Phew, finally we got something that we can hold onto. */
fdr_ptr = best_fdr;
pdr_ptr = best_pdr;
- (*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
+ (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr);
/* Now we can look for the actual line number. The line numbers
are stored in a very funky format, which I won't try to
describe. The search is bounded by the end of the FDRs line
@@ -2418,17 +2358,15 @@
/* Do the work of find_nearest_line. */
bfd_boolean
-_bfd_ecoff_locate_line (abfd, section, offset, debug_info, debug_swap,
- line_info, filename_ptr, functionname_ptr, retline_ptr)
- bfd *abfd;
- asection *section;
- bfd_vma offset;
- struct ecoff_debug_info * const debug_info;
- const struct ecoff_debug_swap * const debug_swap;
- struct ecoff_find_line *line_info;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *retline_ptr;
+_bfd_ecoff_locate_line (bfd *abfd,
+ asection *section,
+ bfd_vma offset,
+ struct ecoff_debug_info * const debug_info,
+ const struct ecoff_debug_swap * const debug_swap,
+ struct ecoff_find_line *line_info,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *retline_ptr)
{
offset += section->vma;
@@ -2464,13 +2402,8 @@
/* Collect a shuffle into a memory buffer. */
-static bfd_boolean ecoff_collect_shuffle
- PARAMS ((struct shuffle *, bfd_byte *));
-
static bfd_boolean
-ecoff_collect_shuffle (l, buff)
- struct shuffle *l;
- bfd_byte *buff;
+ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff)
{
unsigned long total;
@@ -2496,9 +2429,8 @@
/* Copy PDR information into a memory buffer. */
bfd_boolean
-_bfd_ecoff_get_accumulated_pdr (handle, buff)
- PTR handle;
- bfd_byte *buff;
+_bfd_ecoff_get_accumulated_pdr (void * handle,
+ bfd_byte *buff)
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -2508,9 +2440,7 @@
/* Copy symbol information into a memory buffer. */
bfd_boolean
-_bfd_ecoff_get_accumulated_sym (handle, buff)
- PTR handle;
- bfd_byte *buff;
+_bfd_ecoff_get_accumulated_sym (void * handle, bfd_byte *buff)
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -2520,9 +2450,7 @@
/* Copy the string table into a memory buffer. */
bfd_boolean
-_bfd_ecoff_get_accumulated_ss (handle, buff)
- PTR handle;
- bfd_byte *buff;
+_bfd_ecoff_get_accumulated_ss (void * handle, bfd_byte *buff)
{
struct accumulate *ainfo = (struct accumulate *) handle;
struct string_hash_entry *sh;
@@ -2541,7 +2469,7 @@
size_t len;
len = strlen (sh->root.string);
- memcpy (buff, (PTR) sh->root.string, len + 1);
+ memcpy (buff, sh->root.string, len + 1);
total += len + 1;
buff += len + 1;
}
diff --git a/bfd/ecoffswap.h b/bfd/ecoffswap.h
index 3cf917c..3306e6b 100644
--- a/bfd/ecoffswap.h
+++ b/bfd/ecoffswap.h
@@ -451,7 +451,7 @@
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
if (intern->iss == (signed long) 0xffffffff)
intern->iss = -1;
-#endif
+#endif
/* Now the fun stuff... */
if (bfd_header_big_endian (abfd))
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index 569e846..9a6ff6f 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -1,5 +1,5 @@
/* ELF attributes support (based on ARM EABI attributes).
- Copyright 2005, 2006, 2007, 2009, 2010
+ Copyright 2005, 2006, 2007, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -347,6 +347,10 @@
int i;
int vendor;
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return;
+
for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
{
in_attr
@@ -428,7 +432,7 @@
bfd_byte *contents;
bfd_byte *p;
bfd_vma len;
- const char *std_section;
+ const char *std_sec;
contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
if (!contents)
@@ -440,7 +444,7 @@
return;
}
p = contents;
- std_section = get_elf_backend_data (abfd)->obj_attrs_vendor;
+ std_sec = get_elf_backend_data (abfd)->obj_attrs_vendor;
if (*(p++) == 'A')
{
len = hdr->sh_size - 1;
@@ -455,11 +459,11 @@
if (section_len > len)
section_len = len;
len -= section_len;
- namelen = strlen ((char *)p) + 1;
+ namelen = strlen ((char *) p) + 1;
section_len -= namelen + 4;
- if (std_section && strcmp ((char *)p, std_section) == 0)
+ if (std_sec && strcmp ((char *) p, std_sec) == 0)
vendor = OBJ_ATTR_PROC;
- else if (strcmp ((char *)p, "gnu") == 0)
+ else if (strcmp ((char *) p, "gnu") == 0)
vendor = OBJ_ATTR_GNU;
else
{
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 935718f..add80b3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1,7 +1,5 @@
/* 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, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright 1992-2013 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -191,8 +189,8 @@
FIXME: There is no real need for this field if def_dynamic is never
cleared and all places that test def_dynamic also test def_regular. */
unsigned int dynamic_def : 1;
- /* Symbol is weak in all shared objects. */
- unsigned int dynamic_weak : 1;
+ /* Symbol has a non-weak reference from a shared object. */
+ unsigned int ref_dynamic_nonweak : 1;
/* Symbol is referenced with a relocation where C/C++ pointer equality
matters. */
unsigned int pointer_equality_needed : 1;
@@ -402,7 +400,8 @@
one line. */
enum elf_target_id
{
- ALPHA_ELF_DATA = 1,
+ AARCH64_ELF_DATA = 1,
+ ALPHA_ELF_DATA,
ARM_ELF_DATA,
AVR_ELF_DATA,
BFIN_ELF_DATA,
@@ -416,9 +415,11 @@
M32R_ELF_DATA,
M68HC11_ELF_DATA,
M68K_ELF_DATA,
+ METAG_ELF_DATA,
MICROBLAZE_ELF_DATA,
MIPS_ELF_DATA,
MN10300_ELF_DATA,
+ NIOS2_ELF_DATA,
PPC32_ELF_DATA,
PPC64_ELF_DATA,
S390_ELF_DATA,
@@ -428,6 +429,7 @@
TIC6X_ELF_DATA,
X86_64_ELF_DATA,
XTENSA_ELF_DATA,
+ XGATE_ELF_DATA,
TILEGX_ELF_DATA,
TILEPRO_ELF_DATA,
GENERIC_ELF_DATA
@@ -496,6 +498,9 @@
/* The _PROCEDURE_LINKAGE_TABLE_ symbol. */
struct elf_link_hash_entry *hplt;
+ /* The _DYNAMIC symbol. */
+ struct elf_link_hash_entry *hdynamic;
+
/* A pointer to information used to merge SEC_MERGE sections. */
void *merge_info;
@@ -636,7 +641,8 @@
reloc_class_normal,
reloc_class_relative,
reloc_class_plt,
- reloc_class_copy
+ reloc_class_copy,
+ reloc_class_ifunc
};
struct elf_reloc_cookie
@@ -875,12 +881,12 @@
bfd_boolean (*check_directives)
(bfd *abfd, struct bfd_link_info *info);
- /* The AS_NEEDED_CLEANUP function is called once per --as-needed
- input file that was not needed by the add_symbols phase of the
- ELF backend linker. The function must undo any target specific
- changes in the symbol hash table. */
- bfd_boolean (*as_needed_cleanup)
- (bfd *abfd, struct bfd_link_info *info);
+ /* The NOTICE_AS_NEEDED function is called as the linker is about to
+ handle an as-needed lib (ACT = notice_as_needed), and after the
+ linker has decided to keep the lib (ACT = notice_needed) or when
+ the lib is not needed (ACT = notice_not_needed). */
+ bfd_boolean (*notice_as_needed)
+ (bfd *abfd, struct bfd_link_info *info, enum notice_asneeded_action act);
/* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
linker for every symbol which is defined by a dynamic object and
@@ -1123,7 +1129,7 @@
/* This function returns class of a reloc type. */
enum elf_reloc_type_class (*elf_backend_reloc_type_class)
- (const Elf_Internal_Rela *);
+ (const struct bfd_link_info *, const asection *, const Elf_Internal_Rela *);
/* This function, if defined, removes information about discarded functions
from other sections which mention them. */
@@ -1185,7 +1191,8 @@
see elf.c, elfcode.h. */
bfd *(*elf_backend_bfd_from_remote_memory)
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
+ bfd_size_type len));
/* This function is used by `_bfd_elf_get_synthetic_symtab';
see elf.c. */
@@ -1201,19 +1208,10 @@
asection *(*common_section) (asection *);
/* Return TRUE if we can merge 2 definitions. */
- bfd_boolean (*merge_symbol) (struct bfd_link_info *,
- struct elf_link_hash_entry **,
- struct elf_link_hash_entry *,
- Elf_Internal_Sym *, asection **,
- bfd_vma *, unsigned int *,
- bfd_boolean *, bfd_boolean *,
- bfd_boolean *, bfd_boolean *,
- bfd_boolean *, bfd_boolean *,
- bfd_boolean *, bfd_boolean *,
- bfd *, asection **,
- bfd_boolean *, bfd_boolean *,
- bfd_boolean *, bfd_boolean *,
- bfd *, asection **);
+ bfd_boolean (*merge_symbol) (struct elf_link_hash_entry *,
+ const Elf_Internal_Sym *, asection **,
+ bfd_boolean, bfd_boolean,
+ bfd *, const asection *);
/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
bfd_boolean (*elf_hash_symbol) (struct elf_link_hash_entry *);
@@ -1279,6 +1277,9 @@
/* This is non-zero if static TLS segments require a special alignment. */
unsigned static_tls_alignment;
+ /* Alignment for the PT_GNU_STACK segment. */
+ unsigned stack_align;
+
/* This is TRUE if the linker should act like collect and gather
global constructors and destructors by name. This is TRUE for
MIPS ELF because the Irix 5 tools can not handle the .init
@@ -1367,6 +1368,9 @@
/* The ELF header for this section. */
Elf_Internal_Shdr this_hdr;
+ /* INPUT_SECTION_FLAGS if specified in the linker script. */
+ struct flag_info *section_flag_info;
+
/* Information about the REL and RELA reloc sections associated
with this section, if any. */
struct bfd_elf_section_reloc_data rel, rela;
@@ -1498,6 +1502,64 @@
bfd_byte data[1];
};
+/* NT_GNU_BUILD_ID note type info for input BFDs. */
+struct elf_build_id
+{
+ size_t size;
+ bfd_byte data[1];
+};
+
+/* tdata information grabbed from an elf core file. */
+struct core_elf_obj_tdata
+{
+ int signal;
+ int pid;
+ int lwpid;
+ char* program;
+ char* command;
+};
+
+/* Extra tdata information held for output ELF BFDs. */
+struct output_elf_obj_tdata
+{
+ struct elf_segment_map *seg_map;
+ struct elf_strtab_hash *strtab_ptr;
+
+ /* STT_SECTION symbols for each section */
+ asymbol **section_syms;
+
+ /* Used to determine if PT_GNU_EH_FRAME segment header should be
+ created. */
+ asection *eh_frame_hdr;
+
+ /* NT_GNU_BUILD_ID note type info. */
+ struct
+ {
+ bfd_boolean (*after_write_object_contents) (bfd *);
+ const char *style;
+ asection *sec;
+ } build_id;
+
+ /* Records the result of `get_program_header_size'. */
+ bfd_size_type program_header_size;
+
+ /* Used when laying out sections. */
+ file_ptr next_file_pos;
+
+ int num_section_syms;
+ unsigned int shstrtab_section, strtab_section;
+
+ /* Segment flags for the PT_GNU_STACK segment. */
+ unsigned int stack_flags;
+
+ /* This is set to TRUE if the object was created by the backend
+ linker. */
+ bfd_boolean linker;
+
+ /* Used to determine if the e_flags field has been initialized */
+ bfd_boolean flags_init;
+};
+
/* Some private data is stashed away for future use using the tdata pointer
in the bfd structure. */
@@ -1506,13 +1568,6 @@
Elf_Internal_Ehdr elf_header[1]; /* Actual data, but ref like ptr */
Elf_Internal_Shdr **elf_sect_ptr;
Elf_Internal_Phdr *phdr;
- struct elf_segment_map *segment_map;
- struct elf_strtab_hash *strtab_ptr;
- int num_locals;
- int num_globals;
- unsigned int num_elf_sections; /* elf_sect_ptr size */
- int num_section_syms;
- asymbol **section_syms; /* STT_SECTION symbols for each section */
Elf_Internal_Shdr symtab_hdr;
Elf_Internal_Shdr shstrtab_hdr;
Elf_Internal_Shdr strtab_hdr;
@@ -1522,20 +1577,9 @@
Elf_Internal_Shdr dynverref_hdr;
Elf_Internal_Shdr dynverdef_hdr;
Elf_Internal_Shdr symtab_shndx_hdr;
- unsigned int symtab_section, shstrtab_section;
- unsigned int strtab_section, dynsymtab_section;
- unsigned int symtab_shndx_section;
- unsigned int dynversym_section, dynverdef_section, dynverref_section;
- file_ptr next_file_pos;
bfd_vma gp; /* The gp value */
unsigned int gp_size; /* The gp size */
-
- /* Information grabbed from an elf core file. */
- int core_signal;
- int core_pid;
- int core_lwpid;
- char* core_program;
- char* core_command;
+ unsigned int num_elf_sections; /* elf_sect_ptr size */
/* A mapping from external symbols to entries in the linker hash
table, used when linking. This is indexed by the symbol index
@@ -1566,36 +1610,17 @@
are used by a dynamic object. */
const char *dt_audit;
- /* Records the result of `get_program_header_size'. */
- bfd_size_type program_header_size;
-
/* Used by find_nearest_line entry point. */
void *line_info;
- /* Used by MIPS ELF find_nearest_line entry point. The structure
- could be included directly in this one, but there's no point to
- wasting the memory just for the infrequently called
- find_nearest_line. */
- struct mips_elf_find_line *find_line_info;
-
/* A place to stash dwarf1 info for this bfd. */
struct dwarf1_debug *dwarf1_find_line_info;
/* A place to stash dwarf2 info for this bfd. */
void *dwarf2_find_line_info;
- /* An array of stub sections indexed by symbol number, used by the
- MIPS ELF linker. FIXME: We should figure out some way to only
- include this field for a MIPS ELF target. */
- asection **local_stubs;
- asection **local_call_stubs;
-
- /* Used to determine if PT_GNU_EH_FRAME segment header should be
- created. */
- asection *eh_frame_hdr;
-
- Elf_Internal_Shdr **group_sect_ptr;
- int num_group;
+ /* Stash away info for yet another find line/function variant. */
+ void *elf_find_function_cache;
/* Number of symbol version definitions we are about to emit. */
unsigned int cverdefs;
@@ -1603,34 +1628,44 @@
/* Number of symbol version references we are about to emit. */
unsigned int cverrefs;
- /* Segment flags for the PT_GNU_STACK segment. */
- unsigned int stack_flags;
-
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
/* Symbol version references to external objects. */
Elf_Internal_Verneed *verref;
- /* The Irix 5 support uses two virtual sections, which represent
- text/data symbols defined in dynamic objects. */
- asymbol *elf_data_symbol;
- asymbol *elf_text_symbol;
- asection *elf_data_section;
- asection *elf_text_section;
-
/* A pointer to the .eh_frame section. */
asection *eh_frame_section;
+ /* Symbol buffer. */
+ void *symbuf;
+
+ obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES];
+ obj_attribute_list *other_obj_attributes[2];
+
+ /* NT_GNU_BUILD_ID note type. */
+ struct elf_build_id *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;
+
+ Elf_Internal_Shdr **group_sect_ptr;
+ int num_group;
+
+ unsigned int symtab_section, symtab_shndx_section, dynsymtab_section;
+ unsigned int dynversym_section, dynverdef_section, dynverref_section;
+
+ /* An identifier used to distinguish different target
+ specific extensions to this structure. */
+ enum elf_target_id object_id;
+
/* Whether a dyanmic object was specified normally on the linker
command line, or was specified when --as-needed was in effect,
or was found via a DT_NEEDED entry. */
enum dynamic_lib_link_class dyn_lib_class;
- /* This is set to TRUE if the object was created by the backend
- linker. */
- bfd_boolean linker;
-
/* Irix 5 often screws up the symbol table, sorting local symbols
after global symbols. This flag is set if the symbol table in
this BFD appears to be screwed up. If it is, we ignore the
@@ -1638,48 +1673,35 @@
symbols. */
bfd_boolean bad_symtab;
- /* Used to determine if the e_flags field has been initialized */
- bfd_boolean flags_init;
-
- /* Symbol buffer. */
- void *symbuf;
-
- obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES];
- obj_attribute_list *other_obj_attributes[2];
-
- /* Called at the end of _bfd_elf_write_object_contents if not NULL. */
- bfd_boolean (*after_write_object_contents) (bfd *);
- void *after_write_object_contents_info;
-
- /* NT_GNU_BUILD_ID note type. */
- 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 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. */
- enum elf_target_id object_id;
+ /* Information grabbed from an elf core file. */
+ struct core_elf_obj_tdata *core;
+
+ /* More information held for output ELF BFDs. */
+ struct output_elf_obj_tdata *o;
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
#define elf_object_id(bfd) (elf_tdata(bfd) -> object_id)
-#define elf_program_header_size(bfd) (elf_tdata(bfd) -> program_header_size)
+#define elf_program_header_size(bfd) (elf_tdata(bfd) -> o->program_header_size)
#define elf_elfheader(bfd) (elf_tdata(bfd) -> elf_header)
#define elf_elfsections(bfd) (elf_tdata(bfd) -> elf_sect_ptr)
#define elf_numsections(bfd) (elf_tdata(bfd) -> num_elf_sections)
-#define elf_shstrtab(bfd) (elf_tdata(bfd) -> strtab_ptr)
+#define elf_seg_map(bfd) (elf_tdata(bfd) -> o->seg_map)
+#define elf_next_file_pos(bfd) (elf_tdata(bfd) -> o->next_file_pos)
+#define elf_eh_frame_hdr(bfd) (elf_tdata(bfd) -> o->eh_frame_hdr)
+#define elf_linker(bfd) (elf_tdata(bfd) -> o->linker)
+#define elf_stack_flags(bfd) (elf_tdata(bfd) -> o->stack_flags)
+#define elf_shstrtab(bfd) (elf_tdata(bfd) -> o->strtab_ptr)
#define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section)
#define elf_symtab_shndx(bfd) (elf_tdata(bfd) -> symtab_shndx_section)
+#define elf_strtab_sec(bfd) (elf_tdata(bfd) -> o->strtab_section)
+#define elf_shstrtab_sec(bfd) (elf_tdata(bfd) -> o->shstrtab_section)
#define elf_symtab_hdr(bfd) (elf_tdata(bfd) -> symtab_hdr)
#define elf_dynsymtab(bfd) (elf_tdata(bfd) -> dynsymtab_section)
#define elf_dynversym(bfd) (elf_tdata(bfd) -> dynversym_section)
@@ -1687,10 +1709,8 @@
#define elf_dynverref(bfd) (elf_tdata(bfd) -> dynverref_section)
#define elf_eh_frame_section(bfd) \
(elf_tdata(bfd) -> eh_frame_section)
-#define elf_num_locals(bfd) (elf_tdata(bfd) -> num_locals)
-#define elf_num_globals(bfd) (elf_tdata(bfd) -> num_globals)
-#define elf_section_syms(bfd) (elf_tdata(bfd) -> section_syms)
-#define elf_num_section_syms(bfd) (elf_tdata(bfd) -> num_section_syms)
+#define elf_section_syms(bfd) (elf_tdata(bfd) -> o->section_syms)
+#define elf_num_section_syms(bfd) (elf_tdata(bfd) -> o->num_section_syms)
#define core_prpsinfo(bfd) (elf_tdata(bfd) -> prpsinfo)
#define core_prstatus(bfd) (elf_tdata(bfd) -> prstatus)
#define elf_gp(bfd) (elf_tdata(bfd) -> gp)
@@ -1703,7 +1723,7 @@
#define elf_dt_audit(bfd) (elf_tdata(bfd) -> dt_audit)
#define elf_dyn_lib_class(bfd) (elf_tdata(bfd) -> dyn_lib_class)
#define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab)
-#define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init)
+#define elf_flags_init(bfd) (elf_tdata(bfd) -> o->flags_init)
#define elf_known_obj_attributes(bfd) (elf_tdata (bfd) -> known_obj_attributes)
#define elf_other_obj_attributes(bfd) (elf_tdata (bfd) -> other_obj_attributes)
#define elf_known_obj_attributes_proc(bfd) \
@@ -1758,7 +1778,8 @@
(bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section);
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
- (const Elf_Internal_Rela *);
+ (const struct bfd_link_info *, const asection *,
+ const Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rela_local_sym
(bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rel_local_sym
@@ -1787,6 +1808,8 @@
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
(bfd *);
+extern void _bfd_elf_link_hash_table_free
+ (struct bfd_link_hash_table *);
extern void _bfd_elf_link_hash_copy_indirect
(struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
@@ -1813,8 +1836,7 @@
(bfd *, asection *, void *);
extern asection *_bfd_elf_check_kept_section
(asection *, struct bfd_link_info *);
-extern void _bfd_elf_link_just_syms
- (asection *, struct bfd_link_info *);
+#define _bfd_elf_link_just_syms _bfd_generic_link_just_syms
extern void _bfd_elf_copy_link_hash_symbol_type
(bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
extern bfd_boolean _bfd_elf_size_group_sections
@@ -1890,8 +1912,6 @@
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_new_section_hook
(bfd *, asection *);
-extern bfd_boolean _bfd_elf_init_reloc_shdr
- (bfd *, struct bfd_elf_section_reloc_data *, asection *, bfd_boolean);
extern const struct bfd_elf_special_section *_bfd_elf_get_special_section
(const char *, const struct bfd_elf_special_section *, unsigned int);
extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr
@@ -1926,8 +1946,12 @@
(struct elf_strtab_hash *, bfd_size_type);
extern void _bfd_elf_strtab_delref
(struct elf_strtab_hash *, bfd_size_type);
+extern unsigned int _bfd_elf_strtab_refcount
+ (struct elf_strtab_hash *, bfd_size_type);
extern void _bfd_elf_strtab_clear_all_refs
- (struct elf_strtab_hash *);
+ (struct elf_strtab_hash *tab);
+extern void _bfd_elf_strtab_restore_size
+ (struct elf_strtab_hash *, bfd_size_type);
extern bfd_size_type _bfd_elf_strtab_size
(struct elf_strtab_hash *);
extern bfd_size_type _bfd_elf_strtab_offset
@@ -1955,15 +1979,11 @@
(bfd *, struct bfd_link_info *, asection *, bfd_byte *);
extern bfd_boolean _bfd_elf_write_section_eh_frame_hdr
(bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_eh_frame_present
+ (struct bfd_link_info *);
extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr
(struct bfd_link_info *);
-extern bfd_boolean _bfd_elf_merge_symbol
- (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection **, bfd_vma *, unsigned int *,
- struct elf_link_hash_entry **, bfd_boolean *,
- bfd_boolean *, bfd_boolean *, bfd_boolean *);
-
extern bfd_boolean _bfd_elf_hash_symbol (struct elf_link_hash_entry *);
extern long _bfd_elf_link_lookup_local_dynindx
@@ -2119,6 +2139,8 @@
extern bfd_boolean _bfd_elf_relocs_compatible
(const bfd_target *, const bfd_target *);
+extern bfd_boolean _bfd_elf_notice_as_needed
+ (bfd *, struct bfd_link_info *, enum notice_asneeded_action);
extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup
(bfd *, struct bfd_link_info *, const char *);
@@ -2145,9 +2167,6 @@
extern asection *_bfd_elf_common_section
(asection *);
-extern void _bfd_dwarf2_cleanup_debug_info
- (bfd *);
-
extern bfd_vma _bfd_elf_default_got_elt_size
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, bfd *,
unsigned long);
@@ -2218,8 +2237,8 @@
extern int bfd_elf_get_default_section_type (flagword);
-extern void bfd_elf_lookup_section_flags
- (struct bfd_link_info *, struct flag_info *);
+extern bfd_boolean bfd_elf_lookup_section_flags
+ (struct bfd_link_info *, struct flag_info *, asection *);
extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section
(bfd * abfd, asection * section);
@@ -2253,19 +2272,67 @@
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_s390_prefix
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_last_break
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_system_call
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_tdb
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_arm_vfp
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_tls
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_break
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_watch
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
(bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_register_note
(bfd *, char *, int *, const char *, const void *, int);
+/* Internal structure which holds information to be included in the
+ PRPSINFO section of Linux core files.
+
+ This is an "internal" structure in the sense that it should be used
+ to pass information to BFD (via the `elfcore_write_linux_prpsinfo'
+ function), so things like endianess shouldn't be an issue. This
+ structure will eventually be converted in one of the
+ `elf_external_linux_*' structures and written out to an output bfd
+ by one of the functions declared below. */
+
+struct elf_internal_linux_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long pr_flag; /* Flags. */
+ unsigned int pr_uid;
+ unsigned int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ char pr_fname[16 + 1]; /* Filename of executable. */
+ char pr_psargs[80 + 1]; /* Initial part of arg list. */
+ };
+
+/* Linux/most 32-bit archs. */
+extern char *elfcore_write_linux_prpsinfo32
+ (bfd *, char *, int *, const struct elf_internal_linux_prpsinfo *);
+
+/* Linux/most 64-bit archs. */
+extern char *elfcore_write_linux_prpsinfo64
+ (bfd *, char *, int *, const struct elf_internal_linux_prpsinfo *);
+
+/* Linux/PPC32 uses different layout compared to most archs. */
+extern char *elfcore_write_ppc_linux_prpsinfo32
+ (bfd *, char *, int *, const struct elf_internal_linux_prpsinfo *);
+
extern bfd *_bfd_elf32_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type));
extern bfd *_bfd_elf64_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type));
extern bfd_vma bfd_elf_obj_attr_size (bfd *);
extern void bfd_elf_set_obj_attr_contents (bfd *, bfd_byte *, bfd_vma);
@@ -2313,12 +2380,9 @@
extern bfd_boolean _bfd_elf_create_ifunc_sections
(bfd *, struct bfd_link_info *);
-extern asection * _bfd_elf_create_ifunc_dyn_reloc
- (bfd *, struct bfd_link_info *, asection *sec, asection *sreloc,
- struct elf_dyn_relocs **);
extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
(struct bfd_link_info *, struct elf_link_hash_entry *,
- struct elf_dyn_relocs **, unsigned int, unsigned int);
+ struct elf_dyn_relocs **, unsigned int, unsigned int, unsigned int);
extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *);
extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *);
@@ -2415,10 +2479,12 @@
link, we remove such relocations. Otherwise, we just want the
section contents zeroed and avoid any special processing. */
#define RELOC_AGAINST_DISCARDED_SECTION(info, input_bfd, input_section, \
- rel, relend, howto, contents) \
+ rel, count, relend, \
+ howto, index, contents) \
{ \
+ int i_; \
_bfd_clear_contents (howto, input_bfd, input_section, \
- contents + rel->r_offset); \
+ contents + rel[index].r_offset); \
\
if (info->relocatable \
&& (input_section->flags & SEC_DEBUGGING)) \
@@ -2436,21 +2502,26 @@
rel_hdr = _bfd_elf_single_rel_hdr (input_section); \
rel_hdr->sh_size -= rel_hdr->sh_entsize; \
\
- memmove (rel, rel + 1, (relend - rel - 1) * sizeof (*rel)); \
+ memmove (rel, rel + count, \
+ (relend - rel - count) * sizeof (*rel)); \
\
input_section->reloc_count--; \
- relend--; \
+ relend -= count; \
rel--; \
continue; \
} \
} \
\
- rel->r_info = 0; \
- rel->r_addend = 0; \
+ for (i_ = 0; i_ < count; i_++) \
+ { \
+ rel[i_].r_info = 0; \
+ rel[i_].r_addend = 0; \
+ } \
+ rel += count - 1; \
continue; \
}
-/* Will a symbol be bound to the the definition within the shared
+/* Will a symbol be bound to the definition within the shared
library, if any. A unique symbol can never be bound locally. */
#define SYMBOLIC_BIND(INFO, H) \
(!(H)->unique_global \
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 54142b2..832a991 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,6 +1,6 @@
/* .eh_frame section optimization.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
Written by Jakub Jelinek <[email protected]>.
This file is part of BFD, the Binary File Descriptor library.
@@ -491,7 +491,7 @@
return;
if (sec->size == 0
- || sec->sec_info_type != ELF_INFO_TYPE_NONE)
+ || sec->sec_info_type != SEC_INFO_TYPE_NONE)
{
/* This file does not contain .eh_frame information. */
return;
@@ -904,7 +904,7 @@
BFD_ASSERT (cie_count == num_cies);
elf_section_data (sec)->sec_info = sec_info;
- sec->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
+ sec->sec_info_type = SEC_INFO_TYPE_EH_FRAME;
if (hdr_info->merge_cies)
{
sec_info->cies = local_cies;
@@ -1137,7 +1137,7 @@
struct eh_frame_hdr_info *hdr_info;
unsigned int ptr_size, offset;
- if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
return FALSE;
sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
@@ -1243,10 +1243,30 @@
if (hdr_info->table)
sec->size += 4 + hdr_info->fde_count * 8;
- elf_tdata (abfd)->eh_frame_hdr = sec;
+ elf_eh_frame_hdr (abfd) = sec;
return TRUE;
}
+/* Return true if there is at least one non-empty .eh_frame section in
+ input files. Can only be called after ld has mapped input to
+ output sections, and before sections are stripped. */
+bfd_boolean
+_bfd_elf_eh_frame_present (struct bfd_link_info *info)
+{
+ asection *eh = bfd_get_section_by_name (info->output_bfd, ".eh_frame");
+
+ if (eh == NULL)
+ return FALSE;
+
+ /* Count only sections which have at least a single CIE or FDE.
+ There cannot be any CIE or FDE <= 8 bytes. */
+ for (eh = eh->map_head.s; eh != NULL; eh = eh->map_head.s)
+ if (eh->size > 8)
+ return TRUE;
+
+ return FALSE;
+}
+
/* This function is called from size_dynamic_sections.
It needs to decide whether .eh_frame_hdr should be output or not,
because when the dynamic symbol table has been sized it is too late
@@ -1255,8 +1275,6 @@
bfd_boolean
_bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
{
- asection *o;
- bfd *abfd;
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
@@ -1265,24 +1283,9 @@
if (hdr_info->hdr_sec == NULL)
return TRUE;
- if (bfd_is_abs_section (hdr_info->hdr_sec->output_section))
- {
- hdr_info->hdr_sec = NULL;
- return TRUE;
- }
-
- abfd = NULL;
- if (info->eh_frame_hdr)
- for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- /* Count only sections which have at least a single CIE or FDE.
- There cannot be any CIE or FDE <= 8 bytes. */
- o = bfd_get_section_by_name (abfd, ".eh_frame");
- if (o && o->size > 8 && !bfd_is_abs_section (o->output_section))
- break;
- }
-
- if (abfd == NULL)
+ if (bfd_is_abs_section (hdr_info->hdr_sec->output_section)
+ || !info->eh_frame_hdr
+ || !_bfd_elf_eh_frame_present (info))
{
hdr_info->hdr_sec->flags |= SEC_EXCLUDE;
hdr_info->hdr_sec = NULL;
@@ -1307,7 +1310,7 @@
struct eh_frame_sec_info *sec_info;
unsigned int lo, hi, mid;
- if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
return offset;
sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
@@ -1395,7 +1398,7 @@
unsigned int ptr_size;
struct eh_cie_fde *ent;
- if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
/* FIXME: octets_per_byte. */
return bfd_set_section_contents (abfd, sec->output_section, contents,
sec->output_offset, sec->size);
@@ -1767,74 +1770,81 @@
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
asection *sec;
- bfd_byte *contents;
- asection *eh_frame_sec;
- bfd_size_type size;
- bfd_boolean retval;
- bfd_vma encoded_eh_frame;
+ bfd_boolean retval = TRUE;
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
sec = hdr_info->hdr_sec;
- if (sec == NULL)
- return TRUE;
- size = EH_FRAME_HDR_SIZE;
- if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
- size += 4 + hdr_info->fde_count * 8;
- contents = (bfd_byte *) bfd_malloc (size);
- if (contents == NULL)
- return FALSE;
-
- eh_frame_sec = bfd_get_section_by_name (abfd, ".eh_frame");
- if (eh_frame_sec == NULL)
+ if (info->eh_frame_hdr && sec != NULL)
{
- free (contents);
- return FALSE;
- }
+ bfd_byte *contents;
+ asection *eh_frame_sec;
+ bfd_size_type size;
+ bfd_vma encoded_eh_frame;
- memset (contents, 0, EH_FRAME_HDR_SIZE);
- contents[0] = 1; /* Version. */
- contents[1] = get_elf_backend_data (abfd)->elf_backend_encode_eh_address
- (abfd, info, eh_frame_sec, 0, sec, 4,
- &encoded_eh_frame); /* .eh_frame offset. */
+ size = EH_FRAME_HDR_SIZE;
+ if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
+ size += 4 + hdr_info->fde_count * 8;
+ contents = (bfd_byte *) bfd_malloc (size);
+ if (contents == NULL)
+ return FALSE;
- if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
- {
- contents[2] = DW_EH_PE_udata4; /* FDE count encoding. */
- contents[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4; /* Search table enc. */
- }
- else
- {
- contents[2] = DW_EH_PE_omit;
- contents[3] = DW_EH_PE_omit;
- }
- bfd_put_32 (abfd, encoded_eh_frame, contents + 4);
-
- if (contents[2] != DW_EH_PE_omit)
- {
- unsigned int i;
-
- bfd_put_32 (abfd, hdr_info->fde_count, contents + EH_FRAME_HDR_SIZE);
- qsort (hdr_info->array, hdr_info->fde_count, sizeof (*hdr_info->array),
- vma_compare);
- for (i = 0; i < hdr_info->fde_count; i++)
+ eh_frame_sec = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (eh_frame_sec == NULL)
{
- bfd_put_32 (abfd,
- hdr_info->array[i].initial_loc
- - sec->output_section->vma,
- contents + EH_FRAME_HDR_SIZE + i * 8 + 4);
- bfd_put_32 (abfd,
- hdr_info->array[i].fde - sec->output_section->vma,
- contents + EH_FRAME_HDR_SIZE + i * 8 + 8);
+ free (contents);
+ return FALSE;
}
- }
- /* FIXME: octets_per_byte. */
- retval = bfd_set_section_contents (abfd, sec->output_section,
- contents, (file_ptr) sec->output_offset,
- sec->size);
- free (contents);
+ memset (contents, 0, EH_FRAME_HDR_SIZE);
+ /* Version. */
+ contents[0] = 1;
+ /* .eh_frame offset. */
+ contents[1] = get_elf_backend_data (abfd)->elf_backend_encode_eh_address
+ (abfd, info, eh_frame_sec, 0, sec, 4, &encoded_eh_frame);
+
+ if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
+ {
+ /* FDE count encoding. */
+ contents[2] = DW_EH_PE_udata4;
+ /* Search table encoding. */
+ contents[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4;
+ }
+ else
+ {
+ contents[2] = DW_EH_PE_omit;
+ contents[3] = DW_EH_PE_omit;
+ }
+ bfd_put_32 (abfd, encoded_eh_frame, contents + 4);
+
+ if (contents[2] != DW_EH_PE_omit)
+ {
+ unsigned int i;
+
+ bfd_put_32 (abfd, hdr_info->fde_count, contents + EH_FRAME_HDR_SIZE);
+ qsort (hdr_info->array, hdr_info->fde_count,
+ sizeof (*hdr_info->array), vma_compare);
+ for (i = 0; i < hdr_info->fde_count; i++)
+ {
+ bfd_put_32 (abfd,
+ hdr_info->array[i].initial_loc
+ - sec->output_section->vma,
+ contents + EH_FRAME_HDR_SIZE + i * 8 + 4);
+ bfd_put_32 (abfd,
+ hdr_info->array[i].fde - sec->output_section->vma,
+ contents + EH_FRAME_HDR_SIZE + i * 8 + 8);
+ }
+ }
+
+ /* FIXME: octets_per_byte. */
+ retval = bfd_set_section_contents (abfd, sec->output_section, contents,
+ (file_ptr) sec->output_offset,
+ sec->size);
+ free (contents);
+ }
+ if (hdr_info->array != NULL)
+ free (hdr_info->array);
return retval;
}
diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c
index 3ba96c7..8d48e66 100644
--- a/bfd/elf-ifunc.c
+++ b/bfd/elf-ifunc.c
@@ -1,5 +1,5 @@
/* ELF STT_GNU_IFUNC support.
- Copyright 2009
+ Copyright 2009-2013
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -104,51 +104,6 @@
return TRUE;
}
-/* For a STT_GNU_IFUNC symbol, create a dynamic reloc section, SRELOC,
- for the input section, SEC, and append this reloc to HEAD. */
-
-asection *
-_bfd_elf_create_ifunc_dyn_reloc (bfd *abfd, struct bfd_link_info *info,
- asection *sec, asection *sreloc,
- struct elf_dyn_relocs **head)
-{
- struct elf_dyn_relocs *p;
- struct elf_link_hash_table *htab = elf_hash_table (info);
-
- if (sreloc == NULL)
- {
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-
- if (htab->dynobj == NULL)
- htab->dynobj = abfd;
-
- sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->dynobj,
- bed->s->log_file_align,
- abfd,
- bed->rela_plts_and_copies_p);
- if (sreloc == NULL)
- return NULL;
- }
-
- p = *head;
- if (p == NULL || p->sec != sec)
- {
- bfd_size_type amt = sizeof *p;
-
- p = ((struct elf_dyn_relocs *) bfd_alloc (htab->dynobj, amt));
- if (p == NULL)
- return NULL;
- p->next = *head;
- *head = p;
- p->sec = sec;
- p->count = 0;
- p->pc_count = 0;
- }
- p->count += 1;
-
- return sreloc;
-}
-
/* Allocate space in .plt, .got and associated reloc sections for
dynamic relocs against a STT_GNU_IFUNC symbol definition. */
@@ -157,6 +112,7 @@
struct elf_link_hash_entry *h,
struct elf_dyn_relocs **head,
unsigned int plt_entry_size,
+ unsigned int plt_header_size,
unsigned int got_entry_size)
{
asection *plt, *gotplt, *relplt;
@@ -175,7 +131,7 @@
|| info->export_dynamic)
&& h->pointer_equality_needed)
{
- info->callbacks->einfo
+ info->callbacks->einfo
(_("%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer "
"equality in `%B' can not be used when making an "
"executable; recompile with -fPIE and relink with -pie\n"),
@@ -187,23 +143,20 @@
htab = elf_hash_table (info);
+ /* When building shared library, we need to handle the case where it is
+ marked with regular reference, but not non-GOT reference since the
+ non-GOT reference bit may not be set here. */
+ if (info->shared && !h->non_got_ref && h->ref_regular)
+ for (p = *head; p != NULL; p = p->next)
+ if (p->count)
+ {
+ h->non_got_ref = 1;
+ goto keep;
+ }
+
/* Support garbage collection against STT_GNU_IFUNC symbols. */
if (h->plt.refcount <= 0 && h->got.refcount <= 0)
{
- /* When building shared library, we need to handle the case
- 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. */
- if (info->shared
- && !h->non_got_ref
- && h->ref_regular)
- for (p = *head; p != NULL; p = p->next)
- if (p->count)
- {
- h->non_got_ref = 1;
- goto keep;
- }
-
h->got = htab->init_got_offset;
h->plt = htab->init_plt_offset;
*head = NULL;
@@ -241,7 +194,7 @@
/* If this is the first .plt entry, make room for the special
first entry. */
if (plt->size == 0)
- plt->size += plt_entry_size;
+ plt->size += plt_header_size;
}
else
{
@@ -251,7 +204,7 @@
}
/* Don't update value of STT_GNU_IFUNC symbol to PLT. We need
- the original value for R_*_IRELATIVE. */
+ the original value for R_*_IRELATIVE. */
h->plt.offset = plt->size;
/* Make room for this entry in the .plt/.iplt section. */
diff --git a/bfd/elf-linux-psinfo.h b/bfd/elf-linux-psinfo.h
new file mode 100644
index 0000000..c965284
--- /dev/null
+++ b/bfd/elf-linux-psinfo.h
@@ -0,0 +1,127 @@
+/* Definitions for PRPSINFO structures under ELF on GNU/Linux.
+ Copyright 2013 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 ELF_LINUX_PSINFO_H
+#define ELF_LINUX_PSINFO_H
+
+/* The PRPSINFO structures defined below are used by most
+ architectures, although some of them define their own versions
+ (like e.g., PPC). */
+
+/* External 32-bit structure for PRPSINFO. This structure is
+ ABI-defined, thus we choose to use char arrays here in order to
+ avoid dealing with different types in different architectures.
+
+ This structure will ultimately be written in the corefile's note
+ section, as the PRPSINFO. */
+
+struct elf_external_linux_prpsinfo32
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ char pr_flag[4]; /* Flags. */
+ char pr_uid[2];
+ char pr_gid[2];
+ char pr_pid[4];
+ char pr_ppid[4];
+ char pr_pgrp[4];
+ char pr_sid[4];
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[80]; /* Initial part of arg list. */
+ };
+
+/* Helper macro to swap (properly handling endianess) things from the
+ `elf_internal_linux_prpsinfo' structure to the
+ `elf_external_linux_prpsinfo32' structure.
+
+ Note that FROM should be a pointer, and TO should be the explicit
+ type. */
+
+#define LINUX_PRPSINFO32_SWAP_FIELDS(abfd, from, to) \
+ do \
+ { \
+ H_PUT_8 (abfd, from->pr_state, &to.pr_state); \
+ H_PUT_8 (abfd, from->pr_sname, &to.pr_sname); \
+ H_PUT_8 (abfd, from->pr_zomb, &to.pr_zomb); \
+ H_PUT_8 (abfd, from->pr_nice, &to.pr_nice); \
+ H_PUT_32 (abfd, from->pr_flag, to.pr_flag); \
+ H_PUT_16 (abfd, from->pr_uid, to.pr_uid); \
+ H_PUT_16 (abfd, from->pr_gid, to.pr_gid); \
+ H_PUT_32 (abfd, from->pr_pid, to.pr_pid); \
+ H_PUT_32 (abfd, from->pr_ppid, to.pr_ppid); \
+ H_PUT_32 (abfd, from->pr_pgrp, to.pr_pgrp); \
+ H_PUT_32 (abfd, from->pr_sid, to.pr_sid); \
+ strncpy (to.pr_fname, from->pr_fname, sizeof (to.pr_fname)); \
+ strncpy (to.pr_psargs, from->pr_psargs, sizeof (to.pr_psargs)); \
+ } while (0)
+
+/* External 64-bit structure for PRPSINFO. This structure is
+ ABI-defined, thus we choose to use char arrays here in order to
+ avoid dealing with different types in different architectures.
+
+ This structure will ultimately be written in the corefile's note
+ section, as the PRPSINFO. */
+
+struct elf_external_linux_prpsinfo64
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ char pr_flag[8]; /* Flags. */
+ char gap[4];
+ char pr_uid[4];
+ char pr_gid[4];
+ char pr_pid[4];
+ char pr_ppid[4];
+ char pr_pgrp[4];
+ char pr_sid[4];
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[80]; /* Initial part of arg list. */
+ };
+
+/* Helper macro to swap (properly handling endianess) things from the
+ `elf_internal_linux_prpsinfo' structure to the
+ `elf_external_linux_prpsinfo64' structure.
+
+ Note that FROM should be a pointer, and TO should be the explicit
+ type. */
+
+#define LINUX_PRPSINFO64_SWAP_FIELDS(abfd, from, to) \
+ do \
+ { \
+ H_PUT_8 (abfd, from->pr_state, &to.pr_state); \
+ H_PUT_8 (abfd, from->pr_sname, &to.pr_sname); \
+ H_PUT_8 (abfd, from->pr_zomb, &to.pr_zomb); \
+ H_PUT_8 (abfd, from->pr_nice, &to.pr_nice); \
+ H_PUT_64 (abfd, from->pr_flag, to.pr_flag); \
+ H_PUT_32 (abfd, from->pr_uid, to.pr_uid); \
+ H_PUT_32 (abfd, from->pr_gid, to.pr_gid); \
+ H_PUT_32 (abfd, from->pr_pid, to.pr_pid); \
+ H_PUT_32 (abfd, from->pr_ppid, to.pr_ppid); \
+ H_PUT_32 (abfd, from->pr_pgrp, to.pr_pgrp); \
+ H_PUT_32 (abfd, from->pr_sid, to.pr_sid); \
+ strncpy (to.pr_fname, from->pr_fname, sizeof (to.pr_fname)); \
+ strncpy (to.pr_psargs, from->pr_psargs, sizeof (to.pr_psargs)); \
+ } while (0)
+
+#endif
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index a38f4db..f427f97 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -1,6 +1,6 @@
/* Matsushita 10200 specific support for 32-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007, 2010
+ 2007, 2010, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,29 +25,13 @@
#include "libbfd.h"
#include "elf-bfd.h"
-static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void mn10200_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean mn10200_elf_relax_delete_bytes
- PARAMS ((bfd *, asection *, bfd_vma, int));
-static bfd_boolean mn10200_elf_symbol_address_p
- PARAMS ((bfd *, asection *, Elf_Internal_Sym *, bfd_vma));
-static bfd_reloc_status_type mn10200_elf_final_link_relocate
- PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *,
- bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
- struct bfd_link_info *, asection *, int));
-static bfd_boolean mn10200_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *,
- asection **));
-static bfd_boolean mn10200_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_byte * mn10200_elf_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **));
+static bfd_boolean
+mn10200_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int);
+static bfd_boolean
+mn10200_elf_symbol_address_p (bfd *, asection *, Elf_Internal_Sym *, bfd_vma);
-enum reloc_type {
+enum reloc_type
+{
R_MN10200_NONE = 0,
R_MN10200_32,
R_MN10200_16,
@@ -59,7 +43,8 @@
R_MN10200_MAX
};
-static reloc_howto_type elf_mn10200_howto_table[] = {
+static reloc_howto_type elf_mn10200_howto_table[] =
+{
/* Dummy relocation. Does nothing. */
HOWTO (R_MN10200_NONE,
0,
@@ -175,12 +160,14 @@
TRUE),
};
-struct mn10200_reloc_map {
+struct mn10200_reloc_map
+{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
-static const struct mn10200_reloc_map mn10200_reloc_map[] = {
+static const struct mn10200_reloc_map mn10200_reloc_map[] =
+{
{ BFD_RELOC_NONE , R_MN10200_NONE , },
{ BFD_RELOC_32 , R_MN10200_32 , },
{ BFD_RELOC_16 , R_MN10200_16 , },
@@ -192,9 +179,8 @@
};
static reloc_howto_type *
-bfd_elf32_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
@@ -229,10 +215,9 @@
/* Set the howto pointer for an MN10200 ELF reloc. */
static void
-mn10200_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+mn10200_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
@@ -244,20 +229,17 @@
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
-mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, offset, value,
- addend, info, sym_sec, is_local)
- reloc_howto_type *howto;
- bfd *input_bfd;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma offset;
- bfd_vma value;
- bfd_vma addend;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sym_sec ATTRIBUTE_UNUSED;
- int is_local ATTRIBUTE_UNUSED;
+mn10200_elf_final_link_relocate (reloc_howto_type *howto,
+ bfd *input_bfd,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd_byte *contents,
+ bfd_vma offset,
+ bfd_vma value,
+ bfd_vma addend,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sym_sec ATTRIBUTE_UNUSED,
+ int is_local ATTRIBUTE_UNUSED)
{
unsigned long r_type = howto->type;
bfd_byte *hit_data = contents + offset;
@@ -347,16 +329,14 @@
/* Relocate an MN10200 ELF section. */
static bfd_boolean
-mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- 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;
+mn10200_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)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -401,9 +381,9 @@
unresolved_reloc, warned);
}
- if (sec != NULL && elf_discarded_section (sec))
+ if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ rel, 1, relend, howto, 0, contents);
if (info->relocatable)
continue;
@@ -475,6 +455,78 @@
return TRUE;
}
+/* Delete some bytes from a section while relaxing. */
+
+static bfd_boolean
+mn10200_elf_relax_delete_bytes (bfd *abfd, asection *sec,
+ bfd_vma addr, int count)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned int sec_shndx;
+ bfd_byte *contents;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_vma toaddr;
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ contents = elf_section_data (sec)->this_hdr.contents;
+
+ toaddr = sec->size;
+
+ irel = elf_section_data (sec)->relocs;
+ irelend = irel + sec->reloc_count;
+
+ /* Actually delete the bytes. */
+ memmove (contents + addr, contents + addr + count,
+ (size_t) (toaddr - addr - count));
+ sec->size -= count;
+
+ /* Adjust all the relocs. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ {
+ /* Get the new reloc address. */
+ if ((irel->r_offset > addr
+ && irel->r_offset < toaddr))
+ irel->r_offset -= count;
+ }
+
+ /* Adjust the local symbols defined in this section. */
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
+ {
+ if (isym->st_shndx == sec_shndx
+ && isym->st_value > addr
+ && isym->st_value < toaddr)
+ isym->st_value -= count;
+ }
+
+ /* Now adjust the global symbols defined in this section. */
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+ for (; sym_hashes < end_hashes; sym_hashes++)
+ {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec
+ && sym_hash->root.u.def.value > addr
+ && sym_hash->root.u.def.value < toaddr)
+ {
+ sym_hash->root.u.def.value -= count;
+ }
+ }
+
+ return TRUE;
+}
+
/* This function handles relaxing for the mn10200.
There are quite a few relaxing opportunities available on the mn10200:
@@ -505,11 +557,10 @@
and somewhat more difficult to support. */
static bfd_boolean
-mn10200_elf_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+mn10200_elf_relax_section (bfd *abfd,
+ asection *sec,
+ struct bfd_link_info *link_info,
+ bfd_boolean *again)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs;
@@ -533,7 +584,7 @@
/* Get a copy of the native relocations. */
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ (abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory));
if (internal_relocs == NULL)
goto error_return;
@@ -1174,89 +1225,13 @@
return FALSE;
}
-/* Delete some bytes from a section while relaxing. */
-
-static bfd_boolean
-mn10200_elf_relax_delete_bytes (abfd, sec, addr, count)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- int count;
-{
- Elf_Internal_Shdr *symtab_hdr;
- unsigned int sec_shndx;
- bfd_byte *contents;
- Elf_Internal_Rela *irel, *irelend;
- bfd_vma toaddr;
- Elf_Internal_Sym *isym;
- Elf_Internal_Sym *isymend;
- struct elf_link_hash_entry **sym_hashes;
- struct elf_link_hash_entry **end_hashes;
- unsigned int symcount;
-
- sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
-
- contents = elf_section_data (sec)->this_hdr.contents;
-
- toaddr = sec->size;
-
- irel = elf_section_data (sec)->relocs;
- irelend = irel + sec->reloc_count;
-
- /* Actually delete the bytes. */
- memmove (contents + addr, contents + addr + count,
- (size_t) (toaddr - addr - count));
- sec->size -= count;
-
- /* Adjust all the relocs. */
- for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
- {
- /* Get the new reloc address. */
- if ((irel->r_offset > addr
- && irel->r_offset < toaddr))
- irel->r_offset -= count;
- }
-
- /* Adjust the local symbols defined in this section. */
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- isym = (Elf_Internal_Sym *) symtab_hdr->contents;
- for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
- {
- if (isym->st_shndx == sec_shndx
- && isym->st_value > addr
- && isym->st_value < toaddr)
- isym->st_value -= count;
- }
-
- /* Now adjust the global symbols defined in this section. */
- symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
- - symtab_hdr->sh_info);
- sym_hashes = elf_sym_hashes (abfd);
- end_hashes = sym_hashes + symcount;
- for (; sym_hashes < end_hashes; sym_hashes++)
- {
- struct elf_link_hash_entry *sym_hash = *sym_hashes;
- if ((sym_hash->root.type == bfd_link_hash_defined
- || sym_hash->root.type == bfd_link_hash_defweak)
- && sym_hash->root.u.def.section == sec
- && sym_hash->root.u.def.value > addr
- && sym_hash->root.u.def.value < toaddr)
- {
- sym_hash->root.u.def.value -= count;
- }
- }
-
- return TRUE;
-}
-
/* Return TRUE if a symbol exists at the given address, else return
FALSE. */
static bfd_boolean
-mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
- bfd *abfd;
- asection *sec;
- Elf_Internal_Sym *isym;
- bfd_vma addr;
+mn10200_elf_symbol_address_p (bfd *abfd,
+ asection *sec,
+ Elf_Internal_Sym *isym,
+ bfd_vma addr)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
@@ -1297,14 +1272,12 @@
which uses mn10200_elf_relocate_section. */
static bfd_byte *
-mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocatable, symbols)
- bfd *output_bfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- bfd_boolean relocatable;
- asymbol **symbols;
+mn10200_elf_get_relocated_section_contents (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -1336,7 +1309,7 @@
bfd_size_type amt;
internal_relocs = (_bfd_elf_link_read_relocs
- (input_bfd, input_section, (PTR) NULL,
+ (input_bfd, input_section, NULL,
(Elf_Internal_Rela *) NULL, FALSE));
if (internal_relocs == NULL)
goto error_return;
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 8276a2f..c0a9309 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, 2011 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -69,6 +69,14 @@
/* Calculated value. */
bfd_vma value;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_LD 3
+#define GOT_TLS_IE 4
+ /* Used to distinguish GOT entries for TLS types from normal GOT entries. */
+ unsigned char tls_type;
};
/* We derive a hash table from the main elf linker hash table so
@@ -87,8 +95,31 @@
/* Random linker state flags. */
#define MN10300_HASH_ENTRIES_INITIALIZED 0x1
char flags;
+ struct
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ char got_allocated;
+ char rel_emitted;
+ } tls_ldm_got;
};
+#define elf_mn10300_hash_entry(ent) ((struct elf32_mn10300_link_hash_entry *)(ent))
+
+struct elf_mn10300_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char * local_got_tls_type;
+};
+
+#define elf_mn10300_tdata(abfd) \
+ ((struct elf_mn10300_obj_tdata *) (abfd)->tdata.any)
+
+#define elf_mn10300_local_got_tls_type(abfd) \
+ (elf_mn10300_tdata (abfd)->local_got_tls_type)
+
#ifndef streq
#define streq(a, b) (strcmp ((a),(b)) == 0)
#endif
@@ -448,16 +479,132 @@
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- EMPTY_HOWTO (24),
- EMPTY_HOWTO (25),
- EMPTY_HOWTO (26),
- EMPTY_HOWTO (27),
- EMPTY_HOWTO (28),
- EMPTY_HOWTO (29),
- EMPTY_HOWTO (30),
- EMPTY_HOWTO (31),
- EMPTY_HOWTO (32),
-
+ HOWTO (R_MN10300_TLS_GD, /* 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, /* */
+ "R_MN10300_TLS_GD", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_LD, /* 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, /* */
+ "R_MN10300_TLS_LD", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_LDO, /* 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, /* */
+ "R_MN10300_TLS_LDO", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_GOTIE, /* 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, /* */
+ "R_MN10300_TLS_GOTIE", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_IE, /* 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, /* */
+ "R_MN10300_TLS_IE", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_LE, /* 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, /* */
+ "R_MN10300_TLS_LE", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_DTPMOD, /* 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, /* */
+ "R_MN10300_TLS_DTPMOD", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_DTPOFF, /* 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, /* */
+ "R_MN10300_TLS_DTPOFF", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MN10300_TLS_TPOFF, /* 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, /* */
+ "R_MN10300_TLS_TPOFF", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
HOWTO (R_MN10300_SYM_DIFF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -519,6 +666,15 @@
{ BFD_RELOC_MN10300_GLOB_DAT, R_MN10300_GLOB_DAT },
{ BFD_RELOC_MN10300_JMP_SLOT, R_MN10300_JMP_SLOT },
{ BFD_RELOC_MN10300_RELATIVE, R_MN10300_RELATIVE },
+ { BFD_RELOC_MN10300_TLS_GD, R_MN10300_TLS_GD },
+ { BFD_RELOC_MN10300_TLS_LD, R_MN10300_TLS_LD },
+ { BFD_RELOC_MN10300_TLS_LDO, R_MN10300_TLS_LDO },
+ { BFD_RELOC_MN10300_TLS_GOTIE, R_MN10300_TLS_GOTIE },
+ { BFD_RELOC_MN10300_TLS_IE, R_MN10300_TLS_IE },
+ { BFD_RELOC_MN10300_TLS_LE, R_MN10300_TLS_LE },
+ { BFD_RELOC_MN10300_TLS_DTPMOD, R_MN10300_TLS_DTPMOD },
+ { BFD_RELOC_MN10300_TLS_DTPOFF, R_MN10300_TLS_DTPOFF },
+ { BFD_RELOC_MN10300_TLS_TPOFF, R_MN10300_TLS_TPOFF },
{ BFD_RELOC_MN10300_SYM_DIFF, R_MN10300_SYM_DIFF },
{ BFD_RELOC_MN10300_ALIGN, R_MN10300_ALIGN }
};
@@ -534,10 +690,12 @@
asection * s;
struct elf_link_hash_entry * h;
const struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ struct elf_link_hash_table *htab;
int ptralign;
/* This function may be called more than once. */
- if (bfd_get_section_by_name (abfd, ".got") != NULL)
+ htab = elf_hash_table (info);
+ if (htab->sgot != NULL)
return TRUE;
switch (bed->s->arch_size)
@@ -565,7 +723,8 @@
if (bed->plt_readonly)
pltflags |= SEC_READONLY;
- s = bfd_make_section_with_flags (abfd, ".plt", pltflags);
+ s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
+ htab->splt = s;
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return FALSE;
@@ -576,19 +735,21 @@
{
h = _bfd_elf_define_linkage_sym (abfd, info, s,
"_PROCEDURE_LINKAGE_TABLE_");
- elf_hash_table (info)->hplt = h;
+ htab->hplt = h;
if (h == NULL)
return FALSE;
}
- s = bfd_make_section_with_flags (abfd, ".got", flags);
+ s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
+ htab->sgot = s;
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, ptralign))
return FALSE;
if (bed->want_got_plt)
{
- s = bfd_make_section_with_flags (abfd, ".got.plt", flags);
+ s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
+ htab->sgotplt = s;
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, ptralign))
return FALSE;
@@ -599,7 +760,7 @@
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, "_GLOBAL_OFFSET_TABLE_");
- elf_hash_table (info)->hgot = h;
+ htab->hgot = h;
if (h == NULL)
return FALSE;
@@ -650,6 +811,223 @@
cache_ptr->howto = elf_mn10300_howto_table + r_type;
}
+static int
+elf_mn10300_tls_transition (struct bfd_link_info * info,
+ int r_type,
+ struct elf_link_hash_entry * h,
+ asection * sec,
+ bfd_boolean counting)
+{
+ bfd_boolean is_local;
+
+ if (r_type == R_MN10300_TLS_GD
+ && h != NULL
+ && elf_mn10300_hash_entry (h)->tls_type == GOT_TLS_IE)
+ return R_MN10300_TLS_GOTIE;
+
+ if (info->shared)
+ return r_type;
+
+ if (! (sec->flags & SEC_CODE))
+ return r_type;
+
+ if (! counting && h != NULL && ! elf_hash_table (info)->dynamic_sections_created)
+ is_local = TRUE;
+ else
+ is_local = SYMBOL_CALLS_LOCAL (info, h);
+
+ /* For the main program, these are the transitions we do. */
+ switch (r_type)
+ {
+ case R_MN10300_TLS_GD: return is_local ? R_MN10300_TLS_LE : R_MN10300_TLS_GOTIE;
+ case R_MN10300_TLS_LD: return R_MN10300_NONE;
+ case R_MN10300_TLS_LDO: return R_MN10300_TLS_LE;
+ case R_MN10300_TLS_IE:
+ case R_MN10300_TLS_GOTIE: return is_local ? R_MN10300_TLS_LE : r_type;
+ }
+
+ return r_type;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+dtpoff (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;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+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_size + htab->tls_sec->vma);
+}
+
+/* Returns nonzero if there's a R_MN10300_PLT32 reloc that we now need
+ to skip, after this one. The actual value is the offset between
+ this reloc and the PLT reloc. */
+
+static int
+mn10300_do_tls_transition (bfd * input_bfd,
+ unsigned int r_type,
+ unsigned int tls_r_type,
+ bfd_byte * contents,
+ bfd_vma offset)
+{
+ bfd_byte *op = contents + offset;
+ int gotreg = 0;
+
+#define TLS_PAIR(r1,r2) ((r1) * R_MN10300_MAX + (r2))
+
+ /* This is common to all GD/LD transitions, so break it out. */
+ if (r_type == R_MN10300_TLS_GD
+ || r_type == R_MN10300_TLS_LD)
+ {
+ op -= 2;
+ /* mov imm,d0. */
+ BFD_ASSERT (bfd_get_8 (input_bfd, op) == 0xFC);
+ BFD_ASSERT (bfd_get_8 (input_bfd, op + 1) == 0xCC);
+ /* add aN,d0. */
+ BFD_ASSERT (bfd_get_8 (input_bfd, op + 6) == 0xF1);
+ gotreg = (bfd_get_8 (input_bfd, op + 7) & 0x0c) >> 2;
+ /* Call. */
+ BFD_ASSERT (bfd_get_8 (input_bfd, op + 8) == 0xDD);
+ }
+
+ switch (TLS_PAIR (r_type, tls_r_type))
+ {
+ case TLS_PAIR (R_MN10300_TLS_GD, R_MN10300_TLS_GOTIE):
+ {
+ /* Keep track of which register we put GOTptr in. */
+ /* mov (_x@indntpoff,a2),a0. */
+ memcpy (op, "\xFC\x20\x00\x00\x00\x00", 6);
+ op[1] |= gotreg;
+ /* add e2,a0. */
+ memcpy (op+6, "\xF9\x78\x28", 3);
+ /* or 0x00000000, d0 - six byte nop. */
+ memcpy (op+9, "\xFC\xE4\x00\x00\x00\x00", 6);
+ }
+ return 7;
+
+ case TLS_PAIR (R_MN10300_TLS_GD, R_MN10300_TLS_LE):
+ {
+ /* Register is *always* a0. */
+ /* mov _x@tpoff,a0. */
+ memcpy (op, "\xFC\xDC\x00\x00\x00\x00", 6);
+ /* add e2,a0. */
+ memcpy (op+6, "\xF9\x78\x28", 3);
+ /* or 0x00000000, d0 - six byte nop. */
+ memcpy (op+9, "\xFC\xE4\x00\x00\x00\x00", 6);
+ }
+ return 7;
+ case TLS_PAIR (R_MN10300_TLS_LD, R_MN10300_NONE):
+ {
+ /* Register is *always* a0. */
+ /* mov e2,a0. */
+ memcpy (op, "\xF5\x88", 2);
+ /* or 0x00000000, d0 - six byte nop. */
+ memcpy (op+2, "\xFC\xE4\x00\x00\x00\x00", 6);
+ /* or 0x00000000, e2 - seven byte nop. */
+ memcpy (op+8, "\xFE\x19\x22\x00\x00\x00\x00", 7);
+ }
+ return 7;
+
+ case TLS_PAIR (R_MN10300_TLS_LDO, R_MN10300_TLS_LE):
+ /* No changes needed, just the reloc change. */
+ return 0;
+
+ /* These are a little tricky, because we have to detect which
+ opcode is being used (they're different sizes, with the reloc
+ at different offsets within the opcode) and convert each
+ accordingly, copying the operands as needed. The conversions
+ we do are as follows (IE,GOTIE,LE):
+
+ 1111 1100 1010 01Dn [-- abs32 --] MOV (x@indntpoff),Dn
+ 1111 1100 0000 DnAm [-- abs32 --] MOV (x@gotntpoff,Am),Dn
+ 1111 1100 1100 11Dn [-- abs32 --] MOV x@tpoff,Dn
+
+ 1111 1100 1010 00An [-- abs32 --] MOV (x@indntpoff),An
+ 1111 1100 0010 AnAm [-- abs32 --] MOV (x@gotntpoff,Am),An
+ 1111 1100 1101 11An [-- abs32 --] MOV x@tpoff,An
+
+ 1111 1110 0000 1110 Rnnn Xxxx [-- abs32 --] MOV (x@indntpoff),Rn
+ 1111 1110 0000 1010 Rnnn Rmmm [-- abs32 --] MOV (x@indntpoff,Rm),Rn
+ 1111 1110 0000 1000 Rnnn Xxxx [-- abs32 --] MOV x@tpoff,Rn
+
+ Since the GOT pointer is always $a2, we assume the last
+ normally won't happen, but let's be paranoid and plan for the
+ day that GCC optimizes it somewhow. */
+
+ case TLS_PAIR (R_MN10300_TLS_IE, R_MN10300_TLS_LE):
+ if (op[-2] == 0xFC)
+ {
+ op -= 2;
+ if ((op[1] & 0xFC) == 0xA4) /* Dn */
+ {
+ op[1] &= 0x03; /* Leaves Dn. */
+ op[1] |= 0xCC;
+ }
+ else /* An */
+ {
+ op[1] &= 0x03; /* Leaves An. */
+ op[1] |= 0xDC;
+ }
+ }
+ else if (op[-3] == 0xFE)
+ op[-2] = 0x08;
+ else
+ abort ();
+ break;
+
+ case TLS_PAIR (R_MN10300_TLS_GOTIE, R_MN10300_TLS_LE):
+ if (op[-2] == 0xFC)
+ {
+ op -= 2;
+ if ((op[1] & 0xF0) == 0x00) /* Dn */
+ {
+ op[1] &= 0x0C; /* Leaves Dn. */
+ op[1] >>= 2;
+ op[1] |= 0xCC;
+ }
+ else /* An */
+ {
+ op[1] &= 0x0C; /* Leaves An. */
+ op[1] >>= 2;
+ op[1] |= 0xDC;
+ }
+ }
+ else if (op[-3] == 0xFE)
+ op[-2] = 0x08;
+ else
+ abort ();
+ break;
+
+ default:
+ (*_bfd_error_handler)
+ (_("%s: Unsupported transition from %s to %s"),
+ bfd_get_filename (input_bfd),
+ elf_mn10300_howto_table[r_type].name,
+ elf_mn10300_howto_table[tls_r_type].name);
+ break;
+ }
+#undef TLS_PAIR
+ return 0;
+}
+
/* 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. */
@@ -660,6 +1038,7 @@
asection *sec,
const Elf_Internal_Rela *relocs)
{
+ struct elf32_mn10300_link_hash_table * htab = elf32_mn10300_hash_table (info);
bfd_boolean sym_diff_reloc_seen;
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Sym * isymbuf = NULL;
@@ -694,6 +1073,7 @@
struct elf_link_hash_entry *h;
unsigned long r_symndx;
unsigned int r_type;
+ int tls_type = GOT_NORMAL;
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
@@ -704,9 +1084,14 @@
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;
+
+ /* PR15323, ref flags aren't set for references in the same
+ object. */
+ h->root.non_ir_ref = 1;
}
r_type = ELF32_R_TYPE (rel->r_info);
+ r_type = elf_mn10300_tls_transition (info, r_type, h, sec, TRUE);
/* Some relocs require a global offset table. */
if (dynobj == NULL)
@@ -721,6 +1106,10 @@
case R_MN10300_GOTOFF16:
case R_MN10300_GOTPC32:
case R_MN10300_GOTPC16:
+ case R_MN10300_TLS_GD:
+ case R_MN10300_TLS_LD:
+ case R_MN10300_TLS_GOTIE:
+ case R_MN10300_TLS_IE:
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! _bfd_mn10300_elf_create_got_section (dynobj, info))
goto fail;
@@ -749,53 +1138,101 @@
goto fail;
break;
+ case R_MN10300_TLS_LD:
+ htab->tls_ldm_got.refcount ++;
+ tls_type = GOT_TLS_LD;
+
+ if (htab->tls_ldm_got.got_allocated)
+ break;
+ goto create_got;
+
+ case R_MN10300_TLS_IE:
+ case R_MN10300_TLS_GOTIE:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
+ case R_MN10300_TLS_GD:
case R_MN10300_GOT32:
case R_MN10300_GOT24:
case R_MN10300_GOT16:
+ create_got:
/* This symbol requires a global offset table entry. */
+ switch (r_type)
+ {
+ case R_MN10300_TLS_IE:
+ case R_MN10300_TLS_GOTIE: tls_type = GOT_TLS_IE; break;
+ case R_MN10300_TLS_GD: tls_type = GOT_TLS_GD; break;
+ default: tls_type = GOT_NORMAL; break;
+ }
+
if (sgot == NULL)
{
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ sgot = htab->root.sgot;
BFD_ASSERT (sgot != NULL);
}
if (srelgot == NULL
&& (h != NULL || info->shared))
{
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ srelgot = bfd_get_linker_section (dynobj, ".rela.got");
if (srelgot == NULL)
{
- srelgot = bfd_make_section_with_flags (dynobj,
- ".rela.got",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_READONLY);
+ srelgot = bfd_make_section_anyway_with_flags (dynobj,
+ ".rela.got",
+ flags);
if (srelgot == NULL
|| ! bfd_set_section_alignment (dynobj, srelgot, 2))
goto fail;
}
}
- if (h != NULL)
+ if (r_type == R_MN10300_TLS_LD)
{
+ htab->tls_ldm_got.offset = sgot->size;
+ htab->tls_ldm_got.got_allocated ++;
+ }
+ else if (h != NULL)
+ {
+ if (elf_mn10300_hash_entry (h)->tls_type != tls_type
+ && elf_mn10300_hash_entry (h)->tls_type != GOT_UNKNOWN)
+ {
+ if (tls_type == GOT_TLS_IE
+ && elf_mn10300_hash_entry (h)->tls_type == GOT_TLS_GD)
+ /* No change - this is ok. */;
+ else if (tls_type == GOT_TLS_GD
+ && elf_mn10300_hash_entry (h)->tls_type == GOT_TLS_IE)
+ /* Transition GD->IE. */
+ tls_type = GOT_TLS_IE;
+ else
+ (*_bfd_error_handler)
+ (_("%B: %s' accessed both as normal and thread local symbol"),
+ abfd, h ? h->root.root.string : "<local>");
+ }
+
+ elf_mn10300_hash_entry (h)->tls_type = tls_type;
+
if (h->got.offset != (bfd_vma) -1)
/* We have already allocated space in the .got. */
break;
h->got.offset = sgot->size;
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
+ if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
+ /* Make sure this symbol is output as a dynamic symbol. */
+ && h->dynindx == -1)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
goto fail;
}
srelgot->size += sizeof (Elf32_External_Rela);
+ if (r_type == R_MN10300_TLS_GD)
+ srelgot->size += sizeof (Elf32_External_Rela);
}
else
{
@@ -806,13 +1243,15 @@
size_t size;
unsigned int i;
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
+ size = symtab_hdr->sh_info * (sizeof (bfd_vma) + sizeof (char));
local_got_offsets = bfd_alloc (abfd, size);
if (local_got_offsets == NULL)
goto fail;
elf_local_got_offsets (abfd) = local_got_offsets;
+ elf_mn10300_local_got_tls_type (abfd)
+ = (char *) (local_got_offsets + symtab_hdr->sh_info);
for (i = 0; i < symtab_hdr->sh_info; i++)
local_got_offsets[i] = (bfd_vma) -1;
@@ -825,14 +1264,26 @@
local_got_offsets[r_symndx] = sgot->size;
if (info->shared)
- /* If we are generating a shared object, we need to
- output a R_MN10300_RELATIVE reloc so that the dynamic
- linker can adjust this GOT entry. */
- srelgot->size += sizeof (Elf32_External_Rela);
+ {
+ /* If we are generating a shared object, we need to
+ output a R_MN10300_RELATIVE reloc so that the dynamic
+ linker can adjust this GOT entry. */
+ srelgot->size += sizeof (Elf32_External_Rela);
+
+ if (r_type == R_MN10300_TLS_GD)
+ /* And a R_MN10300_TLS_DTPOFF reloc as well. */
+ srelgot->size += sizeof (Elf32_External_Rela);
+ }
+
+ elf_mn10300_local_got_tls_type (abfd) [r_symndx] = tls_type;
}
sgot->size += 4;
- break;
+ if (r_type == R_MN10300_TLS_GD
+ || r_type == R_MN10300_TLS_LD)
+ sgot->size += 4;
+
+ goto need_shared_relocs;
case R_MN10300_PLT32:
case R_MN10300_PLT16:
@@ -873,6 +1324,7 @@
if (h != NULL)
h->non_got_ref = 1;
+ need_shared_relocs:
/* If we are creating a shared library, then we
need to copy the reloc into the shared library. */
if (info->shared
@@ -981,6 +1433,7 @@
asection *sym_sec ATTRIBUTE_UNUSED,
int is_local ATTRIBUTE_UNUSED)
{
+ struct elf32_mn10300_link_hash_table * htab = elf32_mn10300_hash_table (info);
static asection * sym_diff_section;
static bfd_vma sym_diff_value;
bfd_boolean is_sym_diff_reloc;
@@ -1012,6 +1465,17 @@
&& h != NULL
&& ! SYMBOL_REFERENCES_LOCAL (info, h))
return bfd_reloc_dangerous;
+ case R_MN10300_GOT32:
+ /* Issue 2052223:
+ Taking the address of a protected function in a shared library
+ is illegal. Issue an error message here. */
+ if (info->shared
+ && (input_section->flags & SEC_ALLOC) != 0
+ && h != NULL
+ && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED
+ && (h->type == STT_FUNC || h->type == STT_GNU_IFUNC)
+ && ! SYMBOL_REFERENCES_LOCAL (info, h))
+ return bfd_reloc_dangerous;
}
is_sym_diff_reloc = FALSE;
@@ -1208,9 +1672,11 @@
return bfd_reloc_ok;
case R_MN10300_GOTPC32:
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
/* Use global offset table as symbol value. */
- value = bfd_get_section_by_name (dynobj,
- ".got")->output_section->vma;
+ value = htab->root.sgot->output_section->vma;
value -= (input_section->output_section->vma
+ input_section->output_offset);
value -= offset;
@@ -1220,9 +1686,11 @@
return bfd_reloc_ok;
case R_MN10300_GOTPC16:
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
/* Use global offset table as symbol value. */
- value = bfd_get_section_by_name (dynobj,
- ".got")->output_section->vma;
+ value = htab->root.sgot->output_section->vma;
value -= (input_section->output_section->vma
+ input_section->output_offset);
value -= offset;
@@ -1235,16 +1703,20 @@
return bfd_reloc_ok;
case R_MN10300_GOTOFF32:
- value -= bfd_get_section_by_name (dynobj,
- ".got")->output_section->vma;
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
+ value -= htab->root.sgot->output_section->vma;
value += addend;
bfd_put_32 (input_bfd, value, hit_data);
return bfd_reloc_ok;
case R_MN10300_GOTOFF24:
- value -= bfd_get_section_by_name (dynobj,
- ".got")->output_section->vma;
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
+ value -= htab->root.sgot->output_section->vma;
value += addend;
if ((long) value > 0x7fffff || (long) value < -0x800000)
@@ -1256,8 +1728,10 @@
return bfd_reloc_ok;
case R_MN10300_GOTOFF16:
- value -= bfd_get_section_by_name (dynobj,
- ".got")->output_section->vma;
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
+ value -= htab->root.sgot->output_section->vma;
value += addend;
if ((long) value > 0x7fff || (long) value < -0x8000)
@@ -1272,8 +1746,10 @@
&& ELF_ST_VISIBILITY (h->other) != STV_HIDDEN
&& h->plt.offset != (bfd_vma) -1)
{
- splt = bfd_get_section_by_name (dynobj, ".plt");
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+ splt = htab->root.splt;
value = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset) - value;
@@ -1293,8 +1769,10 @@
&& ELF_ST_VISIBILITY (h->other) != STV_HIDDEN
&& h->plt.offset != (bfd_vma) -1)
{
- splt = bfd_get_section_by_name (dynobj, ".plt");
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+ splt = htab->root.splt;
value = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset) - value;
@@ -1311,41 +1789,100 @@
bfd_put_16 (input_bfd, value, hit_data);
return bfd_reloc_ok;
+ case R_MN10300_TLS_LDO:
+ value = dtpoff (info, value);
+ bfd_put_32 (input_bfd, value + addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_MN10300_TLS_LE:
+ value = tpoff (info, value);
+ bfd_put_32 (input_bfd, value + addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_MN10300_TLS_LD:
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
+
+ sgot = htab->root.sgot;
+ BFD_ASSERT (sgot != NULL);
+ value = htab->tls_ldm_got.offset + sgot->output_offset;
+ bfd_put_32 (input_bfd, value, hit_data);
+
+ if (!htab->tls_ldm_got.rel_emitted)
+ {
+ asection * srelgot = bfd_get_linker_section (dynobj, ".rela.got");
+ Elf_Internal_Rela rel;
+
+ BFD_ASSERT (srelgot != NULL);
+ htab->tls_ldm_got.rel_emitted ++;
+ rel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + htab->tls_ldm_got.offset);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + htab->tls_ldm_got.offset);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + htab->tls_ldm_got.offset+4);
+ rel.r_info = ELF32_R_INFO (0, R_MN10300_TLS_DTPMOD);
+ rel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, & rel,
+ (bfd_byte *) ((Elf32_External_Rela *) srelgot->contents
+ + srelgot->reloc_count));
+ ++ srelgot->reloc_count;
+ }
+
+ return bfd_reloc_ok;
+
+ case R_MN10300_TLS_GOTIE:
+ value = tpoff (info, value);
+ /* Fall Through. */
+
+ case R_MN10300_TLS_GD:
+ case R_MN10300_TLS_IE:
case R_MN10300_GOT32:
case R_MN10300_GOT24:
case R_MN10300_GOT16:
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ if (dynobj == NULL)
+ return bfd_reloc_dangerous;
- if (h != NULL)
- {
- bfd_vma off;
+ sgot = htab->root.sgot;
+ if (r_type == R_MN10300_TLS_GD)
+ value = dtpoff (info, value);
- off = h->got.offset;
- BFD_ASSERT (off != (bfd_vma) -1);
+ if (h != NULL)
+ {
+ bfd_vma off;
- if (! elf_hash_table (info)->dynamic_sections_created
- || 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.
+ off = h->got.offset;
+ /* Offsets in the GOT are allocated in check_relocs
+ which is not called for shared libraries... */
+ if (off == (bfd_vma) -1)
+ off = 0;
- 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. */
- bfd_put_32 (output_bfd, value,
- sgot->contents + off);
+ if (sgot->contents != NULL
+ && (! elf_hash_table (info)->dynamic_sections_created
+ || 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.
- value = sgot->output_offset + off;
- }
+ 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. */
+ bfd_put_32 (output_bfd, value,
+ sgot->contents + off);
+
+ value = sgot->output_offset + off;
+ }
+ else
+ {
+ bfd_vma off;
+
+ off = elf_local_got_offsets (input_bfd)[symndx];
+
+ if (off & 1)
+ bfd_put_32 (output_bfd, value, sgot->contents + (off & ~ 1));
else
{
- bfd_vma off;
-
- off = elf_local_got_offsets (input_bfd)[symndx];
-
bfd_put_32 (output_bfd, value, sgot->contents + off);
if (info->shared)
@@ -1353,28 +1890,64 @@
asection * srelgot;
Elf_Internal_Rela outrel;
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ srelgot = bfd_get_linker_section (dynobj, ".rela.got");
BFD_ASSERT (srelgot != NULL);
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset
+ off);
- outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+ switch (r_type)
+ {
+ case R_MN10300_TLS_GD:
+ outrel.r_info = ELF32_R_INFO (0, R_MN10300_TLS_DTPOFF);
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off + 4);
+ bfd_elf32_swap_reloca_out (output_bfd, & outrel,
+ (bfd_byte *) (((Elf32_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count));
+ ++ srelgot->reloc_count;
+ outrel.r_info = ELF32_R_INFO (0, R_MN10300_TLS_DTPMOD);
+ break;
+ case R_MN10300_TLS_GOTIE:
+ case R_MN10300_TLS_IE:
+ outrel.r_info = ELF32_R_INFO (0, R_MN10300_TLS_TPOFF);
+ break;
+ default:
+ outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+ break;
+ }
+
outrel.r_addend = value;
bfd_elf32_swap_reloca_out (output_bfd, &outrel,
(bfd_byte *) (((Elf32_External_Rela *)
srelgot->contents)
+ srelgot->reloc_count));
++ srelgot->reloc_count;
+ elf_local_got_offsets (input_bfd)[symndx] |= 1;
}
- value = sgot->output_offset + off;
+ value = sgot->output_offset + (off & ~(bfd_vma) 1);
}
- }
+ }
value += addend;
- if (r_type == R_MN10300_GOT32)
+ if (r_type == R_MN10300_TLS_IE)
+ {
+ value += sgot->output_section->vma;
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+ }
+ else if (r_type == R_MN10300_TLS_GOTIE
+ || r_type == R_MN10300_TLS_GD
+ || r_type == R_MN10300_TLS_LD)
+ {
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+ }
+ else if (r_type == R_MN10300_GOT32)
{
bfd_put_32 (input_bfd, value, hit_data);
return bfd_reloc_ok;
@@ -1419,6 +1992,7 @@
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
+ Elf_Internal_Rela * trel;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -1435,7 +2009,12 @@
struct elf32_mn10300_link_hash_entry *h;
bfd_vma relocation;
bfd_reloc_status_type r;
+ int tls_r_type;
+ bfd_boolean unresolved_reloc = FALSE;
+ bfd_boolean warned;
+ struct elf_link_hash_entry * hh;
+ relocation = 0;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
howto = elf_mn10300_howto_table + r_type;
@@ -1449,6 +2028,35 @@
sym = NULL;
sec = NULL;
if (r_symndx < symtab_hdr->sh_info)
+ hh = NULL;
+ else
+ {
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ hh, sec, relocation,
+ unresolved_reloc, warned);
+ }
+ h = elf_mn10300_hash_entry (hh);
+
+ tls_r_type = elf_mn10300_tls_transition (info, r_type, hh, input_section, 0);
+ if (tls_r_type != r_type)
+ {
+ bfd_boolean had_plt;
+
+ had_plt = mn10300_do_tls_transition (input_bfd, r_type, tls_r_type,
+ contents, rel->r_offset);
+ r_type = tls_r_type;
+ howto = elf_mn10300_howto_table + r_type;
+
+ if (had_plt)
+ for (trel = rel+1; trel < relend; trel++)
+ if ((ELF32_R_TYPE (trel->r_info) == R_MN10300_PLT32
+ || ELF32_R_TYPE (trel->r_info) == R_MN10300_PCREL32)
+ && rel->r_offset + had_plt == trel->r_offset)
+ trel->r_info = ELF32_R_INFO (0, R_MN10300_NONE);
+ }
+
+ if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
@@ -1456,17 +2064,6 @@
}
else
{
- bfd_boolean unresolved_reloc;
- bfd_boolean warned;
- struct elf_link_hash_entry *hh;
-
- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
- r_symndx, symtab_hdr, sym_hashes,
- hh, sec, relocation,
- unresolved_reloc, warned);
-
- h = (struct elf32_mn10300_link_hash_entry *) hh;
-
if ((h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak)
&& ( r_type == R_MN10300_GOTPC32
@@ -1478,6 +2075,10 @@
&& h->root.plt.offset != (bfd_vma) -1)
|| (( r_type == R_MN10300_GOT32
|| r_type == R_MN10300_GOT24
+ || r_type == R_MN10300_TLS_GD
+ || r_type == R_MN10300_TLS_LD
+ || r_type == R_MN10300_TLS_GOTIE
+ || r_type == R_MN10300_TLS_IE
|| r_type == R_MN10300_GOT16)
&& elf_hash_table (info)->dynamic_sections_created
&& !SYMBOL_REFERENCES_LOCAL (info, hh))
@@ -1499,7 +2100,10 @@
obscure cases sec->output_section will be NULL. */
relocation = 0;
- else if (!info->relocatable && unresolved_reloc)
+ else if (!info->relocatable && unresolved_reloc
+ && _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,
@@ -1509,9 +2113,9 @@
h->root.root.root.string);
}
- if (sec != NULL && elf_discarded_section (sec))
+ if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ rel, 1, relend, howto, 0, contents);
if (info->relocatable)
continue;
@@ -1568,6 +2172,9 @@
if (r_type == R_MN10300_PCREL32)
msg = _("error: inappropriate relocation type for shared"
" library (did you forget -fpic?)");
+ else if (r_type == R_MN10300_GOT32)
+ msg = _("%B: taking the address of protected function"
+ " '%s' cannot be done when making a shared library");
else
msg = _("internal error: suspicious relocation type used"
" in shared library");
@@ -1578,11 +2185,9 @@
/* Fall through. */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
- break;
+ _bfd_error_handler (msg, input_bfd, name);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
}
}
@@ -1824,7 +2429,7 @@
serve to keep the section artifically inflated. */
if (ELF32_R_TYPE ((irelend - 1)->r_info) == (int) R_MN10300_ALIGN)
--irelend;
-
+
/* The deletion must stop at the next ALIGN reloc for an aligment
power larger than, or not a multiple of, the number of bytes we
are deleting. */
@@ -2578,6 +3183,7 @@
{
int bytes = 0;
bfd_vma symval;
+ struct elf_link_hash_entry **hh;
/* Note that we've changed things. */
elf_section_data (section)->relocs = internal_relocs;
@@ -2608,6 +3214,25 @@
bytes))
goto error_return;
+ /* There may be other C++ functions symbols with the same
+ address. If so then mark these as having had their
+ prologue bytes deleted as well. */
+ for (hh = elf_sym_hashes (input_bfd); hh < end_hashes; hh++)
+ {
+ struct elf32_mn10300_link_hash_entry *h;
+
+ h = (struct elf32_mn10300_link_hash_entry *) * hh;
+
+ if (h != sym_hash
+ && (h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak)
+ && h->root.root.u.def.section == section
+ && ! (h->flags & MN10300_CONVERT_CALL_TO_CALLS)
+ && h->root.root.u.def.value == symval
+ && h->root.type == STT_FUNC)
+ h->flags |= MN10300_DELETED_PROLOGUE_BYTES;
+ }
+
/* Something changed. Not strictly necessary, but
may lead to more relaxing opportunities. */
*again = TRUE;
@@ -2763,7 +3388,7 @@
isym->st_name);
if ((sym_sec->flags & SEC_MERGE)
- && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
{
symval = isym->st_value;
@@ -2859,9 +3484,7 @@
{
asection * splt;
- splt = bfd_get_section_by_name (elf_hash_table (link_info)
- ->dynobj, ".plt");
-
+ splt = hash_table->root.splt;
value = ((splt->output_section->vma
+ splt->output_offset
+ h->root.plt.offset)
@@ -3301,9 +3924,7 @@
{
asection * sgot;
- sgot = bfd_get_section_by_name (elf_hash_table (link_info)
- ->dynobj, ".got");
-
+ sgot = hash_table->root.sgot;
if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOT32)
{
value = sgot->output_offset;
@@ -3601,8 +4222,8 @@
&& (value & 0x8000))
continue;
- /* mov imm16, an zero-extends the immediate. */
- if (code == 0xdc
+ /* "mov imm16, an" zero-extends the immediate. */
+ if ((code & 0xfc) == 0xdc
&& (long) value < 0)
continue;
@@ -3946,11 +4567,38 @@
ret->movm_stack_size = 0;
ret->flags = 0;
ret->value = 0;
+ ret->tls_type = GOT_UNKNOWN;
}
return (struct bfd_hash_entry *) ret;
}
+static void
+_bfd_mn10300_copy_indirect_symbol (struct bfd_link_info * info,
+ struct elf_link_hash_entry * dir,
+ struct elf_link_hash_entry * ind)
+{
+ struct elf32_mn10300_link_hash_entry * edir;
+ struct elf32_mn10300_link_hash_entry * eind;
+
+ edir = elf_mn10300_hash_entry (dir);
+ eind = elf_mn10300_hash_entry (ind);
+
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+ edir->direct_calls = eind->direct_calls;
+ edir->stack_size = eind->stack_size;
+ edir->movm_args = eind->movm_args;
+ edir->movm_stack_size = eind->movm_stack_size;
+ edir->flags = eind->flags;
+
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+}
+
/* Create an mn10300 ELF linker hash table. */
static struct bfd_link_hash_table *
@@ -3959,7 +4607,7 @@
struct elf32_mn10300_link_hash_table *ret;
bfd_size_type amt = sizeof (* ret);
- ret = bfd_malloc (amt);
+ ret = bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
@@ -3972,9 +4620,10 @@
return NULL;
}
- ret->flags = 0;
+ ret->tls_ldm_got.offset = -1;
+
amt = sizeof (struct elf_link_hash_table);
- ret->static_hash_table = bfd_malloc (amt);
+ ret->static_hash_table = bfd_zmalloc (amt);
if (ret->static_hash_table == NULL)
{
free (ret);
@@ -4001,9 +4650,9 @@
struct elf32_mn10300_link_hash_table *ret
= (struct elf32_mn10300_link_hash_table *) hash;
- _bfd_generic_link_hash_table_free
+ _bfd_elf_link_hash_table_free
((struct bfd_link_hash_table *) ret->static_hash_table);
- _bfd_generic_link_hash_table_free
+ _bfd_elf_link_hash_table_free
((struct bfd_link_hash_table *) ret);
}
@@ -4151,6 +4800,7 @@
flagword flags;
asection * s;
const struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
int ptralign = 0;
switch (bed->s->arch_size)
@@ -4173,10 +4823,11 @@
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
- s = bfd_make_section_with_flags (abfd,
- (bed->default_use_rela_p
- ? ".rela.plt" : ".rel.plt"),
- flags | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.plt" : ".rel.plt"),
+ flags | SEC_READONLY);
+ htab->root.srelplt = s;
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, ptralign))
return FALSE;
@@ -4184,32 +4835,6 @@
if (! _bfd_mn10300_elf_create_got_section (abfd, info))
return FALSE;
- {
- const char * secname;
- char * relname;
- flagword secflags;
- asection * sec;
-
- for (sec = abfd->sections; sec; sec = sec->next)
- {
- secflags = bfd_get_section_flags (abfd, sec);
- if ((secflags & (SEC_DATA | SEC_LINKER_CREATED))
- || ((secflags & SEC_HAS_CONTENTS) != SEC_HAS_CONTENTS))
- continue;
-
- secname = bfd_get_section_name (abfd, sec);
- relname = bfd_malloc (strlen (secname) + 6);
- strcpy (relname, ".rela");
- strcat (relname, secname);
-
- s = bfd_make_section_with_flags (abfd, relname,
- flags | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
- return FALSE;
- }
- }
-
if (bed->want_dynbss)
{
/* The .dynbss section is a place to put symbols which are defined
@@ -4218,8 +4843,8 @@
image and use a R_*_COPY reloc to tell the dynamic linker to
initialize them at run time. The linker script puts the .dynbss
section into the .bss section of the final image. */
- s = bfd_make_section_with_flags (abfd, ".dynbss",
- SEC_ALLOC | SEC_LINKER_CREATED);
+ s = bfd_make_section_anyway_with_flags (abfd, ".dynbss",
+ SEC_ALLOC | SEC_LINKER_CREATED);
if (s == NULL)
return FALSE;
@@ -4236,10 +4861,10 @@
copy relocs. */
if (! info->shared)
{
- s = bfd_make_section_with_flags (abfd,
- (bed->default_use_rela_p
- ? ".rela.bss" : ".rel.bss"),
- flags | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.bss" : ".rel.bss"),
+ flags | SEC_READONLY);
if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, ptralign))
return FALSE;
@@ -4259,10 +4884,11 @@
_bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info,
struct elf_link_hash_entry * h)
{
+ struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
bfd * dynobj;
asection * s;
- dynobj = elf_hash_table (info)->dynobj;
+ dynobj = htab->root.dynobj;
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
@@ -4298,7 +4924,7 @@
return FALSE;
}
- s = bfd_get_section_by_name (dynobj, ".plt");
+ s = htab->root.splt;
BFD_ASSERT (s != NULL);
/* If this is the first .plt entry, make room for the special
@@ -4325,12 +4951,12 @@
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- s = bfd_get_section_by_name (dynobj, ".got.plt");
+ s = htab->root.sgotplt;
BFD_ASSERT (s != NULL);
s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
- s = bfd_get_section_by_name (dynobj, ".rela.plt");
+ s = bfd_get_linker_section (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
s->size += sizeof (Elf32_External_Rela);
@@ -4364,13 +4990,6 @@
if (!h->non_got_ref)
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
@@ -4381,18 +5000,18 @@
both the dynamic object and the regular object will refer to the
same memory location for the variable. */
- s = bfd_get_section_by_name (dynobj, ".dynbss");
+ s = bfd_get_linker_section (dynobj, ".dynbss");
BFD_ASSERT (s != NULL);
/* We must generate a R_MN10300_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
.rela.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
{
asection * srel;
- srel = bfd_get_section_by_name (dynobj, ".rela.bss");
+ srel = bfd_get_linker_section (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
srel->size += sizeof (Elf32_External_Rela);
h->needs_copy = 1;
@@ -4407,13 +5026,14 @@
_bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd,
struct bfd_link_info * info)
{
+ struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
bfd * dynobj;
asection * s;
bfd_boolean plt;
bfd_boolean relocs;
bfd_boolean reltext;
- dynobj = elf_hash_table (info)->dynobj;
+ dynobj = htab->root.dynobj;
BFD_ASSERT (dynobj != NULL);
if (elf_hash_table (info)->dynamic_sections_created)
@@ -4421,7 +5041,7 @@
/* Set the contents of the .interp section to the interpreter. */
if (info->executable)
{
- s = bfd_get_section_by_name (dynobj, ".interp");
+ s = bfd_get_linker_section (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
@@ -4434,11 +5054,18 @@
not actually use these entries. Reset the size of .rela.got,
which will cause it to get stripped from the output file
below. */
- s = bfd_get_section_by_name (dynobj, ".rela.got");
+ s = htab->root.sgot;
if (s != NULL)
s->size = 0;
}
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ s = bfd_get_linker_section (dynobj, ".rela.got");
+ BFD_ASSERT (s != NULL);
+ s->size += sizeof (Elf32_External_Rela);
+ }
+
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -4577,9 +5204,10 @@
struct elf_link_hash_entry * h,
Elf_Internal_Sym * sym)
{
+ struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
bfd * dynobj;
- dynobj = elf_hash_table (info)->dynobj;
+ dynobj = htab->root.dynobj;
if (h->plt.offset != (bfd_vma) -1)
{
@@ -4595,9 +5223,9 @@
BFD_ASSERT (h->dynindx != -1);
- splt = bfd_get_section_by_name (dynobj, ".plt");
- sgot = bfd_get_section_by_name (dynobj, ".got.plt");
- srel = bfd_get_section_by_name (dynobj, ".rela.plt");
+ splt = htab->root.splt;
+ sgot = htab->root.sgotplt;
+ srel = bfd_get_linker_section (dynobj, ".rela.plt");
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
/* Get the index in the procedure linkage table which
@@ -4674,39 +5302,72 @@
Elf_Internal_Rela rel;
/* 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, ".rela.got");
+ sgot = htab->root.sgot;
+ srel = bfd_get_linker_section (dynobj, ".rela.got");
BFD_ASSERT (sgot != NULL && srel != NULL);
rel.r_offset = (sgot->output_section->vma
+ sgot->output_offset
+ (h->got.offset & ~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)
+ switch (elf_mn10300_hash_entry (h)->tls_type)
{
- rel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
- rel.r_addend = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- }
- else
- {
+ case GOT_TLS_GD:
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_GLOB_DAT);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset + 4);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_TLS_DTPMOD);
rel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, & rel,
+ (bfd_byte *) ((Elf32_External_Rela *) srel->contents
+ + srel->reloc_count));
+ ++ srel->reloc_count;
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_TLS_DTPOFF);
+ rel.r_offset += 4;
+ rel.r_addend = 0;
+ break;
+
+ case GOT_TLS_IE:
+ /* We originally stored the addend in the GOT, but at this
+ point, we want to move it to the reloc instead as that's
+ where the dynamic linker wants it. */
+ rel.r_addend = bfd_get_32 (output_bfd, sgot->contents + h->got.offset);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+ if (h->dynindx == -1)
+ rel.r_info = ELF32_R_INFO (0, R_MN10300_TLS_TPOFF);
+ else
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_TLS_TPOFF);
+ break;
+
+ default:
+ /* 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)
+ {
+ rel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+ rel.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_GLOB_DAT);
+ rel.r_addend = 0;
+ }
}
- bfd_elf32_swap_reloca_out (output_bfd, &rel,
- (bfd_byte *) ((Elf32_External_Rela *) srel->contents
- + srel->reloc_count));
- ++ srel->reloc_count;
+ if (ELF32_R_TYPE (rel.r_info) != R_MN10300_NONE)
+ {
+ bfd_elf32_swap_reloca_out (output_bfd, &rel,
+ (bfd_byte *) ((Elf32_External_Rela *) srel->contents
+ + srel->reloc_count));
+ ++ srel->reloc_count;
+ }
}
if (h->needs_copy)
@@ -4719,8 +5380,7 @@
&& (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,
- ".rela.bss");
+ s = bfd_get_linker_section (dynobj, ".rela.bss");
BFD_ASSERT (s != NULL);
rel.r_offset = (h->root.u.def.value
@@ -4735,7 +5395,7 @@
}
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
- if (streq (h->root.root.string, "_DYNAMIC")
+ if (h == elf_hash_table (info)->hdynamic
|| h == elf_hash_table (info)->hgot)
sym->st_shndx = SHN_ABS;
@@ -4751,12 +5411,12 @@
bfd * dynobj;
asection * sgot;
asection * sdyn;
+ struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
- dynobj = elf_hash_table (info)->dynobj;
-
- sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ dynobj = htab->root.dynobj;
+ sgot = htab->root.sgotplt;
BFD_ASSERT (sgot != NULL);
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+ sdyn = bfd_get_linker_section (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
{
@@ -4821,7 +5481,7 @@
}
/* Fill in the first entry in the procedure linkage table. */
- splt = bfd_get_section_by_name (dynobj, ".plt");
+ splt = htab->root.splt;
if (splt && splt->size > 0)
{
if (info->shared)
@@ -4843,6 +5503,14 @@
/* UnixWare sets the entsize of .plt to 4, although that doesn't
really seem like the right value. */
elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+
+ /* UnixWare sets the entsize of .plt to 4, but this is incorrect
+ as it means that the size of the PLT0 section (15 bytes) is not
+ a multiple of the sh_entsize. Some ELF tools flag this as an
+ error. We could pad PLT0 to 16 bytes, but that would introduce
+ compatibilty issues with previous toolchains, so instead we
+ just set the entry size to 1. */
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 1;
}
}
@@ -4868,7 +5536,9 @@
properly. */
static enum elf_reloc_type_class
-_bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
+_bfd_mn10300_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
@@ -4884,12 +5554,7 @@
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),
+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_mn10300_obj_tdata),
MN10300_ELF_DATA);
}
@@ -4945,7 +5610,8 @@
_bfd_mn10300_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
_bfd_mn10300_elf_finish_dynamic_sections
-
+#define elf_backend_copy_indirect_symbol \
+ _bfd_mn10300_copy_indirect_symbol
#define elf_backend_reloc_type_class \
_bfd_mn10300_elf_reloc_type_class
diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c
new file mode 100644
index 0000000..944aa34
--- /dev/null
+++ b/bfd/elf-nacl.c
@@ -0,0 +1,355 @@
+/* Native Client support for ELF
+ Copyright 2012, 2013 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., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf-nacl.h"
+#include "elf/common.h"
+#include "elf/internal.h"
+
+static bfd_boolean
+segment_executable (struct elf_segment_map *seg)
+{
+ if (seg->p_flags_valid)
+ return (seg->p_flags & PF_X) != 0;
+ else
+ {
+ /* The p_flags value has not been computed yet,
+ so we have to look through the sections. */
+ unsigned int i;
+ for (i = 0; i < seg->count; ++i)
+ if (seg->sections[i]->flags & SEC_CODE)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* Determine if this segment is eligible to receive the file and program
+ headers. It must be read-only and non-executable.
+ Its first section must start far enough past the page boundary to
+ allow space for the headers. */
+static bfd_boolean
+segment_eligible_for_headers (struct elf_segment_map *seg,
+ bfd_vma minpagesize, bfd_vma sizeof_headers)
+{
+ unsigned int i;
+ if (seg->count == 0 || seg->sections[0]->lma % minpagesize < sizeof_headers)
+ return FALSE;
+ for (i = 0; i < seg->count; ++i)
+ {
+ if ((seg->sections[i]->flags & (SEC_CODE|SEC_READONLY)) != SEC_READONLY)
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/* We permute the segment_map to get BFD to do the file layout we want:
+ The first non-executable PT_LOAD segment appears first in the file
+ and contains the ELF file header and phdrs. */
+bfd_boolean
+nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
+{
+ const struct elf_backend_data *const bed = get_elf_backend_data (abfd);
+ struct elf_segment_map **m = &elf_seg_map (abfd);
+ struct elf_segment_map **first_load = NULL;
+ struct elf_segment_map **last_load = NULL;
+ bfd_boolean moved_headers = FALSE;
+ int sizeof_headers;
+
+ if (info != NULL && info->user_phdrs)
+ /* The linker script used PHDRS explicitly, so don't change what the
+ user asked for. */
+ return TRUE;
+
+ if (info != NULL)
+ /* We're doing linking, so evalute SIZEOF_HEADERS as in a linker script. */
+ sizeof_headers = bfd_sizeof_headers (abfd, info);
+ else
+ {
+ /* We're not doing linking, so this is objcopy or suchlike.
+ We just need to collect the size of the existing headers. */
+ struct elf_segment_map *seg;
+ sizeof_headers = bed->s->sizeof_ehdr;
+ for (seg = *m; seg != NULL; seg = seg->next)
+ sizeof_headers += bed->s->sizeof_phdr;
+ }
+
+ while (*m != NULL)
+ {
+ struct elf_segment_map *seg = *m;
+
+ if (seg->p_type == PT_LOAD)
+ {
+ bfd_boolean executable = segment_executable (seg);
+
+ if (executable
+ && seg->count > 0
+ && seg->sections[0]->vma % bed->minpagesize == 0)
+ {
+ asection *lastsec = seg->sections[seg->count - 1];
+ bfd_vma end = lastsec->vma + lastsec->size;
+ if (end % bed->minpagesize != 0)
+ {
+ /* This is an executable segment that starts on a page
+ boundary but does not end on a page boundary. Fill
+ it out to a whole page with code fill (the tail of
+ the segment will not be within any section). Thus
+ the entire code segment can be mapped from the file
+ as whole pages and that mapping will contain only
+ valid instructions.
+
+ To accomplish this, we must fake out the code in
+ assign_file_positions_for_load_sections (elf.c) so
+ that it advances past the rest of the final page,
+ rather than trying to put the next (unaligned, or
+ unallocated) section. We do this by appending a
+ dummy section record to this element in the segment
+ map. No such output section ever actually exists,
+ but this gets the layout logic to advance the file
+ positions past this partial page. Since we are
+ lying to BFD like this, nothing will ever know to
+ write the section contents. So we do that by hand
+ after the fact, in nacl_final_write_processing, below. */
+
+ struct elf_segment_map *newseg;
+ asection *sec;
+ struct bfd_elf_section_data *secdata;
+
+ BFD_ASSERT (!seg->p_size_valid);
+
+ secdata = bfd_zalloc (abfd, sizeof *secdata);
+ if (secdata == NULL)
+ return FALSE;
+
+ sec = bfd_zalloc (abfd, sizeof *sec);
+ if (sec == NULL)
+ return FALSE;
+
+ /* Fill in only the fields that actually affect the logic
+ in assign_file_positions_for_load_sections. */
+ sec->vma = end;
+ sec->lma = lastsec->lma + lastsec->size;
+ sec->size = bed->minpagesize - (end % bed->minpagesize);
+ sec->flags = (SEC_ALLOC | SEC_LOAD
+ | SEC_READONLY | SEC_CODE | SEC_LINKER_CREATED);
+ sec->used_by_bfd = secdata;
+
+ secdata->this_hdr.sh_type = SHT_PROGBITS;
+ secdata->this_hdr.sh_flags = SHF_ALLOC | SHF_EXECINSTR;
+ secdata->this_hdr.sh_addr = sec->vma;
+ secdata->this_hdr.sh_size = sec->size;
+
+ newseg = bfd_alloc (abfd,
+ sizeof *newseg + ((seg->count + 1)
+ * sizeof (asection *)));
+ if (newseg == NULL)
+ return FALSE;
+ memcpy (newseg, seg,
+ sizeof *newseg + (seg->count * sizeof (asection *)));
+ newseg->sections[newseg->count++] = sec;
+ *m = seg = newseg;
+ }
+ }
+
+ /* First, we're just finding the earliest PT_LOAD.
+ By the normal rules, this will be the lowest-addressed one.
+ We only have anything interesting to do if it's executable. */
+ last_load = m;
+ if (first_load == NULL)
+ {
+ if (!executable)
+ goto next;
+ first_load = m;
+ }
+ /* Now that we've noted the first PT_LOAD, we're looking for
+ the first non-executable PT_LOAD with a nonempty p_filesz. */
+ else if (!moved_headers
+ && segment_eligible_for_headers (seg, bed->minpagesize,
+ sizeof_headers))
+ {
+ /* This is the one we were looking for!
+
+ First, clear the flags on previous segments that
+ say they include the file header and phdrs. */
+ struct elf_segment_map *prevseg;
+ for (prevseg = *first_load;
+ prevseg != seg;
+ prevseg = prevseg->next)
+ if (prevseg->p_type == PT_LOAD)
+ {
+ prevseg->includes_filehdr = 0;
+ prevseg->includes_phdrs = 0;
+ }
+
+ /* This segment will include those headers instead. */
+ seg->includes_filehdr = 1;
+ seg->includes_phdrs = 1;
+
+ moved_headers = TRUE;
+ }
+ }
+
+ next:
+ m = &seg->next;
+ }
+
+ if (first_load != last_load && moved_headers)
+ {
+ /* Now swap the first and last PT_LOAD segments'
+ positions in segment_map. */
+ struct elf_segment_map *first = *first_load;
+ struct elf_segment_map *last = *last_load;
+ *first_load = first->next;
+ first->next = last->next;
+ last->next = first;
+ }
+
+ return TRUE;
+}
+
+/* After nacl_modify_segment_map has done its work, the file layout has
+ been done as we wanted. But the PT_LOAD phdrs are no longer in the
+ proper order for the ELF rule that they must appear in ascending address
+ order. So find the two segments we swapped before, and swap them back. */
+bfd_boolean
+nacl_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
+{
+ struct elf_segment_map **m = &elf_seg_map (abfd);
+ Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;
+ Elf_Internal_Phdr *p = phdr;
+
+ if (info != NULL && info->user_phdrs)
+ /* The linker script used PHDRS explicitly, so don't change what the
+ user asked for. */
+ return TRUE;
+
+ /* Find the PT_LOAD that contains the headers (should be the first). */
+ while (*m != NULL)
+ {
+ if ((*m)->p_type == PT_LOAD && (*m)->includes_filehdr)
+ break;
+
+ m = &(*m)->next;
+ ++p;
+ }
+
+ if (*m != NULL)
+ {
+ struct elf_segment_map **first_load_seg = m;
+ Elf_Internal_Phdr *first_load_phdr = p;
+ struct elf_segment_map **next_load_seg = NULL;
+ Elf_Internal_Phdr *next_load_phdr = NULL;
+
+ /* Now move past that first one and find the PT_LOAD that should be
+ before it by address order. */
+
+ m = &(*m)->next;
+ ++p;
+
+ while (*m != NULL)
+ {
+ if (p->p_type == PT_LOAD && p->p_vaddr < first_load_phdr->p_vaddr)
+ {
+ next_load_seg = m;
+ next_load_phdr = p;
+ break;
+ }
+
+ m = &(*m)->next;
+ ++p;
+ }
+
+ /* Swap their positions in the segment_map back to how they used to be.
+ The phdrs have already been set up by now, so we have to slide up
+ the earlier ones to insert the one that should be first. */
+ if (next_load_seg != NULL)
+ {
+ Elf_Internal_Phdr move_phdr;
+ struct elf_segment_map *first_seg = *first_load_seg;
+ struct elf_segment_map *next_seg = *next_load_seg;
+ struct elf_segment_map *first_next = first_seg->next;
+ struct elf_segment_map *next_next = next_seg->next;
+
+ if (next_load_seg == &first_seg->next)
+ {
+ *first_load_seg = next_seg;
+ next_seg->next = first_seg;
+ first_seg->next = next_next;
+ }
+ else
+ {
+ *first_load_seg = first_next;
+ *next_load_seg = next_next;
+
+ first_seg->next = *next_load_seg;
+ *next_load_seg = first_seg;
+
+ next_seg->next = *first_load_seg;
+ *first_load_seg = next_seg;
+ }
+
+ move_phdr = *next_load_phdr;
+ memmove (first_load_phdr + 1, first_load_phdr,
+ (next_load_phdr - first_load_phdr) * sizeof move_phdr);
+ *first_load_phdr = move_phdr;
+ }
+ }
+
+ return TRUE;
+}
+
+void
+nacl_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+{
+ struct elf_segment_map *seg;
+ for (seg = elf_seg_map (abfd); seg != NULL; seg = seg->next)
+ if (seg->p_type == PT_LOAD
+ && seg->count > 1
+ && seg->sections[seg->count - 1]->owner == NULL)
+ {
+ /* This is a fake section added in nacl_modify_segment_map, above.
+ It's not a real BFD section, so nothing wrote its contents.
+ Now write out its contents. */
+
+ asection *sec = seg->sections[seg->count - 1];
+ char *fill;
+
+ BFD_ASSERT (sec->flags & SEC_LINKER_CREATED);
+ BFD_ASSERT (sec->flags & SEC_CODE);
+ BFD_ASSERT (sec->size > 0);
+
+ fill = abfd->arch_info->fill (sec->size, bfd_big_endian (abfd), TRUE);
+
+ if (fill == NULL
+ || bfd_seek (abfd, sec->filepos, SEEK_SET) != 0
+ || bfd_bwrite (fill, sec->size, abfd) != sec->size)
+ {
+ /* We don't have a proper way to report an error here. So
+ instead fudge things so that elf_write_shdrs_and_ehdr will
+ fail. */
+ elf_elfheader (abfd)->e_shoff = (file_ptr) -1;
+ }
+
+ free (fill);
+ }
+}
diff --git a/bfd/elf-nacl.h b/bfd/elf-nacl.h
new file mode 100644
index 0000000..87719ef
--- /dev/null
+++ b/bfd/elf-nacl.h
@@ -0,0 +1,25 @@
+/* Native Client support for ELF
+ Copyright 2012, 2013 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., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
+
+#include "bfd.h"
+
+bfd_boolean nacl_modify_segment_map (bfd *, struct bfd_link_info *);
+bfd_boolean nacl_modify_program_headers (bfd *, struct bfd_link_info *);
+void nacl_final_write_processing (bfd *, bfd_boolean linker);
diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c
new file mode 100644
index 0000000..691f751
--- /dev/null
+++ b/bfd/elf-s390-common.c
@@ -0,0 +1,243 @@
+/* IBM S/390-specific support for ELF 32 and 64 bit functions
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2011, 2012 Free Software Foundation, Inc.
+ Contributed by Andreas Krebbel.
+
+ 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. */
+
+
+/* Return TRUE if H is an IFUNC symbol. Simply checking for the
+ symbol type might not be enough since it might get changed to
+ STT_FUNC for pointer equality reasons. */
+static inline bfd_boolean
+s390_is_ifunc_symbol_p (struct elf_link_hash_entry *h)
+{
+ struct elf_s390_link_hash_entry *eh = (struct elf_s390_link_hash_entry*)h;
+ return h->type == STT_GNU_IFUNC || eh->ifunc_resolver_address != 0;
+}
+
+/* Create sections needed by STT_GNU_IFUNC symbol. */
+
+static bfd_boolean
+s390_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info)
+{
+ flagword flags;
+ asection *s;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ struct elf_link_hash_table *htab = elf_hash_table (info);
+
+ if (htab->iplt != NULL)
+ return TRUE;
+
+ flags = bed->dynamic_sec_flags;
+
+ if (info->shared)
+ {
+ s = bfd_make_section_with_flags (abfd, ".rela.ifunc",
+ flags | SEC_READONLY);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s,
+ bed->s->log_file_align))
+ return FALSE;
+ htab->irelifunc = s;
+ }
+
+ /* Create .iplt, .rel[a].iplt, and .igot.plt. */
+ s = bfd_make_section_with_flags (abfd, ".iplt",
+ flags | SEC_CODE | SEC_READONLY);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+ return FALSE;
+ htab->iplt = s;
+
+ s = bfd_make_section_with_flags (abfd, ".rela.iplt", flags | SEC_READONLY);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s,
+ bed->s->log_file_align))
+ return FALSE;
+ htab->irelplt = s;
+
+ s = bfd_make_section_with_flags (abfd, ".igot.plt", flags);
+ if (s == NULL
+ || !bfd_set_section_alignment (abfd, s,
+ bed->s->log_file_align))
+ return FALSE;
+ htab->igotplt = s;
+
+ return TRUE;
+}
+
+
+/* Allocate space in .plt, .got and associated reloc sections for
+ dynamic relocs against a STT_GNU_IFUNC symbol definition. */
+
+static bfd_boolean
+s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ struct elf_dyn_relocs **head)
+{
+ struct elf_dyn_relocs *p;
+ struct elf_link_hash_table *htab;
+ struct elf_s390_link_hash_entry *eh = (struct elf_s390_link_hash_entry*)h;
+
+ htab = elf_hash_table (info);
+ eh->ifunc_resolver_address = h->root.u.def.value;
+ eh->ifunc_resolver_section = h->root.u.def.section;
+
+ /* Support garbage collection against STT_GNU_IFUNC symbols. */
+ if (h->plt.refcount <= 0 && h->got.refcount <= 0)
+ {
+ /* When building shared library, we need to handle the case
+ 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. */
+ if (info->shared
+ && !h->non_got_ref
+ && h->ref_regular)
+ for (p = *head; p != NULL; p = p->next)
+ if (p->count)
+ {
+ h->non_got_ref = 1;
+ goto keep;
+ }
+
+ 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
+ it is never referenced in a non-shared object. */
+ if (!h->ref_regular)
+ {
+ if (h->plt.refcount > 0
+ || h->got.refcount > 0)
+ abort ();
+ h->got = htab->init_got_offset;
+ h->plt = htab->init_plt_offset;
+ *head = NULL;
+ return TRUE;
+ }
+
+keep:
+ /* Without checking h->plt.refcount here we allocate a PLT slot.
+ When setting plt.refcount in check_relocs it might not have been
+ known that this will be an IFUNC symol. */
+ h->plt.offset = htab->iplt->size;
+ h->needs_plt = 1;
+ htab->iplt->size += PLT_ENTRY_SIZE;
+ htab->igotplt->size += GOT_ENTRY_SIZE;
+ htab->irelplt->size += RELA_ENTRY_SIZE;
+ htab->irelplt->reloc_count++;
+
+ /* In order to make pointer equality work with IFUNC symbols defined
+ in a non-PIE executable and referenced in a shared lib, we turn
+ the symbol into a STT_FUNC symbol and make the symbol value to
+ point to the IPLT slot. That way the referencing shared lib will
+ always get the PLT slot address when resolving the respective
+ R_390_GLOB_DAT/R_390_64 relocs on that symbol. */
+ if (info->executable && !info->shared && h->def_regular && h->ref_dynamic)
+ {
+ h->root.u.def.section = htab->iplt;
+ h->root.u.def.value = h->plt.offset;
+ h->size = PLT_ENTRY_SIZE;
+ h->type = STT_FUNC;
+ }
+
+ /* We need dynamic relocation for STT_GNU_IFUNC symbol only when
+ there is a non-GOT reference in a shared object. */
+ if (!info->shared || !h->non_got_ref)
+ *head = NULL;
+
+ /* Finally, allocate space. */
+ p = *head;
+ if (p != NULL)
+ {
+ bfd_size_type count = 0;
+ do
+ {
+ count += p->count;
+ p = p->next;
+ }
+ while (p != NULL);
+ htab->irelifunc->size += count * RELA_ENTRY_SIZE;
+ }
+
+ /* Decide whether the got.iplt slot can be used. This has to be
+ avoided if the values in the GOT slots could differ for pointer
+ equality reasons. */
+ if (h->got.refcount <= 0
+ || (info->shared
+ && (h->dynindx == -1 || h->forced_local))
+ || (info->executable && info->shared)
+ || htab->sgot == NULL)
+ {
+ /* Use .got.iplt. */
+ h->got.offset = (bfd_vma) -1;
+ }
+ else
+ {
+ h->got.offset = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
+ if (info->shared)
+ htab->srelgot->size += RELA_ENTRY_SIZE;
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+elf_s390_allocate_local_syminfo (bfd *abfd, Elf_Internal_Shdr *symtab_hdr)
+{
+ bfd_size_type size;
+
+ size = symtab_hdr->sh_info;
+ size *= (sizeof (bfd_signed_vma) /* local got */
+ + sizeof (struct plt_entry) /* local plt */
+ + sizeof(char)); /* local tls type */
+ elf_local_got_refcounts (abfd) = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
+ if (elf_local_got_refcounts (abfd) == NULL)
+ return FALSE;
+ elf_s390_local_plt (abfd)
+ = (struct plt_entry*)(elf_local_got_refcounts (abfd)
+ + symtab_hdr->sh_info);
+ elf_s390_local_got_tls_type (abfd)
+ = (char *) (elf_s390_local_plt (abfd) + symtab_hdr->sh_info);
+
+ return TRUE;
+}
+
+/* Pick ELFOSABI_GNU if IFUNC symbols are used. */
+
+static bfd_boolean
+elf_s390_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp ATTRIBUTE_UNUSED,
+ 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_gnu_symbols = TRUE;
+
+ return TRUE;
+}
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index 7d2fad4..61cedae 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -201,15 +201,41 @@
--tab->array[idx]->refcount;
}
+unsigned int
+_bfd_elf_strtab_refcount (struct elf_strtab_hash *tab, bfd_size_type idx)
+{
+ return tab->array[idx]->refcount;
+}
+
void
_bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab)
{
bfd_size_type idx;
- for (idx = 1; idx < tab->size; ++idx)
+ for (idx = 1; idx < tab->size; idx++)
tab->array[idx]->refcount = 0;
}
+/* Downsizes strtab. Entries from IDX up to the current size are
+ removed from the array. */
+void
+_bfd_elf_strtab_restore_size (struct elf_strtab_hash *tab, bfd_size_type idx)
+{
+ bfd_size_type curr_size = tab->size;
+
+ BFD_ASSERT (tab->sec_size == 0);
+ BFD_ASSERT (idx <= curr_size);
+ tab->size = idx;
+ for (; idx < curr_size; ++idx)
+ {
+ /* We don't remove entries from the hash table, just set their
+ REFCOUNT to zero. Setting LEN zero will result in the size
+ growing if the entry is added again. See _bfd_elf_strtab_add. */
+ tab->array[idx]->refcount = 0;
+ tab->array[idx]->len = 0;
+ }
+}
+
bfd_size_type
_bfd_elf_strtab_size (struct elf_strtab_hash *tab)
{
diff --git a/bfd/elf-vxworks.c b/bfd/elf-vxworks.c
index 06edf8d..bb9dbbb 100644
--- a/bfd/elf-vxworks.c
+++ b/bfd/elf-vxworks.c
@@ -1,5 +1,5 @@
/* VxWorks support for ELF
- Copyright 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright 2005, 2006, 2007, 2009, 2012 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -91,12 +91,13 @@
if (!info->shared)
{
- s = bfd_make_section_with_flags (dynobj,
- bed->default_use_rela_p
- ? ".rela.plt.unloaded"
- : ".rel.plt.unloaded",
- SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_READONLY | SEC_LINKER_CREATED);
+ s = bfd_make_section_anyway_with_flags (dynobj,
+ bed->default_use_rela_p
+ ? ".rela.plt.unloaded"
+ : ".rel.plt.unloaded",
+ SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_READONLY
+ | SEC_LINKER_CREATED);
if (s == NULL
|| !bfd_set_section_alignment (dynobj, s, bed->s->log_file_align))
return FALSE;
@@ -194,7 +195,7 @@
{
asection *sec = (*hash_ptr)->root.u.def.section;
int this_idx = sec->output_section->target_index;
-
+
irela[j].r_info
= ELF32_R_INFO (this_idx, ELF32_R_TYPE (irela[j].r_info));
irela[j].r_addend += (*hash_ptr)->root.u.def.value;
@@ -226,7 +227,7 @@
if (!sec)
return;
d = elf_section_data (sec);
- d->this_hdr.sh_link = elf_tdata (abfd)->symtab_section;
+ d->this_hdr.sh_link = elf_onesymtab (abfd);
sec = bfd_get_section_by_name (abfd, ".plt");
if (sec)
d->this_hdr.sh_info = elf_section_data (sec)->this_idx;
@@ -261,33 +262,34 @@
elf_vxworks_finish_dynamic_entry (bfd *output_bfd, Elf_Internal_Dyn *dyn)
{
asection *sec;
-
+
switch (dyn->d_tag)
{
default:
return FALSE;
-
+
case DT_VX_WRS_TLS_DATA_START:
sec = bfd_get_section_by_name (output_bfd, ".tls_data");
dyn->d_un.d_ptr = sec->vma;
break;
-
+
case DT_VX_WRS_TLS_DATA_SIZE:
sec = bfd_get_section_by_name (output_bfd, ".tls_data");
dyn->d_un.d_val = sec->size;
break;
-
+
case DT_VX_WRS_TLS_DATA_ALIGN:
sec = bfd_get_section_by_name (output_bfd, ".tls_data");
dyn->d_un.d_val
- = (bfd_size_type)1 << bfd_get_section_alignment (abfd, sec);
+ = (bfd_size_type)1 << bfd_get_section_alignment (output_bfd,
+ sec);
break;
-
+
case DT_VX_WRS_TLS_VARS_START:
sec = bfd_get_section_by_name (output_bfd, ".tls_vars");
dyn->d_un.d_ptr = sec->vma;
break;
-
+
case DT_VX_WRS_TLS_VARS_SIZE:
sec = bfd_get_section_by_name (output_bfd, ".tls_vars");
dyn->d_un.d_val = sec->size;
diff --git a/bfd/elf.c b/bfd/elf.c
index 93b518d..8df38ee 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,8 +1,6 @@
/* ELF executable support for BFD.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright 1993-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -44,6 +42,7 @@
#include "elf-bfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
+#include "elf-linux-psinfo.h"
#ifdef CORE_HEADER
#include CORE_HEADER
@@ -244,7 +243,14 @@
return FALSE;
elf_object_id (abfd) = object_id;
- elf_program_header_size (abfd) = (bfd_size_type) -1;
+ if (abfd->direction != read_direction)
+ {
+ struct output_elf_obj_tdata *o = bfd_zalloc (abfd, sizeof *o);
+ if (o == NULL)
+ return FALSE;
+ elf_tdata (abfd)->o = o;
+ elf_program_header_size (abfd) = (bfd_size_type) -1;
+ }
return TRUE;
}
@@ -261,7 +267,10 @@
bfd_elf_mkcorefile (bfd *abfd)
{
/* I think this can be done just like an object file. */
- return abfd->xvec->_bfd_set_format[(int) bfd_object] (abfd);
+ if (!abfd->xvec->_bfd_set_format[(int) bfd_object] (abfd))
+ return FALSE;
+ elf_tdata (abfd)->core = bfd_zalloc (abfd, sizeof (*elf_tdata (abfd)->core));
+ return elf_tdata (abfd)->core != NULL;
}
static char *
@@ -545,9 +554,9 @@
shnum = elf_numsections (abfd);
num_group = 0;
-#define IS_VALID_GROUP_SECTION_HEADER(shdr) \
+#define IS_VALID_GROUP_SECTION_HEADER(shdr, minsize) \
( (shdr)->sh_type == SHT_GROUP \
- && (shdr)->sh_size >= (2 * GRP_ENTRY_SIZE) \
+ && (shdr)->sh_size >= minsize \
&& (shdr)->sh_entsize == GRP_ENTRY_SIZE \
&& ((shdr)->sh_size % GRP_ENTRY_SIZE) == 0)
@@ -555,7 +564,7 @@
{
Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i];
- if (IS_VALID_GROUP_SECTION_HEADER (shdr))
+ if (IS_VALID_GROUP_SECTION_HEADER (shdr, 2 * GRP_ENTRY_SIZE))
num_group += 1;
}
@@ -581,7 +590,7 @@
{
Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i];
- if (IS_VALID_GROUP_SECTION_HEADER (shdr))
+ if (IS_VALID_GROUP_SECTION_HEADER (shdr, 2 * GRP_ENTRY_SIZE))
{
unsigned char *src;
Elf_Internal_Group *dest;
@@ -1005,7 +1014,7 @@
else
{
/* Normal section. Check if we should compress. */
- if ((abfd->flags & BFD_COMPRESS))
+ if ((abfd->flags & BFD_COMPRESS) && newsect->size != 0)
action = compress;
}
@@ -1018,7 +1027,7 @@
if (!bfd_init_section_compress_status (abfd, newsect))
{
(*_bfd_error_handler)
- (_("%B: unable to initialize commpress status for section %s"),
+ (_("%B: unable to initialize compress status for section %s"),
abfd, name);
return FALSE;
}
@@ -1038,7 +1047,7 @@
if (!bfd_init_section_decompress_status (abfd, newsect))
{
(*_bfd_error_handler)
- (_("%B: unable to initialize decommpress status for section %s"),
+ (_("%B: unable to initialize decompress status for section %s"),
abfd, name);
return FALSE;
}
@@ -1434,9 +1443,9 @@
bfd_fprintf_vma (abfd, file, val);
/* If we have version information, print it. */
- if (elf_tdata (abfd)->dynversym_section != 0
- && (elf_tdata (abfd)->dynverdef_section != 0
- || elf_tdata (abfd)->dynverref_section != 0))
+ if (elf_dynversym (abfd) != 0
+ && (elf_dynverdef (abfd) != 0
+ || elf_dynverref (abfd) != 0))
{
unsigned int vernum;
const char *version_string;
@@ -1626,7 +1635,15 @@
if (hdr->sh_entsize != bed->s->sizeof_sym)
return FALSE;
if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
- return FALSE;
+ {
+ if (hdr->sh_size != 0)
+ return FALSE;
+ /* Some assemblers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+ return TRUE;
+ }
BFD_ASSERT (elf_onesymtab (abfd) == 0);
elf_onesymtab (abfd) = shindex;
elf_tdata (abfd)->symtab_hdr = *hdr;
@@ -1679,6 +1696,16 @@
if (hdr->sh_entsize != bed->s->sizeof_sym)
return FALSE;
+ if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
+ {
+ if (hdr->sh_size != 0)
+ return FALSE;
+ /* Some linkers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+ return TRUE;
+ }
BFD_ASSERT (elf_dynsymtab (abfd) == 0);
elf_dynsymtab (abfd) = shindex;
elf_tdata (abfd)->dynsymtab_hdr = *hdr;
@@ -1891,7 +1918,7 @@
return TRUE;
case SHT_GROUP:
- if (! IS_VALID_GROUP_SECTION_HEADER (hdr))
+ if (! IS_VALID_GROUP_SECTION_HEADER (hdr, GRP_ENTRY_SIZE))
return FALSE;
if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
@@ -2043,6 +2070,9 @@
{
{ STRING_COMMA_LEN (".data"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ STRING_COMMA_LEN (".data1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ /* There are more DWARF sections than these, but they needn't be added here
+ unless you have to cope with broken compilers that don't emit section
+ attributes or you want to help the user writing assembler. */
{ STRING_COMMA_LEN (".debug"), 0, SHT_PROGBITS, 0 },
{ STRING_COMMA_LEN (".debug_line"), 0, SHT_PROGBITS, 0 },
{ STRING_COMMA_LEN (".debug_info"), 0, SHT_PROGBITS, 0 },
@@ -2491,7 +2521,7 @@
USE_RELA_P is TRUE, we use RELA relocations; otherwise, we use REL
relocations. */
-bfd_boolean
+static bfd_boolean
_bfd_elf_init_reloc_shdr (bfd *abfd,
struct bfd_elf_section_reloc_data *reldata,
asection *asect,
@@ -2507,7 +2537,7 @@
rel_hdr = bfd_zalloc (abfd, amt);
reldata->hdr = rel_hdr;
- amt = sizeof ".rela" + strlen (asect->name);
+ amt = sizeof ".rela" + strlen (asect->name);
name = (char *) bfd_alloc (abfd, amt);
if (name == NULL)
return FALSE;
@@ -2951,9 +2981,9 @@
d->rela.idx = 0;
}
- t->shstrtab_section = section_number++;
+ elf_shstrtab_sec (abfd) = section_number++;
_bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name);
- elf_elfheader (abfd)->e_shstrndx = t->shstrtab_section;
+ elf_elfheader (abfd)->e_shstrndx = elf_shstrtab_sec (abfd);
need_symtab = (bfd_get_symcount (abfd) > 0
|| (link_info == NULL
@@ -2961,21 +2991,28 @@
== HAS_RELOC)));
if (need_symtab)
{
- t->symtab_section = section_number++;
+ elf_onesymtab (abfd) = section_number++;
_bfd_elf_strtab_addref (elf_shstrtab (abfd), t->symtab_hdr.sh_name);
if (section_number > ((SHN_LORESERVE - 2) & 0xFFFF))
{
- t->symtab_shndx_section = section_number++;
+ elf_symtab_shndx (abfd) = section_number++;
t->symtab_shndx_hdr.sh_name
= (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd),
".symtab_shndx", FALSE);
if (t->symtab_shndx_hdr.sh_name == (unsigned int) -1)
return FALSE;
}
- t->strtab_section = section_number++;
+ elf_strtab_sec (abfd) = section_number++;
_bfd_elf_strtab_addref (elf_shstrtab (abfd), t->strtab_hdr.sh_name);
}
+ if (section_number >= SHN_LORESERVE)
+ {
+ _bfd_error_handler (_("%B: too many sections: %u"),
+ abfd, section_number);
+ return FALSE;
+ }
+
_bfd_elf_strtab_finalize (elf_shstrtab (abfd));
t->shstrtab_hdr.sh_size = _bfd_elf_strtab_size (elf_shstrtab (abfd));
@@ -2999,17 +3036,17 @@
elf_elfsections (abfd) = i_shdrp;
- i_shdrp[t->shstrtab_section] = &t->shstrtab_hdr;
+ i_shdrp[elf_shstrtab_sec (abfd)] = &t->shstrtab_hdr;
if (need_symtab)
{
- i_shdrp[t->symtab_section] = &t->symtab_hdr;
+ i_shdrp[elf_onesymtab (abfd)] = &t->symtab_hdr;
if (elf_numsections (abfd) > (SHN_LORESERVE & 0xFFFF))
{
- i_shdrp[t->symtab_shndx_section] = &t->symtab_shndx_hdr;
- t->symtab_shndx_hdr.sh_link = t->symtab_section;
+ i_shdrp[elf_symtab_shndx (abfd)] = &t->symtab_shndx_hdr;
+ t->symtab_shndx_hdr.sh_link = elf_onesymtab (abfd);
}
- i_shdrp[t->strtab_section] = &t->strtab_hdr;
- t->symtab_hdr.sh_link = t->strtab_section;
+ i_shdrp[elf_strtab_sec (abfd)] = &t->strtab_hdr;
+ t->symtab_hdr.sh_link = elf_strtab_sec (abfd);
}
for (sec = abfd->sections; sec; sec = sec->next)
@@ -3032,12 +3069,12 @@
the relocation entries apply. */
if (d->rel.idx != 0)
{
- d->rel.hdr->sh_link = t->symtab_section;
+ d->rel.hdr->sh_link = elf_onesymtab (abfd);
d->rel.hdr->sh_info = d->this_idx;
}
if (d->rela.idx != 0)
{
- d->rela.hdr->sh_link = t->symtab_section;
+ d->rela.hdr->sh_link = elf_onesymtab (abfd);
d->rela.hdr->sh_info = d->this_idx;
}
@@ -3051,7 +3088,7 @@
if (link_info != NULL)
{
/* Check discarded linkonce section. */
- if (elf_discarded_section (s))
+ if (discarded_section (s))
{
asection *kept;
(*_bfd_error_handler)
@@ -3192,7 +3229,7 @@
break;
case SHT_GROUP:
- d->this_hdr.sh_link = t->symtab_section;
+ d->this_hdr.sh_link = elf_onesymtab (abfd);
}
}
@@ -3205,9 +3242,6 @@
return TRUE;
}
-/* Map symbol from it's internal number to the external number, moving
- all local symbols to be at the head of the list. */
-
static bfd_boolean
sym_is_global (bfd *abfd, asymbol *sym)
{
@@ -3222,19 +3256,31 @@
}
/* Don't output section symbols for sections that are not going to be
- output. */
+ output, that are duplicates or there is no BFD section. */
static bfd_boolean
ignore_section_sym (bfd *abfd, asymbol *sym)
{
- return ((sym->flags & BSF_SECTION_SYM) != 0
- && !(sym->section->owner == abfd
+ elf_symbol_type *type_ptr;
+
+ if ((sym->flags & BSF_SECTION_SYM) == 0)
+ return FALSE;
+
+ type_ptr = elf_symbol_from (abfd, sym);
+ return ((type_ptr != NULL
+ && type_ptr->internal_elf_sym.st_shndx != 0
+ && bfd_is_abs_section (sym->section))
+ || !(sym->section->owner == abfd
|| (sym->section->output_section->owner == abfd
- && sym->section->output_offset == 0)));
+ && sym->section->output_offset == 0)
+ || bfd_is_abs_section (sym->section)));
}
+/* Map symbol from it's internal number to the external number, moving
+ all local symbols to be at the head of the list. */
+
static bfd_boolean
-elf_map_symbols (bfd *abfd)
+elf_map_symbols (bfd *abfd, unsigned int *pnum_locals)
{
unsigned int symcount = bfd_get_symcount (abfd);
asymbol **syms = bfd_get_outsymbols (abfd);
@@ -3274,7 +3320,8 @@
if ((sym->flags & BSF_SECTION_SYM) != 0
&& sym->value == 0
- && !ignore_section_sym (abfd, sym))
+ && !ignore_section_sym (abfd, sym)
+ && !bfd_is_abs_section (sym->section))
{
asection *sec = sym->section;
@@ -3288,12 +3335,10 @@
/* Classify all of the symbols. */
for (idx = 0; idx < symcount; idx++)
{
- if (ignore_section_sym (abfd, syms[idx]))
- continue;
- if (!sym_is_global (abfd, syms[idx]))
- num_locals++;
- else
+ if (sym_is_global (abfd, syms[idx]))
num_globals++;
+ else if (!ignore_section_sym (abfd, syms[idx]))
+ num_locals++;
}
/* We will be adding a section symbol for each normal BFD section. Most
@@ -3323,12 +3368,12 @@
asymbol *sym = syms[idx];
unsigned int i;
- if (ignore_section_sym (abfd, sym))
- continue;
- if (!sym_is_global (abfd, sym))
+ if (sym_is_global (abfd, sym))
+ i = num_locals + num_globals2++;
+ else if (!ignore_section_sym (abfd, sym))
i = num_locals2++;
else
- i = num_locals + num_globals2++;
+ continue;
new_syms[i] = sym;
sym->udata.i = i + 1;
}
@@ -3351,8 +3396,7 @@
bfd_set_symtab (abfd, new_syms, num_locals + num_globals);
- elf_num_locals (abfd) = num_locals;
- elf_num_globals (abfd) = num_globals;
+ *pnum_locals = num_locals;
return TRUE;
}
@@ -3463,7 +3507,7 @@
file_ptr off;
Elf_Internal_Shdr *hdr;
- off = elf_tdata (abfd)->next_file_pos;
+ off = elf_next_file_pos (abfd);
hdr = &elf_tdata (abfd)->symtab_hdr;
off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
@@ -3475,7 +3519,7 @@
hdr = &elf_tdata (abfd)->strtab_hdr;
off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
- elf_tdata (abfd)->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
/* Now that we know where the .strtab section goes, write it
out. */
@@ -3526,13 +3570,13 @@
++segs;
}
- if (elf_tdata (abfd)->eh_frame_hdr)
+ if (elf_eh_frame_hdr (abfd))
{
/* We need a PT_GNU_EH_FRAME segment. */
++segs;
}
- if (elf_tdata (abfd)->stack_flags)
+ if (elf_stack_flags (abfd))
{
/* We need a PT_GNU_STACK segment. */
++segs;
@@ -3594,8 +3638,7 @@
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
- for (m = elf_tdata (abfd)->segment_map,
- p = elf_tdata (abfd)->phdr;
+ for (m = elf_seg_map (abfd), p = elf_tdata (abfd)->phdr;
m != NULL;
m = m->next, p++)
{
@@ -3679,7 +3722,7 @@
sections from the segment map. We also remove excluded
sections. Finally, any PT_LOAD segment without sections is
removed. */
- m = &elf_tdata (abfd)->segment_map;
+ m = &elf_seg_map (abfd);
while (*m)
{
unsigned int i, new_count;
@@ -3723,7 +3766,11 @@
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean no_user_phdrs;
- no_user_phdrs = elf_tdata (abfd)->segment_map == NULL;
+ no_user_phdrs = elf_seg_map (abfd) == NULL;
+
+ if (info != NULL)
+ info->user_phdrs = !no_user_phdrs;
+
if (no_user_phdrs && bfd_count_sections (abfd) != 0)
{
asection *s;
@@ -3830,10 +3877,11 @@
program headers we will need. */
if (count > 0)
{
- bfd_size_type phdr_size = elf_tdata (abfd)->program_header_size;
+ bfd_size_type phdr_size = elf_program_header_size (abfd);
if (phdr_size == (bfd_size_type) -1)
phdr_size = get_program_header_size (abfd, info);
+ phdr_size += bed->s->sizeof_ehdr;
if ((abfd->flags & D_PAGED) == 0
|| (sections[0]->lma & addr_mask) < phdr_size
|| ((sections[0]->lma & addr_mask) % maxpagesize
@@ -4074,7 +4122,7 @@
/* If there is a .eh_frame_hdr section, throw in a PT_GNU_EH_FRAME
segment. */
- eh_frame_hdr = elf_tdata (abfd)->eh_frame_hdr;
+ eh_frame_hdr = elf_eh_frame_hdr (abfd);
if (eh_frame_hdr != NULL
&& (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0)
{
@@ -4091,7 +4139,7 @@
pm = &m->next;
}
- if (elf_tdata (abfd)->stack_flags)
+ if (elf_stack_flags (abfd))
{
amt = sizeof (struct elf_segment_map);
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
@@ -4099,8 +4147,15 @@
goto error_return;
m->next = NULL;
m->p_type = PT_GNU_STACK;
- m->p_flags = elf_tdata (abfd)->stack_flags;
+ m->p_flags = elf_stack_flags (abfd);
+ m->p_align = bed->stack_align;
m->p_flags_valid = 1;
+ m->p_align_valid = m->p_align != 0;
+ if (info->stacksize > 0)
+ {
+ m->p_size = info->stacksize;
+ m->p_size_valid = 1;
+ }
*pm = m;
pm = &m->next;
@@ -4110,18 +4165,25 @@
{
for (m = mfirst; m != NULL; m = m->next)
{
- if (m->p_type == PT_LOAD)
+ if (m->p_type == PT_LOAD
+ && m->count != 0
+ && m->sections[0]->vma >= info->relro_start
+ && m->sections[0]->vma < info->relro_end)
{
- asection *last = m->sections[m->count - 1];
- bfd_vma vaddr = m->sections[0]->vma;
- bfd_vma filesz = last->vma - vaddr + last->size;
+ i = m->count;
+ while (--i != (unsigned) -1)
+ if ((m->sections[i]->flags & (SEC_LOAD | SEC_HAS_CONTENTS))
+ == (SEC_LOAD | SEC_HAS_CONTENTS))
+ break;
- if (vaddr < info->relro_end
- && vaddr >= info->relro_start
- && (vaddr + filesz) >= info->relro_end)
+ if (i == (unsigned) -1)
+ continue;
+
+ if (m->sections[i]->vma + m->sections[i]->size
+ >= info->relro_end)
break;
}
- }
+ }
/* Make a PT_GNU_RELRO segment only when it isn't empty. */
if (m != NULL)
@@ -4141,15 +4203,15 @@
}
free (sections);
- elf_tdata (abfd)->segment_map = mfirst;
+ elf_seg_map (abfd) = mfirst;
}
if (!elf_modify_segment_map (abfd, info, no_user_phdrs))
return FALSE;
- for (count = 0, m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (count = 0, m = elf_seg_map (abfd); m != NULL; m = m->next)
++count;
- elf_tdata (abfd)->program_header_size = count * bed->s->sizeof_phdr;
+ elf_program_header_size (abfd) = count * bed->s->sizeof_phdr;
return TRUE;
@@ -4313,7 +4375,7 @@
return FALSE;
alloc = 0;
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
{
++alloc;
if (m->header_size)
@@ -4331,35 +4393,35 @@
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)
- elf_tdata (abfd)->program_header_size = alloc * bed->s->sizeof_phdr;
+ if (elf_program_header_size (abfd) == (bfd_size_type) -1)
+ elf_program_header_size (abfd) = alloc * bed->s->sizeof_phdr;
else
- BFD_ASSERT (elf_tdata (abfd)->program_header_size
+ BFD_ASSERT (elf_program_header_size (abfd)
>= alloc * bed->s->sizeof_phdr);
if (alloc == 0)
{
- elf_tdata (abfd)->next_file_pos = bed->s->sizeof_ehdr;
+ elf_next_file_pos (abfd) = bed->s->sizeof_ehdr;
return TRUE;
}
- /* We're writing the size in elf_tdata (abfd)->program_header_size,
+ /* We're writing the size in elf_program_header_size (abfd),
see assign_file_positions_except_relocs, so make sure we have
that amount allocated, with trailing space cleared.
- The variable alloc contains the computed need, while elf_tdata
- (abfd)->program_header_size contains the size used for the
+ The variable alloc contains the computed need, while
+ elf_program_header_size (abfd) contains the size used for the
layout.
See ld/emultempl/elf-generic.em:gld${EMULATION_NAME}_map_segments
where the layout is forced to according to a larger size in the
last iterations for the testcase ld-elf/header. */
- BFD_ASSERT (elf_tdata (abfd)->program_header_size % bed->s->sizeof_phdr
+ BFD_ASSERT (elf_program_header_size (abfd) % bed->s->sizeof_phdr
== 0);
phdrs = (Elf_Internal_Phdr *)
bfd_zalloc2 (abfd,
- (elf_tdata (abfd)->program_header_size / bed->s->sizeof_phdr),
+ (elf_program_header_size (abfd) / bed->s->sizeof_phdr),
sizeof (Elf_Internal_Phdr));
elf_tdata (abfd)->phdr = phdrs;
if (phdrs == NULL)
@@ -4377,7 +4439,7 @@
header_pad -= off;
off += header_pad;
- for (m = elf_tdata (abfd)->segment_map, p = phdrs, j = 0;
+ for (m = elf_seg_map (abfd), p = phdrs, j = 0;
m != NULL;
m = m->next, p++, j++)
{
@@ -4526,8 +4588,6 @@
p->p_memsz = bed->s->sizeof_ehdr;
if (m->count > 0)
{
- BFD_ASSERT (p->p_type == PT_LOAD);
-
if (p->p_vaddr < (bfd_vma) off)
{
(*_bfd_error_handler)
@@ -4554,7 +4614,6 @@
if (m->count > 0)
{
- BFD_ASSERT (p->p_type == PT_LOAD);
p->p_vaddr -= off - p->p_offset;
if (!m->p_paddr_valid)
p->p_paddr -= off - p->p_offset;
@@ -4761,7 +4820,7 @@
}
}
- elf_tdata (abfd)->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
return TRUE;
}
@@ -4777,6 +4836,7 @@
Elf_Internal_Phdr *phdrs;
Elf_Internal_Phdr *p;
struct elf_segment_map *m;
+ struct elf_segment_map *hdrs_segment;
bfd_vma filehdr_vaddr, filehdr_paddr;
bfd_vma phdrs_vaddr, phdrs_paddr;
file_ptr off;
@@ -4786,10 +4846,9 @@
i_shdrpp = elf_elfsections (abfd);
num_sec = elf_numsections (abfd);
- off = elf_tdata (abfd)->next_file_pos;
+ off = elf_next_file_pos (abfd);
for (i = 1, hdrpp = i_shdrpp + 1; i < num_sec; i++, hdrpp++)
{
- struct elf_obj_tdata *tdata = elf_tdata (abfd);
Elf_Internal_Shdr *hdr;
hdr = *hdrpp;
@@ -4800,12 +4859,13 @@
BFD_ASSERT (hdr->sh_offset == hdr->bfd_section->filepos);
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
- (*_bfd_error_handler)
- (_("%B: warning: allocated section `%s' not in segment"),
- abfd,
- (hdr->bfd_section == NULL
- ? "*unknown*"
- : hdr->bfd_section->name));
+ if (hdr->sh_size != 0)
+ (*_bfd_error_handler)
+ (_("%B: warning: allocated section `%s' not in segment"),
+ abfd,
+ (hdr->bfd_section == NULL
+ ? "*unknown*"
+ : hdr->bfd_section->name));
/* We don't need to page align empty sections. */
if ((abfd->flags & D_PAGED) != 0 && hdr->sh_size != 0)
off += vma_page_aligned_bias (hdr->sh_addr, off,
@@ -4818,9 +4878,9 @@
}
else if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
&& hdr->bfd_section == NULL)
- || hdr == i_shdrpp[tdata->symtab_section]
- || hdr == i_shdrpp[tdata->symtab_shndx_section]
- || hdr == i_shdrpp[tdata->strtab_section])
+ || hdr == i_shdrpp[elf_onesymtab (abfd)]
+ || hdr == i_shdrpp[elf_symtab_shndx (abfd)]
+ || hdr == i_shdrpp[elf_strtab_sec (abfd)])
hdr->sh_offset = -1;
else
off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
@@ -4833,10 +4893,9 @@
filehdr_paddr = 0;
phdrs_vaddr = bed->maxpagesize + bed->s->sizeof_ehdr;
phdrs_paddr = 0;
+ hdrs_segment = NULL;
phdrs = elf_tdata (abfd)->phdr;
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
- m != NULL;
- m = m->next, p++)
+ for (m = elf_seg_map (abfd), p = phdrs; m != NULL; m = m->next, p++)
{
++count;
if (p->p_type != PT_LOAD)
@@ -4853,34 +4912,85 @@
phdrs_paddr = p->p_paddr;
if (m->includes_filehdr)
{
+ hdrs_segment = m;
phdrs_vaddr += bed->s->sizeof_ehdr;
phdrs_paddr += bed->s->sizeof_ehdr;
}
}
}
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
- m != NULL;
- m = m->next, p++)
+ if (hdrs_segment != NULL && link_info != NULL)
+ {
+ /* There is a segment that contains both the file headers and the
+ program headers, so provide a symbol __ehdr_start pointing there.
+ A program can use this to examine itself robustly. */
+
+ struct elf_link_hash_entry *hash
+ = elf_link_hash_lookup (elf_hash_table (link_info), "__ehdr_start",
+ FALSE, FALSE, TRUE);
+ /* If the symbol was referenced and not defined, define it. */
+ if (hash != NULL
+ && (hash->root.type == bfd_link_hash_new
+ || hash->root.type == bfd_link_hash_undefined
+ || hash->root.type == bfd_link_hash_undefweak
+ || hash->root.type == bfd_link_hash_common))
+ {
+ asection *s = NULL;
+ if (hdrs_segment->count != 0)
+ /* The segment contains sections, so use the first one. */
+ s = hdrs_segment->sections[0];
+ else
+ /* Use the first (i.e. lowest-addressed) section in any segment. */
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
+ if (m->count != 0)
+ {
+ s = m->sections[0];
+ break;
+ }
+
+ if (s != NULL)
+ {
+ hash->root.u.def.value = filehdr_vaddr - s->vma;
+ hash->root.u.def.section = s;
+ }
+ else
+ {
+ hash->root.u.def.value = filehdr_vaddr;
+ hash->root.u.def.section = bfd_abs_section_ptr;
+ }
+
+ hash->root.type = bfd_link_hash_defined;
+ hash->def_regular = 1;
+ hash->non_elf = 0;
+ }
+ }
+
+ for (m = elf_seg_map (abfd), p = phdrs; m != NULL; m = m->next, p++)
{
if (p->p_type == PT_GNU_RELRO)
{
const Elf_Internal_Phdr *lp;
-
- BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
+ struct elf_segment_map *lm;
if (link_info != NULL)
{
/* During linking the range of the RELRO segment is passed
in link_info. */
- for (lp = phdrs; lp < phdrs + count; ++lp)
+ for (lm = elf_seg_map (abfd), lp = phdrs;
+ lm != NULL;
+ lm = lm->next, lp++)
{
if (lp->p_type == PT_LOAD
- && lp->p_vaddr >= link_info->relro_start
&& lp->p_vaddr < link_info->relro_end
- && lp->p_vaddr + lp->p_filesz >= link_info->relro_end)
+ && lp->p_vaddr + lp->p_filesz >= link_info->relro_end
+ && lm->count != 0
+ && lm->sections[0]->vma >= link_info->relro_start)
break;
}
+
+ /* PR ld/14207. If the RELRO segment doesn't fit in the
+ LOAD segment, it should be removed. */
+ BFD_ASSERT (lm != NULL);
}
else
{
@@ -4906,10 +5016,11 @@
else
abort ();
p->p_memsz = p->p_filesz;
- /* Preserve the alignment and flags if they are valid. The gold
- linker generates RW/4 for the PT_GNU_RELRO section. It is
- better for objcopy/strip to honor these attributes otherwise
- gdb will choke when using separate debug files. */
+ /* Preserve the alignment and flags if they are valid. The
+ gold linker generates RW/4 for the PT_GNU_RELRO section.
+ It is better for objcopy/strip to honor these attributes
+ otherwise gdb will choke when using separate debug files.
+ */
if (!m->p_align_valid)
p->p_align = 1;
if (!m->p_flags_valid)
@@ -4921,6 +5032,11 @@
p->p_type = PT_NULL;
}
}
+ else if (p->p_type == PT_GNU_STACK)
+ {
+ if (m->p_size_valid)
+ p->p_memsz = m->p_size;
+ }
else if (m->count != 0)
{
if (p->p_type != PT_LOAD
@@ -4958,7 +5074,7 @@
}
}
- elf_tdata (abfd)->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
return TRUE;
}
@@ -5007,9 +5123,9 @@
hdr = *hdrpp;
if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
&& hdr->bfd_section == NULL)
- || i == tdata->symtab_section
- || i == tdata->symtab_shndx_section
- || i == tdata->strtab_section)
+ || i == elf_onesymtab (abfd)
+ || i == elf_symtab_shndx (abfd)
+ || i == elf_strtab_sec (abfd))
{
hdr->sh_offset = -1;
}
@@ -5037,12 +5153,12 @@
}
/* Write out the program headers. */
- alloc = tdata->program_header_size / bed->s->sizeof_phdr;
+ alloc = elf_program_header_size (abfd) / bed->s->sizeof_phdr;
if (bfd_seek (abfd, (bfd_signed_vma) bed->s->sizeof_ehdr, SEEK_SET) != 0
|| bed->s->write_out_phdrs (abfd, tdata->phdr, alloc) != 0)
return FALSE;
- off = tdata->next_file_pos;
+ off = elf_next_file_pos (abfd);
}
/* Place the section headers. */
@@ -5050,7 +5166,7 @@
i_ehdrp->e_shoff = off;
off += i_ehdrp->e_shnum * i_ehdrp->e_shentsize;
- tdata->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
return TRUE;
}
@@ -5153,7 +5269,7 @@
unsigned int i, num_sec;
Elf_Internal_Shdr **shdrpp;
- off = elf_tdata (abfd)->next_file_pos;
+ off = elf_next_file_pos (abfd);
num_sec = elf_numsections (abfd);
for (i = 1, shdrpp = elf_elfsections (abfd) + 1; i < num_sec; i++, shdrpp++)
@@ -5166,7 +5282,7 @@
off = _bfd_elf_assign_file_position_for_section (shdrp, off, TRUE);
}
- elf_tdata (abfd)->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
}
bfd_boolean
@@ -5176,6 +5292,7 @@
Elf_Internal_Shdr **i_shdrp;
bfd_boolean failed;
unsigned int count, num_sec;
+ struct elf_obj_tdata *t;
if (! abfd->output_has_begun
&& ! _bfd_elf_compute_section_file_positions (abfd, NULL))
@@ -5207,21 +5324,21 @@
}
/* Write out the section header names. */
+ t = elf_tdata (abfd);
if (elf_shstrtab (abfd) != NULL
- && (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0
+ && (bfd_seek (abfd, t->shstrtab_hdr.sh_offset, SEEK_SET) != 0
|| !_bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))))
return FALSE;
if (bed->elf_backend_final_write_processing)
- (*bed->elf_backend_final_write_processing) (abfd,
- elf_tdata (abfd)->linker);
+ (*bed->elf_backend_final_write_processing) (abfd, elf_linker (abfd));
if (!bed->s->write_shdrs_and_ehdr (abfd))
return FALSE;
/* This is last since write_shdrs_and_ehdr can touch i_shdrp[0]. */
- if (elf_tdata (abfd)->after_write_object_contents)
- return (*elf_tdata (abfd)->after_write_object_contents) (abfd);
+ if (t->o->build_id.after_write_object_contents != NULL)
+ return (*t->o->build_id.after_write_object_contents) (abfd);
return TRUE;
}
@@ -5413,7 +5530,7 @@
1. It is within the address space of the segment -- we use the LMA
if that is set for the segment and the VMA otherwise,
2. It is an allocated section or a NOTE section in a PT_NOTE
- segment.
+ segment.
3. There is an output section associated with it,
4. The section has not already been allocated to a previous segment.
5. PT_GNU_STACK segments do not include any sections.
@@ -5930,7 +6047,7 @@
and carry on looping. */
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = (struct elf_segment_map *) bfd_alloc (obfd, amt);
+ map = (struct elf_segment_map *) bfd_zalloc (obfd, amt);
if (map == NULL)
{
free (sections);
@@ -5955,7 +6072,7 @@
free (sections);
}
- elf_tdata (obfd)->segment_map = map_first;
+ elf_seg_map (obfd) = map_first;
/* If we had to estimate the number of program headers that were
going to be needed, then check our estimate now and adjust
@@ -6065,12 +6182,15 @@
map->p_align_valid = 1;
map->p_vaddr_offset = 0;
- if (map->p_type == PT_GNU_RELRO)
+ if (map->p_type == PT_GNU_RELRO
+ || map->p_type == PT_GNU_STACK)
{
/* The PT_GNU_RELRO segment may contain the first a few
bytes in the .got.plt section even if the whole .got.plt
section isn't in the PT_GNU_RELRO segment. We won't
- change the size of the PT_GNU_RELRO segment. */
+ change the size of the PT_GNU_RELRO segment.
+ Similarly, PT_GNU_STACK size is significant on uclinux
+ systems. */
map->p_size = segment->p_memsz;
map->p_size_valid = 1;
}
@@ -6106,12 +6226,13 @@
if (ELF_SECTION_IN_SEGMENT (this_hdr, segment))
{
map->sections[isec++] = section->output_section;
- if (section->lma < lowest_section->lma)
- lowest_section = section;
if ((section->flags & SEC_ALLOC) != 0)
{
bfd_vma seg_off;
+ if (section->lma < lowest_section->lma)
+ lowest_section = section;
+
/* Section lmas are set up from PT_LOAD header
p_paddr in _bfd_elf_make_section_from_shdr.
If this header has a p_paddr that disagrees
@@ -6133,7 +6254,7 @@
if (map->includes_filehdr && lowest_section != NULL)
/* We need to keep the space used by the headers fixed. */
map->header_size = lowest_section->vma - segment->p_vaddr;
-
+
if (!map->includes_phdrs
&& !map->includes_filehdr
&& map->p_paddr_valid)
@@ -6146,7 +6267,7 @@
pointer_to_map = &map->next;
}
- elf_tdata (obfd)->segment_map = map_first;
+ elf_seg_map (obfd) = map_first;
return TRUE;
}
@@ -6240,6 +6361,26 @@
}
rewrite:
+ if (ibfd->xvec == obfd->xvec)
+ {
+ /* When rewriting program header, set the output maxpagesize to
+ the maximum alignment of input PT_LOAD segments. */
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
+ unsigned int num_segments = elf_elfheader (ibfd)->e_phnum;
+ bfd_vma maxpagesize = 0;
+
+ for (i = 0, segment = elf_tdata (ibfd)->phdr;
+ i < num_segments;
+ i++, segment++)
+ if (segment->p_type == PT_LOAD
+ && maxpagesize < segment->p_align)
+ maxpagesize = segment->p_align;
+
+ if (maxpagesize != get_elf_backend_data (obfd)->maxpagesize)
+ bfd_emul_set_maxpagesize (bfd_get_target (obfd), maxpagesize);
+ }
+
return rewrite_elf_program_header (ibfd, obfd);
}
@@ -6417,7 +6558,7 @@
entry point, because the latter is called after the section
contents have been set, which means that the program headers have
already been worked out. */
- if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ if (elf_seg_map (obfd) == NULL && elf_tdata (ibfd)->phdr != NULL)
{
if (! copy_private_bfd_data (ibfd, obfd))
return FALSE;
@@ -6465,11 +6606,11 @@
shndx = MAP_ONESYMTAB;
else if (shndx == elf_dynsymtab (ibfd))
shndx = MAP_DYNSYMTAB;
- else if (shndx == elf_tdata (ibfd)->strtab_section)
+ else if (shndx == elf_strtab_sec (ibfd))
shndx = MAP_STRTAB;
- else if (shndx == elf_tdata (ibfd)->shstrtab_section)
+ else if (shndx == elf_shstrtab_sec (ibfd))
shndx = MAP_SHSTRTAB;
- else if (shndx == elf_tdata (ibfd)->symtab_shndx_section)
+ else if (shndx == elf_symtab_shndx (ibfd))
shndx = MAP_SYM_SHNDX;
osym->internal_elf_sym.st_shndx = shndx;
}
@@ -6494,10 +6635,11 @@
bfd_byte *outbound_syms;
bfd_byte *outbound_shndx;
int idx;
+ unsigned int num_locals;
bfd_size_type amt;
bfd_boolean name_local_sections;
- if (!elf_map_symbols (abfd))
+ if (!elf_map_symbols (abfd, &num_locals))
return FALSE;
/* Dump out the symtabs. */
@@ -6511,7 +6653,7 @@
symtab_hdr->sh_type = SHT_SYMTAB;
symtab_hdr->sh_entsize = bed->s->sizeof_sym;
symtab_hdr->sh_size = symtab_hdr->sh_entsize * (symcount + 1);
- symtab_hdr->sh_info = elf_num_locals (abfd) + 1;
+ symtab_hdr->sh_info = num_locals + 1;
symtab_hdr->sh_addralign = (bfd_vma) 1 << bed->s->log_file_align;
symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
@@ -6645,15 +6787,16 @@
shndx = elf_dynsymtab (abfd);
break;
case MAP_STRTAB:
- shndx = elf_tdata (abfd)->strtab_section;
+ shndx = elf_strtab_sec (abfd);
break;
case MAP_SHSTRTAB:
- shndx = elf_tdata (abfd)->shstrtab_section;
+ shndx = elf_shstrtab_sec (abfd);
break;
case MAP_SYM_SHNDX:
- shndx = elf_tdata (abfd)->symtab_shndx_section;
+ shndx = elf_symtab_shndx (abfd);
break;
default:
+ shndx = SHN_ABS;
break;
}
}
@@ -7246,7 +7389,7 @@
Elf_Internal_Verdef *iverdef;
Elf_Internal_Verdaux *iverdaux;
- iverdef = &elf_tdata (abfd)->verdef[freeidx - 1];;
+ iverdef = &elf_tdata (abfd)->verdef[freeidx - 1];
iverdef->vd_version = VER_DEF_CURRENT;
iverdef->vd_flags = 0;
@@ -7364,18 +7507,29 @@
const char **filename_ptr,
const char **functionname_ptr)
{
- static asection *last_section;
- static asymbol *func;
- static const char *filename;
- static bfd_size_type func_size;
+ struct elf_find_function_cache
+ {
+ asection *last_section;
+ asymbol *func;
+ const char *filename;
+ bfd_size_type func_size;
+ } *cache;
if (symbols == NULL)
return FALSE;
- if (last_section != section
- || func == NULL
- || offset < func->value
- || offset >= func->value + func_size)
+ cache = elf_tdata (abfd)->elf_find_function_cache;
+ if (cache == NULL)
+ {
+ cache = bfd_zalloc (abfd, sizeof (*cache));
+ elf_tdata (abfd)->elf_find_function_cache = cache;
+ if (cache == NULL)
+ return FALSE;
+ }
+ if (cache->last_section != section
+ || cache->func == NULL
+ || offset < cache->func->value
+ || offset >= cache->func->value + cache->func_size)
{
asymbol *file;
bfd_vma low_func;
@@ -7391,13 +7545,13 @@
enum { nothing_seen, symbol_seen, file_after_symbol_seen } state;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- filename = NULL;
- func = NULL;
file = NULL;
low_func = 0;
state = nothing_seen;
- func_size = 0;
- last_section = section;
+ cache->filename = NULL;
+ cache->func = NULL;
+ cache->func_size = 0;
+ cache->last_section = section;
for (p = symbols; *p != NULL; p++)
{
@@ -7418,29 +7572,29 @@
&& code_off <= offset
&& (code_off > low_func
|| (code_off == low_func
- && size > func_size)))
+ && size > cache->func_size)))
{
- func = sym;
- func_size = size;
+ cache->func = sym;
+ cache->func_size = size;
+ cache->filename = NULL;
low_func = code_off;
- filename = NULL;
if (file != NULL
&& ((sym->flags & BSF_LOCAL) != 0
|| state != file_after_symbol_seen))
- filename = bfd_asymbol_name (file);
+ cache->filename = bfd_asymbol_name (file);
}
if (state == nothing_seen)
state = symbol_seen;
}
}
- if (func == NULL)
+ if (cache->func == NULL)
return FALSE;
if (filename_ptr)
- *filename_ptr = filename;
+ *filename_ptr = cache->filename;
if (functionname_ptr)
- *functionname_ptr = bfd_asymbol_name (func);
+ *functionname_ptr = bfd_asymbol_name (cache->func);
return TRUE;
}
@@ -7488,7 +7642,8 @@
return TRUE;
}
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections,
+ section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr, discriminator_ptr, 0,
&elf_tdata (abfd)->dwarf2_find_line_info))
@@ -7569,21 +7724,21 @@
if (!info->relocatable)
{
- bfd_size_type phdr_size = elf_tdata (abfd)->program_header_size;
+ bfd_size_type phdr_size = elf_program_header_size (abfd);
if (phdr_size == (bfd_size_type) -1)
{
struct elf_segment_map *m;
phdr_size = 0;
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
phdr_size += bed->s->sizeof_phdr;
if (phdr_size == 0)
phdr_size = get_program_header_size (abfd, info);
}
- elf_tdata (abfd)->program_header_size = phdr_size;
+ elf_program_header_size (abfd) = phdr_size;
ret += phdr_size;
}
@@ -7720,11 +7875,12 @@
bfd_boolean
_bfd_elf_close_and_cleanup (bfd *abfd)
{
- if (bfd_get_format (abfd) == bfd_object)
+ struct elf_obj_tdata *tdata = elf_tdata (abfd);
+ if (bfd_get_format (abfd) == bfd_object && tdata != NULL)
{
- if (elf_tdata (abfd) != NULL && elf_shstrtab (abfd) != NULL)
+ if (elf_tdata (abfd)->o != NULL && elf_shstrtab (abfd) != NULL)
_bfd_elf_strtab_free (elf_shstrtab (abfd));
- _bfd_dwarf2_cleanup_debug_info (abfd);
+ _bfd_dwarf2_cleanup_debug_info (abfd, &tdata->dwarf2_find_line_info);
}
return _bfd_generic_close_and_cleanup (abfd);
@@ -7764,9 +7920,9 @@
{
int pid;
- pid = elf_tdata (abfd)->core_lwpid;
+ pid = elf_tdata (abfd)->core->lwpid;
if (pid == 0)
- pid = elf_tdata (abfd)->core_pid;
+ pid = elf_tdata (abfd)->core->pid;
return pid;
}
@@ -7856,10 +8012,10 @@
/* Do not overwrite the core signal if it
has already been set by another thread. */
- if (elf_tdata (abfd)->core_signal == 0)
- elf_tdata (abfd)->core_signal = prstat.pr_cursig;
- if (elf_tdata (abfd)->core_pid == 0)
- elf_tdata (abfd)->core_pid = prstat.pr_pid;
+ if (elf_tdata (abfd)->core->signal == 0)
+ elf_tdata (abfd)->core->signal = prstat.pr_cursig;
+ if (elf_tdata (abfd)->core->pid == 0)
+ elf_tdata (abfd)->core->pid = prstat.pr_pid;
/* pr_who exists on:
solaris 2.5+
@@ -7868,9 +8024,9 @@
linux 2.[01]
*/
#if defined (HAVE_PRSTATUS_T_PR_WHO)
- elf_tdata (abfd)->core_lwpid = prstat.pr_who;
+ elf_tdata (abfd)->core->lwpid = prstat.pr_who;
#else
- elf_tdata (abfd)->core_lwpid = prstat.pr_pid;
+ elf_tdata (abfd)->core->lwpid = prstat.pr_pid;
#endif
}
#if defined (HAVE_PRSTATUS32_T)
@@ -7885,10 +8041,10 @@
/* Do not overwrite the core signal if it
has already been set by another thread. */
- if (elf_tdata (abfd)->core_signal == 0)
- elf_tdata (abfd)->core_signal = prstat.pr_cursig;
- if (elf_tdata (abfd)->core_pid == 0)
- elf_tdata (abfd)->core_pid = prstat.pr_pid;
+ if (elf_tdata (abfd)->core->signal == 0)
+ elf_tdata (abfd)->core->signal = prstat.pr_cursig;
+ if (elf_tdata (abfd)->core->pid == 0)
+ elf_tdata (abfd)->core->pid = prstat.pr_pid;
/* pr_who exists on:
solaris 2.5+
@@ -7897,9 +8053,9 @@
linux 2.[01]
*/
#if defined (HAVE_PRSTATUS32_T_PR_WHO)
- elf_tdata (abfd)->core_lwpid = prstat.pr_who;
+ elf_tdata (abfd)->core->lwpid = prstat.pr_who;
#else
- elf_tdata (abfd)->core_lwpid = prstat.pr_pid;
+ elf_tdata (abfd)->core->lwpid = prstat.pr_pid;
#endif
}
#endif /* HAVE_PRSTATUS32_T */
@@ -8005,11 +8161,47 @@
}
static bfd_boolean
+elfcore_grok_s390_last_break (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-last-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_system_call (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-system-call", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_tdb (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-tdb", note);
+}
+
+static bfd_boolean
elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
{
return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
}
+static bfd_boolean
+elfcore_grok_aarch_tls (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-tls", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_break (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_watch (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-watch", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
@@ -8061,13 +8253,13 @@
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;
+ elf_tdata (abfd)->core->pid = psinfo.pr_pid;
#endif
- elf_tdata (abfd)->core_program
+ elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, psinfo.pr_psargs,
sizeof (psinfo.pr_psargs));
}
@@ -8080,13 +8272,13 @@
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;
+ elf_tdata (abfd)->core->pid = psinfo.pr_pid;
#endif
- elf_tdata (abfd)->core_program
+ elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, psinfo.pr_psargs,
sizeof (psinfo.pr_psargs));
}
@@ -8104,7 +8296,7 @@
implementations, so strip it off if it exists. */
{
- char *command = elf_tdata (abfd)->core_command;
+ char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@@ -8129,7 +8321,7 @@
memcpy (&pstat, note->descdata, sizeof (pstat));
- elf_tdata (abfd)->core_pid = pstat.pr_pid;
+ elf_tdata (abfd)->core->pid = pstat.pr_pid;
}
#if defined (HAVE_PSTATUS32_T)
else if (note->descsz == sizeof (pstatus32_t))
@@ -8139,7 +8331,7 @@
memcpy (&pstat, note->descdata, sizeof (pstat));
- elf_tdata (abfd)->core_pid = pstat.pr_pid;
+ elf_tdata (abfd)->core->pid = pstat.pr_pid;
}
#endif
/* Could grab some more details from the "representative"
@@ -8169,11 +8361,11 @@
memcpy (&lwpstat, note->descdata, sizeof (lwpstat));
- elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid;
+ elf_tdata (abfd)->core->lwpid = lwpstat.pr_lwpid;
/* Do not overwrite the core signal if it has already been set by
another thread. */
- if (elf_tdata (abfd)->core_signal == 0)
- elf_tdata (abfd)->core_signal = lwpstat.pr_cursig;
+ if (elf_tdata (abfd)->core->signal == 0)
+ elf_tdata (abfd)->core->signal = lwpstat.pr_cursig;
/* Make a ".reg/999" section. */
@@ -8256,11 +8448,11 @@
switch (type)
{
case 1 /* NOTE_INFO_PROCESS */:
- /* FIXME: need to add ->core_command. */
+ /* FIXME: need to add ->core->command. */
/* process_info.pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 8);
+ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 8);
/* process_info.signal */
- elf_tdata (abfd)->core_signal = bfd_get_32 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 12);
break;
case 2 /* NOTE_INFO_THREAD */:
@@ -8429,6 +8621,27 @@
else
return TRUE;
+ case NT_S390_LAST_BREAK:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_last_break (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_SYSTEM_CALL:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_system_call (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_TDB:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_tdb (abfd, note);
+ else
+ return TRUE;
+
case NT_ARM_VFP:
if (note->namesz == 6
&& strcmp (note->namedata, "LINUX") == 0)
@@ -8436,6 +8649,27 @@
else
return TRUE;
+ case NT_ARM_TLS:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_tls (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_BREAK:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_hw_break (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_WATCH:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_hw_watch (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -8460,18 +8694,32 @@
return TRUE;
}
+
+ case NT_FILE:
+ return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.file",
+ note);
+
+ case NT_SIGINFO:
+ return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
+ note);
}
}
static bfd_boolean
elfobj_grok_gnu_build_id (bfd *abfd, Elf_Internal_Note *note)
{
- elf_tdata (abfd)->build_id_size = note->descsz;
- elf_tdata (abfd)->build_id = (bfd_byte *) bfd_alloc (abfd, note->descsz);
- if (elf_tdata (abfd)->build_id == NULL)
+ struct elf_obj_tdata *t;
+
+ if (note->descsz == 0)
return FALSE;
- memcpy (elf_tdata (abfd)->build_id, note->descdata, note->descsz);
+ t = elf_tdata (abfd);
+ t->build_id = bfd_alloc (abfd, sizeof (*t->build_id) - 1 + note->descsz);
+ if (t->build_id == NULL)
+ return FALSE;
+
+ t->build_id->size = note->descsz;
+ memcpy (t->build_id->data, note->descdata, note->descsz);
return TRUE;
}
@@ -8536,15 +8784,15 @@
elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
{
/* Signal number at offset 0x08. */
- elf_tdata (abfd)->core_signal
+ elf_tdata (abfd)->core->signal
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08);
/* Process ID at offset 0x50. */
- elf_tdata (abfd)->core_pid
+ elf_tdata (abfd)->core->pid
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x50);
/* Command name at 0x7c (max 32 bytes, including nul). */
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 0x7c, 31);
return elfcore_make_note_pseudosection (abfd, ".note.netbsdcore.procinfo",
@@ -8557,7 +8805,7 @@
int lwp;
if (elfcore_netbsd_get_lwpid (note, &lwp))
- elf_tdata (abfd)->core_lwpid = lwp;
+ elf_tdata (abfd)->core->lwpid = lwp;
if (note->type == NT_NETBSDCORE_PROCINFO)
{
@@ -8620,15 +8868,15 @@
elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
{
/* Signal number at offset 0x08. */
- elf_tdata (abfd)->core_signal
+ elf_tdata (abfd)->core->signal
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08);
/* Process ID at offset 0x20. */
- elf_tdata (abfd)->core_pid
+ elf_tdata (abfd)->core->pid
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x20);
/* Command name at 0x48 (max 32 bytes, including nul). */
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 0x48, 31);
return TRUE;
@@ -8691,7 +8939,7 @@
unsigned flags;
/* nto_procfs_status 'pid' field is at offset 0. */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
+ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
/* nto_procfs_status 'tid' field is at offset 4. Pass it back. */
*tid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
@@ -8702,15 +8950,15 @@
/* nto_procfs_status 'what' field is at offset 14. */
if ((sig = bfd_get_16 (abfd, (bfd_byte *) ddata + 14)) > 0)
{
- elf_tdata (abfd)->core_signal = sig;
- elf_tdata (abfd)->core_lwpid = *tid;
+ elf_tdata (abfd)->core->signal = sig;
+ elf_tdata (abfd)->core->lwpid = *tid;
}
/* _DEBUG_FLAG_CURTID (current thread) is 0x80. Some cores
do not come from signals so we make sure we set the current
thread just in case. */
if (flags & 0x00000080)
- elf_tdata (abfd)->core_lwpid = *tid;
+ elf_tdata (abfd)->core->lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
sprintf (buf, ".qnx_core_status/%ld", *tid);
@@ -8758,7 +9006,7 @@
sect->alignment_power = 2;
/* This is the current thread. */
- if (elf_tdata (abfd)->core_lwpid == tid)
+ if (elf_tdata (abfd)->core->lwpid == tid)
return elfcore_maybe_make_sect (abfd, base, sect);
return TRUE;
@@ -8885,7 +9133,6 @@
return buf;
}
-#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
@@ -8893,7 +9140,6 @@
const char *fname,
const char *psargs)
{
- const char *note_name = "CORE";
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (bed->elf_backend_write_core_note != NULL)
@@ -8905,6 +9151,7 @@
return ret;
}
+#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
if (bed->s->elfclass == ELFCLASS32)
{
@@ -8920,7 +9167,7 @@
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
return elfcore_write_note (abfd, buf, bufsiz,
- note_name, note_type, &data, sizeof (data));
+ "CORE", note_type, &data, sizeof (data));
}
else
#endif
@@ -8937,12 +9184,42 @@
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
return elfcore_write_note (abfd, buf, bufsiz,
- note_name, note_type, &data, sizeof (data));
+ "CORE", note_type, &data, sizeof (data));
}
-}
#endif /* PSINFO_T or PRPSINFO_T */
-#if defined (HAVE_PRSTATUS_T)
+ free (buf);
+ return NULL;
+}
+
+char *
+elfcore_write_linux_prpsinfo32
+ (bfd *abfd, char *buf, int *bufsiz,
+ const struct elf_internal_linux_prpsinfo *prpsinfo)
+{
+ struct elf_external_linux_prpsinfo32 data;
+
+ memset (&data, 0, sizeof (data));
+ LINUX_PRPSINFO32_SWAP_FIELDS (abfd, prpsinfo, data);
+
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", NT_PRPSINFO,
+ &data, sizeof (data));
+}
+
+char *
+elfcore_write_linux_prpsinfo64
+ (bfd *abfd, char *buf, int *bufsiz,
+ const struct elf_internal_linux_prpsinfo *prpsinfo)
+{
+ struct elf_external_linux_prpsinfo64 data;
+
+ memset (&data, 0, sizeof (data));
+ LINUX_PRPSINFO64_SWAP_FIELDS (abfd, prpsinfo, data);
+
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", NT_PRPSINFO, &data, sizeof (data));
+}
+
char *
elfcore_write_prstatus (bfd *abfd,
char *buf,
@@ -8951,7 +9228,6 @@
int cursig,
const void *gregs)
{
- const char *note_name = "CORE";
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (bed->elf_backend_write_core_note != NULL)
@@ -8964,6 +9240,7 @@
return ret;
}
+#if defined (HAVE_PRSTATUS_T)
#if defined (HAVE_PRSTATUS32_T)
if (bed->s->elfclass == ELFCLASS32)
{
@@ -8973,7 +9250,7 @@
prstat.pr_pid = pid;
prstat.pr_cursig = cursig;
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- return elfcore_write_note (abfd, buf, bufsiz, note_name,
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE",
NT_PRSTATUS, &prstat, sizeof (prstat));
}
else
@@ -8985,12 +9262,15 @@
prstat.pr_pid = pid;
prstat.pr_cursig = cursig;
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- return elfcore_write_note (abfd, buf, bufsiz, note_name,
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE",
NT_PRSTATUS, &prstat, sizeof (prstat));
}
-}
#endif /* HAVE_PRSTATUS_T */
+ free (buf);
+ return NULL;
+}
+
#if defined (HAVE_LWPSTATUS_T)
char *
elfcore_write_lwpstatus (bfd *abfd,
@@ -9190,6 +9470,44 @@
}
char *
+elfcore_write_s390_last_break (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_last_break,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_LAST_BREAK,
+ s390_last_break, size);
+}
+
+char *
+elfcore_write_s390_system_call (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_system_call,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_SYSTEM_CALL,
+ s390_system_call, size);
+}
+
+char *
+elfcore_write_s390_tdb (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_tdb,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_TDB, s390_tdb, size);
+}
+
+char *
elfcore_write_arm_vfp (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9202,6 +9520,42 @@
}
char *
+elfcore_write_aarch_tls (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_tls,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_TLS, aarch_tls, size);
+}
+
+char *
+elfcore_write_aarch_hw_break (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_hw_break,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_BREAK, aarch_hw_break, size);
+}
+
+char *
+elfcore_write_aarch_hw_watch (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_hw_watch,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_WATCH, aarch_hw_watch, size);
+}
+
+char *
elfcore_write_register_note (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9231,8 +9585,20 @@
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-s390-last-break") == 0)
+ return elfcore_write_s390_last_break (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-system-call") == 0)
+ return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-tdb") == 0)
+ return elfcore_write_s390_tdb (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-arm-vfp") == 0)
return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-tls") == 0)
+ return elfcore_write_aarch_tls (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-hw-break") == 0)
+ return elfcore_write_aarch_hw_break (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-hw-watch") == 0)
+ return elfcore_write_aarch_hw_watch (abfd, buf, bufsiz, data, size);
return NULL;
}
@@ -9391,7 +9757,9 @@
}
enum elf_reloc_type_class
-_bfd_elf_reloc_type_class (const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
+_bfd_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
{
return reloc_class_normal;
}
@@ -9413,7 +9781,7 @@
+ sym->st_value);
if ((sec->flags & SEC_MERGE)
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ && sec->sec_info_type == SEC_INFO_TYPE_MERGE)
{
rel->r_addend =
_bfd_merged_section_offset (abfd, psec,
@@ -9444,7 +9812,7 @@
{
asection *sec = *psec;
- if (sec->sec_info_type != ELF_INFO_TYPE_MERGE)
+ if (sec->sec_info_type != SEC_INFO_TYPE_MERGE)
return sym->st_value + addend;
return _bfd_merged_section_offset (abfd, psec,
@@ -9460,10 +9828,10 @@
{
switch (sec->sec_info_type)
{
- case ELF_INFO_TYPE_STABS:
+ case SEC_INFO_TYPE_STABS:
return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info,
offset);
- case ELF_INFO_TYPE_EH_FRAME:
+ case SEC_INFO_TYPE_EH_FRAME:
return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
default:
if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0)
@@ -9494,7 +9862,7 @@
(bfd *templ,
bfd_vma ehdr_vma,
bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int))
+ int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type))
{
return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory)
(templ, ehdr_vma, loadbasep, target_read_memory);
@@ -9599,7 +9967,7 @@
if (p->addend != 0)
{
char buf[30], *a;
-
+
memcpy (names, "+0x", sizeof ("+0x") - 1);
names += sizeof ("+0x") - 1;
bfd_sprintf_vma (abfd, buf, p->addend);
diff --git a/bfd/elf32-am33lin.c b/bfd/elf32-am33lin.c
index 177a714..f23ef8e 100644
--- a/bfd/elf32-am33lin.c
+++ b/bfd/elf32-am33lin.c
@@ -50,12 +50,13 @@
default:
return FALSE;
+ case 184:
case 188: /* Linux/am33 */
/* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
- elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
+ elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@@ -78,9 +79,9 @@
return FALSE;
case 124: /* Linux/am33 elf_prpsinfo */
- elf_tdata (abfd)->core_program
+ elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@@ -89,7 +90,7 @@
implementations, so strip it off if it exists. */
{
- char *command = elf_tdata (abfd)->core_command;
+ char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 9550393..5af1643 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,5 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright 1998-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,9 +22,11 @@
#include <limits.h>
#include "bfd.h"
+#include "bfd_stdint.h"
#include "libiberty.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "elf-nacl.h"
#include "elf-vxworks.h"
#include "elf/arm.h"
@@ -61,6 +62,9 @@
#define ARM_ELF_ABI_VERSION 0
#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
+/* The Adjusted Place, as defined by AAELF. */
+#define Pa(X) ((X) & 0xfffffffc)
+
static bfd_boolean elf32_arm_write_section (bfd *output_bfd,
struct bfd_link_info *link_info,
asection *sec,
@@ -322,160 +326,160 @@
/* Dynamic TLS relocations. */
HOWTO (R_ARM_TLS_DTPMOD32, /* 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_TLS_DTPMOD32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_DTPMOD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_DTPOFF32, /* 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_TLS_DTPOFF32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_DTPOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_TPOFF32, /* 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_TLS_TPOFF32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_TPOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
/* Relocs used in ARM Linux */
HOWTO (R_ARM_COPY, /* 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_COPY", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_COPY", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_GLOB_DAT, /* 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_GLOB_DAT", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_GLOB_DAT", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_JUMP_SLOT, /* 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_JUMP_SLOT", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_JUMP_SLOT", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_RELATIVE, /* 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_RELATIVE", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_RELATIVE", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_GOTOFF32, /* 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_GOTOFF32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_GOTOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_GOTPC, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_GOTPC", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTPC", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
HOWTO (R_ARM_GOT32, /* 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_GOT32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_GOT32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_PLT32, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 24, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PLT32", /* name */
- FALSE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PLT32", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
HOWTO (R_ARM_CALL, /* type */
2, /* rightshift */
@@ -1482,33 +1486,33 @@
/* GNU extension to record C++ vtable member usage */
HOWTO (R_ARM_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_ARM_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_ARM_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy */
HOWTO (R_ARM_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_ARM_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_ARM_GNU_VTINHERIT", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_JUMP11, /* type */
1, /* rightshift */
@@ -1540,74 +1544,74 @@
/* TLS relocations */
HOWTO (R_ARM_TLS_GD32, /* 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_GD32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_GD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_LDM32, /* 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_TLS_LDM32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_LDM32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_LDO32, /* 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_TLS_LDO32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_LDO32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_IE32, /* 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_IE32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_IE32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_LE32, /* 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_TLS_LE32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 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_TLS_LE32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
HOWTO (R_ARM_TLS_LDO12, /* type */
0, /* rightshift */
@@ -1691,18 +1695,18 @@
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 */
+ 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: */
@@ -1940,10 +1944,10 @@
case 148: /* Linux/ARM 32-bit. */
/* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
- elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
+ elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@@ -1966,9 +1970,11 @@
return FALSE;
case 124: /* Linux/ARM elf_prpsinfo. */
- elf_tdata (abfd)->core_program
+ elf_tdata (abfd)->core->pid
+ = bfd_get_32 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@@ -1976,7 +1982,7 @@
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;
+ char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@@ -1986,6 +1992,54 @@
return TRUE;
}
+static char *
+elf32_arm_nabi_write_core_note (bfd *abfd, char *buf, int *bufsiz,
+ int note_type, ...)
+{
+ switch (note_type)
+ {
+ default:
+ return NULL;
+
+ case NT_PRPSINFO:
+ {
+ char data[124];
+ va_list ap;
+
+ va_start (ap, note_type);
+ memset (data, 0, sizeof (data));
+ strncpy (data + 28, va_arg (ap, const char *), 16);
+ strncpy (data + 44, va_arg (ap, const char *), 80);
+ va_end (ap);
+
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+
+ case NT_PRSTATUS:
+ {
+ char data[148];
+ va_list ap;
+ long pid;
+ int cursig;
+ const void *greg;
+
+ va_start (ap, note_type);
+ memset (data, 0, sizeof (data));
+ pid = va_arg (ap, long);
+ bfd_put_32 (abfd, pid, data + 24);
+ cursig = va_arg (ap, int);
+ bfd_put_16 (abfd, cursig, data + 12);
+ greg = va_arg (ap, const void *);
+ memcpy (data + 72, greg, 72);
+ va_end (ap);
+
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+ }
+}
+
#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
#define TARGET_LITTLE_NAME "elf32-littlearm"
#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
@@ -1993,6 +2047,7 @@
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
+#define elf_backend_write_core_note elf32_arm_nabi_write_core_note
typedef unsigned long int insn32;
typedef unsigned short int insn16;
@@ -2027,24 +2082,24 @@
#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 */
- };
+{
+ 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 */
- };
+{
+ 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
@@ -2053,22 +2108,22 @@
called before the relocation has been set up calls the dynamic
linker first. */
static const bfd_vma elf32_arm_plt0_entry [] =
- {
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe010, /* ldr lr, [pc, #16] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008, /* ldr pc, [lr, #8]! */
- };
+{
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe010, /* ldr lr, [pc, #16] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+};
/* Subsequent entries in a procedure linkage table look like
this. */
static const bfd_vma elf32_arm_plt_entry [] =
- {
- 0xe28fc600, /* add ip, pc, #NN */
- 0xe28cca00, /* add ip, ip, #NN */
- 0xe5bcf000, /* ldr pc, [ip, #NN]! */
- 0x00000000, /* unused */
- };
+{
+ 0xe28fc600, /* add ip, pc, #NN */
+ 0xe28cca00, /* add ip, ip, #NN */
+ 0xe5bcf000, /* ldr pc, [ip, #NN]! */
+ 0x00000000, /* unused */
+};
#else
@@ -2077,72 +2132,111 @@
called before the relocation has been set up calls the dynamic
linker first. */
static const bfd_vma elf32_arm_plt0_entry [] =
- {
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe004, /* ldr lr, [pc, #4] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008, /* ldr pc, [lr, #8]! */
- 0x00000000, /* &GOT[0] - . */
- };
+{
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe004, /* ldr lr, [pc, #4] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+ 0x00000000, /* &GOT[0] - . */
+};
/* Subsequent entries in a procedure linkage table look like
this. */
static const bfd_vma elf32_arm_plt_entry [] =
- {
- 0xe28fc600, /* add ip, pc, #0xNN00000 */
- 0xe28cca00, /* add ip, ip, #0xNN000 */
- 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */
- };
+{
+ 0xe28fc600, /* add ip, pc, #0xNN00000 */
+ 0xe28cca00, /* add ip, ip, #0xNN000 */
+ 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */
+};
#endif
/* The format of the first entry in the procedure linkage table
for a VxWorks executable. */
static const bfd_vma elf32_arm_vxworks_exec_plt0_entry[] =
- {
- 0xe52dc008, /* str ip,[sp,#-8]! */
- 0xe59fc000, /* ldr ip,[pc] */
- 0xe59cf008, /* ldr pc,[ip,#8] */
- 0x00000000, /* .long _GLOBAL_OFFSET_TABLE_ */
- };
+{
+ 0xe52dc008, /* str ip,[sp,#-8]! */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe59cf008, /* ldr pc,[ip,#8] */
+ 0x00000000, /* .long _GLOBAL_OFFSET_TABLE_ */
+};
/* The format of subsequent entries in a VxWorks executable. */
static const bfd_vma elf32_arm_vxworks_exec_plt_entry[] =
- {
- 0xe59fc000, /* ldr ip,[pc] */
- 0xe59cf000, /* ldr pc,[ip] */
- 0x00000000, /* .long @got */
- 0xe59fc000, /* ldr ip,[pc] */
- 0xea000000, /* b _PLT */
- 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
- };
+{
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe59cf000, /* ldr pc,[ip] */
+ 0x00000000, /* .long @got */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xea000000, /* b _PLT */
+ 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
+};
/* The format of entries in a VxWorks shared library. */
static const bfd_vma elf32_arm_vxworks_shared_plt_entry[] =
- {
- 0xe59fc000, /* ldr ip,[pc] */
- 0xe79cf009, /* ldr pc,[ip,r9] */
- 0x00000000, /* .long @got */
- 0xe59fc000, /* ldr ip,[pc] */
- 0xe599f008, /* ldr pc,[r9,#8] */
- 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
- };
+{
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe79cf009, /* ldr pc,[ip,r9] */
+ 0x00000000, /* .long @got */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe599f008, /* ldr pc,[r9,#8] */
+ 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
+};
/* An initial stub used if the PLT entry is referenced from Thumb code. */
#define PLT_THUMB_STUB_SIZE 4
static const bfd_vma elf32_arm_plt_thumb_stub [] =
- {
- 0x4778, /* bx pc */
- 0x46c0 /* nop */
- };
+{
+ 0x4778, /* bx pc */
+ 0x46c0 /* nop */
+};
/* The entries in a PLT when using a DLL-based target with multiple
address spaces. */
static const bfd_vma elf32_arm_symbian_plt_entry [] =
- {
- 0xe51ff004, /* ldr pc, [pc, #-4] */
- 0x00000000, /* dcd R_ARM_GLOB_DAT(X) */
- };
+{
+ 0xe51ff004, /* ldr pc, [pc, #-4] */
+ 0x00000000, /* dcd R_ARM_GLOB_DAT(X) */
+};
+
+/* The first entry in a procedure linkage table looks like
+ this. It is set up so that any shared library function that is
+ called before the relocation has been set up calls the dynamic
+ linker first. */
+static const bfd_vma elf32_arm_nacl_plt0_entry [] =
+{
+ /* First bundle: */
+ 0xe300c000, /* movw ip, #:lower16:&GOT[2]-.+8 */
+ 0xe340c000, /* movt ip, #:upper16:&GOT[2]-.+8 */
+ 0xe08cc00f, /* add ip, ip, pc */
+ 0xe52dc008, /* str ip, [sp, #-8]! */
+ /* Second bundle: */
+ 0xe3ccc103, /* bic ip, ip, #0xc0000000 */
+ 0xe59cc000, /* ldr ip, [ip] */
+ 0xe3ccc13f, /* bic ip, ip, #0xc000000f */
+ 0xe12fff1c, /* bx ip */
+ /* Third bundle: */
+ 0xe320f000, /* nop */
+ 0xe320f000, /* nop */
+ 0xe320f000, /* nop */
+ /* .Lplt_tail: */
+ 0xe50dc004, /* str ip, [sp, #-4] */
+ /* Fourth bundle: */
+ 0xe3ccc103, /* bic ip, ip, #0xc0000000 */
+ 0xe59cc000, /* ldr ip, [ip] */
+ 0xe3ccc13f, /* bic ip, ip, #0xc000000f */
+ 0xe12fff1c, /* bx ip */
+};
+#define ARM_NACL_PLT_TAIL_OFFSET (11 * 4)
+
+/* Subsequent entries in a procedure linkage table look like this. */
+static const bfd_vma elf32_arm_nacl_plt_entry [] =
+{
+ 0xe300c000, /* movw ip, #:lower16:&GOT[n]-.+8 */
+ 0xe340c000, /* movt ip, #:upper16:&GOT[n]-.+8 */
+ 0xe08cc00f, /* add ip, ip, pc */
+ 0xea000000, /* b .Lplt_tail */
+};
#define ARM_MAX_FWD_BRANCH_OFFSET ((((1 << 23) - 1) << 2) + 8)
#define ARM_MAX_BWD_BRANCH_OFFSET ((-((1 << 23) << 2)) + 8)
@@ -2152,12 +2246,12 @@
#define THM2_MAX_BWD_BRANCH_OFFSET (-(1 << 24) + 4)
enum stub_insn_type
- {
- THUMB16_TYPE = 1,
- THUMB32_TYPE,
- ARM_TYPE,
- DATA_TYPE
- };
+{
+ THUMB16_TYPE = 1,
+ THUMB32_TYPE,
+ ARM_TYPE,
+ DATA_TYPE
+};
#define THUMB16_INSN(X) {(X), THUMB16_TYPE, R_ARM_NONE, 0}
/* A bit of a hack. A Thumb conditional branch, in which the proper condition
@@ -2171,192 +2265,242 @@
typedef struct
{
- bfd_vma data;
- enum stub_insn_type type;
- unsigned int r_type;
- int reloc_addend;
+ bfd_vma data;
+ enum stub_insn_type type;
+ unsigned int r_type;
+ int reloc_addend;
} insn_sequence;
/* Arm/Thumb -> Arm/Thumb long branch stub. On V5T and above, use blx
to reach the stub if necessary. */
static const insn_sequence elf32_arm_stub_long_branch_any_any[] =
- {
- ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */
- DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
- };
+{
+ ARM_INSN (0xe51ff004), /* ldr pc, [pc, #-4] */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+};
/* V4T Arm -> Thumb long branch stub. Used on V4T where blx is not
available. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_arm_thumb[] =
- {
- ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */
- ARM_INSN(0xe12fff1c), /* bx ip */
- DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
- };
+{
+ ARM_INSN (0xe59fc000), /* ldr ip, [pc, #0] */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+};
/* Thumb -> Thumb long branch stub. Used on M-profile architectures. */
static const insn_sequence elf32_arm_stub_long_branch_thumb_only[] =
- {
- THUMB16_INSN(0xb401), /* push {r0} */
- THUMB16_INSN(0x4802), /* ldr r0, [pc, #8] */
- THUMB16_INSN(0x4684), /* mov ip, r0 */
- THUMB16_INSN(0xbc01), /* pop {r0} */
- THUMB16_INSN(0x4760), /* bx ip */
- THUMB16_INSN(0xbf00), /* nop */
- DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
- };
+{
+ THUMB16_INSN (0xb401), /* push {r0} */
+ THUMB16_INSN (0x4802), /* ldr r0, [pc, #8] */
+ THUMB16_INSN (0x4684), /* mov ip, r0 */
+ THUMB16_INSN (0xbc01), /* pop {r0} */
+ THUMB16_INSN (0x4760), /* bx ip */
+ THUMB16_INSN (0xbf00), /* nop */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+};
/* V4T Thumb -> Thumb long branch stub. Using the stack is not
allowed. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_thumb[] =
- {
- THUMB16_INSN(0x4778), /* bx pc */
- THUMB16_INSN(0x46c0), /* nop */
- ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */
- ARM_INSN(0xe12fff1c), /* bx ip */
- DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
- };
+{
+ THUMB16_INSN (0x4778), /* bx pc */
+ THUMB16_INSN (0x46c0), /* nop */
+ ARM_INSN (0xe59fc000), /* ldr ip, [pc, #0] */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+};
/* V4T Thumb -> ARM long branch stub. Used on V4T where blx is not
available. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_arm[] =
- {
- THUMB16_INSN(0x4778), /* bx pc */
- THUMB16_INSN(0x46c0), /* nop */
- ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */
- DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
- };
+{
+ THUMB16_INSN (0x4778), /* bx pc */
+ THUMB16_INSN (0x46c0), /* nop */
+ ARM_INSN (0xe51ff004), /* ldr pc, [pc, #-4] */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+};
/* V4T Thumb -> ARM short branch stub. Shorter variant of the above
one, when the destination is close enough. */
static const insn_sequence elf32_arm_stub_short_branch_v4t_thumb_arm[] =
- {
- THUMB16_INSN(0x4778), /* bx pc */
- THUMB16_INSN(0x46c0), /* nop */
- ARM_REL_INSN(0xea000000, -8), /* b (X-8) */
- };
+{
+ THUMB16_INSN (0x4778), /* bx pc */
+ THUMB16_INSN (0x46c0), /* nop */
+ ARM_REL_INSN (0xea000000, -8), /* b (X-8) */
+};
/* ARM/Thumb -> ARM long branch stub, PIC. On V5T and above, use
blx to reach the stub if necessary. */
static const insn_sequence elf32_arm_stub_long_branch_any_arm_pic[] =
- {
- ARM_INSN(0xe59fc000), /* ldr ip, [pc] */
- ARM_INSN(0xe08ff00c), /* add pc, pc, ip */
- DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X-4) */
- };
+{
+ ARM_INSN (0xe59fc000), /* ldr ip, [pc] */
+ ARM_INSN (0xe08ff00c), /* add pc, pc, ip */
+ DATA_WORD (0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X-4) */
+};
/* ARM/Thumb -> Thumb long branch stub, PIC. On V5T and above, use
blx to reach the stub if necessary. We can not add into pc;
it is not guaranteed to mode switch (different in ARMv6 and
ARMv7). */
static const insn_sequence elf32_arm_stub_long_branch_any_thumb_pic[] =
- {
- ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */
- ARM_INSN(0xe08fc00c), /* add ip, pc, ip */
- ARM_INSN(0xe12fff1c), /* bx ip */
- DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
- };
+{
+ ARM_INSN (0xe59fc004), /* ldr ip, [pc, #4] */
+ ARM_INSN (0xe08fc00c), /* add ip, pc, ip */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ DATA_WORD (0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
+};
/* V4T ARM -> ARM long branch stub, PIC. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_arm_thumb_pic[] =
- {
- ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */
- ARM_INSN(0xe08fc00c), /* add ip, pc, ip */
- ARM_INSN(0xe12fff1c), /* bx ip */
- DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
- };
+{
+ ARM_INSN (0xe59fc004), /* ldr ip, [pc, #4] */
+ ARM_INSN (0xe08fc00c), /* add ip, pc, ip */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ DATA_WORD (0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
+};
/* V4T Thumb -> ARM long branch stub, PIC. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_arm_pic[] =
- {
- THUMB16_INSN(0x4778), /* bx pc */
- THUMB16_INSN(0x46c0), /* nop */
- ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */
- ARM_INSN(0xe08cf00f), /* add pc, ip, pc */
- DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X) */
- };
+{
+ THUMB16_INSN (0x4778), /* bx pc */
+ THUMB16_INSN (0x46c0), /* nop */
+ ARM_INSN (0xe59fc000), /* ldr ip, [pc, #0] */
+ ARM_INSN (0xe08cf00f), /* add pc, ip, pc */
+ DATA_WORD (0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X) */
+};
/* Thumb -> Thumb long branch stub, PIC. Used on M-profile
architectures. */
static const insn_sequence elf32_arm_stub_long_branch_thumb_only_pic[] =
- {
- THUMB16_INSN(0xb401), /* push {r0} */
- THUMB16_INSN(0x4802), /* ldr r0, [pc, #8] */
- THUMB16_INSN(0x46fc), /* mov ip, pc */
- THUMB16_INSN(0x4484), /* add ip, r0 */
- THUMB16_INSN(0xbc01), /* pop {r0} */
- THUMB16_INSN(0x4760), /* bx ip */
- DATA_WORD(0, R_ARM_REL32, 4), /* dcd R_ARM_REL32(X) */
- };
+{
+ THUMB16_INSN (0xb401), /* push {r0} */
+ THUMB16_INSN (0x4802), /* ldr r0, [pc, #8] */
+ THUMB16_INSN (0x46fc), /* mov ip, pc */
+ THUMB16_INSN (0x4484), /* add ip, r0 */
+ THUMB16_INSN (0xbc01), /* pop {r0} */
+ THUMB16_INSN (0x4760), /* bx ip */
+ DATA_WORD (0, R_ARM_REL32, 4), /* dcd R_ARM_REL32(X) */
+};
/* V4T Thumb -> Thumb long branch stub, PIC. Using the stack is not
allowed. */
static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_thumb_pic[] =
- {
- THUMB16_INSN(0x4778), /* bx pc */
- THUMB16_INSN(0x46c0), /* nop */
- ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */
- ARM_INSN(0xe08fc00c), /* add ip, pc, ip */
- ARM_INSN(0xe12fff1c), /* bx ip */
- DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
- };
+{
+ THUMB16_INSN (0x4778), /* bx pc */
+ THUMB16_INSN (0x46c0), /* nop */
+ ARM_INSN (0xe59fc004), /* ldr ip, [pc, #4] */
+ ARM_INSN (0xe08fc00c), /* add ip, pc, ip */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ 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) */
+ 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) */
+ 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) */
};
+/* NaCl ARM -> ARM long branch stub. */
+static const insn_sequence elf32_arm_stub_long_branch_arm_nacl[] =
+{
+ ARM_INSN (0xe59fc00c), /* ldr ip, [pc, #12] */
+ ARM_INSN (0xe3ccc13f), /* bic ip, ip, #0xc000000f */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ ARM_INSN (0xe320f000), /* nop */
+ ARM_INSN (0xe125be70), /* bkpt 0x5be0 */
+ DATA_WORD (0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
+ DATA_WORD (0, R_ARM_NONE, 0), /* .word 0 */
+ DATA_WORD (0, R_ARM_NONE, 0), /* .word 0 */
+};
+
+/* NaCl ARM -> ARM long branch stub, PIC. */
+static const insn_sequence elf32_arm_stub_long_branch_arm_nacl_pic[] =
+{
+ ARM_INSN (0xe59fc00c), /* ldr ip, [pc, #12] */
+ ARM_INSN (0xe08cc00f), /* add ip, ip, pc */
+ ARM_INSN (0xe3ccc13f), /* bic ip, ip, #0xc000000f */
+ ARM_INSN (0xe12fff1c), /* bx ip */
+ ARM_INSN (0xe125be70), /* bkpt 0x5be0 */
+ DATA_WORD (0, R_ARM_REL32, 8), /* dcd R_ARM_REL32(X+8) */
+ DATA_WORD (0, R_ARM_NONE, 0), /* .word 0 */
+ DATA_WORD (0, R_ARM_NONE, 0), /* .word 0 */
+};
+
+
/* Cortex-A8 erratum-workaround stubs. */
/* Stub used for conditional branches (which may be beyond +/-1MB away, so we
can't use a conditional branch to reach this stub). */
static const insn_sequence elf32_arm_stub_a8_veneer_b_cond[] =
- {
- THUMB16_BCOND_INSN(0xd001), /* b<cond>.n true. */
- THUMB32_B_INSN(0xf000b800, -4), /* b.w insn_after_original_branch. */
- THUMB32_B_INSN(0xf000b800, -4) /* true: b.w original_branch_dest. */
- };
+{
+ THUMB16_BCOND_INSN (0xd001), /* b<cond>.n true. */
+ THUMB32_B_INSN (0xf000b800, -4), /* b.w insn_after_original_branch. */
+ THUMB32_B_INSN (0xf000b800, -4) /* true: b.w original_branch_dest. */
+};
/* Stub used for b.w and bl.w instructions. */
static const insn_sequence elf32_arm_stub_a8_veneer_b[] =
- {
- THUMB32_B_INSN(0xf000b800, -4) /* b.w original_branch_dest. */
- };
+{
+ THUMB32_B_INSN (0xf000b800, -4) /* b.w original_branch_dest. */
+};
static const insn_sequence elf32_arm_stub_a8_veneer_bl[] =
- {
- THUMB32_B_INSN(0xf000b800, -4) /* b.w original_branch_dest. */
- };
+{
+ THUMB32_B_INSN (0xf000b800, -4) /* b.w original_branch_dest. */
+};
/* Stub used for Thumb-2 blx.w instructions. We modified the original blx.w
instruction (which switches to ARM mode) to point to this stub. Jump to the
real destination using an ARM-mode branch. */
static const insn_sequence elf32_arm_stub_a8_veneer_blx[] =
- {
- ARM_REL_INSN(0xea000000, -8) /* b original_branch_dest. */
- };
+{
+ ARM_REL_INSN (0xea000000, -8) /* b original_branch_dest. */
+};
-/* Section name for stubs is the associated section name plus this
- string. */
-#define STUB_SUFFIX ".stub"
+/* For each section group there can be a specially created linker section
+ to hold the stubs for that group. The name of the stub section is based
+ upon the name of another section within that group with the suffix below
+ applied.
+
+ PR 13049: STUB_SUFFIX used to be ".stub", but this allowed the user to
+ create what appeared to be a linker stub section when it actually
+ contained user code/data. For example, consider this fragment:
+
+ const char * stubborn_problems[] = { "np" };
+
+ If this is compiled with "-fPIC -fdata-sections" then gcc produces a
+ section called:
+
+ .data.rel.local.stubborn_problems
+
+ This then causes problems in arm32_arm_build_stubs() as it triggers:
+
+ // Ignore non-stub sections.
+ if (!strstr (stub_sec->name, STUB_SUFFIX))
+ continue;
+
+ And so the section would be ignored instead of being processed. Hence
+ the change in definition of STUB_SUFFIX to a name that cannot be a valid
+ C identifier. */
+#define STUB_SUFFIX ".__stub"
/* One entry per long/short branch stub defined above. */
#define DEF_STUBS \
@@ -2374,13 +2518,16 @@
DEF_STUB(long_branch_thumb_only_pic) \
DEF_STUB(long_branch_any_tls_pic) \
DEF_STUB(long_branch_v4t_thumb_tls_pic) \
+ DEF_STUB(long_branch_arm_nacl) \
+ DEF_STUB(long_branch_arm_nacl_pic) \
DEF_STUB(a8_veneer_b_cond) \
DEF_STUB(a8_veneer_b) \
DEF_STUB(a8_veneer_bl) \
DEF_STUB(a8_veneer_blx)
#define DEF_STUB(x) arm_stub_##x,
-enum elf32_arm_stub_type {
+enum elf32_arm_stub_type
+{
arm_stub_none,
DEF_STUBS
/* Note the first a8_veneer type */
@@ -2395,7 +2542,8 @@
} stub_def;
#define DEF_STUB(x) {elf32_arm_stub_##x, ARRAY_SIZE(elf32_arm_stub_##x)},
-static const stub_def stub_definitions[] = {
+static const stub_def stub_definitions[] =
+{
{NULL, 0},
DEF_STUBS
};
@@ -2548,7 +2696,8 @@
relaxing which we can refresh easily, then create stubs for each potentially
erratum-triggering instruction once we've settled on a solution. */
-struct a8_erratum_fix {
+struct a8_erratum_fix
+{
bfd *input_bfd;
asection *section;
bfd_vma offset;
@@ -2562,7 +2711,8 @@
/* A table of relocs applied to branches which might trigger Cortex-A8
erratum. */
-struct a8_erratum_reloc {
+struct a8_erratum_reloc
+{
bfd_vma from;
bfd_vma destination;
struct elf32_arm_link_hash_entry *hash;
@@ -2577,7 +2727,8 @@
/* ARM-specific information about a PLT entry, over and above the usual
gotplt_union. */
-struct arm_plt_info {
+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;
@@ -2600,7 +2751,8 @@
};
/* Information about an .iplt entry for a local STT_GNU_IFUNC symbol. */
-struct arm_local_iplt_info {
+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;
@@ -2661,14 +2813,14 @@
/* Arm ELF linker hash entry. */
struct elf32_arm_link_hash_entry
- {
- struct elf_link_hash_entry root;
+{
+ struct elf_link_hash_entry root;
- /* Track dynamic relocs copied for this symbol. */
- struct elf_dyn_relocs *dyn_relocs;
+ /* Track dynamic relocs copied for this symbol. */
+ struct elf_dyn_relocs *dyn_relocs;
- /* ARM-specific PLT information. */
- struct arm_plt_info plt;
+ /* ARM-specific PLT information. */
+ struct arm_plt_info plt;
#define GOT_UNKNOWN 0
#define GOT_NORMAL 1
@@ -2676,25 +2828,25 @@
#define GOT_TLS_IE 4
#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;
+ unsigned int tls_type : 8;
- /* True if the symbol's PLT entry is in .iplt rather than .plt. */
- unsigned int is_iplt : 1;
+ /* True if the symbol's PLT entry is in .iplt rather than .plt. */
+ unsigned int is_iplt : 1;
- unsigned int unused : 23;
+ 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;
+ /* 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. */
- struct elf_link_hash_entry *export_glue;
+ /* The symbol marking the real symbol location for exported thumb
+ symbols with Arm stubs. */
+ struct elf_link_hash_entry *export_glue;
- /* A pointer to the most recently used stub hash entry against this
+ /* A pointer to the most recently used stub hash entry against this
symbol. */
- struct elf32_arm_stub_hash_entry *stub_cache;
- };
+ struct elf32_arm_stub_hash_entry *stub_cache;
+};
/* Traverse an arm ELF linker hash table. */
#define elf32_arm_link_hash_traverse(table, func, info) \
@@ -2804,6 +2956,9 @@
/* True if the target system is Symbian OS. */
int symbian_p;
+ /* True if the target system is Native Client. */
+ int nacl_p;
+
/* True if the target uses REL relocations. */
int use_rel;
@@ -2828,7 +2983,7 @@
/* The offset into sgot of the GOT entry used by the PLT entry
above. */
- bfd_vma dt_tlsdesc_got;
+ bfd_vma dt_tlsdesc_got;
/* Offset in .plt section of tls_arm_trampoline. */
bfd_vma tls_trampoline;
@@ -2857,7 +3012,7 @@
bfd *stub_bfd;
/* Linker call-backs. */
- asection * (*add_stub_section) (const char *, asection *);
+ asection * (*add_stub_section) (const char *, asection *, unsigned int);
void (*layout_sections_again) (void);
/* Array to keep track of which stub sections have been created, and
@@ -2877,8 +3032,8 @@
static struct bfd_hash_entry *
elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
- struct bfd_hash_table * table,
- const char * string)
+ struct bfd_hash_table * table,
+ const char * string)
{
struct elf32_arm_link_hash_entry * ret =
(struct elf32_arm_link_hash_entry *) entry;
@@ -2887,7 +3042,7 @@
subclass. */
if (ret == NULL)
ret = (struct elf32_arm_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry));
+ bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry));
if (ret == NULL)
return (struct bfd_hash_entry *) ret;
@@ -3061,7 +3216,7 @@
if (entry == NULL)
{
entry = (struct bfd_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct elf32_arm_stub_hash_entry));
+ bfd_hash_allocate (table, sizeof (struct elf32_arm_stub_hash_entry));
if (entry == NULL)
return entry;
}
@@ -3124,7 +3279,7 @@
bfd *dynobj;
asection *s;
flagword flags;
-
+
htab = elf32_arm_hash_table (info);
dynobj = htab->root.dynobj;
bed = get_elf_backend_data (dynobj);
@@ -3132,27 +3287,28 @@
if (htab->root.iplt == NULL)
{
- s = bfd_make_section_with_flags (dynobj, ".iplt",
- flags | SEC_READONLY | SEC_CODE);
+ s = bfd_make_section_anyway_with_flags (dynobj, ".iplt",
+ flags | SEC_READONLY | SEC_CODE);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+ || !bfd_set_section_alignment (dynobj, 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);
+ s = bfd_make_section_anyway_with_flags (dynobj,
+ RELOC_SECTION (htab, ".iplt"),
+ flags | SEC_READONLY);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (dynobj, 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);
+ s = bfd_make_section_anyway_with_flags (dynobj, ".igot.plt", flags);
if (s == NULL
|| !bfd_set_section_alignment (dynobj, s, bed->s->log_file_align))
return FALSE;
@@ -3180,10 +3336,10 @@
if (!_bfd_elf_create_dynamic_sections (dynobj, info))
return FALSE;
- htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
if (!info->shared)
- htab->srelbss = bfd_get_section_by_name (dynobj,
- RELOC_SECTION (htab, ".bss"));
+ htab->srelbss = bfd_get_linker_section (dynobj,
+ RELOC_SECTION (htab, ".bss"));
if (htab->vxworks_p)
{
@@ -3289,7 +3445,7 @@
struct elf32_arm_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
- ret = (struct elf32_arm_link_hash_table *) bfd_malloc (amt);
+ ret = (struct elf32_arm_link_hash_table *) bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
@@ -3302,27 +3458,7 @@
return 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;
- memset (ret->bx_glue_offset, 0, sizeof (ret->bx_glue_offset));
ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
- 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;
- ret->target2_reloc = R_ARM_NONE;
#ifdef FOUR_WORD_PLT
ret->plt_header_size = 16;
ret->plt_entry_size = 16;
@@ -3330,22 +3466,8 @@
ret->plt_header_size = 20;
ret->plt_entry_size = 12;
#endif
- ret->fix_v4bx = 0;
- ret->use_blx = 0;
- ret->vxworks_p = 0;
- ret->symbian_p = 0;
ret->use_rel = 1;
- ret->sym_cache.abfd = NULL;
ret->obfd = abfd;
- ret->tls_ldm_got.refcount = 0;
- ret->stub_bfd = NULL;
- ret->add_stub_section = NULL;
- ret->layout_sections_again = NULL;
- ret->stub_group = NULL;
- ret->top_id = 0;
- ret->bfd_count = 0;
- ret->top_index = 0;
- ret->input_list = NULL;
if (!bfd_hash_table_init (&ret->stub_hash_table, stub_hash_newfunc,
sizeof (struct elf32_arm_stub_hash_entry)))
@@ -3366,7 +3488,7 @@
= (struct elf32_arm_link_hash_table *) hash;
bfd_hash_table_free (&ret->stub_hash_table);
- _bfd_generic_link_hash_table_free (hash);
+ _bfd_elf_link_hash_table_free (hash);
}
/* Determine if we're dealing with a Thumb only architecture. */
@@ -3487,6 +3609,12 @@
r_type = ELF32_R_TYPE (rel->r_info);
+ /* ST_BRANCH_TO_ARM is nonsense to thumb-only targets when we
+ are considering a function call relocation. */
+ if (thumb_only && (r_type == R_ARM_THM_CALL || r_type == R_ARM_THM_JUMP24)
+ && branch_type == ST_BRANCH_TO_ARM)
+ branch_type = ST_BRANCH_TO_THUMB;
+
/* 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
@@ -3502,7 +3630,7 @@
else
splt = globals->root.splt;
if (splt != NULL)
- {
+ {
use_plt = 1;
/* Note when dealing with PLT entries: the main PLT stub is in
@@ -3531,11 +3659,11 @@
{
/* Handle cases where:
- this call goes too far (different Thumb/Thumb2 max
- distance)
+ distance)
- it's a Thumb->Arm call and blx is not available, or it's a
- Thumb->Arm branch (not bl). A stub is needed in this case,
- but only if this call is not through a PLT entry. Indeed,
- PLT stubs handle mode switching already.
+ Thumb->Arm branch (not bl). A stub is needed in this case,
+ but only if this call is not through a PLT entry. Indeed,
+ PLT stubs handle mode switching already.
*/
if ((!thumb2
&& (branch_offset > THM_MAX_FWD_BRANCH_OFFSET
@@ -3557,7 +3685,7 @@
stub_type = (info->shared | globals->pic_veneer)
/* PIC stubs. */
? ((globals->use_blx
- && (r_type ==R_ARM_THM_CALL))
+ && (r_type == R_ARM_THM_CALL))
/* V5T and above. Stub starts with ARM code, so
we must be able to switch mode before
reaching it, which is only possible for 'bl'
@@ -3568,7 +3696,7 @@
/* non-PIC stubs. */
: ((globals->use_blx
- && (r_type ==R_ARM_THM_CALL))
+ && (r_type == R_ARM_THM_CALL))
/* V5T and above. */
? arm_stub_long_branch_any_any
/* V4T. */
@@ -3679,9 +3807,13 @@
? (r_type == R_ARM_TLS_CALL
/* TLS PIC Stub */
? arm_stub_long_branch_any_tls_pic
- : arm_stub_long_branch_any_arm_pic)
+ : (globals->nacl_p
+ ? arm_stub_long_branch_arm_nacl_pic
+ : arm_stub_long_branch_any_arm_pic))
/* non-PIC stubs. */
- : arm_stub_long_branch_any_any;
+ : (globals->nacl_p
+ ? arm_stub_long_branch_arm_nacl
+ : arm_stub_long_branch_any_any);
}
}
}
@@ -3786,7 +3918,7 @@
}
/* Find or create a stub section. Returns a pointer to the stub section, and
- the section to which the stub section will be attached (in *LINK_SEC_P).
+ the section to which the stub section will be attached (in *LINK_SEC_P).
LINK_SEC_P may be NULL. */
static asection *
@@ -3797,7 +3929,9 @@
asection *stub_sec;
link_sec = htab->stub_group[section->id].link_sec;
+ BFD_ASSERT (link_sec != NULL);
stub_sec = htab->stub_group[section->id].stub_sec;
+
if (stub_sec == NULL)
{
stub_sec = htab->stub_group[link_sec->id].stub_sec;
@@ -3815,17 +3949,18 @@
memcpy (s_name, link_sec->name, namelen);
memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
- stub_sec = (*htab->add_stub_section) (s_name, link_sec);
+ stub_sec = (*htab->add_stub_section) (s_name, link_sec,
+ htab->nacl_p ? 4 : 3);
if (stub_sec == NULL)
return NULL;
htab->stub_group[link_sec->id].stub_sec = stub_sec;
}
htab->stub_group[section->id].stub_sec = stub_sec;
}
-
+
if (link_sec_p)
*link_sec_p = link_sec;
-
+
return stub_sec;
}
@@ -3893,7 +4028,7 @@
model, return the new reloc type. */
static unsigned
-elf32_arm_tls_transition (struct bfd_link_info *info, int r_type,
+elf32_arm_tls_transition (struct bfd_link_info *info, int r_type,
struct elf_link_hash_entry *h)
{
int is_local = (h == NULL);
@@ -3901,7 +4036,7 @@
if (info->shared || (h && h->root.type == bfd_link_hash_undefweak))
return r_type;
- /* We do not support relaxations for Old TLS models. */
+ /* We do not support relaxations for Old TLS models. */
switch (r_type)
{
case R_ARM_TLS_GOTDESC:
@@ -3947,7 +4082,11 @@
case arm_stub_long_branch_v4t_thumb_tls_pic:
case arm_stub_a8_veneer_blx:
return 4;
-
+
+ case arm_stub_long_branch_arm_nacl:
+ case arm_stub_long_branch_arm_nacl_pic:
+ return 16;
+
default:
abort (); /* Should be unreachable. */
}
@@ -3957,7 +4096,7 @@
arm_build_one_stub (struct bfd_hash_entry *gen_entry,
void * in_arg)
{
-#define MAXRELOCS 2
+#define MAXRELOCS 3
struct elf32_arm_stub_hash_entry *stub_entry;
struct elf32_arm_link_hash_table *globals;
struct bfd_link_info *info;
@@ -4012,11 +4151,11 @@
bfd_vma data = (bfd_vma) template_sequence[i].data;
if (template_sequence[i].reloc_addend != 0)
{
- /* We've borrowed the reloc_addend field to mean we should
- insert a condition code into this (Thumb-1 branch)
- instruction. See THUMB16_BCOND_INSN. */
- BFD_ASSERT ((data & 0xff00) == 0xd000);
- data |= ((stub_entry->orig_insn >> 22) & 0xf) << 8;
+ /* We've borrowed the reloc_addend field to mean we should
+ insert a condition code into this (Thumb-1 branch)
+ instruction. See THUMB16_BCOND_INSN. */
+ BFD_ASSERT ((data & 0xff00) == 0xd000);
+ data |= ((stub_entry->orig_insn >> 22) & 0xf) << 8;
}
bfd_put_16 (stub_bfd, data, loc + size);
size += 2;
@@ -4029,13 +4168,13 @@
loc + size);
bfd_put_16 (stub_bfd, template_sequence[i].data & 0xffff,
loc + size + 2);
- if (template_sequence[i].r_type != R_ARM_NONE)
- {
- stub_reloc_idx[nrelocs] = i;
- stub_reloc_offset[nrelocs++] = size;
- }
- size += 4;
- break;
+ if (template_sequence[i].r_type != R_ARM_NONE)
+ {
+ stub_reloc_idx[nrelocs] = i;
+ stub_reloc_offset[nrelocs++] = size;
+ }
+ size += 4;
+ break;
case ARM_TYPE:
bfd_put_32 (stub_bfd, template_sequence[i].data,
@@ -4093,7 +4232,7 @@
rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
rel.r_info = ELF32_R_INFO (0,
- template_sequence[stub_reloc_idx[i]].r_type);
+ template_sequence[stub_reloc_idx[i]].r_type);
rel.r_addend = template_sequence[stub_reloc_idx[i]].reloc_addend;
if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0)
@@ -4126,7 +4265,7 @@
rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
rel.r_info = ELF32_R_INFO (0,
- template_sequence[stub_reloc_idx[i]].r_type);
+ template_sequence[stub_reloc_idx[i]].r_type);
rel.r_addend = 0;
elf32_arm_final_link_relocate (elf32_arm_howto_from_type
@@ -4356,15 +4495,15 @@
#define NEXT_SEC PREV_SEC
head = NULL;
while (tail != NULL)
- {
- /* Pop from tail. */
- asection *item = tail;
- tail = PREV_SEC (item);
+ {
+ /* Pop from tail. */
+ asection *item = tail;
+ tail = PREV_SEC (item);
- /* Push on head. */
- NEXT_SEC (item) = head;
- head = item;
- }
+ /* Push on head. */
+ NEXT_SEC (item) = head;
+ head = item;
+ }
while (head != NULL)
{
@@ -4483,65 +4622,65 @@
bfd_vma base_vma;
if (elf_section_type (section) != SHT_PROGBITS
- || (elf_section_flags (section) & SHF_EXECINSTR) == 0
- || (section->flags & SEC_EXCLUDE) != 0
- || (section->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
- || (section->output_section == bfd_abs_section_ptr))
- continue;
+ || (elf_section_flags (section) & SHF_EXECINSTR) == 0
+ || (section->flags & SEC_EXCLUDE) != 0
+ || (section->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
+ || (section->output_section == bfd_abs_section_ptr))
+ continue;
base_vma = section->output_section->vma + section->output_offset;
if (elf_section_data (section)->this_hdr.contents != NULL)
- contents = elf_section_data (section)->this_hdr.contents;
+ contents = elf_section_data (section)->this_hdr.contents;
else if (! bfd_malloc_and_get_section (input_bfd, section, &contents))
- return TRUE;
+ return TRUE;
sec_data = elf32_arm_section_data (section);
for (span = 0; span < sec_data->mapcount; span++)
- {
- unsigned int span_start = sec_data->map[span].vma;
- unsigned int span_end = (span == sec_data->mapcount - 1)
- ? section->size : sec_data->map[span + 1].vma;
- unsigned int i;
- char span_type = sec_data->map[span].type;
- bfd_boolean last_was_32bit = FALSE, last_was_branch = FALSE;
+ {
+ unsigned int span_start = sec_data->map[span].vma;
+ unsigned int span_end = (span == sec_data->mapcount - 1)
+ ? section->size : sec_data->map[span + 1].vma;
+ unsigned int i;
+ char span_type = sec_data->map[span].type;
+ bfd_boolean last_was_32bit = FALSE, last_was_branch = FALSE;
- if (span_type != 't')
- continue;
+ if (span_type != 't')
+ continue;
- /* Span is entirely within a single 4KB region: skip scanning. */
- if (((base_vma + span_start) & ~0xfff)
+ /* Span is entirely within a single 4KB region: skip scanning. */
+ if (((base_vma + span_start) & ~0xfff)
== ((base_vma + span_end) & ~0xfff))
- continue;
+ continue;
- /* Scan for 32-bit Thumb-2 branches which span two 4K regions, where:
+ /* Scan for 32-bit Thumb-2 branches which span two 4K regions, where:
- * The opcode is BLX.W, BL.W, B.W, Bcc.W
- * The branch target is in the same 4KB region as the
- first half of the branch.
- * The instruction before the branch is a 32-bit
- length non-branch instruction. */
- for (i = span_start; i < span_end;)
- {
- unsigned int insn = bfd_getl16 (&contents[i]);
- bfd_boolean insn_32bit = FALSE, is_blx = FALSE, is_b = FALSE;
+ * The opcode is BLX.W, BL.W, B.W, Bcc.W
+ * The branch target is in the same 4KB region as the
+ first half of the branch.
+ * The instruction before the branch is a 32-bit
+ length non-branch instruction. */
+ for (i = span_start; i < span_end;)
+ {
+ unsigned int insn = bfd_getl16 (&contents[i]);
+ bfd_boolean insn_32bit = FALSE, is_blx = FALSE, is_b = FALSE;
bfd_boolean is_bl = FALSE, is_bcc = FALSE, is_32bit_branch;
- if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000)
- insn_32bit = TRUE;
+ if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000)
+ insn_32bit = TRUE;
if (insn_32bit)
- {
- /* Load the rest of the insn (in manual-friendly order). */
- insn = (insn << 16) | bfd_getl16 (&contents[i + 2]);
+ {
+ /* Load the rest of the insn (in manual-friendly order). */
+ insn = (insn << 16) | bfd_getl16 (&contents[i + 2]);
- /* Encoding T4: B<c>.W. */
- is_b = (insn & 0xf800d000) == 0xf0009000;
- /* Encoding T1: BL<c>.W. */
- is_bl = (insn & 0xf800d000) == 0xf000d000;
- /* Encoding T2: BLX<c>.W. */
- is_blx = (insn & 0xf800d000) == 0xf000c000;
+ /* Encoding T4: B<c>.W. */
+ is_b = (insn & 0xf800d000) == 0xf0009000;
+ /* Encoding T1: BL<c>.W. */
+ is_bl = (insn & 0xf800d000) == 0xf000d000;
+ /* Encoding T2: BLX<c>.W. */
+ is_blx = (insn & 0xf800d000) == 0xf000c000;
/* Encoding T3: B<c>.W (not permitted in IT block). */
is_bcc = (insn & 0xf800d000) == 0xf0008000
&& (insn & 0x07f00000) != 0x03800000;
@@ -4549,25 +4688,25 @@
is_32bit_branch = is_b || is_bl || is_blx || is_bcc;
- if (((base_vma + i) & 0xfff) == 0xffe
+ if (((base_vma + i) & 0xfff) == 0xffe
&& insn_32bit
&& is_32bit_branch
&& last_was_32bit
&& ! last_was_branch)
- {
- bfd_signed_vma offset = 0;
- bfd_boolean force_target_arm = FALSE;
+ {
+ bfd_signed_vma offset = 0;
+ bfd_boolean force_target_arm = FALSE;
bfd_boolean force_target_thumb = FALSE;
- bfd_vma target;
- enum elf32_arm_stub_type stub_type = arm_stub_none;
- struct a8_erratum_reloc key, *found;
- bfd_boolean use_plt = FALSE;
+ bfd_vma target;
+ enum elf32_arm_stub_type stub_type = arm_stub_none;
+ struct a8_erratum_reloc key, *found;
+ bfd_boolean use_plt = FALSE;
- key.from = base_vma + i;
- found = (struct a8_erratum_reloc *)
- bsearch (&key, a8_relocs, num_a8_relocs,
- sizeof (struct a8_erratum_reloc),
- &a8_reloc_compare);
+ key.from = base_vma + i;
+ found = (struct a8_erratum_reloc *)
+ bsearch (&key, a8_relocs, num_a8_relocs,
+ sizeof (struct a8_erratum_reloc),
+ &a8_reloc_compare);
if (found)
{
@@ -4575,7 +4714,7 @@
struct elf_link_hash_entry *entry;
/* We don't care about the error returned from this
- function, only if there is glue or not. */
+ function, only if there is glue or not. */
entry = find_thumb_glue (info, found->sym_name,
&error_message);
@@ -4597,7 +4736,7 @@
}
}
- /* Check if we have an offending branch instruction. */
+ /* Check if we have an offending branch instruction. */
if (found && found->non_a8_stub)
/* We've already made a stub for this instruction, e.g.
@@ -4605,46 +4744,46 @@
stub will suffice to work around the A8 erratum (see
setting of always_after_branch above). */
;
- else if (is_bcc)
- {
- offset = (insn & 0x7ff) << 1;
- offset |= (insn & 0x3f0000) >> 4;
- offset |= (insn & 0x2000) ? 0x40000 : 0;
- offset |= (insn & 0x800) ? 0x80000 : 0;
- offset |= (insn & 0x4000000) ? 0x100000 : 0;
- if (offset & 0x100000)
- offset |= ~ ((bfd_signed_vma) 0xfffff);
- stub_type = arm_stub_a8_veneer_b_cond;
- }
- else if (is_b || is_bl || is_blx)
- {
- int s = (insn & 0x4000000) != 0;
- int j1 = (insn & 0x2000) != 0;
- int j2 = (insn & 0x800) != 0;
- int i1 = !(j1 ^ s);
- int i2 = !(j2 ^ s);
+ else if (is_bcc)
+ {
+ offset = (insn & 0x7ff) << 1;
+ offset |= (insn & 0x3f0000) >> 4;
+ offset |= (insn & 0x2000) ? 0x40000 : 0;
+ offset |= (insn & 0x800) ? 0x80000 : 0;
+ offset |= (insn & 0x4000000) ? 0x100000 : 0;
+ if (offset & 0x100000)
+ offset |= ~ ((bfd_signed_vma) 0xfffff);
+ stub_type = arm_stub_a8_veneer_b_cond;
+ }
+ else if (is_b || is_bl || is_blx)
+ {
+ int s = (insn & 0x4000000) != 0;
+ int j1 = (insn & 0x2000) != 0;
+ int j2 = (insn & 0x800) != 0;
+ int i1 = !(j1 ^ s);
+ int i2 = !(j2 ^ s);
- offset = (insn & 0x7ff) << 1;
- offset |= (insn & 0x3ff0000) >> 4;
- offset |= i2 << 22;
- offset |= i1 << 23;
- offset |= s << 24;
- if (offset & 0x1000000)
- offset |= ~ ((bfd_signed_vma) 0xffffff);
+ offset = (insn & 0x7ff) << 1;
+ offset |= (insn & 0x3ff0000) >> 4;
+ offset |= i2 << 22;
+ offset |= i1 << 23;
+ offset |= s << 24;
+ if (offset & 0x1000000)
+ offset |= ~ ((bfd_signed_vma) 0xffffff);
- if (is_blx)
- offset &= ~ ((bfd_signed_vma) 3);
+ if (is_blx)
+ offset &= ~ ((bfd_signed_vma) 3);
- stub_type = is_blx ? arm_stub_a8_veneer_blx :
- is_bl ? arm_stub_a8_veneer_bl : arm_stub_a8_veneer_b;
- }
+ stub_type = is_blx ? arm_stub_a8_veneer_blx :
+ is_bl ? arm_stub_a8_veneer_bl : arm_stub_a8_veneer_b;
+ }
- if (stub_type != arm_stub_none)
- {
- bfd_vma pc_for_insn = base_vma + i + 4;
+ if (stub_type != arm_stub_none)
+ {
+ bfd_vma pc_for_insn = base_vma + i + 4;
/* The original instruction is a BL, but the target is
- an ARM instruction. If we were not making a stub,
+ an ARM instruction. If we were not making a stub,
the BL would have been converted to a BLX. Use the
BLX stub instead in that case. */
if (htab->use_blx && force_target_arm
@@ -4665,43 +4804,43 @@
is_bl = TRUE;
}
- if (is_blx)
- pc_for_insn &= ~ ((bfd_vma) 3);
+ if (is_blx)
+ pc_for_insn &= ~ ((bfd_vma) 3);
- /* If we found a relocation, use the proper destination,
- not the offset in the (unrelocated) instruction.
+ /* If we found a relocation, use the proper destination,
+ not the offset in the (unrelocated) instruction.
Note this is always done if we switched the stub type
above. */
- if (found)
- offset =
+ if (found)
+ offset =
(bfd_signed_vma) (found->destination - pc_for_insn);
- /* If the stub will use a Thumb-mode branch to a
- PLT target, redirect it to the preceding Thumb
- entry point. */
- if (stub_type != arm_stub_a8_veneer_blx && use_plt)
- offset -= PLT_THUMB_STUB_SIZE;
+ /* If the stub will use a Thumb-mode branch to a
+ PLT target, redirect it to the preceding Thumb
+ entry point. */
+ if (stub_type != arm_stub_a8_veneer_blx && use_plt)
+ offset -= PLT_THUMB_STUB_SIZE;
- target = pc_for_insn + offset;
+ target = pc_for_insn + offset;
- /* The BLX stub is ARM-mode code. Adjust the offset to
- take the different PC value (+8 instead of +4) into
+ /* The BLX stub is ARM-mode code. Adjust the offset to
+ take the different PC value (+8 instead of +4) into
account. */
- if (stub_type == arm_stub_a8_veneer_blx)
- offset += 4;
+ if (stub_type == arm_stub_a8_veneer_blx)
+ offset += 4;
- if (((base_vma + i) & ~0xfff) == (target & ~0xfff))
- {
- char *stub_name = NULL;
+ if (((base_vma + i) & ~0xfff) == (target & ~0xfff))
+ {
+ char *stub_name = NULL;
- if (num_a8_fixes == a8_fix_table_size)
- {
- a8_fix_table_size *= 2;
- a8_fixes = (struct a8_erratum_fix *)
- bfd_realloc (a8_fixes,
- sizeof (struct a8_erratum_fix)
- * a8_fix_table_size);
- }
+ if (num_a8_fixes == a8_fix_table_size)
+ {
+ a8_fix_table_size *= 2;
+ a8_fixes = (struct a8_erratum_fix *)
+ bfd_realloc (a8_fixes,
+ sizeof (struct a8_erratum_fix)
+ * a8_fix_table_size);
+ }
if (num_a8_fixes < prev_num_a8_fixes)
{
@@ -4726,29 +4865,29 @@
sprintf (stub_name, "%x:%x", section->id, i);
}
- a8_fixes[num_a8_fixes].input_bfd = input_bfd;
- a8_fixes[num_a8_fixes].section = section;
- a8_fixes[num_a8_fixes].offset = i;
- a8_fixes[num_a8_fixes].addend = offset;
- 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].branch_type =
+ a8_fixes[num_a8_fixes].input_bfd = input_bfd;
+ a8_fixes[num_a8_fixes].section = section;
+ a8_fixes[num_a8_fixes].offset = i;
+ a8_fixes[num_a8_fixes].addend = offset;
+ 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].branch_type =
is_blx ? ST_BRANCH_TO_ARM : ST_BRANCH_TO_THUMB;
- num_a8_fixes++;
- }
- }
- }
+ num_a8_fixes++;
+ }
+ }
+ }
- i += insn_32bit ? 4 : 2;
- last_was_32bit = insn_32bit;
+ i += insn_32bit ? 4 : 2;
+ last_was_32bit = insn_32bit;
last_was_branch = is_32bit_branch;
- }
- }
+ }
+ }
if (elf_section_data (section)->this_hdr.contents == NULL)
- free (contents);
+ free (contents);
}
*a8_fixes_p = a8_fixes;
@@ -4769,7 +4908,8 @@
bfd *stub_bfd,
struct bfd_link_info *info,
bfd_signed_vma group_size,
- asection * (*add_stub_section) (const char *, asection *),
+ asection * (*add_stub_section) (const char *, asection *,
+ unsigned int),
void (*layout_sections_again) (void))
{
bfd_size_type stub_group_size;
@@ -4786,9 +4926,9 @@
if (htab->fix_cortex_a8)
{
a8_fixes = (struct a8_erratum_fix *)
- bfd_zmalloc (sizeof (struct a8_erratum_fix) * a8_fix_table_size);
+ bfd_zmalloc (sizeof (struct a8_erratum_fix) * a8_fix_table_size);
a8_relocs = (struct a8_erratum_reloc *)
- bfd_zmalloc (sizeof (struct a8_erratum_reloc) * a8_reloc_table_size);
+ bfd_zmalloc (sizeof (struct a8_erratum_reloc) * a8_reloc_table_size);
}
/* Propagate mach to stub bfd, because it may not have been
@@ -4856,6 +4996,9 @@
asection *section;
Elf_Internal_Sym *local_syms = NULL;
+ if (!is_arm_elf (input_bfd))
+ continue;
+
num_a8_relocs = 0;
/* We'll need the symbol table in a second. */
@@ -4920,13 +5063,13 @@
free (internal_relocs);
goto error_ret_free_local;
}
-
+
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)
@@ -4952,7 +5095,7 @@
sym_value = 0;
destination = 0;
sym_name = NULL;
-
+
if (r_type == (unsigned int) R_ARM_TLS_CALL
|| r_type == (unsigned int) R_ARM_THM_TLS_CALL)
{
@@ -5127,99 +5270,99 @@
goto error_ret_free_internal;
}
- stub_entry->target_value = sym_value;
- stub_entry->target_section = sym_sec;
- stub_entry->stub_type = stub_type;
- stub_entry->h = hash;
- stub_entry->branch_type = branch_type;
+ stub_entry->target_value = sym_value;
+ stub_entry->target_section = sym_sec;
+ stub_entry->stub_type = stub_type;
+ stub_entry->h = hash;
+ stub_entry->branch_type = branch_type;
- if (sym_name == NULL)
- sym_name = "unnamed";
- stub_entry->output_name = (char *)
- bfd_alloc (htab->stub_bfd,
- sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
- + strlen (sym_name));
- if (stub_entry->output_name == NULL)
- {
- free (stub_name);
- goto error_ret_free_internal;
- }
+ if (sym_name == NULL)
+ sym_name = "unnamed";
+ stub_entry->output_name = (char *)
+ bfd_alloc (htab->stub_bfd,
+ sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
+ + strlen (sym_name));
+ if (stub_entry->output_name == NULL)
+ {
+ free (stub_name);
+ goto error_ret_free_internal;
+ }
- /* 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
+ /* 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)
&& 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
+ 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)
&& branch_type == ST_BRANCH_TO_THUMB)
- sprintf (stub_entry->output_name,
- ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
- else
- sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
- sym_name);
+ sprintf (stub_entry->output_name,
+ ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
+ else
+ sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
+ sym_name);
- stub_changed = TRUE;
- }
- while (0);
+ stub_changed = TRUE;
+ }
+ while (0);
- /* Look for relocations which might trigger Cortex-A8
- erratum. */
- if (htab->fix_cortex_a8
- && (r_type == (unsigned int) R_ARM_THM_JUMP24
- || r_type == (unsigned int) R_ARM_THM_JUMP19
- || r_type == (unsigned int) R_ARM_THM_CALL
- || r_type == (unsigned int) R_ARM_THM_XPC22))
- {
- bfd_vma from = section->output_section->vma
- + section->output_offset
- + irela->r_offset;
+ /* Look for relocations which might trigger Cortex-A8
+ erratum. */
+ if (htab->fix_cortex_a8
+ && (r_type == (unsigned int) R_ARM_THM_JUMP24
+ || r_type == (unsigned int) R_ARM_THM_JUMP19
+ || r_type == (unsigned int) R_ARM_THM_CALL
+ || r_type == (unsigned int) R_ARM_THM_XPC22))
+ {
+ bfd_vma from = section->output_section->vma
+ + section->output_offset
+ + irela->r_offset;
- if ((from & 0xfff) == 0xffe)
- {
- /* Found a candidate. Note we haven't checked the
- destination is within 4K here: if we do so (and
- don't create an entry in a8_relocs) we can't tell
- that a branch should have been relocated when
- scanning later. */
- if (num_a8_relocs == a8_reloc_table_size)
- {
- a8_reloc_table_size *= 2;
- a8_relocs = (struct a8_erratum_reloc *)
- bfd_realloc (a8_relocs,
- sizeof (struct a8_erratum_reloc)
- * a8_reloc_table_size);
- }
+ if ((from & 0xfff) == 0xffe)
+ {
+ /* Found a candidate. Note we haven't checked the
+ destination is within 4K here: if we do so (and
+ don't create an entry in a8_relocs) we can't tell
+ that a branch should have been relocated when
+ scanning later. */
+ if (num_a8_relocs == a8_reloc_table_size)
+ {
+ a8_reloc_table_size *= 2;
+ a8_relocs = (struct a8_erratum_reloc *)
+ bfd_realloc (a8_relocs,
+ sizeof (struct a8_erratum_reloc)
+ * a8_reloc_table_size);
+ }
- 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].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;
+ 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].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;
- num_a8_relocs++;
- }
- }
+ num_a8_relocs++;
+ }
+ }
}
- /* We're done with the internal relocs, free them. */
- if (elf_section_data (section)->relocs == NULL)
- free (internal_relocs);
- }
+ /* We're done with the internal relocs, free them. */
+ if (elf_section_data (section)->relocs == NULL)
+ free (internal_relocs);
+ }
- if (htab->fix_cortex_a8)
+ if (htab->fix_cortex_a8)
{
- /* Sort relocs which might apply to Cortex-A8 erratum. */
- qsort (a8_relocs, num_a8_relocs,
+ /* Sort relocs which might apply to Cortex-A8 erratum. */
+ qsort (a8_relocs, num_a8_relocs,
sizeof (struct a8_erratum_reloc),
- &a8_reloc_compare);
+ &a8_reloc_compare);
- /* Scan for branches which might trigger Cortex-A8 erratum. */
- if (cortex_a8_erratum_scan (input_bfd, info, &a8_fixes,
+ /* Scan for branches which might trigger Cortex-A8 erratum. */
+ if (cortex_a8_erratum_scan (input_bfd, info, &a8_fixes,
&num_a8_fixes, &a8_fix_table_size,
a8_relocs, num_a8_relocs,
prev_num_a8_fixes, &stub_changed)
@@ -5229,7 +5372,7 @@
}
if (prev_num_a8_fixes != num_a8_fixes)
- stub_changed = TRUE;
+ stub_changed = TRUE;
if (!stub_changed)
break;
@@ -5251,18 +5394,18 @@
/* Add Cortex-A8 erratum veneers to stub section sizes too. */
if (htab->fix_cortex_a8)
- for (i = 0; i < num_a8_fixes; i++)
- {
+ for (i = 0; i < num_a8_fixes; i++)
+ {
stub_sec = elf32_arm_create_or_find_stub_sec (NULL,
a8_fixes[i].section, htab);
if (stub_sec == NULL)
goto error_ret_free_local;
- stub_sec->size
- += find_stub_size_and_template (a8_fixes[i].stub_type, NULL,
- NULL);
- }
+ stub_sec->size
+ += find_stub_size_and_template (a8_fixes[i].stub_type, NULL,
+ NULL);
+ }
/* Ask the linker to do its stuff. */
@@ -5273,47 +5416,47 @@
if (htab->fix_cortex_a8)
{
for (i = 0; i < num_a8_fixes; i++)
- {
- struct elf32_arm_stub_hash_entry *stub_entry;
- char *stub_name = a8_fixes[i].stub_name;
- asection *section = a8_fixes[i].section;
- unsigned int section_id = a8_fixes[i].section->id;
- asection *link_sec = htab->stub_group[section_id].link_sec;
- asection *stub_sec = htab->stub_group[section_id].stub_sec;
- const insn_sequence *template_sequence;
- int template_size, size = 0;
+ {
+ struct elf32_arm_stub_hash_entry *stub_entry;
+ char *stub_name = a8_fixes[i].stub_name;
+ asection *section = a8_fixes[i].section;
+ unsigned int section_id = a8_fixes[i].section->id;
+ asection *link_sec = htab->stub_group[section_id].link_sec;
+ asection *stub_sec = htab->stub_group[section_id].stub_sec;
+ const insn_sequence *template_sequence;
+ int template_size, size = 0;
- stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
- TRUE, FALSE);
- if (stub_entry == NULL)
- {
- (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- section->owner,
- stub_name);
- return FALSE;
- }
+ stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
+ TRUE, FALSE);
+ if (stub_entry == NULL)
+ {
+ (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
+ section->owner,
+ stub_name);
+ return FALSE;
+ }
- stub_entry->stub_sec = stub_sec;
- stub_entry->stub_offset = 0;
- stub_entry->id_sec = link_sec;
- stub_entry->stub_type = a8_fixes[i].stub_type;
- stub_entry->target_section = a8_fixes[i].section;
- 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->stub_sec = stub_sec;
+ stub_entry->stub_offset = 0;
+ stub_entry->id_sec = link_sec;
+ stub_entry->stub_type = a8_fixes[i].stub_type;
+ stub_entry->target_section = a8_fixes[i].section;
+ 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->branch_type = a8_fixes[i].branch_type;
- size = find_stub_size_and_template (a8_fixes[i].stub_type,
- &template_sequence,
- &template_size);
+ size = find_stub_size_and_template (a8_fixes[i].stub_type,
+ &template_sequence,
+ &template_size);
- stub_entry->stub_size = size;
- stub_entry->stub_template = template_sequence;
- stub_entry->stub_template_size = template_size;
- }
+ stub_entry->stub_size = size;
+ stub_entry->stub_template = template_sequence;
+ stub_entry->stub_template_size = template_size;
+ }
/* Stash the Cortex-A8 erratum fix array for use later in
- elf32_arm_write_section(). */
+ elf32_arm_write_section(). */
htab->a8_erratum_fixes = a8_fixes;
htab->num_a8_erratum_fixes = num_a8_fixes;
}
@@ -5393,7 +5536,7 @@
return NULL;
tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -5429,7 +5572,7 @@
return NULL;
tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -5496,12 +5639,12 @@
nop ldr r6, __func_addr
.arm mov lr, pc
b func bx r6
- .arm
- ;; back_to_thumb
- ldmia r13! {r6, lr}
- bx lr
- __func_addr:
- .word func */
+ .arm
+ ;; back_to_thumb
+ ldmia r13! {r6, lr}
+ bx lr
+ __func_addr:
+ .word func */
#define THUMB2ARM_GLUE_SIZE 8
static const insn16 t2a1_bx_pc_insn = 0x4778;
@@ -5527,7 +5670,7 @@
/* Do not include empty glue sections in the output. */
if (abfd != NULL)
{
- s = bfd_get_section_by_name (abfd, name);
+ s = bfd_get_linker_section (abfd, name);
if (s != NULL)
s->flags |= SEC_EXCLUDE;
}
@@ -5536,7 +5679,7 @@
BFD_ASSERT (abfd != NULL);
- s = bfd_get_section_by_name (abfd, name);
+ s = bfd_get_linker_section (abfd, name);
BFD_ASSERT (s != NULL);
contents = (bfd_byte *) bfd_alloc (abfd, size);
@@ -5592,13 +5735,13 @@
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name
+ s = bfd_get_linker_section
(globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -5668,7 +5811,7 @@
if (globals->bx_glue_offset[reg])
return;
- s = bfd_get_section_by_name
+ s = bfd_get_linker_section
(globals->bfd_of_glue_owner, ARM_BX_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
@@ -5689,8 +5832,8 @@
bh = NULL;
val = globals->bx_glue_size;
_bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
- tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
- NULL, TRUE, FALSE, &bh);
+ tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
+ NULL, TRUE, FALSE, &bh);
myh = (struct elf_link_hash_entry *) bh;
myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
@@ -5713,7 +5856,7 @@
if (sec_data->map == NULL)
{
sec_data->map = (elf32_arm_section_map *)
- bfd_malloc (sizeof (elf32_arm_section_map));
+ bfd_malloc (sizeof (elf32_arm_section_map));
sec_data->mapcount = 0;
sec_data->mapsize = 1;
}
@@ -5724,8 +5867,8 @@
{
sec_data->mapsize *= 2;
sec_data->map = (elf32_arm_section_map *)
- bfd_realloc_or_free (sec_data->map, sec_data->mapsize
- * sizeof (elf32_arm_section_map));
+ bfd_realloc_or_free (sec_data->map, sec_data->mapsize
+ * sizeof (elf32_arm_section_map));
}
if (sec_data->map)
@@ -5741,10 +5884,10 @@
static bfd_vma
record_vfp11_erratum_veneer (struct bfd_link_info *link_info,
- elf32_vfp11_erratum_list *branch,
- bfd *branch_bfd,
- asection *branch_sec,
- unsigned int offset)
+ elf32_vfp11_erratum_list *branch,
+ bfd *branch_bfd,
+ asection *branch_sec,
+ unsigned int offset)
{
asection *s;
struct elf32_arm_link_hash_table *hash_table;
@@ -5759,7 +5902,7 @@
BFD_ASSERT (hash_table != NULL);
BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name
+ s = bfd_get_linker_section
(hash_table->bfd_of_glue_owner, VFP11_ERRATUM_VENEER_SECTION_NAME);
sec_data = elf32_arm_section_data (s);
@@ -5767,7 +5910,7 @@
BFD_ASSERT (s != NULL);
tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
- (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
+ (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
BFD_ASSERT (tmp_name);
@@ -5782,8 +5925,8 @@
bh = NULL;
val = hash_table->vfp11_erratum_glue_size;
_bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
- tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
- NULL, TRUE, FALSE, &bh);
+ tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
+ NULL, TRUE, FALSE, &bh);
myh = (struct elf_link_hash_entry *) bh;
myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
@@ -5830,20 +5973,20 @@
{
bh = NULL;
/* FIXME: Creates an ARM symbol. Thumb mode will need attention if it
- ever requires this erratum fix. */
+ ever requires this erratum fix. */
_bfd_generic_link_add_one_symbol (link_info,
hash_table->bfd_of_glue_owner, "$a",
BSF_LOCAL, s, 0, NULL,
- TRUE, FALSE, &bh);
+ TRUE, FALSE, &bh);
myh = (struct elf_link_hash_entry *) bh;
myh->type = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
myh->forced_local = 1;
/* The elf32_arm_init_maps function only cares about symbols from input
- BFDs. We must make a note of this generated mapping symbol
- ourselves so that code byteswapping works properly in
- elf32_arm_write_section. */
+ BFDs. We must make a note of this generated mapping symbol
+ ourselves so that code byteswapping works properly in
+ elf32_arm_write_section. */
elf32_arm_section_map_add (s, 'a', 0);
}
@@ -5866,12 +6009,12 @@
{
asection * sec;
- sec = bfd_get_section_by_name (abfd, name);
+ sec = bfd_get_linker_section (abfd, name);
if (sec != NULL)
/* Already made. */
return TRUE;
- sec = bfd_make_section_with_flags (abfd, name, ARM_GLUE_SECTION_FLAGS);
+ sec = bfd_make_section_anyway_with_flags (abfd, name, ARM_GLUE_SECTION_FLAGS);
if (sec == NULL
|| !bfd_set_section_alignment (abfd, sec, 2))
@@ -5936,7 +6079,7 @@
{
int cpu_arch;
- cpu_arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
+ cpu_arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
Tag_CPU_arch);
if (globals->fix_arm1176)
@@ -6076,8 +6219,8 @@
{
case R_ARM_PC24:
/* 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. */
+ the target of the call. If it is a thumb target, we
+ insert glue. */
if (h->target_internal == ST_BRANCH_TO_THUMB)
record_arm_to_thumb_glue (link_info, h);
break;
@@ -6149,15 +6292,15 @@
const char *name;
if (sec != NULL
- && ELF_ST_BIND (isym->st_info) == STB_LOCAL)
- {
- name = bfd_elf_string_from_elf_section (abfd,
- hdr->sh_link, isym->st_name);
+ && ELF_ST_BIND (isym->st_info) == STB_LOCAL)
+ {
+ name = bfd_elf_string_from_elf_section (abfd,
+ hdr->sh_link, isym->st_name);
- if (bfd_is_arm_special_symbol_name (name,
+ if (bfd_is_arm_special_symbol_name (name,
BFD_ARM_SPECIAL_SYM_TYPE_MAP))
- elf32_arm_section_map_add (sec, name[1], isym->st_value);
- }
+ elf32_arm_section_map_add (sec, name[1], isym->st_value);
+ }
}
}
@@ -6199,17 +6342,17 @@
if (out_attr[Tag_CPU_arch].i >= TAG_CPU_ARCH_V7)
{
switch (globals->vfp11_fix)
- {
- case BFD_ARM_VFP11_FIX_DEFAULT:
- case BFD_ARM_VFP11_FIX_NONE:
- globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
- break;
+ {
+ case BFD_ARM_VFP11_FIX_DEFAULT:
+ case BFD_ARM_VFP11_FIX_NONE:
+ globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
+ break;
- default:
- /* Give a warning, but do as the user requests anyway. */
- (*_bfd_error_handler) (_("%B: warning: selected VFP11 erratum "
- "workaround is not necessary for target architecture"), obfd);
- }
+ default:
+ /* Give a warning, but do as the user requests anyway. */
+ (*_bfd_error_handler) (_("%B: warning: selected VFP11 erratum "
+ "workaround is not necessary for target architecture"), obfd);
+ }
}
else if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_DEFAULT)
/* For earlier architectures, we might need the workaround, but do not
@@ -6241,7 +6384,7 @@
static unsigned int
bfd_arm_vfp11_regno (unsigned int insn, bfd_boolean is_double, unsigned int rx,
- unsigned int x)
+ unsigned int x)
{
if (is_double)
return (((insn >> rx) & 0xf) | (((insn >> x) & 1) << 4)) + 32;
@@ -6273,15 +6416,15 @@
unsigned int reg = regs[i];
if (reg < 32 && (wmask & (1 << reg)) != 0)
- return TRUE;
+ return TRUE;
reg -= 32;
if (reg >= 16)
- continue;
+ continue;
if ((wmask & (3 << (reg * 2))) != 0)
- return TRUE;
+ return TRUE;
}
return FALSE;
@@ -6297,7 +6440,7 @@
static enum bfd_arm_vfp11_pipe
bfd_arm_vfp11_insn_decode (unsigned int insn, unsigned int *destmask, int *regs,
- int *numregs)
+ int *numregs)
{
enum bfd_arm_vfp11_pipe vpipe = VFP11_BAD;
bfd_boolean is_double = ((insn & 0xf00) == 0xb00) ? 1 : 0;
@@ -6309,96 +6452,96 @@
unsigned int fm = bfd_arm_vfp11_regno (insn, is_double, 0, 5);
pqrs = ((insn & 0x00800000) >> 20)
- | ((insn & 0x00300000) >> 19)
- | ((insn & 0x00000040) >> 6);
+ | ((insn & 0x00300000) >> 19)
+ | ((insn & 0x00000040) >> 6);
switch (pqrs)
- {
- case 0: /* fmac[sd]. */
- case 1: /* fnmac[sd]. */
- case 2: /* fmsc[sd]. */
- case 3: /* fnmsc[sd]. */
- vpipe = VFP11_FMAC;
- bfd_arm_vfp11_write_mask (destmask, fd);
- regs[0] = fd;
- regs[1] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
- regs[2] = fm;
- *numregs = 3;
- break;
+ {
+ case 0: /* fmac[sd]. */
+ case 1: /* fnmac[sd]. */
+ case 2: /* fmsc[sd]. */
+ case 3: /* fnmsc[sd]. */
+ vpipe = VFP11_FMAC;
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ regs[0] = fd;
+ regs[1] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
+ regs[2] = fm;
+ *numregs = 3;
+ break;
- case 4: /* fmul[sd]. */
- case 5: /* fnmul[sd]. */
- case 6: /* fadd[sd]. */
- case 7: /* fsub[sd]. */
- vpipe = VFP11_FMAC;
- goto vfp_binop;
+ case 4: /* fmul[sd]. */
+ case 5: /* fnmul[sd]. */
+ case 6: /* fadd[sd]. */
+ case 7: /* fsub[sd]. */
+ vpipe = VFP11_FMAC;
+ goto vfp_binop;
- case 8: /* fdiv[sd]. */
- vpipe = VFP11_DS;
- vfp_binop:
- bfd_arm_vfp11_write_mask (destmask, fd);
- regs[0] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
- regs[1] = fm;
- *numregs = 2;
- break;
+ case 8: /* fdiv[sd]. */
+ vpipe = VFP11_DS;
+ vfp_binop:
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ regs[0] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
+ regs[1] = fm;
+ *numregs = 2;
+ break;
- case 15: /* extended opcode. */
- {
- unsigned int extn = ((insn >> 15) & 0x1e)
- | ((insn >> 7) & 1);
+ case 15: /* extended opcode. */
+ {
+ unsigned int extn = ((insn >> 15) & 0x1e)
+ | ((insn >> 7) & 1);
- switch (extn)
- {
- case 0: /* fcpy[sd]. */
- case 1: /* fabs[sd]. */
- case 2: /* fneg[sd]. */
- case 8: /* fcmp[sd]. */
- case 9: /* fcmpe[sd]. */
- case 10: /* fcmpz[sd]. */
- case 11: /* fcmpez[sd]. */
- case 16: /* fuito[sd]. */
- case 17: /* fsito[sd]. */
- case 24: /* ftoui[sd]. */
- case 25: /* ftouiz[sd]. */
- case 26: /* ftosi[sd]. */
- case 27: /* ftosiz[sd]. */
- /* These instructions will not bounce due to underflow. */
- *numregs = 0;
- vpipe = VFP11_FMAC;
- break;
+ switch (extn)
+ {
+ case 0: /* fcpy[sd]. */
+ case 1: /* fabs[sd]. */
+ case 2: /* fneg[sd]. */
+ case 8: /* fcmp[sd]. */
+ case 9: /* fcmpe[sd]. */
+ case 10: /* fcmpz[sd]. */
+ case 11: /* fcmpez[sd]. */
+ case 16: /* fuito[sd]. */
+ case 17: /* fsito[sd]. */
+ case 24: /* ftoui[sd]. */
+ case 25: /* ftouiz[sd]. */
+ case 26: /* ftosi[sd]. */
+ case 27: /* ftosiz[sd]. */
+ /* These instructions will not bounce due to underflow. */
+ *numregs = 0;
+ vpipe = VFP11_FMAC;
+ break;
- case 3: /* fsqrt[sd]. */
- /* fsqrt cannot underflow, but it can (perhaps) overwrite
- registers to cause the erratum in previous instructions. */
- bfd_arm_vfp11_write_mask (destmask, fd);
- vpipe = VFP11_DS;
- break;
+ case 3: /* fsqrt[sd]. */
+ /* fsqrt cannot underflow, but it can (perhaps) overwrite
+ registers to cause the erratum in previous instructions. */
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ vpipe = VFP11_DS;
+ break;
- case 15: /* fcvt{ds,sd}. */
- {
- int rnum = 0;
+ case 15: /* fcvt{ds,sd}. */
+ {
+ int rnum = 0;
- bfd_arm_vfp11_write_mask (destmask, fd);
+ bfd_arm_vfp11_write_mask (destmask, fd);
/* Only FCVTSD can underflow. */
- if ((insn & 0x100) != 0)
- regs[rnum++] = fm;
+ if ((insn & 0x100) != 0)
+ regs[rnum++] = fm;
- *numregs = rnum;
+ *numregs = rnum;
- vpipe = VFP11_FMAC;
- }
- break;
+ vpipe = VFP11_FMAC;
+ }
+ break;
- default:
- return VFP11_BAD;
- }
- }
- break;
+ default:
+ return VFP11_BAD;
+ }
+ }
+ break;
- default:
- return VFP11_BAD;
- }
+ default:
+ return VFP11_BAD;
+ }
}
/* Two-register transfer. */
else if ((insn & 0x0fe00ed0) == 0x0c400a10)
@@ -6407,13 +6550,13 @@
if ((insn & 0x100000) == 0)
{
- if (is_double)
- bfd_arm_vfp11_write_mask (destmask, fm);
- else
- {
- bfd_arm_vfp11_write_mask (destmask, fm);
- bfd_arm_vfp11_write_mask (destmask, fm + 1);
- }
+ if (is_double)
+ bfd_arm_vfp11_write_mask (destmask, fm);
+ else
+ {
+ bfd_arm_vfp11_write_mask (destmask, fm);
+ bfd_arm_vfp11_write_mask (destmask, fm + 1);
+ }
}
vpipe = VFP11_LS;
@@ -6424,32 +6567,32 @@
unsigned int puw = ((insn >> 21) & 0x1) | (((insn >> 23) & 3) << 1);
switch (puw)
- {
- case 0: /* Two-reg transfer. We should catch these above. */
- abort ();
+ {
+ case 0: /* Two-reg transfer. We should catch these above. */
+ abort ();
- case 2: /* fldm[sdx]. */
- case 3:
- case 5:
- {
- unsigned int i, offset = insn & 0xff;
+ case 2: /* fldm[sdx]. */
+ case 3:
+ case 5:
+ {
+ unsigned int i, offset = insn & 0xff;
- if (is_double)
- offset >>= 1;
+ if (is_double)
+ offset >>= 1;
- for (i = fd; i < fd + offset; i++)
- bfd_arm_vfp11_write_mask (destmask, i);
- }
- break;
+ for (i = fd; i < fd + offset; i++)
+ bfd_arm_vfp11_write_mask (destmask, i);
+ }
+ break;
- case 4: /* fld[sd]. */
- case 6:
- bfd_arm_vfp11_write_mask (destmask, fd);
- break;
+ case 4: /* fld[sd]. */
+ case 6:
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ break;
- default:
- return VFP11_BAD;
- }
+ default:
+ return VFP11_BAD;
+ }
vpipe = VFP11_LS;
}
@@ -6460,18 +6603,18 @@
unsigned int fn = bfd_arm_vfp11_regno (insn, is_double, 16, 7);
switch (opcode)
- {
- case 0: /* fmsr/fmdlr. */
- case 1: /* fmdhr. */
- /* Mark fmdhr and fmdlr as writing to the whole of the DP
- destination register. I don't know if this is exactly right,
- but it is the conservative choice. */
- bfd_arm_vfp11_write_mask (destmask, fn);
- break;
+ {
+ case 0: /* fmsr/fmdlr. */
+ case 1: /* fmdhr. */
+ /* Mark fmdhr and fmdlr as writing to the whole of the DP
+ destination register. I don't know if this is exactly right,
+ but it is the conservative choice. */
+ bfd_arm_vfp11_write_mask (destmask, fn);
+ break;
- case 7: /* fmxr. */
- break;
- }
+ case 7: /* fmxr. */
+ break;
+ }
vpipe = VFP11_LS;
}
@@ -6505,23 +6648,23 @@
The states transition as follows:
0 -> 1 (vector) or 0 -> 2 (scalar)
- A VFP FMAC-pipeline instruction has been seen. Fill
- regs[0]..regs[numregs-1] with its input operands. Remember this
- instruction in 'first_fmac'.
+ A VFP FMAC-pipeline instruction has been seen. Fill
+ regs[0]..regs[numregs-1] with its input operands. Remember this
+ instruction in 'first_fmac'.
1 -> 2
- Any instruction, except for a VFP instruction which overwrites
- regs[*].
+ Any instruction, except for a VFP instruction which overwrites
+ regs[*].
1 -> 3 [ -> 0 ] or
2 -> 3 [ -> 0 ]
- A VFP instruction has been seen which overwrites any of regs[*].
- We must make a veneer! Reset state to 0 before examining next
- instruction.
+ A VFP instruction has been seen which overwrites any of regs[*].
+ We must make a veneer! Reset state to 0 before examining next
+ instruction.
2 -> 0
- If we fail to match anything in state 2, reset to state 0 and reset
- the instruction pointer to the instruction after 'first_fmac'.
+ If we fail to match anything in state 2, reset to state 0 and reset
+ the instruction pointer to the instruction after 'first_fmac'.
If the VFP11 vector mode is in use, there must be at least two unrelated
instructions between anti-dependent VFP11 instructions to properly avoid
@@ -6552,19 +6695,19 @@
struct _arm_elf_section_data *sec_data;
/* If we don't have executable progbits, we're not interested in this
- section. Also skip if section is to be excluded. */
+ section. Also skip if section is to be excluded. */
if (elf_section_type (sec) != SHT_PROGBITS
- || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
- || (sec->flags & SEC_EXCLUDE) != 0
- || sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS
+ || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
+ || (sec->flags & SEC_EXCLUDE) != 0
+ || sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS
|| sec->output_section == bfd_abs_section_ptr
- || strcmp (sec->name, VFP11_ERRATUM_VENEER_SECTION_NAME) == 0)
- continue;
+ || strcmp (sec->name, VFP11_ERRATUM_VENEER_SECTION_NAME) == 0)
+ continue;
sec_data = elf32_arm_section_data (sec);
if (sec_data->mapcount == 0)
- continue;
+ continue;
if (elf_section_data (sec)->this_hdr.contents != NULL)
contents = elf_section_data (sec)->this_hdr.contents;
@@ -6575,122 +6718,122 @@
elf32_arm_compare_mapping);
for (span = 0; span < sec_data->mapcount; span++)
- {
- unsigned int span_start = sec_data->map[span].vma;
- unsigned int span_end = (span == sec_data->mapcount - 1)
+ {
+ unsigned int span_start = sec_data->map[span].vma;
+ unsigned int span_end = (span == sec_data->mapcount - 1)
? sec->size : sec_data->map[span + 1].vma;
- char span_type = sec_data->map[span].type;
+ char span_type = sec_data->map[span].type;
- /* FIXME: Only ARM mode is supported at present. We may need to
- support Thumb-2 mode also at some point. */
- if (span_type != 'a')
- continue;
+ /* FIXME: Only ARM mode is supported at present. We may need to
+ support Thumb-2 mode also at some point. */
+ if (span_type != 'a')
+ continue;
- for (i = span_start; i < span_end;)
- {
- unsigned int next_i = i + 4;
- unsigned int insn = bfd_big_endian (abfd)
- ? (contents[i] << 24)
- | (contents[i + 1] << 16)
- | (contents[i + 2] << 8)
- | contents[i + 3]
- : (contents[i + 3] << 24)
- | (contents[i + 2] << 16)
- | (contents[i + 1] << 8)
- | contents[i];
- unsigned int writemask = 0;
- enum bfd_arm_vfp11_pipe vpipe;
+ for (i = span_start; i < span_end;)
+ {
+ unsigned int next_i = i + 4;
+ unsigned int insn = bfd_big_endian (abfd)
+ ? (contents[i] << 24)
+ | (contents[i + 1] << 16)
+ | (contents[i + 2] << 8)
+ | contents[i + 3]
+ : (contents[i + 3] << 24)
+ | (contents[i + 2] << 16)
+ | (contents[i + 1] << 8)
+ | contents[i];
+ unsigned int writemask = 0;
+ enum bfd_arm_vfp11_pipe vpipe;
- switch (state)
- {
- case 0:
- vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask, regs,
- &numregs);
- /* I'm assuming the VFP11 erratum can trigger with denorm
- operands on either the FMAC or the DS pipeline. This might
- lead to slightly overenthusiastic veneer insertion. */
- if (vpipe == VFP11_FMAC || vpipe == VFP11_DS)
- {
- state = use_vector ? 1 : 2;
- first_fmac = i;
- veneer_of_insn = insn;
- }
- break;
+ switch (state)
+ {
+ case 0:
+ vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask, regs,
+ &numregs);
+ /* I'm assuming the VFP11 erratum can trigger with denorm
+ operands on either the FMAC or the DS pipeline. This might
+ lead to slightly overenthusiastic veneer insertion. */
+ if (vpipe == VFP11_FMAC || vpipe == VFP11_DS)
+ {
+ state = use_vector ? 1 : 2;
+ first_fmac = i;
+ veneer_of_insn = insn;
+ }
+ break;
- case 1:
- {
- int other_regs[3], other_numregs;
- vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
+ case 1:
+ {
+ int other_regs[3], other_numregs;
+ vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
other_regs,
- &other_numregs);
- if (vpipe != VFP11_BAD
- && bfd_arm_vfp11_antidependency (writemask, regs,
+ &other_numregs);
+ if (vpipe != VFP11_BAD
+ && bfd_arm_vfp11_antidependency (writemask, regs,
numregs))
- state = 3;
- else
- state = 2;
- }
- break;
+ state = 3;
+ else
+ state = 2;
+ }
+ break;
- case 2:
- {
- int other_regs[3], other_numregs;
- vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
+ case 2:
+ {
+ int other_regs[3], other_numregs;
+ vpipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
other_regs,
- &other_numregs);
- if (vpipe != VFP11_BAD
- && bfd_arm_vfp11_antidependency (writemask, regs,
+ &other_numregs);
+ if (vpipe != VFP11_BAD
+ && bfd_arm_vfp11_antidependency (writemask, regs,
numregs))
- state = 3;
- else
- {
- state = 0;
- next_i = first_fmac + 4;
- }
- }
- break;
+ state = 3;
+ else
+ {
+ state = 0;
+ next_i = first_fmac + 4;
+ }
+ }
+ break;
- case 3:
- abort (); /* Should be unreachable. */
- }
+ case 3:
+ abort (); /* Should be unreachable. */
+ }
- if (state == 3)
- {
- elf32_vfp11_erratum_list *newerr =(elf32_vfp11_erratum_list *)
- bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
+ if (state == 3)
+ {
+ elf32_vfp11_erratum_list *newerr =(elf32_vfp11_erratum_list *)
+ bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
- elf32_arm_section_data (sec)->erratumcount += 1;
+ elf32_arm_section_data (sec)->erratumcount += 1;
- newerr->u.b.vfp_insn = veneer_of_insn;
+ newerr->u.b.vfp_insn = veneer_of_insn;
- switch (span_type)
- {
- case 'a':
- newerr->type = VFP11_ERRATUM_BRANCH_TO_ARM_VENEER;
- break;
+ switch (span_type)
+ {
+ case 'a':
+ newerr->type = VFP11_ERRATUM_BRANCH_TO_ARM_VENEER;
+ break;
- default:
- abort ();
- }
+ default:
+ abort ();
+ }
- record_vfp11_erratum_veneer (link_info, newerr, abfd, sec,
+ record_vfp11_erratum_veneer (link_info, newerr, abfd, sec,
first_fmac);
- newerr->vma = -1;
+ newerr->vma = -1;
- newerr->next = sec_data->erratumlist;
- sec_data->erratumlist = newerr;
+ newerr->next = sec_data->erratumlist;
+ sec_data->erratumlist = newerr;
- state = 0;
- }
+ state = 0;
+ }
- i = next_i;
- }
- }
+ i = next_i;
+ }
+ }
if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
- free (contents);
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
contents = NULL;
}
@@ -6727,7 +6870,7 @@
return;
tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen
- (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
+ (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
for (sec = abfd->sections; sec != NULL; sec = sec->next)
{
@@ -6735,56 +6878,56 @@
elf32_vfp11_erratum_list *errnode = sec_data->erratumlist;
for (; errnode != NULL; errnode = errnode->next)
- {
- struct elf_link_hash_entry *myh;
- bfd_vma vma;
+ {
+ struct elf_link_hash_entry *myh;
+ bfd_vma vma;
- switch (errnode->type)
- {
- case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
- case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
- /* Find veneer symbol. */
- sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
+ switch (errnode->type)
+ {
+ case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
+ case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
+ /* Find veneer symbol. */
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
errnode->u.b.veneer->u.v.id);
- myh = elf_link_hash_lookup
- (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
- if (myh == NULL)
- (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
- "`%s'"), abfd, tmp_name);
-
- vma = myh->root.u.def.section->output_section->vma
- + myh->root.u.def.section->output_offset
- + myh->root.u.def.value;
-
- errnode->u.b.veneer->vma = vma;
- break;
-
- case VFP11_ERRATUM_ARM_VENEER:
- case VFP11_ERRATUM_THUMB_VENEER:
- /* Find return location. */
- sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
- errnode->u.v.id);
-
- myh = elf_link_hash_lookup
- (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
-
- if (myh == NULL)
- (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
+ if (myh == NULL)
+ (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
"`%s'"), abfd, tmp_name);
- vma = myh->root.u.def.section->output_section->vma
- + myh->root.u.def.section->output_offset
- + myh->root.u.def.value;
+ vma = myh->root.u.def.section->output_section->vma
+ + myh->root.u.def.section->output_offset
+ + myh->root.u.def.value;
- errnode->u.v.branch->vma = vma;
- break;
+ errnode->u.b.veneer->vma = vma;
+ break;
- default:
- abort ();
- }
- }
+ case VFP11_ERRATUM_ARM_VENEER:
+ case VFP11_ERRATUM_THUMB_VENEER:
+ /* Find return location. */
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
+ errnode->u.v.id);
+
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh == NULL)
+ (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
+ "`%s'"), abfd, tmp_name);
+
+ vma = myh->root.u.def.section->output_section->vma
+ + myh->root.u.def.section->output_offset
+ + myh->root.u.def.value;
+
+ errnode->u.v.branch->vma = vma;
+ break;
+
+ default:
+ abort ();
+ }
+ }
}
free (tmp_name);
@@ -6798,9 +6941,9 @@
struct bfd_link_info *link_info,
int target1_is_rel,
char * target2_type,
- int fix_v4bx,
+ int fix_v4bx,
int use_blx,
- bfd_arm_vfp11_fix vfp11_fix,
+ bfd_arm_vfp11_fix vfp11_fix,
int no_enum_warn, int no_wchar_warn,
int pic_veneer, int fix_cortex_a8,
int fix_arm1176)
@@ -6891,8 +7034,8 @@
my_offset = myh->root.u.def.value;
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- THUMB2ARM_GLUE_SECTION_NAME);
+ s = bfd_get_linker_section (globals->bfd_of_glue_owner,
+ THUMB2ARM_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
@@ -6906,7 +7049,7 @@
{
(*_bfd_error_handler)
(_("%B(%s): warning: interworking not enabled.\n"
- " first occurrence: %B: thumb call to arm"),
+ " first occurrence: %B: Thumb call to ARM"),
sym_sec->owner, input_bfd, name);
return FALSE;
@@ -7081,8 +7224,8 @@
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
+ s = bfd_get_linker_section (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
BFD_ASSERT (s->output_section != NULL);
@@ -7135,8 +7278,8 @@
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
+ s = bfd_get_linker_section (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
BFD_ASSERT (s->output_section != NULL);
@@ -7170,8 +7313,8 @@
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM_BX_GLUE_SECTION_NAME);
+ s = bfd_get_linker_section (globals->bfd_of_glue_owner,
+ ARM_BX_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
BFD_ASSERT (s->output_section != NULL);
@@ -7295,6 +7438,10 @@
splt = htab->root.iplt;
sgotplt = htab->root.igotplt;
+ /* NaCl uses a special first entry in .iplt too. */
+ if (htab->nacl_p && splt->size == 0)
+ splt->size += htab->plt_header_size;
+
/* Allocate room for an R_ARM_IRELATIVE relocation in .rel.iplt. */
elf32_arm_allocate_irelocs (info, htab->root.irelplt, 1);
}
@@ -7327,6 +7474,18 @@
}
}
+static bfd_vma
+arm_movw_immediate (bfd_vma value)
+{
+ return (value & 0x00000fff) | ((value & 0x0000f000) << 4);
+}
+
+static bfd_vma
+arm_movt_immediate (bfd_vma value)
+{
+ return ((value & 0x0fff0000) >> 16) | ((value & 0xf0000000) >> 12);
+}
+
/* 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
@@ -7487,6 +7646,45 @@
rel.r_addend = 0;
SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
}
+ else if (htab->nacl_p)
+ {
+ /* Calculate the displacement between the PLT slot and the
+ common tail that's part of the special initial PLT slot. */
+ int32_t tail_displacement
+ = ((splt->output_section->vma + splt->output_offset
+ + ARM_NACL_PLT_TAIL_OFFSET)
+ - (plt_address + htab->plt_entry_size + 4));
+ BFD_ASSERT ((tail_displacement & 3) == 0);
+ tail_displacement >>= 2;
+
+ BFD_ASSERT ((tail_displacement & 0xff000000) == 0
+ || (-tail_displacement & 0xff000000) == 0);
+
+ /* Calculate the displacement between the PLT slot and the entry
+ in the GOT. The offset accounts for the value produced by
+ adding to pc in the penultimate instruction of the PLT stub. */
+ got_displacement = (got_address
+ - (plt_address + htab->plt_entry_size));
+
+ /* NaCl does not support interworking at all. */
+ BFD_ASSERT (!elf32_arm_plt_needs_thumb_stub_p (info, arm_plt));
+
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt_entry[0]
+ | arm_movw_immediate (got_displacement),
+ ptr + 0);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt_entry[1]
+ | arm_movt_immediate (got_displacement),
+ ptr + 4);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt_entry[2],
+ ptr + 8);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt_entry[3]
+ | (tail_displacement & 0x00ffffff),
+ ptr + 12);
+ }
else
{
/* Calculate the displacement between the PLT slot and the
@@ -7545,8 +7743,13 @@
sgot->contents + got_offset);
}
- loc = srel->contents + plt_index * RELOC_SIZE (htab);
- SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ if (dynindx == -1)
+ elf32_arm_add_dynreloc (output_bfd, info, srel, &rel);
+ else
+ {
+ 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
@@ -7627,18 +7830,18 @@
the pre-relaxed code. It would be nice if the relocs were updated
to match the optimization. */
-static bfd_reloc_status_type
+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,
+ 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;
@@ -7694,7 +7897,7 @@
return bfd_reloc_notsupported;
}
break;
-
+
case R_ARM_TLS_DESCSEQ:
/* arm insn. */
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -7740,7 +7943,7 @@
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)
@@ -7752,7 +7955,7 @@
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;
@@ -7780,28 +7983,28 @@
/* Calculate which part of the value to mask. */
if (residual == 0)
- shift = 0;
+ shift = 0;
else
- {
- int msb;
+ {
+ int msb;
- /* Determine the most significant bit in the residual and
- align the resulting value to a 2-bit boundary. */
- for (msb = 30; msb >= 0; msb -= 2)
- if (residual & (3 << msb))
- break;
+ /* Determine the most significant bit in the residual and
+ align the resulting value to a 2-bit boundary. */
+ for (msb = 30; msb >= 0; msb -= 2)
+ if (residual & (3 << msb))
+ break;
- /* The desired shift is now (msb - 6), or zero, whichever
- is the greater. */
- shift = msb - 6;
- if (shift < 0)
- shift = 0;
- }
+ /* The desired shift is now (msb - 6), or zero, whichever
+ is the greater. */
+ shift = msb - 6;
+ if (shift < 0)
+ shift = 0;
+ }
/* Calculate g_n in 32-bit as well as encoded constant+rotation form. */
g_n = residual & (0xff << shift);
encoded_g_n = (g_n >> shift)
- | ((g_n <= 0xff ? 0 : (32 - shift) / 2) << 8);
+ | ((g_n <= 0xff ? 0 : (32 - shift) / 2) << 8);
/* Calculate the residual for the next time around. */
residual &= ~g_n;
@@ -7926,6 +8129,14 @@
else
addend = signed_addend = rel->r_addend;
+ /* ST_BRANCH_TO_ARM is nonsense to thumb-only targets when we
+ are resolving a function call relocation. */
+ if (using_thumb_only (globals)
+ && (r_type == R_ARM_THM_CALL
+ || r_type == R_ARM_THM_JUMP24)
+ && branch_type == ST_BRANCH_TO_ARM)
+ branch_type = ST_BRANCH_TO_THUMB;
+
/* Record the symbol information that should be used in dynamic
relocations. */
dynreloc_st_type = st_type;
@@ -8013,7 +8224,7 @@
branches in this object should go to it, except if the PLT is too
far away, in which case a long branch stub should be inserted. */
if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32
- && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI
+ && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI
&& r_type != R_ARM_CALL
&& r_type != R_ARM_JUMP24
&& r_type != R_ARM_PLT32)
@@ -8044,7 +8255,8 @@
".tls_vars") == 0)
&& ((r_type != R_ARM_REL32 && r_type != R_ARM_REL32_NOI)
|| !SYMBOL_CALLS_LOCAL (info, h))
- && (!strstr (input_section->name, STUB_SUFFIX))
+ && !(input_bfd == globals->stub_bfd
+ && strstr (input_section->name, STUB_SUFFIX))
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
@@ -8220,7 +8432,6 @@
{
/* The target is out of reach, so redirect the
branch to the local stub for this function. */
-
stub_entry = elf32_arm_get_stub_entry (input_section,
sym_sec, h,
rel, globals,
@@ -8430,36 +8641,36 @@
bfd_signed_vma relocation;
insn = (bfd_get_16 (input_bfd, hit_data) << 16)
- | bfd_get_16 (input_bfd, hit_data + 2);
+ | bfd_get_16 (input_bfd, hit_data + 2);
- if (globals->use_rel)
- {
- signed_addend = (insn & 0xff) | ((insn & 0x7000) >> 4)
- | ((insn & (1 << 26)) >> 15);
- if (insn & 0xf00000)
- signed_addend = -signed_addend;
- }
+ if (globals->use_rel)
+ {
+ signed_addend = (insn & 0xff) | ((insn & 0x7000) >> 4)
+ | ((insn & (1 << 26)) >> 15);
+ if (insn & 0xf00000)
+ signed_addend = -signed_addend;
+ }
relocation = value + signed_addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
+ relocation -= Pa (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
- value = abs (relocation);
+ value = abs (relocation);
- if (value >= 0x1000)
- return bfd_reloc_overflow;
+ if (value >= 0x1000)
+ return bfd_reloc_overflow;
insn = (insn & 0xfb0f8f00) | (value & 0xff)
- | ((value & 0x700) << 4)
- | ((value & 0x800) << 15);
- if (relocation < 0)
- insn |= 0xa00000;
+ | ((value & 0x700) << 4)
+ | ((value & 0x800) << 15);
+ if (relocation < 0)
+ insn |= 0xa00000;
bfd_put_16 (input_bfd, insn >> 16, hit_data);
bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
}
case R_ARM_THM_PC8:
@@ -8472,15 +8683,15 @@
insn = bfd_get_16 (input_bfd, hit_data);
- if (globals->use_rel)
- addend = (insn & 0x00ff) << 2;
+ if (globals->use_rel)
+ addend = ((((insn & 0x00ff) << 2) + 4) & 0x3ff) -4;
relocation = value + addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
+ relocation -= Pa (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
- value = abs (relocation);
+ value = abs (relocation);
/* We do not check for overflow of this reloc. Although strictly
speaking this is incorrect, it appears to be necessary in order
@@ -8493,7 +8704,7 @@
bfd_put_16 (input_bfd, insn, hit_data);
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
}
case R_ARM_THM_PC12:
@@ -8503,33 +8714,33 @@
bfd_signed_vma relocation;
insn = (bfd_get_16 (input_bfd, hit_data) << 16)
- | bfd_get_16 (input_bfd, hit_data + 2);
+ | bfd_get_16 (input_bfd, hit_data + 2);
- if (globals->use_rel)
- {
- signed_addend = insn & 0xfff;
- if (!(insn & (1 << 23)))
- signed_addend = -signed_addend;
- }
+ if (globals->use_rel)
+ {
+ signed_addend = insn & 0xfff;
+ if (!(insn & (1 << 23)))
+ signed_addend = -signed_addend;
+ }
relocation = value + signed_addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
+ relocation -= Pa (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
- value = abs (relocation);
+ value = abs (relocation);
- if (value >= 0x1000)
- return bfd_reloc_overflow;
+ if (value >= 0x1000)
+ return bfd_reloc_overflow;
insn = (insn & 0xff7ff000) | value;
- if (relocation >= 0)
- insn |= (1 << 23);
+ if (relocation >= 0)
+ insn |= (1 << 23);
bfd_put_16 (input_bfd, insn >> 16, hit_data);
bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
}
case R_ARM_THM_XPC22:
@@ -8538,7 +8749,7 @@
/* Thumb BL (branch long instruction). */
{
bfd_vma relocation;
- bfd_vma reloc_sign;
+ bfd_vma reloc_sign;
bfd_boolean overflow = FALSE;
bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
@@ -8570,20 +8781,20 @@
}
/* Fetch the addend. We use the Thumb-2 encoding (backwards compatible
- with Thumb-1) involving the J1 and J2 bits. */
+ with Thumb-1) involving the J1 and J2 bits. */
if (globals->use_rel)
{
- bfd_vma s = (upper_insn & (1 << 10)) >> 10;
- bfd_vma upper = upper_insn & 0x3ff;
- bfd_vma lower = lower_insn & 0x7ff;
+ bfd_vma s = (upper_insn & (1 << 10)) >> 10;
+ bfd_vma upper = upper_insn & 0x3ff;
+ bfd_vma lower = lower_insn & 0x7ff;
bfd_vma j1 = (lower_insn & (1 << 13)) >> 13;
bfd_vma j2 = (lower_insn & (1 << 11)) >> 11;
- bfd_vma i1 = j1 ^ s ? 0 : 1;
- bfd_vma i2 = j2 ^ s ? 0 : 1;
+ bfd_vma i1 = j1 ^ s ? 0 : 1;
+ bfd_vma i2 = j2 ^ s ? 0 : 1;
- addend = (i1 << 23) | (i2 << 22) | (upper << 12) | (lower << 1);
- /* Sign extend. */
- addend = (addend | ((s ? 0 : 1) << 24)) - (1 << 24);
+ addend = (i1 << 23) | (i2 << 22) | (upper << 12) | (lower << 1);
+ /* Sign extend. */
+ addend = (addend | ((s ? 0 : 1) << 24)) - (1 << 24);
signed_addend = addend;
}
@@ -8740,14 +8951,14 @@
/* Put RELOCATION back into the insn. Assumes two's complement.
We use the Thumb-2 encoding, which is safe even if dealing with
a Thumb-1 instruction by virtue of our overflow check above. */
- reloc_sign = (signed_check < 0) ? 1 : 0;
+ reloc_sign = (signed_check < 0) ? 1 : 0;
upper_insn = (upper_insn & ~(bfd_vma) 0x7ff)
- | ((relocation >> 12) & 0x3ff)
- | (reloc_sign << 10);
+ | ((relocation >> 12) & 0x3ff)
+ | (reloc_sign << 10);
lower_insn = (lower_insn & ~(bfd_vma) 0x2fff)
- | (((!((relocation >> 23) & 1)) ^ reloc_sign) << 13)
- | (((!((relocation >> 22) & 1)) ^ reloc_sign) << 11)
- | ((relocation >> 1) & 0x7ff);
+ | (((!((relocation >> 23) & 1)) ^ reloc_sign) << 13)
+ | (((!((relocation >> 22) & 1)) ^ reloc_sign) << 11)
+ | ((relocation >> 1) & 0x7ff);
/* Put the relocated value back in the object file: */
bfd_put_16 (input_bfd, upper_insn, hit_data);
@@ -8801,7 +9012,7 @@
/* ??? Should handle interworking? GCC might someday try to
use this for tail calls. */
- relocation = value + signed_addend;
+ relocation = value + signed_addend;
relocation -= (input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset);
@@ -8916,11 +9127,11 @@
case R_ARM_GOTOFF32:
/* Relocation is relative to the start of the
- global offset table. */
+ global offset table. */
BFD_ASSERT (sgot != NULL);
if (sgot == NULL)
- return bfd_reloc_notsupported;
+ return bfd_reloc_notsupported;
/* If we are addressing a Thumb function, we need to adjust the
address by one, so that attempts to call the function pointer will
@@ -8929,10 +9140,10 @@
value += 1;
/* Note that sgot->output_offset is not involved in this
- calculation. We always want the start of .got. If we
- define _GLOBAL_OFFSET_TABLE in a different way, as is
- permitted by the ABI, we might have to change this
- calculation. */
+ calculation. We always want the start of .got. If we
+ define _GLOBAL_OFFSET_TABLE in a different way, as is
+ permitted by the ABI, we might have to change this
+ calculation. */
value -= sgot->output_section->vma;
return _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset, value,
@@ -8943,7 +9154,7 @@
BFD_ASSERT (sgot != NULL);
if (sgot == NULL)
- return bfd_reloc_notsupported;
+ return bfd_reloc_notsupported;
*unresolved_reloc_p = FALSE;
value = sgot->output_section->vma;
@@ -8954,7 +9165,7 @@
case R_ARM_GOT32:
case R_ARM_GOT_PREL:
/* Relocation is to the entry for this symbol in the
- global offset table. */
+ global offset table. */
if (sgot == NULL)
return bfd_reloc_notsupported;
@@ -8989,7 +9200,7 @@
{
Elf_Internal_Rela outrel;
- if (!SYMBOL_REFERENCES_LOCAL (info, h))
+ if (h->dynindx != -1 && !SYMBOL_REFERENCES_LOCAL (info, h))
{
/* If the symbol doesn't resolve locally in a static
object, we have an undefined reference. If the
@@ -9007,11 +9218,13 @@
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_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
+ else if (info->shared &&
+ (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ else
+ outrel.r_info = 0;
outrel.r_addend = dynreloc_value;
}
@@ -9064,7 +9277,7 @@
+ sgot->output_offset
+ off);
if (dynreloc_st_type == STT_GNU_IFUNC)
- outrel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
+ 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);
@@ -9174,9 +9387,9 @@
}
/* Linker relaxations happens from one of the
- R_ARM_{GOTDESC,CALL,DESCSEQ} relocations to IE or LE. */
+ R_ARM_{GOTDESC,CALL,DESCSEQ} relocations to IE or LE. */
if (ELF32_R_TYPE(rel->r_info) != r_type)
- tls_type = GOT_TLS_IE;
+ tls_type = GOT_TLS_IE;
BFD_ASSERT (tls_type != GOT_UNKNOWN);
@@ -9210,20 +9423,20 @@
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);
+ <= 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);
+ <= sreloc->contents + sreloc->size);
SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
@@ -9231,17 +9444,17 @@
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,
+ 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);
-
+ 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);
+ bfd_put_32 (output_bfd, 0,
+ globals->root.sgotplt->contents + offplt
+ + globals->sgotplt_jump_table_size + 4);
}
if (tls_type & GOT_TLS_GD)
{
@@ -9361,9 +9574,10 @@
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);
+
+ offset -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset + 8);
inst = offset >> 2;
inst &= 0x00ffffff;
@@ -9376,10 +9590,10 @@
unsigned upper_insn, lower_insn;
unsigned neg;
- offset -= (input_section->output_section->vma +
- input_section->output_offset
+ 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))
{
@@ -9412,11 +9626,11 @@
{
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);
@@ -9453,7 +9667,7 @@
case 0xe0: /* add */
value = -8;
break;
-
+
default:
(*_bfd_error_handler)
(_("%B(%A+0x%lx):unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"),
@@ -9462,7 +9676,7 @@
return bfd_reloc_notsupported;
}
}
-
+
value += ((globals->root.sgotplt->output_section->vma
+ globals->root.sgotplt->output_offset + off)
- (input_section->output_section->vma
@@ -9488,7 +9702,7 @@
(_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
input_bfd, input_section,
(long) rel->r_offset, howto->name);
- return (bfd_reloc_status_type) FALSE;
+ return bfd_reloc_notsupported;
}
else
value = tpoff (info, value);
@@ -9554,13 +9768,13 @@
+ input_section->output_offset + rel->r_offset);
if (r_type == R_ARM_MOVW_BREL && value >= 0x10000)
- return bfd_reloc_overflow;
+ return bfd_reloc_overflow;
if (branch_type == ST_BRANCH_TO_THUMB)
value |= 1;
if (r_type == R_ARM_MOVT_ABS || r_type == R_ARM_MOVT_PREL
- || r_type == R_ARM_MOVT_BREL)
+ || r_type == R_ARM_MOVT_BREL)
value >>= 16;
insn &= 0xfff0f000;
@@ -9604,13 +9818,13 @@
+ input_section->output_offset + rel->r_offset);
if (r_type == R_ARM_THM_MOVW_BREL && value >= 0x10000)
- return bfd_reloc_overflow;
+ return bfd_reloc_overflow;
if (branch_type == ST_BRANCH_TO_THUMB)
value |= 1;
if (r_type == R_ARM_THM_MOVT_ABS || r_type == R_ARM_THM_MOVT_PREL
- || r_type == R_ARM_THM_MOVT_BREL)
+ || r_type == R_ARM_THM_MOVT_BREL)
value >>= 16;
insn &= 0xfbf08f00;
@@ -9636,129 +9850,127 @@
case R_ARM_ALU_SB_G2:
{
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
- bfd_vma pc = input_section->output_section->vma
+ bfd_vma pc = input_section->output_section->vma
+ input_section->output_offset + rel->r_offset;
- /* sb should be the origin of the *segment* containing the symbol.
- It is not clear how to obtain this OS-dependent value, so we
- make an arbitrary choice of zero. */
- bfd_vma sb = 0;
- bfd_vma residual;
- bfd_vma g_n;
+ /* sb is the origin of the *segment* containing the symbol. */
+ bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0;
+ bfd_vma residual;
+ bfd_vma g_n;
bfd_signed_vma signed_value;
- int group = 0;
+ int group = 0;
- /* Determine which group of bits to select. */
- switch (r_type)
- {
- case R_ARM_ALU_PC_G0_NC:
- case R_ARM_ALU_PC_G0:
- case R_ARM_ALU_SB_G0_NC:
- case R_ARM_ALU_SB_G0:
- group = 0;
- break;
+ /* Determine which group of bits to select. */
+ switch (r_type)
+ {
+ case R_ARM_ALU_PC_G0_NC:
+ case R_ARM_ALU_PC_G0:
+ case R_ARM_ALU_SB_G0_NC:
+ case R_ARM_ALU_SB_G0:
+ group = 0;
+ break;
- case R_ARM_ALU_PC_G1_NC:
- case R_ARM_ALU_PC_G1:
- case R_ARM_ALU_SB_G1_NC:
- case R_ARM_ALU_SB_G1:
- group = 1;
- break;
+ case R_ARM_ALU_PC_G1_NC:
+ case R_ARM_ALU_PC_G1:
+ case R_ARM_ALU_SB_G1_NC:
+ case R_ARM_ALU_SB_G1:
+ group = 1;
+ break;
- case R_ARM_ALU_PC_G2:
- case R_ARM_ALU_SB_G2:
- group = 2;
- break;
+ case R_ARM_ALU_PC_G2:
+ case R_ARM_ALU_SB_G2:
+ group = 2;
+ break;
- default:
- abort ();
- }
+ default:
+ abort ();
+ }
- /* If REL, extract the addend from the insn. If RELA, it will
- have already been fetched for us. */
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
if (globals->use_rel)
- {
- int negative;
- bfd_vma constant = insn & 0xff;
- bfd_vma rotation = (insn & 0xf00) >> 8;
+ {
+ int negative;
+ bfd_vma constant = insn & 0xff;
+ bfd_vma rotation = (insn & 0xf00) >> 8;
- if (rotation == 0)
- signed_addend = constant;
- else
- {
- /* Compensate for the fact that in the instruction, the
- rotation is stored in multiples of 2 bits. */
- rotation *= 2;
+ if (rotation == 0)
+ signed_addend = constant;
+ else
+ {
+ /* Compensate for the fact that in the instruction, the
+ rotation is stored in multiples of 2 bits. */
+ rotation *= 2;
- /* Rotate "constant" right by "rotation" bits. */
- signed_addend = (constant >> rotation) |
- (constant << (8 * sizeof (bfd_vma) - rotation));
- }
+ /* Rotate "constant" right by "rotation" bits. */
+ signed_addend = (constant >> rotation) |
+ (constant << (8 * sizeof (bfd_vma) - rotation));
+ }
- /* Determine if the instruction is an ADD or a SUB.
- (For REL, this determines the sign of the addend.) */
- negative = identify_add_or_sub (insn);
- if (negative == 0)
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
- input_bfd, input_section,
- (long) rel->r_offset, howto->name);
- return bfd_reloc_overflow;
- }
+ /* Determine if the instruction is an ADD or a SUB.
+ (For REL, this determines the sign of the addend.) */
+ negative = identify_add_or_sub (insn);
+ if (negative == 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
+ input_bfd, input_section,
+ (long) rel->r_offset, howto->name);
+ return bfd_reloc_overflow;
+ }
- signed_addend *= negative;
- }
+ signed_addend *= negative;
+ }
/* Compute the value (X) to go in the place. */
- if (r_type == R_ARM_ALU_PC_G0_NC
- || r_type == R_ARM_ALU_PC_G1_NC
- || r_type == R_ARM_ALU_PC_G0
- || r_type == R_ARM_ALU_PC_G1
- || r_type == R_ARM_ALU_PC_G2)
- /* PC relative. */
- signed_value = value - pc + signed_addend;
- else
- /* Section base relative. */
- signed_value = value - sb + signed_addend;
+ if (r_type == R_ARM_ALU_PC_G0_NC
+ || r_type == R_ARM_ALU_PC_G1_NC
+ || r_type == R_ARM_ALU_PC_G0
+ || r_type == R_ARM_ALU_PC_G1
+ || r_type == R_ARM_ALU_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
- /* If the target symbol is a Thumb function, then set the
- Thumb bit in the address. */
+ /* If the target symbol is a Thumb function, then set the
+ Thumb bit in the address. */
if (branch_type == ST_BRANCH_TO_THUMB)
signed_value |= 1;
- /* Calculate the value of the relevant G_n, in encoded
- constant-with-rotation format. */
- g_n = calculate_group_reloc_mask (abs (signed_value), group,
- &residual);
+ /* Calculate the value of the relevant G_n, in encoded
+ constant-with-rotation format. */
+ g_n = calculate_group_reloc_mask (abs (signed_value), group,
+ &residual);
- /* Check for overflow if required. */
- if ((r_type == R_ARM_ALU_PC_G0
- || r_type == R_ARM_ALU_PC_G1
- || r_type == R_ARM_ALU_PC_G2
- || r_type == R_ARM_ALU_SB_G0
- || r_type == R_ARM_ALU_SB_G1
- || r_type == R_ARM_ALU_SB_G2) && residual != 0)
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
- input_bfd, input_section,
- (long) rel->r_offset, abs (signed_value), howto->name);
- return bfd_reloc_overflow;
- }
+ /* Check for overflow if required. */
+ if ((r_type == R_ARM_ALU_PC_G0
+ || r_type == R_ARM_ALU_PC_G1
+ || r_type == R_ARM_ALU_PC_G2
+ || r_type == R_ARM_ALU_SB_G0
+ || r_type == R_ARM_ALU_SB_G1
+ || r_type == R_ARM_ALU_SB_G2) && residual != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
- /* Mask out the value and the ADD/SUB part of the opcode; take care
- not to destroy the S bit. */
- insn &= 0xff1ff000;
+ /* Mask out the value and the ADD/SUB part of the opcode; take care
+ not to destroy the S bit. */
+ insn &= 0xff1ff000;
- /* Set the opcode according to whether the value to go in the
- place is negative. */
- if (signed_value < 0)
- insn |= 1 << 22;
- else
- insn |= 1 << 23;
+ /* Set the opcode according to whether the value to go in the
+ place is negative. */
+ if (signed_value < 0)
+ insn |= 1 << 22;
+ else
+ insn |= 1 << 23;
- /* Encode the offset. */
- insn |= g_n;
+ /* Encode the offset. */
+ insn |= g_n;
bfd_put_32 (input_bfd, insn, hit_data);
}
@@ -9772,76 +9984,77 @@
case R_ARM_LDR_SB_G2:
{
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
- bfd_vma pc = input_section->output_section->vma
+ bfd_vma pc = input_section->output_section->vma
+ input_section->output_offset + rel->r_offset;
- bfd_vma sb = 0; /* See note above. */
- bfd_vma residual;
+ /* sb is the origin of the *segment* containing the symbol. */
+ bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0;
+ bfd_vma residual;
bfd_signed_vma signed_value;
- int group = 0;
+ int group = 0;
- /* Determine which groups of bits to calculate. */
- switch (r_type)
- {
- case R_ARM_LDR_PC_G0:
- case R_ARM_LDR_SB_G0:
- group = 0;
- break;
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDR_PC_G0:
+ case R_ARM_LDR_SB_G0:
+ group = 0;
+ break;
- case R_ARM_LDR_PC_G1:
- case R_ARM_LDR_SB_G1:
- group = 1;
- break;
+ case R_ARM_LDR_PC_G1:
+ case R_ARM_LDR_SB_G1:
+ group = 1;
+ break;
- case R_ARM_LDR_PC_G2:
- case R_ARM_LDR_SB_G2:
- group = 2;
- break;
+ case R_ARM_LDR_PC_G2:
+ case R_ARM_LDR_SB_G2:
+ group = 2;
+ break;
- default:
- abort ();
- }
+ default:
+ abort ();
+ }
- /* If REL, extract the addend from the insn. If RELA, it will
- have already been fetched for us. */
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
if (globals->use_rel)
- {
- int negative = (insn & (1 << 23)) ? 1 : -1;
- signed_addend = negative * (insn & 0xfff);
- }
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * (insn & 0xfff);
+ }
/* Compute the value (X) to go in the place. */
- if (r_type == R_ARM_LDR_PC_G0
- || r_type == R_ARM_LDR_PC_G1
- || r_type == R_ARM_LDR_PC_G2)
- /* PC relative. */
- signed_value = value - pc + signed_addend;
- else
- /* Section base relative. */
- signed_value = value - sb + signed_addend;
+ if (r_type == R_ARM_LDR_PC_G0
+ || r_type == R_ARM_LDR_PC_G1
+ || r_type == R_ARM_LDR_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
- /* Calculate the value of the relevant G_{n-1} to obtain
- the residual at that stage. */
- calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
- /* Check for overflow. */
- if (residual >= 0x1000)
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
- input_bfd, input_section,
- (long) rel->r_offset, abs (signed_value), howto->name);
- return bfd_reloc_overflow;
- }
+ /* Check for overflow. */
+ if (residual >= 0x1000)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
- /* Mask out the value and U bit. */
- insn &= 0xff7ff000;
+ /* Mask out the value and U bit. */
+ insn &= 0xff7ff000;
- /* Set the U bit if the value to go in the place is non-negative. */
- if (signed_value >= 0)
- insn |= 1 << 23;
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
- /* Encode the offset. */
- insn |= residual;
+ /* Encode the offset. */
+ insn |= residual;
bfd_put_32 (input_bfd, insn, hit_data);
}
@@ -9855,76 +10068,77 @@
case R_ARM_LDRS_SB_G2:
{
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
- bfd_vma pc = input_section->output_section->vma
+ bfd_vma pc = input_section->output_section->vma
+ input_section->output_offset + rel->r_offset;
- bfd_vma sb = 0; /* See note above. */
- bfd_vma residual;
+ /* sb is the origin of the *segment* containing the symbol. */
+ bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0;
+ bfd_vma residual;
bfd_signed_vma signed_value;
- int group = 0;
+ int group = 0;
- /* Determine which groups of bits to calculate. */
- switch (r_type)
- {
- case R_ARM_LDRS_PC_G0:
- case R_ARM_LDRS_SB_G0:
- group = 0;
- break;
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDRS_PC_G0:
+ case R_ARM_LDRS_SB_G0:
+ group = 0;
+ break;
- case R_ARM_LDRS_PC_G1:
- case R_ARM_LDRS_SB_G1:
- group = 1;
- break;
+ case R_ARM_LDRS_PC_G1:
+ case R_ARM_LDRS_SB_G1:
+ group = 1;
+ break;
- case R_ARM_LDRS_PC_G2:
- case R_ARM_LDRS_SB_G2:
- group = 2;
- break;
+ case R_ARM_LDRS_PC_G2:
+ case R_ARM_LDRS_SB_G2:
+ group = 2;
+ break;
- default:
- abort ();
- }
+ default:
+ abort ();
+ }
- /* If REL, extract the addend from the insn. If RELA, it will
- have already been fetched for us. */
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
if (globals->use_rel)
- {
- int negative = (insn & (1 << 23)) ? 1 : -1;
- signed_addend = negative * (((insn & 0xf00) >> 4) + (insn & 0xf));
- }
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * (((insn & 0xf00) >> 4) + (insn & 0xf));
+ }
/* Compute the value (X) to go in the place. */
- if (r_type == R_ARM_LDRS_PC_G0
- || r_type == R_ARM_LDRS_PC_G1
- || r_type == R_ARM_LDRS_PC_G2)
- /* PC relative. */
- signed_value = value - pc + signed_addend;
- else
- /* Section base relative. */
- signed_value = value - sb + signed_addend;
+ if (r_type == R_ARM_LDRS_PC_G0
+ || r_type == R_ARM_LDRS_PC_G1
+ || r_type == R_ARM_LDRS_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
- /* Calculate the value of the relevant G_{n-1} to obtain
- the residual at that stage. */
- calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
- /* Check for overflow. */
- if (residual >= 0x100)
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
- input_bfd, input_section,
- (long) rel->r_offset, abs (signed_value), howto->name);
- return bfd_reloc_overflow;
- }
+ /* Check for overflow. */
+ if (residual >= 0x100)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
- /* Mask out the value and U bit. */
- insn &= 0xff7ff0f0;
+ /* Mask out the value and U bit. */
+ insn &= 0xff7ff0f0;
- /* Set the U bit if the value to go in the place is non-negative. */
- if (signed_value >= 0)
- insn |= 1 << 23;
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
- /* Encode the offset. */
- insn |= ((residual & 0xf0) << 4) | (residual & 0xf);
+ /* Encode the offset. */
+ insn |= ((residual & 0xf0) << 4) | (residual & 0xf);
bfd_put_32 (input_bfd, insn, hit_data);
}
@@ -9938,78 +10152,79 @@
case R_ARM_LDC_SB_G2:
{
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
- bfd_vma pc = input_section->output_section->vma
+ bfd_vma pc = input_section->output_section->vma
+ input_section->output_offset + rel->r_offset;
- bfd_vma sb = 0; /* See note above. */
- bfd_vma residual;
+ /* sb is the origin of the *segment* containing the symbol. */
+ bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0;
+ bfd_vma residual;
bfd_signed_vma signed_value;
- int group = 0;
+ int group = 0;
- /* Determine which groups of bits to calculate. */
- switch (r_type)
- {
- case R_ARM_LDC_PC_G0:
- case R_ARM_LDC_SB_G0:
- group = 0;
- break;
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDC_PC_G0:
+ case R_ARM_LDC_SB_G0:
+ group = 0;
+ break;
- case R_ARM_LDC_PC_G1:
- case R_ARM_LDC_SB_G1:
- group = 1;
- break;
+ case R_ARM_LDC_PC_G1:
+ case R_ARM_LDC_SB_G1:
+ group = 1;
+ break;
- case R_ARM_LDC_PC_G2:
- case R_ARM_LDC_SB_G2:
- group = 2;
- break;
+ case R_ARM_LDC_PC_G2:
+ case R_ARM_LDC_SB_G2:
+ group = 2;
+ break;
- default:
- abort ();
- }
+ default:
+ abort ();
+ }
- /* If REL, extract the addend from the insn. If RELA, it will
- have already been fetched for us. */
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
if (globals->use_rel)
- {
- int negative = (insn & (1 << 23)) ? 1 : -1;
- signed_addend = negative * ((insn & 0xff) << 2);
- }
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * ((insn & 0xff) << 2);
+ }
/* Compute the value (X) to go in the place. */
- if (r_type == R_ARM_LDC_PC_G0
- || r_type == R_ARM_LDC_PC_G1
- || r_type == R_ARM_LDC_PC_G2)
- /* PC relative. */
- signed_value = value - pc + signed_addend;
- else
- /* Section base relative. */
- signed_value = value - sb + signed_addend;
+ if (r_type == R_ARM_LDC_PC_G0
+ || r_type == R_ARM_LDC_PC_G1
+ || r_type == R_ARM_LDC_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
- /* Calculate the value of the relevant G_{n-1} to obtain
- the residual at that stage. */
- calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
- /* Check for overflow. (The absolute value to go in the place must be
- divisible by four and, after having been divided by four, must
- fit in eight bits.) */
- if ((residual & 0x3) != 0 || residual >= 0x400)
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
- input_bfd, input_section,
- (long) rel->r_offset, abs (signed_value), howto->name);
- return bfd_reloc_overflow;
- }
+ /* Check for overflow. (The absolute value to go in the place must be
+ divisible by four and, after having been divided by four, must
+ fit in eight bits.) */
+ if ((residual & 0x3) != 0 || residual >= 0x400)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
- /* Mask out the value and U bit. */
- insn &= 0xff7fff00;
+ /* Mask out the value and U bit. */
+ insn &= 0xff7fff00;
- /* Set the U bit if the value to go in the place is non-negative. */
- if (signed_value >= 0)
- insn |= 1 << 23;
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
- /* Encode the offset. */
- insn |= residual >> 2;
+ /* Encode the offset. */
+ insn |= residual >> 2;
bfd_put_32 (input_bfd, insn, hit_data);
}
@@ -10161,8 +10376,8 @@
r_type = arm_real_reloc_type (globals, r_type);
if ( r_type == R_ARM_GNU_VTENTRY
- || r_type == R_ARM_GNU_VTINHERIT)
- continue;
+ || r_type == R_ARM_GNU_VTINHERIT)
+ continue;
bfd_reloc.howto = elf32_arm_howto_from_type (r_type);
howto = bfd_reloc.howto;
@@ -10196,7 +10411,7 @@
rel->r_offset, TRUE))
return FALSE;
}
-
+
if (globals->use_rel)
{
relocation = (sec->output_section->vma
@@ -10305,9 +10520,9 @@
sym_type = h->type;
}
- if (sec != NULL && elf_discarded_section (sec))
+ if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ rel, 1, relend, howto, 0, contents);
if (info->relocatable)
{
@@ -10355,13 +10570,13 @@
}
/* 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 */
+ 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 :
+ && !((h ? elf32_arm_hash_entry (h)->tls_type :
elf32_arm_local_got_tls_type (input_bfd)[r_symndx])
& GOT_TLS_GDESC)))
{
@@ -10373,7 +10588,7 @@
}
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,
@@ -10386,10 +10601,10 @@
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)
+ && !((input_section->flags & SEC_DEBUGGING) != 0
+ && h->def_dynamic)
&& _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset) != (bfd_vma) -1)
+ rel->r_offset) != (bfd_vma) -1)
{
(*_bfd_error_handler)
(_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
@@ -10469,11 +10684,11 @@
{
arm_unwind_table_edit *new_edit = (arm_unwind_table_edit *)
xmalloc (sizeof (arm_unwind_table_edit));
-
+
new_edit->type = type;
new_edit->linked_section = linked_section;
new_edit->index = tindex;
-
+
if (tindex > 0)
{
new_edit->next = NULL;
@@ -10531,16 +10746,15 @@
/* Scan .ARM.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).
+ 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_arm_write_section).
-*/
+ (in elf32_arm_write_section). */
bfd_boolean
elf32_arm_fix_exidx_coverage (asection **text_section_order,
@@ -10559,27 +10773,27 @@
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_ARM_EXIDX)
continue;
-
+
if (elf_sec->linked_to)
{
Elf_Internal_Shdr *linked_hdr
- = &elf_section_data (elf_sec->linked_to)->this_hdr;
+ = &elf_section_data (elf_sec->linked_to)->this_hdr;
struct _arm_elf_section_data *linked_sec_arm_data
- = get_arm_elf_section_data (linked_hdr->bfd_section);
+ = get_arm_elf_section_data (linked_hdr->bfd_section);
if (linked_sec_arm_data == NULL)
- continue;
+ continue;
/* Link this .ARM.exidx section back from the text section it
- describes. */
+ describes. */
linked_sec_arm_data->u.text.arm_exidx_sec = sec;
}
}
@@ -10604,7 +10818,7 @@
bfd *ibfd;
if (arm_data == NULL)
- continue;
+ continue;
exidx_sec = arm_data->u.text.arm_exidx_sec;
if (exidx_sec == NULL)
@@ -10628,14 +10842,14 @@
hdr = &elf_section_data (exidx_sec)->this_hdr;
if (hdr->sh_type != SHT_ARM_EXIDX)
- continue;
-
+ continue;
+
exidx_arm_data = get_arm_elf_section_data (exidx_sec);
if (exidx_arm_data == NULL)
- continue;
-
+ continue;
+
ibfd = exidx_sec->owner;
-
+
if (hdr->contents != NULL)
contents = hdr->contents;
else if (! bfd_malloc_and_get_section (ibfd, exidx_sec, &contents))
@@ -10682,12 +10896,12 @@
/* Free contents if we allocated it ourselves. */
if (contents != hdr->contents)
- free (contents);
+ free (contents);
/* Record edits to be applied later (in elf32_arm_write_section). */
exidx_arm_data->u.exidx.unwind_edit_list = unwind_edit_head;
exidx_arm_data->u.exidx.unwind_edit_tail = unwind_edit_tail;
-
+
if (deleted_exidx_bytes > 0)
adjust_exidx_size(exidx_sec, -deleted_exidx_bytes);
@@ -10708,7 +10922,7 @@
{
asection *sec, *osec;
- sec = bfd_get_section_by_name (ibfd, name);
+ sec = bfd_get_linker_section (ibfd, name);
if (sec == NULL || (sec->flags & SEC_EXCLUDE) != 0)
return TRUE;
@@ -10781,6 +10995,57 @@
return TRUE;
}
+/* Return a best guess for the machine number based on the attributes. */
+
+static unsigned int
+bfd_arm_get_mach_from_attributes (bfd * abfd)
+{
+ int arch = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_CPU_arch);
+
+ switch (arch)
+ {
+ case TAG_CPU_ARCH_V4: return bfd_mach_arm_4;
+ case TAG_CPU_ARCH_V4T: return bfd_mach_arm_4T;
+ case TAG_CPU_ARCH_V5T: return bfd_mach_arm_5T;
+
+ case TAG_CPU_ARCH_V5TE:
+ {
+ char * name;
+
+ BFD_ASSERT (Tag_CPU_name < NUM_KNOWN_OBJ_ATTRIBUTES);
+ name = elf_known_obj_attributes (abfd) [OBJ_ATTR_PROC][Tag_CPU_name].s;
+
+ if (name)
+ {
+ if (strcmp (name, "IWMMXT2") == 0)
+ return bfd_mach_arm_iWMMXt2;
+
+ if (strcmp (name, "IWMMXT") == 0)
+ return bfd_mach_arm_iWMMXt;
+
+ if (strcmp (name, "XSCALE") == 0)
+ {
+ int wmmx;
+
+ BFD_ASSERT (Tag_WMMX_arch < NUM_KNOWN_OBJ_ATTRIBUTES);
+ wmmx = elf_known_obj_attributes (abfd) [OBJ_ATTR_PROC][Tag_WMMX_arch].i;
+ switch (wmmx)
+ {
+ case 1: return bfd_mach_arm_iWMMXt;
+ case 2: return bfd_mach_arm_iWMMXt2;
+ default: return bfd_mach_arm_XScale;
+ }
+ }
+ }
+
+ return bfd_mach_arm_5TE;
+ }
+
+ default:
+ return bfd_mach_arm_unknown;
+ }
+}
+
/* Set the right machine number. */
static bfd_boolean
@@ -10790,15 +11055,15 @@
mach = bfd_arm_get_mach_from_notes (abfd, ARM_NOTE_SECTION);
- if (mach != bfd_mach_arm_unknown)
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
+ if (mach == bfd_mach_arm_unknown)
+ {
+ if (elf_elfheader (abfd)->e_flags & EF_ARM_MAVERICK_FLOAT)
+ mach = bfd_mach_arm_ep9312;
+ else
+ mach = bfd_arm_get_mach_from_attributes (abfd);
+ }
- else if (elf_elfheader (abfd)->e_flags & EF_ARM_MAVERICK_FLOAT)
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_ep9312);
-
- else
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
-
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
return TRUE;
}
@@ -10858,7 +11123,7 @@
return FALSE;
/* If the src and dest have different interworking flags
- then turn off the interworking bit. */
+ then turn off the interworking bit. */
if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
{
if (out_flags & EF_ARM_INTERWORK)
@@ -11112,6 +11377,24 @@
T(V7E_M), /* V6S_M. */
T(V7E_M) /* V7E_M. */
};
+ const int v8[] =
+ {
+ T(V8), /* PRE_V4. */
+ T(V8), /* V4. */
+ T(V8), /* V4T. */
+ T(V8), /* V5T. */
+ T(V8), /* V5TE. */
+ T(V8), /* V5TEJ. */
+ T(V8), /* V6. */
+ T(V8), /* V6KZ. */
+ T(V8), /* V6T2. */
+ T(V8), /* V6K. */
+ T(V8), /* V7. */
+ T(V8), /* V6_M. */
+ T(V8), /* V6S_M. */
+ T(V8), /* V7E_M. */
+ T(V8) /* V8. */
+ };
const int v4t_plus_v6_m[] =
{
-1, /* PRE_V4. */
@@ -11128,6 +11411,7 @@
T(V6_M), /* V6_M. */
T(V6S_M), /* V6S_M. */
T(V7E_M), /* V7E_M. */
+ T(V8), /* V8. */
T(V4T_PLUS_V6_M) /* V4T plus V6_M. */
};
const int *comb[] =
@@ -11138,6 +11422,7 @@
v6_m,
v6s_m,
v7e_m,
+ v8,
/* Pseudo-architecture. */
v4t_plus_v6_m
};
@@ -11193,6 +11478,46 @@
#undef T
}
+/* Query attributes object to see if integer divide instructions may be
+ present in an object. */
+static bfd_boolean
+elf32_arm_attributes_accept_div (const obj_attribute *attr)
+{
+ int arch = attr[Tag_CPU_arch].i;
+ int profile = attr[Tag_CPU_arch_profile].i;
+
+ switch (attr[Tag_DIV_use].i)
+ {
+ case 0:
+ /* Integer divide allowed if instruction contained in archetecture. */
+ if (arch == TAG_CPU_ARCH_V7 && (profile == 'R' || profile == 'M'))
+ return TRUE;
+ else if (arch >= TAG_CPU_ARCH_V7E_M)
+ return TRUE;
+ else
+ return FALSE;
+
+ case 1:
+ /* Integer divide explicitly prohibited. */
+ return FALSE;
+
+ default:
+ /* Unrecognised case - treat as allowing divide everywhere. */
+ case 2:
+ /* Integer divide allowed in ARM state. */
+ return TRUE;
+ }
+}
+
+/* Query attributes object to see if integer divide instructions are
+ forbidden to be in the object. This is not the inverse of
+ elf32_arm_attributes_accept_div. */
+static bfd_boolean
+elf32_arm_attributes_forbid_div (const obj_attribute *attr)
+{
+ return attr[Tag_DIV_use].i == 1;
+}
+
/* Merge EABI object attributes from IBFD into OBFD. Raise an error if there
are conflicting attributes. */
@@ -11230,7 +11555,7 @@
{
if (out_attr[Tag_MPextension_use].i != 0
&& out_attr[Tag_MPextension_use_legacy].i
- != out_attr[Tag_MPextension_use].i)
+ != out_attr[Tag_MPextension_use].i)
{
_bfd_error_handler
(_("Error: %B has both the current and legacy "
@@ -11299,7 +11624,8 @@
"ARM v6K",
"ARM v7",
"ARM v6-M",
- "ARM v6S-M"
+ "ARM v6S-M",
+ "ARM v8"
};
/* Merge Tag_CPU_arch and Tag_also_compatible_with. */
@@ -11417,7 +11743,7 @@
/* 0 will merge with anything.
'A' and 'S' merge to 'A'.
'R' and 'S' merge to 'R'.
- 'M' and 'A|R|S' is an error. */
+ 'M' and 'A|R|S' is an error. */
if (out_attr[i].i == 0
|| (out_attr[i].i == 'S'
&& (in_attr[i].i == 'A' || in_attr[i].i == 'R')))
@@ -11444,11 +11770,12 @@
when it's 0. It might mean absence of FP hardware if
Tag_FP_arch is zero, otherwise it is effectively SP + DP. */
+#define VFP_VERSION_COUNT 8
static const struct
{
int ver;
int regs;
- } vfp_versions[7] =
+ } vfp_versions[VFP_VERSION_COUNT] =
{
{0, 0},
{1, 16},
@@ -11456,7 +11783,8 @@
{3, 32},
{3, 16},
{4, 32},
- {4, 16}
+ {4, 16},
+ {8, 32}
};
int ver;
int regs;
@@ -11496,9 +11824,10 @@
/* Now we can handle Tag_FP_arch. */
- /* Values greater than 6 aren't defined, so just pick the
- biggest */
- if (in_attr[i].i > 6 && in_attr[i].i > out_attr[i].i)
+ /* Values of VFP_VERSION_COUNT or more aren't defined, so just
+ pick the biggest. */
+ if (in_attr[i].i >= VFP_VERSION_COUNT
+ && in_attr[i].i > out_attr[i].i)
{
out_attr[i] = in_attr[i];
break;
@@ -11512,8 +11841,8 @@
if (regs < vfp_versions[out_attr[i].i].regs)
regs = vfp_versions[out_attr[i].i].regs;
/* This assumes all possible supersets are also a valid
- options. */
- for (newval = 6; newval > 0; newval--)
+ options. */
+ for (newval = VFP_VERSION_COUNT - 1; newval > 0; newval--)
{
if (regs == vfp_versions[newval].regs
&& ver == vfp_versions[newval].ver)
@@ -11525,10 +11854,10 @@
case Tag_PCS_config:
if (out_attr[i].i == 0)
out_attr[i].i = in_attr[i].i;
- else if (in_attr[i].i != 0 && out_attr[i].i != 0)
+ else if (in_attr[i].i != 0 && out_attr[i].i != in_attr[i].i)
{
/* It's sometimes ok to mix different configs, so this is only
- a warning. */
+ a warning. */
_bfd_error_handler
(_("Warning: %B: Conflicting platform configuration"), ibfd);
}
@@ -11634,29 +11963,22 @@
break;
case Tag_DIV_use:
- /* This tag is set to zero if we can use UDIV and SDIV in Thumb
- mode on a v7-M or v7-R CPU; to one if we can not use UDIV or
- SDIV at all; and to two if we can use UDIV or SDIV on a v7-A
- CPU. We will merge as follows: If the input attribute's value
- is one then the output attribute's value remains unchanged. If
- the input attribute's value is zero or two then if the output
- attribute's value is one the output value is set to the input
- value, otherwise the output value must be the same as the
- inputs. */
- if (in_attr[i].i != 1 && out_attr[i].i != 1)
- {
- if (in_attr[i].i != out_attr[i].i)
- {
- _bfd_error_handler
- (_("DIV usage mismatch between %B and %B"),
- ibfd, obfd);
- result = FALSE;
- }
- }
-
- if (in_attr[i].i != 1)
- out_attr[i].i = in_attr[i].i;
-
+ /* A value of zero on input means that the divide instruction may
+ be used if available in the base architecture as specified via
+ Tag_CPU_arch and Tag_CPU_arch_profile. A value of 1 means that
+ the user did not want divide instructions. A value of 2
+ explicitly means that divide instructions were allowed in ARM
+ and Thumb state. */
+ if (in_attr[i].i == out_attr[i].i)
+ /* Do nothing. */ ;
+ else if (elf32_arm_attributes_forbid_div (in_attr)
+ && !elf32_arm_attributes_accept_div (out_attr))
+ out_attr[i].i = 1;
+ else if (elf32_arm_attributes_forbid_div (out_attr)
+ && elf32_arm_attributes_accept_div (in_attr))
+ out_attr[i].i = in_attr[i].i;
+ else if (in_attr[i].i == 2)
+ out_attr[i].i = in_attr[i].i;
break;
case Tag_MPextension_use_legacy:
@@ -11668,7 +11990,7 @@
{
_bfd_error_handler
(_("%B has has both the current and legacy "
- "Tag_MPextension_use attributes"),
+ "Tag_MPextension_use attributes"),
ibfd);
result = FALSE;
}
@@ -11838,6 +12160,15 @@
case EF_ARM_EABI_VER5:
fprintf (file, _(" [Version5 EABI]"));
+
+ if (flags & EF_ARM_ABI_FLOAT_SOFT)
+ fprintf (file, _(" [soft-float ABI]"));
+
+ if (flags & EF_ARM_ABI_FLOAT_HARD)
+ fprintf (file, _(" [hard-float ABI]"));
+
+ flags &= ~(EF_ARM_ABI_FLOAT_SOFT | EF_ARM_ABI_FLOAT_HARD);
+
eabi:
if (flags & EF_ARM_BE8)
fprintf (file, _(" [BE8]"));
@@ -12048,8 +12379,19 @@
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 PLT refcount book-keeping is wrong and too low, we'll
+ see a zero value (going to -1) for the root PLT reference
+ count. */
+ if (root_plt->refcount >= 0)
+ {
+ BFD_ASSERT (root_plt->refcount != 0);
+ root_plt->refcount -= 1;
+ }
+ else
+ /* A value of -1 means the symbol has become local, forced
+ or seeing a hidden definition. Any other negative value
+ is an error. */
+ BFD_ASSERT (root_plt->refcount == -1);
if (!call_reloc_p)
arm_plt->noncall_refcount--;
@@ -12142,7 +12484,7 @@
symtab_hdr = & elf_symtab_hdr (abfd);
sym_hashes = elf_sym_hashes (abfd);
nsyms = NUM_SHDR_ENTRIES (symtab_hdr);
-
+
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
@@ -12185,6 +12527,10 @@
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;
+
+ /* PR15323, ref flags aren't set for references in the
+ same object. */
+ h->root.non_ir_ref = 1;
}
}
@@ -12197,7 +12543,7 @@
/* 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:
@@ -12214,14 +12560,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;
}
@@ -12240,7 +12586,7 @@
}
/* If a variable is accessed with both tls methods, two
- slots may be created. */
+ 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;
@@ -12253,9 +12599,9 @@
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 */
+ 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;
@@ -12352,22 +12698,22 @@
may_need_local_target_p = TRUE;
break;
- /* This relocation describes the C++ object vtable hierarchy.
- Reconstruct it for later use during GC. */
- case R_ARM_GNU_VTINHERIT:
- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_ARM_GNU_VTINHERIT:
+ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
- /* This relocation describes which C++ vtable entries are actually
- used. Record for later use during GC. */
- case R_ARM_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
- }
+ /* This relocation describes which C++ vtable entries are actually
+ used. Record for later use during GC. */
+ case R_ARM_GNU_VTENTRY:
+ BFD_ASSERT (h != NULL);
+ if (h != NULL
+ && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
+ }
if (h != NULL)
{
@@ -12410,7 +12756,8 @@
/* If the symbol is a function that doesn't bind locally,
this relocation will need a PLT entry. */
- root_plt->refcount += 1;
+ if (root_plt->refcount != -1)
+ root_plt->refcount += 1;
if (!call_reloc_p)
arm_plt->noncall_refcount++;
@@ -12623,7 +12970,8 @@
/* We skip _bfd_dwarf1_find_nearest_line since no known ARM toolchain uses it. */
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections,
+ section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr, NULL, 0,
& elf_tdata (abfd)->dwarf2_find_line_info))
@@ -12770,13 +13118,6 @@
if (info->shared || globals->root.is_relocatable_executable)
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
@@ -12786,18 +13127,18 @@
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. */
- s = bfd_get_section_by_name (dynobj, ".dynbss");
+ s = bfd_get_linker_section (dynobj, ".dynbss");
BFD_ASSERT (s != NULL);
/* We must generate a R_ARM_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(a).bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
{
asection *srel;
- srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (globals, ".bss"));
+ srel = bfd_get_linker_section (dynobj, RELOC_SECTION (globals, ".bss"));
elf32_arm_allocate_dynrelocs (info, srel, 1);
h->needs_copy = 1;
}
@@ -12941,18 +13282,18 @@
s->size += 4;
else
{
- if (tls_type & GOT_TLS_GDESC)
- {
+ if (tls_type & GOT_TLS_GDESC)
+ {
/* R_ARM_TLS_DESC needs 2 GOT slots. */
- eh->tlsdesc_got
+ 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;
+ 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++;
- }
+ htab->num_tls_desc++;
+ }
if (tls_type & GOT_TLS_GD)
{
@@ -12987,7 +13328,7 @@
if (tls_type & GOT_TLS_GD)
elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
- if (tls_type & GOT_TLS_GDESC)
+ if (tls_type & GOT_TLS_GDESC)
{
elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
/* GDESC needs a trampoline to jump to. */
@@ -12996,10 +13337,10 @@
/* Only GD needs it. GDESC just emits one relocation per
2 entries. */
- if ((tls_type & GOT_TLS_GD) && indx != 0)
+ if ((tls_type & GOT_TLS_GD) && indx != 0)
elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
}
- else if (!SYMBOL_REFERENCES_LOCAL (info, h))
+ else if (indx != -1 && !SYMBOL_REFERENCES_LOCAL (info, h))
{
if (htab->root.dynamic_sections_created)
/* Reserve room for the GOT entry's R_ARM_GLOB_DAT relocation. */
@@ -13011,7 +13352,8 @@
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)
+ else if (info->shared && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
/* Reserve room for the GOT entry's R_ARM_RELATIVE relocation. */
elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
}
@@ -13064,11 +13406,11 @@
if (info->shared || htab->root.is_relocatable_executable)
{
/* The only relocs that use pc_count are R_ARM_REL32 and
- R_ARM_REL32_NOI, which will appear on something like
- ".long foo - .". We want calls to protected symbols to resolve
- directly to the function rather than going via the plt. If people
- want function pointer comparisons to work as expected then they
- should avoid writing assembly like ".long foo - .". */
+ R_ARM_REL32_NOI, which will appear on something like
+ ".long foo - .". We want calls to protected symbols to resolve
+ directly to the function rather than going via the plt. If people
+ want function pointer comparisons to work as expected then they
+ should avoid writing assembly like ".long foo - .". */
if (SYMBOL_CALLS_LOCAL (info, h))
{
struct elf_dyn_relocs **pp;
@@ -13098,7 +13440,7 @@
}
/* Also discard relocs on undefined weak syms with non-default
- visibility. */
+ visibility. */
if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
{
@@ -13239,7 +13581,7 @@
/* Set the contents of the .interp section to the interpreter. */
if (info->executable)
{
- s = bfd_get_section_by_name (dynobj, ".interp");
+ s = bfd_get_linker_section (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
@@ -13269,7 +13611,7 @@
struct elf_dyn_relocs *p;
for (p = (struct elf_dyn_relocs *)
- elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
+ 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))
@@ -13365,7 +13707,7 @@
*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++;
+ htab->num_tls_desc++;
}
if (*local_tls_type & GOT_TLS_IE)
s->size += 4;
@@ -13389,14 +13731,18 @@
&& (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)
+ else if (info->shared || output_bfd->flags & DYNAMIC)
{
- elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
- htab->tls_trampoline = -1;
+ 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
@@ -13431,8 +13777,8 @@
if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
|| !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info))
- /* xgettext:c-format */
- _bfd_error_handler (_("Errors encountered processing file %s"),
+ /* xgettext:c-format */
+ _bfd_error_handler (_("Errors encountered processing file %s"),
ibfd->filename);
}
@@ -13451,12 +13797,12 @@
{
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. */
+ PLT and GOT entries they require. */
if (!(info->flags & DF_BIND_NOW))
{
htab->dt_tlsdesc_got = htab->root.sgot->size;
@@ -13562,9 +13908,9 @@
return FALSE;
if (htab->dt_tlsdesc_plt &&
- (!add_dynamic_entry (DT_TLSDESC_PLT,0)
+ (!add_dynamic_entry (DT_TLSDESC_PLT,0)
|| !add_dynamic_entry (DT_TLSDESC_GOT,0)))
- return FALSE;
+ return FALSE;
}
if (relocs)
@@ -13610,7 +13956,7 @@
static bfd_boolean
elf32_arm_always_size_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+ struct bfd_link_info *info)
{
asection *tls_sec;
@@ -13627,22 +13973,22 @@
(elf_hash_table (info), "_TLS_MODULE_BASE_", TRUE, TRUE, FALSE);
if (tlsbase)
- {
- struct bfd_link_hash_entry *bh = NULL;
+ {
+ struct bfd_link_hash_entry *bh = NULL;
const struct elf_backend_data *bed
- = get_elf_backend_data (output_bfd);
+ = get_elf_backend_data (output_bfd);
- if (!(_bfd_generic_link_add_one_symbol
+ 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);
+
+ 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;
@@ -13725,7 +14071,7 @@
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. On VxWorks,
the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative
to the ".got" section. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ if (h == htab->root.hdynamic
|| (!htab->vxworks_p && h == htab->root.hgot))
sym->st_shndx = SHN_ABS;
@@ -13738,7 +14084,7 @@
const unsigned long *template, unsigned count)
{
unsigned ix;
-
+
for (ix = 0; ix != count; ix++)
{
unsigned long insn = template[ix];
@@ -13750,6 +14096,38 @@
}
}
+/* Install the special first PLT entry for elf32-arm-nacl. Unlike
+ other variants, NaCl needs this entry in a static executable's
+ .iplt too. When we're handling that case, GOT_DISPLACEMENT is
+ zero. For .iplt really only the last bundle is useful, and .iplt
+ could have a shorter first entry, with each individual PLT entry's
+ relative branch calculated differently so it targets the last
+ bundle instead of the instruction before it (labelled .Lplt_tail
+ above). But it's simpler to keep the size and layout of PLT0
+ consistent with the dynamic case, at the cost of some dead code at
+ the start of .iplt and the one dead store to the stack at the start
+ of .Lplt_tail. */
+static void
+arm_nacl_put_plt0 (struct elf32_arm_link_hash_table *htab, bfd *output_bfd,
+ asection *plt, bfd_vma got_displacement)
+{
+ unsigned int i;
+
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt0_entry[0]
+ | arm_movw_immediate (got_displacement),
+ plt->contents + 0);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt0_entry[1]
+ | arm_movt_immediate (got_displacement),
+ plt->contents + 4);
+
+ for (i = 2; i < ARRAY_SIZE (elf32_arm_nacl_plt0_entry); ++i)
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_nacl_plt0_entry[i],
+ plt->contents + (i * 4));
+}
+
/* Finish up the dynamic sections. */
static bfd_boolean
@@ -13771,7 +14149,7 @@
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");
+ sdyn = bfd_get_linker_section (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
{
@@ -13829,7 +14207,14 @@
name = RELOC_SECTION (htab, ".plt");
get_vma:
s = bfd_get_section_by_name (output_bfd, name);
- BFD_ASSERT (s != NULL);
+ if (s == NULL)
+ {
+ /* PR ld/14397: Issue an error message if a required section is missing. */
+ (*_bfd_error_handler)
+ (_("error: required section '%s' not found in the linker script"), name);
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
if (!htab->symbian_p)
dyn.d_un.d_ptr = s->vma;
else
@@ -13908,16 +14293,16 @@
break;
case DT_TLSDESC_PLT:
- s = htab->root.splt;
+ 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;
+ s = htab->root.sgot;
dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset
- + htab->dt_tlsdesc_got);
+ + htab->dt_tlsdesc_got);
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@ -13980,6 +14365,9 @@
SWAP_RELOC_OUT (htab) (output_bfd, &rel,
htab->srelplt2->contents);
}
+ else if (htab->nacl_p)
+ arm_nacl_put_plt0 (htab, output_bfd, splt,
+ got_address + 8 - (plt_address + 16));
else
{
got_displacement = got_address - (plt_address + 16);
@@ -14018,7 +14406,7 @@
bfd_vma plt_address
= splt->output_section->vma + splt->output_offset;
- arm_put_trampoline (htab, output_bfd,
+ arm_put_trampoline (htab, output_bfd,
splt->contents + htab->dt_tlsdesc_plt,
dl_tlsdesc_lazy_trampoline, 6);
@@ -14035,13 +14423,13 @@
if (htab->tls_trampoline)
{
- arm_put_trampoline (htab, output_bfd,
+ 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
+#endif
}
if (htab->vxworks_p && !info->shared && htab->root.splt->size > 0)
@@ -14072,6 +14460,10 @@
}
}
+ if (htab->nacl_p && htab->root.iplt != NULL && htab->root.iplt->size > 0)
+ /* NaCl uses a special first entry in .iplt too. */
+ arm_nacl_put_plt0 (htab, output_bfd, htab->root.iplt, 0);
+
/* Fill in the first three entries in the global offset table. */
if (sgot)
{
@@ -14113,10 +14505,22 @@
if (globals != NULL && globals->byteswap_code)
i_ehdrp->e_flags |= EF_ARM_BE8;
}
+
+ if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5
+ && ((i_ehdrp->e_type == ET_DYN) || (i_ehdrp->e_type == ET_EXEC)))
+ {
+ int abi = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_ABI_VFP_args);
+ if (abi)
+ i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_HARD;
+ else
+ i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_SOFT;
+ }
}
static enum elf_reloc_type_class
-elf32_arm_reloc_type_class (const Elf_Internal_Rela *rela)
+elf32_arm_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
@@ -14208,7 +14612,7 @@
typedef struct
{
- void *finfo;
+ void *flaginfo;
struct bfd_link_info *info;
asection *sec;
int sec_shndx;
@@ -14243,7 +14647,7 @@
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;
+ return osi->func (osi->flaginfo, names[type], &sym, osi->sec, NULL) == 1;
}
/* Output mapping symbols for the PLT entry described by ROOT_PLT and ARM_PLT.
@@ -14297,6 +14701,11 @@
if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 20))
return FALSE;
}
+ else if (htab->nacl_p)
+ {
+ if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
+ return FALSE;
+ }
else
{
bfd_boolean thumb_stub_p;
@@ -14365,7 +14774,7 @@
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;
+ return osi->func (osi->flaginfo, name, &sym, osi->sec, NULL) == 1;
}
static bfd_boolean
@@ -14477,7 +14886,7 @@
static bfd_boolean
elf32_arm_output_arch_local_syms (bfd *output_bfd,
struct bfd_link_info *info,
- void *finfo,
+ void *flaginfo,
int (*func) (void *, const char *,
Elf_Internal_Sym *,
asection *,
@@ -14495,7 +14904,7 @@
check_use_blx (htab);
- osi.finfo = finfo;
+ osi.flaginfo = flaginfo;
osi.info = info;
osi.func = func;
@@ -14532,8 +14941,8 @@
/* ARM->Thumb glue. */
if (htab->arm_glue_size > 0)
{
- osi.sec = bfd_get_section_by_name (htab->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
+ osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
osi.sec_shndx = _bfd_elf_section_from_bfd_section
(output_bfd, osi.sec->output_section);
@@ -14555,8 +14964,8 @@
/* Thumb->ARM glue. */
if (htab->thumb_glue_size > 0)
{
- osi.sec = bfd_get_section_by_name (htab->bfd_of_glue_owner,
- THUMB2ARM_GLUE_SECTION_NAME);
+ osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
+ THUMB2ARM_GLUE_SECTION_NAME);
osi.sec_shndx = _bfd_elf_section_from_bfd_section
(output_bfd, osi.sec->output_section);
@@ -14572,8 +14981,8 @@
/* ARMv4 BX veneers. */
if (htab->bx_glue_size > 0)
{
- osi.sec = bfd_get_section_by_name (htab->bfd_of_glue_owner,
- ARM_BX_GLUE_SECTION_NAME);
+ osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
+ ARM_BX_GLUE_SECTION_NAME);
osi.sec_shndx = _bfd_elf_section_from_bfd_section
(output_bfd, osi.sec->output_section);
@@ -14623,6 +15032,11 @@
return FALSE;
}
}
+ else if (htab->nacl_p)
+ {
+ if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
+ return FALSE;
+ }
else if (!htab->symbian_p)
{
if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
@@ -14633,6 +15047,15 @@
#endif
}
}
+ if (htab->nacl_p && htab->root.iplt && htab->root.iplt->size > 0)
+ {
+ /* NaCl uses a special first entry in .iplt too. */
+ osi.sec = htab->root.iplt;
+ osi.sec_shndx = (_bfd_elf_section_from_bfd_section
+ (output_bfd, osi.sec->output_section));
+ if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0))
+ return FALSE;
+ }
if ((htab->root.splt && htab->root.splt->size > 0)
|| (htab->root.iplt && htab->root.iplt->size > 0))
{
@@ -14662,7 +15085,7 @@
/* 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;
@@ -14676,9 +15099,9 @@
if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA,
htab->tls_trampoline + 12))
return FALSE;
-#endif
+#endif
}
-
+
return TRUE;
}
@@ -14741,23 +15164,24 @@
{
unsigned long first_word = bfd_get_32 (output_bfd, from);
unsigned long second_word = bfd_get_32 (output_bfd, from + 4);
-
+
/* High bit of first word is supposed to be zero. */
if ((first_word & 0x80000000ul) == 0)
first_word = offset_prel31 (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 .ARM.extab entry. */
if ((second_word != 0x1) && ((second_word & 0x80000000ul) == 0))
second_word = offset_prel31 (second_word, offset);
-
+
bfd_put_32 (output_bfd, first_word, to);
bfd_put_32 (output_bfd, second_word, to + 4);
}
/* Data for make_branch_to_a8_stub(). */
-struct a8_branch_to_stub_data {
+struct a8_branch_to_stub_data
+{
asection *writing_section;
bfd_byte *contents;
};
@@ -14768,7 +15192,7 @@
static bfd_boolean
make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry,
- void *in_arg)
+ void *in_arg)
{
struct elf32_arm_stub_hash_entry *stub_entry;
struct a8_branch_to_stub_data *data;
@@ -14907,82 +15331,82 @@
unsigned int endianflip = bfd_big_endian (output_bfd) ? 3 : 0;
for (errnode = arm_data->erratumlist; errnode != 0;
- errnode = errnode->next)
- {
- bfd_vma target = errnode->vma - offset;
+ errnode = errnode->next)
+ {
+ bfd_vma target = errnode->vma - offset;
- switch (errnode->type)
- {
- case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
- {
- bfd_vma branch_to_veneer;
- /* Original condition code of instruction, plus bit mask for
- ARM B instruction. */
- unsigned int insn = (errnode->u.b.vfp_insn & 0xf0000000)
- | 0x0a000000;
+ switch (errnode->type)
+ {
+ case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
+ {
+ bfd_vma branch_to_veneer;
+ /* Original condition code of instruction, plus bit mask for
+ ARM B instruction. */
+ unsigned int insn = (errnode->u.b.vfp_insn & 0xf0000000)
+ | 0x0a000000;
/* The instruction is before the label. */
target -= 4;
/* Above offset included in -4 below. */
branch_to_veneer = errnode->u.b.veneer->vma
- - errnode->vma - 4;
+ - errnode->vma - 4;
if ((signed) branch_to_veneer < -(1 << 25)
|| (signed) branch_to_veneer >= (1 << 25))
(*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
"range"), output_bfd);
- insn |= (branch_to_veneer >> 2) & 0xffffff;
- contents[endianflip ^ target] = insn & 0xff;
- contents[endianflip ^ (target + 1)] = (insn >> 8) & 0xff;
- contents[endianflip ^ (target + 2)] = (insn >> 16) & 0xff;
- contents[endianflip ^ (target + 3)] = (insn >> 24) & 0xff;
- }
- break;
+ insn |= (branch_to_veneer >> 2) & 0xffffff;
+ contents[endianflip ^ target] = insn & 0xff;
+ contents[endianflip ^ (target + 1)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (target + 2)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (target + 3)] = (insn >> 24) & 0xff;
+ }
+ break;
case VFP11_ERRATUM_ARM_VENEER:
- {
- bfd_vma branch_from_veneer;
- unsigned int insn;
+ {
+ bfd_vma branch_from_veneer;
+ unsigned int insn;
- /* Take size of veneer into account. */
- branch_from_veneer = errnode->u.v.branch->vma
- - errnode->vma - 12;
+ /* Take size of veneer into account. */
+ branch_from_veneer = errnode->u.v.branch->vma
+ - errnode->vma - 12;
if ((signed) branch_from_veneer < -(1 << 25)
|| (signed) branch_from_veneer >= (1 << 25))
(*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
"range"), output_bfd);
- /* Original instruction. */
- insn = errnode->u.v.branch->u.b.vfp_insn;
- contents[endianflip ^ target] = insn & 0xff;
- contents[endianflip ^ (target + 1)] = (insn >> 8) & 0xff;
- contents[endianflip ^ (target + 2)] = (insn >> 16) & 0xff;
- contents[endianflip ^ (target + 3)] = (insn >> 24) & 0xff;
+ /* Original instruction. */
+ insn = errnode->u.v.branch->u.b.vfp_insn;
+ contents[endianflip ^ target] = insn & 0xff;
+ contents[endianflip ^ (target + 1)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (target + 2)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (target + 3)] = (insn >> 24) & 0xff;
- /* Branch back to insn after original insn. */
- insn = 0xea000000 | ((branch_from_veneer >> 2) & 0xffffff);
- contents[endianflip ^ (target + 4)] = insn & 0xff;
- contents[endianflip ^ (target + 5)] = (insn >> 8) & 0xff;
- contents[endianflip ^ (target + 6)] = (insn >> 16) & 0xff;
- contents[endianflip ^ (target + 7)] = (insn >> 24) & 0xff;
- }
- break;
+ /* Branch back to insn after original insn. */
+ insn = 0xea000000 | ((branch_from_veneer >> 2) & 0xffffff);
+ contents[endianflip ^ (target + 4)] = insn & 0xff;
+ contents[endianflip ^ (target + 5)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (target + 6)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (target + 7)] = (insn >> 24) & 0xff;
+ }
+ break;
- default:
- abort ();
- }
- }
+ default:
+ abort ();
+ }
+ }
}
if (arm_data->elf.this_hdr.sh_type == SHT_ARM_EXIDX)
{
arm_unwind_table_edit *edit_node
- = arm_data->u.exidx.unwind_edit_list;
+ = arm_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
+ 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);
@@ -14991,13 +15415,13 @@
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)
- {
+ {
copy_exidx_entry (output_bfd, edited_contents + out_index * 8,
contents + in_index * 8, add_to_offsets);
out_index++;
@@ -15006,22 +15430,22 @@
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;
+ 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;
+ unsigned long prel31_offset;
/* Note: this is meant to be equivalent to an
R_ARM_PREL31 relocation. These synthetic
@@ -15043,7 +15467,7 @@
}
break;
}
-
+
edit_node = edit_node->next;
}
}
@@ -15086,45 +15510,45 @@
ptr = map[0].vma;
for (i = 0; i < mapcount; i++)
- {
- if (i == mapcount - 1)
+ {
+ if (i == mapcount - 1)
end = sec->size;
- else
- end = map[i + 1].vma;
+ else
+ end = map[i + 1].vma;
- switch (map[i].type)
+ switch (map[i].type)
{
case 'a':
/* Byte swap code words. */
while (ptr + 3 < end)
- {
- tmp = contents[ptr];
- contents[ptr] = contents[ptr + 3];
- contents[ptr + 3] = tmp;
- tmp = contents[ptr + 1];
- contents[ptr + 1] = contents[ptr + 2];
- contents[ptr + 2] = tmp;
- ptr += 4;
- }
+ {
+ tmp = contents[ptr];
+ contents[ptr] = contents[ptr + 3];
+ contents[ptr + 3] = tmp;
+ tmp = contents[ptr + 1];
+ contents[ptr + 1] = contents[ptr + 2];
+ contents[ptr + 2] = tmp;
+ ptr += 4;
+ }
break;
case 't':
/* Byte swap code halfwords. */
while (ptr + 1 < end)
- {
- tmp = contents[ptr];
- contents[ptr] = contents[ptr + 1];
- contents[ptr + 1] = tmp;
- ptr += 2;
- }
+ {
+ tmp = contents[ptr];
+ contents[ptr] = contents[ptr + 1];
+ contents[ptr + 1] = tmp;
+ ptr += 2;
+ }
break;
case 'd':
/* Leave data alone. */
break;
}
- ptr = end;
- }
+ ptr = end;
+ }
}
free (map);
@@ -15193,17 +15617,17 @@
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
- linker will simulate the work of dynamic linker of resolving
- symbols and will carry over the thumbness of found symbols to
- the output symbol table. It's not clear how it happens, but
- the thumbness of undefined symbols can well be different at
- runtime, and writing '1' for them will be confusing for users
- and possibly for dynamic linker itself.
- */
- newsym.st_value |= 1;
- }
+ {
+ /* Do this only for defined symbols. At link type, the static
+ linker will simulate the work of dynamic linker of resolving
+ symbols and will carry over the thumbness of found symbols to
+ the output symbol table. It's not clear how it happens, but
+ the thumbness of undefined symbols can well be different at
+ runtime, and writing '1' for them will be confusing for users
+ and possibly for dynamic linker itself.
+ */
+ newsym.st_value |= 1;
+ }
src = &newsym;
}
@@ -15225,21 +15649,21 @@
/* If there is already a PT_ARM_EXIDX header, then we do not
want to add another one. This situation arises when running
"strip"; the input binary already has the header. */
- m = elf_tdata (abfd)->segment_map;
+ m = elf_seg_map (abfd);
while (m && m->p_type != PT_ARM_EXIDX)
m = m->next;
if (!m)
{
m = (struct elf_segment_map *)
- bfd_zalloc (abfd, sizeof (struct elf_segment_map));
+ bfd_zalloc (abfd, sizeof (struct elf_segment_map));
if (m == NULL)
return FALSE;
m->p_type = PT_ARM_EXIDX;
m->count = 1;
m->sections[0] = sec;
- m->next = elf_tdata (abfd)->segment_map;
- elf_tdata (abfd)->segment_map = m;
+ m->next = elf_seg_map (abfd);
+ elf_seg_map (abfd) = m;
}
}
@@ -15333,7 +15757,7 @@
#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
#define bfd_elf32_bfd_link_hash_table_free elf32_arm_hash_table_free
#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
-#define bfd_elf32_bfd_reloc_name_lookup elf32_arm_reloc_name_lookup
+#define bfd_elf32_bfd_reloc_name_lookup elf32_arm_reloc_name_lookup
#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
#define bfd_elf32_find_inliner_info elf32_arm_find_inliner_info
#define bfd_elf32_new_section_hook elf32_arm_new_section_hook
@@ -15387,11 +15811,98 @@
#define elf_backend_obj_attrs_arg_type elf32_arm_obj_attrs_arg_type
#undef elf_backend_obj_attrs_section_type
#define elf_backend_obj_attrs_section_type SHT_ARM_ATTRIBUTES
-#define elf_backend_obj_attrs_order elf32_arm_obj_attrs_order
-#define elf_backend_obj_attrs_handle_unknown elf32_arm_obj_attrs_handle_unknown
+#define elf_backend_obj_attrs_order elf32_arm_obj_attrs_order
+#define elf_backend_obj_attrs_handle_unknown elf32_arm_obj_attrs_handle_unknown
#include "elf32-target.h"
+/* Native Client targets. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_nacl_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-littlearm-nacl"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarm_nacl_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-bigarm-nacl"
+
+/* Like elf32_arm_link_hash_table_create -- but overrides
+ appropriately for NaCl. */
+
+static struct bfd_link_hash_table *
+elf32_arm_nacl_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = elf32_arm_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct elf32_arm_link_hash_table *htab
+ = (struct elf32_arm_link_hash_table *) ret;
+
+ htab->nacl_p = 1;
+
+ htab->plt_header_size = 4 * ARRAY_SIZE (elf32_arm_nacl_plt0_entry);
+ htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_arm_nacl_plt_entry);
+ }
+ return ret;
+}
+
+/* Since NaCl doesn't use the ARM-specific unwind format, we don't
+ really need to use elf32_arm_modify_segment_map. But we do it
+ anyway just to reduce gratuitous differences with the stock ARM backend. */
+
+static bfd_boolean
+elf32_arm_nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
+{
+ return (elf32_arm_modify_segment_map (abfd, info)
+ && nacl_modify_segment_map (abfd, info));
+}
+
+static void
+elf32_arm_nacl_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ elf32_arm_final_write_processing (abfd, linker);
+ nacl_final_write_processing (abfd, linker);
+}
+
+
+#undef elf32_bed
+#define elf32_bed elf32_arm_nacl_bed
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_arm_nacl_link_hash_table_create
+#undef elf_backend_plt_alignment
+#define elf_backend_plt_alignment 4
+#undef elf_backend_modify_segment_map
+#define elf_backend_modify_segment_map elf32_arm_nacl_modify_segment_map
+#undef elf_backend_modify_program_headers
+#define elf_backend_modify_program_headers nacl_modify_program_headers
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing elf32_arm_nacl_final_write_processing
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+#undef ELF_MINPAGESIZE
+#undef ELF_COMMONPAGESIZE
+
+
+#include "elf32-target.h"
+
+/* Reset to defaults. */
+#undef elf_backend_plt_alignment
+#undef elf_backend_modify_segment_map
+#define elf_backend_modify_segment_map elf32_arm_modify_segment_map
+#undef elf_backend_modify_program_headers
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing elf32_arm_final_write_processing
+#undef ELF_MINPAGESIZE
+#define ELF_MINPAGESIZE 0x1000
+#undef ELF_COMMONPAGESIZE
+#define ELF_COMMONPAGESIZE 0x1000
+
+
/* VxWorks Targets. */
#undef TARGET_LITTLE_SYM
@@ -15501,8 +16012,8 @@
flags then do not bother setting the flags for the output
architecture, instead allow future merges to do this. If no
future merges ever set these flags then they will retain their
- uninitialised values, which surprise surprise, correspond
- to the default values. */
+ uninitialised values, which surprise surprise, correspond
+ to the default values. */
if (bfd_get_arch_info (ibfd)->the_default
&& elf_elfheader (ibfd)->e_flags == 0)
return TRUE;
@@ -15550,7 +16061,7 @@
if ((bfd_get_section_flags (ibfd, sec)
& (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
== (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
- only_data_sections = FALSE;
+ only_data_sections = FALSE;
null_input_bfd = FALSE;
break;
@@ -15765,15 +16276,15 @@
dynsec = bfd_get_section_by_name (abfd, ".dynamic");
if (dynsec)
{
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
if (m->p_type == PT_DYNAMIC)
break;
if (m == NULL)
{
m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
- m->next = elf_tdata (abfd)->segment_map;
- elf_tdata (abfd)->segment_map = m;
+ m->next = elf_seg_map (abfd);
+ elf_seg_map (abfd) = m;
}
}
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 6d20aef..43100cd 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1,6 +1,5 @@
/* AVR-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011 Free Software Foundation, Inc.
+ Copyright 1999-2013 Free Software Foundation, Inc.
Contributed by Denis Chertykov <[email protected]>
This file is part of BFD, the Binary File Descriptor library.
@@ -516,6 +515,48 @@
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* lo8-part to use in .byte lo8(sym). */
+ HOWTO (R_AVR_8_LO8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_AVR_8_LO8", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ /* hi8-part to use in .byte hi8(sym). */
+ HOWTO (R_AVR_8_HI8, /* type */
+ 8, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_AVR_8_HI8", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ /* hlo8-part to use in .byte hlo8(sym). */
+ HOWTO (R_AVR_8_HLO8, /* type */
+ 16, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_AVR_8_HLO8", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* Map BFD reloc types to AVR ELF reloc types. */
@@ -554,7 +595,10 @@
{ BFD_RELOC_AVR_LDI, R_AVR_LDI },
{ BFD_RELOC_AVR_6, R_AVR_6 },
{ BFD_RELOC_AVR_6_ADIW, R_AVR_6_ADIW },
- { BFD_RELOC_8, R_AVR_8 }
+ { BFD_RELOC_8, R_AVR_8 },
+ { BFD_RELOC_AVR_8_LO, R_AVR_8_LO8 },
+ { BFD_RELOC_AVR_8_HI, R_AVR_8_HI8 },
+ { BFD_RELOC_AVR_8_HLO, R_AVR_8_HLO8 }
};
/* Meant to be filled one day with the wrap around address for the
@@ -626,7 +670,7 @@
struct elf32_avr_link_hash_table *htab;
bfd_size_type amt = sizeof (*htab);
- htab = bfd_malloc (amt);
+ htab = bfd_zmalloc (amt);
if (htab == NULL)
return NULL;
@@ -644,15 +688,6 @@
sizeof (struct elf32_avr_stub_hash_entry)))
return NULL;
- htab->stub_bfd = NULL;
- htab->stub_sec = NULL;
-
- /* Initialize the address mapping table. */
- htab->amt_stub_offsets = NULL;
- htab->amt_destination_addr = NULL;
- htab->amt_entry_cnt = 0;
- htab->amt_max_entry_cnt = 0;
-
return &htab->etab.root;
}
@@ -671,7 +706,7 @@
free (htab->amt_destination_addr);
bfd_hash_table_free (&htab->bstab);
- _bfd_generic_link_hash_table_free (btab);
+ _bfd_elf_link_hash_table_free (btab);
}
/* Calculates the effective distance of a pc relative jump/call. */
@@ -1189,9 +1224,9 @@
name = h->root.root.string;
}
- if (sec != NULL && elf_discarded_section (sec))
+ if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ rel, 1, relend, howto, 0, contents);
if (info->relocatable)
continue;
@@ -1503,11 +1538,18 @@
bfd_vma symval;
bfd_vma shrinked_insn_address;
+ if (isec->reloc_count == 0)
+ continue;
+
shrinked_insn_address = (sec->output_section->vma
+ sec->output_offset + addr - count);
- irelend = elf_section_data (isec)->relocs + isec->reloc_count;
- for (irel = elf_section_data (isec)->relocs;
+ irel = elf_section_data (isec)->relocs;
+ /* PR 12161: Read in the relocs for this section if necessary. */
+ if (irel == NULL)
+ irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
+
+ for (irelend = irel + isec->reloc_count;
irel < irelend;
irel++)
{
@@ -1649,6 +1691,16 @@
Elf_Internal_Sym *isymbuf = NULL;
struct elf32_avr_link_hash_table *htab;
+ /* If 'shrinkable' is FALSE, do not shrink by deleting bytes while
+ relaxing. Such shrinking can cause issues for the sections such
+ as .vectors and .jumptables. Instead the unused bytes should be
+ filled with nop instructions. */
+ bfd_boolean shrinkable = TRUE;
+
+ if (!strcmp (sec->name,".vectors")
+ || !strcmp (sec->name,".jumptables"))
+ shrinkable = FALSE;
+
if (link_info->relocatable)
(*link_info->callbacks->einfo)
(_("%P%F: --relax and -r may not be used together\n"));
@@ -1805,10 +1857,16 @@
/* Compute the distance from this insn to the branch target. */
gap = value - dot;
- /* If the distance is within -4094..+4098 inclusive, then we can
- relax this jump/call. +4098 because the call/jump target
- will be closer after the relaxation. */
- if ((int) gap >= -4094 && (int) gap <= 4098)
+ /* Check if the gap falls in the range that can be accommodated
+ in 13bits signed (It is 12bits when encoded, as we deal with
+ word addressing). */
+ if (!shrinkable && ((int) gap >= -4096 && (int) gap <= 4095))
+ distance_short_enough = 1;
+ /* If shrinkable, then we can check for a range of distance which
+ is two bytes farther on both the directions because the call
+ or jump target will be closer by two bytes after the
+ relaxation. */
+ else if (shrinkable && ((int) gap >= -4094 && (int) gap <= 4097))
distance_short_enough = 1;
/* Here we handle the wrap-around case. E.g. for a 16k device
@@ -1882,11 +1940,9 @@
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_AVR_13_PCREL);
- /* Check for the vector section. There we don't want to
- modify the ordering! */
-
- if (!strcmp (sec->name,".vectors")
- || !strcmp (sec->name,".jumptables"))
+ /* We should not modify the ordering if 'shrinkable' is
+ FALSE. */
+ if (!shrinkable)
{
/* Let's insert a nop. */
bfd_put_8 (abfd, 0x00, contents + irel->r_offset + 2);
@@ -2080,6 +2136,7 @@
irel->r_offset + insn_size;
Elf_Internal_Sym *isym, *isymend;
unsigned int sec_shndx;
+ struct bfd_section *isec;
sec_shndx =
_bfd_elf_section_from_bfd_section (abfd, sec);
@@ -2130,80 +2187,85 @@
}
}
}
+
/* Now we check for relocations pointing to ret. */
- {
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
+ for (isec = abfd->sections; isec && deleting_ret_is_safe; isec = isec->next)
+ {
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+
+ rel = elf_section_data (isec)->relocs;
+ if (rel == NULL)
+ rel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
- relend = elf_section_data (sec)->relocs
- + sec->reloc_count;
+ relend = rel + isec->reloc_count;
- for (rel = elf_section_data (sec)->relocs;
- rel < relend; rel++)
- {
- bfd_vma reloc_target = 0;
+ for (; rel && rel < relend; rel++)
+ {
+ bfd_vma reloc_target = 0;
- /* Read this BFD's local symbols if we haven't
- done so already. */
- if (isymbuf == NULL && symtab_hdr->sh_info != 0)
- {
- isymbuf = (Elf_Internal_Sym *)
- symtab_hdr->contents;
- if (isymbuf == NULL)
- isymbuf = bfd_elf_get_elf_syms
- (abfd,
- symtab_hdr,
- symtab_hdr->sh_info, 0,
- NULL, NULL, NULL);
- if (isymbuf == NULL)
+ /* Read this BFD's local symbols if we haven't
+ done so already. */
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *)
+ symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms
+ (abfd,
+ symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ break;
+ }
+
+ /* Get the value of the symbol referred to
+ by the reloc. */
+ if (ELF32_R_SYM (rel->r_info)
+ < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ asection *sym_sec;
+
+ isym = isymbuf
+ + ELF32_R_SYM (rel->r_info);
+ sym_sec = bfd_section_from_elf_index
+ (abfd, isym->st_shndx);
+ symval = isym->st_value;
+
+ /* If the reloc is absolute, it will not
+ have a symbol or section associated
+ with it. */
+
+ if (sym_sec)
+ {
+ symval +=
+ sym_sec->output_section->vma
+ + sym_sec->output_offset;
+ reloc_target = symval + rel->r_addend;
+ }
+ else
+ {
+ reloc_target = symval + rel->r_addend;
+ /* Reference symbol is absolute. */
+ }
+ }
+ /* else ... reference symbol is extern. */
+
+ if (address_of_ret == reloc_target)
+ {
+ deleting_ret_is_safe = 0;
+ if (debug_relax)
+ printf ("ret from "
+ "rjmp/jmp ret sequence at address"
+ " 0x%x could not be deleted. ret"
+ " is target of a relocation.\n",
+ (int) address_of_ret);
break;
- }
-
- /* Get the value of the symbol referred to
- by the reloc. */
- if (ELF32_R_SYM (rel->r_info)
- < symtab_hdr->sh_info)
- {
- /* A local symbol. */
- asection *sym_sec;
-
- isym = isymbuf
- + ELF32_R_SYM (rel->r_info);
- sym_sec = bfd_section_from_elf_index
- (abfd, isym->st_shndx);
- symval = isym->st_value;
-
- /* If the reloc is absolute, it will not
- have a symbol or section associated
- with it. */
-
- if (sym_sec)
- {
- symval +=
- sym_sec->output_section->vma
- + sym_sec->output_offset;
- reloc_target = symval + rel->r_addend;
- }
- else
- {
- reloc_target = symval + rel->r_addend;
- /* Reference symbol is absolute. */
- }
- }
- /* else ... reference symbol is extern. */
-
- if (address_of_ret == reloc_target)
- {
- deleting_ret_is_safe = 0;
- if (debug_relax)
- printf ("ret from "
- "rjmp/jmp ret sequence at address"
- " 0x%x could not be deleted. ret"
- " is target of a relocation.\n",
- (int) address_of_ret);
- }
- }
- }
+ }
+ }
+ }
if (deleting_ret_is_safe)
{
@@ -2224,7 +2286,6 @@
break;
}
}
-
}
}
break;
diff --git a/bfd/elf32-avr.h