--- binutils-2.20.orig/debian/binutils-gold.overrides +++ binutils-2.20/debian/binutils-gold.overrides @@ -0,0 +1,5 @@ +# don't warn about missing man pages for diverted binaries +binutils-gold binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-multiarch binary: package-name-doesnt-match-sonames --- binutils-2.20.orig/debian/changelog +++ binutils-2.20/debian/changelog @@ -0,0 +1,2849 @@ +binutils (2.20-3) unstable; urgency=low + + * Apply updates from the 2.20 branch up to 20091108: + - Fix PR gold/10876 (closes: #553435), PR gold/10910, PR gold/10860, + PR gold/10880 (closes: #553512, #553436), PR gold/10887, + PR gold/10893, PR gold/10895 (thanks to Peter Fritzsche for tracking + the gold reports). + * Fix libiberty build failure on sh4 (Nobuhiro Iwamatsu). Closes: #550810. + * PR ld/10858: Fix pie on mips/mipsel. Closes: #526961. + * Ignore regressions on sparc; the proper fix is to fix the testcases + for v9. + * Remove the conflict between binutils-multiarch and binutils-gold. + Closes: #521106. + + -- Matthias Klose Tue, 10 Nov 2009 02:15:41 +0100 + +binutils (2.20-2) unstable; urgency=high + + * Apply updates from the 2.20 branch up to 20091028: + - Fix PR binutils/10802, PR binutils/10793, PR binutils/10792, + PR gas/10856. + - Remove local patches now in the branch. + * Ignore regressions on armel when building with gcc-4.4; the proper fix + is to build the testcases using -fno-section-anchors. + + -- Matthias Klose Thu, 29 Oct 2009 22:17:42 +0100 + +binutils (2.20-1) unstable; urgency=low + + * binutils 2.20 final release. + - Fix PR binutils/10785, memory corruptions. + - PR ld/10749, ia64 linker failure. + - PR gas/2117, ia64 assembler fix. + - gold updates. + * Configure with --enable-plugins. Closes: #550088. + * debian/test-suite-compare.py: Don't count untested test cases as + regressions. + * binutils-gold: Install /usr/lib/compat-ld/ld to point to the + old linker. To use the old linker when gold is installed, use + gcc -B/usr/lib/compat-ld/ (including the trailing slash). + + -- Matthias Klose Sat, 17 Oct 2009 12:22:30 +0200 + +binutils (2.19.91.20091006-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091006. + - cfi_sections changes applied. + * debian/*.shlibs: Update to the version from the branch. + * binutils-gold: Build the testsuite as part of the check target + instead of the build target to avoid build failures when the + installed binutils soname is the same as the one which is built + (gas is segfaulting). Just a workaround, not a solution. + * Add 150_gold_copyrelocs.dpatch, add -z copyrelocs option for gold. + * binutils-source: Depend on texinfo, zlib1g-dev. + + -- Matthias Klose Tue, 06 Oct 2009 22:13:24 +0200 + +binutils (2.19.91.20091003-1) unstable; urgency=medium + + * Snapshot, taken from the 2.20 release branch 20091003. + - Fix PR ld/9863, regression in testsuite on armel. + - Fix regressions seen in the GCC/libjava testsuite. + * debian/*.shlibs: Update to the version from the branch. + * No need to build libiberty_pic.a twice. + + -- Matthias Klose Sat, 03 Oct 2009 14:59:14 +0200 + +binutils (2.19.91.20090927-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090927. + * debian/*.shlibs: Update to the version from the branch. + * On mips/mipsel disabled -pie/--pie-executable. Still broken, + see #526961. Add an option --force-pie on mips/mipsel only + for testing purposes. + Change requested by debian-release (Andreas Barth). + + -- Matthias Klose Sun, 27 Sep 2009 11:56:06 +0200 + +binutils (2.19.91.20090923-1) unstable; urgency=medium + + * Snapshot, taken from the 2.20 release branch 20090923 (last upload + was taken from the trunk).. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Wed, 23 Sep 2009 09:50:04 +0200 + +binutils (2.19.91.20090922-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090922. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Tue, 22 Sep 2009 19:36:50 +0200 + +binutils (2.19.91.20090910-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090910, corresponding + to the 2.19.90 upstream snapshot. + * Fix Thumb-2 shared libraries (Daniel Jacobowitz), patch taken + from the trunk. + + -- Matthias Klose Thu, 10 Sep 2009 17:05:30 +0200 + +binutils (2.19.90.20090909-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090909. + * debian/*.shlibs: Update to the version from the branch. + * Disable build failure for regressions on mips/mipsel. + + -- Matthias Klose Wed, 09 Sep 2009 09:50:36 +0200 + +binutils (2.19.51.20090827-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090827. + - Fix PR ld/10518: In linker scripts override a "*" match by any other + wildcard match. Closes: #540751. + * debian/*.shlibs: Update to the version from the trunk. Closes: #540800. + * Add sysroot support for cross builds (Hector Oron). Closes: #522480. + * Update long description of binutils-doc. Closes: #428764. + * Tighten build dependency on autoconf. + * Fix some lintian warnings. + + -- Matthias Klose Thu, 27 Aug 2009 17:09:28 +0200 + +binutils (2.19.51.20090805-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090805. + - Fix PR binutils/10364, strip not failing on unwritable files. + Closes: #276428. + - Fix PR binutils/10363, objdump -T crashing on corrupted file. + Closes: #487963. + * 129_cortex_a8.dpatch: Fix a couple of cortex-a8 erratum bugs. + + -- Matthias Klose Wed, 05 Aug 2009 10:24:40 +0200 + +binutils (2.19.51.20090723-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090723. + * debian/*.shlibs: Update to the version from the trunk. + * Undo the reversion in the last upload, use the upstream fix instead. + + -- Matthias Klose Thu, 23 Jul 2009 09:39:50 +0200 + +binutils (2.19.51.20090722-2) unstable; urgency=low + + * Apply build-id patch to avoid memory corruption (taken from Fedora). + * Revert ld/ldlang.c rev 1.312. Closes: #537389. + + -- Matthias Klose Wed, 22 Jul 2009 19:19:30 +0200 + +binutils (2.19.51.20090722-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090722. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Wed, 22 Jul 2009 16:51:11 +0200 + +binutils (2.19.51.20090714-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090714. + * debian/*.shlibs: Update to the version from the trunk. + * Install a libiberty compiled with -fPIC as libiberty_pic.a. + Closes: #530888. + * Remove obsolete README.Debian. Closes: #324260. + * binutils-dev: Include demangle.h. Closes: #134985. + + -- Matthias Klose Tue, 14 Jul 2009 13:13:37 -0400 + +binutils (2.19.51.20090704-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090704. + - debian/patches/128_arm_eabi_auto_it.dpatch: Remove, applied upstream. + * debian/*.shlibs: Update to the version from the trunk. + * Bump standards version. + + -- Matthias Klose Sat, 04 Jul 2009 10:37:18 +0200 + +binutils (2.19.51.20090613-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090613. + * debian/*.shlibs: Update to the version from the trunk. + * Build binutils-gold on armel. + * Apply proposed patch for new option for automatically generating IT blocks. + + -- Matthias Klose Sat, 13 Jun 2009 14:39:41 +0000 + +binutils (2.19.51.20090508-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090508. + - Fix PR binutils/9743, relocation issues on arm. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 08 May 2009 11:08:14 +0200 + +binutils (2.19.51.20090419-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090419. + * debian/*.shlibs: Update to the version from the trunk. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Update. + + -- Matthias Klose Sun, 19 Apr 2009 22:12:19 +0200 + +binutils (2.19.51.20090315-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090315. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Sun, 15 Mar 2009 11:38:58 +0100 + +binutils (2.19.1-1) unstable; urgency=low + + * Upload to unstable. + * binutils-source: Make .dpatch files executable. + + -- Matthias Klose Sun, 15 Feb 2009 22:46:34 +0100 + +binutils (2.19.1-1~exp1) experimental; urgency=low + + * Binutils 2.19.1 release. + * debian/*.shlibs: Update to the release version. + + -- Matthias Klose Wed, 04 Feb 2009 09:57:55 +0100 + +binutils (2.19.0.20090110-1~exp1) experimental; urgency=low + + * Update to the binutils-2_19-branch 20090110. + - Fix PR binutils/7011. LP: #254790. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Sat, 10 Jan 2009 13:56:09 +0100 + +binutils (2.19-1~exp2) experimental; urgency=low + + * debian/patches/129_scale-DW_CFA_advance_loc.dpatch: Scale + DW_CFA_advance_loc[124] output values. + * debian/patches/128_arm_relocs_against_weak.dpatch: Fix R_ARM_THM_CALL + relocations against undefined weak symbols in shared libraries. + + -- Matthias Klose Sun, 30 Nov 2008 13:22:11 +0100 + +binutils (2.19-1~exp1) experimental; urgency=low + + * Binutils 2.19 release. + * debian/*.shlibs: Update to the release version. + * Build binutils-gold on powerpc. + * debian/control: Update to GPL3, reference the GFDL. + * Fail the build if the testsuite shows regressions compared to the + last (installed) build. + * Make lintian more happy. + + -- Matthias Klose Sun, 26 Oct 2008 13:06:27 +0200 + +binutils (2.18.93.20081009-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20081009 (corresponding to the + 2.18.93 upstream snapshot. + * debian/*.shlibs: Update to the version from the branch. + * Add build dependency on zlib1g-dev. + * In gprof(1), remove references to monitor(3) and profil(2). + Closes: #293948. + + -- Matthias Klose Sat, 11 Oct 2008 16:45:35 +0000 + +binutils (2.18.92.20081003-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20081003. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 03 Oct 2008 11:29:16 +0000 + +binutils (2.18.90.20080910-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20080910. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 12 Sep 2008 19:23:07 +0200 + +binutils (2.18.50.20080803-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080803. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Mon, 04 Aug 2008 00:53:47 +0200 + +binutils (2.18.50.20080707-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080707. + * debian/*.shlibs: Update to the version from the trunk. + * include/safe-ctype.h: Add #include of ctype.h before redefining + the ctype.h macros (proposed for the trunk). + * Add Daniel Jacobowitz as uploader. + + -- Matthias Klose Mon, 07 Jul 2008 01:08:13 +0200 + +binutils (2.18.50.20080610-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080610. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 10 Jun 2008 16:21:02 +0200 + +binutils (2.18.50.20080530-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080530. + * Switch maintainer and uploader. + * debian/rules: Explicitely set SHELL to /bin/bash, build-depend on bash. + * debian/rules: Fix setting of TARGET for cross builds. + + -- Matthias Klose Fri, 30 May 2008 23:49:40 +0200 + +binutils (2.18.50.20080507-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080507. + * Remove patches applied upstream: 304_pr4476.dpatch, 305_arm-dis.dpatch, + 306_pr4453.dpatch, 307_ld-pic.dpatch, 308_mips-pic.dpatch. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Use bash in the ld + testsuite (some tests have bashisms). + * debian/*.shlibs: Update to the version from the trunk. + * On amd64, i386 and sparc, build a binutils-gold package, + diverting /usr/bin/ld. + * Use expect instead of expect-tcl8.3 on all architectures except hppa. + * Remove binutils and gcc build dependencies (versions are in oldstable). + + -- Matthias Klose Thu, 08 May 2008 00:56:30 +0200 + +binutils (2.18.1~cvs20080103-4) unstable; urgency=medium + + * debian/rules: Remove libiberty in /usr/lib64; workaround for + `gcc -print-multi-os-directory' printing the symlink. + Closes: #473665, #473591. + * Don't include development files in binutils-spu. + * Fix binutils-spu build on ppc64 (Andreas Jochens). Closes: #474116. + * Build libiberty with -fPIC on mips/mipsel (Aurelian Jarno). + + -- Matthias Klose Sat, 05 Apr 2008 11:21:08 +0200 + +binutils (2.18.1~cvs20080103-3) unstable; urgency=low + + [ Arthur Loiret ] + * Build a binutils for spu-elf target on powerpc and ppc64. + - debian/control: Add a binutils-spu package. + - debian/binutils-spu.{postinst,postrm,shlibs}: Add. + * Add sh64-linux-gnu to multiarch targets. + * Fix cross-compilation support. + * Make lintian happier: + - Use ${source:Version}, ${binary:Version} variables. + - Remove -1 from Build-Depends revisions. + - Bump Standards-Version to 3.7.3. + + [ Matthias Klose ] + * Keep the spu elfscripts in bintutils, remove them from binutils-spu. + * debian/patches/307_ld-pic.dpatch: Fix failing ld-shared tests when built + with gcc-4.3. + + -- Matthias Klose Sat, 29 Mar 2008 20:32:35 +0100 + +binutils (2.18.1~cvs20080103-2) unstable; urgency=low + + * debian/patches/306_pr4453.dpatch: Fix PR binutils/4453, taken from + the trunk (Aurelian Jarno). Closes: #363423. + + -- Matthias Klose Fri, 21 Mar 2008 20:49:17 +0100 + +binutils (2.18.1~cvs20080103-1) unstable; urgency=low + + * Update to 20080103 from the binutils-2_18-branch. + - Set version number to 2.18.0 (smaller than the one from the trunk). + - Fix PR ld/5398. Closes: #452725. + * debian/*.shlibs: Update to version from the branch. + * debian/patches/305_arm-dis.dpatch: Fix segfault when disassembling ARM + code. Closes: #438956. + * Support kfreebsd-amd64-gnu and i486-kfreebsd-gnu (Aurilian Jarno): + - debian/patches/127_x86_64_i386_biarch.dpatch: Extend for kfreebsd. + - debian/rules: biarch enabled binutils for kfreebsd-{amd64,i486}-gnu, + kfreebsd-{amd64,i486}-gnu support for cross-builds, + kfreebsd-{amd64,i486}-gnu enabled for binutils-multiarch. + - Closes: #380373. + + -- Matthias Klose Thu, 03 Jan 2008 21:57:51 +0100 + +binutils (2.18.1~cvs20071027-2) unstable; urgency=low + + * Do not include static libraries in the multiarch package. + * Don't include /usr/lib64 in cross packages. Closes: #450429. + + -- Matthias Klose Sat, 24 Nov 2007 12:13:22 +0100 + +binutils (2.18.1~cvs20071027-1) unstable; urgency=low + + * Update to 20071027 from the binutils-2_18-branch. + - Fix PR ld/4988, assertion failures in ld. Closes: #440015. + * debian/*.shlibs: Update to version from the branch. + + -- Matthias Klose Sat, 27 Oct 2007 17:55:41 +0200 + +binutils (2.18-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream release. + - Remove patches applied upstream: 100_warning_arm, 400_gcc42_fix, + 401_builddoc. + * debian/*.shlibs: Update to release version. + + -- Matthias Klose Wed, 29 Aug 2007 01:07:31 +0200 + +binutils (2.18~cvs20070812-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot, taken from the binutils-2_18-branch. + * debian/rules: Support parallel= with comma separated keywords + in DEB_BUILD_OPTIONS. + * debian/rules (clean): Remove stamp files. + * debian/*.shlibs: Update to snapshot version. + * debian/patches/401_builddoc.dpatch: Fix doc build failure on the branch. + + -- Matthias Klose Sun, 12 Aug 2007 10:56:18 +0200 + +binutils (2.17cvs20070804-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - PR binutils/4888, fixes objcopy --only-keep-debug. Closes: #435444. + * debian/rules: Support parallel= in DEB_BUILD_OPTIONS (see #209008). + * debian/*.shlibs: Update to snapshot version. + + -- Matthias Klose Sat, 04 Aug 2007 12:45:07 +0200 + +binutils (2.17cvs20070801-1) unstable; urgency=medium + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Fixes objcopy --only-keep-debug on amd64. Closes: #435444. + * binutils-multiarch: Enable the armel-linux-gnu target. Closes: #408805. + + -- Matthias Klose Wed, 01 Aug 2007 18:24:51 +0200 + +binutils (2.17cvs20070718-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Fix build failure on m68k. + * debian/patches/400_gcc42_fix.dpatch: Fix build failure with gcc-4.2. + Closes: #433062. + * Fix cross build failure while stripping binaries. Closes: #432907. + + -- Matthias Klose Wed, 18 Jul 2007 20:25:03 +0200 + +binutils (2.17cvs20070713-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Remove patches applied upstream: 301_pr4436.dpatch, 302_pr4448.dpatch, + 303_pr4454.dpatch, 305_pr4497.dpatch, 306_ld_demangler_segfault.dpatch, + 307_pr4558.dpatch. + - Fix build failure with gcc-4.2. Closes: #429738. + - Fix kernel build with grsecurity patch. Closes: #430041. + * debian/copyright: Include GPL-3. + * debian/rules: Fix version extraction. + * debian/rules: Honor `noopt' in DEB_BUILD_OPTIONS. + + -- Matthias Klose Fri, 13 Jul 2007 14:45:21 +0200 + +binutils (2.17cvs20070426-8) unstable; urgency=low + + * Fix PR gas/4558. + * debian/rules: Add empty NJOBS macro. + + -- Matthias Klose Mon, 28 May 2007 09:06:35 +0000 + +binutils (2.17cvs20070426-7) unstable; urgency=low + + * 306_ld_demangler_segfault.dpatch: new CVS patch from Alan Modra to fix + segfaults in ld seen when building, e.g. openipmi. + + * debian/copyright: update source location and copyright years. + * debian/rules: idem. + + -- James Troup Wed, 23 May 2007 02:19:09 +0100 + +binutils (2.17cvs20070426-6) unstable; urgency=low + + * Fix PR ld/4497, regression introduced with the fix for PR ld/4454. + Closes: #423496. + * Fix binutils/4476, readelf support for --hash-style=gnu. Closes: #421790. + + -- Matthias Klose Mon, 14 May 2007 10:51:40 +0200 + +binutils (2.17cvs20070426-5) unstable; urgency=low + + * Fix PR ld/4454. + + -- Matthias Klose Sun, 06 May 2007 09:50:29 +0200 + +binutils (2.17cvs20070426-4) unstable; urgency=low + + * Fix PR gas/4448, overstrict check for powerpc lswi. Closes: #421799. + + -- Matthias Klose Wed, 2 May 2007 18:26:03 +0200 + +binutils (2.17cvs20070426-3) unstable; urgency=low + + * Update debian/*.shlibs files. Closes: #421454. + * Fix PR gas/4436, wrong reject in powerpc opcode table checks. + Closes: #421455. + * Fix build failure on arm (Aurelian Jarno). Closes: #421365. + * Compare testsuite results of the installed binutils with the built one. + + -- Matthias Klose Mon, 30 Apr 2007 07:47:09 +0200 + +binutils (2.17cvs20070426-2) unstable; urgency=low + + * Fix typo preparing the binutils-hppa64 package. + + -- Matthias Klose Fri, 27 Apr 2007 08:06:49 +0200 + +binutils (2.17cvs20070426-1) unstable; urgency=low + + [ James Troup ] + * New upstream CVS snapshot. + * debian/test-suite-compare.py: simplistic comparator for binutils test + suite runs. + + [ Matthias Klose ] + * Merge changes from the experimental uploads: + * debian/patches/121_i386_x86_64_biarch.dpatch: Remove, applied upstream. + * Build a binutils-source package (containing the patched sources). + * Check for a working expect before building the package. + * Configure the multiarch build for x86_64-linux-gnu instead of + x86_64-linux. + * debian/rules: Don't strip binaries if nostrip is in DEB_BUILD_OPTIONS. + * debian/rules: Don't try to strip shell scripts. + * Configure --with-pkgversion to include the distribution name. + * debian/patches/000_print_debian_version.dpatch: Remove. + * debian/control: Build-depend on lsb-release. + * Enable spu target in powerpc and binutils-multiarch build. + * Don't include embedspu in binutils-multiarch on powerpc. + * debian/control: Set priority for source package to optional. + + -- James Troup Fri, 27 Apr 2007 01:29:57 +0100 + +binutils (2.17-3) unstable; urgency=low + + * debian/rules (configure-multi-stamp): drop i486-kfreebsd-gnu again as + it breaks objdump for i386 on amd64. Closes: #380539 + + -- James Troup Tue, 3 Oct 2006 00:53:17 +0100 + +binutils (2.17-2) unstable; urgency=low + + * The "Laisse le Wookie gagner" release. + + * 127_x86_64_i386_biarch.dpatch: new patch from Aurelien Jarno + to add (/usr)/lib32 to the search paths on + amd64. Closes: #369052 + + * debian/rules (configure-multi-stamp): add i486-kfreebsd-gnu at request + of Aurelien Jarno. Closes: #315306 + + -- James Troup Wed, 26 Jul 2006 20:33:13 +0100 + +binutils (2.17-1) unstable; urgency=low + + * New upstream release. + * 120_mips_xgot_multigot_workaround.dpatch: removed - superseded by a + proper fix upstream. Closes: #274738 + * debian/binutils.shlibs, debian/binutils-multiarch.shlibs, + debian/binutils-hppa64.shlibs: updated SONAME to 2.17. + + -- James Troup Mon, 26 Jun 2006 13:17:36 +0100 + +binutils (2.16.1cvs20060507-1) unstable; urgency=low + + * New upstream CVS snapshot of 'binutils-2_17-branch'. + + * debian/control (Standards-Version): bump to 3.7.2.0. + + -- James Troup Sun, 7 May 2006 19:57:08 +0100 + +binutils (2.16.1cvs20060413-1) unstable; urgency=low + + * New upstream CVS snapshot. + * 120_mips_xgot_multigot_workaround.dpatch: updated to work with CVS + r1.163 of bfd/elfxx-mips.c, pass 'info' instead of 'output_bfd' to + MIPS_ELF_GOT_MAX_SIZE(). + + * Patch from NIIBE Yutaka in #280884: + * debian/rules (configure-multi-stamp): Support m32r-linux. Closes: + #340264 + * debian/rules: Run 'make check' only if build == host. + + * debian/rules: Also don't run 'make check' if nocheck is in + DEB_BUILD_OPTIONS. Based on a patch from Michael Banck + . Closes: #315290 + + * Integrate most of a patch to build arbitrary binutils-$TARGET + cross-packages from #231707. Thanks to Nikita V. Youshchenko + and Josh Triplett . + + * debian/copyright: update to include GFDL. Closes: #81950 + * debian/copyright: update FSF address. + + * debian/rules: move non-architecture specific conflicts (gas, + elf-binutils, modutils (<< 2.4.19-1)) out of a substitued variable and + into the control file. Rename variable to extraConflicts. + * debian/control: likewise. + + -- James Troup Sat, 15 Apr 2006 03:05:41 +0100 + +binutils (2.16.1cvs20060117-1) unstable; urgency=low + + * New upstream CVS snapshot. + + * 118_arm_pass_all.dpatch, 125_fix_tc_arm_cast.dpatch: merged upstream - + removed. + + -- James Troup Wed, 18 Jan 2006 02:25:25 +0000 + +binutils (2.16.1cvs20051214-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fix ld segfaults on ia64. Closes: #342777 + + * 126_fix_PROVIDE_HIDDEN.dpatch: merged upstream - removed. + + -- James Troup Wed, 14 Dec 2005 08:06:37 +0000 + +binutils (2.16.1cvs20051206-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes linking of qemu. Closes: #340328 + + * 126_fix_PROVIDE_HIDDEN.dpatch: new patch from Thiemo Seufer to fix + handling of hidden symbols which were provided by a linker + script. Closes: #342307 + + * debian/control (Standards-Version): updated to 3.6.2.1. + + -- James Troup Sat, 10 Dec 2005 05:23:34 +0000 + +binutils (2.16.1cvs20051117-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes c++filt's flushing of stdout which broke gcj. Closes: #339287 + + * debian/control (Build-Depends): switch from expect to expect-tcl8.3 + since tcl8.4's broken threading causes the testsuite to fail entirely + on hppa. Closes: #339509 + + -- James Troup Thu, 17 Nov 2005 13:15:15 +0000 + +binutils (2.16.1cvs20051109-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes broken PLT handling on m68k. Closes: #327780 + * Don't compile flex files with -Werror, fixing mips builds. + Closes: #333980 + * Don't check undefined symbols introduced by "ld -u" for TLS. Closes: + #326103 + + * 117_mips_symbolic_link.dpatch: merged upstream - removed. + + * debian/rules: pass --disable-werror on ia64 as current gcc generates + too many false positives. Closes: #336939 + + * 125_fix_tc_arm_cast.dpatch: new patch from Lennert Buytenhek to fix + cast warning and arm builds. Closes: #336175 + + * 121_i386_x86_64_biarch.dpatch: imported from Ubuntu at request of + Daniel Jacobwitz to fix biarch linking on i386/amd64. Closes: + #334626, #334673 + + * debian/rules: remove any reference to pkgstriptranslations - an + Ubuntu-ism that shouldn't have been in the Debian package in the first + place but that isn't needed in Ubuntu any more in any event. + + * debian/rules: MAKEOVERRIDES is now clobbered by the top level + Makefile, so switch to overriding MAKE itself (sic) to pass the + customized VERSION variable/string down to sub-directories for + -multiarch and -hppa64 builds. Thanks to Daniel Silverstone for the + suggestion. + + -- James Troup Fri, 11 Nov 2005 20:38:22 +0000 + +binutils (2.16.1cvs20050902-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes --as-needed on sparc and hppa. Closes: #320697 + * Fixes buffer overflows and other crashes. Closes: #311975 + + * 124_readelf_robustify.dpatch: merged upstream - removed. + * 001_ld_makefile_patch: regenerated with help of wiggle. + + * debian/*.shlibs: update to version 2.16.91. + + * debian/copyright: use canonical GNU URL. Update copyright years. + * debian/rules: update version and copyright. + + * debian/rules (pre-build): not relevant with a CVS snapshot which + doesn't have pre-generated info files - removed. + * debian/rules (clean): don't save info files for the same reason, in + fact explicitly remove them. + * debian/rules (build_stamps): drop pre-build. + + -- James Troup Sat, 3 Sep 2005 00:30:56 +0100 + +binutils (2.16.1-3) unstable; urgency=low + + * debian/rules: remove powerpc libc header hack. + * debian/include/sys/procfs.h: remove. + + * 124_readelf_robustify.dpatch: new patch from Jakub Jelinek to + robustify readelf. Thanks to Thiemo Seufer . + Closes: #318344 + + -- James Troup Wed, 31 Aug 2005 05:03:11 +0100 + +binutils (2.16.1-2) unstable; urgency=low + + * debian/include/sys/procfs.h: Include fixed powerpc libc header, to fix + FTBFS on powerpc. Temporary fix, to be removed with glibc-2.3.5. + + -- Matthias Klose Sun, 10 Jul 2005 16:35:17 +0200 + +binutils (2.16.1-1) unstable; urgency=medium + + * New upstream version. + * debian/patches/117_mips_symbolic_link.dpatch: Updated, apply it again. + (Thiemo Seufer). + * debian/patches/130_bfd_doc_makefile.dpatch: Remove, applied upstream. + * debian/control: Build depend on dpkg-dev (>= 1.13.9), needed to determine + the GNU architecture type. + * The symlinks for the tools change to the the new output of + dpkg-architecture -qDEB_HOST_GNU_TYPE (i.e. i386-linux-ld becomes + i486-linux-gnu-ld). + * Change the values for --enable-targets according to the dpkg-architecture + update. + * Configure the hppa64 cross compiler for hppa64-linux-gnu. Adjust + the hppa64 install target. + * debian/*shlibs: Update to version 2.16.1. + * Make restoring of saved pregenerated info files more robust. + + -- Matthias Klose Sat, 9 Jul 2005 14:58:49 +0200 + +binutils (2.16-1) unstable; urgency=low + + * Update to CVS 2.16 branch 20050612. + * debian/patches/130_bfd_doc_makefile.dpatch: New patch to fix + build failure in bfd/doc. + * debian/watch: New file. + + -- Matthias Klose Sun, 12 Jun 2005 12:29:12 +0200 + +binutils (2.16-0) experimental; urgency=low + + * New upstream release. + - Fixes build failure using gcc-4.0 (closes: #299671). + * debian/patches: + - 000_print_debian_version.dpatch: Updated. + - 001_ld_makefile_patch.dpatch, 002_gprof_profile_arcs.dpatch, + 002_gprof_profile_arcs.dpatch: Regenerated. + - 012_check_ldrunpath_length.dpatch: Updated. + - 112_fix_reloc_sizing.dpatch, 113_elf_backend_hide_symbol.dpatch, + 114_mips_delay_slots_in_branch.dpatch, 115_fix_sparc_fmov.dpatch, + 116_ar_nonexistent_files.dpatch: Removed, applied upstream. + - 117_mips_symbolic_link.dpatch: Disabled. Needs an update. + - 118_arm_pass_all.dpatch: Regenerated. + - 119_fix_gas_double_negative.dpatch: Removed, applied upstream. + - 120_mips_xgot_multigot_workaround.dpatch: Updated. + - 121_ia64_unwind_fixes.dpatch, 122_m68k_undefweak_symbols.dpatch: + Removed, applied upstream. + * Merge Ubuntu changes: + - debian/patches: + - 123_dont_add_to_undefs_twice.dpatch: Removed, applied upstream. + - debian/rules: Call pkgstriptranslations if present. + * debian/rules: + - Fix VERSION extraction. + - Save info files before build and restore them in clean target. + * debian/control: + - Add me as an uploader. + + -- Matthias Klose Fri, 6 May 2005 18:43:09 +0200 + +binutils (2.15-6) unstable; urgency=low + + * 123_bfd_overflow_fix.dpatch: new patch from Alan Modra to fix BFD + overflows. Closes: #308625 + + -- James Troup Sat, 21 May 2005 20:20:01 +0100 + +binutils (2.15-5ubuntu2) hoary; urgency=low + + * debian/rules: Call pkgstriptranslations if present (the package does not + use debhelper, thus it does not happen automatically). + + -- Martin Pitt Fri, 18 Mar 2005 13:07:52 +0000 + +binutils (2.15-5ubuntu1) hoary; urgency=low + + * 123_dont_add_to_undefs_twice.dpatch: new patch from Alan Modra (PR338) to + not add symbols to the undefined list twice, causing an assertion failure + in ld when building the kernel on amd64. + + -- Daniel Stone Tue, 7 Dec 2004 09:29:31 +0100 + +binutils (2.15-5) unstable; urgency=low + + * 121_ia64_unwind_fixes.dpatch: new patch from David Mosberger to fix + unwind related bugs. Closes: #278836 + * 122_m68k_undefweak_symbols: new patch from Andreas Schwab to fix undef + weak symbols with non-default visibilty on m68k. Closes: #278388 + + -- James Troup Thu, 25 Nov 2004 00:13:28 +0000 + +binutils (2.15-4) unstable; urgency=low + + * 120_mips_xgot_multigot_workaround.dpatch: new patch from Thiemo Seufer + to make multigot/xgot handling exclusive and fix mozilla builds on + mipsen. Closes: #272149 + + -- James Troup Thu, 23 Sep 2004 22:44:03 +0100 + +binutils (2.15-3) unstable; urgency=low + + * 112_fix_reloc_sizing.dpatch: update patch based on revised change from + Alan Modra. + + * 116_ar_nonexistent_files.dpatch: new patch from Nick Clifton to fix + ar's handling of non-existent files. Closes: #267139 + + * 117_mips_symbolic_link.dpatch: new patch from Thiemo Seufer to fix the + "final link failed: Bad value" error on mips. Closes: #270619 + + * 118_arm_pass_all.dpatch: new kludge patch to fix broken libtool pass_all + handling on arm and other arches. + + * 119_fix_gas_double_negative.dpatch: new patch from Alan Modra via + Daniel Jacobowitz to fix gas' handling of -- and ++. Closes: #266772 + + -- James Troup Thu, 9 Sep 2004 22:24:08 +0100 + +binutils (2.15-2) unstable; urgency=low + + * 112_fix_reloc_sizing.dpatch: new patch from Daniel Jacobowitz to fix + objcopy relocation sections. Closes: #252719 + + * 113_elf_backend_hide_symbol.dpatch: new patch from Alan Modra to fix + ld internal error on hppa. Closes: #254549 + + * 114_mips_delay_slots_in_branch.dpatch: new patch from Thiemo Seufer to + handle delay slots in branch correctly on mips. Closes: #266660 + + * 115_fix_sparc_fmov.dpatch: new patch from Jakub Jelinek via Dave + Miller to fix bogus fmov* SPARC opcodes. Closes: #267824 + + -- James Troup Tue, 31 Aug 2004 22:45:13 +0100 + +binutils (2.15-1) unstable; urgency=low + + * New upstream release. Closes: #248990, #259458 + * Fixes -Wl,-z,defs to correctly abort builds with unresolved + symbols. Closes: #256481 + * Better error message for truncation of bignums in as. + Closes: #219933 + * strip(1) no longer corrupts binaries for architectures it doesn't + recognise. Closes: #211052 + * nm -C /usr/lib/libcrypto++.a no longer segfaults. Closes: #247917 + + * 105_alpha_rpcc_opcode_fix.dpatch, 106_arm_pic.dpatch, + 107_powerpc_ld_segfault.dpatch, 108_m68k_fmoveml_fix.dpatch, + 109_objcopy_keep_debug.dpatch, 110_hppa64_local_symbols.dpatch, + 111_objcopy_vs_unstripped.dpatch, 906_hjl_libtool_dso.dpatch: merged + upstream - removed. + * 012_check_ldrunpath_length.dpatch: resynced with wiggle(1). + + * debian/binutils.shlibs, debian/binutils-hppa64.shlibs, + debian/binutils-multiarch.shlibs: update for 2.15. + + * debian/rules (install): remove gas.info hack as no longer needed + (fixed properly upstream). + * debian/rules (clean): remove gas/doc/as.info which doesn't seem to be + in the upstream tar ball. + + * debian/rules (binary-arch): install $pkg/ChangeLog.linux only if they + exist (because they don't in GNU releases). + + -- James Troup Thu, 29 Jul 2004 22:44:04 +0100 + +binutils (2.14.90.0.7-8) unstable; urgency=low + + * debian/rules: don't use gcc-2.95 on m68k. Thanks to Adam Conrad for + pointing this out. + + -- James Troup Wed, 19 May 2004 10:35:44 +0100 + +binutils (2.14.90.0.7-7) unstable; urgency=low + + * 111_objcopy_vs_unstripped.dpatch: new patch from Alan Modra via Daniel + Jacobowitz to fix objcopy on unstripped libraries on alpha and arm. + Closes: #234021 + + * debian/control (Build-Depends): remove m68k specific build-depends on + gcc-2.95 and libc6-dev (<< 2.3). Many thanks to Michael Schmitz for + testing this. + + -- James Troup Tue, 30 Mar 2004 18:00:54 +0100 + +binutils (2.14.90.0.7-6) unstable; urgency=low + + * 110_hppa64_local_symbols.dpatch: new patch from Randolph Chung to fix + dynamic name generation of local symbols on hppa64 - needed to build + 64-bit hppa kernels. Closes: #238176 + + -- James Troup Fri, 26 Mar 2004 15:52:27 +0000 + +binutils (2.14.90.0.7-5) unstable; urgency=low + + * 109_objcopy_keep_debug.dpatch: new patch from Daniel Jacobowitz + , objcopy --only-keep-debug and readelf SHT_NOBITS + fixes. + + -- James Troup Mon, 26 Jan 2004 16:25:25 +0000 + +binutils (2.14.90.0.7-4) unstable; urgency=low + + * debian/control: add binutils-hppa64 package. + * debian/rules: add support for binutils-hppa64 package and don't enable + hppa64-linux for binutils or binutils-multiarch. + * debian/binutils-hppa64.postinst: new file. + * debian/binutils-hppa64.postrm: likewise. + * debian/binutils-hppa64.shlibs: likewise. + * Above changes largely based on a patch from Matthias Klose + . Closes: #225892 + + * debian/control (Build-Depends): drop bzip2. + + * debian/rules (install-stamp): remove empty /usr/include directory in + binutils. + * debian/rules (install-stamp): remove /usr/share/info/dir* to + workaround install-info brain damage (cf #213524). + + -- James Troup Thu, 22 Jan 2004 21:32:44 +0000 + +binutils (2.14.90.0.7-3) unstable; urgency=low + + * 108_m68k_fmoveml_fix.dpatch: new patch from H.J. Lu + to fix fmoveml disassembly and associated + testsuite regression on m68k. + + -- James Troup Tue, 18 Nov 2003 14:35:23 +0000 + +binutils (2.14.90.0.7-2) unstable; urgency=low + + * 107_powerpc_ld_segfault.dpatch: new patch from Alan Modra + to fix ld segfault on powerpc. Thanks to + Josselin Mouette for the report. Closes: #219187 + + -- James Troup Wed, 5 Nov 2003 13:32:17 +0000 + +binutils (2.14.90.0.7-1) unstable; urgency=low + + * New upstream release. + * 100_null_owner_ld_fix.dpatch, 101_ppc_as_shf_and_rel_fix.dpatch, + 102_alpha_null_got_ld_fix.dpatch, + 103_static_linking_elf_eh_frame.dpatch, + 104_elf_eh_frame_alpha_fix.dpatch: removed; merged upstream. + * debian/rules: update version number. + * debian/binutils.shlibs: likewise. + * debian/binutils-multiarch.shlibs: likewise. + + * 009_signed_char_fix.dpatch: removed; this was fixed upstream correctly + (http://sources.redhat.com/ml/binutils/2003-05/msg00304.html) and this + patch is breaking that fix. Thanks to Daniel Jacobowitz + . + + * 003_gmon_manpage_fix.dpatch -> 002_gprof_profile_arcs.dpatch. + * 014_gprof_manpage_fix.dpatch -> 003_gprof_see_also_monitor.dpatch. + + * 300_alpha_rpcc_opcode_fix.dpatch -> 105_alpha_rpcc_opcode_fix.dpatch + (committed to trunk). + + * debian/rules (configure-multi-stamp): also enable mips64{el,}-linux + for binutils-multiarch. Alphabetize target list. + + * 106_arm_pic: new patch from Phil Blundell and Daniel + Jacobowitz which implements GC for GOT and PLT relocs + in the elf32-arm backend. + + * debian/rules (install-stamp): work around upstream bug which causes + as.info and as.1 to disappear by explicitly calling "make + install-info-am install-am" in builddir-single/gas/doc. + + -- James Troup Sat, 1 Nov 2003 18:14:04 +0000 + +binutils (2.14.90.0.6-5) unstable; urgency=low + + * 104_elf_eh_frame_alpha_fix.dpatch: new patch from H.J. Lu + to fix regressions on alpha caused by + 103_static_linking_elf_eh_frame. Thanks to Thimo Neubauer + for the original report. Closes: #215636 + + -- James Troup Fri, 17 Oct 2003 00:02:09 +0100 + +binutils (2.14.90.0.6-4) unstable; urgency=low + + * 103_static_linking_elf_eh_frame.dpatch: new patch from H.J. Lu + to fix static linking of C++ binaries. + + * 200_alpha_null_got_ld_fix.dpatch: renamed... + * 102_alpha_null_got_ld_fix.dpatch: to this. + + * debian/rules: patch from Guido Guenther to enable + mips64 support. Closes: #213448 + + -- James Troup Sun, 12 Oct 2003 14:26:26 +0100 + +binutils (2.14.90.0.6-3) unstable; urgency=low + + * 100_null_owner_ld_fix.dpatch: new patch from Alan Modra + to fix an ld crash with null owner sections. + Closes: #212029 + + * debian/rules: don't compile with gcc-2.95 on arm; the only failures + are a) testsuite-only (i.e. don't appear to affect real world + applications) and b) fixed by upcoming gcc patches by Phil Blundell + in any event. + * debian/control (Build-Depends): likewise don't build-depend on + gcc-2.95 for arm. + + * 101_ppc_as_shf_and_rel_fix.dpatch: new patch from Alan Modra + to fix an as regression where it refused to + compile utils.S from Linux/PPC 2.6. Closes: #211668 + + -- James Troup Tue, 23 Sep 2003 01:32:08 +0100 + +binutils (2.14.90.0.6-2) unstable; urgency=low + + * debian/rules (CONFLICTS): remove spurious "--", left over from + debhelper based-rules. Fixes build failure on sparc. + + * 200_alpha_null_got_ld_fix.dpatch: new patch from Daniel Jacobowitz + to fix an ld crash on alpha with null .got sections. + Closes: #204615 + + * scripts/dpkg-arch.mk: remove. + * debian/rules: define DEB_BUILD_GNU_TYPE, DEB_HOST_ARCH and + DEB_HOST_GNU_TYPE here instead. + + * debian/rules (binary-indep): use ':' as a separator to chown, rather + than '.' which is a legal character for a username. + * debian/rules (binary-arch): likewise. + + * debian/rules: further trivial cleanups. + + -- James Troup Thu, 18 Sep 2003 22:13:36 +0100 + +binutils (2.14.90.0.6-1) unstable; urgency=low + + * New "upstream" release. + * Fixes core dump of nm -C on certain object files. Closes: #205616 + + * New maintainer. + * debian/control (Maintainer): adjust accordingly. + * debian/copyright: likewise. Update copyright years, URL. + * debian/control (Standards-Version): bump to 3.6.1.0. + + * 011_disable_combreloc_ARM_ONLY.diff: dropped on request of Phil + Blundell - this is obsolete, it was working around a + bug in ld since fixed by Daniel Jacobowitz upstream. + + * 890-elf64_alpha_segfault.diff: dropped as bogus + (http://sources.redhat.com/ml/binutils/2003-04/msg00399.html); rth's + correct fix is already in the upstream source. + + * debian/README.Debian: migrate nearly-obsolete debconf notes to here. + * debian/control (Depends): drop debconf. + * binutils.config, binutils.templates, binutils.templates.ca, + binutils.templates.fr, binutils.templates.ja, + binutils.templates.pt_BR, postrm.debhelper: obsolete, removed. + Closes: #189641, #198222 + + * Migrated from dbs... + * debian/README.build: obsolete; removed. + * debian/rules: remove $(BUILD_TREE)/, $(STAMP_DIR)/, $(unpacked), $(patched) and other references + to DBS. + * debian/rules (clean): remove build tree directories. + * debian/scripts/dbs-build.mk: unused, remove. + * debian/scripts/file2cat: likewise. + + * ... to dpatch. + * debian/rules: include /usr/share/dpatch/dpatch.make. + * debian/rules (configure-single-stamp): depend on patch-stamp. + * debian/rules (configure-multi-stamp): likewise. + * debian/rules (clean): depend on unpatch. Remove debian/patched. + * debian/control (Build-Depends): add dpatch. + + * binutils-doc.postinst, binutils-doc.prerm, + binutils-multiarch.postinst, binutils-multiarch.postrm, + binutils-multiarch.preinst, binutils-multiarch.shlibs, + binutils.postinst, binutils.postrm, binutils.shlibs: new files based + on .deb and packages.d/. + * scripts/dh_split: obsolete, removed. + * debian/packages.d/binutils-dev.in, debian/packages.d/binutils-doc.in, + debian/packages.d/binutils-multiarch.in, + debian/packages.d/binutils.in: likewise. + + * debian/rules: rewritten, de-debhelper-ized. + * debian/control (Build-Depends): drop debhelper and add file. + + -- James Troup Thu, 11 Sep 2003 22:08:18 +0100 + +binutils (2.14.90.0.5-0.2) unstable; urgency=low + + * NMU. + * Rebuild using fixed gcc on sparc (closes: #202924). + + -- Matthias Klose Mon, 28 Jul 2003 20:12:00 +0200 + +binutils (2.14.90.0.5-0.1) unstable; urgency=low + + * NMU. + * New upstream version. + * Remove patches applied upstream: + - debian/patches/500_s390_gas.diff + - debian/patches/905-hppa_visibility.diff + - debian/patches/906-mips_ld_fix.diff + * Updated patch: + - debian/patches/906-hjl_libtool_dso.diff + + -- Matthias Klose Wed, 23 Jul 2003 20:09:51 +0200 + +binutils (2.14.90.0.4-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Work around the brain dead libtool. + * New patches: + - debian/patches/500_s390_gas.diff (closes: #194929). + - debian/patches/905-hppa_visibility.diff (closes: #195203). + - debian/patches/906-mips_ld_fix.diff (closes: #195207). + - debian/patches/906-hjl_libtool_dso.diff + + -- Matthias Klose Sat, 31 May 2003 12:12:10 +0200 + +binutils (2.14.90.0.3-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Update from binutils 2003 0523. + 2. Fix 2 ELF visibility bugs. + 3. Fix ELF/ppc linker bugs. + * Remove patches applied upstream: + - debian/patches/903-hjl_ld-dso-test.diff + - debian/patches/904_hjl_hppa_whitespace.diff + + -- Matthias Klose Sat, 24 May 2003 09:02:54 +0200 + +binutils (2.14.90.0.2-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Update from binutils 2003 0515. + 2. Fix various ELF visibility bugs. + 3. Fix some ia64 linker bugs. + 4. Add more IAS compatibilities to ia64 assembler. + * New patches: + - debian/patches/903-hjl_ld-dso-test.diff (closes: #193505). + - debian/patches/904_hjl_hppa_whitespace.diff. + * Remove patches applied upstream: + - debian/patches/900_binutils-2.14.90.0.1-empty-test.diff + - debian/patches/901-hjl_weaksymfix.diff + + -- Matthias Klose Sun, 18 May 2003 10:50:00 +0200 + +binutils (2.14.90.0.1-0.1) unstable; urgency=low + + * NMU + * New upstream version. + - Fix: MIPS branch-to-global bug (closes: #189031). + - Fix: Crash on alpha with --gdwarf2 and bad file number (closes: #187211). + - Fix: objdump -R BFD ICE on prelinked binaries (closes: #180088). + * New patches: + - debian/patches/900_binutils-2.14.90.0.1-empty-test.diff + - debian/patches/901-hjl_weaksymfix.diff + * Remove patches applied upstream: + - debian/patches/002_ldlex_inflexible_transition.diff + - debian/patches/013_objdump_doc_fix.diff + - debian/patches/850_hppa_stub_fix.diff + - debian/patches/860_m68k_elf.diff + - debian/patches/861_m68k_elf.diff + - debian/patches/870-sparc64-update.diff + - debian/patches/880-alpha-update.diff + * Remove obsolete patch: + - debian/patches/patches/800_hjl_mips_fixes.diff + * Add x86_64 for the i386 binutils package and the binutils-multiarch + package (closes: #189350). + * Set CFLAGS to -g -O2 for build (closes: #181268). + + -- Matthias Klose Tue, 6 May 2003 09:58:14 +0200 + +binutils (2.13.90.0.18-1.7) unstable; urgency=high + + * NMU + * Fixed ld segv (replaced yy_current_buffer by YY_CURRENT_BUFFER) + (Closes: #188876, 188900, 188912) + + -- Julien LEMOINE Mon, 14 Apr 2003 04:45:03 +0200 + +binutils (2.13.90.0.18-1.6) unstable; urgency=high + + * NMU + * [002_ldlex_inflexible_transition.diff] New. Make ld buildable again with + sid's current flex. + + -- J.H.M. Dassen (Ray) Sun, 13 Apr 2003 16:54:46 +0200 + +binutils (2.13.90.0.18-1.5) unstable; urgency=medium + + * NMU + * [890-elf64_alpha_segfault.diff] Patch from Julien LEMOINE + to fix the segfault encountered while building + gal on alpha. (Closes: #185556) + * sid's current flex breaks the building of several packages, including this + one; see #188665. The i386 upload is built using a pbuilder sid chroot + with flex downgraded to the sarge version. + + -- J.H.M. Dassen (Ray) Sun, 13 Apr 2003 13:44:17 +0200 + +binutils (2.13.90.0.18-1.4) unstable; urgency=low + + * NMU + * ld/emulparams/elf64_sparc.sh: Set LIBPATH_SUFFIX instead of suffix + for emulation. Patch from current CVS suggested by Clint Adams, + needed for sparc64 glibc build. + * bfd/elf64-alpha.c: Patch from current CVS suggested by Falk Hueffner, + needed to build xstow, kdegames (#181623), sfs. + * Explicitely fail, when trying to build with glibc-2.3 on arm and + m68k. See #184048 for m68k ld failures. + + -- Matthias Klose Tue, 8 Apr 2003 23:27:46 +0200 + +binutils (2.13.90.0.18-1.3) unstable; urgency=low + + * NMU + * Another fix for ELF/m68k (__bb_exit_func initialization). + + -- Matthias Klose Tue, 18 Mar 2003 00:05:47 +0100 + +binutils (2.13.90.0.18-1.2) unstable; urgency=high + + * NMU + * Apply upstream fix for ELF/m68k. Closes: #182313. + * Use gcc-2.95 on m68k-linux. Built on testing (glibc-2.2). + + -- Matthias Klose Sun, 9 Mar 2003 01:02:39 +0100 + +binutils (2.13.90.0.18-1.1) unstable; urgency=low + + * NMU + * Apply upstream fix for hppa stubs. Closes: #181397 + + -- LaMont Jones Wed, 19 Feb 2003 12:34:58 -0700 + +binutils (2.13.90.0.18-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-01-21) + * Upstream: Fix an ia64 gas bug + * Upstream: Fix some TLS bugs + * Upstream: Fix ELF/ppc bugs + * Upstream: Fix an ELF/m68k bug + * Corrected ARM combreloc disabling patch + (closes: Bug#175204) + * Upstream fixes take care of TEXTREL bug + on powerpc (closes: Bug#176084) + * Fixed shellutils dependency problem + (closes: Bug#175673) + * Removed mention of the monitor manpage + from the gprof manpage (closes: Bug#160654) + + -- Christopher C. Chimelis Sun, 2 Feb 2003 23:17:29 -0500 + +binutils (2.13.90.0.16-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-11-26) + * Upstream: Include /usr/bin/c++filt + * Upstream: Fix "ld -r" with exception handling + + -- Christopher C. Chimelis Mon, 9 Dec 2002 19:14:02 -0500 + +binutils (2.13.90.0.14-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-11-14) + * Upstream: Fix ELF/alpha bugs + * Upstream: Fix an ELF/i386 assembler bug + * Updated package MIPS patch from HJ Lu + * Added s390 patches from Gerhard Tonn. + Actually, the patches to support s390x were + already included upstream, so I just enabled + it in the rules script (closes: Bug#168074, Bug#168974) + * Since powerpc64-linux support was already + added in a prior upload, I'm closing the + wishlist bug for it (closes: Bug#156955) + + -- Christopher C. Chimelis Tue, 20 Nov 2002 05:36:21 -0500 + +binutils (2.13.90.0.10-2) unstable; urgency=low + + * Added two patches from upstream to fix alpha BFD. + (closes: Bug#165633) + + -- Christopher C. Chimelis Sun, 27 Oct 2002 14:21:51 -0400 + +binutils (2.13.90.0.10-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-10-10) + * Upstream: More ELF/PPC linker bug fixes. + * Upstream: Fix an ELF/alpha linker bug. + * Upstream: Fix an ELF/sparc linker bug to support + Solaris. + * Upstream: More TLS updates. + * Updated m68k gcc 3.1 patch since it wasn't applying + cleanly. Is this still needed? + * Added patches to allow building with new bison + (closes: Bug#164436, Bug#164042) + * Should be better for prelink support, which is coming + soon (closes: Bug#161427) + * Removed windres manpage from all packages + (closes: Bug#157415) + * Fixed download location in copyright file + (closes: Bug#158028) + * Added i386-gnu to multiarch build targets + (closes: Bug#157057) + * Add alpha opcode patch from Falk Hueffner + (closes: Bug#164201) + * Remove .la files from packages + (closes: Bug#160455) + + -- Christopher C. Chimelis Mon, 15 Oct 2002 20:22:29 -0400 + +binutils (2.13.90.0.4-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-08-) + * Upstream: Update from binutils 2002 0814 + * Upstream: Fix symbol versioning bugs for gcc 3.2 + * Upstream: Fix mips gas + * Upstream: Fix an x86 TLS bfd bug + * Upstream: Fix an x86 PIC gas bug + + -- Christopher C. Chimelis Thu, 15 Aug 2002 20:13:44 -0400 + +binutils (2.12.90.0.15-2) unstable; urgency=low + + * Fix combreloc disabling patch for ARM + (closes: Bug#156315) + * Remove S390 patch since it is no longer + needed (thanks to Gerhard Tonn for checking + this out) + * Fix BFD version string escaping + (closes: Bug#154989) + * Add SH patch from Yaegashi Takeshi + (closes: Bug#156230) + * Added conflicts for older modutils + (closes: Bug#155324) + * Forgot to apply MIPS patch from HJ Lu + (apologies to MIPS folks) + + -- Christopher C. Chimelis Wed, 14 Aug 2002 13:09:12 -0400 + +binutils (2.12.90.0.15-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-07-17) + * Upstream: Fix an ia64 assembler bug + * Upstream: Fix a symbol versioning bug + * Upstream: You have to apply the modutils patch + enclosed here in order to support System.map + generated by the new nm (bug filed) + * The symbol visibility patch is included + upstream, as is the alpha PLT/GOT patch, so + both removed from my packaging. + * Included patch from upstream to fix RELA targets + (closes: Bug#153729) + + -- Christopher C. Chimelis Thu, 2 Aug 2002 02:24:29 -0400 + +binutils (2.12.90.0.14-2) unstable; urgency=low + + * The "Let's Get This Party Started Right" upload + (since I'm closing as many old bugs as possible) + * Removed sparc patch altogether + * Added a small alpha patch from upstream to fix + some obscure PLT/GOT issues. + * Manpages are now fixed finally -- no more + I (closes: Bug#108369) + * Have not gotten another report of the + debconf message being cut off, so I'm closing + the debconf-related bug. I suspect this may + have been a problem in the debconf front-end + being used, but I have not been able to reproduce + it (closes: Bug#149045) + * Closing a bug report that I had tagged moreinfo + a LONG time ago (over one year), but never got + more info on. I have not heard of this kind + of problem since, nor have I been able to + reproduce it at any time since (closes: Bug#105986). + For interested parties, it revolved around + allowing gcc to show a linker error, but the + reporter didn't know about the -v option for + gcc. There was a linker problem, but it appeared + to be either hardware failure or user error. + * Closing a demangler 'bug' that revolved around + stripping @PLT from symbol names. Since the + PLT suffix is documented, I'm going to close + this bug. Also, it doesn't help that the symbol + in the bug report uses an obsolete mangling style, + so I can't test this even if I wanted to + (closes: Bug#45889) + + -- Christopher C. Chimelis Mon, 22 Jul 2002 12:54:01 -0400 + +binutils (2.12.90.0.14-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-06-27) + * Upstream: Fix a mips assembler bug + * Upstream: Fix an ELF/mips SHF_MERGE bug + * Upstream: Fix a linker bug which leads to the + incorrect Linux 2.2 kernel. + * PE patch removed since it is included + in upstream source now + * Includes some patches which allow for + more true testsuite results from gcc-3.1 + * Fix sparc ld emulation script patches to get + rid of the lib/64 silliness (now uses lib64) + * Removed the L word from the package description + since Debian is no longer linux-only + (closes: Bug#150575) + * The strings dereferencing problem with + some Windows binaries seems to also be fixed now + (closes: Bug#121366) + * Added a patch to only generate an RPATH entry + if LD_RUN_PATH is not empty, for cases where + -rpath isn't specified (closes: Bug#151024) + * Fixed arch detection problem in the build + scripts. + * Fixed bad capitalisation of -g in the objdump + manpage (closes: Bug#152697) + * Added patch from HJ Lu to fix a symbol + visibility issue. + + -- Christopher C. Chimelis Wed, 17 Jul 2002 14:23:42 -0400 + +binutils (2.12.90.0.9-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-05-26). + * Upstream: Supports "-z muldefs" + * Updated PE bfd from CVS to fix auto-import + segfaults (closes: Bug#131407) + * Remove the PE-removing patch for i386 targets + due to the above + + -- Christopher C. Chimelis Thu, 6 Jun 2002 15:52:29 -0400 + +binutils (2.12.90.0.7-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-04-23). + * Upstream: ELF EH frame bug fix + * Upstream: MIPS ELF visibility bug fix + * Upstream: Bug fixes for ELF/sparc + * Upstream: Bug fixes for ELF/cris + * Upstream: Fix linking a.out relocatable files + with ELF + * Upstream: Fix a PPC altivec assembler bug + * Numerous upstream changes since I have + deliberately not updated in awhile so that + I could stabilise the package for woody + release + * Fixed a glaring typo in the Debian additions + to the version string. + * Upstream incorporated --oformat + documentation patch; removed. + * Added a patch from upstream involving + relative relocs on Alpha + * Removed configure.info-[1-3] from -doc + (closes: Bug#146205) + + -- Christopher C. Chimelis Sun, 5 Apr 2002 04:52:33 -0400 + +binutils (2.12.90.0.1-5) unstable; urgency=high + + * Added a patch to m68k bits for gas to allow + gcc 3.1 to build + * Added Brazilian Portuguese translation for + debconf (closes: Bug#144677) + * Removed unneeded gasp manpage since gasp + was eliminated as a distinct binary + (closes: Bug#144583) + + -- Christopher C. Chimelis Mon, 29 Apr 2002 14:40:21 -0400 + +binutils (2.12.90.0.1-4) unstable; urgency=low + + * Added patch from Gerhardt Tonn + to fix s390 merge problem (closes: Bug#143187) + * Corrected DOW of my last changelog entry :-P + + -- Christopher C. Chimelis Thu, 18 Apr 2002 13:03:49 -0400 + +binutils (2.12.90.0.1-3) unstable; urgency=low + + * Oops...I used dpkg-architecture from dpkg-dev + in the postinst and didn't add a dependency + for it. It was a bad choice anyway and I'm + going to use uname -s instead + (closes: Bug#142744, Bug#142915) + + -- Christopher C. Chimelis Mon, 15 Apr 2002 12:41:10 -0400 + +binutils (2.12.90.0.1-2) unstable; urgency=low + + * Added Catalan debconf translation + (closes: Bug#139740) + * Ensure that info entries are removed from the + texinfo dirfile when binutils-doc is removed + (closes: Bug#126557) + * Ensure that the kernel link debconf warning + only shows up on linux systems + (closes: Bug#142360) + + -- Christopher C. Chimelis Thu, 13 Mar 2002 01:30:22 -0400 + +binutils (2.12.90.0.1-1) unstable; urgency=high + + * New upstream version (synced with CVS 2002-03-07). + * Upstream: Add the .preinit_array/.init_array/.fini_array + support. + * Upstream: Fix eh_frame. + * Upstream: Turn on combreloc by default. + * Upstream: Enable gprof for Linux/mips. + * Turn combreloc off for ARM explicitely until + I can confirm that PIC is not still broken + by using it. + * Remove IA-64 unwind patch and objcopy fix + since they are included in the upstream sources + now. + * Re-enable testsuite run since Randolph did the NMU + on dejagnu (thank you!). + * Appears to fix sparc64 linking problems. I'm + still looking into exactly what was going on with + that (closes: Bug#137850) + * Enabled hppa64-linux support in main binutils + package (closes: Bug#137955) + * Added Japanese debconf template. Thanks to + Tomohiro KUBOTA for supplying that + (closes: Bug#138112) + * Added patch for ld to fix dosemu problems + (closes: Bug#126863) + + -- Christopher C. Chimelis Mon, 11 Mar 2002 14:02:45 -0500 + +binutils (2.11.93.0.2-3) unstable; urgency=high + + * Split translated debconf templates out. + I apparently misunderstood the instructions + on integrating the French translation since + this is my first real attempt at using + debconf (closes: Bug#136295) + * Disable combreloc default on ARM since it + breaks PIC, apparently (closes: Bug#134241) + Please test other ARM bugs against this + version and inform me of the results! + + -- Christopher C. Chimelis Fri, 8 Mar 2002 19:10:10 -0500 + +binutils (2.11.93.0.2-2) unstable; urgency=high + + * Include a patch from upstream to fix stripping + archives containing multiple files with the + same name (like libgcj, unfortunately). + (closes: Bug#107812) + * Include IA64 unwind fix from CVS to fix kernel + linking on IA64. (closes: Bug#135143) + * Added French translation of the debconf + bits. Thanks to Denis Barbier for the + work on that. (closes: Bug#134626) + * Disabled testsuite run until dejagnu is + fixed. I'm leaving the build-dep for dejagnu + in, though, since I know I'll forget to + reinsert it when I do re-enable the testsuite + run. + + -- Christopher C. Chimelis Fri, 22 Feb 2002 14:05:22 -0500 + +binutils (2.11.93.0.2-1) unstable; urgency=high + + * New upstream version (synced with CVS 2002-02-07). + * Upstream: Fix a weak symbol alpha linker bug for glibc. + * Upstream: More support for gcc 3.1. + * Keep on disabling efi-app-ia32 type targets + since the segfault is still unfixed in CVS and + I haven't had the time to go back and really + debug and fix this. + * Updated standards version. + * Corrected some of the lintian problems (all except + the ones involving Changelog.linux, the .comment + section, and the missing manpages for + binutils-multiarch's binaries since that package + depends on binutils, which provides those). + + -- Christopher C. Chimelis Wed, 13 Feb 2002 13:41:47 -0500 + +binutils (2.11.92.0.12.3-7) unstable; urgency=high + + * The "Remind Me To Think Next Time" upload. + * Fix the postinst to only compare versions on + upgrade rather than during configure. + (closes: Bug#133349, Bug#133514) + * Still working on the other bugs...if only + I could get a day off of work... + + -- Christopher C. Chimelis Tue, 12 Feb 2002 06:15:02 -0500 + +binutils (2.11.92.0.12.3-6) unstable; urgency=high + + * The "Make The Bad Man Stop" upload. + * Revert patch to bfd/elf32-sparc.c (already + reverted upstream) that broke UA32 relocs on sparc + and caused bus errors with C++/Java binaries + (closes: Bug#126162) + * Remove i486-mingw32 target from the enabled + in multiarch and removed efi-app-ia32 from the + BFD config for Intel linux targets until I can find + and fixthe segfaults that seem to keep coming up when + reading Windows files and viruses with objdump or + strings. This is only temporary, so I'm not closing + the bugs until the problem gets fixed, but + I am going to bump them down to wishlist, merge + them, and note the above in them. + (debian/patches/010_disable_efi_app_ia32_TEMPORARY.diff + disables the efi-app-ia32 BFD in case someone + wants to revert this change easily) + * Added debconf warning about the kernel linking + situation since it keeps coming up and people + keep initially disagreeing with me about this + being a kernel bug. Also, merged prior warning + about -oformat change into the same debconf warning + (it's two, two, two warnings in one). This makes + the DEBIAN_FRONTEND case bug moot (closes: Bug#131801) + * Added powerpc64-linux target to multiarch since + work is progressing on that target and the machines + are due to hit the shelves Very Soon(TM). + + -- Christopher C. Chimelis Fri, 1 Feb 2002 17:06:29 -0500 + +binutils (2.11.92.0.12.3-5) unstable; urgency=high + + * Fix signed char assumption in i386 disassembly bits + (closes: Bug#126993) + + -- Christopher C. Chimelis Mon, 8 Jan 2002 17:27:17 -0500 + +binutils (2.11.92.0.12.3-4) unstable; urgency=high + + * Go back to enabling archs by enumeration for + multiarch. Apparently, a few aren't enabled + with --enable-targets=all (sparc64-linux, namely). + Besides, multiarch was incredibly large, which + was probably unneeded. + + -- Christopher C. Chimelis Wed, 26 Dec 2001 13:53:49 -0500 + +binutils (2.11.92.0.12.3-3) unstable; urgency=high + + * Include patch from Alan Modra to fix more + refcount problems on hppa. + + -- Christopher C. Chimelis Fri, 7 Dec 2001 05:42:04 -0500 + +binutils (2.11.92.0.12.3-2) unstable; urgency=high + + * Include patch from Alan Modra to fix hppa linking + woes wrt undefined symbols (closes: Bug#121993) + + -- Christopher C. Chimelis Wed, 5 Dec 2001 04:14:51 -0500 + +binutils (2.11.92.0.12.3-1) unstable; urgency=high + + * New upstream version (synced with CVS 2001-11-21) + * Upstream: Fix a linker symbol version bug + for common symbols. + * Upstream: Update handling relocations against + the discarded sections. You may need to apply + the kernel patch enclosed here to your kernel + source. + * Upstream: Support "-march=xxx -mipsN" for mips + gas if they are compatible. + * Upstream: Fix a regression when linking with + non-ELF object files. + * Includes Alan Modra's patch to reduce stub sizes + on HPPA. Should help C++ on HPPA. + * Once again includes a mips patch from HJ Lu. + * My documentation changes were cleaned up and + accepted upstream, so the gas manpage fixes go + away (hurray!). + * Stopped iterating targets for binutils-multiarch + and started enabling all of them. This saves + maintenance time since new targets will be + automatically supported in future uploads + and existing targets that I didn't include + before will be supported from now on. This may + grow build time and the libbfd in the multiarch + package, but it's worth it. + * Also, started using the --enable-64-bit-bfd + flag for configuring multiarch. I don't know + why I didn't realise this wasn't there before + since I test with it all of the time. + + -- Christopher C. Chimelis Fri, 30 Nov 2001 20:11:42 -0500 + +binutils (2.11.92.0.10-4) unstable; urgency=high + + * The "Fingers crossed" upload. + * Enable combreloc by default for s390 again. + Rumour has it that it worked before, but there + was a misunderstanding in the s390 developer + community, hence the disabling in the past. + * Fix the ld texinfo file to not mention the old + oformat invocation (closes: Bug#116182) + * Next upload should include the mips updates and + some powerpc updates. I just need time to test + those out first. + + -- Christopher C. Chimelis Fri, 23 Nov 2001 23:23:22 -0500 + +binutils (2.11.92.0.10-3) unstable; urgency=high + + * Replace HPPA reloc patch with patches from Alan + Modra upstream. + * Add upstream patch to fix quoted -rpath bug + (closes: Bug#107214) + + -- Christopher C. Chimelis Sat, 10 Nov 2001 18:19:05 -0400 + +binutils (2.11.92.0.10-2) unstable; urgency=high + + * Disable -z combreloc enable patch on S/390 + since it's not supported there yet + (closes: Bug#117087) + + -- Christopher C. Chimelis Fri, 26 Oct 2001 00:07:01 -0400 + +binutils (2.11.92.0.10-1) unstable; urgency=high + + * New upstream version (synced with CVS 2001-10-21) + * Upstream: Fix the ELF/PPC linker. + * Upstream: Fix the ELF/cris linker. + * Upstream: Fix ELF strip. + * Includes beginnings of Altivec support + (closes: Bug#98617) + * Fixes use of BookE instruction format on 4xx + PowerPC (closes: Bug#116627) + * Includes patches from Alan Modra to fix hppa + relocations. + * Forgot to close the previous PPC bug with last + upload (closes: Bug#116454) + * Moved to enclosing a bzipped tarball rather than + a gzipped one to save download time for everyone + involved. Build-deps adjusted accordingly. + + -- Christopher C. Chimelis Tue, 23 Oct 2001 03:29:49 -0400 + +binutils (2.11.92.0.7-2) unstable; urgency=high + + * Include a patch from H.J Lu to fix a powerpc + issue not shown in the testsuite results. + + -- Christopher C. Chimelis Fri, 19 Oct 2001 00:49:04 -0400 + +binutils (2.11.92.0.7-1) unstable; urgency=high + + * New upstream release (synced with CVS 2001-10-16) + * Upstream: Fix all breakages introduced in 2.11.92.0.5 + * No mips/ dir patches need to be applied with this one. + Woohoo! + * Removed patches from debian/patches that are already + applied upstream. + * Patched version strings to reflect that this is a + Debian release at the request of upstream (to prevent + confusion, apparently). + * Applied patch from H.J. Lu to fix mips section + misalignment. + * Applied patch from Jakub Jelinek to fix kernel linking + on i386 and possibly other archs (closes: Bug#116041) + * Fixed postinst and prerm for binutils-doc to test that + the files exist before calling install-info. This should + fix the odd circumstance when binutils-doc is packaged on + an arch that doesn't support gprof (or any other dir for + that matter) and, therefore, the docs that are usually + made in that dir aren't made. This is particularly true + with gprof on mips. + + -- Christopher C. Chimelis Wed, 17 Oct 2001 18:56:51 -0400 + +binutils (2.11.92.0.5-3) unstable; urgency=high + + * Enable -z combreloc on all targets. This will make + prelinking possible with the prelink package. Please + test this on all archs prior to upload. If it fails, file + a bug immediately and I'll disable the patch for that + platform. + * Added patches from Alan Modra (from CVS) to fix other + archs after the refcount patch broke them. This supercedes + the powerpc patch, so I replaced that with this. + (closes: Bug#115218) + * Added patch from H.J. Lu (from CVS) to fix IA64 linker + problems as well. + * Added patch from David Kimdon to specify which filename is + causing an error if that filename is a dir (closes: Bug#45832). + * Removed workaround patch for stabs problem on Alpha since + it appears to be causing problems on mips and is no longer + needed on Alpha anyway. + * Now runs the testsuite and includes the results in the + binutils package for reference. + + -- Christopher C. Chimelis Sat, 13 Oct 2001 15:10:20 -0400 + +binutils (2.11.92.0.5-2) unstable; urgency=high + + * Applied fix from H.J. Lu to fix PowerPC target + (closes: Bug#115285). Thanks to Jack Howarth + for forcing the issue upstream. + + -- Christopher C. Chimelis Fri, 12 Oct 2001 23:14:51 -0400 + +binutils (2.11.92.0.5-1) unstable; urgency=high + + * New upstream release (synced with CVS 2001-10-05) + * Upstream: Support gcc 3.1 for IA64. + * Upstream: Support prelink for ELF/PPC. + * Upstream: Fix an ELF/x86 linker bug for Oracle + (closes: Bug#113614) + * Upstream: Fix a weak symbol bug. + * Upstream: Support locale. + + -- Christopher C. Chimelis Tue, 9 Oct 2001 19:53:49 -0400 + +binutils (2.11.90.0.31-2) unstable; urgency=high + + * Applied IA64 patch from CVS to fix gcc issues + on IA64. + + -- Christopher C. Chimelis Mon, 24 Sep 2001 12:45:29 -0400 + +binutils (2.11.90.0.31-1) unstable; urgency=high + + * New upstream source (synced with CVS 2001-08-30) + * Upstream: Fix a MIPS linker bug. + * Now applying mips diffs from H.J. Lu (upstream) + for better MIPS and MIPS64 support. + * Applied patch from Christopher Cramer to fix + gasp .REG issue (closes: Bug#110560) + + -- Christopher C. Chimelis Sat, 1 Sep 2001 23:42:22 -0400 + +binutils (2.11.90.0.29-1) unstable; urgency=high + + * New upstream source (synced with CVS 2001-08-27) + * Upstream: Fix an Alpha assembler bug. + * Upstream: Fix an IA64 linker bug. + * Upstream: Fix a MIPS linker bug. + * Upstream: Support '-z combreloc|nocombreloc' in linker. + + -- Christopher C. Chimelis Thu, 30 Aug 2001 04:48:04 -0400 + +binutils (2.11.90.0.27-4) unstable; urgency=high + + * Argh. Really remove the manpages from multiarch + this time (closes: Bug#110410) + + -- Christopher C. Chimelis Tue, 28 Aug 2001 14:32:34 -0400 + +binutils (2.11.90.0.27-3) unstable; urgency=high + + * Include hppa patch to force error + (closes: Bug#109173) + * Fix manpages - seems that I accidentally included + the multiarch manpages rather than the target + manpages (sorry). + * Partial update to as manpage to denote arch options + and added options for the rest of the targets + Still need to elaborate on them, though. More + changes are forthcoming (closes: Bug#110127) + + -- Christopher C. Chimelis Mon, 27 Aug 2001 10:13:27 -0400 + +binutils (2.11.90.0.27-2) unstable; urgency=high + + * Remove bash dependency...ash's behaviour has + already been modified, so it should be able + to build binutils now (closes: Bug#106992) + * Includes new S/390 patch (closes: Bug#109300) + * Could never reproduce objdump segfault and + never got a reply on the bug report + (closes: Bug#93884) + * Can't reproduce m68k segfault either + (closes: Bug#87714) + + -- Christopher C. Chimelis Mon, 20 Aug 2001 23:07:30 -0400 + +binutils (2.11.90.0.27-1) unstable; urgency=high + + * New upstream source (synced with 20010810 CVS) + * Upstream: Fixed x86 linker bug. + * Reverted a patch to gas to dodge a bug in STABS output + on Alpha using gcc 2.95.4, so alpha can be in sync + with the rest of the archs now. + * Fixes strip problems with busybox (closes: Bug#106593) + * Kernels should compile ok again on i386 + (closes: Bug#107190) + + -- Christopher C. Chimelis Thu, 16 Aug 2001 08:24:49 -0400 + +binutils (2.11.90.0.25-1) unstable; urgency=high + + * New upstream source (synced with 20010726 CVS) + * Upstream: fix i386 assembler bug. + * Upstream: "make check" has 2 failures in the + ld-selective test in ld on Linux/alpha. They + should be marked xfail. Fixed in the next release. + * Removed m68k patch (closes: Bug#106431) + * Man pages appear to be correctly generated now + (closes: Bug#98569, Bug# 98938) + * Added bash build dependency (closes: Bug#106992) + * Should compile ok on powerpc (the last one did + also...don't know why voltaire's build daemon failed). + I won't close this bug until I build it myself + on voltaire or hear back from the autobuilder folks + on PPC. + * Looking into the whole LD_LIBRARY_PATH issue that + keeps being brought up. I think the docs are wrong + because the templates say that it shouldn't obey that + at all. Can we please stop filing duplicate bugs for + this? I would greatly appreciate it... + + -- Christopher C. Chimelis Wed, 1 Aug 2001 07:06:52 -0400 + +binutils (2.11.90.0.24-1) unstable; urgency=high + + * New upstream source (synced with 20010714 CVS) + * DO NOT COMPILE FOR ALPHA. I need to fix gcc 2.95.4 + prior to this release working on Alpha correctly + (long story). + * Upstream: Avoid COPY relocs on i386 + * Upstream: Fix IA64 assembler (please try this and let me know) + * Upstream: Fix a static linking the PIC object files on ia32 + * Upstream: Add the version script support for --export-dynamic + * Upstream: Fix sparc/elf for linux/sparc + * Upstream: Fix alpha/elf for gcc 3.0 + * Supposedly required for gcc-3.0 usage on many platforms + * Add s390 to multiarch list (closes: Bug#98095) + * Supposedly good on mips, but please check. I emailed Ryan + to see if bug 98095 still happens, but never got a reply. + If I get around it, I'll check it myself since my mips + lives once again. + * Retake my package from Matt (next time we agree to an NMU, + please don't change the maintainer name...no wonder I didn't + get any bug reports!) + * Cross-compilation support will be added in the next upload + (I'll be uploading alpha debs with the next release as well, + the alpha problem outweighs cross-compilation support in + priority right now). + + -- Christopher C. Chimelis Thu, 19 Jul 2001 05:12:05 -0400 + +binutils (2.11.90.0.7-2) unstable; urgency=high + + * Applied patch from Alan Modra to fix m68k + assertion problems (closes: Bug#96352) + * Applied srec patch from Richard Henderson for + alpha. + + -- Christopher C. Chimelis Wed, 9 May 2001 03:11:19 -0400 + +binutils (2.11.90.0.7-1) unstable; urgency=high + + * New upstream source (synced with 20010425 CVS) + * Upstream: Fix the -Bsymbolic bug introduced in + binutils 2.11.90.0.5 (closes: Bug#95168) + + -- Christopher C. Chimelis Sun, 29 Apr 2001 20:03:22 -0400 + +binutils (2.11.90.0.5-1) unstable; urgency=high + + * New upstream source (synced with 20010414 CVS) + * Upstream: Fix in IA64 assembler + * Upstream: Change Linux/MIPS to use SVR4 MIPS ABI + rather than IRIX ABI. + * The above change may cause problems for MIPS. + If so, please file a bug and I'll revert those + changes if need be. I suspect that glibc, gcc, + and the kernel may eventually follow suit, though + to fit in with this change (it makes sense... + see the symbol ordering problems threads on the + binutils list for more info). + * Upstream: IA32 gas bug fixed...no further details + provided, unfortunately. + * Reportedly fixes core dumping when trying to link + object files from other platforms (now warns) + (closes: Bug#60502) + * Includes Philip Blundell's ARM PLT patch finally... + sorry for the delay (closes: Bug#94181) + * m68k problems should be fixed by now. Wish I had + gotten more feedback, but I didn't so I'm assuming it + works at this point (closes: Bug#74396) + * Stopped compiling cross-compiler packages until we + work out a better system for the entire toolchain. + Sorry, but it was taking far too long on even fast + machines and I've gotten more complaints about the + current arrangement than I have positive feedback. + (closes: Bug#91120, Bug#91119, Bug#91118, Bug#91117, + Bug#91116, Bug#88311, Bug#78028, Bug#90177) + * Fixed readelf manpage so that it no longer says that + it is a preprocessor for assembly programs + (closes: Bug#90798) + + -- Christopher C. Chimelis Tue, 17 Apr 2001 20:07:14 -0400 + +binutils (2.11.90.0.1-1) unstable; urgency=high + + * New upstream source (synced with 20010309 + CVS). + * Fixed misapplied m68k ld patch. + I am hoping that this almost totally fixes + m68k ELF for now. + * Fixed typo in mips patch and applied another + mips patch from Daniel Jacobowitz. + * Should no longer build same-arch cross + packages. Please let me know if this fix + worked so that I can close the bugs (I have + no access to such an arch at the moment) + * Made urgency high since m68k really needs + this if the bugs are truly fixed. Even if + not, this version is infinitely better on + at least two platforms than prior ones were. + + -- Christopher C. Chimelis Thu, 15 Mar 2001 16:29:32 -0500 + +binutils (2.10.91.0.2-4) unstable; urgency=low + + * Applied m68k ld and bfd patches from + Michael Fedrowitz to hopefully make things + better on m68k. + + -- Christopher C. Chimelis Sun, 11 Mar 2001 20:16:44 -0500 + +binutils (2.10.91.0.2-3) unstable; urgency=low + + * Adjusted the priority of binutils-doc to + optional. + * Added debhelper build-depends (closes: Bug#87690) + * Fixed postinst problem for new binutils + installations (closes: Bug#87911) + + -- Christopher C. Chimelis Thu, 1 Mar 2001 15:06:50 -0500 + +binutils (2.10.91.0.2-2) unstable; urgency=low + + * Add support for SH and IA64 to binutils-multiarch. + * Applied m68k gas patch from Michael Fedrowitz + in hopes that this will fix the grave bug that + has been such a pain to m68k folks. I'll leave + the bug open until it's verified that it works + ok. + * Applied IA-64 printf patch (closes: Bug#82702) + * Kernels appear to be building fine with this + release on all archs available to me + (closes: Bug#77610) + * Added text during postinst that informs users + to modify their i386 kernel Makefiles for the + --oformat change (closes: Bug#86995) + * Incorporated remaining mips diffs that weren't + already applied upstream (closes: Bug#81280) + * Sparc/sparc64 patch seems to be doing fine, so + closing the bug (closes: Bug#86781) + * Added non-linux cross- package support to rules + (closes: Bug#79948) + * Close misc bugs: + Missing info file in binutils-doc (closes: Bug#78754) + + -- Christopher C. Chimelis Thu, 22 Feb 2001 19:36:12 -0500 + +binutils (2.10.91.0.2-1) unstable; urgency=low + + * New upstream version. + * Added weak symbol relocation patch for sparc/sparc64. + * Included m68k ELF fix from Michael Fedrowitz. + * BIG NOTE: any i386 kernels compiled with this will need + to be patched to change the ld option '-oformat' to + '--oformat' (extra hyphen). + + -- Christopher C. Chimelis Tue, 20 Feb 2001 21:32:44 -0500 + +binutils (2.10.1.0.2-1) unstable; urgency=low + + * New upstream release (really prerel, but better than + using a CVS version). + * Should re-add Compaq demangling style to all + tools (alpha-only). + * Again, hopefully fixes m68k ELF support...still have + no idea why or how this was broken before. + + -- Christopher C. Chimelis Mon, 20 Nov 2000 16:25:44 -0500 + +binutils (2.10.0.27-0.cvs20001011.2) unstable; urgency=low + + * Applied another PowerPC patch to correct the + implementation of .protected and .hidden in the + linker. This should also aid in the glibc + transition on PowerPC. + + -- Christopher C. Chimelis Tue, 17 Oct 2000 13:23:40 -0400 + +binutils (2.10.0.27-0.cvs20001011.1) unstable; urgency=low + + * Applied PowerPC weak symbol patch from CVS to aid + in glibc transition on that platform. + + -- Christopher C. Chimelis Sun, 15 Oct 2000 19:12:22 -0400 + +binutils (2.10.0.27-0.cvs20001011) unstable; urgency=low + + * Grabbed a new CVS version since it backs out a + change that prevented current gcc snapshots from + linking properly to libstdc++v3. This may also + solve some other problems related to global + section symbols (feedback appreciated). + * Finally changed my email address in the control + file (how I overlooked this after all of this + time I'll never know). + + -- Christopher C. Chimelis Wed, 11 Oct 2000 08:59:36 -0400 + +binutils (2.10.0.27-0.cvs20001008) unstable; urgency=low + + * Removed configure.info.gz from binutils-doc since + it didn't really belong there. (closes: Bug#72746) + * Update for hppa/hppa64 targets (included testsuite + changes committed on 07-Oct-2000). (closes: Bug#71524) + * Upstream change to elflink.h to hopefully stop + segfaults on some archs when linking binaries to + shared libs. + + -- Christopher C. Chimelis Sun, 8 Oct 2000 16:14:08 -0400 + +binutils (2.10.0.27-0.cvs20000923.1) unstable; urgency=low + + * Fixed rules file so that builds don't fail when compiling the + binary-arch target (added binary-cross to binary-arch). + * Fixed harmless attempt at removing builddir-avr twice. + + -- Christopher C. Chimelis Thu, 28 Sep 2000 10:39:12 -0400 + +binutils (2.10.0.27-0.cvs20000923) unstable; urgency=low + + * CVS snapshot from 2000-09-23. + * Should fix some (most) HPPA issues. + * Adds binutils-m68k cross-assembler. + + -- Christopher C. Chimelis Sun, 24 Sep 2000 10:19:20 -0400 + +binutils (2.10.0.26-2) unstable; urgency=low + + * Added the avr target for Amtel's AVR MCU's + * Applied Frank I. Smith to generate packages for + multiple cross targets: + + Bump rev number, NOP. + + Testing out bumping up the rev number. + + Added powerpc, arm, mipsel cross binutils packages. + + -- Christopher C. Chimelis Fri, 22 Sep 2000 17:31:44 -0400 + +binutils (2.10.0.26-1) unstable; urgency=low + + * New upstream source. + * Added mips-linux, hppa-linux, and hppa64-linux to multiarch targets + + -- Christopher C. Chimelis Sun, 17 Sep 2000 01:05:49 -0400 + +binutils (2.10.0.24-1) unstable; urgency=low + + * New upstream source. + * Fixes ia32 assembler buglet. + * (Hopefully) fixes PPC visibility problems with + glibc 2.2 + + -- Christopher C. Chimelis Thu, 24 Aug 2000 16:52:44 -0400 + +binutils (2.10.0.18-3) unstable; urgency=low + + * Added build depends stuff. + + -- Christopher C. Chimelis Sat, 5 Aug 2000 21:09:04 -0400 + +binutils (2.10.0.18-2) unstable; urgency=low + + * Added proviso to control file saying that -multiarch + should not be installed by the average user. + + -- Christopher C. Chimelis Sat, 29 Jul 2000 20:07:15 -0400 + +binutils (2.10.0.18-1) unstable; urgency=low + + * New upstream source. + * Should address some needed things for glibc 2.2 + (added new DT_XXXX dynamic tags and fixes DT_NEEDED + link bug) + * Reapplied the now-infamous "ObjC patch" until + we can figure out why we still have this problem + (hint hint hint...we really need to do this). + + -- Christopher C. Chimelis Sat, 22 Jul 2000 13:18:27 -0400 + +binutils (2.10.0.9-4) unstable; urgency=low + + * Applied a patch from Ben Collins to fix sparc64 + linker scripts + + -- Christopher C. Chimelis Sat, 8 Jul 2000 07:24:10 -0400 + +binutils (2.10.0.9-3) unstable; urgency=low + + * Applied a patch from the libstdc++ mailing list to + make sure that the linker doesn't eat the eh_frame + section. + + -- Christopher C. Chimelis Fri, 7 Jul 2000 10:26:59 -0400 + +binutils (2.10.0.9-2) unstable; urgency=low + + * Wow, already a bug fix. + * binutils-dev now provides libiberty.h + + -- Christopher C. Chimelis Fri, 23 Jun 2000 19:54:39 -0400 + +binutils (2.10.0.9-1) unstable; urgency=low + + * New upstream version (more linux-specific). + + -- Christopher C. Chimelis Fri, 23 Jun 2000 14:31:04 -0400 + +binutils (2.10-1) unstable; urgency=low + + * New upstream version (finally, a real release!) + + -- Christopher C. Chimelis Wed, 21 Jun 2000 19:08:14 -0400 + +binutils (2.9.5.0.46-1) unstable; urgency=low + + * New upstream source. + * ELF visibility attribute should work correctly now. + * ia32 "jmp" instructions are now assembled differently + to use relocation for global jumps (affects PIC asm + code). + + -- Christopher C. Chimelis Thu, 8 Jun 2000 21:34:42 -0400 + +binutils (2.9.5.0.42-1) unstable; urgency=low + + * New upstream source. + * Includes a testcase for hidden symbol support. + + -- Christopher C. Chimelis Fri, 19 May 2000 20:48:52 -0400 + +binutils (2.9.5.0.41-1) unstable; urgency=high + + * New upstream source. + * Now includes patch to enable hidden symbol support + needed for gcc 3.0 testing. + + -- Christopher C. Chimelis Fri, 5 May 2000 20:38:41 -0400 + +binutils (2.9.5.0.37-1) frozen unstable; urgency=high + + * Was forced to bring the current frozen version up to + upstream 2.9.5.0.37 in order to fix a rather nasty + i386 gas bug and also since the existing ARM patch + applied in 2.9.5.0.31-3 has been superceded upstream + (closes:Bug#62119) + * Includes proper demangler support for Compaq compiler + usage on Alpha (may be superceded upstream shortly, + but is good enough for potato and for Compaq's usage) + (closes:Bug#62079) + * Added cross-compilation support for individual use. + Please note that the binary packages do not support + this. If you require this feature, you need to compile + the source package changing debian/rules. Also, if + you do this, YMMV since things on this front are changing + rapidly upstream and also because cross-compiling from + certain platforms to others may not work (i386->alpha, + for example). (closes:Bug#59246) + * Fixed replaces statement in binutils-multiarch + (closes:Bug#62496) + * Release Manager: I once again beg that this be included + in potato. I've freed up some time to deal with bug + reports quickly if needed. + + -- Christopher C. Chimelis Sat, 29 Apr 2000 04:03:39 -0400 + +binutils (2.9.5.0.31-3) frozen unstable; urgency=high + + * Applied patch to fix broken ARM code generation (closes:Bug#61977) + + -- Christopher C. Chimelis Fri, 7 Apr 2000 15:50:42 -0400 + +binutils (2.9.5.0.31-2) frozen unstable; urgency=high + + * Remove ld from binutils-multiarch since it doesn't want to + link kernels on several archs properly (fixes severity:important bug) + (closes: Bug#61719, Bug#61615, Bug#51625) + + -- Christopher C. Chimelis Mon, 3 Apr 2000 22:48:55 -0400 + +binutils (2.9.5.0.31-1) frozen unstable; urgency=high + + * Yet another patch (this time from H.J. Lu upstream) to fix + the unlink race condition bug. This is VERY important and + needs to be in potato. It also fixes the temp file creation + problem with objcopy on PPC (closes: Bug#60934) + * New upstream release. Fixes a serious Alpha bug along + with a demangler bug and several others (closes: Bug#61121) + * Should fix apt-get upgrade problem...please test + (closes: Bug#56175) + * Release manager: can we squeeze this in? I know it's a + new version, but the ELF bug on Alpha really needs to + be fixed along with the rest of the above and some others + not mentioned here. + + -- Christopher C. Chimelis Wed, 22 Mar 2000 05:05:12 -0500 + +binutils (2.9.5.0.22-5) frozen unstable; urgency=high + + * Applied fixed patch from Colin Phipps to seal the unlink + race condition in bfd/cache.c (closes: Bug#58865, Bug#57831) + * Installed a proper changelog in binutils-doc + (closes: Bug#58522) + * Closes other older bug (closes: Bug#55801) + * Included bbconv.pl in binutils main package in the doc dir + under the gprof subdir (closes: Bug#57521) + + -- Christopher C. Chimelis Tue, 14 Mar 2000 10:32:52 -0500 + +binutils (2.9.5.0.22-4) frozen unstable; urgency=high + + * Patched gprof/hertz.h to allow binutils to actually + build and work on Hurd (closes: Bug#57564) + * Patched bfd/cache.c to avoid a rare, but possible + security problem when as is creating/opening temp + files (closes: Bug#57831) + + -- Christopher C. Chimelis Thu, 17 Feb 2000 10:31:05 -0500 + +binutils (2.9.5.0.22-3) frozen unstable; urgency=high + + * Removed standards.info...do we really need seven + bugs filed for the same problem + (closes: Bug#54521, Bug#54546, Bug#54614, Bug#54682, Bug#55402, Bug#55582, Bug#55602) + * Changed binutils-multiarch extended description + to mention that a cross-assembling gas is not + included (closes: Bug#49308) + * Closing a bug because it related to lack of disk space + (closes: Bug#52714) + + -- Christopher C. Chimelis Wed, 19 Jan 2000 19:28:09 -0500 + +binutils (2.9.5.0.22-2) unstable; urgency=high + + * Added getopt.h include that was omitted in the -taso patch + (closes: Bug#52380) + * Fixed table misalignment when calling objdump --info + (closes: Bug#51517) + * Added Debian changelog to binutils-doc (closes: Bug#52574) + + -- Christopher C. Chimelis Wed, 15 Dec 1999 19:14:05 -0500 + +binutils (2.9.5.0.22-1) unstable; urgency=high + + * New upstream version. + * More MIPS fixes. + * Added support for -taso linker flag for Alpha. + * Reapplied all previous patches. + + -- Christopher C. Chimelis Wed, 7 Dec 1999 01:08:51 -0600 + +binutils (2.9.5.0.19-1) unstable; urgency=high + + * New upstream version + * Fixes some MIPS problems + * Reapplied the ObjC patch (is this ever going to be fixed upstream) + since it's badly needed right now + + -- Christopher C. Chimelis Thu, 4 Nov 1999 15:00:35 -0400 + +binutils (2.9.5.0.16-3) unstable; urgency=low + + * Added support for mipsel-linux in binutils-multiarch + + -- Christopher C. Chimelis Thu, 4 Nov 1999 15:00:35 -0400 + +binutils (2.9.5.0.16-2) unstable; urgency=low + + * Added a replaces field in the control file to fix + previous file overwrite problems (closes: Bug#47518, Bug#47938) + * Verified manpages are up to date (closes: Bug#18483) + * Added m68k-rtems to targets in -multiarch in hopes + that it will actually work as advertised (closes: Bug#47468) + + -- Christopher C. Chimelis Mon, 25 Oct 1999 15:58:55 -0400 + +binutils (2.9.5.0.16-1) unstable; urgency=low + + * New upstream version. + * Massive bugfix upload on the Debian side: + * Fixes changelog problems between all of the binutils + debs (closes: Bug#47133, Bug#47208, Bug#47211) + * Fixes other overwrite problems (closes: Bug#46991, Bug#47024, Bug#46074) + * Multiarch should now make good diversions when + upgrading (closes: Bug#47359) + * Applied patch from Kevin Buhr to fix ld segfaults with + empty archives (closes: Bug#47019) + * Should have fixed info install problems by now + (closes: Bug#35935) + + -- Christopher C. Chimelis Fri, 15 Oct 1999 03:18:55 -0400 + +binutils (2.9.5.0.14-1) unstable; urgency=low + + * New upstream version. + * Thanks to Matthias Klose for the following: + * Separate documentation to binutils-doc package. + * debian/rules: + - Remove extra /usr/share/doc/binutils/changelog.gz file. + - Move bfd docs to binutils-dev package. + - Move upstream changelogs to binutils-doc package. + - Remove standard GNU info files left in /usr/share/info. + - Call dh_installdocs for all packages. + * debian/*{dirs,files}: Remove. Mention explicitely in debian/rules. + + -- Christopher C. Chimelis Wed, 6 Oct 1999 03:18:55 -0400 + +binutils (2.9.5.0.12-2) unstable; urgency=low + + * Applied patch from Matthias Klose to fix many issues including architecture detection. + * Rules file is now much prettier and easier to manage. + * Binutils is now built for i386 rather than i486 in the rules file (oops). + * Added diversion for readelf in binutils-multiarch. + + -- Christopher C. Chimelis Tue, 21 Sep 1999 03:39:08 -0400 + +binutils (2.9.5.0.12-1) unstable; urgency=low + + * Massive bugfix release. + * New upstream source (finally) (closes: Bug#44934) + * Fixes upstream bugs on many platforms. + * Gives powerpc a working binutils again. (closes: Bug#45052) + * Now provides .code16 support on i386 (please test) + * Manpage for objdump should now be complete (closes: Bug#27039) + * Put together manpages for gasp and the new binary readelf (closes: Bug#21918) + * Fixes nm core dump problem (closes: Bug#41999) + * Applied patches from Ben Collins to add sparc64 support (closes: Bug#44426) + * Update Standards version + * FHS compliance + + -- Christopher C. Chimelis Sat, 18 Sept 1999 01:21:05 -0400 + +binutils (2.9.5.0.12-0.2) experimental; urgency=low + + * Added Sparc/Sparc64 changes from Ben Collins (I really need a Sparc one of these days). + * Again, this should be the last experimental before a new release. + + -- Christopher C. Chimelis Fri, 17 Aug 1999 16:32:05 -0400 + +binutils (2.9.5.0.12-0.1) experimental; urgency=low + + * New upstream version. + * Should be the last experimental before a new release. + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.5.0.10-0.1) experimental; urgency=low + + * New upstream version. + * Didn't apply PPC patches...let me know if still needed + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.5.0.6-0.1) experimental; urgency=low + + * New upstream version. + * Didn't apply PPC patches...let me know if still needed + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.4.0.8-0.1) unstable; urgency=low + + * New upstream version. + * Applied as much of the PPC patches as I could. + + -- Christopher C. Chimelis Thu, 15 Jul 1999 12:46:45 -0400 + +binutils (2.9.4.0.3-0.1) unstable; urgency=low + + * New upstream version. + * Apply patch from Richard Henderson to fix PPC's libpath. + * Apply patch from Franz Sirl to fix Richard Henderson. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.4.0.2-0.1) unstable; urgency=low + + * New upstream version. 2.9.4.0.1 was hurriedly recalled. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.4.0.1-0.1) unstable; urgency=low + + * New upstream version. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.1.0.25-2) unstable; urgency=low + + * Added ObjC patch AGAIN...sorry about that + + -- Christopher C. Chimelis Sun, 23 May 1999 15:14:35 -0400 + +binutils (2.9.1.0.25-1) unstable; urgency=low + + * New upstream version - Fixes a PIII asm optimisation bug + + -- Christopher C. Chimelis Sun, 23 May 1999 00:36:55 -0400 + +binutils (2.9.1.0.24-2) unstable; urgency=low + + * Reapplied ObjC patch...apparently it's still needed. + + -- Christopher C. Chimelis Mon, 10 May 1999 19:53:15 -0400 + +binutils (2.9.1.0.24-1) unstable; urgency=low + + * New upstream release - fixes too many little things to mention. + + -- Christopher C. Chimelis Tue, 3 May 1999 16:35:08 -0400 + +binutils (2.9.1.0.23-1) unstable; urgency=low + + * New upstream release - incorporates sparc64 and arm patches. + * Added RPATH patch from Joel Klecker since my last upload failed. + * Removed ObjC patch. Let me know if it is still needed (doubtful, but + still might be). + + -- Christopher C. Chimelis Mon, 5 Apr 1999 13:26:55 -0500 + +binutils (2.9.1.0.22b-2) unstable; urgency=low + + * Added patch from Joel Klecker to finally (properly) fix the rpath issue + (Thanks, Joel!). + + -- Christopher C. Chimelis Fri, 2 Apr 1999 18:14:05 -0600 + +binutils (2.9.1.0.22b-1) unstable; urgency=low + + * Converted package to CVS (so bear with any delays in handling + bug fixes; I'm new to CVS ironically) + * New upstream version (sparc64 and ARM patches again added). + * Added support for mingw32 target in binutils-multiarch + + -- Christopher C. Chimelis Fri, 12 Mar 1999 03:51:44 -0600 + +binutils (2.9.1.0.19a-4) frozen unstable; urgency=high + * Added sparc64 patches from Steve Dunham to fix sparc64 targets + * Modified rules to add support for gcc/egcs by arch. + + -- Christopher C. Chimelis Mon, 1 Feb 1999 15:51:19 -0600 + +binutils (2.9.1.0.19a-3) frozen unstable; urgency=high + + * Reverted a patch to elflink.h that caused problems for + Obj-C code (symbols weren't exported with a size or + type). + + -- Christopher C. Chimelis Thu, 21 Jan 1999 19:25:17 -0600 + +binutils (2.9.1.0.19a-2) frozen unstable; urgency=low + + * Added arm-linux as multiarch target (sorry Jim). + * Uploaded to frozen to fix strange intermittant kernel + compilation problems (Fixes #31434). + * Fixed multiarch's postinst script to check for + c++filt.single before trying to remove it to prevent + warning messages if using g++ from egcs. + * Fixed typo in multiarch's postrm (addr2line) (Fixes: #31533) + * Added links to .so's for clean removal in the future (Fixes: #31536) + + -- Christopher C. Chimelis Fri, 8 Jan 1999 15:28:32 -0600 + +binutils (2.9.1.0.19a-1) unstable; urgency=low + + * New upstream version; fixes some Alpha problems and other archs + should benefit also. + * Added ARM target patch from Corel again (still not in upstream). + + -- Christopher C. Chimelis Mon, 4 Jan 1999 20:24:36 -0600 + +binutils (2.9.1.0.16-1) unstable; urgency=low + + * New upstream version; merges some ARM patches for Netwinders + * Added patch for ARM target from Corel (thanks Jim Pick) + + -- Christopher C. Chimelis Mon, 30 Nov 1998 16:59:25 -0600 + +binutils (2.9.1.0.15-5) frozen unstable; urgency=low + + * Reuploaded to frozen (why it wasn't there earlier....) + + -- Christopher C. Chimelis Mon, 30 Nov 1998 16:37:08 -0600 + +binutils (2.9.1.0.15-4) unstable frozen; urgency=low + + * Removed c++filt diversion in -multiarch to prevent conflicting + diversions when using egcs' g++ (which also wants to divert c++filt) + + -- Christopher C. Chimelis Wed, 25 Nov 1998 18:06:17 -0600 + +binutils (2.9.1.0.15-3) unstable frozen; urgency=low + + * Made Roman's changes "official" (thanks Roman). + + -- Christopher C. Chimelis Mon, 2 Nov 1998 05:46:56 -0600 + +binutils (2.9.1.0.15-2.1) unstable; urgency=low + + * Non-maintainer upload with agreement from Chris. + * Use a different soname for multi-arch libbfd and libopcodes; this + fixes the problem that the single-arch binaries (as and the diverted + ones) will all dump core because they're runtime-linked against the + multi-arch libs. (Fixes: #28656) + * Due to the above, binutils-multiarch also needs ldconfig in postinst + now. + * Fixup diversions once again: Do not even package the ldscripts for the + native architecture, so diversions for files in /usr/lib/ldscripts + aren't necessary. + * Also remove diversions on abort-install. + * Remove now obsolete diversions in preinst. + * Also symlink /usr/doc/binutils-multiarch to binutils, and do not + put /usr/doc/binutils in the package again. + * Put the symlinks libbfd.so and libopcode.so into binutils-dev, so one + can link to them. + + -- Roman Hodek Sat, 31 Oct 1998 11:31:14 +0100 + +binutils (2.9.1.0.15-2) unstable; urgency=low + + * Fixed binutils-multiarch diversions + * Reverted elf.c to .13 version to fix bug in strip + + -- Christopher C. Chimelis Tue, 27 Oct 1998 05:26:28 -0600 + +binutils (2.9.1.0.15-1) unstable; urgency=low + + * New upstream version. + * Moved over to debhelper and updated standards version to 2.4.1.4. + * Adds 3DNow instruction support for AMD processors. + * Fixes MANY Alpha bugs and a few for Sparc, PPC, and m68k reportedly. + * Added binutils-multiarch package to allow for multiple-arch support + (fixes bug #19471). + + -- Christopher C. Chimelis Thu, 14 Oct 1998 19:30:10 -0500 + +binutils (2.9.1.0.13-1) unstable; urgency=low + + * New upstream version, fixes bug #25354. + * Hopefully, all requested docs are included, fixes bug #21325. + * Fixes MANY Alpha problems. + * Reportedly may fix MIPS and Sparc problems also...see changelogs. + * Has been tested on x86's with great success. + + -- Christopher C. Chimelis Mon, 5 Oct 1998 23:02:08 -0500 + +binutils (2.9.1-0.2) frozen unstable; urgency=low + + * Fixed binutils-dev dependencies. + + -- Joel Klecker Tue, 05 May 1998 09:24:04 -0700 + +binutils (2.9.1-0.1) frozen unstable; urgency=medium + + * Non-maintainer release. + * New upstream release. + * Moved docs into subdirs where appropriate. + * Integrated the following changes from J.H.M. Dassen: + * Updated FSF address in copyright file. (lintian). + * Reported lack of "gasp" manpage (# ....), and link it to + undocumented(7). (lintian). + * Added a TODO list. + + -- Joel Klecker Thu, 30 Apr 1998 10:43:42 -0700 + +binutils (2.9-0.3) frozen unstable; urgency=medium + + * Added upstream patch which fixes a problem with strip + and netscape (#17971). + + -- Joel Klecker Tue, 28 Apr 1998 08:58:27 -0700 + +binutils (2.9-0.2) frozen unstable; urgency=low + + * Added more of the upstream docs (#21325). + * Put a changelog.gz symlink in /usr/doc/binutils + to satisfy policy. + + -- Joel Klecker Tue, 21 Apr 1998 09:02:22 -0700 + +binutils (2.9-0.1) frozen unstable; urgency=low + + * Non-maintainer release. + * New upstream release (bugfixes only). + + -- Joel Klecker Sun, 12 Apr 1998 04:11:07 -0700 + +binutils (2.8.1.0.23-1) unstable; urgency=low + + * New upstream version + * -dev replaces libc5-dev (#17840) + * No longer possible to link against shared libbbfd/opcodes (#18121) + + -- Galen Hazelwood Sat, 14 Mar 1998 18:19:10 -0700 + +binutils (2.8.1.0.19-1) unstable; urgency=low + + * New upstream version (#17296) + * Fixed typo in description (#16481) + * Fully replaces libbfd-dev (#16619) + + -- Galen Hazelwood Sun, 25 Jan 1998 15:37:03 -0700 + +binutils (2.8.1.0.17-1) unstable; urgency=low + + * New upstream version + * Rejoined libbfd and binutils packages (#15486) + * Added "SHELL=bash" to rules file (#14528) + * bfd info docs seem to be broken, don't install for now + + -- Galen Hazelwood Sat, 6 Dec 1997 14:55:26 -0700 + +binutils (2.8.1.0.15-1) unstable; urgency=low + + * New upstream version (#14250) + * Updated to Standard 2.3.0.0 + * Restored ansidecl.h to libbfd-dev (#14116) + + -- Galen Hazelwood Thu, 30 Oct 1997 20:04:24 -0700 + +binutils (2.8.1-2) unstable; urgency=low + + * Added 2.8.1.0.4 patch + + -- Galen Hazelwood Thu, 12 Jun 1997 20:49:57 -0600 + +binutils (2.8.1-1) unstable; urgency=low + + * New upstream version + * Added 2.8.1.0.1 patch + + -- Galen Hazelwood Fri, 30 May 1997 14:48:42 -0600 + +binutils (2.8-1) unstable; urgency=low + + * New upstream version + * Smarter debian build environment (automatic version handling) + * Added 2.8.0.3 patch + * Built with libc6 + + -- Galen Hazelwood Sun, 4 May 1997 11:16:12 -0600 + +binutils (2.7.0.9-3) frozen unstable; urgency=low + + * Patched for alpha support + * Distribute libiberty.a with -dev package (#8376) + * libbfd[x]-dev now has standard Provides/Conflicts behavior (#8377) + + -- Galen Hazelwood Fri, 28 Mar 1997 11:45:58 -0700 + +binutils (2.7.0.9-2) unstable; urgency=low + + * Moved 2.7.0.9 out of experimental (no longer unreleased beta) + + -- Galen Hazelwood Sun, 9 Mar 1997 23:43:19 -0700 + +binutils (2.7.0.9-1) experimental; urgency=low + + * New upstream beta version (fixes bug #7336) + * Split shared libraries (bfd) out of binutils (fixes bug #7244) + * No longer builds aout-binutils + + -- Galen Hazelwood Thu, 13 Feb 1997 00:27:18 -0700 + +binutils (2.7-6) unstable; urgency=low + + * Uses dpkg --print-gnu-build-architecture for build + * Demoted aout-binutils to priority "extra" + + -- Galen Hazelwood Mon, 27 Jan 1997 13:34:08 -0700 + +binutils (2.7-5) unstable; urgency=low (HIGH for m68k) + + * Added patch for m68k, will now compile X68 and kernel 2.1.15 + + -- Galen Hazelwood Tue, 31 Dec 1996 22:15:03 -0700 + +binutils (2.7-4) unstable; urgency=low + + * New maintainer + * Updated to new source format + * Fixed typo in script.1 (Fixes bug #4558) + * Fixed typo in as.1 (Fixes bug #5567) + * Postinst now calls ldconfig without explicit pathname (Fixes bug #6151) + + -- Galen Hazelwood Mon, 30 Dec 1996 12:10:25 -0700 + +binutils (2.7-3): + +Remove lib*.so links so the libs are not used for develpment. +gzip manpages + +Changes made by Michael Meskes in consent with David Engel. + +binutils (2.7-2): + +Include shared libraries +Strip shared libraries +Also update AOUT version +Minor changes to debian.rules + +binutils (2.7-1): + +Updated to new upstream version. + +Added a simple extended description (Bug#3574). + +Don't call ldconfig from postrm script (Bug#4246). + + LocalWords: Aurelien Jarno + --- binutils-2.20.orig/debian/control.cross.in +++ binutils-2.20/debian/control.cross.in @@ -0,0 +1,11 @@ +Package: binutils-__TARGET__ +Architecture: any +Depends: binutils, ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: The GNU binary utilities, for __TARGET__ target + This package provides GNU assembler, linker and binary utilities + for __TARGET__ target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for __TARGET__. --- binutils-2.20.orig/debian/binutils-gold.preinst +++ binutils-2.20/debian/binutils-gold.preinst @@ -0,0 +1,17 @@ +#! /bin/sh + +set -e + +if [ install = "$1" -o upgrade = "$1" ]; then + if [ -n "$2" ] && dpkg --compare-versions $2 lt 2.20-3; then + dpkg-divert \ + --package binutils-gold \ + --remove --rename \ + --divert /usr/bin/ld.single /usr/bin/ld || true + fi + + dpkg-divert \ + --package binutils-gold \ + --add --rename \ + --divert /usr/bin/ld.bfd-link /usr/bin/ld +fi --- binutils-2.20.orig/debian/binutils-multiarch.preinst +++ binutils-2.20/debian/binutils-multiarch.preinst @@ -0,0 +1,82 @@ +#! /bin/sh + +set -e + +if [ install = "$1" -o upgrade = "$1" ]; then + + for f in size objdump ar strings ranlib objcopy addr2line \ + readelf nm strip gprof; do + dpkg-divert --package binutils-multiarch \ + --add --rename \ + --divert /usr/bin/$f.single /usr/bin/$f + done + + dpkg-divert --package binutils-multiarch \ + --add --rename \ + --divert /usr/lib/libbfd-single.a /usr/lib/libbfd.a + dpkg-divert --package binutils-multiarch \ + --add --rename \ + --divert /usr/lib/libopcodes-single.a /usr/lib/libopcodes.a + + if [ -x /usr/bin/ld.single ]; then + rm -f /usr/bin/ld + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/bin/ld.single /usr/bin/ld \ + | grep -v '^No diversion' || true + fi + +fi + +# remove obsolete diversions +for f in elf32_sparc elf32ppc elf64alpha elf_i386 m68kelf \ + alpha i386linux m68klinux sparclinux sun4; do + for ext in x xbn xn xr xs xu; do + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/ldscripts/$f.$ext.single \ + /usr/lib/ldscripts/$f.$ext \ + | grep -v '^No diversion' || true + done +done +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libbfd-single-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libbfd-2.9.1.0.15.so.0.0.0 \ + | grep -v '^No diversion' || true +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libopcodes-single-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libopcodes-2.9.1.0.15.so.0.0.0 \ + | grep -v '^No diversion' || true +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libbfd-single.la \ + /usr/lib/libbfd.la \ + | grep -v '^No diversion' || true +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libopcodes-single.la \ + /usr/lib/libopcodes.la \ + | grep -v '^No diversion' || true +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/include/bfd.single.h /usr/include/bfd.h \ + | grep -v '^No diversion' || true +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/ldscripts.single /usr/lib/ldscripts \ + | grep -v '^No diversion' || true +if [ -e /usr/bin/c++filt.single ]; then +dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/bin/c++filt.single /usr/bin/c++filt \ + | grep -v '^No diversion' || true +fi + +if [ -e /usr/lib/libbfd-*-multiarch.so.0 ]; then + rm -f libbfd-*-multiarch.so.0; +fi +if [ -e /usr/lib/libopcodes-*-multiarch.so.0 ]; then + rm -f libopcodes-*-multiarch.so.0; +fi --- binutils-2.20.orig/debian/README.source +++ binutils-2.20/debian/README.source @@ -0,0 +1,2 @@ +The package uses dpatch to apply patches on top of the upstream source. +See /usr/share/doc/dpatch/README.source.gz. --- binutils-2.20.orig/debian/binutils-spu.postrm +++ binutils-2.20/debian/binutils-spu.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils-gold.postrm +++ binutils-2.20/debian/binutils-gold.postrm @@ -0,0 +1,10 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" -o "$1" = "abort-install" ]; then + dpkg-divert \ + --package binutils-gold \ + --remove --rename \ + --divert /usr/bin/ld.bfd-link /usr/bin/ld +fi --- binutils-2.20.orig/debian/binutils.postrm +++ binutils-2.20/debian/binutils.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils.postinst +++ binutils-2.20/debian/binutils.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/README.cross +++ binutils-2.20/debian/README.cross @@ -0,0 +1,22 @@ +Cross-binutils debian packages can be built directly from the binutils +source package. + +To build a cross-binutils package: + + o Download and unpack the binutils source package: + + apt-get source binutils + + o Ensure you have the binutils build-dependencies installed: + + apt-get build-dep binutils + + o Then build the cross-binutils package: + + TARGET= fakeroot debian/rules binary-cross + + (substitute your target name, e.g. "arm" or "m68k", instead of + "") + +--- +Nikita Youshchenko --- binutils-2.20.orig/debian/rules +++ binutils-2.20/debian/rules @@ -0,0 +1,1055 @@ +#!/usr/bin/make -f +# debian/rules file - for binutils (2.20) +# Based on sample debian/rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# Copyright 1998-2007 James Troup. +# Portions Copyright 2008-2009 Canonical Ltd. +# Portions Copyright 2008-2009 Matthias Klose. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +################################################################################ + +include /usr/share/dpatch/dpatch.make + +################################################################################ + +p_bin = binutils +p_dev = $(p_bin)-dev +p_mul = $(p_bin)-multiarch +p_gold = $(p_bin)-gold +p_doc = $(p_bin)-doc +p_hppa64 = $(p_bin)-hppa64 +p_spu = $(p_bin)-spu +p_src = $(p_bin)-source + +pwd := $(shell pwd) +d = debian/tmp +d_bin = $(d) +d_dev = debian/$(p_dev) +d_mul = debian/$(p_mul) +d_gold = debian/$(p_gold) +d_doc = debian/$(p_doc) +d_hppa64 = debian/$(p_hppa64) +d_spu = debian/$(p_spu) +d_src = debian/$(p_src) + +install_dir = install -d -m 755 +install_file = install -m 644 +install_script = install -m 755 +install_binary = install -m 755 -s + +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +SHELL = /bin/bash + +ifneq (,$(filter $(DEB_HOST_ARCH), amd64 armel i386 powerpc sparc)) + with_gold = yes +endif + +with_multiarch := yes + +CC = gcc +CXX = g++ +CFLAGS = -g -O2 +STRIP = strip --remove-section=.comment --remove-section=.note +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CC = $(DEB_HOST_GNU_TYPE)-gcc + CXX = $(DEB_HOST_GNU_TYPE)-g++ +endif + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS = -g -O0 +endif + +# see LP: #446478, would only fix the testcases +#ifeq ($(DEB_HOST_ARCH),armel) +# CFLAGS += -fno-section-anchors +#endif + +VERSION = $(shell sed -n 's/^ *VERSION=\(.*\)/\1/p' bfd/configure | head -1) +MULTI_VERSION = $(VERSION)-multiarch +HPPA64_VERSION= $(VERSION)-hppa64 +SPU_VERSION = $(VERSION)-spu + +DISTRIBUTION := $(shell lsb_release -is) +NJOBS = +# Support parallel= in DEB_BUILD_OPTIONS (see #209008) +SPACE = $(EMPTY) $(EMPTY) +COMMA = , +ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) +endif +ifneq (,$(findstring nogold,$(DEB_BUILD_OPTIONS))) + with_gold = disabled in DEB_BUILD_OPTIONS +endif +ifneq (,$(findstring nomult,$(DEB_BUILD_OPTIONS))) + with_multiarch = disabled in DEB_BUILD_OPTIONS +endif + +######################################## + +CONFARGS = \ + --enable-shared \ + --enable-plugins \ + --prefix=/usr \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --with-pkgversion="GNU Binutils for $(DISTRIBUTION)" + +ifeq ($(DEB_HOST_ARCH),sparc) + CONFARGS += --enable-targets=sparc64-linux-gnu + CONFLICTS = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" +endif +ifeq ($(DEB_HOST_ARCH),sparc64) + CONFARGS += --enable-targets=sparc-linux-gnu + CONFLICTS = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" +endif +ifeq ($(DEB_HOST_ARCH),powerpc) + CONFARGS += --enable-targets=powerpc64-linux-gnu,spu +endif +ifeq ($(DEB_HOST_ARCH),ppc64) + CONFARGS += --enable-targets=powerpc-linux-gnu,spu +endif +ifeq ($(DEB_HOST_ARCH),s390) + CONFARGS += --enable-targets=s390x-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),i386) + CONFARGS += --enable-targets=x86_64-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),kfreebsd-i386) + CONFARGS += --enable-targets=x86_64-kfreebsd-gnu +endif +ifeq ($(DEB_HOST_ARCH),mips) + CONFARGS += --enable-targets=mips64-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),mipsel) + CONFARGS += --enable-targets=mips64el-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),ia64) + CONFARGS += --disable-werror +endif + +with_check := yes +ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + with_check := disabled through DEB_BUILD_OPTIONS +endif +with_strip := yes +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + with_strip := disabled through DEB_BUILD_OPTIONS +endif +#ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel)) +# with_check := disabled for architecture $(DEB_HOST_ARCH) +#endif +ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel sparc)) + ignore_regressions := regressions ignored on architecture $(DEB_HOST_ARCH) +endif + +source_files = $(addprefix $(shell basename $(pwd))/, \ + $(filter-out %-stamp CVS debian builddir-% test-summary, $(wildcard *))) + +################################################################################ + +################ +# clean target # +################ + +clean: unpatch + $(checkdir) + -rm -fr builddir-multi builddir-single builddir-hppa64 builddir-spu builddir-gold + -find . -name \*.gmo -o -name \*~ -o -name \*.info ! -name sysroff.info | xargs rm -f + -rm -f $(pwd)/test-summary* + -rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_hppa64) $(d_src) $(d_spu) $(d_gold) + -rm -rf debian/patched debian/tmp debian/files* debian/substvars + -rm -f debian/*.orig debian/*.rej + chmod 644 debian/patches/*.dpatch + -rm -f *-stamp + +################################################################################ + +####################### +# single-arch targets # +####################### + +SINGLE_CONFARGS = $(CONFARGS) +ifeq ($(with_gold),yes) + SINGLE_CONFARGS += --enable-gold=both +endif + +configure-single-stamp: patch-stamp + $(checkdir) + +ifeq ($(with_check),yes) + @if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \ + : ; \ + else \ + echo "expect is failing on your system with the above error, which means the"; \ + echo "testsuite will fail. Please resolve the above issues and retry the build."; \ + echo "-----------------------------------------------------------------------------"; \ + exit 1; \ + fi +endif + + rm -rf configure-single-stamp \ + builddir-single + mkdir builddir-single + cd builddir-single && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + ../configure $(SINGLE_CONFARGS) + $(MAKE) -C builddir-single configure-host + touch configure-single-stamp + +build-single-stamp: configure-single-stamp + $(checkdir) + $(MAKE) -C builddir-single/bfd headers + $(MAKE) $(NJOBS) -C builddir-single +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + -$(MAKE) -C builddir-single -k check + cat builddir-single/binutils/binutils.sum \ + builddir-single/gas/testsuite/gas.sum \ + builddir-single/ld/ld.sum >> $(pwd)/test-summary + set -e; \ + if [ -x /usr/bin/python ]; then \ + echo "Test results, compared with installed binutils:"; \ + zcat /usr/share/doc/binutils/test-summary.gz > test-summary-installed; \ + if python debian/test-suite-compare.py test-summary-installed test-summary; then \ + : ; \ + elif [ -n "$(ignore_regressions)" ]; then \ + echo "$(ignore_regressions)"; \ + else \ + false; \ + fi; \ + else \ + echo "python not installed, not comparing test results."; \ + fi +endif +endif + touch build-single-stamp + +################################################################################ + +####################### +# gold-arch targets # +####################### + +GOLD_CONFARGS = --enable-gold +ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386)) + GOLD_CONFARGS += --enable-targets=i486-linux-gnu,x86_64-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),powerpc) + GOLD_CONFARGS += --enable-targets=powerpc-linux-gnu +endif + +configure-gold-stamp: patch-stamp + $(checkdir) + rm -rf configure-gold-stamp \ + builddir-gold + mkdir builddir-gold + cd builddir-gold && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS) -Wno-error" \ + ../configure $(CONFARGS) $(GOLD_CONFARGS) + $(MAKE) -C builddir-gold configure-host + touch configure-gold-stamp + +build-gold-stamp: configure-gold-stamp + $(checkdir) + $(MAKE) -C builddir-gold/bfd headers + $(MAKE) $(NJOBS) -C builddir-gold +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + -$(MAKE) $(NJOBS) -C builddir-gold/testsuite \ + && ( \ + $(MAKE) -C builddir-gold/gold -k check \ + && echo "XXX gold subdir check" \ + && $(MAKE) -C builddir-gold/gold/testsuite -k check) +endif +endif + touch build-gold-stamp + +################################################################################ + +##################### +# multiarch targets # +##################### + +multiarch_targets = \ + alpha-linux-gnu \ + arm-linux-gnu \ + armel-linux-gnu \ + hppa-linux-gnu \ + i486-linux-gnu \ + ia64-linux-gnu \ + m68k-linux-gnu \ + m68k-rtems \ + mips-linux-gnu \ + mipsel-linux-gnu \ + mips64-linux-gnu \ + mips64el-linux-gnu \ + powerpc-linux-gnu \ + powerpc64-linux-gnu \ + s390-linux-gnu \ + s390x-linux-gnu \ + sh-linux-gnu \ + sh64-linux-gnu \ + sparc-linux-gnu \ + sparc64-linux-gnu \ + x86_64-linux-gnu \ + m32r-linux-gnu \ + spu + +configure-multi-stamp: patch-stamp + $(checkdir) + rm -rf configure-multi-stamp \ + builddir-multi + mkdir builddir-multi + cd builddir-multi \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure $(CONFARGS) \ + --enable-targets=$(subst $(SPACE),$(COMMA),$(multiarch_targets)) + $(MAKE) -C builddir-multi configure-host + touch configure-multi-stamp + +build-multi-stamp: configure-multi-stamp + $(checkdir) + $(MAKE) -C builddir-multi/bfd headers + env MAKE="$(MAKE) VERSION=$(MULTI_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-multi + touch build-multi-stamp + +################################################################################ + +################# +# static target # +################# + +configure-static-stamp: patch-stamp + $(checkdir) + rm -rf configure-static-stamp \ + builddir-static + mkdir builddir-static + cd builddir-static \ + && env CC="$(CC)" CFLAGS="-g0 -Os" ../configure + $(MAKE) -C builddir-static configure-bfd + $(MAKE) -C builddir-static configure-ld + touch configure-static-stamp + +build-static-stamp: configure-static-stamp + $(checkdir) + $(MAKE) $(NJOBS) -C builddir-static/libiberty CCLD="gcc -all-static" + $(MAKE) $(NJOBS) -C builddir-static/bfd CCLD="gcc -all-static" + $(MAKE) $(NJOBS) -C builddir-static/ld CCLD="gcc -all-static" + touch build-static-stamp + +################################################################################ + +################# +# hppa64 target # +################# + +configure-hppa64-stamp: patch-stamp + $(checkdir) + rm -rf configure-hppa64-stamp \ + builddir-hppa64 + mkdir builddir-hppa64 + cd builddir-hppa64 \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure \ + --enable-shared \ + --prefix=/usr \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_BUILD_GNU_TYPE) \ + --target=hppa64-linux-gnu + $(MAKE) -C builddir-hppa64 configure-host + touch configure-hppa64-stamp + +build-hppa64-stamp: configure-hppa64-stamp + $(checkdir) + $(MAKE) -C builddir-hppa64/bfd headers + env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-hppa64 + touch build-hppa64-stamp + +################################################################################ + +############## +# spu target # +############## + +configure-spu-stamp: patch-stamp + $(checkdir) + rm -rf configure-spu-stamp \ + builddir-spu + mkdir builddir-spu + cd builddir-spu \ + && env CC="$(CC)" CFLAGS="$(CFLAGS)" ../configure \ + --enable-shared \ + --prefix=/usr \ + --program-prefix=spu- \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_BUILD_GNU_TYPE) \ + --target=spu-elf + $(MAKE) -C builddir-spu configure-host + touch configure-spu-stamp + +build-spu-stamp: configure-spu-stamp + $(checkdir) + $(MAKE) -C builddir-spu/bfd headers + env MAKE="$(MAKE) VERSION=$(SPU_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-spu + touch build-spu-stamp + +################################################################################ + +pre-build: +#ifneq (,$(filter $(DEB_HOST_ARCH), armel powerpc)) +# @echo Build it ... +#else +# @echo Explicitely fail the build for architecture $(DEB_HOST_ARCH) +# false +#endif + +build_stamps = build-single-stamp +ifeq ($(with_multiarch),yes) + build_stamps += build-multi-stamp +endif +ifeq ($(DEB_HOST_ARCH),hppa) + build_stamps += build-hppa64-stamp +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + build_stamps += build-spu-stamp +endif +#ifeq ($(with_gold),yes) +# build_stamps += build-gold-stamp +#endif +build: pre-build build-stamp +build-stamp: $(build_stamps) + touch build-stamp + +################################################################################ + +################## +# install target # +################## + +install_stamps = install-stamp +ifeq ($(DEB_HOST_ARCH),hppa) + install_stamps += install-hppa64-stamp +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + install_stamps += install-spu-stamp +endif +#ifeq ($(with_gold),yes) +# install_stamps += install-gold-stamp +#endif +install: $(install_stamps) +install-stamp: checkroot build-stamp + $(checkdir) + + rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_src) + $(install_dir) $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_src) + + : # install binutils and -dev stuff + $(MAKE) -C builddir-single \ + CFLAGS="$(CFLAGS)" prefix=$(pwd)/$(d_bin)/usr \ + mandir=$(pwd)/$(d_bin)/usr/share/man \ + infodir=$(pwd)/$(d_doc)/usr/share/info install + +ifeq ($(with_multiarch),yes) + : # now install binutils-multiarch stuff + env MAKE="$(MAKE) VERSION=$(MULTI_VERSION)" \ + $(MAKE) -C builddir-multi \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_mul)/usr \ + mandir=$(pwd)/$(d_mul)/usr/share/man \ + infodir=$(pwd)/$(d_doc)/usr/share/info install +endif + + : # copy libiberty.h ... not too keen on this, but it was requested + cp -f include/libiberty.h $(d_bin)/usr/include + + : # copy demangle.h ... not too keen on this, but it was requested + cp -f include/demangle.h $(d_bin)/usr/include + + : # We don't need to distribute everything in binutils and -dev + rm -rf $(d_bin)/usr/include/obstack.h + rm -f $(d_bin)/usr/man/man1/configure.1 + rm -f $(d_doc)/usr/share/info/configure.* $(d_doc)/usr/share/info/standards.* + : # *sigh*, bugs.debian.org/213524 + rm -f $(d_doc)/usr/share/info/dir* + +ifeq ($(with_multiarch),yes) + : # Now get rid of just about everything in binutils-multiarch + rm -rf $(d_mul)/usr/man $(d_mul)/usr/info $(d_mul)/usr/include + rm -rf $(d_mul)/usr/share/man $(d_mul)/usr/share/info $(d_mul)/usr/share/locale + + : # Get rid of ld for the time being since it's suddenly unhappy when + : # linking kernels. Also get rid of the ldscripts for good measure. + rm -f $(d_mul)/usr/bin/as $(d_mul)/usr/bin/gasp $(d_mul)/usr/bin/c++filt \ + $(d_mul)/usr/bin/ld + rm -rf $(d_mul)/usr/lib/ldscripts + ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + rm -f $(d_mul)/usr/bin/embedspu + endif +endif + + $(install_dir) $(d_dev)/usr/include/ $(d_dev)/usr/lib/ + mv $(d_bin)/usr/include/* $(d_dev)/usr/include/ + mv $(d_bin)/usr/lib/*.a $(d_bin)/usr/lib/libbfd.so $(d_bin)/usr/lib/libopcodes.so \ + $(d_dev)/usr/lib/ + +ifeq ($(with_multiarch),yes) + rm -f $(d_mul)/usr/lib/libbfd.so $(d_mul)/usr/lib/libopcodes.so + rm -f $(d_mul)/usr/lib/*.la $(d_mul)/usr/lib/*.a + rm -f $(d_mul)/usr/lib*/libiberty* +endif + + : # Get rid of .la files since libtool obviously has no idea about transient paths + rm -f $(d_bin)/usr/lib/*.la + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_bin)/usr/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_bin)/usr/lib/libopcodes-*so + + chmod ugo-x $(d_bin)/usr/lib/*.so + + $(STRIP) $$(file $(d_bin)/usr/bin/* |awk -F: '$$0 !~ /script/ {print $$1}') + + ifeq ($(with_multiarch),yes) + $(STRIP) --strip-unneeded $(d_mul)/usr/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_mul)/usr/lib/libopcodes-*so + + chmod ugo-x $(d_mul)/usr/lib/*.so + + $(STRIP) $$(file $(d_mul)/usr/bin/* |awk -F: '$$0 !~ /script/ {print $$1}') + endif +endif + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_bin)/usr/$(DEB_HOST_GNU_TYPE) + + : # Remove windres manpages + rm -f $(d_bin)/usr/share/man/man1/windres.1 + +ifeq ($(with_multiarch),yes) + rm -rf $(d_mul)/usr/$(DEB_HOST_GNU_TYPE) + rm -f $(d_mul)/usr/share/man/man1/windres.1 +endif + +ifeq ($(with_gold),yes) + : # move gold linker to it's own package. + rm -fr $(d_gold) + $(install_dir) $(d_gold) + $(install_dir) $(d_gold)/usr/bin + + mv $(d_bin)/usr/bin/ld.gold $(d_gold)/usr/bin/ + rm -f $(d_bin)/usr/bin/ld + ln -s ld.bfd $(d_bin)/usr/bin/ld + ln -s ld.gold $(d_gold)/usr/bin/ld + + : # install a symlink for the old linker + $(install_dir) $(d_gold)/usr/lib/compat-ld + ln -s ../../bin/ld.single $(d_gold)/usr/lib/compat-ld/ld +endif + + : # Remove empty directory + rmdir $(d_bin)/usr/include/ + + : # install libiberty PIC library + $(install_file) builddir-single/libiberty/pic/libiberty.a \ + $(d_dev)/usr/lib/libiberty_pic.a + + touch install-stamp + +install-gold-stamp: checkroot build-gold-stamp + $(checkdir) + + rm -fr $(d_gold) + $(install_dir) $(d_gold) + $(install_dir) $(d_gold)/usr/bin + + : # install binutils-gold stuff + $(MAKE) -C builddir-gold/gold \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_gold)/usr/ \ + mandir=$(pwd)/$(d_gold)/usr/share/man \ + infodir=$(pwd)/$(d_gold)/usr/share/info install + + : # install a symlink for the old linker + $(install_dir) $(d_gold)/usr/lib/compat-ld + ln -s ../../bin/ld.single $(d_gold)/usr/lib/compat-ld/ld + +# mv $(d_gold)/usr/bin/ld $(d_gold)/usr/bin/gold + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_gold)/usr/$(DEB_HOST_GNU_TYPE) + + : # Now get rid of just about everything in binutils-gold + rm -rf $(d_gold)/usr/man + rm -rf $(d_gold)/usr/info + rm -rf $(d_gold)/usr/include + rm -rf $(d_gold)/usr/share + rm -rf $(d_gold)/usr/hppa-linux-gnu + rm -rf $(d_gold)/usr/lib/libiberty.a + +ifeq ($(with_strip),yes) + $(STRIP) $$(file $(d_gold)/usr/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + + touch install-gold-stamp + +install-hppa64-stamp: checkroot build-hppa64-stamp + $(checkdir) + + rm -fr $(d_hppa64) + $(install_dir) $(d_hppa64) + $(install_dir) $(d_hppa64)/usr/lib + + : # install binutils-hppa64 stuff + env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ + $(MAKE) -C builddir-hppa64 \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_hppa64)/usr/ \ + mandir=$(pwd)/$(d_hppa64)/usr/share/man \ + infodir=$(pwd)/$(d_hppa64)/usr/share/info install + + : # move shared libs to the standard path + mv $(d_hppa64)/usr/hppa-linux-gnu/hppa64-linux-gnu/lib/lib*-*.so \ + $(d_hppa64)/usr/lib/. + + : # Now get rid of just about everything in binutils-hppa64 + rm -rf $(d_hppa64)/usr/man + rm -rf $(d_hppa64)/usr/info + rm -rf $(d_hppa64)/usr/include + rm -rf $(d_hppa64)/usr/share + rm -rf $(d_hppa64)/usr/hppa-linux-gnu + rm -rf $(d_hppa64)/usr/lib/libiberty.a + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_hppa64)/usr/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_hppa64)/usr/lib/libopcodes-*so + $(STRIP) $$(file $(d_hppa64)/usr/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + + chmod ugo-x $(d_hppa64)/usr/lib/*.so + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_hppa64)/usr/hppa64-linux-gnu + + touch install-hppa64-stamp + +install-spu-stamp: checkroot build-spu-stamp + $(checkdir) + + rm -fr $(d_spu) + $(install_dir) $(d_spu) + $(install_dir) $(d_spu)/usr/lib + + : # install binutils-spu stuff + env MAKE="$(MAKE) VERSION=$(SPU_VERSION)" \ + $(MAKE) -C builddir-spu \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_spu)/usr/ \ + mandir=$(pwd)/$(d_spu)/usr/share/man \ + infodir=$(pwd)/$(d_spu)/usr/share/info install + + : # move shared libs to the standard path + mv $(d_spu)/usr/$(DEB_HOST_GNU_TYPE)/spu-elf/lib/lib*-*.so \ + $(d_spu)/usr/lib/. + + : # Now get rid of just about everything in binutils-spu + rm -rf $(d_spu)/usr/man + rm -rf $(d_spu)/usr/info + rm -rf $(d_spu)/usr/include + rm -rf $(d_spu)/usr/share + rm -rf $(d_spu)/usr/$(DEB_HOST_GNU_TYPE) + rm -rf $(d_spu)/usr/lib/libiberty.a + rm -rf $(d_spu)/usr/lib/ldscripts + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_spu)/usr/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_spu)/usr/lib/libopcodes-*so + $(STRIP) $$(file $(d_spu)/usr/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + + chmod ugo-x $(d_spu)/usr/lib/*.so + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_spu)/usr/spu-elf + + touch install-spu-stamp + +################################################################################ + +####################### +# binary-indep target # +####################### + +binary-indep: checkroot build install + $(checkdir) + + rm -f debian/files debian/substvars + + $(install_dir) $(d_doc)/DEBIAN + + $(install_dir) $(d_doc)/usr/share/doc/$(p_doc)/ + $(install_file) debian/changelog $(d_doc)/usr/share/doc/$(p_doc)/changelog.Debian + $(install_file) debian/copyright $(d_doc)/usr/share/doc/$(p_doc)/ + for i in bfd gas gprof ld; do \ + ln -sf ../$(p_bin)/$$i $(d_doc)/usr/share/doc/$(p_doc)/$$i; \ + done + find $(d_doc)/usr/share/doc/$(p_doc) -maxdepth 1 -type f ! -name copyright | xargs gzip -9 + gzip -9 $(d_doc)/usr/share/info/* + + dpkg-gencontrol -isp -P$(d_doc) -p$(p_doc) + chown -R root:root $(d_doc) + chmod -R go=rX $(d_doc) + dpkg --build $(d_doc) .. + + $(install_dir) $(d_src)/usr/share/doc/$(p_src)/ + $(install_file) debian/changelog $(d_src)/usr/share/doc/$(p_src)/changelog.Debian + $(install_file) debian/copyright $(d_src)/usr/share/doc/$(p_src)/ + find $(d_src)/usr/share/doc/$(p_src) -maxdepth 1 -type f ! -name copyright | xargs gzip -9 + + $(install_dir) $(d_src)/DEBIAN + $(install_dir) $(d_src)/usr/src/binutils/patches + $(install_file) debian/patches/* $(d_src)/usr/src/binutils/patches/ + chmod 755 $(d_src)/usr/src/binutils/patches/*.dpatch + tar -c --bzip2 -C .. --exclude=CVS \ + -f $(pwd)/$(d_src)/usr/src/binutils/binutils-$(VERSION).tar.bz2 \ + $(source_files) + + dpkg-gencontrol -isp -P$(d_src) -p$(p_src) + chown -R root:root $(d_src) + chmod -R go=rX $(d_src) + dpkg --build $(d_src) .. + + +################################################################################ + +####################### +# binary-arch target # +####################### + +binary-arch: checkroot build install + $(checkdir) + + : # make lintian happy + $(install_file) -D debian/$(p_bin).overrides \ + $(d_bin)/usr/share/lintian/overrides/$(p_bin) +ifeq ($(with_multiarch),yes) + $(install_file) -D debian/$(p_mul).overrides \ + $(d_mul)/usr/share/lintian/overrides/$(p_mul) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + $(install_file) -D debian/$(p_hppa64).overrides \ + $(d_hppa64)/usr/share/lintian/overrides/$(p_hppa64) +endif +ifeq ($(with_gold),yes) + $(install_file) -D debian/$(p_gold).overrides \ + $(d_gold)/usr/share/lintian/overrides/$(p_gold) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_file) -D debian/$(p_spu).overrides \ + $(d_spu)/usr/share/lintian/overrides/$(p_spu) +endif + + : # install maintainer scrtips + $(install_dir) $(d_bin)/DEBIAN + $(install_script) debian/binutils.postinst $(d_bin)/DEBIAN/postinst + $(install_script) debian/binutils.postrm $(d_bin)/DEBIAN/postrm + $(install_file) debian/binutils.shlibs $(d_bin)/DEBIAN/shlibs + + $(install_dir) $(d_dev)/DEBIAN + +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mul)/DEBIAN + $(install_script) debian/binutils-multiarch.postinst $(d_mul)/DEBIAN/postinst + $(install_script) debian/binutils-multiarch.postrm $(d_mul)/DEBIAN/postrm + $(install_script) debian/binutils-multiarch.preinst $(d_mul)/DEBIAN/preinst + $(install_file) debian/binutils-multiarch.shlibs $(d_mul)/DEBIAN/shlibs +endif + +ifeq ($(with_gold),yes) + $(install_dir) $(d_gold)/DEBIAN + $(install_script) debian/binutils-gold.postrm $(d_gold)/DEBIAN/postrm + $(install_script) debian/binutils-gold.preinst $(d_gold)/DEBIAN/preinst +endif + +ifeq ($(DEB_HOST_ARCH),hppa) + $(install_dir) $(d_hppa64)/DEBIAN + $(install_script) debian/binutils-hppa64.postinst $(d_hppa64)/DEBIAN/postinst + $(install_script) debian/binutils-hppa64.postrm $(d_hppa64)/DEBIAN/postrm + $(install_file) debian/binutils-hppa64.shlibs $(d_hppa64)/DEBIAN/shlibs +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_dir) $(d_spu)/DEBIAN + $(install_script) debian/binutils-spu.postinst $(d_spu)/DEBIAN/postinst + $(install_script) debian/binutils-spu.postrm $(d_spu)/DEBIAN/postrm + $(install_file) debian/binutils-spu.shlibs $(d_spu)/DEBIAN/shlibs +endif + + : # install docs + $(install_dir) $(d_bin)/usr/share/doc/$(p_bin)/ + $(install_file) debian/changelog $(d_bin)/usr/share/doc/$(p_bin)/changelog.Debian + $(install_file) debian/copyright $(d_bin)/usr/share/doc/$(p_bin)/ + + $(install_dir) $(d_dev)/usr/share/doc/ + ln -sf $(p_bin) $(d_dev)/usr/share/doc/$(p_dev) +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mul)/usr/share/doc/ + ln -sf $(p_bin) $(d_mul)/usr/share/doc/$(p_mul) +endif +ifeq ($(with_gold),yes) + $(install_dir) $(d_gold)/usr/share/doc/ + ln -sf $(p_bin) $(d_gold)/usr/share/doc/$(p_gold) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + $(install_dir) $(d_hppa64)/usr/share/doc/ + ln -sf $(p_bin) $(d_hppa64)/usr/share/doc/$(p_hppa64) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_dir) $(d_spu)/usr/share/doc/ + ln -sf $(p_bin) $(d_spu)/usr/share/doc/$(p_spu) +endif + +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + $(install_file) $(pwd)/test-summary $(d_bin)/usr/share/doc/$(p_bin)/ +endif +endif + $(install_file) binutils/NEWS debian/README.cross \ + $(d_bin)/usr/share/doc/$(p_bin)/ + + $(install_file) binutils/ChangeLog $(d_bin)/usr/share/doc/$(p_bin)/changelog + + for pkg in bfd gas gprof ld; do \ + $(install_dir) $(d_bin)/usr/share/doc/$(p_bin)/$$pkg; \ + done + $(install_file) bfd/ChangeLog bfd/PORTING bfd/TODO \ + $(d_bin)/usr/share/doc/$(p_bin)/bfd/ + $(install_file) gas/ChangeLog gas/NEWS $(d_bin)/usr/share/doc/$(p_bin)/gas/ + $(install_file) gprof/ChangeLog gprof/TODO gprof/TEST \ + $(d_bin)/usr/share/doc/$(p_bin)/gprof/ + $(install_file) ld/ChangeLog ld/TODO ld/NEWS \ + $(d_bin)/usr/share/doc/$(p_bin)/ld/ + + : # These only exist in H. J. Lu releases not GNU ones. + for dir in binutils bfd gas gprof ld; do \ + if [ -f $$dir/ChangeLog.linux ]; then \ + $(install_file) $$dir/ChangeLog.linux $(d_bin)/usr/share/doc/$(p_bin)/$$dir/; \ + fi; \ + done + + : # Copy bbconv.pl to the doc dir for use by interested people + $(install_file) gprof/bbconv.pl $(d_bin)/usr/share/doc/$(p_bin)/gprof/. + + : # Compress stuff that needs it + gzip -9 $(d_bin)/usr/share/man/man1/* + find $(d_bin)/usr/share/doc/$(p_bin)/ -type f ! -name copyright -a ! -name bbconv.pl | xargs gzip -9 + + : # Finish it all up + find $(d_bin) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_bin) -p$(p_bin) $(CONFLICTS) + + rm -f debian/substvars + dpkg-gencontrol -isp -P$(d_dev) -p$(p_dev) + +ifeq ($(with_multiarch),yes) + rm -f debian/substvars + find $(d_mul) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_mul) -p$(p_mul) +endif + +ifeq ($(with_gold),yes) + rm -f debian/substvars + find $(d_gold) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_gold) -p$(p_gold) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + rm -f debian/substvars + find $(d_hppa64) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_hppa64) -p$(p_hppa64) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + rm -f debian/substvars + find $(d_spu) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_spu) -p$(p_spu) +endif + + chown -R root:root $(d_bin) $(d_dev) + chmod -R go=rX $(d_bin) $(d_dev) + dpkg --build $(d_bin) .. + dpkg --build $(d_dev) .. +ifeq ($(with_multiarch),yes) + chown -R root:root $(d_mul) + chmod -R go=rX $(d_mul) + dpkg --build $(d_mul) .. +endif +ifeq ($(with_gold),yes) + chown -R root:root $(d_gold) + chmod -R go=rX $(d_gold) + dpkg --build $(d_gold) .. +endif +ifeq ($(DEB_HOST_ARCH),hppa) + chown -R root:root $(d_hppa64) + chmod -R go=rX $(d_hppa64) + dpkg --build $(d_hppa64) .. +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + chown -R root:root $(d_spu) + chmod -R go=rX $(d_spu) + dpkg --build $(d_spu) .. +endif + +################################################################################ + +################# +# cross targets # +################# + +# If $(TARGET) is not set, try reading debian/target +ifeq ($(TARGET),) +TARGET := $(shell cat debian/target 2>/dev/null) +endif + +# Process the following only if $(TARGET) is set +ifneq ($(TARGET),) + +# Support TARGET both as Debian architecture specification (e.g. arm), +# and as the target name (e.g. arm-linux-gnu). +try_convert := $(shell dpkg-architecture -f -a$(TARGET) -qDEB_HOST_GNU_TYPE 2>/dev/null) +ifneq ($(try_convert),) +override TARGET := $(try_convert) +endif + +p_cross = $(subst _,-,binutils-$(TARGET)) +d_cross = debian/$(p_cross) + +ifneq ($(filter sparc-linux-gnu powerpc-linux-gnu mips-linux-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=$(TARGET:%-linux-gnu=%64-linux-gnu) +endif +ifneq ($(filter i386-linux-gnu i486-linux-gnu i586-linux-gnu x86-linux-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=x86_64-linux-gnu +endif +ifneq ($(filter i386-kfreebsd-gnu i486-kfreebsd-gnu i586-kfreebsd-gnu x86-kfreebsd-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=x86_64-linux-gnu +endif +ifeq ($(TARGET), x86_64-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=i486-linux-gnu +endif +ifeq ($(TARGET), x86_64-kfreebsd-gnu) +ADDITIONAL_TARGETS = --enable-targets=i486-kfreebsd-gnu +endif +ifeq ($(TARGET), mipsel-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=mips64el-linux-gnu +endif +ifeq ($(TARGET), sparc64-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=sparc-linux-gnu +endif +ifeq ($(TARGET), s390-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=s390x-linux-gnu +endif +ifeq ($(TARGET), s390x-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=s390-linux-gnu +endif + +#----------------------------------------------------------------- +# sysroot options +ifdef WITH_SYSROOT + with_sysroot = $(WITH_SYSROOT) +endif +ifdef WITH_BUILD_SYSROOT + with_build_sysroot = $(WITH_BUILD_SYSROOT) +endif + +ifneq ($(with_sysroot),) + CONFARGS += --with-sysroot=$(with_sysroot) +endif +ifneq ($(with_build_sysroot),) + CONFARGS += --with-build-sysroot=$(with_build_sysroot) +endif + +configure-$(TARGET)-stamp: patch-stamp + $(checkdir) + test "" != "$(TARGET)" + rm -rf configure-$(TARGET)-stamp builddir-$(TARGET) + mkdir builddir-$(TARGET) + cd builddir-$(TARGET) \ + && env CC="$(CC)" CXX="$(CXX)" ../configure --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) --target=$(TARGET) --prefix=/usr \ + $(ADDITIONAL_TARGETS) $(CONFARGS) + touch $@ + +build-$(TARGET)-stamp: configure-$(TARGET)-stamp + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + touch $@ + +install-$(TARGET)-stamp: build-$(TARGET)-stamp + $(checkdir) + test "" != "$(TARGET)" + rm -rf $(d_cross) + $(MAKE) -C builddir-$(TARGET) prefix=$(pwd)/$(d_cross)/usr \ + mandir=$(pwd)/$(d_cross)/usr/share/man install + rm -rf $(d_cross)/usr/lib* $(d_cross)/usr/info $(d_cross)/usr/share/locale +ifeq ($(with_strip),yes) + $(STRIP) $$(file $(d_cross)/usr/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + gzip -9 $(d_cross)/usr/share/man/man1/* + touch $@ + +binary-cross: checkroot install-$(TARGET)-stamp + $(checkdir) + test "" != "$(TARGET)" + + sed "/^$$/ q" < debian/control > debian/control.$(TARGET) + sed -e "s/__TARGET__/$$(echo -n $(TARGET) | sed s/_/-/g)/" \ + < debian/control.cross.in >> debian/control.$(TARGET) + + $(install_dir) $(d_cross)/DEBIAN + + $(install_dir) $(d_cross)/usr/share/doc/$(p_cross)/ + $(install_file) debian/changelog $(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian + $(install_file) debian/copyright debian/README.cross $(d_cross)/usr/share/doc/$(p_cross)/ + gzip -9f $(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian + + for pkg in bfd gas gprof ld; do \ + ln -sf ../binutils/$$pkg $(d_cross)/usr/share/doc/$(p_cross)/$$pkg; \ + done + + rm -f debian/substvars + dpkg-shlibdeps $(d_cross)/usr/bin/* + dpkg-gencontrol -isp -cdebian/control.$(TARGET) -P$(d_cross) -p$(p_cross) + dpkg --build $(d_cross) .. + +clean-cross: unpatch + $(checkdir) + test "" != "$(TARGET)" + rm -rf $(d_cross) debian/control.$(TARGET) debian/files debian/substvars \ + builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp + +.PHONY: binary-cross clean-cross + +endif + +################################################################################ + +define checkdir + test -f bfd/elf32.c -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- binutils-2.20.orig/debian/binutils.overrides +++ binutils-2.20/debian/binutils.overrides @@ -0,0 +1,2 @@ +# the API of the shared libs is not public, don't care about the name +binutils binary: package-name-doesnt-match-sonames --- binutils-2.20.orig/debian/binutils-multiarch.shlibs +++ binutils-2.20/debian/binutils-multiarch.shlibs @@ -0,0 +1,2 @@ +libbfd 2.20-multiarch binutils-multiarch +libopcodes 2.20-multiarch binutils-multiarch --- binutils-2.20.orig/debian/binutils-multiarch.postrm +++ binutils-2.20/debian/binutils-multiarch.postrm @@ -0,0 +1,32 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" -o "$1" = "abort-install" ]; then + + for f in size objdump ar strings ranlib objcopy addr2line \ + readelf nm strip gprof; do + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/bin/$f.single /usr/bin/$f + done + + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libbfd-single.a /usr/lib/libbfd.a + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert /usr/lib/libopcodes-single.a /usr/lib/libopcodes.a + +fi + +if [ -e /usr/lib/libbfd-*-multiarch.so.0 ]; then + rm -f /usr/lib/libbfd-*-multiarch.so.0; +fi +if [ -e /usr/lib/libopcodes-*-multiarch.so.0 ]; then + rm -f /usr/lib/libopcodes-*-multiarch.so.0; +fi + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils-multiarch.overrides +++ binutils-2.20/debian/binutils-multiarch.overrides @@ -0,0 +1,10 @@ +# don't warn about missing man pages for diverted binaries +binutils-multiarch binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-multiarch binary: package-name-doesnt-match-sonames + +# not in binutils-multiarch, just move these away +binutils-multiarch: diversion-for-unknown-file usr/lib/libopcodes.a preinst:19 +binutils-multiarch: diversion-for-unknown-file usr/lib/libbfd.a preinst:16 + --- binutils-2.20.orig/debian/test-suite-compare.py +++ binutils-2.20/debian/test-suite-compare.py @@ -0,0 +1,230 @@ +#!/usr/bin/env python + +# Quick'n'dirty regression check for dejagnu testsuites +# Copyright (C) 2003, 2004, 2005, 2006, 2007 James Troup + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU;5B 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 + +################################################################################ + +import optparse +import os +import sys + +################################################################################ + +def fubar(msg, exit_code=1): + sys.stderr.write("E: %s\n" % (msg)) + sys.exit(exit_code) + +def warn(msg): + sys.stderr.write("W: %s\n" % (msg)) + +def info(msg): + sys.stderr.write("I: %s\n" % (msg)) + +################################################################################ + +def read_testsummary(filename): + results = {} + file = open(filename) + for line in file.readlines(): + if not line: + continue + if line.startswith("Running"): + s = line.split() + if "/" in s[1]: + x = s[1] + if x.find("/testsuite/") == -1: + fubar("Can't find /testsuite/ in '%s'." % (x)) + # 'Running /home/james/debian/packages/binutils/binutils-2.14.90.0.7/gas/testsuite/gas/hppa/unsorted/unsorted.exp ...' -> 'gas/hppa/unsorted/unsorted.exp' + # ... since using basename() isn't dupe safe. + section = x[x.find("/testsuite/"):].replace("/testsuite/","").split()[0] + + # Tests can be duplicated, e.g. hppa/basic/basic.exp + # is run twice, once for hppa-linux and once for + # hppa64-linux. This is of course a horrible bodge, + # but I can't think of anything trivial and better off + # hand. + + if results.has_key(section): + extra = 1 + too_many = 10 + while results.has_key(section) and extra < too_many: + section = "%s.%s" % (section, extra) + extra += 1 + if extra >= too_many: + fubar("gave up trying to unduplicate %s." % (section)) + + results[section] = {} + continue + + got_state = 0 + for state in [ "PASS", "XPASS", "FAIL", "XFAIL", "UNRESOLVED", + "UNTESTED", "UNSUPPORTED" ]: + if line.startswith(state): + s = line.split(':') + state = s[0] + test = ':'.join(s[1:]).strip() + if results.has_key(test): + warn("%s/%s is duplicated." % (section, test)) + results[section][test] = state + got_state = 1 + break + + if got_state: + continue + + return results + +################################################################################ + +def compare_results(old, new): + total_num = 0 + pass_count = 0 + fail_count = 0 + xfail_count = 0 + untested_count = 0 + regression_count = 0 + progression_count = 0 + change_count = 0 + + for section in new.keys(): + for test in new[section].keys(): + state = new[section][test] + + # Stats pr0n + total_num += 1 + if state == "PASS" or state == "XPASS": + pass_count += 1 + elif state == "FAIL" or state == "UNRESOLVED": + fail_count += 1 + elif state == "XFAIL": + xfail_count += 1 + elif state == "UNTESTED": + untested_count += 1 + + # Compare to old + if not old.has_key(section): + continue + if not old[section].has_key(test): + continue + old_state = old[section][test] + if state == "PASS": + if old_state != "PASS": + progression_count += 1 + info("[%s] progression (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "XPASS": + if old_state != "XPASS" and old_state != "PASS": + progression_count += 1 + warn("[%s] %s: %s" % (section, state, test)) + elif state == "FAIL": + if old_state != "FAIL": + regression_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "XFAIL": + if old_state != "XFAIL": + change_count += 1 + info("[%s] change (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "UNRESOLVED": + if old_state != "UNRESOLVED" and old_state != "FAIL": + regression_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + if old_state == "FAIL": + change_count += 1 + info("[%s] change (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "UNTESTED": + if old_state != "UNTESTED": + change_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + + if regression_count: + print "%d REGRESSIONS (%.2f%%)." % (regression_count, (float(regression_count)/total_num)*100) + if progression_count: + print "%d progressions (%.2f%%)." % (progression_count, (float(progression_count)/total_num)*100) + + if change_count: + print "%d changes (%.2f%%)." % (change_count, (float(change_count)/total_num)*100) + + print "%d tests: %d pass (%.2f%%), %d fail (%.2f%%), %d xfail (%.2f%%) %d untested (%.2f%%)." \ + % (total_num, pass_count, (float(pass_count)/total_num)*100, + fail_count, (float(fail_count)/total_num)*100, + xfail_count, (float(xfail_count)/total_num)*100, + untested_count, (float(untested_count)/total_num)*100) + + if regression_count: + sys.exit(1) + +################################################################################ + +def compare_multiple(directory, first_version, second_version): + architectures = [ "alpha", "arm", "hppa", "i386", "ia64", "mips", + "m68k", "mipsel", "powerpc", "s390", "sparc" ] + + for arch in architectures: + print "*********************************** %s ******************************" % (arch) + second_filename = "%s/%s_%s" % (directory, second_version, arch) + if not os.path.exists(second_filename): + print " -- NOT AVAILABLE --" + continue + + new = read_testsummary(second_filename) + first_filename = "%s/%s_%s" % (directory, first_version, arch) + old = read_testsummary(first_filename) + compare_results(old, new) + +################################################################################ + +def init(): + """Initalization, including parsing of options.""" + + usage = """usage: %prog [OPTIONS] +compare (binutils) dejagnu testsuite results. + +Example usage: + + test-suite-compare.py binutils-2.17/test-summary binutils-2.18/test-summary + +Or to compare across all architectures (with test results stored in a +'test-summary' directory): + + test-suite-compare.py -mtest-summary 2.17-3 2.18-1""" + parser = optparse.OptionParser(usage) + parser.add_option("-m", "--multiple", dest="multiple", + nargs=1, type="string", + help="compare multiple architectures") + (options, args) = parser.parse_args() + + if len(args) > 2 or len(args) < 2: + parser.error("takes 2 arguments (old and new)") + (old_version, new_version) = args + + return options, old_version, new_version + +################################################################################ + +def main(): + (options, old_version, new_version) = init() + if options.multiple: + compare_multiple(options.multiple, old_version, new_version) + else: + old = read_testsummary(old_version) + new = read_testsummary(new_version) + compare_results(old, new) + +################################################################################ + +if __name__ == '__main__': + main() --- binutils-2.20.orig/debian/binutils-hppa64.postrm +++ binutils-2.20/debian/binutils-hppa64.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils.shlibs +++ binutils-2.20/debian/binutils.shlibs @@ -0,0 +1,2 @@ +libbfd 2.20 binutils +libopcodes 2.20 binutils --- binutils-2.20.orig/debian/copyright +++ binutils-2.20/debian/copyright @@ -0,0 +1,43 @@ +This is the Debian GNU/Linux prepackaged version of the GNU assembler, +linker, and binary utilities. + +This package was put together by me, James Troup , +from sources, which I obtained from: + + ftp://ftp.gnu.org/pub/gnu/binutils/ + +and: + + cvs://:pserver:anoncvs@sources.redhat.com:/cvs/src + +It was previously maintained by Christopher C. Chimelis + +GNU Binutils is Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software +Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 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. */ + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL' +and `/usr/share/common-licenses/LGPL'. + +The binutils manuals and associated documentation are also Copyright +(C) Free Software Foundation, Inc. They are distributed under the GNU +Free Documentation License Version 1.1 or any later version published +by the Free Software Foundation; with no Invariant Sections, with no +n Debian GNU/Linux systems, the complete text of the GFDL can be found +in `/usr/share/common-licenses/GFDL'. --- binutils-2.20.orig/debian/binutils-spu.overrides +++ binutils-2.20/debian/binutils-spu.overrides @@ -0,0 +1,8 @@ +# don't warn about missing man pages for diverted binaries +binutils-spu binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-spu binary: package-name-doesnt-match-sonames + +# it's a cross toolchain +binutils-spu binary: binary-or-shlib-defines-rpath --- binutils-2.20.orig/debian/watch +++ binutils-2.20/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://ftp.gnu.org/gnu/binutils/binutils-([\d\.]*).tar.gz --- binutils-2.20.orig/debian/binutils-hppa64.shlibs +++ binutils-2.20/debian/binutils-hppa64.shlibs @@ -0,0 +1,2 @@ +libbfd 2.20-hppa64 binutils-hppa64 +libopcodes 2.20-hppa64 binutils-hppa64 --- binutils-2.20.orig/debian/binutils-spu.postinst +++ binutils-2.20/debian/binutils-spu.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils-hppa64.postinst +++ binutils-2.20/debian/binutils-hppa64.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/binutils-spu.shlibs +++ binutils-2.20/debian/binutils-spu.shlibs @@ -0,0 +1,2 @@ +libbfd 2.20-spu binutils-spu +libopcodes 2.20-spu binutils-spu --- binutils-2.20.orig/debian/binutils-hppa64.overrides +++ binutils-2.20/debian/binutils-hppa64.overrides @@ -0,0 +1,8 @@ +# don't warn about missing man pages for diverted binaries +binutils-hppa64 binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-hppa64 binary: package-name-doesnt-match-sonames + +# it's a cross toolchain +binutils-hppa64 binary: binary-or-shlib-defines-rpath --- binutils-2.20.orig/debian/binutils-multiarch.postinst +++ binutils-2.20/debian/binutils-multiarch.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.20.orig/debian/control +++ binutils-2.20/debian/control @@ -0,0 +1,104 @@ +Source: binutils +Section: devel +Priority: optional +Maintainer: Matthias Klose +Uploaders: James Troup , Daniel Jacobowitz +Standards-Version: 3.8.3 +Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.64), bison, flex, gettext, texinfo, expect-tcl8.3 (>= 5.32.2) [hppa], dejagnu (>= 1.4.2-1.1), dpatch, file, bzip2, lsb-release, zlib1g-dev + +Package: binutils +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts} +Provides: elf-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + +Package: binutils-dev +Architecture: any +Priority: extra +Depends: binutils (= ${binary:Version}) +Conflicts: libbfd-dev +Provides: libbfd-dev +Replaces: libbfd-dev, libc5-dev +Description: The GNU binary utilities (BFD development files) + This package includes header files and static libraries necessary to build + programs which use the GNU BFD library, which is part of binutils. Note + that building Debian packages which depend on the shared libbfd is Not + Allowed. + +Package: binutils-multiarch +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Provides: multiarch-binutils +Description: Binary utilities that support multi-arch targets + The programs in this package are used to manipulate binary and object + files that may have been created on other architectures. This package + is primarily for multi-architecture developers and cross-compilers and + is not needed by normal users or developers. Note that a cross-assembling + version of gas is not included in this package, just the binary utilities. + NORMAL USERS SHOULD NOT INSTALL THIS PACKAGE. It's meant only for those + requiring support for reading info from binaries from other architectures. + +Package: binutils-gold +Architecture: amd64 armel i386 powerpc sparc +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Description: The (experimental) GNU gold linker utility + Gold is a new linker, still in development, which is faster than the + current linker included in binutils. It currently fails to link some + applications and libraries (i.e. won't link usable kernels). + . + This package diverts the GNU linker (ld) with the experimental gold + linker. + +Package: binutils-hppa64 +Architecture: hppa +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for hppa64-linux + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build an 64-bit kernel for 64-bit hppa machines. + +Package: binutils-spu +Architecture: powerpc ppc64 +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Conflicts: spu-binutils +Replaces: spu-binutils +Provides: spu-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for spu-elf + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build programs for Cell Broadband Engine SPU + processors. + +Package: binutils-doc +Section: doc +Architecture: all +Priority: optional +Depends: dpkg (>= 1.15.4) | install-info +Conflicts: binutils (<< 2.9.1.0.25-3) +Suggests: binutils (= ${binary:Version}) +Description: Documentation for the GNU assembler, linker and binary utilities + This package consists of the documentation for the GNU assembler, + linker and binary utilities in info format. + +Package: binutils-source +Architecture: all +Priority: optional +Depends: texinfo, zlib1g-dev +Description: The GNU assembler, linker and binary utilities (source) + This package contains the sources and patches which are needed to + build binutils. --- binutils-2.20.orig/debian/patches/127_x86_64_i386_biarch.dpatch +++ binutils-2.20/debian/patches/127_x86_64_i386_biarch.dpatch @@ -0,0 +1,42 @@ +#!/bin/sh -e +## 127_x86_64_i386_biarch.dpatch +## +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64. +## DP: Author: Aurelien Jarno +## DP: Upstream status: Debian specific + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- ./ld/emulparams/elf_i386.sh~ 2009-07-29 16:59:23.000000000 +0200 ++++ ./ld/emulparams/elf_i386.sh 2009-08-05 10:38:57.000000000 +0200 +@@ -13,3 +13,13 @@ + NO_SMALL_DATA=yes + SEPARATE_GOTPLT=12 + IREL_IN_PLT= ++ ++# Linux modify the default library search path to first include ++# a 32-bit specific directory. ++case "$target" in ++ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu) ++ case "$EMULATION_NAME" in ++ *i386*) LIBPATH_SUFFIX=32 ;; ++ esac ++ ;; ++esac --- binutils-2.20.orig/debian/patches/133_enable_gold.dpatch +++ binutils-2.20/debian/patches/133_enable_gold.dpatch @@ -0,0 +1,607 @@ +#!/bin/sh -e +## 133_enable_gold.dpatch +## +## DP: Description: add --enable-gold configure option + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +2009-11-03 Roland McGrath + H.J. Lu + + * configure.ac (--enable-gold): Accept --enable-gold=both to + add gold to configdirs without removing ld. + * configure: Regenerated. + +gold/ + +2009-11-03 H.J. Lu + + * Makefile.am (install-exec-local): Install as @installed_linker@. + Install as ld if "@linker@" == "ld.gold" and @installed_linker@ + != "ld". + * Makefile.in: Regenerated. + + * configure.ac (installed_linker): New substituted variable. Set + by --enable-gold. + (linker): New substituted variable. Set by --enable-gold and + --enable-linker. + * configure: Regenerated. + +ld/ + +2009-11-03 H.J. Lu + + * Makefile.am (transform): Install as @installed_linker@. + (install-exec-local): Depend on install-binPROGRAMS. Install + as @installed_linker@. Install as ld if "@linker@" == "ld.bfd" + and @installed_linker@ != "ld". + * Makefile.in: Regenerated. + + * configure.ac (installed_linker): New substituted variable. Set + by --enable-gold. + (linker): New substituted variable. Set by --enable-gold and + --enable-linker. + * configure: Regenerated. + +@DPATCH@ +diff --git a/configure b/configure +index 1ece75c..e353f63 100755 +--- a/configure ++++ b/configure +@@ -1482,7 +1482,7 @@ Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +- --enable-gold use gold instead of ld ++ --enable-gold[=ARG] build gold [ARG={yes,both}] + --enable-libada build libada directory + --enable-libssp build libssp directory + --enable-build-with-cxx build with C++ compiler instead of C compiler +@@ -3076,7 +3076,8 @@ else + ENABLE_GOLD=no + fi + +-if test "${ENABLE_GOLD}" = "yes"; then ++case "${ENABLE_GOLD}" in ++yes|both) + # Check for ELF target. + is_elf=no + case "${target}" in +@@ -3096,11 +3097,17 @@ if test "${ENABLE_GOLD}" = "yes"; then + # Check for target supported by gold. + case "${target}" in + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) +- configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" ++ if test "${ENABLE_GOLD}" = both; then ++ configdirs="$configdirs gold" ++ else ++ configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" ++ fi + ;; + esac + fi +-fi ++ ENABLE_GOLD=yes ++ ;; ++esac + + # Configure extra directories which are host specific + +diff --git a/configure.ac b/configure.ac +index 407ab59..b349633 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -311,10 +311,11 @@ esac + # Handle --enable-gold. + + AC_ARG_ENABLE(gold, +-[ --enable-gold use gold instead of ld], ++[ --enable-gold[[=ARG]] build gold [[ARG={yes,both}]]], + ENABLE_GOLD=$enableval, + ENABLE_GOLD=no) +-if test "${ENABLE_GOLD}" = "yes"; then ++case "${ENABLE_GOLD}" in ++yes|both) + # Check for ELF target. + is_elf=no + case "${target}" in +@@ -334,11 +335,17 @@ if test "${ENABLE_GOLD}" = "yes"; then + # Check for target supported by gold. + case "${target}" in + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) +- configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" ++ if test "${ENABLE_GOLD}" = both; then ++ configdirs="$configdirs gold" ++ else ++ configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" ++ fi + ;; + esac + fi +-fi ++ ENABLE_GOLD=yes ++ ;; ++esac + + # Configure extra directories which are host specific + +diff --git a/gold/Makefile.am b/gold/Makefile.am +index 8d8b617..85b103b 100644 +--- a/gold/Makefile.am ++++ b/gold/Makefile.am +@@ -163,12 +163,20 @@ check: libgold.a + + install-exec-local: ld-new$(EXEEXT) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin +- n=`echo ld | sed '$(transform)'`; \ ++ n=`echo @installed_linker@ | sed '$(transform)'`; \ + $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \ +- if test "$(bindir)" != "$(tooldir)/bin"; then \ +- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ +- ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ if test "@linker@" = "ld.gold"; then \ ++ if test "@installed_linker@" != "ld"; then \ ++ ld=`echo ld | sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \ ++ fi; \ ++ if test "$(bindir)" != "$(tooldir)/bin"; then \ ++ rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ + || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ fi; \ + fi + + # We want install to imply install-info as per GNU standards, despite +diff --git a/gold/Makefile.in b/gold/Makefile.in +index d4c689b..9b5c860 100644 +--- a/gold/Makefile.in ++++ b/gold/Makefile.in +@@ -303,8 +303,10 @@ htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ ++installed_linker = @installed_linker@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++linker = @linker@ + localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ +@@ -1200,12 +1202,20 @@ check: libgold.a + + install-exec-local: ld-new$(EXEEXT) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin +- n=`echo ld | sed '$(transform)'`; \ ++ n=`echo @installed_linker@ | sed '$(transform)'`; \ + $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${n}$(EXEEXT); \ +- if test "$(bindir)" != "$(tooldir)/bin"; then \ +- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ +- ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ if test "@linker@" = "ld.gold"; then \ ++ if test "@installed_linke@" != "ld"; then \ ++ ld=`echo ld | sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$${ld}$(EXEEXT); \ ++ fi; \ ++ if test "$(bindir)" != "$(tooldir)/bin"; then \ ++ rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$${n}$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ + || $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ fi; \ + fi + + # We want install to imply install-info as per GNU standards, despite +diff --git a/gold/configure b/gold/configure +index e4eb9fb..407e580 100755 +--- a/gold/configure ++++ b/gold/configure +@@ -682,6 +682,8 @@ PLUGINS_FALSE + PLUGINS_TRUE + THREADS_FALSE + THREADS_TRUE ++linker ++installed_linker + am__untar + am__tar + AMTAR +@@ -759,6 +761,8 @@ ac_subst_files='' + ac_user_opts=' + enable_option_checking + with_sysroot ++enable_gold ++enable_linker + enable_threads + enable_plugins + enable_targets +@@ -1403,6 +1407,8 @@ Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --enable-gold[=ARG] build gold [ARG={yes,both}] ++ --enable-linker=[ARG] specify the default linker [ARG={bfd,gold}] + --enable-threads multi-threaded linking + --enable-plugins linker plugins + --enable-targets alternative target configurations +@@ -3227,6 +3233,35 @@ cat >>confdefs.h <<_ACEOF + _ACEOF + + ++# Check whether --enable-gold was given. ++if test "${enable_gold+set}" = set; then : ++ enableval=$enable_gold; if test "${enableval}" = "both"; then ++ bfd_linker=ld.bfd ++ installed_linker=ld.gold ++ else ++ bfd_linker=ld.gold ++ installed_linker=ld ++ fi ++else ++ bfd_linker=ld.bfd ++ installed_linker=ld ++fi ++ ++ ++ ++# Check whether --enable-linker was given. ++if test "${enable_linker+set}" = set; then : ++ enableval=$enable_linker; if test "${enableval}" = "gold"; then ++ linker=ld.gold ++ else ++ linker=$bfd_linker ++ fi ++else ++ linker=$bfd_linker ++fi ++ ++ ++ + # Check whether --enable-threads was given. + if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; case "${enableval}" in +diff --git a/gold/configure.ac b/gold/configure.ac +index 85e23f9..10389a9 100644 +--- a/gold/configure.ac ++++ b/gold/configure.ac +@@ -38,6 +38,29 @@ AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT, "$sysroot", + AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT_RELOCATABLE, $sysroot_relocatable, + [Whether the system root can be relocated]) + ++AC_ARG_ENABLE(gold, ++[ --enable-gold[[=ARG]] build gold [[ARG={yes,both}]]], ++[if test "${enableval}" = "both"; then ++ bfd_linker=ld.bfd ++ installed_linker=ld.gold ++ else ++ bfd_linker=ld.gold ++ installed_linker=ld ++ fi], ++[bfd_linker=ld.bfd ++ installed_linker=ld]) ++AC_SUBST(installed_linker) ++ ++AC_ARG_ENABLE(linker, ++[ --enable-linker=[[ARG]] specify the default linker [[ARG={bfd,gold}]]], ++[if test "${enableval}" = "gold"; then ++ linker=ld.gold ++ else ++ linker=$bfd_linker ++ fi], ++[linker=$bfd_linker]) ++AC_SUBST(linker) ++ + dnl For now threads are a configure time option. + AC_ARG_ENABLE([threads], + [ --enable-threads multi-threaded linking], +diff --git a/ld/Makefile.am b/ld/Makefile.am +index c1d3dbf..1930a8b 100644 +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -95,7 +95,7 @@ CXX_FOR_TARGET = ` \ + fi; \ + fi` + +-transform = s/^ld-new$$/ld/;@program_transform_name@ ++transform = s/^ld-new$$/@installed_linker@/;$(program_transform_name) + bin_PROGRAMS = ld-new + info_TEXINFOS = ld.texinfo + ld_TEXINFOS = configdoc.texi +@@ -1959,13 +1959,21 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.o spu_icache.s spu_ica + + .PHONY: install-exec-local install-data-local + +-install-exec-local: ld-new$(EXEEXT) ++install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin +- n=`echo ld | sed '$(transform)'`; \ +- if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \ +- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ +- ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ +- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ n=`echo @installed_linker@ | sed '$(transform)'`; \ ++ if test "@linker@" = "ld.bfd"; then \ ++ if test "@installed_linker@" != "ld"; then \ ++ ld=`echo ld | sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ ++ fi; \ ++ if test "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)"; then \ ++ rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ fi; \ + fi + + install-data-local: +diff --git a/ld/Makefile.in b/ld/Makefile.in +index 0da0fff..2c5ab4a 100644 +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -152,7 +152,7 @@ CTAGS = ctags + DEJATOOL = $(PACKAGE) + RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir + DIST_SUBDIRS = $(SUBDIRS) +-transform = s/^ld-new$$/ld/;@program_transform_name@ ++transform = s/^ld-new$$/@installed_linker@/;$(program_transform_name) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ + AR = @AR@ +@@ -293,8 +293,10 @@ htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ ++installed_linker = @installed_linker@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++linker = @linker@ + localedir = @localedir@ + localstatedir = @localstatedir@ + lt_ECHO = @lt_ECHO@ +@@ -3274,13 +3276,21 @@ mostlyclean-local: + + .PHONY: install-exec-local install-data-local + +-install-exec-local: ld-new$(EXEEXT) ++install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin +- n=`echo ld | sed '$(transform)'`; \ +- if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \ +- rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ +- ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ +- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ n=`echo @installed_linker@ | sed '$(transform)'`; \ ++ if test "@linker@" = "ld.bfd"; then \ ++ if test "@installed_linker@" != "ld"; then \ ++ ld=`echo ld | sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ ++ fi; \ ++ if test "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)"; then \ ++ rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ ++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ ++ fi; \ + fi + + install-data-local: +diff --git a/ld/configure b/ld/configure +index 9eb6a17..088a24d 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -797,6 +797,8 @@ GREP + CPP + NO_WERROR + WARN_CFLAGS ++linker ++installed_linker + TARGET_SYSTEM_ROOT_DEFINE + TARGET_SYSTEM_ROOT + use_sysroot +@@ -901,6 +903,8 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_gold ++enable_linker + enable_got + enable_werror + enable_build_warnings +@@ -1548,6 +1552,8 @@ Optional Features: + (and sometimes confusing) to the casual installer + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-gold[=ARG] build gold [ARG={yes,both}] ++ --enable-linker=[ARG] specify the default linker [ARG={bfd,gold}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) + --enable-werror treat compile warnings as errors +@@ -4302,6 +4308,35 @@ fi + + + ++# Check whether --enable-gold was given. ++if test "${enable_gold+set}" = set; then : ++ enableval=$enable_gold; if test "${enableval}" = "both"; then ++ gold_linker=ld.gold ++ installed_linker=ld.bfd ++else ++ gold_linker=ld.bfd ++ installed_linker=ld ++fi ++else ++ gold_linker=ld.bfd ++ installed_linker=ld ++fi ++ ++ ++ ++# Check whether --enable-linker was given. ++if test "${enable_linker+set}" = set; then : ++ enableval=$enable_linker; if test "${enableval}" = "gold"; then ++ linker=$gold_linker ++ else ++ linker=ld.bfd ++ fi ++else ++ linker=ld.bfd ++fi ++ ++ ++ + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : + enableval=$enable_got; case "${enableval}" in +@@ -6087,13 +6122,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:6090: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:6125: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:6093: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:6128: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:6096: output\"" >&5) ++ (eval echo "\"\$as_me:6131: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -7298,7 +7333,7 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 7301 "configure"' > conftest.$ac_ext ++ echo '#line 7336 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -8560,11 +8595,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8563: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8598: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:8567: \$? = $ac_status" >&5 ++ echo "$as_me:8602: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -8899,11 +8934,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8902: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8937: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:8906: \$? = $ac_status" >&5 ++ echo "$as_me:8941: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -9004,11 +9039,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9007: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:9042: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:9011: \$? = $ac_status" >&5 ++ echo "$as_me:9046: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -9059,11 +9094,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9062: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:9097: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:9066: \$? = $ac_status" >&5 ++ echo "$as_me:9101: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -11441,7 +11476,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11444 "configure" ++#line 11479 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11537,7 +11572,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11540 "configure" ++#line 11575 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/ld/configure.in b/ld/configure.in +index c4655f5..9786953 100644 +--- a/ld/configure.in ++++ b/ld/configure.in +@@ -69,6 +69,29 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE(gold, ++[ --enable-gold[[=ARG]] build gold [[ARG={yes,both}]]], ++[if test "${enableval}" = "both"; then ++ gold_linker=ld.gold ++ installed_linker=ld.bfd ++else ++ gold_linker=ld.bfd ++ installed_linker=ld ++fi], ++[gold_linker=ld.bfd ++ installed_linker=ld]) ++AC_SUBST(installed_linker) ++ ++AC_ARG_ENABLE(linker, ++[ --enable-linker=[[ARG]] specify the default linker [[ARG={bfd,gold}]]], ++[if test "${enableval}" = "gold"; then ++ linker=$gold_linker ++ else ++ linker=ld.bfd ++ fi], ++[linker=ld.bfd]) ++AC_SUBST(linker) ++ + AC_ARG_ENABLE([got], + AS_HELP_STRING([--enable-got=], + [GOT handling scheme (target, single, negative, multigot)]), --- binutils-2.20.orig/debian/patches/132_libiberty_sh.dpatch +++ binutils-2.20/debian/patches/132_libiberty_sh.dpatch @@ -0,0 +1,45 @@ +#!/bin/sh -e +## 132_libiberty_sh.dpatch +## +## DP: Description: libiberty build fix for sh +## DP: Author: Nobuhiro Iwamatsu + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -217,6 +217,7 @@ if [[ "${shared}" = "yes" ]]; then + * ) PICFLAG=-fPIC ;; + esac ;; + s390*-*-*) PICFLAG=-fpic ;; ++ sh*-*-*) PICFLAG=-fPIC ;; + esac + fi + AC_SUBST(PICFLAG) +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -4860,6 +4860,7 @@ if [ "${shared}" = "yes" ]; then + * ) PICFLAG=-fPIC ;; + esac ;; + s390*-*-*) PICFLAG=-fpic ;; ++ sh*-*-*) PICFLAG=-fPIC ;; + esac + fi + --- binutils-2.20.orig/debian/patches/013_bash_in_ld_testsuite.dpatch +++ binutils-2.20/debian/patches/013_bash_in_ld_testsuite.dpatch @@ -0,0 +1,49 @@ +#!/bin/sh -e +## 013_bash_in_ld_testsuite.dpatch.dpatch by Matthias Klose +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Explicitely use bash for the ld testsuite. + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- ./ld/testsuite/config/default.exp.orig 2009-04-19 21:52:33.000000000 +0200 ++++ ./ld/testsuite/config/default.exp 2009-04-19 21:54:01.000000000 +0200 +@@ -119,10 +119,10 @@ + #makefile rules, with embedded shell variable expansions. + #make wants $$shell_var, we want $shell_var ... + set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' < +## DP: Upstream status: Debian specific + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- binutils-2.19.91.20090923.orig/ld/lexsup.c ++++ binutils-2.19.91.20090923/ld/lexsup.c +@@ -160,6 +160,9 @@ + OPTION_ACCEPT_UNKNOWN_INPUT_ARCH, + OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH, + OPTION_PIE, ++#if defined(__mips__) ++ OPTION_FORCE_PIE, ++#endif + OPTION_UNRESOLVED_SYMBOLS, + OPTION_WARN_UNRESOLVED_SYMBOLS, + OPTION_ERROR_UNRESOLVED_SYMBOLS, +@@ -484,6 +487,10 @@ + '\0', NULL, N_("Create a position independent executable"), ONE_DASH }, + { {"pic-executable", no_argument, NULL, OPTION_PIE}, + '\0', NULL, NULL, TWO_DASHES }, ++#if defined(__mips__) ++ { {"force-pie", no_argument, NULL, OPTION_FORCE_PIE}, ++ '\0', NULL, "Force creation of a position independent executable (Debian mips/mipsel specific)", TWO_DASHES }, ++#endif + { {"sort-common", optional_argument, NULL, OPTION_SORT_COMMON}, + '\0', N_("[=ascending|descending]"), + N_("Sort common symbols by alignment [in specified order]"), +@@ -591,6 +598,9 @@ + struct option *really_longopts; + int last_optind; + enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR; ++#if defined(__mips__) ++ int force_pie = FALSE; ++#endif + + shortopts = (char *) xmalloc (OPTION_COUNT * 3 + 2); + longopts = (struct option *) +@@ -1161,6 +1171,11 @@ + else + einfo (_("%P%F: -pie not supported\n")); + break; ++#if defined(__mips__) ++ case OPTION_FORCE_PIE: ++ force_pie = TRUE; ++ break; ++#endif + case 'h': /* Used on Solaris. */ + case OPTION_SONAME: + command_line.soname = optarg; +@@ -1499,6 +1514,13 @@ + if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET) + /* FIXME: Should we allow emulations a chance to set this ? */ + link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols; ++ ++#if defined(__mips__) ++ if (link_info.pie && !force_pie) ++ { ++ einfo ("%P%F: -pie broken and disabled on mips/mipsel in Debian, use --force-pie to overwrite\n"); ++ } ++#endif + } + + /* Add the (colon-separated) elements of DIRLIST_PTR to the +--- binutils-2.19.91.20090923.orig/ld/testsuite/ld-pie/pie.exp ++++ binutils-2.19.91.20090923/ld/testsuite/ld-pie/pie.exp +@@ -26,6 +26,10 @@ + if { ![istarget *-*-linux*] } { + return + } ++# Disable tests on mips/mipsel ++if { [istarget mips*-*-linux*] } { ++ return ++} + + # Check if -pie is supported or not. + send_log "$CC -fpie -pie $srcdir/$subdir/pie.c -o tmpdir/pie" --- binutils-2.20.orig/debian/patches/001_ld_makefile_patch.dpatch +++ binutils-2.20/debian/patches/001_ld_makefile_patch.dpatch @@ -0,0 +1,52 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad --exclude=CVS --exclude=.svn ./ld/Makefile.am /tmp/dpep-work.eKU2vW/binutils-2.16.1cvs20050902/ld/Makefile.am +--- ./ld/Makefile.am 2005-08-31 03:27:36.000000000 +0000 ++++ /tmp/dpep-work.eKU2vW/binutils-2.16.1cvs20050902/ld/Makefile.am 2005-09-02 21:42:18.000000000 +0000 +@@ -20,7 +20,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urNad --exclude=CVS --exclude=.svn ./ld/Makefile.in /tmp/dpep-work.eKU2vW/binutils-2.16.1cvs20050902/ld/Makefile.in +--- ./ld/Makefile.in 2005-08-31 03:27:36.000000000 +0000 ++++ /tmp/dpep-work.eKU2vW/binutils-2.16.1cvs20050902/ld/Makefile.in 2005-09-02 21:43:37.259127535 +0000 +@@ -268,7 +268,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include --- binutils-2.20.orig/debian/patches/012_check_ldrunpath_length.dpatch +++ binutils-2.20/debian/patches/012_check_ldrunpath_length.dpatch @@ -0,0 +1,47 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad binutils-2.16/ld/emultempl/elf32.em /tmp/dpep.u3SQkH/binutils-2.16/ld/emultempl/elf32.em +--- binutils-2.16/ld/emultempl/elf32.em 2005-04-13 19:59:07.000000000 +0200 ++++ /tmp/dpep.u3SQkH/binutils-2.16/ld/emultempl/elf32.em 2005-05-06 19:18:08.236669718 +0200 +@@ -885,6 +885,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1059,6 +1061,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, --- binutils-2.20.orig/debian/patches/131_ld_bootstrap_testsuite.dpatch +++ binutils-2.20/debian/patches/131_ld_bootstrap_testsuite.dpatch @@ -0,0 +1,72 @@ +#!/bin/sh -e +## 131_ld_bootstrap_testsuite.dpatch +## +## DP: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins +## DP: Author: Rafael Espindola +## DP: Upstream status: proposed patch + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +Index: ld/testsuite/ld-bootstrap/bootstrap.exp +=================================================================== +RCS file: /cvs/src/src/ld/testsuite/ld-bootstrap/bootstrap.exp,v +retrieving revision 1.18 +diff -u -r1.18 bootstrap.exp +--- ./ld/testsuite/ld-bootstrap/bootstrap.exp 2 Sep 2009 07:25:38 -0000 1.18 ++++ ./ld/testsuite/ld-bootstrap/bootstrap.exp 9 Oct 2009 15:38:50 -0000 +@@ -30,6 +30,15 @@ + return + } + ++remote_exec host "$nm --help" "" "/dev/null" "plugin-support" ++set tmp [file_contents "plugin-support"] ++regexp ".*\(--plugin\).*\n" $tmp foo plugins ++if [info exists plugins] then { ++ set plugins "yes" ++} else { ++ set plugins "no" ++} ++ + # Bootstrap ld. First link the object files together using -r, in + # order to test -r. Then link the result into an executable, ld1, to + # really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a +@@ -61,6 +70,11 @@ + continue + } + ++ if { $flags == "--static" && $plugins == "yes" } then { ++ untested $testname ++ continue ++ } ++ + # If we only have a shared libbfd, we probably can't run the + # --static test. + if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then { +@@ -91,6 +105,10 @@ + } + } + ++ if { $plugins == "yes" } { ++ set extralibs "$extralibs -ldl" ++ } ++ + # On Irix 5, linking with --static only works if all the files are + # compiled using -non_shared. + if {"$flags" == "--static"} { --- binutils-2.20.orig/debian/patches/003_gprof_see_also_monitor.dpatch +++ binutils-2.20/debian/patches/003_gprof_see_also_monitor.dpatch @@ -0,0 +1,37 @@ +#!/bin/sh -e +## 014_gprof_manpage_fix.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Don't mention monitor(3) which doesn't exist in Debian. (#160654) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/gprof/gprof.texi binutils-2.14.90.0.6/gprof/gprof.texi +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/gprof/gprof.texi 2002-08-02 01:49:32.000000000 +0100 ++++ binutils-2.14.90.0.6/gprof/gprof.texi 2003-09-10 22:42:37.000000000 +0100 +@@ -181,7 +181,7 @@ + @c man end + + @c man begin SEEALSO +-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. ++cc(1), prof(1), and the Info entry for @file{gprof}. + + ``An Execution Profiler for Modular Programs'', + by S. Graham, P. Kessler, M. McKusick; --- binutils-2.20.orig/debian/patches/128_build_id.dpatch +++ binutils-2.20/debian/patches/128_build_id.dpatch @@ -0,0 +1,64 @@ +#!/bin/sh -e +## 128_build_id.dpatch +## +## DP: Description: Fix ld corrupt build ID generation +## DP: Author: Nick Clifton +## DP: Upstream status: Taken from Fedora (BZ 501582) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- ./bfd/section.c.orig 2009-09-09 23:40:20.000000000 +0200 ++++ ./bfd/section.c 2009-09-10 17:09:57.000000000 +0200 +@@ -1496,7 +1496,7 @@ + return TRUE; + + p = (bfd_byte *) +- bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); ++ bfd_zmalloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); + if (p == NULL) + return FALSE; + *buf = p; +--- ./bfd/elfcode.h.orig 2009-09-09 23:40:19.000000000 +0200 ++++ ./bfd/elfcode.h 2009-09-10 17:08:49.000000000 +0200 +@@ -1139,6 +1139,24 @@ + + if (i_shdr.contents) + (*process) (i_shdr.contents, i_shdr.sh_size, arg); ++ else ++ { ++ asection *sec; ++ ++ sec = bfd_section_from_elf_index (abfd, count); ++ if (sec != NULL) ++ { ++ if (sec->contents == NULL) ++ { ++ /* Force rereading from file. */ ++ sec->flags &= ~SEC_IN_MEMORY; ++ if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents)) ++ continue; ++ } ++ if (sec->contents != NULL) ++ (*process) (sec->contents, i_shdr.sh_size, arg); ++ } ++ } + } + + return TRUE; --- binutils-2.20.orig/debian/patches/006_better_file_error.dpatch +++ binutils-2.20/debian/patches/006_better_file_error.dpatch @@ -0,0 +1,43 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 ++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) --- binutils-2.20.orig/debian/patches/002_gprof_profile_arcs.dpatch +++ binutils-2.20/debian/patches/002_gprof_profile_arcs.dpatch @@ -0,0 +1,51 @@ +#!/bin/sh -e +## 003_gmon_manpage_fix.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add more documentation about profiling and -fprofile-arcs. + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad binutils-2.16/gprof/gprof.texi /tmp/dpep.NHuhql/binutils-2.16/gprof/gprof.texi +--- binutils-2.16/gprof/gprof.texi 2005-03-03 13:05:12.000000000 +0100 ++++ /tmp/dpep.NHuhql/binutils-2.16/gprof/gprof.texi 2005-05-06 19:14:10.038173569 +0200 +@@ -138,6 +138,10 @@ + If more than one profile file is specified, the @code{gprof} + output shows the sum of the profile information in the given profile files. + ++If you use gcc 2.95.x or 3.0 to compile your binaries, you may need ++to add the @samp{-fprofile-arcs} to the compile command line in order ++for the call graphs to be properly stored in gmon.out. ++ + @code{Gprof} calculates the amount of time spent in each routine. + Next, these times are propagated along the edges of the call graph. + Cycles are discovered, and calls into a cycle are made to share the time +@@ -268,6 +272,11 @@ + options. The same option, @samp{-pg}, alters either compilation or linking + to do what is necessary for profiling. Here are examples: + ++If you use gcc 2.95.x or 3.0.x, you may need to add the ++@samp{-fprofile-arcs} option to the compile line along with @samp{-pg} ++in order to allow the call-graphs to be properly included in the gmon.out ++file. ++ + @example + cc -g -c myprog.c utils.c -pg + cc -o myprog myprog.o utils.o -pg --- binutils-2.20.orig/debian/patches/129_dir_section.dpatch +++ binutils-2.20/debian/patches/129_dir_section.dpatch @@ -0,0 +1,154 @@ +#!/bin/sh -e +## 129_dir_section.dpatch +## +## DP: Description: Add directory section for info documents. +## DP: Author: Matthias Klose +## DP: Upstream status: submitted upstream + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +bfd/ +2009-08-27 Matthias Klose + + * bfd.texinfo: Add directory section for info document. + +gas/ +2009-08-27 Matthias Klose + + * doc/as.texinfo: Add directory section for info document. + +gprof/ +2009-08-27 Matthias Klose + + * gprof.texi: Add directory section for info document. + +ld/ +2009-08-27 Matthias Klose + + * ld.texinfo, ldint.texinfo: Add directory section for info document. + +@DPATCH@ +--- ./bfd/doc/bfd.texinfo~ 2008-11-19 17:22:46.000000000 +0100 ++++ ./bfd/doc/bfd.texinfo 2009-08-27 15:59:58.000000000 +0200 +@@ -6,13 +6,12 @@ + @c + @synindex fn cp + +-@ifinfo +-@format +-START-INFO-DIR-ENTRY ++@ifnottex ++@dircategory Software development ++@direntry + * Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +-@end format +-@end ifinfo ++@end direntry ++@end ifnottex + + @copying + This file documents the BFD library. +--- ./gas/doc/as.texinfo~ 2009-08-06 19:38:02.000000000 +0200 ++++ ./gas/doc/as.texinfo 2009-08-27 15:59:27.000000000 +0200 +@@ -84,14 +84,13 @@ + @c might as well show 'em anyways. + @end ifinfo + +-@ifinfo +-@format +-START-INFO-DIR-ENTRY ++@ifnottex ++@dircategory Software development ++@direntry + * As: (as). The GNU assembler. + * Gas: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +-@end format +-@end ifinfo ++@end direntry ++@end ifnottex + + @finalout + @syncodeindex ky cp +--- ./gprof/gprof.texi~ 2009-08-27 15:26:11.000000000 +0200 ++++ ./gprof/gprof.texi 2009-08-27 16:00:58.000000000 +0200 +@@ -10,15 +10,14 @@ + @include bfdver.texi + @c man end + +-@ifinfo ++@ifnottex + @c This is a dir.info fragment to support semi-automated addition of + @c manuals to an info tree. zoo@cygnus.com is developing this facility. +-@format +-START-INFO-DIR-ENTRY ++@dircategory Software development ++@direntry + * gprof: (gprof). Profiling your program's execution +-END-INFO-DIR-ENTRY +-@end format +-@end ifinfo ++@end direntry ++@end ifnottex + + @copying + This file documents the gprof profiler of the GNU system. +--- ./ld/ld.texinfo~ 2009-07-06 15:48:51.000000000 +0200 ++++ ./ld/ld.texinfo 2009-08-27 15:57:09.000000000 +0200 +@@ -39,13 +39,12 @@ + @end ifset + @c man end + +-@ifinfo +-@format +-START-INFO-DIR-ENTRY ++@ifnottex ++@dircategory Software development ++@direntry + * Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +-@end format +-@end ifinfo ++@end direntry ++@end ifnottex + + @copying + This file documents the @sc{gnu} linker LD +--- ./ld/ldint.texinfo~ 2007-10-01 11:54:57.000000000 +0200 ++++ ./ld/ldint.texinfo 2009-08-27 15:58:50.000000000 +0200 +@@ -4,13 +4,12 @@ + @c 2003, 2007 + @c Free Software Foundation, Inc. + +-@ifinfo +-@format +-START-INFO-DIR-ENTRY ++@ifnottex ++@dircategory Software development ++@direntry + * Ld-Internals: (ldint). The GNU linker internals. +-END-INFO-DIR-ENTRY +-@end format +-@end ifinfo ++@end direntry ++@end ifnottex + + @copying + This file documents the internals of the GNU linker ld. --- binutils-2.20.orig/debian/patches/00list +++ binutils-2.20/debian/patches/00list @@ -0,0 +1,16 @@ +000_branch_updates +001_ld_makefile_patch +002_gprof_profile_arcs +003_gprof_see_also_monitor +006_better_file_error +012_check_ldrunpath_length +013_bash_in_ld_testsuite +020_pie_mips.dpatch + +127_x86_64_i386_biarch +128_build_id +129_dir_section +130_gold_disable_testsuite_build +131_ld_bootstrap_testsuite +132_libiberty_sh +133_enable_gold --- binutils-2.20.orig/debian/patches/020_pie_mips.dpatch +++ binutils-2.20/debian/patches/020_pie_mips.dpatch @@ -0,0 +1,41 @@ +#!/bin/sh -e +## 020_pie_mips.dpatch +## +## DP: Description: Fix -pie on mips/mipsel +## DP: Author: Alan Modra +## DP: Upstream status: in BTS, not yet merged + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- a/bfd/elfxx-mips.c 18 Sep 2009 20:34:30 -0000 1.262 ++++ b/bfd/elfxx-mips.c 4 Nov 2009 01:50:24 -0000 +@@ -5688,9 +5688,9 @@ mips_elf_create_dynamic_relocation (bfd + + /* We must now calculate the dynamic symbol table index to use + in the relocation. */ +- if (h != NULL +- && (!h->root.def_regular +- || (info->shared && !info->symbolic && !h->root.forced_local))) ++ if (!(h == NULL ++ || (h->root.def_regular ++ && (info->executable || info->symbolic || h->root.forced_local)))) + { + indx = h->root.dynindx; + if (SGI_COMPAT (output_bfd)) --- binutils-2.20.orig/debian/patches/130_gold_disable_testsuite_build.dpatch +++ binutils-2.20/debian/patches/130_gold_disable_testsuite_build.dpatch @@ -0,0 +1,48 @@ +#!/bin/sh -e +## 130_gold_disable_testsuite_build.dpatch +## +## DP: Description: Disable build of gold/testsuite +## DP: Author: Matthias Klose +## DP: Upstream status: local + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- ./gold/Makefile.am~ 2009-10-06 14:35:04.000000000 +0000 ++++ ./gold/Makefile.am 2009-08-24 05:55:55.000000000 +0000 +@@ -2,7 +2,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = po testsuite ++SUBDIRS = po + + tooldir = $(exec_prefix)/$(target_alias) + +--- ./gold/Makefile.in~ 2009-10-06 14:35:19.000000000 +0000 ++++ ./gold/Makefile.in 2009-08-24 05:55:55.000000000 +0000 +@@ -327,7 +327,7 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign +-SUBDIRS = po testsuite ++SUBDIRS = po + tooldir = $(exec_prefix)/$(target_alias) + ACLOCAL_AMFLAGS = -I ../bfd -I ../config + AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) --- binutils-2.20.orig/debian/patches/000_branch_updates.dpatch +++ binutils-2.20/debian/patches/000_branch_updates.dpatch @@ -0,0 +1,2405 @@ +#!/bin/sh -e +## 000_branch_updates.dpatch +## +## DP: Description: updates from the binutils 2.20 branch + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urN --exclude=CVS binutils-2.20/bfd/ChangeLog branch-2.20/bfd/ChangeLog +--- binutils-2.20/bfd/ChangeLog 2009-10-16 13:47:49.000000000 +0200 ++++ branch-2.20/bfd/ChangeLog 2009-11-03 14:59:39.000000000 +0100 +@@ -1,3 +1,20 @@ ++2009-11-03 Alan Modra ++ Ulrich Weigand ++ ++ * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs ++ (jump tables or other references to code labels) as well. ++ ++2009-10-20 Alan Modra ++ ++ PR binutils/10802 ++ * opncls.c (_maybe_make_executable): Make DYNAMIC files executable. ++ ++2009-10-19 Hans-Peter Nilsson ++ ++ * elf32-cris.c (cris_elf_relocate_section) : ++ Don't subtract the size of the TLS block for non-shared objects ++ from the relocation. ++ + 2009-10-16 Tristan Gingold + + * configure.in: Bump version to 2.20 +diff -urN --exclude=CVS binutils-2.20/bfd/elf32-cris.c branch-2.20/bfd/elf32-cris.c +--- binutils-2.20/bfd/elf32-cris.c 2009-03-25 04:03:40.000000000 +0100 ++++ branch-2.20/bfd/elf32-cris.c 2009-10-19 18:35:19.000000000 +0200 +@@ -1690,15 +1690,10 @@ + = -elf_cris_hash_table (info)->dtpmod_refcount; + } + +- /* The thread-based offset to the local symbol is the +- relocation. +- For the executable, TLS data begins at the thread pointer plus +- the negative size of the TLS data. For a DSO, that's part of +- the module TLS offset. */ ++ /* The relocation is the offset from the start of the module ++ TLS block to the (local) symbol. */ + relocation -= elf_hash_table (info)->tls_sec == NULL +- ? 0 : (elf_hash_table (info)->tls_sec->vma +- + (info->shared +- ? 0 : elf_hash_table (info)->tls_size)); ++ ? 0 : elf_hash_table (info)->tls_sec->vma; + break; + + case R_CRIS_32_GD: +diff -urN --exclude=CVS binutils-2.20/bfd/elf32-spu.c branch-2.20/bfd/elf32-spu.c +--- binutils-2.20/bfd/elf32-spu.c 2009-10-02 12:51:12.000000000 +0200 ++++ branch-2.20/bfd/elf32-spu.c 2009-11-03 14:59:39.000000000 +0100 +@@ -2692,19 +2692,12 @@ + Elf_Internal_Sym *sym; + struct elf_link_hash_entry *h; + bfd_vma val; +- bfd_boolean reject, is_call; ++ bfd_boolean nonbranch, is_call; + struct function_info *caller; + struct call_info *callee; + +- reject = FALSE; + r_type = ELF32_R_TYPE (irela->r_info); +- if (r_type != R_SPU_REL16 +- && r_type != R_SPU_ADDR16) +- { +- reject = TRUE; +- if (!(call_tree && spu_hash_table (info)->params->auto_overlay)) +- continue; +- } ++ nonbranch = r_type != R_SPU_REL16 && r_type != R_SPU_ADDR16; + + r_indx = ELF32_R_SYM (irela->r_info); + if (!get_sym_h (&h, &sym, &sym_sec, psyms, r_indx, sec->owner)) +@@ -2715,7 +2708,7 @@ + continue; + + is_call = FALSE; +- if (!reject) ++ if (!nonbranch) + { + unsigned char insn[4]; + +@@ -2746,14 +2739,13 @@ + } + else + { +- reject = TRUE; +- if (!(call_tree && spu_hash_table (info)->params->auto_overlay) +- || is_hint (insn)) ++ nonbranch = TRUE; ++ if (is_hint (insn)) + continue; + } + } + +- if (reject) ++ if (nonbranch) + { + /* For --auto-overlay, count possible stubs we need for + function pointer references. */ +@@ -2763,8 +2755,20 @@ + else + sym_type = ELF_ST_TYPE (sym->st_info); + if (sym_type == STT_FUNC) +- spu_hash_table (info)->non_ovly_stub += 1; +- continue; ++ { ++ if (call_tree && spu_hash_table (info)->params->auto_overlay) ++ spu_hash_table (info)->non_ovly_stub += 1; ++ /* If the symbol type is STT_FUNC then this must be a ++ function pointer initialisation. */ ++ continue; ++ } ++ /* Ignore data references. */ ++ if ((sym_sec->flags & (SEC_ALLOC | SEC_LOAD | SEC_CODE)) ++ != (SEC_ALLOC | SEC_LOAD | SEC_CODE)) ++ continue; ++ /* Otherwise we probably have a jump table reloc for ++ a switch statement or some other reference to a ++ code label. */ + } + + if (h) +@@ -2813,7 +2817,7 @@ + callee->is_pasted = FALSE; + callee->broken_cycle = FALSE; + callee->priority = priority; +- callee->count = 1; ++ callee->count = nonbranch? 0 : 1; + if (callee->fun->last_caller != sec) + { + callee->fun->last_caller = sec; +diff -urN --exclude=CVS binutils-2.20/bfd/opncls.c branch-2.20/bfd/opncls.c +--- binutils-2.20/bfd/opncls.c 2009-10-16 10:53:41.000000000 +0200 ++++ branch-2.20/bfd/opncls.c 2009-10-20 10:40:36.000000000 +0200 +@@ -635,7 +635,7 @@ + /* If the file was open for writing and is now executable, + make it so. */ + if (abfd->direction == write_direction +- && abfd->flags & EXEC_P) ++ && (abfd->flags & (EXEC_P | DYNAMIC)) != 0) + { + struct stat buf; + +diff -urN --exclude=CVS binutils-2.20/binutils/ChangeLog branch-2.20/binutils/ChangeLog +--- binutils-2.20/binutils/ChangeLog 2009-10-02 12:51:12.000000000 +0200 ++++ branch-2.20/binutils/ChangeLog 2009-10-23 02:15:41.000000000 +0200 +@@ -1,3 +1,17 @@ ++2009-10-23 Thomas Cougnard ++ ++ * readelf.c (dynamic_info): Correct size of array. ++ ++2009-10-19 Jerker Bäck ++ ++ PR binutils/10793 ++ * prdbg.c (tg_end_struct_type): Warning fix. ++ ++ PR binutils/10792 ++ * dlltool.c (dll_name_list_append): Declare variable at start ++ of block. ++ (dll_name_list_count, dll_name-list_print): Likewise. ++ + 2009-10-01 Alan Modra + + * addr2line.c (slurp_symtab): Don't use bfd_read_minisymbols. +diff -urN --exclude=CVS binutils-2.20/binutils/dlltool.c branch-2.20/binutils/dlltool.c +--- binutils-2.20/binutils/dlltool.c 2009-09-04 03:22:18.000000000 +0200 ++++ branch-2.20/binutils/dlltool.c 2009-10-19 01:12:50.000000000 +0200 +@@ -3162,13 +3162,15 @@ + static void + dll_name_list_append (dll_name_list_type * list, bfd_byte * data) + { ++ dll_name_list_node_type * entry; ++ + /* Error checking. */ + if (! list || ! list->tail) + return; + + /* Allocate new node. */ +- dll_name_list_node_type * entry = +- (dll_name_list_node_type *) xmalloc (sizeof (dll_name_list_node_type)); ++ entry = ((dll_name_list_node_type *) ++ xmalloc (sizeof (dll_name_list_node_type))); + + /* Initialize its values. */ + entry->dllname = xstrdup ((char *) data); +@@ -3184,12 +3186,14 @@ + static int + dll_name_list_count (dll_name_list_type * list) + { ++ dll_name_list_node_type * p; ++ int count = 0; ++ + /* Error checking. */ + if (! list || ! list->head) + return 0; + +- int count = 0; +- dll_name_list_node_type * p = list->head; ++ p = list->head; + + while (p && p->next) + { +@@ -3204,11 +3208,13 @@ + static void + dll_name_list_print (dll_name_list_type * list) + { ++ dll_name_list_node_type * p; ++ + /* Error checking. */ + if (! list || ! list->head) + return; + +- dll_name_list_node_type * p = list->head; ++ p = list->head; + + while (p && p->next && p->next->dllname && *(p->next->dllname)) + { +diff -urN --exclude=CVS binutils-2.20/binutils/prdbg.c branch-2.20/binutils/prdbg.c +--- binutils-2.20/binutils/prdbg.c 2009-09-14 13:43:26.000000000 +0200 ++++ branch-2.20/binutils/prdbg.c 2009-10-19 01:14:52.000000000 +0200 +@@ -2088,8 +2088,7 @@ + static bfd_boolean + tg_end_struct_type (void *p ATTRIBUTE_UNUSED) + { +- struct pr_handle *info = (struct pr_handle *) p; +- assert (info->stack != NULL); ++ assert (((struct pr_handle *) p)->stack != NULL); + + return TRUE; + } +diff -urN --exclude=CVS binutils-2.20/binutils/readelf.c branch-2.20/binutils/readelf.c +--- binutils-2.20/binutils/readelf.c 2009-09-22 17:40:59.000000000 +0200 ++++ branch-2.20/binutils/readelf.c 2009-10-23 02:15:41.000000000 +0200 +@@ -165,7 +165,7 @@ + static unsigned long dynamic_syminfo_offset; + static unsigned int dynamic_syminfo_nent; + static char program_interpreter[PATH_MAX]; +-static bfd_vma dynamic_info[DT_JMPREL + 1]; ++static bfd_vma dynamic_info[DT_ENCODING]; + static bfd_vma dynamic_info_DT_GNU_HASH; + static bfd_vma version_info[16]; + static Elf_Internal_Ehdr elf_header; +diff -urN --exclude=CVS binutils-2.20/configure.ac branch-2.20/configure.ac +--- binutils-2.20/configure.ac 2009-10-16 13:52:23.000000000 +0200 ++++ branch-2.20/configure.ac 2009-09-02 09:05:02.000000000 +0200 +@@ -169,7 +169,7 @@ + # binutils, gas and ld appear in that order because it makes sense to run + # "make check" in that particular order. + # If --enable-gold is used, "gold" will replace "ld". +-host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" ++host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" + + # libgcj represents the runtime libraries only used by gcj. + libgcj="target-libffi \ +diff -urN --exclude=CVS binutils-2.20/gas/ChangeLog branch-2.20/gas/ChangeLog +--- binutils-2.20/gas/ChangeLog 2009-10-13 13:52:15.000000000 +0200 ++++ branch-2.20/gas/ChangeLog 2009-10-28 09:23:48.000000000 +0100 +@@ -1,3 +1,15 @@ ++2009-10-28 Alan Modra ++ ++ PR gas/10856 ++ * expr.c (resolve_expression): Only add "left" value to O_symbol ++ expression when the symbol is undefined and different from the ++ original symbol. Simplify negative logic. ++ ++2009-10-18 Matthias Klose ++ ++ * config/tc-arm.c (make_mapping_symbol): Add braces to avoid empty body ++ in release builds. ++ + 2009-10-13 Alan Modra + H.J. Lu + +diff -urN --exclude=CVS binutils-2.20/gas/config/tc-arm.c branch-2.20/gas/config/tc-arm.c +--- binutils-2.20/gas/config/tc-arm.c 2009-08-30 00:10:59.000000000 +0200 ++++ branch-2.20/gas/config/tc-arm.c 2009-10-18 10:21:27.000000000 +0200 +@@ -2486,7 +2486,9 @@ + frag->tc_frag_data.first_map = symbolP; + } + if (frag->tc_frag_data.last_map != NULL) +- know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP)); ++ { ++ know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP)); ++ } + frag->tc_frag_data.last_map = symbolP; + } + +diff -urN --exclude=CVS binutils-2.20/gas/expr.c branch-2.20/gas/expr.c +--- binutils-2.20/gas/expr.c 2009-09-14 13:43:26.000000000 +0200 ++++ branch-2.20/gas/expr.c 2009-10-28 09:23:48.000000000 +0100 +@@ -1997,6 +1997,7 @@ + /* Help out with CSE. */ + valueT final_val = expressionP->X_add_number; + symbolS *add_symbol = expressionP->X_add_symbol; ++ symbolS *orig_add_symbol = add_symbol; + symbolS *op_symbol = expressionP->X_op_symbol; + operatorT op = expressionP->X_op; + valueT left, right; +@@ -2078,6 +2079,7 @@ + left = right; + seg_left = seg_right; + add_symbol = op_symbol; ++ orig_add_symbol = expressionP->X_op_symbol; + op = O_symbol; + break; + } +@@ -2122,18 +2124,19 @@ + { + if (op == O_bit_exclusive_or || op == O_bit_inclusive_or) + { +- if (seg_right != absolute_section || right != 0) ++ if (!(seg_right == absolute_section && right == 0)) + { + seg_left = seg_right; + left = right; + add_symbol = op_symbol; ++ orig_add_symbol = expressionP->X_op_symbol; + } + op = O_symbol; + break; + } + else if (op == O_left_shift || op == O_right_shift) + { +- if (seg_left != absolute_section || left != 0) ++ if (!(seg_left == absolute_section && left == 0)) + { + op = O_symbol; + break; +@@ -2149,6 +2152,7 @@ + seg_left = seg_right; + left = right; + add_symbol = op_symbol; ++ orig_add_symbol = expressionP->X_op_symbol; + op = O_symbol; + break; + } +@@ -2158,11 +2162,11 @@ + op = O_symbol; + break; + } +- else if (left != right +- || ((seg_left != reg_section || seg_right != reg_section) +- && (seg_left != undefined_section +- || seg_right != undefined_section +- || add_symbol != op_symbol))) ++ else if (!(left == right ++ && ((seg_left == reg_section && seg_right == reg_section) ++ || (seg_left == undefined_section ++ && seg_right == undefined_section ++ && add_symbol == op_symbol)))) + return 0; + else if (op == O_bit_and || op == O_bit_inclusive_or) + { +@@ -2233,7 +2237,8 @@ + op = O_constant; + else if (seg_left == reg_section && final_val == 0) + op = O_register; +- else if (add_symbol != expressionP->X_add_symbol) ++ else if (seg_left == undefined_section ++ && add_symbol != orig_add_symbol) + final_val += left; + expressionP->X_add_symbol = add_symbol; + } +diff -urN --exclude=CVS binutils-2.20/gold/ChangeLog branch-2.20/gold/ChangeLog +--- binutils-2.20/gold/ChangeLog 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/ChangeLog 2009-11-07 03:17:46.000000000 +0100 +@@ -1,3 +1,98 @@ ++2009-11-06 Ian Lance Taylor ++ ++ Bring over from mainline: ++ 2009-10-16 Doug Kwan ++ ++ * dynobj.cc (Versions::Versions): Initialize version_script_. ++ Only insert base version symbol definition for a shared object ++ if version script defines any version versions. ++ (Versions::define_base_version): New method definition. ++ (Versions::add_def): Check that base version is not needed. ++ (Versions::add_need): Define base version lazily. ++ * dynobj.h (Versions::define_base_version): New method declaration. ++ (Versions::needs_base_version_): New data member declaration. ++ ++2009-11-06 Ian Lance Taylor ++ ++ PR 10876 ++ * defstd.cc (in_segment): Set only_if_ref true for "end". ++ ++2009-11-05 Ian Lance Taylor ++ ++ PR 10910 ++ * output.cc (Output_segment::add_output_section): Add missing ++ return statement. ++ ++2009-11-04 Ian Lance Taylor ++ ++ PR 10880 ++ * object.h (class Object): Add is_needed and set_is_needed ++ methods. Add is_needed_ field. Make bool fields into bitfields. ++ * symtab.cc (Symbol_table::set_dynsym_indexes): If a symbol is ++ defined in a dynamic object and referenced by a regular object, ++ set is_needed for the dynamic object. ++ * layout.cc (Layout::finish_dynamic_section): Don't add DT_NEEDED ++ if the file is marked with as_needed and it is not needed. ++ ++2009-11-04 Ian Lance Taylor ++ ++ PR 10887 ++ * arm.cc (Target_arm::do_finalize_sections): Don't add dynamic ++ tags if data is discarded by linker script. ++ * i386.cc (Target_i386::do_finalize_sections): Likewise. ++ * powerpc.cc (Target_powerpc::do_finalize_sections): Likewise. ++ * sparc.cc (Target_sparc::do_finalize_sections): Likewise. ++ * x86_64.cc (Target_x86_64::do_finalize_sections): Likewise. ++ ++2009-11-04 Ian Lance Taylor ++ ++ * layout.cc (Layout::get_output_section): Add is_interp and ++ is_dynamic_linker_section parameters. Change all callers. ++ (Layout::choose_output_section): Likewise. ++ (Layout::make_output_section): Likewise. ++ (Layout::add_output_section_data): Add is_dynamic_linker_section ++ parameter. Change all callers. ++ * layout.h (class Layout): Update declarations. ++ * output.h (class Output_section): Add is_interp, set_is_interp, ++ is_dynamic_linker_section, set_is_dynamic_linker_section methods. ++ Add is_interp_, is_dynamic_linker_section_ fields. Change ++ generate_code_fills_at_write_ to a bitfield. ++ * output.cc (Output_section::Output_sections): Initialize new ++ fields. ++ (Output_segment::add_output_section): Add do_sort parameter. ++ Change all callers. ++ ++2009-11-03 Ian Lance Taylor ++ ++ PR 10860 ++ * options.h (class General_options): Add --warn-common. ++ * resolve.cc (Symbol_table::resolve): Handle --warn-common when ++ merging two common symbols. ++ (Symbol_table::should_override): Handle --warn-common when merging ++ a common symbol with a defined symbol. Use report_resolve_problem ++ for multiple definitions. ++ (Symbol_table::report_resolve_problem): New function. ++ * symtab.h (class Symbol_table): Declare report_resolve_problem. ++ ++2009-11-03 Ian Lance Taylor ++ ++ PR 10893 ++ * defstd.cc (in_section): Add entries for __rel_iplt_start, ++ __rel_iplt_end, __rela_iplt_start, __rela_iplt_end, and __stack. ++ ++2009-11-03 Ian Lance Taylor ++ ++ PR 10895 ++ * po/Make-in ($(srcdir)/$(PACKAGE).pot): Pass -C and ++ --msgid-bugs-address. ++ (install-pdf): New target. ++ (install-data_yes): Look up one directory to find mkinstalldirs. ++ ++2009-10-16 Doug Kwan ++ ++ * output.cc (Output_segment::set_section_list_address): Cast ++ expressions to unsigned long long type to avoid format warnings. ++ + 2009-10-15 Ian Lance Taylor + + * script.cc (Script_options::add_symbol_assignment): Always add a +diff -urN --exclude=CVS binutils-2.20/gold/arm.cc branch-2.20/gold/arm.cc +--- binutils-2.20/gold/arm.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/arm.cc 2009-11-04 17:36:08.000000000 +0100 +@@ -1075,7 +1075,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_); ++ this->got_, false); + os->set_is_relro(); + + // The old GNU linker creates a .got.plt section. We just +@@ -1086,7 +1086,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_plt_); ++ this->got_plt_, false); + os->set_is_relro(); + + // The first three entries are reserved. +@@ -1114,7 +1114,7 @@ + gold_assert(layout != NULL); + this->rel_dyn_ = new Reloc_section(parameters->options().combreloc()); + layout->add_output_section_data(".rel.dyn", elfcpp::SHT_REL, +- elfcpp::SHF_ALLOC, this->rel_dyn_); ++ elfcpp::SHF_ALLOC, this->rel_dyn_, true); + } + return this->rel_dyn_; + } +@@ -1186,7 +1186,7 @@ + { + this->rel_ = new Reloc_section(false); + layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL, +- elfcpp::SHF_ALLOC, this->rel_); ++ elfcpp::SHF_ALLOC, this->rel_, true); + } + + template +@@ -1348,7 +1348,7 @@ + layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_EXECINSTR), +- this->plt_); ++ this->plt_, false); + } + this->plt_->add_entry(gsym); + } +@@ -1831,10 +1831,12 @@ + Output_data_dynamic* const odyn = layout->dynamic_data(); + if (odyn != NULL) + { +- if (this->got_plt_ != NULL) ++ if (this->got_plt_ != NULL ++ && this->got_plt_->output_section() != NULL) + odyn->add_section_address(elfcpp::DT_PLTGOT, this->got_plt_); + +- if (this->plt_ != NULL) ++ if (this->plt_ != NULL ++ && this->plt_->output_section() != NULL) + { + const Output_data* od = this->plt_->rel_plt(); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, od); +@@ -1842,7 +1844,8 @@ + odyn->add_constant(elfcpp::DT_PLTREL, elfcpp::DT_REL); + } + +- if (this->rel_dyn_ != NULL) ++ if (this->rel_dyn_ != NULL ++ && this->rel_dyn_->output_section() != NULL) + { + const Output_data* od = this->rel_dyn_; + odyn->add_section_address(elfcpp::DT_REL, od); +@@ -1879,7 +1882,8 @@ + == NULL); + Output_segment* exidx_segment = + layout->make_output_segment(elfcpp::PT_ARM_EXIDX, elfcpp::PF_R); +- exidx_segment->add_output_section(exidx_section, elfcpp::PF_R); ++ exidx_segment->add_output_section(exidx_section, elfcpp::PF_R, ++ false); + } + } + } +diff -urN --exclude=CVS binutils-2.20/gold/common.cc branch-2.20/gold/common.cc +--- binutils-2.20/gold/common.cc 2009-06-22 08:51:53.000000000 +0200 ++++ branch-2.20/gold/common.cc 2009-11-04 16:56:34.000000000 +0100 +@@ -239,7 +239,7 @@ + Output_data_space *poc = new Output_data_space(addralign, ds_name); + Output_section *os = layout->add_output_section_data(name, + elfcpp::SHT_NOBITS, +- flags, poc); ++ flags, poc, false); + if (os != NULL) + { + if (commons_section_type == COMMONS_SMALL) +diff -urN --exclude=CVS binutils-2.20/gold/copy-relocs.cc branch-2.20/gold/copy-relocs.cc +--- binutils-2.20/gold/copy-relocs.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/copy-relocs.cc 2009-11-04 16:56:34.000000000 +0100 +@@ -138,7 +138,7 @@ + layout->add_output_section_data(".bss", + elfcpp::SHT_NOBITS, + elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE, +- this->dynbss_); ++ this->dynbss_, false); + } + + Output_data_space* dynbss = this->dynbss_; +diff -urN --exclude=CVS binutils-2.20/gold/defstd.cc branch-2.20/gold/defstd.cc +--- binutils-2.20/gold/defstd.cc 2008-02-04 06:41:39.000000000 +0100 ++++ branch-2.20/gold/defstd.cc 2009-11-07 03:02:56.000000000 +0100 +@@ -107,7 +107,67 @@ + 0, // nonvis + true, // offset_is_from_end + true // only_if_ref +- } ++ }, ++ { ++ "__rel_iplt_start", // name ++ ".rel.iplt", // output_section ++ 0, // value ++ 0, // size ++ elfcpp::STT_NOTYPE, // type ++ elfcpp::STB_GLOBAL, // binding ++ elfcpp::STV_HIDDEN, // visibility ++ 0, // nonvis ++ false, // offset_is_from_end ++ true // only_if_ref ++ }, ++ { ++ "__rel_iplt_end", // name ++ ".rel.iplt", // output_section ++ 0, // value ++ 0, // size ++ elfcpp::STT_NOTYPE, // type ++ elfcpp::STB_GLOBAL, // binding ++ elfcpp::STV_HIDDEN, // visibility ++ 0, // nonvis ++ true, // offset_is_from_end ++ true // only_if_ref ++ }, ++ { ++ "__rela_iplt_start", // name ++ ".rela.iplt", // output_section ++ 0, // value ++ 0, // size ++ elfcpp::STT_NOTYPE, // type ++ elfcpp::STB_GLOBAL, // binding ++ elfcpp::STV_HIDDEN, // visibility ++ 0, // nonvis ++ false, // offset_is_from_end ++ true // only_if_ref ++ }, ++ { ++ "__rela_iplt_end", // name ++ ".rela.iplt", // output_section ++ 0, // value ++ 0, // size ++ elfcpp::STT_NOTYPE, // type ++ elfcpp::STB_GLOBAL, // binding ++ elfcpp::STV_HIDDEN, // visibility ++ 0, // nonvis ++ true, // offset_is_from_end ++ true // only_if_ref ++ }, ++ { ++ "__stack", // name ++ ".stack", // output_section ++ 0, // value ++ 0, // size ++ elfcpp::STT_NOTYPE, // type ++ elfcpp::STB_GLOBAL, // binding ++ elfcpp::STV_DEFAULT, // visibility ++ 0, // nonvis ++ false, // offset_is_from_end ++ true // only_if_ref ++ }, + }; + + const int in_section_count = sizeof in_section / sizeof in_section[0]; +@@ -238,7 +298,7 @@ + elfcpp::STV_DEFAULT, // visibility + 0, // nonvis + Symbol::SEGMENT_END, // offset_from_base +- false // only_if_ref ++ true // only_if_ref + } + }; + +diff -urN --exclude=CVS binutils-2.20/gold/dynobj.cc branch-2.20/gold/dynobj.cc +--- binutils-2.20/gold/dynobj.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/dynobj.cc 2009-11-07 03:17:46.000000000 +0100 +@@ -1300,27 +1300,18 @@ + Versions::Versions(const Version_script_info& version_script, + Stringpool* dynpool) + : defs_(), needs_(), version_table_(), +- is_finalized_(false), version_script_(version_script) ++ is_finalized_(false), version_script_(version_script), ++ needs_base_version_(parameters->options().shared()) + { +- // We always need a base version, so define that first. Nothing +- // explicitly declares itself as part of base, so it doesn't need to +- // be in version_table_. +- if (parameters->options().shared()) +- { +- const char* name = parameters->options().soname(); +- if (name == NULL) +- name = parameters->options().output_file_name(); +- name = dynpool->add(name, false, NULL); +- Verdef* vdbase = new Verdef(name, std::vector(), +- true, false, true); +- this->defs_.push_back(vdbase); +- } +- + if (!this->version_script_.empty()) + { + // Parse the version script, and insert each declared version into + // defs_ and version_table_. + std::vector versions = this->version_script_.get_versions(); ++ ++ if (this->needs_base_version_ && !versions.empty()) ++ this->define_base_version(dynpool); ++ + for (size_t k = 0; k < versions.size(); ++k) + { + Stringpool::Key version_key; +@@ -1350,6 +1341,28 @@ + delete *p; + } + ++// Define the base version of a shared library. The base version definition ++// must be the first entry in defs_. We insert it lazily so that defs_ is ++// empty if no symbol versioning is used. Then layout can just drop the ++// version sections. ++ ++void ++Versions::define_base_version(Stringpool* dynpool) ++{ ++ // If we do any versioning at all, we always need a base version, so ++ // define that first. Nothing explicitly declares itself as part of base, ++ // so it doesn't need to be in version_table_. ++ gold_assert(this->defs_.empty()); ++ const char* name = parameters->options().soname(); ++ if (name == NULL) ++ name = parameters->options().output_file_name(); ++ name = dynpool->add(name, false, NULL); ++ Verdef* vdbase = new Verdef(name, std::vector(), ++ true, false, true); ++ this->defs_.push_back(vdbase); ++ this->needs_base_version_ = false; ++} ++ + // Return the dynamic object which a symbol refers to. + + Dynobj* +@@ -1421,7 +1434,10 @@ + if (parameters->options().shared()) + gold_error(_("symbol %s has undefined version %s"), + sym->demangled_name().c_str(), version); +- ++ else ++ // We only insert a base version for shared library. ++ gold_assert(!this->needs_base_version_); ++ + // When creating a regular executable, automatically define + // a new version. + Verdef* vd = new Verdef(version, std::vector(), +@@ -1468,6 +1484,10 @@ + + if (vn == NULL) + { ++ // Create base version definition lazily for shared library. ++ if (this->needs_base_version_) ++ this->define_base_version(dynpool); ++ + // We have a new filename. + vn = new Verneed(filename); + this->needs_.push_back(vn); +diff -urN --exclude=CVS binutils-2.20/gold/dynobj.h branch-2.20/gold/dynobj.h +--- binutils-2.20/gold/dynobj.h 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/dynobj.h 2009-11-07 03:17:46.000000000 +0100 +@@ -584,6 +584,10 @@ + version_index(const Symbol_table*, const Stringpool*, + const Symbol* sym) const; + ++ // Define the base version of a shared library. ++ void ++ define_base_version(Stringpool* dynpool); ++ + // We keep a hash table mapping canonicalized name/version pairs to + // a version base. + typedef std::pair Key; +@@ -616,6 +620,9 @@ + bool is_finalized_; + // Contents of --version-script, if passed, or NULL. + const Version_script_info& version_script_; ++ // Whether we need to insert a base version. This is only used for ++ // shared libaries and is cleared when the base version is defined. ++ bool needs_base_version_; + }; + + } // End namespace gold. +diff -urN --exclude=CVS binutils-2.20/gold/i386.cc branch-2.20/gold/i386.cc +--- binutils-2.20/gold/i386.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/i386.cc 2009-11-04 17:36:08.000000000 +0100 +@@ -464,7 +464,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_); ++ this->got_, false); + os->set_is_relro(); + + // The old GNU linker creates a .got.plt section. We just +@@ -475,7 +475,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_plt_); ++ this->got_plt_, false); + os->set_is_relro(); + + // The first three entries are reserved. +@@ -503,7 +503,7 @@ + gold_assert(layout != NULL); + this->rel_dyn_ = new Reloc_section(parameters->options().combreloc()); + layout->add_output_section_data(".rel.dyn", elfcpp::SHT_REL, +- elfcpp::SHF_ALLOC, this->rel_dyn_); ++ elfcpp::SHF_ALLOC, this->rel_dyn_, true); + } + return this->rel_dyn_; + } +@@ -578,7 +578,7 @@ + { + this->rel_ = new Reloc_section(false); + layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL, +- elfcpp::SHF_ALLOC, this->rel_); ++ elfcpp::SHF_ALLOC, this->rel_, true); + } + + void +@@ -763,7 +763,7 @@ + layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_EXECINSTR), +- this->plt_); ++ this->plt_, false); + } + + this->plt_->add_entry(gsym); +@@ -1569,10 +1569,12 @@ + Output_data_dynamic* const odyn = layout->dynamic_data(); + if (odyn != NULL) + { +- if (this->got_plt_ != NULL) ++ if (this->got_plt_ != NULL ++ && this->got_plt_->output_section() != NULL) + odyn->add_section_address(elfcpp::DT_PLTGOT, this->got_plt_); + +- if (this->plt_ != NULL) ++ if (this->plt_ != NULL ++ && this->plt_->output_section() != NULL) + { + const Output_data* od = this->plt_->rel_plt(); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, od); +@@ -1580,7 +1582,8 @@ + odyn->add_constant(elfcpp::DT_PLTREL, elfcpp::DT_REL); + } + +- if (this->rel_dyn_ != NULL) ++ if (this->rel_dyn_ != NULL ++ && this->rel_dyn_->output_section() != NULL) + { + const Output_data* od = this->rel_dyn_; + odyn->add_section_address(elfcpp::DT_REL, od); +diff -urN --exclude=CVS binutils-2.20/gold/layout.cc branch-2.20/gold/layout.cc +--- binutils-2.20/gold/layout.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/layout.cc 2009-11-05 07:25:01.000000000 +0100 +@@ -388,11 +388,14 @@ + + // Return the output section to use for section NAME with type TYPE + // and section flags FLAGS. NAME must be canonicalized in the string +-// pool, and NAME_KEY is the key. ++// pool, and NAME_KEY is the key. IS_INTERP is true if this is the ++// .interp section. IS_DYNAMIC_LINKER_SECTION is true if this section ++// is used by the dynamic linker. + + Output_section* + Layout::get_output_section(const char* name, Stringpool::Key name_key, +- elfcpp::Elf_Word type, elfcpp::Elf_Xword flags) ++ elfcpp::Elf_Word type, elfcpp::Elf_Xword flags, ++ bool is_interp, bool is_dynamic_linker_section) + { + elfcpp::Elf_Xword lookup_flags = flags; + +@@ -441,7 +444,8 @@ + } + + if (os == NULL) +- os = this->make_output_section(name, type, flags); ++ os = this->make_output_section(name, type, flags, is_interp, ++ is_dynamic_linker_section); + ins.first->second = os; + return os; + } +@@ -451,13 +455,16 @@ + // RELOBJ, with type TYPE and flags FLAGS. RELOBJ may be NULL for a + // linker created section. IS_INPUT_SECTION is true if we are + // choosing an output section for an input section found in a input +-// file. This will return NULL if the input section should be +-// discarded. ++// file. IS_INTERP is true if this is the .interp section. ++// IS_DYNAMIC_LINKER_SECTION is true if this section is used by the ++// dynamic linker. This will return NULL if the input section should ++// be discarded. + + Output_section* + Layout::choose_output_section(const Relobj* relobj, const char* name, + elfcpp::Elf_Word type, elfcpp::Elf_Xword flags, +- bool is_input_section) ++ bool is_input_section, bool is_interp, ++ bool is_dynamic_linker_section) + { + // We should not see any input sections after we have attached + // sections to segments. +@@ -505,7 +512,9 @@ + + name = this->namepool_.add(name, false, NULL); + +- Output_section* os = this->make_output_section(name, type, flags); ++ Output_section* os = ++ this->make_output_section(name, type, flags, is_interp, ++ is_dynamic_linker_section); + os->set_found_in_sections_clause(); + *output_section_slot = os; + return os; +@@ -528,7 +537,8 @@ + + // Find or make the output section. The output section is selected + // based on the section name, type, and flags. +- return this->get_output_section(name, name_key, type, flags); ++ return this->get_output_section(name, name_key, type, flags, is_interp, ++ is_dynamic_linker_section); + } + + // Return the output section to use for input section SHNDX, with name +@@ -561,12 +571,13 @@ + { + name = this->namepool_.add(name, true, NULL); + os = this->make_output_section(name, shdr.get_sh_type(), +- shdr.get_sh_flags()); ++ shdr.get_sh_flags(), false, false); + } + else + { + os = this->choose_output_section(object, name, shdr.get_sh_type(), +- shdr.get_sh_flags(), true); ++ shdr.get_sh_flags(), true, false, ++ false); + if (os == NULL) + return NULL; + } +@@ -617,7 +628,7 @@ + Output_section* os = this->choose_output_section(object, name.c_str(), + sh_type, + shdr.get_sh_flags(), +- false); ++ false, false, false); + + os->set_should_link_to_symtab(); + os->set_info_section(data_section); +@@ -664,7 +675,8 @@ + group_section_name = this->namepool_.add(group_section_name, true, NULL); + Output_section* os = this->make_output_section(group_section_name, + elfcpp::SHT_GROUP, +- shdr.get_sh_flags()); ++ shdr.get_sh_flags(), ++ false, false); + + // We need to find a symbol with the signature in the symbol table. + // If we don't find one now, we need to look again later. +@@ -718,7 +730,7 @@ + name, + elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC, +- false); ++ false, false, false); + if (os == NULL) + return NULL; + +@@ -734,7 +746,7 @@ + ".eh_frame_hdr", + elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC, +- false); ++ false, false, false); + + if (hdr_os != NULL) + { +@@ -749,7 +761,7 @@ + Output_segment* hdr_oseg; + hdr_oseg = this->make_output_segment(elfcpp::PT_GNU_EH_FRAME, + elfcpp::PF_R); +- hdr_oseg->add_output_section(hdr_os, elfcpp::PF_R); ++ hdr_oseg->add_output_section(hdr_os, elfcpp::PF_R, false); + } + + this->eh_frame_data_->set_eh_frame_hdr(hdr_posd); +@@ -800,10 +812,12 @@ + Output_section* + Layout::add_output_section_data(const char* name, elfcpp::Elf_Word type, + elfcpp::Elf_Xword flags, +- Output_section_data* posd) ++ Output_section_data* posd, ++ bool is_dynamic_linker_section) + { + Output_section* os = this->choose_output_section(NULL, name, type, flags, +- false); ++ false, false, ++ is_dynamic_linker_section); + if (os != NULL) + os->add_output_section_data(posd); + return os; +@@ -838,11 +852,14 @@ + } + + // Make a new Output_section, and attach it to segments as +-// appropriate. ++// appropriate. IS_INTERP is true if this is the .interp section. ++// IS_DYNAMIC_LINKER_SECTION is true if this section is used by the ++// dynamic linker. + + Output_section* + Layout::make_output_section(const char* name, elfcpp::Elf_Word type, +- elfcpp::Elf_Xword flags) ++ elfcpp::Elf_Xword flags, bool is_interp, ++ bool is_dynamic_linker_section) + { + Output_section* os; + if ((flags & elfcpp::SHF_ALLOC) == 0 +@@ -850,7 +867,6 @@ + && is_compressible_debug_section(name)) + os = new Output_compressed_section(¶meters->options(), name, type, + flags); +- + else if ((flags & elfcpp::SHF_ALLOC) == 0 + && parameters->options().strip_debug_non_line() + && strcmp(".debug_abbrev", name) == 0) +@@ -876,6 +892,11 @@ + os = target->make_output_section(name, type, flags); + } + ++ if (is_interp) ++ os->set_is_interp(); ++ if (is_dynamic_linker_section) ++ os->set_is_dynamic_linker_section(); ++ + parameters->target().new_output_section(os); + + this->section_list_.push_back(os); +@@ -971,6 +992,8 @@ + + elfcpp::Elf_Word seg_flags = Layout::section_flags_to_segment(flags); + ++ bool sort_sections = !this->script_options_->saw_sections_clause(); ++ + // In general the only thing we really care about for PT_LOAD + // segments is whether or not they are writable, so that is how we + // search for them. Large data sections also go into their own +@@ -998,7 +1021,7 @@ + if (os->is_large_data_section() && !(*p)->is_large_data_segment()) + continue; + +- (*p)->add_output_section(os, seg_flags); ++ (*p)->add_output_section(os, seg_flags, sort_sections); + break; + } + +@@ -1008,7 +1031,7 @@ + seg_flags); + if (os->is_large_data_section()) + oseg->set_is_large_data_segment(); +- oseg->add_output_section(os, seg_flags); ++ oseg->add_output_section(os, seg_flags, sort_sections); + } + + // If we see a loadable SHT_NOTE section, we create a PT_NOTE +@@ -1024,7 +1047,7 @@ + && (((*p)->flags() & elfcpp::PF_W) + == (seg_flags & elfcpp::PF_W))) + { +- (*p)->add_output_section(os, seg_flags); ++ (*p)->add_output_section(os, seg_flags, false); + break; + } + } +@@ -1033,7 +1056,7 @@ + { + Output_segment* oseg = this->make_output_segment(elfcpp::PT_NOTE, + seg_flags); +- oseg->add_output_section(os, seg_flags); ++ oseg->add_output_section(os, seg_flags, false); + } + } + +@@ -1043,7 +1066,7 @@ + { + if (this->tls_segment_ == NULL) + this->make_output_segment(elfcpp::PT_TLS, seg_flags); +- this->tls_segment_->add_output_section(os, seg_flags); ++ this->tls_segment_->add_output_section(os, seg_flags, false); + } + + // If -z relro is in effect, and we see a relro section, we create a +@@ -1053,7 +1076,7 @@ + gold_assert(seg_flags == (elfcpp::PF_R | elfcpp::PF_W)); + if (this->relro_segment_ == NULL) + this->make_output_segment(elfcpp::PT_GNU_RELRO, seg_flags); +- this->relro_segment_->add_output_section(os, seg_flags); ++ this->relro_segment_->add_output_section(os, seg_flags, false); + } + } + +@@ -1064,7 +1087,8 @@ + { + name = this->namepool_.add(name, false, NULL); + Output_section* os = this->make_output_section(name, elfcpp::SHT_PROGBITS, +- elfcpp::SHF_ALLOC); ++ elfcpp::SHF_ALLOC, false, ++ false); + os->set_found_in_sections_clause(); + return os; + } +@@ -1134,7 +1158,7 @@ + elfcpp::SHT_DYNAMIC, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- false); ++ false, false, true); + this->dynamic_section_->set_is_relro(); + + symtab->define_in_output_data("_DYNAMIC", NULL, this->dynamic_section_, 0, 0, +@@ -1732,7 +1756,8 @@ + flags = elfcpp::SHF_ALLOC; + Output_section* os = this->choose_output_section(NULL, section_name, + elfcpp::SHT_NOTE, +- flags, false); ++ flags, false, false, ++ false); + if (os == NULL) + return NULL; + +@@ -1811,7 +1836,8 @@ + elfcpp::Elf_Xword flags = 0; + if (is_stack_executable) + flags |= elfcpp::SHF_EXECINSTR; +- this->make_output_section(name, elfcpp::SHT_PROGBITS, flags); ++ this->make_output_section(name, elfcpp::SHT_PROGBITS, flags, false, ++ false); + } + else + { +@@ -1971,7 +1997,8 @@ + this->namepool_.add(".gnu_incremental_inputs", false, NULL); + Output_section* inputs_os = + this->make_output_section(incremental_inputs_name, +- elfcpp::SHT_GNU_INCREMENTAL_INPUTS, 0); ++ elfcpp::SHT_GNU_INCREMENTAL_INPUTS, 0, ++ false, false); + Output_section_data* posd = + this->incremental_inputs_->create_incremental_inputs_section_data(); + inputs_os->add_output_section_data(posd); +@@ -1981,7 +2008,7 @@ + this->namepool_.add(".gnu_incremental_strtab", false, NULL); + Output_section* strtab_os = this->make_output_section(incremental_strtab_name, + elfcpp::SHT_STRTAB, +- 0); ++ 0, false, false); + Output_data_strtab* strtab_data = + new Output_data_strtab(this->incremental_inputs_->get_stringpool()); + strtab_os->add_output_section_data(strtab_data); +@@ -2593,7 +2620,7 @@ + const char* symtab_name = this->namepool_.add(".symtab", false, NULL); + Output_section* osymtab = this->make_output_section(symtab_name, + elfcpp::SHT_SYMTAB, +- 0); ++ 0, false, false); + this->symtab_section_ = osymtab; + + Output_section_data* pos = new Output_data_fixed_space(off - startoff, +@@ -2614,7 +2641,8 @@ + false, NULL); + Output_section* osymtab_xindex = + this->make_output_section(symtab_xindex_name, +- elfcpp::SHT_SYMTAB_SHNDX, 0); ++ elfcpp::SHT_SYMTAB_SHNDX, 0, false, ++ false); + + size_t symcount = (off - startoff) / symsize; + this->symtab_xindex_ = new Output_symtab_xindex(symcount); +@@ -2636,7 +2664,7 @@ + const char* strtab_name = this->namepool_.add(".strtab", false, NULL); + Output_section* ostrtab = this->make_output_section(strtab_name, + elfcpp::SHT_STRTAB, +- 0); ++ 0, false, false); + + Output_section_data* pstr = new Output_data_strtab(&this->sympool_); + ostrtab->add_output_section_data(pstr); +@@ -2663,7 +2691,8 @@ + + const char* name = this->namepool_.add(".shstrtab", false, NULL); + +- Output_section* os = this->make_output_section(name, elfcpp::SHT_STRTAB, 0); ++ Output_section* os = this->make_output_section(name, elfcpp::SHT_STRTAB, 0, ++ false, false); + + // We can't write out this section until we've set all the section + // names, and we don't set the names of compressed output sections +@@ -2776,7 +2805,7 @@ + Output_section* dynsym = this->choose_output_section(NULL, ".dynsym", + elfcpp::SHT_DYNSYM, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + Output_section_data* odata = new Output_data_fixed_space(index * symsize, + align, +@@ -2806,7 +2835,7 @@ + this->choose_output_section(NULL, ".dynsym_shndx", + elfcpp::SHT_SYMTAB_SHNDX, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + this->dynsym_xindex_ = new Output_symtab_xindex(index); + +@@ -2829,7 +2858,7 @@ + Output_section* dynstr = this->choose_output_section(NULL, ".dynstr", + elfcpp::SHT_STRTAB, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + Output_section_data* strdata = new Output_data_strtab(&this->dynpool_); + dynstr->add_output_section_data(strdata); +@@ -2855,7 +2884,7 @@ + Output_section* hashsec = this->choose_output_section(NULL, ".hash", + elfcpp::SHT_HASH, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + Output_section_data* hashdata = new Output_data_const_buffer(phash, + hashlen, +@@ -2880,7 +2909,7 @@ + Output_section* hashsec = this->choose_output_section(NULL, ".gnu.hash", + elfcpp::SHT_GNU_HASH, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + Output_section_data* hashdata = new Output_data_const_buffer(phash, + hashlen, +@@ -2978,7 +3007,7 @@ + Output_section* vsec = this->choose_output_section(NULL, ".gnu.version", + elfcpp::SHT_GNU_versym, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + unsigned char* vbuf; + unsigned int vsize; +@@ -3003,7 +3032,7 @@ + vdsec= this->choose_output_section(NULL, ".gnu.version_d", + elfcpp::SHT_GNU_verdef, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + unsigned char* vdbuf; + unsigned int vdsize; +@@ -3028,7 +3057,7 @@ + vnsec = this->choose_output_section(NULL, ".gnu.version_r", + elfcpp::SHT_GNU_verneed, + elfcpp::SHF_ALLOC, +- false); ++ false, false, true); + + unsigned char* vnbuf; + unsigned int vnsize; +@@ -3068,14 +3097,14 @@ + Output_section* osec = this->choose_output_section(NULL, ".interp", + elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC, +- false); ++ false, true, true); + osec->add_output_section_data(odata); + + if (!this->script_options_->saw_phdrs_clause()) + { + Output_segment* oseg = this->make_output_segment(elfcpp::PT_INTERP, + elfcpp::PF_R); +- oseg->add_output_section(osec, elfcpp::PF_R); ++ oseg->add_output_section(osec, elfcpp::PF_R, false); + } + } + +@@ -3091,7 +3120,8 @@ + (elfcpp::PF_R + | elfcpp::PF_W)); + oseg->add_output_section(this->dynamic_section_, +- elfcpp::PF_R | elfcpp::PF_W); ++ elfcpp::PF_R | elfcpp::PF_W, ++ false); + } + + Output_data_dynamic* const odyn = this->dynamic_data_; +@@ -3100,7 +3130,14 @@ + p != input_objects->dynobj_end(); + ++p) + { +- // FIXME: Handle --as-needed. ++ if (!(*p)->is_needed() ++ && (*p)->input_file()->options().as_needed()) ++ { ++ // This dynamic object was linked with --as-needed, but it ++ // is not needed. ++ continue; ++ } ++ + odyn->add_string(elfcpp::DT_NEEDED, (*p)->soname()); + } + +diff -urN --exclude=CVS binutils-2.20/gold/layout.h branch-2.20/gold/layout.h +--- binutils-2.20/gold/layout.h 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/layout.h 2009-11-04 16:56:34.000000000 +0100 +@@ -360,11 +360,13 @@ + layout_gnu_stack(bool seen_gnu_stack, uint64_t gnu_stack_flags); + + // Add an Output_section_data to the layout. This is used for +- // special sections like the GOT section. ++ // special sections like the GOT section. IS_DYNAMIC_LINKER_SECTION ++ // is true for sections which are used by the dynamic linker, such ++ // as dynamic reloc sections. + Output_section* + add_output_section_data(const char* name, elfcpp::Elf_Word type, + elfcpp::Elf_Xword flags, +- Output_section_data*); ++ Output_section_data*, bool is_dynamic_linker_section); + + // Create dynamic sections if necessary. + void +@@ -745,18 +747,21 @@ + // Return the output section for NAME, TYPE and FLAGS. + Output_section* + get_output_section(const char* name, Stringpool::Key name_key, +- elfcpp::Elf_Word type, elfcpp::Elf_Xword flags); ++ elfcpp::Elf_Word type, elfcpp::Elf_Xword flags, ++ bool is_interp, bool is_dynamic_linker_section); + + // Choose the output section for NAME in RELOBJ. + Output_section* + choose_output_section(const Relobj* relobj, const char* name, + elfcpp::Elf_Word type, elfcpp::Elf_Xword flags, +- bool is_input_section); ++ bool is_input_section, bool is_interp, ++ bool is_dynamic_linker_section); + + // Create a new Output_section. + Output_section* + make_output_section(const char* name, elfcpp::Elf_Word type, +- elfcpp::Elf_Xword flags); ++ elfcpp::Elf_Xword flags, bool is_interp, ++ bool is_dynamic_linker_section); + + // Attach a section to a segment. + void +diff -urN --exclude=CVS binutils-2.20/gold/object.h branch-2.20/gold/object.h +--- binutils-2.20/gold/object.h 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/object.h 2009-11-05 07:25:01.000000000 +0100 +@@ -195,8 +195,8 @@ + Object(const std::string& name, Input_file* input_file, bool is_dynamic, + off_t offset = 0) + : name_(name), input_file_(input_file), offset_(offset), shnum_(-1U), +- is_dynamic_(is_dynamic), uses_split_stack_(false), +- has_no_split_stack_(false), xindex_(NULL), no_export_(false) ++ is_dynamic_(is_dynamic), is_needed_(false), uses_split_stack_(false), ++ has_no_split_stack_(false), no_export_(false), xindex_(NULL) + { input_file->file().add_object(); } + + virtual ~Object() +@@ -217,6 +217,19 @@ + is_dynamic() const + { return this->is_dynamic_; } + ++ // Return whether this object is needed--true if it is a dynamic ++ // object which defines some symbol referenced by a regular object. ++ // We keep the flag here rather than in Dynobj for convenience when ++ // setting it. ++ bool ++ is_needed() const ++ { return this->is_needed_; } ++ ++ // Record that this object is needed. ++ void ++ set_is_needed() ++ { this->is_needed_ = true; } ++ + // Return whether this object was compiled with -fsplit-stack. + bool + uses_split_stack() const +@@ -589,17 +602,21 @@ + // Number of input sections. + unsigned int shnum_; + // Whether this is a dynamic object. +- bool is_dynamic_; ++ bool is_dynamic_ : 1; ++ // Whether this object is needed. This is only set for dynamic ++ // objects, and means that the object defined a symbol which was ++ // used by a reference from a regular object. ++ bool is_needed_ : 1; + // Whether this object was compiled with -fsplit-stack. +- bool uses_split_stack_; ++ bool uses_split_stack_ : 1; + // Whether this object contains any functions compiled with the + // no_split_stack attribute. +- bool has_no_split_stack_; +- // Many sections for objects with more than SHN_LORESERVE sections. +- Xindex* xindex_; ++ bool has_no_split_stack_ : 1; + // True if exclude this object from automatic symbol export. + // This is used only for archive objects. +- bool no_export_; ++ bool no_export_ : 1; ++ // Many sections for objects with more than SHN_LORESERVE sections. ++ Xindex* xindex_; + }; + + // A regular object (ET_REL). This is an abstract base class itself. +diff -urN --exclude=CVS binutils-2.20/gold/options.h branch-2.20/gold/options.h +--- binutils-2.20/gold/options.h 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/options.h 2009-11-04 02:28:30.000000000 +0100 +@@ -912,6 +912,10 @@ + DEFINE_special(version_script, options::TWO_DASHES, '\0', + N_("Read version script"), N_("FILE")); + ++ DEFINE_bool(warn_common, options::TWO_DASHES, '\0', false, ++ N_("Warn about duplicate common symbols"), ++ N_("Do not warn about duplicate common symbols (default)")); ++ + DEFINE_bool(warn_search_mismatch, options::TWO_DASHES, '\0', true, + N_("Warn when skipping an incompatible library"), + N_("Don't warn when skipping an incompatible library")); +diff -urN --exclude=CVS binutils-2.20/gold/output.cc branch-2.20/gold/output.cc +--- binutils-2.20/gold/output.cc 2009-10-16 09:42:50.000000000 +0200 ++++ branch-2.20/gold/output.cc 2009-11-05 20:58:28.000000000 +0100 +@@ -1800,13 +1800,15 @@ + is_relro_local_(false), + is_small_section_(false), + is_large_section_(false), ++ is_interp_(false), ++ is_dynamic_linker_section_(false), ++ generate_code_fills_at_write_(false), + tls_offset_(0), + checkpoint_(NULL), + merge_section_map_(), + merge_section_by_properties_map_(), + relaxed_input_section_map_(), +- is_relaxed_input_section_map_valid_(true), +- generate_code_fills_at_write_(false) ++ is_relaxed_input_section_map_valid_(true) + { + // An unallocated section has no address. Forcing this means that + // we don't need special treatment for symbols defined in debug +@@ -3045,11 +3047,13 @@ + + void + Output_segment::add_output_section(Output_section* os, +- elfcpp::Elf_Word seg_flags) ++ elfcpp::Elf_Word seg_flags, ++ bool do_sort) + { + gold_assert((os->flags() & elfcpp::SHF_ALLOC) != 0); + gold_assert(!this->is_max_align_known_); + gold_assert(os->is_large_data_section() == this->is_large_data_segment()); ++ gold_assert(this->type() == elfcpp::PT_LOAD || !do_sort); + + // Update the segment flags. + this->flags_ |= seg_flags; +@@ -3060,19 +3064,12 @@ + else + pdl = &this->output_data_; + +- // So that PT_NOTE segments will work correctly, we need to ensure +- // that all SHT_NOTE sections are adjacent. This will normally +- // happen automatically, because all the SHT_NOTE input sections +- // will wind up in the same output section. However, it is possible +- // for multiple SHT_NOTE input sections to have different section +- // flags, and thus be in different output sections, but for the +- // different section flags to map into the same segment flags and +- // thus the same output segment. +- + // Note that while there may be many input sections in an output + // section, there are normally only a few output sections in an +- // output segment. This loop is expected to be fast. ++ // output segment. The loops below are expected to be fast. + ++ // So that PT_NOTE segments will work correctly, we need to ensure ++ // that all SHT_NOTE sections are adjacent. + if (os->type() == elfcpp::SHT_NOTE && !pdl->empty()) + { + Output_segment::Output_data_list::iterator p = pdl->end(); +@@ -3094,8 +3091,8 @@ + // case: we group the SHF_TLS/SHT_NOBITS sections right after the + // SHF_TLS/SHT_PROGBITS sections. This lets us set up PT_TLS + // correctly. SHF_TLS sections get added to both a PT_LOAD segment +- // and the PT_TLS segment -- we do this grouping only for the +- // PT_LOAD segment. ++ // and the PT_TLS segment; we do this grouping only for the PT_LOAD ++ // segment. + if (this->type_ != elfcpp::PT_TLS + && (os->flags() & elfcpp::SHF_TLS) != 0) + { +@@ -3225,6 +3222,68 @@ + gold_unreachable(); + } + ++ // We do some further output section sorting in order to make the ++ // generated program run more efficiently. We should only do this ++ // when not using a linker script, so it is controled by the DO_SORT ++ // parameter. ++ if (do_sort) ++ { ++ // FreeBSD requires the .interp section to be in the first page ++ // of the executable. That is a more efficient location anyhow ++ // for any OS, since it means that the kernel will have the data ++ // handy after it reads the program headers. ++ if (os->is_interp() && !pdl->empty()) ++ { ++ pdl->insert(pdl->begin(), os); ++ return; ++ } ++ ++ // Put loadable non-writable notes immediately after the .interp ++ // sections, so that the PT_NOTE segment is on the first page of ++ // the executable. ++ if (os->type() == elfcpp::SHT_NOTE ++ && (os->flags() & elfcpp::SHF_WRITE) == 0 ++ && !pdl->empty()) ++ { ++ Output_segment::Output_data_list::iterator p = pdl->begin(); ++ if ((*p)->is_section() && (*p)->output_section()->is_interp()) ++ ++p; ++ pdl->insert(p, os); ++ return; ++ } ++ ++ // If this section is used by the dynamic linker, and it is not ++ // writable, then put it first, after the .interp section and ++ // any loadable notes. This makes it more likely that the ++ // dynamic linker will have to read less data from the disk. ++ if (os->is_dynamic_linker_section() ++ && !pdl->empty() ++ && (os->flags() & elfcpp::SHF_WRITE) == 0) ++ { ++ bool is_reloc = (os->type() == elfcpp::SHT_REL ++ || os->type() == elfcpp::SHT_RELA); ++ Output_segment::Output_data_list::iterator p = pdl->begin(); ++ while (p != pdl->end() ++ && (*p)->is_section() ++ && ((*p)->output_section()->is_dynamic_linker_section() ++ || (*p)->output_section()->type() == elfcpp::SHT_NOTE)) ++ { ++ // Put reloc sections after the other ones. Putting the ++ // dynamic reloc sections first confuses BFD, notably ++ // objcopy and strip. ++ if (!is_reloc ++ && ((*p)->output_section()->type() == elfcpp::SHT_REL ++ || (*p)->output_section()->type() == elfcpp::SHT_RELA)) ++ break; ++ ++p; ++ } ++ pdl->insert(p, os); ++ return; ++ } ++ } ++ ++ // If there were no constraints on the output section, just add it ++ // to the end of the list. + pdl->push_back(os); + } + +@@ -3503,15 +3562,20 @@ + else + { + Output_section* os = (*p)->output_section(); ++ ++ // Cast to unsigned long long to avoid format warnings. ++ unsigned long long previous_dot = ++ static_cast(addr + (off - startoff)); ++ unsigned long long dot = ++ static_cast((*p)->address()); ++ + if (os == NULL) + gold_error(_("dot moves backward in linker script " +- "from 0x%llx to 0x%llx"), +- addr + (off - startoff), (*p)->address()); ++ "from 0x%llx to 0x%llx"), previous_dot, dot); + else + gold_error(_("address of section '%s' moves backward " + "from 0x%llx to 0x%llx"), +- os->name(), addr + (off - startoff), +- (*p)->address()); ++ os->name(), previous_dot, dot); + } + } + (*p)->set_file_offset(off); +diff -urN --exclude=CVS binutils-2.20/gold/output.h branch-2.20/gold/output.h +--- binutils-2.20/gold/output.h 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/output.h 2009-11-04 16:56:34.000000000 +0100 +@@ -2387,6 +2387,27 @@ + is_large_data_section() + { return this->is_large_section_ && this->type_ != elfcpp::SHT_NOBITS; } + ++ // True if this is the .interp section which goes into the PT_INTERP ++ // segment. ++ bool ++ is_interp() const ++ { return this->is_interp_; } ++ ++ // Record that this is the interp section. ++ void ++ set_is_interp() ++ { this->is_interp_ = true; } ++ ++ // True if this is a section used by the dynamic linker. ++ bool ++ is_dynamic_linker_section() const ++ { return this->is_dynamic_linker_section_; } ++ ++ // Record that this is a section used by the dynamic linker. ++ void ++ set_is_dynamic_linker_section() ++ { this->is_dynamic_linker_section_ = true; } ++ + // Return whether this section should be written after all the input + // sections are complete. + bool +@@ -3327,6 +3348,13 @@ + bool is_small_section_ : 1; + // True if this is a large section. + bool is_large_section_ : 1; ++ // True if this is the .interp section going into the PT_INTERP ++ // segment. ++ bool is_interp_ : 1; ++ // True if this is section is read by the dynamic linker. ++ bool is_dynamic_linker_section_ : 1; ++ // Whether code-fills are generated at write. ++ bool generate_code_fills_at_write_ : 1; + // For SHT_TLS sections, the offset of this section relative to the base + // of the TLS segment. + uint64_t tls_offset_; +@@ -3337,13 +3365,11 @@ + // Map from merge section properties to merge_sections; + Merge_section_by_properties_map merge_section_by_properties_map_; + // Map from input sections to relaxed input sections. This is mutable +- // beacause it is udpated lazily. We may need to update it in a ++ // because it is updated lazily. We may need to update it in a + // const qualified method. + mutable Output_section_data_by_input_section_map relaxed_input_section_map_; + // Whether relaxed_input_section_map_ is valid. + mutable bool is_relaxed_input_section_map_valid_; +- // Whether code-fills are generated at write. +- bool generate_code_fills_at_write_; + }; + + // An output segment. PT_LOAD segments are built from collections of +@@ -3412,9 +3438,12 @@ + uint64_t + maximum_alignment(); + +- // Add an Output_section to this segment. ++ // Add the Output_section OS to this segment. SEG_FLAGS is the ++ // segment flags to use. DO_SORT is true if we should sort the ++ // placement of the input section for more efficient generated code. + void +- add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags); ++ add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags, ++ bool do_sort); + + // Remove an Output_section from this segment. It is an error if it + // is not present. +diff -urN --exclude=CVS binutils-2.20/gold/po/Make-in branch-2.20/gold/po/Make-in +--- binutils-2.20/gold/po/Make-in 2006-08-05 01:10:59.000000000 +0200 ++++ branch-2.20/gold/po/Make-in 2009-11-03 16:26:23.000000000 +0100 +@@ -1,6 +1,6 @@ + # Makefile for program source directory in GNU NLS utilities package. + # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +-# Copyright 2003, 2006 Free Software Foundation, Inc. ++# Copyright 2003, 2006, 2007, 2009 Free Software Foundation, Inc. + # + # This file may be copied and used freely without restrictions. It can + # be used in projects which are not available under the GNU Public License +@@ -88,7 +88,8 @@ + + $(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ +- --add-comments --keyword=_ --keyword=N_ \ ++ --add-comments -C --keyword=_ --keyword=N_ \ ++ --msgid-bugs-address=bug-binutils@gnu.org \ + --files-from=$(srcdir)/POTFILES.in + rm -f $(srcdir)/$(PACKAGE).pot + mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot +@@ -112,13 +113,14 @@ + install-exec: + install-info: + install-html: ++install-pdf: + install-data: install-data-@USE_NLS@ + install-data-no: all + install-data-yes: all + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ + else \ +- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ ++ $(top_srcdir)/../mkinstalldirs $(DESTDIR)$(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ +diff -urN --exclude=CVS binutils-2.20/gold/powerpc.cc branch-2.20/gold/powerpc.cc +--- binutils-2.20/gold/powerpc.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/powerpc.cc 2009-11-04 17:36:08.000000000 +0100 +@@ -713,7 +713,7 @@ + + layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE, +- this->got_); ++ this->got_, false); + + // Create the GOT2 or TOC in the .got section. + if (size == 32) +@@ -722,7 +722,7 @@ + layout->add_output_section_data(".got2", elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE, +- this->got2_); ++ this->got2_, false); + } + else + { +@@ -730,7 +730,7 @@ + layout->add_output_section_data(".toc", elfcpp::SHT_PROGBITS, + elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE, +- this->toc_); ++ this->toc_, false); + } + + // Define _GLOBAL_OFFSET_TABLE_ at the start of the .got section. +@@ -756,7 +756,7 @@ + gold_assert(layout != NULL); + this->rela_dyn_ = new Reloc_section(parameters->options().combreloc()); + layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rela_dyn_); ++ elfcpp::SHF_ALLOC, this->rela_dyn_, true); + } + return this->rela_dyn_; + } +@@ -816,7 +816,7 @@ + { + this->rel_ = new Reloc_section(false); + layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rel_); ++ elfcpp::SHF_ALLOC, this->rel_, true); + } + + template +@@ -945,7 +945,7 @@ + (elfcpp::SHF_ALLOC + | elfcpp::SHF_EXECINSTR + | elfcpp::SHF_WRITE), +- this->plt_); ++ this->plt_, false); + + // Define _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. + symtab->define_in_output_data("_PROCEDURE_LINKAGE_TABLE_", NULL, +@@ -1512,7 +1512,7 @@ + Output_section* os = layout->add_output_section_data(".sdata", 0, + elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE, +- sdata); ++ sdata, false); + symtab->define_in_output_data("_SDA_BASE_", NULL, + os, + 32768, 0, +@@ -1547,7 +1547,8 @@ + Output_data_dynamic* const odyn = layout->dynamic_data(); + if (odyn != NULL) + { +- if (this->plt_ != NULL) ++ if (this->plt_ != NULL ++ && this->plt_->output_section() != NULL) + { + const Output_data* od = this->plt_->rel_plt(); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, od); +@@ -1557,7 +1558,8 @@ + odyn->add_section_address(elfcpp::DT_PLTGOT, this->plt_); + } + +- if (this->rela_dyn_ != NULL) ++ if (this->rela_dyn_ != NULL ++ && this->rela_dyn_->output_section() != NULL) + { + const Output_data* od = this->rela_dyn_; + odyn->add_section_address(elfcpp::DT_RELA, od); +diff -urN --exclude=CVS binutils-2.20/gold/resolve.cc branch-2.20/gold/resolve.cc +--- binutils-2.20/gold/resolve.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/resolve.cc 2009-11-04 02:28:30.000000000 +0100 +@@ -302,25 +302,41 @@ + sym.get_st_type()); + + bool adjust_common_sizes; ++ typename Sized_symbol::Size_type tosize = to->symsize(); + if (Symbol_table::should_override(to, frombits, object, + &adjust_common_sizes)) + { +- typename Sized_symbol::Size_type tosize = to->symsize(); +- + this->override(to, sym, st_shndx, is_ordinary, object, version); +- + if (adjust_common_sizes && tosize > to->symsize()) + to->set_symsize(tosize); + } + else + { +- if (adjust_common_sizes && sym.get_st_size() > to->symsize()) ++ if (adjust_common_sizes && sym.get_st_size() > tosize) + to->set_symsize(sym.get_st_size()); + // The ELF ABI says that even for a reference to a symbol we + // merge the visibility. + to->override_visibility(sym.get_st_visibility()); + } + ++ if (adjust_common_sizes && parameters->options().warn_common()) ++ { ++ if (tosize > sym.get_st_size()) ++ Symbol_table::report_resolve_problem(false, ++ _("common of '%s' overriding " ++ "smaller common"), ++ to, object); ++ else if (tosize < sym.get_st_size()) ++ Symbol_table::report_resolve_problem(false, ++ _("common of '%s' overidden by " ++ "larger common"), ++ to, object); ++ else ++ Symbol_table::report_resolve_problem(false, ++ _("multiple common of '%s'"), ++ to, object); ++ } ++ + // A new weak undefined reference, merging with an old weak + // reference, could be a One Definition Rule (ODR) violation -- + // especially if the types or sizes of the references differ. We'll +@@ -422,14 +438,9 @@ + || object->just_symbols()) + return false; + +- // FIXME: Do a better job of reporting locations. +- gold_error(_("%s: multiple definition of %s"), +- object != NULL ? object->name().c_str() : _("command line"), +- to->demangled_name().c_str()); +- gold_error(_("%s: previous definition here"), +- (to->source() == Symbol::FROM_OBJECT +- ? to->object()->name().c_str() +- : _("command line"))); ++ Symbol_table::report_resolve_problem(true, ++ _("multiple definition of '%s'"), ++ to, object); + return false; + + case WEAK_DEF * 16 + DEF: +@@ -464,8 +475,12 @@ + case DYN_COMMON * 16 + DEF: + case DYN_WEAK_COMMON * 16 + DEF: + // We've seen a common symbol and now we see a definition. The +- // definition overrides. FIXME: We should optionally issue, version a +- // warning. ++ // definition overrides. ++ if (parameters->options().warn_common()) ++ Symbol_table::report_resolve_problem(false, ++ _("definition of '%s' overriding " ++ "common"), ++ to, object); + return true; + + case DEF * 16 + WEAK_DEF: +@@ -495,7 +510,12 @@ + case DYN_COMMON * 16 + WEAK_DEF: + case DYN_WEAK_COMMON * 16 + WEAK_DEF: + // A weak definition does override a definition in a dynamic +- // object. FIXME: We should optionally issue a warning. ++ // object. ++ if (parameters->options().warn_common()) ++ Symbol_table::report_resolve_problem(false, ++ _("definition of '%s' overriding " ++ "dynamic common definition"), ++ to, object); + return true; + + case DEF * 16 + DYN_DEF: +@@ -611,6 +631,11 @@ + + case DEF * 16 + COMMON: + // A common symbol does not override a definition. ++ if (parameters->options().warn_common()) ++ Symbol_table::report_resolve_problem(false, ++ _("common '%s' overridden by " ++ "previous definition"), ++ to, object); + return false; + + case WEAK_DEF * 16 + COMMON: +@@ -716,6 +741,44 @@ + } + } + ++// Issue an error or warning due to symbol resolution. IS_ERROR ++// indicates an error rather than a warning. MSG is the error ++// message; it is expected to have a %s for the symbol name. TO is ++// the existing symbol. OBJECT is where the new symbol was found. ++ ++// FIXME: We should have better location information here. When the ++// symbol is defined, we should be able to pull the location from the ++// debug info if there is any. ++ ++void ++Symbol_table::report_resolve_problem(bool is_error, const char* msg, ++ const Symbol* to, Object* object) ++{ ++ std::string demangled(to->demangled_name()); ++ size_t len = strlen(msg) + demangled.length() + 10; ++ char* buf = new char[len]; ++ snprintf(buf, len, msg, demangled.c_str()); ++ ++ const char* objname; ++ if (object != NULL) ++ objname = object->name().c_str(); ++ else ++ objname = _("command line"); ++ ++ if (is_error) ++ gold_error("%s: %s", objname, buf); ++ else ++ gold_warning("%s: %s", objname, buf); ++ ++ delete[] buf; ++ ++ if (to->source() == Symbol::FROM_OBJECT) ++ objname = to->object()->name().c_str(); ++ else ++ objname = _("command line"); ++ gold_info("%s: %s: previous definition here", program_name, objname); ++} ++ + // A special case of should_override which is only called for a strong + // defined symbol from a regular object file. This is used when + // defining special symbols. +diff -urN --exclude=CVS binutils-2.20/gold/script-sections.cc branch-2.20/gold/script-sections.cc +--- binutils-2.20/gold/script-sections.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/script-sections.cc 2009-11-04 16:56:34.000000000 +0100 +@@ -3051,7 +3051,7 @@ + is_current_seg_readonly = true; + } + +- current_seg->add_output_section(*p, seg_flags); ++ current_seg->add_output_section(*p, seg_flags, false); + + if (((*p)->flags() & elfcpp::SHF_WRITE) != 0) + is_current_seg_readonly = false; +@@ -3130,7 +3130,7 @@ + Layout::section_flags_to_segment((*p)->flags()); + Output_segment* oseg = layout->make_output_segment(elfcpp::PT_NOTE, + seg_flags); +- oseg->add_output_section(*p, seg_flags); ++ oseg->add_output_section(*p, seg_flags, false); + + // Incorporate any subsequent SHT_NOTE sections, in the + // hopes that the script is sensible. +@@ -3139,7 +3139,7 @@ + && (*pnext)->type() == elfcpp::SHT_NOTE) + { + seg_flags = Layout::section_flags_to_segment((*pnext)->flags()); +- oseg->add_output_section(*pnext, seg_flags); ++ oseg->add_output_section(*pnext, seg_flags, false); + p = pnext; + ++pnext; + } +@@ -3154,14 +3154,14 @@ + Layout::section_flags_to_segment((*p)->flags()); + Output_segment* oseg = layout->make_output_segment(elfcpp::PT_TLS, + seg_flags); +- oseg->add_output_section(*p, seg_flags); ++ oseg->add_output_section(*p, seg_flags, false); + + Layout::Section_list::const_iterator pnext = p + 1; + while (pnext != sections->end() + && ((*pnext)->flags() & elfcpp::SHF_TLS) != 0) + { + seg_flags = Layout::section_flags_to_segment((*pnext)->flags()); +- oseg->add_output_section(*pnext, seg_flags); ++ oseg->add_output_section(*pnext, seg_flags, false); + p = pnext; + ++pnext; + } +@@ -3315,7 +3315,7 @@ + + elfcpp::Elf_Word seg_flags = + Layout::section_flags_to_segment(os->flags()); +- r->second->add_output_section(os, seg_flags); ++ r->second->add_output_section(os, seg_flags, false); + + if (r->second->type() == elfcpp::PT_LOAD) + { +diff -urN --exclude=CVS binutils-2.20/gold/sparc.cc branch-2.20/gold/sparc.cc +--- binutils-2.20/gold/sparc.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/sparc.cc 2009-11-04 17:36:08.000000000 +0100 +@@ -1027,7 +1027,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_); ++ this->got_, false); + os->set_is_relro(); + + // Define _GLOBAL_OFFSET_TABLE_ at the start of the .got section. +@@ -1053,7 +1053,7 @@ + gold_assert(layout != NULL); + this->rela_dyn_ = new Reloc_section(parameters->options().combreloc()); + layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rela_dyn_); ++ elfcpp::SHF_ALLOC, this->rela_dyn_, true); + } + return this->rela_dyn_; + } +@@ -1155,7 +1155,7 @@ + { + this->rel_ = new Reloc_section(false); + layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rel_); ++ elfcpp::SHF_ALLOC, this->rel_, true); + } + + template +@@ -1372,7 +1372,7 @@ + (elfcpp::SHF_ALLOC + | elfcpp::SHF_EXECINSTR + | elfcpp::SHF_WRITE), +- this->plt_); ++ this->plt_, false); + + // Define _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. + symtab->define_in_output_data("_PROCEDURE_LINKAGE_TABLE_", NULL, +@@ -2334,7 +2334,8 @@ + Output_data_dynamic* const odyn = layout->dynamic_data(); + if (odyn != NULL) + { +- if (this->plt_ != NULL) ++ if (this->plt_ != NULL ++ && this->plt_->output_section() != NULL) + { + const Output_data* od = this->plt_->rel_plt(); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, od); +@@ -2344,7 +2345,8 @@ + odyn->add_section_address(elfcpp::DT_PLTGOT, this->plt_); + } + +- if (this->rela_dyn_ != NULL) ++ if (this->rela_dyn_ != NULL ++ && this->rela_dyn_->output_section() != NULL) + { + const Output_data* od = this->rela_dyn_; + odyn->add_section_address(elfcpp::DT_RELA, od); +diff -urN --exclude=CVS binutils-2.20/gold/symtab.cc branch-2.20/gold/symtab.cc +--- binutils-2.20/gold/symtab.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/symtab.cc 2009-11-05 07:25:01.000000000 +0100 +@@ -2242,6 +2242,12 @@ + // Record any version information. + if (sym->version() != NULL) + versions->record_version(this, dynpool, sym); ++ ++ // If the symbol is defined in a dynamic object and is ++ // referenced in a regular object, then mark the dynamic ++ // object as needed. This is used to implement --as-needed. ++ if (sym->is_from_dynobj() && sym->in_reg()) ++ sym->object()->set_is_needed(); + } + } + +diff -urN --exclude=CVS binutils-2.20/gold/symtab.h branch-2.20/gold/symtab.h +--- binutils-2.20/gold/symtab.h 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/symtab.h 2009-11-04 02:28:30.000000000 +0100 +@@ -1488,6 +1488,11 @@ + static bool + should_override(const Symbol*, unsigned int, Object*, bool*); + ++ // Report a problem in symbol resolution. ++ static void ++ report_resolve_problem(bool is_error, const char* msg, const Symbol* to, ++ Object* object); ++ + // Override a symbol. + template + void +diff -urN --exclude=CVS binutils-2.20/gold/x86_64.cc branch-2.20/gold/x86_64.cc +--- binutils-2.20/gold/x86_64.cc 2009-10-16 09:42:51.000000000 +0200 ++++ branch-2.20/gold/x86_64.cc 2009-11-04 17:36:08.000000000 +0100 +@@ -472,7 +472,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_); ++ this->got_, false); + os->set_is_relro(); + + // The old GNU linker creates a .got.plt section. We just +@@ -483,7 +483,7 @@ + os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), +- this->got_plt_); ++ this->got_plt_, false); + os->set_is_relro(); + + // The first three entries are reserved. +@@ -511,7 +511,7 @@ + gold_assert(layout != NULL); + this->rela_dyn_ = new Reloc_section(parameters->options().combreloc()); + layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rela_dyn_); ++ elfcpp::SHF_ALLOC, this->rela_dyn_, true); + } + return this->rela_dyn_; + } +@@ -611,7 +611,7 @@ + { + this->rel_ = new Reloc_section(false); + layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA, +- elfcpp::SHF_ALLOC, this->rel_); ++ elfcpp::SHF_ALLOC, this->rel_, true); + } + + void +@@ -807,7 +807,7 @@ + layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_EXECINSTR), +- this->plt_); ++ this->plt_, false); + } + } + +@@ -1659,10 +1659,12 @@ + Output_data_dynamic* const odyn = layout->dynamic_data(); + if (odyn != NULL) + { +- if (this->got_plt_ != NULL) ++ if (this->got_plt_ != NULL ++ && this->got_plt_->output_section() != NULL) + odyn->add_section_address(elfcpp::DT_PLTGOT, this->got_plt_); + +- if (this->plt_ != NULL) ++ if (this->plt_ != NULL ++ && this->plt_->output_section() != NULL) + { + const Output_data* od = this->plt_->rel_plt(); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, od); +@@ -1680,7 +1682,8 @@ + } + } + +- if (this->rela_dyn_ != NULL) ++ if (this->rela_dyn_ != NULL ++ && this->rela_dyn_->output_section() != NULL) + { + const Output_data* od = this->rela_dyn_; + odyn->add_section_address(elfcpp::DT_RELA, od); +diff -urN --exclude=CVS binutils-2.20/include/ChangeLog branch-2.20/include/ChangeLog +--- binutils-2.20/include/ChangeLog 2009-09-10 13:47:30.000000000 +0200 ++++ branch-2.20/include/ChangeLog 2009-10-16 16:08:45.000000000 +0200 +@@ -1,3 +1,13 @@ ++2009-10-09 Rafael Espindola ++ ++ * plugin-api.h (ld_plugin_add_input_library): Change argument name to ++ libname. ++ ++2008-10-03 Rafael Espindola ++ ++ * plugin-api.h: New. ++ * lto-symtab.h: New. ++ + 2009-09-09 Martin Thuresson + + * bfdlink.h (struct bfd_link_hash_common_entry): Move to top +diff -urN --exclude=CVS binutils-2.20/include/plugin-api.h branch-2.20/include/plugin-api.h +--- binutils-2.20/include/plugin-api.h 2009-01-15 02:28:14.000000000 +0100 ++++ branch-2.20/include/plugin-api.h 2009-10-16 16:08:45.000000000 +0200 +@@ -1,6 +1,6 @@ + /* plugin-api.h -- External linker plugin API. */ + +-/* Copyright 2008 Free Software Foundation, Inc. ++/* Copyright 2009 Free Software Foundation, Inc. + Written by Cary Coutant . + + This file is part of binutils. +@@ -111,13 +111,34 @@ + enum ld_plugin_symbol_resolution + { + LDPR_UNKNOWN = 0, ++ ++ /* Symbol is still undefined at this point. */ + LDPR_UNDEF, ++ ++ /* This is the prevailing definition of the symbol, with references from ++ regular object code. */ + LDPR_PREVAILING_DEF, ++ ++ /* This is the prevailing definition of the symbol, with no ++ references from regular objects. It is only referenced from IR ++ code. */ + LDPR_PREVAILING_DEF_IRONLY, ++ ++ /* This definition was pre-empted by a definition in a regular ++ object file. */ + LDPR_PREEMPTED_REG, ++ ++ /* This definition was pre-empted by a definition in another IR file. */ + LDPR_PREEMPTED_IR, ++ ++ /* This symbol was resolved by a definition in another IR file. */ + LDPR_RESOLVED_IR, ++ ++ /* This symbol was resolved by a definition in a regular object ++ linked into the main executable. */ + LDPR_RESOLVED_EXEC, ++ ++ /* This symbol was resolved by a definition in a shared object. */ + LDPR_RESOLVED_DYN + }; + +@@ -193,6 +214,12 @@ + enum ld_plugin_status + (*ld_plugin_add_input_file) (char *pathname); + ++/* The linker's interface for adding a library that should be searched. */ ++ ++typedef ++enum ld_plugin_status ++(*ld_plugin_add_input_library) (char *libname); ++ + /* The linker's interface for issuing a warning or error message. */ + + typedef +@@ -224,7 +251,8 @@ + LDPT_ADD_INPUT_FILE, + LDPT_MESSAGE, + LDPT_GET_INPUT_FILE, +- LDPT_RELEASE_INPUT_FILE ++ LDPT_RELEASE_INPUT_FILE, ++ LDPT_ADD_INPUT_LIBRARY + }; + + /* The plugin transfer vector. */ +@@ -245,6 +273,7 @@ + ld_plugin_message tv_message; + ld_plugin_get_input_file tv_get_input_file; + ld_plugin_release_input_file tv_release_input_file; ++ ld_plugin_add_input_library tv_add_input_library; + } tv_u; + }; + +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ChangeLog branch-2.20/ld/testsuite/ChangeLog +--- binutils-2.20/ld/testsuite/ChangeLog 2009-10-06 12:57:55.000000000 +0200 ++++ branch-2.20/ld/testsuite/ChangeLog 2009-10-19 18:36:00.000000000 +0200 +@@ -1,3 +1,12 @@ ++2009-10-19 Hans-Peter Nilsson ++ ++ * ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d, ld-cris/tls-e-22.d, ++ ld-cris/tls-e-80.d, ld-cris/tls-e-dtpoffd1.d, ++ ld-cris/tls-e-dtpoffd3.d, ld-cris/tls-ldgde-14.d, ++ ld-cris/tls-ldgde-15.d, ld-cris/tls-ldgdex-14.d, ++ ld-cris/tls-ldgdex-15.d: Adjust for change in non-shared ++ R_CRIS_32_DTPREL and R_CRIS_16_DTPREL relocations. ++ + 2009-10-03 Alan Modra + + * ld-powerpc/tlsexe.d: Update. +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-20.d branch-2.20/ld/testsuite/ld-cris/tls-e-20.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-20.d 2009-03-24 04:34:05.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-20.d 2009-10-19 18:36:01.000000000 +0200 +@@ -64,7 +64,7 @@ + 80098: 6fae 1800 0000 move\.d 18 ,\$r10 + #... + 000800a0 : +- 800a0: 6fae f4ff ffff move\.d 0xfffffff4,\$r10 ++ 800a0: 6fae 0000 0000 move\.d 0 ,\$r10 + #... + 000800a8 : + 800a8: 6fae 1400 0000 move\.d 14 ,\$r10 +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-20a.d branch-2.20/ld/testsuite/ld-cris/tls-e-20a.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-20a.d 2009-03-24 04:34:05.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-20a.d 2009-10-19 18:36:01.000000000 +0200 +@@ -102,7 +102,7 @@ + #... + + 000800cc : +- 800cc: 6fae f4ff ffff move\.d 0xfffffff4,\$r10 ++ 800cc: 6fae 8000 0000 move\.d 80 ,\$r10 + #... + + 000800d4 : +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-22.d branch-2.20/ld/testsuite/ld-cris/tls-e-22.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-22.d 2009-01-27 08:05:47.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-22.d 2009-10-19 18:36:01.000000000 +0200 +@@ -35,5 +35,5 @@ + 80094: 41b2 moveq 1,\$r11 + #... + 00080098 : +- 80098: 6fae fcff ffff move\.d 0xfffffffc,\$r10 ++ 80098: 6fae 8000 0000 move\.d 80 ,\$r10 + #... +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-80.d branch-2.20/ld/testsuite/ld-cris/tls-e-80.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-80.d 2009-03-24 04:34:05.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-80.d 2009-10-19 18:36:01.000000000 +0200 +@@ -81,7 +81,7 @@ + 800a8: 6fae b4ff ffff move.d 0xffffffb4,\$r10 + #... + 000800b0 : +- 800b0: 6fae b0ff ffff move\.d 0xffffffb0,\$r10 ++ 800b0: 6fae 0000 0000 move\.d 0 ,\$r10 + #... + 000800b8 : + 800b8: 6fae 1400 0000 move\.d 14 ,\$r10 +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd1.d branch-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd1.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd1.d 2009-03-24 08:58:23.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd1.d 2009-10-19 18:36:01.000000000 +0200 +@@ -27,6 +27,6 @@ + 82120 00000000 00000000 00000000 01000000 .* + 82130 80000000 .* + Contents of section .debug_info: +- 0000 fcffffff .* ++ 0000 80000000 .* + Contents of section .debug_line: + #pass +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd3.d branch-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd3.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd3.d 2009-03-25 04:04:21.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-e-dtpoffd3.d 2009-10-19 18:36:01.000000000 +0200 +@@ -27,6 +27,6 @@ + 8211c 00000000 00000000 00000000 01000000 .* + 8212c 80000000 .* + Contents of section .debug_info: +- 0000 fcffffff .* ++ 0000 80000000 .* + Contents of section .debug_line: + #pass +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-ldgde-14.d branch-2.20/ld/testsuite/ld-cris/tls-ldgde-14.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-ldgde-14.d 2009-03-24 04:34:05.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-ldgde-14.d 2009-10-19 18:36:01.000000000 +0200 +@@ -51,8 +51,8 @@ + 80094: 41b2 moveq 1,\$r11 + #... + 00080098 : +- 80098: 5fae f8ff move\.w 0xfff8,\$r10 +- 8009c: 5fbe fcff move\.w 0xfffc,\$r11 ++ 80098: 5fae 8800 move\.w 0x88,\$r10 ++ 8009c: 5fbe 8c00 move\.w 0x8c,\$r11 + + 000800a0 : + 800a0: 5fae 1400 move\.w 0x14,\$r10 +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-ldgde-15.d branch-2.20/ld/testsuite/ld-cris/tls-ldgde-15.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-ldgde-15.d 2009-03-24 04:34:05.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-ldgde-15.d 2009-10-19 18:36:01.000000000 +0200 +@@ -51,8 +51,8 @@ + 80094: 41b2 moveq 1,\$r11 + #... + 00080098 : +- 80098: 6fae f8ff ffff move.d 0xfffffff8,\$r10 +- 8009e: 6fbe fcff ffff move.d 0xfffffffc,\$r11 ++ 80098: 6fae 8800 0000 move.d 88 ,\$r10 ++ 8009e: 6fbe 8c00 0000 move.d 8c ,\$r11 + 000800a4 : + 800a4: 6fae 1400 0000 move.d 14 ,\$r10 + #... +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-ldgdex-14.d branch-2.20/ld/testsuite/ld-cris/tls-ldgdex-14.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-ldgdex-14.d 2009-01-27 08:05:47.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-ldgdex-14.d 2009-10-19 18:36:01.000000000 +0200 +@@ -44,7 +44,7 @@ + Contents of section .interp: + #... + Contents of section \.text: +- 801dc 41b20000 5faef8ff 5fbefcff 5fae1400 .* ++ 801dc 41b20000 5fae8000 5fbe8400 5fae1400 .* + 801ec 5fae1c00 .* + Contents of section \.tdata: + #... +diff -urN --exclude=CVS binutils-2.20/ld/testsuite/ld-cris/tls-ldgdex-15.d branch-2.20/ld/testsuite/ld-cris/tls-ldgdex-15.d +--- binutils-2.20/ld/testsuite/ld-cris/tls-ldgdex-15.d 2009-01-27 08:05:47.000000000 +0100 ++++ branch-2.20/ld/testsuite/ld-cris/tls-ldgdex-15.d 2009-10-19 18:36:01.000000000 +0200 +@@ -44,7 +44,7 @@ + Contents of section \.interp: + #... + Contents of section \.text: +- 801dc 41b20000 6faef8ff ffff6fbe fcffffff .* ++ 801dc 41b20000 6fae8000 00006fbe 84000000 .* + 801ec 6fae1400 00000000 6fae1c00 00000000 .* + Contents of section \.tdata: + #...