--- binutils-2.25.1.orig/debian/README.cross +++ binutils-2.25.1/debian/README.cross @@ -0,0 +1,26 @@ +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= dpkg-buildpackage -b -uc -us + or + echo arm >debian/target; dpkg-buildpackage -b -uc -us + + (substitute your target name, e.g. "arm" or "m68k", instead of + "") + +--- +Nikita Youshchenko +Hector Oron +Marcin Juszkiewicz --- binutils-2.25.1.orig/debian/README.source +++ binutils-2.25.1/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.25.1.orig/debian/binutils-cross.overrides +++ binutils-2.25.1/debian/binutils-cross.overrides @@ -0,0 +1,2 @@ +@PKG@ binary: package-name-doesnt-match-sonames +@PKG@ binary: non-standard-dir-in-usr --- binutils-2.25.1.orig/debian/binutils-cross.shlibs.in +++ binutils-2.25.1/debian/binutils-cross.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-@ARCH@@DATE_EXT@ @PKG@ (>= @DEB_UVER@), @PKG@ (<< @DEB_NVER@) +libopcodes @VER@-@ARCH@@DATE_EXT@ @PKG@ (>= @DEB_UVER@), @PKG@ (<< @DEB_NVER@) --- binutils-2.25.1.orig/debian/binutils-hppa64-linux-gnu.overrides +++ binutils-2.25.1/debian/binutils-hppa64-linux-gnu.overrides @@ -0,0 +1,8 @@ +# don't warn about missing man pages for diverted binaries +binutils-hppa64-linux-gnu binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-hppa64-linux-gnu binary: package-name-doesnt-match-sonames + +# it's a cross toolchain +binutils-hppa64-linux-gnu binary: binary-or-shlib-defines-rpath --- binutils-2.25.1.orig/debian/binutils-hppa64-linux-gnu.postinst +++ binutils-2.25.1/debian/binutils-hppa64-linux-gnu.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils-hppa64-linux-gnu.postrm +++ binutils-2.25.1/debian/binutils-hppa64-linux-gnu.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils-hppa64-linux-gnu.shlibs.in +++ binutils-2.25.1/debian/binutils-hppa64-linux-gnu.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-hppa64@DATE_EXT@ binutils-hppa64-linux-gnu +libopcodes @VER@-hppa64@DATE_EXT@ binutils-hppa64-linux-gnu --- binutils-2.25.1.orig/debian/binutils-multiarch-dev.overrides +++ binutils-2.25.1/debian/binutils-multiarch-dev.overrides @@ -0,0 +1,2 @@ +# package only has symlinks +binutils-multiarch-dev binary: control-file-is-empty md5sums --- binutils-2.25.1.orig/debian/binutils-multiarch.overrides +++ binutils-2.25.1/debian/binutils-multiarch.overrides @@ -0,0 +1,13 @@ +# 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 + +# the upstream name, we don't care +binutils-multiarch binary: dev-pkg-without-shlib-symlink + +# 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.25.1.orig/debian/binutils-multiarch.postinst +++ binutils-2.25.1/debian/binutils-multiarch.postinst @@ -0,0 +1,52 @@ +#! /bin/sh +# Update .so symlinks and remove obsolete diversions. +# +# Removing a diversion requires a guarantee that the conflicting +# file is not present any more, and we cannot guarantee that if +# some other version of binutils-multiarch is installed. +# So we remove the diversions in postinst, not preinst. +set -e +old_diversion() { + local divertto file + file=$1 + divertto=${2-$file.single} + if + dpkg-divert --package binutils-multiarch --list | + grep -q -F "$divertto" + then + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert "$divertto" "$file" + fi +} + +# remove obsolete diversions +old_diversion /usr/bin/ld.bfd +old_diversion /usr/bin/c++filt +old_diversion /usr/lib/libbfd.a /usr/lib/libbfd-single.a +old_diversion /usr/lib/libopcodes.a /usr/lib/libopcodes-single.a +old_diversion /usr/bin/ld +old_diversion /usr/bin/elfedit +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 + old_diversion /usr/lib/ldscripts/$f.$ext + done +done +old_diversion /usr/lib/libbfd-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libbfd-single-2.9.1.0.15.so.0.0.0 +old_diversion /usr/lib/libopcodes-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libopcodes-single-2.9.1.0.15.so.0.0.0 +old_diversion /usr/lib/libbfd.la /usr/lib/libbfd-single.la +old_diversion /usr/lib/libopcodes.la /usr/lib/libopcodes-single.la +old_diversion /usr/include/bfd.h /usr/include/bfd.single.h +old_diversion /usr/lib/ldscripts + +rm -f /usr/lib/libbfd-*-multiarch.so.0 +rm -f /usr/lib/libopcodes-*-multiarch.so.0 + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils-multiarch.postrm.in +++ binutils-2.25.1/debian/binutils-multiarch.postrm.in @@ -0,0 +1,49 @@ +#! /bin/sh +set -e +this_ver=@DEB_VER@; # this version +# action: upgrade, abort-upgrade, remove, abort-install, disappear, +# purge, or failed-upgrade. +context=$1 +if + test "$context" = failed-upgrade && + dpkg --compare-versions "$this_ver" lt "$2" +then + # postrm of the future failed. + # Who knows what it was supposed to do? Abort. + exit 1 +fi +new_ver=; # version replacing this one, if any. +case "$context" in +failed-upgrade) + new_ver=$this_ver ;; +abort-install|disappear) + new_ver= ;; +*) + new_ver=$2 ;; +esac + +diversion() { + local added_ver divertto file + added_ver=$1 + file=$2 + divertto=${3-$file.single} + + if + test "$context" != purge && + dpkg --compare-versions "$new_ver" lt "$added_ver" + then + dpkg-divert --package binutils-multiarch \ + --remove --rename --divert "$divertto" "$file" + fi +} + + +for prog in nm objdump objcopy strings strip size \ + ar ranlib addr2line gprof readelf +do + diversion 2.9.5.0.16-1 "/usr/bin/$prog" +done + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils-multiarch.preinst.in +++ binutils-2.25.1/debian/binutils-multiarch.preinst.in @@ -0,0 +1,27 @@ +#! /bin/sh +set -e +new_ver=@DEB_VER@; # this version +context=$1; # why to install (install, upgrade, or abort-upgrade) +old_ver=$2; # version being replaced, if any + +diversion() { + local added_ver divertto file + added_ver=$1 + file=$2 + divertto=${3-$file.single} + + if + test "$context" = install || + dpkg --compare-versions "$old_ver" lt "$added_ver" || + dpkg --compare-versions "$new_ver" le "$old_ver" + then + dpkg-divert --package binutils-multiarch \ + --add --rename --divert "$divertto" "$file" + fi +} + +for prog in nm objdump objcopy strings strip size \ + ar ranlib addr2line gprof readelf +do + diversion 2.9.5.0.16-1 "/usr/bin/$prog" +done --- binutils-2.25.1.orig/debian/binutils-multiarch.prerm.in +++ binutils-2.25.1/debian/binutils-multiarch.prerm.in @@ -0,0 +1,66 @@ +#! /bin/sh +# Remove obsolete diversions. +# +# They are already removed in postinst, but if configuration fails, +# they will still be around. Removing the package without +# configuring would then allow the diversions to leak. +# +# So we catch them here. This cannot wait for postrm because that +# would break error recovery during upgrades: after the old, working +# version re-adds the diversion in preinst, the diversion would be removed +# again in postrm. More generally, removing a diversion requires +# a guarantee that the conflicting file is not present any more, +# and we cannot guarantee that if some other version of +# binutils-multiarch is installed. +set -e +this_ver=@DEB_VER@; # this version +context=$1; # action: upgrade, remove, deconfigure, or failed-upgrade. +if + test "$context" = failed-upgrade && + dpkg --compare-versions "$this_ver" lt "$2" +then + # prerm of the future failed. + # Who knows what it was supposed to do? Abort. + exit 1 +fi + +old_diversion() { + local divertto file + file=$1 + divertto=${2-$file.single} + if + dpkg-divert --package binutils-multiarch --list | + grep -q -F "$divertto" + then + dpkg-divert --package binutils-multiarch \ + --remove --rename \ + --divert "$divertto" "$file" + fi +} + +# remove obsolete diversions +old_diversion /usr/bin/ld.bfd +old_diversion /usr/bin/c++filt +old_diversion /usr/lib/libbfd.a /usr/lib/libbfd-single.a +old_diversion /usr/lib/libopcodes.a /usr/lib/libopcodes-single.a +old_diversion /usr/bin/ld +old_diversion /usr/bin/elfedit +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 + old_diversion /usr/lib/ldscripts/$f.$ext + done +done +old_diversion /usr/lib/libbfd-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libbfd-single-2.9.1.0.15.so.0.0.0 +old_diversion /usr/lib/libopcodes-2.9.1.0.15.so.0.0.0 \ + /usr/lib/libopcodes-single-2.9.1.0.15.so.0.0.0 +old_diversion /usr/lib/libbfd.la /usr/lib/libbfd-single.la +old_diversion /usr/lib/libopcodes.la /usr/lib/libopcodes-single.la +old_diversion /usr/include/bfd.h /usr/include/bfd.single.h +old_diversion /usr/lib/ldscripts + +rm -f /usr/lib/libbfd-*-multiarch.so.0 +rm -f /usr/lib/libopcodes-*-multiarch.so.0 --- binutils-2.25.1.orig/debian/binutils-multiarch.shlibs.in +++ binutils-2.25.1/debian/binutils-multiarch.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-multiarch@DATE_EXT@ binutils-multiarch (>= @DEB_UVER@), binutils-multiarch (<< @DEB_NVER@) +libopcodes @VER@-multiarch@DATE_EXT@ binutils-multiarch (>= @DEB_UVER@), binutils-multiarch (<< @DEB_NVER@) --- binutils-2.25.1.orig/debian/binutils-static-udeb.overrides +++ binutils-2.25.1/debian/binutils-static-udeb.overrides @@ -0,0 +1,2 @@ +# yes, it's embedded +binutils-static-udeb udeb: embedded-zlib --- binutils-2.25.1.orig/debian/binutils-static.overrides +++ binutils-2.25.1/debian/binutils-static.overrides @@ -0,0 +1,5 @@ +# yes, it's embedded +binutils-static binary: embedded-zlib + +# not needed +binutils-static binary: binary-without-manpage --- binutils-2.25.1.orig/debian/binutils-static.preinst +++ binutils-2.25.1/debian/binutils-static.preinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ -L /usr/share/doc/binutils-static ]; then + # We must be upgrading from a version that depended on binutils + rm -f /usr/share/doc/binutils-static +fi + +exit 0 --- binutils-2.25.1.orig/debian/binutils.overrides +++ binutils-2.25.1/debian/binutils.overrides @@ -0,0 +1,11 @@ +# the API of the shared libs is not public, don't care about the name +binutils binary: package-name-doesnt-match-sonames + +# the upstream name, we don't care +binutils binary: dev-pkg-without-shlib-symlink + +# big tables +binutils binary: manpage-has-errors-from-man + +# silence lintian stupidity +binutils binary: spelling-error-in-binary usr/bin/as mmnemonic mnemonic --- binutils-2.25.1.orig/debian/binutils.postinst +++ binutils-2.25.1/debian/binutils.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils.postrm +++ binutils-2.25.1/debian/binutils.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.25.1.orig/debian/binutils.presubj +++ binutils-2.25.1/debian/binutils.presubj @@ -0,0 +1,25 @@ +When reporting binutils errors, please provide the actual input files +and options given to the tool (gas, objcopy, ld, etc.) at run time. +This can mean the difference between a pleasant debugging experience +and a heisenbug that becomes unreproducible when gcc's code generation +changes. + +For example, to create a testcase for an "ld" problem, first find the +"gcc" command line that triggers the error: + + $ make + ... output ending in an error ... + $ make V=1 VERBOSE=1 2>&1 | head -1 + +Add "-v" after gcc and run it again. One of the early output lines +will be an invocation of collect2. Replace collect2 with "ld" and +it should reproduce the same error. If you collect all the objects +(including system libraries) mentioned on the "ld" command line in a +tarball and send it along with the ld command line then that is a +testcase. + +A possible step after that is to try omitting some objects from the +ld command line and see if it still triggers the same error, but +that's just icing on the cake. + +Happy debugging! --- binutils-2.25.1.orig/debian/binutils.shlibs.in +++ binutils-2.25.1/debian/binutils.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-system@DATE_EXT@ binutils (>= @DEB_UVER@), binutils (<< @DEB_NVER@) +libopcodes @VER@-system@DATE_EXT@ binutils (>= @DEB_UVER@), binutils (<< @DEB_NVER@) --- binutils-2.25.1.orig/debian/changelog +++ binutils-2.25.1/debian/changelog @@ -0,0 +1,5758 @@ +binutils (2.25.1-5ubuntu1) wily; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Mon, 05 Oct 2015 13:08:51 +0200 + +binutils (2.25.1-5) unstable; urgency=medium + + * Fix setting the default library path on i386. + + -- Matthias Klose Mon, 05 Oct 2015 13:03:39 +0200 + +binutils (2.25.1-4) unstable; urgency=medium + + * On i386, configure for i686-linux-gnu. Provide i585-linux-gnu symlinks. + + -- Matthias Klose Thu, 01 Oct 2015 19:19:24 +0200 + +binutils (2.25.1-3ubuntu1) wily; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Tue, 22 Sep 2015 19:19:24 +0200 + +binutils (2.25.1-3) unstable; urgency=medium + + * Regenerate the control file. Closes: #799234. + * Configure cross builds with --with-sysroot=/. Closes: #799703. + * Backport PR ld/18668 from the trunk. Closes: #797666. + * Fix lintian warnings for the binutils-hppa64-linux-gnu package. + + -- Matthias Klose Tue, 22 Sep 2015 18:38:07 +0200 + +binutils (2.25.1-2) unstable; urgency=medium + + * Build cross binutils packages targeting the release architectures. + * Rename shared libraries for the cross packages and install into + the standard location. + * Don't ship the header files and static libraries for the cross packages. + * Rename binutils-hppa64 to binutils-hppa64-linux-gnu. + * PR binutils/18750, fix stack buffer overflows when parsing corrupt + ihex files. + + -- Matthias Klose Tue, 15 Sep 2015 01:54:21 +0200 + +binutils (2.25.1-1ubuntu5) wily; urgency=medium + + * Build-depend on chrpath. + + -- Matthias Klose Mon, 14 Sep 2015 23:10:29 +0200 + +binutils (2.25.1-1ubuntu3) wily; urgency=medium + + * Build cross binutils packages targeting the release architectures. + * Rename shared libraries for the cross packages and install into + the standard location. + * Don't ship the header files and static libraries for the cross packages. + * Rename binutils-hppa64 to binutils-hppa64-linux-gnu. + + -- Matthias Klose Mon, 14 Sep 2015 22:30:44 +0200 + +binutils (2.25.1-1ubuntu1) wily; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Sat, 08 Aug 2015 10:24:58 +0200 + +binutils (2.25.1-1) unstable; urgency=medium + + * Binutils 2.25.1 release. + + -- Matthias Klose Sat, 08 Aug 2015 00:36:12 +0200 + +binutils (2.25-11ubuntu1) wily; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Fri, 31 Jul 2015 13:31:07 +0200 + +binutils (2.25-11) unstable; urgency=medium + + * Fix broken -Bsymbolic-functions on ARM32, hppa, m68k. Taken from + the trunk. + + -- Matthias Klose Fri, 31 Jul 2015 12:40:32 +0200 + +binutils (2.25-10ubuntu1) wily; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Sat, 11 Jul 2015 12:20:45 +0200 + +binutils (2.25-10) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20150711. + - POWERPC fixes. + + -- Matthias Klose Sat, 11 Jul 2015 12:12:38 +0200 + +binutils (2.25-9ubuntu1) wily; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Mon, 22 Jun 2015 16:27:13 +0200 + +binutils (2.25-9) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20150622. + - ARM32, AArch64, POWERPC fixes. + * Fix PR gas/18427, gas slow on hppa, taken from the trunk. Closes: #787192. + + -- Matthias Klose Mon, 22 Jun 2015 11:45:36 +0200 + +binutils (2.25-8ubuntu1) wily; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Thu, 28 May 2015 17:26:13 +0200 + +binutils (2.25-8) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20150523. + - PPC and AArch64 backports from the trunk. + + -- Matthias Klose Sat, 23 May 2015 09:44:54 +0200 + +binutils (2.25-7) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20150411. + * More adjustments for reproducible builds. Closes: #774429. + + -- Matthias Klose Fri, 24 Apr 2015 13:18:01 +0200 + +binutils (2.25-6) unstable; urgency=medium + + * Apply patches from the 2.25 branch to address PR binutils/17512, + PR binutils/17531. + * Removal partial backports for PR binutils/17531. + * Configure with --enable-deterministic-archives. Closes: #774429. + + -- Matthias Klose Thu, 26 Mar 2015 16:40:36 +0100 + +binutils (2.25-5ubuntu7) vivid; urgency=medium + + * Fix PR ld/18222, downgrade linker error on protected symbols in + .dynbss to a warning. Fixes libunwind build error. + + -- Matthias Klose Fri, 10 Apr 2015 17:42:44 +0200 + +binutils (2.25-5ubuntu6) vivid; urgency=medium + + * Fix PR ld/18167, taken from the trunk. + + -- Matthias Klose Fri, 27 Mar 2015 13:25:26 +0100 + +binutils (2.25-5ubuntu5) vivid; urgency=medium + + * Revert the fixes for PR ld/15228, PR ld/17709, causing PR ld/18167. + + -- Matthias Klose Thu, 26 Mar 2015 16:28:49 +0100 + +binutils (2.25-5ubuntu4) vivid; urgency=medium + + * Update to the binutils 2.25 branch 20150325. + - Backport patches to address PR binutils/17512, PR binutils/17531. + * Removal partial backports for PR binutils/17531. + + -- Matthias Klose Wed, 25 Mar 2015 22:08:50 +0100 + +binutils (2.25-5ubuntu3) vivid; urgency=medium + + * Fix the AArch64 build. + + -- Matthias Klose Fri, 20 Mar 2015 18:09:16 +0100 + +binutils (2.25-5ubuntu2) vivid; urgency=medium + + * Update to the binutils 2.25 branch 20150320. + - x86 gas: Limit multi-byte nop instructions to 10 bytes. + - Fix ppc32 synthetic symbols when __tls_get_addr_opt stub is generated. + - Tweak ppc32 tls_get_addr optimisation. + - PowerPC64 thread-safe stubs not needed for iplt. + - Use dynamic text relocs for protected vars (ppc32, ppc64). + - Fix PR gold/18010, PR gold/17954 PowerPC64 gold issues. + - Backport support for Cortex-A72. + - Fix PR ld/15228, PR ld/17709, add extern_protected_data and set it + for x86. + * Really install the texi files. LP: #1410780. + + -- Matthias Klose Fri, 20 Mar 2015 17:39:01 +0100 + +binutils (2.25-5ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + - Use 64k for COMMONPAGESIZE on powerpc, ppc64 and ppc64el. LP: #1412553. + * Update to the binutils 2.25 branch 20150225. + + -- Matthias Klose Wed, 25 Feb 2015 09:35:24 +0100 + +binutils (2.25-5) unstable; urgency=medium + + * Remove '*.rej' files in the source package. Closes: #775679. + * Make the package build reproducibly (addresses: #774429): + - Fix mtimes before building binary packages. + - Stop recording the current time when creating gzip files. + - Sort file list in md5sums. + - Fix mtimes before building source tarball. + - Sort file list in binutils source tarball. + - If available, call strip-nondeterminism on static libraries. + * Fix PR ld/17827 - PIE copy relocations are broken with pointers. + Closes: #772958. + + -- Matthias Klose Wed, 25 Feb 2015 09:00:51 +0100 + +binutils (2.25-4) unstable; urgency=medium + + * Backport fixes for PR binutils/17531 up to 2014-12-22. + + -- Matthias Klose Thu, 15 Jan 2015 08:00:07 +0100 + +binutils (2.25-3) unstable; urgency=medium + + * Don't build as a release candidate, fixing the upper shlibs dependency. + * Refresh patches. + + -- Matthias Klose Thu, 25 Dec 2014 13:45:39 +0100 + +binutils (2.25-2ubuntu2) vivid; urgency=medium + + * Use 64k for COMMONPAGESIZE on powerpc, ppc64 and ppc64el. LP: #1412553. + + -- Matthias Klose Fri, 23 Jan 2015 14:13:08 +0100 + +binutils (2.25-2ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Thu, 25 Dec 2014 07:53:40 +0100 + +binutils (2.25-2) unstable; urgency=medium + + * Apply proposed patch for PR ld/17742 (don't create .eh_frame_hdr + on shared lib bfd). + + -- Matthias Klose Thu, 25 Dec 2014 06:55:02 +0100 + +binutils (2.25-1) unstable; urgency=medium + + * binutils 2.25 release. + - MIPS specific gas update. + + -- Matthias Klose Thu, 25 Dec 2014 05:49:55 +0100 + +binutils (2.24.90.20141219-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Sat, 20 Dec 2014 18:29:24 +0100 + +binutils (2.24.90.20141219-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141219. + - Fix PR ld/17713 (segfault), PR ld/17689 (link error), PR ld/15228. + * Apply proposed patch for PR gold/17729 (fixing ~600 GCC test failures). + + -- Matthias Klose Fri, 19 Dec 2014 18:59:30 +0100 + +binutils (2.24.90.20141209-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Tue, 09 Dec 2014 10:07:28 +0100 + +binutils (2.24.90.20141209-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141209. + - Fix PR binutils/17677, PR gold/17670 (powerpc), + PR gold/17566 (powerpc). + + -- Matthias Klose Tue, 09 Dec 2014 09:31:53 +0100 + +binutils (2.24.90.20141201-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Wed, 03 Dec 2014 14:43:28 +0100 + +binutils (2.24.90.20141201-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141201. + - Fix PR ld/16452, PR/ld/16457: Don't output symbol version + requirement for non-DT_NEEDED libs. Closes: #728529. + + -- Matthias Klose Mon, 01 Dec 2014 21:53:10 +0100 + +binutils (2.24.90.20141128-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141128. + - gold: Fix corrupted .eh_frame section with LTO and --gc-sections. + - gold: Fix PowerPC relaxation corner case. + * Relax upper shlibs version dependency to the next release candidate. + + -- Matthias Klose Fri, 28 Nov 2014 14:20:09 +0100 + +binutils (2.24.90.20141124-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Mon, 24 Nov 2014 18:30:06 +0100 + +binutils (2.24.90.20141124-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141124. + - ppc alignment fixes, Go fixes + - PR binutils/17597, PR binutils/17512, PR binutils/17521, PR binutils/17533, + trunk backports for fixing the recent CVE issues. + - One more fix for Cortex-A53 Erratum 835769 (AArch64). + + -- Matthias Klose Mon, 24 Nov 2014 17:29:27 +0100 + +binutils (2.24.90.20141111-2ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Tue, 11 Nov 2014 10:22:29 +0100 + +binutils (2.24.90.20141111-2) unstable; urgency=medium + + * Fix ld -r abort in _bfd_elf_write_section_eh_frame, taken from the trunk. + Closes: #769067. + + -- Matthias Klose Tue, 11 Nov 2014 11:10:27 +0100 + +binutils (2.24.90.20141111-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141111. + - Update .MIPS.abiflags to support MIPS R6. + * gold: Misc updates for the AArch64 backend, taken from the trunk. + * Mention some CVE issues, fixed in the 20141104 snapshot: + - CVE-2014-8484 (PR binutils/17509). + - CVE-2014-8485, CVE-2014-8504 (PR binutils/17510). + - CVE-2014-8501, CVE-2014-8502, CVE-2014-8503 (PR binutils/17512). + * Fix some lintian warnings. + + -- Matthias Klose Tue, 11 Nov 2014 07:55:51 +0100 + +binutils (2.24.90.20141104-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Tue, 04 Nov 2014 16:01:06 +0100 + +binutils (2.24.90.20141104-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141023. + - Fix PR bfd/17481. + - Fix PR17488, powerpc64-linux-ld segfault. LP: #1381580. + - Fix PR ld/17492. LP: #882353. + - Fix PR gas/17493. LP: #1051156. + - Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7. + - PowerPC64 ELFv1 function symbol definition vs LTO and discarded sections. + - ppc: enable msgclr and msgsnd on Power8. + - Relax ppc64_elf_tls_optimize assertion. + * Pick patch from the trunk: + - Support relexation for the gold aarch64 backend. + - AArch64: move bogus assertion. + - Fix build configured with --enable-targets=aarch64-linux. + - Fix running ld-unique tests on ARM. + - gas: Recognize: AAarch64 ThunderX processor. + + -- Matthias Klose Tue, 04 Nov 2014 02:14:45 +0100 + +binutils (2.24.90.20141023-1ubuntu1) vivid; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Thu, 23 Oct 2014 23:59:57 +0200 + +binutils (2.24.90.20141023-1) unstable; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141023. + * Pick patch from the trunk: + - Fix PR17488, powerpc64-linux-ld segfault. LP: #1381580. + - Support relexation for the gold aarch64 backend. + - Fix PR bfd/17481. + - Fix PR ld/17492. LP: #882353. + - Fix PR gas/17493. LP: #1051156. + - Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7. + - PowerPC64 ELFv1 function symbol definition vs LTO and discarded sections. + - AArch64: move bogus assertion. + - Fix build configured with --enable-targets=aarch64-linux. + - ppc: enable msgclr and msgsnd on Power8. + - Fix running ld-unique tests on ARM. + - gas: Recognize: AAarch64 ThunderX processor. + - Relax ppc64_elf_tls_optimize assertion. + + -- Matthias Klose Thu, 23 Oct 2014 22:52:07 +0200 + +binutils (2.24.90.20141014-0ubuntu3) utopic; urgency=medium + + * Pick patches from the trunk: + - Fix PR ld/17492. LP: #882353. + - Fix PR gas/17493. LP: #1051156. + + -- Matthias Klose Thu, 16 Oct 2014 15:32:59 +0200 + +binutils (2.24.90.20141014-0ubuntu2) utopic; urgency=medium + + * Pick patches from the trunk: + - Fix PR17488, powerpc64-linux-ld segfault. LP: #1381580. + - Support relexation for the gold aarch64 backend. + - Fix PR bfd/17481. + + -- Matthias Klose Thu, 16 Oct 2014 09:11:28 +0200 + +binutils (2.24.90.20141014-0ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the 2.25 branch 20141014. + * Remove patches picked from upstream. + * Build gold on AArch64. + + -- Matthias Klose Tue, 14 Oct 2014 11:39:04 +0200 + +binutils (2.24.51.20141001-1ubuntu4) utopic; urgency=medium + + * Fix PR ld/17647, taken from upstream. Closes: #764573. + + -- Matthias Klose Mon, 13 Oct 2014 20:20:11 +0200 + +binutils (2.24.51.20141001-1ubuntu2) utopic; urgency=medium + + * Fix ld/17447, taken from upstream. LP: #1371636. + + -- Matthias Klose Sun, 05 Oct 2014 07:54:23 +0200 + +binutils (2.24.51.20141001-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Wed, 01 Oct 2014 02:55:12 +0200 + +binutils (2.24.51.20141001-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20141001. + - On ppc64el, move the section headers to the end of the object file + for ld.bfd. LP: #1365664. + + -- Matthias Klose Wed, 01 Oct 2014 02:32:06 +0200 + +binutils (2.24.51.20140918-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Thu, 18 Sep 2014 23:49:38 +0200 + +binutils (2.24.51.20140918-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140918. + + -- Matthias Klose Thu, 18 Sep 2014 19:28:16 +0200 + +binutils (2.24.51.20140903-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Thu, 04 Sep 2014 00:37:05 +0200 + +binutils (2.24.51.20140903-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140903. + * Try to work around binutils-multiarch build failure on sh4 by disabling + hppa targets for the binutils-multiarch build. Addresses: #758830. + * Enable powerpc targets for ppc64el. Closes: #760395. + + -- Matthias Klose Wed, 03 Sep 2014 23:02:26 +0200 + +binutils (2.24.51.20140818-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Mon, 18 Aug 2014 14:41:00 +0200 + +binutils (2.24.51.20140818-1) unstable; urgency=high + + * Snapshot, taken from the trunk 20140818. + - Fix GLIBC ifunc breakage on PowerPC64 ELFv2. LP: #1355962. + + -- Matthias Klose Mon, 18 Aug 2014 13:49:01 +0200 + +binutils (2.24.51.20140814-2) unstable; urgency=medium + + * Still provide i486-* symlinks. + + -- Matthias Klose Sun, 17 Aug 2014 17:06:36 +0200 + +binutils (2.24.51.20140814-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Thu, 14 Aug 2014 13:39:18 +0200 + +binutils (2.24.51.20140814-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140814. + - Add ld options --push-state and --pop-state. + * binutils-hppa64: Set architecture to hppa. + * Add aarch64_ilp32-linux-gnu multiarch directories to the search path. + + -- Matthias Klose Thu, 14 Aug 2014 13:28:40 +0200 + +binutils (2.24.51.20140807-1ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140807. + + -- Matthias Klose Thu, 07 Aug 2014 11:54:19 +0200 + +binutils (2.24.51.20140727-1ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140727. + + -- Matthias Klose Sun, 27 Jul 2014 15:50:56 +0200 + +binutils (2.24.51.20140709-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Wed, 09 Jul 2014 20:00:32 +0200 + +binutils (2.24.51.20140709-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140709. + - Fix PR gold/15639, -flto and ld.gold on ARM. + Closes: #712189. LP: #1191909. + + -- Matthias Klose Wed, 09 Jul 2014 19:44:18 +0200 + +binutils (2.24.51.20140704-1ubuntu1) utopic; urgency=medium + + * Merge with Debian, remaining changes: + - Build from upstream sources. + + -- Matthias Klose Fri, 04 Jul 2014 13:26:06 +0200 + +binutils (2.24.51.20140704-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140704. + * Build gold for mips* targets. + * Update the patch for the mips64el support. Closes: #750566, #753052. + * Update patches for the current trunk. + + -- Matthias Klose Fri, 04 Jul 2014 12:00:05 +0200 + +binutils (2.24.51.20140617-1ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140617. + + -- Matthias Klose Tue, 17 Jun 2014 10:41:22 +0200 + +binutils (2.24.51.20140617-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140617. + + -- Matthias Klose Tue, 17 Jun 2014 10:29:20 +0200 + +binutils (2.24.51.20140612-0ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140612. + * Re-enable the ld_system_root patch. + + -- Matthias Klose Thu, 12 Jun 2014 14:02:24 +0200 + +binutils (2.24.51.20140604-1ubuntu2) utopic; urgency=medium + + * Re-apply 2.24.51.20140425-0ubuntu2 changes, lost in previous upload. + + -- Matthias Klose Thu, 05 Jun 2014 11:25:35 +0200 + +binutils (2.24.51.20140604-1ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140604. + + -- Matthias Klose Wed, 04 Jun 2014 14:19:01 +0200 + +binutils (2.24.51.20140604-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140604. + * Refactor rules for consistent usage of the PF macro (Helmut Grohne). + + -- Matthias Klose Wed, 04 Jun 2014 13:48:21 +0200 + +binutils (2.24.51.20140425-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140425. + * Refactor rules for consistent usage of the PF macro (Helmut Grohne). + * On x86 targets provide gnu-type prefixed binaries with the cpu that GCC + is configured for. + * 129_multiarch_libpath.patch: Fix to search multiarch dirs, only needed + for a minority of packages still using ld directly for linking instead + of the recommended use of gcc. + + -- Matthias Klose Sun, 27 Apr 2014 21:52:56 +0200 + +binutils (2.24.51.20140425-0ubuntu2) utopic; urgency=medium + + * 129_multiarch_libpath.patch: Fix to search multiarch dirs again. + + -- Adam Conrad Fri, 25 Apr 2014 16:17:34 -0600 + +binutils (2.24.51.20140425-0ubuntu1) utopic; urgency=medium + + * Snapshot, taken from the trunk 20140425. + + -- Matthias Klose Fri, 25 Apr 2014 14:33:56 +0200 + +binutils (2.24.51.20140417-0ubuntu1) trusty; urgency=medium + + * Snapshot, taken from the trunk 20140417. + + -- Matthias Klose Thu, 17 Apr 2014 21:17:28 +0200 + +binutils (2.24.51.20140411-1) unstable; urgency=medium + + * Snapshot, taken from the trunk 20140411. + * Provide $(DEB_HOST_GNU_TYPE)- prefixed binaries and man pages. + * Don't enable the spu targets on powerpc targets anymore. + * Build the gold linker on hurd-i386 (Svante Signell). Closes: #744020. + + -- Matthias Klose Fri, 11 Apr 2014 18:49:22 +0200 + +binutils (2.24-5ubuntu3) trusty; urgency=medium + + * [AArch64] Fix off by one error in instruction relaxation mask. + See https://sourceware.org/ml/binutils/2014-04/msg00151.html. + + -- Matthias Klose Tue, 15 Apr 2014 19:55:23 +0200 + +binutils (2.24-5ubuntu2) trusty; urgency=medium + + * Provide $(DEB_HOST_GNU_TYPE)- prefixed binaries and man pages. + + -- Matthias Klose Thu, 10 Apr 2014 16:38:11 +0100 + +binutils (2.24-5ubuntu1) trusty; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Fri, 21 Mar 2014 13:54:09 +0100 + +binutils (2.24-5) unstable; urgency=medium + + * Update from the 2.24 branch, 20140321. + * Stop building the binutils-spu package. + * Add a binutils-multiarch-dev package. Closes: #583160 + + -- Matthias Klose Fri, 21 Mar 2014 11:23:40 +0100 + +binutils (2.24-4ubuntu1) trusty; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Tue, 04 Mar 2014 02:41:22 +0100 + +binutils (2.24-4) unstable; urgency=medium + + * Update from the 2.24 branch, 20140304. + * Update Aarch64 ilp32 linker and libdir names. + * Fix relocations for thread local variables on AArch64. Updated patch + taken from the trunk. + * Enable AArch64 big endian targets for AArch64 builds and for + binutils-multiarch. + * gas: Add entry for "xgene1" (AArch64). + * gas: Remove the alignment limit on AArch64. + * Add a Built-Using attribute for for the binutils-cross-* packages. + Closes: #738311. + + -- Matthias Klose Tue, 04 Mar 2014 02:21:00 +0100 + +binutils (2.24-3) unstable; urgency=medium + + * Update from the 2.24 branch, 20140124. + * Display the reference causing a shared library to be needed (taken from + the trunk). + + -- Matthias Klose Fri, 24 Jan 2014 14:39:48 +0100 + +binutils (2.24-2ubuntu3) trusty; urgency=medium + + * Fix relocations for thread local variables on AArch64. Updated patch + taken from the trunk. + + -- Matthias Klose Fri, 24 Jan 2014 16:46:21 +0100 + +binutils (2.24-2ubuntu2) trusty; urgency=low + + * Fix relocations for thread local variables on AArch64 (Michael + Hudson). + * Don't ship the embedspu binary in binutils-multiarch. + + -- Matthias Klose Tue, 17 Dec 2013 16:37:35 +0100 + +binutils (2.24-2ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Mon, 09 Dec 2013 14:22:33 +0100 + +binutils (2.24-2) unstable; urgency=medium + + * Update from the 2.24 branch, 20131209. + * Remove versioned build dependencies which are not needed anymore + since 2005. + * Drop the ld_system_root patch. + * Fix PowerPC64 linking of --just-symbols objects (Alan Modra). + + -- Matthias Klose Mon, 09 Dec 2013 13:57:43 +0100 + +binutils (2.24-1ubuntu2) trusty; urgency=low + + * Remove versioned build dependencies which are not needed anymore + since 2005. + * Fix PowerPC64 linking of --just-symbols objects (Alan Modra). + + -- Matthias Klose Tue, 03 Dec 2013 11:07:14 +0100 + +binutils (2.24-1ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Mon, 02 Dec 2013 12:34:33 +0100 + +binutils (2.24-1) unstable; urgency=low + + * Final upstream release. + * ifunc updates for AArch64, taken from the trunk. + + -- Matthias Klose Mon, 02 Dec 2013 11:21:16 +0200 + +binutils (2.23.91.20131123-1ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Sat, 23 Nov 2013 08:41:59 +0100 + +binutils (2.23.91.20131123-1) unstable; urgency=low + + * New upstream snapshot, taken from the 2.24 branch. + * Stop shipping libiberty, now available in libiberty-dev. + + -- Matthias Klose Sat, 23 Nov 2013 08:27:51 +0100 + +binutils (2.23.90.20131116-1ubuntu2) trusty; urgency=low + + * On AArch64, don't set LIBPATH_SUFFIX to 64. + + -- Matthias Klose Tue, 19 Nov 2013 13:31:11 +0200 + +binutils (2.23.90.20131116-1ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Sat, 16 Nov 2013 13:54:31 +0100 + +binutils (2.23.90.20131116-1) unstable; urgency=low + + * New upstream snapshot, taken from the 2.24 branch. + + -- Matthias Klose Sat, 16 Nov 2013 12:40:28 +0100 + +binutils (2.23.90.20131017-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Thu, 17 Oct 2013 14:27:21 +0200 + +binutils (2.23.90.20131017-1) unstable; urgency=low + + * New upstream snapshot, taken from the 2.24 branch. + + -- Matthias Klose Thu, 17 Oct 2013 14:22:05 +0200 + +binutils (2.23.90.20130927-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Fri, 27 Sep 2013 16:22:51 +0200 + +binutils (2.23.90.20130927-1) unstable; urgency=low + + * New upstream snapshot, taken from the 2.24 branch. + * Add ifunc support for AArch64. + + -- Matthias Klose Fri, 27 Sep 2013 14:05:44 +0200 + +binutils (2.23.52.20130913-0ubuntu1) saucy; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Fri, 13 Sep 2013 13:52:59 +0200 + +binutils (2.23.52.20130828-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Wed, 28 Aug 2013 15:25:50 +0200 + +binutils (2.23.52.20130828-1) unstable; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Wed, 28 Aug 2013 15:22:51 +0200 + +binutils (2.23.52.20130727-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Sat, 27 Jul 2013 11:29:57 +0200 + +binutils (2.23.52.20130727-1) unstable; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Sat, 27 Jul 2013 10:37:11 +0200 + +binutils (2.23.52.20130722-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Mon, 22 Jul 2013 22:37:02 +0200 + +binutils (2.23.52.20130722-1) unstable; urgency=low + + * New upstream snapshot. + - Fix PR ld/15762, glibc being built without warning sections. + * Set the libdir for arm64 to lib, not lib64. + * Stop building the binutils-gold package, let binutils provide + binutils-gold. Packages requiring gold should explicity pass + -fuse-ld=gold to the compiler, packages requiring the bfd linker + should pass -fuse-ld=bfd to the compiler. + * Refresh patches. + + -- Matthias Klose Mon, 22 Jul 2013 21:13:32 +0200 + +binutils (2.23.52.20130620-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Thu, 20 Jun 2013 12:31:29 +0200 + +binutils (2.23.52.20130620-1) unstable; urgency=low + + * New upstream snapshot. + * Add conflicts with mingw binutils. Closes: #712057, #712063. + * Always compare the test results with the ones from the installed binutils. + + -- Matthias Klose Thu, 20 Jun 2013 12:27:31 +0200 + +binutils (2.23.52.20130612-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Wed, 12 Jun 2013 12:26:59 +0200 + +binutils (2.23.52.20130612-1) unstable; urgency=low + + * New upstream snapshot. + - Fix issue #15323, redefining weak functions in -flto incrementally-linked + executable. Closes: #710936. + * Install libiberty.a again in binutils-dev, not installed anymore upstream + by default. + * Import the autopkg tests from Ubuntu. + * Enable i386pep emulation for the x86 builds. Closes: #703463. + * Fix typo in ld(1). Closes: #704867. + * Add mips64(el) support (YunQiang Su). Closes: #710214. + + -- Matthias Klose Wed, 12 Jun 2013 11:35:05 +0200 + +binutils (2.23.52.20130611-1ubuntu2) saucy; urgency=low + + * Restore lost changes from 2.23.2-2ubuntu2 and 2.23.2-2ubuntu3. + * Install libiberty.a alongside libiberty_pic.a in binutils-dev. + + -- Adam Conrad Tue, 11 Jun 2013 20:45:00 -0600 + +binutils (2.23.52.20130611-1ubuntu1) saucy; urgency=low + + * Merge with Debian; remaining changes: + - Build from the upstream source. + + -- Matthias Klose Tue, 11 Jun 2013 15:00:49 +0200 + +binutils (2.23.52.20130611-1) unstable; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Tue, 11 Jun 2013 14:53:06 +0200 + +binutils (2.23.52.20130522-1) experimental; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Wed, 22 May 2013 16:22:04 +0200 + +binutils (2.23.2-2ubuntu3) saucy; urgency=low + + * debian/tests/control: Add a Depends: field as "@" does not work for this + package (binutils-hppa64 cannot be installed on other architectures). + + -- Martin Pitt Wed, 05 Jun 2013 07:12:42 +0200 + +binutils (2.23.2-2ubuntu2) saucy; urgency=low + + * Fix wrong syntax in debian/tests/control that's causing autopkgtest + failures. + + -- Steve Langasek Tue, 04 Jun 2013 07:50:53 -0700 + +binutils (2.23.2-2ubuntu1) raring; urgency=low + + * Merge with Debian; remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + - Add simple rebuild autopkgtest. + + -- Matthias Klose Tue, 16 Apr 2013 02:57:24 +0200 + +binutils (2.23.2-2) experimental; urgency=low + + * Add support for Cortex-A53 / Cortex-A57. + * Fix PR gas/14887 and PR gas/14987, gas syntax errors on ARM. + LP: #1166628. + + -- Matthias Klose Tue, 16 Apr 2013 02:21:44 +0200 + +binutils (2.23.2-1ubuntu2) raring; urgency=low + + * Add support for Cortex-A53 / Cortex-A57. + + -- Matthias Klose Sat, 30 Mar 2013 09:50:08 +0100 + +binutils (2.23.2-1ubuntu1) raring; urgency=low + + * Merge with Debian; remaining changes: + - Build from upstream sources. + - Build binutils-static and binutils-static-udeb packages. + - Add simple rebuild autopkgtest. + + -- Matthias Klose Tue, 26 Mar 2013 20:25:43 +0100 + +binutils (2.23.2-1) experimental; urgency=low + + * binutils 2.23.2 release. + + -- Matthias Klose Tue, 26 Mar 2013 19:58:59 +0100 + +binutils (2.23.1-0ubuntu11) raring; urgency=low + + * Update from the 2.23 branch (20130222). + * For cross builds, add the tool libdir to the library search path. + + -- Matthias Klose Fri, 22 Feb 2013 15:28:19 +0100 + +binutils (2.23.1-0ubuntu10) raring; urgency=low + + * Revert, broken for cross builds: + - Recognize DEB_TARGET_ARCH for cross builds. + + -- Matthias Klose Thu, 14 Feb 2013 23:32:59 +0100 + +binutils (2.23.1-0ubuntu9) raring; urgency=low + + * AArch64: Fix the support for PRFM instructions with preload + instruction hints (proposed for the 2.23 branch). + + -- Matthias Klose Thu, 14 Feb 2013 19:52:08 +0100 + +binutils (2.23.1-0ubuntu8) raring; urgency=low + + * Update from the 2.23 branch (20130213). + - AArch64 and PPC updates. + * Recognize DEB_TARGET_ARCH for cross builds. Closes: #695595. + * Fix srec_scan null dereference (Sang Kil Cha). Closes: #684903. + + -- Matthias Klose Wed, 13 Feb 2013 12:45:29 +0100 + +binutils (2.23.1-0ubuntu6) raring; urgency=low + + * Fix PR ld/14918: linking with -flto always links in libgcc_s.so. + Closes: #650145. + * Fix build failure with texinfo 4.14. Closes: #697353. + + -- Matthias Klose Sat, 05 Jan 2013 14:20:15 +0100 + +binutils (2.23.1-0ubuntu5) raring; urgency=low + + * Drop build dependency on g++. + + -- Matthias Klose Wed, 12 Dec 2012 08:55:12 +0100 + +binutils (2.23.1-0ubuntu4) raring; urgency=low + + * Update from the 2.23 branch (20121204). + * Add -fuse-ld= for GCC linker option compatibility in ld and gold. + * gold cross builds: Search the multiarch directories too. + * Revert the gettext:any build dependency hack. + + -- Matthias Klose Wed, 05 Dec 2012 08:45:10 +0100 + +binutils (2.23.1-0ubuntu3) raring; urgency=low + + * debian/control.in: Drop Vcs-*, that branch hasn't been updated since + natty. + * Add simple rebuild autopkgtest. (LP: #1081500) + * Add a simple test to compile, link, and run a program against libc6 and + build/use a shared library with the system-installed binutils, to ensure + basic binutils functionality. + + -- Martin Pitt Thu, 22 Nov 2012 07:49:25 +0100 + +binutils (2.23.1-0ubuntu2) raring; urgency=low + + * Update from the 2.23 branch (20121121). + - arm, aarch64 and x32 updates. + - Fix build error with -Werror. LP: #1079676. + + -- Matthias Klose Wed, 21 Nov 2012 14:14:55 +0100 + +binutils (2.23.1-0ubuntu1) raring; urgency=low + + * binutils 2.23.1 release. + + -- Matthias Klose Thu, 15 Nov 2012 14:07:23 +0100 + +binutils (2.23-2ubuntu1) raring; urgency=low + + * Merge with Debian; remaining changes: + - Build from upstream tarball. + + -- Matthias Klose Tue, 06 Nov 2012 19:40:21 +0100 + +binutils (2.23-2) experimental; urgency=low + + * Update multi-arch paths for x32 (x86_64-linux-gnux32) (Daniel Schepler). + Closes: #692138. + * Add new ARM hard-float/soft-float ABI flags for EABI_VER5 (Steve McIntyre). + * Silence lintian stupidity about interpreting every string in binaries + as text (Emmanuel Fleury). Closes: #661639. + * In ld.texi, remove cross reference to BFD internals documentation. + + -- Matthias Klose Tue, 06 Nov 2012 10:42:37 +0100 + +binutils (2.23-1) experimental; urgency=low + + * binutils 2.23 release. + * Don't include the documents licensed under GFDL with cover texts. + Closes: #650504. + + -- Matthias Klose Wed, 24 Oct 2012 10:29:50 +0200 + +binutils (2.22.90.20120924-1) experimental; urgency=low + + * New upstream snapshot (taken from the 2.23 branch). + * Fix bfd.h, removing the safety inclusion guard. + * Fix multilib conflicts of generated values by __WORDSIZE-based expressions. + + -- Matthias Klose Mon, 24 Sep 2012 18:39:51 +0200 + +binutils (2.22.90.20120924-0ubuntu2) quantal; urgency=low + + * Fix inclusion of bfd.h, removing the safety inclusion guard. + * Fix multilib conflicts of generated values by __WORDSIZE-based expressions. + + -- Matthias Klose Tue, 25 Sep 2012 18:40:36 +0200 + +binutils (2.22.90.20120924-0ubuntu1) quantal; urgency=low + + * Update from the 2.23 branch: + - Fix PR ld/14591 (wrong symbol type with common symbol and weak function). + * d/p/211-hjl-binutils-weakdef.patch, d/p/213-hjl-binutils-sec64k.patch: + Remove, not found anymore in the hjl releases. + * Remove all other (not applied) patches from the hjl releases. + + -- Matthias Klose Mon, 24 Sep 2012 22:16:17 +0200 + +binutils (2.22.90.20120919-0ubuntu1) quantal; urgency=low + + * Update from the 2.23 branch: + - armv8 fixes. + + -- Matthias Klose Wed, 19 Sep 2012 16:49:35 +0200 + +binutils (2.22.90.20120913-2ubuntu1) quantal; urgency=low + + * Merge with Debian. + + -- Matthias Klose Sat, 15 Sep 2012 11:29:42 +0200 + +binutils (2.22.90.20120913-2) experimental; urgency=low + + * Undo the reversion of the mips patches, unrelated issue. + * Build again with -marm on armhf. Testsuite still not ready for thumb mode. + + -- Matthias Klose Sat, 15 Sep 2012 03:00:10 +0200 + +binutils (2.22.90.20120913-1ubuntu1) quantal; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 13 Sep 2012 21:06:18 +0200 + +binutils (2.22.90.20120913-1) experimental; urgency=low + + * New upstream snapshot (taken from the 2.23 branch). + * Add R_AARCH64_GOT_LD_PREL19 reloc implementation, taken from the trunk. + * Revert mips updates. + See http://sourceware.org/ml/binutils/2012-09/msg00158.html + + -- Matthias Klose Thu, 13 Sep 2012 20:35:08 +0200 + +binutils (2.22.90.20120907-1ubuntu1) quantal; urgency=low + + * Build-depend on gettext:any to fix the cross build. LP: #1043442. + Work around until libgettext is split out of gettext (see #683751). + + -- Matthias Klose Sat, 08 Sep 2012 13:43:51 +0200 + +binutils (2.22.90.20120907-1) experimental; urgency=low + + * New upstream snapshot (taken from the 2.23 branch). + * Don't build anymore with -marm on armhf. + * Work around `install' limitation not able to pass parameters + to the strip command. Closes: #686183. + * Generate md5sums file. Closes: #684079. + + -- Matthias Klose Sat, 08 Sep 2012 13:40:39 +0200 + +binutils (2.22.90.20120816-2ubuntu1) quantal; urgency=low + + * Merge with Debian. + + -- Matthias Klose Wed, 22 Aug 2012 13:54:26 +0200 + +binutils (2.22.90.20120816-2) experimental; urgency=low + + * Some refactoring of debian/rules based on patches from Marcin: + * Introduce DEB_TARGET_* macros to unify native and cross builds. + * Build the control file as the first step for cross builds. + * Try again building without --disable-werror. + * Refactor stripping of binaries into a `strip_package' macro. + + -- Matthias Klose Tue, 21 Aug 2012 15:31:05 +0200 + +binutils (2.22.90.20120816-1ubuntu1) quantal; urgency=low + + * New upstream snapshot (taken from the 2.23 branch). + * Configure for aarch64 and x32 targets. + + -- Matthias Klose Thu, 16 Aug 2012 16:35:48 +0200 + +binutils (2.22.90.20120731-0ubuntu1) quantal; urgency=low + + * New upstream snapshot (taken from the 2.23 branch). + + -- Matthias Klose Wed, 01 Aug 2012 16:31:30 +0200 + +binutils (2.22.52.20120713-0ubuntu1) quantal; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Sat, 14 Jul 2012 00:56:30 +0200 + +binutils (2.22.52.20120704-1) experimental; urgency=low + + * New upstream snapshot. + + -- Matthias Klose Wed, 04 Jul 2012 14:40:01 +0200 + +binutils (2.22-7) unstable; urgency=low + + * Update from the binutils-2_22-branch 20120704. + - Fix PR ld/13991 and a gold issue on ARM. + * Fix warning building libiberty/md5.c. Closes: #674831. + * Enable x86_64-pep in binutils-multiarch. Closes: #675364. + + -- Matthias Klose Wed, 04 Jul 2012 11:00:14 +0200 + +binutils (2.22-6ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 08 Mar 2012 19:21:22 +0100 + +binutils (2.22-6) unstable; urgency=low + + * Update from the binutils-2_22-branch 20120307. + - Fix PR ld/12161 (avr), PR binutils/13622 (readelf crash), + PR binutils/13476 (hppa), PR ld/13387 (hppa), + * Fix typo in elf64-x86-64.c, follow-up patch to PR ld/13302. + + -- Matthias Klose Thu, 08 Mar 2012 18:52:20 +0100 + +binutils (2.22-5ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Wed, 25 Jan 2012 11:47:53 +0100 + +binutils (2.22-5) unstable; urgency=low + + * Update from the binutils-2_22-branch 20120124. + - Fix PR ld/13581 (x32). + * Fix PR gas/13449 (ARM), taken from the trunk. + + -- Matthias Klose Tue, 24 Jan 2012 21:26:43 +0100 + +binutils (2.22-4ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Sat, 07 Jan 2012 10:27:24 +0100 + +binutils (2.22-4) unstable; urgency=low + + * Don't bump the soversion (revert the change in 2.22-3). + * Apply proposed patch for PR binutils/13534, allowing ar to handle + files bigger than 2GB (Francois Gouget). Closes: #652887). + * Recognize DW_LANG_Go in readelf (backport from trunk). + + -- Matthias Klose Sat, 07 Jan 2012 09:07:25 +0100 + +binutils (2.22-3ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 03 Jan 2012 07:28:18 +0100 + +binutils (2.22-3) unstable; urgency=low + + * Update from the binutils-2_22-branch 20120102. + - gold updates. + - mips updates. + + -- Matthias Klose Tue, 03 Jan 2012 06:06:20 +0100 + +binutils (2.22-2ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Sun, 11 Dec 2011 17:37:30 +0100 + +binutils (2.22-2) unstable; urgency=low + + * Update from the binutils-2_22-branch 20111211. + * Fix build failure with make 3.82 (Daniel Schepler). Closes: #650064. + + -- Matthias Klose Sun, 11 Dec 2011 16:30:14 +0000 + +binutils (2.22-1ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Mon, 21 Nov 2011 17:47:56 +0100 + +binutils (2.22-1) unstable; urgency=low + + * Binutils 2.22 release. + + -- Matthias Klose Mon, 21 Nov 2011 16:50:53 +0100 + +binutils (2.21.90.20111025-1ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 25 Oct 2011 15:46:41 +0200 + +binutils (2.21.90.20111025-1) unstable; urgency=low + + * Snapshot, taken from the binutils-2_22-branch 20111025. + * Fix lintian warnings. + + -- Matthias Klose Tue, 25 Oct 2011 15:06:46 +0200 + +binutils (2.21.90.20111019-3ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Sun, 23 Oct 2011 13:41:58 +0200 + +binutils (2.21.90.20111019-3) unstable; urgency=low + + * Fix PR ld/13302, taken from the trunk. + + -- Matthias Klose Sun, 23 Oct 2011 13:15:07 +0200 + +binutils (2.21.90.20111019-2ubuntu1) precise; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 20 Oct 2011 13:12:50 +0200 + +binutils (2.21.90.20111019-2) unstable; urgency=low + + * Fix PR ld/13287, taken from the trunk. LP: #872687. + + -- Matthias Klose Thu, 20 Oct 2011 12:29:18 +0200 + +binutils (2.21.90.20111019-1) unstable; urgency=low + + * Snapshot, taken from the binutils-2_22-branch 20111019. + + -- Matthias Klose Wed, 19 Oct 2011 22:25:05 +0200 + +binutils (2.21.90.20111004-2ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 11 Oct 2011 12:36:33 +0200 + +binutils (2.21.90.20111004-2) unstable; urgency=low + + * Fix PR ld/13250, preserve the maximum alignment and size for common + symbols (H.J. Lu). Closes: #608901. LP: #697229. + + -- Matthias Klose Thu, 06 Oct 2011 08:06:04 +0200 + +binutils (2.21.90.20111004-1) unstable; urgency=medium + + * Snapshot, taken from the binutils-2_22-branch 20111004. + * Fix PR ld/13195, taken from the trunk. Closes: #643858, #644183. + + -- Matthias Klose Tue, 04 Oct 2011 12:12:16 +0200 + +binutils (2.21.53.20110922-1) unstable; urgency=low + + * Snapshot, taken from the binutils-2_22-branch 20110924. + + -- Matthias Klose Sat, 24 Sep 2011 09:55:38 +0200 + +binutils (2.21.53.20110910-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110910. + - Fix PR gas/13024. Closes: #635592. + * Build with proposed patch for PR ld/12965. + * Don't ship .la files in the cross binutils packages. + * For native builds, add the multiarch directories to the default + search path. + + -- Matthias Klose Sat, 10 Sep 2011 13:06:01 +0200 + +binutils (2.21.53.20110823-3) unstable; urgency=low + + * Revert the last change: + - Default to --hash-style=both in ld.bfd and ld.gold. + + -- Matthias Klose Thu, 25 Aug 2011 10:48:28 +0200 + +binutils (2.21.53.20110823-2) unstable; urgency=low + + * Default to --hash-style=both in ld.bfd and ld.gold. + * Fix s390x build (Aurelian Jarno). Closes: #635167. + + -- Matthias Klose Wed, 24 Aug 2011 13:06:48 +0200 + +binutils (2.21.53.20110823-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110823. + - ld --no-copy-dt-needed-entries/--no-add-needed is now the default. + + -- Matthias Klose Tue, 23 Aug 2011 21:23:38 +0200 + +binutils (2.21.53.20110810-0ubuntu4) oneiric-proposed; urgency=low + + * Fix PR ld/13250, preserve the maximum alignment and size for common + symbols (H.J. Lu). Closes: #608901. LP: #697229. + + -- Matthias Klose Thu, 06 Oct 2011 09:22:34 +0200 + +binutils (2.21.53.20110810-0ubuntu3) oneiric; urgency=low + + * Fix PR ld/13201, link error with --as-needed and -flto. LP: #778292. + LP: #690194. + + -- Matthias Klose Tue, 20 Sep 2011 11:34:33 +0200 + +binutils (2.21.53.20110810-0ubuntu2) oneiric; urgency=low + + * Build with proposed patch for PR ld/12965. LP: #641126. + * Don't ship .la files in the cross binutils packages. LP: #760420. + * For native builds, add the multiarch directories to the default + search path. LP: #780455. + + -- Matthias Klose Wed, 07 Sep 2011 15:36:22 +0200 + +binutils (2.21.53.20110810-0ubuntu1) oneiric; urgency=low + + * Snapshot, taken from the trunk 20110810. + + -- Matthias Klose Thu, 11 Aug 2011 22:51:48 +0200 + +binutils (2.21.53.20110805-1ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 05 Aug 2011 12:34:26 +0200 + +binutils (2.21.53.20110805-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110805. + + -- Matthias Klose Fri, 05 Aug 2011 12:25:49 +0200 + +binutils (2.21.53.20110729-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110729. + * Fix s390x build (Aurelian Jarno). Closes: #635167. + + -- Matthias Klose Fri, 29 Jul 2011 19:04:46 +0200 + +binutils (2.21.53.20110720-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110720. + - Fix PR ld/12978. Closes: #632681. + + -- Matthias Klose Wed, 20 Jul 2011 20:54:51 +0200 + +binutils (2.21.52.20110707-1ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 07 Jul 2011 07:28:51 +0200 + +binutils (2.21.52.20110707-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110707. + - Fix build failure on mips/mipsel. Closes: #632690. + - Fix issues on kfreebsd-amd64. Closes: #632671. + + -- Matthias Klose Thu, 07 Jul 2011 06:48:33 +0200 + +binutils (2.21.52.20110703-1ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Mon, 04 Jul 2011 10:31:01 +0200 + +binutils (2.21.52.20110703-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110703. + + -- Matthias Klose Sun, 03 Jul 2011 21:56:44 +0200 + +binutils (2.21.52.20110606-2) unstable; urgency=low + + * Fix PR ld/12845, taken from the trunk. Closes: #628685. + + -- Matthias Klose Thu, 09 Jun 2011 12:45:15 +0200 + +binutils (2.21.52.20110606-1ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 07 Jun 2011 11:56:41 +0200 + +binutils (2.21.52.20110606-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110606. + - Fix PR ld/12833. Closes: #628770. + - Fix spelling errors. Closes: #604696. + * Let gold accept a dummy -z buildd- option. + * Add a /usr/share/bug/binutils/presubj file for reportbug (and symlinks + from the other /usr/share/bug/binutils-foo directories) explaining how + to make a self-contained testcase (Jonathan Nieder). Closes: #629147. + * Fix ld crash cause of invalid pointer in munmap_chunk. Closes: #628916. + + -- Matthias Klose Tue, 07 Jun 2011 00:03:47 +0200 + +binutils (2.21.51.20110523-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110523. + + -- Matthias Klose Mon, 23 May 2011 23:38:52 +0200 + +binutils (2.21.51.20110421-6ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 19 May 2011 16:02:39 +0200 + +binutils (2.21.51.20110421-6) unstable; urgency=low + + [ Marcin Juszkiewicz ] + * Use pregenerated ld.gold.1 for cross builds. + + [ Matthias Klose ] + * Redefine STRIP and install_binary for cross builds (Ken Werner). + * Apply fix for PR ld/12726, taken from the trunk. + + -- Matthias Klose Thu, 19 May 2011 15:51:22 +0200 + +binutils (2.21.51.20110421-5) unstable; urgency=medium + + * Use a symlink for /usr/bin/ld, even if gold is not built. Closes: #615262. + + -- Matthias Klose Tue, 17 May 2011 17:58:17 +0200 + +binutils (2.21.51.20110421-4) unstable; urgency=low + + * Fix PR ld/12730, taken from the trunk. Closes: #625616. + * Cortex A8 workarounds for PLT tail calls (Richard Sandiford). + + -- Matthias Klose Sun, 08 May 2011 02:06:22 +0200 + +binutils (2.21.51.20110421-3) unstable; urgency=low + + * Fix segfault in ar, delete_members. + + -- Matthias Klose Sun, 01 May 2011 17:30:42 +0200 + +binutils (2.21.51.20110421-2) unstable; urgency=low + + * Fix typo in the patch for PR gas/12698. + + -- Matthias Klose Wed, 27 Apr 2011 21:33:47 +0200 + +binutils (2.21.51.20110421-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110421. + * Install a man page for ld.gold, generated by help2man. Closes: #619823. + * Apply proposed patch for PR gas/12698. Closes: #623964. + + -- Matthias Klose Wed, 27 Apr 2011 18:14:39 +0200 + +binutils (2.21.51.20110421-0ubuntu6) oneiric; urgency=low + + * Fix PR ld/12730, taken from the trunk. Closes: #625616. + + -- Matthias Klose Sun, 08 May 2011 02:17:37 +0200 + +binutils (2.21.51.20110421-0ubuntu5) oneiric; urgency=low + + * Cortex A8 workarounds for PLT tail calls (Richard Sandiford). + + -- Matthias Klose Fri, 06 May 2011 11:55:11 +0200 + +binutils (2.21.51.20110421-0ubuntu4) oneiric; urgency=low + + * Fix segfault in ar, delete_members. + + -- Matthias Klose Sun, 01 May 2011 17:30:42 +0200 + +binutils (2.21.51.20110421-0ubuntu3) oneiric; urgency=low + + * Install a man page for ld.gold, generated by help2man. Closes: #619823. + * Apply proposed patch for PR gas/12698. Closes: #623964. + + -- Matthias Klose Wed, 27 Apr 2011 20:26:20 +0200 + +binutils (2.21.51.20110421-0ubuntu1) oneiric; urgency=low + + * Snapshot, taken from the trunk 20110421. + + -- Matthias Klose Thu, 21 Apr 2011 14:24:45 +0200 + +binutils (2.21.51.20110419-2) unstable; urgency=low + + * Fix powerpcspe and sparc builds. + + -- Matthias Klose Tue, 19 Apr 2011 13:47:56 +0200 + +binutils (2.21.51.20110419-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20110419. + + -- Matthias Klose Tue, 19 Apr 2011 10:18:14 +0200 + +binutils (2.21.0.20110327-2ubuntu2) natty; urgency=low + + * Fix architecture field for binutils-gold (powerpcspe). + * Add support for arm-*-gnueabihf targets. Closes: #621029. + * Fix PR ld/12654: Pproperly handle R_386_TLS_LDO_32 for PIE. LP: #663294. + + -- Matthias Klose Sat, 09 Apr 2011 13:35:11 +0200 + +binutils (2.21.0.20110327-2ubuntu1) natty; urgency=low + + [ Marcin Juszkiewicz ] + * Build -dbgsym package for cross builds. LP: #711523. + + -- Matthias Klose Thu, 31 Mar 2011 16:24:10 +0200 + +binutils (2.21.0.20110327-2) unstable; urgency=low + + * Fix architecture field for binutils-gold. + * Configure with --disable-werror on armhf. + + -- Matthias Klose Tue, 29 Mar 2011 19:38:55 +0200 + +binutils (2.21.0.20110327-1) unstable; urgency=low + + * Update from the 2.21 branch 20110327. + * Add multiarch directories to linker search path. Closes: #369064. + LP: #738098. + + -- Matthias Klose Sun, 27 Mar 2011 22:32:57 +0100 + +binutils (2.21.0.20110322-1ubuntu2) natty; urgency=low + + * Add multiarch directories to linker search path. Closes: #369064. + LP: #738098. + + -- Matthias Klose Sat, 26 Mar 2011 11:27:54 +0100 + +binutils (2.21.0.20110322-1ubuntu1) natty; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 22 Mar 2011 23:36:26 +0100 + +binutils (2.21.0.20110322-1) unstable; urgency=low + + * Update from the 2.21 branch 20110322. + * S/390: Make as to accept all instructions if no -march option given. + taken from the trunk (Aurelian Jarno). Closes: #618751. + * Extend support for armhf (Loic Minier). + - debian/control.in, debian/control, debian/rules: Enable gold for armhf. + - debian/rules: Introduce $(CROSS) (set to $(DEB_HOST_GNU_TYPE)- when + cross-building) and call $(CROSS)cpp to check whether -marm is needed or + not instead of testing for armel; an alternative would be to + unconditionally set -marm if DEB_HOST_ARCH_CPU is arm. + - debian/rules: commented out -fno-section-anchors CFLAGS handling would + also be enabled for armhf. + - debian/rules: ignore regressions on armhf as well; note that + ignore_regressions is set three times. + + -- Matthias Klose Tue, 22 Mar 2011 23:12:39 +0100 + +binutils (2.21.0.20110302-2ubuntu1) natty; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 11 Mar 2011 00:14:22 +0100 + +binutils (2.21.0.20110302-2) unstable; urgency=low + + [ Carlos O'Donell ] + * Fix binutils-hppa64 build. + + [ Matthias Klose ] + * Fix PR ld/12376 (John David Anglin), taken from the trunk. + * Update to the 2.21 branch, 20110310. + + -- Matthias Klose Thu, 10 Mar 2011 21:35:07 +0100 + +binutils (2.21.0.20110302-1ubuntu1) natty; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 04 Mar 2011 01:37:26 +0100 + +binutils (2.21.0.20110302-1) unstable; urgency=low + + * Update from the 2.21 branch. + + [ Thorsten Glaser ] + * patches/640_m68k_fix-TLS_GD-relocation: new, temp. Closes: #611768. + + [ Matthias Klose ] + * On ppc64, look for 32 bit target libraries in /lib32, /usr/lib32 etc., + first. + + -- Matthias Klose Wed, 02 Mar 2011 02:41:17 +0100 + +binutils (2.21.0.20110216-2) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Tue, 22 Feb 2011 20:35:16 +0100 + +binutils (2.21.0.20110216-1ubuntu3) natty; urgency=low + + * Read multiarch targets from the first column of /usr/share/dpkg/archtable; + it's not the ideal list, but it's better than a hardcoded list and + enabling all targets was breaking too many tools; LP: #726428. + + -- Loïc Minier Wed, 02 Mar 2011 18:57:13 +0100 + +binutils (2.21.0.20110216-1ubuntu2) natty; urgency=low + + * Remove leftover bfd/elflink.c.rej. + * Pass --enable-targets=all to configure in the multiarch pass; + Debian #610745. + + -- Loïc Minier Thu, 24 Feb 2011 11:46:06 +0100 + +binutils (2.21.0.20110216-1ubuntu1) natty; urgency=low + + * Upload to natty. + + -- Matthias Klose Wed, 16 Feb 2011 19:43:02 +0100 + +binutils (2.21.0.20110216-1) experimental; urgency=low + + * Update from the 2.21 branch. + + -- Matthias Klose Wed, 16 Feb 2011 15:54:15 +0100 + +binutils (2.21-5ubuntu1) natty; urgency=low + + * Upload to natty. + + -- Matthias Klose Tue, 25 Jan 2011 05:46:53 +0100 + +binutils (2.21-5) experimental; urgency=low + + * Update gold to 1.11, taken from the 2.21 branch. + * Add the arm-linux-gnueabi target to binutils-multiarch (Loic Minier). + + -- Matthias Klose Tue, 25 Jan 2011 00:51:38 +0100 + +binutils (2.21-4ubuntu1) natty; urgency=low + + * Revert the soname change. + + -- Matthias Klose Wed, 12 Jan 2011 22:09:24 +0100 + +binutils (2.21-4ubuntu0) natty; urgency=low + + * Intermediate upload to natty to change the soversion on amd64. + + -- Matthias Klose Wed, 12 Jan 2011 21:51:03 +0100 + +binutils (2.21-4) experimental; urgency=low + + * Fix handling of writable .eh_frame section in gold, taken from the + 2.21 branch. + + -- Matthias Klose Wed, 12 Jan 2011 00:42:15 +0100 + +binutils (2.21-3ubuntu1) natty; urgency=low + + * Upload to natty. + + -- Matthias Klose Fri, 31 Dec 2010 16:31:48 +0100 + +binutils (2.21-3) experimental; urgency=low + + [ Matthias Klose ] + * Don't include `-system' in the bfd version identifier. + + [ Sedat Dilek ] + * 160_pr12327.patch: Fix PR ld/12327, taken from the trunk. + + -- Matthias Klose Thu, 29 Dec 2010 23:51:35 +0100 + +binutils (2.21-2) experimental; urgency=low + + * Don't install ld.bfd in binutils-multiarch. + * Fix assembler bug blocking Thumb-2 kernel builds (CS issue #8775). + + -- Matthias Klose Fri, 10 Dec 2010 13:45:00 +0100 + +binutils (2.21-1ubuntu4) natty; urgency=low + + * Don't install ld.bfd in binutils-multiarch. LP: #688497. + * Fix assembler bug blocking Thumb-2 kernel builds (CS issue #8775). + + -- Matthias Klose Fri, 10 Dec 2010 15:35:54 +0100 + +binutils (2.21-1ubuntu2) natty; urgency=low + + * Fix build dependencies. + + -- Matthias Klose Fri, 10 Dec 2010 00:57:01 +0100 + +binutils (2.21-1ubuntu1) natty; urgency=low + + * Upload to natty. + + -- Matthias Klose Fri, 10 Dec 2010 00:17:07 +0100 + +binutils (2.21-1) experimental; urgency=low + + * binutils 2.21 release. + + [ Marcin Juszkiewicz ] + + * Enable building gold in cross builds. LP: #686530. + * Allow to build only the -source package, and include the version + in the package name. LP: #682646. + + -- Matthias Klose Thu, 09 Dec 2010 23:24:49 +0100 + +binutils (2.20.90.20101121-0ubuntu1) natty; urgency=low + + * Update from the binutils 2.21 release branch. + + -- Matthias Klose Sun, 21 Nov 2010 13:53:59 +0100 + +binutils (2.20.90.20101105-0ubuntu1) natty; urgency=low + + * binutils 2.21 prerelease 1. + + -- Matthias Klose Wed, 10 Nov 2010 01:47:38 +0200 + +binutils (2.20.51.20101028-0ubuntu1) natty; urgency=low + + * Snapshot, taken from the trunk 20100928. + + -- Matthias Klose Thu, 28 Oct 2010 17:55:49 +0200 + +binutils (2.20.51.20101014-0ubuntu1) natty; urgency=low + + * Snapshot, taken from the trunk 20100914. + * ld: Accept --sysroot again. LP: #660257. + + -- Matthias Klose Thu, 14 Oct 2010 11:10:06 +0200 + +binutils (2.20.51.20101009-0ubuntu1) natty; urgency=low + + * Snapshot, taken from the trunk 20100909. + * For cross builds, build without sysroot support. Closes LP: #598389. + + -- Matthias Klose Sat, 09 Oct 2010 15:08:04 +0200 + +binutils (2.20.51.20100908-0ubuntu2) maverick; urgency=low + + * debian/patches/216-tilde-in-ar-filenames: Allow ar scripts to contain ~ + in the filename, fixes u-boot-linaro rc build failures that ended up + using pathnames with ~ in them. LP: #641488 + + -- Zygmunt Krynicki Fri, 17 Sep 2010 19:20:28 +0200 + +binutils (2.20.51.20100908-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the trunk 20100908. + * Build binutils-hppa64 in cross builds (Al Viro). Closes: #595319. + * Don't build the binutils-hppa64 package for Ubuntu. + * Fix some lintian warnings. + + -- Matthias Klose Wed, 08 Sep 2010 15:26:18 +0200 + +binutils (2.20.51.20100813-1ubuntu3) maverick; urgency=low + + * Add missing patch file. + + -- Matthias Klose Fri, 03 Sep 2010 10:32:25 +0200 + +binutils (2.20.51.20100813-1ubuntu2) maverick; urgency=low + + * Link executables statically when `static' is passed in DEB_BUILD_OPTIONS + (Jim Heck). Closes: #590101. + * Apply proposed patch for PR ld/10340 (ld doesn't honor sysroot prefix + for ldscripts). LP: #625320. + + -- Matthias Klose Fri, 27 Aug 2010 16:52:19 +0200 + +binutils (2.20.51.20100813-1ubuntu1) maverick; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 13 Aug 2010 13:26:32 +0200 + +binutils (2.20.51.20100813-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100813. + + [ Jonathan Nieder ] + * Remove ld.bfd from binutils-multiarch (not that useful without an + multiarch assembler). + + [ Marcin Juszkiewicz ] + * Revert sysroot to / for cross builds. LP: #598389. + * Generate debian/control for native and cross builds. LP: #612629. + * Provide packaging rules in -source package. LP: #608745. + + [ Matthias Klose ] + * Don't apply patches, when PATCHED_SOURCES is set to `yes'. + * Proposed patch for PR11889, readelf crashes for malformed binaries + (Dan Rosenberg). LP: #614206. + + -- Matthias Klose Fri, 13 Aug 2010 11:10:14 +0200 + +binutils (2.20.51.20100710-1ubuntu2) maverick; urgency=low + + * Don't use configury for cross builds for native builds. LP: #604134. + + -- Matthias Klose Sun, 11 Jul 2010 10:15:01 +0200 + +binutils (2.20.51.20100710-1ubuntu1) maverick; urgency=low + + * Update HJ patches from binutils 2.20.51.0.10. + + -- Matthias Klose Sat, 10 Jul 2010 11:42:27 +0200 + +binutils (2.20.51.20100710-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100710. + - Fix PR gas/10531. LP: #599485. + * debian/rules: Introduce PF macros (Jim Heck). Closes: #588357. + + [ Marcin Juszkiewicz ] + * Don't install documentation files in -cross packages. Closes: #586636. + * Set sysroot to /usr/$(TARGET) for cross builds. LP: #598389. + + -- Matthias Klose Sat, 10 Jul 2010 10:42:55 +0200 + +binutils (2.20.51.20100617-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the trunk 20100617. + + -- Matthias Klose Thu, 17 Jun 2010 15:30:31 +0200 + +binutils (2.20.51.20100608-0ubuntu1) maverick; urgency=low + + * Snapshot, taken from the trunk 20100608. + * Merge 'binary-cross' target into 'binary' one (Marcin Juszkiewicz). + LP: #587851. + * debian/copyright: Update to GFDL 1.3. + + -- Matthias Klose Tue, 08 Jun 2010 13:26:49 +0200 + +binutils (2.20.51.20100527-1ubuntu1) maverick; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Thu, 27 May 2010 12:32:39 +0200 + +binutils (2.20.51.20100527-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100527. + + [ Jonathan Nieder ] + * debian/binutils-multiarch.preinst.in: Re-add diversions on reinstall. + Closes: #581156. + * Remove c++filt from binutils-multiarch. + * Rename /usr/bin/ld from multiarch build to ld.bfd. Closes: #582490. + LP: #586227. + + -- Matthias Klose Thu, 27 May 2010 10:40:48 +0200 + +binutils (2.20.51.20100518-1ubuntu1) maverick; urgency=low + + * Snapshot, taken from the trunk 20100518. + * Merge with Debian; remaining changes: + - Build binutils-static. + * Update hjl patches from 2.20.51.0.8. + + -- Matthias Klose Tue, 18 May 2010 14:04:04 +0200 + +binutils (2.20.51.20100518-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100518. + + -- Matthias Klose Tue, 18 May 2010 13:29:45 +0200 + +binutils (2.20.51.20100428-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100428. + + -- Matthias Klose Wed, 28 Apr 2010 10:07:28 +0200 + +binutils (2.20.51.20100418-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100418. + * debian/*.shlibs.in: Automate upstream version changes. + * Configure native build --with-sysroot=/. Closes: #556126. + * Move the ld.gold binary into the binutils package, just keep the + diversion (ld) in the binutils-gold package. + * Linker selection: ld is used by default, to use the gold linker, + pass -fuse-linker-plugin (no other side effects if -flto/-fwhopr + is not passed). To force ld.bfd or ld.gold, pass -B/usr/lib/compat-ld + for ld.bfd or /usr/lib/gold-ld for ld.gold. + * Apply proposed patch for ARM: Add option to disable merging of adjacent + exidx unwinder entries. + + [ Jonathan Nieder ] + * Clean up diversion handling in binutils-multiarch: + - remove diversion of libbfd.a and libopcodes.a. Closes: #545067. + - wait for the new version to be unpacked before removing old diversions + - avoid messages from re-adding diversions when upgrading from a version + that already has them + - remove diversions when downgrading to a version that does not have + them (for example, when recovering from an upgrade failure) + * Add diversion for ld.bfd in binutils-multiarch. + * Update comment in debian/rules to acknowledge that binutils-multiarch + includes a linker now. + * Add c++filt to binutils-multiarch. + * Remove elfedit from binutils-multiarch. + Its functionality does not depend on the list of supported targets. + * Fixup to version changes handling. + + -- Matthias Klose Sun, 18 Apr 2010 14:18:59 +0200 + +binutils (2.20.51.20100407-0ubuntu1) lucid; urgency=low + + * Snapshot, taken from the trunk 20100407. + * debian/*.shlibs: Update to the version from the trunk. + * Configure native build --with-sysroot=/. Closes: #556126. + + -- Matthias Klose Thu, 08 Apr 2010 01:31:49 +0200 + +binutils (2.20.51.20100405-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100405. + * debian/*.shlibs: Update to the version from the trunk. + * Mangle the soname of the binutils libraries to be different than + the default name. Closes: #557620. + Packaged cross builds should do the same. + * Add diversion for elfedit in binutils-multiarch (Jonathan Nieder). + Closes: #576126. + * Convert to quilt (Sedat Dilek). + * Update to proposed patch to enable both gold and ld in a single toolchain. + The gold binary is now installed as `gold'. Keep the name `ld.gold'. + + -- Matthias Klose Mon, 05 Apr 2010 14:49:46 +0200 + +binutils (2.20.51.20100227-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100227. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Sat, 27 Feb 2010 08:55:05 +0100 + +binutils (2.20.51.20100222-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100222. + * debian/*.shlibs: Update to the version from the trunk. + * binutils-dev: Install plugin-api.h. + * Ignore testsuite regressions on armel. + + -- Matthias Klose Tue, 23 Feb 2010 02:27:28 +0100 + +binutils (2.20.51.20100216-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100216. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 16 Feb 2010 17:49:47 +0100 + +binutils (2.20.51.20100112-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100112. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 12 Jan 2010 09:06:51 +0100 + +binutils (2.20.51.20100109-2) experimental; urgency=low + + * Regenerate ld/configure (includes ld in the binutils package). + + -- Matthias Klose Mon, 11 Jan 2010 01:48:09 +0100 + +binutils (2.20.51.20100109-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100109. + - PR gold/10980: Support more options available by current GNU ld. + Closes: #555886. + - Fix PR gold/11072: Discard .gnu_debuglink sections, taken from the trunk. + Closes: #563366. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Sat, 09 Jan 2010 14:32:33 +0100 + +binutils (2.20.51.20100101-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100101. + * debian/*.shlibs: Update to the version from the trunk. + * Remove patches available on the trunk. + + -- Matthias Klose Fri, 01 Jan 2010 18:49:42 +0100 + +binutils (2.20.1-9ubuntu1) maverick; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Thu, 06 May 2010 16:56:40 +0200 + +binutils (2.20.1-9) unstable; urgency=high + + * [arm] branches to weak symbols, update patch from the trunk. + + -- Matthias Klose Thu, 06 May 2010 15:42:22 +0200 + +binutils (2.20.1-8ubuntu2) maverick; urgency=low + + * Build gold for powerpc as well. + + -- Matthias Klose Sat, 01 May 2010 14:22:35 +0200 + +binutils (2.20.1-8ubuntu1) maverick; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Thu, 29 Apr 2010 21:40:16 +0200 + +binutils (2.20.1-8) unstable; urgency=low + + * [arm] branches to weak symbols, patch taken from the trunk. + + -- Matthias Klose Thu, 29 Apr 2010 20:36:07 +0200 + +binutils (2.20.1-7) unstable; urgency=low + + * Apply proposed patch for ARM: Add option to disable merging of adjacent + exidx unwinder entries. Addresses PR libgcj/40860. + + -- Matthias Klose Tue, 20 Apr 2010 22:51:35 +0000 + +binutils (2.20.1-6) unstable; urgency=low + + * Move the ld.gold binary into the binutils package, just keep the + diversion (ld) in the binutils-gold package. + * Linker selection: ld is used by default, to use the gold linker, + pass -fuse-linker-plugin (no other side effects if -flto/-fwhopr + is not passed). To force ld.bfd or ld.gold, pass -B/usr/lib/compat-ld + for ld.bfd or /usr/lib/gold-ld for ld.gold. + * Disable building gold on arm. Use gold from the trunk, if needed. + * Backport fixups of Loongson2F from the trunk. + + -- Matthias Klose Sat, 17 Apr 2010 18:27:45 +0200 + +binutils (2.20.1-5) unstable; urgency=medium + + * Apply patch for PR gas/11456: Use memcpy to copy overlap memory. + + -- Matthias Klose Fri, 02 Apr 2010 01:36:07 +0200 + +binutils (2.20.1-4) unstable; urgency=low + + * Mangle the soname of the binutils libraries to be different than + the default name. Closes: #557620. + Packaged cross builds should do the same. + * Reduce ARM linking time (backport from the trunk). + * Apply fix for PR ld/11426, taken from the trunk. + + -- Matthias Klose Tue, 30 Mar 2010 22:32:12 +0200 + +binutils (2.20.1-3ubuntu5) lucid; urgency=low + + * Rebuild statically linked ld.static binary against recent libc. + + -- Matthias Klose Sun, 18 Apr 2010 23:50:53 +0200 + +binutils (2.20.1-3ubuntu4) lucid; urgency=low + + * Apply patch for PR gas/11456: Use memcpy to copy overlap memory. + + -- Matthias Klose Wed, 31 Mar 2010 19:10:39 +0200 + +binutils (2.20.1-3ubuntu3) lucid; urgency=low + + * Fix versioned dependency in binutils shlibs file. + + -- Matthias Klose Wed, 31 Mar 2010 04:02:51 +0200 + +binutils (2.20.1-3ubuntu2) lucid; urgency=low + + * Mangle the soname of the binutils libraries to be different than + the default name. Closes: #557620. LP: #548451. + Packaged cross builds should do the same. + * Apply fix for PR ld/11426, taken from the trunk. + + -- Matthias Klose Tue, 30 Mar 2010 23:46:50 +0200 + +binutils (2.20.1-3ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Sun, 21 Mar 2010 13:42:52 +0100 + +binutils (2.20.1-3) unstable; urgency=low + + * binutils-gold: Install the gold binary as `gold' as well, as proposed + by a patch to enable both gold and ld in a single toolchain. + + -- Matthias Klose Sun, 21 Mar 2010 06:43:48 +0100 + +binutils (2.20.1-2ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Mon, 08 Mar 2010 18:25:25 +0100 + +binutils (2.20.1-2) unstable; urgency=low + + * Fix version in debian/*shlibs to match the release version; + the 2.20.1 upstream release identifies as 2.20.1.20100303. + + -- Matthias Klose Mon, 08 Mar 2010 18:01:22 +0100 + +binutils (2.20.1-1ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Mon, 08 Mar 2010 13:11:53 +0100 + +binutils (2.20.1-1) unstable; urgency=low + + * New upstream release. + * Don't set has_ifunc_symbols if the symbol comes from a shared library + (backport from the trunk). + * Don't include documentation files in the -cross packages. + Closes: #571522. LP: #514509. + * Fix typo in ld documentation. LP: #497923. + * Add readelf --unwind support for ARM. + + -- Matthias Klose Mon, 08 Mar 2010 04:47:46 +0100 + +binutils (2.20-6ubuntu3) lucid; urgency=low + + * Apply updates from the 2.20 branch up to 20100216 + - Apply patch to fix R_ARM_THM_JUMP24 relocation truncated bug. + * Don't set has_ifunc_symbols if the symbol comes from a shared library + (backport from the trunk). + + -- Matthias Klose Fri, 19 Feb 2010 17:19:09 +0100 + +binutils (2.20-6ubuntu2) lucid; urgency=low + + * Apply updates from the 2.20 branch up to 20100216 + - Fix broken global Thumb to ARM branches. + + -- Matthias Klose Tue, 16 Feb 2010 18:32:35 +0100 + +binutils (2.20-6ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Fri, 05 Feb 2010 20:30:59 +0100 + +binutils (2.20-6) unstable; urgency=low + + * Apply updates from the 2.20 branch up to 20100205 + - 135_arm_dis_thumb2.dpatch: Remove, applied upstream. + - 136_gold_gnu_debuglink.dpatch: Remove, applied upstream. + * armel: Fix ld-shared/shared.exp and ld-elfvsb/elfvsb.exp failures + (proposed patch, Matthew Gretton-Dann). Closes: #564685. LP: #446478. + * Fix PR other/42602: demangling a global constructors symbol. + Closes: #561150. + + -- Matthias Klose Fri, 05 Feb 2010 20:01:20 +0100 + +binutils (2.20-5ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Sat, 09 Jan 2010 12:13:43 +0100 + +binutils (2.20-5) unstable; urgency=low + + * Apply updates from the 2.20 branch up to 20100109 + * Apply patches from the trunk: + - [arm] Prevent disassembler from aborting on an invalid Thumb2 instruction. + - Fix PR gold/11072: Discard .gnu_debuglink sections. Closes: #563366. + - Fix PR ld/11138: internal error when DSO is before object files. + Closes: #562822. + - Fix PR gold/11042: COPY relocs need for the dynamic object. + Closes: #559183. + - Fix PR gold/10916: Fix --exclude-libs with undefined symbol. + Closes: #555012. + - Fix PR gold/10979: gold linker crashes. Closes: #553916. + - Fix PR gas/10740: Intel syntax far jumps broken. Closes: #541535. + + -- Matthias Klose Sat, 09 Jan 2010 10:43:04 +0100 + +binutils (2.20-4ubuntu4) lucid; urgency=low + + * ARM - Fix b / bl ranges for Thumb2 (Ramana Radhakrishnan). + + -- Matthias Klose Mon, 21 Dec 2009 13:38:09 +0100 + +binutils (2.20-4ubuntu3) lucid; urgency=low + + * [arm] Prevent disassembler from aborting on an invalid Thumb2 instruction, + taken from the trunk. + + -- Matthias Klose Thu, 19 Nov 2009 18:48:28 +0100 + +binutils (2.20-4ubuntu1) lucid; urgency=low + + * On armel build with -marm; the testsuite is not ready to be run with + -mthumb. + + -- Matthias Klose Thu, 12 Nov 2009 01:10:33 +0100 + +binutils (2.20-4) unstable; urgency=low + + * Fix binutils-gold update. Closes: #555734. + * Don't configure gold for spu on powerpc. + + -- Matthias Klose Wed, 11 Nov 2009 23:33:20 +0100 + +binutils (2.20-3ubuntu1) lucid; urgency=low + + * Merge with Debian; remaining changes: + - Build binutils-static. + + -- Matthias Klose Tue, 10 Nov 2009 11:14:38 +0100 + +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-1ubuntu3) lucid; urgency=low + + * Work around build failure on powerpc, disable the gold build; re-enable + it later with a proper fix. + * Ignore regressions on sparc; the proper fix is to fix the testcases + for v9. + + -- Matthias Klose Sat, 31 Oct 2009 12:21:59 +0100 + +binutils (2.20-1ubuntu2) lucid; urgency=low + + * Don't build just on armel and i386. + + -- Matthias Klose Fri, 30 Oct 2009 14:51:13 +0100 + +binutils (2.20-1ubuntu1) lucid; urgency=low + + * 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; the proper fix is to build the + testcases using -fno-section-anchors. + + -- Matthias Klose Fri, 30 Oct 2009 01:27:43 +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.20-0ubuntu2) karmic-proposed; urgency=low + + * Fix PR gas/10856, wrong code with assembler files in intel syntax. + Patch taken from the 2.20 branch. LP: #461303. + + -- Matthias Klose Wed, 28 Oct 2009 09:46:50 +0100 + +binutils (2.20-0ubuntu1) karmic; urgency=low + + * binutils 2.20 final release. + - Fix PR binutils/10785, memory corruptions. + - gold updates. LP: #453278. + * debian/*.shlibs: Update to the release version. LP: #452526. + * Fix build failure on arm, building from the release tarball. + + -- Matthias Klose Sat, 17 Oct 2009 11:14:00 +0200 + +binutils (2.19.91.20091014-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091014. + - PR ld/10749, ia64 linker failure. + - PR gas/2117, ia64 assembler fix. + * debian/*.shlibs: Update to the version from the branch. + * Fix build failures for cross build. + + -- Matthias Klose Wed, 14 Oct 2009 14:55:40 +0200 + +binutils (2.19.91.20091006-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091006. + - cfi_sections changes applied, remove 129_cfi_sections.dpatch. + * 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. + + -- Matthias Klose Tue, 06 Oct 2009 18:14:37 +0200 + +binutils (2.19.91.20091005-0ubuntu2) karmic; urgency=low + + * Really re-enable the binutils-gold build on powerpc. + + -- Matthias Klose Tue, 06 Oct 2009 13:53:22 +0200 + +binutils (2.19.91.20091005-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091005. + - no changes, bump the soname only. + * debian/*.shlibs: Update to the version from the branch. + * Re-enable the binutils-gold build on powerpc. + * Add 129_cfi_sections.dpatch, support for .cfi_sections, taken + from the trunk. LP: #440172. + * Add 150_gold_copyrelocs.dpatch, add -z copyrelocs option for gold. + + -- Matthias Klose Tue, 06 Oct 2009 10:31:58 +0200 + +binutils (2.19.91.20091003-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091003. + - powerpc fixes. + * debian/*.shlibs: Update to the version from the branch. + * Reenable binutils-gold build on armel (build failures on just + one buildd). + * Disable binutils-gold build on powerpc, fails to build with the + version in the archive. + * binutils-source: Depend on texinfo, zlib1g-dev. + + -- Matthias Klose Tue, 06 Oct 2009 10:16:47 +0200 + +binutils (2.19.91.20091001-0ubuntu2) karmic; urgency=low + + * Don't build binutils-gold for armel, currently ftbfs. + + -- Matthias Klose Thu, 01 Oct 2009 23:54:41 +0200 + +binutils (2.19.91.20091001-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091001. + - 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 Thu, 01 Oct 2009 16:53:04 +0200 + +binutils (2.19.91.20090923-0ubuntu1) karmic; urgency=low + + * 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:44:40 +0200 + +binutils (2.19.91.20090922-0ubuntu1) karmic; 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 22:01:19 +0200 + +binutils (2.19.91.20090910-0ubuntu1) karmic; 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. + * Update binutils-sec64k patch (H.J. Lu). + + -- Matthias Klose Thu, 10 Sep 2009 17:21:56 +0200 + +binutils (2.19.90.20090909-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090909. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Wed, 09 Sep 2009 10:01:29 +0200 + +binutils (2.19.51.20090827-1ubuntu1) karmic; urgency=low + + * Merge with Debian unstable; remaining changes: + - Build binutils-static and binutils-static-udeb packages. + - Apply patches derived from the binutils HJL release. + + -- Matthias Klose Fri, 28 Aug 2009 13:49:57 +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. + * Update build-dependency on autoconf. + * Fix some lintian warnings. + + -- Matthias Klose Thu, 27 Aug 2009 17:09:28 +0200 + +binutils (2.19.51.20090805-1ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090805. + * debian/*.shlibs: Update to the version from the trunk. + - 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:29:44 +0200 + +binutils (2.19.51.20090723-1ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090723. + * debian/*.shlibs: Update to the version from the trunk. + * Apply build-id patch to avoid memory corruption (taken from Fedora). + + -- Matthias Klose Thu, 23 Jul 2009 13:47:19 +0200 + +binutils (2.19.51.20090714-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090714. + - Fix PR gas/10387 (branch instruction with no operand causes gas + to segfault on armel). LP: #396049. + - 128_arm_eabi_align64.dpatch: Remove, integrated upstream. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 14 Jul 2009 12:48:09 -0400 + +binutils (2.19.51.20090713-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090713. + * debian/*.shlibs: Update to the version from the trunk. + * 128_arm_eabi_align64.dpatch: Adjust expected output to changed objdump + output. LP: #398732. + + -- Matthias Klose Mon, 13 Jul 2009 13:21:56 -0400 + +binutils (2.19.51.20090704-1ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090704. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Sat, 04 Jul 2009 11:46:03 +0200 + +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.20090622-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090622. + - debian/patches/128_arm_eabi_auto_it.dpatch: Remove, applied upstream. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 23 Jun 2009 01:36:34 +0200 + +binutils (2.19.51.20090620-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090620. + * debian/*.shlibs: Update to the version from the trunk. + * Build the binutils-gold package on armel. + * Update hjl patches from the binutils-2.19.51.0.10 release. + + -- Matthias Klose Sat, 20 Jun 2009 22:56:32 +0200 + +binutils (2.19.51.20090616reallz0515-0ubuntu1) karmic; urgency=low + + * Reupload snapshot from trunk 20090515. + * Apply proposed patch to augment maximum alignment size to 64 (ARM gas). + * Apply proposed patch for new option for automatically generating IT blocks. + + -- Matthias Klose Wed, 17 Jun 2009 23:02:25 +0000 + +binutils (2.19.51.20090515-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090515. + - Fix PR ld/10152. LP: #375991. + * Revert work-around from last upload. + * debian/*.shlibs: Update to the version from the trunk. + * Build the binutils-gold package again. + + -- Matthias Klose Fri, 15 May 2009 16:34:56 +0200 + +binutils (2.19.51.20090508-0ubuntu2) karmic; urgency=low + + * Revert change for ARM unwind table linker processing. Addresses #375991. + + -- Matthias Klose Wed, 13 May 2009 17:46:20 +0200 + +binutils (2.19.51.20090508-0ubuntu1) karmic; urgency=low + + * Snapshot, taken from the trunk 20090508. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 08 May 2009 11:22:40 +0200 + +binutils (2.19.51.20090423-0ubuntu2) karmic; urgency=low + + * Snapshot, taken from the trunk 20090423. + * debian/*.shlibs: Update to the version from the trunk. + * Fix build failure when building with -Os. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Update. + + -- Matthias Klose Fri, 24 Apr 2009 12:29:23 +0200 + +binutils (2.19.1-0ubuntu3) jaunty; urgency=low + + * Re-add -a to dpkg-architecture call; the addition of -f is all what's + needed to ignore the dpkg-architecture env set by dpkg-buildpackage (since + we don't care about the DEB_BUILD_* or DEB_HOST_* arches but only about + the TARGET arch). + + -- Loic Minier Tue, 10 Feb 2009 16:42:28 +0100 + +binutils (2.19.1-0ubuntu2) jaunty; urgency=low + + * binutils-source: Make .dpatch files executable. + * Use dpkg-architecture -f instead of -a for cross builds. + * Call pkg_create_dbgsym explicitly to build debug symbols packages. + LP: #322243. + + -- Matthias Klose Tue, 10 Feb 2009 12:05:51 +0100 + +binutils (2.19.1-0ubuntu1) jaunty; urgency=low + + * Binutils 2.19.1 release. + - 128_arm_relocs_against_weak.dpatch 129_scale-DW_CFA_advance_loc.dpatch: + Remove, applied upstream. + * debian/*.shlibs: Update to the release version. + + -- Matthias Klose Wed, 04 Feb 2009 10:14:33 +0100 + +binutils (2.19.0.20090110-0ubuntu1) jaunty; 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:47:35 +0100 + +binutils (2.19-0ubuntu3) jaunty; 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 Sat, 29 Nov 2008 11:25:22 +0100 + +binutils (2.19-0ubuntu2) jaunty; urgency=low + + * No-change rebuild to remove translations from the binary package, + accidentally included due to a misbuild. + + -- Steve Langasek Fri, 21 Nov 2008 04:35:45 +0000 + +binutils (2.19-0ubuntu1) jaunty; urgency=low + + * Binutils 2.19 release. + * debian/*.shlibs: Update to the release version. + * debian/control: Update to GPL3, reference the GFDL. + * Make lintian more happy. + + -- Matthias Klose Thu, 30 Oct 2008 15:37:05 +0100 + +binutils (2.18.93.20081009-0ubuntu1) intrepid; 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. + * In gprof(1), remove references to monitor(3) and profil(2). + + -- Matthias Klose Wed, 08 Oct 2008 15:27:50 +0200 + +binutils (2.18.92.20081003-0ubuntu2) intrepid; urgency=low + + * Add build dependency on zlib1g-dev. + + -- Matthias Klose Tue, 07 Oct 2008 12:52:33 +0200 + +binutils (2.18.92.20081003-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the 2.19 branch 20081003 (corresponding to the + 2.18.92 upstream snapshot. + * Stop building binutils-gold for the intrepid release (still + experimental). + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Fri, 03 Oct 2008 11:16:43 +0000 + +binutils (2.18.91.20080923-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the 2.19 branch 20080923 (corresponding to the + 2.18.91 upstream snapshot. + * debian/*.shlibs: Update to the version from the branch. + * debian/patches/201-hjl-bfd-ref_addr.dpatch: Remove, integrated upstream. + * Fail the build if the testsuite shows regressions compared to the + last (installed) build. + + -- Matthias Klose Tue, 23 Sep 2008 13:22:34 +0200 + +binutils (2.18.90.20080910-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the 2.19 branch 20080910. + - No testsuite regressions on amd64, i386, lpia, sparc. + * debian/*.shlibs: Update to the version from the branch. + * debian/patches/201-hjl-bfd-ref_addr.dpatch: Update. + + -- Matthias Klose Sat, 13 Sep 2008 19:40:31 +0200 + +binutils (2.18.50.20080814-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the trunk 20080814. + * debian/*.shlibs: Update to the version from the trunk. + * debian/patches/201-hjl-bfd-ref_addr.dpatch: Update. + * debian/patches/209-hjl-binutils-error.dpatch: Likewise. + + -- Matthias Klose Thu, 14 Aug 2008 16:37:01 +0000 + +binutils (2.18.50.20080806-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the trunk 20080806. + - Fix PR ld/6656, disable gas generated debug info if compiler generated + debug info is seen. LP: #240884. Closes: #481592. + * debian/*.shlibs: Update to the version from the trunk. + * Build binutils-gold for powerpc. + + -- Matthias Klose Wed, 06 Aug 2008 08:39:52 +0200 + +binutils (2.18.50.20080707-0ubuntu1) intrepid; 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). + + -- Matthias Klose Mon, 07 Jul 2008 10:21:30 +0000 + +binutils (2.18.50.20080610-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the trunk 20080610. + * debian/*.shlibs: Update to the version from the trunk. LP: #237461. + + -- Matthias Klose Tue, 10 Jun 2008 17:18:50 +0200 + +binutils (2.18.50.20080530-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the trunk 20080530. + - gold recognizes -z relro and -z norelro. + * debian/rules: Explicitely set SHELL to /bin/bash, build-depend on bash. + * debian/rules: Fix setting of TARGET for cross builds. + * binutils-static: Remove dependency on libc6. LP: #184582. + + -- Matthias Klose Fri, 30 May 2008 23:55:07 +0200 + +binutils (2.18.50.20080509-0ubuntu1) intrepid; urgency=low + + * Snapshot, taken from the trunk 20080509. + * Add -Wno-format-security to CFLAGS, CXXFLAGS, due to picky default + hardening options. + * Let gold ignore -z relro and -z norelro for now. + * Build gold with -Wno-error. + + -- Matthias Klose Fri, 09 May 2008 11:09:24 +0200 + +binutils (2.18.50.20080507-0ubuntu1) intrepid; 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, + 311_pr5006.dpatch, 312_pr5011.dpatch, 313_pr5025.dpatch. + * Update patches from the hjl releases: 200-hjl-ld-env (not applied), + 206-hjl-binutils-shr.dpatch (not applied), + * Remove patches from the hjl release: 204-hjl-binutils-tls-relro.dpatch, + 208-hjl-libtool-relink.dpatch, 209-hjl-binutils-error.dpatch, + 210-hjl-binutils-signed.dpatch, + * New patches from the hjl release: 212-hjl-bfd-64k.dpatch. + * debian/*.shlibs: Update to the version from the trunk. + * On amd64, i386, lpia and sparc, build a binutils-gold package, + diverting /usr/bin/ld. + + -- Matthias Klose Wed, 07 May 2008 17:41:05 +0200 + +binutils (2.18.1~cvs20080103-4ubuntu1) hardy; urgency=low + + * Merge with Debian unstable; remaining changes: + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Tue, 22 Apr 2008 12:02:51 +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 fiiles 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-0ubuntu1) hardy; 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). + * debian/*.shlibs: Update to version from the branch. + * debian/patches/305_arm-dis.dpatch: Fix segfault when disassembling ARM + code. Closes: #438956. + + -- Matthias Klose Thu, 03 Jan 2008 21:26:56 +0000 + +binutils (2.18.1~cvs20071027-1ubuntu2) hardy; urgency=low + + * Do not include static libraries in the multiarch package. + * Install a libiberty compiled with -fPIC as libiberty_pic.a. + LP: #50512. + * Don't include /usr/lib64 for cross packages. Closes: #450429. + + -- Matthias Klose Fri, 23 Nov 2007 12:14:31 +0000 + +binutils (2.18.1~cvs20071027-1ubuntu1) hardy; 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. + * Drop the build dependency on expect-tcl8.3, don't run the + testsuite on hppa. + + -- Matthias Klose Sat, 27 Oct 2007 17:33:13 +0000 + +binutils (2.18-1ubuntu1) hardy; urgency=low + + * Rebuild using gcc-4.2. + + -- Matthias Klose Sun, 21 Oct 2007 08:31:26 +0000 + +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-0ubuntu3) gutsy; urgency=low + + * Apply patches for: + - PR binutils/5011, readelf reads past end of buffer. + - PR ld/5025, downgrade error to a warning if .note.gnu.build-id + has been discarded. + + -- Matthias Klose Wed, 19 Sep 2007 00:31:23 +0200 + +binutils (2.18-0ubuntu2) gutsy; urgency=low + + * Apply fix for PR ld/5008, taken from the trunk. + + -- Matthias Klose Sun, 09 Sep 2007 22:08:19 +0200 + +binutils (2.18-0ubuntu1) gutsy; urgency=low + + * Final 2.18 release. + * debian/*.shlibs: Update to release version. + + -- Matthias Klose Wed, 29 Aug 2007 13:22:09 +0200 + +binutils (2.18~cvs20070827-0ubuntu1) gutsy; urgency=low + + * New upstream CVS snapshot, taken from the binutils-2_18-branch. + - Remove patches applied upstream: 311_sse4_intel_mode, 400_gcc42_fix, + 401_builddoc. + * debian/*.shlibs: Update to snapshot version. + + -- Matthias Klose Mon, 27 Aug 2007 19:30:21 +0200 + +binutils (2.18~cvs20070812-0ubuntu1) gutsy; urgency=low + + * 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. + * debian/patches/311_sse4_intel_mode.dpatch: Fix SSE4 for Intel mode. + * Update patches: 200-hjl-ld-env (not applied), 203-hjl-binutils-indirect, + 204-hjl-binutils-tls-relro, 209-hjl-binutils-error, + * Remove patches: 201-hjl-bfd-dwarf-dup.dpatch, 201-hjl-bfd-dwarf-dup, + 205-hjl-bfd-kept, 208-hjl-libtool-relink. + * New patches: 210-hjl-binutils-signed, 211-hjl-binutils-weakdef. + + -- Matthias Klose Sun, 12 Aug 2007 12:42:57 +0200 + +binutils (2.17.20070804cvs-0ubuntu1) gutsy; urgency=low + + * 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. + * Build using the default compiler on all architectures. + + -- Matthias Klose Sat, 04 Aug 2007 11:29:10 +0000 + +binutils (2.17.20070801cvs-0ubuntu2) gutsy; urgency=low + + * Build-depend on gcc-4.1 on lpia, since we're calling it explicitly. + + -- Adam Conrad Fri, 3 Aug 2007 13:24:26 +1000 + +binutils (2.17.20070801cvs-0ubuntu1) gutsy; urgency=low + + * CVS snapshot 20070801, taken from the trunk. + - Fixes objcopy --only-keep-debug on amd64. + + -- Matthias Klose Wed, 01 Aug 2007 18:46:10 +0200 + +binutils (2.17.20070718cvs-0ubuntu2) gutsy; urgency=low + + * debian/patches/305_ungetc.dpatch: Allow UNGETC to work with empty buffer, + taken from CVS HEAD. + + -- Matthias Klose Fri, 20 Jul 2007 12:47:44 +0200 + +binutils (2.17.20070718cvs-0ubuntu1) gutsy; urgency=low + + * CVS snapshot 20070718, taken from the trunk. + * Fix cross build failure while stripping binaries. Closes: #432907. + + -- Matthias Klose Wed, 18 Jul 2007 15:19:15 +0000 + +binutils (2.17.20070713cvs-0ubuntu2) gutsy; urgency=low + + * Fix build failure with gcc-4.2. + + -- Matthias Klose Tue, 17 Jul 2007 11:09:25 +0000 + +binutils (2.17.20070713cvs-0ubuntu1) gutsy; urgency=low + + * CVS snapshot 20070713, taken from the trunk. + - Remove patches applied upstream: 301_pr4436.dpatch, 302_pr4448.dpatch, + 303_pr4454.dpatch, 305_pr4497.dpatch, 306_ld_demangler_segfault.dpatch, + 307_pr4558.dpatch. + * Update hjl patches: + - Remove 207-hjl-libtool-archive.dpatch. + - Add 201-hjl-bfd-dwarf-dup.dpatch, 209-hjl-binutils-error.dpatch. + - Update 200-hjl-ld-env.dpatch, 201-hjl-bfd-ref_addr.dpatch, + 204-hjl-binutils-tls-relro.dpatch, hjl-binutils-shr.dpatch. + * debian/copyright: Include GPL-3. + * debian/rules: Fix version extraction. + * debian/rules: Honor `noopt' in DEB_BUILD_OPTIONS. Closes LP: #65607. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Use bash in the ld + testsuite. Closes LP: #124435. + + -- Matthias Klose Fri, 13 Jul 2007 15:43:07 +0200 + +binutils (2.17.20070426cvs-7ubuntu2) gutsy; urgency=low + + * Fix PR gas/4558. + + -- Matthias Klose Mon, 28 May 2007 08:48:33 +0000 + +binutils (2.17.20070426cvs-7ubuntu1) gutsy; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 25 May 2007 08:24:08 +0200 + +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.17.20070426cvs-2ubuntu7) gutsy; urgency=low + + * Fix PR ld/4497, regression introduced with the fix for PR ld/4454. + + -- Matthias Klose Mon, 14 May 2007 08:13:50 +0000 + +binutils (2.17.20070426cvs-2ubuntu6) gutsy; urgency=low + + * Fix binutils/4476, readelf support for --hash-style=gnu. + + -- Matthias Klose Thu, 10 May 2007 07:32:28 +0000 + +binutils (2.17.20070426cvs-2ubuntu5) gutsy; urgency=low + + * Fix PR ld/4454. + + -- Matthias Klose Sun, 06 May 2007 13:02:11 +0000 + +binutils (2.17.20070426cvs-2ubuntu4) gutsy; urgency=low + + * Fix PR gas/4448, overstrict check for powerpc lswi. + + -- Matthias Klose Wed, 2 May 2007 13:42:10 +0200 + +binutils (2.17.20070426cvs-2ubuntu3) gutsy; urgency=low + + * Update debian/*.shlibs files. + * Fix PR gas/4436, wrong reject in powerpc opcode table checks. + + -- Matthias Klose Mon, 30 Apr 2007 08:02:30 +0200 + +binutils (2.17.20070426cvs-2ubuntu2) gutsy; urgency=low + + * Add binutils-udeb as a dist file with priority optional. + + -- Matthias Klose Fri, 27 Apr 2007 17:27:23 +0200 + +binutils (2.17.20070426cvs-2ubuntu1) gutsy; urgency=low + + * Merge with Debian. + + -- Matthias Klose Fri, 27 Apr 2007 10:16:54 +0200 + +binutils (2.17cvs20070426-2) unstable; urgency=low + + * Fix typo preparing the binutils-hppa64 package. Closes: #421199. + * Compare testsuite results of the installed binutils with the built one. + + -- 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.20070420cvs-0ubuntu1) gutsy; urgency=low + + * CVS snapshot 20070420, taken from the trunk. + - debian/patches/007_binutils_soversion.dpatch: Remove, applied upstream. + + -- Matthias Klose Fri, 20 Apr 2007 13:46:05 +0200 + +binutils (2.17.20070406cvs-0ubuntu1) toolchain-test; urgency=low + + * CVS snapshot 20070406, taken from the trunk. + * Do not apply: 200-hjl-ld-env. + * Enable spu target in powerpc, ppc64 builds and in the + binutils-multiarch build. + * Don't include embedspu in binutils-multiarch on powerpc, ppc64. + Closes: #411486. + + -- Matthias Klose Fri, 6 Apr 2007 06:57:41 +0200 + +binutils (2.17.20070329cvs-0ubuntu1) toolchain-test; urgency=low + + * CVS snapshot 20070329, taken from the trunk. + * Patches from the hjl 2.17.50.0.13 release: + - 202-hjl-binutils-check-phdr: Remove, applied upstream. + - 205-hjl-bfd-kept.dpatch: Address the link speed issue by caching + the result of _bfd_elf_check_kept_section. + - 206-hjl-binutils-shr.dpatch: Implementation of ELF sharable section + proposal (not applied by default). + - 208-hjl-libtool-relink.dpatch: Avoid unnecessary linker messages + when running "make check". + + -- Matthias Klose Thu, 29 Mar 2007 07:16:28 +0200 + +binutils (2.17.20070321cvs-0ubuntu2) toolchain-test; urgency=low + + * Configure --with-pkgversion, not including the package version, + which may break ld version detection in configure scripts. + * debian/patches/000_cvs_version_string.dpatch: Remove. + * debian/patches/007_binutils_soversion.dpatch: Use date for non-release + builds in soversion. + + -- Matthias Klose Thu, 22 Mar 2007 07:01:14 +0100 + +binutils (2.17.20070321cvs-0ubuntu1) toolchain-test; urgency=low + + * CVS snapshot 20070321, taken from the trunk. + * debian/patches/000_print_{debian,ubuntu}_version.dpatch: Remove. + * debian/control: Build-depend on lsb-release. + * Configure --with-pkgversion to include the distribution name. + * Apply patches from the hjl 2.17.50.0.13 release: + - 200-hjl-ld-env.dpatch: Handle LD_SYMBOLIC and LD_SYMBOLIC_FUNCTIONS + env vars. + - 201-hjl-bfd-ref_addr.dpatch: Support DW_FORM_ref_addr in Dwarf 2 reader + in linker. + - 202-hjl-binutils-check-phdr.dpatch: Fix PR ld/4007: Linker failed + to issue an error on bad section in segment. + - 203-hjl-binutils-indirect.dpatch: PR ld/3351; avoid linker crash on ia64. + - 204-hjl-binutils-tls-relro.dpatch: PR binutils/3281; objcopy changes + PT_GNU_RELRO when there is PT_TLS. + - 207-hjl-libtool-archive.dpatch: Allow linking against an archive when + building a shared library. + * Set Ubuntu maintainer address. + + -- Matthias Klose Wed, 21 Mar 2007 09:17:21 +0100 + +binutils (2.17.20070210cvs-1ubuntu1) toolchain-test; urgency=low + + * Merge with Debian experimental; remaining changes: + - Build binutils-static and binutils-static-udeb packages. + + -- Matthias Klose Mon, 12 Feb 2007 16:03:23 +0100 + +binutils (2.17.20070210cvs-1) experimental; urgency=low + + * CVS snapshot 20070210, taken from the trunk. + * debian/rules: Don't try to strip shell scripts. + + -- Matthias Klose Sat, 10 Feb 2007 15:59:45 +0100 + +binutils (2.17.20070103cvs-2) experimental; urgency=low + + * Overwrite the VERSION string (date) from the snapshot with + a parsable version string (2.17.50), as found on the trunk. + + -- Matthias Klose Fri, 5 Jan 2007 10:06:09 +0100 + +binutils (2.17.20070103cvs-1) experimental; urgency=low + + * binutils snapshot 20070103, taken from + ftp://sourceware.org/pub/binutils/snapshots/ + * Build a binutils-source package (containing the patched sources). + * Check for a working expect before building the package. + * Configure binutils-multiarch for i486-gnu as well. + * 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. + + -- Matthias Klose Thu, 4 Jan 2007 22:13:54 +0100 + +binutils (2.17.20070103cvs-0ubuntu1) feisty; urgency=low + + * binutils snapshot 20070103, taken from + ftp://sourceware.org/pub/binutils/snapshots/ + * Merge with Debian experimental; remaining changes: + - Build binutils-static and binutils-static-udeb packages. + - Build a binutils-source package (containing the patched + sources). + - Check for a working expect before building the package. + - Configure binutils-multiarch for i486-gnu as well. + * 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. + * Strip binaries in binutils-static and in the binutils udeb. + + -- Matthias Klose Thu, 4 Jan 2007 15:17:45 +0100 + +binutils (2.17.20061210cvs-1) experimental; urgency=low + + * CVS snapshot 20061210, taken from the trunk. + * debian/patches/121_i386_x86_64_biarch.dpatch: Remove, applied upstream. + + -- Matthias Klose Sun, 10 Dec 2006 20:43:41 +0100 + +binutils (2.17.20070103cvs-0ubuntu2) feisty; urgency=low + + * Overwrite the VERSION string (date) from the snapshot with + a parsable version string (2.17.50), as found on the trunk. + + -- Matthias Klose Fri, 5 Jan 2007 09:02:06 +0000 + +binutils (2.17.50.0.6-0ubuntu1) feisty; urgency=low + + [Fabio M. Di Nitto] + + * we are supposed to upload to feisty, aren't we? ;) + + [Jeff Bailey] + + * New upstream snapshot from HJ Lu. + * debian/patches/121_i386_x86_64_biarch: Drop, merged upstream. + + -- Fabio M. Di Nitto Tue, 31 Oct 2006 15:43:58 +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-1ubuntu1) edgy; urgency=low + + * New upstream release. + - ld checks for libs in the same order as ld.so does. Ubuntu #40214. + * Synchronise with Debian unstable. + * Remove patch 122_sparc64_UA2005_instruction_set.dpatch, integrated + upstream. + * Remove patch 130_tekhex_buffer_overflow.dpatch, integrated upstream. + * 122_x86_64_i386_biarch.dpatch: New, search libraries in (/usr)/lib32 on + amd64. Closes: #369052. + * Build a binutils-source package; obsoletes toolchain-source package. + + -- Matthias Klose Wed, 28 Jun 2006 10:29:16 +0200 + +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-1ubuntu2.1) dapper-security; urgency=low + + * SECURITY UPDATE: Crash and possible arbitrary code execution in apps using + libbfd (such as 'strings'). + * Add debian/patches/130_tekhex_buffer_overflow.dpatch: + - Fix buffer overflow on hexadecimal number parsing in the Tektronix Hex + Format BFD library backend. + - Patch ported from CVS HEAD. + * CVE-2006-2362 + + -- Martin Pitt Tue, 6 Jun 2006 11:35:55 +0200 + +binutils (2.16.1cvs20060117-1ubuntu2) dapper; urgency=low + + * [SPARC64] Add support for new UA2005 instruction set: + - Add patch 122_sparc64_UA2005_instruction_set.dpatch. + (Thanks David S. Miller for providing the patch) + + NOTE: the patch is sparc specific and does NOT touch any other code. + It is a plain rebuild on all other arches. + + -- Fabio M. Di Nitto Sat, 25 Feb 2006 07:11:28 +0100 + +binutils (2.16.1cvs20060117-1ubuntu1) dapper; urgency=low + + * Synchronise with Debian untstable. + + -- Matthias Klose Thu, 19 Jan 2006 09:21:47 +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-1ubuntu1) dapper; urgency=low + + * Synchronise with Debian unstable. + + -- Matthias Klose Thu, 15 Dec 2005 00:11:16 +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-1ubuntu1) dapper; urgency=low + + * Synchronise with Debian unstable. + + -- Matthias Klose Fri, 18 Nov 2005 14:09:29 +0100 + +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-1ubuntu1) dapper; urgency=low + + * Synchronise with Debian unstable. + * Reenable the testsuite on hppa and sparc. + * debian/control: + - Set standards version to 3.6.2 (no changes). + - Add alternative build dependency on expect-tcl8.3. + + -- Matthias Klose Mon, 14 Nov 2005 10:52:27 +0100 + +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-2ubuntu7) dapper; urgency=low + + * debian/rules: Stop calling pkgstriptranslations, we now get it + for free with the new and improved dpkg-deb diversion hack. + + -- Adam Conrad Wed, 26 Oct 2005 10:39:15 +1000 + +binutils (2.16.1-2ubuntu6) breezy; urgency=low + + * debian/control: Create a new binutils-static-udeb udeb for d-i. + * debian/rules: Copy stuff from -static to -static-udeb for above. + * debian/rules: compress changelog in /usr/share/doc/binutils-static + + -- Adam Conrad Tue, 4 Oct 2005 16:51:06 +1000 + +binutils (2.16.1-2ubuntu5) breezy; urgency=low + + [ Jeff Bailey ] + * debian/control: binutils-static no longer depends on binutils. + * debian/rules: Install the copyright and changelog into + /usr/share/doc/binutils-static. + + [ Adam Conrad ] + * debian/binutils-static.preinst: Make sure that we lose our doc + symlink before we upgrade, or some Very Bad Things could happen. + * debian/rules: Make the above get installed to the right location. + + -- Adam Conrad Tue, 4 Oct 2005 15:45:12 +1000 + +binutils (2.16.1-2ubuntu4) breezy; urgency=low + + The " jbailey: how soon should I expect an upload?" release. + + * debian/patches/122_sparc_hppa_got.dpatch: New patch to allow + --as-needed on sparc, and to avoid issues with duplicate + GLOBAL_OFFSET_TABLES on hppa. + + * debian/patches/00list.sparc: New file, add this patch there. + + * debian/patches/00list.hppa: New file, add this patch there. + + -- Jeff Bailey Wed, 31 Aug 2005 16:46:13 -0400 + +binutils (2.16.1-2ubuntu3) breezy; urgency=low + + * debian/patches/121_i386_x86_64_biarch: New patch to allow + ld to work in an i386/x86_64 biarch configuration. + + -- Jeff Bailey Fri, 5 Aug 2005 16:24:23 +0000 + +binutils (2.16.1-2ubuntu2) breezy; urgency=low + + * debian/rules: Call it /bin/ld_static, not /bin/ld to avoid + confusion. + + -- Jeff Bailey Tue, 26 Jul 2005 01:34:43 +0000 + +binutils (2.16.1-2ubuntu1) breezy; urgency=low + + * debian/rules: Add binutils-static pass. This provides /bin/ld + for use in linking objects that might be needed at boot time + for mounting /usr or /. + Also remove stamps when cleaning. + + -- Jeff Bailey Tue, 26 Jul 2005 00:12:07 +0000 + +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.25.1.orig/debian/control +++ binutils-2.25.1/debian/control @@ -0,0 +1,215 @@ +Source: binutils +Section: devel +Priority: optional +Maintainer: Ubuntu Core developers +XSBC-Original-Maintainer: Matthias Klose +Uploaders: James Troup , Daniel Jacobowitz +Standards-Version: 3.9.6 +Build-Depends: autoconf (>= 2.64), dpkg-dev (>= 1.17.11), + bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, + python3:any, file, xz-utils, lsb-release, zlib1g-dev +XS-Testsuite: autopkgtest + +Package: binutils +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, + binutils-gold (<< 2.20.51.20100415) +Breaks: binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), + binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) +Replaces: binutils-gold (<< 2.20.51.20100415), + binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), + binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) +Provides: elf-binutils, ${gold:Provides} +Suggests: binutils-doc (>= ${source:Version}) +Description: 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: 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}) +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-multiarch-dev +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, + binutils-dev (= ${binary:Version}), binutils-multiarch (= ${binary:Version}) +Replaces: binutils-multiarch (<< 2.24-5) +Description: GNU binary utilities that support multi-arch targets (BFD development files) + This package includes header files, static and shared libraries necessary + to build programs which use the GNU BFD library for multi-arch targets, + which is part of binutils. Note that building Debian packages which depend + on the shared libbfd is Not Allowed. + . + 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-static +Architecture: any +Description: statically linked binutils tools + This package contains statically linked binutils tools used + for linking kernel modules needed to mount /usr or /. At the moment, + it only contains ld. + +Package: binutils-static-udeb +Section: debian-installer +Architecture: any +Description: statically linked binutils tools for for the Debian installer + This package contains statically linked binutils tools used + for linking kernel modules needed to mount /usr or /. At the moment, + it only contains ld. + +Package: binutils-hppa64-linux-gnu +Architecture: amd64 i386 x32 hppa +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Provides: binutils-hppa64 +Suggests: binutils-doc (>= ${source:Version}) +Breaks: binutils-hppa64 (<< 2.25.1-2) +Replaces: binutils-hppa64 (<< 2.25.1-2) +Description: 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-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, make, python +Description: GNU assembler, linker and binary utilities (source) + This package contains the sources and patches which are needed to + build binutils. + +Package: binutils-s390x-linux-gnu +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for s390x-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for s390x-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for s390x-linux-gnu. + +Package: binutils-powerpc64le-linux-gnu +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for powerpc64le-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for powerpc64le-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for powerpc64le-linux-gnu. + +Package: binutils-powerpc-linux-gnu +Architecture: amd64 i386 x32 ppc64el +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for powerpc-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for powerpc-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for powerpc-linux-gnu. + +Package: binutils-aarch64-linux-gnu +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for aarch64-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for aarch64-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for aarch64-linux-gnu. + +Package: binutils-arm-linux-gnueabihf +Architecture: amd64 i386 x32 arm64 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for arm-linux-gnueabihf target + This package provides GNU assembler, linker and binary utilities + for arm-linux-gnueabihf target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for arm-linux-gnueabihf. + +Package: binutils-arm-linux-gnueabi +Architecture: amd64 i386 x32 arm64 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for arm-linux-gnueabi target + This package provides GNU assembler, linker and binary utilities + for arm-linux-gnueabi target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for arm-linux-gnueabi. + +Package: binutils-mips-linux-gnu +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for mips-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for mips-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for mips-linux-gnu. + +Package: binutils-mipsel-linux-gnu +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: GNU binary utilities, for mipsel-linux-gnu target + This package provides GNU assembler, linker and binary utilities + for mipsel-linux-gnu target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for mipsel-linux-gnu. --- binutils-2.25.1.orig/debian/control.cross.in +++ binutils-2.25.1/debian/control.cross.in @@ -0,0 +1,13 @@ + +Package: binutils-@target@ +Architecture: @host_archs@ +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Built-Using: ${Built-Using} +Description: 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.25.1.orig/debian/control.in +++ binutils-2.25.1/debian/control.in @@ -0,0 +1,119 @@ +Source: binutils +Section: devel +Priority: optional +Maintainer: Ubuntu Core developers +XSBC-Original-Maintainer: Matthias Klose +Uploaders: James Troup , Daniel Jacobowitz +Standards-Version: 3.9.6 +Build-Depends: autoconf (>= 2.64), @dpkg_dev@ + bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, + python3:any, file, xz-utils, lsb-release, zlib1g-dev +XS-Testsuite: autopkgtest + +Package: binutils +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, + binutils-gold (<< 2.20.51.20100415) +Breaks: binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), + binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) +Replaces: binutils-gold (<< 2.20.51.20100415), + binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), + binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) +Provides: elf-binutils, ${gold:Provides} +Suggests: binutils-doc (>= ${source:Version}) +Description: 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: 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}) +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-multiarch-dev +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, + binutils-dev (= ${binary:Version}), binutils-multiarch (= ${binary:Version}) +Replaces: binutils-multiarch (<< 2.24-5) +Description: GNU binary utilities that support multi-arch targets (BFD development files) + This package includes header files, static and shared libraries necessary + to build programs which use the GNU BFD library for multi-arch targets, + which is part of binutils. Note that building Debian packages which depend + on the shared libbfd is Not Allowed. + . + 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-static +Architecture: any +Description: statically linked binutils tools + This package contains statically linked binutils tools used + for linking kernel modules needed to mount /usr or /. At the moment, + it only contains ld. + +Package: binutils-static-udeb +Section: debian-installer +Architecture: any +Description: statically linked binutils tools for for the Debian installer + This package contains statically linked binutils tools used + for linking kernel modules needed to mount /usr or /. At the moment, + it only contains ld. + +Package: binutils-hppa64-linux-gnu +Architecture: amd64 i386 x32 hppa +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Provides: binutils-hppa64 +Suggests: binutils-doc (>= ${source:Version}) +Breaks: binutils-hppa64 (<< 2.25.1-2) +Replaces: binutils-hppa64 (<< 2.25.1-2) +Description: 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-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, make, python +Description: GNU assembler, linker and binary utilities (source) + This package contains the sources and patches which are needed to + build binutils. --- binutils-2.25.1.orig/debian/copyright +++ binutils-2.25.1/debian/copyright @@ -0,0 +1,44 @@ +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.3 or any later version published +by the Free Software Foundation, with no Invariant Sections, with no +with no Front-Cover Texts, and with no Back-Cover Texts. +On Debian GNU/Linux systems, the complete text of the GFDL can be found +in `/usr/share/common-licenses/GFDL'. --- binutils-2.25.1.orig/debian/dwp.1 +++ binutils-2.25.1/debian/dwp.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5. +.TH DWP "1" "April 2015" "dwp (GNU Binutils for Ubuntu) 2.25" "User Commands" +.SH NAME +dwp \- The DWARF packaging utility +.SH SYNOPSIS +.B dwp +[\fI\,options\/\fR] [\fI\,file\/\fR...] +.SH DESCRIPTION +.TP +\fB\-h\fR, \fB\-\-help\fR +Print this help message +.TP +\fB\-e\fR EXE, \fB\-\-exec\fR EXE +Get list of dwo files from EXE (defaults output to EXE.dwp) +.TP +\fB\-o\fR FILE, \fB\-\-output\fR FILE +Set output dwp file name +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Verbose output +.TP +\fB\-\-verify\-only\fR +Verify output file against exec file +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version number +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright \(co 2014 Free Software Foundation, Inc. +This program is free software; you may redistribute it under the terms of +the GNU General Public License version 3 or (at your option) any later version. +This program has absolutely no warranty. --- binutils-2.25.1.orig/debian/gfdl.texi +++ binutils-2.25.1/debian/gfdl.texi @@ -0,0 +1,41 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header + +@settitle BFD/ld internal documentation + +@c Create a separate index for command line options. +@defcodeindex op +@c Merge the standard indexes into a single one. +@syncodeindex fn cp +@syncodeindex vr cp +@syncodeindex ky cp +@syncodeindex pg cp +@syncodeindex tp cp + +@paragraphindent 1 + +@c %**end of header + +@copying +The current documentation is licensed under the same terms as the Debian packaging. +@end copying +@ifnottex +@dircategory Programming +@direntry +* @name@: (@name@). BFD/ld internal documentation (@name@). +@end direntry +@sp 1 +@end ifnottex + +@summarycontents +@contents +@page + +@node Top +@top Introduction +@cindex introduction +The official BFD, BFD internals and ld internals documentation is released +under the terms of the GNU Free Documentation License with cover texts. +This has been considered non free by the Debian Project. Thus you will find +it in the non-free section of the Debian archive. +@bye --- binutils-2.25.1.orig/debian/ld.gold.1 +++ binutils-2.25.1/debian/ld.gold.1 @@ -0,0 +1,747 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5. +.TH GOLD "1" "April 2015" "gold (GNU Binutils for Ubuntu 2.25) 1.11" "User Commands" +.SH NAME +gold \- The GNU ELF linker +.SH SYNOPSIS +.B ld.gold +[\fI\,options\/\fR] \fI\,file\/\fR... +.SH OPTIONS +.TP +\fB\-\-help\fR +Report usage information +.TP +\fB\-v\fR, \fB\-\-version\fR +Report version information +.TP +\fB\-V\fR +Report version and target information +.TP +\fB\-\-add\-needed\fR +Not supported +.TP +\fB\-\-no\-add\-needed\fR +Do not copy DT_NEEDED tags from shared libraries +.HP +\fB\-\-allow\-multiple\-definition\fR Allow multiple definitions of symbols +.TP +\fB\-\-no\-allow\-multiple\-definition\fR +Do not allow multiple definitions +.TP +\fB\-\-allow\-shlib\-undefined\fR +Allow unresolved references in shared libraries +.TP +\fB\-\-no\-allow\-shlib\-undefined\fR +Do not allow unresolved references in shared libraries +.TP +\fB\-\-as\-needed\fR +Only set DT_NEEDED for shared libraries if used +.TP +\fB\-\-no\-as\-needed\fR +Always DT_NEEDED for shared libraries +.TP +\fB\-assert\fR [ignored] +Ignored +.TP +\fB\-b\fR [elf,binary], \fB\-\-format\fR [elf,binary] +Set input format +.HP +\fB\-Bdynamic\fR \fB\-l\fR searches for shared libraries +.HP +\fB\-Bstatic\fR \fB\-l\fR does not search for shared libraries +.TP +\fB\-dy\fR +alias for \fB\-Bdynamic\fR +.TP +\fB\-dn\fR +alias for \fB\-Bstatic\fR +.TP +\fB\-Bgroup\fR +Use group name lookup rules for shared library +.TP +\fB\-Bsymbolic\fR +Bind defined symbols locally +.TP +\fB\-Bsymbolic\-functions\fR +Bind defined function symbols locally +.TP +\fB\-\-build\-id\fR [=STYLE] +Generate build ID note +.TP +\fB\-\-build\-id\-chunk\-size\-for\-treehash\fR SIZE +Chunk size for '\-\-build\-id=tree' +.TP +\fB\-\-build\-id\-min\-file\-size\-for\-treehash\fR SIZE +Minimum output file size for '\-\-build\-id=tree' to work differently than '\-\-build\-id=sha1' +.TP +\fB\-\-check\-sections\fR +Check segment addresses for overlaps (default) +.TP +\fB\-\-no\-check\-sections\fR +Do not check segment addresses for overlaps +.TP +\fB\-\-compress\-debug\-sections\fR [none,zlib] +Compress .debug_* sections in the output file +.TP +\fB\-\-copy\-dt\-needed\-entries\fR +Not supported +.HP +\fB\-\-no\-copy\-dt\-needed\-entries\fR Do not copy DT_NEEDED tags from shared libraries +.TP +\fB\-\-cref\fR +Output cross reference table +.TP +\fB\-\-no\-cref\fR +Do not output cross reference table +.TP +\fB\-\-ctors\-in\-init\-array\fR +Use DT_INIT_ARRAY for all constructors (default) +.TP +\fB\-\-no\-ctors\-in\-init\-array\fR +Handle constructors as directed by compiler +.TP +\fB\-d\fR, \fB\-\-define\-common\fR +Define common symbols +.TP +\fB\-\-no\-define\-common\fR +Do not define common symbols +.TP +\fB\-dc\fR +Alias for \fB\-d\fR +.TP +\fB\-dp\fR +Alias for \fB\-d\fR +.TP +\fB\-\-debug\fR [all,files,script,task][,...] +Turn on debugging +.TP +\fB\-\-defsym\fR SYMBOL=EXPRESSION +Define a symbol +.TP +\fB\-\-demangle\fR [=STYLE] +Demangle C++ symbols in log messages +.TP +\fB\-\-no\-demangle\fR +Do not demangle C++ symbols in log messages +.TP +\fB\-\-detect\-odr\-violations\fR +Look for violations of the C++ One Definition Rule +.TP +\fB\-\-no\-detect\-odr\-violations\fR +Do not look for violations of the C++ One Definition Rule +.TP +\fB\-x\fR, \fB\-\-discard\-all\fR +Delete all local symbols +.TP +\fB\-X\fR, \fB\-\-discard\-locals\fR +Delete all temporary local symbols +.TP +\fB\-\-dynamic\-list\-data\fR +Add data symbols to dynamic symbols +.TP +\fB\-\-dynamic\-list\-cpp\-new\fR +Add C++ operator new/delete to dynamic symbols +.HP +\fB\-\-dynamic\-list\-cpp\-typeinfo\fR Add C++ typeinfo to dynamic symbols +.TP +\fB\-\-dynamic\-list\fR FILE +Read a list of dynamic symbols +.HP +\fB\-e\fR ADDRESS, \fB\-\-entry\fR ADDRESS Set program start address +.TP +\fB\-\-exclude\-libs\fR lib,lib ... +Exclude libraries from automatic export +.TP +\fB\-E\fR, \fB\-\-export\-dynamic\fR +Export all dynamic symbols +.TP +\fB\-\-no\-export\-dynamic\fR +Do not export all dynamic symbols (default) +.TP +\fB\-\-export\-dynamic\-symbol\fR SYMBOL +Export SYMBOL to dynamic symbol table +.TP +\fB\-EB\fR +Link big\-endian objects. +.TP +\fB\-EL\fR +Link little\-endian objects. +.TP +\fB\-\-eh\-frame\-hdr\fR +Create exception frame header +.TP +\fB\-\-no\-enum\-size\-warning\fR +(ARM only) Do not warn about objects with incompatible enum sizes +.HP +\fB\-f\fR SHLIB, \fB\-\-auxiliary\fR SHLIB Auxiliary filter for shared object symbol table +.TP +\fB\-F\fR SHLIB, \fB\-\-filter\fR SHLIB +Filter for shared object symbol table +.TP +\fB\-\-fatal\-warnings\fR +Treat warnings as errors +.TP +\fB\-\-no\-fatal\-warnings\fR +Do not treat warnings as errors +.TP +\fB\-fini\fR SYMBOL +Call SYMBOL at unload\-time +.TP +\fB\-\-fix\-cortex\-a8\fR +(ARM only) Fix binaries for Cortex\-A8 erratum. +.TP +\fB\-\-no\-fix\-cortex\-a8\fR +(ARM only) Do not fix binaries for Cortex\-A8 erratum. +.TP +\fB\-\-fix\-arm1176\fR +(ARM only) Fix binaries for ARM1176 erratum. +.TP +\fB\-\-no\-fix\-arm1176\fR +(ARM only) Do not fix binaries for ARM1176 erratum. +.TP +\fB\-\-merge\-exidx\-entries\fR +(ARM only) Merge exidx entries in debuginfo. +.TP +\fB\-\-no\-merge\-exidx\-entries\fR +(ARM only) Do not merge exidx entries in debuginfo. +.TP +\fB\-\-fix\-v4bx\fR +(ARM only) Rewrite BX rn as MOV pc, rn for ARMv4 +.TP +\fB\-\-fix\-v4bx\-interworking\fR +(ARM only) Rewrite BX rn branch to ARMv4 interworking veneer +.TP +\fB\-g\fR +Ignored +.TP +\fB\-\-gdb\-index\fR +Generate .gdb_index section +.TP +\fB\-\-no\-gdb\-index\fR +Do not generate .gdb_index section +.TP +\fB\-\-gnu\-unique\fR +Enable STB_GNU_UNIQUE symbol binding (default) +.TP +\fB\-\-no\-gnu\-unique\fR +Disable STB_GNU_UNIQUE symbol binding +.TP +\fB\-h\fR FILENAME, \fB\-soname\fR FILENAME +Set shared library name +.TP +\fB\-\-hash\-bucket\-empty\-fraction\fR FRACTION +Min fraction of empty buckets in dynamic hash +.TP +\fB\-\-hash\-style\fR [sysv,gnu,both] +Dynamic hash style +.TP +\fB\-I\fR PROGRAM, \fB\-\-dynamic\-linker\fR PROGRAM +Set dynamic linker path +.TP +\fB\-\-incremental\fR +Do an incremental link if possible; otherwise, do a full link and prepare output for incremental linking +.TP +\fB\-\-no\-incremental\fR +Do a full link (default) +.TP +\fB\-\-incremental\-full\fR +Do a full link and prepare output for incremental linking +.TP +\fB\-\-incremental\-update\fR +Do an incremental link; exit if not possible +.TP +\fB\-\-incremental\-base\fR FILE +Set base file for incremental linking (default is output file) +.TP +\fB\-\-incremental\-changed\fR +Assume files changed +.TP +\fB\-\-incremental\-unchanged\fR +Assume files didn't change +.TP +\fB\-\-incremental\-unknown\fR +Use timestamps to check files (default) +.TP +\fB\-\-incremental\-startup\-unchanged\fR +Assume startup files unchanged (files preceding this option) +.HP +\fB\-\-incremental\-patch\fR PERCENT Amount of extra space to allocate for patches +.TP +\fB\-init\fR SYMBOL +Call SYMBOL at load\-time +.TP +\fB\-\-just\-symbols\fR FILE +Read only symbol values from FILE +.TP +\fB\-\-map\-whole\-files\fR +Map whole files to memory (default on 64\-bit hosts) +.TP +\fB\-\-no\-map\-whole\-files\fR +Map relevant file parts to memory (default on 32\-bit hosts) +.TP +\fB\-\-keep\-files\-mapped\fR +Keep files mapped across passes (default) +.TP +\fB\-\-no\-keep\-files\-mapped\fR +Release mapped files after each pass +.TP +\fB\-\-ld\-generated\-unwind\-info\fR +Generate unwind information for PLT (default) +.TP +\fB\-\-no\-ld\-generated\-unwind\-info\fR +Do not generate unwind information for PLT +.TP +\fB\-l\fR LIBNAME, \fB\-\-library\fR LIBNAME +Search for library LIBNAME +.TP +\fB\-L\fR DIR, \fB\-\-library\-path\fR DIR +Add directory to search path +.TP +\fB\-\-text\-reorder\fR +Enable text section reordering for GCC section names (default) +.TP +\fB\-\-no\-text\-reorder\fR +Disable text section reordering for GCC section names +.TP +\fB\-nostdlib\fR +Only search directories specified on the command line. +.TP +\fB\-\-rosegment\fR +Put read\-only non\-executable sections in their own segment +.TP +\fB\-\-rosegment\-gap\fR OFFSET +Set offset between executable and read\-only segments +.TP +\fB\-m\fR EMULATION +Set GNU linker emulation; obsolete +.TP +\fB\-\-mmap\-output\-file\fR +Map the output file for writing (default). +.TP +\fB\-\-no\-mmap\-output\-file\fR +Do not map the output file for writing. +.TP +\fB\-M\fR, \fB\-\-print\-map\fR +Write map file on standard output +.TP +\fB\-Map\fR MAPFILENAME +Write map file +.TP +\fB\-n\fR, \fB\-\-nmagic\fR +Do not page align data +.TP +\fB\-N\fR, \fB\-\-omagic\fR +Do not page align data, do not make text readonly +.TP +\fB\-\-no\-omagic\fR +Page align data, make text readonly +.TP +\fB\-\-enable\-new\-dtags\fR +Enable use of DT_RUNPATH and DT_FLAGS +.TP +\fB\-\-disable\-new\-dtags\fR +Disable use of DT_RUNPATH and DT_FLAGS +.TP +\fB\-\-noinhibit\-exec\fR +Create an output file even if errors occur +.TP +\fB\-\-no\-undefined\fR +Report undefined symbols (even with \fB\-\-shared\fR) +.TP +\fB\-o\fR FILE, \fB\-\-output\fR FILE +Set output file name +.TP +\fB\-O\fR LEVEL, \fB\-optimize\fR LEVEL +Optimize output file size +.TP +\fB\-\-oformat\fR [binary] +Set output format +.TP +\fB\-p\fR +(ARM only) Ignore for backward compatibility +.TP +\fB\-pie\fR +Create a position independent executable +.TP +\fB\-no\-pie\fR +Do not create a position independent executable +.TP +\fB\-\-pic\-executable\fR +Create a position independent executable +.TP +\fB\-\-no\-pic\-executable\fR +Do not create a position independent executable +.TP +\fB\-no\-pipeline\-knowledge\fR +(ARM only) Ignore for backward compatibility +.TP +\fB\-\-plt\-align\fR [=P2ALIGN] +(PowerPC64 only) Align PLT call stubs to fit cache lines +.TP +\fB\-\-plt\-static\-chain\fR +(PowerPC64 only) PLT call stubs should load r11 +.TP +\fB\-\-no\-plt\-static\-chain\fR +(PowerPC64 only) PLT call stubs should not load r11 +.TP +\fB\-\-plt\-thread\-safe\fR +(PowerPC64 only) PLT call stubs with load\-load barrier +.TP +\fB\-\-no\-plt\-thread\-safe\fR +(PowerPC64 only) PLT call stubs without barrier +.TP +\fB\-\-plugin\fR PLUGIN +Load a plugin library +.TP +\fB\-\-plugin\-opt\fR OPTION +Pass an option to the plugin +.TP +\fB\-\-posix\-fallocate\fR +Use posix_fallocate to reserve space in the output file (default). +.TP +\fB\-\-no\-posix\-fallocate\fR +Use fallocate or ftruncate to reserve space. +.TP +\fB\-\-preread\-archive\-symbols\fR +Preread archive symbols when multi\-threaded +.TP +\fB\-\-print\-output\-format\fR +Print default output format +.TP +\fB\-\-print\-symbol\-counts\fR FILENAME +Print symbols defined and used for each input +.TP +\fB\-Qy\fR +Ignored for SVR4 compatibility +.TP +\fB\-q\fR, \fB\-\-emit\-relocs\fR +Generate relocations in output +.TP +\fB\-r\fR, \fB\-relocatable\fR +Generate relocatable output +.TP +\fB\-i\fR +Synonym for \fB\-r\fR +.TP +\fB\-\-relax\fR +Relax branches on certain targets +.TP +\fB\-\-retain\-symbols\-file\fR FILE +keep only symbols listed in this file +.TP +\fB\-R\fR DIR +Add DIR to runtime search path +.TP +\fB\-rpath\fR DIR +Add DIR to runtime search path +.TP +\fB\-\-rpath\-link\fR DIR +Add DIR to link time shared library search path +.TP +\fB\-\-section\-ordering\-file\fR FILENAME +Layout sections in the order specified. +.TP +\fB\-\-section\-start\fR SECTION=ADDRESS +Set address of section +.TP +\fB\-\-sort\-common\fR [={ascending,descending}] +Sort common symbols by alignment +.TP +\fB\-\-sort\-section\fR [none,name] +Sort sections by name. '\-\-no\-text\-reorder' will override '\-\-sort\-section=name' for .text +.TP +\fB\-\-spare\-dynamic\-tags\fR COUNT +Dynamic tag slots to reserve (default 5) +.TP +\fB\-s\fR, \fB\-\-strip\-all\fR +Strip all symbols +.TP +\fB\-S\fR, \fB\-\-strip\-debug\fR +Strip debugging information +.TP +\fB\-\-strip\-debug\-non\-line\fR +Emit only debug line number information +.TP +\fB\-\-strip\-debug\-gdb\fR +Strip debug symbols that are unused by gdb (at least versions <= 7.4) +.TP +\fB\-\-strip\-lto\-sections\fR +Strip LTO intermediate code sections +.TP +\fB\-\-stub\-group\-size\fR SIZE +(ARM, PowerPC only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after (PowerPC before) the group. 1 means use default size. +.TP +\fB\-\-no\-keep\-memory\fR +Use less memory and more disk I/O (included only for compatibility with GNU ld) +.TP +\fB\-G\fR, \fB\-shared\fR +Generate shared library +.TP +\fB\-Bshareable\fR +Generate shared library +.TP +\fB\-\-split\-stack\-adjust\-size\fR SIZE +Stack size when \fB\-fsplit\-stack\fR function calls non\-split +.TP +\fB\-static\fR +Do not link against shared libraries +.TP +\fB\-\-icf\fR [none,all,safe] +Identical Code Folding. '\-\-icf=safe' Folds ctors, dtors and functions whose pointers are definitely not taken. +.TP +\fB\-\-icf\-iterations\fR COUNT +Number of iterations of ICF (default 2) +.TP +\fB\-\-print\-icf\-sections\fR +List folded identical sections on stderr +.TP +\fB\-\-no\-print\-icf\-sections\fR +Do not list folded identical sections +.TP +\fB\-\-keep\-unique\fR SYMBOL +Do not fold this symbol during ICF +.TP +\fB\-\-gc\-sections\fR +Remove unused sections +.TP +\fB\-\-no\-gc\-sections\fR +Don't remove unused sections (default) +.TP +\fB\-\-print\-gc\-sections\fR +List removed unused sections on stderr +.TP +\fB\-\-no\-print\-gc\-sections\fR +Do not list removed unused sections +.TP +\fB\-\-stats\fR +Print resource usage statistics +.TP +\fB\-\-sysroot\fR DIR +Set target system root directory +.TP +\fB\-t\fR, \fB\-\-trace\fR +Print the name of each input file +.TP +\fB\-T\fR FILE, \fB\-\-script\fR FILE +Read linker script +.TP +\fB\-\-threads\fR +Run the linker multi\-threaded +.TP +\fB\-\-no\-threads\fR +Do not run the linker multi\-threaded +.TP +\fB\-\-thread\-count\fR COUNT +Number of threads to use +.TP +\fB\-\-thread\-count\-initial\fR COUNT +Number of threads to use in initial pass +.HP +\fB\-\-thread\-count\-middle\fR COUNT Number of threads to use in middle pass +.TP +\fB\-\-thread\-count\-final\fR COUNT +Number of threads to use in final pass +.TP +\fB\-Tbss\fR ADDRESS +Set the address of the bss segment +.TP +\fB\-Tdata\fR ADDRESS +Set the address of the data segment +.TP +\fB\-Ttext\fR ADDRESS +Set the address of the text segment +.TP +\fB\-Ttext\-segment\fR ADDRESS +Set the address of the text segment +.TP +\fB\-Trodata\-segment\fR ADDRESS +Set the address of the rodata segment +.TP +\fB\-\-toc\-optimize\fR +(PowerPC64 only) Optimize TOC code sequences +.TP +\fB\-\-no\-toc\-optimize\fR +(PowerPC64 only) Don't optimize TOC code sequences +.TP +\fB\-\-toc\-sort\fR +(PowerPC64 only) Sort TOC and GOT sections +.TP +\fB\-\-no\-toc\-sort\fR +(PowerPC64 only) Don't sort TOC and GOT sections +.TP +\fB\-u\fR SYMBOL, \fB\-\-undefined\fR SYMBOL +Create undefined reference to SYMBOL +.TP +\fB\-\-unresolved\-symbols\fR ignore\-all,report\-all,ignore\-in\-object\-files,ignore\-in\-shared\-libs +How to handle unresolved symbols +.TP +\fB\-\-verbose\fR +Synonym for \fB\-\-debug\fR=\fI\,files\/\fR +.TP +\fB\-\-version\-script\fR FILE +Read version script +.TP +\fB\-\-warn\-common\fR +Warn about duplicate common symbols +.TP +\fB\-\-no\-warn\-common\fR +Do not warn about duplicate common symbols (default) +.TP +\fB\-\-warn\-constructors\fR +Ignored +.TP +\fB\-\-no\-warn\-constructors\fR +Ignored +.TP +\fB\-\-warn\-execstack\fR +Warn if the stack is executable +.TP +\fB\-\-no\-warn\-execstack\fR +Do not warn if the stack is executable (default) +.TP +\fB\-\-no\-warn\-mismatch\fR +Don't warn about mismatched input files +.TP +\fB\-\-warn\-multiple\-gp\fR +Ignored +.TP +\fB\-\-warn\-search\-mismatch\fR +Warn when skipping an incompatible library +.TP +\fB\-\-no\-warn\-search\-mismatch\fR +Don't warn when skipping an incompatible library +.TP +\fB\-\-warn\-shared\-textrel\fR +Warn if text segment is not shareable +.TP +\fB\-\-no\-warn\-shared\-textrel\fR +Do not warn if text segment is not shareable (default) +.TP +\fB\-\-warn\-unresolved\-symbols\fR +Report unresolved symbols as warnings +.TP +\fB\-\-error\-unresolved\-symbols\fR +Report unresolved symbols as errors +.TP +\fB\-\-no\-wchar\-size\-warning\fR +(ARM only) Do not warn about objects with incompatible wchar_t sizes +.TP +\fB\-\-whole\-archive\fR +Include all archive contents +.TP +\fB\-\-no\-whole\-archive\fR +Include only needed archive contents +.TP +\fB\-\-wrap\fR SYMBOL +Use wrapper functions for SYMBOL +.TP +\fB\-y\fR SYMBOL, \fB\-\-trace\-symbol\fR SYMBOL +Trace references to symbol +.TP +\fB\-\-undefined\-version\fR +Allow unused version in script (default) +.TP +\fB\-\-no\-undefined\-version\fR +Do not allow unused version in script +.TP +\fB\-Y\fR PATH +Default search path for Solaris compatibility +.TP +\-(, \fB\-\-start\-group\fR +Start a library search group +.TP +\-), \fB\-\-end\-group\fR +End a library search group +.TP +\fB\-\-start\-lib\fR +Start a library +.TP +\fB\-\-end\-lib\fR +End a library +.TP +\fB\-fuse\-ld\fR +Ignored for GCC linker option compatibility +.TP +\fB\-z\fR combreloc +Sort dynamic relocs +.TP +\fB\-z\fR nocombreloc +Do not sort dynamic relocs +.TP +\fB\-z\fR common\-page\-size=SIZE +Set common page size to SIZE +.TP +\fB\-z\fR defs +Report undefined symbols (even with \fB\-\-shared\fR) +.TP +\fB\-z\fR execstack +Mark output as requiring executable stack +.TP +\fB\-z\fR initfirst +Mark DSO to be initialized first at runtime +.TP +\fB\-z\fR interpose +Mark object to interpose all DSOs but executable +.TP +\fB\-z\fR lazy +Mark object for lazy runtime binding (default) +.TP +\fB\-z\fR loadfltr +Mark object requiring immediate process +.TP +\fB\-z\fR max\-page\-size=SIZE +Set maximum page size to SIZE +.TP +\fB\-z\fR muldefs +Allow multiple definitions of symbols +.TP +\fB\-z\fR nocopyreloc +Do not create copy relocs +.TP +\fB\-z\fR nodefaultlib +Mark object not to use default search paths +.TP +\fB\-z\fR nodelete +Mark DSO non\-deletable at runtime +.TP +\fB\-z\fR nodlopen +Mark DSO not available to dlopen +.TP +\fB\-z\fR nodump +Mark DSO not available to dldump +.TP +\fB\-z\fR noexecstack +Mark output as not requiring executable stack +.TP +\fB\-z\fR now +Mark object for immediate function binding +.TP +\fB\-z\fR origin +Mark DSO to indicate that needs immediate $ORIGIN processing at runtime +.TP +\fB\-z\fR relro +Where possible mark variables read\-only after relocation +.TP +\fB\-z\fR norelro +Don't mark variables read\-only after relocation +.TP +\fB\-z\fR text +Do not permit relocations in read\-only segments +.TP +\fB\-z\fR notext +Permit relocations in read\-only segments (default) +.TP +\fB\-z\fR textoff +Permit relocations in read\-only segments (default) +.TP +\fB\-z\fR buildd +Dummy z option +.PP +ld.gold: supported targets: elf32\-i386 elf32\-i386\-freebsd elf32\-i386\-nacl elf32\-x86\-64 elf32\-x86\-64\-freebsd elf32\-x86\-64\-nacl elf64\-x86\-64 elf64\-x86\-64\-freebsd elf64\-x86\-64\-nacl +ld.gold: supported emulations: elf_i386 elf_i386_nacl elf32_x86_64 elf32_x86_64_nacl elf_x86_64 elf_x86_64_nacl +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright \(co 2014 Free Software Foundation, Inc. +This program is free software; you may redistribute it under the terms of +the GNU General Public License version 3 or (at your option) a later version. +This program has absolutely no warranty. --- binutils-2.25.1.orig/debian/patches/001_ld_makefile_patch.patch +++ binutils-2.25.1/debian/patches/001_ld_makefile_patch.patch @@ -0,0 +1,31 @@ +Author: +Description: Description: correct where ld scripts are installed +Author: Chris Chimelis +Upstream status: N/A +Date: ?? +Index: b/ld/Makefile.am +=================================================================== +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -54,7 +54,7 @@ endif + # 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@ +Index: b/ld/Makefile.in +=================================================================== +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS) + # 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.25.1.orig/debian/patches/002_gprof_profile_arcs.patch +++ binutils-2.25.1/debian/patches/002_gprof_profile_arcs.patch @@ -0,0 +1,29 @@ +Author: Chris Chimelis +Description: Add more documentation about profiling and -fprofile-arcs. +Index: b/gprof/gprof.texi +=================================================================== +--- a/gprof/gprof.texi ++++ b/gprof/gprof.texi +@@ -145,6 +145,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 +@@ -276,6 +280,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.25.1.orig/debian/patches/003_gprof_see_also_monitor.patch +++ binutils-2.25.1/debian/patches/003_gprof_see_also_monitor.patch @@ -0,0 +1,15 @@ +Author: Chris Chimelis +Description: Don't mention monitor(3) which doesn't exist in Debian. (#160654) +Index: b/gprof/gprof.texi +=================================================================== +--- a/gprof/gprof.texi ++++ b/gprof/gprof.texi +@@ -193,7 +193,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.25.1.orig/debian/patches/006_better_file_error.patch +++ binutils-2.25.1/debian/patches/006_better_file_error.patch @@ -0,0 +1,21 @@ +Author: David Kimdon +Description: Specify which filename is causing an error if the filename is a +directory. (#45832) +Index: b/bfd/opncls.c +=================================================================== +--- a/bfd/opncls.c ++++ b/bfd/opncls.c +@@ -193,6 +193,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.25.1.orig/debian/patches/012_check_ldrunpath_length.patch +++ binutils-2.25.1/debian/patches/012_check_ldrunpath_length.patch @@ -0,0 +1,25 @@ +Author: Chris Chimelis +Description: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +cases where -rpath isn't specified. (#151024) +Index: b/ld/emultempl/elf32.em +=================================================================== +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1195,6 +1195,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) --- binutils-2.25.1.orig/debian/patches/013_bash_in_ld_testsuite.patch +++ binutils-2.25.1/debian/patches/013_bash_in_ld_testsuite.patch @@ -0,0 +1,28 @@ +Author: Matthias Klose +Description: Explicitely use bash for the ld testsuite. +Index: b/ld/testsuite/config/default.exp +=================================================================== +--- a/ld/testsuite/config/default.exp ++++ b/ld/testsuite/config/default.exp +@@ -117,10 +117,10 @@ proc get_link_files {varname} { + #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' < +Upstream status: Debian specific +--- a/ld/emulparams/elf_i386.sh ++++ b/ld/emulparams/elf_i386.sh +@@ -13,3 +13,13 @@ + NO_SMALL_DATA=yes + SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0" + 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.25.1.orig/debian/patches/128_build_id.patch +++ binutils-2.25.1/debian/patches/128_build_id.patch @@ -0,0 +1,42 @@ +Author: +Description: Description: Fix ld corrupt build ID generation +Author: Nick Clifton +Upstream status: Taken from Fedora (BZ 501582) +--- a/bfd/compress.c ++++ b/bfd/compress.c +@@ -174,7 +174,7 @@ + case COMPRESS_SECTION_NONE: + if (p == NULL) + { +- p = (bfd_byte *) bfd_malloc (sz); ++ p = (bfd_byte *) bfd_zmalloc (sz); + if (p == NULL) + return FALSE; + need_free = TRUE; +--- a/bfd/elfcode.h ++++ b/bfd/elfcode.h +@@ -1158,6 +1158,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.25.1.orig/debian/patches/128_ppc64_powerpc_biarch.patch +++ binutils-2.25.1/debian/patches/128_ppc64_powerpc_biarch.patch @@ -0,0 +1,17 @@ +Index: b/ld/emulparams/elf32ppccommon.sh +=================================================================== +--- a/ld/emulparams/elf32ppccommon.sh ++++ b/ld/emulparams/elf32ppccommon.sh +@@ -54,3 +54,12 @@ case "$host":"$EMULATION_NAME" in + *:*64*) LIBPATH_SUFFIX=64 ;; + *:*32*) LIBPATH_SUFFIX=32 ;; + esac ++ ++# On 64bit, look for 32 bit target libraries in /lib32, /usr/lib32 etc., first. ++case "$target" in ++ powerpc64-*-linux* | ppc64-*-linux*) ++ case "$EMULATION_NAME" in ++ *32*) LIBPATH_SUFFIX=32 ;; ++ esac ++ ;; ++esac --- binutils-2.25.1.orig/debian/patches/129_multiarch_libpath.patch +++ binutils-2.25.1/debian/patches/129_multiarch_libpath.patch @@ -0,0 +1,212 @@ +# DP: Add multiarch directories to linker search path for ld and gold. + +Index: b/ld/genscripts.sh +=================================================================== +--- a/ld/genscripts.sh ++++ b/ld/genscripts.sh +@@ -228,7 +228,115 @@ + *) LIB_PATH=${lib_path1}:${lib_path2} ;; + esac + ++# We use the $tool_lib variable in our multiarch mangling: ++if [ "x${TOOL_LIB}" = "x" ] ; then ++ tool_lib=${exec_prefix}/${target_alias}/lib ++else ++ tool_lib=${exec_prefix}/${TOOL_LIB}/lib ++fi ++ ++if [ "x${APPEND_TOOLLIBDIR}" = "xyes" ] ; then ++ LIB_PATH=${LIB_PATH}:${tool_lib} ++ # For multilib targets, search both $tool_lib dirs ++ if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then ++ LIB_PATH=${LIB_PATH}:${tool_lib}${LIBPATH_SUFFIX} ++ fi ++fi ++ + LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` ++if [ -n "$DEB_TARGET_MULTIARCH" ]; then ++ temp_dirs=' ' ++ for dir in `echo ${LIB_PATH} | sed -e 's/:/ /g'`; do ++ case "$dir" in ++ *${tool_lib}*|*/${target_alias}/*) ++ ;; ++ */lib) ++ if [ -n "$DEB_TARGET_MULTIARCH32" ]; then ++ case $EMULATION_NAME in ++ elf_i386|elf32*) ++ temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH32 ";; ++ *) ++ temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH " ++ esac ++ elif [ -n "$DEB_TARGET_MULTIARCH64" ]; then ++ case $EMULATION_NAME in ++ elf*_64|elf64*) ++ temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH64 ";; ++ *) ++ temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH " ++ esac ++ else ++ temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH " ++ fi ++ ;; ++ */lib32) ++ if [ -n "$DEB_TARGET_MULTIARCH32" ]; then ++ dir2=$(echo $dir | sed "s,32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH32 " ++ fi ++ ;; ++ */lib64) ++ case "${target}" in ++ aarch64*-*-*|powerpc64-*-*|s390x-*-*|sparc64-*-*|x86_64-*-linux-gnu|mips64-*-gnuabi64) ++ #dir=$(echo $dir | sed "s,64$,,") ++ dir2=$(echo $dir | sed "s,64$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH " ++ ;; ++ *) ++ if [ -n "$DEB_TARGET_MULTIARCH64" ]; then ++ dir2=$(echo $dir | sed "s,64$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH64 " ++ fi ++ ;; ++ esac ++ ;; ++ */libx32) ++ case "${target}" in ++ x86_64-*-linux-gnux32) ++ dir2=$(echo $dir | sed "s,x32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH " ++ ;; ++ *) ++ if [ -n "$DEB_TARGET_MULTIARCHX32" ]; then ++ dir2=$(echo $dir | sed "s,x32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCHX32 " ++ fi ++ ;; ++ esac ++ ;; ++ */libn32) ++ case "${target}" in ++ mips64*-*-linux-gnuabin32) ++ dir2=$(echo $dir | sed "s,n32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH " ++ ;; ++ *) ++ if [ -n "$DEB_TARGET_MULTIARCHN32" ]; then ++ dir2=$(echo $dir | sed "s,n32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCHN32 " ++ fi ++ ;; ++ esac ++ ;; ++ */libilp32) ++ if [ -n "$DEB_TARGET_MULTIARCH32" ]; then ++ dir2=$(echo $dir | sed "s,ilp32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH32 " ++ fi ++ ;; ++ *) ++ ;; ++ esac ++ temp_dirs="${temp_dirs}${dir} " ++ done ++ LIB_SEARCH_DIRS= ++ for dir in $temp_dirs; do ++ if echo "$LIB_SEARCH_DIRS" | fgrep -q "\"$dir\""; then ++ continue ++ fi ++ LIB_SEARCH_DIRS="${LIB_SEARCH_DIRS}SEARCH_DIR(\"$dir\"); " ++ done ++fi + + # We need it for testsuite. + set $EMULATION_LIBPATH +Index: b/gold/Makefile.am +=================================================================== +--- a/gold/Makefile.am ++++ b/gold/Makefile.am +@@ -32,6 +32,7 @@ + -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \ + -DLOCALEDIR="\"$(datadir)/locale\"" \ + -DBINDIR="\"$(bindir)\"" -DTOOLBINDIR="\"$(tooldir)/bin\"" \ ++ @MULTIARCH_DIRNAME@ $(if $(APPEND_TOOLLIBDIR),-DAPPEND_TOOLLIBDIR) \ + -DTOOLLIBDIR="\"$(tooldir)/lib\"" @INCINTL@ + + LIBIBERTY = ../libiberty/libiberty.a +Index: b/gold/configure +=================================================================== +--- a/gold/configure ++++ b/gold/configure +@@ -594,6 +594,7 @@ + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE ++MULTIARCH_DIRNAME + DLOPEN_LIBS + CXXCPP + HAVE_NO_USE_LINKER_PLUGIN_FALSE +@@ -7648,6 +7649,14 @@ + fi + + ++if test x$DEB_TARGET_MULTIARCH != x; then ++ multiarch=$DEB_TARGET_MULTIARCH ++ if test -n "$multiarch"; then ++ MULTIARCH_DIRNAME='-DMULTIARCH_DIRNAME=\"'$multiarch'\"' ++ fi ++fi ++ ++ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 + $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +Index: b/gold/configure.ac +=================================================================== +--- a/gold/configure.ac ++++ b/gold/configure.ac +@@ -628,6 +628,14 @@ + AC_CHECK_FUNCS(setlocale) + AM_LC_MESSAGES + ++if test x$DEB_TARGET_MULTIARCH != x; then ++ multiarch=$DEB_TARGET_MULTIARCH ++ if test -n "$multiarch"; then ++ MULTIARCH_DIRNAME='-DMULTIARCH_DIRNAME=\"'$multiarch'\"' ++ fi ++fi ++AC_SUBST(MULTIARCH_DIRNAME) ++ + AM_MAINTAINER_MODE + + AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in) +Index: b/gold/options.cc +=================================================================== +--- a/gold/options.cc ++++ b/gold/options.cc +@@ -1142,8 +1142,15 @@ + || this->user_set_sysroot() + || *TARGET_SYSTEM_ROOT != '\0') + { ++#ifdef MULTIARCH_DIRNAME ++ this->add_to_library_path_with_sysroot("/lib/" MULTIARCH_DIRNAME); ++ this->add_to_library_path_with_sysroot("/usr/lib/" MULTIARCH_DIRNAME); ++#endif + this->add_to_library_path_with_sysroot("/lib"); + this->add_to_library_path_with_sysroot("/usr/lib"); ++#ifdef APPEND_TOOLLIBDIR ++ this->add_to_library_path_with_sysroot(TOOLLIBDIR); ++#endif + } + else + this->add_to_library_path_with_sysroot(TOOLLIBDIR); +Index: b/gold/Makefile.in +=================================================================== +--- a/gold/Makefile.in ++++ b/gold/Makefile.in +@@ -415,6 +415,7 @@ + -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \ + -DLOCALEDIR="\"$(datadir)/locale\"" \ + -DBINDIR="\"$(bindir)\"" -DTOOLBINDIR="\"$(tooldir)/bin\"" \ ++ @MULTIARCH_DIRNAME@ $(if $(APPEND_TOOLLIBDIR),-DAPPEND_TOOLLIBDIR) \ + -DTOOLLIBDIR="\"$(tooldir)/lib\"" @INCINTL@ + + LIBIBERTY = ../libiberty/libiberty.a --- binutils-2.25.1.orig/debian/patches/130_gold_disable_testsuite_build.patch +++ binutils-2.25.1/debian/patches/130_gold_disable_testsuite_build.patch @@ -0,0 +1,30 @@ +Author: +Description: Description: Disable build of gold/testsuite +Author: Matthias Klose +Upstream status: local +Index: b/gold/Makefile.am +=================================================================== +--- a/gold/Makefile.am ++++ b/gold/Makefile.am +@@ -19,7 +19,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = po testsuite ++SUBDIRS = po + + tooldir = $(exec_prefix)/$(target_alias) + +Index: b/gold/Makefile.in +=================================================================== +--- a/gold/Makefile.in ++++ b/gold/Makefile.in +@@ -406,7 +406,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.25.1.orig/debian/patches/131_ld_bootstrap_testsuite.patch +++ binutils-2.25.1/debian/patches/131_ld_bootstrap_testsuite.patch @@ -0,0 +1,47 @@ +Author: +Description: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins +Author: Rafael Espindola +Upstream status: proposed patch +Index: b/ld/testsuite/ld-bootstrap/bootstrap.exp +=================================================================== +--- a/ld/testsuite/ld-bootstrap/bootstrap.exp ++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp +@@ -44,6 +44,15 @@ if [check_plugin_api_available] { + set plugins "yes" + } + ++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 +@@ -90,6 +99,11 @@ foreach flags $test_flags { + 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 { +@@ -127,6 +141,10 @@ foreach flags $test_flags { + } + } + ++ 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.25.1.orig/debian/patches/135_bfd_version.patch +++ binutils-2.25.1/debian/patches/135_bfd_version.patch @@ -0,0 +1,49 @@ +Author: +Description: Description: Fix bfd version handling for extra builds + +Index: b/bfd/Makefile.am +=================================================================== +--- a/bfd/Makefile.am ++++ b/bfd/Makefile.am +@@ -1024,15 +1024,15 @@ + + bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in + @echo "creating $@" +- @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ +- bfd_version_string="\"$(VERSION)\"" ;\ ++ @bfd_version=`echo "$(VERSION)" | sed -e 's/-.*$$//' | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ ++ bfd_version_string="\"`echo $(VERSION) | sed -e 's/-.*$$//'`\"" ;\ + bfd_soversion="$(VERSION)" ;\ + bfd_version_package="\"$(PKGVERSION)\"" ;\ + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ + . $(srcdir)/development.sh ;\ + if test "$$development" = true ; then \ + bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ +- bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ ++ bfd_version_string="\"`echo $(VERSION) | sed -e 's/-.*$$//'`.$${bfd_version_date}\"" ;\ + bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ + fi ;\ + sed -e "s,@bfd_version@,$$bfd_version," \ +Index: b/bfd/Makefile.in +=================================================================== +--- a/bfd/Makefile.in ++++ b/bfd/Makefile.in +@@ -2084,15 +2084,15 @@ + + bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in + @echo "creating $@" +- @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ +- bfd_version_string="\"$(VERSION)\"" ;\ ++ @bfd_version=`echo "$(VERSION)" | sed -e 's/-.*$$//' | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ ++ bfd_version_string="\"`echo $(VERSION) | sed -e 's/-.*$$//'`\"" ;\ + bfd_soversion="$(VERSION)" ;\ + bfd_version_package="\"$(PKGVERSION)\"" ;\ + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ + . $(srcdir)/development.sh ;\ + if test "$$development" = true ; then \ + bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ +- bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ ++ bfd_version_string="\"`echo $(VERSION) | sed -e 's/-.*$$//'`.$${bfd_version_date}\"" ;\ + bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ + fi ;\ + sed -e "s,@bfd_version@,$$bfd_version," \ --- binutils-2.25.1.orig/debian/patches/157_ar_scripts_with_tilde.patch +++ binutils-2.25.1/debian/patches/157_ar_scripts_with_tilde.patch @@ -0,0 +1,13 @@ +Index: b/binutils/arlex.l +=================================================================== +--- a/binutils/arlex.l ++++ b/binutils/arlex.l +@@ -78,7 +78,7 @@ + "(" { return '('; } + ")" { return ')'; } + "," { return ','; } +-[A-Za-z0-9/\\$:.\-\_]+ { ++[A-Za-z0-9/\\$:.\-\_~]+ { + yylval.name = xstrdup (yytext); + return FILENAME; + } --- binutils-2.25.1.orig/debian/patches/158_ld_system_root.patch +++ binutils-2.25.1/debian/patches/158_ld_system_root.patch @@ -0,0 +1,42 @@ +Index: b/ld/configure.ac +=================================================================== +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -56,7 +56,9 @@ + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + ++ if test "x$TARGET_SYSTEM_ROOT" != x/; then + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' ++ fi + use_sysroot=yes + + if test "x$prefix" = xNONE; then +Index: b/ld/configure +=================================================================== +--- a/ld/configure ++++ b/ld/configure +@@ -4283,7 +4283,9 @@ + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + ++ if test "x$TARGET_SYSTEM_ROOT" != x/; then + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' ++ fi + use_sysroot=yes + + if test "x$prefix" = xNONE; then +Index: b/ld/ldmain.c +=================================================================== +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -226,8 +226,8 @@ + { + if (*TARGET_SYSTEM_ROOT == 0) + { +- einfo ("%P%F: this linker was not configured to use sysroots\n"); + ld_sysroot = ""; ++ ld_canon_sysroot = ""; + } + else + ld_canon_sysroot = lrealpath (ld_sysroot); --- binutils-2.25.1.orig/debian/patches/161_gold_dummy_zoption.diff +++ binutils-2.25.1/debian/patches/161_gold_dummy_zoption.diff @@ -0,0 +1,29 @@ +# DP: let gold accept a dummy -z buildd- option. + +Index: b/gold/options.h +=================================================================== +--- a/gold/options.h ++++ b/gold/options.h +@@ -1323,6 +1323,9 @@ class General_options + DEFINE_bool_alias(textoff, text, options::DASH_Z, '\0', + N_("Permit relocations in read-only segments (default)"), + NULL, true); ++ DEFINE_bool(buildd, options::DASH_Z, '\0', false, ++ N_("Dummy z option"), ++ NULL); + + public: + typedef options::Dir_list Dir_list; +Index: b/gold/options.cc +=================================================================== +--- a/gold/options.cc ++++ b/gold/options.cc +@@ -897,6 +897,8 @@ parse_short_option(int argc, const char* + { + int dummy_i = 0; + const char* dash_z_arg = *arg; ++ if (strncmp(dash_z_arg, "buildd", strlen("buildd")) == 0) ++ *arg = "buildd"; + retval = parse_long_option(1, arg, true, arg, &dummy_i); + if (retval == NULL) + usage(_("unknown -z option"), dash_z_arg); --- binutils-2.25.1.orig/debian/patches/164_ld_doc_remove_xref.diff +++ binutils-2.25.1/debian/patches/164_ld_doc_remove_xref.diff @@ -0,0 +1,16 @@ +# DP: In ld.texi, remove cross reference to BFD internals documentation. + +Index: b/ld/ld.texinfo +=================================================================== +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -7769,7 +7769,8 @@ may be spent optimizing algorithms for a + One minor artifact of the BFD solution which you should bear in + mind is the potential for information loss. There are two places where + useful information can be lost using the BFD mechanism: during +-conversion and during output. @xref{BFD information loss}. ++conversion and during output. See BFD information loss in the BFD ++internal documentation. + + @menu + * BFD outline:: How it works: an outline of BFD --- binutils-2.25.1.orig/debian/patches/170_doc_fixes.diff +++ binutils-2.25.1/debian/patches/170_doc_fixes.diff @@ -0,0 +1,15 @@ +# DP: Documentation fixes + +Index: b/ld/ld.texinfo +=================================================================== +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -1701,7 +1701,7 @@ ELF executable, the contents of the envi + @code{LD_RUN_PATH} will be used if it is defined. + + The @option{-rpath} option may also be used on SunOS. By default, on +-SunOS, the linker will form a runtime search patch out of all the ++SunOS, the linker will form a runtime search path out of all the + @option{-L} options it is given. If a @option{-rpath} option is used, the + runtime search path will be formed exclusively using the @option{-rpath} + options, ignoring the @option{-L} options. This can be useful when using --- binutils-2.25.1.orig/debian/patches/aarch64-bogus-assertion.diff +++ binutils-2.25.1/debian/patches/aarch64-bogus-assertion.diff @@ -0,0 +1,87 @@ +# DP: AArch64: Move biogus assertion + +gas/ +2014-10-21 Jan Beulich + + * config/tc-aarch64.c (output_operand_error_record): Move down + assertion of idx being non-negative. Use local variables when + available. + +--- a/gas/config/tc-aarch64.c ++++ b/gas/config/tc-aarch64.c +@@ -3939,11 +3939,11 @@ output_info (const char *format, ...) + static void + output_operand_error_record (const operand_error_record *record, char *str) + { +- int idx = record->detail.index; ++ const aarch64_operand_error *detail = &record->detail; ++ int idx = detail->index; + const aarch64_opcode *opcode = record->opcode; +- enum aarch64_opnd opd_code = (idx != -1 ? opcode->operands[idx] ++ enum aarch64_opnd opd_code = (idx >= 0 ? opcode->operands[idx] + : AARCH64_OPND_NIL); +- const aarch64_operand_error *detail = &record->detail; + + switch (detail->kind) + { +@@ -3955,20 +3955,22 @@ output_operand_error_record (const operand_error_record *record, char *str) + case AARCH64_OPDE_RECOVERABLE: + case AARCH64_OPDE_FATAL_SYNTAX_ERROR: + case AARCH64_OPDE_OTHER_ERROR: +- gas_assert (idx >= 0); + /* Use the prepared error message if there is, otherwise use the + operand description string to describe the error. */ + if (detail->error != NULL) + { +- if (detail->index == -1) ++ if (idx < 0) + as_bad (_("%s -- `%s'"), detail->error, str); + else + as_bad (_("%s at operand %d -- `%s'"), +- detail->error, detail->index + 1, str); ++ detail->error, idx + 1, str); + } + else +- as_bad (_("operand %d should be %s -- `%s'"), idx + 1, ++ { ++ gas_assert (idx >= 0); ++ as_bad (_("operand %d should be %s -- `%s'"), idx + 1, + aarch64_get_operand_desc (opd_code), str); ++ } + break; + + case AARCH64_OPDE_INVALID_VARIANT: +@@ -4073,28 +4075,28 @@ output_operand_error_record (const operand_error_record *record, char *str) + if (detail->data[0] != detail->data[1]) + as_bad (_("%s out of range %d to %d at operand %d -- `%s'"), + detail->error ? detail->error : _("immediate value"), +- detail->data[0], detail->data[1], detail->index + 1, str); ++ detail->data[0], detail->data[1], idx + 1, str); + else + as_bad (_("%s expected to be %d at operand %d -- `%s'"), + detail->error ? detail->error : _("immediate value"), +- detail->data[0], detail->index + 1, str); ++ detail->data[0], idx + 1, str); + break; + + case AARCH64_OPDE_REG_LIST: + if (detail->data[0] == 1) + as_bad (_("invalid number of registers in the list; " + "only 1 register is expected at operand %d -- `%s'"), +- detail->index + 1, str); ++ idx + 1, str); + else + as_bad (_("invalid number of registers in the list; " + "%d registers are expected at operand %d -- `%s'"), +- detail->data[0], detail->index + 1, str); ++ detail->data[0], idx + 1, str); + break; + + case AARCH64_OPDE_UNALIGNED: + as_bad (_("immediate value should be a multiple of " + "%d at operand %d -- `%s'"), +- detail->data[0], detail->index + 1, str); ++ detail->data[0], idx + 1, str); + break; + + default: --- binutils-2.25.1.orig/debian/patches/aarch64-enable-targets.diff +++ binutils-2.25.1/debian/patches/aarch64-enable-targets.diff @@ -0,0 +1,18 @@ +# DP: Fix build configured with --enable-targets=aarch64-linux. + +gold/ + +2014-10-18 Andreas Schwab + + * configure.tgt (targ_extra_obj) [aarch64*-*]: Define. + +--- a/gold/configure.tgt ++++ b/gold/configure.tgt +@@ -146,6 +146,7 @@ arm*-*-*) + ;; + aarch64*-*) + targ_obj=aarch64 ++ targ_extra_obj=aarch64-reloc-property + targ_machine=EM_AARCH64 + targ_size=64 + targ_extra_size=32 --- binutils-2.25.1.orig/debian/patches/aarch64-gold-updates.diff +++ binutils-2.25.1/debian/patches/aarch64-gold-updates.diff @@ -0,0 +1,2723 @@ +# DP: gold: Support relexation in the aarch64 backend. + +Index: b/gold/ChangeLog +=================================================================== +--- a/gold/ChangeLog ++++ b/gold/ChangeLog +@@ -66,6 +66,33 @@ + * powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to + thread_starter. + ++2014-09-22 Han Shen ++ Jing Yu ++ ++ Patch for gold aarch64 backend to support relaxation. ++ * aarch64-reloc.def: Change format. ++ * aarch64.cc (class Reloc_stub): New class. ++ (class Stub_table): New class. ++ (class AArch64_relobj): New class. ++ (class AArch64_input_section): New class. ++ (class AArch64_output_section): New class. ++ (Target_aarch64::new_stub_table): New method. ++ (Target_aarch64::new_aarch64_input_section): New method. ++ (Target_aarch64::find_aarch64_input_section): New method. ++ (Target_aarch64::scan_section_for_stubs): New method. ++ (Target_aarch64::scan_reloc_section_for_stubs): New method. ++ (Target_aarch64::relocate_stub): New method. ++ (Target_aarch64::current_target): New method. ++ (Target_aarch64::do_make_elf_object): New method. ++ (Target_aarch64::do_may_relax): New method. ++ (Target_aarch64::do_relax): New method. ++ (Target_aarch64::group_sections): New method. ++ (Target_aarch64::scan_reloc_for_stub): New method. ++ (Target_aarch64::do_make_output_section): New method. ++ (Target_aarch64::stub_tables_): New data member. ++ (Target_aarch64::aarch64_input_section_map_): New data member. ++ (AArch64_relocate_functions::maybe_apply_stub): New method. ++ + 2014-09-30 Cary Coutant + + PR gold/17432 +Index: b/gold/aarch64-reloc.def +=================================================================== +--- a/gold/aarch64-reloc.def ++++ b/gold/aarch64-reloc.def +@@ -22,54 +22,53 @@ + // + // + // +-// Insn modified by relocation, see enum Reloc_inst -------------------------------------------------------------------------+ +-// Symbol reference type -----------------------------------------------------------------------------+ | +-// Portion off X to retrieve -------------------------------------------------------------------+ | | +-// Checking function, see Note(A)---------------------------------------+ | | | +-// Group index---------------------------------------------------+ | | | | +-// Implemented----------------------------------------------+ | | | | | +-// Class-------------------------------------+ | | | | | | +-// Type----------------------------+ | | | | | | | +-// Name | | | | | | | | +-// | | | | | | | | | +-ARD(ABS64 , STATIC , DATA , Y, -1, 0,0 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) +-ARD(ABS32 , STATIC , DATA , Y, -1, 31,32 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) +-ARD(ABS16 , STATIC , DATA , Y, -1, 15,16 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) +-ARD(PREL64 , STATIC , DATA , Y, -1, 0,0 , 0,0 , Symbol::RELATIVE_REF , DATA ) +-ARD(PREL32 , STATIC , DATA , Y, -1, 31,32 , 0,0 , Symbol::RELATIVE_REF , DATA ) +-ARD(PREL16 , STATIC , DATA , Y, -1, 15,16 , 0,0 , Symbol::RELATIVE_REF , DATA ) ++// Insn modified by relocation, see enum Reloc_inst -------------------------------------------------------------------------------------------------+ ++// Symbol reference type -----------------------------------------------------------------------------+ | ++// Portion off X to retrieve -------------------------------------------------------------------+ | | ++// Checking function, see Note(A)---------------------------------------+ | | | ++// Group index---------------------------------------------------+ | | | | ++// Implemented----------------------------------------------+ | | | | | ++// Class-------------------------------------+ | | | | | | ++// Type----------------------------+ | | | | | | | ++// Name | | | | | | | | ++// | | | | | | | | | ++ARD(ABS64 , STATIC , DATA , Y, -1, 0,0 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) ++ARD(ABS32 , STATIC , DATA , Y, -1, 31,32 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) ++ARD(ABS16 , STATIC , DATA , Y, -1, 15,16 , 0,0 , Symbol::ABSOLUTE_REF , DATA ) ++ARD(PREL64 , STATIC , DATA , Y, -1, 0,0 , 0,0 , Symbol::RELATIVE_REF , DATA ) ++ARD(PREL32 , STATIC , DATA , Y, -1, 31,32 , 0,0 , Symbol::RELATIVE_REF , DATA ) ++ARD(PREL16 , STATIC , DATA , Y, -1, 15,16 , 0,0 , Symbol::RELATIVE_REF , DATA ) + // Above is from Table 4-6, Data relocations, 257-262. + +-ARD(ADR_PREL_PG_HI21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) +-ARD(ADR_PREL_PG_HI21_NC , STATIC , AARCH64 , Y, -1, 0,0 , 12,32 , Symbol::RELATIVE_REF , ADRP ) +-ARD(LDST8_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(LDST16_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN2 , 1,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(LDST32_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN4 , 2,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(LDST64_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(LDST128_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN16 , 4,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(ADD_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(ADR_GOT_PAGE , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) +-ARD(LD64_GOT_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(ADR_PREL_PG_HI21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) ++ARD(ADR_PREL_PG_HI21_NC , STATIC , AARCH64 , Y, -1, 0,0 , 12,32 , Symbol::RELATIVE_REF , ADRP ) ++ARD(LDST8_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(LDST16_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN2 , 1,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(LDST32_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN4 , 2,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(LDST64_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(LDST128_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN16 , 4,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(ADD_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(ADR_GOT_PAGE , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) ++ARD(LD64_GOT_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) + ARD(TSTBR14 , STATIC , CFLOW , N, -1, 15,15 , 2,15 , (Symbol::FUNCTION_CALL|Symbol::ABSOLUTE_REF) , TBZNZ ) + ARD(CONDBR19 , STATIC , CFLOW , N, -1, 20,20 , 2,20 , (Symbol::FUNCTION_CALL|Symbol::ABSOLUTE_REF) , CONDB ) +-ARD(CALL26 , STATIC , CFLOW , Y, -1, 27,27 , 2,27 , (Symbol::FUNCTION_CALL|Symbol::RELATIVE_REF) , CALL ) +-ARD(JUMP26 , STATIC , CFLOW , Y, -1, 27,27 , 2,27 , (Symbol::FUNCTION_CALL|Symbol::RELATIVE_REF) , B ) ++ARD(CALL26 , STATIC , CFLOW , Y, -1, 27,27 , 2,27 , (Symbol::FUNCTION_CALL|Symbol::RELATIVE_REF) , CALL ) ++ARD(JUMP26 , STATIC , CFLOW , Y, -1, 27,27 , 2,27 , (Symbol::FUNCTION_CALL|Symbol::RELATIVE_REF) , B ) + // Above is from Table 4-10, Relocations for control-flow instructions, + // 279-283. + +-ARD(TLSGD_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) +-ARD(TLSGD_ADD_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +- +-ARD(TLSIE_MOVW_GOTTPREL_G1 , STATIC , AARCH64 , N, -1, 0,0 , 16,31 , Symbol::ABSOLUTE_REF , MOVW ) +-ARD(TLSIE_MOVW_GOTTPREL_G0_NC , STATIC , AARCH64 , N, -1, 0,0 , 0,15 , Symbol::ABSOLUTE_REF , MOVW ) +-ARD(TLSIE_ADR_GOTTPREL_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) +-ARD(TLSIE_LD64_GOTTPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(TLSIE_LD_GOTTPREL_PREL19 , STATIC , AARCH64 , N, -1, 20,20 , 2,20 , Symbol::ABSOLUTE_REF , LD ) ++ARD(TLSGD_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) ++ARD(TLSGD_ADD_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(TLSIE_MOVW_GOTTPREL_G1 , STATIC , AARCH64 , N, -1, 0,0 , 16,31 , Symbol::ABSOLUTE_REF , MOVW ) ++ARD(TLSIE_MOVW_GOTTPREL_G0_NC , STATIC , AARCH64 , N, -1, 0,0 , 0,15 , Symbol::ABSOLUTE_REF , MOVW ) ++ARD(TLSIE_ADR_GOTTPREL_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) ++ARD(TLSIE_LD64_GOTTPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) ++ARD(TLSIE_LD_GOTTPREL_PREL19 , STATIC , AARCH64 , N, -1, 20,20 , 2,20 , Symbol::ABSOLUTE_REF , LD ) + // Above is from Table 4-17, Initial Exec TLS relocations, 539-543. + +-ARD(TLSLE_ADD_TPREL_HI12 , STATIC , AARCH64 , Y, -1, 0,24 , 12,23 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSLE_ADD_TPREL_LO12 , STATIC , AARCH64 , Y, -1, 0,12 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSLE_ADD_TPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_HI12 , STATIC , AARCH64 , Y, -1, 0,24 , 12,23 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_LO12 , STATIC , AARCH64 , Y, -1, 0,12 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) + // Above is from Table 4-18, Local Exec TLS relocations, 544-571. + + ARD(TLSDESC_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) +Index: b/gold/aarch64.cc +=================================================================== +--- a/gold/aarch64.cc ++++ b/gold/aarch64.cc +@@ -47,6 +47,7 @@ + // The first three .got.plt entries are reserved. + const int32_t AARCH64_GOTPLT_RESERVE_COUNT = 3; + ++ + namespace + { + +@@ -124,7 +125,7 @@ class Output_data_got_aarch64 : public O + gold_assert(tls_segment != NULL); + + AArch64_address aligned_tcb_address = +- align_address(Target_aarch64::TCB_SIZE, ++ align_address(Target_aarch64::TCB_SIZE, + tls_segment->maximum_alignment()); + + for (size_t i = 0; i < this->static_relocs_.size(); ++i) +@@ -254,49 +255,1366 @@ class Output_data_got_aarch64 : public O + return this->u_.global.symbol; + } + +- // For a relocation against a local symbol, the defining object. +- Sized_relobj_file* +- relobj() const +- { +- gold_assert(!this->symbol_is_global_); +- return this->u_.local.relobj; ++ // For a relocation against a local symbol, the defining object. ++ Sized_relobj_file* ++ relobj() const ++ { ++ gold_assert(!this->symbol_is_global_); ++ return this->u_.local.relobj; ++ } ++ ++ // For a relocation against a local symbol, the local symbol index. ++ unsigned int ++ index() const ++ { ++ gold_assert(!this->symbol_is_global_); ++ return this->u_.local.index; ++ } ++ ++ private: ++ // GOT offset of the entry to which this relocation is applied. ++ unsigned int got_offset_; ++ // Type of relocation. ++ unsigned int r_type_; ++ // Whether this relocation is against a global symbol. ++ bool symbol_is_global_; ++ // A global or local symbol. ++ union ++ { ++ struct ++ { ++ // For a global symbol, the symbol itself. ++ Symbol* symbol; ++ } global; ++ struct ++ { ++ // For a local symbol, the object defining the symbol. ++ Sized_relobj_file* relobj; ++ // For a local symbol, the symbol index. ++ unsigned int index; ++ } local; ++ } u_; ++ }; // End of inner class Static_reloc ++ ++ std::vector static_relocs_; ++}; // End of Output_data_got_aarch64 ++ ++ ++template ++class AArch64_input_section; ++ ++ ++template ++class AArch64_output_section; ++ ++ ++// Reloc stub class. ++ ++template ++class Reloc_stub ++{ ++ public: ++ typedef Reloc_stub This; ++ typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; ++ ++ // Do not change the value of the enums, they are used to index into ++ // stub_insns array. ++ typedef enum ++ { ++ ST_NONE = 0, ++ ++ // Using adrp/add pair, 4 insns (including alignment) without mem access, ++ // the fastest stub. This has a limited jump distance, which is tested by ++ // aarch64_valid_for_adrp_p. ++ ST_ADRP_BRANCH = 1, ++ ++ // Using ldr-absolute-address/br-register, 4 insns with 1 mem access, ++ // unlimited in jump distance. ++ ST_LONG_BRANCH_ABS = 2, ++ ++ // Using ldr/calculate-pcrel/jump, 8 insns (including alignment) with 1 mem ++ // access, slowest one. Only used in position independent executables. ++ ST_LONG_BRANCH_PCREL = 3, ++ ++ } Stub_type; ++ ++ // Branch range. This is used to calculate the section group size, as well as ++ // determine whether a stub is needed. ++ static const int MAX_BRANCH_OFFSET = ((1 << 25) - 1) << 2; ++ static const int MIN_BRANCH_OFFSET = -((1 << 25) << 2); ++ ++ // Constant used to determine if an offset fits in the adrp instruction ++ // encoding. ++ static const int MAX_ADRP_IMM = (1 << 20) - 1; ++ static const int MIN_ADRP_IMM = -(1 << 20); ++ ++ static const int BYTES_PER_INSN = 4; ++ static const int STUB_ADDR_ALIGN = 4; ++ ++ // Determine whether the offset fits in the jump/branch instruction. ++ static bool ++ aarch64_valid_branch_offset_p(int64_t offset) ++ { return offset >= MIN_BRANCH_OFFSET && offset <= MAX_BRANCH_OFFSET; } ++ ++ // Determine whether the offset fits in the adrp immediate field. ++ static bool ++ aarch64_valid_for_adrp_p(AArch64_address location, AArch64_address dest) ++ { ++ typedef AArch64_relocate_functions Reloc; ++ int64_t adrp_imm = (Reloc::Page(dest) - Reloc::Page(location)) >> 12; ++ return adrp_imm >= MIN_ADRP_IMM && adrp_imm <= MAX_ADRP_IMM; ++ } ++ ++ // Determine the stub type for a certain relocation or ST_NONE, if no stub is ++ // needed. ++ static Stub_type ++ stub_type_for_reloc(unsigned int r_type, AArch64_address address, ++ AArch64_address target); ++ ++ Reloc_stub(Stub_type stub_type) ++ : stub_type_(stub_type), offset_(invalid_offset), ++ destination_address_(invalid_address) ++ { } ++ ++ ~Reloc_stub() ++ { } ++ ++ // Return offset of code stub from beginning of its containing stub table. ++ section_offset_type ++ offset() const ++ { ++ gold_assert(this->offset_ != invalid_offset); ++ return this->offset_; ++ } ++ ++ // Set offset of code stub from beginning of its containing stub table. ++ void ++ set_offset(section_offset_type offset) ++ { this->offset_ = offset; } ++ ++ // Return destination address. ++ AArch64_address ++ destination_address() const ++ { ++ gold_assert(this->destination_address_ != this->invalid_address); ++ return this->destination_address_; ++ } ++ ++ // Set destination address. ++ void ++ set_destination_address(AArch64_address address) ++ { ++ gold_assert(address != this->invalid_address); ++ this->destination_address_ = address; ++ } ++ ++ // Reset the destination address. ++ void ++ reset_destination_address() ++ { this->destination_address_ = this->invalid_address; } ++ ++ // Return the stub type. ++ Stub_type ++ stub_type() const ++ { return stub_type_; } ++ ++ // Return the stub size. ++ uint32_t ++ stub_size() const ++ { return this->stub_insn_number() * BYTES_PER_INSN; } ++ ++ // Return the instruction number of this stub instance. ++ int ++ stub_insn_number() const ++ { return stub_insns_[this->stub_type_][0]; } ++ ++ // Note the first "insn" is the number of total insns in this array. ++ const uint32_t* ++ stub_insns() const ++ { return stub_insns_[this->stub_type_]; } ++ ++ // Write stub to output file. ++ void ++ write(unsigned char* view, section_size_type view_size) ++ { this->do_write(view, view_size); } ++ ++ // The key class used to index the stub instance in the stub table's stub map. ++ class Key ++ { ++ public: ++ Key(Stub_type stub_type, const Symbol* symbol, const Relobj* relobj, ++ unsigned int r_sym, int32_t addend) ++ : stub_type_(stub_type), addend_(addend) ++ { ++ if (symbol != NULL) ++ { ++ this->r_sym_ = Reloc_stub::invalid_index; ++ this->u_.symbol = symbol; ++ } ++ else ++ { ++ gold_assert(relobj != NULL && r_sym != invalid_index); ++ this->r_sym_ = r_sym; ++ this->u_.relobj = relobj; ++ } ++ } ++ ++ ~Key() ++ { } ++ ++ // Return stub type. ++ Stub_type ++ stub_type() const ++ { return this->stub_type_; } ++ ++ // Return the local symbol index or invalid_index. ++ unsigned int ++ r_sym() const ++ { return this->r_sym_; } ++ ++ // Return the symbol if there is one. ++ const Symbol* ++ symbol() const ++ { return this->r_sym_ == invalid_index ? this->u_.symbol : NULL; } ++ ++ // Return the relobj if there is one. ++ const Relobj* ++ relobj() const ++ { return this->r_sym_ != invalid_index ? this->u_.relobj : NULL; } ++ ++ // Whether this equals to another key k. ++ bool ++ eq(const Key& k) const ++ { ++ return ((this->stub_type_ == k.stub_type_) ++ && (this->r_sym_ == k.r_sym_) ++ && ((this->r_sym_ != Reloc_stub::invalid_index) ++ ? (this->u_.relobj == k.u_.relobj) ++ : (this->u_.symbol == k.u_.symbol)) ++ && (this->addend_ == k.addend_)); ++ } ++ ++ // Return a hash value. ++ size_t ++ hash_value() const ++ { ++ size_t name_hash_value = gold::string_hash( ++ (this->r_sym_ != Reloc_stub::invalid_index) ++ ? this->u_.relobj->name().c_str() ++ : this->u_.symbol->name()); ++ // We only have 4 stub types. ++ size_t stub_type_hash_value = 0x03 & this->stub_type_; ++ return (name_hash_value ++ ^ stub_type_hash_value ++ ^ ((this->r_sym_ & 0x3fff) << 2) ++ ^ ((this->addend_ & 0xffff) << 16)); ++ } ++ ++ // Functors for STL associative containers. ++ struct hash ++ { ++ size_t ++ operator()(const Key& k) const ++ { return k.hash_value(); } ++ }; ++ ++ struct equal_to ++ { ++ bool ++ operator()(const Key& k1, const Key& k2) const ++ { return k1.eq(k2); } ++ }; ++ ++ private: ++ // Stub type. ++ const Stub_type stub_type_; ++ // If this is a local symbol, this is the index in the defining object. ++ // Otherwise, it is invalid_index for a global symbol. ++ unsigned int r_sym_; ++ // If r_sym_ is an invalid index, this points to a global symbol. ++ // Otherwise, it points to a relobj. We used the unsized and target ++ // independent Symbol and Relobj classes instead of Sized_symbol<32> and ++ // Arm_relobj, in order to avoid making the stub class a template ++ // as most of the stub machinery is endianness-neutral. However, it ++ // may require a bit of casting done by users of this class. ++ union ++ { ++ const Symbol* symbol; ++ const Relobj* relobj; ++ } u_; ++ // Addend associated with a reloc. ++ int32_t addend_; ++ }; // End of inner class Reloc_stub::Key ++ ++ protected: ++ // This may be overridden in the child class. ++ virtual void ++ do_write(unsigned char*, section_size_type); ++ ++ private: ++ static const section_offset_type invalid_offset = ++ static_cast(-1); ++ static const unsigned int invalid_index = static_cast(-1); ++ static const AArch64_address invalid_address = ++ static_cast(-1); ++ ++ static const uint32_t stub_insns_[][10]; ++ ++ const Stub_type stub_type_; ++ section_offset_type offset_; ++ AArch64_address destination_address_; ++}; // End of Reloc_stub ++ ++ ++// Write data to output file. ++ ++template ++void ++Reloc_stub:: ++do_write(unsigned char* view, section_size_type) ++{ ++ typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; ++ const uint32_t* insns = this->stub_insns(); ++ uint32_t num_insns = this->stub_insn_number(); ++ Insntype* ip = reinterpret_cast(view); ++ for (uint32_t i = 1; i <= num_insns; ++i) ++ elfcpp::Swap<32, big_endian>::writeval(ip + i - 1, insns[i]); ++} ++ ++ ++// Stubs instructions definition. ++ ++template ++const uint32_t ++Reloc_stub::stub_insns_[][10] = ++ { ++ // The first element of each group is the num of the insns. ++ ++ // ST_NONE ++ {0, 0}, ++ ++ // ST_ADRP_BRANCH ++ { ++ 4, ++ 0x90000010, /* adrp ip0, X */ ++ /* ADR_PREL_PG_HI21(X) */ ++ 0x91000210, /* add ip0, ip0, :lo12:X */ ++ /* ADD_ABS_LO12_NC(X) */ ++ 0xd61f0200, /* br ip0 */ ++ 0x00000000, /* alignment padding */ ++ }, ++ ++ // ST_LONG_BRANCH_ABS ++ { ++ 4, ++ 0x58000050, /* ldr ip0, 0x8 */ ++ 0xd61f0200, /* br ip0 */ ++ 0x00000000, /* address field */ ++ 0x00000000, /* address fields */ ++ }, ++ ++ // ST_LONG_BRANCH_PCREL ++ { ++ 8, ++ 0x58000090, /* ldr ip0, 0x10 */ ++ 0x10000011, /* adr ip1, #0 */ ++ 0x8b110210, /* add ip0, ip0, ip1 */ ++ 0xd61f0200, /* br ip0 */ ++ 0x00000000, /* address field */ ++ 0x00000000, /* address field */ ++ 0x00000000, /* alignment padding */ ++ 0x00000000, /* alignment padding */ ++ } ++ }; ++ ++ ++// Determine the stub type for a certain relocation or ST_NONE, if no stub is ++// needed. ++ ++template ++inline ++typename Reloc_stub::Stub_type ++Reloc_stub::stub_type_for_reloc( ++ unsigned int r_type, AArch64_address location, AArch64_address dest) ++{ ++ int64_t branch_offset = 0; ++ switch(r_type) ++ { ++ case elfcpp::R_AARCH64_CALL26: ++ case elfcpp::R_AARCH64_JUMP26: ++ branch_offset = dest - location; ++ break; ++ default: ++ gold_assert(false); ++ } ++ ++ if (aarch64_valid_branch_offset_p(branch_offset)) ++ return ST_NONE; ++ ++ if (aarch64_valid_for_adrp_p(location, dest)) ++ return ST_ADRP_BRANCH; ++ ++ if (parameters->options().output_is_position_independent() ++ && parameters->options().output_is_executable()) ++ return ST_LONG_BRANCH_PCREL; ++ ++ return ST_LONG_BRANCH_ABS; ++} ++ ++// A class to hold stubs for the ARM target. ++ ++template ++class Stub_table : public Output_data ++{ ++ public: ++ typedef Target_aarch64 The_target_aarch64; ++ typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; ++ typedef AArch64_input_section The_aarch64_input_section; ++ typedef Reloc_stub The_reloc_stub; ++ typedef typename The_reloc_stub::Key The_reloc_stub_key; ++ typedef typename The_reloc_stub_key::hash The_reloc_stub_key_hash; ++ typedef typename The_reloc_stub_key::equal_to The_reloc_stub_key_equal_to; ++ typedef Stub_table The_stub_table; ++ typedef Unordered_map ++ Reloc_stub_map; ++ typedef typename Reloc_stub_map::const_iterator Reloc_stub_map_const_iter; ++ typedef Relocate_info The_relocate_info; ++ ++ Stub_table(The_aarch64_input_section* owner) ++ : Output_data(), owner_(owner), reloc_stubs_size_(0), prev_data_size_(0) ++ { } ++ ++ ~Stub_table() ++ { } ++ ++ The_aarch64_input_section* ++ owner() const ++ { return owner_; } ++ ++ // Whether this stub table is empty. ++ bool ++ empty() const ++ { return reloc_stubs_.empty(); } ++ ++ // Return the current data size. ++ off_t ++ current_data_size() const ++ { return this->current_data_size_for_child(); } ++ ++ // Add a STUB using KEY. The caller is responsible for avoiding addition ++ // if a STUB with the same key has already been added. ++ void ++ add_reloc_stub(The_reloc_stub* stub, const The_reloc_stub_key& key); ++ ++ // Finalize stubs. No-op here, just for completeness. ++ void ++ finalize_stubs() ++ { } ++ ++ // Look up a relocation stub using KEY. Return NULL if there is none. ++ The_reloc_stub* ++ find_reloc_stub(The_reloc_stub_key& key) ++ { ++ Reloc_stub_map_const_iter p = this->reloc_stubs_.find(key); ++ return (p != this->reloc_stubs_.end()) ? p->second : NULL; ++ } ++ ++ // Relocate stubs in this stub table. ++ void ++ relocate_stubs(const The_relocate_info*, ++ The_target_aarch64*, ++ Output_section*, ++ unsigned char*, ++ AArch64_address, ++ section_size_type); ++ ++ // Update data size at the end of a relaxation pass. Return true if data size ++ // is different from that of the previous relaxation pass. ++ bool ++ update_data_size_changed_p() ++ { ++ // No addralign changed here. ++ off_t s = this->reloc_stubs_size_; ++ bool changed = (s != this->prev_data_size_); ++ this->prev_data_size_ = s; ++ return changed; ++ } ++ ++ protected: ++ // Write out section contents. ++ void ++ do_write(Output_file*); ++ ++ // Return the required alignment. ++ uint64_t ++ do_addralign() const ++ { return The_reloc_stub::STUB_ADDR_ALIGN; } ++ ++ // Reset address and file offset. ++ void ++ do_reset_address_and_file_offset() ++ { this->set_current_data_size_for_child(this->prev_data_size_); } ++ ++ // Set final data size. ++ void ++ set_final_data_size() ++ { this->set_data_size(this->current_data_size()); } ++ ++ private: ++ // Relocate one stub. ++ void ++ relocate_stub(The_reloc_stub*, ++ const The_relocate_info*, ++ The_target_aarch64*, ++ Output_section*, ++ unsigned char*, ++ AArch64_address, ++ section_size_type); ++ ++ private: ++ // Owner of this stub table. ++ The_aarch64_input_section* owner_; ++ // The relocation stubs. ++ Reloc_stub_map reloc_stubs_; ++ // Size of reloc stubs. ++ off_t reloc_stubs_size_; ++ // data size of this in the previous pass. ++ off_t prev_data_size_; ++}; // End of Stub_table ++ ++ ++// Add a STUB using KEY. The caller is responsible for avoiding addition ++// if a STUB with the same key has already been added. ++ ++template ++void ++Stub_table::add_reloc_stub( ++ The_reloc_stub* stub, const The_reloc_stub_key& key) ++{ ++ gold_assert(stub->stub_type() == key.stub_type()); ++ this->reloc_stubs_[key] = stub; ++ ++ // Assign stub offset early. We can do this because we never remove ++ // reloc stubs and they are in the beginning of the stub table. ++ this->reloc_stubs_size_ = align_address(this->reloc_stubs_size_, ++ The_reloc_stub::STUB_ADDR_ALIGN); ++ stub->set_offset(this->reloc_stubs_size_); ++ this->reloc_stubs_size_ += stub->stub_size(); ++} ++ ++ ++// Relocate all stubs in this stub table. ++ ++template ++void ++Stub_table:: ++relocate_stubs(const The_relocate_info* relinfo, ++ The_target_aarch64* target_aarch64, ++ Output_section* output_section, ++ unsigned char* view, ++ AArch64_address address, ++ section_size_type view_size) ++{ ++ // "view_size" is the total size of the stub_table. ++ gold_assert(address == this->address() && ++ view_size == static_cast(this->data_size())); ++ for(Reloc_stub_map_const_iter p = this->reloc_stubs_.begin(); ++ p != this->reloc_stubs_.end(); ++p) ++ relocate_stub(p->second, relinfo, target_aarch64, output_section, ++ view, address, view_size); ++} ++ ++ ++// Relocate one stub. This is a helper for Stub_table::relocate_stubs(). ++ ++template ++void ++Stub_table:: ++relocate_stub(The_reloc_stub* stub, ++ const The_relocate_info* relinfo, ++ The_target_aarch64* target_aarch64, ++ Output_section* output_section, ++ unsigned char* view, ++ AArch64_address address, ++ section_size_type view_size) ++{ ++ // "offset" is the offset from the beginning of the stub_table. ++ section_size_type offset = stub->offset(); ++ section_size_type stub_size = stub->stub_size(); ++ // "view_size" is the total size of the stub_table. ++ gold_assert(offset + stub_size <= view_size); ++ ++ target_aarch64->relocate_stub(stub, relinfo, output_section, ++ view + offset, address + offset, view_size); ++} ++ ++ ++// Write out the stubs to file. ++ ++template ++void ++Stub_table::do_write(Output_file* of) ++{ ++ off_t offset = this->offset(); ++ const section_size_type oview_size = ++ convert_to_section_size_type(this->data_size()); ++ unsigned char* const oview = of->get_output_view(offset, oview_size); ++ ++ // Write relocation stubs. ++ for (typename Reloc_stub_map::const_iterator p = this->reloc_stubs_.begin(); ++ p != this->reloc_stubs_.end(); ++p) ++ { ++ The_reloc_stub* stub = p->second; ++ AArch64_address address = this->address() + stub->offset(); ++ gold_assert(address == ++ align_address(address, The_reloc_stub::STUB_ADDR_ALIGN)); ++ stub->write(oview + stub->offset(), stub->stub_size()); ++ } ++ ++ of->write_output_view(this->offset(), oview_size, oview); ++} ++ ++ ++// AArch64_relobj class. ++ ++template ++class AArch64_relobj : public Sized_relobj_file ++{ ++ public: ++ typedef AArch64_relobj This; ++ typedef Target_aarch64 The_target_aarch64; ++ typedef AArch64_input_section The_aarch64_input_section; ++ typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; ++ typedef Stub_table The_stub_table; ++ typedef std::vector Stub_table_list; ++ static const AArch64_address invalid_address = ++ static_cast(-1); ++ ++ AArch64_relobj(const std::string& name, Input_file* input_file, off_t offset, ++ const typename elfcpp::Ehdr& ehdr) ++ : Sized_relobj_file(name, input_file, offset, ehdr), ++ stub_tables_() ++ { } ++ ++ ~AArch64_relobj() ++ { } ++ ++ // Return the stub table of the SHNDX-th section if there is one. ++ The_stub_table* ++ stub_table(unsigned int shndx) const ++ { ++ gold_assert(shndx < this->stub_tables_.size()); ++ return this->stub_tables_[shndx]; ++ } ++ ++ // Set STUB_TABLE to be the stub_table of the SHNDX-th section. ++ void ++ set_stub_table(unsigned int shndx, The_stub_table* stub_table) ++ { ++ gold_assert(shndx < this->stub_tables_.size()); ++ this->stub_tables_[shndx] = stub_table; ++ } ++ ++ // Scan all relocation sections for stub generation. ++ void ++ scan_sections_for_stubs(The_target_aarch64*, const Symbol_table*, ++ const Layout*); ++ ++ // Whether a section is a scannable text section. ++ bool ++ text_section_is_scannable(const elfcpp::Shdr&, unsigned int, ++ const Output_section*, const Symbol_table*); ++ ++ // Convert regular input section with index SHNDX to a relaxed section. ++ void ++ convert_input_section_to_relaxed_section(unsigned /* shndx */) ++ { ++ // The stubs have relocations and we need to process them after writing ++ // out the stubs. So relocation now must follow section write. ++ this->set_relocs_must_follow_section_writes(); ++ } ++ ++ protected: ++ // Post constructor setup. ++ void ++ do_setup() ++ { ++ // Call parent's setup method. ++ Sized_relobj_file::do_setup(); ++ ++ // Initialize look-up tables. ++ this->stub_tables_.resize(this->shnum()); ++ } ++ ++ virtual void ++ do_relocate_sections( ++ const Symbol_table* symtab, const Layout* layout, ++ const unsigned char* pshdrs, Output_file* of, ++ typename Sized_relobj_file::Views* pviews); ++ ++ private: ++ // Whether a section needs to be scanned for relocation stubs. ++ bool ++ section_needs_reloc_stub_scanning(const elfcpp::Shdr&, ++ const Relobj::Output_sections&, ++ const Symbol_table*, const unsigned char*); ++ ++ // List of stub tables. ++ Stub_table_list stub_tables_; ++}; // End of AArch64_relobj ++ ++ ++// Relocate sections. ++ ++template ++void ++AArch64_relobj::do_relocate_sections( ++ const Symbol_table* symtab, const Layout* layout, ++ const unsigned char* pshdrs, Output_file* of, ++ typename Sized_relobj_file::Views* pviews) ++{ ++ // Call parent to relocate sections. ++ Sized_relobj_file::do_relocate_sections(symtab, layout, ++ pshdrs, of, pviews); ++ ++ // We do not generate stubs if doing a relocatable link. ++ if (parameters->options().relocatable()) ++ return; ++ ++ Relocate_info relinfo; ++ relinfo.symtab = symtab; ++ relinfo.layout = layout; ++ relinfo.object = this; ++ ++ // Relocate stub tables. ++ unsigned int shnum = this->shnum(); ++ The_target_aarch64* target = The_target_aarch64::current_target(); ++ ++ for (unsigned int i = 1; i < shnum; ++i) ++ { ++ The_aarch64_input_section* aarch64_input_section = ++ target->find_aarch64_input_section(this, i); ++ if (aarch64_input_section != NULL ++ && aarch64_input_section->is_stub_table_owner() ++ && !aarch64_input_section->stub_table()->empty()) ++ { ++ Output_section* os = this->output_section(i); ++ gold_assert(os != NULL); ++ ++ relinfo.reloc_shndx = elfcpp::SHN_UNDEF; ++ relinfo.reloc_shdr = NULL; ++ relinfo.data_shndx = i; ++ relinfo.data_shdr = pshdrs + i * elfcpp::Elf_sizes::shdr_size; ++ ++ typename Sized_relobj_file::View_size& ++ view_struct = (*pviews)[i]; ++ gold_assert(view_struct.view != NULL); ++ ++ The_stub_table* stub_table = aarch64_input_section->stub_table(); ++ off_t offset = stub_table->address() - view_struct.address; ++ unsigned char* view = view_struct.view + offset; ++ AArch64_address address = stub_table->address(); ++ section_size_type view_size = stub_table->data_size(); ++ stub_table->relocate_stubs(&relinfo, target, os, view, address, ++ view_size); ++ } ++ } ++} ++ ++ ++// Determine if an input section is scannable for stub processing. SHDR is ++// the header of the section and SHNDX is the section index. OS is the output ++// section for the input section and SYMTAB is the global symbol table used to ++// look up ICF information. ++ ++template ++bool ++AArch64_relobj::text_section_is_scannable( ++ const elfcpp::Shdr& text_shdr, ++ unsigned int text_shndx, ++ const Output_section* os, ++ const Symbol_table* symtab) ++{ ++ // Skip any empty sections, unallocated sections or sections whose ++ // type are not SHT_PROGBITS. ++ if (text_shdr.get_sh_size() == 0 ++ || (text_shdr.get_sh_flags() & elfcpp::SHF_ALLOC) == 0 ++ || text_shdr.get_sh_type() != elfcpp::SHT_PROGBITS) ++ return false; ++ ++ // Skip any discarded or ICF'ed sections. ++ if (os == NULL || symtab->is_section_folded(this, text_shndx)) ++ return false; ++ ++ // Skip exception frame. ++ if (strcmp(os->name(), ".eh_frame") == 0) ++ return false ; ++ ++ gold_assert(!this->is_output_section_offset_invalid(text_shndx) || ++ os->find_relaxed_input_section(this, text_shndx) != NULL); ++ ++ return true; ++} ++ ++ ++// Determine if we want to scan the SHNDX-th section for relocation stubs. ++// This is a helper for AArch64_relobj::scan_sections_for_stubs(). ++ ++template ++bool ++AArch64_relobj::section_needs_reloc_stub_scanning( ++ const elfcpp::Shdr& shdr, ++ const Relobj::Output_sections& out_sections, ++ const Symbol_table* symtab, ++ const unsigned char* pshdrs) ++{ ++ unsigned int sh_type = shdr.get_sh_type(); ++ if (sh_type != elfcpp::SHT_RELA) ++ return false; ++ ++ // Ignore empty section. ++ off_t sh_size = shdr.get_sh_size(); ++ if (sh_size == 0) ++ return false; ++ ++ // Ignore reloc section with unexpected symbol table. The ++ // error will be reported in the final link. ++ if (this->adjust_shndx(shdr.get_sh_link()) != this->symtab_shndx()) ++ return false; ++ ++ gold_assert(sh_type == elfcpp::SHT_RELA); ++ unsigned int reloc_size = elfcpp::Elf_sizes::rela_size; ++ ++ // Ignore reloc section with unexpected entsize or uneven size. ++ // The error will be reported in the final link. ++ if (reloc_size != shdr.get_sh_entsize() || sh_size % reloc_size != 0) ++ return false; ++ ++ // Ignore reloc section with bad info. This error will be ++ // reported in the final link. ++ unsigned int text_shndx = this->adjust_shndx(shdr.get_sh_info()); ++ if (text_shndx >= this->shnum()) ++ return false; ++ ++ const unsigned int shdr_size = elfcpp::Elf_sizes::shdr_size; ++ const elfcpp::Shdr text_shdr(pshdrs + ++ text_shndx * shdr_size); ++ return this->text_section_is_scannable(text_shdr, text_shndx, ++ out_sections[text_shndx], symtab); ++} ++ ++ ++// Scan relocations for stub generation. ++ ++template ++void ++AArch64_relobj::scan_sections_for_stubs( ++ The_target_aarch64* target, ++ const Symbol_table* symtab, ++ const Layout* layout) ++{ ++ unsigned int shnum = this->shnum(); ++ const unsigned int shdr_size = elfcpp::Elf_sizes::shdr_size; ++ ++ // Read the section headers. ++ const unsigned char* pshdrs = this->get_view(this->elf_file()->shoff(), ++ shnum * shdr_size, ++ true, true); ++ ++ // To speed up processing, we set up hash tables for fast lookup of ++ // input offsets to output addresses. ++ this->initialize_input_to_output_maps(); ++ ++ const Relobj::Output_sections& out_sections(this->output_sections()); ++ ++ Relocate_info relinfo; ++ relinfo.symtab = symtab; ++ relinfo.layout = layout; ++ relinfo.object = this; ++ ++ // Do relocation stubs scanning. ++ const unsigned char* p = pshdrs + shdr_size; ++ for (unsigned int i = 1; i < shnum; ++i, p += shdr_size) ++ { ++ const elfcpp::Shdr shdr(p); ++ if (this->section_needs_reloc_stub_scanning(shdr, out_sections, symtab, ++ pshdrs)) ++ { ++ unsigned int index = this->adjust_shndx(shdr.get_sh_info()); ++ AArch64_address output_offset = ++ this->get_output_section_offset(index); ++ AArch64_address output_address; ++ if (output_offset != invalid_address) ++ { ++ output_address = out_sections[index]->address() + output_offset; ++ } ++ else ++ { ++ // Currently this only happens for a relaxed section. ++ const Output_relaxed_input_section* poris = ++ out_sections[index]->find_relaxed_input_section(this, index); ++ gold_assert(poris != NULL); ++ output_address = poris->address(); ++ } ++ ++ // Get the relocations. ++ const unsigned char* prelocs = this->get_view(shdr.get_sh_offset(), ++ shdr.get_sh_size(), ++ true, false); ++ ++ // Get the section contents. ++ section_size_type input_view_size = 0; ++ const unsigned char* input_view = ++ this->section_contents(index, &input_view_size, false); ++ ++ relinfo.reloc_shndx = i; ++ relinfo.data_shndx = index; ++ unsigned int sh_type = shdr.get_sh_type(); ++ unsigned int reloc_size; ++ gold_assert (sh_type == elfcpp::SHT_RELA); ++ reloc_size = elfcpp::Elf_sizes::rela_size; ++ ++ Output_section* os = out_sections[index]; ++ target->scan_section_for_stubs(&relinfo, sh_type, prelocs, ++ shdr.get_sh_size() / reloc_size, ++ os, ++ output_offset == invalid_address, ++ input_view, output_address, ++ input_view_size); ++ } ++ } ++} ++ ++ ++// A class to wrap an ordinary input section containing executable code. ++ ++template ++class AArch64_input_section : public Output_relaxed_input_section ++{ ++ public: ++ typedef Stub_table The_stub_table; ++ ++ AArch64_input_section(Relobj* relobj, unsigned int shndx) ++ : Output_relaxed_input_section(relobj, shndx, 1), ++ stub_table_(NULL), ++ original_contents_(NULL), original_size_(0), ++ original_addralign_(1) ++ { } ++ ++ ~AArch64_input_section() ++ { delete[] this->original_contents_; } ++ ++ // Initialize. ++ void ++ init(); ++ ++ // Set the stub_table. ++ void ++ set_stub_table(The_stub_table* st) ++ { this->stub_table_ = st; } ++ ++ // Whether this is a stub table owner. ++ bool ++ is_stub_table_owner() const ++ { return this->stub_table_ != NULL && this->stub_table_->owner() == this; } ++ ++ // Return the original size of the section. ++ uint32_t ++ original_size() const ++ { return this->original_size_; } ++ ++ // Return the stub table. ++ The_stub_table* ++ stub_table() ++ { return stub_table_; } ++ ++ protected: ++ // Write out this input section. ++ void ++ do_write(Output_file*); ++ ++ // Return required alignment of this. ++ uint64_t ++ do_addralign() const ++ { ++ if (this->is_stub_table_owner()) ++ return std::max(this->stub_table_->addralign(), ++ static_cast(this->original_addralign_)); ++ else ++ return this->original_addralign_; ++ } ++ ++ // Finalize data size. ++ void ++ set_final_data_size(); ++ ++ // Reset address and file offset. ++ void ++ do_reset_address_and_file_offset(); ++ ++ // Output offset. ++ bool ++ do_output_offset(const Relobj* object, unsigned int shndx, ++ section_offset_type offset, ++ section_offset_type* poutput) const ++ { ++ if ((object == this->relobj()) ++ && (shndx == this->shndx()) ++ && (offset >= 0) ++ && (offset <= ++ convert_types(this->original_size_))) ++ { ++ *poutput = offset; ++ return true; ++ } ++ else ++ return false; ++ } ++ ++ private: ++ // Copying is not allowed. ++ AArch64_input_section(const AArch64_input_section&); ++ AArch64_input_section& operator=(const AArch64_input_section&); ++ ++ // The relocation stubs. ++ The_stub_table* stub_table_; ++ // Original section contents. We have to make a copy here since the file ++ // containing the original section may not be locked when we need to access ++ // the contents. ++ unsigned char* original_contents_; ++ // Section size of the original input section. ++ uint32_t original_size_; ++ // Address alignment of the original input section. ++ uint32_t original_addralign_; ++}; // End of AArch64_input_section ++ ++ ++// Finalize data size. ++ ++template ++void ++AArch64_input_section::set_final_data_size() ++{ ++ off_t off = convert_types(this->original_size_); ++ ++ if (this->is_stub_table_owner()) ++ { ++ this->stub_table_->finalize_data_size(); ++ off = align_address(off, this->stub_table_->addralign()); ++ off += this->stub_table_->data_size(); ++ } ++ this->set_data_size(off); ++} ++ ++ ++// Reset address and file offset. ++ ++template ++void ++AArch64_input_section::do_reset_address_and_file_offset() ++{ ++ // Size of the original input section contents. ++ off_t off = convert_types(this->original_size_); ++ ++ // If this is a stub table owner, account for the stub table size. ++ if (this->is_stub_table_owner()) ++ { ++ The_stub_table* stub_table = this->stub_table_; ++ ++ // Reset the stub table's address and file offset. The ++ // current data size for child will be updated after that. ++ stub_table_->reset_address_and_file_offset(); ++ off = align_address(off, stub_table_->addralign()); ++ off += stub_table->current_data_size(); ++ } ++ ++ this->set_current_data_size(off); ++} ++ ++ ++// Initialize an Arm_input_section. ++ ++template ++void ++AArch64_input_section::init() ++{ ++ Relobj* relobj = this->relobj(); ++ unsigned int shndx = this->shndx(); ++ ++ // We have to cache original size, alignment and contents to avoid locking ++ // the original file. ++ this->original_addralign_ = ++ convert_types(relobj->section_addralign(shndx)); ++ ++ // This is not efficient but we expect only a small number of relaxed ++ // input sections for stubs. ++ section_size_type section_size; ++ const unsigned char* section_contents = ++ relobj->section_contents(shndx, §ion_size, false); ++ this->original_size_ = ++ convert_types(relobj->section_size(shndx)); ++ ++ gold_assert(this->original_contents_ == NULL); ++ this->original_contents_ = new unsigned char[section_size]; ++ memcpy(this->original_contents_, section_contents, section_size); ++ ++ // We want to make this look like the original input section after ++ // output sections are finalized. ++ Output_section* os = relobj->output_section(shndx); ++ off_t offset = relobj->output_section_offset(shndx); ++ gold_assert(os != NULL && !relobj->is_output_section_offset_invalid(shndx)); ++ this->set_address(os->address() + offset); ++ this->set_file_offset(os->offset() + offset); ++ this->set_current_data_size(this->original_size_); ++ this->finalize_data_size(); ++} ++ ++ ++// Write data to output file. ++ ++template ++void ++AArch64_input_section::do_write(Output_file* of) ++{ ++ // We have to write out the original section content. ++ gold_assert(this->original_contents_ != NULL); ++ of->write(this->offset(), this->original_contents_, ++ this->original_size_); ++ ++ // If this owns a stub table and it is not empty, write it. ++ if (this->is_stub_table_owner() && !this->stub_table_->empty()) ++ this->stub_table_->write(of); ++} ++ ++ ++// Arm output section class. This is defined mainly to add a number of stub ++// generation methods. ++ ++template ++class AArch64_output_section : public Output_section ++{ ++ public: ++ typedef Target_aarch64 The_target_aarch64; ++ typedef AArch64_relobj The_aarch64_relobj; ++ typedef Stub_table The_stub_table; ++ typedef AArch64_input_section The_aarch64_input_section; ++ ++ public: ++ AArch64_output_section(const char* name, elfcpp::Elf_Word type, ++ elfcpp::Elf_Xword flags) ++ : Output_section(name, type, flags) ++ { } ++ ++ ~AArch64_output_section() {} ++ ++ // Group input sections for stub generation. ++ void ++ group_sections(section_size_type, bool, Target_aarch64*, ++ const Task*); ++ ++ private: ++ typedef Output_section::Input_section Input_section; ++ typedef Output_section::Input_section_list Input_section_list; ++ ++ // Create a stub group. ++ void ++ create_stub_group(Input_section_list::const_iterator, ++ Input_section_list::const_iterator, ++ Input_section_list::const_iterator, ++ The_target_aarch64*, ++ std::vector&, ++ const Task*); ++}; // End of AArch64_output_section ++ ++ ++// Create a stub group for input sections from FIRST to LAST. OWNER points to ++// the input section that will be the owner of the stub table. ++ ++template void ++AArch64_output_section::create_stub_group( ++ Input_section_list::const_iterator first, ++ Input_section_list::const_iterator last, ++ Input_section_list::const_iterator owner, ++ The_target_aarch64* target, ++ std::vector& new_relaxed_sections, ++ const Task* task) ++{ ++ // Currently we convert ordinary input sections into relaxed sections only ++ // at this point. ++ The_aarch64_input_section* input_section; ++ if (owner->is_relaxed_input_section()) ++ gold_unreachable(); ++ else ++ { ++ gold_assert(owner->is_input_section()); ++ // Create a new relaxed input section. We need to lock the original ++ // file. ++ Task_lock_obj tl(task, owner->relobj()); ++ input_section = ++ target->new_aarch64_input_section(owner->relobj(), owner->shndx()); ++ new_relaxed_sections.push_back(input_section); ++ } ++ ++ // Create a stub table. ++ The_stub_table* stub_table = ++ target->new_stub_table(input_section); ++ ++ input_section->set_stub_table(stub_table); ++ ++ Input_section_list::const_iterator p = first; ++ // Look for input sections or relaxed input sections in [first ... last]. ++ do ++ { ++ if (p->is_input_section() || p->is_relaxed_input_section()) ++ { ++ // The stub table information for input sections live ++ // in their objects. ++ The_aarch64_relobj* aarch64_relobj = ++ static_cast(p->relobj()); ++ aarch64_relobj->set_stub_table(p->shndx(), stub_table); ++ } ++ } ++ while (p++ != last); ++} ++ ++ ++// Group input sections for stub generation. GROUP_SIZE is roughly the limit of ++// stub groups. We grow a stub group by adding input section until the size is ++// just below GROUP_SIZE. The last input section will be converted into a stub ++// table owner. If STUB_ALWAYS_AFTER_BRANCH is false, we also add input sectiond ++// after the stub table, effectively doubling the group size. ++// ++// This is similar to the group_sections() function in elf32-arm.c but is ++// implemented differently. ++ ++template ++void AArch64_output_section::group_sections( ++ section_size_type group_size, ++ bool stubs_always_after_branch, ++ Target_aarch64* target, ++ const Task* task) ++{ ++ typedef enum ++ { ++ NO_GROUP, ++ FINDING_STUB_SECTION, ++ HAS_STUB_SECTION ++ } State; ++ ++ std::vector new_relaxed_sections; ++ ++ State state = NO_GROUP; ++ section_size_type off = 0; ++ section_size_type group_begin_offset = 0; ++ section_size_type group_end_offset = 0; ++ section_size_type stub_table_end_offset = 0; ++ Input_section_list::const_iterator group_begin = ++ this->input_sections().end(); ++ Input_section_list::const_iterator stub_table = ++ this->input_sections().end(); ++ Input_section_list::const_iterator group_end = this->input_sections().end(); ++ for (Input_section_list::const_iterator p = this->input_sections().begin(); ++ p != this->input_sections().end(); ++ ++p) ++ { ++ section_size_type section_begin_offset = ++ align_address(off, p->addralign()); ++ section_size_type section_end_offset = ++ section_begin_offset + p->data_size(); ++ ++ // Check to see if we should group the previously seen sections. ++ switch (state) ++ { ++ case NO_GROUP: ++ break; ++ ++ case FINDING_STUB_SECTION: ++ // Adding this section makes the group larger than GROUP_SIZE. ++ if (section_end_offset - group_begin_offset >= group_size) ++ { ++ if (stubs_always_after_branch) ++ { ++ gold_assert(group_end != this->input_sections().end()); ++ this->create_stub_group(group_begin, group_end, group_end, ++ target, new_relaxed_sections, ++ task); ++ state = NO_GROUP; ++ } ++ else ++ { ++ // Input sections up to stub_group_size bytes after the stub ++ // table can be handled by it too. ++ state = HAS_STUB_SECTION; ++ stub_table = group_end; ++ stub_table_end_offset = group_end_offset; ++ } ++ } ++ break; ++ ++ case HAS_STUB_SECTION: ++ // Adding this section makes the post stub-section group larger ++ // than GROUP_SIZE. ++ gold_unreachable(); ++ // NOT SUPPORTED YET. For completeness only. ++ if (section_end_offset - stub_table_end_offset >= group_size) ++ { ++ gold_assert(group_end != this->input_sections().end()); ++ this->create_stub_group(group_begin, group_end, stub_table, ++ target, new_relaxed_sections, task); ++ state = NO_GROUP; ++ } ++ break; ++ ++ default: ++ gold_unreachable(); ++ } ++ ++ // If we see an input section and currently there is no group, start ++ // a new one. Skip any empty sections. We look at the data size ++ // instead of calling p->relobj()->section_size() to avoid locking. ++ if ((p->is_input_section() || p->is_relaxed_input_section()) ++ && (p->data_size() != 0)) ++ { ++ if (state == NO_GROUP) ++ { ++ state = FINDING_STUB_SECTION; ++ group_begin = p; ++ group_begin_offset = section_begin_offset; ++ } ++ ++ // Keep track of the last input section seen. ++ group_end = p; ++ group_end_offset = section_end_offset; ++ } ++ ++ off = section_end_offset; + } + +- // For a relocation against a local symbol, the local symbol index. +- unsigned int +- index() const ++ // Create a stub group for any ungrouped sections. ++ if (state == FINDING_STUB_SECTION || state == HAS_STUB_SECTION) + { +- gold_assert(!this->symbol_is_global_); +- return this->u_.local.index; ++ gold_assert(group_end != this->input_sections().end()); ++ this->create_stub_group(group_begin, group_end, ++ (state == FINDING_STUB_SECTION ++ ? group_end ++ : stub_table), ++ target, new_relaxed_sections, task); + } + +- private: +- // GOT offset of the entry to which this relocation is applied. +- unsigned int got_offset_; +- // Type of relocation. +- unsigned int r_type_; +- // Whether this relocation is against a global symbol. +- bool symbol_is_global_; +- // A global or local symbol. +- union +- { +- struct +- { +- // For a global symbol, the symbol itself. +- Symbol* symbol; +- } global; +- struct +- { +- // For a local symbol, the object defining object. +- Sized_relobj_file* relobj; +- // For a local symbol, the symbol index. +- unsigned int index; +- } local; +- } u_; +- }; // End of inner class Static_reloc ++ if (!new_relaxed_sections.empty()) ++ this->convert_input_sections_to_relaxed_sections(new_relaxed_sections); + +- std::vector static_relocs_; +-}; // End of Output_data_got_aarch64 ++ // Update the section offsets ++ for (size_t i = 0; i < new_relaxed_sections.size(); ++i) ++ { ++ The_aarch64_relobj* relobj = static_cast( ++ new_relaxed_sections[i]->relobj()); ++ unsigned int shndx = new_relaxed_sections[i]->shndx(); ++ // Tell AArch64_relobj that this input section is converted. ++ relobj->convert_input_section_to_relaxed_section(shndx); ++ } ++} // End of AArch64_output_section::group_sections + + + AArch64_reloc_property_table* aarch64_reloc_property_table = NULL; +@@ -309,10 +1627,23 @@ template + class Target_aarch64 : public Sized_target + { + public: +- typedef Target_aarch64 This; ++ typedef Target_aarch64 This; + typedef Output_data_reloc + Reloc_section; ++ typedef Relocate_info The_relocate_info; + typedef typename elfcpp::Elf_types::Elf_Addr Address; ++ typedef AArch64_relobj The_aarch64_relobj; ++ typedef Reloc_stub The_reloc_stub; ++ typedef typename The_reloc_stub::Stub_type The_reloc_stub_type; ++ typedef typename Reloc_stub::Key The_reloc_stub_key; ++ typedef Stub_table The_stub_table; ++ typedef std::vector Stub_table_list; ++ typedef typename Stub_table_list::iterator Stub_table_iterator; ++ typedef AArch64_input_section The_aarch64_input_section; ++ typedef AArch64_output_section The_aarch64_output_section; ++ typedef Unordered_map*, ++ Section_id_hash> AArch64_input_section_map; + const static int TCB_SIZE = size / 8 * 2; + + Target_aarch64(const Target::Target_info* info = &aarch64_info) +@@ -320,8 +1651,9 @@ class Target_aarch64 : public Sized_targ + got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL), + got_tlsdesc_(NULL), global_offset_table_(NULL), rela_dyn_(NULL), + rela_irelative_(NULL), copy_relocs_(elfcpp::R_AARCH64_COPY), +- got_mod_index_offset_(-1U), tlsdesc_reloc_info_(), +- tls_base_symbol_defined_(false) ++ got_mod_index_offset_(-1U), ++ tlsdesc_reloc_info_(), tls_base_symbol_defined_(false), ++ stub_tables_(), aarch64_input_section_map_() + { } + + // Scan the relocations to determine unreferenced sections for +@@ -442,9 +1774,59 @@ class Target_aarch64 : public Sized_targ + unsigned int + plt_entry_size() const; + ++ // Create a stub table. ++ The_stub_table* ++ new_stub_table(The_aarch64_input_section*); ++ ++ // Create an aarch64 input section. ++ The_aarch64_input_section* ++ new_aarch64_input_section(Relobj*, unsigned int); ++ ++ // Find an aarch64 input section instance for a given OBJ and SHNDX. ++ The_aarch64_input_section* ++ find_aarch64_input_section(Relobj*, unsigned int) const; ++ ++ // Return the thread control block size. + unsigned int + tcb_size() const { return This::TCB_SIZE; } + ++ // Scan a section for stub generation. ++ void ++ scan_section_for_stubs(const Relocate_info*, unsigned int, ++ const unsigned char*, size_t, Output_section*, ++ bool, const unsigned char*, ++ Address, ++ section_size_type); ++ ++ // Scan a relocation section for stub. ++ template ++ void ++ scan_reloc_section_for_stubs( ++ const The_relocate_info* relinfo, ++ const unsigned char* prelocs, ++ size_t reloc_count, ++ Output_section* output_section, ++ bool needs_special_offset_handling, ++ const unsigned char* view, ++ Address view_address, ++ section_size_type); ++ ++ // Relocate a single stub. ++ void ++ relocate_stub(The_reloc_stub*, const Relocate_info*, ++ Output_section*, unsigned char*, Address, ++ section_size_type); ++ ++ // Get the default AArch64 target. ++ static This* ++ current_target() ++ { ++ gold_assert(parameters->target().machine_code() == elfcpp::EM_AARCH64 ++ && parameters->target().get_size() == size ++ && parameters->target().is_big_endian() == big_endian); ++ return static_cast(parameters->sized_target()); ++ } ++ + protected: + void + do_select_as_default_target() +@@ -472,6 +1854,12 @@ class Target_aarch64 : public Sized_targ + layout, got, got_plt, got_irelative); + } + ++ ++ // do_make_elf_object to override the same function in the base class. ++ Object* ++ do_make_elf_object(const std::string&, Input_file*, off_t, ++ const elfcpp::Ehdr&); ++ + Output_data_plt_aarch64* + make_data_plt(Layout* layout, + Output_data_got_aarch64* got, +@@ -481,6 +1869,35 @@ class Target_aarch64 : public Sized_targ + return this->do_make_data_plt(layout, got, got_plt, got_irelative); + } + ++ // We only need to generate stubs, and hence perform relaxation if we are ++ // not doing relocatable linking. ++ virtual bool ++ do_may_relax() const ++ { return !parameters->options().relocatable(); } ++ ++ // Relaxation hook. This is where we do stub generation. ++ virtual bool ++ do_relax(int, const Input_objects*, Symbol_table*, Layout*, const Task*); ++ ++ void ++ group_sections(Layout* layout, ++ section_size_type group_size, ++ bool stubs_always_after_branch, ++ const Task* task); ++ ++ void ++ scan_reloc_for_stub(const The_relocate_info*, unsigned int, ++ const Sized_symbol*, unsigned int, ++ const Symbol_value*, ++ typename elfcpp::Elf_types::Elf_Swxword, ++ Address Elf_Addr); ++ ++ // Make an output section. ++ Output_section* ++ do_make_output_section(const char* name, elfcpp::Elf_Word type, ++ elfcpp::Elf_Xword flags) ++ { return new The_aarch64_output_section(name, type, flags); } ++ + private: + // The class which scans relocations. + class Scan +@@ -569,8 +1986,8 @@ class Target_aarch64 : public Sized_targ + section_size_type); + + private: +- inline typename AArch64_relocate_functions::Status +- relocate_tls(const Relocate_info*, ++ inline typename AArch64_relocate_functions::Status ++ relocate_tls(const Relocate_info*, + Target_aarch64*, + size_t, + const elfcpp::Rela&, +@@ -579,36 +1996,36 @@ class Target_aarch64 : public Sized_targ + unsigned char*, + typename elfcpp::Elf_types::Elf_Addr); + +- inline typename AArch64_relocate_functions::Status ++ inline typename AArch64_relocate_functions::Status + tls_gd_to_le( +- const Relocate_info*, ++ const Relocate_info*, + Target_aarch64*, + const elfcpp::Rela&, + unsigned int, + unsigned char*, + const Symbol_value*); + +- inline typename AArch64_relocate_functions::Status ++ inline typename AArch64_relocate_functions::Status + tls_ie_to_le( +- const Relocate_info*, ++ const Relocate_info*, + Target_aarch64*, + const elfcpp::Rela&, + unsigned int, + unsigned char*, + const Symbol_value*); + +- inline typename AArch64_relocate_functions::Status ++ inline typename AArch64_relocate_functions::Status + tls_desc_gd_to_le( +- const Relocate_info*, ++ const Relocate_info*, + Target_aarch64*, + const elfcpp::Rela&, + unsigned int, + unsigned char*, + const Symbol_value*); + +- inline typename AArch64_relocate_functions::Status ++ inline typename AArch64_relocate_functions::Status + tls_desc_gd_to_ie( +- const Relocate_info*, ++ const Relocate_info*, + Target_aarch64*, + const elfcpp::Rela&, + unsigned int, +@@ -773,6 +2190,9 @@ class Target_aarch64 : public Sized_targ + std::vector tlsdesc_reloc_info_; + // True if the _TLS_MODULE_BASE_ symbol has been defined. + bool tls_base_symbol_defined_; ++ // List of stub_tables ++ Stub_table_list stub_tables_; ++ AArch64_input_section_map aarch64_input_section_map_; + }; // End of Target_aarch64 + + +@@ -1022,6 +2442,407 @@ Target_aarch64::rela_i + } + + ++// do_make_elf_object to override the same function in the base class. We need ++// to use a target-specific sub-class of Sized_relobj_file to ++// store backend specific information. Hence we need to have our own ELF object ++// creation. ++ ++template ++Object* ++Target_aarch64::do_make_elf_object( ++ const std::string& name, ++ Input_file* input_file, ++ off_t offset, const elfcpp::Ehdr& ehdr) ++{ ++ int et = ehdr.get_e_type(); ++ // ET_EXEC files are valid input for --just-symbols/-R, ++ // and we treat them as relocatable objects. ++ if (et == elfcpp::ET_EXEC && input_file->just_symbols()) ++ return Sized_target::do_make_elf_object( ++ name, input_file, offset, ehdr); ++ else if (et == elfcpp::ET_REL) ++ { ++ AArch64_relobj* obj = ++ new AArch64_relobj(name, input_file, offset, ehdr); ++ obj->setup(); ++ return obj; ++ } ++ else if (et == elfcpp::ET_DYN) ++ { ++ // Keep base implementation. ++ Sized_dynobj* obj = ++ new Sized_dynobj(name, input_file, offset, ehdr); ++ obj->setup(); ++ return obj; ++ } ++ else ++ { ++ gold_error(_("%s: unsupported ELF file type %d"), ++ name.c_str(), et); ++ return NULL; ++ } ++} ++ ++ ++// Scan a relocation for stub generation. ++ ++template ++void ++Target_aarch64::scan_reloc_for_stub( ++ const Relocate_info* relinfo, ++ unsigned int r_type, ++ const Sized_symbol* gsym, ++ unsigned int r_sym, ++ const Symbol_value* psymval, ++ typename elfcpp::Elf_types::Elf_Swxword addend, ++ Address address) ++{ ++ const AArch64_relobj* aarch64_relobj = ++ static_cast*>(relinfo->object); ++ ++ Symbol_value symval; ++ if (gsym != NULL) ++ { ++ const AArch64_reloc_property* arp = aarch64_reloc_property_table-> ++ get_reloc_property(r_type); ++ if (gsym->use_plt_offset(arp->reference_flags())) ++ { ++ // This uses a PLT, change the symbol value. ++ symval.set_output_value(this->plt_section()->address() ++ + gsym->plt_offset()); ++ psymval = &symval; ++ } ++ else if (gsym->is_undefined()) ++ // There is no need to generate a stub symbol is undefined. ++ return; ++ } ++ ++ // Get the symbol value. ++ typename Symbol_value::Value value = psymval->value(aarch64_relobj, 0); ++ ++ // Owing to pipelining, the PC relative branches below actually skip ++ // two instructions when the branch offset is 0. ++ Address destination = static_cast
(-1); ++ switch (r_type) ++ { ++ case elfcpp::R_AARCH64_CALL26: ++ case elfcpp::R_AARCH64_JUMP26: ++ destination = value + addend; ++ break; ++ default: ++ gold_assert(false); ++ } ++ ++ typename The_reloc_stub::Stub_type stub_type = The_reloc_stub:: ++ stub_type_for_reloc(r_type, address, destination); ++ if (stub_type == The_reloc_stub::ST_NONE) ++ return ; ++ ++ The_stub_table* stub_table = aarch64_relobj->stub_table(relinfo->data_shndx); ++ gold_assert(stub_table != NULL); ++ ++ The_reloc_stub_key key(stub_type, gsym, aarch64_relobj, r_sym, addend); ++ The_reloc_stub* stub = stub_table->find_reloc_stub(key); ++ if (stub == NULL) ++ { ++ stub = new The_reloc_stub(stub_type); ++ stub_table->add_reloc_stub(stub, key); ++ } ++ stub->set_destination_address(destination); ++} // End of Target_aarch64::scan_reloc_for_stub ++ ++ ++// This function scans a relocation section for stub generation. ++// The template parameter Relocate must be a class type which provides ++// a single function, relocate(), which implements the machine ++// specific part of a relocation. ++ ++// BIG_ENDIAN is the endianness of the data. SH_TYPE is the section type: ++// SHT_REL or SHT_RELA. ++ ++// PRELOCS points to the relocation data. RELOC_COUNT is the number ++// of relocs. OUTPUT_SECTION is the output section. ++// NEEDS_SPECIAL_OFFSET_HANDLING is true if input offsets need to be ++// mapped to output offsets. ++ ++// VIEW is the section data, VIEW_ADDRESS is its memory address, and ++// VIEW_SIZE is the size. These refer to the input section, unless ++// NEEDS_SPECIAL_OFFSET_HANDLING is true, in which case they refer to ++// the output section. ++ ++template ++template ++void inline ++Target_aarch64::scan_reloc_section_for_stubs( ++ const Relocate_info* relinfo, ++ const unsigned char* prelocs, ++ size_t reloc_count, ++ Output_section* /*output_section*/, ++ bool /*needs_special_offset_handling*/, ++ const unsigned char* /*view*/, ++ Address view_address, ++ section_size_type) ++{ ++ typedef typename Reloc_types::Reloc Reltype; ++ ++ const int reloc_size = ++ Reloc_types::reloc_size; ++ AArch64_relobj* object = ++ static_cast*>(relinfo->object); ++ unsigned int local_count = object->local_symbol_count(); ++ ++ gold::Default_comdat_behavior default_comdat_behavior; ++ Comdat_behavior comdat_behavior = CB_UNDETERMINED; ++ ++ for (size_t i = 0; i < reloc_count; ++i, prelocs += reloc_size) ++ { ++ Reltype reloc(prelocs); ++ typename elfcpp::Elf_types::Elf_WXword r_info = reloc.get_r_info(); ++ unsigned int r_sym = elfcpp::elf_r_sym(r_info); ++ unsigned int r_type = elfcpp::elf_r_type(r_info); ++ if (r_type != elfcpp::R_AARCH64_CALL26 ++ && r_type != elfcpp::R_AARCH64_JUMP26) ++ continue; ++ ++ section_offset_type offset = ++ convert_to_section_size_type(reloc.get_r_offset()); ++ ++ // Get the addend. ++ typename elfcpp::Elf_types::Elf_Swxword addend = ++ reloc.get_r_addend(); ++ ++ const Sized_symbol* sym; ++ Symbol_value symval; ++ const Symbol_value *psymval; ++ bool is_defined_in_discarded_section; ++ unsigned int shndx; ++ if (r_sym < local_count) ++ { ++ sym = NULL; ++ psymval = object->local_symbol(r_sym); ++ ++ // If the local symbol belongs to a section we are discarding, ++ // and that section is a debug section, try to find the ++ // corresponding kept section and map this symbol to its ++ // counterpart in the kept section. The symbol must not ++ // correspond to a section we are folding. ++ bool is_ordinary; ++ shndx = psymval->input_shndx(&is_ordinary); ++ is_defined_in_discarded_section = ++ (is_ordinary ++ && shndx != elfcpp::SHN_UNDEF ++ && !object->is_section_included(shndx) ++ && !relinfo->symtab->is_section_folded(object, shndx)); ++ ++ // We need to compute the would-be final value of this local ++ // symbol. ++ if (!is_defined_in_discarded_section) ++ { ++ typedef Sized_relobj_file ObjType; ++ typename ObjType::Compute_final_local_value_status status = ++ object->compute_final_local_value(r_sym, psymval, &symval, ++ relinfo->symtab); ++ if (status == ObjType::CFLV_OK) ++ { ++ // Currently we cannot handle a branch to a target in ++ // a merged section. If this is the case, issue an error ++ // and also free the merge symbol value. ++ if (!symval.has_output_value()) ++ { ++ const std::string& section_name = ++ object->section_name(shndx); ++ object->error(_("cannot handle branch to local %u " ++ "in a merged section %s"), ++ r_sym, section_name.c_str()); ++ } ++ psymval = &symval; ++ } ++ else ++ { ++ // We cannot determine the final value. ++ continue; ++ } ++ } ++ } ++ else ++ { ++ const Symbol* gsym; ++ gsym = object->global_symbol(r_sym); ++ gold_assert(gsym != NULL); ++ if (gsym->is_forwarder()) ++ gsym = relinfo->symtab->resolve_forwards(gsym); ++ ++ sym = static_cast*>(gsym); ++ if (sym->has_symtab_index() && sym->symtab_index() != -1U) ++ symval.set_output_symtab_index(sym->symtab_index()); ++ else ++ symval.set_no_output_symtab_entry(); ++ ++ // We need to compute the would-be final value of this global ++ // symbol. ++ const Symbol_table* symtab = relinfo->symtab; ++ const Sized_symbol* sized_symbol = ++ symtab->get_sized_symbol(gsym); ++ Symbol_table::Compute_final_value_status status; ++ typename elfcpp::Elf_types::Elf_Addr value = ++ symtab->compute_final_value(sized_symbol, &status); ++ ++ // Skip this if the symbol has not output section. ++ if (status == Symbol_table::CFVS_NO_OUTPUT_SECTION) ++ continue; ++ symval.set_output_value(value); ++ ++ if (gsym->type() == elfcpp::STT_TLS) ++ symval.set_is_tls_symbol(); ++ else if (gsym->type() == elfcpp::STT_GNU_IFUNC) ++ symval.set_is_ifunc_symbol(); ++ psymval = &symval; ++ ++ is_defined_in_discarded_section = ++ (gsym->is_defined_in_discarded_section() ++ && gsym->is_undefined()); ++ shndx = 0; ++ } ++ ++ Symbol_value symval2; ++ if (is_defined_in_discarded_section) ++ { ++ if (comdat_behavior == CB_UNDETERMINED) ++ { ++ std::string name = object->section_name(relinfo->data_shndx); ++ comdat_behavior = default_comdat_behavior.get(name.c_str()); ++ } ++ if (comdat_behavior == CB_PRETEND) ++ { ++ bool found; ++ typename elfcpp::Elf_types::Elf_Addr value = ++ object->map_to_kept_section(shndx, &found); ++ if (found) ++ symval2.set_output_value(value + psymval->input_value()); ++ else ++ symval2.set_output_value(0); ++ } ++ else ++ { ++ if (comdat_behavior == CB_WARNING) ++ gold_warning_at_location(relinfo, i, offset, ++ _("relocation refers to discarded " ++ "section")); ++ symval2.set_output_value(0); ++ } ++ symval2.set_no_output_symtab_entry(); ++ psymval = &symval2; ++ } ++ ++ // If symbol is a section symbol, we don't know the actual type of ++ // destination. Give up. ++ if (psymval->is_section_symbol()) ++ continue; ++ ++ this->scan_reloc_for_stub(relinfo, r_type, sym, r_sym, psymval, ++ addend, view_address + offset); ++ } // End of iterating relocs in a section ++} // End of Target_aarch64::scan_reloc_section_for_stubs ++ ++ ++// Scan an input section for stub generation. ++ ++template ++void ++Target_aarch64::scan_section_for_stubs( ++ const Relocate_info* relinfo, ++ unsigned int sh_type, ++ const unsigned char* prelocs, ++ size_t reloc_count, ++ Output_section* output_section, ++ bool needs_special_offset_handling, ++ const unsigned char* view, ++ Address view_address, ++ section_size_type view_size) ++{ ++ gold_assert(sh_type == elfcpp::SHT_RELA); ++ this->scan_reloc_section_for_stubs( ++ relinfo, ++ prelocs, ++ reloc_count, ++ output_section, ++ needs_special_offset_handling, ++ view, ++ view_address, ++ view_size); ++} ++ ++ ++// Relocate a single stub. ++ ++template ++void Target_aarch64:: ++relocate_stub(The_reloc_stub* stub, ++ const The_relocate_info*, ++ Output_section*, ++ unsigned char* view, ++ Address address, ++ section_size_type) ++{ ++ typedef AArch64_relocate_functions The_reloc_functions; ++ typedef typename The_reloc_functions::Status The_reloc_functions_status; ++ typedef typename elfcpp::Swap<32,big_endian>::Valtype Insntype; ++ ++ Insntype* ip = reinterpret_cast(view); ++ int insn_number = stub->stub_insn_number(); ++ const uint32_t* insns = stub->stub_insns(); ++ // Check the insns are really those stub insns. ++ for (int i = 0; i < insn_number; ++i) ++ { ++ Insntype insn = elfcpp::Swap<32,big_endian>::readval(ip + i); ++ gold_assert(((uint32_t)insn == insns[i+1])); ++ } ++ ++ Address dest = stub->destination_address(); ++ ++ switch(stub->stub_type()) ++ { ++ case The_reloc_stub::ST_ADRP_BRANCH: ++ { ++ // 1st reloc is ADR_PREL_PG_HI21 ++ The_reloc_functions_status status = ++ The_reloc_functions::adrp(view, dest, address); ++ // An error should never arise in the above step. If so, please ++ // check 'aarch64_valid_for_adrp_p'. ++ gold_assert(status == The_reloc_functions::STATUS_OKAY); ++ ++ // 2nd reloc is ADD_ABS_LO12_NC ++ const AArch64_reloc_property* arp = ++ aarch64_reloc_property_table->get_reloc_property( ++ elfcpp::R_AARCH64_ADD_ABS_LO12_NC); ++ gold_assert(arp != NULL); ++ status = The_reloc_functions::template ++ rela_general<32>(view + 4, dest, 0, arp); ++ // An error should never arise, it is an "_NC" relocation. ++ gold_assert(status == The_reloc_functions::STATUS_OKAY); ++ } ++ break; ++ ++ case The_reloc_stub::ST_LONG_BRANCH_ABS: ++ // 1st reloc is R_AARCH64_PREL64, at offset 8 ++ elfcpp::Swap<64,big_endian>::writeval(view + 8, dest); ++ break; ++ ++ case The_reloc_stub::ST_LONG_BRANCH_PCREL: ++ { ++ // "PC" calculation is the 2nd insn in the stub. ++ uint64_t offset = dest - (address + 4); ++ // Offset is placed at offset 4 and 5. ++ elfcpp::Swap<64,big_endian>::writeval(view + 16, offset); ++ } ++ break; ++ ++ default: ++ gold_assert(false); ++ } ++} ++ ++ + // A class to handle the PLT data. + // This is an abstract base class that handles most of the linker details + // but does not know the actual contents of PLT entries. The derived +@@ -1477,6 +3298,7 @@ Output_data_plt_aarch64_standard<32, fal + 0xd503201f, /* nop */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<32, true>:: +@@ -1492,6 +3314,7 @@ Output_data_plt_aarch64_standard<32, tru + 0xd503201f, /* nop */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<64, false>:: +@@ -1507,6 +3330,7 @@ Output_data_plt_aarch64_standard<64, fal + 0xd503201f, /* nop */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<64, true>:: +@@ -1522,6 +3346,7 @@ Output_data_plt_aarch64_standard<64, tru + 0xd503201f, /* nop */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<32, false>:: +@@ -1533,6 +3358,7 @@ Output_data_plt_aarch64_standard<32, fal + 0xd61f0220, /* br x17. */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<32, true>:: +@@ -1544,6 +3370,7 @@ Output_data_plt_aarch64_standard<32, tru + 0xd61f0220, /* br x17. */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<64, false>:: +@@ -1555,6 +3382,7 @@ Output_data_plt_aarch64_standard<64, fal + 0xd61f0220, /* br x17. */ + }; + ++ + template<> + const uint32_t + Output_data_plt_aarch64_standard<64, true>:: +@@ -1566,6 +3394,7 @@ Output_data_plt_aarch64_standard<64, tru + 0xd61f0220, /* br x17. */ + }; + ++ + template + void + Output_data_plt_aarch64_standard::do_fill_first_plt_entry( +@@ -1605,6 +3434,7 @@ Output_data_plt_aarch64_standard This; + typedef typename elfcpp::Elf_types::Elf_Addr Address; ++ typedef Relocate_info The_relocate_info; ++ typedef AArch64_relobj The_aarch64_relobj; ++ typedef Reloc_stub The_reloc_stub; ++ typedef typename The_reloc_stub::Stub_type The_reloc_stub_type; ++ typedef Stub_table The_stub_table; ++ typedef elfcpp::Rela The_rela; + + // Return the page address of the address. + // Page(address) = address & ~0xFFF +@@ -1872,6 +3707,7 @@ class AArch64_relocate_functions + return (address & (~static_cast
(0xFFF))); + } + ++ private: + // Update instruction (pointed by view) with selected bits (immed). + // val = (val & ~dst_mask) | (immed << doffset) + +@@ -2042,7 +3878,7 @@ class AArch64_relocate_functions + const AArch64_reloc_property* reloc_property) + { + // Calculate relocation. +- Address x = psymval->value(object, addend); ++ Address x = psymval->value(object, addend); + + // Select bits from X. + Address immed = reloc_property->select_x_value(x); +@@ -2144,9 +3980,10 @@ class AArch64_relocate_functions + Address address) + { + typename elfcpp::Swap::Valtype x = +- This::Page(sa) - This::Page(address); ++ This::Page(sa) - This::Page(address); + update_adr(view, x, NULL); +- return (size == 64 && Bits<32>::has_overflow(x) ++ // Check -2^32 <= X < 2^32 ++ return (size == 64 && Bits<33>::has_overflow((x)) + ? This::STATUS_OVERFLOW + : This::STATUS_OKAY); + } +@@ -2200,9 +4037,248 @@ class AArch64_relocate_functions + : This::STATUS_OVERFLOW); + } + ++ static inline bool ++ maybe_apply_stub(unsigned int, ++ const The_relocate_info*, ++ const The_rela&, ++ unsigned char*, ++ Address, ++ const Sized_symbol*, ++ const Symbol_value*, ++ const Sized_relobj_file*); ++ + }; // End of AArch64_relocate_functions + + ++// For a certain relocation type (usually jump/branch), test to see if the ++// destination needs a stub to fulfil. If so, re-route the destination of the ++// original instruction to the stub, note, at this time, the stub has already ++// been generated. ++ ++template ++bool ++AArch64_relocate_functions:: ++maybe_apply_stub(unsigned int r_type, ++ const The_relocate_info* relinfo, ++ const The_rela& rela, ++ unsigned char* view, ++ Address address, ++ const Sized_symbol* gsym, ++ const Symbol_value* psymval, ++ const Sized_relobj_file* object) ++{ ++ if (parameters->options().relocatable()) ++ return false; ++ ++ typename elfcpp::Elf_types::Elf_Swxword addend = rela.get_r_addend(); ++ Address branch_target = psymval->value(object, 0) + addend; ++ The_reloc_stub_type stub_type = The_reloc_stub:: ++ stub_type_for_reloc(r_type, address, branch_target); ++ if (stub_type == The_reloc_stub::ST_NONE) ++ return false; ++ ++ const The_aarch64_relobj* aarch64_relobj = ++ static_cast(object); ++ The_stub_table* stub_table = aarch64_relobj->stub_table(relinfo->data_shndx); ++ gold_assert(stub_table != NULL); ++ ++ unsigned int r_sym = elfcpp::elf_r_sym(rela.get_r_info()); ++ typename The_reloc_stub::Key stub_key(stub_type, gsym, object, r_sym, addend); ++ The_reloc_stub* stub = stub_table->find_reloc_stub(stub_key); ++ gold_assert(stub != NULL); ++ ++ Address new_branch_target = stub_table->address() + stub->offset(); ++ typename elfcpp::Swap::Valtype branch_offset = ++ new_branch_target - address; ++ const AArch64_reloc_property* arp = ++ aarch64_reloc_property_table->get_reloc_property(r_type); ++ gold_assert(arp != NULL); ++ This::Status status = This::template ++ rela_general<32>(view, branch_offset, 0, arp); ++ if (status != This::STATUS_OKAY) ++ gold_error(_("Stub is too far away, try a smaller value " ++ "for '--stub-group-size'. For example, 0x2000000.")); ++ return true; ++} ++ ++ ++// Group input sections for stub generation. ++// ++// We group input sections in an output section so that the total size, ++// including any padding space due to alignment is smaller than GROUP_SIZE ++// unless the only input section in group is bigger than GROUP_SIZE already. ++// Then an ARM stub table is created to follow the last input section ++// in group. For each group an ARM stub table is created an is placed ++// after the last group. If STUB_ALWAYS_AFTER_BRANCH is false, we further ++// extend the group after the stub table. ++ ++template ++void ++Target_aarch64::group_sections( ++ Layout* layout, ++ section_size_type group_size, ++ bool stubs_always_after_branch, ++ const Task* task) ++{ ++ // Group input sections and insert stub table ++ Layout::Section_list section_list; ++ layout->get_executable_sections(§ion_list); ++ for (Layout::Section_list::const_iterator p = section_list.begin(); ++ p != section_list.end(); ++ ++p) ++ { ++ AArch64_output_section* output_section = ++ static_cast*>(*p); ++ output_section->group_sections(group_size, stubs_always_after_branch, ++ this, task); ++ } ++} ++ ++ ++// Find the AArch64_input_section object corresponding to the SHNDX-th input ++// section of RELOBJ. ++ ++template ++AArch64_input_section* ++Target_aarch64::find_aarch64_input_section( ++ Relobj* relobj, unsigned int shndx) const ++{ ++ Section_id sid(relobj, shndx); ++ typename AArch64_input_section_map::const_iterator p = ++ this->aarch64_input_section_map_.find(sid); ++ return (p != this->aarch64_input_section_map_.end()) ? p->second : NULL; ++} ++ ++ ++// Make a new AArch64_input_section object. ++ ++template ++AArch64_input_section* ++Target_aarch64::new_aarch64_input_section( ++ Relobj* relobj, unsigned int shndx) ++{ ++ Section_id sid(relobj, shndx); ++ ++ AArch64_input_section* input_section = ++ new AArch64_input_section(relobj, shndx); ++ input_section->init(); ++ ++ // Register new AArch64_input_section in map for look-up. ++ std::pair ins = ++ this->aarch64_input_section_map_.insert( ++ std::make_pair(sid, input_section)); ++ ++ // Make sure that it we have not created another AArch64_input_section ++ // for this input section already. ++ gold_assert(ins.second); ++ ++ return input_section; ++} ++ ++ ++// Relaxation hook. This is where we do stub generation. ++ ++template ++bool ++Target_aarch64::do_relax( ++ int pass, ++ const Input_objects* input_objects, ++ Symbol_table* symtab, ++ Layout* layout , ++ const Task* task) ++{ ++ gold_assert(!parameters->options().relocatable()); ++ if (pass == 1) ++ { ++ section_size_type stub_group_size = ++ parameters->options().stub_group_size(); ++ if (stub_group_size == 1) ++ { ++ // Leave room for 4096 4-byte stub entries. If we exceed that, then we ++ // will fail to link. The user will have to relink with an explicit ++ // group size option. ++ stub_group_size = The_reloc_stub::MAX_BRANCH_OFFSET - 4096 * 4; ++ } ++ group_sections(layout, stub_group_size, true, task); ++ } ++ else ++ { ++ // If this is not the first pass, addresses and file offsets have ++ // been reset at this point, set them here. ++ for (Stub_table_iterator sp = this->stub_tables_.begin(); ++ sp != this->stub_tables_.end(); ++sp) ++ { ++ The_stub_table* stt = *sp; ++ The_aarch64_input_section* owner = stt->owner(); ++ off_t off = align_address(owner->original_size(), ++ stt->addralign()); ++ stt->set_address_and_file_offset(owner->address() + off, ++ owner->offset() + off); ++ } ++ } ++ ++ // Scan relocs for relocation stubs ++ for (Input_objects::Relobj_iterator op = input_objects->relobj_begin(); ++ op != input_objects->relobj_end(); ++ ++op) ++ { ++ The_aarch64_relobj* aarch64_relobj = ++ static_cast(*op); ++ // Lock the object so we can read from it. This is only called ++ // single-threaded from Layout::finalize, so it is OK to lock. ++ Task_lock_obj tl(task, aarch64_relobj); ++ aarch64_relobj->scan_sections_for_stubs(this, symtab, layout); ++ } ++ ++ bool any_stub_table_changed = false; ++ for (Stub_table_iterator siter = this->stub_tables_.begin(); ++ siter != this->stub_tables_.end() && !any_stub_table_changed; ++siter) ++ { ++ The_stub_table* stub_table = *siter; ++ if (stub_table->update_data_size_changed_p()) ++ { ++ The_aarch64_input_section* owner = stub_table->owner(); ++ uint64_t address = owner->address(); ++ off_t offset = owner->offset(); ++ owner->reset_address_and_file_offset(); ++ owner->set_address_and_file_offset(address, offset); ++ ++ any_stub_table_changed = true; ++ } ++ } ++ ++ // Do not continue relaxation. ++ bool continue_relaxation = any_stub_table_changed; ++ if (!continue_relaxation) ++ for (Stub_table_iterator sp = this->stub_tables_.begin(); ++ (sp != this->stub_tables_.end()); ++ ++sp) ++ (*sp)->finalize_stubs(); ++ ++ return continue_relaxation; ++} ++ ++ ++// Make a new Stub_table. ++ ++template ++Stub_table* ++Target_aarch64::new_stub_table( ++ AArch64_input_section* owner) ++{ ++ Stub_table* stub_table = ++ new Stub_table(owner); ++ stub_table->set_address(align_address( ++ owner->address() + owner->data_size(), 8)); ++ stub_table->set_file_offset(owner->offset() + owner->data_size()); ++ stub_table->finalize_data_size(); ++ ++ this->stub_tables_.push_back(stub_table); ++ ++ return stub_table; ++} ++ ++ + template + typename elfcpp::Elf_types::Elf_Addr + Target_aarch64::do_reloc_addend( +@@ -3121,14 +5197,15 @@ Target_aarch64::scan_r + // pointers across shared library boundaries, as described in the + // processor specific ABI supplement. + +-template ++template + uint64_t +-Target_aarch64::do_dynsym_value(const Symbol* gsym) const ++Target_aarch64::do_dynsym_value(const Symbol* gsym) const + { + gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset()); + return this->plt_address_for_global(gsym); + } + ++ + // Finalize the sections. + + template +@@ -3352,14 +5429,17 @@ Target_aarch64::Reloca + case elfcpp::R_AARCH64_PREL64: + reloc_status = Reloc::template pcrela_ua<64>( + view, object, psymval, addend, address, reloc_property); ++ break; + + case elfcpp::R_AARCH64_PREL32: + reloc_status = Reloc::template pcrela_ua<32>( + view, object, psymval, addend, address, reloc_property); ++ break; + + case elfcpp::R_AARCH64_PREL16: + reloc_status = Reloc::template pcrela_ua<16>( + view, object, psymval, addend, address, reloc_property); ++ break; + + case elfcpp::R_AARCH64_ADR_PREL_PG_HI21_NC: + case elfcpp::R_AARCH64_ADR_PREL_PG_HI21: +@@ -3391,10 +5471,14 @@ Target_aarch64::Reloca + // Return false to stop further processing this reloc. + return false; + } +- // Continue. ++ // Fallthrough ++ case elfcpp::R_AARCH64_JUMP26: ++ if (Reloc::maybe_apply_stub(r_type, relinfo, rela, view, address, ++ gsym, psymval, object)) ++ break; ++ // Fallthrough + case elfcpp::R_AARCH64_TSTBR14: + case elfcpp::R_AARCH64_CONDBR19: +- case elfcpp::R_AARCH64_JUMP26: + reloc_status = Reloc::template pcrela_general<32>( + view, object, psymval, addend, address, reloc_property); + break; +@@ -3477,9 +5561,9 @@ Target_aarch64::Reloca + + template + inline +-typename AArch64_relocate_functions::Status ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::relocate_tls( +- const Relocate_info* relinfo, ++ const Relocate_info* relinfo, + Target_aarch64* target, + size_t relnum, + const elfcpp::Rela& rela, +@@ -3488,7 +5572,7 @@ Target_aarch64::Reloca + unsigned char* view, + typename elfcpp::Elf_types::Elf_Addr address) + { +- typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; + typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; + + Output_segment* tls_segment = relinfo->layout->tls_segment(); +@@ -3503,7 +5587,7 @@ Target_aarch64::Reloca + tls::Tls_optimization tlsopt = Target_aarch64:: + optimize_tls_reloc(is_final, r_type); + +- Sized_relobj_file* object = relinfo->object; ++ Sized_relobj_file* object = relinfo->object; + int tls_got_offset_type; + switch (r_type) + { +@@ -3733,16 +5817,16 @@ Target_aarch64::Reloca + + template + inline +-typename AArch64_relocate_functions::Status ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::tls_gd_to_le( +- const Relocate_info* relinfo, ++ const Relocate_info* relinfo, + Target_aarch64* target, + const elfcpp::Rela& rela, + unsigned int r_type, + unsigned char* view, + const Symbol_value* psymval) + { +- typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; + typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; + typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; + +@@ -3833,9 +5917,9 @@ Target_aarch64::Reloca + + template + inline +-typename AArch64_relocate_functions::Status ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::tls_ie_to_le( +- const Relocate_info* relinfo, ++ const Relocate_info* relinfo, + Target_aarch64* target, + const elfcpp::Rela& rela, + unsigned int r_type, +@@ -3844,7 +5928,7 @@ Target_aarch64::Reloca + { + typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; + typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; +- typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; + + AArch64_address value = psymval->value(relinfo->object, 0); + Output_segment* tls_segment = relinfo->layout->tls_segment(); +@@ -3888,9 +5972,9 @@ Target_aarch64::Reloca + + template + inline +-typename AArch64_relocate_functions::Status ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::tls_desc_gd_to_le( +- const Relocate_info* relinfo, ++ const Relocate_info* relinfo, + Target_aarch64* target, + const elfcpp::Rela& rela, + unsigned int r_type, +@@ -3899,7 +5983,7 @@ Target_aarch64::Reloca + { + typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; + typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; +- typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; + + // TLSDESC-GD sequence is like: + // adrp x0, :tlsdesc:v1 +@@ -3961,9 +6045,9 @@ Target_aarch64::Reloca + + template + inline +-typename AArch64_relocate_functions::Status ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::tls_desc_gd_to_ie( +- const Relocate_info* /* relinfo */, ++ const Relocate_info* /* relinfo */, + Target_aarch64* /* target */, + const elfcpp::Rela& rela, + unsigned int r_type, +@@ -3973,7 +6057,7 @@ Target_aarch64::Reloca + typename elfcpp::Elf_types::Elf_Addr address) + { + typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; +- typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; + + // TLSDESC-GD sequence is like: + // adrp x0, :tlsdesc:v1 +@@ -4143,6 +6227,7 @@ Target_aarch64::reloca + reloc_view_size); + } + ++ + // The selector for aarch64 object files. + + template --- binutils-2.25.1.orig/debian/patches/aarch64-gold-updates2.diff +++ binutils-2.25.1/debian/patches/aarch64-gold-updates2.diff @@ -0,0 +1,1285 @@ +# DP: gold: Misc updates for the aarch64 backend + +Index: b/gold/ChangeLog +=================================================================== +--- a/gold/ChangeLog ++++ b/gold/ChangeLog +@@ -59,6 +59,66 @@ + + * powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters. + ++2014-10-29 Han Shen ++ Jing Yu ++ ++ * aarch64-reloc.def: Add LD_PREL_LO12, ADR_PREL_LO21, ++ TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1, ++ TLSLD_MOVW_DTPREL_G0_NC. Change property of TLS relocations to ++ Symbol::TLS_REF. ++ * aarch64.cc (Target_aarch64::do_can_check_for_function_pointers): New ++ method. ++ (Target_aarch64::reloc_needs_plt_for_ifunc): New method. ++ (Target_aarch64::tls_ld_to_le): New method. ++ (Target_aarch64::aarch64_info): Enable can_icf_inline_merge_sections ++ for 64bit targets. ++ (Output_data_plt_aarch64::irelative_rel_): New data member. ++ (Output_data_plt_aarch64::add_entry): Add irelative entries to plt. ++ (Output_data_plt_aarch64::add_local_ifunc_entry): New method. ++ (Output_data_plt_aarch64::add_relocation): New method. ++ (Output_data_plt_aarch64::do_write): Add gold_assert on got_irelative ++ offset. Add got_irelative size to got size. ++ (AArch64_relocate_functions): Typedef AArch64_valtype. Replace long ++ type string with the new typename. ++ (AArch64_relocate_functions::update_adr): Replace parameter x with ++ immed. ++ (AArch64_relocate_functions::update_movnz): Correct wrong val mask. ++ (AArch64_relocate_functions::reloc_common): New method. ++ (AArch64_relocate_funcsions::rela_general): Extract common part out ++ into reloc_common method. ++ (AArch64_relocate_functions::rela_general): Likewise. ++ (AArch64_relocate_functions::pcrela_general): Likewise. ++ (AArch64_relocate_functions::adr): New method. ++ (AArch64_relocate_functions::adrp): Calculate immed before calling ++ update_adr. ++ (AArch64_relocate_functions::adrp): Likewise. ++ (AArch64_relocate_functions::movnz): Cast x to SignedW type when ++ comparing x to 0. Calculate immed from ~x when x < 0. ++ (Target_aarch64::optimize_tls_reloc): Add new cases for ++ TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1, ++ TLSLD_MOVW_DTPREL_G0_NC. ++ (Target_aarch64::possible_function_pointer_reloc): Implement this ++ method. ++ (Target_aarch64::Scan::local_reloc_may_be_function_pointer): Update ++ comment. ++ (Target_aarch64::Scan::local): Add codes to handle STT_GNU_IFUNC ++ symbol. Add cases for TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, ++ TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC. ++ (Target_aarch64::Scan::global): Add codes to handle STT_GNU_IFUNC ++ symbol. Add cases for TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, ++ TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC. ++ (Target_aarch64::make_plt_entry): Call add_entry with two more ++ parameters. ++ (Target_aarch64::make_local_ifunc_plt_entry): New method. ++ (Target_aarch64::Relocate::relocate): Add cases for LD_PREL_LO19, ++ ADR_PREL_LO21, TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, ++ TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC. ++ (Target_aarch64::Relocate::relocate_tls): Add cases for ++ TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1, ++ TLSLD_MOVW_DTPREL_G0_NC. ++ * testsuite/icf_safe_so_test.cc: Correct test comment. ++ * testsuite/icf_safe_test.sh: Add AArch64 arch. ++ + 2014-10-28 Alan Modra + + Apply trunk patches +Index: b/gold/aarch64-reloc.def +=================================================================== +--- a/gold/aarch64-reloc.def ++++ b/gold/aarch64-reloc.def +@@ -40,16 +40,22 @@ ARD(PREL32 , STATI + ARD(PREL16 , STATIC , DATA , Y, -1, 15,16 , 0,0 , Symbol::RELATIVE_REF , DATA ) + // Above is from Table 4-6, Data relocations, 257-262. + ++ARD(LD_PREL_LO19 , STATIC , AARCH64 , Y, -1, 20,20 , 2,20 , Symbol::RELATIVE_REF , LDST ) ++ARD(ADR_PREL_LO21 , STATIC , AARCH64 , Y, -1, 20,20 , 0,20 , Symbol::RELATIVE_REF , ADR ) + ARD(ADR_PREL_PG_HI21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) + ARD(ADR_PREL_PG_HI21_NC , STATIC , AARCH64 , Y, -1, 0,0 , 12,32 , Symbol::RELATIVE_REF , ADRP ) ++ARD(ADD_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) + ARD(LDST8_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , LDST ) + ARD(LDST16_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN2 , 1,11 , Symbol::ABSOLUTE_REF , LDST ) + ARD(LDST32_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN4 , 2,11 , Symbol::ABSOLUTE_REF , LDST ) + ARD(LDST64_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) + ARD(LDST128_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN16 , 4,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(ADD_ABS_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++// Above 10 relocs are from Table 4-9, Relocations to generate 19, 21 and 33 bit PC-relative addresses. ++ + ARD(ADR_GOT_PAGE , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) + ARD(LD64_GOT_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) ++// Above 2 relocs are from Table 4-14, GOT-relative instruction relocations. (Some relocs in the table are not implemented yet.) ++ + ARD(TSTBR14 , STATIC , CFLOW , N, -1, 15,15 , 2,15 , (Symbol::FUNCTION_CALL|Symbol::ABSOLUTE_REF) , TBZNZ ) + ARD(CONDBR19 , STATIC , CFLOW , N, -1, 20,20 , 2,20 , (Symbol::FUNCTION_CALL|Symbol::ABSOLUTE_REF) , CONDB ) + ARD(CALL26 , STATIC , CFLOW , Y, -1, 27,27 , 2,27 , (Symbol::FUNCTION_CALL|Symbol::RELATIVE_REF) , CALL ) +@@ -57,24 +63,32 @@ ARD(JUMP26 , STATI + // Above is from Table 4-10, Relocations for control-flow instructions, + // 279-283. + +-ARD(TLSGD_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) +-ARD(TLSGD_ADD_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSIE_MOVW_GOTTPREL_G1 , STATIC , AARCH64 , N, -1, 0,0 , 16,31 , Symbol::ABSOLUTE_REF , MOVW ) +-ARD(TLSIE_MOVW_GOTTPREL_G0_NC , STATIC , AARCH64 , N, -1, 0,0 , 0,15 , Symbol::ABSOLUTE_REF , MOVW ) +-ARD(TLSIE_ADR_GOTTPREL_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::ABSOLUTE_REF , ADRP ) +-ARD(TLSIE_LD64_GOTTPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(TLSIE_LD_GOTTPREL_PREL19 , STATIC , AARCH64 , N, -1, 20,20 , 2,20 , Symbol::ABSOLUTE_REF , LD ) ++ARD(TLSGD_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::TLS_REF , ADRP ) ++ARD(TLSGD_ADD_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::TLS_REF , ADD ) ++// Above is from Table 4-15, General Dynamic TLS relocations, 512-516. ++ ++ARD(TLSLD_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::TLS_REF , ADRP ) ++ARD(TLSLD_ADD_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::TLS_REF , ADD ) ++ARD(TLSLD_MOVW_DTPREL_G1 , STATIC , AARCH64 , Y, 1, 32,32 , 16,31 , Symbol::TLS_REF , ADRP ) ++ARD(TLSLD_MOVW_DTPREL_G0_NC , STATIC , AARCH64 , Y, 0, 0,0 , 0,15 , Symbol::TLS_REF , MOVW ) ++// Above is from Table 4-16, Local Dynamic TLS relocations, 517-573. ++ ++ARD(TLSIE_MOVW_GOTTPREL_G1 , STATIC , AARCH64 , N, -1, 32,32 , 16,31 , Symbol::TLS_REF , MOVW ) ++ARD(TLSIE_MOVW_GOTTPREL_G0_NC , STATIC , AARCH64 , N, -1, 0,0 , 0,15 , Symbol::TLS_REF , MOVW ) ++ARD(TLSIE_ADR_GOTTPREL_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::TLS_REF , ADRP ) ++ARD(TLSIE_LD64_GOTTPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::TLS_REF , LDST ) ++ARD(TLSIE_LD_GOTTPREL_PREL19 , STATIC , AARCH64 , N, -1, 20,20 , 2,20 , Symbol::TLS_REF , LD ) + // Above is from Table 4-17, Initial Exec TLS relocations, 539-543. + +-ARD(TLSLE_ADD_TPREL_HI12 , STATIC , AARCH64 , Y, -1, 0,24 , 12,23 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSLE_ADD_TPREL_LO12 , STATIC , AARCH64 , Y, -1, 0,12 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSLE_ADD_TPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_HI12 , STATIC , AARCH64 , Y, -1, 0,24 , 12,23 , Symbol::TLS_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_LO12 , STATIC , AARCH64 , Y, -1, 0,12 , 0,11 , Symbol::TLS_REF , ADD ) ++ARD(TLSLE_ADD_TPREL_LO12_NC , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::TLS_REF , ADD ) + // Above is from Table 4-18, Local Exec TLS relocations, 544-571. + +-ARD(TLSDESC_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::RELATIVE_REF , ADRP ) +-ARD(TLSDESC_LD64_LO12 , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::ABSOLUTE_REF , LDST ) +-ARD(TLSDESC_ADD_LO12 , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::ABSOLUTE_REF , ADD ) +-ARD(TLSDESC_CALL , STATIC , CFLOW , Y, -1, 0,0 , 0,0 , (Symbol::FUNCTION_CALL|Symbol::ABSOLUTE_REF) , CALL ) ++ARD(TLSDESC_ADR_PAGE21 , STATIC , AARCH64 , Y, -1, 32,32 , 12,32 , Symbol::TLS_REF , ADRP ) ++ARD(TLSDESC_LD64_LO12 , STATIC , AARCH64 , Y, -1, 0,RL_CHECK_ALIGN8 , 3,11 , Symbol::TLS_REF , LDST ) ++ARD(TLSDESC_ADD_LO12 , STATIC , AARCH64 , Y, -1, 0,0 , 0,11 , Symbol::TLS_REF , ADD ) ++ARD(TLSDESC_CALL , STATIC , CFLOW , Y, -1, 0,0 , 0,0 , Symbol::TLS_REF , CALL ) + // Above is from Table 4-19, TLS descriptor relocations, 560-569. + + // Note - +Index: b/gold/aarch64.cc +=================================================================== +--- a/gold/aarch64.cc ++++ b/gold/aarch64.cc +@@ -525,7 +525,7 @@ class Reloc_stub + { return k1.eq(k2); } + }; + +- private: ++ private: + // Stub type. + const Stub_type stub_type_; + // If this is a local symbol, this is the index in the defining object. +@@ -645,7 +645,7 @@ Reloc_stub::stub_type_ + branch_offset = dest - location; + break; + default: +- gold_assert(false); ++ gold_unreachable(); + } + + if (aarch64_valid_branch_offset_p(branch_offset)) +@@ -1762,6 +1762,15 @@ class Target_aarch64 : public Sized_targ + do_plt_address_for_local(const Relobj* relobj, unsigned int symndx) const + { return this->plt_section()->address_for_local(relobj, symndx); } + ++ // This function should be defined in targets that can use relocation ++ // types to determine (implemented in local_reloc_may_be_function_pointer ++ // and global_reloc_may_be_function_pointer) ++ // if a function's pointer is taken. ICF uses this in safe mode to only ++ // fold those functions whose pointer is defintely not taken. ++ bool ++ do_can_check_for_function_pointers() const ++ { return true; } ++ + // Return the number of entries in the PLT. + unsigned int + plt_entry_count() const; +@@ -1959,6 +1968,10 @@ class Target_aarch64 : public Sized_targ + void + check_non_pic(Relobj*, unsigned int r_type); + ++ bool ++ reloc_needs_plt_for_ifunc(Sized_relobj_file*, ++ unsigned int r_type); ++ + // Whether we have issued an error about a non-PIC compilation. + bool issued_non_pic_error_; + }; +@@ -2006,6 +2019,15 @@ class Target_aarch64 : public Sized_targ + const Symbol_value*); + + inline typename AArch64_relocate_functions::Status ++ tls_ld_to_le( ++ const Relocate_info*, ++ Target_aarch64*, ++ const elfcpp::Rela&, ++ unsigned int, ++ unsigned char*, ++ const Symbol_value*); ++ ++ inline typename AArch64_relocate_functions::Status + tls_ie_to_le( + const Relocate_info*, + Target_aarch64*, +@@ -2206,7 +2228,7 @@ const Target::Target_info Target_aarch64 + false, // has_resolve + false, // has_code_fill + true, // is_default_stack_executable +- false, // can_icf_inline_merge_sections ++ true, // can_icf_inline_merge_sections + '\0', // wrap_char + "/lib/ld.so.1", // program interpreter + 0x400000, // default_text_segment_address +@@ -2260,7 +2282,7 @@ const Target::Target_info Target_aarch64 + false, // has_resolve + false, // has_code_fill + true, // is_default_stack_executable +- false, // can_icf_inline_merge_sections ++ true, // can_icf_inline_merge_sections + '\0', // wrap_char + "/lib/ld.so.1", // program interpreter + 0x400000, // default_text_segment_address +@@ -2530,7 +2552,7 @@ Target_aarch64::scan_r + destination = value + addend; + break; + default: +- gold_assert(false); ++ gold_unreachable(); + } + + typename The_reloc_stub::Stub_type stub_type = The_reloc_stub:: +@@ -2838,7 +2860,7 @@ relocate_stub(The_reloc_stub* stub, + break; + + default: +- gold_assert(false); ++ gold_unreachable(); + } + } + +@@ -2861,7 +2883,7 @@ class Output_data_plt_aarch64 : public O + Output_data_got_aarch64* got, + Output_data_space* got_plt, + Output_data_space* got_irelative) +- : Output_section_data(addralign), tlsdesc_rel_(NULL), ++ : Output_section_data(addralign), tlsdesc_rel_(NULL), irelative_rel_(NULL), + got_(got), got_plt_(got_plt), got_irelative_(got_irelative), + count_(0), irelative_count_(0), tlsdesc_got_offset_(-1U) + { this->init(layout); } +@@ -2872,7 +2894,18 @@ class Output_data_plt_aarch64 : public O + + // Add an entry to the PLT. + void +- add_entry(Symbol* gsym); ++ add_entry(Symbol_table*, Layout*, Symbol* gsym); ++ ++ // Add an entry to the PLT for a local STT_GNU_IFUNC symbol. ++ unsigned int ++ add_local_ifunc_entry(Symbol_table* symtab, Layout*, ++ Sized_relobj_file* relobj, ++ unsigned int local_sym_index); ++ ++ // Add the relocation for a PLT entry. ++ void ++ add_relocation(Symbol_table*, Layout*, Symbol* gsym, ++ unsigned int got_offset); + + // Add the reserved TLSDESC_PLT entry to the PLT. + void +@@ -3081,32 +3114,100 @@ Output_data_plt_aarch64 + void +-Output_data_plt_aarch64::add_entry(Symbol* gsym) ++Output_data_plt_aarch64::add_entry(Symbol_table* symtab, ++ Layout* layout, Symbol* gsym) + { + gold_assert(!gsym->has_plt_offset()); + +- gsym->set_plt_offset((this->count_) * this->get_plt_entry_size() +- + this->first_plt_entry_offset()); ++ unsigned int* pcount; ++ unsigned int plt_reserved; ++ Output_section_data_build* got; + +- ++this->count_; ++ if (gsym->type() == elfcpp::STT_GNU_IFUNC ++ && gsym->can_use_relative_reloc(false)) ++ { ++ pcount = &this->irelative_count_; ++ plt_reserved = 0; ++ got = this->got_irelative_; ++ } ++ else ++ { ++ pcount = &this->count_; ++ plt_reserved = this->first_plt_entry_offset(); ++ got = this->got_plt_; ++ } ++ ++ gsym->set_plt_offset((*pcount) * this->get_plt_entry_size() ++ + plt_reserved); ++ ++ ++*pcount; + +- section_offset_type got_offset = this->got_plt_->current_data_size(); ++ section_offset_type got_offset = got->current_data_size(); + + // Every PLT entry needs a GOT entry which points back to the PLT + // entry (this will be changed by the dynamic linker, normally + // lazily when the function is called). +- this->got_plt_->set_current_data_size(got_offset + size / 8); ++ got->set_current_data_size(got_offset + size / 8); + + // Every PLT entry needs a reloc. +- gsym->set_needs_dynsym_entry(); +- this->rel_->add_global(gsym, elfcpp::R_AARCH64_JUMP_SLOT, +- this->got_plt_, got_offset, 0); ++ this->add_relocation(symtab, layout, gsym, got_offset); + + // Note that we don't need to save the symbol. The contents of the + // PLT are independent of which symbols are used. The symbols only + // appear in the relocations. + } + ++// Add an entry to the PLT for a local STT_GNU_IFUNC symbol. Return ++// the PLT offset. ++ ++template ++unsigned int ++Output_data_plt_aarch64::add_local_ifunc_entry( ++ Symbol_table* symtab, ++ Layout* layout, ++ Sized_relobj_file* relobj, ++ unsigned int local_sym_index) ++{ ++ unsigned int plt_offset = this->irelative_count_ * this->get_plt_entry_size(); ++ ++this->irelative_count_; ++ ++ section_offset_type got_offset = this->got_irelative_->current_data_size(); ++ ++ // Every PLT entry needs a GOT entry which points back to the PLT ++ // entry. ++ this->got_irelative_->set_current_data_size(got_offset + size / 8); ++ ++ // Every PLT entry needs a reloc. ++ Reloc_section* rela = this->rela_irelative(symtab, layout); ++ rela->add_symbolless_local_addend(relobj, local_sym_index, ++ elfcpp::R_AARCH64_IRELATIVE, ++ this->got_irelative_, got_offset, 0); ++ ++ return plt_offset; ++} ++ ++// Add the relocation for a PLT entry. ++ ++template ++void ++Output_data_plt_aarch64::add_relocation( ++ Symbol_table* symtab, Layout* layout, Symbol* gsym, unsigned int got_offset) ++{ ++ if (gsym->type() == elfcpp::STT_GNU_IFUNC ++ && gsym->can_use_relative_reloc(false)) ++ { ++ Reloc_section* rela = this->rela_irelative(symtab, layout); ++ rela->add_symbolless_global_addend(gsym, elfcpp::R_AARCH64_IRELATIVE, ++ this->got_irelative_, got_offset, 0); ++ } ++ else ++ { ++ gsym->set_needs_dynsym_entry(); ++ this->rel_->add_global(gsym, elfcpp::R_AARCH64_JUMP_SLOT, this->got_plt_, ++ got_offset, 0); ++ } ++} ++ + // Return where the TLSDESC relocations should go, creating it if + // necessary. These follow the JUMP_SLOT relocations. + +@@ -3588,8 +3689,12 @@ Output_data_plt_aarch64get_output_view(offset, oview_size); + + const off_t got_file_offset = this->got_plt_->offset(); ++ gold_assert(got_file_offset + this->got_plt_->data_size() ++ == this->got_irelative_->offset()); ++ + const section_size_type got_size = +- convert_to_section_size_type(this->got_plt_->data_size()); ++ convert_to_section_size_type(this->got_plt_->data_size() ++ + this->got_irelative_->data_size()); + unsigned char* const got_view = of->get_output_view(got_file_offset, + got_size); + +@@ -3697,11 +3802,12 @@ class AArch64_relocate_functions + typedef typename The_reloc_stub::Stub_type The_reloc_stub_type; + typedef Stub_table The_stub_table; + typedef elfcpp::Rela The_rela; ++ typedef typename elfcpp::Swap::Valtype AArch64_valtype; + + // Return the page address of the address. + // Page(address) = address & ~0xFFF + +- static inline typename elfcpp::Swap::Valtype ++ static inline AArch64_valtype + Page(Address address) + { + return (address & (~static_cast
(0xFFF))); +@@ -3714,7 +3820,7 @@ class AArch64_relocate_functions + template + static inline void + update_view(unsigned char* view, +- typename elfcpp::Swap::Valtype immed, ++ AArch64_valtype immed, + elfcpp::Elf_Xword doffset, + elfcpp::Elf_Xword dst_mask) + { +@@ -3736,8 +3842,8 @@ class AArch64_relocate_functions + static inline void + update_view_two_parts( + unsigned char* view, +- typename elfcpp::Swap::Valtype immed1, +- typename elfcpp::Swap::Valtype immed2, ++ AArch64_valtype immed1, ++ AArch64_valtype immed2, + elfcpp::Elf_Xword doffset1, + elfcpp::Elf_Xword doffset2, + elfcpp::Elf_Xword dst_mask) +@@ -3751,17 +3857,13 @@ class AArch64_relocate_functions + (immed2 << doffset2))); + } + +- // Update adr or adrp instruction with [32:12] of X. ++ // Update adr or adrp instruction with immed. + // In adr and adrp: [30:29] immlo [23:5] immhi + + static inline void +- update_adr(unsigned char* view, +- typename elfcpp::Swap::Valtype x, +- const AArch64_reloc_property* /* reloc_property */) ++ update_adr(unsigned char* view, AArch64_valtype immed) + { + elfcpp::Elf_Xword dst_mask = (0x3 << 29) | (0x7ffff << 5); +- typename elfcpp::Swap<32, big_endian>::Valtype immed = +- (x >> 12) & 0x1fffff; + This::template update_view_two_parts<32>( + view, + immed & 0x3, +@@ -3774,9 +3876,10 @@ class AArch64_relocate_functions + // Update movz/movn instruction with bits immed. + // Set instruction to movz if is_movz is true, otherwise set instruction + // to movn. ++ + static inline void + update_movnz(unsigned char* view, +- typename elfcpp::Swap::Valtype immed, ++ AArch64_valtype immed, + bool is_movz) + { + typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype; +@@ -3789,17 +3892,44 @@ class AArch64_relocate_functions + aarch64_howto[AArch64_reloc_property::INST_MOVW].dst_mask; + + // Clear immediate fields and opc code. +- val &= ~(dst_mask | (0x11 << 29)); ++ val &= ~(dst_mask | (0x3 << 29)); + + // Set instruction to movz or movn. + // movz: [30:29] is 10 movn: [30:29] is 00 + if (is_movz) +- val |= (0x10 << 29); ++ val |= (0x2 << 29); + + elfcpp::Swap<32, big_endian>::writeval(wv, + static_cast(val | (immed << doffset))); + } + ++ // Update selected bits in text. ++ ++ template ++ static inline typename This::Status ++ reloc_common(unsigned char* view, Address x, ++ const AArch64_reloc_property* reloc_property) ++ { ++ // Select bits from X. ++ Address immed = reloc_property->select_x_value(x); ++ ++ // Update view. ++ const AArch64_reloc_property::Reloc_inst inst = ++ reloc_property->reloc_inst(); ++ // If it is a data relocation or instruction has 2 parts of immediate ++ // fields, you should not call pcrela_general. ++ gold_assert(aarch64_howto[inst].doffset2 == -1 && ++ aarch64_howto[inst].doffset != -1); ++ This::template update_view(view, immed, ++ aarch64_howto[inst].doffset, ++ aarch64_howto[inst].dst_mask); ++ ++ // Do check overflow or alignment if needed. ++ return (reloc_property->checkup_x_value(x) ++ ? This::STATUS_OKAY ++ : This::STATUS_OVERFLOW); ++ } ++ + public: + + // Do a simple rela relocation at unaligned addresses. +@@ -3809,7 +3939,7 @@ class AArch64_relocate_functions + rela_ua(unsigned char* view, + const Sized_relobj_file* object, + const Symbol_value* psymval, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype addend, + const AArch64_reloc_property* reloc_property) + { + typedef typename elfcpp::Swap_unaligned::Valtype +@@ -3830,7 +3960,7 @@ class AArch64_relocate_functions + pcrela_ua(unsigned char* view, + const Sized_relobj_file* object, + const Symbol_value* psymval, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype addend, + Address address, + const AArch64_reloc_property* reloc_property) + { +@@ -3852,15 +3982,13 @@ class AArch64_relocate_functions + unsigned char* view, + const Sized_relobj_file* object, + const Symbol_value* psymval, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype addend, + const AArch64_reloc_property* reloc_property) + { +- typedef typename elfcpp::Swap::Valtype +- Valtype; ++ typedef typename elfcpp::Swap::Valtype Valtype; + Valtype* wv = reinterpret_cast(view); + Address x = psymval->value(object, addend); +- elfcpp::Swap::writeval(wv, +- static_cast(x)); ++ elfcpp::Swap::writeval(wv,static_cast(x)); + return (reloc_property->checkup_x_value(x) + ? This::STATUS_OKAY + : This::STATUS_OVERFLOW); +@@ -3874,30 +4002,12 @@ class AArch64_relocate_functions + rela_general(unsigned char* view, + const Sized_relobj_file* object, + const Symbol_value* psymval, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype addend, + const AArch64_reloc_property* reloc_property) + { + // Calculate relocation. + Address x = psymval->value(object, addend); +- +- // Select bits from X. +- Address immed = reloc_property->select_x_value(x); +- +- // Update view. +- const AArch64_reloc_property::Reloc_inst inst = +- reloc_property->reloc_inst(); +- // If it is a data relocation or instruction has 2 parts of immediate +- // fields, you should not call rela_general. +- gold_assert(aarch64_howto[inst].doffset2 == -1 && +- aarch64_howto[inst].doffset != -1); +- This::template update_view(view, immed, +- aarch64_howto[inst].doffset, +- aarch64_howto[inst].dst_mask); +- +- // Do check overflow or alignment if needed. +- return (reloc_property->checkup_x_value(x) +- ? This::STATUS_OKAY +- : This::STATUS_OVERFLOW); ++ return This::template reloc_common(view, x, reloc_property); + } + + // Do relocate. Update selected bits in text. +@@ -3907,31 +4017,13 @@ class AArch64_relocate_functions + static inline typename This::Status + rela_general( + unsigned char* view, +- typename elfcpp::Swap::Valtype s, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype s, ++ AArch64_valtype addend, + const AArch64_reloc_property* reloc_property) + { + // Calculate relocation. + Address x = s + addend; +- +- // Select bits from X. +- Address immed = reloc_property->select_x_value(x); +- +- // Update view. +- const AArch64_reloc_property::Reloc_inst inst = +- reloc_property->reloc_inst(); +- // If it is a data relocation or instruction has 2 parts of immediate +- // fields, you should not call rela_general. +- gold_assert(aarch64_howto[inst].doffset2 == -1 && +- aarch64_howto[inst].doffset != -1); +- This::template update_view(view, immed, +- aarch64_howto[inst].doffset, +- aarch64_howto[inst].dst_mask); +- +- // Do check overflow or alignment if needed. +- return (reloc_property->checkup_x_value(x) +- ? This::STATUS_OKAY +- : This::STATUS_OVERFLOW); ++ return This::template reloc_common(view, x, reloc_property); + } + + // Do address relative relocate. Update selected bits in text. +@@ -3943,31 +4035,34 @@ class AArch64_relocate_functions + unsigned char* view, + const Sized_relobj_file* object, + const Symbol_value* psymval, +- typename elfcpp::Swap::Valtype addend, ++ AArch64_valtype addend, + Address address, + const AArch64_reloc_property* reloc_property) + { + // Calculate relocation. + Address x = psymval->value(object, addend) - address; ++ return This::template reloc_common(view, x, reloc_property); ++ } + +- // Select bits from X. +- Address immed = reloc_property->select_x_value(x); + +- // Update view. +- const AArch64_reloc_property::Reloc_inst inst = +- reloc_property->reloc_inst(); +- // If it is a data relocation or instruction has 2 parts of immediate +- // fields, you should not call pcrela_general. +- gold_assert(aarch64_howto[inst].doffset2 == -1 && +- aarch64_howto[inst].doffset != -1); +- This::template update_view(view, immed, +- aarch64_howto[inst].doffset, +- aarch64_howto[inst].dst_mask); ++ // Calculate (S + A) - address, update adr instruction. + +- // Do check overflow or alignment if needed. +- return (reloc_property->checkup_x_value(x) +- ? This::STATUS_OKAY +- : This::STATUS_OVERFLOW); ++ static inline typename This::Status ++ adr(unsigned char* view, ++ const Sized_relobj_file* object, ++ const Symbol_value* psymval, ++ Address addend, ++ Address address, ++ const AArch64_reloc_property* /* reloc_property */) ++ { ++ AArch64_valtype x = psymval->value(object, addend) - address; ++ // Pick bits [20:0] of X. ++ AArch64_valtype immed = x & 0x1fffff; ++ update_adr(view, immed); ++ // Check -2^20 <= X < 2^20 ++ return (size == 64 && Bits<21>::has_overflow((x)) ++ ? This::STATUS_OVERFLOW ++ : This::STATUS_OKAY); + } + + // Calculate PG(S+A) - PG(address), update adrp instruction. +@@ -3979,9 +4074,10 @@ class AArch64_relocate_functions + Address sa, + Address address) + { +- typename elfcpp::Swap::Valtype x = +- This::Page(sa) - This::Page(address); +- update_adr(view, x, NULL); ++ AArch64_valtype x = This::Page(sa) - This::Page(address); ++ // Pick [32:12] of X. ++ AArch64_valtype immed = (x >> 12) & 0x1fffff; ++ update_adr(view, immed); + // Check -2^32 <= X < 2^32 + return (size == 64 && Bits<33>::has_overflow((x)) + ? This::STATUS_OVERFLOW +@@ -4000,9 +4096,10 @@ class AArch64_relocate_functions + const AArch64_reloc_property* reloc_property) + { + Address sa = psymval->value(object, addend); +- typename elfcpp::Swap::Valtype x = +- This::Page(sa) - This::Page(address); +- update_adr(view, x, reloc_property); ++ AArch64_valtype x = This::Page(sa) - This::Page(address); ++ // Pick [32:12] of X. ++ AArch64_valtype immed = (x >> 12) & 0x1fffff; ++ update_adr(view, immed); + return (reloc_property->checkup_x_value(x) + ? This::STATUS_OKAY + : This::STATUS_OVERFLOW); +@@ -4016,15 +4113,21 @@ class AArch64_relocate_functions + + static inline typename This::Status + movnz(unsigned char* view, +- typename elfcpp::Swap::Valtype x, ++ AArch64_valtype x, + const AArch64_reloc_property* reloc_property) + { + // Select bits from X. +- Address immed = reloc_property->select_x_value(x); +- bool is_movz = true; +- if (static_cast(x) < 0) ++ Address immed; ++ bool is_movz; ++ typedef typename elfcpp::Elf_types::Elf_Swxword SignedW; ++ if (static_cast(x) >= 0) ++ { ++ immed = reloc_property->select_x_value(x); ++ is_movz = true; ++ } ++ else + { +- immed = ~immed; ++ immed = reloc_property->select_x_value(~x);; + is_movz = false; + } + +@@ -4433,6 +4536,15 @@ Target_aarch64::optimi + return tls::TLSOPT_TO_LE; + return tls::TLSOPT_TO_IE; + ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: ++ // These are Local-Dynamic, which refer to local symbols in the ++ // dynamic TLS block. Since we know that we generating an ++ // executable, we can switch to Local-Exec. ++ return tls::TLSOPT_TO_LE; ++ + case elfcpp::R_AARCH64_TLSIE_MOVW_GOTTPREL_G1: + case elfcpp::R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC: + case elfcpp::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: +@@ -4472,8 +4584,11 @@ Target_aarch64::Scan:: + { + switch (r_type) + { +- case elfcpp::R_AARCH64_ABS64: +- //TODO ++ case elfcpp::R_AARCH64_ADR_PREL_PG_HI21: ++ case elfcpp::R_AARCH64_ADR_PREL_PG_HI21_NC: ++ case elfcpp::R_AARCH64_ADD_ABS_LO12_NC: ++ case elfcpp::R_AARCH64_ADR_GOT_PAGE: ++ case elfcpp::R_AARCH64_LD64_GOT_LO12_NC: + { + return true; + } +@@ -4498,9 +4613,7 @@ Target_aarch64::Scan:: + unsigned int r_type, + const elfcpp::Sym&) + { +- // When building a shared library, do not fold any local symbols as it is +- // not possible to distinguish pointer taken versus a call by looking at +- // the relocation types. ++ // When building a shared library, do not fold any local symbols. + return (parameters->options().shared() + || possible_function_pointer_reloc(r_type)); + } +@@ -4586,6 +4699,29 @@ Target_aarch64::Scan:: + return; + } + ++// Return whether we need to make a PLT entry for a relocation of the ++// given type against a STT_GNU_IFUNC symbol. ++ ++template ++bool ++Target_aarch64::Scan::reloc_needs_plt_for_ifunc( ++ Sized_relobj_file* object, ++ unsigned int r_type) ++{ ++ const AArch64_reloc_property* arp = ++ aarch64_reloc_property_table->get_reloc_property(r_type); ++ gold_assert(arp != NULL); ++ ++ int flags = arp->reference_flags(); ++ if (flags & Symbol::TLS_REF) ++ { ++ gold_error(_("%s: unsupported TLS reloc %s for IFUNC symbol"), ++ object->name().c_str(), arp->name().c_str()); ++ return false; ++ } ++ return flags != 0; ++} ++ + // Scan a relocation for a local symbol. + + template +@@ -4599,7 +4735,7 @@ Target_aarch64::Scan:: + Output_section* output_section, + const elfcpp::Rela& rela, + unsigned int r_type, +- const elfcpp::Sym& /* lsym */, ++ const elfcpp::Sym& lsym, + bool is_discarded) + { + if (is_discarded) +@@ -4611,6 +4747,11 @@ Target_aarch64::Scan:: + target->got_section(symtab, layout); + unsigned int r_sym = elfcpp::elf_r_sym(rela.get_r_info()); + ++ // A local STT_GNU_IFUNC symbol may require a PLT entry. ++ bool is_ifunc = lsym.get_st_type() == elfcpp::STT_GNU_IFUNC; ++ if (is_ifunc && this->reloc_needs_plt_for_ifunc(object, r_type)) ++ target->make_local_ifunc_plt_entry(symtab, layout, object, r_sym); ++ + switch (r_type) + { + case elfcpp::R_AARCH64_ABS32: +@@ -4634,7 +4775,7 @@ Target_aarch64::Scan:: + data_shndx, + rela.get_r_offset(), + rela.get_r_addend(), +- false /* is ifunc */); ++ is_ifunc); + } + break; + +@@ -4725,6 +4866,25 @@ Target_aarch64::Scan:: + } + break; + ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: ++ { ++ tls::Tls_optimization tlsopt = Target_aarch64:: ++ optimize_tls_reloc(!parameters->options().shared(), r_type); ++ if (tlsopt == tls::TLSOPT_NONE) ++ { ++ // Create a GOT entry for the module index. ++ target->got_mod_index_entry(symtab, layout, object); ++ } ++ else if (tlsopt != tls::TLSOPT_TO_LE) ++ unsupported_reloc_local(object, r_type); ++ } ++ break; ++ ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: ++ break; ++ + case elfcpp::R_AARCH64_TLSDESC_ADR_PAGE21: + case elfcpp::R_AARCH64_TLSDESC_LD64_LO12: + case elfcpp::R_AARCH64_TLSDESC_ADD_LO12: +@@ -4801,6 +4961,11 @@ Target_aarch64::Scan:: + unsigned int r_type, + Symbol* gsym) + { ++ // A STT_GNU_IFUNC symbol may require a PLT entry. ++ if (gsym->type() == elfcpp::STT_GNU_IFUNC ++ && this->reloc_needs_plt_for_ifunc(object, r_type)) ++ target->make_plt_entry(symtab, layout, gsym); ++ + typedef Output_data_reloc + Reloc_section; + const AArch64_reloc_property* arp = +@@ -4834,6 +4999,25 @@ Target_aarch64::Scan:: + data_shndx, output_section, gsym, rela); + } + else if (r_type == elfcpp::R_AARCH64_ABS64 ++ && gsym->type() == elfcpp::STT_GNU_IFUNC ++ && gsym->can_use_relative_reloc(false) ++ && !gsym->is_from_dynobj() ++ && !gsym->is_undefined() ++ && !gsym->is_preemptible()) ++ { ++ // Use an IRELATIVE reloc for a locally defined STT_GNU_IFUNC ++ // symbol. This makes a function address in a PIE executable ++ // match the address in a shared library that it links against. ++ Reloc_section* rela_dyn = ++ target->rela_irelative_section(layout); ++ unsigned int r_type = elfcpp::R_AARCH64_IRELATIVE; ++ rela_dyn->add_symbolless_global_addend(gsym, r_type, ++ output_section, object, ++ data_shndx, ++ rela.get_r_offset(), ++ rela.get_r_addend()); ++ } ++ else if (r_type == elfcpp::R_AARCH64_ABS64 + && gsym->can_use_relative_reloc(false)) + { + Reloc_section* rela_dyn = target->rela_dyn_section(layout); +@@ -4905,21 +5089,54 @@ Target_aarch64::Scan:: + target->got_section(symtab, layout); + if (gsym->final_value_is_known()) + { +- got->add_global(gsym, GOT_TYPE_STANDARD); ++ // For a STT_GNU_IFUNC symbol we want the PLT address. ++ if (gsym->type() == elfcpp::STT_GNU_IFUNC) ++ got->add_global_plt(gsym, GOT_TYPE_STANDARD); ++ else ++ got->add_global(gsym, GOT_TYPE_STANDARD); + } + else + { ++ // If this symbol is not fully resolved, we need to add a dynamic ++ // relocation for it. + Reloc_section* rela_dyn = target->rela_dyn_section(layout); ++ ++ // Use a GLOB_DAT rather than a RELATIVE reloc if: ++ // ++ // 1) The symbol may be defined in some other module. ++ // 2) We are building a shared library and this is a protected ++ // symbol; using GLOB_DAT means that the dynamic linker can use ++ // the address of the PLT in the main executable when appropriate ++ // so that function address comparisons work. ++ // 3) This is a STT_GNU_IFUNC symbol in position dependent code, ++ // again so that function address comparisons work. + if (gsym->is_from_dynobj() + || gsym->is_undefined() + || gsym->is_preemptible() + || (gsym->visibility() == elfcpp::STV_PROTECTED +- && parameters->options().shared())) ++ && parameters->options().shared()) ++ || (gsym->type() == elfcpp::STT_GNU_IFUNC ++ && parameters->options().output_is_position_independent())) + got->add_global_with_rel(gsym, GOT_TYPE_STANDARD, + rela_dyn, elfcpp::R_AARCH64_GLOB_DAT); + else + { +- if (got->add_global(gsym, GOT_TYPE_STANDARD)) ++ // For a STT_GNU_IFUNC symbol we want to write the PLT ++ // offset into the GOT, so that function pointer ++ // comparisons work correctly. ++ bool is_new; ++ if (gsym->type() != elfcpp::STT_GNU_IFUNC) ++ is_new = got->add_global(gsym, GOT_TYPE_STANDARD); ++ else ++ { ++ is_new = got->add_global_plt(gsym, GOT_TYPE_STANDARD); ++ // Tell the dynamic linker to use the PLT address ++ // when resolving relocations. ++ if (gsym->is_from_dynobj() ++ && !parameters->options().shared()) ++ gsym->set_needs_dynsym_value(); ++ } ++ if (is_new) + { + rela_dyn->add_global_relative( + gsym, elfcpp::R_AARCH64_RELATIVE, +@@ -4974,10 +5191,29 @@ Target_aarch64::Scan:: + } + break; + ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: // Local dynamic ++ { ++ tls::Tls_optimization tlsopt = Target_aarch64:: ++ optimize_tls_reloc(!parameters->options().shared(), r_type); ++ if (tlsopt == tls::TLSOPT_NONE) ++ { ++ // Create a GOT entry for the module index. ++ target->got_mod_index_entry(symtab, layout, object); ++ } ++ else if (tlsopt != tls::TLSOPT_TO_LE) ++ unsupported_reloc_local(object, r_type); ++ } ++ break; ++ ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: // Other local dynamic ++ break; ++ + case elfcpp::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: + case elfcpp::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: // Initial executable + { +- tls::Tls_optimization tlsopt =Target_aarch64:: ++ tls::Tls_optimization tlsopt = Target_aarch64:: + optimize_tls_reloc(gsym->final_value_is_known(), r_type); + if (tlsopt == tls::TLSOPT_TO_LE) + break; +@@ -5113,7 +5349,26 @@ Target_aarch64::make_p + if (this->plt_ == NULL) + this->make_plt_section(symtab, layout); + +- this->plt_->add_entry(gsym); ++ this->plt_->add_entry(symtab, layout, gsym); ++} ++ ++// Make a PLT entry for a local STT_GNU_IFUNC symbol. ++ ++template ++void ++Target_aarch64::make_local_ifunc_plt_entry( ++ Symbol_table* symtab, Layout* layout, ++ Sized_relobj_file* relobj, ++ unsigned int local_sym_index) ++{ ++ if (relobj->local_has_plt_offset(local_sym_index)) ++ return; ++ if (this->plt_ == NULL) ++ this->make_plt_section(symtab, layout); ++ unsigned int plt_offset = this->plt_->add_local_ifunc_entry(symtab, layout, ++ relobj, ++ local_sym_index); ++ relobj->set_local_plt_offset(local_sym_index, plt_offset); + } + + template +@@ -5441,6 +5696,16 @@ Target_aarch64::Reloca + view, object, psymval, addend, address, reloc_property); + break; + ++ case elfcpp::R_AARCH64_LD_PREL_LO19: ++ reloc_status = Reloc::template pcrela_general<32>( ++ view, object, psymval, addend, address, reloc_property); ++ break; ++ ++ case elfcpp::R_AARCH64_ADR_PREL_LO21: ++ reloc_status = Reloc::adr(view, object, psymval, addend, ++ address, reloc_property); ++ break; ++ + case elfcpp::R_AARCH64_ADR_PREL_PG_HI21_NC: + case elfcpp::R_AARCH64_ADR_PREL_PG_HI21: + reloc_status = Reloc::adrp(view, object, psymval, addend, address, +@@ -5498,6 +5763,10 @@ Target_aarch64::Reloca + + case elfcpp::R_AARCH64_TLSGD_ADR_PAGE21: + case elfcpp::R_AARCH64_TLSGD_ADD_LO12_NC: ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: + case elfcpp::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: + case elfcpp::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: +@@ -5640,7 +5909,7 @@ Target_aarch64::Reloca + break; + + default: +- gold_assert(false); ++ gold_unreachable(); + } + } + gold_error_at_location(relinfo, relnum, rela.get_r_offset(), +@@ -5649,6 +5918,81 @@ Target_aarch64::Reloca + } + break; + ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: // Local-dynamic ++ { ++ if (tlsopt == tls::TLSOPT_TO_LE) ++ { ++ if (tls_segment == NULL) ++ { ++ gold_assert(parameters->errors()->error_count() > 0 ++ || issue_undefined_symbol_error(gsym)); ++ return aarch64_reloc_funcs::STATUS_BAD_RELOC; ++ } ++ return this->tls_ld_to_le(relinfo, target, rela, r_type, view, ++ psymval); ++ } ++ ++ gold_assert(tlsopt == tls::TLSOPT_NONE); ++ // Relocate the field with the offset of the GOT entry for ++ // the module index. ++ typename elfcpp::Elf_types::Elf_Addr got_entry_address; ++ got_entry_address = (target->got_mod_index_entry(NULL, NULL, NULL) + ++ target->got_->address()); ++ ++ switch (r_type) ++ { ++ case elfcpp::R_AARCH64_TLSLD_ADR_PAGE21: ++ return aarch64_reloc_funcs::adrp( ++ view, got_entry_address + addend, address); ++ break; ++ ++ case elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC: ++ return aarch64_reloc_funcs::template rela_general<32>( ++ view, got_entry_address, addend, reloc_property); ++ break; ++ ++ default: ++ gold_unreachable(); ++ } ++ } ++ break; ++ ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: // Other local-dynamic ++ { ++ AArch64_address value = psymval->value(object, 0); ++ if (tlsopt == tls::TLSOPT_TO_LE) ++ { ++ if (tls_segment == NULL) ++ { ++ gold_assert(parameters->errors()->error_count() > 0 ++ || issue_undefined_symbol_error(gsym)); ++ return aarch64_reloc_funcs::STATUS_BAD_RELOC; ++ } ++ // If building executable, _TLS_MODULE_BASE_ points to segment ++ // end. Thus we must subtract it from value. ++ value -= tls_segment->memsz(); ++ } ++ switch (r_type) ++ { ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G1: ++ return aarch64_reloc_funcs::movnz(view, value + addend, ++ reloc_property); ++ break; ++ ++ case elfcpp::R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: ++ return aarch64_reloc_funcs::template rela_general<32>( ++ view, value, addend, reloc_property); ++ break; ++ ++ default: ++ gold_unreachable(); ++ } ++ // We should never reach here. ++ } ++ break; ++ + case elfcpp::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: + case elfcpp::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: // Initial-exec + { +@@ -5692,7 +6036,7 @@ Target_aarch64::Reloca + return aarch64_reloc_funcs::template rela_general<32>( + view, got_entry_address, addend, reloc_property); + default: +- gold_assert(false); ++ gold_unreachable(); + } + } + // We shall never reach here. +@@ -5918,6 +6262,106 @@ Target_aarch64::Reloca + template + inline + typename AArch64_relocate_functions::Status ++Target_aarch64::Relocate::tls_ld_to_le( ++ const Relocate_info* relinfo, ++ Target_aarch64* target, ++ const elfcpp::Rela& rela, ++ unsigned int r_type, ++ unsigned char* view, ++ const Symbol_value* psymval) ++{ ++ typedef AArch64_relocate_functions aarch64_reloc_funcs; ++ typedef typename elfcpp::Swap<32, big_endian>::Valtype Insntype; ++ typedef typename elfcpp::Elf_types::Elf_Addr AArch64_address; ++ ++ Insntype* ip = reinterpret_cast(view); ++ Insntype insn1 = elfcpp::Swap<32, big_endian>::readval(ip); ++ Insntype insn2 = elfcpp::Swap<32, big_endian>::readval(ip + 1); ++ Insntype insn3 = elfcpp::Swap<32, big_endian>::readval(ip + 2); ++ ++ if (r_type == elfcpp::R_AARCH64_TLSLD_ADD_LO12_NC) ++ { ++ // This is the 2nd relocs, optimization should already have been ++ // done. ++ gold_assert((insn1 & 0xfff00000) == 0x91400000); ++ return aarch64_reloc_funcs::STATUS_OKAY; ++ } ++ ++ // The original sequence is - ++ // 90000000 adrp x0, 0
++ // 91000000 add x0, x0, #0x0 ++ // 94000000 bl 0 <__tls_get_addr> ++ // optimized to sequence - ++ // d53bd040 mrs x0, tpidr_el0 ++ // 91400000 add x0, x0, #0x0, lsl #12 ++ // 91000000 add x0, x0, #0x0 ++ ++ // Unlike tls_ie_to_le, we change the 3 insns in one function call when we ++ // encounter the first relocation "R_AARCH64_TLSLD_ADR_PAGE21". Because we ++ // have to change "bl tls_get_addr", which does not have a corresponding tls ++ // relocation type. So before proceeding, we need to make sure compiler ++ // does not change the sequence. ++ if(!(insn1 == 0x90000000 // adrp x0,0 ++ && insn2 == 0x91000000 // add x0, x0, #0x0 ++ && insn3 == 0x94000000)) // bl 0 ++ { ++ // Ideally we should give up gd_to_le relaxation and do gd access. ++ // However the gd_to_le relaxation decision has been made early ++ // in the scan stage, where we did not allocate any GOT entry for ++ // this symbol. Therefore we have to exit and report error now. ++ gold_error(_("unexpected reloc insn sequence while relaxing " ++ "tls gd to le for reloc %u."), r_type); ++ return aarch64_reloc_funcs::STATUS_BAD_RELOC; ++ } ++ ++ // Write new insns. ++ insn1 = 0xd53bd040; // mrs x0, tpidr_el0 ++ insn2 = 0x91400000; // add x0, x0, #0x0, lsl #12 ++ insn3 = 0x91000000; // add x0, x0, #0x0 ++ elfcpp::Swap<32, big_endian>::writeval(ip, insn1); ++ elfcpp::Swap<32, big_endian>::writeval(ip + 1, insn2); ++ elfcpp::Swap<32, big_endian>::writeval(ip + 2, insn3); ++ ++ // Calculate tprel value. ++ Output_segment* tls_segment = relinfo->layout->tls_segment(); ++ gold_assert(tls_segment != NULL); ++ AArch64_address value = psymval->value(relinfo->object, 0); ++ const elfcpp::Elf_Xword addend = rela.get_r_addend(); ++ AArch64_address aligned_tcb_size = ++ align_address(target->tcb_size(), tls_segment->maximum_alignment()); ++ AArch64_address x = value + aligned_tcb_size; ++ ++ // After new insns are written, apply TLSLE relocs. ++ const AArch64_reloc_property* rp1 = ++ aarch64_reloc_property_table->get_reloc_property( ++ elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12); ++ const AArch64_reloc_property* rp2 = ++ aarch64_reloc_property_table->get_reloc_property( ++ elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12); ++ gold_assert(rp1 != NULL && rp2 != NULL); ++ ++ typename aarch64_reloc_funcs::Status s1 = ++ aarch64_reloc_funcs::template rela_general<32>(view + 4, ++ x, ++ addend, ++ rp1); ++ if (s1 != aarch64_reloc_funcs::STATUS_OKAY) ++ return s1; ++ ++ typename aarch64_reloc_funcs::Status s2 = ++ aarch64_reloc_funcs::template rela_general<32>(view + 8, ++ x, ++ addend, ++ rp2); ++ ++ this->skip_call_tls_get_addr_ = true; ++ return s2; ++ ++} // End of tls_ld_to_le ++ ++template ++inline ++typename AArch64_relocate_functions::Status + Target_aarch64::Relocate::tls_ie_to_le( + const Relocate_info* relinfo, + Target_aarch64* target, +@@ -5963,7 +6407,7 @@ Target_aarch64::Reloca + newinsn = (0xf2800000 | regno) | ((x & 0xffff) << 5); + } + else +- gold_assert(false); ++ gold_unreachable(); + + elfcpp::Swap<32, big_endian>::writeval(ip, newinsn); + return aarch64_reloc_funcs::STATUS_OKAY; +Index: b/gold/testsuite/icf_safe_so_test.cc +=================================================================== +--- a/gold/testsuite/icf_safe_so_test.cc ++++ b/gold/testsuite/icf_safe_so_test.cc +@@ -22,10 +22,10 @@ + + // The goal of this program is to verify if identical code folding + // in safe mode correctly folds functions in a shared object. The +-// foo_* functions below should not be folded. For x86-64, +-// foo_glob and bar_glob should be folded as their function pointers +-// are addresses of PLT entries in shared objects. For 32-bit X86, +-// the hidden protected and internal symbols can be folded. ++// foo_* functions below should not be folded on X86_64. ++// For 32-bit X86, the hidden protected and internal symbols can be folded. ++// foo_glob and bar_glob should not be folded, because function pointer ++// of foo_glob is taken. + + int __attribute__ ((visibility ("protected"))) + foo_prot() +Index: b/gold/testsuite/icf_safe_test.sh +=================================================================== +--- a/gold/testsuite/icf_safe_test.sh ++++ b/gold/testsuite/icf_safe_test.sh +@@ -57,7 +57,7 @@ END { + + arch_specific_safe_fold() + { +- grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e "ARM" -e "TILE" -e "PowerPC" $2` ++ grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e "ARM" -e "TILE" -e "PowerPC" -e "AArch64" $2` + if [ $? -eq 0 ]; + then + check_fold $3 $4 $5 --- binutils-2.25.1.orig/debian/patches/aarch64-libpath.diff +++ binutils-2.25.1/debian/patches/aarch64-libpath.diff @@ -0,0 +1,27 @@ +Index: b/ld/emulparams/aarch64linux.sh +=================================================================== +--- a/ld/emulparams/aarch64linux.sh ++++ b/ld/emulparams/aarch64linux.sh +@@ -38,12 +38,15 @@ + + # Linux modifies the default library search path to first include + # a 64-bit specific directory. +-case "$target" in +- aarch64*-linux*) +- case "$EMULATION_NAME" in +- aarch64linux*) LIBPATH_SUFFIX=64 ;; +- esac +- ;; +-esac ++ ++# not for multiarch systems ... ++ ++#case "$target" in ++# aarch64*-linux*) ++# case "$EMULATION_NAME" in ++# aarch64linux*) LIBPATH_SUFFIX=64 ;; ++# esac ++# ;; ++#esac + + ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64.so.1\" --- binutils-2.25.1.orig/debian/patches/aarch64-thunderx.diff +++ binutils-2.25.1/debian/patches/aarch64-thunderx.diff @@ -0,0 +1,28 @@ +# DP: gas: Recognize: AAarch64 ThunderX processor. + +Index: b/gas/config/tc-aarch64.c +=================================================================== +--- a/gas/config/tc-aarch64.c ++++ b/gas/config/tc-aarch64.c +@@ -7191,6 +7191,9 @@ static const struct aarch64_cpu_option_t + {"exynos-m1", AARCH64_FEATURE (AARCH64_ARCH_V8, + AARCH64_FEATURE_CRC | AARCH64_FEATURE_CRYPTO), + "Samsung Exynos M1"}, ++ {"thunderx", AARCH64_FEATURE (AARCH64_ARCH_V8, ++ AARCH64_FEATURE_CRC | AARCH64_FEATURE_CRYPTO), ++ "Cavium ThunderX"}, + /* The 'xgene-1' name is an older name for 'xgene1', which was used + in earlier releases and is superseded by 'xgene1' in all + tools. */ +Index: b/gas/doc/c-aarch64.texi +=================================================================== +--- a/gas/doc/c-aarch64.texi ++++ b/gas/doc/c-aarch64.texi +@@ -59,6 +59,7 @@ on the target processor. The following + @code{cortex-a57}, + @code{cortex-a72}, + @code{exynos-m1}, ++@code{thunderx}, + @code{xgene1}, + and + @code{xgene2}. --- binutils-2.25.1.orig/debian/patches/arm-ld-unique-tests.diff +++ binutils-2.25.1/debian/patches/arm-ld-unique-tests.diff @@ -0,0 +1,55 @@ +# DP: ld/testsuite/ld-unique: Fix running unique tests on ARM + +The @ character is a comment character on ARM, so use % instead. Also +use a wider glob for matching ARM targets to make sure the test gets +run. + +ld/testsuite/ChangeLog: + +2014-10-23 Will Newton + + * ld-unique/unique.exp: Use a wider glob for matching ARM + targets. + * ld-unique/unique.s: Use % instead of @ in .type directive. + * ld-unique/unique_shared.s: Likewise. +--- + ld/testsuite/ld-unique/unique.exp | 2 +- + ld/testsuite/ld-unique/unique.s | 2 +- + ld/testsuite/ld-unique/unique_shared.s | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp +index a93f9b2..994ed87 100644 +--- a/ld/testsuite/ld-unique/unique.exp ++++ b/ld/testsuite/ld-unique/unique.exp +@@ -28,7 +28,7 @@ + # arm, powerpc, and sparc so far. + if {!(([istarget "i?86-*-*"] + || [istarget "x86_64-*-*"] +- || [istarget "arm-*-*"] ++ || [istarget "arm*-*-*"] + || [istarget "powerpc*-*-*"] + || [istarget "sparc*-*-*"]) + && ([istarget "*-*-elf*"] +diff --git a/ld/testsuite/ld-unique/unique.s b/ld/testsuite/ld-unique/unique.s +index 9b0593c..7477a69 100644 +--- a/ld/testsuite/ld-unique/unique.s ++++ b/ld/testsuite/ld-unique/unique.s +@@ -1,4 +1,4 @@ +- .type a, @gnu_unique_object ++ .type a, %gnu_unique_object + a: .long 0 + .size a, .-a + +diff --git a/ld/testsuite/ld-unique/unique_shared.s b/ld/testsuite/ld-unique/unique_shared.s +index b18a5b1..8022291 100644 +--- a/ld/testsuite/ld-unique/unique_shared.s ++++ b/ld/testsuite/ld-unique/unique_shared.s +@@ -1,3 +1,3 @@ +- .type b, @gnu_unique_object ++ .type b, %gnu_unique_object + b: .long 0 + .size b, .-b +-- +1.9.3 + --- binutils-2.25.1.orig/debian/patches/branch-updates.diff +++ binutils-2.25.1/debian/patches/branch-updates.diff @@ -0,0 +1,5 @@ +# DP: updates from the binutils-2.25 branch + +# git diff 15a2e5b3fab5543c499a58783d9562c0c973fc1f 7dcadfe848fc3bc443795eeac919b69f4ab34cbe +# exclude bfd/{configure{,.ac},Makefile.{am,in}} + --- binutils-2.25.1.orig/debian/patches/branch-version.diff +++ binutils-2.25.1/debian/patches/branch-version.diff @@ -0,0 +1,52 @@ +diff --git a/bfd/Makefile.am b/bfd/Makefile.am +index ea4fd28..8610d5e 100644 +--- a/bfd/Makefile.am ++++ b/bfd/Makefile.am +@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign + ACLOCAL_AMFLAGS = -I . -I .. -I ../config + + # Uncomment the following line when doing a release. +-RELEASE=y ++# RELEASE=y + + INCDIR = $(srcdir)/../include + CSEARCH = -I. -I$(srcdir) -I$(INCDIR) +diff --git a/bfd/Makefile.in b/bfd/Makefile.in +index 741809c..34196aa 100644 +--- a/bfd/Makefile.in ++++ b/bfd/Makefile.in +@@ -320,7 +320,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign + ACLOCAL_AMFLAGS = -I . -I .. -I ../config + + # Uncomment the following line when doing a release. +-RELEASE = y ++# RELEASE=y + INCDIR = $(srcdir)/../include + CSEARCH = -I. -I$(srcdir) -I$(INCDIR) + SUBDIRS = doc po +diff --git a/bfd/configure b/bfd/configure +index bc242b9..d31f0d9 100755 +--- a/bfd/configure ++++ b/bfd/configure +@@ -3988,7 +3988,7 @@ fi + + # Define the identity of the package. + PACKAGE=bfd +- VERSION=2.22 ++ VERSION=2.22.0 + + + cat >>confdefs.h <<_ACEOF +diff --git a/bfd/configure.ac b/bfd/configure.ac +index 435aaaa..9ba3000 100644 +--- a/bfd/configure.ac ++++ b/bfd/configure.ac +@@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([libbfd.c]) + AC_CANONICAL_TARGET + AC_ISC_POSIX + +-AM_INIT_AUTOMAKE(bfd, 2.22) ++AM_INIT_AUTOMAKE(bfd, 2.22.0) + + dnl These must be called before LT_INIT, because it may want + dnl to call AC_CHECK_PROG. --- binutils-2.25.1.orig/debian/patches/fix-Bsymbolic-functions.diff +++ binutils-2.25.1/debian/patches/fix-Bsymbolic-functions.diff @@ -0,0 +1,241 @@ +From a496fbc8802f0a5719db6347a43cc869e03d83c9 Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Sat, 25 Jul 2015 16:38:42 +0930 +Subject: [PATCH] Fix broken -Bsymbolic-functions + +For selected targets. The testcase reveals a number of targets that +still need fixing. + +bfd/ + * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to + check if a symbol should be bound symbolically. + * elf32-hppa.c (elf32_hppa_check_relocs, + elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section, + elf32_hppa_finish_dynamic_symbol): Likewise. + * elf32-m68k.c (elf_m68k_check_relocs, + elf_m68k_relocate_section): Likewise. + * elf32-nios2.c (nios2_elf32_relocate_section, + nios2_elf32_check_relocs, allocate_dynrelocs): Likewise. + * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol, + elf32_tic6x_relocate_section): Likewise. +ld/testsuite/ + * ld-elf/symbolic-func.s, + * ld-elf/symbolic-func.r: New test. + * ld-elf/elf.exp: Run it. +--- + bfd/ChangeLog | 14 ++++++++++++++ + bfd/elf32-arm.c | 2 +- + bfd/elf32-hppa.c | 8 ++++---- + bfd/elf32-m68k.c | 4 ++-- + bfd/elf32-nios2.c | 6 +++--- + bfd/elf32-tic6x.c | 4 ++-- + ld/testsuite/ChangeLog | 6 ++++++ + ld/testsuite/ld-elf/elf.exp | 10 +++++++++- + ld/testsuite/ld-elf/symbolic-func.r | 18 ++++++++++++++++++ + ld/testsuite/ld-elf/symbolic-func.s | 13 +++++++++++++ + 10 files changed, 72 insertions(+), 13 deletions(-) + create mode 100644 ld/testsuite/ld-elf/symbolic-func.r + create mode 100644 ld/testsuite/ld-elf/symbolic-func.s + +diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c +index 919df17..367dff3 100644 +--- a/bfd/elf32-arm.c ++++ b/bfd/elf32-arm.c +@@ -8449,7 +8449,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + else if (h != NULL + && h->dynindx != -1 + && (!info->shared +- || !info->symbolic ++ || !SYMBOLIC_BIND (info, h) + || !h->def_regular)) + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); + else +diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c +index af512a7..f611e0d 100644 +--- a/bfd/elf32-hppa.c ++++ b/bfd/elf32-hppa.c +@@ -1467,7 +1467,7 @@ elf32_hppa_check_relocs (bfd *abfd, + && (sec->flags & SEC_ALLOC) != 0 + && (IS_ABSOLUTE_RELOC (r_type) + || (hh != NULL +- && (!info->symbolic ++ && (!SYMBOLIC_BIND (info, &hh->eh) + || hh->eh.root.type == bfd_link_hash_defweak + || !hh->eh.def_regular)))) + || (ELIMINATE_COPY_RELOCS +@@ -1819,7 +1819,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, + || (eh->def_regular + && eh->root.type != bfd_link_hash_defweak + && ! hppa_elf_hash_entry (eh)->plabel +- && (!info->shared || info->symbolic))) ++ && (!info->shared || SYMBOLIC_BIND (info, eh)))) + { + /* The .plt entry is not needed when: + a) Garbage collection has removed all references to the +@@ -4005,7 +4005,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, + && (plabel + || !IS_ABSOLUTE_RELOC (r_type) + || !info->shared +- || !info->symbolic ++ || !SYMBOLIC_BIND (info, &hh->eh) + || !hh->eh.def_regular)) + { + outrel.r_info = ELF32_R_INFO (hh->eh.dynindx, r_type); +@@ -4389,7 +4389,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, + global offset table will already have been initialized in the + relocate_section function. */ + if (info->shared +- && (info->symbolic || eh->dynindx == -1) ++ && (SYMBOLIC_BIND (info, eh) || eh->dynindx == -1) + && eh->def_regular) + { + rela.r_info = ELF32_R_INFO (0, R_PARISC_DIR32); +diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c +index fad3ec6..db0d0da 100644 +--- a/bfd/elf32-m68k.c ++++ b/bfd/elf32-m68k.c +@@ -2758,7 +2758,7 @@ elf_m68k_check_relocs (bfd *abfd, + if (!(info->shared + && (sec->flags & SEC_ALLOC) != 0 + && h != NULL +- && (!info->symbolic ++ && (!SYMBOLIC_BIND (info, h) + || h->root.type == bfd_link_hash_defweak + || !h->def_regular))) + { +@@ -4027,7 +4027,7 @@ elf_m68k_relocate_section (bfd *output_bfd, + || r_type == R_68K_PC16 + || r_type == R_68K_PC32 + || !info->shared +- || !info->symbolic ++ || !SYMBOLIC_BIND (info, h) + || !h->def_regular)) + { + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); +diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c +index e5b7763..a5ab54f 100644 +--- a/bfd/elf32-nios2.c ++++ b/bfd/elf32-nios2.c +@@ -4398,7 +4398,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, + else if (h != NULL + && h->dynindx != -1 + && (!info->shared +- || !info->symbolic ++ || !SYMBOLIC_BIND (info, h) + || !h->def_regular)) + { + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); +@@ -4909,7 +4909,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, + && (sec->flags & SEC_ALLOC) != 0 + && (r_type == R_NIOS2_BFD_RELOC_32 + || (h != NULL && ! h->needs_plt +- && (! info->symbolic || ! h->def_regular)))) ++ && (! SYMBOLIC_BIND (info, h) || ! h->def_regular)))) + { + struct elf32_nios2_dyn_relocs *p; + struct elf32_nios2_dyn_relocs **head; +@@ -5752,7 +5752,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) + if (info->shared) + { + if (h->def_regular +- && (h->forced_local || info->symbolic)) ++ && (h->forced_local || SYMBOLIC_BIND (info, h))) + { + struct elf32_nios2_dyn_relocs **pp; + +diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c +index 8bfad84..7fc385b 100644 +--- a/bfd/elf32-tic6x.c ++++ b/bfd/elf32-tic6x.c +@@ -1849,7 +1849,7 @@ elf32_tic6x_finish_dynamic_symbol (bfd * output_bfd, + The entry in the global offset table will already have been + initialized in the relocate_section function. */ + if (info->shared +- && (info->symbolic ++ && (SYMBOLIC_BIND (info, h) + || h->dynindx == -1 || h->forced_local) && h->def_regular) + { + asection *s = h->root.u.def.section; +@@ -2449,7 +2449,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, + else if (h != NULL + && h->dynindx != -1 + && (!info->shared +- || !info->symbolic ++ || !SYMBOLIC_BIND (info, h) + || !h->def_regular)) + { + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); +diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp +index d1a70ea..55bcb72 100644 +--- a/ld/testsuite/ld-elf/elf.exp ++++ b/ld/testsuite/ld-elf/elf.exp +@@ -77,7 +77,7 @@ if { ![istarget hppa64*-hpux*] } { + } + } + +-# Only run these tests on targets thats support creating shared libraries. ++# Only run these tests on targets that support creating shared libraries. + if { [check_shared_lib_support] } then { + # Run a test to check linking a shared library with a broken linker + # script that accidentally marks dynamic sections as notes. The +@@ -107,6 +107,14 @@ if { [check_shared_lib_support] } then { + "--as-needed" "--start-group tmpdir/pr17068a.a tmpdir/pr17068.so tmpdir/pr17068b.a --end-group" "" + {start.s pr17068.s} {} "pr17068"} + } ++ # xfail on tic6x due to non-PIC/non-PID warnings ++ setup_xfail "tic6x-*-*" ++ run_ld_link_tests { ++ {"-Bsymbolic-functions" ++ "-shared -Bsymbolic-functions" "" "" ++ {symbolic-func.s} {{readelf {-r --wide} symbolic-func.r}} ++ "symbolic-func.so"} ++ } + } + + set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +diff --git a/ld/testsuite/ld-elf/symbolic-func.r b/ld/testsuite/ld-elf/symbolic-func.r +new file mode 100644 +index 0000000..174e76f +--- /dev/null ++++ b/ld/testsuite/ld-elf/symbolic-func.r +@@ -0,0 +1,18 @@ ++# Most targets will emit an R_*_RELATIVE reloc here, but RELATIVE ++# relocs are superfluous. A target can do without them by simply ++# defining an ADDR32 or ADDR64 style reloc without a symbol to behave ++# like a RELATIVE reloc. GLOB_DAT relocs are similarly superfluous. ++# In fact, a RELATIVE reloc can be wrong even if a target does have ++# them, if the 32-bit or 64-bit field being relocated is unaligned. ++# In that case the target ought to emit a UADDR32/64 or similar rather ++# than a RELATIVE reloc. ++# ++# We also allow a dynamic reloc with a reference to .text as that ++# should also resolve correctly. No reloc, or one referencing "fun" ++# is incorrect. Also fail the test on finding a reloc at offset 0, ++# typically a NONE reloc. ++ ++Relocation section.* ++ *Offset.* ++0*[1-9a-f][0-9a-f]* +[^ ]+ +[^ ]+ +([0-9a-f]+( +\.text( \+ 0)?)?)? ++#pass +diff --git a/ld/testsuite/ld-elf/symbolic-func.s b/ld/testsuite/ld-elf/symbolic-func.s +new file mode 100644 +index 0000000..29f4138 +--- /dev/null ++++ b/ld/testsuite/ld-elf/symbolic-func.s +@@ -0,0 +1,13 @@ ++ .text ++ .global fun ++ .type fun, %function ++fun: ++ .space 4 ++ .size fun, .-fun ++ ++ .section .data.rel.ro,"aw",%progbits ++ .p2align 3 ++ .type fun_ptr, %object ++fun_ptr: ++ .dc.a fun ++ .size fun_ptr, .-fun_ptr +-- +1.9.4 + --- binutils-2.25.1.orig/debian/patches/gprof-build.diff +++ binutils-2.25.1/debian/patches/gprof-build.diff @@ -0,0 +1,16 @@ +# DP: Fix gprof build error. + +Index: b/gprof/gconfig.in +=================================================================== +--- a/gprof/gconfig.in ++++ b/gprof/gconfig.in +@@ -96,9 +96,6 @@ + #endif + + +-/* Version number of package */ +-#undef VERSION +- + /* Number of bits in a file offset, on hosts where this is settable. */ + #undef _FILE_OFFSET_BITS + --- binutils-2.25.1.orig/debian/patches/mips64-default-n64.diff +++ binutils-2.25.1/debian/patches/mips64-default-n64.diff @@ -0,0 +1,66 @@ +Index: b/bfd/config.bfd +=================================================================== +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1061,6 +1061,16 @@ case "${targ}" in + targ_defvec=mips_elf32_be_vec + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; ++ mips64*el-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec" ++ want64=true ++ ;; ++ mips64*-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" ++ want64=true ++ ;; + mips64*el-*-linux*) + targ_defvec=mips_elf32_ntrad_le_vec + targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" +Index: b/gas/configure.ac +=================================================================== +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -287,6 +287,9 @@ changequote([,])dnl + esac + # Decide which ABI to target by default. + case ${target} in ++ mips64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) + mips_default_abi=N32_ABI + ;; +Index: b/ld/configure.tgt +=================================================================== +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -476,6 +476,12 @@ mips*el-*-vxworks*) targ_emul=elf32elmip + mips*-*-vxworks*) targ_emul=elf32ebmipvxworks + targ_extra_emuls="elf32elmipvxworks" ;; + mips*-*-windiss) targ_emul=elf32mipswindiss ;; ++mips64*el-*-linux-gnuabi64) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf32ltsmipn32 elf64btsmip" ++ targ_extra_libpath=$targ_extra_emuls ;; ++mips64*-*-linux-gnuabi64) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf32btsmipn32 elf64ltsmip" ++ targ_extra_libpath=$targ_extra_emuls ;; + mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls ;; +Index: b/gas/configure +=================================================================== +--- a/gas/configure ++++ b/gas/configure +@@ -12197,6 +12197,9 @@ _ACEOF + esac + # Decide which ABI to target by default. + case ${target} in ++ mips64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) + mips_default_abi=N32_ABI + ;; --- binutils-2.25.1.orig/debian/patches/pr-ld-16428.diff +++ binutils-2.25.1/debian/patches/pr-ld-16428.diff @@ -0,0 +1,158 @@ +# DP: Proposed patch for PR ld/16428, disallow -shared/-pie, -shared/-static, -pie/-static. + +2014-01-10 H.J. Lu + + PR ld/16428 + * ld.texinfo: Updated for -static/-non_shared change. + * ldlex.h (option_values): Add OPTION_STATIC. + * lexsup.c (ld_options): Use OPTION_STATIC for -static/-non_shared. + (parse_args): Handle OPTION_STATIC. Disallow -shared and -pie, + -shared and -static, -pie and -static. + +2014-01-10 H.J. Lu + + PR ld/16428 + * ld-elf/pr16428a.d: New file. + * ld-elf/pr16428b.d: Likewise. + * ld-elf/pr16428c.d: Likewise. + * ld-elf/pr16428d.d: Likewise. + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index ae3d568..bddfdfe 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -1204,11 +1204,11 @@ platforms for which shared libraries are supported. The different + variants of this option are for compatibility with various systems. You + may use this option multiple times on the command line: it affects + library searching for @option{-l} options which follow it. This +-option also implies @option{--unresolved-symbols=report-all}. This +-option can be used with @option{-shared}. Doing so means that a +-shared library is being created but that all of the library's external +-references must be resolved by pulling in entries from static +-libraries. ++option also implies @option{--unresolved-symbols=report-all}. ++@option{-Bstatic} and @option{-dn} can be used with @option{-shared}. ++Doing so means that a shared library is being created but that all of ++the library's external references must be resolved by pulling in entries ++from static libraries. + + @kindex -Bsymbolic + @item -Bsymbolic +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 99f4282..6f237dc 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -49,6 +49,7 @@ enum option_values + OPTION_NO_WARN_SEARCH_MISMATCH, + OPTION_NOINHIBIT_EXEC, + OPTION_NON_SHARED, ++ OPTION_STATIC, + OPTION_NO_WHOLE_ARCHIVE, + OPTION_OFORMAT, + OPTION_RELAX, +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 2f71750..a366613 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -269,9 +269,9 @@ static const struct ld_option ld_options[] = + '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH }, + { {"dn", no_argument, NULL, OPTION_NON_SHARED}, + '\0', NULL, NULL, ONE_DASH }, +- { {"non_shared", no_argument, NULL, OPTION_NON_SHARED}, ++ { {"non_shared", no_argument, NULL, OPTION_STATIC}, + '\0', NULL, NULL, ONE_DASH }, +- { {"static", no_argument, NULL, OPTION_NON_SHARED}, ++ { {"static", no_argument, NULL, OPTION_STATIC}, + '\0', NULL, NULL, ONE_DASH }, + { {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC}, + '\0', NULL, N_("Bind global references locally"), ONE_DASH }, +@@ -523,6 +523,7 @@ parse_args (unsigned argc, char **argv) + struct option *really_longopts; + int last_optind; + enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR; ++ bfd_boolean seen_pie = FALSE, seen_shared = FALSE, seen_static = FALSE; + + shortopts = (char *) xmalloc (OPTION_COUNT * 3 + 2); + longopts = (struct option *) +@@ -707,6 +708,8 @@ parse_args (unsigned argc, char **argv) + case OPTION_CALL_SHARED: + input_flags.dynamic = TRUE; + break; ++ case OPTION_STATIC: ++ seen_static = TRUE; + case OPTION_NON_SHARED: + input_flags.dynamic = FALSE; + break; +@@ -1087,6 +1090,7 @@ parse_args (unsigned argc, char **argv) + case OPTION_SHARED: + if (config.has_shared) + { ++ seen_shared = TRUE; + link_info.shared = TRUE; + /* When creating a shared library, the default + behaviour is to ignore any unresolved references. */ +@@ -1101,6 +1105,7 @@ parse_args (unsigned argc, char **argv) + case OPTION_PIE: + if (config.has_shared) + { ++ seen_pie = TRUE; + link_info.shared = TRUE; + link_info.pie = TRUE; + } +@@ -1445,6 +1450,16 @@ parse_args (unsigned argc, char **argv) + } + } + ++ if (seen_shared) ++ { ++ if (seen_pie) ++ einfo (_("%P%F: -shared and -pie are incompatible\n")); ++ if (seen_static) ++ einfo (_("%P%F: -shared and -static are incompatible\n")); ++ } ++ if (seen_pie && seen_static) ++ einfo (_("%P%F: -pie and -static are incompatible\n")); ++ + while (ingroup) + { + lang_leave_group (); +diff --git a/ld/testsuite/ld-elf/pr16428a.d b/ld/testsuite/ld-elf/pr16428a.d +new file mode 100644 +index 0000000..8f5e833 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr16428a.d +@@ -0,0 +1,4 @@ ++#source: start.s ++#ld: -shared -static ++#target: *-*-linux* *-*-gnu* *-*-nacl* ++#error: -shared and -static are incompatible +diff --git a/ld/testsuite/ld-elf/pr16428b.d b/ld/testsuite/ld-elf/pr16428b.d +new file mode 100644 +index 0000000..f4ccba0 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr16428b.d +@@ -0,0 +1,4 @@ ++#source: start.s ++#ld: -shared -non_shared ++#target: *-*-linux* *-*-gnu* *-*-nacl* ++#error: -shared and -static are incompatible +diff --git a/ld/testsuite/ld-elf/pr16428c.d b/ld/testsuite/ld-elf/pr16428c.d +new file mode 100644 +index 0000000..747e8da +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr16428c.d +@@ -0,0 +1,4 @@ ++#source: start.s ++#ld: -shared -pie ++#target: *-*-linux* *-*-gnu* *-*-nacl* ++#error: -shared and -pie are incompatible +diff --git a/ld/testsuite/ld-elf/pr16428d.d b/ld/testsuite/ld-elf/pr16428d.d +new file mode 100644 +index 0000000..6e7a915 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr16428d.d +@@ -0,0 +1,4 @@ ++#source: start.s ++#ld: -pie -static ++#target: *-*-linux* *-*-gnu* *-*-nacl* ++#error: -pie and -static are incompatible --- binutils-2.25.1.orig/debian/patches/pr17481.diff +++ binutils-2.25.1/debian/patches/pr17481.diff @@ -0,0 +1,1583 @@ +# DP: Fix PR bfd/17481 + +bfd/ + +2014-10-15 Alan Modra + + PR 17481 + * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr" + param, group "section" and "offset" params. Zero discriminator. + * bfd.c (bfd_find_nearest_line): Implement with new + _bfd_find_nearest_line. + (bfd_find_nearest_line_discriminator): Likewise. + * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't + define. + * coff-rs6000.c (xcoff_find_nearest_line, + xcoff_find_nearest_line_discriminator): Delete. + (_bfd_xcoff_find_nearest_line): Don't define. + (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line. + * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't + define. + * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust. + * coffgen.c (coff_find_nearest_line_with_names): Reorder params, + adjust _bfd_dwarf2_find_nearest_line call. + (coff_find_nearest_line): Add "discriminator_ptr" param, reorder + others. Set discriminator. Adjust call. + (coff_find_nearest_line_discriminator): Delete. + * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params. + * dwarf2.c (find_line): Rename to.. + (_bfd_dwarf2_find_nearest_line): ..this, reordering params. + Simplify setting of do_line. Delete old function. + (_bfd_dwarf2_find_line): Delete. + * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add + discriminator_ptr and set it. + * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype. + (_bfd_elf_find_nearest_line_discriminator): Delete. + (_bfd_elf_find_line_discriminator): Delete. + (_bfd_generic_find_nearest_line_discriminator): Don't define. + * elf.c (elf_find_function): Reorder params. + (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr. + Adjust calls. + (_bfd_elf_find_nearest_line_discriminator): Delete. + (_bfd_elf_find_line): Adjust call. + * elf32-arm.c (arm_elf_find_function): Reorder params. + (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr. + Adjust calls. + * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly. + * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params. + (elfNN_aarch64_find_nearest_line): Reorder params, add + discriminator_ptr. Adjust calls. + * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. + * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype. + * libaout.h (NAME (aout, find_nearest_line)): Update prototype. + * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update. + (_bfd_dwarf1_find_nearest_line): Likewise. + (_bfd_dwarf2_find_nearest_line): Likewise. + (_bfd_dwarf2_find_line): Delete. + (_bfd_generic_find_nearest_line_discriminator): Delete. + * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete. + * libcoff-in.h (coff_find_nearest_line): Update prototype. + (coff_find_nearest_line_discriminator): Delete. + (coff_find_nearest_line_with_names): Update prototype. + * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype. + * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add + discriminator_ptr. Adjust calls. + * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype. + * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add + discriminator_ptr and set. + * som.c (som_find_nearest_line): Similarly. + * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for + _bfd_find_nearest_line_discriminator. + (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype. + (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete. + * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to.. + (_bfd_vms_find_nearest_line): ..this. Reorder params, add + "discriminator" and set. + (_bfd_vms_find_nearest_line_discriminator): Delete. + (_bfd_generic_find_nearest_line_discriminator): Don't define. + (alpha_vms_find_nearest_line): Update define. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + +2014-10-15 Alan Modra + + * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line. + * aout-adobe.c (aout_32_find_line): Define. + (aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup, + aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define. + * aout-target.h (MY_find_line): Define. + * aout-tic30.c (MY_find_line): Define. + * binary.c (binary_find_line): Define. + * bout.c (aout_32_find_line): Define. + * coff-rs6000.c (_bfd_xcoff_find_line): Define. + * coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line. + (rs6000_xcoff64_aix_vec): Likewise. + * elf-bfd.h (_bfd_generic_find_line): Don't define. + * elfxx-target.h (bfd_elfNN_find_line): Define. + * i386msdos.c (msdos_find_line): Define. + * i386os9k.c (aout_32_find_line): Define. + * ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func. + (ieee_find_nearest_line, ieee_find_line, + ieee_find_inliner_info): Define. + * ihex.c (ihex_find_line): Define. + * libbfd-in.h (_bfd_nosymbols_find_line): Define. + (_bfd_generic_find_line): Don't define. + * libbfd.c (_bfd_generic_find_line): Delete. + * libcoff-in.h (coff_find_line): Define. + * libecoff.h (_bfd_ecoff_find_line): Define. + * mach-o.h (bfd_mach_o_find_line): Define. + * mmo.c (mmo_find_line): Define. + * nlm-target.h (nlm_find_line): Define. + * oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete. + (oasys_find_nearest_line, oasys_find_line, + oasys_find_inliner_info): Define. + * pef.c (bfd_pef_find_line): Define. + * plugin.c (bfd_plugin_find_line): Define. + * ppcboot.c (ppcboot_find_line): Define. + * som.c (som_find_line): Define. + * srec.c (srec_find_line): Define. + * tekhex.c (tekhex_find_line): Define. + * versados.c (versados_find_line): Define. + * vms-alpha.c (alpha_vms_find_line): Define. + * xsym.c (bfd_sym_find_line): Define. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + +--- a/bfd/aout-adobe.c ++++ b/bfd/aout-adobe.c +@@ -446,9 +446,10 @@ aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, + + /* Build the transfer vector for Adobe A.Out files. */ + +-#define aout_32_bfd_make_debug_symbol ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) +-#define aout_32_bfd_reloc_type_lookup ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr) +-#define aout_32_bfd_reloc_name_lookup ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr) ++#define aout_32_find_line _bfd_nosymbols_find_line ++#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol ++#define aout_32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup ++#define aout_32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup + #define aout_32_close_and_cleanup aout_32_bfd_free_cached_info + #define aout_32_set_arch_mach aout_adobe_set_arch_mach + #define aout_32_set_section_contents aout_adobe_set_section_contents +--- a/bfd/aout-target.h ++++ b/bfd/aout-target.h +@@ -468,6 +468,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) + #ifndef MY_find_nearest_line + #define MY_find_nearest_line NAME (aout, find_nearest_line) + #endif ++#ifndef MY_find_line ++#define MY_find_line _bfd_nosymbols_find_line ++#endif + #ifndef MY_find_inliner_info + #define MY_find_inliner_info _bfd_nosymbols_find_inliner_info + #endif +--- a/bfd/aout-tic30.c ++++ b/bfd/aout-tic30.c +@@ -926,6 +926,9 @@ tic30_aout_set_arch_mach (bfd *abfd, + #ifndef MY_find_nearest_line + #define MY_find_nearest_line NAME (aout, find_nearest_line) + #endif ++#ifndef MY_find_line ++#define MY_find_line _bfd_nosymbols_find_line ++#endif + #ifndef MY_find_inliner_info + #define MY_find_inliner_info _bfd_nosymbols_find_inliner_info + #endif +--- a/bfd/aoutx.h ++++ b/bfd/aoutx.h +@@ -2640,12 +2640,13 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, + + bfd_boolean + NAME (aout, find_nearest_line) (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *disriminator_ptr) + { + /* Run down the file looking for the filename, function and linenumber. */ + asymbol **p; +@@ -2663,6 +2664,8 @@ NAME (aout, find_nearest_line) (bfd *abfd, + *filename_ptr = abfd->filename; + *functionname_ptr = 0; + *line_ptr = 0; ++ if (disriminator_ptr) ++ *disriminator_ptr = 0; + + if (symbols != NULL) + { +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -6651,12 +6651,12 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); + + #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ + BFD_SEND (abfd, _bfd_find_nearest_line, \ +- (abfd, sec, syms, off, file, func, line)) ++ (abfd, syms, sec, off, file, func, line, NULL)) + + #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ + line, disc) \ +- BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ +- (abfd, sec, syms, off, file, func, line, disc)) ++ BFD_SEND (abfd, _bfd_find_nearest_line, \ ++ (abfd, syms, sec, off, file, func, line, disc)) + + #define bfd_find_line(abfd, syms, sym, file, line) \ + BFD_SEND (abfd, _bfd_find_line, \ +@@ -7018,8 +7018,7 @@ typedef struct bfd_target + NAME##_bfd_is_target_special_symbol, \ + NAME##_get_lineno, \ + NAME##_find_nearest_line, \ +- _bfd_generic_find_nearest_line_discriminator, \ +- _bfd_generic_find_line, \ ++ NAME##_find_line, \ + NAME##_find_inliner_info, \ + NAME##_bfd_make_debug_symbol, \ + NAME##_read_minisymbols, \ +@@ -7040,10 +7039,7 @@ typedef struct bfd_target + bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); + alent * (*_get_lineno) (bfd *, struct bfd_symbol *); + bfd_boolean (*_bfd_find_nearest_line) +- (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, +- const char **, const char **, unsigned int *); +- bfd_boolean (*_bfd_find_nearest_line_discriminator) +- (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, ++ (bfd *, struct bfd_symbol **, struct bfd_section *, bfd_vma, + const char **, const char **, unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) + (bfd *, struct bfd_symbol **, struct bfd_symbol *, +--- a/bfd/bfd.c ++++ b/bfd/bfd.c +@@ -1444,12 +1444,12 @@ DESCRIPTION + . + .#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ + . BFD_SEND (abfd, _bfd_find_nearest_line, \ +-. (abfd, sec, syms, off, file, func, line)) ++. (abfd, syms, sec, off, file, func, line, NULL)) + . + .#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ + . line, disc) \ +-. BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ +-. (abfd, sec, syms, off, file, func, line, disc)) ++. BFD_SEND (abfd, _bfd_find_nearest_line, \ ++. (abfd, syms, sec, off, file, func, line, disc)) + . + .#define bfd_find_line(abfd, syms, sym, file, line) \ + . BFD_SEND (abfd, _bfd_find_line, \ +--- a/bfd/binary.c ++++ b/bfd/binary.c +@@ -204,6 +204,7 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED, + #define binary_bfd_is_local_label_name bfd_generic_is_local_label_name + #define binary_get_lineno _bfd_nosymbols_get_lineno + #define binary_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define binary_find_line _bfd_nosymbols_find_line + #define binary_find_inliner_info _bfd_nosymbols_find_inliner_info + #define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define binary_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/bout.c ++++ b/bfd/bout.c +@@ -1374,6 +1374,7 @@ b_out_bfd_get_relocated_section_contents (bfd *output_bfd, + + /* Build the transfer vectors for Big and Little-Endian B.OUT files. */ + ++#define aout_32_find_line _bfd_nosymbols_find_line + #define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define aout_32_close_and_cleanup aout_32_bfd_free_cached_info + #define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +--- a/bfd/coff-i386.c ++++ b/bfd/coff-i386.c +@@ -605,9 +605,6 @@ coff_i386_is_local_label_name (bfd *abfd, const char *name) + + #include "coffcode.h" + +-#define _bfd_generic_find_nearest_line_discriminator \ +- coff_find_nearest_line_discriminator +- + const bfd_target + #ifdef TARGET_SYM + TARGET_SYM = +--- a/bfd/coff-rs6000.c ++++ b/bfd/coff-rs6000.c +@@ -430,39 +430,6 @@ static const struct dwarf_debug_section xcoff_debug_sections[] = + { NULL, NULL }, /* .debug_weaknames */ + { NULL, NULL }, + }; +- +-static bfd_boolean +-xcoff_find_nearest_line (bfd *abfd, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *line_ptr) +-{ +- return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections, +- section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr); +-} +- +-static bfd_boolean +-xcoff_find_nearest_line_discriminator (bfd *abfd, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *line_ptr, +- unsigned int *discriminator) +-{ +- *discriminator = 0; +- return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections, +- section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr); +-} +- + + void + _bfd_xcoff_swap_sym_in (bfd *abfd, void * ext1, void * in1) +@@ -4045,9 +4012,8 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = { + #define _bfd_xcoff_bfd_is_target_special_symbol \ + coff_bfd_is_target_special_symbol + #define _bfd_xcoff_get_lineno coff_get_lineno +-#define _bfd_xcoff_find_nearest_line xcoff_find_nearest_line +-#define _bfd_generic_find_nearest_line_discriminator \ +- xcoff_find_nearest_line_discriminator ++#define _bfd_xcoff_find_nearest_line coff_find_nearest_line ++#define _bfd_xcoff_find_line coff_find_line + #define _bfd_xcoff_find_inliner_info coff_find_inliner_info + #define _bfd_xcoff_bfd_make_debug_symbol coff_bfd_make_debug_symbol + #define _bfd_xcoff_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/coff-x86_64.c ++++ b/bfd/coff-x86_64.c +@@ -730,9 +730,6 @@ coff_amd64_is_local_label_name (bfd *abfd, const char *name) + #define amd64coff_object_p coff_object_p + #endif + +-#define _bfd_generic_find_nearest_line_discriminator \ +- coff_find_nearest_line_discriminator +- + const bfd_target + #ifdef TARGET_SYM + TARGET_SYM = +--- a/bfd/coff64-rs6000.c ++++ b/bfd/coff64-rs6000.c +@@ -2716,8 +2716,7 @@ const bfd_target rs6000_xcoff64_vec = + coff_bfd_is_target_special_symbol, + coff_get_lineno, + coff_find_nearest_line, +- _bfd_generic_find_nearest_line_discriminator, +- _bfd_generic_find_line, ++ coff_find_line, + coff_find_inliner_info, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, +@@ -2974,8 +2973,7 @@ const bfd_target rs6000_xcoff64_aix_vec = + coff_bfd_is_target_special_symbol, + coff_get_lineno, + coff_find_nearest_line, +- _bfd_generic_find_nearest_line_discriminator, +- _bfd_generic_find_line, ++ coff_find_line, + coff_find_inliner_info, + coff_bfd_make_debug_symbol, + _bfd_generic_read_minisymbols, +--- a/bfd/coffgen.c ++++ b/bfd/coffgen.c +@@ -2191,13 +2191,13 @@ _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, + + bfd_boolean + coff_find_nearest_line_with_names (bfd *abfd, +- const struct dwarf_debug_section *debug_sections, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ const struct dwarf_debug_section *debug_sections) + { + bfd_boolean found; + unsigned int i; +@@ -2222,10 +2222,9 @@ coff_find_nearest_line_with_names (bfd *abfd, + return TRUE; + + /* Also try examining DWARF2 debugging information. */ +- if (_bfd_dwarf2_find_nearest_line (abfd, debug_sections, +- section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr, NULL, 0, ++ line_ptr, NULL, debug_sections, 0, + &coff_data(abfd)->dwarf2_find_line_info)) + return TRUE; + +@@ -2407,38 +2406,22 @@ coff_find_nearest_line_with_names (bfd *abfd, + + bfd_boolean + coff_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { +- return coff_find_nearest_line_with_names (abfd, dwarf_debug_sections, +- section, symbols, offset, ++ if (discriminator_ptr) ++ *discriminator_ptr = 0; ++ return coff_find_nearest_line_with_names (abfd, symbols, section, offset, + filename_ptr, functionname_ptr, +- line_ptr); ++ line_ptr, dwarf_debug_sections); + } + + bfd_boolean +-coff_find_nearest_line_discriminator (bfd *abfd, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *line_ptr, +- unsigned int *discriminator) +-{ +- *discriminator = 0; +- return coff_find_nearest_line_with_names (abfd, dwarf_debug_sections, +- section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr); +-} +- +- +-bfd_boolean + coff_find_inliner_info (bfd *abfd, + const char **filename_ptr, + const char **functionname_ptr, +--- a/bfd/dwarf1.c ++++ b/bfd/dwarf1.c +@@ -449,8 +449,8 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, + + bfd_boolean + _bfd_dwarf1_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -3602,19 +3602,19 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, + field and in the abbreviation offset, or zero to indicate that the + default value should be used. */ + +-static bfd_boolean +-find_line (bfd *abfd, +- const struct dwarf_debug_section *debug_sections, +- asection *section, +- bfd_vma offset, +- asymbol *symbol, +- asymbol **symbols, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *linenumber_ptr, +- unsigned int *discriminator_ptr, +- unsigned int addr_size, +- void **pinfo) ++bfd_boolean ++_bfd_dwarf2_find_nearest_line (bfd *abfd, ++ asymbol **symbols, ++ asymbol *symbol, ++ asection *section, ++ bfd_vma offset, ++ const char **filename_ptr, ++ const char **functionname_ptr, ++ unsigned int *linenumber_ptr, ++ unsigned int *discriminator_ptr, ++ const struct dwarf_debug_section *debug_sections, ++ unsigned int addr_size, ++ void **pinfo) + { + /* Read each compilation unit from the section .debug_info, and check + to see if it contains the address we are searching for. If yes, +@@ -3645,21 +3645,18 @@ find_line (bfd *abfd, + + stash = (struct dwarf2_debug *) *pinfo; + +- do_line = (section == NULL +- && offset == 0 +- && functionname_ptr == NULL +- && symbol != NULL); ++ do_line = symbol != NULL; + if (do_line) + { +- addr = symbol->value; ++ BFD_ASSERT (section == NULL && offset == 0 && functionname_ptr == NULL); + section = bfd_get_section (symbol); ++ addr = symbol->value; + } +- else if (section != NULL +- && functionname_ptr != NULL +- && symbol == NULL) +- addr = offset; + else +- abort (); ++ { ++ BFD_ASSERT (section != NULL && functionname_ptr != NULL); ++ addr = offset; ++ } + + if (section->output_section) + addr += section->output_section->vma + section->output_offset; +@@ -3874,45 +3871,6 @@ find_line (bfd *abfd, + return found; + } + +-/* The DWARF2 version of find_nearest_line. +- Return TRUE if the line is found without error. */ +- +-bfd_boolean +-_bfd_dwarf2_find_nearest_line (bfd *abfd, +- const struct dwarf_debug_section *debug_sections, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *linenumber_ptr, +- unsigned int *discriminator_ptr, +- unsigned int addr_size, +- void **pinfo) +-{ +- return find_line (abfd, debug_sections, section, offset, NULL, symbols, +- filename_ptr, functionname_ptr, linenumber_ptr, +- discriminator_ptr, addr_size, pinfo); +-} +- +-/* The DWARF2 version of find_line. +- Return TRUE if the line is found without error. */ +- +-bfd_boolean +-_bfd_dwarf2_find_line (bfd *abfd, +- asymbol **symbols, +- asymbol *symbol, +- const char **filename_ptr, +- unsigned int *linenumber_ptr, +- unsigned int *discriminator_ptr, +- unsigned int addr_size, +- void **pinfo) +-{ +- return find_line (abfd, dwarf_debug_sections, NULL, 0, symbol, symbols, +- filename_ptr, NULL, linenumber_ptr, discriminator_ptr, +- addr_size, pinfo); +-} +- + bfd_boolean + _bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, + const char **filename_ptr, +--- a/bfd/ecoff.c ++++ b/bfd/ecoff.c +@@ -1704,12 +1704,13 @@ _bfd_ecoff_canonicalize_reloc (bfd *abfd, + + bfd_boolean + _bfd_ecoff_find_nearest_line (bfd *abfd, ++ asymbol **symbols ATTRIBUTE_UNUSED, + asection *section, +- asymbol **ignore_symbols ATTRIBUTE_UNUSED, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *retline_ptr) ++ unsigned int *retline_ptr, ++ unsigned int *discriminator_ptr) + { + const struct ecoff_debug_swap * const debug_swap + = &ecoff_backend (abfd)->debug_swap; +@@ -1730,8 +1731,10 @@ _bfd_ecoff_find_nearest_line (bfd *abfd, + if (ecoff_data (abfd)->find_line_info == NULL) + return FALSE; + } +- line_info = ecoff_data (abfd)->find_line_info; + ++ if (discriminator_ptr) ++ *discriminator_ptr = 0; ++ line_info = ecoff_data (abfd)->find_line_info; + return _bfd_ecoff_locate_line (abfd, section, offset, debug_info, + debug_swap, line_info, filename_ptr, + functionname_ptr, retline_ptr); +--- a/bfd/elf-bfd.h ++++ b/bfd/elf-bfd.h +@@ -1898,18 +1898,10 @@ extern alent *_bfd_elf_get_lineno + extern bfd_boolean _bfd_elf_set_arch_mach + (bfd *, enum bfd_architecture, unsigned long); + extern bfd_boolean _bfd_elf_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, +- unsigned int *); +-extern bfd_boolean _bfd_elf_find_nearest_line_discriminator +- (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, +- unsigned int *, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); + extern bfd_boolean _bfd_elf_find_line + (bfd *, asymbol **, asymbol *, const char **, unsigned int *); +-extern bfd_boolean _bfd_elf_find_line_discriminator +- (bfd *, asymbol **, asymbol *, const char **, unsigned int *, unsigned int *); +-#define _bfd_generic_find_line _bfd_elf_find_line +-#define _bfd_generic_find_nearest_line_discriminator \ +- _bfd_elf_find_nearest_line_discriminator + extern bfd_boolean _bfd_elf_find_inliner_info + (bfd *, const char **, const char **, unsigned int *); + #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -7549,8 +7549,8 @@ _bfd_elf_set_arch_mach (bfd *abfd, + + static bfd_boolean + elf_find_function (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr) +@@ -7652,52 +7652,35 @@ elf_find_function (bfd *abfd, + + bfd_boolean + _bfd_elf_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) +-{ +- return _bfd_elf_find_nearest_line_discriminator (abfd, section, symbols, +- offset, filename_ptr, +- functionname_ptr, +- line_ptr, +- NULL); +-} +- +-bfd_boolean +-_bfd_elf_find_nearest_line_discriminator (bfd *abfd, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *line_ptr, +- unsigned int *discriminator_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + bfd_boolean found; + +- if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr)) ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, 0, ++ &elf_tdata (abfd)->dwarf2_find_line_info)) + { + if (!*functionname_ptr) +- elf_find_function (abfd, section, symbols, offset, ++ elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + + return TRUE; + } + +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr, discriminator_ptr, 0, +- &elf_tdata (abfd)->dwarf2_find_line_info)) ++ if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, ++ filename_ptr, functionname_ptr, line_ptr)) + { + if (!*functionname_ptr) +- elf_find_function (abfd, section, symbols, offset, ++ elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + +@@ -7715,7 +7698,7 @@ _bfd_elf_find_nearest_line_discriminator (bfd *abfd, + if (symbols == NULL) + return FALSE; + +- if (! elf_find_function (abfd, section, symbols, offset, ++ if (! elf_find_function (abfd, symbols, section, offset, + filename_ptr, functionname_ptr)) + return FALSE; + +@@ -7729,20 +7712,10 @@ bfd_boolean + _bfd_elf_find_line (bfd *abfd, asymbol **symbols, asymbol *symbol, + const char **filename_ptr, unsigned int *line_ptr) + { +- return _bfd_elf_find_line_discriminator (abfd, symbols, symbol, +- filename_ptr, line_ptr, +- NULL); +-} +- +-bfd_boolean +-_bfd_elf_find_line_discriminator (bfd *abfd, asymbol **symbols, asymbol *symbol, +- const char **filename_ptr, +- unsigned int *line_ptr, +- unsigned int *discriminator_ptr) +-{ +- return _bfd_dwarf2_find_line (abfd, symbols, symbol, +- filename_ptr, line_ptr, discriminator_ptr, 0, +- &elf_tdata (abfd)->dwarf2_find_line_info); ++ return _bfd_dwarf2_find_nearest_line (abfd, symbols, symbol, NULL, 0, ++ filename_ptr, NULL, line_ptr, NULL, ++ dwarf_debug_sections, 0, ++ &elf_tdata (abfd)->dwarf2_find_line_info); + } + + /* After a call to bfd_find_nearest_line, successive calls to +--- a/bfd/elf32-arm.c ++++ b/bfd/elf32-arm.c +@@ -13083,8 +13083,8 @@ elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym) + + static bfd_boolean + arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED, +- asection * section, + asymbol ** symbols, ++ asection * section, + bfd_vma offset, + const char ** filename_ptr, + const char ** functionname_ptr) +@@ -13145,31 +13145,33 @@ arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED, + + static bfd_boolean + elf32_arm_find_nearest_line (bfd * abfd, +- asection * section, + asymbol ** symbols, ++ asection * section, + bfd_vma offset, + const char ** filename_ptr, + const char ** functionname_ptr, +- unsigned int * line_ptr) ++ unsigned int * line_ptr, ++ unsigned int * discriminator_ptr) + { + bfd_boolean found = FALSE; + +- /* We skip _bfd_dwarf1_find_nearest_line since no known ARM toolchain uses it. */ +- +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr, NULL, 0, ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, 0, + & elf_tdata (abfd)->dwarf2_find_line_info)) + { + if (!*functionname_ptr) +- arm_elf_find_function (abfd, section, symbols, offset, ++ arm_elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + + return TRUE; + } + ++ /* Skip _bfd_dwarf1_find_nearest_line since no known ARM toolchain ++ uses DWARF1. */ ++ + if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, + & found, filename_ptr, + functionname_ptr, line_ptr, +@@ -13182,7 +13184,7 @@ elf32_arm_find_nearest_line (bfd * abfd, + if (symbols == NULL) + return FALSE; + +- if (! arm_elf_find_function (abfd, section, symbols, offset, ++ if (! arm_elf_find_function (abfd, symbols, section, offset, + filename_ptr, functionname_ptr)) + return FALSE; + +--- a/bfd/elf64-alpha.c ++++ b/bfd/elf64-alpha.c +@@ -1442,17 +1442,19 @@ elf64_alpha_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) + } + + static bfd_boolean +-elf64_alpha_find_nearest_line (bfd *abfd, asection *section, asymbol **symbols, +- bfd_vma offset, const char **filename_ptr, ++elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, ++ asection *section, bfd_vma offset, ++ const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + asection *msec; + +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr, NULL, 0, ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, 0, + &elf_tdata (abfd)->dwarf2_find_line_info)) + return TRUE; + +@@ -1532,9 +1534,9 @@ elf64_alpha_find_nearest_line (bfd *abfd, asection *section, asymbol **symbols, + + /* Fall back on the generic ELF find_nearest_line routine. */ + +- return _bfd_elf_find_nearest_line (abfd, section, symbols, offset, ++ return _bfd_elf_find_nearest_line (abfd, symbols, section, offset, + filename_ptr, functionname_ptr, +- line_ptr); ++ line_ptr, discriminator_ptr); + } + + /* Structure used to pass information to alpha_elf_output_extsym. */ +--- a/bfd/elfnn-aarch64.c ++++ b/bfd/elfnn-aarch64.c +@@ -5353,8 +5353,8 @@ elfNN_aarch64_is_target_special_symbol (bfd *abfd ATTRIBUTE_UNUSED, + + static bfd_boolean + aarch64_elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr) +@@ -5413,32 +5413,33 @@ aarch64_elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, + + static bfd_boolean + elfNN_aarch64_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + bfd_boolean found = FALSE; + +- /* We skip _bfd_dwarf1_find_nearest_line since no known AArch64 +- toolchain uses it. */ +- +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr, NULL, 0, ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, 0, + &elf_tdata (abfd)->dwarf2_find_line_info)) + { + if (!*functionname_ptr) +- aarch64_elf_find_function (abfd, section, symbols, offset, ++ aarch64_elf_find_function (abfd, symbols, section, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + + return TRUE; + } + ++ /* Skip _bfd_dwarf1_find_nearest_line since no known AArch64 ++ toolchain uses DWARF1. */ ++ + if (!_bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, + &found, filename_ptr, + functionname_ptr, line_ptr, +@@ -5451,7 +5452,7 @@ elfNN_aarch64_find_nearest_line (bfd *abfd, + if (symbols == NULL) + return FALSE; + +- if (!aarch64_elf_find_function (abfd, section, symbols, offset, ++ if (!aarch64_elf_find_function (abfd, symbols, section, offset, + filename_ptr, functionname_ptr)) + return FALSE; + +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -12591,24 +12591,26 @@ struct mips_elf_find_line + }; + + bfd_boolean +-_bfd_mips_elf_find_nearest_line (bfd *abfd, asection *section, +- asymbol **symbols, bfd_vma offset, ++_bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, ++ asection *section, bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + asection *msec; + +- if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, ++ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, + filename_ptr, functionname_ptr, +- line_ptr)) ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, ++ ABI_64_P (abfd) ? 8 : 0, ++ &elf_tdata (abfd)->dwarf2_find_line_info)) + return TRUE; + +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, ++ if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, + filename_ptr, functionname_ptr, +- line_ptr, NULL, ABI_64_P (abfd) ? 8 : 0, +- &elf_tdata (abfd)->dwarf2_find_line_info)) ++ line_ptr)) + return TRUE; + + msec = bfd_get_section_by_name (abfd, ".mdebug"); +@@ -12687,9 +12689,9 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asection *section, + + /* Fall back on the generic ELF find_nearest_line routine. */ + +- return _bfd_elf_find_nearest_line (abfd, section, symbols, offset, ++ return _bfd_elf_find_nearest_line (abfd, symbols, section, offset, + filename_ptr, functionname_ptr, +- line_ptr); ++ line_ptr, discriminator_ptr); + } + + bfd_boolean +--- a/bfd/elfxx-mips.h ++++ b/bfd/elfxx-mips.h +@@ -86,8 +86,8 @@ extern bfd_boolean _bfd_mips_elf_ignore_discarded_relocs + extern bfd_boolean _bfd_mips_elf_is_target_special_symbol + (bfd *abfd, asymbol *sym); + extern bfd_boolean _bfd_mips_elf_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); + extern bfd_boolean _bfd_mips_elf_find_inliner_info + (bfd *, const char **, const char **, unsigned int *); + extern bfd_boolean _bfd_mips_elf_set_section_contents +--- a/bfd/elfxx-target.h ++++ b/bfd/elfxx-target.h +@@ -49,6 +49,9 @@ + #ifndef bfd_elfNN_find_nearest_line + #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line + #endif ++#ifndef bfd_elfNN_find_line ++#define bfd_elfNN_find_line _bfd_elf_find_line ++#endif + #ifndef bfd_elfNN_find_inliner_info + #define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info + #endif +--- a/bfd/i386msdos.c ++++ b/bfd/i386msdos.c +@@ -163,6 +163,7 @@ msdos_set_section_contents (bfd *abfd, + #define msdos_print_symbol _bfd_nosymbols_print_symbol + #define msdos_get_symbol_info _bfd_nosymbols_get_symbol_info + #define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define msdos_find_line _bfd_nosymbols_find_line + #define msdos_find_inliner_info _bfd_nosymbols_find_inliner_info + #define msdos_get_lineno _bfd_nosymbols_get_lineno + #define msdos_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) +--- a/bfd/i386os9k.c ++++ b/bfd/i386os9k.c +@@ -154,6 +154,7 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, + + #define aout_32_close_and_cleanup aout_32_bfd_free_cached_info + ++#define aout_32_find_line _bfd_nosymbols_find_line + #define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + + #define aout_32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup +--- a/bfd/ieee.c ++++ b/bfd/ieee.c +@@ -3675,26 +3675,9 @@ ieee_openr_next_archived_file (bfd *arch, bfd *prev) + } + } + +-static bfd_boolean +-ieee_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED, +- asection *section ATTRIBUTE_UNUSED, +- asymbol **symbols ATTRIBUTE_UNUSED, +- bfd_vma offset ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- const char **functionname_ptr ATTRIBUTE_UNUSED, +- unsigned int *line_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} +- +-static bfd_boolean +-ieee_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- const char **functionname_ptr ATTRIBUTE_UNUSED, +- unsigned int *line_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} ++#define ieee_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define ieee_find_line _bfd_nosymbols_find_line ++#define ieee_find_inliner_info _bfd_nosymbols_find_inliner_info + + static int + ieee_generic_stat_arch_elt (bfd *abfd, struct stat *buf) +--- a/bfd/ihex.c ++++ b/bfd/ihex.c +@@ -922,6 +922,7 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, + #define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name + #define ihex_get_lineno _bfd_nosymbols_get_lineno + #define ihex_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define ihex_find_line _bfd_nosymbols_find_line + #define ihex_find_inliner_info _bfd_nosymbols_find_inliner_info + #define ihex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define ihex_read_minisymbols _bfd_nosymbols_read_minisymbols +--- a/bfd/libaout.h ++++ b/bfd/libaout.h +@@ -551,8 +551,8 @@ extern void NAME (aout, get_symbol_info) + (bfd *, asymbol *, symbol_info *); + + extern bfd_boolean NAME (aout, find_nearest_line) +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); + + extern long NAME (aout, read_minisymbols) + (bfd *, bfd_boolean, void * *, unsigned int *); +--- a/bfd/libbfd-in.h ++++ b/bfd/libbfd-in.h +@@ -399,8 +399,13 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *abfd); + #define _bfd_nosymbols_get_lineno \ + ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr) + #define _bfd_nosymbols_find_nearest_line \ +- ((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \ +- const char **, unsigned int *)) \ ++ ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \ ++ const char **, const char **, unsigned int *, \ ++ unsigned int *)) \ ++ bfd_false) ++#define _bfd_nosymbols_find_line \ ++ ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \ ++ const char **, unsigned int *)) \ + bfd_false) + #define _bfd_nosymbols_find_inliner_info \ + ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \ +@@ -520,8 +525,8 @@ extern bfd_boolean _bfd_stab_section_find_nearest_line + + /* Find the nearest line using DWARF 1 debugging information. */ + extern bfd_boolean _bfd_dwarf1_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *); + + struct dwarf_debug_section + { +@@ -536,21 +541,9 @@ extern const struct dwarf_debug_section dwarf_debug_sections[]; + + /* Find the nearest line using DWARF 2 debugging information. */ + extern bfd_boolean _bfd_dwarf2_find_nearest_line +- (bfd *, const struct dwarf_debug_section *, asection *, asymbol **, bfd_vma, +- const char **, const char **, unsigned int *, unsigned int *, unsigned int, +- void **); +- +-/* Find the line using DWARF 2 debugging information. */ +-extern bfd_boolean _bfd_dwarf2_find_line +- (bfd *, asymbol **, asymbol *, const char **, +- unsigned int *, unsigned int *, unsigned int, void **); +- +-bfd_boolean _bfd_generic_find_line +- (bfd *, asymbol **, asymbol *, const char **, unsigned int *); +- +-bfd_boolean _bfd_generic_find_nearest_line_discriminator +- (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, +- unsigned int *, unsigned int *); ++ (bfd *, asymbol **, asymbol *, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *, ++ const struct dwarf_debug_section *, unsigned int, void **); + + /* Find inliner info after calling bfd_find_nearest_line. */ + extern bfd_boolean _bfd_dwarf2_find_inliner_info +--- a/bfd/libbfd.c ++++ b/bfd/libbfd.c +@@ -1105,29 +1105,6 @@ read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED, + } + + bfd_boolean +-_bfd_generic_find_line (bfd *abfd ATTRIBUTE_UNUSED, +- asymbol **symbols ATTRIBUTE_UNUSED, +- asymbol *symbol ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- unsigned int *linenumber_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} +- +-bfd_boolean +-_bfd_generic_find_nearest_line_discriminator (bfd *abfd ATTRIBUTE_UNUSED, +- asection *section ATTRIBUTE_UNUSED, +- asymbol **symbols ATTRIBUTE_UNUSED, +- bfd_vma offset ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- const char **functionname_ptr ATTRIBUTE_UNUSED, +- unsigned int *line_ptr ATTRIBUTE_UNUSED, +- unsigned int *discriminator_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} +- +-bfd_boolean + _bfd_generic_init_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, + asection *isec ATTRIBUTE_UNUSED, + bfd *obfd ATTRIBUTE_UNUSED, +--- a/bfd/libbfd.h ++++ b/bfd/libbfd.h +@@ -404,8 +404,13 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *abfd); + #define _bfd_nosymbols_get_lineno \ + ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr) + #define _bfd_nosymbols_find_nearest_line \ +- ((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \ +- const char **, unsigned int *)) \ ++ ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \ ++ const char **, const char **, unsigned int *, \ ++ unsigned int *)) \ ++ bfd_false) ++#define _bfd_nosymbols_find_line \ ++ ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \ ++ const char **, unsigned int *)) \ + bfd_false) + #define _bfd_nosymbols_find_inliner_info \ + ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \ +@@ -525,8 +530,8 @@ extern bfd_boolean _bfd_stab_section_find_nearest_line + + /* Find the nearest line using DWARF 1 debugging information. */ + extern bfd_boolean _bfd_dwarf1_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *); + + struct dwarf_debug_section + { +@@ -541,21 +546,9 @@ extern const struct dwarf_debug_section dwarf_debug_sections[]; + + /* Find the nearest line using DWARF 2 debugging information. */ + extern bfd_boolean _bfd_dwarf2_find_nearest_line +- (bfd *, const struct dwarf_debug_section *, asection *, asymbol **, bfd_vma, +- const char **, const char **, unsigned int *, unsigned int *, unsigned int, +- void **); +- +-/* Find the line using DWARF 2 debugging information. */ +-extern bfd_boolean _bfd_dwarf2_find_line +- (bfd *, asymbol **, asymbol *, const char **, +- unsigned int *, unsigned int *, unsigned int, void **); +- +-bfd_boolean _bfd_generic_find_line +- (bfd *, asymbol **, asymbol *, const char **, unsigned int *); +- +-bfd_boolean _bfd_generic_find_nearest_line_discriminator +- (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, +- unsigned int *, unsigned int *); ++ (bfd *, asymbol **, asymbol *, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *, ++ const struct dwarf_debug_section *, unsigned int, void **); + + /* Find inliner info after calling bfd_find_nearest_line. */ + extern bfd_boolean _bfd_dwarf2_find_inliner_info +--- a/bfd/libcoff-in.h ++++ b/bfd/libcoff-in.h +@@ -355,15 +355,13 @@ extern bfd_boolean _bfd_coff_is_local_label_name + extern asymbol *coff_bfd_make_debug_symbol + (bfd *, void *, unsigned long); + extern bfd_boolean coff_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); +-extern bfd_boolean coff_find_nearest_line_discriminator +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); ++#define coff_find_line _bfd_nosymbols_find_line + struct dwarf_debug_section; + extern bfd_boolean coff_find_nearest_line_with_names +- (bfd *, const struct dwarf_debug_section *, asection *, asymbol **, +- bfd_vma, const char **, const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, ++ unsigned int *, const struct dwarf_debug_section *); + extern bfd_boolean coff_find_inliner_info + (bfd *, const char **, const char **, unsigned int *); + extern int coff_sizeof_headers +--- a/bfd/libcoff.h ++++ b/bfd/libcoff.h +@@ -359,15 +359,13 @@ extern bfd_boolean _bfd_coff_is_local_label_name + extern asymbol *coff_bfd_make_debug_symbol + (bfd *, void *, unsigned long); + extern bfd_boolean coff_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *); +-extern bfd_boolean coff_find_nearest_line_discriminator +- (bfd *, asection *, asymbol **, bfd_vma, const char **, +- const char **, unsigned int *, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); ++#define coff_find_line _bfd_nosymbols_find_line + struct dwarf_debug_section; + extern bfd_boolean coff_find_nearest_line_with_names +- (bfd *, const struct dwarf_debug_section *, asection *, asymbol **, +- bfd_vma, const char **, const char **, unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, ++ unsigned int *, const struct dwarf_debug_section *); + extern bfd_boolean coff_find_inliner_info + (bfd *, const char **, const char **, unsigned int *); + extern int coff_sizeof_headers +--- a/bfd/libecoff.h ++++ b/bfd/libecoff.h +@@ -289,8 +289,9 @@ extern bfd_boolean _bfd_ecoff_bfd_is_local_label_name + (bfd *, const char *); + #define _bfd_ecoff_get_lineno _bfd_nosymbols_get_lineno + extern bfd_boolean _bfd_ecoff_find_nearest_line +- (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, +- unsigned int *); ++ (bfd *, asymbol **, asection *, bfd_vma, ++ const char **, const char **, unsigned int *, unsigned int *); ++#define _bfd_ecoff_find_line _bfd_nosymbols_find_line + #define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols + #define _bfd_ecoff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol +--- a/bfd/mach-o.c ++++ b/bfd/mach-o.c +@@ -5631,12 +5631,13 @@ bfd_mach_o_follow_dsym (bfd *abfd) + + bfd_boolean + bfd_mach_o_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + if (mdata == NULL) +@@ -5668,13 +5669,11 @@ bfd_mach_o_find_nearest_line (bfd *abfd, + default: + return FALSE; + } +- if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, +- section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr, NULL, 0, +- &mdata->dwarf2_find_line_info)) +- return TRUE; +- return FALSE; ++ return _bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, ++ filename_ptr, functionname_ptr, ++ line_ptr, discriminator_ptr, ++ dwarf_debug_sections, 0, ++ &mdata->dwarf2_find_line_info); + } + + bfd_boolean +--- a/bfd/mach-o.h ++++ b/bfd/mach-o.h +@@ -680,9 +680,11 @@ unsigned int bfd_mach_o_get_section_attribute_from_name (const char *); + + void bfd_mach_o_convert_section_name_to_bfd (bfd *, const char *, const char *, + const char **, flagword *); +-bfd_boolean bfd_mach_o_find_nearest_line (bfd *, asection *, asymbol **, +- bfd_vma, const char **, +- const char **, unsigned int *); ++bfd_boolean bfd_mach_o_find_nearest_line (bfd *, asymbol **, ++ asection *, bfd_vma, ++ const char **, const char **, ++ unsigned int *, unsigned int *); ++#define bfd_mach_o_find_line _bfd_nosymbols_find_line + bfd_boolean bfd_mach_o_close_and_cleanup (bfd *); + bfd_boolean bfd_mach_o_free_cached_info (bfd *); + +--- a/bfd/mmo.c ++++ b/bfd/mmo.c +@@ -3210,6 +3210,7 @@ mmo_write_object_contents (bfd *abfd) + /* FIXME: We can do better on this one, if we have a dwarf2 .debug_line + section or if MMO line numbers are implemented. */ + #define mmo_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define mmo_find_line _bfd_nosymbols_find_line + #define mmo_find_inliner_info _bfd_nosymbols_find_inliner_info + #define mmo_make_empty_symbol _bfd_generic_make_empty_symbol + #define mmo_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +--- a/bfd/nlm-target.h ++++ b/bfd/nlm-target.h +@@ -29,6 +29,7 @@ + #define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) + #define nlm_get_lineno _bfd_nosymbols_get_lineno + #define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define nlm_find_line _bfd_nosymbols_find_line + #define nlm_find_inliner_info _bfd_nosymbols_find_inliner_info + #define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define nlm_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/oasys.c ++++ b/bfd/oasys.c +@@ -1129,26 +1129,9 @@ oasys_openr_next_archived_file (bfd *arch, bfd *prev) + return NULL; + } + +-static bfd_boolean +-oasys_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED, +- asection *section ATTRIBUTE_UNUSED, +- asymbol **symbols ATTRIBUTE_UNUSED, +- bfd_vma offset ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- const char **functionname_ptr ATTRIBUTE_UNUSED, +- unsigned int *line_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} +- +-static bfd_boolean +-oasys_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, +- const char **filename_ptr ATTRIBUTE_UNUSED, +- const char **functionname_ptr ATTRIBUTE_UNUSED, +- unsigned int *line_ptr ATTRIBUTE_UNUSED) +-{ +- return FALSE; +-} ++#define oasys_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define oasys_find_line _bfd_nosymbols_find_line ++#define oasys_find_inliner_info _bfd_nosymbols_find_inliner_info + + static int + oasys_generic_stat_arch_elt (bfd *abfd, struct stat *buf) +--- a/bfd/pdp11.c ++++ b/bfd/pdp11.c +@@ -2182,12 +2182,13 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, + + bfd_boolean + NAME (aout, find_nearest_line) (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + /* Run down the file looking for the filename, function and linenumber. */ + asymbol **p; +@@ -2204,6 +2205,8 @@ NAME (aout, find_nearest_line) (bfd *abfd, + *filename_ptr = abfd->filename; + *functionname_ptr = 0; + *line_ptr = 0; ++ if (discriminator_ptr) ++ *discriminator_ptr = 0; + + if (symbols != NULL) + { +--- a/bfd/pef.c ++++ b/bfd/pef.c +@@ -41,6 +41,7 @@ + #define bfd_pef_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) + #define bfd_pef_get_lineno _bfd_nosymbols_get_lineno + #define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define bfd_pef_find_line _bfd_nosymbols_find_line + #define bfd_pef_find_inliner_info _bfd_nosymbols_find_inliner_info + #define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -83,6 +83,7 @@ dlerror (void) + #define bfd_plugin_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) + #define bfd_plugin_get_lineno _bfd_nosymbols_get_lineno + #define bfd_plugin_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define bfd_plugin_find_line _bfd_nosymbols_find_line + #define bfd_plugin_find_inliner_info _bfd_nosymbols_find_inliner_info + #define bfd_plugin_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define bfd_plugin_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/ppcboot.c ++++ b/bfd/ppcboot.c +@@ -331,6 +331,7 @@ ppcboot_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED, + #define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name + #define ppcboot_get_lineno _bfd_nosymbols_get_lineno + #define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define ppcboot_find_line _bfd_nosymbols_find_line + #define ppcboot_find_inliner_info _bfd_nosymbols_find_inliner_info + #define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define ppcboot_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/som.c ++++ b/bfd/som.c +@@ -5715,18 +5715,22 @@ som_set_arch_mach (bfd *abfd, + + static bfd_boolean + som_find_nearest_line (bfd *abfd, +- asection *section, + asymbol **symbols, ++ asection *section, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, +- unsigned int *line_ptr) ++ unsigned int *line_ptr, ++ unsigned int *discriminator_ptr) + { + bfd_boolean found; + asymbol *func; + bfd_vma low_func; + asymbol **p; + ++ if (discriminator_ptr) ++ *discriminator_ptr = 0; ++ + if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, + & found, filename_ptr, + functionname_ptr, line_ptr, +@@ -6713,6 +6717,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) + return som_is_subspace (sec) && sec->size > 240000; + } + ++#define som_find_line _bfd_nosymbols_find_line + #define som_close_and_cleanup som_bfd_free_cached_info + #define som_read_ar_hdr _bfd_generic_read_ar_hdr + #define som_write_ar_hdr _bfd_generic_write_ar_hdr +--- a/bfd/srec.c ++++ b/bfd/srec.c +@@ -1255,6 +1255,7 @@ srec_print_symbol (bfd *abfd, + #define srec_bfd_is_local_label_name bfd_generic_is_local_label_name + #define srec_get_lineno _bfd_nosymbols_get_lineno + #define srec_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define srec_find_line _bfd_nosymbols_find_line + #define srec_find_inliner_info _bfd_nosymbols_find_inliner_info + #define srec_make_empty_symbol _bfd_generic_make_empty_symbol + #define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +--- a/bfd/targets.c ++++ b/bfd/targets.c +@@ -367,8 +367,7 @@ BFD_JUMP_TABLE macros. + . NAME##_bfd_is_target_special_symbol, \ + . NAME##_get_lineno, \ + . NAME##_find_nearest_line, \ +-. _bfd_generic_find_nearest_line_discriminator, \ +-. _bfd_generic_find_line, \ ++. NAME##_find_line, \ + . NAME##_find_inliner_info, \ + . NAME##_bfd_make_debug_symbol, \ + . NAME##_read_minisymbols, \ +@@ -389,10 +388,7 @@ BFD_JUMP_TABLE macros. + . bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); + . alent * (*_get_lineno) (bfd *, struct bfd_symbol *); + . bfd_boolean (*_bfd_find_nearest_line) +-. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, +-. const char **, const char **, unsigned int *); +-. bfd_boolean (*_bfd_find_nearest_line_discriminator) +-. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, ++. (bfd *, struct bfd_symbol **, struct bfd_section *, bfd_vma, + . const char **, const char **, unsigned int *, unsigned int *); + . bfd_boolean (*_bfd_find_line) + . (bfd *, struct bfd_symbol **, struct bfd_symbol *, +--- a/bfd/tekhex.c ++++ b/bfd/tekhex.c +@@ -935,6 +935,7 @@ tekhex_print_symbol (bfd *abfd, + #define tekhex_bfd_is_local_label_name bfd_generic_is_local_label_name + #define tekhex_get_lineno _bfd_nosymbols_get_lineno + #define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define tekhex_find_line _bfd_nosymbols_find_line + #define tekhex_find_inliner_info _bfd_nosymbols_find_inliner_info + #define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define tekhex_read_minisymbols _bfd_generic_read_minisymbols +--- a/bfd/versados.c ++++ b/bfd/versados.c +@@ -794,6 +794,7 @@ versados_canonicalize_reloc (bfd *abfd, + #define versados_bfd_is_local_label_name bfd_generic_is_local_label_name + #define versados_get_lineno _bfd_nosymbols_get_lineno + #define versados_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define versados_find_line _bfd_nosymbols_find_line + #define versados_find_inliner_info _bfd_nosymbols_find_inliner_info + #define versados_make_empty_symbol _bfd_generic_make_empty_symbol + #define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +--- a/bfd/vms-alpha.c ++++ b/bfd/vms-alpha.c +@@ -4575,10 +4575,14 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, + location. */ + + static bfd_boolean +-_bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section, +- asymbol **symbols ATTRIBUTE_UNUSED, +- bfd_vma offset, const char **file, +- const char **func, unsigned int *line) ++_bfd_vms_find_nearest_line (bfd *abfd, ++ asymbol **symbols ATTRIBUTE_UNUSED, ++ asection *section, ++ bfd_vma offset, ++ const char **file, ++ const char **func, ++ unsigned int *line, ++ unsigned int *discriminator) + { + struct module *module; + +@@ -4588,6 +4592,8 @@ _bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section, + *file = NULL; + *func = NULL; + *line = 0; ++ if (discriminator) ++ *discriminator = 0; + + /* We can't do anything if there is no DST (debug symbol table). */ + if (PRIV (dst_section) == NULL) +@@ -4607,26 +4613,6 @@ _bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section, + + return FALSE; + } +- +-/* Likewise but with a discriminator. */ +- +-static bfd_boolean +-_bfd_vms_find_nearest_line_discriminator (bfd *abfd, +- asection *section, +- asymbol **symbols, +- bfd_vma offset, +- const char **filename_ptr, +- const char **functionname_ptr, +- unsigned int *line_ptr, +- unsigned int *discriminator) +-{ +- *discriminator = 0; +- +- return _bfd_vms_find_nearest_dst_line (abfd, section, symbols, offset, +- filename_ptr, functionname_ptr, +- line_ptr); +-} +- + + /* Canonicalizations. */ + /* Set name, value, section and flags of SYM from E. */ +@@ -9207,9 +9193,8 @@ bfd_vms_get_data (bfd *abfd) + #define alpha_vms_get_lineno _bfd_nosymbols_get_lineno + #define alpha_vms_find_inliner_info _bfd_nosymbols_find_inliner_info + #define alpha_vms_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +-#define alpha_vms_find_nearest_line _bfd_vms_find_nearest_dst_line +-#define _bfd_generic_find_nearest_line_discriminator \ +- _bfd_vms_find_nearest_line_discriminator ++#define alpha_vms_find_nearest_line _bfd_vms_find_nearest_line ++#define alpha_vms_find_line _bfd_nosymbols_find_line + #define alpha_vms_bfd_is_local_label_name vms_bfd_is_local_label_name + + /* Generic table. */ +--- a/bfd/xsym.c ++++ b/bfd/xsym.c +@@ -33,6 +33,7 @@ + #define bfd_sym_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) + #define bfd_sym_get_lineno _bfd_nosymbols_get_lineno + #define bfd_sym_find_nearest_line _bfd_nosymbols_find_nearest_line ++#define bfd_sym_find_line _bfd_nosymbols_find_line + #define bfd_sym_find_inliner_info _bfd_nosymbols_find_inliner_info + #define bfd_sym_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol + #define bfd_sym_read_minisymbols _bfd_generic_read_minisymbols --- binutils-2.25.1.orig/debian/patches/pr17488.diff +++ binutils-2.25.1/debian/patches/pr17488.diff @@ -0,0 +1,175 @@ +# DP: Fix PR ld/17488, segfault on powerpc64 + +bfd/ + +2014-10-16 Alan Modra + + * elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing + even when output is not ppc64 ELF. Remove redundant tests on + type of input bfd. + +ld/ + +2014-10-16 Alan Modra + + PR 17488 + * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't attempt + to access ELF header e_flags when not ppc64 ELF output. + +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -4962,81 +4962,77 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) + { + struct ppc_link_hash_table *htab; + struct ppc_link_hash_entry **p, *eh; ++ asection *opd = bfd_get_section_by_name (ibfd, ".opd"); + +- if (!is_ppc64_elf (info->output_bfd)) +- return TRUE; +- htab = ppc_hash_table (info); +- if (htab == NULL) +- return FALSE; +- +- if (is_ppc64_elf (ibfd)) ++ if (opd != NULL && opd->size != 0) + { +- asection *opd = bfd_get_section_by_name (ibfd, ".opd"); +- +- if (opd != NULL && opd->size != 0) ++ if (abiversion (ibfd) == 0) ++ set_abiversion (ibfd, 1); ++ else if (abiversion (ibfd) == 2) + { +- if (abiversion (ibfd) == 0) +- set_abiversion (ibfd, 1); +- else if (abiversion (ibfd) == 2) +- { +- info->callbacks->einfo (_("%P: %B .opd not allowed in ABI" +- " version %d\n"), +- ibfd, abiversion (ibfd)); +- bfd_set_error (bfd_error_bad_value); +- return FALSE; +- } +- +- if ((ibfd->flags & DYNAMIC) == 0 +- && (opd->flags & SEC_RELOC) != 0 +- && opd->reloc_count != 0 +- && !bfd_is_abs_section (opd->output_section)) +- { +- /* Garbage collection needs some extra help with .opd sections. +- We don't want to necessarily keep everything referenced by +- relocs in .opd, as that would keep all functions. Instead, +- if we reference an .opd symbol (a function descriptor), we +- want to keep the function code symbol's section. This is +- easy for global symbols, but for local syms we need to keep +- information about the associated function section. */ +- bfd_size_type amt; +- asection **opd_sym_map; +- +- amt = opd->size * sizeof (*opd_sym_map) / 8; +- opd_sym_map = bfd_zalloc (ibfd, amt); +- if (opd_sym_map == NULL) +- return FALSE; +- ppc64_elf_section_data (opd)->u.opd.func_sec = opd_sym_map; +- BFD_ASSERT (ppc64_elf_section_data (opd)->sec_type == sec_normal); +- ppc64_elf_section_data (opd)->sec_type = sec_opd; +- } ++ info->callbacks->einfo (_("%P: %B .opd not allowed in ABI" ++ " version %d\n"), ++ ibfd, abiversion (ibfd)); ++ bfd_set_error (bfd_error_bad_value); ++ return FALSE; + } + +- /* For input files without an explicit abiversion in e_flags +- we should have flagged any with symbol st_other bits set +- as ELFv1 and above flagged those with .opd as ELFv2. +- Set the output abiversion if not yet set, and for any input +- still ambiguous, take its abiversion from the output. +- Differences in ABI are reported later. */ +- if (abiversion (info->output_bfd) == 0) +- set_abiversion (info->output_bfd, abiversion (ibfd)); +- else if (abiversion (ibfd) == 0) +- set_abiversion (ibfd, abiversion (info->output_bfd)); +- +- p = &htab->dot_syms; +- while ((eh = *p) != NULL) ++ if ((ibfd->flags & DYNAMIC) == 0 ++ && (opd->flags & SEC_RELOC) != 0 ++ && opd->reloc_count != 0 ++ && !bfd_is_abs_section (opd->output_section)) + { +- *p = NULL; +- if (&eh->elf == htab->elf.hgot) +- ; +- else if (htab->elf.hgot == NULL +- && strcmp (eh->elf.root.root.string, ".TOC.") == 0) +- htab->elf.hgot = &eh->elf; +- else if (!add_symbol_adjust (eh, info)) ++ /* Garbage collection needs some extra help with .opd sections. ++ We don't want to necessarily keep everything referenced by ++ relocs in .opd, as that would keep all functions. Instead, ++ if we reference an .opd symbol (a function descriptor), we ++ want to keep the function code symbol's section. This is ++ easy for global symbols, but for local syms we need to keep ++ information about the associated function section. */ ++ bfd_size_type amt; ++ asection **opd_sym_map; ++ ++ amt = opd->size * sizeof (*opd_sym_map) / 8; ++ opd_sym_map = bfd_zalloc (ibfd, amt); ++ if (opd_sym_map == NULL) + return FALSE; +- p = &eh->u.next_dot_sym; ++ ppc64_elf_section_data (opd)->u.opd.func_sec = opd_sym_map; ++ BFD_ASSERT (ppc64_elf_section_data (opd)->sec_type == sec_normal); ++ ppc64_elf_section_data (opd)->sec_type = sec_opd; + } + } + ++ if (!is_ppc64_elf (info->output_bfd)) ++ return TRUE; ++ htab = ppc_hash_table (info); ++ if (htab == NULL) ++ return FALSE; ++ ++ /* For input files without an explicit abiversion in e_flags ++ we should have flagged any with symbol st_other bits set ++ as ELFv1 and above flagged those with .opd as ELFv2. ++ Set the output abiversion if not yet set, and for any input ++ still ambiguous, take its abiversion from the output. ++ Differences in ABI are reported later. */ ++ if (abiversion (info->output_bfd) == 0) ++ set_abiversion (info->output_bfd, abiversion (ibfd)); ++ else if (abiversion (ibfd) == 0) ++ set_abiversion (ibfd, abiversion (info->output_bfd)); ++ ++ p = &htab->dot_syms; ++ while ((eh = *p) != NULL) ++ { ++ *p = NULL; ++ if (&eh->elf == htab->elf.hgot) ++ ; ++ else if (htab->elf.hgot == NULL ++ && strcmp (eh->elf.root.root.string, ".TOC.") == 0) ++ htab->elf.hgot = &eh->elf; ++ else if (!add_symbol_adjust (eh, info)) ++ return FALSE; ++ p = &eh->u.next_dot_sym; ++ } ++ + /* Clear the list for non-ppc64 input files. */ + p = &htab->dot_syms; + while ((eh = *p) != NULL) +--- a/ld/emultempl/ppc64elf.em ++++ b/ld/emultempl/ppc64elf.em +@@ -531,7 +531,8 @@ gld${EMULATION_NAME}_finish (void) + /* e_entry on PowerPC64 points to the function descriptor for + _start. If _start is missing, default to the first function + descriptor in the .opd section. */ +- if ((elf_elfheader (link_info.output_bfd)->e_flags & EF_PPC64_ABI) == 1) ++ if (stub_file != NULL ++ && (elf_elfheader (link_info.output_bfd)->e_flags & EF_PPC64_ABI) == 1) + entry_section = ".opd"; + + if (params.emit_stub_syms < 0) --- binutils-2.25.1.orig/debian/patches/pr17493.diff +++ binutils-2.25.1/debian/patches/pr17493.diff @@ -0,0 +1,49 @@ +# DP: Fix PR gas/17493. + +--- a/gas/config/tc-i386.c ++++ a/gas/config/tc-i386.c +@@ -7985,7 +7985,7 @@ i386_finalize_immediate (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp, + return 0; + } + #endif +- else if (!intel_syntax && exp->X_op == O_register) ++ else if (!intel_syntax && exp_seg == reg_section) + { + if (imm_start) + as_bad (_("illegal immediate register operand %s"), imm_start); +--- a/gas/testsuite/gas/i386/inval-equ-2.l ++++ a/gas/testsuite/gas/i386/inval-equ-2.l +@@ -7,15 +7,15 @@ GAS LISTING .* + + [ ]*1[ ]+\.globl bar1 + [ ]*2[ ]+\.set bar1,\(%eax\+1\) +-[ ]*3[ ]+\?\?\?\? A12A0000 mov bar1,%eax +-[ ]*3[ ]+00 ++[ ]*3[ ]+\?\?\?\? A1...... mov bar1,%eax ++[ ]*3[ ]+.. + [ ]*4[ ]+\.set bar2,\(%eax\+1\) +-[ ]*5[ ]+\?\?\?\? A12A0000 mov bar2,%eax +-[ ]*5[ ]+00 ++[ ]*5[ ]+\?\?\?\? A1...... mov bar2,%eax ++[ ]*5[ ]+.. + [ ]*6[ ]+\.globl bar2 + [ ]*7[ ]+\.set bar3,\(%eax\+1\) +-[ ]*8[ ]+\?\?\?\? A12A0000 mov bar3,%eax ++[ ]*8[ ]+\?\?\?\? A1...... mov bar3,%eax + .* Error: can't make global register symbol `bar1' + .* Error: can't make global register symbol `bar2' + .* Error: can't make global register symbol `bar3' +-[ ]*8[ ]+00 ++[ ]*8[ ]+.. +--- a/gas/write.c ++++ a/gas/write.c +@@ -836,7 +836,8 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED, + if (symsec == NULL) + abort (); + +- if (bfd_is_abs_section (symsec)) ++ if (bfd_is_abs_section (symsec) ++ || symsec == reg_section) + { + /* The fixup_segment routine normally will not use this + symbol in a relocation. */ --- binutils-2.25.1.orig/debian/patches/pr18427.diff +++ binutils-2.25.1/debian/patches/pr18427.diff @@ -0,0 +1,130 @@ +From: John David Anglin +Date: Thu, 11 Jun 2015 22:50:39 +0000 (-0400) +Subject: tc-hppa.c: Speed up search for last label +X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff_plain;h=18c208b2292f3c61097dee99053ecab78b393e46 + +tc-hppa.c: Speed up search for last label +--- + +2015-06-11 John David Anglin + + PR gas/18427 + * gas/config/tc-hppa.c (last_label_symbol): Declare. + (pa_get_label): Return last label in current space/segment or NULL. + (pa_define_label): Record last label and add to root. + (pa_undefine_label): Remove last label from root. + +diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c +index 57d7e96..06e222d 100644 +--- a/gas/config/tc-hppa.c ++++ b/gas/config/tc-hppa.c +@@ -606,6 +606,9 @@ static int within_procedure; + seen in each subspace. */ + static label_symbol_struct *label_symbols_rootp = NULL; + ++/* Last label symbol */ ++static label_symbol_struct last_label_symbol; ++ + /* Nonzero when strict matching is enabled. Zero otherwise. + + Each opcode in the table has a flag which indicates whether or +@@ -1114,19 +1117,17 @@ pa_check_eof (void) + static label_symbol_struct * + pa_get_label (void) + { +- label_symbol_struct *label_chain; ++ label_symbol_struct *label_chain = label_symbols_rootp; + +- for (label_chain = label_symbols_rootp; +- label_chain; +- label_chain = label_chain->lss_next) ++ if (label_chain) + { + #ifdef OBJ_SOM +- if (current_space == label_chain->lss_space && label_chain->lss_label) +- return label_chain; ++ if (current_space == label_chain->lss_space && label_chain->lss_label) ++ return label_chain; + #endif + #ifdef OBJ_ELF +- if (now_seg == label_chain->lss_segment && label_chain->lss_label) +- return label_chain; ++ if (now_seg == label_chain->lss_segment && label_chain->lss_label) ++ return label_chain; + #endif + } + +@@ -1139,28 +1140,23 @@ pa_get_label (void) + void + pa_define_label (symbolS *symbol) + { +- label_symbol_struct *label_chain = pa_get_label (); ++ label_symbol_struct *label_chain = label_symbols_rootp; + +- if (label_chain) +- label_chain->lss_label = symbol; +- else +- { +- /* Create a new label entry and add it to the head of the chain. */ +- label_chain = xmalloc (sizeof (label_symbol_struct)); +- label_chain->lss_label = symbol; ++ if (!label_chain) ++ label_chain = &last_label_symbol; ++ ++ label_chain->lss_label = symbol; + #ifdef OBJ_SOM +- label_chain->lss_space = current_space; ++ label_chain->lss_space = current_space; + #endif + #ifdef OBJ_ELF +- label_chain->lss_segment = now_seg; ++ label_chain->lss_segment = now_seg; + #endif +- label_chain->lss_next = NULL; + +- if (label_symbols_rootp) +- label_chain->lss_next = label_symbols_rootp; ++ /* Not used. */ ++ label_chain->lss_next = NULL; + +- label_symbols_rootp = label_chain; +- } ++ label_symbols_rootp = label_chain; + + #ifdef OBJ_ELF + dwarf2_emit_label (symbol); +@@ -1173,33 +1169,7 @@ pa_define_label (symbolS *symbol) + static void + pa_undefine_label (void) + { +- label_symbol_struct *label_chain; +- label_symbol_struct *prev_label_chain = NULL; +- +- for (label_chain = label_symbols_rootp; +- label_chain; +- label_chain = label_chain->lss_next) +- { +- if (1 +-#ifdef OBJ_SOM +- && current_space == label_chain->lss_space && label_chain->lss_label +-#endif +-#ifdef OBJ_ELF +- && now_seg == label_chain->lss_segment && label_chain->lss_label +-#endif +- ) +- { +- /* Remove the label from the chain and free its memory. */ +- if (prev_label_chain) +- prev_label_chain->lss_next = label_chain->lss_next; +- else +- label_symbols_rootp = label_chain->lss_next; +- +- free (label_chain); +- break; +- } +- prev_label_chain = label_chain; +- } ++ label_symbols_rootp = NULL; + } + + /* An HPPA-specific version of fix_new. This is required because the HPPA --- binutils-2.25.1.orig/debian/patches/series +++ binutils-2.25.1/debian/patches/series @@ -0,0 +1,36 @@ +#branch-updates.diff +#branch-version.diff +001_ld_makefile_patch.patch +002_gprof_profile_arcs.patch +003_gprof_see_also_monitor.patch +006_better_file_error.patch +012_check_ldrunpath_length.patch +013_bash_in_ld_testsuite.patch +#014_hash_style-both.patch +128_ppc64_powerpc_biarch.patch +129_multiarch_libpath.patch +130_gold_disable_testsuite_build.patch +131_ld_bootstrap_testsuite.patch +135_bfd_version.patch +157_ar_scripts_with_tilde.patch +158_ld_system_root.patch +161_gold_dummy_zoption.diff +170_doc_fixes.diff + +# only applied for GFDL builds +164_ld_doc_remove_xref.diff + +gprof-build.diff +aarch64-libpath.diff +#pr-ld-16428.diff +mips64-default-n64.diff + +# patches taken from the trunk +aarch64-gold-updates.diff +aarch64-gold-updates2.diff +aarch64-bogus-assertion.diff +aarch64-enable-targets.diff +arm-ld-unique-tests.diff +aarch64-thunderx.diff +pr18427.diff +fix-Bsymbolic-functions.diff --- binutils-2.25.1.orig/debian/rules +++ binutils-2.25.1/debian/rules @@ -0,0 +1,1598 @@ +#!/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-2015 Canonical Ltd. +# Portions Copyright 2008-2015 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 + +############################################################################### + +p_bin = binutils +p_dev = $(p_bin)-dev +p_mul = $(p_bin)-multiarch +p_mdev = $(p_mul)-dev +p_doc = $(p_bin)-doc +p_hppa64 = $(p_bin)-hppa64-linux-gnu +p_src = $(p_bin)-source +p_static = $(p_bin)-static +p_udeb = $(p_static)-udeb + +distribution := $(shell lsb_release -is) +distrelease := $(shell lsb_release -cs) +ifeq ($(distrelease),n/a) + distrelease := sid +endif + +# BACKPORT is used for cross builds for a -source package not conflicting +# with the source package of the native package. +ifeq ($(BACKPORT),true) + p_src = $(p_bin)-$(VERSION)-source +else + p_src = $(p_bin)-source +endif + +pwd := $(shell pwd) +d = debian/tmp +d_bin = $(d) +d_dev = debian/$(p_dev) +d_mul = debian/$(p_mul) +d_mdev = debian/$(p_mdev) +d_doc = debian/$(p_doc) +d_hppa64 = debian/$(p_hppa64) +d_src = debian/$(p_src) +d_static = debian/$(p_static) +d_udeb = debian/$(p_udeb) + +install_dir = install -d -m 755 +install_file = install -m 644 +install_script = install -m 755 +install_binary = install -m 755 -s + +vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) +DPKG_VARS := $(shell dpkg-architecture) +DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH) +DEB_HOST_GNU_CPU ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_CPU) +DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) + +ifeq (,$(filter $(distrelease),lenny etch squeeze wheezy jessie)) + ifeq ($(DEB_HOST_GNU_TYPE),i586-linux-gnu) + DEB_BUILD_GNU_TYPE = i686-linux-gnu + DEB_HOST_GNU_CPU = i686 + DEB_HOST_GNU_TYPE = i686-linux-gnu + TRIPLET_SYMLINK = i586-linux-gnu + endif +endif + +src_name := $(shell dpkg-parsechangelog -S Source) +ifeq ($(src_name),binutils) + with_native = yes + with_cross = yes + same_source = yes + CROSS_ARCHS ?= s390x ppc64el powerpc arm64 armhf armel mips mipsel # mips64 mips64el +else + # binutils-ports ... + with_cross = yes + CROSS_ARCHS ?= m68k sh4 mips64 mips64el +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32 hppa)) + with_hppa64 = yes +endif + +HOST_ARCHS_armhf = amd64 i386 x32 arm64 +HOST_ARCHS_armel = amd64 i386 x32 arm64 +HOST_ARCHS_s390x = amd64 i386 x32 +HOST_ARCHS_powerpc = amd64 i386 x32 ppc64el +HOST_ARCHS_arm64 = amd64 i386 x32 +HOST_ARCHS_ppc64el = amd64 i386 x32 +HOST_ARCHS_mips = amd64 i386 x32 +HOST_ARCHS_mipsel = amd64 i386 x32 +HOST_ARCHS_mips64 = amd64 i386 x32 +HOST_ARCHS_mips64el = amd64 i386 x32 + +ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 x32)) + # +else ifeq ($(DEB_HOST_ARCH),arm64) + CROSS_ARCHS = armel armhf +else ifeq ($(DEB_HOST_ARCH),ppc64el) + CROSS_ARCHS = powerpc +else + CROSS_ARCHS = +endif +CROSS_ARCH = $(subst .,,$(suffix $@)) +_gnu_type = $(shell dpkg-architecture -a$(1) -qDEB_HOST_GNU_TYPE -f 2>/dev/null) +_multiarch = $(shell dpkg-architecture -a$(1) -qDEB_HOST_MULTIARCH -f 2>/dev/null) +CROSS_GNU_TYPE = $(call _gnu_type,$(CROSS_ARCH)) +P_CROSS = binutils-$(CROSS_GNU_TYPE) +D_CROSS = debian/binutils-$(CROSS_GNU_TYPE) + +# If $(TARGET) is not set, try reading debian/target +ifeq (,$(TARGET)) + ifneq (,$(wildcard debian/target)) + TARGET := $(shell cat debian/target 2>/dev/null) + endif +endif + +ifneq (,$(TARGET)) + with_native = + with_cross = + same_source = + # 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 + DPKG_TARGET_VARS := $(shell dpkg-architecture -f -t$(TARGET)) + DEB_TARGET_MULTIARCH = $(call vafilt,$(DPKG_TARGET_VARS),DEB_HOST_MULTIARCH) + DEB_TARGET_ARCH = $(call vafilt,$(DPKG_TARGET_VARS),DEB_HOST_ARCH) +else + DEB_TARGET_MULTIARCH = $(DEB_HOST_MULTIARCH) + DEB_TARGET_ARCH = $(DEB_HOST_ARCH) +endif + +ifneq (,$(TARGET)) + APPEND_TOOLLIBDIR=yes + export APPEND_TOOLLIBDIR +endif + +ifeq (,$(DEB_HOST_MULTIARCH)) + ifeq ($(DEB_HOST_ARCH),i386) + DEB_HOST_MULTIARCH = i386-linux-gnu + else + DEB_HOST_MULTIARCH = $(DEB_HOST_GNU_TYPE) + endif +endif + +SHELL = /bin/bash + +gold_targets = \ + amd64 arm64 armel armhf i386 \ + mips mipsel mipsn32 mipsn32el mips64 mips64el \ + powerpc powerpcspe ppc64 ppc64el \ + sparc sparc64 x32 hurd-i386 + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gold_targets))) + with_gold = yes + gold_provides = -Vgold:Provides=binutils-gold +endif + +with_multiarch := yes +with_static := yes + +CC = gcc +CXX = g++ +CFLAGS = -g -O2 -Wno-format-security +STRIP = strip --remove-section=.comment --remove-section=.note +CROSS := +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CROSS := $(DEB_HOST_GNU_TYPE)- + CC = $(CROSS)gcc + CXX = $(CROSS)g++ + STRIP= $(CURDIR)/debian/strip.cross + install_binary = install -m 755 -s --strip-program="$(STRIP)" +endif + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS = -g -O0 +endif + +# this outputs 0 or 1 depending on whether a macro appears in the *default* cpp +# -dM -P output; this is used to test the toolchain *default* configuration +check_cpp = $(shell $(CROSS)cpp -dM -P /dev/null | grep -q '^\#define $(1)' && echo 1 || echo 0) + +# testsuite doesn't expect to be built with -mthumb +# TODO if the testsuite is only broken with Thumb-2 (and not with "Thumb-1"), +# we should test for __thumb2__ instead +ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) + ifeq ($(call check_cpp,__thumb__),1) + CFLAGS += -marm + endif +endif + +SPACE = $(EMPTY) $(EMPTY) +COMMA = , +CHANGELOG_VARS := $(shell dpkg-parsechangelog | \ + sed -n 's/ /_/g;/^[^_]/s/^\([^:]*\):_\(.*\)/\1=\2/p') + +DEB_VERSION := $(call vafilt,$(CHANGELOG_VARS),Version) +DEB_SVERSION := $(shell echo $(DEB_VERSION) | sed 's/+b[0-9][0-9]*$$//') +DEB_UPSTREAM := $(firstword $(subst -,$(SPACE),$(DEB_VERSION))) + +VERSION := $(shell sed -n 's/^ *VERSION=\(.*\)/\1/p' bfd/configure | head -1 | tr -d \') +DATE := $(shell sed -n 's/.* \([0-9]*\)$$/\1/p' bfd/version.h) +ifneq (,$(DATE)) +# DATE_EXT := .$(DATE) +endif +BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') + +is_rc = yes +is_rc = + +ifneq ($(DEB_UPSTREAM),$(VERSION)$(DATE_EXT)) + $(error upstream ($(DEB_UPSTREAM)) and debian ($(VERSION)$(DATE_EXT)) version mismatch) +endif + +STATIC_UDEB = $(p_udeb)_$(DEB_VERSION)_$(DEB_HOST_ARCH).udeb + +SINGLE_VERSION= $(VERSION)-system +MULTI_VERSION = $(VERSION)-multiarch +HPPA64_VERSION= $(VERSION)-hppa64 + +ifeq (,$(filter $(distrelease),lenny etch squeeze wheezy dapper hardy jaunty karmic lucid maverick natty oneiric precise quantal raring saucy trusty utopic)) + DPKG_DEV = dpkg-dev (>= 1.17.11), +endif + +NJOBS = +# Support parallel= in DEB_BUILD_OPTIONS (see #209008) +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 nostat,$(DEB_BUILD_OPTIONS))) + with_static = disabled in DEB_BUILD_OPTIONS +endif +ifneq (,$(findstring nomult,$(DEB_BUILD_OPTIONS))) + with_multiarch = disabled in DEB_BUILD_OPTIONS +endif + +# PF is the installation prefix for the package without the leading slash. +# It's "usr" for gcc releases, so use this if not explicitly set +ifeq ($(PF),) + PF = usr +endif + +# Don't include docs with GFDL invariant sections +GFDL_INVARIANT_FREE := yes +ifeq ($(distribution),Ubuntu) + GFDL_INVARIANT_FREE := no +endif + +gfdl_toplevel_texinfo_files = \ + bfd/doc/bfd.texinfo \ + bfd/doc/bfdint.texi \ + ld/ldint.texinfo + +gfdl_generated_files = \ + bfd/doc/bfd.info + +######################################## + +CONFARGS = \ + --enable-shared \ + --enable-plugins \ + --enable-threads \ + --prefix=/$(PF) \ + --enable-deterministic-archives \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --with-pkgversion="GNU Binutils for $(distribution)" + +# not yet ready for GCC 4.9 +CONFARGS += --disable-werror + +DEB_TARGET_MULTIARCH32_amd64 = i386-linux-gnu +DEB_TARGET_MULTIARCHX32_amd64 = x86_64-linux-gnux32 + +DEB_TARGET_MULTIARCH32_x32 = i386-linux-gnu +DEB_TARGET_MULTIARCH64_x32 = x86_64-linux-gnu + +DEB_TARGET_MULTIARCH32_powerpc = powerpc-linux-gnu + +DEB_TARGET_MULTIARCH32_s390x = s390-linux-gnu + +DEB_TARGET_MULTIARCH32_sparc64 = sparc-linux-gnu + +DEB_TARGET_MULTIARCH32_kfreebsd-amd64 = i386-kfreebsd-gnu + +DEB_TARGET_MULTIARCH64_i386 = x86_64-linux-gnu +DEB_TARGET_MULTIARCHX32_i386 = x86_64-linux-gnux32 + +DEB_TARGET_MULTIARCH64_powerpc = powerpc64-linux-gnu + +DEB_TARGET_MULTIARCH64_sparc = sparc64-linux-gnu + +DEB_TARGET_MULTIARCH64_s390 = s390x-linux-gnu + +DEB_TARGET_MULTIARCH64_kfreebsd-i386 = x86_64-kfreebsd-gnu + +DEB_TARGET_MULTIARCH64_mips = mips64-linux-gnuabi64 +DEB_TARGET_MULTIARCHN32_mips = mips64-linux-gnuabin32 + +DEB_TARGET_MULTIARCH64_mipsel = mips64el-linux-gnuabi64 +DEB_TARGET_MULTIARCHN32_mipsel = mips64el-linux-gnuabin32 + +DEB_TARGET_MULTIARCH64_mipsn32 = mips64-linux-gnuabi64 +DEB_TARGET_MULTIARCH32_mipsn32 = mips-linux-gnu + +DEB_TARGET_MULTIARCH64_mipsn32el = mips64el-linux-gnuabi64 +DEB_TARGET_MULTIARCH32_mipsn32el = mipsel-linux-gnu + +DEB_TARGET_MULTIARCH32_mips64 = mips-linux-gnu +DEB_TARGET_MULTIARCHN32_mips64 = mips64-linux-gnuabin32 + +DEB_TARGET_MULTIARCH32_mips64el = mipsel-linux-gnu +DEB_TARGET_MULTIARCHN32_mipselel = mips64el-linux-gnuabin32 + +DEB_TARGET_MULTIARCH32_arm64 = aarch64_ilp32-linux-gnu + +SET_MULTIARCH_ENV = \ + DEB_TARGET_MULTIARCH=$(call _multiarch,$1) \ + $(if $(DEB_TARGET_MULTIARCH32_$1) ,DEB_TARGET_MULTIARCH32=$(DEB_TARGET_MULTIARCH32_$1)) \ + $(if $(DEB_TARGET_MULTIARCH64_$1) ,DEB_TARGET_MULTIARCH64=$(DEB_TARGET_MULTIARCH64_$1)) \ + $(if $(DEB_TARGET_MULTIARCHX32_$1),DEB_TARGET_MULTIARCHX32=$(DEB_TARGET_MULTIARCHX32_$1)) \ + $(if $(DEB_TARGET_MULTIARCHN32_$1),DEB_TARGET_MULTIARCHN32=$(DEB_TARGET_MULTIARCHN32_$1)) + +CONFARGS_TARGET_sparc = --enable-targets=sparc64-linux-gnu +CONFLICTS_TARGET_sparc = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" + +CONFARGS_TARGET_sparc64 = --enable-targets=sparc-linux-gnu +CONFLICTS_TARGET_sparc64 = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" + +CONFARGS_TARGET_powerpc = --enable-targets=powerpc64-linux-gnu + +CONFARGS_TARGET_ppc64 = --enable-targets=powerpc-linux-gnu + +CONFARGS_TARGET_ppc64el = --enable-targets=powerpc-linux-gnu + +CONFARGS_TARGET_s390 = --enable-targets=s390x-linux-gnu + +CONFARGS_TARGET_s390x = --enable-targets=s390-linux-gnu + +CONFARGS_TARGET_amd64 = --enable-targets=x86_64-linux-gnux32,x86_64-pep + +CONFARGS_TARGET_i386 = --enable-targets=x86_64-linux-gnu,x86_64-linux-gnux32,x86_64-pep + +CONFARGS_TARGET_x32 = --enable-targets=x86_64-linux-gnu,x86_64-pep + +CONFLICTS_TARGET_amd64 = -VextraConflicts="binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3)" +CONFLICTS_TARGET_i386 = $(CONFLICTS_TARGET_amd64) +CONFLICTS_TARGET_x32 = $(CONFLICTS_TARGET_amd64) + +CONFARGS_TARGET_kfreebsd-i386 = --enable-targets=x86_64-kfreebsd-gnu + +CONFARGS_TARGET_mips = --enable-targets=mips64-linux-gnuabi64,mips64-linux-gnuabin32 + +CONFARGS_TARGET_mipsel = --enable-targets=mips64el-linux-gnuabi64,mips64el-linux-gnuabin32 + +CONFARGS_TARGET_mipsn32 = --enable-targets=mips64-linux-gnuabi64,mips-linux-gnu + +CONFARGS_TARGET_mipsn32el = --enable-targets=mips64el-linux-gnuabi64,mipsel-linux-gnu + +CONFARGS_TARGET_mips64 = --enable-targets=mips64-linux-gnuabin32,mips-linux-gnu + +CONFARGS_TARGET_mips64el = --enable-targets=mips64el-linux-gnuabin32,mipsel-linux-gnu + +CONFARGS_TARGET_aarch64 = --enable-targets=aarch64_be-linux-gnu + +with_check := yes +ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + with_check := disabled through DEB_BUILD_OPTIONS +endif +ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf mips mipsel sparc)) + ignore_regressions := regressions ignored on architecture $(DEB_HOST_ARCH) +endif + +ignore_regressions := regressions ignored on architecture $(DEB_HOST_ARCH) + +with_strip := yes +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + with_strip := disabled through DEB_BUILD_OPTIONS +endif + +source_files = $(addprefix $(shell basename $(pwd))/, \ + $(filter-out stamps .pc CVS debian builddir-% test-summary%, $(wildcard *))) + +############################################################################### + +################# +# patch targets # +################# + +patch: stamps/patch +stamps/patch: +ifneq ($(PATCHED_SOURCES),yes) + QUILT_PATCHES=$(CURDIR)/debian/patches \ + quilt --quiltrc /dev/null push -a || test $$? = 2 +endif + @mkdir -p stamps + touch $@ + +unpatch: + QUILT_PATCHES=$(CURDIR)/debian/patches \ + quilt --quiltrc /dev/null pop -a -R || test $$? = 2 + rm -rf .pc + +update-patches: + export QUILT_PATCHES=$(CURDIR)/debian/patches; \ + export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"; \ + export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"; \ + while quilt push; do quilt refresh; done + +############################################################################### + +################ +# clean target # +################ + +clean: unpatch + $(checkdir) + rm -rf stamps + rm -rf builddir-* + rm -rf stamps + find . -name \*.gmo -o -name \*~ -o -name \*.info ! -name sysroff.info | xargs -r rm -f + rm -f $(pwd)/test-summary* + rm -rf $(d_bin) $(d_dev) $(d_mul) $(d_mdev) $(d_doc) $(d_hppa64) $(d_src) + $(foreach ca,$(CROSS_ARCHS), rm -rf debian/binutils-$(call _gnu_type,$(ca)); ) + rm -rf $(d_static) $(d_udeb) + rm -rf debian/patched debian/tmp debian/files* debian/substvars + rm -f debian/*.orig debian/*.rej + rm -rf $(d_cross) debian/files debian/substvars +ifneq (,$(TARGET)) + rm -rf builddir-$(TARGET) +endif + + for i in debian/*.in; do \ + case "$$i" in debian/control*.in) continue; esac; \ + rm -f $${i%*.in}; \ + done + + rm -f *-stamp + +############################################################################### + +stamps/control: debian/control.in $(if $(TARGET),debian/control.cross.in) $(if $(filter yes, $(with_cross)),debian/control.cross.in) +ifneq (,$(TARGET)) + sed "s/@dpkg_dev@/$(DPKG_DEV)/;/^$$/ q" < debian/control.in > debian/control + sed -e "s/@target@/$$(echo -n $(TARGET) | sed s/_/-/g)/" \ + < debian/control.cross.in >> debian/control +else + sed -e 's/@dpkg_dev@/$(DPKG_DEV)/' \ + debian/control.in > debian/control + ifeq ($(with_cross),yes) + $(foreach ca,$(CROSS_ARCHS), \ + sed \ + -e 's/@host_archs@/$(HOST_ARCHS_$(ca))/g' \ + -e 's/@target@/$(shell dpkg-architecture -a$(ca) -qDEB_HOST_GNU_TYPE 2>/dev/null)/g' \ + debian/control.cross.in \ + | $(if $(filter yes,$(same_source)), grep -v '^Built-Using', cat) \ + >> debian/control; \ + ) + endif +endif +ifneq (,$(CROSS)) + sed -e "s/__TARGET__/$$(echo -n $(CROSS) | sed s/_/-/g)/" \ + < debian/strip.cross.in >> debian/strip.cross + chmod 755 debian/strip.cross +endif + @mkdir -p stamps + touch $@ + +####################### +# single-arch targets # +####################### + +SINGLE_CONFARGS = $(CONFARGS) $(CONFARGS_TARGET_$(DEB_HOST_ARCH)) +ifeq ($(with_gold),yes) + SINGLE_CONFARGS += --enable-ld=default --enable-gold +endif + +stamps/configure-single: stamps/patch + $(checkdir) + @echo BEGIN $@ +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 stamps/configure-single builddir-single + mkdir builddir-single + cd builddir-single && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + ../configure --with-sysroot=/ $(SINGLE_CONFARGS) + $(MAKE) -C builddir-single configure-host + touch $@ + +stamps/build-single: stamps/configure-single + $(checkdir) + @echo BEGIN $@ + env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + $(MAKE) -C builddir-single/bfd headers \ + LDFLAGS="-Wl,-z,relro" + env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + $(MAKE) $(NJOBS) -C builddir-single \ + LDFLAGS="-Wl,-z,relro" +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + -env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + $(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 [ ! -f /usr/share/doc/binutils/test-summary.gz ]; then \ + echo "No test results available for the installed binutils version"; \ + elif [ -x /usr/bin/python3 ]; then \ + echo "Test results, compared with installed binutils:"; \ + zcat /usr/share/doc/binutils/test-summary.gz > test-summary-installed; \ + if python3 debian/test-suite-compare.py test-summary-installed test-summary; then \ + : ; \ + elif [ -n "$(ignore_regressions)" ]; then \ + echo "$(ignore_regressions)"; \ + else \ + case "$(DEB_HOST_ARCH)" in \ + powerpc) \ + echo "WARNING: ignoring test results";; \ + *) \ + false;; \ + esac; \ + fi; \ + else \ + echo "python3 not installed, not comparing test results."; \ + fi +endif +endif + touch $@ + + +############################################################################### + +##################### +# multiarch targets # +##################### + +multiarch_targets += \ + aarch64-linux-gnu \ + aarch64_be-linux-gnu \ + alpha-linux-gnu \ + arm-linux-gnueabi \ + i686-linux-gnu \ + m32r-linux-gnu \ + m68k-linux-gnu \ + m68k-rtems \ + powerpc-linux-gnu \ + powerpc64-linux-gnu \ + powerpc64le-linux-gnu \ + s390x-linux-gnu \ + sh-linux-gnu \ + sh64-linux-gnu \ + sparc-linux-gnu \ + sparc64-linux-gnu \ + x86_64-linux-gnu \ + x86_64-linux-gnux32 \ + x86_64-pep + +# try to work around #758830 +ifeq ($(DEB_HOST_ARCH),sh4) + multiarch_targets := $(filter-out hppa-linux-gnu, $(multiarch_targets)) +endif + +stamps/configure-multi: stamps/patch + $(checkdir) + @echo BEGIN $@ + rm -rf stamps/configure-multi \ + builddir-multi + mkdir builddir-multi + cd builddir-multi \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + ../configure $(CONFARGS) \ + --with-sysroot=/ \ + --enable-targets=$(subst $(SPACE),$(COMMA),$(multiarch_targets)) + $(MAKE) -C builddir-multi configure-host + touch $@ + +stamps/build-multi: stamps/configure-multi + $(checkdir) + @echo BEGIN $@ + $(MAKE) -C builddir-multi/bfd headers + env MAKE="$(MAKE) VERSION=$(MULTI_VERSION)" \ + $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ + $(MAKE) $(NJOBS) -C builddir-multi \ + LDFLAGS="-Wl,-z,relro" + touch $@ + +############################################################################### + +################# +# cross targets # +################# + +stamps/configure.%: stamps/patch + $(checkdir) + @echo BEGIN $@ + rm -rf $@ builddir-$* + mkdir builddir-$* + cd builddir-$* \ + && env CC="$(CC)" CXX="$(CXX)" \ + $(call SET_MULTIARCH_ENV,$*) \ + ../configure \ + $(CONFARGS) \ + $(CONFARGS_TARGET_$(*)) \ + $(if $(filter $*, $(gold_targets)),--enable-ld=default --enable-gold) \ + --target=$(CROSS_GNU_TYPE) + touch $@ + +stamps/build.%: stamps/configure.% + $(checkdir) + @echo BEGIN $@ + env MAKE="$(MAKE) VERSION=$(VERSION)-$*" \ + $(call SET_MULTIARCH_ENV,$*) \ + $(MAKE) -C builddir-$* $(NJOBS) \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="-Wl,-z,relro" + touch $@ + +stamps/install.%: stamps/build.% + $(checkdir) + @echo BEGIN $@ + rm -rf $(D_CROSS) + env MAKE="$(MAKE) VERSION=$(VERSION)-$*" \ + $(MAKE) -C builddir-$* prefix=$(pwd)/$(D_CROSS)/$(PF) \ + mandir=$(pwd)/$(D_CROSS)/$(PF)/share/man install + rm -rf \ + $(D_CROSS)/$(PF)/lib* \ + $(D_CROSS)/$(PF)/share/info \ + $(D_CROSS)/$(PF)/share/locale + + mkdir -p $(D_CROSS)/$(PF)/lib + set -e; \ + d_src=$(D_CROSS)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(CROSS_GNU_TYPE)/lib; \ + d_dst=$(D_CROSS)/$(PF)/lib; \ + for lib in libbfd libopcodes; do \ + mv $$d_src/$$lib*$*.so $$d_dst/.; \ + ln -sf ../../../lib/$$lib-$(VERSION)-$*.so $$d_src/$$lib.so; \ + mv $$d_src/$$lib.a $$d_dst/$${lib}-$(VERSION)-$*.a; \ + ln -sf ../../../lib/$$lib-$(VERSION)-$*.a $$d_src/$$lib.a; \ + done + $(call strip_package, $(P_CROSS),$(D_CROSS),.) + chmod ugo-x $(D_CROSS)/$(PF)/lib/*.so + + : # Get rid of .la files since libtool obviously has no idea about transient paths + rm -f $(D_CROSS)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(CROSS_GNU_TYPE)/lib/*.la + + if which strip-nondeterminism >/dev/null 2>&1; then \ + find $(D_CROSS) -name '*.a' -print0 \ + | xargs -0r strip-nondeterminism --type ar; \ + fi + + : # no spu toolchain + rm -f $(D_CROSS)/$(PF)/bin/*embedspu + + : # symlink man pages + mv $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.1 \ + $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.bfd.1 + gzip -9n $(D_CROSS)/$(PF)/share/man/man1/* + for i in $(D_CROSS)/$(PF)/share/man/man1/*; do \ + b=$$(basename $$i | sed 's/$(CROSS_GNU_TYPE)-//'); \ + ln -sf $$b $$i; \ + done + ln -sf $(CROSS_GNU_TYPE)-ld.bfd.1.gz \ + $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.1.gz + + : # gold man pages + $(if $(filter $*, $(gold_targets)), \ + ln -sf ld.gold.1.gz $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.gold.1.gz; \ + ln -sf dwp.1.gz $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-dwp.1.gz; \ + ) + + : # Don't want /usr/-linux to exist in any package, don't ship development files + rm -rf $(D_CROSS)/$(PF)/$(DEB_HOST_GNU_TYPE) + + rm -f $(D_CROSS)/$(PF)/lib/*.a + rm -f $(D_CROSS)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(CROSS_GNU_TYPE)/lib/*.a + + : # remove RPATH + chrpath -k -d $$(file $(D_CROSS)/usr/bin/*|awk -F: '/ ELF/ {print $$1}') + ln -sf $(CROSS_GNU_TYPE)-ld.bfd $(D_CROSS)/usr/bin/$(CROSS_GNU_TYPE)-ld + + : # replace hard links with soft links + for i in $(D_CROSS)/usr/$(CROSS_GNU_TYPE)/bin/*; do \ + ln -sf ../../bin/$(CROSS_GNU_TYPE)-$$(basename $$i) $$i; \ + done + touch $@ + +############################################################################### + +################# +# static target # +################# + +stamps/configure-static: stamps/patch + $(checkdir) + @echo BEGIN $@ + rm -rf stamps/configure-static \ + builddir-static + mkdir builddir-static + cd builddir-static \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="-g0 -Os" ../configure \ + $(filter-out --enable-shared --enable-plugins --enable-targets=%, $(CONFARGS)) + $(MAKE) -C builddir-static configure-bfd + $(MAKE) -C builddir-static configure-ld + touch $@ + +stamps/build-static: stamps/configure-static + $(checkdir) + @echo BEGIN $@ + $(MAKE) $(NJOBS) -C builddir-static/libiberty CCLD='$(CC) -all-static' + $(MAKE) $(NJOBS) -C builddir-static/bfd CCLD='$(CC) -all-static' + $(MAKE) $(NJOBS) -C builddir-static/ld CCLD='$(CC) -all-static' + touch $@ + +############################################################################### + +################# +# hppa64 target # +################# + +stamps/configure-hppa64: stamps/patch + $(checkdir) + @echo BEGIN $@ + rm -rf stamps/configure-hppa64 \ + builddir-hppa64 + mkdir builddir-hppa64 + cd builddir-hppa64 \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure \ + $(filter-out --enable-targets=%, $(CONFARGS)) \ + --target=hppa64-linux-gnu + $(MAKE) -C builddir-hppa64 configure-host + touch $@ + +stamps/build-hppa64: stamps/configure-hppa64 + $(checkdir) + @echo BEGIN $@ + $(MAKE) -C builddir-hppa64/bfd headers + env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-hppa64 + touch $@ + +############################################################################### + +pre-build: +#ifneq (,$(filter $(DEB_HOST_ARCH), amd64)) +# @echo Build it ... +#else +# @echo Explicitely fail the build for architecture $(DEB_HOST_ARCH) +# false +#endif + +build_stamps = stamps/build-single +ifeq ($(with_multiarch),yes) + build_stamps += stamps/build-multi +endif +ifeq ($(with_hppa64),yes) + build_stamps += stamps/build-hppa64 +endif +ifeq ($(with_cross),yes) + build_stamps += $(foreach ca,$(CROSS_ARCHS), stamps/build.$(ca)) +endif +ifneq (,$(TARGET)) + ifneq (,$(findstring static-cross,$(DEB_BUILD_OPTIONS))) + build_stamps = stamps/build-static-cross + else + build_stamps = stamps/build-cross + endif +endif +ifeq ($(BACKPORT),true) + build_stamps := + with_check := no +endif + +build: pre-build stamps/build +build-arch: pre-build stamps/build +build-indep: pre-build stamps/build +stamps/build: $(build_stamps) + touch $@ + +############################################################################### + +################## +# install target # +################## + +install_stamps = stamps/install +ifeq ($(with_hppa64),yes) + install_stamps += stamps/install-hppa64 +endif +ifeq ($(with_cross),yes) + install_stamps += $(foreach ca,$(CROSS_ARCHS), stamps/install.$(ca)) +endif +ifeq ($(with_static),yes) + install_stamps += stamps/install-static +endif +ifneq (,$(TARGET)) + ifneq (,$(findstring static-cross,$(DEB_BUILD_OPTIONS))) + install_stamps = stamps/install-static-cross + else + install_stamps = stamps/install-cross + endif +endif +ifeq ($(BACKPORT),true) + install_stamps := +endif +install: $(install_stamps) +stamps/install: checkroot stamps/build + $(checkdir) + + rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_mdev) $(d_doc) $(d_src) + $(install_dir) $(d_bin) $(d_dev) $(d_mul) $(d_mdev) $(d_doc) $(d_src) + + : # install binutils and -dev stuff + env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(MAKE) -C builddir-single \ + CFLAGS="$(CFLAGS)" prefix=$(pwd)/$(d_bin)/$(PF) \ + mandir=$(pwd)/$(d_bin)/$(PF)/share/man \ + infodir=$(pwd)/$(d_doc)/$(PF)/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)/$(PF) \ + mandir=$(pwd)/$(d_mul)/$(PF)/share/man \ + infodir=$(pwd)/$(d_doc)/$(PF)/share/info install +endif + + : # fix bfd.h, removing the safety inclusion guard + awk '/PR 14072/,/^#endif/ {next} {print}' $(d_bin)/$(PF)/include/bfd.h \ + > $(d_bin)/$(PF)/include/bfd.h.new + mv $(d_bin)/$(PF)/include/bfd.h.new $(d_bin)/$(PF)/include/bfd.h + + : # fix multilib conflicts of generated values by __WORDSIZE-based expressions + sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$$~#include ~;}' \ + -e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \ + -e 's/^#define BFD_HOST_64BIT_LONG [01] *$$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \ + -e 's/^#define BFD_HOST_64_BIT \(long \)\?long *$$/#if __WORDSIZE == 32\ +#define BFD_HOST_64_BIT long long\ +#else\ +#define BFD_HOST_64_BIT long\ +#endif/' \ + -e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \ + $(d_bin)/$(PF)/include/bfd.h + + : # copy plugin-api.h ... + cp -f include/plugin-api.h $(d_bin)/$(PF)/include + + : # We don't need to distribute everything in binutils and -dev + rm -rf $(d_bin)/$(PF)/include/obstack.h + rm -f $(d_bin)/$(PF)/man/man1/configure.1 + rm -f $(d_doc)/$(PF)/share/info/configure.* $(d_doc)/$(PF)/share/info/standards.* + : # *sigh*, bugs.debian.org/213524 + rm -f $(d_doc)/$(PF)/share/info/dir* + +ifeq ($(with_multiarch),yes) + : # Now get rid of just about everything in binutils-multiarch + rm -rf $(d_mul)/$(PF)/man $(d_mul)/$(PF)/info $(d_mul)/$(PF)/include + rm -rf $(d_mul)/$(PF)/share/man $(d_mul)/$(PF)/share/info $(d_mul)/$(PF)/share/locale + + : # elfedit (even with its --input-mach option) + : # is the same for all targets. + rm -f $(d_mul)/$(PF)/bin/elfedit + + : # c++filt does not link to libbfd for anything more than + : # the help message, and its behavior does not vary + : # between arches aside from the --version message. + rm -f $(d_mul)/$(PF)/bin/c++filt + + : # As gas/README points out (search for --enable-targets), + : # multi-arch gas is not ready yet. + rm -f $(d_mul)/$(PF)/bin/as + rm -f $(d_mul)/$(PF)/bin/ld + rm -f $(d_mul)/$(PF)/bin/ld.bfd + rm -f $(d_mul)/$(PF)/bin/ld.gold + rm -fr $(d_mul)/$(PF)/lib/ldscripts + + ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64 ppc64el)) + rm -f $(d_mul)/$(PF)/bin/embedspu + endif +endif + + $(install_dir) $(d_dev)/$(PF)/include/ $(d_dev)/$(PF)/lib/ + mv $(d_bin)/$(PF)/include/* $(d_dev)/$(PF)/include/ + mv $(d_bin)/$(PF)/lib/*.a $(d_bin)/$(PF)/lib/libbfd.so $(d_bin)/$(PF)/lib/libopcodes.so \ + $(d_dev)/$(PF)/lib/ + +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mdev)/$(PF)/lib/ + mv $(d_mul)/$(PF)/lib/libbfd.so \ + $(d_mdev)/$(PF)/lib/libbfd-multiarch.so + mv $(d_mul)/$(PF)/lib/libopcodes.so \ + $(d_mdev)/$(PF)/lib/libopcodes-multiarch.so + rm -f $(d_mul)/$(PF)/lib/*.la $(d_mul)/$(PF)/lib/*.a + rm -f $(d_mul)/$(PF)/lib*/libiberty* +endif + + : # Get rid of .la files since libtool obviously has no idea about transient paths + rm -f $(d_bin)/$(PF)/lib/*.la + + chmod ugo-x $(d_bin)/$(PF)/lib/*.so + $(call strip_package, $(p_bin), $(d_bin)) +ifeq ($(with_multiarch),yes) + chmod ugo-x $(d_mul)/$(PF)/lib/*.so + $(call strip_package, $(p_mul), $(d_mul)) +endif + + if which strip-nondeterminism >/dev/null 2>&1; then \ + find $(d_dev) -name '*.a' -print0 \ + | xargs -0r strip-nondeterminism --type ar; \ + fi + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_bin)/$(PF)/$(DEB_HOST_GNU_TYPE) + + : # Remove windres manpages + rm -f $(d_bin)/$(PF)/share/man/man1/windres.1 + +ifeq ($(with_multiarch),yes) + rm -rf $(d_mul)/$(PF)/$(DEB_HOST_GNU_TYPE) + rm -f $(d_mul)/$(PF)/share/man/man1/windres.1 +endif + + rm -f $(d_bin)/$(PF)/bin/ld + ln -s ld.bfd $(d_bin)/$(PF)/bin/ld +ifeq ($(with_gold),yes) + ln -s ld.gold $(d_bin)/$(PF)/bin/gold + mv $(d_bin)/$(PF)/share/man/man1/ld.1 \ + $(d_bin)/$(PF)/share/man/man1/ld.bfd.1 + ln -s ld.bfd.1.gz $(d_bin)/$(PF)/share/man/man1/ld.1.gz + ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + if which help2man >/dev/null 2>&1; then \ + help2man -N -n 'The GNU ELF linker' $(d_bin)/$(PF)/bin/ld.gold \ + | sed 's,$(d_bin)/$(PF)/bin/,,g' > debian/ld.gold.1; \ + help2man -N -n 'The DWARF packaging utility' $(d_bin)/$(PF)/bin/dwp \ + | sed 's,$(d_bin)/$(PF)/bin/,,g' > debian/dwp.1; \ + fi + endif + cp debian/dwp.1 $(d_bin)/$(PF)/share/man/man1/ + cp debian/ld.gold.1 $(d_bin)/$(PF)/share/man/man1/ + ln -s ld.gold.1.gz $(d_bin)/$(PF)/share/man/man1/gold.1.gz + + : # install a symlink for the gold linker + $(install_dir) $(d_bin)/$(PF)/lib/gold-ld + ln -s ../../bin/ld.gold $(d_bin)/$(PF)/lib/gold-ld/ld +endif + : # install a symlink for the old linker + $(install_dir) $(d_bin)/$(PF)/lib/compat-ld + ln -s ../../bin/ld.bfd $(d_bin)/$(PF)/lib/compat-ld/ld + + : # Remove empty directory + rmdir $(d_bin)/$(PF)/include/ + + : # Provide $(DEB_HOST_GNU_TYPE)- prefixed binaries + for i in \ + addr2line ar as c++filt elfedit gprof ld ld.bfd \ + $(if $(with_gold),ld.gold dwp) \ + nm objcopy objdump ranlib readelf size strings strip; \ + do \ + ln -sf $$i $(d_bin)/$(PF)/bin/$(DEB_HOST_GNU_TYPE)-$$i; \ + ln -sf $$i.1.gz $(d_bin)/$(PF)/share/man/man1/$(DEB_HOST_GNU_TYPE)-$$i.1.gz; \ + done + +ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386)) +# temporary i586-* symlinks for stretch/sid + ifneq (,$(TRIPLET_SYMLINK)) + for i in \ + addr2line ar as c++filt elfedit gprof ld ld.bfd \ + $(if $(with_gold),ld.gold dwp) \ + nm objcopy objdump ranlib readelf size strings strip; \ + do \ + ln -sf $$i $(d_bin)/$(PF)/bin/$(TRIPLET_SYMLINK)-$$i; \ + ln -sf $$i.1.gz $(d_bin)/$(PF)/share/man/man1/$(TRIPLET_SYMLINK)-$$i.1.gz; \ + done + endif +# temporary i486-* symlinks for jessie/sid + ifeq ($(DEB_HOST_GNU_CPU),i586) + gnutype=$(subst i586,i486,$(DEB_HOST_GNU_TYPE)); \ + for i in \ + addr2line ar as c++filt elfedit gprof ld ld.bfd \ + $(if $(with_gold),ld.gold dwp) \ + nm objcopy objdump ranlib readelf size strings strip; \ + do \ + ln -sf $$i $(d_bin)/$(PF)/bin/$$gnutype-$$i; \ + ln -sf $$i.1.gz $(d_bin)/$(PF)/share/man/man1/$$gnutype-$$i.1.gz; \ + done + endif +# for backports to wheezy and squeeze + ifeq ($(DEB_HOST_GNU_CPU),i486) + gnutype=$(subst i486,i586,$(DEB_HOST_GNU_TYPE)); \ + for i in \ + addr2line ar as c++filt elfedit gprof ld ld.bfd \ + $(if $(with_gold),ld.gold dwp) \ + nm objcopy objdump ranlib readelf size strings strip; \ + do \ + ln -sf $$i $(d_bin)/$(PF)/bin/$$gnutype-$$i; \ + ln -sf $$i.1.gz $(d_bin)/$(PF)/share/man/man1/$$gnutype-$$i.1.gz; \ + done + endif +endif + + touch $@ + +stamps/install-hppa64: checkroot stamps/build-hppa64 + $(checkdir) + + rm -fr $(d_hppa64) + $(install_dir) $(d_hppa64) + $(install_dir) $(d_hppa64)/$(PF)/lib + + : # install binutils-hppa64 stuff + env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ + $(MAKE) -C builddir-hppa64 \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_hppa64)/$(PF)/ \ + mandir=$(pwd)/$(d_hppa64)/$(PF)/share/man \ + infodir=$(pwd)/$(d_hppa64)/$(PF)/share/info install + + : # move shared libs to the standard path + mv $(d_hppa64)/$(PF)/$(DEB_HOST_GNU_TYPE)/hppa64-linux-gnu/lib/lib*-*.so \ + $(d_hppa64)/$(PF)/lib/. + + : # Now get rid of just about everything in binutils-hppa64 + rm -rf $(d_hppa64)/$(PF)/man + rm -rf $(d_hppa64)/$(PF)/info + rm -rf $(d_hppa64)/$(PF)/include + rm -rf $(d_hppa64)/$(PF)/share + rm -rf $(d_hppa64)/$(PF)/hppa-linux-gnu + rm -rf $(d_hppa64)/$(PF)/lib/libiberty.a + + $(call strip_package, $(p_hppa64), $(d_hppa64)) + chmod ugo-x $(d_hppa64)/$(PF)/lib/*.so + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_hppa64)/$(PF)/$(DEB_HOST_GNU_TYPE) + + touch $@ + +stamps/install-static: checkroot stamps/build-static + $(checkdir) + + rm -fr $(d_static) $(d_udeb) + $(install_dir) $(d_static) $(d_udeb) + + : # Copy static ld-new into /bin for both -static and -static-udeb + $(install_dir) $(d_static)/bin + $(install_binary) builddir-static/ld/ld-new $(d_static)/bin/ld_static + $(install_dir) $(d_udeb)/bin + $(install_binary) builddir-static/ld/ld-new $(d_udeb)/bin/ld_static +ifeq ($(with_strip),yes) + pkg_create_dbgsym $(p_static) $(d_static) || true + $(STRIP) --strip-unneeded $(d_static)/bin/ld_static $(d_udeb)/bin/ld_static +endif + + touch $@ + +############################################################################### + +####################### +# binary-indep target # +####################### + +binary-indep: checkroot build install + $(checkdir) + + rm -f debian/files debian/substvars + +# Cross builds do not have documentation packages +ifeq (,$(TARGET)) + + $(install_dir) $(d_doc)/DEBIAN + +ifeq ($(GFDL_INVARIANT_FREE),yes) + rm -f $(d_doc)/$(PF)/share/info/bfd.info* + rm -f $(d_doc)/$(PF)/share/info/bfdint.info* + rm -f $(d_doc)/$(PF)/share/info/ldint.info* +endif + +ifneq ($(BACKPORT),true) + $(install_dir) $(d_doc)/$(PF)/share/doc/$(p_doc)/ + $(install_file) debian/changelog $(d_doc)/$(PF)/share/doc/$(p_doc)/changelog.Debian + $(install_file) debian/copyright $(d_doc)/$(PF)/share/doc/$(p_doc)/ + for i in bfd gas gprof ld; do \ + ln -sf ../$(p_bin)/$$i $(d_doc)/$(PF)/share/doc/$(p_doc)/$$i; \ + done + find $(d_doc)/$(PF)/share/doc/$(p_doc) -maxdepth 1 -type f ! -name copyright | xargs gzip -9n + gzip -9n $(d_doc)/$(PF)/share/info/* + + dpkg-gencontrol -P$(d_doc) -p$(p_doc) + chown -R root:root $(d_doc) + chmod -R go=rX $(d_doc) + find $(d_doc) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_doc) .. + + $(install_dir) $(d_src)/$(PF)/share/doc/$(p_src)/ + $(install_file) debian/changelog $(d_src)/$(PF)/share/doc/$(p_src)/changelog.Debian + $(install_file) debian/copyright $(d_src)/$(PF)/share/doc/$(p_src)/ + find $(d_src)/$(PF)/share/doc/$(p_src) -maxdepth 1 -type f ! -name copyright | xargs gzip -9n +endif # ifndef BACKPORT + + $(install_dir) $(d_src)/DEBIAN + $(install_dir) $(d_src)/$(PF)/src/binutils/patches + $(install_file) debian/patches/* $(d_src)/$(PF)/src/binutils/patches/ + cd .. && find $(source_files) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' && \ + find $(source_files) -type f -print0 | LC_ALL=C sort -z | \ + tar --null -T - -c --xz --exclude=CVS --mode=go=rX,u+rw,a-s \ + -f $(pwd)/$(d_src)/$(PF)/src/binutils/binutils-$(VERSION).tar.xz \ + $(source_files) + + tar cf - $$(find './debian' -mindepth 1 \( \ + -path './debian/binutils*' -type d -prune -o \ + -path './debian/patches' -prune -o \ + -path './debian/tmp*' -prune -o \ + -path './debian/.bzr*' -prune -o \ + -path './debian/files' -prune -o \ + -print \) ) \ + | tar -x -C $(d_src)/$(PF)/src/binutils -f - + -chmod 755 $(d_src)/$(PF)/src/binutils/debian/*.{pre,post}{inst,rm} + chmod 755 $(d_src)/$(PF)/src/binutils/debian/test-suite-compare.py + + dpkg-gencontrol -P$(d_src) -p$(p_src) + chown -R root:root $(d_src) + chmod -R go=rX $(d_src) + find $(d_src) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_src) .. + +endif + +############################################################################### + +####################### +# binary-arch target # +####################### + +binary.%: stamps/install.% + rm -rf $(D_CROSS)/$(PF)/share/info + + rm -rf $(D_CROSS)/DEBIAN + + : # make lintian happy + $(install_dir) $(D_CROSS)/$(PF)/share/lintian/overrides + sed 's/@PKG@/$(P_CROSS)/' debian/binutils-cross.overrides \ + > $(D_CROSS)/$(PF)/share/lintian/overrides/$(P_CROSS) + + : # install maintainer scrtips + $(install_dir) $(D_CROSS)/$(PF)/share/doc/$(P_CROSS) + $(install_file) debian/changelog \ + $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/changelog.Debian + $(install_file) debian/copyright debian/README.cross \ + $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/ + gzip -9nf $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/changelog.Debian + + for pkg in bfd gas gprof ld; do \ + ln -sf ../binutils/$$pkg \ + $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/$$pkg; \ + done + + $(install_dir) $(D_CROSS)/DEBIAN + if [ "$(is_rc)" = yes ]; then \ + nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; NF--; $$NF=$$NF+1; print }'); \ + else \ + nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; $$NF=$$NF+1; print }'); \ + fi; \ + date_ext=$(DATE_EXT); \ + [ "$(is_rc)" = yes ] && date_ext=; \ + sed -e 's/@VER@/$(VERSION)/g' \ + -e 's/@DEB_VER@/$(DEB_VERSION)/g' \ + -e 's/@DEB_UVER@/$(DEB_UPSTREAM)/g' \ + -e "s/@DEB_NVER@/$$nver/g" \ + -e "s/@DATE_EXT@/$$date_ext/g" \ + -e 's/@ARCH@/$*/g' \ + -e "s/@PKG@/$(P_CROSS)/g" \ + debian/binutils-cross.shlibs.in > $(D_CROSS)/DEBIAN/shlibs + $(install_script) debian/binutils.postinst $(D_CROSS)/DEBIAN/postinst + $(install_script) debian/binutils.postrm $(D_CROSS)/DEBIAN/postrm + + rm -f debian/substvars + dpkg-shlibdeps $(D_CROSS)/$(PF)/bin/* + dpkg-gencontrol -P$(D_CROSS) -p$(P_CROSS) \ + -VBuilt-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W binutils-source)" + chown -R root:root $(D_CROSS) + chmod -R go=rX $(D_CROSS) + find $(D_CROSS) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(D_CROSS) .. + +binary-arch: checkroot build install \ + $(if $(filter yes, $(with_cross)),$(foreach ca,$(CROSS_ARCHS), binary.$(ca))) + $(checkdir) + +ifneq ($(BACKPORT),true) +# Process the following only if $(TARGET) is set +ifneq (,$(TARGET)) + test "" != "$(TARGET)" + + rm -rf $(d_cross)/$(PF)/share/info $(d_cross)/$(PF)/share/man + + $(install_dir) $(d_cross)/DEBIAN + + $(install_dir) $(d_cross)/$(PF)/share/doc/$(p_cross)/ + $(install_file) debian/changelog $(d_cross)/$(PF)/share/doc/$(p_cross)/changelog.Debian + $(install_file) debian/copyright debian/README.cross $(d_cross)/$(PF)/share/doc/$(p_cross)/ + gzip -9nf $(d_cross)/$(PF)/share/doc/$(p_cross)/changelog.Debian + + for pkg in bfd gas gprof ld; do \ + ln -sf ../binutils/$$pkg $(d_cross)/$(PF)/share/doc/$(p_cross)/$$pkg; \ + done + + rm -f debian/substvars + dpkg-shlibdeps $(d_cross)/$(PF)/bin/* + dpkg-gencontrol -P$(d_cross) -p$(p_cross) \ + -VBuilt-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W binutils-source)" + find $(d_cross) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_cross) .. + +else + : # generate some control & helper files + if [ "$(is_rc)" = yes ]; then \ + nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; NF--; $$NF=$$NF+1; print }'); \ + else \ + nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; $$NF=$$NF+1; print }'); \ + fi; \ + for i in debian/*.in; do \ + case "$$i" in debian/control.in|debian/control.cross.in) continue; esac; \ + date_ext=$(DATE_EXT); \ + case "$$i" in debian/*.shlibs.in) [ "$(is_rc)" = yes ] && date_ext=; esac; \ + sed -e 's/@VER@/$(VERSION)/g' \ + -e 's/@DEB_VER@/$(DEB_VERSION)/g' \ + -e 's/@DEB_SVER@/$(DEB_SVERSION)/g' \ + -e 's/@DEB_UVER@/$(DEB_UPSTREAM)/g' \ + -e "s/@DEB_NVER@/$$nver/g" \ + -e "s/@DATE_EXT@/$$date_ext/g" \ + -e 's/@DEB_ARCH@/$(DEB_HOST_ARCH)/g' \ + -e "s/@dpkg_dev@/$(DPKG_DEV)/" \ + $$i > $${i%*.in}; \ + case "$$i" in *.post*|*.pre*) chmod 755 $${i%*.in}; esac; \ + done + + : # install bug reporting information + $(install_file) -D debian/$(p_bin).presubj \ + $(d_bin)/$(PF)/share/bug/$(p_bin)/presubj +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mul)/$(PF)/share/bug + ln -sf $(p_bin) $(d_mul)/$(PF)/share/bug/$(p_mul) +endif +ifeq ($(with_hppa64),yes) + $(install_dir) $(d_hppa64)/$(PF)/share/bug + ln -sf $(p_bin) $(d_hppa64)/$(PF)/share/bug/$(p_hppa64) +endif + + : # make lintian happy + $(install_file) -D debian/$(p_bin).overrides \ + $(d_bin)/$(PF)/share/lintian/overrides/$(p_bin) +ifeq ($(with_multiarch),yes) + $(install_file) -D debian/$(p_mul).overrides \ + $(d_mul)/$(PF)/share/lintian/overrides/$(p_mul) + $(install_file) -D debian/$(p_mdev).overrides \ + $(d_mdev)/$(PF)/share/lintian/overrides/$(p_mdev) +endif +ifeq ($(with_static),yes) + $(install_file) -D debian/$(p_static).overrides \ + $(d_static)/$(PF)/share/lintian/overrides/$(p_static) + $(install_file) -D debian/$(p_udeb).overrides \ + $(d_udeb)/$(PF)/share/lintian/overrides/$(p_udeb) +endif +ifeq ($(with_hppa64),yes) + $(install_file) -D debian/$(p_hppa64).overrides \ + $(d_hppa64)/$(PF)/share/lintian/overrides/$(p_hppa64) +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.preinst $(d_mul)/DEBIAN/preinst + $(install_script) debian/binutils-multiarch.postinst $(d_mul)/DEBIAN/postinst + $(install_script) debian/binutils-multiarch.prerm $(d_mul)/DEBIAN/prerm + $(install_script) debian/binutils-multiarch.postrm $(d_mul)/DEBIAN/postrm + $(install_file) debian/binutils-multiarch.shlibs $(d_mul)/DEBIAN/shlibs +endif + +ifeq ($(with_static),yes) + $(install_dir) $(d_static)/DEBIAN + $(install_script) debian/binutils-static.preinst $(d_static)/DEBIAN/preinst + $(install_dir) $(d_udeb)/DEBIAN +endif + +ifeq ($(with_hppa64),yes) + $(install_dir) $(d_hppa64)/DEBIAN + $(install_script) debian/$(p_hppa64).postinst $(d_hppa64)/DEBIAN/postinst + $(install_script) debian/$(p_hppa64).postrm $(d_hppa64)/DEBIAN/postrm + $(install_file) debian/$(p_hppa64).shlibs $(d_hppa64)/DEBIAN/shlibs +endif + + : # install docs + $(install_dir) $(d_bin)/$(PF)/share/doc/$(p_bin)/ + $(install_file) debian/changelog $(d_bin)/$(PF)/share/doc/$(p_bin)/changelog.Debian + $(install_file) debian/copyright $(d_bin)/$(PF)/share/doc/$(p_bin)/ + +ifeq ($(with_static),yes) + $(install_dir) $(d_static)/$(PF)/share/doc/$(p_static)/ + $(install_file) debian/changelog $(d_static)/$(PF)/share/doc/$(p_static)/changelog.Debian + $(install_file) debian/copyright $(d_static)/$(PF)/share/doc/$(p_static)/ +endif + + $(install_dir) $(d_dev)/$(PF)/share/doc/ + ln -sf $(p_bin) $(d_dev)/$(PF)/share/doc/$(p_dev) +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mul)/$(PF)/share/doc/ + ln -sf $(p_bin) $(d_mul)/$(PF)/share/doc/$(p_mul) + $(install_dir) $(d_mdev)/$(PF)/share/doc/ + ln -sf $(p_mul) $(d_mdev)/$(PF)/share/doc/$(p_mdev) +endif +ifeq ($(with_hppa64),yes) + $(install_dir) $(d_hppa64)/$(PF)/share/doc/ + ln -sf $(p_bin) $(d_hppa64)/$(PF)/share/doc/$(p_hppa64) +endif + +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + : # remove user and date from test-summary for reproducible builds + sed -i -e '/Test Run By/d' $(pwd)/test-summary + $(install_file) $(pwd)/test-summary $(d_bin)/$(PF)/share/doc/$(p_bin)/ +endif +endif + $(install_file) binutils/NEWS debian/README.cross \ + $(d_bin)/$(PF)/share/doc/$(p_bin)/ + + $(install_file) binutils/ChangeLog $(d_bin)/$(PF)/share/doc/$(p_bin)/changelog + + for pkg in bfd gas gprof ld; do \ + $(install_dir) $(d_bin)/$(PF)/share/doc/$(p_bin)/$$pkg; \ + done + $(install_file) bfd/ChangeLog bfd/PORTING bfd/TODO \ + $(d_bin)/$(PF)/share/doc/$(p_bin)/bfd/ + $(install_file) gas/ChangeLog gas/NEWS $(d_bin)/$(PF)/share/doc/$(p_bin)/gas/ + $(install_file) gprof/ChangeLog gprof/TODO gprof/TEST \ + $(d_bin)/$(PF)/share/doc/$(p_bin)/gprof/ + $(install_file) ld/ChangeLog ld/TODO ld/NEWS \ + $(d_bin)/$(PF)/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)/$(PF)/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)/$(PF)/share/doc/$(p_bin)/gprof/. + + : # Compress stuff that needs it + gzip -9n $(d_bin)/$(PF)/share/man/man1/*.1 + find $(d_bin)/$(PF)/share/doc/$(p_bin)/ -type f ! -name copyright -a ! -name bbconv.pl | xargs gzip -9n +ifeq ($(with_static),yes) + find $(d_static)/$(PF)/share/doc/$(p_static)/ -type f ! -name copyright | xargs gzip -9n +endif + + : # Finish it all up + find $(d_bin) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -P$(d_bin) -p$(p_bin) $(CONFLICTS_TARGET_$(DEB_HOST_ARCH)) $(gold_provides) + cd $(d_bin) && find -type f ! -regex './DEBIAN/.*' -printf '%P\n' | LC_ALL=C sort | xargs md5sum > DEBIAN/md5sums + + rm -f debian/substvars + dpkg-gencontrol -P$(d_dev) -p$(p_dev) + cd $(d_dev) && find -type f ! -regex './DEBIAN/.*' -printf '%P\n' | LC_ALL=C sort | xargs md5sum > DEBIAN/md5sums + +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 -P$(d_mul) -p$(p_mul) + cd $(d_mul) && find -type f ! -regex './DEBIAN/.*' -printf '%P\n' | LC_ALL=C sort | xargs md5sum > DEBIAN/md5sums + + rm -f debian/substvars + mkdir -p $(d_mdev)/DEBIAN + dpkg-gencontrol -P$(d_mdev) -p$(p_mdev) + cd $(d_mdev) && find -type f ! -regex './DEBIAN/.*' -printf '%P\n' | LC_ALL=C sort | xargs -r md5sum > DEBIAN/md5sums +endif + +ifeq ($(with_static),yes) + dpkg-gencontrol -P$(d_static) -p$(p_static) + dpkg-gencontrol -P$(d_udeb) -p$(p_udeb) -fdebian/files~ + dpkg-distaddfile $(STATIC_UDEB) debian-installer optional +endif + +ifeq ($(with_hppa64),yes) + rm -f debian/substvars + find $(d_hppa64) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -P$(d_hppa64) -p$(p_hppa64) + cd $(d_hppa64) && find -type f ! -regex './DEBIAN/.*' -printf '%P\n' | LC_ALL=C sort | xargs md5sum > DEBIAN/md5sums +endif + + chown -R root:root $(d_bin) $(d_dev) + chmod -R go=rX $(d_bin) $(d_dev) + find $(d_bin) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_bin) .. + find $(d_dev) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_dev) .. +ifeq ($(with_multiarch),yes) + chown -R root:root $(d_mul) + chmod -R go=rX $(d_mul) + find $(d_mul) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_mul) .. + + chown -R root:root $(d_mdev) + chmod -R go=rX $(d_mdev) + find $(d_mdev) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_mdev) .. +endif +ifeq ($(with_static),yes) + chown -R root:root $(d_static) $(d_udeb) + chmod -R go=rX $(d_static) $(d_udeb) + find $(d_static) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_static) .. + find $(d_udeb) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_udeb) ../$(STATIC_UDEB) +endif +ifeq ($(with_hppa64),yes) + chown -R root:root $(d_hppa64) + chmod -R go=rX $(d_hppa64) + find $(d_hppa64) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + dpkg --build $(d_hppa64) .. +endif + +endif # Process the following only if $(TARGET) is set +endif # ifndef BACKPORT +############################################################################### + +################# +# cross targets # +################# + +# Process the following only if $(TARGET) is set +ifneq (,$(TARGET)) + +p_cross = $(subst _,-,binutils-$(TARGET)) +d_cross = debian/$(p_cross) + +#----------------------------------------------------------------- +# 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 +ifeq ($(with_gold),yes) + CONFARGS += --enable-ld=default --enable-gold +endif + +stamps/configure-cross: stamps/patch + $(checkdir) + test "" != "$(TARGET)" + rm -rf stamps/configure-cross builddir-$(TARGET) + mkdir builddir-$(TARGET) + cd builddir-$(TARGET) \ + && env CC="$(CC)" CXX="$(CXX)" ../configure \ + $(CONFARGS) \ + --target=$(TARGET) + touch $@ + +stamps/build-cross: stamps/configure-cross + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + touch $@ + +stamps/install-cross: stamps/build-cross + $(checkdir) + test "" != "$(TARGET)" + rm -rf $(d_cross) + $(MAKE) -C builddir-$(TARGET) prefix=$(pwd)/$(d_cross)/$(PF) \ + mandir=$(pwd)/$(d_cross)/$(PF)/share/man install + rm -rf $(d_cross)/$(PF)/lib* $(d_cross)/$(PF)/info $(d_cross)/$(PF)/share/locale + + $(call strip_package, $(p_cross), $(d_cross),$(DEB_HOST_GNU_TYPE)/$(TARGET)) + chmod ugo-x $(d_cross)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(TARGET)/lib/*.so + + : # Get rid of .la files since libtool obviously has no idea about transient paths + rm -f $(d_cross)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(TARGET)/lib/*.la + + gzip -9n $(d_cross)/$(PF)/share/man/man1/* + touch $@ + +stamps/configure-host-cross: stamps/configure-cross + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) configure-host -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + touch $@ + +stamps/build-static-cross: stamps/configure-host-cross + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" LDFLAGS="-all-static" + touch $@ + +stamps/install-static-cross: stamps/build-static-cross stamps/install-cross + +binary-cross: + @echo "Please use dpkg-buildpackage instead of calling binary-cross directly; see README.cross" + @false + +endif # ifneq ($(TARGET),) + +############################################################################### + +define checkdir + test -f bfd/elf32.c -a -f debian/rules +endef + +ifeq ($(with_strip),yes) +# strip_package: +define strip_package + : # Strip shared libraries + if which pkg_create_dbgsym >/dev/null 2>&1; then \ + pkg_create_dbgsym $1 $2; \ + fi + $(STRIP) --strip-unneeded $2/$(PF)/$3/lib/libbfd-*so + $(STRIP) --strip-unneeded $2/$(PF)/$3/lib/libopcodes-*so + $(STRIP) $$(file $2/$(PF)/bin/* |awk -F: '$$0 !~ /script/ {print $$1}') +endef +else +define strip_package +endef +endif + +remove-gfdl-files: +ifeq ($(GFDL_INVARIANT_FREE),yes) + for i in $(gfdl_toplevel_texinfo_files); do \ + if [ -f $$i ]; then \ + sed "s/@name@/$$(basename $$i)/g" debian/gfdl.texi > $$i; \ + fi; \ + done + rm -f $(gfdl_generated_files) +endif + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot + +.PRECIOUS: stamps/patch stamps/configure.% stamps/build.% stamps/install.% --- binutils-2.25.1.orig/debian/source.lintian-overrides +++ binutils-2.25.1/debian/source.lintian-overrides @@ -0,0 +1,5 @@ +# handled via diversions +binutils source: binaries-have-file-conflict + +# wrong positive +binutils source: license-problem-gfdl-invariants --- binutils-2.25.1.orig/debian/source/format +++ binutils-2.25.1/debian/source/format @@ -0,0 +1 @@ +1.0 --- binutils-2.25.1.orig/debian/strip.cross.in +++ binutils-2.25.1/debian/strip.cross.in @@ -0,0 +1,3 @@ +#! /bin/sh + +__TARGET__strip --remove-section=.comment --remove-section=.note $* --- binutils-2.25.1.orig/debian/test-suite-compare.py +++ binutils-2.25.1/debian/test-suite-compare.py @@ -0,0 +1,230 @@ +#!/usr/bin/python3 + +# 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 section in results: + extra = 1 + too_many = 10 + while section in results 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 test in results: + 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 list(new.keys()): + for test in list(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 section not in old: + continue + if test not in old[section]: + 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.25.1.orig/debian/tests/build +++ binutils-2.25.1/debian/tests/build @@ -0,0 +1 @@ +#!/bin/true --- binutils-2.25.1.orig/debian/tests/control +++ binutils-2.25.1/debian/tests/control @@ -0,0 +1,9 @@ +Tests: build +Depends: build-essential +Restrictions: build-needed + +Tests: libc-link +Depends: build-essential + +Tests: shlib-build +Depends: build-essential --- binutils-2.25.1.orig/debian/tests/libc-link +++ binutils-2.25.1/debian/tests/libc-link @@ -0,0 +1,29 @@ +#!/bin/sh +# autopkgtest check: Build and run a simple program against libc, to verify +# basic binutils compile-time and run-time linking functionality. +# +# (C) 2012 Canonical Ltd. +# Author: Martin Pitt + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < libctest.c +#include +#include + +int main() +{ + assert (1 > 0); + assert (strcmp ("hello", "hello") == 0); + return 0; +} +EOF + +gcc -o libctest libctest.c +echo "build: OK" +[ -x libctest ] +./libctest +echo "run: OK" --- binutils-2.25.1.orig/debian/tests/shlib-build +++ binutils-2.25.1/debian/tests/shlib-build @@ -0,0 +1,44 @@ +#!/bin/sh +# autopkgtest check: Build and link against a simple shared library, to test +# basic binutils compile-time and run-time linking functionality. +# +# (C) 2012 Canonical Ltd. +# Author: Martin Pitt + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < testlib.c + +int ultimate_answer() +{ + return 42; +} +EOF + +gcc -Wall -Werror -shared -o libultimate.so testlib.c +echo "library build: OK" + +# should export the symbol +nm -D libultimate.so | grep -q 'T ultimate_answer' + +# link it against a program +cat < testprog.c +#include + +int ultimate_answer(); + +int main() +{ + assert (ultimate_answer() == 42); + return 0; +} +EOF + +gcc -Wall -Werror -L . -o testprog testprog.c -lultimate +echo "program build: OK" +[ -x testprog ] +LD_LIBRARY_PATH=. ./testprog +echo "run: OK" --- binutils-2.25.1.orig/debian/watch +++ binutils-2.25.1/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://ftp.gnu.org/gnu/binutils/binutils-([\d\.]*).tar.gz