--- binutils-2.21.51.20110421.orig/debian/binutils-multiarch.overrides +++ binutils-2.21.51.20110421/debian/binutils-multiarch.overrides @@ -0,0 +1,10 @@ +# don't warn about missing man pages for diverted binaries +binutils-multiarch binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-multiarch binary: package-name-doesnt-match-sonames + +# not in binutils-multiarch, just move these away +binutils-multiarch: diversion-for-unknown-file usr/lib/libopcodes.a preinst:19 +binutils-multiarch: diversion-for-unknown-file usr/lib/libbfd.a preinst:16 + --- binutils-2.21.51.20110421.orig/debian/control.in +++ binutils-2.21.51.20110421/debian/control.in @@ -0,0 +1,107 @@ +Source: binutils +Section: devel +Priority: optional +Maintainer: Matthias Klose +Uploaders: James Troup , Daniel Jacobowitz +Standards-Version: 3.9.1 +Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.64), bison, flex, gettext, texinfo, dejagnu (>= 1.4.2-1.1), quilt, file, xz-utils, lsb-release, zlib1g-dev +Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.21-debian +Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.21-debian + +Package: binutils +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, binutils-gold (<< 2.20.51.20100415) +Replaces: binutils-gold (<< 2.20.51.20100415) +Provides: elf-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + +Package: binutils-dev +Architecture: any +Priority: extra +Depends: binutils (= ${binary:Version}) +Conflicts: libbfd-dev +Provides: libbfd-dev +Replaces: libbfd-dev, libc5-dev +Description: The GNU binary utilities (BFD development files) + This package includes header files and static libraries necessary to build + programs which use the GNU BFD library, which is part of binutils. Note + that building Debian packages which depend on the shared libbfd is Not + Allowed. + +Package: binutils-multiarch +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Provides: multiarch-binutils +Description: Binary utilities that support multi-arch targets + The programs in this package are used to manipulate binary and object + files that may have been created on other architectures. This package + is primarily for multi-architecture developers and cross-compilers and + is not needed by normal users or developers. Note that a cross-assembling + version of gas is not included in this package, just the binary utilities. + NORMAL USERS SHOULD NOT INSTALL THIS PACKAGE. It's meant only for those + requiring support for reading info from binaries from other architectures. + +Package: binutils-gold +Architecture: amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Description: The (experimental) GNU gold linker utility + Gold is a new linker, still in development, which is faster than the + current linker included in binutils. It currently fails to link some + applications and libraries (i.e. won't link usable kernels). + . + This package diverts the GNU linker (ld) with the experimental gold + linker. + +Package: binutils-hppa64 +Architecture: any +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for hppa64-linux + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build an 64-bit kernel for 64-bit hppa machines. + +Package: binutils-spu +Architecture: powerpc ppc64 +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Conflicts: spu-binutils +Replaces: spu-binutils +Provides: spu-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for spu-elf + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build programs for Cell Broadband Engine SPU + processors. + +Package: binutils-doc +Section: doc +Architecture: all +Priority: optional +Depends: dpkg (>= 1.15.4) | install-info +Conflicts: binutils (<< 2.9.1.0.25-3) +Suggests: binutils (= ${binary:Version}) +Description: Documentation for the GNU assembler, linker and binary utilities + This package consists of the documentation for the GNU assembler, + linker and binary utilities in info format. + +Package: binutils-source +Architecture: all +Priority: optional +Depends: texinfo, zlib1g-dev, make, python +Description: The GNU assembler, linker and binary utilities (source) + This package contains the sources and patches which are needed to + build binutils. --- binutils-2.21.51.20110421.orig/debian/binutils-multiarch.preinst.in +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/binutils-hppa64.postrm +++ binutils-2.21.51.20110421/debian/binutils-hppa64.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/test-suite-compare.py +++ binutils-2.21.51.20110421/debian/test-suite-compare.py @@ -0,0 +1,230 @@ +#!/usr/bin/env python + +# Quick'n'dirty regression check for dejagnu testsuites +# Copyright (C) 2003, 2004, 2005, 2006, 2007 James Troup + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU;5B General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +################################################################################ + +import optparse +import os +import sys + +################################################################################ + +def fubar(msg, exit_code=1): + sys.stderr.write("E: %s\n" % (msg)) + sys.exit(exit_code) + +def warn(msg): + sys.stderr.write("W: %s\n" % (msg)) + +def info(msg): + sys.stderr.write("I: %s\n" % (msg)) + +################################################################################ + +def read_testsummary(filename): + results = {} + file = open(filename) + for line in file.readlines(): + if not line: + continue + if line.startswith("Running"): + s = line.split() + if "/" in s[1]: + x = s[1] + if x.find("/testsuite/") == -1: + fubar("Can't find /testsuite/ in '%s'." % (x)) + # 'Running /home/james/debian/packages/binutils/binutils-2.14.90.0.7/gas/testsuite/gas/hppa/unsorted/unsorted.exp ...' -> 'gas/hppa/unsorted/unsorted.exp' + # ... since using basename() isn't dupe safe. + section = x[x.find("/testsuite/"):].replace("/testsuite/","").split()[0] + + # Tests can be duplicated, e.g. hppa/basic/basic.exp + # is run twice, once for hppa-linux and once for + # hppa64-linux. This is of course a horrible bodge, + # but I can't think of anything trivial and better off + # hand. + + if results.has_key(section): + extra = 1 + too_many = 10 + while results.has_key(section) and extra < too_many: + section = "%s.%s" % (section, extra) + extra += 1 + if extra >= too_many: + fubar("gave up trying to unduplicate %s." % (section)) + + results[section] = {} + continue + + got_state = 0 + for state in [ "PASS", "XPASS", "FAIL", "XFAIL", "UNRESOLVED", + "UNTESTED", "UNSUPPORTED" ]: + if line.startswith(state): + s = line.split(':') + state = s[0] + test = ':'.join(s[1:]).strip() + if results.has_key(test): + warn("%s/%s is duplicated." % (section, test)) + results[section][test] = state + got_state = 1 + break + + if got_state: + continue + + return results + +################################################################################ + +def compare_results(old, new): + total_num = 0 + pass_count = 0 + fail_count = 0 + xfail_count = 0 + untested_count = 0 + regression_count = 0 + progression_count = 0 + change_count = 0 + + for section in new.keys(): + for test in new[section].keys(): + state = new[section][test] + + # Stats pr0n + total_num += 1 + if state == "PASS" or state == "XPASS": + pass_count += 1 + elif state == "FAIL" or state == "UNRESOLVED": + fail_count += 1 + elif state == "XFAIL": + xfail_count += 1 + elif state == "UNTESTED": + untested_count += 1 + + # Compare to old + if not old.has_key(section): + continue + if not old[section].has_key(test): + continue + old_state = old[section][test] + if state == "PASS": + if old_state != "PASS": + progression_count += 1 + info("[%s] progression (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "XPASS": + if old_state != "XPASS" and old_state != "PASS": + progression_count += 1 + warn("[%s] %s: %s" % (section, state, test)) + elif state == "FAIL": + if old_state != "FAIL": + regression_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "XFAIL": + if old_state != "XFAIL": + change_count += 1 + info("[%s] change (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "UNRESOLVED": + if old_state != "UNRESOLVED" and old_state != "FAIL": + regression_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + if old_state == "FAIL": + change_count += 1 + info("[%s] change (%s -> %s): %s" % (section, old_state, state, test)) + elif state == "UNTESTED": + if old_state != "UNTESTED": + change_count += 1 + warn("[%s] REGRESSION (%s -> %s): %s" % (section, old_state, state, test)) + + if regression_count: + print "%d REGRESSIONS (%.2f%%)." % (regression_count, (float(regression_count)/total_num)*100) + if progression_count: + print "%d progressions (%.2f%%)." % (progression_count, (float(progression_count)/total_num)*100) + + if change_count: + print "%d changes (%.2f%%)." % (change_count, (float(change_count)/total_num)*100) + + print "%d tests: %d pass (%.2f%%), %d fail (%.2f%%), %d xfail (%.2f%%) %d untested (%.2f%%)." \ + % (total_num, pass_count, (float(pass_count)/total_num)*100, + fail_count, (float(fail_count)/total_num)*100, + xfail_count, (float(xfail_count)/total_num)*100, + untested_count, (float(untested_count)/total_num)*100) + + if regression_count: + sys.exit(1) + +################################################################################ + +def compare_multiple(directory, first_version, second_version): + architectures = [ "alpha", "arm", "hppa", "i386", "ia64", "mips", + "m68k", "mipsel", "powerpc", "s390", "sparc" ] + + for arch in architectures: + print "*********************************** %s ******************************" % (arch) + second_filename = "%s/%s_%s" % (directory, second_version, arch) + if not os.path.exists(second_filename): + print " -- NOT AVAILABLE --" + continue + + new = read_testsummary(second_filename) + first_filename = "%s/%s_%s" % (directory, first_version, arch) + old = read_testsummary(first_filename) + compare_results(old, new) + +################################################################################ + +def init(): + """Initalization, including parsing of options.""" + + usage = """usage: %prog [OPTIONS] +compare (binutils) dejagnu testsuite results. + +Example usage: + + test-suite-compare.py binutils-2.17/test-summary binutils-2.18/test-summary + +Or to compare across all architectures (with test results stored in a +'test-summary' directory): + + test-suite-compare.py -mtest-summary 2.17-3 2.18-1""" + parser = optparse.OptionParser(usage) + parser.add_option("-m", "--multiple", dest="multiple", + nargs=1, type="string", + help="compare multiple architectures") + (options, args) = parser.parse_args() + + if len(args) > 2 or len(args) < 2: + parser.error("takes 2 arguments (old and new)") + (old_version, new_version) = args + + return options, old_version, new_version + +################################################################################ + +def main(): + (options, old_version, new_version) = init() + if options.multiple: + compare_multiple(options.multiple, old_version, new_version) + else: + old = read_testsummary(old_version) + new = read_testsummary(new_version) + compare_results(old, new) + +################################################################################ + +if __name__ == '__main__': + main() --- binutils-2.21.51.20110421.orig/debian/binutils-gold.postrm +++ binutils-2.21.51.20110421/debian/binutils-gold.postrm @@ -0,0 +1,15 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" -o "$1" = "abort-install" ]; then + dpkg-divert \ + --package binutils-gold \ + --remove --rename \ + --divert /usr/bin/ld.bfd-link /usr/bin/ld + dpkg-divert \ + --package binutils-gold \ + --remove --rename \ + --divert /usr/share/man/man1/ld.bfd-link.1.gz /usr/share/man/man1/ld.1.gz + +fi --- binutils-2.21.51.20110421.orig/debian/binutils-spu.postinst +++ binutils-2.21.51.20110421/debian/binutils-spu.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/binutils.overrides +++ binutils-2.21.51.20110421/debian/binutils.overrides @@ -0,0 +1,5 @@ +# the API of the shared libs is not public, don't care about the name +binutils binary: package-name-doesnt-match-sonames + +# big tables +binutils binary: manpage-has-errors-from-man --- binutils-2.21.51.20110421.orig/debian/binutils-spu.postrm +++ binutils-2.21.51.20110421/debian/binutils-spu.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/binutils.postinst +++ binutils-2.21.51.20110421/debian/binutils.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/binutils-multiarch.postrm.in +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/rules +++ binutils-2.21.51.20110421/debian/rules @@ -0,0 +1,1225 @@ +#!/usr/bin/make -f +# debian/rules file - for binutils (2.20) +# Based on sample debian/rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# Copyright 1998-2007 James Troup. +# Portions Copyright 2008-2009 Canonical Ltd. +# Portions Copyright 2008-2009 Matthias Klose. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +################################################################################ + +p_bin = binutils +p_dev = $(p_bin)-dev +p_mul = $(p_bin)-multiarch +p_gold = $(p_bin)-gold +p_doc = $(p_bin)-doc +p_hppa64 = $(p_bin)-hppa64 +p_spu = $(p_bin)-spu +p_src = $(p_bin)-source + +# 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_gold = debian/$(p_gold) +d_doc = debian/$(p_doc) +d_hppa64 = debian/$(p_hppa64) +d_spu = debian/$(p_spu) +d_src = debian/$(p_src) + +install_dir = install -d -m 755 +install_file = install -m 644 +install_script = install -m 755 +install_binary = install -m 755 -s + +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_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) + +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 + +ifneq (,$(filter $(DEB_HOST_ARCH), amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64)) + with_gold = yes +endif + +with_multiarch := yes + +CC = gcc +CXX = g++ +CFLAGS = -g -O2 +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++ +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 + +# see LP: #446478, would only fix the testcases +#ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) +# CFLAGS += -fno-section-anchors +#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) +DATE := $(shell sed -n 's/.* \([0-9]*\)$$/\1/p' bfd/version.h) +ifneq (,$(DATE)) + DATE_EXT := .$(DATE) +endif + +ifneq ($(DEB_UPSTREAM),$(VERSION)$(DATE_EXT)) + $(error upstream ($(DEB_UPSTREAM)) and debian ($(VERSION)$(DATE_EXT)) version mismatch) +endif + +SINGLE_VERSION= $(VERSION)-system +MULTI_VERSION = $(VERSION)-multiarch +HPPA64_VERSION= $(VERSION)-hppa64 +SPU_VERSION = $(VERSION)-spu + +DISTRIBUTION := $(shell lsb_release -is) +NJOBS = +# Support parallel= in DEB_BUILD_OPTIONS (see #209008) +ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) +endif +ifneq (,$(findstring nogold,$(DEB_BUILD_OPTIONS))) + with_gold = disabled in DEB_BUILD_OPTIONS +endif +ifneq (,$(findstring nomult,$(DEB_BUILD_OPTIONS))) + with_multiarch = disabled in DEB_BUILD_OPTIONS +endif + +# 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 + +# 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 + +######################################## + +CONFARGS = \ + --enable-shared \ + --enable-plugins \ + --prefix=/$(PF) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --with-pkgversion="GNU Binutils for $(DISTRIBUTION)" + +ifeq ($(DEB_HOST_MULTIARCH),x86_64-linux-gnu) + DEB_HOST_MULTIARCH32 = i386-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),powerpc64-linux-gnu) + DEB_HOST_MULTIARCH32 = powerpc-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),s390x-linux-gnu) + DEB_HOST_MULTIARCH32 = s390-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),sparc64-linux-gnu) + DEB_HOST_MULTIARCH32 = sparc-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),x86_64-kfreebsd-gnu) + DEB_HOST_MULTIARCH32 = i386-kfreebsd-gnu +else ifeq ($(DEB_HOST_MULTIARCH),i386-linux-gnu) + DEB_HOST_MULTIARCH64 = x86_64-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),powerpc-linux-gnu) + DEB_HOST_MULTIARCH64 = powerpc64-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),sparc-linux-gnu) + DEB_HOST_MULTIARCH64 = sparc64-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),s390-linux-gnu) + DEB_HOST_MULTIARCH64 = s390x-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),i386-kfreebsd-gnu) + DEB_HOST_MULTIARCH64 = x86_64-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),mips-linux-gnu) + DEB_HOST_MULTIARCH64 = mips64-linux-gnu +else ifeq ($(DEB_HOST_MULTIARCH),mipsel-linux-gnu) + DEB_HOST_MULTIARCH64 = mips64el-linux-gnu +endif +export DEB_HOST_MULTIARCH DEB_HOST_MULTIARCH32 DEB_HOST_MULTIARCH64 + +ifeq ($(DEB_HOST_ARCH),sparc) + CONFARGS += --enable-targets=sparc64-linux-gnu + CONFLICTS = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" +endif +ifeq ($(DEB_HOST_ARCH),sparc64) + CONFARGS += --enable-targets=sparc-linux-gnu + CONFLICTS = -VextraConflicts="libc6-dev-sparc64 (<< 2.2.5-7)" +endif +ifeq ($(DEB_HOST_ARCH),powerpc) + CONFARGS += --enable-targets=powerpc64-linux-gnu,spu +endif +ifeq ($(DEB_HOST_ARCH),ppc64) + CONFARGS += --enable-targets=powerpc-linux-gnu,spu +endif +ifeq ($(DEB_HOST_ARCH),s390) + CONFARGS += --enable-targets=s390x-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),i386) + CONFARGS += --enable-targets=x86_64-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),kfreebsd-i386) + CONFARGS += --enable-targets=x86_64-kfreebsd-gnu +endif +ifeq ($(DEB_HOST_ARCH),mips) + CONFARGS += --enable-targets=mips64-linux-gnu +endif +ifeq ($(DEB_HOST_ARCH),mipsel) + CONFARGS += --enable-targets=mips64el-linux-gnu +endif +ifneq (,$(filter $(DEB_HOST_ARCH),armhf ia64 sparc sparc64)) + CONFARGS += --disable-werror +endif + +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) +#ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel)) +# with_check := disabled for architecture $(DEB_HOST_ARCH) +#endif + +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 %-stamp .pc CVS debian builddir-% test-summary, $(wildcard *))) + +################################################################################ + +################# +# patch targets # +################# + +patch: patch-stamp +patch-stamp: +ifneq ($(PATCHED_SOURCES),yes) + QUILT_PATCHES=$(CURDIR)/debian/patches \ + quilt --quiltrc /dev/null push -a || test $$? = 2 +endif + 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 -fr builddir-multi builddir-single builddir-hppa64 builddir-spu builddir-gold + -find . -name \*.gmo -o -name \*~ -o -name \*.info ! -name sysroff.info | xargs rm -f + -rm -f $(pwd)/test-summary* + -rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_hppa64) $(d_src) $(d_spu) $(d_gold) + -rm -rf debian/patched debian/tmp debian/files* debian/substvars + -rm -f debian/*.orig debian/*.rej + -rm -rf $(d_cross) debian/files debian/substvars + -rm -rf builddir-$(TARGET) {configure,build,install}-cross-stamp + for i in debian/*.in; do \ + case "$$i" in debian/control*.in) continue; esac; \ + rm -f $${i%*.in}; \ + done + + -rm -f *-stamp + +################################################################################ + +####################### +# single-arch targets # +####################### + +SINGLE_CONFARGS = $(CONFARGS) +ifeq ($(with_gold),yes) + SINGLE_CONFARGS += --enable-ld=default --enable-gold +endif + +configure-single-stamp: patch-stamp + $(checkdir) + +ifeq ($(with_check),yes) + @if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \ + : ; \ + else \ + echo "expect is failing on your system with the above error, which means the"; \ + echo "testsuite will fail. Please resolve the above issues and retry the build."; \ + echo "-----------------------------------------------------------------------------"; \ + exit 1; \ + fi +endif + + rm -rf configure-single-stamp \ + builddir-single + mkdir builddir-single + cd builddir-single && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + ../configure --with-sysroot=/ $(SINGLE_CONFARGS) + $(MAKE) -C builddir-single configure-host + touch configure-single-stamp + +build-single-stamp: configure-single-stamp + $(checkdir) + env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(MAKE) -C builddir-single/bfd headers + env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-single +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(with_check),yes) + -env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ + $(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/python ]; then \ + echo "Test results, compared with installed binutils:"; \ + zcat /usr/share/doc/binutils/test-summary.gz > test-summary-installed; \ + if python debian/test-suite-compare.py test-summary-installed test-summary; then \ + : ; \ + elif [ -n "$(ignore_regressions)" ]; then \ + echo "$(ignore_regressions)"; \ + else \ + false; \ + fi; \ + else \ + echo "python not installed, not comparing test results."; \ + fi +endif +endif + touch build-single-stamp + + +################################################################################ + +##################### +# multiarch targets # +##################### + +multiarch_targets = \ + alpha-linux-gnu \ + arm-linux-gnueabi \ + hppa-linux-gnu \ + i486-linux-gnu \ + ia64-linux-gnu \ + m68k-linux-gnu \ + m68k-rtems \ + mips-linux-gnu \ + mipsel-linux-gnu \ + mips64-linux-gnu \ + mips64el-linux-gnu \ + powerpc-linux-gnu \ + powerpc64-linux-gnu \ + s390-linux-gnu \ + s390x-linux-gnu \ + sh-linux-gnu \ + sh64-linux-gnu \ + sparc-linux-gnu \ + sparc64-linux-gnu \ + x86_64-linux-gnu \ + m32r-linux-gnu \ + spu + +configure-multi-stamp: patch-stamp + $(checkdir) + rm -rf configure-multi-stamp \ + builddir-multi + mkdir builddir-multi + cd builddir-multi \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure $(CONFARGS) \ + --with-sysroot=/ \ + --disable-werror \ + --enable-targets=$(subst $(SPACE),$(COMMA),$(multiarch_targets)) + $(MAKE) -C builddir-multi configure-host + touch configure-multi-stamp + +build-multi-stamp: configure-multi-stamp + $(checkdir) + $(MAKE) -C builddir-multi/bfd headers + env MAKE="$(MAKE) VERSION=$(MULTI_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-multi + touch build-multi-stamp + +################################################################################ + +################# +# static target # +################# + +configure-static-stamp: patch-stamp + $(checkdir) + rm -rf configure-static-stamp \ + builddir-static + mkdir builddir-static + cd builddir-static \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="-g0 -Os" ../configure \ + --prefix=/$(PF) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --with-pkgversion="GNU Binutils for $(DISTRIBUTION)" + $(MAKE) -C builddir-static configure-bfd + $(MAKE) -C builddir-static configure-ld + touch configure-static-stamp + +build-static-stamp: configure-static-stamp + $(checkdir) + $(MAKE) $(NJOBS) -C builddir-static/libiberty CCLD='$(CC) -all-static' + $(MAKE) $(NJOBS) -C builddir-static/bfd CCLD='$(CC) -all-static' + $(MAKE) $(NJOBS) -C builddir-static/ld CCLD='$(CC) -all-static' + touch build-static-stamp + +################################################################################ + +################# +# hppa64 target # +################# + +configure-hppa64-stamp: patch-stamp + $(checkdir) + rm -rf configure-hppa64-stamp \ + builddir-hppa64 + mkdir builddir-hppa64 + cd builddir-hppa64 \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure \ + --enable-shared \ + --prefix=/$(PF) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --target=hppa64-linux-gnu + $(MAKE) -C builddir-hppa64 configure-host + touch configure-hppa64-stamp + +build-hppa64-stamp: configure-hppa64-stamp + $(checkdir) + $(MAKE) -C builddir-hppa64/bfd headers + env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-hppa64 + touch build-hppa64-stamp + +################################################################################ + +############## +# spu target # +############## + +configure-spu-stamp: patch-stamp + $(checkdir) + rm -rf configure-spu-stamp \ + builddir-spu + mkdir builddir-spu + cd builddir-spu \ + && env CC="$(CC)" CFLAGS="$(CFLAGS)" ../configure \ + --enable-shared \ + --prefix=/$(PF) \ + --program-prefix=spu- \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_BUILD_GNU_TYPE) \ + --target=spu-elf + $(MAKE) -C builddir-spu configure-host + touch configure-spu-stamp + +build-spu-stamp: configure-spu-stamp + $(checkdir) + $(MAKE) -C builddir-spu/bfd headers + env MAKE="$(MAKE) VERSION=$(SPU_VERSION)" \ + $(MAKE) $(NJOBS) -C builddir-spu + touch build-spu-stamp + +################################################################################ + +pre-build: +#ifneq (,$(filter $(DEB_HOST_ARCH), armel powerpc)) +# @echo Build it ... +#else +# @echo Explicitely fail the build for architecture $(DEB_HOST_ARCH) +# false +#endif + +build_stamps = build-single-stamp +ifeq ($(with_multiarch),yes) + build_stamps += build-multi-stamp +endif +ifeq ($(DEB_HOST_ARCH),hppa) + build_stamps += build-hppa64-stamp +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + build_stamps += build-spu-stamp +endif +ifneq (,$(TARGET)) + ifneq (,$(findstring static-cross,$(DEB_BUILD_OPTIONS))) + build_stamps = build-static-cross-stamp + else + build_stamps = build-cross-stamp + endif +endif + +ifeq ($(BACKPORT),true) + build_stamps := + with_check := no +endif + +build: pre-build build-stamp +build-stamp: $(build_stamps) + touch build-stamp + +################################################################################ + +################## +# install target # +################## + +install_stamps = install-stamp +ifeq ($(DEB_HOST_ARCH),hppa) + install_stamps += install-hppa64-stamp +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + install_stamps += install-spu-stamp +endif +ifneq (,$(TARGET)) + ifneq (,$(findstring static-cross,$(DEB_BUILD_OPTIONS))) + install_stamps = install-static-cross-stamp + else + install_stamps = install-cross-stamp + endif +endif +ifeq ($(BACKPORT),true) + install_stamps := +endif +install: $(install_stamps) +install-stamp: checkroot build-stamp + $(checkdir) + + rm -fr $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_src) + $(install_dir) $(d_bin) $(d_dev) $(d_mul) $(d_doc) $(d_src) + + : # install binutils and -dev stuff + 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 + + : # copy libiberty.h ... not too keen on this, but it was requested + cp -f include/libiberty.h $(d_bin)/$(PF)/include + + : # copy demangle.h ... not too keen on this, but it was requested + cp -f include/demangle.h $(d_bin)/$(PF)/include + + : # 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)) + 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) + rm -f $(d_mul)/$(PF)/lib/libbfd.so $(d_mul)/$(PF)/lib/libopcodes.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 + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_bin)/$(PF)/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_bin)/$(PF)/lib/libopcodes-*so + + chmod ugo-x $(d_bin)/$(PF)/lib/*.so + + $(STRIP) $$(file $(d_bin)/$(PF)/bin/* |awk -F: '$$0 !~ /script/ {print $$1}') + + ifeq ($(with_multiarch),yes) + $(STRIP) --strip-unneeded $(d_mul)/$(PF)/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_mul)/$(PF)/lib/libopcodes-*so + + chmod ugo-x $(d_mul)/$(PF)/lib/*.so + + $(STRIP) $$(file $(d_mul)/$(PF)/bin/* |awk -F: '$$0 !~ /script/ {print $$1}') + endif +endif + + : # 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 + if which help2man >/dev/null 2>&1; then \ + help2man $(d_bin)/$(PF)/bin/ld.gold > debian/ld.gold.1; \ + fi + 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 + + : # only keep the gold linker diversion to it's own package. + rm -fr $(d_gold) + $(install_dir) $(d_gold) + $(install_dir) $(d_gold)/$(PF)/bin + $(install_dir) $(d_gold)/$(PF)/share/man/man1 + ln -s ld.gold $(d_gold)/$(PF)/bin/ld + ln -s ld.gold.1.gz $(d_gold)/$(PF)/share/man/man1/ld.1.gz +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/ + + : # install libiberty PIC library + $(install_file) builddir-single/libiberty/pic/libiberty.a \ + $(d_dev)/$(PF)/lib/libiberty_pic.a + + touch install-stamp + +install-hppa64-stamp: checkroot build-hppa64-stamp + $(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 + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_hppa64)/$(PF)/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_hppa64)/$(PF)/lib/libopcodes-*so + $(STRIP) $$(file $(d_hppa64)/$(PF)/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + + chmod ugo-x $(d_hppa64)/$(PF)/lib/*.so + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu + + touch install-hppa64-stamp + +install-static-stamp: checkroot build-static-stamp + $(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 install-static-stamp + +install-spu-stamp: checkroot build-spu-stamp + $(checkdir) + + rm -fr $(d_spu) + $(install_dir) $(d_spu) + $(install_dir) $(d_spu)/$(PF)/lib + + : # install binutils-spu stuff + env MAKE="$(MAKE) VERSION=$(SPU_VERSION)" \ + $(MAKE) -C builddir-spu \ + CFLAGS="$(CFLAGS)" \ + prefix=$(pwd)/$(d_spu)/$(PF)/ \ + mandir=$(pwd)/$(d_spu)/$(PF)/share/man \ + infodir=$(pwd)/$(d_spu)/$(PF)/share/info install + + : # move shared libs to the standard path + mv $(d_spu)/$(PF)/$(DEB_HOST_GNU_TYPE)/spu-elf/lib/lib*-*.so \ + $(d_spu)/$(PF)/lib/. + + : # Now get rid of just about everything in binutils-spu + rm -rf $(d_spu)/$(PF)/man + rm -rf $(d_spu)/$(PF)/info + rm -rf $(d_spu)/$(PF)/include + rm -rf $(d_spu)/$(PF)/share + rm -rf $(d_spu)/$(PF)/$(DEB_HOST_GNU_TYPE) + rm -rf $(d_spu)/$(PF)/lib/libiberty.a + rm -rf $(d_spu)/$(PF)/lib/ldscripts + +ifeq ($(with_strip),yes) + : # Strip shared libraries + $(STRIP) --strip-unneeded $(d_spu)/$(PF)/lib/libbfd-*so + $(STRIP) --strip-unneeded $(d_spu)/$(PF)/lib/libopcodes-*so + $(STRIP) $$(file $(d_spu)/$(PF)/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') +endif + + chmod ugo-x $(d_spu)/$(PF)/lib/*.so + + : # Don't want /usr/-linux to exist in any package + rm -rf $(d_spu)/$(PF)/spu-elf + + touch install-spu-stamp + +################################################################################ + +####################### +# 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 + +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 -9 + gzip -9 $(d_doc)/$(PF)/share/info/* + + dpkg-gencontrol -isp -P$(d_doc) -p$(p_doc) + chown -R root:root $(d_doc) + chmod -R go=rX $(d_doc) + dpkg --build $(d_doc) .. + + $(install_dir) $(d_src)/$(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 -9 +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/ + tar -c --xz -C .. --exclude=CVS \ + -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 -isp -P$(d_src) -p$(p_src) + chown -R root:root $(d_src) + chmod -R go=rX $(d_src) + dpkg --build $(d_src) .. + +endif + +################################################################################ + +####################### +# binary-arch target # +####################### + +binary-arch: checkroot build install + $(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 + + sed "/^$$/ q" < debian/control.in > debian/control + sed -e "s/__TARGET__/$$(echo -n $(TARGET) | sed s/_/-/g)/" \ + < debian/control.cross.in >> debian/control + + $(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 -9f $(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 -isp -P$(d_cross) -p$(p_cross) + dpkg --build $(d_cross) .. + +else + cp debian/control.in debian/control + : # generate some control & helper files + nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; $$NF=$$NF+1; print }'); \ + for i in debian/*.in; do \ + case "$$i" in debian/control.cross.in) continue; 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' \ + $$i > $${i%*.in}; \ + done + + : # 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) +endif +ifeq ($(with_gold),yes) + $(install_file) -D debian/$(p_gold).overrides \ + $(d_gold)/$(PF)/share/lintian/overrides/$(p_gold) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_file) -D debian/$(p_spu).overrides \ + $(d_spu)/$(PF)/share/lintian/overrides/$(p_spu) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + $(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_gold),yes) + $(install_dir) $(d_gold)/DEBIAN + $(install_script) debian/binutils-gold.postrm $(d_gold)/DEBIAN/postrm + $(install_script) debian/binutils-gold.preinst $(d_gold)/DEBIAN/preinst +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_dir) $(d_spu)/DEBIAN + $(install_script) debian/binutils-spu.postinst $(d_spu)/DEBIAN/postinst + $(install_script) debian/binutils-spu.postrm $(d_spu)/DEBIAN/postrm + $(install_file) debian/binutils-spu.shlibs $(d_spu)/DEBIAN/shlibs +endif + +ifeq ($(DEB_HOST_ARCH),hppa) + $(install_dir) $(d_hppa64)/DEBIAN + $(install_script) debian/binutils-hppa64.postinst $(d_hppa64)/DEBIAN/postinst + $(install_script) debian/binutils-hppa64.postrm $(d_hppa64)/DEBIAN/postrm + $(install_file) debian/binutils-hppa64.shlibs $(d_hppa64)/DEBIAN/shlibs +endif + + : # 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)/ + + $(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) +endif +ifeq ($(with_gold),yes) + $(install_dir) $(d_gold)/$(PF)/share/doc/ + ln -sf $(p_bin) $(d_gold)/$(PF)/share/doc/$(p_gold) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_dir) $(d_spu)/$(PF)/share/doc/ + ln -sf $(p_bin) $(d_spu)/$(PF)/share/doc/$(p_spu) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + $(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) + $(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 -9 $(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 -9 + + : # Finish it all up + find $(d_bin) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_bin) -p$(p_bin) $(CONFLICTS) + + rm -f debian/substvars + dpkg-gencontrol -isp -P$(d_dev) -p$(p_dev) + +ifeq ($(with_multiarch),yes) + rm -f debian/substvars + find $(d_mul) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_mul) -p$(p_mul) +endif + +ifeq ($(with_gold),yes) + rm -f debian/substvars +# no binary +# find $(d_gold) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_gold) -p$(p_gold) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + rm -f debian/substvars + find $(d_spu) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_spu) -p$(p_spu) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + rm -f debian/substvars + find $(d_hppa64) -type f | xargs file | grep ELF | cut -d: -f 1 | xargs dpkg-shlibdeps + dpkg-gencontrol -isp -P$(d_hppa64) -p$(p_hppa64) +endif + + chown -R root:root $(d_bin) $(d_dev) + chmod -R go=rX $(d_bin) $(d_dev) + dpkg --build $(d_bin) .. + dpkg --build $(d_dev) .. +ifeq ($(with_multiarch),yes) + chown -R root:root $(d_mul) + chmod -R go=rX $(d_mul) + dpkg --build $(d_mul) .. +endif +ifeq ($(with_gold),yes) + chown -R root:root $(d_gold) + chmod -R go=rX $(d_gold) + dpkg --build $(d_gold) .. +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + chown -R root:root $(d_spu) + chmod -R go=rX $(d_spu) + dpkg --build $(d_spu) .. +endif +ifeq ($(DEB_HOST_ARCH),hppa) + chown -R root:root $(d_hppa64) + chmod -R go=rX $(d_hppa64) + dpkg --build $(d_hppa64) .. +endif + +endif # Process the following only if $(TARGET) is set +endif # ifndef BACKPORT +################################################################################ + +################# +# cross targets # +################# + + +# 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 + +# Process the following only if $(TARGET) is set +ifneq (,$(TARGET)) + +p_cross = $(subst _,-,binutils-$(TARGET)) +d_cross = debian/$(p_cross) + +ifneq ($(filter sparc-linux-gnu powerpc-linux-gnu mips-linux-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=$(TARGET:%-linux-gnu=%64-linux-gnu) +endif +ifneq ($(filter i386-linux-gnu i486-linux-gnu i586-linux-gnu i686-linux-gnu x86-linux-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=x86_64-linux-gnu +endif +ifneq ($(filter i386-kfreebsd-gnu i486-kfreebsd-gnu i586-kfreebsd-gnu x86-kfreebsd-gnu, $(TARGET)),) +ADDITIONAL_TARGETS = --enable-targets=x86_64-linux-gnu +endif +ifeq ($(TARGET), x86_64-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=i486-linux-gnu +endif +ifeq ($(TARGET), x86_64-kfreebsd-gnu) +ADDITIONAL_TARGETS = --enable-targets=i486-kfreebsd-gnu +endif +ifeq ($(TARGET), mipsel-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=mips64el-linux-gnu +endif +ifeq ($(TARGET), sparc64-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=sparc-linux-gnu +endif +ifeq ($(TARGET), s390-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=s390x-linux-gnu +endif +ifeq ($(TARGET), s390x-linux-gnu) +ADDITIONAL_TARGETS = --enable-targets=s390-linux-gnu +endif + +#----------------------------------------------------------------- +# sysroot options +ifdef WITH_SYSROOT + with_sysroot = $(WITH_SYSROOT) +endif +ifdef WITH_BUILD_SYSROOT + with_build_sysroot = $(WITH_BUILD_SYSROOT) +endif + +CROSS_CONFARGS := $(ADDITIONAL_TARGETS) $(CONFARGS) +ifneq ($(with_sysroot),) + CROSS_CONFARGS += --with-sysroot=$(with_sysroot) +endif +ifneq ($(with_build_sysroot),) + CROSS_CONFARGS += --with-build-sysroot=$(with_build_sysroot) +endif +ifeq ($(with_gold),yes) + CROSS_CONFARGS += --enable-ld=default --enable-gold +endif + +configure-cross-stamp: patch-stamp + $(checkdir) + test "" != "$(TARGET)" + rm -rf configure-cross-stamp builddir-$(TARGET) + mkdir builddir-$(TARGET) + cd builddir-$(TARGET) \ + && env CC="$(CC)" CXX="$(CXX)" ../configure --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) --target=$(TARGET) --prefix=/$(PF) \ + $(CROSS_CONFARGS) + touch $@ + +build-cross-stamp: configure-cross-stamp + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + touch $@ + +install-cross-stamp: build-cross-stamp + $(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 +ifeq ($(with_strip),yes) + $(STRIP) $$(file $(d_cross)/$(PF)/bin/* | awk -F: '$$0 !~ /script/ {print $$1}') + + chmod ugo-x $(d_cross)/$(PF)/$(DEB_HOST_GNU_TYPE)/$(TARGET)/lib/*.so +endif + gzip -9 $(d_cross)/$(PF)/share/man/man1/* + touch $@ + +configure-host-cross-stamp: configure-cross-stamp + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) configure-host -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + touch $@ + +build-static-cross-stamp: configure-host-cross-stamp + $(checkdir) + test "" != "$(TARGET)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" LDFLAGS="-all-static" + touch $@ + +install-static-cross-stamp: build-static-cross-stamp install-cross-stamp + +binary-cross: + @echo "Please use dpkg-buildpackage instead of calling binary-cross directly; see README.cross" + @false + +endif + +################################################################################ + +define checkdir + test -f bfd/elf32.c -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- binutils-2.21.51.20110421.orig/debian/binutils-hppa64.postinst +++ binutils-2.21.51.20110421/debian/binutils-hppa64.postinst @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/README.source +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/binutils-multiarch.shlibs.in +++ binutils-2.21.51.20110421/debian/binutils-multiarch.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-multiarch@DATE_EXT@ binutils-multiarch +libopcodes @VER@-multiarch@DATE_EXT@ binutils-multiarch --- binutils-2.21.51.20110421.orig/debian/binutils.postrm +++ binutils-2.21.51.20110421/debian/binutils.postrm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +if [ "$1" = "remove" ]; then + ldconfig +fi --- binutils-2.21.51.20110421.orig/debian/binutils-hppa64.shlibs.in +++ binutils-2.21.51.20110421/debian/binutils-hppa64.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-hppa64@DATE_EXT@ binutils-hppa64 +libopcodes @VER@-hppa64@DATE_EXT@ binutils-hppa64 --- binutils-2.21.51.20110421.orig/debian/control +++ binutils-2.21.51.20110421/debian/control @@ -0,0 +1,107 @@ +Source: binutils +Section: devel +Priority: optional +Maintainer: Matthias Klose +Uploaders: James Troup , Daniel Jacobowitz +Standards-Version: 3.9.1 +Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.64), bison, flex, gettext, texinfo, dejagnu (>= 1.4.2-1.1), quilt, file, xz-utils, lsb-release, zlib1g-dev +Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.21-debian +Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.21-debian + +Package: binutils +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, binutils-gold (<< 2.20.51.20100415) +Replaces: binutils-gold (<< 2.20.51.20100415) +Provides: elf-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + +Package: binutils-dev +Architecture: any +Priority: extra +Depends: binutils (= ${binary:Version}) +Conflicts: libbfd-dev +Provides: libbfd-dev +Replaces: libbfd-dev, libc5-dev +Description: The GNU binary utilities (BFD development files) + This package includes header files and static libraries necessary to build + programs which use the GNU BFD library, which is part of binutils. Note + that building Debian packages which depend on the shared libbfd is Not + Allowed. + +Package: binutils-multiarch +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Provides: multiarch-binutils +Description: Binary utilities that support multi-arch targets + The programs in this package are used to manipulate binary and object + files that may have been created on other architectures. This package + is primarily for multi-architecture developers and cross-compilers and + is not needed by normal users or developers. Note that a cross-assembling + version of gas is not included in this package, just the binary utilities. + NORMAL USERS SHOULD NOT INSTALL THIS PACKAGE. It's meant only for those + requiring support for reading info from binaries from other architectures. + +Package: binutils-gold +Architecture: amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 +Priority: extra +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Description: The (experimental) GNU gold linker utility + Gold is a new linker, still in development, which is faster than the + current linker included in binutils. It currently fails to link some + applications and libraries (i.e. won't link usable kernels). + . + This package diverts the GNU linker (ld) with the experimental gold + linker. + +Package: binutils-hppa64 +Architecture: any +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for hppa64-linux + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build an 64-bit kernel for 64-bit hppa machines. + +Package: binutils-spu +Architecture: powerpc ppc64 +Depends: ${shlibs:Depends}, binutils (= ${binary:Version}) +Recommends: libc6-dev +Conflicts: spu-binutils +Replaces: spu-binutils +Provides: spu-binutils +Suggests: binutils-doc (>= ${source:Version}) +Description: The GNU assembler, linker and binary utilities targeted for spu-elf + The programs in this package are used to assemble, link and manipulate + binary and object files. They may be used in conjunction with a compiler + and various libraries to build programs. + . + This package is needed to build programs for Cell Broadband Engine SPU + processors. + +Package: binutils-doc +Section: doc +Architecture: all +Priority: optional +Depends: dpkg (>= 1.15.4) | install-info +Conflicts: binutils (<< 2.9.1.0.25-3) +Suggests: binutils (= ${binary:Version}) +Description: Documentation for the GNU assembler, linker and binary utilities + This package consists of the documentation for the GNU assembler, + linker and binary utilities in info format. + +Package: binutils-source +Architecture: all +Priority: optional +Depends: texinfo, zlib1g-dev, make, python +Description: The GNU assembler, linker and binary utilities (source) + This package contains the sources and patches which are needed to + build binutils. --- binutils-2.21.51.20110421.orig/debian/binutils-spu.shlibs.in +++ binutils-2.21.51.20110421/debian/binutils-spu.shlibs.in @@ -0,0 +1,2 @@ +libbfd @VER@-spu@DATE_EXT@ binutils-spu +libopcodes @VER@-spu@DATE_EXT@ binutils-spu --- binutils-2.21.51.20110421.orig/debian/binutils-spu.overrides +++ binutils-2.21.51.20110421/debian/binutils-spu.overrides @@ -0,0 +1,8 @@ +# don't warn about missing man pages for diverted binaries +binutils-spu binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-spu binary: package-name-doesnt-match-sonames + +# it's a cross toolchain +binutils-spu binary: binary-or-shlib-defines-rpath --- binutils-2.21.51.20110421.orig/debian/binutils-multiarch.postinst +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/binutils-multiarch.prerm.in +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/copyright +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/binutils-gold.overrides +++ binutils-2.21.51.20110421/debian/binutils-gold.overrides @@ -0,0 +1,5 @@ +# don't warn about missing man pages for diverted binaries +binutils-gold binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-multiarch binary: package-name-doesnt-match-sonames --- binutils-2.21.51.20110421.orig/debian/binutils-hppa64.overrides +++ binutils-2.21.51.20110421/debian/binutils-hppa64.overrides @@ -0,0 +1,8 @@ +# don't warn about missing man pages for diverted binaries +binutils-hppa64 binary: binary-without-manpage + +# the API of the shared libs is not public, don't care about the name +binutils-hppa64 binary: package-name-doesnt-match-sonames + +# it's a cross toolchain +binutils-hppa64 binary: binary-or-shlib-defines-rpath --- binutils-2.21.51.20110421.orig/debian/binutils-gold.preinst +++ binutils-2.21.51.20110421/debian/binutils-gold.preinst @@ -0,0 +1,25 @@ +#! /bin/sh + +set -e + +if [ install = "$1" -o upgrade = "$1" ]; then + if [ -n "$2" ] && dpkg --compare-versions $2 lt 2.20-3; then + case "$(dpkg-divert --list /usr/bin/ld)" in + *ld.single*) + rm -f /usr/bin/ld + dpkg-divert \ + --package binutils-gold \ + --remove --rename \ + --divert /usr/bin/ld.single /usr/bin/ld + esac + fi + + dpkg-divert \ + --package binutils-gold \ + --add --rename \ + --divert /usr/bin/ld.bfd-link /usr/bin/ld + dpkg-divert \ + --package binutils-gold \ + --add --rename \ + --divert /usr/share/man/man1/ld.bfd-link.1.gz /usr/share/man/man1/ld.1.gz +fi --- binutils-2.21.51.20110421.orig/debian/control.cross.in +++ binutils-2.21.51.20110421/debian/control.cross.in @@ -0,0 +1,11 @@ +Package: binutils-__TARGET__ +Architecture: any +Depends: binutils, ${shlibs:Depends} +Suggests: binutils-doc (= ${Source-Version}) +Priority: extra +Description: The GNU binary utilities, for __TARGET__ target + This package provides GNU assembler, linker and binary utilities + for __TARGET__ target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for __TARGET__. --- binutils-2.21.51.20110421.orig/debian/binutils.shlibs.in +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/changelog +++ binutils-2.21.51.20110421/debian/changelog @@ -0,0 +1,3380 @@ +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.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.51.20110409-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20110409. + + -- Matthias Klose Sat, 09 Apr 2011 13:53:24 +0200 + +binutils (2.21.51.20110403-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20110403. + + -- Matthias Klose Sun, 03 Apr 2011 23:54:13 +0200 + +binutils (2.21.0.20110327-3) unstable; urgency=high + + * Fix architecture field for binutils-gold (powerpcspe). + * Add support for arm-*-gnueabihf targets. Closes: #621029. + * Fix PR ld/12654: Properly handle R_386_TLS_LDO_32 for PIE. LP: #663294. + * Fix PR ld/12637, reloc overflow for R_MIPS_TLS_LDM (Richard Sandiford), + taken from the trunk. + + -- Matthias Klose Sun, 10 Apr 2011 17:23:40 +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-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-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-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-1) experimental; urgency=low + + * Update from the 2.21 branch. + + -- Matthias Klose Wed, 16 Feb 2011 15:54:15 +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-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-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-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-1) experimental; urgency=low + + * Update from the binutils 2.21 release branch. + + -- Matthias Klose Sun, 21 Nov 2010 14:03:14 +0100 + +binutils (2.20.90.20101105-2) experimental; urgency=low + + * binutils 2.21 prerelease 1. + + -- Matthias Klose Wed, 10 Nov 2010 01:04:59 +0100 + +binutils (2.20.51.20101028-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20101028. + + -- Matthias Klose Thu, 28 Oct 2010 16:57:11 +0200 + +binutils (2.20.51.20101009-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20101009. + + -- Matthias Klose Sat, 09 Oct 2010 14:41:08 +0200 + +binutils (2.20.51.20100925-2) experimental; urgency=low + + * Allow ar scripts to contain ~ in the filename (Zygmunt Krynicki, taken + from Linaro). LP: #641488. + + -- Matthias Klose Thu, 30 Sep 2010 10:20:41 +0200 + +binutils (2.20.51.20100925-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100925. + * Fix PR ld/10144, mips/ld: non-dynamic relocations refer to dynamic symbol + Closes: #519006. + + -- Matthias Klose Sat, 25 Sep 2010 16:24:20 +0200 + +binutils (2.20.51.20100908-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100908. + * 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. + * Build binutils-hppa64 in cross builds (Al Viro). Closes: #595319. + * Fix some lintian warnings. + + -- Matthias Klose Wed, 08 Sep 2010 16:31:47 +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-2) experimental; urgency=medium + + * Don't use configury for cross builds for native builds. LP: #604134. + + -- Matthias Klose Sun, 11 Jul 2010 10:24:28 +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-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20100617. + * Merge 'binary-cross' target into 'binary' one (Marcin Juszkiewicz). + * debian/copyright: Update to GFDL 1.3. + + -- Matthias Klose Thu, 17 Jun 2010 15:20:34 +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. + + -- Matthias Klose Thu, 27 May 2010 10:40:48 +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-2) experimental; urgency=low + + * Add upper dependency + + -- Matthias Klose Sun, 18 Apr 2010 20:52:41 +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.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-11) unstable; urgency=medium + + * Fix PR gold/10893, IFUNC support for gold backported from the trunk + (Aurelian Jarno). Closes: #585051. + + -- Matthias Klose Mon, 14 Jun 2010 07:17:13 +0200 + +binutils (2.20.1-10) unstable; urgency=low + + * Drop build dependency on expect-tcl8.3. Closes: #472964. + + -- Matthias Klose Sun, 30 May 2010 12:23:46 +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-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-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-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-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-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-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-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-3) unstable; urgency=low + + * Apply updates from the 2.20 branch up to 20091108: + - Fix PR gold/10876 (closes: #553435), PR gold/10910, PR gold/10860, + PR gold/10880 (closes: #553512, #553436), PR gold/10887, + PR gold/10893, PR gold/10895 (thanks to Peter Fritzsche for tracking + the gold reports). + * Fix libiberty build failure on sh4 (Nobuhiro Iwamatsu). Closes: #550810. + * PR ld/10858: Fix pie on mips/mipsel. Closes: #526961. + * Ignore regressions on sparc; the proper fix is to fix the testcases + for v9. + * Remove the conflict between binutils-multiarch and binutils-gold. + Closes: #521106. + + -- Matthias Klose Tue, 10 Nov 2009 02:15:41 +0100 + +binutils (2.20-2) unstable; urgency=high + + * Apply updates from the 2.20 branch up to 20091028: + - Fix PR binutils/10802, PR binutils/10793, PR binutils/10792, + PR gas/10856. + - Remove local patches now in the branch. + * Ignore regressions on armel when building with gcc-4.4; the proper fix + is to build the testcases using -fno-section-anchors. + + -- Matthias Klose Thu, 29 Oct 2009 22:17:42 +0100 + +binutils (2.20-1) unstable; urgency=low + + * binutils 2.20 final release. + - Fix PR binutils/10785, memory corruptions. + - PR ld/10749, ia64 linker failure. + - PR gas/2117, ia64 assembler fix. + - gold updates. + * Configure with --enable-plugins. Closes: #550088. + * debian/test-suite-compare.py: Don't count untested test cases as + regressions. + * binutils-gold: Install /usr/lib/compat-ld/ld to point to the + old linker. To use the old linker when gold is installed, use + gcc -B/usr/lib/compat-ld/ (including the trailing slash). + + -- Matthias Klose Sat, 17 Oct 2009 12:22:30 +0200 + +binutils (2.19.91.20091006-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20091006. + - cfi_sections changes applied. + * debian/*.shlibs: Update to the version from the branch. + * binutils-gold: Build the testsuite as part of the check target + instead of the build target to avoid build failures when the + installed binutils soname is the same as the one which is built + (gas is segfaulting). Just a workaround, not a solution. + * Add 150_gold_copyrelocs.dpatch, add -z copyrelocs option for gold. + * binutils-source: Depend on texinfo, zlib1g-dev. + + -- Matthias Klose Tue, 06 Oct 2009 22:13:24 +0200 + +binutils (2.19.91.20091003-1) unstable; urgency=medium + + * Snapshot, taken from the 2.20 release branch 20091003. + - Fix PR ld/9863, regression in testsuite on armel. + - Fix regressions seen in the GCC/libjava testsuite. + * debian/*.shlibs: Update to the version from the branch. + * No need to build libiberty_pic.a twice. + + -- Matthias Klose Sat, 03 Oct 2009 14:59:14 +0200 + +binutils (2.19.91.20090927-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090927. + * debian/*.shlibs: Update to the version from the branch. + * On mips/mipsel disabled -pie/--pie-executable. Still broken, + see #526961. Add an option --force-pie on mips/mipsel only + for testing purposes. + Change requested by debian-release (Andreas Barth). + + -- Matthias Klose Sun, 27 Sep 2009 11:56:06 +0200 + +binutils (2.19.91.20090923-1) unstable; urgency=medium + + * Snapshot, taken from the 2.20 release branch 20090923 (last upload + was taken from the trunk).. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Wed, 23 Sep 2009 09:50:04 +0200 + +binutils (2.19.91.20090922-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090922. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Tue, 22 Sep 2009 19:36:50 +0200 + +binutils (2.19.91.20090910-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090910, corresponding + to the 2.19.90 upstream snapshot. + * Fix Thumb-2 shared libraries (Daniel Jacobowitz), patch taken + from the trunk. + + -- Matthias Klose Thu, 10 Sep 2009 17:05:30 +0200 + +binutils (2.19.90.20090909-1) unstable; urgency=low + + * Snapshot, taken from the 2.20 release branch 20090909. + * debian/*.shlibs: Update to the version from the branch. + * Disable build failure for regressions on mips/mipsel. + + -- Matthias Klose Wed, 09 Sep 2009 09:50:36 +0200 + +binutils (2.19.51.20090827-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090827. + - Fix PR ld/10518: In linker scripts override a "*" match by any other + wildcard match. Closes: #540751. + * debian/*.shlibs: Update to the version from the trunk. Closes: #540800. + * Add sysroot support for cross builds (Hector Oron). Closes: #522480. + * Update long description of binutils-doc. Closes: #428764. + * Tighten build dependency on autoconf. + * Fix some lintian warnings. + + -- Matthias Klose Thu, 27 Aug 2009 17:09:28 +0200 + +binutils (2.19.51.20090805-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090805. + - Fix PR binutils/10364, strip not failing on unwritable files. + Closes: #276428. + - Fix PR binutils/10363, objdump -T crashing on corrupted file. + Closes: #487963. + * 129_cortex_a8.dpatch: Fix a couple of cortex-a8 erratum bugs. + + -- Matthias Klose Wed, 05 Aug 2009 10:24:40 +0200 + +binutils (2.19.51.20090723-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090723. + * debian/*.shlibs: Update to the version from the trunk. + * Undo the reversion in the last upload, use the upstream fix instead. + + -- Matthias Klose Thu, 23 Jul 2009 09:39:50 +0200 + +binutils (2.19.51.20090722-2) unstable; urgency=low + + * Apply build-id patch to avoid memory corruption (taken from Fedora). + * Revert ld/ldlang.c rev 1.312. Closes: #537389. + + -- Matthias Klose Wed, 22 Jul 2009 19:19:30 +0200 + +binutils (2.19.51.20090722-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090722. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Wed, 22 Jul 2009 16:51:11 +0200 + +binutils (2.19.51.20090714-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090714. + * debian/*.shlibs: Update to the version from the trunk. + * Install a libiberty compiled with -fPIC as libiberty_pic.a. + Closes: #530888. + * Remove obsolete README.Debian. Closes: #324260. + * binutils-dev: Include demangle.h. Closes: #134985. + + -- Matthias Klose Tue, 14 Jul 2009 13:13:37 -0400 + +binutils (2.19.51.20090704-1) unstable; urgency=low + + * Snapshot, taken from the trunk 20090704. + - debian/patches/128_arm_eabi_auto_it.dpatch: Remove, applied upstream. + * debian/*.shlibs: Update to the version from the trunk. + * Bump standards version. + + -- Matthias Klose Sat, 04 Jul 2009 10:37:18 +0200 + +binutils (2.19.51.20090613-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090613. + * debian/*.shlibs: Update to the version from the trunk. + * Build binutils-gold on armel. + * Apply proposed patch for new option for automatically generating IT blocks. + + -- Matthias Klose Sat, 13 Jun 2009 14:39:41 +0000 + +binutils (2.19.51.20090508-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090508. + - Fix PR binutils/9743, relocation issues on arm. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 08 May 2009 11:08:14 +0200 + +binutils (2.19.51.20090419-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090419. + * debian/*.shlibs: Update to the version from the trunk. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Update. + + -- Matthias Klose Sun, 19 Apr 2009 22:12:19 +0200 + +binutils (2.19.51.20090315-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20090315. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Sun, 15 Mar 2009 11:38:58 +0100 + +binutils (2.19.1-1) unstable; urgency=low + + * Upload to unstable. + * binutils-source: Make .dpatch files executable. + + -- Matthias Klose Sun, 15 Feb 2009 22:46:34 +0100 + +binutils (2.19.1-1~exp1) experimental; urgency=low + + * Binutils 2.19.1 release. + * debian/*.shlibs: Update to the release version. + + -- Matthias Klose Wed, 04 Feb 2009 09:57:55 +0100 + +binutils (2.19.0.20090110-1~exp1) experimental; urgency=low + + * Update to the binutils-2_19-branch 20090110. + - Fix PR binutils/7011. LP: #254790. + * debian/*.shlibs: Update to the version from the branch. + + -- Matthias Klose Sat, 10 Jan 2009 13:56:09 +0100 + +binutils (2.19-1~exp2) experimental; urgency=low + + * debian/patches/129_scale-DW_CFA_advance_loc.dpatch: Scale + DW_CFA_advance_loc[124] output values. + * debian/patches/128_arm_relocs_against_weak.dpatch: Fix R_ARM_THM_CALL + relocations against undefined weak symbols in shared libraries. + + -- Matthias Klose Sun, 30 Nov 2008 13:22:11 +0100 + +binutils (2.19-1~exp1) experimental; urgency=low + + * Binutils 2.19 release. + * debian/*.shlibs: Update to the release version. + * Build binutils-gold on powerpc. + * debian/control: Update to GPL3, reference the GFDL. + * Fail the build if the testsuite shows regressions compared to the + last (installed) build. + * Make lintian more happy. + + -- Matthias Klose Sun, 26 Oct 2008 13:06:27 +0200 + +binutils (2.18.93.20081009-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20081009 (corresponding to the + 2.18.93 upstream snapshot. + * debian/*.shlibs: Update to the version from the branch. + * Add build dependency on zlib1g-dev. + * In gprof(1), remove references to monitor(3) and profil(2). + Closes: #293948. + + -- Matthias Klose Sat, 11 Oct 2008 16:45:35 +0000 + +binutils (2.18.92.20081003-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20081003. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 03 Oct 2008 11:29:16 +0000 + +binutils (2.18.90.20080910-1) experimental; urgency=low + + * Snapshot, taken from the 2.19 branch 20080910. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Fri, 12 Sep 2008 19:23:07 +0200 + +binutils (2.18.50.20080803-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080803. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Mon, 04 Aug 2008 00:53:47 +0200 + +binutils (2.18.50.20080707-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080707. + * debian/*.shlibs: Update to the version from the trunk. + * include/safe-ctype.h: Add #include of ctype.h before redefining + the ctype.h macros (proposed for the trunk). + * Add Daniel Jacobowitz as uploader. + + -- Matthias Klose Mon, 07 Jul 2008 01:08:13 +0200 + +binutils (2.18.50.20080610-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080610. + * debian/*.shlibs: Update to the version from the trunk. + + -- Matthias Klose Tue, 10 Jun 2008 16:21:02 +0200 + +binutils (2.18.50.20080530-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080530. + * Switch maintainer and uploader. + * debian/rules: Explicitely set SHELL to /bin/bash, build-depend on bash. + * debian/rules: Fix setting of TARGET for cross builds. + + -- Matthias Klose Fri, 30 May 2008 23:49:40 +0200 + +binutils (2.18.50.20080507-1) experimental; urgency=low + + * Snapshot, taken from the trunk 20080507. + * Remove patches applied upstream: 304_pr4476.dpatch, 305_arm-dis.dpatch, + 306_pr4453.dpatch, 307_ld-pic.dpatch, 308_mips-pic.dpatch. + * debian/patches/013_bash_in_ld_testsuite.dpatch: Use bash in the ld + testsuite (some tests have bashisms). + * debian/*.shlibs: Update to the version from the trunk. + * On amd64, i386 and sparc, build a binutils-gold package, + diverting /usr/bin/ld. + * Use expect instead of expect-tcl8.3 on all architectures except hppa. + * Remove binutils and gcc build dependencies (versions are in oldstable). + + -- Matthias Klose Thu, 08 May 2008 00:56:30 +0200 + +binutils (2.18.1~cvs20080103-4) unstable; urgency=medium + + * debian/rules: Remove libiberty in /usr/lib64; workaround for + `gcc -print-multi-os-directory' printing the symlink. + Closes: #473665, #473591. + * Don't include development files in binutils-spu. + * Fix binutils-spu build on ppc64 (Andreas Jochens). Closes: #474116. + * Build libiberty with -fPIC on mips/mipsel (Aurelian Jarno). + + -- Matthias Klose Sat, 05 Apr 2008 11:21:08 +0200 + +binutils (2.18.1~cvs20080103-3) unstable; urgency=low + + [ Arthur Loiret ] + * Build a binutils for spu-elf target on powerpc and ppc64. + - debian/control: Add a binutils-spu package. + - debian/binutils-spu.{postinst,postrm,shlibs}: Add. + * Add sh64-linux-gnu to multiarch targets. + * Fix cross-compilation support. + * Make lintian happier: + - Use ${source:Version}, ${binary:Version} variables. + - Remove -1 from Build-Depends revisions. + - Bump Standards-Version to 3.7.3. + + [ Matthias Klose ] + * Keep the spu elfscripts in bintutils, remove them from binutils-spu. + * debian/patches/307_ld-pic.dpatch: Fix failing ld-shared tests when built + with gcc-4.3. + + -- Matthias Klose Sat, 29 Mar 2008 20:32:35 +0100 + +binutils (2.18.1~cvs20080103-2) unstable; urgency=low + + * debian/patches/306_pr4453.dpatch: Fix PR binutils/4453, taken from + the trunk (Aurelian Jarno). Closes: #363423. + + -- Matthias Klose Fri, 21 Mar 2008 20:49:17 +0100 + +binutils (2.18.1~cvs20080103-1) unstable; urgency=low + + * Update to 20080103 from the binutils-2_18-branch. + - Set version number to 2.18.0 (smaller than the one from the trunk). + - Fix PR ld/5398. Closes: #452725. + * debian/*.shlibs: Update to version from the branch. + * debian/patches/305_arm-dis.dpatch: Fix segfault when disassembling ARM + code. Closes: #438956. + * Support kfreebsd-amd64-gnu and i486-kfreebsd-gnu (Aurilian Jarno): + - debian/patches/127_x86_64_i386_biarch.dpatch: Extend for kfreebsd. + - debian/rules: biarch enabled binutils for kfreebsd-{amd64,i486}-gnu, + kfreebsd-{amd64,i486}-gnu support for cross-builds, + kfreebsd-{amd64,i486}-gnu enabled for binutils-multiarch. + - Closes: #380373. + + -- Matthias Klose Thu, 03 Jan 2008 21:57:51 +0100 + +binutils (2.18.1~cvs20071027-2) unstable; urgency=low + + * Do not include static libraries in the multiarch package. + * Don't include /usr/lib64 in cross packages. Closes: #450429. + + -- Matthias Klose Sat, 24 Nov 2007 12:13:22 +0100 + +binutils (2.18.1~cvs20071027-1) unstable; urgency=low + + * Update to 20071027 from the binutils-2_18-branch. + - Fix PR ld/4988, assertion failures in ld. Closes: #440015. + * debian/*.shlibs: Update to version from the branch. + + -- Matthias Klose Sat, 27 Oct 2007 17:55:41 +0200 + +binutils (2.18-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream release. + - Remove patches applied upstream: 100_warning_arm, 400_gcc42_fix, + 401_builddoc. + * debian/*.shlibs: Update to release version. + + -- Matthias Klose Wed, 29 Aug 2007 01:07:31 +0200 + +binutils (2.18~cvs20070812-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot, taken from the binutils-2_18-branch. + * debian/rules: Support parallel= with comma separated keywords + in DEB_BUILD_OPTIONS. + * debian/rules (clean): Remove stamp files. + * debian/*.shlibs: Update to snapshot version. + * debian/patches/401_builddoc.dpatch: Fix doc build failure on the branch. + + -- Matthias Klose Sun, 12 Aug 2007 10:56:18 +0200 + +binutils (2.17cvs20070804-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - PR binutils/4888, fixes objcopy --only-keep-debug. Closes: #435444. + * debian/rules: Support parallel= in DEB_BUILD_OPTIONS (see #209008). + * debian/*.shlibs: Update to snapshot version. + + -- Matthias Klose Sat, 04 Aug 2007 12:45:07 +0200 + +binutils (2.17cvs20070801-1) unstable; urgency=medium + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Fixes objcopy --only-keep-debug on amd64. Closes: #435444. + * binutils-multiarch: Enable the armel-linux-gnu target. Closes: #408805. + + -- Matthias Klose Wed, 01 Aug 2007 18:24:51 +0200 + +binutils (2.17cvs20070718-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Fix build failure on m68k. + * debian/patches/400_gcc42_fix.dpatch: Fix build failure with gcc-4.2. + Closes: #433062. + * Fix cross build failure while stripping binaries. Closes: #432907. + + -- Matthias Klose Wed, 18 Jul 2007 20:25:03 +0200 + +binutils (2.17cvs20070713-1) unstable; urgency=low + + [ Matthias Klose ] + * New upstream CVS snapshot. + - Remove patches applied upstream: 301_pr4436.dpatch, 302_pr4448.dpatch, + 303_pr4454.dpatch, 305_pr4497.dpatch, 306_ld_demangler_segfault.dpatch, + 307_pr4558.dpatch. + - Fix build failure with gcc-4.2. Closes: #429738. + - Fix kernel build with grsecurity patch. Closes: #430041. + * debian/copyright: Include GPL-3. + * debian/rules: Fix version extraction. + * debian/rules: Honor `noopt' in DEB_BUILD_OPTIONS. + + -- Matthias Klose Fri, 13 Jul 2007 14:45:21 +0200 + +binutils (2.17cvs20070426-8) unstable; urgency=low + + * Fix PR gas/4558. + * debian/rules: Add empty NJOBS macro. + + -- Matthias Klose Mon, 28 May 2007 09:06:35 +0000 + +binutils (2.17cvs20070426-7) unstable; urgency=low + + * 306_ld_demangler_segfault.dpatch: new CVS patch from Alan Modra to fix + segfaults in ld seen when building, e.g. openipmi. + + * debian/copyright: update source location and copyright years. + * debian/rules: idem. + + -- James Troup Wed, 23 May 2007 02:19:09 +0100 + +binutils (2.17cvs20070426-6) unstable; urgency=low + + * Fix PR ld/4497, regression introduced with the fix for PR ld/4454. + Closes: #423496. + * Fix binutils/4476, readelf support for --hash-style=gnu. Closes: #421790. + + -- Matthias Klose Mon, 14 May 2007 10:51:40 +0200 + +binutils (2.17cvs20070426-5) unstable; urgency=low + + * Fix PR ld/4454. + + -- Matthias Klose Sun, 06 May 2007 09:50:29 +0200 + +binutils (2.17cvs20070426-4) unstable; urgency=low + + * Fix PR gas/4448, overstrict check for powerpc lswi. Closes: #421799. + + -- Matthias Klose Wed, 2 May 2007 18:26:03 +0200 + +binutils (2.17cvs20070426-3) unstable; urgency=low + + * Update debian/*.shlibs files. Closes: #421454. + * Fix PR gas/4436, wrong reject in powerpc opcode table checks. + Closes: #421455. + * Fix build failure on arm (Aurelian Jarno). Closes: #421365. + * Compare testsuite results of the installed binutils with the built one. + + -- Matthias Klose Mon, 30 Apr 2007 07:47:09 +0200 + +binutils (2.17cvs20070426-2) unstable; urgency=low + + * Fix typo preparing the binutils-hppa64 package. + + -- Matthias Klose Fri, 27 Apr 2007 08:06:49 +0200 + +binutils (2.17cvs20070426-1) unstable; urgency=low + + [ James Troup ] + * New upstream CVS snapshot. + * debian/test-suite-compare.py: simplistic comparator for binutils test + suite runs. + + [ Matthias Klose ] + * Merge changes from the experimental uploads: + * debian/patches/121_i386_x86_64_biarch.dpatch: Remove, applied upstream. + * Build a binutils-source package (containing the patched sources). + * Check for a working expect before building the package. + * Configure the multiarch build for x86_64-linux-gnu instead of + x86_64-linux. + * debian/rules: Don't strip binaries if nostrip is in DEB_BUILD_OPTIONS. + * debian/rules: Don't try to strip shell scripts. + * Configure --with-pkgversion to include the distribution name. + * debian/patches/000_print_debian_version.dpatch: Remove. + * debian/control: Build-depend on lsb-release. + * Enable spu target in powerpc and binutils-multiarch build. + * Don't include embedspu in binutils-multiarch on powerpc. + * debian/control: Set priority for source package to optional. + + -- James Troup Fri, 27 Apr 2007 01:29:57 +0100 + +binutils (2.17-3) unstable; urgency=low + + * debian/rules (configure-multi-stamp): drop i486-kfreebsd-gnu again as + it breaks objdump for i386 on amd64. Closes: #380539 + + -- James Troup Tue, 3 Oct 2006 00:53:17 +0100 + +binutils (2.17-2) unstable; urgency=low + + * The "Laisse le Wookie gagner" release. + + * 127_x86_64_i386_biarch.dpatch: new patch from Aurelien Jarno + to add (/usr)/lib32 to the search paths on + amd64. Closes: #369052 + + * debian/rules (configure-multi-stamp): add i486-kfreebsd-gnu at request + of Aurelien Jarno. Closes: #315306 + + -- James Troup Wed, 26 Jul 2006 20:33:13 +0100 + +binutils (2.17-1) unstable; urgency=low + + * New upstream release. + * 120_mips_xgot_multigot_workaround.dpatch: removed - superseded by a + proper fix upstream. Closes: #274738 + * debian/binutils.shlibs, debian/binutils-multiarch.shlibs, + debian/binutils-hppa64.shlibs: updated SONAME to 2.17. + + -- James Troup Mon, 26 Jun 2006 13:17:36 +0100 + +binutils (2.16.1cvs20060507-1) unstable; urgency=low + + * New upstream CVS snapshot of 'binutils-2_17-branch'. + + * debian/control (Standards-Version): bump to 3.7.2.0. + + -- James Troup Sun, 7 May 2006 19:57:08 +0100 + +binutils (2.16.1cvs20060413-1) unstable; urgency=low + + * New upstream CVS snapshot. + * 120_mips_xgot_multigot_workaround.dpatch: updated to work with CVS + r1.163 of bfd/elfxx-mips.c, pass 'info' instead of 'output_bfd' to + MIPS_ELF_GOT_MAX_SIZE(). + + * Patch from NIIBE Yutaka in #280884: + * debian/rules (configure-multi-stamp): Support m32r-linux. Closes: + #340264 + * debian/rules: Run 'make check' only if build == host. + + * debian/rules: Also don't run 'make check' if nocheck is in + DEB_BUILD_OPTIONS. Based on a patch from Michael Banck + . Closes: #315290 + + * Integrate most of a patch to build arbitrary binutils-$TARGET + cross-packages from #231707. Thanks to Nikita V. Youshchenko + and Josh Triplett . + + * debian/copyright: update to include GFDL. Closes: #81950 + * debian/copyright: update FSF address. + + * debian/rules: move non-architecture specific conflicts (gas, + elf-binutils, modutils (<< 2.4.19-1)) out of a substitued variable and + into the control file. Rename variable to extraConflicts. + * debian/control: likewise. + + -- James Troup Sat, 15 Apr 2006 03:05:41 +0100 + +binutils (2.16.1cvs20060117-1) unstable; urgency=low + + * New upstream CVS snapshot. + + * 118_arm_pass_all.dpatch, 125_fix_tc_arm_cast.dpatch: merged upstream - + removed. + + -- James Troup Wed, 18 Jan 2006 02:25:25 +0000 + +binutils (2.16.1cvs20051214-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fix ld segfaults on ia64. Closes: #342777 + + * 126_fix_PROVIDE_HIDDEN.dpatch: merged upstream - removed. + + -- James Troup Wed, 14 Dec 2005 08:06:37 +0000 + +binutils (2.16.1cvs20051206-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes linking of qemu. Closes: #340328 + + * 126_fix_PROVIDE_HIDDEN.dpatch: new patch from Thiemo Seufer to fix + handling of hidden symbols which were provided by a linker + script. Closes: #342307 + + * debian/control (Standards-Version): updated to 3.6.2.1. + + -- James Troup Sat, 10 Dec 2005 05:23:34 +0000 + +binutils (2.16.1cvs20051117-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes c++filt's flushing of stdout which broke gcj. Closes: #339287 + + * debian/control (Build-Depends): switch from expect to expect-tcl8.3 + since tcl8.4's broken threading causes the testsuite to fail entirely + on hppa. Closes: #339509 + + -- James Troup Thu, 17 Nov 2005 13:15:15 +0000 + +binutils (2.16.1cvs20051109-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes broken PLT handling on m68k. Closes: #327780 + * Don't compile flex files with -Werror, fixing mips builds. + Closes: #333980 + * Don't check undefined symbols introduced by "ld -u" for TLS. Closes: + #326103 + + * 117_mips_symbolic_link.dpatch: merged upstream - removed. + + * debian/rules: pass --disable-werror on ia64 as current gcc generates + too many false positives. Closes: #336939 + + * 125_fix_tc_arm_cast.dpatch: new patch from Lennert Buytenhek to fix + cast warning and arm builds. Closes: #336175 + + * 121_i386_x86_64_biarch.dpatch: imported from Ubuntu at request of + Daniel Jacobwitz to fix biarch linking on i386/amd64. Closes: + #334626, #334673 + + * debian/rules: remove any reference to pkgstriptranslations - an + Ubuntu-ism that shouldn't have been in the Debian package in the first + place but that isn't needed in Ubuntu any more in any event. + + * debian/rules: MAKEOVERRIDES is now clobbered by the top level + Makefile, so switch to overriding MAKE itself (sic) to pass the + customized VERSION variable/string down to sub-directories for + -multiarch and -hppa64 builds. Thanks to Daniel Silverstone for the + suggestion. + + -- James Troup Fri, 11 Nov 2005 20:38:22 +0000 + +binutils (2.16.1cvs20050902-1) unstable; urgency=low + + * New upstream CVS snapshot. + * Fixes --as-needed on sparc and hppa. Closes: #320697 + * Fixes buffer overflows and other crashes. Closes: #311975 + + * 124_readelf_robustify.dpatch: merged upstream - removed. + * 001_ld_makefile_patch: regenerated with help of wiggle. + + * debian/*.shlibs: update to version 2.16.91. + + * debian/copyright: use canonical GNU URL. Update copyright years. + * debian/rules: update version and copyright. + + * debian/rules (pre-build): not relevant with a CVS snapshot which + doesn't have pre-generated info files - removed. + * debian/rules (clean): don't save info files for the same reason, in + fact explicitly remove them. + * debian/rules (build_stamps): drop pre-build. + + -- James Troup Sat, 3 Sep 2005 00:30:56 +0100 + +binutils (2.16.1-3) unstable; urgency=low + + * debian/rules: remove powerpc libc header hack. + * debian/include/sys/procfs.h: remove. + + * 124_readelf_robustify.dpatch: new patch from Jakub Jelinek to + robustify readelf. Thanks to Thiemo Seufer . + Closes: #318344 + + -- James Troup Wed, 31 Aug 2005 05:03:11 +0100 + +binutils (2.16.1-2) unstable; urgency=low + + * debian/include/sys/procfs.h: Include fixed powerpc libc header, to fix + FTBFS on powerpc. Temporary fix, to be removed with glibc-2.3.5. + + -- Matthias Klose Sun, 10 Jul 2005 16:35:17 +0200 + +binutils (2.16.1-1) unstable; urgency=medium + + * New upstream version. + * debian/patches/117_mips_symbolic_link.dpatch: Updated, apply it again. + (Thiemo Seufer). + * debian/patches/130_bfd_doc_makefile.dpatch: Remove, applied upstream. + * debian/control: Build depend on dpkg-dev (>= 1.13.9), needed to determine + the GNU architecture type. + * The symlinks for the tools change to the the new output of + dpkg-architecture -qDEB_HOST_GNU_TYPE (i.e. i386-linux-ld becomes + i486-linux-gnu-ld). + * Change the values for --enable-targets according to the dpkg-architecture + update. + * Configure the hppa64 cross compiler for hppa64-linux-gnu. Adjust + the hppa64 install target. + * debian/*shlibs: Update to version 2.16.1. + * Make restoring of saved pregenerated info files more robust. + + -- Matthias Klose Sat, 9 Jul 2005 14:58:49 +0200 + +binutils (2.16-1) unstable; urgency=low + + * Update to CVS 2.16 branch 20050612. + * debian/patches/130_bfd_doc_makefile.dpatch: New patch to fix + build failure in bfd/doc. + * debian/watch: New file. + + -- Matthias Klose Sun, 12 Jun 2005 12:29:12 +0200 + +binutils (2.16-0) experimental; urgency=low + + * New upstream release. + - Fixes build failure using gcc-4.0 (closes: #299671). + * debian/patches: + - 000_print_debian_version.dpatch: Updated. + - 001_ld_makefile_patch.dpatch, 002_gprof_profile_arcs.dpatch, + 002_gprof_profile_arcs.dpatch: Regenerated. + - 012_check_ldrunpath_length.dpatch: Updated. + - 112_fix_reloc_sizing.dpatch, 113_elf_backend_hide_symbol.dpatch, + 114_mips_delay_slots_in_branch.dpatch, 115_fix_sparc_fmov.dpatch, + 116_ar_nonexistent_files.dpatch: Removed, applied upstream. + - 117_mips_symbolic_link.dpatch: Disabled. Needs an update. + - 118_arm_pass_all.dpatch: Regenerated. + - 119_fix_gas_double_negative.dpatch: Removed, applied upstream. + - 120_mips_xgot_multigot_workaround.dpatch: Updated. + - 121_ia64_unwind_fixes.dpatch, 122_m68k_undefweak_symbols.dpatch: + Removed, applied upstream. + * Merge Ubuntu changes: + - debian/patches: + - 123_dont_add_to_undefs_twice.dpatch: Removed, applied upstream. + - debian/rules: Call pkgstriptranslations if present. + * debian/rules: + - Fix VERSION extraction. + - Save info files before build and restore them in clean target. + * debian/control: + - Add me as an uploader. + + -- Matthias Klose Fri, 6 May 2005 18:43:09 +0200 + +binutils (2.15-6) unstable; urgency=low + + * 123_bfd_overflow_fix.dpatch: new patch from Alan Modra to fix BFD + overflows. Closes: #308625 + + -- James Troup Sat, 21 May 2005 20:20:01 +0100 + +binutils (2.15-5ubuntu2) hoary; urgency=low + + * debian/rules: Call pkgstriptranslations if present (the package does not + use debhelper, thus it does not happen automatically). + + -- Martin Pitt Fri, 18 Mar 2005 13:07:52 +0000 + +binutils (2.15-5ubuntu1) hoary; urgency=low + + * 123_dont_add_to_undefs_twice.dpatch: new patch from Alan Modra (PR338) to + not add symbols to the undefined list twice, causing an assertion failure + in ld when building the kernel on amd64. + + -- Daniel Stone Tue, 7 Dec 2004 09:29:31 +0100 + +binutils (2.15-5) unstable; urgency=low + + * 121_ia64_unwind_fixes.dpatch: new patch from David Mosberger to fix + unwind related bugs. Closes: #278836 + * 122_m68k_undefweak_symbols: new patch from Andreas Schwab to fix undef + weak symbols with non-default visibilty on m68k. Closes: #278388 + + -- James Troup Thu, 25 Nov 2004 00:13:28 +0000 + +binutils (2.15-4) unstable; urgency=low + + * 120_mips_xgot_multigot_workaround.dpatch: new patch from Thiemo Seufer + to make multigot/xgot handling exclusive and fix mozilla builds on + mipsen. Closes: #272149 + + -- James Troup Thu, 23 Sep 2004 22:44:03 +0100 + +binutils (2.15-3) unstable; urgency=low + + * 112_fix_reloc_sizing.dpatch: update patch based on revised change from + Alan Modra. + + * 116_ar_nonexistent_files.dpatch: new patch from Nick Clifton to fix + ar's handling of non-existent files. Closes: #267139 + + * 117_mips_symbolic_link.dpatch: new patch from Thiemo Seufer to fix the + "final link failed: Bad value" error on mips. Closes: #270619 + + * 118_arm_pass_all.dpatch: new kludge patch to fix broken libtool pass_all + handling on arm and other arches. + + * 119_fix_gas_double_negative.dpatch: new patch from Alan Modra via + Daniel Jacobowitz to fix gas' handling of -- and ++. Closes: #266772 + + -- James Troup Thu, 9 Sep 2004 22:24:08 +0100 + +binutils (2.15-2) unstable; urgency=low + + * 112_fix_reloc_sizing.dpatch: new patch from Daniel Jacobowitz to fix + objcopy relocation sections. Closes: #252719 + + * 113_elf_backend_hide_symbol.dpatch: new patch from Alan Modra to fix + ld internal error on hppa. Closes: #254549 + + * 114_mips_delay_slots_in_branch.dpatch: new patch from Thiemo Seufer to + handle delay slots in branch correctly on mips. Closes: #266660 + + * 115_fix_sparc_fmov.dpatch: new patch from Jakub Jelinek via Dave + Miller to fix bogus fmov* SPARC opcodes. Closes: #267824 + + -- James Troup Tue, 31 Aug 2004 22:45:13 +0100 + +binutils (2.15-1) unstable; urgency=low + + * New upstream release. Closes: #248990, #259458 + * Fixes -Wl,-z,defs to correctly abort builds with unresolved + symbols. Closes: #256481 + * Better error message for truncation of bignums in as. + Closes: #219933 + * strip(1) no longer corrupts binaries for architectures it doesn't + recognise. Closes: #211052 + * nm -C /usr/lib/libcrypto++.a no longer segfaults. Closes: #247917 + + * 105_alpha_rpcc_opcode_fix.dpatch, 106_arm_pic.dpatch, + 107_powerpc_ld_segfault.dpatch, 108_m68k_fmoveml_fix.dpatch, + 109_objcopy_keep_debug.dpatch, 110_hppa64_local_symbols.dpatch, + 111_objcopy_vs_unstripped.dpatch, 906_hjl_libtool_dso.dpatch: merged + upstream - removed. + * 012_check_ldrunpath_length.dpatch: resynced with wiggle(1). + + * debian/binutils.shlibs, debian/binutils-hppa64.shlibs, + debian/binutils-multiarch.shlibs: update for 2.15. + + * debian/rules (install): remove gas.info hack as no longer needed + (fixed properly upstream). + * debian/rules (clean): remove gas/doc/as.info which doesn't seem to be + in the upstream tar ball. + + * debian/rules (binary-arch): install $pkg/ChangeLog.linux only if they + exist (because they don't in GNU releases). + + -- James Troup Thu, 29 Jul 2004 22:44:04 +0100 + +binutils (2.14.90.0.7-8) unstable; urgency=low + + * debian/rules: don't use gcc-2.95 on m68k. Thanks to Adam Conrad for + pointing this out. + + -- James Troup Wed, 19 May 2004 10:35:44 +0100 + +binutils (2.14.90.0.7-7) unstable; urgency=low + + * 111_objcopy_vs_unstripped.dpatch: new patch from Alan Modra via Daniel + Jacobowitz to fix objcopy on unstripped libraries on alpha and arm. + Closes: #234021 + + * debian/control (Build-Depends): remove m68k specific build-depends on + gcc-2.95 and libc6-dev (<< 2.3). Many thanks to Michael Schmitz for + testing this. + + -- James Troup Tue, 30 Mar 2004 18:00:54 +0100 + +binutils (2.14.90.0.7-6) unstable; urgency=low + + * 110_hppa64_local_symbols.dpatch: new patch from Randolph Chung to fix + dynamic name generation of local symbols on hppa64 - needed to build + 64-bit hppa kernels. Closes: #238176 + + -- James Troup Fri, 26 Mar 2004 15:52:27 +0000 + +binutils (2.14.90.0.7-5) unstable; urgency=low + + * 109_objcopy_keep_debug.dpatch: new patch from Daniel Jacobowitz + , objcopy --only-keep-debug and readelf SHT_NOBITS + fixes. + + -- James Troup Mon, 26 Jan 2004 16:25:25 +0000 + +binutils (2.14.90.0.7-4) unstable; urgency=low + + * debian/control: add binutils-hppa64 package. + * debian/rules: add support for binutils-hppa64 package and don't enable + hppa64-linux for binutils or binutils-multiarch. + * debian/binutils-hppa64.postinst: new file. + * debian/binutils-hppa64.postrm: likewise. + * debian/binutils-hppa64.shlibs: likewise. + * Above changes largely based on a patch from Matthias Klose + . Closes: #225892 + + * debian/control (Build-Depends): drop bzip2. + + * debian/rules (install-stamp): remove empty /usr/include directory in + binutils. + * debian/rules (install-stamp): remove /usr/share/info/dir* to + workaround install-info brain damage (cf #213524). + + -- James Troup Thu, 22 Jan 2004 21:32:44 +0000 + +binutils (2.14.90.0.7-3) unstable; urgency=low + + * 108_m68k_fmoveml_fix.dpatch: new patch from H.J. Lu + to fix fmoveml disassembly and associated + testsuite regression on m68k. + + -- James Troup Tue, 18 Nov 2003 14:35:23 +0000 + +binutils (2.14.90.0.7-2) unstable; urgency=low + + * 107_powerpc_ld_segfault.dpatch: new patch from Alan Modra + to fix ld segfault on powerpc. Thanks to + Josselin Mouette for the report. Closes: #219187 + + -- James Troup Wed, 5 Nov 2003 13:32:17 +0000 + +binutils (2.14.90.0.7-1) unstable; urgency=low + + * New upstream release. + * 100_null_owner_ld_fix.dpatch, 101_ppc_as_shf_and_rel_fix.dpatch, + 102_alpha_null_got_ld_fix.dpatch, + 103_static_linking_elf_eh_frame.dpatch, + 104_elf_eh_frame_alpha_fix.dpatch: removed; merged upstream. + * debian/rules: update version number. + * debian/binutils.shlibs: likewise. + * debian/binutils-multiarch.shlibs: likewise. + + * 009_signed_char_fix.dpatch: removed; this was fixed upstream correctly + (http://sources.redhat.com/ml/binutils/2003-05/msg00304.html) and this + patch is breaking that fix. Thanks to Daniel Jacobowitz + . + + * 003_gmon_manpage_fix.dpatch -> 002_gprof_profile_arcs.dpatch. + * 014_gprof_manpage_fix.dpatch -> 003_gprof_see_also_monitor.dpatch. + + * 300_alpha_rpcc_opcode_fix.dpatch -> 105_alpha_rpcc_opcode_fix.dpatch + (committed to trunk). + + * debian/rules (configure-multi-stamp): also enable mips64{el,}-linux + for binutils-multiarch. Alphabetize target list. + + * 106_arm_pic: new patch from Phil Blundell and Daniel + Jacobowitz which implements GC for GOT and PLT relocs + in the elf32-arm backend. + + * debian/rules (install-stamp): work around upstream bug which causes + as.info and as.1 to disappear by explicitly calling "make + install-info-am install-am" in builddir-single/gas/doc. + + -- James Troup Sat, 1 Nov 2003 18:14:04 +0000 + +binutils (2.14.90.0.6-5) unstable; urgency=low + + * 104_elf_eh_frame_alpha_fix.dpatch: new patch from H.J. Lu + to fix regressions on alpha caused by + 103_static_linking_elf_eh_frame. Thanks to Thimo Neubauer + for the original report. Closes: #215636 + + -- James Troup Fri, 17 Oct 2003 00:02:09 +0100 + +binutils (2.14.90.0.6-4) unstable; urgency=low + + * 103_static_linking_elf_eh_frame.dpatch: new patch from H.J. Lu + to fix static linking of C++ binaries. + + * 200_alpha_null_got_ld_fix.dpatch: renamed... + * 102_alpha_null_got_ld_fix.dpatch: to this. + + * debian/rules: patch from Guido Guenther to enable + mips64 support. Closes: #213448 + + -- James Troup Sun, 12 Oct 2003 14:26:26 +0100 + +binutils (2.14.90.0.6-3) unstable; urgency=low + + * 100_null_owner_ld_fix.dpatch: new patch from Alan Modra + to fix an ld crash with null owner sections. + Closes: #212029 + + * debian/rules: don't compile with gcc-2.95 on arm; the only failures + are a) testsuite-only (i.e. don't appear to affect real world + applications) and b) fixed by upcoming gcc patches by Phil Blundell + in any event. + * debian/control (Build-Depends): likewise don't build-depend on + gcc-2.95 for arm. + + * 101_ppc_as_shf_and_rel_fix.dpatch: new patch from Alan Modra + to fix an as regression where it refused to + compile utils.S from Linux/PPC 2.6. Closes: #211668 + + -- James Troup Tue, 23 Sep 2003 01:32:08 +0100 + +binutils (2.14.90.0.6-2) unstable; urgency=low + + * debian/rules (CONFLICTS): remove spurious "--", left over from + debhelper based-rules. Fixes build failure on sparc. + + * 200_alpha_null_got_ld_fix.dpatch: new patch from Daniel Jacobowitz + to fix an ld crash on alpha with null .got sections. + Closes: #204615 + + * scripts/dpkg-arch.mk: remove. + * debian/rules: define DEB_BUILD_GNU_TYPE, DEB_HOST_ARCH and + DEB_HOST_GNU_TYPE here instead. + + * debian/rules (binary-indep): use ':' as a separator to chown, rather + than '.' which is a legal character for a username. + * debian/rules (binary-arch): likewise. + + * debian/rules: further trivial cleanups. + + -- James Troup Thu, 18 Sep 2003 22:13:36 +0100 + +binutils (2.14.90.0.6-1) unstable; urgency=low + + * New "upstream" release. + * Fixes core dump of nm -C on certain object files. Closes: #205616 + + * New maintainer. + * debian/control (Maintainer): adjust accordingly. + * debian/copyright: likewise. Update copyright years, URL. + * debian/control (Standards-Version): bump to 3.6.1.0. + + * 011_disable_combreloc_ARM_ONLY.diff: dropped on request of Phil + Blundell - this is obsolete, it was working around a + bug in ld since fixed by Daniel Jacobowitz upstream. + + * 890-elf64_alpha_segfault.diff: dropped as bogus + (http://sources.redhat.com/ml/binutils/2003-04/msg00399.html); rth's + correct fix is already in the upstream source. + + * debian/README.Debian: migrate nearly-obsolete debconf notes to here. + * debian/control (Depends): drop debconf. + * binutils.config, binutils.templates, binutils.templates.ca, + binutils.templates.fr, binutils.templates.ja, + binutils.templates.pt_BR, postrm.debhelper: obsolete, removed. + Closes: #189641, #198222 + + * Migrated from dbs... + * debian/README.build: obsolete; removed. + * debian/rules: remove $(BUILD_TREE)/, $(STAMP_DIR)/, $(unpacked), $(patched) and other references + to DBS. + * debian/rules (clean): remove build tree directories. + * debian/scripts/dbs-build.mk: unused, remove. + * debian/scripts/file2cat: likewise. + + * ... to dpatch. + * debian/rules: include /usr/share/dpatch/dpatch.make. + * debian/rules (configure-single-stamp): depend on patch-stamp. + * debian/rules (configure-multi-stamp): likewise. + * debian/rules (clean): depend on unpatch. Remove debian/patched. + * debian/control (Build-Depends): add dpatch. + + * binutils-doc.postinst, binutils-doc.prerm, + binutils-multiarch.postinst, binutils-multiarch.postrm, + binutils-multiarch.preinst, binutils-multiarch.shlibs, + binutils.postinst, binutils.postrm, binutils.shlibs: new files based + on .deb and packages.d/. + * scripts/dh_split: obsolete, removed. + * debian/packages.d/binutils-dev.in, debian/packages.d/binutils-doc.in, + debian/packages.d/binutils-multiarch.in, + debian/packages.d/binutils.in: likewise. + + * debian/rules: rewritten, de-debhelper-ized. + * debian/control (Build-Depends): drop debhelper and add file. + + -- James Troup Thu, 11 Sep 2003 22:08:18 +0100 + +binutils (2.14.90.0.5-0.2) unstable; urgency=low + + * NMU. + * Rebuild using fixed gcc on sparc (closes: #202924). + + -- Matthias Klose Mon, 28 Jul 2003 20:12:00 +0200 + +binutils (2.14.90.0.5-0.1) unstable; urgency=low + + * NMU. + * New upstream version. + * Remove patches applied upstream: + - debian/patches/500_s390_gas.diff + - debian/patches/905-hppa_visibility.diff + - debian/patches/906-mips_ld_fix.diff + * Updated patch: + - debian/patches/906-hjl_libtool_dso.diff + + -- Matthias Klose Wed, 23 Jul 2003 20:09:51 +0200 + +binutils (2.14.90.0.4-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Work around the brain dead libtool. + * New patches: + - debian/patches/500_s390_gas.diff (closes: #194929). + - debian/patches/905-hppa_visibility.diff (closes: #195203). + - debian/patches/906-mips_ld_fix.diff (closes: #195207). + - debian/patches/906-hjl_libtool_dso.diff + + -- Matthias Klose Sat, 31 May 2003 12:12:10 +0200 + +binutils (2.14.90.0.3-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Update from binutils 2003 0523. + 2. Fix 2 ELF visibility bugs. + 3. Fix ELF/ppc linker bugs. + * Remove patches applied upstream: + - debian/patches/903-hjl_ld-dso-test.diff + - debian/patches/904_hjl_hppa_whitespace.diff + + -- Matthias Klose Sat, 24 May 2003 09:02:54 +0200 + +binutils (2.14.90.0.2-0.1) unstable; urgency=low + + * NMU + * New upstream version. + 1. Update from binutils 2003 0515. + 2. Fix various ELF visibility bugs. + 3. Fix some ia64 linker bugs. + 4. Add more IAS compatibilities to ia64 assembler. + * New patches: + - debian/patches/903-hjl_ld-dso-test.diff (closes: #193505). + - debian/patches/904_hjl_hppa_whitespace.diff. + * Remove patches applied upstream: + - debian/patches/900_binutils-2.14.90.0.1-empty-test.diff + - debian/patches/901-hjl_weaksymfix.diff + + -- Matthias Klose Sun, 18 May 2003 10:50:00 +0200 + +binutils (2.14.90.0.1-0.1) unstable; urgency=low + + * NMU + * New upstream version. + - Fix: MIPS branch-to-global bug (closes: #189031). + - Fix: Crash on alpha with --gdwarf2 and bad file number (closes: #187211). + - Fix: objdump -R BFD ICE on prelinked binaries (closes: #180088). + * New patches: + - debian/patches/900_binutils-2.14.90.0.1-empty-test.diff + - debian/patches/901-hjl_weaksymfix.diff + * Remove patches applied upstream: + - debian/patches/002_ldlex_inflexible_transition.diff + - debian/patches/013_objdump_doc_fix.diff + - debian/patches/850_hppa_stub_fix.diff + - debian/patches/860_m68k_elf.diff + - debian/patches/861_m68k_elf.diff + - debian/patches/870-sparc64-update.diff + - debian/patches/880-alpha-update.diff + * Remove obsolete patch: + - debian/patches/patches/800_hjl_mips_fixes.diff + * Add x86_64 for the i386 binutils package and the binutils-multiarch + package (closes: #189350). + * Set CFLAGS to -g -O2 for build (closes: #181268). + + -- Matthias Klose Tue, 6 May 2003 09:58:14 +0200 + +binutils (2.13.90.0.18-1.7) unstable; urgency=high + + * NMU + * Fixed ld segv (replaced yy_current_buffer by YY_CURRENT_BUFFER) + (Closes: #188876, 188900, 188912) + + -- Julien LEMOINE Mon, 14 Apr 2003 04:45:03 +0200 + +binutils (2.13.90.0.18-1.6) unstable; urgency=high + + * NMU + * [002_ldlex_inflexible_transition.diff] New. Make ld buildable again with + sid's current flex. + + -- J.H.M. Dassen (Ray) Sun, 13 Apr 2003 16:54:46 +0200 + +binutils (2.13.90.0.18-1.5) unstable; urgency=medium + + * NMU + * [890-elf64_alpha_segfault.diff] Patch from Julien LEMOINE + to fix the segfault encountered while building + gal on alpha. (Closes: #185556) + * sid's current flex breaks the building of several packages, including this + one; see #188665. The i386 upload is built using a pbuilder sid chroot + with flex downgraded to the sarge version. + + -- J.H.M. Dassen (Ray) Sun, 13 Apr 2003 13:44:17 +0200 + +binutils (2.13.90.0.18-1.4) unstable; urgency=low + + * NMU + * ld/emulparams/elf64_sparc.sh: Set LIBPATH_SUFFIX instead of suffix + for emulation. Patch from current CVS suggested by Clint Adams, + needed for sparc64 glibc build. + * bfd/elf64-alpha.c: Patch from current CVS suggested by Falk Hueffner, + needed to build xstow, kdegames (#181623), sfs. + * Explicitely fail, when trying to build with glibc-2.3 on arm and + m68k. See #184048 for m68k ld failures. + + -- Matthias Klose Tue, 8 Apr 2003 23:27:46 +0200 + +binutils (2.13.90.0.18-1.3) unstable; urgency=low + + * NMU + * Another fix for ELF/m68k (__bb_exit_func initialization). + + -- Matthias Klose Tue, 18 Mar 2003 00:05:47 +0100 + +binutils (2.13.90.0.18-1.2) unstable; urgency=high + + * NMU + * Apply upstream fix for ELF/m68k. Closes: #182313. + * Use gcc-2.95 on m68k-linux. Built on testing (glibc-2.2). + + -- Matthias Klose Sun, 9 Mar 2003 01:02:39 +0100 + +binutils (2.13.90.0.18-1.1) unstable; urgency=low + + * NMU + * Apply upstream fix for hppa stubs. Closes: #181397 + + -- LaMont Jones Wed, 19 Feb 2003 12:34:58 -0700 + +binutils (2.13.90.0.18-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-01-21) + * Upstream: Fix an ia64 gas bug + * Upstream: Fix some TLS bugs + * Upstream: Fix ELF/ppc bugs + * Upstream: Fix an ELF/m68k bug + * Corrected ARM combreloc disabling patch + (closes: Bug#175204) + * Upstream fixes take care of TEXTREL bug + on powerpc (closes: Bug#176084) + * Fixed shellutils dependency problem + (closes: Bug#175673) + * Removed mention of the monitor manpage + from the gprof manpage (closes: Bug#160654) + + -- Christopher C. Chimelis Sun, 2 Feb 2003 23:17:29 -0500 + +binutils (2.13.90.0.16-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-11-26) + * Upstream: Include /usr/bin/c++filt + * Upstream: Fix "ld -r" with exception handling + + -- Christopher C. Chimelis Mon, 9 Dec 2002 19:14:02 -0500 + +binutils (2.13.90.0.14-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-11-14) + * Upstream: Fix ELF/alpha bugs + * Upstream: Fix an ELF/i386 assembler bug + * Updated package MIPS patch from HJ Lu + * Added s390 patches from Gerhard Tonn. + Actually, the patches to support s390x were + already included upstream, so I just enabled + it in the rules script (closes: Bug#168074, Bug#168974) + * Since powerpc64-linux support was already + added in a prior upload, I'm closing the + wishlist bug for it (closes: Bug#156955) + + -- Christopher C. Chimelis Tue, 20 Nov 2002 05:36:21 -0500 + +binutils (2.13.90.0.10-2) unstable; urgency=low + + * Added two patches from upstream to fix alpha BFD. + (closes: Bug#165633) + + -- Christopher C. Chimelis Sun, 27 Oct 2002 14:21:51 -0400 + +binutils (2.13.90.0.10-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-10-10) + * Upstream: More ELF/PPC linker bug fixes. + * Upstream: Fix an ELF/alpha linker bug. + * Upstream: Fix an ELF/sparc linker bug to support + Solaris. + * Upstream: More TLS updates. + * Updated m68k gcc 3.1 patch since it wasn't applying + cleanly. Is this still needed? + * Added patches to allow building with new bison + (closes: Bug#164436, Bug#164042) + * Should be better for prelink support, which is coming + soon (closes: Bug#161427) + * Removed windres manpage from all packages + (closes: Bug#157415) + * Fixed download location in copyright file + (closes: Bug#158028) + * Added i386-gnu to multiarch build targets + (closes: Bug#157057) + * Add alpha opcode patch from Falk Hueffner + (closes: Bug#164201) + * Remove .la files from packages + (closes: Bug#160455) + + -- Christopher C. Chimelis Mon, 15 Oct 2002 20:22:29 -0400 + +binutils (2.13.90.0.4-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-08-) + * Upstream: Update from binutils 2002 0814 + * Upstream: Fix symbol versioning bugs for gcc 3.2 + * Upstream: Fix mips gas + * Upstream: Fix an x86 TLS bfd bug + * Upstream: Fix an x86 PIC gas bug + + -- Christopher C. Chimelis Thu, 15 Aug 2002 20:13:44 -0400 + +binutils (2.12.90.0.15-2) unstable; urgency=low + + * Fix combreloc disabling patch for ARM + (closes: Bug#156315) + * Remove S390 patch since it is no longer + needed (thanks to Gerhard Tonn for checking + this out) + * Fix BFD version string escaping + (closes: Bug#154989) + * Add SH patch from Yaegashi Takeshi + (closes: Bug#156230) + * Added conflicts for older modutils + (closes: Bug#155324) + * Forgot to apply MIPS patch from HJ Lu + (apologies to MIPS folks) + + -- Christopher C. Chimelis Wed, 14 Aug 2002 13:09:12 -0400 + +binutils (2.12.90.0.15-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-07-17) + * Upstream: Fix an ia64 assembler bug + * Upstream: Fix a symbol versioning bug + * Upstream: You have to apply the modutils patch + enclosed here in order to support System.map + generated by the new nm (bug filed) + * The symbol visibility patch is included + upstream, as is the alpha PLT/GOT patch, so + both removed from my packaging. + * Included patch from upstream to fix RELA targets + (closes: Bug#153729) + + -- Christopher C. Chimelis Thu, 2 Aug 2002 02:24:29 -0400 + +binutils (2.12.90.0.14-2) unstable; urgency=low + + * The "Let's Get This Party Started Right" upload + (since I'm closing as many old bugs as possible) + * Removed sparc patch altogether + * Added a small alpha patch from upstream to fix + some obscure PLT/GOT issues. + * Manpages are now fixed finally -- no more + I (closes: Bug#108369) + * Have not gotten another report of the + debconf message being cut off, so I'm closing + the debconf-related bug. I suspect this may + have been a problem in the debconf front-end + being used, but I have not been able to reproduce + it (closes: Bug#149045) + * Closing a bug report that I had tagged moreinfo + a LONG time ago (over one year), but never got + more info on. I have not heard of this kind + of problem since, nor have I been able to + reproduce it at any time since (closes: Bug#105986). + For interested parties, it revolved around + allowing gcc to show a linker error, but the + reporter didn't know about the -v option for + gcc. There was a linker problem, but it appeared + to be either hardware failure or user error. + * Closing a demangler 'bug' that revolved around + stripping @PLT from symbol names. Since the + PLT suffix is documented, I'm going to close + this bug. Also, it doesn't help that the symbol + in the bug report uses an obsolete mangling style, + so I can't test this even if I wanted to + (closes: Bug#45889) + + -- Christopher C. Chimelis Mon, 22 Jul 2002 12:54:01 -0400 + +binutils (2.12.90.0.14-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-06-27) + * Upstream: Fix a mips assembler bug + * Upstream: Fix an ELF/mips SHF_MERGE bug + * Upstream: Fix a linker bug which leads to the + incorrect Linux 2.2 kernel. + * PE patch removed since it is included + in upstream source now + * Includes some patches which allow for + more true testsuite results from gcc-3.1 + * Fix sparc ld emulation script patches to get + rid of the lib/64 silliness (now uses lib64) + * Removed the L word from the package description + since Debian is no longer linux-only + (closes: Bug#150575) + * The strings dereferencing problem with + some Windows binaries seems to also be fixed now + (closes: Bug#121366) + * Added a patch to only generate an RPATH entry + if LD_RUN_PATH is not empty, for cases where + -rpath isn't specified (closes: Bug#151024) + * Fixed arch detection problem in the build + scripts. + * Fixed bad capitalisation of -g in the objdump + manpage (closes: Bug#152697) + * Added patch from HJ Lu to fix a symbol + visibility issue. + + -- Christopher C. Chimelis Wed, 17 Jul 2002 14:23:42 -0400 + +binutils (2.12.90.0.9-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-05-26). + * Upstream: Supports "-z muldefs" + * Updated PE bfd from CVS to fix auto-import + segfaults (closes: Bug#131407) + * Remove the PE-removing patch for i386 targets + due to the above + + -- Christopher C. Chimelis Thu, 6 Jun 2002 15:52:29 -0400 + +binutils (2.12.90.0.7-1) unstable; urgency=low + + * New upstream version (synced with CVS 2002-04-23). + * Upstream: ELF EH frame bug fix + * Upstream: MIPS ELF visibility bug fix + * Upstream: Bug fixes for ELF/sparc + * Upstream: Bug fixes for ELF/cris + * Upstream: Fix linking a.out relocatable files + with ELF + * Upstream: Fix a PPC altivec assembler bug + * Numerous upstream changes since I have + deliberately not updated in awhile so that + I could stabilise the package for woody + release + * Fixed a glaring typo in the Debian additions + to the version string. + * Upstream incorporated --oformat + documentation patch; removed. + * Added a patch from upstream involving + relative relocs on Alpha + * Removed configure.info-[1-3] from -doc + (closes: Bug#146205) + + -- Christopher C. Chimelis Sun, 5 Apr 2002 04:52:33 -0400 + +binutils (2.12.90.0.1-5) unstable; urgency=high + + * Added a patch to m68k bits for gas to allow + gcc 3.1 to build + * Added Brazilian Portuguese translation for + debconf (closes: Bug#144677) + * Removed unneeded gasp manpage since gasp + was eliminated as a distinct binary + (closes: Bug#144583) + + -- Christopher C. Chimelis Mon, 29 Apr 2002 14:40:21 -0400 + +binutils (2.12.90.0.1-4) unstable; urgency=low + + * Added patch from Gerhardt Tonn + to fix s390 merge problem (closes: Bug#143187) + * Corrected DOW of my last changelog entry :-P + + -- Christopher C. Chimelis Thu, 18 Apr 2002 13:03:49 -0400 + +binutils (2.12.90.0.1-3) unstable; urgency=low + + * Oops...I used dpkg-architecture from dpkg-dev + in the postinst and didn't add a dependency + for it. It was a bad choice anyway and I'm + going to use uname -s instead + (closes: Bug#142744, Bug#142915) + + -- Christopher C. Chimelis Mon, 15 Apr 2002 12:41:10 -0400 + +binutils (2.12.90.0.1-2) unstable; urgency=low + + * Added Catalan debconf translation + (closes: Bug#139740) + * Ensure that info entries are removed from the + texinfo dirfile when binutils-doc is removed + (closes: Bug#126557) + * Ensure that the kernel link debconf warning + only shows up on linux systems + (closes: Bug#142360) + + -- Christopher C. Chimelis Thu, 13 Mar 2002 01:30:22 -0400 + +binutils (2.12.90.0.1-1) unstable; urgency=high + + * New upstream version (synced with CVS 2002-03-07). + * Upstream: Add the .preinit_array/.init_array/.fini_array + support. + * Upstream: Fix eh_frame. + * Upstream: Turn on combreloc by default. + * Upstream: Enable gprof for Linux/mips. + * Turn combreloc off for ARM explicitely until + I can confirm that PIC is not still broken + by using it. + * Remove IA-64 unwind patch and objcopy fix + since they are included in the upstream sources + now. + * Re-enable testsuite run since Randolph did the NMU + on dejagnu (thank you!). + * Appears to fix sparc64 linking problems. I'm + still looking into exactly what was going on with + that (closes: Bug#137850) + * Enabled hppa64-linux support in main binutils + package (closes: Bug#137955) + * Added Japanese debconf template. Thanks to + Tomohiro KUBOTA for supplying that + (closes: Bug#138112) + * Added patch for ld to fix dosemu problems + (closes: Bug#126863) + + -- Christopher C. Chimelis Mon, 11 Mar 2002 14:02:45 -0500 + +binutils (2.11.93.0.2-3) unstable; urgency=high + + * Split translated debconf templates out. + I apparently misunderstood the instructions + on integrating the French translation since + this is my first real attempt at using + debconf (closes: Bug#136295) + * Disable combreloc default on ARM since it + breaks PIC, apparently (closes: Bug#134241) + Please test other ARM bugs against this + version and inform me of the results! + + -- Christopher C. Chimelis Fri, 8 Mar 2002 19:10:10 -0500 + +binutils (2.11.93.0.2-2) unstable; urgency=high + + * Include a patch from upstream to fix stripping + archives containing multiple files with the + same name (like libgcj, unfortunately). + (closes: Bug#107812) + * Include IA64 unwind fix from CVS to fix kernel + linking on IA64. (closes: Bug#135143) + * Added French translation of the debconf + bits. Thanks to Denis Barbier for the + work on that. (closes: Bug#134626) + * Disabled testsuite run until dejagnu is + fixed. I'm leaving the build-dep for dejagnu + in, though, since I know I'll forget to + reinsert it when I do re-enable the testsuite + run. + + -- Christopher C. Chimelis Fri, 22 Feb 2002 14:05:22 -0500 + +binutils (2.11.93.0.2-1) unstable; urgency=high + + * New upstream version (synced with CVS 2002-02-07). + * Upstream: Fix a weak symbol alpha linker bug for glibc. + * Upstream: More support for gcc 3.1. + * Keep on disabling efi-app-ia32 type targets + since the segfault is still unfixed in CVS and + I haven't had the time to go back and really + debug and fix this. + * Updated standards version. + * Corrected some of the lintian problems (all except + the ones involving Changelog.linux, the .comment + section, and the missing manpages for + binutils-multiarch's binaries since that package + depends on binutils, which provides those). + + -- Christopher C. Chimelis Wed, 13 Feb 2002 13:41:47 -0500 + +binutils (2.11.92.0.12.3-7) unstable; urgency=high + + * The "Remind Me To Think Next Time" upload. + * Fix the postinst to only compare versions on + upgrade rather than during configure. + (closes: Bug#133349, Bug#133514) + * Still working on the other bugs...if only + I could get a day off of work... + + -- Christopher C. Chimelis Tue, 12 Feb 2002 06:15:02 -0500 + +binutils (2.11.92.0.12.3-6) unstable; urgency=high + + * The "Make The Bad Man Stop" upload. + * Revert patch to bfd/elf32-sparc.c (already + reverted upstream) that broke UA32 relocs on sparc + and caused bus errors with C++/Java binaries + (closes: Bug#126162) + * Remove i486-mingw32 target from the enabled + in multiarch and removed efi-app-ia32 from the + BFD config for Intel linux targets until I can find + and fixthe segfaults that seem to keep coming up when + reading Windows files and viruses with objdump or + strings. This is only temporary, so I'm not closing + the bugs until the problem gets fixed, but + I am going to bump them down to wishlist, merge + them, and note the above in them. + (debian/patches/010_disable_efi_app_ia32_TEMPORARY.diff + disables the efi-app-ia32 BFD in case someone + wants to revert this change easily) + * Added debconf warning about the kernel linking + situation since it keeps coming up and people + keep initially disagreeing with me about this + being a kernel bug. Also, merged prior warning + about -oformat change into the same debconf warning + (it's two, two, two warnings in one). This makes + the DEBIAN_FRONTEND case bug moot (closes: Bug#131801) + * Added powerpc64-linux target to multiarch since + work is progressing on that target and the machines + are due to hit the shelves Very Soon(TM). + + -- Christopher C. Chimelis Fri, 1 Feb 2002 17:06:29 -0500 + +binutils (2.11.92.0.12.3-5) unstable; urgency=high + + * Fix signed char assumption in i386 disassembly bits + (closes: Bug#126993) + + -- Christopher C. Chimelis Mon, 8 Jan 2002 17:27:17 -0500 + +binutils (2.11.92.0.12.3-4) unstable; urgency=high + + * Go back to enabling archs by enumeration for + multiarch. Apparently, a few aren't enabled + with --enable-targets=all (sparc64-linux, namely). + Besides, multiarch was incredibly large, which + was probably unneeded. + + -- Christopher C. Chimelis Wed, 26 Dec 2001 13:53:49 -0500 + +binutils (2.11.92.0.12.3-3) unstable; urgency=high + + * Include patch from Alan Modra to fix more + refcount problems on hppa. + + -- Christopher C. Chimelis Fri, 7 Dec 2001 05:42:04 -0500 + +binutils (2.11.92.0.12.3-2) unstable; urgency=high + + * Include patch from Alan Modra to fix hppa linking + woes wrt undefined symbols (closes: Bug#121993) + + -- Christopher C. Chimelis Wed, 5 Dec 2001 04:14:51 -0500 + +binutils (2.11.92.0.12.3-1) unstable; urgency=high + + * New upstream version (synced with CVS 2001-11-21) + * Upstream: Fix a linker symbol version bug + for common symbols. + * Upstream: Update handling relocations against + the discarded sections. You may need to apply + the kernel patch enclosed here to your kernel + source. + * Upstream: Support "-march=xxx -mipsN" for mips + gas if they are compatible. + * Upstream: Fix a regression when linking with + non-ELF object files. + * Includes Alan Modra's patch to reduce stub sizes + on HPPA. Should help C++ on HPPA. + * Once again includes a mips patch from HJ Lu. + * My documentation changes were cleaned up and + accepted upstream, so the gas manpage fixes go + away (hurray!). + * Stopped iterating targets for binutils-multiarch + and started enabling all of them. This saves + maintenance time since new targets will be + automatically supported in future uploads + and existing targets that I didn't include + before will be supported from now on. This may + grow build time and the libbfd in the multiarch + package, but it's worth it. + * Also, started using the --enable-64-bit-bfd + flag for configuring multiarch. I don't know + why I didn't realise this wasn't there before + since I test with it all of the time. + + -- Christopher C. Chimelis Fri, 30 Nov 2001 20:11:42 -0500 + +binutils (2.11.92.0.10-4) unstable; urgency=high + + * The "Fingers crossed" upload. + * Enable combreloc by default for s390 again. + Rumour has it that it worked before, but there + was a misunderstanding in the s390 developer + community, hence the disabling in the past. + * Fix the ld texinfo file to not mention the old + oformat invocation (closes: Bug#116182) + * Next upload should include the mips updates and + some powerpc updates. I just need time to test + those out first. + + -- Christopher C. Chimelis Fri, 23 Nov 2001 23:23:22 -0500 + +binutils (2.11.92.0.10-3) unstable; urgency=high + + * Replace HPPA reloc patch with patches from Alan + Modra upstream. + * Add upstream patch to fix quoted -rpath bug + (closes: Bug#107214) + + -- Christopher C. Chimelis Sat, 10 Nov 2001 18:19:05 -0400 + +binutils (2.11.92.0.10-2) unstable; urgency=high + + * Disable -z combreloc enable patch on S/390 + since it's not supported there yet + (closes: Bug#117087) + + -- Christopher C. Chimelis Fri, 26 Oct 2001 00:07:01 -0400 + +binutils (2.11.92.0.10-1) unstable; urgency=high + + * New upstream version (synced with CVS 2001-10-21) + * Upstream: Fix the ELF/PPC linker. + * Upstream: Fix the ELF/cris linker. + * Upstream: Fix ELF strip. + * Includes beginnings of Altivec support + (closes: Bug#98617) + * Fixes use of BookE instruction format on 4xx + PowerPC (closes: Bug#116627) + * Includes patches from Alan Modra to fix hppa + relocations. + * Forgot to close the previous PPC bug with last + upload (closes: Bug#116454) + * Moved to enclosing a bzipped tarball rather than + a gzipped one to save download time for everyone + involved. Build-deps adjusted accordingly. + + -- Christopher C. Chimelis Tue, 23 Oct 2001 03:29:49 -0400 + +binutils (2.11.92.0.7-2) unstable; urgency=high + + * Include a patch from H.J Lu to fix a powerpc + issue not shown in the testsuite results. + + -- Christopher C. Chimelis Fri, 19 Oct 2001 00:49:04 -0400 + +binutils (2.11.92.0.7-1) unstable; urgency=high + + * New upstream release (synced with CVS 2001-10-16) + * Upstream: Fix all breakages introduced in 2.11.92.0.5 + * No mips/ dir patches need to be applied with this one. + Woohoo! + * Removed patches from debian/patches that are already + applied upstream. + * Patched version strings to reflect that this is a + Debian release at the request of upstream (to prevent + confusion, apparently). + * Applied patch from H.J. Lu to fix mips section + misalignment. + * Applied patch from Jakub Jelinek to fix kernel linking + on i386 and possibly other archs (closes: Bug#116041) + * Fixed postinst and prerm for binutils-doc to test that + the files exist before calling install-info. This should + fix the odd circumstance when binutils-doc is packaged on + an arch that doesn't support gprof (or any other dir for + that matter) and, therefore, the docs that are usually + made in that dir aren't made. This is particularly true + with gprof on mips. + + -- Christopher C. Chimelis Wed, 17 Oct 2001 18:56:51 -0400 + +binutils (2.11.92.0.5-3) unstable; urgency=high + + * Enable -z combreloc on all targets. This will make + prelinking possible with the prelink package. Please + test this on all archs prior to upload. If it fails, file + a bug immediately and I'll disable the patch for that + platform. + * Added patches from Alan Modra (from CVS) to fix other + archs after the refcount patch broke them. This supercedes + the powerpc patch, so I replaced that with this. + (closes: Bug#115218) + * Added patch from H.J. Lu (from CVS) to fix IA64 linker + problems as well. + * Added patch from David Kimdon to specify which filename is + causing an error if that filename is a dir (closes: Bug#45832). + * Removed workaround patch for stabs problem on Alpha since + it appears to be causing problems on mips and is no longer + needed on Alpha anyway. + * Now runs the testsuite and includes the results in the + binutils package for reference. + + -- Christopher C. Chimelis Sat, 13 Oct 2001 15:10:20 -0400 + +binutils (2.11.92.0.5-2) unstable; urgency=high + + * Applied fix from H.J. Lu to fix PowerPC target + (closes: Bug#115285). Thanks to Jack Howarth + for forcing the issue upstream. + + -- Christopher C. Chimelis Fri, 12 Oct 2001 23:14:51 -0400 + +binutils (2.11.92.0.5-1) unstable; urgency=high + + * New upstream release (synced with CVS 2001-10-05) + * Upstream: Support gcc 3.1 for IA64. + * Upstream: Support prelink for ELF/PPC. + * Upstream: Fix an ELF/x86 linker bug for Oracle + (closes: Bug#113614) + * Upstream: Fix a weak symbol bug. + * Upstream: Support locale. + + -- Christopher C. Chimelis Tue, 9 Oct 2001 19:53:49 -0400 + +binutils (2.11.90.0.31-2) unstable; urgency=high + + * Applied IA64 patch from CVS to fix gcc issues + on IA64. + + -- Christopher C. Chimelis Mon, 24 Sep 2001 12:45:29 -0400 + +binutils (2.11.90.0.31-1) unstable; urgency=high + + * New upstream source (synced with CVS 2001-08-30) + * Upstream: Fix a MIPS linker bug. + * Now applying mips diffs from H.J. Lu (upstream) + for better MIPS and MIPS64 support. + * Applied patch from Christopher Cramer to fix + gasp .REG issue (closes: Bug#110560) + + -- Christopher C. Chimelis Sat, 1 Sep 2001 23:42:22 -0400 + +binutils (2.11.90.0.29-1) unstable; urgency=high + + * New upstream source (synced with CVS 2001-08-27) + * Upstream: Fix an Alpha assembler bug. + * Upstream: Fix an IA64 linker bug. + * Upstream: Fix a MIPS linker bug. + * Upstream: Support '-z combreloc|nocombreloc' in linker. + + -- Christopher C. Chimelis Thu, 30 Aug 2001 04:48:04 -0400 + +binutils (2.11.90.0.27-4) unstable; urgency=high + + * Argh. Really remove the manpages from multiarch + this time (closes: Bug#110410) + + -- Christopher C. Chimelis Tue, 28 Aug 2001 14:32:34 -0400 + +binutils (2.11.90.0.27-3) unstable; urgency=high + + * Include hppa patch to force error + (closes: Bug#109173) + * Fix manpages - seems that I accidentally included + the multiarch manpages rather than the target + manpages (sorry). + * Partial update to as manpage to denote arch options + and added options for the rest of the targets + Still need to elaborate on them, though. More + changes are forthcoming (closes: Bug#110127) + + -- Christopher C. Chimelis Mon, 27 Aug 2001 10:13:27 -0400 + +binutils (2.11.90.0.27-2) unstable; urgency=high + + * Remove bash dependency...ash's behaviour has + already been modified, so it should be able + to build binutils now (closes: Bug#106992) + * Includes new S/390 patch (closes: Bug#109300) + * Could never reproduce objdump segfault and + never got a reply on the bug report + (closes: Bug#93884) + * Can't reproduce m68k segfault either + (closes: Bug#87714) + + -- Christopher C. Chimelis Mon, 20 Aug 2001 23:07:30 -0400 + +binutils (2.11.90.0.27-1) unstable; urgency=high + + * New upstream source (synced with 20010810 CVS) + * Upstream: Fixed x86 linker bug. + * Reverted a patch to gas to dodge a bug in STABS output + on Alpha using gcc 2.95.4, so alpha can be in sync + with the rest of the archs now. + * Fixes strip problems with busybox (closes: Bug#106593) + * Kernels should compile ok again on i386 + (closes: Bug#107190) + + -- Christopher C. Chimelis Thu, 16 Aug 2001 08:24:49 -0400 + +binutils (2.11.90.0.25-1) unstable; urgency=high + + * New upstream source (synced with 20010726 CVS) + * Upstream: fix i386 assembler bug. + * Upstream: "make check" has 2 failures in the + ld-selective test in ld on Linux/alpha. They + should be marked xfail. Fixed in the next release. + * Removed m68k patch (closes: Bug#106431) + * Man pages appear to be correctly generated now + (closes: Bug#98569, Bug# 98938) + * Added bash build dependency (closes: Bug#106992) + * Should compile ok on powerpc (the last one did + also...don't know why voltaire's build daemon failed). + I won't close this bug until I build it myself + on voltaire or hear back from the autobuilder folks + on PPC. + * Looking into the whole LD_LIBRARY_PATH issue that + keeps being brought up. I think the docs are wrong + because the templates say that it shouldn't obey that + at all. Can we please stop filing duplicate bugs for + this? I would greatly appreciate it... + + -- Christopher C. Chimelis Wed, 1 Aug 2001 07:06:52 -0400 + +binutils (2.11.90.0.24-1) unstable; urgency=high + + * New upstream source (synced with 20010714 CVS) + * DO NOT COMPILE FOR ALPHA. I need to fix gcc 2.95.4 + prior to this release working on Alpha correctly + (long story). + * Upstream: Avoid COPY relocs on i386 + * Upstream: Fix IA64 assembler (please try this and let me know) + * Upstream: Fix a static linking the PIC object files on ia32 + * Upstream: Add the version script support for --export-dynamic + * Upstream: Fix sparc/elf for linux/sparc + * Upstream: Fix alpha/elf for gcc 3.0 + * Supposedly required for gcc-3.0 usage on many platforms + * Add s390 to multiarch list (closes: Bug#98095) + * Supposedly good on mips, but please check. I emailed Ryan + to see if bug 98095 still happens, but never got a reply. + If I get around it, I'll check it myself since my mips + lives once again. + * Retake my package from Matt (next time we agree to an NMU, + please don't change the maintainer name...no wonder I didn't + get any bug reports!) + * Cross-compilation support will be added in the next upload + (I'll be uploading alpha debs with the next release as well, + the alpha problem outweighs cross-compilation support in + priority right now). + + -- Christopher C. Chimelis Thu, 19 Jul 2001 05:12:05 -0400 + +binutils (2.11.90.0.7-2) unstable; urgency=high + + * Applied patch from Alan Modra to fix m68k + assertion problems (closes: Bug#96352) + * Applied srec patch from Richard Henderson for + alpha. + + -- Christopher C. Chimelis Wed, 9 May 2001 03:11:19 -0400 + +binutils (2.11.90.0.7-1) unstable; urgency=high + + * New upstream source (synced with 20010425 CVS) + * Upstream: Fix the -Bsymbolic bug introduced in + binutils 2.11.90.0.5 (closes: Bug#95168) + + -- Christopher C. Chimelis Sun, 29 Apr 2001 20:03:22 -0400 + +binutils (2.11.90.0.5-1) unstable; urgency=high + + * New upstream source (synced with 20010414 CVS) + * Upstream: Fix in IA64 assembler + * Upstream: Change Linux/MIPS to use SVR4 MIPS ABI + rather than IRIX ABI. + * The above change may cause problems for MIPS. + If so, please file a bug and I'll revert those + changes if need be. I suspect that glibc, gcc, + and the kernel may eventually follow suit, though + to fit in with this change (it makes sense... + see the symbol ordering problems threads on the + binutils list for more info). + * Upstream: IA32 gas bug fixed...no further details + provided, unfortunately. + * Reportedly fixes core dumping when trying to link + object files from other platforms (now warns) + (closes: Bug#60502) + * Includes Philip Blundell's ARM PLT patch finally... + sorry for the delay (closes: Bug#94181) + * m68k problems should be fixed by now. Wish I had + gotten more feedback, but I didn't so I'm assuming it + works at this point (closes: Bug#74396) + * Stopped compiling cross-compiler packages until we + work out a better system for the entire toolchain. + Sorry, but it was taking far too long on even fast + machines and I've gotten more complaints about the + current arrangement than I have positive feedback. + (closes: Bug#91120, Bug#91119, Bug#91118, Bug#91117, + Bug#91116, Bug#88311, Bug#78028, Bug#90177) + * Fixed readelf manpage so that it no longer says that + it is a preprocessor for assembly programs + (closes: Bug#90798) + + -- Christopher C. Chimelis Tue, 17 Apr 2001 20:07:14 -0400 + +binutils (2.11.90.0.1-1) unstable; urgency=high + + * New upstream source (synced with 20010309 + CVS). + * Fixed misapplied m68k ld patch. + I am hoping that this almost totally fixes + m68k ELF for now. + * Fixed typo in mips patch and applied another + mips patch from Daniel Jacobowitz. + * Should no longer build same-arch cross + packages. Please let me know if this fix + worked so that I can close the bugs (I have + no access to such an arch at the moment) + * Made urgency high since m68k really needs + this if the bugs are truly fixed. Even if + not, this version is infinitely better on + at least two platforms than prior ones were. + + -- Christopher C. Chimelis Thu, 15 Mar 2001 16:29:32 -0500 + +binutils (2.10.91.0.2-4) unstable; urgency=low + + * Applied m68k ld and bfd patches from + Michael Fedrowitz to hopefully make things + better on m68k. + + -- Christopher C. Chimelis Sun, 11 Mar 2001 20:16:44 -0500 + +binutils (2.10.91.0.2-3) unstable; urgency=low + + * Adjusted the priority of binutils-doc to + optional. + * Added debhelper build-depends (closes: Bug#87690) + * Fixed postinst problem for new binutils + installations (closes: Bug#87911) + + -- Christopher C. Chimelis Thu, 1 Mar 2001 15:06:50 -0500 + +binutils (2.10.91.0.2-2) unstable; urgency=low + + * Add support for SH and IA64 to binutils-multiarch. + * Applied m68k gas patch from Michael Fedrowitz + in hopes that this will fix the grave bug that + has been such a pain to m68k folks. I'll leave + the bug open until it's verified that it works + ok. + * Applied IA-64 printf patch (closes: Bug#82702) + * Kernels appear to be building fine with this + release on all archs available to me + (closes: Bug#77610) + * Added text during postinst that informs users + to modify their i386 kernel Makefiles for the + --oformat change (closes: Bug#86995) + * Incorporated remaining mips diffs that weren't + already applied upstream (closes: Bug#81280) + * Sparc/sparc64 patch seems to be doing fine, so + closing the bug (closes: Bug#86781) + * Added non-linux cross- package support to rules + (closes: Bug#79948) + * Close misc bugs: + Missing info file in binutils-doc (closes: Bug#78754) + + -- Christopher C. Chimelis Thu, 22 Feb 2001 19:36:12 -0500 + +binutils (2.10.91.0.2-1) unstable; urgency=low + + * New upstream version. + * Added weak symbol relocation patch for sparc/sparc64. + * Included m68k ELF fix from Michael Fedrowitz. + * BIG NOTE: any i386 kernels compiled with this will need + to be patched to change the ld option '-oformat' to + '--oformat' (extra hyphen). + + -- Christopher C. Chimelis Tue, 20 Feb 2001 21:32:44 -0500 + +binutils (2.10.1.0.2-1) unstable; urgency=low + + * New upstream release (really prerel, but better than + using a CVS version). + * Should re-add Compaq demangling style to all + tools (alpha-only). + * Again, hopefully fixes m68k ELF support...still have + no idea why or how this was broken before. + + -- Christopher C. Chimelis Mon, 20 Nov 2000 16:25:44 -0500 + +binutils (2.10.0.27-0.cvs20001011.2) unstable; urgency=low + + * Applied another PowerPC patch to correct the + implementation of .protected and .hidden in the + linker. This should also aid in the glibc + transition on PowerPC. + + -- Christopher C. Chimelis Tue, 17 Oct 2000 13:23:40 -0400 + +binutils (2.10.0.27-0.cvs20001011.1) unstable; urgency=low + + * Applied PowerPC weak symbol patch from CVS to aid + in glibc transition on that platform. + + -- Christopher C. Chimelis Sun, 15 Oct 2000 19:12:22 -0400 + +binutils (2.10.0.27-0.cvs20001011) unstable; urgency=low + + * Grabbed a new CVS version since it backs out a + change that prevented current gcc snapshots from + linking properly to libstdc++v3. This may also + solve some other problems related to global + section symbols (feedback appreciated). + * Finally changed my email address in the control + file (how I overlooked this after all of this + time I'll never know). + + -- Christopher C. Chimelis Wed, 11 Oct 2000 08:59:36 -0400 + +binutils (2.10.0.27-0.cvs20001008) unstable; urgency=low + + * Removed configure.info.gz from binutils-doc since + it didn't really belong there. (closes: Bug#72746) + * Update for hppa/hppa64 targets (included testsuite + changes committed on 07-Oct-2000). (closes: Bug#71524) + * Upstream change to elflink.h to hopefully stop + segfaults on some archs when linking binaries to + shared libs. + + -- Christopher C. Chimelis Sun, 8 Oct 2000 16:14:08 -0400 + +binutils (2.10.0.27-0.cvs20000923.1) unstable; urgency=low + + * Fixed rules file so that builds don't fail when compiling the + binary-arch target (added binary-cross to binary-arch). + * Fixed harmless attempt at removing builddir-avr twice. + + -- Christopher C. Chimelis Thu, 28 Sep 2000 10:39:12 -0400 + +binutils (2.10.0.27-0.cvs20000923) unstable; urgency=low + + * CVS snapshot from 2000-09-23. + * Should fix some (most) HPPA issues. + * Adds binutils-m68k cross-assembler. + + -- Christopher C. Chimelis Sun, 24 Sep 2000 10:19:20 -0400 + +binutils (2.10.0.26-2) unstable; urgency=low + + * Added the avr target for Amtel's AVR MCU's + * Applied Frank I. Smith to generate packages for + multiple cross targets: + + Bump rev number, NOP. + + Testing out bumping up the rev number. + + Added powerpc, arm, mipsel cross binutils packages. + + -- Christopher C. Chimelis Fri, 22 Sep 2000 17:31:44 -0400 + +binutils (2.10.0.26-1) unstable; urgency=low + + * New upstream source. + * Added mips-linux, hppa-linux, and hppa64-linux to multiarch targets + + -- Christopher C. Chimelis Sun, 17 Sep 2000 01:05:49 -0400 + +binutils (2.10.0.24-1) unstable; urgency=low + + * New upstream source. + * Fixes ia32 assembler buglet. + * (Hopefully) fixes PPC visibility problems with + glibc 2.2 + + -- Christopher C. Chimelis Thu, 24 Aug 2000 16:52:44 -0400 + +binutils (2.10.0.18-3) unstable; urgency=low + + * Added build depends stuff. + + -- Christopher C. Chimelis Sat, 5 Aug 2000 21:09:04 -0400 + +binutils (2.10.0.18-2) unstable; urgency=low + + * Added proviso to control file saying that -multiarch + should not be installed by the average user. + + -- Christopher C. Chimelis Sat, 29 Jul 2000 20:07:15 -0400 + +binutils (2.10.0.18-1) unstable; urgency=low + + * New upstream source. + * Should address some needed things for glibc 2.2 + (added new DT_XXXX dynamic tags and fixes DT_NEEDED + link bug) + * Reapplied the now-infamous "ObjC patch" until + we can figure out why we still have this problem + (hint hint hint...we really need to do this). + + -- Christopher C. Chimelis Sat, 22 Jul 2000 13:18:27 -0400 + +binutils (2.10.0.9-4) unstable; urgency=low + + * Applied a patch from Ben Collins to fix sparc64 + linker scripts + + -- Christopher C. Chimelis Sat, 8 Jul 2000 07:24:10 -0400 + +binutils (2.10.0.9-3) unstable; urgency=low + + * Applied a patch from the libstdc++ mailing list to + make sure that the linker doesn't eat the eh_frame + section. + + -- Christopher C. Chimelis Fri, 7 Jul 2000 10:26:59 -0400 + +binutils (2.10.0.9-2) unstable; urgency=low + + * Wow, already a bug fix. + * binutils-dev now provides libiberty.h + + -- Christopher C. Chimelis Fri, 23 Jun 2000 19:54:39 -0400 + +binutils (2.10.0.9-1) unstable; urgency=low + + * New upstream version (more linux-specific). + + -- Christopher C. Chimelis Fri, 23 Jun 2000 14:31:04 -0400 + +binutils (2.10-1) unstable; urgency=low + + * New upstream version (finally, a real release!) + + -- Christopher C. Chimelis Wed, 21 Jun 2000 19:08:14 -0400 + +binutils (2.9.5.0.46-1) unstable; urgency=low + + * New upstream source. + * ELF visibility attribute should work correctly now. + * ia32 "jmp" instructions are now assembled differently + to use relocation for global jumps (affects PIC asm + code). + + -- Christopher C. Chimelis Thu, 8 Jun 2000 21:34:42 -0400 + +binutils (2.9.5.0.42-1) unstable; urgency=low + + * New upstream source. + * Includes a testcase for hidden symbol support. + + -- Christopher C. Chimelis Fri, 19 May 2000 20:48:52 -0400 + +binutils (2.9.5.0.41-1) unstable; urgency=high + + * New upstream source. + * Now includes patch to enable hidden symbol support + needed for gcc 3.0 testing. + + -- Christopher C. Chimelis Fri, 5 May 2000 20:38:41 -0400 + +binutils (2.9.5.0.37-1) frozen unstable; urgency=high + + * Was forced to bring the current frozen version up to + upstream 2.9.5.0.37 in order to fix a rather nasty + i386 gas bug and also since the existing ARM patch + applied in 2.9.5.0.31-3 has been superceded upstream + (closes:Bug#62119) + * Includes proper demangler support for Compaq compiler + usage on Alpha (may be superceded upstream shortly, + but is good enough for potato and for Compaq's usage) + (closes:Bug#62079) + * Added cross-compilation support for individual use. + Please note that the binary packages do not support + this. If you require this feature, you need to compile + the source package changing debian/rules. Also, if + you do this, YMMV since things on this front are changing + rapidly upstream and also because cross-compiling from + certain platforms to others may not work (i386->alpha, + for example). (closes:Bug#59246) + * Fixed replaces statement in binutils-multiarch + (closes:Bug#62496) + * Release Manager: I once again beg that this be included + in potato. I've freed up some time to deal with bug + reports quickly if needed. + + -- Christopher C. Chimelis Sat, 29 Apr 2000 04:03:39 -0400 + +binutils (2.9.5.0.31-3) frozen unstable; urgency=high + + * Applied patch to fix broken ARM code generation (closes:Bug#61977) + + -- Christopher C. Chimelis Fri, 7 Apr 2000 15:50:42 -0400 + +binutils (2.9.5.0.31-2) frozen unstable; urgency=high + + * Remove ld from binutils-multiarch since it doesn't want to + link kernels on several archs properly (fixes severity:important bug) + (closes: Bug#61719, Bug#61615, Bug#51625) + + -- Christopher C. Chimelis Mon, 3 Apr 2000 22:48:55 -0400 + +binutils (2.9.5.0.31-1) frozen unstable; urgency=high + + * Yet another patch (this time from H.J. Lu upstream) to fix + the unlink race condition bug. This is VERY important and + needs to be in potato. It also fixes the temp file creation + problem with objcopy on PPC (closes: Bug#60934) + * New upstream release. Fixes a serious Alpha bug along + with a demangler bug and several others (closes: Bug#61121) + * Should fix apt-get upgrade problem...please test + (closes: Bug#56175) + * Release manager: can we squeeze this in? I know it's a + new version, but the ELF bug on Alpha really needs to + be fixed along with the rest of the above and some others + not mentioned here. + + -- Christopher C. Chimelis Wed, 22 Mar 2000 05:05:12 -0500 + +binutils (2.9.5.0.22-5) frozen unstable; urgency=high + + * Applied fixed patch from Colin Phipps to seal the unlink + race condition in bfd/cache.c (closes: Bug#58865, Bug#57831) + * Installed a proper changelog in binutils-doc + (closes: Bug#58522) + * Closes other older bug (closes: Bug#55801) + * Included bbconv.pl in binutils main package in the doc dir + under the gprof subdir (closes: Bug#57521) + + -- Christopher C. Chimelis Tue, 14 Mar 2000 10:32:52 -0500 + +binutils (2.9.5.0.22-4) frozen unstable; urgency=high + + * Patched gprof/hertz.h to allow binutils to actually + build and work on Hurd (closes: Bug#57564) + * Patched bfd/cache.c to avoid a rare, but possible + security problem when as is creating/opening temp + files (closes: Bug#57831) + + -- Christopher C. Chimelis Thu, 17 Feb 2000 10:31:05 -0500 + +binutils (2.9.5.0.22-3) frozen unstable; urgency=high + + * Removed standards.info...do we really need seven + bugs filed for the same problem + (closes: Bug#54521, Bug#54546, Bug#54614, Bug#54682, Bug#55402, Bug#55582, Bug#55602) + * Changed binutils-multiarch extended description + to mention that a cross-assembling gas is not + included (closes: Bug#49308) + * Closing a bug because it related to lack of disk space + (closes: Bug#52714) + + -- Christopher C. Chimelis Wed, 19 Jan 2000 19:28:09 -0500 + +binutils (2.9.5.0.22-2) unstable; urgency=high + + * Added getopt.h include that was omitted in the -taso patch + (closes: Bug#52380) + * Fixed table misalignment when calling objdump --info + (closes: Bug#51517) + * Added Debian changelog to binutils-doc (closes: Bug#52574) + + -- Christopher C. Chimelis Wed, 15 Dec 1999 19:14:05 -0500 + +binutils (2.9.5.0.22-1) unstable; urgency=high + + * New upstream version. + * More MIPS fixes. + * Added support for -taso linker flag for Alpha. + * Reapplied all previous patches. + + -- Christopher C. Chimelis Wed, 7 Dec 1999 01:08:51 -0600 + +binutils (2.9.5.0.19-1) unstable; urgency=high + + * New upstream version + * Fixes some MIPS problems + * Reapplied the ObjC patch (is this ever going to be fixed upstream) + since it's badly needed right now + + -- Christopher C. Chimelis Thu, 4 Nov 1999 15:00:35 -0400 + +binutils (2.9.5.0.16-3) unstable; urgency=low + + * Added support for mipsel-linux in binutils-multiarch + + -- Christopher C. Chimelis Thu, 4 Nov 1999 15:00:35 -0400 + +binutils (2.9.5.0.16-2) unstable; urgency=low + + * Added a replaces field in the control file to fix + previous file overwrite problems (closes: Bug#47518, Bug#47938) + * Verified manpages are up to date (closes: Bug#18483) + * Added m68k-rtems to targets in -multiarch in hopes + that it will actually work as advertised (closes: Bug#47468) + + -- Christopher C. Chimelis Mon, 25 Oct 1999 15:58:55 -0400 + +binutils (2.9.5.0.16-1) unstable; urgency=low + + * New upstream version. + * Massive bugfix upload on the Debian side: + * Fixes changelog problems between all of the binutils + debs (closes: Bug#47133, Bug#47208, Bug#47211) + * Fixes other overwrite problems (closes: Bug#46991, Bug#47024, Bug#46074) + * Multiarch should now make good diversions when + upgrading (closes: Bug#47359) + * Applied patch from Kevin Buhr to fix ld segfaults with + empty archives (closes: Bug#47019) + * Should have fixed info install problems by now + (closes: Bug#35935) + + -- Christopher C. Chimelis Fri, 15 Oct 1999 03:18:55 -0400 + +binutils (2.9.5.0.14-1) unstable; urgency=low + + * New upstream version. + * Thanks to Matthias Klose for the following: + * Separate documentation to binutils-doc package. + * debian/rules: + - Remove extra /usr/share/doc/binutils/changelog.gz file. + - Move bfd docs to binutils-dev package. + - Move upstream changelogs to binutils-doc package. + - Remove standard GNU info files left in /usr/share/info. + - Call dh_installdocs for all packages. + * debian/*{dirs,files}: Remove. Mention explicitely in debian/rules. + + -- Christopher C. Chimelis Wed, 6 Oct 1999 03:18:55 -0400 + +binutils (2.9.5.0.12-2) unstable; urgency=low + + * Applied patch from Matthias Klose to fix many issues including architecture detection. + * Rules file is now much prettier and easier to manage. + * Binutils is now built for i386 rather than i486 in the rules file (oops). + * Added diversion for readelf in binutils-multiarch. + + -- Christopher C. Chimelis Tue, 21 Sep 1999 03:39:08 -0400 + +binutils (2.9.5.0.12-1) unstable; urgency=low + + * Massive bugfix release. + * New upstream source (finally) (closes: Bug#44934) + * Fixes upstream bugs on many platforms. + * Gives powerpc a working binutils again. (closes: Bug#45052) + * Now provides .code16 support on i386 (please test) + * Manpage for objdump should now be complete (closes: Bug#27039) + * Put together manpages for gasp and the new binary readelf (closes: Bug#21918) + * Fixes nm core dump problem (closes: Bug#41999) + * Applied patches from Ben Collins to add sparc64 support (closes: Bug#44426) + * Update Standards version + * FHS compliance + + -- Christopher C. Chimelis Sat, 18 Sept 1999 01:21:05 -0400 + +binutils (2.9.5.0.12-0.2) experimental; urgency=low + + * Added Sparc/Sparc64 changes from Ben Collins (I really need a Sparc one of these days). + * Again, this should be the last experimental before a new release. + + -- Christopher C. Chimelis Fri, 17 Aug 1999 16:32:05 -0400 + +binutils (2.9.5.0.12-0.1) experimental; urgency=low + + * New upstream version. + * Should be the last experimental before a new release. + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.5.0.10-0.1) experimental; urgency=low + + * New upstream version. + * Didn't apply PPC patches...let me know if still needed + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.5.0.6-0.1) experimental; urgency=low + + * New upstream version. + * Didn't apply PPC patches...let me know if still needed + + -- Christopher C. Chimelis Thu, 9 Aug 1999 23:12:52 -0400 + +binutils (2.9.4.0.8-0.1) unstable; urgency=low + + * New upstream version. + * Applied as much of the PPC patches as I could. + + -- Christopher C. Chimelis Thu, 15 Jul 1999 12:46:45 -0400 + +binutils (2.9.4.0.3-0.1) unstable; urgency=low + + * New upstream version. + * Apply patch from Richard Henderson to fix PPC's libpath. + * Apply patch from Franz Sirl to fix Richard Henderson. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.4.0.2-0.1) unstable; urgency=low + + * New upstream version. 2.9.4.0.1 was hurriedly recalled. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.4.0.1-0.1) unstable; urgency=low + + * New upstream version. + + -- Daniel Jacobowitz Sun, 6 Jun 1999 01:27:10 -0400 + +binutils (2.9.1.0.25-2) unstable; urgency=low + + * Added ObjC patch AGAIN...sorry about that + + -- Christopher C. Chimelis Sun, 23 May 1999 15:14:35 -0400 + +binutils (2.9.1.0.25-1) unstable; urgency=low + + * New upstream version - Fixes a PIII asm optimisation bug + + -- Christopher C. Chimelis Sun, 23 May 1999 00:36:55 -0400 + +binutils (2.9.1.0.24-2) unstable; urgency=low + + * Reapplied ObjC patch...apparently it's still needed. + + -- Christopher C. Chimelis Mon, 10 May 1999 19:53:15 -0400 + +binutils (2.9.1.0.24-1) unstable; urgency=low + + * New upstream release - fixes too many little things to mention. + + -- Christopher C. Chimelis Tue, 3 May 1999 16:35:08 -0400 + +binutils (2.9.1.0.23-1) unstable; urgency=low + + * New upstream release - incorporates sparc64 and arm patches. + * Added RPATH patch from Joel Klecker since my last upload failed. + * Removed ObjC patch. Let me know if it is still needed (doubtful, but + still might be). + + -- Christopher C. Chimelis Mon, 5 Apr 1999 13:26:55 -0500 + +binutils (2.9.1.0.22b-2) unstable; urgency=low + + * Added patch from Joel Klecker to finally (properly) fix the rpath issue + (Thanks, Joel!). + + -- Christopher C. Chimelis Fri, 2 Apr 1999 18:14:05 -0600 + +binutils (2.9.1.0.22b-1) unstable; urgency=low + + * Converted package to CVS (so bear with any delays in handling + bug fixes; I'm new to CVS ironically) + * New upstream version (sparc64 and ARM patches again added). + * Added support for mingw32 target in binutils-multiarch + + -- Christopher C. Chimelis Fri, 12 Mar 1999 03:51:44 -0600 + +binutils (2.9.1.0.19a-4) frozen unstable; urgency=high + * Added sparc64 patches from Steve Dunham to fix sparc64 targets + * Modified rules to add support for gcc/egcs by arch. + + -- Christopher C. Chimelis Mon, 1 Feb 1999 15:51:19 -0600 + +binutils (2.9.1.0.19a-3) frozen unstable; urgency=high + + * Reverted a patch to elflink.h that caused problems for + Obj-C code (symbols weren't exported with a size or + type). + + -- Christopher C. Chimelis Thu, 21 Jan 1999 19:25:17 -0600 + +binutils (2.9.1.0.19a-2) frozen unstable; urgency=low + + * Added arm-linux as multiarch target (sorry Jim). + * Uploaded to frozen to fix strange intermittant kernel + compilation problems (Fixes #31434). + * Fixed multiarch's postinst script to check for + c++filt.single before trying to remove it to prevent + warning messages if using g++ from egcs. + * Fixed typo in multiarch's postrm (addr2line) (Fixes: #31533) + * Added links to .so's for clean removal in the future (Fixes: #31536) + + -- Christopher C. Chimelis Fri, 8 Jan 1999 15:28:32 -0600 + +binutils (2.9.1.0.19a-1) unstable; urgency=low + + * New upstream version; fixes some Alpha problems and other archs + should benefit also. + * Added ARM target patch from Corel again (still not in upstream). + + -- Christopher C. Chimelis Mon, 4 Jan 1999 20:24:36 -0600 + +binutils (2.9.1.0.16-1) unstable; urgency=low + + * New upstream version; merges some ARM patches for Netwinders + * Added patch for ARM target from Corel (thanks Jim Pick) + + -- Christopher C. Chimelis Mon, 30 Nov 1998 16:59:25 -0600 + +binutils (2.9.1.0.15-5) frozen unstable; urgency=low + + * Reuploaded to frozen (why it wasn't there earlier....) + + -- Christopher C. Chimelis Mon, 30 Nov 1998 16:37:08 -0600 + +binutils (2.9.1.0.15-4) unstable frozen; urgency=low + + * Removed c++filt diversion in -multiarch to prevent conflicting + diversions when using egcs' g++ (which also wants to divert c++filt) + + -- Christopher C. Chimelis Wed, 25 Nov 1998 18:06:17 -0600 + +binutils (2.9.1.0.15-3) unstable frozen; urgency=low + + * Made Roman's changes "official" (thanks Roman). + + -- Christopher C. Chimelis Mon, 2 Nov 1998 05:46:56 -0600 + +binutils (2.9.1.0.15-2.1) unstable; urgency=low + + * Non-maintainer upload with agreement from Chris. + * Use a different soname for multi-arch libbfd and libopcodes; this + fixes the problem that the single-arch binaries (as and the diverted + ones) will all dump core because they're runtime-linked against the + multi-arch libs. (Fixes: #28656) + * Due to the above, binutils-multiarch also needs ldconfig in postinst + now. + * Fixup diversions once again: Do not even package the ldscripts for the + native architecture, so diversions for files in /usr/lib/ldscripts + aren't necessary. + * Also remove diversions on abort-install. + * Remove now obsolete diversions in preinst. + * Also symlink /usr/doc/binutils-multiarch to binutils, and do not + put /usr/doc/binutils in the package again. + * Put the symlinks libbfd.so and libopcode.so into binutils-dev, so one + can link to them. + + -- Roman Hodek Sat, 31 Oct 1998 11:31:14 +0100 + +binutils (2.9.1.0.15-2) unstable; urgency=low + + * Fixed binutils-multiarch diversions + * Reverted elf.c to .13 version to fix bug in strip + + -- Christopher C. Chimelis Tue, 27 Oct 1998 05:26:28 -0600 + +binutils (2.9.1.0.15-1) unstable; urgency=low + + * New upstream version. + * Moved over to debhelper and updated standards version to 2.4.1.4. + * Adds 3DNow instruction support for AMD processors. + * Fixes MANY Alpha bugs and a few for Sparc, PPC, and m68k reportedly. + * Added binutils-multiarch package to allow for multiple-arch support + (fixes bug #19471). + + -- Christopher C. Chimelis Thu, 14 Oct 1998 19:30:10 -0500 + +binutils (2.9.1.0.13-1) unstable; urgency=low + + * New upstream version, fixes bug #25354. + * Hopefully, all requested docs are included, fixes bug #21325. + * Fixes MANY Alpha problems. + * Reportedly may fix MIPS and Sparc problems also...see changelogs. + * Has been tested on x86's with great success. + + -- Christopher C. Chimelis Mon, 5 Oct 1998 23:02:08 -0500 + +binutils (2.9.1-0.2) frozen unstable; urgency=low + + * Fixed binutils-dev dependencies. + + -- Joel Klecker Tue, 05 May 1998 09:24:04 -0700 + +binutils (2.9.1-0.1) frozen unstable; urgency=medium + + * Non-maintainer release. + * New upstream release. + * Moved docs into subdirs where appropriate. + * Integrated the following changes from J.H.M. Dassen: + * Updated FSF address in copyright file. (lintian). + * Reported lack of "gasp" manpage (# ....), and link it to + undocumented(7). (lintian). + * Added a TODO list. + + -- Joel Klecker Thu, 30 Apr 1998 10:43:42 -0700 + +binutils (2.9-0.3) frozen unstable; urgency=medium + + * Added upstream patch which fixes a problem with strip + and netscape (#17971). + + -- Joel Klecker Tue, 28 Apr 1998 08:58:27 -0700 + +binutils (2.9-0.2) frozen unstable; urgency=low + + * Added more of the upstream docs (#21325). + * Put a changelog.gz symlink in /usr/doc/binutils + to satisfy policy. + + -- Joel Klecker Tue, 21 Apr 1998 09:02:22 -0700 + +binutils (2.9-0.1) frozen unstable; urgency=low + + * Non-maintainer release. + * New upstream release (bugfixes only). + + -- Joel Klecker Sun, 12 Apr 1998 04:11:07 -0700 + +binutils (2.8.1.0.23-1) unstable; urgency=low + + * New upstream version + * -dev replaces libc5-dev (#17840) + * No longer possible to link against shared libbbfd/opcodes (#18121) + + -- Galen Hazelwood Sat, 14 Mar 1998 18:19:10 -0700 + +binutils (2.8.1.0.19-1) unstable; urgency=low + + * New upstream version (#17296) + * Fixed typo in description (#16481) + * Fully replaces libbfd-dev (#16619) + + -- Galen Hazelwood Sun, 25 Jan 1998 15:37:03 -0700 + +binutils (2.8.1.0.17-1) unstable; urgency=low + + * New upstream version + * Rejoined libbfd and binutils packages (#15486) + * Added "SHELL=bash" to rules file (#14528) + * bfd info docs seem to be broken, don't install for now + + -- Galen Hazelwood Sat, 6 Dec 1997 14:55:26 -0700 + +binutils (2.8.1.0.15-1) unstable; urgency=low + + * New upstream version (#14250) + * Updated to Standard 2.3.0.0 + * Restored ansidecl.h to libbfd-dev (#14116) + + -- Galen Hazelwood Thu, 30 Oct 1997 20:04:24 -0700 + +binutils (2.8.1-2) unstable; urgency=low + + * Added 2.8.1.0.4 patch + + -- Galen Hazelwood Thu, 12 Jun 1997 20:49:57 -0600 + +binutils (2.8.1-1) unstable; urgency=low + + * New upstream version + * Added 2.8.1.0.1 patch + + -- Galen Hazelwood Fri, 30 May 1997 14:48:42 -0600 + +binutils (2.8-1) unstable; urgency=low + + * New upstream version + * Smarter debian build environment (automatic version handling) + * Added 2.8.0.3 patch + * Built with libc6 + + -- Galen Hazelwood Sun, 4 May 1997 11:16:12 -0600 + +binutils (2.7.0.9-3) frozen unstable; urgency=low + + * Patched for alpha support + * Distribute libiberty.a with -dev package (#8376) + * libbfd[x]-dev now has standard Provides/Conflicts behavior (#8377) + + -- Galen Hazelwood Fri, 28 Mar 1997 11:45:58 -0700 + +binutils (2.7.0.9-2) unstable; urgency=low + + * Moved 2.7.0.9 out of experimental (no longer unreleased beta) + + -- Galen Hazelwood Sun, 9 Mar 1997 23:43:19 -0700 + +binutils (2.7.0.9-1) experimental; urgency=low + + * New upstream beta version (fixes bug #7336) + * Split shared libraries (bfd) out of binutils (fixes bug #7244) + * No longer builds aout-binutils + + -- Galen Hazelwood Thu, 13 Feb 1997 00:27:18 -0700 + +binutils (2.7-6) unstable; urgency=low + + * Uses dpkg --print-gnu-build-architecture for build + * Demoted aout-binutils to priority "extra" + + -- Galen Hazelwood Mon, 27 Jan 1997 13:34:08 -0700 + +binutils (2.7-5) unstable; urgency=low (HIGH for m68k) + + * Added patch for m68k, will now compile X68 and kernel 2.1.15 + + -- Galen Hazelwood Tue, 31 Dec 1996 22:15:03 -0700 + +binutils (2.7-4) unstable; urgency=low + + * New maintainer + * Updated to new source format + * Fixed typo in script.1 (Fixes bug #4558) + * Fixed typo in as.1 (Fixes bug #5567) + * Postinst now calls ldconfig without explicit pathname (Fixes bug #6151) + + -- Galen Hazelwood Mon, 30 Dec 1996 12:10:25 -0700 + +binutils (2.7-3): + +Remove lib*.so links so the libs are not used for develpment. +gzip manpages + +Changes made by Michael Meskes in consent with David Engel. + +binutils (2.7-2): + +Include shared libraries +Strip shared libraries +Also update AOUT version +Minor changes to debian.rules + +binutils (2.7-1): + +Updated to new upstream version. + +Added a simple extended description (Bug#3574). + +Don't call ldconfig from postrm script (Bug#4246). + + LocalWords: Aurelien Jarno + --- binutils-2.21.51.20110421.orig/debian/README.cross +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/watch +++ binutils-2.21.51.20110421/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://ftp.gnu.org/gnu/binutils/binutils-([\d\.]*).tar.gz --- binutils-2.21.51.20110421.orig/debian/ld.gold.1 +++ binutils-2.21.51.20110421/debian/ld.gold.1 @@ -0,0 +1,625 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.39.3. +.TH GOLD "1" "May 2011" "gold (GNU Binutils for Debian 2.21.51.20110421) 1.11" "User Commands" +.SH NAME +gold \- manual page for gold (GNU Binutils for Debian 2.21.51.20110421) 1.11 +.SH SYNOPSIS +.B ld.gold +[\fIoptions\fR] \fIfile\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\-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\-\-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\-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\-EB\fR +Link big\-endian objects. +.TP +\fB\-\-eh\-frame\-hdr\fR +Create exception frame header +.TP +\fB\-EL\fR +Link little\-endian objects. +.TP +\fB\-\-no\-enum\-size\-warning\fR +(ARM only) Do not warn about objects with incompatible enum sizes +.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\-\-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\-h\fR FILENAME, \fB\-soname\fR FILENAME +Set shared library name +.TP +\fB\-i\fR +Ignored +.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\-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\-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\-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\-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\-m\fR EMULATION +Ignored for compatibility +.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\-\-pic\-executable\fR +Create a position independent executable +.TP +\fB\-no\-pipeline\-knowledge\fR +(ARM only) Ignore for backward compatibility +.TP +\fB\-\-plugin\fR PLUGIN +Load a plugin library +.TP +\fB\-\-plugin\-opt\fR OPTION +Pass an option to the plugin +.TP +\fB\-\-preread\-archive\-symbols\fR +Preread archive symbols when multi\-threaded +.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\-\-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\-\-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 <= 6.7) +.TP +\fB\-\-strip\-lto\-sections\fR +Strip LTO intermediate code sections +.TP +\fB\-\-stub\-group\-size\fR SIZE +(ARM only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after the group. 1 means using 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\-u\fR SYMBOL, \fB\-\-undefined\fR SYMBOL +Create undefined reference to SYMBOL +.TP +\fB\-\-verbose\fR +Synonym for \fB\-\-debug\fR=\fIfiles\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\-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 textoff +Permit relocations in read\-only segments (default) +.PP +debian/tmp/usr/bin/ld.gold: supported targets: elf32\-bigarm elf32\-littlearm elf64\-powerpcle elf64\-powerpc elf32\-powerpcle elf32\-powerpc elf64\-sparc elf32\-sparc elf64\-x86\-64 elf64\-x86\-64\-freebsd elf32\-i386 elf32\-i386\-freebsd +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright 2011 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. +.SH "SEE ALSO" +The full documentation for +.B gold +is maintained as a Texinfo manual. If the +.B info +and +.B gold +programs are properly installed at your site, the command +.IP +.B info gold +.PP +should give you access to the complete manual. --- binutils-2.21.51.20110421.orig/debian/source/format +++ binutils-2.21.51.20110421/debian/source/format @@ -0,0 +1 @@ +1.0 --- binutils-2.21.51.20110421.orig/debian/patches/159_gas-i8775.diff +++ binutils-2.21.51.20110421/debian/patches/159_gas-i8775.diff @@ -0,0 +1,91 @@ +# DP: Fix assembler bug blocking Thumb-2 kernel builds (CS issue #8775). + +2010-06-02 Paul Brook + + Issue #8775 - PC relative LDR from global symbol. + gas/ + * config/tc-arm.c (arm_force_relocation): Resolve all pc-relative + loads. + + gas/testsuite/ + * gas/arm/ldr-global.d: New test. + * gas/arm/ldr-global.s: New test. + +Index: binutils-2.21.0.20110216/gas/testsuite/gas/arm/ldr-global.d +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ binutils-2.21.0.20110216/gas/testsuite/gas/arm/ldr-global.d 2011-02-16 18:25:14.528229049 +0000 +@@ -0,0 +1,14 @@ ++#objdump: -dr --prefix-addresses --show-raw-insn ++#name: PC-relative LDR from global ++ ++.*: +file format .*arm.* ++ ++Disassembly of section .text: ++0+00 <[^>]*> e59f0010 ? ldr r0, \[pc, #16\] ; 0+18 <[^>]*> ++0+04 <[^>]*> e1df00fc ? ldrsh r0, \[pc, #12\] ; 0+18 <[^>]*> ++0+08 <[^>]*> ed9f0a02 ? vldr s0, \[pc, #8\] ; 0+18 <[^>]*> ++0+0c <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\) ++0+0e <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\) ++0+10 <[^>]*> ed9f 0a01 ? vldr s0, \[pc, #4\] ; 0+18 <[^>]*> ++0+14 <[^>]*> f8df 0000 ? ldr\.w r0, \[pc\] ; 0+18 <[^>]*> ++#... +Index: binutils-2.21.0.20110216/gas/testsuite/gas/arm/ldr-global.s +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ binutils-2.21.0.20110216/gas/testsuite/gas/arm/ldr-global.s 2011-02-16 18:25:14.528229049 +0000 +@@ -0,0 +1,22 @@ ++@ Test pc-relative loads from global objects defined in the same text segment. ++@ See tc-arm.c:arm_force_relocation. ++.arch armv7-a ++.fpu vfp ++.syntax unified ++.text ++foo_arm: ++ ldr r0, bar ++ ldrsh r0, bar ++ vldr s0, bar ++.thumb ++foo_thumb: ++ ldr r0, bar ++ ldr.n r0, bar ++ vldr s0, bar ++ ldr.w r0, bar ++ ++.align 2 ++.globl bar ++bar: ++ .word 42 ++ +Index: binutils-2.21.0.20110216/gas/config/tc-arm.c +=================================================================== +--- binutils-2.21.0.20110216.orig/gas/config/tc-arm.c 2011-02-16 18:23:21.728228999 +0000 ++++ binutils-2.21.0.20110216/gas/config/tc-arm.c 2011-02-16 18:25:14.538229024 +0000 +@@ -21675,14 +21675,25 @@ + } + #endif + +- /* Resolve these relocations even if the symbol is extern or weak. */ ++ /* Resolve these relocations even if the symbol is extern or weak. ++ Technically this is probably wrong due to symbol preemption. ++ In practice these relocations do not have enough range to be useful ++ at dynamic link time, and some code (e.g. in the Linux kernel) ++ expects these references to be resolved. */ + if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE + || fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM ++ || fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM8 + || fixp->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE ++ || fixp->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM ++ || fixp->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM_S2 ++ || fixp->fx_r_type == BFD_RELOC_ARM_THUMB_OFFSET + || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM + || fixp->fx_r_type == BFD_RELOC_ARM_T32_IMMEDIATE + || fixp->fx_r_type == BFD_RELOC_ARM_T32_IMM12 +- || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_PC12) ++ || fixp->fx_r_type == BFD_RELOC_ARM_T32_OFFSET_IMM ++ || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_PC12 ++ || fixp->fx_r_type == BFD_RELOC_ARM_T32_CP_OFF_IMM ++ || fixp->fx_r_type == BFD_RELOC_ARM_T32_CP_OFF_IMM_S2) + return 0; + + /* Always leave these relocations for the linker. */ --- binutils-2.21.51.20110421.orig/debian/patches/140_pr10340.patch +++ binutils-2.21.51.20110421/debian/patches/140_pr10340.patch @@ -0,0 +1,35 @@ +# DP: Proposed patch for PR ld/10340, ld doesn't honor sysroot prefix for ldscripts + +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,24 @@ + directory first. */ + if (! entry->is_archive) + { +- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE); ++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + { + entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename) + && is_sysrooted_pathname (entry->filename, TRUE); --- binutils-2.21.51.20110421.orig/debian/patches/162_ld_cortex_a8_erratum.diff +++ binutils-2.21.51.20110421/debian/patches/162_ld_cortex_a8_erratum.diff @@ -0,0 +1,311 @@ +# DP: Cortex A8 workarounds for PLT tail calls + +bfd/ + * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb + branch to a PLT entry, redirect it to the PLT's Thumb entry point. + +ld/testsuite/ + * ld-arm/cortex-a8-fix-b-plt.s, ld-arm/cortex-a8-fix-b-plt.d, + ld-arm/cortex-a8-fix-bcc-plt.s, ld-arm/cortex-a8-fix-bcc-plt.d, + ld-arm/cortex-a8-fix-bl-plt.s, ld-arm/cortex-a8-fix-bl-plt.d, + ld-arm/cortex-a8-fix-blx-plt.s, ld-arm/cortex-a8-fix-blx-plt.d, + ld-arm/cortex-a8-fix-plt.ld: New tests. + * ld-arm/arm-elf.exp: Run them. + +Index: bfd/elf32-arm.c +=================================================================== +--- ./bfd/elf32-arm.c 2011-04-11 16:23:04.000000000 +0100 ++++ ./bfd/elf32-arm.c 2011-04-12 09:22:06.000000000 +0100 +@@ -4556,6 +4556,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, + bfd_vma target; + enum elf32_arm_stub_type stub_type = arm_stub_none; + struct a8_erratum_reloc key, *found; ++ bfd_boolean use_plt = FALSE; + + key.from = base_vma + i; + found = (struct a8_erratum_reloc *) +@@ -4567,7 +4568,6 @@ cortex_a8_erratum_scan (bfd *input_bfd, + { + char *error_message = NULL; + struct elf_link_hash_entry *entry; +- bfd_boolean use_plt = FALSE; + + /* We don't care about the error returned from this + function, only if there is glue or not. */ +@@ -4671,6 +4671,12 @@ cortex_a8_erratum_scan (bfd *input_bfd, + offset = + (bfd_signed_vma) (found->destination - pc_for_insn); + ++ /* If the stub will use a Thumb-mode branch to a ++ PLT target, redirect it to the preceding Thumb ++ entry point. */ ++ if (stub_type != arm_stub_a8_veneer_blx && use_plt) ++ offset -= PLT_THUMB_STUB_SIZE; ++ + target = pc_for_insn + offset; + + /* The BLX stub is ARM-mode code. Adjust the offset to +Index: ld/testsuite/ld-arm/cortex-a8-fix-b-plt.s +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-b-plt.s 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,10 @@ ++ .syntax unified ++ .globl foo ++ .type foo,%function ++ .thumb_func ++foo: ++ nop @ 0x00 ++ movw r0,#0 @ 0x02 ++ movw r0,#0 @ 0x06 ++ movw r0,#0 @ 0x0a ++ b.w bar(PLT) @ 0x0e +Index: ld/testsuite/ld-arm/cortex-a8-fix-b-plt.d +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-b-plt.d 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,30 @@ ++ ++.* ++ ++ ++Disassembly of section \.plt: ++ ++00008000 <\.plt>: ++ 8000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) ++ 8004: e59fe004 ldr lr, \[pc, #4\] ; 8010 ++ 8008: e08fe00e add lr, pc, lr ++ 800c: e5bef008 ldr pc, \[lr, #8\]! ++ 8010: 00000ffc \.word 0x00000ffc ++ 8014: 4778 bx pc ++ 8016: 46c0 nop ; \(mov r8, r8\) ++ 8018: e28fc600 add ip, pc, #0 ++ 801c: e28cca00 add ip, ip, #0 ++ 8020: e5bcfff8 ldr pc, \[ip, #4088\]! ; 0xff8 ++ ++Disassembly of section \.text: ++ ++00008ff0 : ++ 8ff0: 46c0 nop ; \(mov r8, r8\) ++ 8ff2: f240 0000 movw r0, #0 ++ 8ff6: f240 0000 movw r0, #0 ++ 8ffa: f240 0000 movw r0, #0 ++ 8ffe: f000 b803 b\.w 9008 ++ 9002: 0000 movs r0, r0 ++ 9004: 0000 movs r0, r0 ++ 9006: 0000 movs r0, r0 ++ 9008: f7ff b804 b\.w 8014 +Index: ld/testsuite/ld-arm/cortex-a8-fix-bcc-plt.s +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-bcc-plt.s 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,10 @@ ++ .syntax unified ++ .globl foo ++ .type foo,%function ++ .thumb_func ++foo: ++ nop @ 0x00 ++ movw r0,#0 @ 0x02 ++ movw r0,#0 @ 0x06 ++ movw r0,#0 @ 0x0a ++ beq.w bar(PLT) @ 0x0e +Index: ld/testsuite/ld-arm/cortex-a8-fix-bcc-plt.d +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-bcc-plt.d 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,32 @@ ++ ++.* ++ ++ ++Disassembly of section \.plt: ++ ++00008000 <\.plt>: ++ 8000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) ++ 8004: e59fe004 ldr lr, \[pc, #4\] ; 8010 ++ 8008: e08fe00e add lr, pc, lr ++ 800c: e5bef008 ldr pc, \[lr, #8\]! ++ 8010: 00001004 \.word 0x00001004 ++ 8014: 4778 bx pc ++ 8016: 46c0 nop ; \(mov r8, r8\) ++ 8018: e28fc600 add ip, pc, #0 ++ 801c: e28cca01 add ip, ip, #4096 ; 0x1000 ++ 8020: e5bcf000 ldr pc, \[ip\]! ++ ++Disassembly of section \.text: ++ ++00008ff0 : ++ 8ff0: 46c0 nop ; \(mov r8, r8\) ++ 8ff2: f240 0000 movw r0, #0 ++ 8ff6: f240 0000 movw r0, #0 ++ 8ffa: f240 0000 movw r0, #0 ++ 8ffe: f000 b803 b\.w 9008 ++ 9002: 0000 movs r0, r0 ++ 9004: 0000 movs r0, r0 ++ 9006: 0000 movs r0, r0 ++ 9008: d001 beq\.n 900e ++ 900a: f7ff bffa b\.w 9002 ++ 900e: f7ff b801 b\.w 8014 +Index: ld/testsuite/ld-arm/cortex-a8-fix-bl-plt.s +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-bl-plt.s 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,10 @@ ++ .syntax unified ++ .globl foo ++ .type foo,%function ++ .thumb_func ++foo: ++ nop @ 0x00 ++ movw r0,#0 @ 0x02 ++ movw r0,#0 @ 0x06 ++ movw r0,#0 @ 0x0a ++ bl bar(PLT) @ 0x0e +Index: ld/testsuite/ld-arm/cortex-a8-fix-bl-plt.d +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-bl-plt.d 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,28 @@ ++ ++.* ++ ++ ++Disassembly of section \.plt: ++ ++00008000 <\.plt>: ++ 8000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) ++ 8004: e59fe004 ldr lr, \[pc, #4\] ; 8010 ++ 8008: e08fe00e add lr, pc, lr ++ 800c: e5bef008 ldr pc, \[lr, #8\]! ++ 8010: 00000ffc \.word 0x00000ffc ++ 8014: e28fc600 add ip, pc, #0 ++ 8018: e28cca00 add ip, ip, #0 ++ 801c: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc ++ ++Disassembly of section \.text: ++ ++00008ff0 : ++ 8ff0: 46c0 nop ; \(mov r8, r8\) ++ 8ff2: f240 0000 movw r0, #0 ++ 8ff6: f240 0000 movw r0, #0 ++ 8ffa: f240 0000 movw r0, #0 ++ 8ffe: f000 e804 blx 9008 ++ 9002: 0000 movs r0, r0 ++ 9004: 0000 movs r0, r0 ++ 9006: 0000 movs r0, r0 ++ 9008: eafffc01 b 8014 +Index: ld/testsuite/ld-arm/cortex-a8-fix-blx-plt.s +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-blx-plt.s 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,10 @@ ++ .syntax unified ++ .globl foo ++ .type foo,%function ++ .thumb_func ++foo: ++ nop @ 0x00 ++ movw r0,#0 @ 0x02 ++ movw r0,#0 @ 0x06 ++ movw r0,#0 @ 0x0a ++ blx bar @ 0x0e +Index: ld/testsuite/ld-arm/cortex-a8-fix-blx-plt.d +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-blx-plt.d 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,28 @@ ++ ++.* ++ ++ ++Disassembly of section \.plt: ++ ++00008000 <\.plt>: ++ 8000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) ++ 8004: e59fe004 ldr lr, \[pc, #4\] ; 8010 ++ 8008: e08fe00e add lr, pc, lr ++ 800c: e5bef008 ldr pc, \[lr, #8\]! ++ 8010: 00000ffc \.word 0x00000ffc ++ 8014: e28fc600 add ip, pc, #0 ++ 8018: e28cca00 add ip, ip, #0 ++ 801c: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc ++ ++Disassembly of section \.text: ++ ++00008ff0 : ++ 8ff0: 46c0 nop ; \(mov r8, r8\) ++ 8ff2: f240 0000 movw r0, #0 ++ 8ff6: f240 0000 movw r0, #0 ++ 8ffa: f240 0000 movw r0, #0 ++ 8ffe: f000 e804 blx 9008 ++ 9002: 0000 movs r0, r0 ++ 9004: 0000 movs r0, r0 ++ 9006: 0000 movs r0, r0 ++ 9008: eafffc01 b 8014 +Index: ld/testsuite/ld-arm/cortex-a8-fix-plt.ld +=================================================================== +--- /dev/null 2011-03-23 08:42:11.268792848 +0000 ++++ ./ld/testsuite/ld-arm/cortex-a8-fix-plt.ld 2011-04-11 16:23:18.000000000 +0100 +@@ -0,0 +1,18 @@ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x07000; ++ .hash : { *(.hash) } ++ .gnu.hash : { *(.gnu.hash) } ++ .dynsym : { *(.dynsym) } ++ .dynstr : { *(.dynstr) } ++ .rel.dyn : { *(.rel.dyn) } ++ .rel.plt : { *(.rel.plt) } ++ . = 0x08000; ++ .plt : { *(.plt) } ++ . = 0x08ff0; ++ .text : { *(.text) } ++ . = 0x10000; ++ .dynamic : { *(.dynamic) } ++} +Index: ld/testsuite/ld-arm/arm-elf.exp +=================================================================== +--- ld/testsuite/ld-arm/arm-elf.exp 2011-04-11 16:23:04.000000000 +0100 ++++ ./ld/testsuite/ld-arm/arm-elf.exp 2011-04-11 16:23:18.000000000 +0100 +@@ -210,18 +210,38 @@ set armelftests { + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s} + {{objdump -dr cortex-a8-fix-b.d}} + "cortex-a8-fix-b"} ++ {"Cortex-A8 erratum fix, b.w to PLT" ++ "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "-EL" ++ {cortex-a8-fix-b-plt.s} ++ {{objdump -dr cortex-a8-fix-b-plt.d}} ++ "cortex-a8-fix-b-plt"} + {"Cortex-A8 erratum fix, bl.w" + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s} + {{objdump -dr cortex-a8-fix-bl.d}} + "cortex-a8-fix-bl"} ++ {"Cortex-A8 erratum fix, bl.w to PLT" ++ "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "-EL" ++ {cortex-a8-fix-bl-plt.s} ++ {{objdump -dr cortex-a8-fix-bl-plt.d}} ++ "cortex-a8-fix-bl-plt"} + {"Cortex-A8 erratum fix, bcc.w" + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s} + {{objdump -dr cortex-a8-fix-bcc.d}} + "cortex-a8-fix-bcc"} ++ {"Cortex-A8 erratum fix, bcc.w to PLT" ++ "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "-EL" ++ {cortex-a8-fix-bcc-plt.s} ++ {{objdump -dr cortex-a8-fix-bcc-plt.d}} ++ "cortex-a8-fix-bcc-plt"} + {"Cortex-A8 erratum fix, blx.w" + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s} + {{objdump -dr cortex-a8-fix-blx.d}} + "cortex-a8-fix-blx"} ++ {"Cortex-A8 erratum fix, blx.w to PLT" ++ "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "-EL" ++ {cortex-a8-fix-blx-plt.s} ++ {{objdump -dr cortex-a8-fix-blx-plt.d}} ++ "cortex-a8-fix-blx-plt"} + {"Cortex-A8 erratum fix, relocate b.w to ARM" + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s} + {{objdump -dr cortex-a8-fix-b-rel-arm.d}} --- binutils-2.21.51.20110421.orig/debian/patches/012_check_ldrunpath_length.patch +++ binutils-2.21.51.20110421/debian/patches/012_check_ldrunpath_length.patch @@ -0,0 +1,23 @@ +Author: Chris Chimelis +Description: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +cases where -rpath isn't specified. (#151024) +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1266,6 +1266,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1493,6 +1495,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) --- binutils-2.21.51.20110421.orig/debian/patches/158_ld_system_root.patch +++ binutils-2.21.51.20110421/debian/patches/158_ld_system_root.patch @@ -0,0 +1,36 @@ +--- a/ld/configure.in ++++ b/ld/configure.in +@@ -38,7 +38,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 +--- a/ld/configure ++++ b/ld/configure +@@ -4139,7 +4139,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 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -214,8 +214,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.21.51.20110421.orig/debian/patches/129_ld_mulitarch_dirs.patch +++ binutils-2.21.51.20110421/debian/patches/129_ld_mulitarch_dirs.patch @@ -0,0 +1,72 @@ +# DP: Add multiarch directories to linker search path. + +Index: binutils-2.21.0.20110322/ld/genscripts.sh +=================================================================== +--- binutils-2.21.0.20110322.orig/ld/genscripts.sh 2011-03-27 18:45:12.283057003 +0000 ++++ binutils-2.21.0.20110322/ld/genscripts.sh 2011-03-27 18:51:20.623057182 +0000 +@@ -240,6 +240,65 @@ + fi + + LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` ++if [ -n "$DEB_HOST_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_HOST_MULTIARCH32" ]; then ++ case $EMULATION_NAME in ++ elf_i386|elf32*) ++ temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH32 ";; ++ *) ++ temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH " ++ esac ++ elif [ -n "$DEB_HOST_MULTIARCH64" ]; then ++ case $EMULATION_NAME in ++ elf*_64|elf64*) ++ temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH64 ";; ++ *) ++ temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH " ++ esac ++ else ++ temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH " ++ fi ++ ;; ++ */lib32) ++ if [ -n "$DEB_HOST_MULTIARCH32" ]; then ++ dir2=$(echo $dir | sed "s,32$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH32 " ++ fi ++ ;; ++ */lib64) ++ case "${target}" in ++ powerpc64-*-*|s390x-*-*|sparc64-*-*|x86_64-*-linux*) ++ #dir=$(echo $dir | sed "s,64$,,") ++ dir2=$(echo $dir | sed "s,64$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH " ++ ;; ++ *) ++ if [ -n "$DEB_HOST_MULTIARCH64" ]; then ++ dir2=$(echo $dir | sed "s,64$,,") ++ temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH64 " ++ fi ++ ;; ++ esac ++ ;; ++ *) ++ ;; ++ 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 --- binutils-2.21.51.20110421.orig/debian/patches/127_x86_64_i386_biarch.patch +++ binutils-2.21.51.20110421/debian/patches/127_x86_64_i386_biarch.patch @@ -0,0 +1,20 @@ +Author: +Description: Description: Add (/usr)/lib32 to the search paths on x86_64. +Author: Aurelien Jarno +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=12 + IREL_IN_PLT= ++ ++# Linux modify the default library search path to first include ++# a 32-bit specific directory. ++case "$target" in ++ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu) ++ case "$EMULATION_NAME" in ++ *i386*) LIBPATH_SUFFIX=32 ;; ++ esac ++ ;; ++esac --- binutils-2.21.51.20110421.orig/debian/patches/130_gold_disable_testsuite_build.patch +++ binutils-2.21.51.20110421/debian/patches/130_gold_disable_testsuite_build.patch @@ -0,0 +1,26 @@ +Author: +Description: Description: Disable build of gold/testsuite +Author: Matthias Klose +Upstream status: local +--- a/gold/Makefile.am ++++ b/gold/Makefile.am +@@ -2,7 +2,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = po testsuite ++SUBDIRS = po + + tooldir = $(exec_prefix)/$(target_alias) + +--- a/gold/Makefile.in ++++ b/gold/Makefile.in +@@ -355,7 +355,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.21.51.20110421.orig/debian/patches/128_ppc64_powerpc_biarch.patch +++ binutils-2.21.51.20110421/debian/patches/128_ppc64_powerpc_biarch.patch @@ -0,0 +1,15 @@ +--- a/ld/emulparams/elf32ppccommon.sh 2011-03-01 21:36:22.239025005 +0000 ++++ b/ld/emulparams/elf32ppccommon.sh 2011-03-01 21:38:13.187024999 +0000 +@@ -48,3 +48,12 @@ + case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; + 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.21.51.20110421.orig/debian/patches/162_pr12730.diff +++ binutils-2.21.51.20110421/debian/patches/162_pr12730.diff @@ -0,0 +1,392 @@ +# DP: Fix PR ld/12730, taken from the trunk + +2011-05-07 H.J. Lu + + PR ld/12730 + * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY. + + * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors + sections if needed. + + * section.c (SEC_ELF_REVERSE_COPY): New. + * bfd-in2.h: Regenerated. + +2011-05-07 H.J. Lu + + PR ld/12730 + * ld-elf/elf.exp (array_tests): Add "pr12730". + (array_tests_pie): New. + (array_tests_static): Add -static for "static init array mixed". + Add "static pr12730". Run array_tests_pie for Linux. + + * ld-elf/init-mixed.c (ctor1007): Renamed to ... + (ctor1007a): This. + (ctor1007b): New. + (ctors1007): Remove ctor1007. Add ctor1007b and ctor1007a. + (dtor1007): Renamed to ... + (dtor1007a): This. + (dtor1007b): New. + (dtors1007): Remove dtor1007. Add dtor1007b and dtor1007a. + (ctor65535): Renamed to ... + (ctor65535a): This. + (ctor65535b): New. + (ctors65535): Remove ctor65535. Add ctor65535b and ctor65535a. + (dtor65535): Renamed to ... + (dtor65535a): This. + (dtor65535b): New. + (dtors65535): Remove dtor65535. Add dtor65535b and dtor65535a. + + * ld-elf/pr12730.cc: New. + * ld-elf/pr12730.out: Likewise. + +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index aa12c8a..5076ccf 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -1320,6 +1320,11 @@ typedef struct bfd_section + sections. */ + #define SEC_COFF_SHARED_LIBRARY 0x4000000 + ++ /* This input section should be copied to output in reverse order ++ as an array of pointers. This is for ELF linker internal use ++ only. */ ++#define SEC_ELF_REVERSE_COPY 0x4000000 ++ + /* This section contains data which may be shared with other + executables or shared objects. This is for COFF only. */ + #define SEC_COFF_SHARED 0x8000000 +diff --git a/bfd/elf.c b/bfd/elf.c +index b5a1952..6fccf42 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -9379,6 +9379,12 @@ _bfd_elf_section_offset (bfd *abfd, + case ELF_INFO_TYPE_EH_FRAME: + return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset); + default: ++ if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0) ++ { ++ const struct elf_backend_data *bed = get_elf_backend_data (abfd); ++ bfd_size_type address_size = bed->s->arch_size / 8; ++ offset = sec->size - offset - address_size; ++ } + return offset; + } + } +diff --git a/bfd/elflink.c b/bfd/elflink.c +index 082355d..e4f728d 100644 +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -9120,6 +9120,9 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) + asection *o; + const struct elf_backend_data *bed; + struct elf_link_hash_entry **sym_hashes; ++ bfd_size_type address_size; ++ bfd_vma r_type_mask; ++ int r_sym_shift; + + output_bfd = finfo->output_bfd; + bed = get_elf_backend_data (output_bfd); +@@ -9290,6 +9293,19 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) + *pindex = indx; + } + ++ if (bed->s->arch_size == 32) ++ { ++ r_type_mask = 0xff; ++ r_sym_shift = 8; ++ address_size = 4; ++ } ++ else ++ { ++ r_type_mask = 0xffffffff; ++ r_sym_shift = 32; ++ address_size = 8; ++ } ++ + /* Relocate the contents of each section. */ + sym_hashes = elf_sym_hashes (input_bfd); + for (o = input_bfd->sections; o != NULL; o = o->next) +@@ -9394,8 +9410,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) + { + Elf_Internal_Rela *internal_relocs; + Elf_Internal_Rela *rel, *relend; +- bfd_vma r_type_mask; +- int r_sym_shift; + int action_discarded; + int ret; + +@@ -9407,15 +9421,27 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) + && o->reloc_count > 0) + return FALSE; + +- if (bed->s->arch_size == 32) ++ /* We need to reverse-copy input .ctors/.dtors sections if ++ they are placed in .init_array/.finit_array for output. */ ++ if (o->size > address_size ++ && ((strncmp (o->name, ".ctors", 6) == 0 ++ && strcmp (o->output_section->name, ++ ".init_array") == 0) ++ || (strncmp (o->name, ".dtors", 6) == 0 ++ && strcmp (o->output_section->name, ++ ".fini_array") == 0)) ++ && (o->name[6] == 0 || o->name[6] == '.')) + { +- r_type_mask = 0xff; +- r_sym_shift = 8; +- } +- else +- { +- r_type_mask = 0xffffffff; +- r_sym_shift = 32; ++ if (o->size != o->reloc_count * address_size) ++ { ++ (*_bfd_error_handler) ++ (_("error: %B: size of section %A is not " ++ "multiple of address size"), ++ input_bfd, o); ++ bfd_set_error (bfd_error_on_input); ++ return FALSE; ++ } ++ o->flags |= SEC_ELF_REVERSE_COPY; + } + + action_discarded = -1; +@@ -9876,12 +9902,34 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) + default: + { + /* FIXME: octets_per_byte. */ +- if (! (o->flags & SEC_EXCLUDE) +- && ! bfd_set_section_contents (output_bfd, o->output_section, +- contents, +- (file_ptr) o->output_offset, +- o->size)) +- return FALSE; ++ if (! (o->flags & SEC_EXCLUDE)) ++ { ++ file_ptr offset = (file_ptr) o->output_offset; ++ bfd_size_type todo = o->size; ++ if ((o->flags & SEC_ELF_REVERSE_COPY)) ++ { ++ /* Reverse-copy input section to output. */ ++ do ++ { ++ todo -= address_size; ++ if (! bfd_set_section_contents (output_bfd, ++ o->output_section, ++ contents + todo, ++ offset, ++ address_size)) ++ return FALSE; ++ if (todo == 0) ++ break; ++ offset += address_size; ++ } ++ while (1); ++ } ++ else if (! bfd_set_section_contents (output_bfd, ++ o->output_section, ++ contents, ++ offset, todo)) ++ return FALSE; ++ } + } + break; + } +diff --git a/bfd/section.c b/bfd/section.c +index 65ac5e6..3cd7e65 100644 +--- a/bfd/section.c ++++ b/bfd/section.c +@@ -327,6 +327,11 @@ CODE_FRAGMENT + . sections. *} + .#define SEC_COFF_SHARED_LIBRARY 0x4000000 + . ++. {* This input section should be copied to output in reverse order ++. as an array of pointers. This is for ELF linker internal use ++. only. *} ++.#define SEC_ELF_REVERSE_COPY 0x4000000 ++. + . {* This section contains data which may be shared with other + . executables or shared objects. This is for COFF only. *} + .#define SEC_COFF_SHARED 0x8000000 +diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp +index 73a417c..6808d8a 100644 +--- a/ld/testsuite/ld-elf/elf.exp ++++ b/ld/testsuite/ld-elf/elf.exp +@@ -81,17 +81,32 @@ set array_tests { + {"init array" "" "" {init.c} "init" "init.out"} + {"fini array" "" "" {fini.c} "fini" "fini.out"} + {"init array mixed" "" "" {init-mixed.c} "init-mixed" "init-mixed.out" "-I."} ++ {"pr12730" "" "" {pr12730.cc} "pr12730" "pr12730.out" "" "c++"} ++} ++set array_tests_pie { ++ {"PIE preinit array" "-pie" "" {preinit.c} "preinit" "preinit.out" "-fPIE" } ++ {"PIE init array" "-pie" "" {init.c} "init" "init.out" "-fPIE"} ++ {"PIE fini array" "-pie" "" {fini.c} "fini" "fini.out" "-fPIE"} ++ {"PIE init array mixed" "-pie" "" {init-mixed.c} "init-mixed" "init-mixed.out" "-I. -fPIE"} ++ {"PIE pr12730" "-pie" "" {pr12730.cc} "pr12730" "pr12730.out" "-fPIE" "c++"} + } + set array_tests_static { + {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"} + {"static init array" "-static" "" {init.c} "init" "init.out"} + {"static fini array" "-static" "" {fini.c} "fini" "fini.out"} +- {"static init array mixed" "" "" {init-mixed.c} "init-mixed" "init-mixed.out" "-I."} ++ {"static init array mixed" "-static" "" {init-mixed.c} "init-mixed" "init-mixed.out" "-I."} ++ {"static pr12730" "-static" "" {pr12730.cc} "pr12730" "pr12730.out" "" "c++"} + } + + # NetBSD ELF systems do not currently support the .*_array sections. + set xfails [list "*-*-netbsdelf*"] + run_ld_link_exec_tests $xfails $array_tests ++ ++# Run PIE tests only on Linux. ++if { [istarget "*-*-linux*"] } { ++ run_ld_link_exec_tests $xfails $array_tests_pie ++} ++ + # Be cautious to not XFAIL for *-*-linux-gnu*, *-*-kfreebsd-gnu*, etc. + switch -regexp $target_triplet { + ^\[^-\]*-\[^-\]*-gnu.*$ { +diff --git a/ld/testsuite/ld-elf/init-mixed.c b/ld/testsuite/ld-elf/init-mixed.c +index 1d0c727..770a4b5 100644 +--- a/ld/testsuite/ld-elf/init-mixed.c ++++ b/ld/testsuite/ld-elf/init-mixed.c +@@ -27,25 +27,39 @@ void (*const fini_array1005[]) () + = { fini1005 }; + + static void +-ctor1007 () ++ctor1007a () + { + if (count != 1005) + abort (); ++ count = 1006; ++} ++static void ++ctor1007b () ++{ ++ if (count != 1006) ++ abort (); + count = 1007; + } + void (*const ctors1007[]) () + __attribute__ ((section (".ctors.64528"), aligned (sizeof (void *)))) +- = { ctor1007 }; ++ = { ctor1007b, ctor1007a }; + static void +-dtor1007 () ++dtor1007a () + { +- if (count != 1007) ++ if (count != 1006) + abort (); + count = 1005; + } ++static void ++dtor1007b () ++{ ++ if (count != 1007) ++ abort (); ++ count = 1006; ++} + void (*const dtors1007[]) () + __attribute__ ((section (".dtors.64528"), aligned (sizeof (void *)))) +- = { dtor1007 }; ++ = { dtor1007b, dtor1007a }; + + static void + init65530 () +@@ -69,17 +83,31 @@ void (*const fini_array65530[]) () + = { fini65530 }; + + static void +-ctor65535 () ++ctor65535a () + { + if (count != 65530) + abort (); + count = 65535; + } ++static void ++ctor65535b () ++{ ++ if (count != 65535) ++ abort (); ++ count = 65536; ++} + void (*const ctors65535[]) () + __attribute__ ((section (".ctors"), aligned (sizeof (void *)))) +- = { ctor65535 }; ++ = { ctor65535b, ctor65535a }; ++static void ++dtor65535b () ++{ ++ if (count != 65536) ++ abort (); ++ count = 65535; ++} + static void +-dtor65535 () ++dtor65535a () + { + if (count != 65535) + abort (); +@@ -87,7 +115,7 @@ dtor65535 () + } + void (*const dtors65535[]) () + __attribute__ ((section (".dtors"), aligned (sizeof (void *)))) +- = { dtor65535 }; ++ = { dtor65535b, dtor65535a }; + #endif + + int +diff --git a/ld/testsuite/ld-elf/pr12730.cc b/ld/testsuite/ld-elf/pr12730.cc +new file mode 100644 +index 0000000..69f57f9 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr12730.cc +@@ -0,0 +1,38 @@ ++#include ++ ++class Hello ++{ ++public: ++ Hello () ++ {} ++ ++ ~Hello () ++ {} ++ ++ void act () ++ { std::cout << "Hello, world!" << std::endl; } ++}; ++ ++ ++template ++struct Foo ++{ ++ T* _M_allocate_single_object () ++ { ++ return new T; ++ } ++}; ++ ++static void __attribute__ (( constructor )) PWLIB_StaticLoader() { ++ Foo allocator; ++ Hello* salut = allocator._M_allocate_single_object (); ++ salut->act (); ++} ++ ++ ++int ++main (int /*argc*/, ++ char* /*argv*/[]) ++{ ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/pr12730.out b/ld/testsuite/ld-elf/pr12730.out +new file mode 100644 +index 0000000..af5626b +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr12730.out +@@ -0,0 +1 @@ ++Hello, world! --- binutils-2.21.51.20110421.orig/debian/patches/135_bfd_version.patch +++ binutils-2.21.51.20110421/debian/patches/135_bfd_version.patch @@ -0,0 +1,47 @@ +Author: +Description: Description: Fix bfd version handling for extra builds + +Index: binutils-2.21.0.20110216/bfd/Makefile.am +=================================================================== +--- binutils-2.21.0.20110216.orig/bfd/Makefile.am 2011-02-01 12:25:32.000000000 +0000 ++++ binutils-2.21.0.20110216/bfd/Makefile.am 2011-02-16 18:28:14.568229030 +0000 +@@ -948,14 +948,14 @@ + + bfdver.h: $(srcdir)/version.h $(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)\"" ;\ + if test "x$(RELEASE)" = x ; 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: binutils-2.21.0.20110216/bfd/Makefile.in +=================================================================== +--- binutils-2.21.0.20110216.orig/bfd/Makefile.in 2011-02-01 12:25:32.000000000 +0000 ++++ binutils-2.21.0.20110216/bfd/Makefile.in 2011-02-16 18:28:34.248228995 +0000 +@@ -1980,14 +1980,14 @@ + + bfdver.h: $(srcdir)/version.h $(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)\"" ;\ + if test "x$(RELEASE)" = x ; 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.21.51.20110421.orig/debian/patches/128_build_id.patch +++ binutils-2.21.51.20110421/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.21.51.20110421.orig/debian/patches/157_ar_scripts_with_tilde.patch +++ binutils-2.21.51.20110421/debian/patches/157_ar_scripts_with_tilde.patch @@ -0,0 +1,11 @@ +--- a/binutils/arlex.l ++++ b/binutils/arlex.l +@@ -77,7 +77,7 @@ + "(" { return '('; } + ")" { return ')'; } + "," { return ','; } +-[A-Za-z0-9/\\$:.\-\_]+ { ++[A-Za-z0-9/\\$:.\-\_~]+ { + yylval.name = xstrdup (yytext); + return FILENAME; + } --- binutils-2.21.51.20110421.orig/debian/patches/134_gold_no_spu.patch +++ binutils-2.21.51.20110421/debian/patches/134_gold_no_spu.patch @@ -0,0 +1,13 @@ +Author: +Description: Description: Don't configure gold for spu target. +--- a/Makefile.in ++++ b/Makefile.in +@@ -21929,7 +21929,7 @@ + srcdiroption="--srcdir=$${topdir}/gold"; \ + libsrcdir="$$s/gold"; \ + $(SHELL) $${libsrcdir}/configure \ +- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ ++ $$(echo $(HOST_CONFIGARGS) |sed 's/,spu//') --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} $${srcdiroption} \ + || exit 1 + @endif gold --- binutils-2.21.51.20110421.orig/debian/patches/003_gprof_see_also_monitor.patch +++ binutils-2.21.51.20110421/debian/patches/003_gprof_see_also_monitor.patch @@ -0,0 +1,13 @@ +Author: Chris Chimelis +Description: Don't mention monitor(3) which doesn't exist in Debian. (#160654) +--- a/gprof/gprof.texi ++++ b/gprof/gprof.texi +@@ -197,7 +197,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.21.51.20110421.orig/debian/patches/156_pr10144.patch +++ binutils-2.21.51.20110421/debian/patches/156_pr10144.patch @@ -0,0 +1,315 @@ +## DP: Description: http://sourceware.org/ml/binutils/2010-09/msg00216.html + +2010-09-15 Maciej W. Rozycki + + PR ld/10144 + + bfd/ + * elfxx-mips.c (_bfd_mips_elf_check_relocs) + [R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from + SEC_DEBUGGING sections. + + ld/testsuite/ + * lib/ld-lib.exp (run_ld_link_tests): Handle sources from other + directories. + (run_ld_link_exec_tests): Likewise. + (run_cc_link_tests): Likewise. + * ld-elf/comm-data1.sd: New test. + * ld-elf/comm-data1.s: Source for the new test. + * ld-elf/comm-data2.sd: New test. + * ld-elf/comm-data2.rd: Likewise. + * ld-elf/comm-data2.xd: Likewise. + * ld-elf/comm-data2.s: Source for the new tests. + * ld-elf/comm-data.exp: Run the new tests. + * ld-mips-elf/comm-data.exp: Likewise. + +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data1.s +@@ -0,0 +1,6 @@ ++ .section .rodata,"a",%progbits ++ .balign 8 ++ .globl foo ++ .type foo,%object ++foo: ++ .skip 4, 0 +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data2.xd +@@ -0,0 +1,2 @@ ++Hex dump of section '\.debug_foo': ++ +0x0+ +00000000 00000000 00000000 00000000 +\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data2.s +@@ -0,0 +1,14 @@ ++ .text ++ .globl _start ++ .globl __start ++_start: ++__start: ++ .comm foo, 4, 4 ++ .section .debug_foo,"",%progbits ++ .balign 16 ++ .ifdef ELF64 ++ .8byte foo ++ .else ++ .4byte foo ++ .endif ++ .balign 16 +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data.exp +@@ -0,0 +1,76 @@ ++# Expect script for common symbol override. ++# ++# Copyright 2010 Free Software Foundation, Inc. ++# ++# This file is part of the GNU Binutils. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 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. ++# ++ ++# ++# Written by Maciej W. Rozycki ++# ++ ++# Exclude non-ELF targets. ++if ![is_elf_format] { ++ return ++} ++ ++# Exclude non-Linux targets; feel free to include your favourite one ++# if you like. ++if ![istarget *-*-linux*] { ++ return ++} ++ ++set testname "Common symbol override test" ++ ++# Define a global symbol. ++run_ld_link_tests [list \ ++ [list \ ++ "$testname (auxiliary shared object build)" \ ++ "-shared" \ ++ "" \ ++ { comm-data1.s } \ ++ { \ ++ { readelf -s comm-data1.sd } \ ++ } \ ++ "libcomm-data.so" \ ++ ] \ ++] ++ ++# Set the pointer size according to the ELF flavour. ++set AFLAGS "" ++if [is_elf64 "tmpdir/libcomm-data.so"] { ++ append AFLAGS " --defsym ELF64=1" ++} ++ ++# Verify that a common symbol has been converted to an undefined ++# reference to the global symbol of the same name defined above ++# and that the debug reference has been dropped. ++run_ld_link_tests [list \ ++ [list \ ++ "$testname" \ ++ "-Ltmpdir -lcomm-data" \ ++ "$AFLAGS" \ ++ { comm-data2.s } \ ++ { \ ++ { readelf -s comm-data2.sd } \ ++ { readelf -r comm-data2.rd } \ ++ { readelf "-x .debug_foo" comm-data2.xd } \ ++ } \ ++ "comm-data" \ ++ ] \ ++] +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data1.sd +@@ -0,0 +1,10 @@ ++Symbol table '\.dynsym' contains [0-9]+ entries: ++ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name ++#... ++ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo ++#... ++Symbol table '\.symtab' contains [0-9]+ entries: ++ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name ++#... ++ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo ++#pass +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data2.rd +@@ -0,0 +1 @@ ++There are no relocations in this file\. +--- /dev/null ++++ b/ld/testsuite/ld-elf/comm-data2.sd +@@ -0,0 +1,10 @@ ++Symbol table '\.dynsym' contains [0-9]+ entries: ++ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name ++#... ++ +[0-9]+: +0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +foo ++#... ++Symbol table '\.symtab' contains [0-9]+ entries: ++ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name ++#... ++ +[0-9]+: +0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +foo ++#pass +--- a/ld/testsuite/lib/ld-lib.exp ++++ b/ld/testsuite/lib/ld-lib.exp +@@ -1252,11 +1252,12 @@ + + # Assemble each file in the test. + foreach src_file $src_files { +- set objfile "tmpdir/[file rootname $src_file].o" ++ set fileroot "[file rootname [file tail $src_file]]" ++ set objfile "tmpdir/$fileroot.o" + lappend objfiles $objfile + + if { [file extension $src_file] == ".c" } { +- set as_file "tmpdir/[file rootname $src_file].s" ++ set as_file "tmpdir/$fileroot.s" + if ![ld_compile "$CC -S $CFLAGS $cflags" $srcdir/$subdir/$src_file $as_file] { + set is_unresolved 1 + break +@@ -1446,7 +1447,8 @@ + + # Assemble each file in the test. + foreach src_file $src_files { +- set objfile "tmpdir/[file rootname $src_file].o" ++ set fileroot "[file rootname [file tail $src_file]]" ++ set objfile "tmpdir/$fileroot.o" + lappend objfiles $objfile + + # We ignore warnings since some compilers may generate +@@ -1565,7 +1567,8 @@ + + # Compile each file in the test. + foreach src_file $src_files { +- set objfile "tmpdir/[file rootname $src_file].o" ++ set fileroot "[file rootname [file tail $src_file]]" ++ set objfile "tmpdir/$fileroot.o" + lappend objfiles $objfile + + # We ignore warnings since some compilers may generate +--- /dev/null ++++ b/ld/testsuite/ld-mips-elf/comm-data.exp +@@ -0,0 +1,88 @@ ++# Expect script for common symbol override, MIPS variation. ++# ++# Copyright 2010 Free Software Foundation, Inc. ++# ++# This file is part of the GNU Binutils. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 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. ++# ++ ++# ++# Written by Maciej W. Rozycki ++# ++ ++# Exclude non-ELF targets. ++if ![is_elf_format] { ++ return ++} ++ ++# Exclude non-Linux targets; feel free to include your favourite one ++# if you like. ++if ![istarget mips*-*-linux*] { ++ return ++} ++ ++proc mips_comm_data_test { abi flag emul reloc } { ++ ++ set testname "MIPS $abi/$reloc common symbol override test" ++ set AFLAGS "$flag -EB" ++ set LDFLAGS "-m$emul" ++ ++ # Define a global symbol. ++ run_ld_link_tests [list \ ++ [list \ ++ "$testname (auxiliary shared object build)" \ ++ "$LDFLAGS -shared" \ ++ "$AFLAGS -call_shared" \ ++ { ../ld-elf/comm-data1.s } \ ++ { \ ++ { readelf -s ../ld-elf/comm-data1.sd } \ ++ } \ ++ "libmips-$abi-$reloc-comm-data.so" \ ++ ] \ ++ ] ++ ++ # Set the pointer size according to the ABI. ++ if { $abi == "n64" } { ++ append AFLAGS " --defsym ELF64=1" ++ } ++ ++ # Verify that a common symbol has been converted to an undefined ++ # reference to the global symbol of the same name defined above ++ # and that the debug reference has been dropped. ++ run_ld_link_tests [list \ ++ [list \ ++ "$testname" \ ++ "$LDFLAGS -z $reloc -Ltmpdir -lmips-$abi-$reloc-comm-data" \ ++ "$AFLAGS -call_nonpic" \ ++ { ../ld-elf/comm-data2.s } \ ++ { \ ++ { readelf -s ../ld-elf/comm-data2.sd } \ ++ { readelf -r ../ld-elf/comm-data2.rd } \ ++ { readelf "-x .debug_foo" ../ld-elf/comm-data2.xd } \ ++ } \ ++ "mips-$abi-$reloc-comm-data" \ ++ ] \ ++ ] ++} ++ ++set abis { o32 -32 elf32btsmip n32 -n32 elf32btsmipn32 n64 -64 elf64btsmip } ++set relocs { copyreloc nocopyreloc } ++foreach { abi flag emul } $abis { ++ foreach reloc $relocs { ++ mips_comm_data_test $abi $flag $emul $reloc ++ } ++} +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -7583,6 +7583,19 @@ + elf_hash_table (info)->dynobj = dynobj = abfd; + break; + } ++ /* Ignore relocs from SEC_DEBUGGING sections because such ++ sections are not SEC_ALLOC and thus ld.so will not process ++ them. Don't set has_static_relocs for the corresponding ++ symbol. ++ ++ This is needed in cases such as a global symbol definition ++ in a shared library causing a common symbol from an object ++ file to be converted to an undefined reference. If that ++ happens, then all the relocations against this symbol from ++ SEC_DEBUGGING sections in the object file will resolve to ++ nil. */ ++ if ((sec->flags & SEC_DEBUGGING) != 0) ++ break; + /* Fall through. */ + + default: --- binutils-2.21.51.20110421.orig/debian/patches/160_gas_pr12698.diff +++ binutils-2.21.51.20110421/debian/patches/160_gas_pr12698.diff @@ -0,0 +1,54 @@ +# DP: Proposed patch for PR gas/12698 + +2011-04-15 Bernd Schmidt + + gas/ + * config/tc-arm.c (m_profile_p): New function. + (parse_psr, do_t_mrs, do_t_msr): Use m_profile_p. + + +--- a/gas/config/tc-arm.c ++++ b/gas/config/tc-arm.c +@@ -234,6 +234,15 @@ + static const arm_feature_set fpu_neon_ext_fma = ARM_FEATURE (0, FPU_NEON_EXT_FMA); + static const arm_feature_set fpu_vfp_ext_fma = ARM_FEATURE (0, FPU_VFP_EXT_FMA); + ++/* Return whether FEATURES indicates an M profile CPU, without getting ++ confused by ARM_ANY. */ ++static int ++m_profile_p (arm_feature_set features) ++{ ++ return (ARM_CPU_HAS_FEATURE (features, arm_ext_v6m) ++ && !ARM_CPU_HAS_FEATURE (features, arm_ext_v7a)); ++} ++ + static int mfloat_abi_opt = -1; + /* Record user cpu selection for object attributes. */ + static arm_feature_set selected_cpu = ARM_ARCH_NONE; +@@ -5354,7 +5363,7 @@ + const struct asm_psr *psr; + char *start; + bfd_boolean is_apsr = FALSE; +- bfd_boolean m_profile = ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m); ++ bfd_boolean m_profile = m_profile_p (selected_cpu); + + /* CPSR's and SPSR's can now be lowercase. This is just a convenience + feature for ease of use and backwards compatibility. */ +@@ -10947,7 +10956,7 @@ + { + int flags = inst.operands[1].imm & (PSR_c|PSR_x|PSR_s|PSR_f|SPSR_BIT); + +- if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m)) ++ if (m_profile_p (selected_cpu)) + constraint (flags != 0, _("selected processor does not support " + "requested special purpose register")); + else +@@ -10979,7 +10988,7 @@ + else + flags = inst.operands[0].imm; + +- if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_m)) ++ if (m_profile_p (selected_cpu)) + { + int bits = inst.operands[0].imm & (PSR_c|PSR_x|PSR_s|PSR_f|SPSR_BIT); + --- binutils-2.21.51.20110421.orig/debian/patches/006_better_file_error.patch +++ binutils-2.21.51.20110421/debian/patches/006_better_file_error.patch @@ -0,0 +1,19 @@ +Author: David Kimdon +Description: Specify which filename is causing an error if the filename is a +directory. (#45832) +--- a/bfd/opncls.c ++++ b/bfd/opncls.c +@@ -183,6 +183,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.21.51.20110421.orig/debian/patches/002_gprof_profile_arcs.patch +++ binutils-2.21.51.20110421/debian/patches/002_gprof_profile_arcs.patch @@ -0,0 +1,27 @@ +Author: Chris Chimelis +Description: Add more documentation about profiling and -fprofile-arcs. +--- a/gprof/gprof.texi ++++ b/gprof/gprof.texi +@@ -149,6 +149,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 +@@ -280,6 +284,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.21.51.20110421.orig/debian/patches/131_ld_bootstrap_testsuite.patch +++ binutils-2.21.51.20110421/debian/patches/131_ld_bootstrap_testsuite.patch @@ -0,0 +1,45 @@ +Author: +Description: Description: Fix ld-bootstrap testsuite when configured with --enable-plugins +Author: Rafael Espindola +Upstream status: proposed patch +--- a/ld/testsuite/ld-bootstrap/bootstrap.exp ++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp +@@ -40,6 +40,15 @@ + set plugins "no" + } + ++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 +@@ -78,6 +87,11 @@ + continue + } + ++ if { $flags == "--static" && $plugins == "yes" } then { ++ untested $testname ++ continue ++ } ++ + # If we only have a shared libbfd, we probably can't run the + # --static test.will fail. + if { $flags == "--static" && ! [string match "*libbfd.a*" $BFDLIB] } then { +@@ -112,6 +126,10 @@ + if { $plugins == "yes" } { + set extralibs "$extralibs -ldl" + } ++ ++ if { $plugins == "yes" } { ++ set extralibs "$extralibs -ldl" ++ } + + # On Irix 5, linking with --static only works if all the files are + # compiled using -non_shared. --- binutils-2.21.51.20110421.orig/debian/patches/013_bash_in_ld_testsuite.patch +++ binutils-2.21.51.20110421/debian/patches/013_bash_in_ld_testsuite.patch @@ -0,0 +1,26 @@ +Author: Matthias Klose +Description: Explicitely use bash for the ld testsuite. +--- a/ld/testsuite/config/default.exp ++++ b/ld/testsuite/config/default.exp +@@ -119,10 +119,10 @@ + #makefile rules, with embedded shell variable expansions. + #make wants $$shell_var, we want $shell_var ... + set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' < +Upstream status: N/A +Date: ?? +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -24,7 +24,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -337,7 +337,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include --- binutils-2.21.51.20110421.orig/debian/patches/161_ar_delete_members.diff +++ binutils-2.21.51.20110421/debian/patches/161_ar_delete_members.diff @@ -0,0 +1,41 @@ +--- a/binutils/ar.c ++++ b/binutils/ar.c +@@ -1069,7 +1069,6 @@ + + if (smart_rename (new_name, old_name, 0) != 0) + xexit (1); +- free (old_name); + } + + /* Return a pointer to the pointer to the entry which should be rplacd'd +@@ -1119,7 +1118,6 @@ + bfd_boolean found; + bfd_boolean something_changed = FALSE; + int match_count; +- const char * tmp = NULL; + + for (; *files_to_delete != NULL; ++files_to_delete) + { +@@ -1141,10 +1139,8 @@ + current_ptr_ptr = &(arch->archive_next); + while (*current_ptr_ptr) + { +- if (tmp != NULL) +- free ((char *) tmp); +- tmp = normalize (*files_to_delete, arch); +- if (FILENAME_CMP (tmp, (*current_ptr_ptr)->filename) == 0) ++ if (FILENAME_CMP (normalize (*files_to_delete, arch), ++ (*current_ptr_ptr)->filename) == 0) + { + ++match_count; + if (counted_name_mode +@@ -1181,9 +1177,6 @@ + write_archive (arch); + else + output_filename = NULL; +- +- if (tmp != NULL) +- free ((char *) tmp); + } + + --- binutils-2.21.51.20110421.orig/binutils/ar.c.orig +++ binutils-2.21.51.20110421/binutils/ar.c.orig @@ -0,0 +1,1389 @@ +/* ar.c - Archive modify and extract. + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 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. */ + +/* + Bugs: GNU ar used to check file against filesystem in quick_update and + replace operations (would check mtime). Doesn't warn when name truncated. + No way to specify pos_end. Error messages should be more consistent. */ + +#include "sysdep.h" +#include "bfd.h" +#include "libiberty.h" +#include "progress.h" +#include "getopt.h" +#include "aout/ar.h" +#include "libbfd.h" +#include "bucomm.h" +#include "arsup.h" +#include "filenames.h" +#include "binemul.h" +#include "plugin.h" +#include + +#ifdef __GO32___ +#define EXT_NAME_LEN 3 /* Bufflen of addition to name if it's MS-DOS. */ +#else +#define EXT_NAME_LEN 6 /* Ditto for *NIX. */ +#endif + +/* Static declarations. */ + +static void mri_emul (void); +static const char *normalize (const char *, bfd *); +static void remove_output (void); +static void map_over_members (bfd *, void (*)(bfd *), char **, int); +static void print_contents (bfd * member); +static void delete_members (bfd *, char **files_to_delete); + +static void move_members (bfd *, char **files_to_move); +static void replace_members + (bfd *, char **files_to_replace, bfd_boolean quick); +static void print_descr (bfd * abfd); +static void write_archive (bfd *); +static int ranlib_only (const char *archname); +static int ranlib_touch (const char *archname); +static void usage (int); + +/** Globals and flags. */ + +static int mri_mode; + +/* This flag distinguishes between ar and ranlib: + 1 means this is 'ranlib'; 0 means this is 'ar'. + -1 means if we should use argv[0] to decide. */ +extern int is_ranlib; + +/* Nonzero means don't warn about creating the archive file if necessary. */ +int silent_create = 0; + +/* Nonzero means describe each action performed. */ +int verbose = 0; + +/* Nonzero means preserve dates of members when extracting them. */ +int preserve_dates = 0; + +/* Nonzero means don't replace existing members whose dates are more recent + than the corresponding files. */ +int newer_only = 0; + +/* Controls the writing of an archive symbol table (in BSD: a __.SYMDEF + member). -1 means we've been explicitly asked to not write a symbol table; + +1 means we've been explicitly asked to write it; + 0 is the default. + Traditionally, the default in BSD has been to not write the table. + However, for POSIX.2 compliance the default is now to write a symbol table + if any of the members are object files. */ +int write_armap = 0; + +/* Operate in deterministic mode: write zero for timestamps, uids, + and gids for archive members and the archive symbol table, and write + consistent file modes. */ +int deterministic = 0; + +/* Nonzero means it's the name of an existing member; position new or moved + files with respect to this one. */ +char *posname = NULL; + +/* Sez how to use `posname': pos_before means position before that member. + pos_after means position after that member. pos_end means always at end. + pos_default means default appropriately. For the latter two, `posname' + should also be zero. */ +enum pos + { + pos_default, pos_before, pos_after, pos_end + } postype = pos_default; + +enum operations + { + none = 0, del, replace, print_table, + print_files, extract, move, quick_append + } operation = none; + +static bfd ** +get_pos_bfd (bfd **, enum pos, const char *); + +/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only + extract the COUNTED_NAME_COUNTER instance of that name. */ +static bfd_boolean counted_name_mode = 0; +static int counted_name_counter = 0; + +/* Whether to truncate names of files stored in the archive. */ +static bfd_boolean ar_truncate = FALSE; + +/* Whether to use a full file name match when searching an archive. + This is convenient for archives created by the Microsoft lib + program. */ +static bfd_boolean full_pathname = FALSE; + +/* Whether to create a "thin" archive (symbol index only -- no files). */ +static bfd_boolean make_thin_archive = FALSE; + +static int show_version = 0; + +static int show_help = 0; + +static const char *plugin_target = NULL; + +static const char *target = NULL; + +#define OPTION_PLUGIN 201 +#define OPTION_TARGET 202 + +static struct option long_options[] = +{ + {"help", no_argument, &show_help, 1}, + {"plugin", required_argument, NULL, OPTION_PLUGIN}, + {"target", required_argument, NULL, OPTION_TARGET}, + {"version", no_argument, &show_version, 1}, + {NULL, no_argument, NULL, 0} +}; + +int interactive = 0; + +static void +mri_emul (void) +{ + interactive = isatty (fileno (stdin)); + yyparse (); +} + +/* If COUNT is 0, then FUNCTION is called once on each entry. If nonzero, + COUNT is the length of the FILES chain; FUNCTION is called on each entry + whose name matches one in FILES. */ + +static void +map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count) +{ + bfd *head; + int match_count; + + if (count == 0) + { + for (head = arch->archive_next; head; head = head->archive_next) + { + PROGRESS (1); + function (head); + } + return; + } + + /* This may appear to be a baroque way of accomplishing what we want. + However we have to iterate over the filenames in order to notice where + a filename is requested but does not exist in the archive. Ditto + mapping over each file each time -- we want to hack multiple + references. */ + + for (; count > 0; files++, count--) + { + bfd_boolean found = FALSE; + + match_count = 0; + for (head = arch->archive_next; head; head = head->archive_next) + { + const char * filename; + + PROGRESS (1); + filename = head->filename; + if (filename == NULL) + { + /* Some archive formats don't get the filenames filled in + until the elements are opened. */ + struct stat buf; + bfd_stat_arch_elt (head, &buf); + } + else if (bfd_is_thin_archive (arch)) + { + /* Thin archives store full pathnames. Need to normalize. */ + filename = normalize (filename, arch); + } + + if (filename != NULL + && !FILENAME_CMP (normalize (*files, arch), filename)) + { + ++match_count; + if (counted_name_mode + && match_count != counted_name_counter) + { + /* Counting, and didn't match on count; go on to the + next one. */ + continue; + } + + found = TRUE; + function (head); + } + } + + if (!found) + /* xgettext:c-format */ + fprintf (stderr, _("no entry %s in archive\n"), *files); + } +} + +bfd_boolean operation_alters_arch = FALSE; + +static void +usage (int help) +{ + FILE *s; + + s = help ? stdout : stderr; + +#if BFD_SUPPORTS_PLUGINS + /* xgettext:c-format */ + const char *command_line + = _("Usage: %s [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV]" + " [--plugin ] [member-name] [count] archive-file file...\n"); + +#else + /* xgettext:c-format */ + const char *command_line + = _("Usage: %s [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV]" + " [member-name] [count] archive-file file...\n"); +#endif + fprintf (s, command_line, program_name); + + /* xgettext:c-format */ + fprintf (s, _(" %s -M [ - read options from \n")); + fprintf (s, _(" --target=BFDNAME - specify the target object format as BFDNAME\n")); +#if BFD_SUPPORTS_PLUGINS + fprintf (s, _(" optional:\n")); + fprintf (s, _(" --plugin

- load the specified plugin\n")); +#endif + + ar_emul_usage (s); + + list_supported_targets (program_name, s); + + if (REPORT_BUGS_TO[0] && help) + fprintf (s, _("Report bugs to %s\n"), REPORT_BUGS_TO); + + xexit (help ? 0 : 1); +} + +static void +ranlib_usage (int help) +{ + FILE *s; + + s = help ? stdout : stderr; + + /* xgettext:c-format */ + fprintf (s, _("Usage: %s [options] archive\n"), program_name); + fprintf (s, _(" Generate an index to speed access to archives\n")); + fprintf (s, _(" The options are:\n\ + @ Read options from \n")); +#if BFD_SUPPORTS_PLUGINS + fprintf (s, _("\ + --plugin Load the specified plugin\n")); +#endif + fprintf (s, _("\ + -t Update the archive's symbol map timestamp\n\ + -h --help Print this help message\n\ + -v --version Print version information\n")); + + list_supported_targets (program_name, s); + + if (REPORT_BUGS_TO[0] && help) + fprintf (s, _("Report bugs to %s\n"), REPORT_BUGS_TO); + + xexit (help ? 0 : 1); +} + +/* Normalize a file name specified on the command line into a file + name which we will use in an archive. */ + +static const char * +normalize (const char *file, bfd *abfd) +{ + const char *filename; + + if (full_pathname) + return file; + + filename = lbasename (file); + + if (ar_truncate + && abfd != NULL + && strlen (filename) > abfd->xvec->ar_max_namelen) + { + char *s; + + /* Space leak. */ + s = (char *) xmalloc (abfd->xvec->ar_max_namelen + 1); + memcpy (s, filename, abfd->xvec->ar_max_namelen); + s[abfd->xvec->ar_max_namelen] = '\0'; + filename = s; + } + + return filename; +} + +/* Remove any output file. This is only called via xatexit. */ + +static const char *output_filename = NULL; +static FILE *output_file = NULL; +static bfd *output_bfd = NULL; + +static void +remove_output (void) +{ + if (output_filename != NULL) + { + if (output_bfd != NULL) + bfd_cache_close (output_bfd); + if (output_file != NULL) + fclose (output_file); + unlink_if_ordinary (output_filename); + } +} + +static char ** +decode_options (int argc, char **argv) +{ + int c; + + /* Convert old-style tar call by exploding option element and rearranging + options accordingly. */ + + if (argc > 1 && argv[1][0] != '-') + { + int new_argc; /* argc value for rearranged arguments */ + char **new_argv; /* argv value for rearranged arguments */ + char *const *in; /* cursor into original argv */ + char **out; /* cursor into rearranged argv */ + const char *letter; /* cursor into old option letters */ + char buffer[3]; /* constructed option buffer */ + + /* Initialize a constructed option. */ + + buffer[0] = '-'; + buffer[2] = '\0'; + + /* Allocate a new argument array, and copy program name in it. */ + + new_argc = argc - 1 + strlen (argv[1]); + new_argv = xmalloc ((new_argc + 1) * sizeof (*argv)); + in = argv; + out = new_argv; + *out++ = *in++; + + /* Copy each old letter option as a separate option. */ + + for (letter = *in++; *letter; letter++) + { + buffer[1] = *letter; + *out++ = xstrdup (buffer); + } + + /* Copy all remaining options. */ + + while (in < argv + argc) + *out++ = *in++; + *out = NULL; + + /* Replace the old option list by the new one. */ + + argc = new_argc; + argv = new_argv; + } + + while ((c = getopt_long (argc, argv, "hdmpqrtxlcoVsSuvabiMNfPTD", + long_options, NULL)) != EOF) + { + switch (c) + { + case 'd': + case 'm': + case 'p': + case 'q': + case 'r': + case 't': + case 'x': + if (operation != none) + fatal (_("two different operation options specified")); + break; + } + + switch (c) + { + case 'h': + show_help = 1; + break; + case 'd': + operation = del; + operation_alters_arch = TRUE; + break; + case 'm': + operation = move; + operation_alters_arch = TRUE; + break; + case 'p': + operation = print_files; + break; + case 'q': + operation = quick_append; + operation_alters_arch = TRUE; + break; + case 'r': + operation = replace; + operation_alters_arch = TRUE; + break; + case 't': + operation = print_table; + break; + case 'x': + operation = extract; + break; + case 'l': + break; + case 'c': + silent_create = 1; + break; + case 'o': + preserve_dates = 1; + break; + case 'V': + show_version = TRUE; + break; + case 's': + write_armap = 1; + break; + case 'S': + write_armap = -1; + break; + case 'u': + newer_only = 1; + break; + case 'v': + verbose = 1; + break; + case 'a': + postype = pos_after; + break; + case 'b': + postype = pos_before; + break; + case 'i': + postype = pos_before; + break; + case 'M': + mri_mode = 1; + break; + case 'N': + counted_name_mode = TRUE; + break; + case 'f': + ar_truncate = TRUE; + break; + case 'P': + full_pathname = TRUE; + break; + case 'T': + make_thin_archive = TRUE; + break; + case 'D': + deterministic = TRUE; + break; + case OPTION_PLUGIN: +#if BFD_SUPPORTS_PLUGINS + plugin_target = "plugin"; + bfd_plugin_set_plugin (optarg); +#else + fprintf (stderr, _("sorry - this program has been built without plugin support\n")); + xexit (1); +#endif + break; + case OPTION_TARGET: + target = optarg; + break; + case 0: /* A long option that just sets a flag. */ + break; + default: + usage (0); + } + } + + return &argv[optind]; +} + +static void +ranlib_main (int argc, char **argv) +{ + int arg_index, status = 0; + bfd_boolean touch = FALSE; + int c; + + while ((c = getopt_long (argc, argv, "hHvVt", long_options, NULL)) != EOF) + { + switch (c) + { + case 'h': + case 'H': + show_help = 1; + break; + case 't': + touch = TRUE; + break; + case 'v': + case 'V': + show_version = 1; + break; + } + } + + if (argc < 2) + ranlib_usage (0); + + if (show_help) + usage (1); + + if (show_version) + print_version ("ranlib"); + + arg_index = optind; + + while (arg_index < argc) + { + if (! touch) + status |= ranlib_only (argv[arg_index]); + else + status |= ranlib_touch (argv[arg_index]); + ++arg_index; + } + + xexit (status); +} + +int main (int, char **); + +int +main (int argc, char **argv) +{ + int arg_index; + char **files; + int file_count; + char *inarch_filename; + int i; + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + program_name = argv[0]; + xmalloc_set_program_name (program_name); +#if BFD_SUPPORTS_PLUGINS + bfd_plugin_set_program_name (program_name); +#endif + + expandargv (&argc, &argv); + + if (is_ranlib < 0) + { + const char *temp = lbasename (program_name); + + if (strlen (temp) >= 6 + && FILENAME_CMP (temp + strlen (temp) - 6, "ranlib") == 0) + is_ranlib = 1; + else + is_ranlib = 0; + } + + START_PROGRESS (program_name, 0); + + bfd_init (); + set_default_bfd_target (); + + xatexit (remove_output); + + for (i = 1; i < argc; i++) + if (! ar_emul_parse_arg (argv[i])) + break; + argv += (i - 1); + argc -= (i - 1); + + if (is_ranlib) + ranlib_main (argc, argv); + + if (argc < 2) + usage (0); + + argv = decode_options (argc, argv); + + if (show_help) + usage (1); + + if (show_version) + print_version ("ar"); + + arg_index = 0; + + if (mri_mode) + { + mri_emul (); + } + else + { + bfd *arch; + + /* We don't use do_quick_append any more. Too many systems + expect ar to always rebuild the symbol table even when q is + used. */ + + /* We can't write an armap when using ar q, so just do ar r + instead. */ + if (operation == quick_append && write_armap) + operation = replace; + + if ((operation == none || operation == print_table) + && write_armap == 1) + xexit (ranlib_only (argv[arg_index])); + + if (operation == none) + fatal (_("no operation specified")); + + if (newer_only && operation != replace) + fatal (_("`u' is only meaningful with the `r' option.")); + + if (newer_only && deterministic) + fatal (_("`u' is not meaningful with the `D' option.")); + + if (postype != pos_default) + posname = argv[arg_index++]; + + if (counted_name_mode) + { + if (operation != extract && operation != del) + fatal (_("`N' is only meaningful with the `x' and `d' options.")); + counted_name_counter = atoi (argv[arg_index++]); + if (counted_name_counter <= 0) + fatal (_("Value for `N' must be positive.")); + } + + inarch_filename = argv[arg_index++]; + + for (file_count = 0; argv[arg_index + file_count] != NULL; file_count++) + continue; + + files = (file_count > 0) ? argv + arg_index : NULL; + + arch = open_inarch (inarch_filename, + files == NULL ? (char *) NULL : files[0]); + + if (operation == extract && bfd_is_thin_archive (arch)) + fatal (_("`x' cannot be used on thin archives.")); + + switch (operation) + { + case print_table: + map_over_members (arch, print_descr, files, file_count); + break; + + case print_files: + map_over_members (arch, print_contents, files, file_count); + break; + + case extract: + map_over_members (arch, extract_file, files, file_count); + break; + + case del: + if (files != NULL) + delete_members (arch, files); + else + output_filename = NULL; + break; + + case move: + if (files != NULL) + move_members (arch, files); + else + output_filename = NULL; + break; + + case replace: + case quick_append: + if (files != NULL || write_armap > 0) + replace_members (arch, files, operation == quick_append); + else + output_filename = NULL; + break; + + /* Shouldn't happen! */ + default: + /* xgettext:c-format */ + fatal (_("internal error -- this option not implemented")); + } + } + + END_PROGRESS (program_name); + + xexit (0); + return 0; +} + +bfd * +open_inarch (const char *archive_filename, const char *file) +{ + bfd **last_one; + bfd *next_one; + struct stat sbuf; + bfd *arch; + char **matching; + + bfd_set_error (bfd_error_no_error); + + if (target == NULL) + target = plugin_target; + + if (stat (archive_filename, &sbuf) != 0) + { +#if !defined(__GO32__) || defined(__DJGPP__) + + /* FIXME: I don't understand why this fragment was ifndef'ed + away for __GO32__; perhaps it was in the days of DJGPP v1.x. + stat() works just fine in v2.x, so I think this should be + removed. For now, I enable it for DJGPP v2. -- EZ. */ + + /* KLUDGE ALERT! Temporary fix until I figger why + stat() is wrong ... think it's buried in GO32's IDT - Jax */ + if (errno != ENOENT) + bfd_fatal (archive_filename); +#endif + + if (!operation_alters_arch) + { + fprintf (stderr, "%s: ", program_name); + perror (archive_filename); + maybequit (); + return NULL; + } + + /* Try to figure out the target to use for the archive from the + first object on the list. */ + if (file != NULL) + { + bfd *obj; + + obj = bfd_openr (file, target); + if (obj != NULL) + { + if (bfd_check_format (obj, bfd_object)) + target = bfd_get_target (obj); + (void) bfd_close (obj); + } + } + + /* Create an empty archive. */ + arch = bfd_openw (archive_filename, target); + if (arch == NULL + || ! bfd_set_format (arch, bfd_archive) + || ! bfd_close (arch)) + bfd_fatal (archive_filename); + else if (!silent_create) + non_fatal (_("creating %s"), archive_filename); + + /* If we die creating a new archive, don't leave it around. */ + output_filename = archive_filename; + } + + arch = bfd_openr (archive_filename, target); + if (arch == NULL) + { + bloser: + bfd_fatal (archive_filename); + } + + if (! bfd_check_format_matches (arch, bfd_archive, &matching)) + { + bfd_nonfatal (archive_filename); + if (bfd_get_error () == bfd_error_file_ambiguously_recognized) + { + list_matching_formats (matching); + free (matching); + } + xexit (1); + } + + last_one = &(arch->archive_next); + /* Read all the contents right away, regardless. */ + for (next_one = bfd_openr_next_archived_file (arch, NULL); + next_one; + next_one = bfd_openr_next_archived_file (arch, next_one)) + { + PROGRESS (1); + *last_one = next_one; + last_one = &next_one->archive_next; + } + *last_one = (bfd *) NULL; + if (bfd_get_error () != bfd_error_no_more_archived_files) + goto bloser; + return arch; +} + +static void +print_contents (bfd *abfd) +{ + size_t ncopied = 0; + char *cbuf = (char *) xmalloc (BUFSIZE); + struct stat buf; + size_t size; + if (bfd_stat_arch_elt (abfd, &buf) != 0) + /* xgettext:c-format */ + fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); + + if (verbose) + printf ("\n<%s>\n\n", bfd_get_filename (abfd)); + + bfd_seek (abfd, (file_ptr) 0, SEEK_SET); + + size = buf.st_size; + while (ncopied < size) + { + + size_t nread; + size_t tocopy = size - ncopied; + if (tocopy > BUFSIZE) + tocopy = BUFSIZE; + + nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); + if (nread != tocopy) + /* xgettext:c-format */ + fatal (_("%s is not a valid archive"), + bfd_get_filename (bfd_my_archive (abfd))); + + /* fwrite in mingw32 may return int instead of size_t. Cast the + return value to size_t to avoid comparison between signed and + unsigned values. */ + if ((size_t) fwrite (cbuf, 1, nread, stdout) != nread) + fatal ("stdout: %s", strerror (errno)); + ncopied += tocopy; + } + free (cbuf); +} + +/* Extract a member of the archive into its own file. + + We defer opening the new file until after we have read a BUFSIZ chunk of the + old one, since we know we have just read the archive header for the old + one. Since most members are shorter than BUFSIZ, this means we will read + the old header, read the old data, write a new inode for the new file, and + write the new data, and be done. This 'optimization' is what comes from + sitting next to a bare disk and hearing it every time it seeks. -- Gnu + Gilmore */ + +void +extract_file (bfd *abfd) +{ + FILE *ostream; + char *cbuf = (char *) xmalloc (BUFSIZE); + size_t nread, tocopy; + size_t ncopied = 0; + size_t size; + struct stat buf; + + if (bfd_stat_arch_elt (abfd, &buf) != 0) + /* xgettext:c-format */ + fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); + size = buf.st_size; + + if (verbose) + printf ("x - %s\n", bfd_get_filename (abfd)); + + bfd_seek (abfd, (file_ptr) 0, SEEK_SET); + + ostream = NULL; + if (size == 0) + { + /* Seems like an abstraction violation, eh? Well it's OK! */ + output_filename = bfd_get_filename (abfd); + + ostream = fopen (bfd_get_filename (abfd), FOPEN_WB); + if (ostream == NULL) + { + perror (bfd_get_filename (abfd)); + xexit (1); + } + + output_file = ostream; + } + else + while (ncopied < size) + { + tocopy = size - ncopied; + if (tocopy > BUFSIZE) + tocopy = BUFSIZE; + + nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); + if (nread != tocopy) + /* xgettext:c-format */ + fatal (_("%s is not a valid archive"), + bfd_get_filename (bfd_my_archive (abfd))); + + /* See comment above; this saves disk arm motion */ + if (ostream == NULL) + { + /* Seems like an abstraction violation, eh? Well it's OK! */ + output_filename = bfd_get_filename (abfd); + + ostream = fopen (bfd_get_filename (abfd), FOPEN_WB); + if (ostream == NULL) + { + perror (bfd_get_filename (abfd)); + xexit (1); + } + + output_file = ostream; + } + + /* fwrite in mingw32 may return int instead of size_t. Cast + the return value to size_t to avoid comparison between + signed and unsigned values. */ + if ((size_t) fwrite (cbuf, 1, nread, ostream) != nread) + fatal ("%s: %s", output_filename, strerror (errno)); + ncopied += tocopy; + } + + if (ostream != NULL) + fclose (ostream); + + output_file = NULL; + output_filename = NULL; + + chmod (bfd_get_filename (abfd), buf.st_mode); + + if (preserve_dates) + { + /* Set access time to modification time. Only st_mtime is + initialized by bfd_stat_arch_elt. */ + buf.st_atime = buf.st_mtime; + set_times (bfd_get_filename (abfd), &buf); + } + + free (cbuf); +} + +static void +write_archive (bfd *iarch) +{ + bfd *obfd; + char *old_name, *new_name; + bfd *contents_head = iarch->archive_next; + + old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); + strcpy (old_name, bfd_get_filename (iarch)); + new_name = make_tempname (old_name); + + if (new_name == NULL) + bfd_fatal ("could not create temporary file whilst writing archive"); + + output_filename = new_name; + + obfd = bfd_openw (new_name, bfd_get_target (iarch)); + + if (obfd == NULL) + bfd_fatal (old_name); + + output_bfd = obfd; + + bfd_set_format (obfd, bfd_archive); + + /* Request writing the archive symbol table unless we've + been explicitly requested not to. */ + obfd->has_armap = write_armap >= 0; + + if (ar_truncate) + { + /* This should really use bfd_set_file_flags, but that rejects + archives. */ + obfd->flags |= BFD_TRADITIONAL_FORMAT; + } + + if (deterministic) + obfd->flags |= BFD_DETERMINISTIC_OUTPUT; + + if (make_thin_archive || bfd_is_thin_archive (iarch)) + bfd_is_thin_archive (obfd) = 1; + + if (!bfd_set_archive_head (obfd, contents_head)) + bfd_fatal (old_name); + + if (!bfd_close (obfd)) + bfd_fatal (old_name); + + output_bfd = NULL; + output_filename = NULL; + + /* We don't care if this fails; we might be creating the archive. */ + bfd_close (iarch); + + if (smart_rename (new_name, old_name, 0) != 0) + xexit (1); + free (old_name); +} + +/* Return a pointer to the pointer to the entry which should be rplacd'd + into when altering. DEFAULT_POS should be how to interpret pos_default, + and should be a pos value. */ + +static bfd ** +get_pos_bfd (bfd **contents, enum pos default_pos, const char *default_posname) +{ + bfd **after_bfd = contents; + enum pos realpos; + const char *realposname; + + if (postype == pos_default) + { + realpos = default_pos; + realposname = default_posname; + } + else + { + realpos = postype; + realposname = posname; + } + + if (realpos == pos_end) + { + while (*after_bfd) + after_bfd = &((*after_bfd)->archive_next); + } + else + { + for (; *after_bfd; after_bfd = &(*after_bfd)->archive_next) + if (FILENAME_CMP ((*after_bfd)->filename, realposname) == 0) + { + if (realpos == pos_after) + after_bfd = &(*after_bfd)->archive_next; + break; + } + } + return after_bfd; +} + +static void +delete_members (bfd *arch, char **files_to_delete) +{ + bfd **current_ptr_ptr; + bfd_boolean found; + bfd_boolean something_changed = FALSE; + int match_count; + const char * tmp = NULL; + + for (; *files_to_delete != NULL; ++files_to_delete) + { + /* In a.out systems, the armap is optional. It's also called + __.SYMDEF. So if the user asked to delete it, we should remember + that fact. This isn't quite right for COFF systems (where + __.SYMDEF might be regular member), but it's very unlikely + to be a problem. FIXME */ + + if (!strcmp (*files_to_delete, "__.SYMDEF")) + { + arch->has_armap = FALSE; + write_armap = -1; + continue; + } + + found = FALSE; + match_count = 0; + current_ptr_ptr = &(arch->archive_next); + while (*current_ptr_ptr) + { + if (tmp != NULL) + free ((char *) tmp); + tmp = normalize (*files_to_delete, arch); + if (FILENAME_CMP (tmp, (*current_ptr_ptr)->filename) == 0) + { + ++match_count; + if (counted_name_mode + && match_count != counted_name_counter) + { + /* Counting, and didn't match on count; go on to the + next one. */ + } + else + { + found = TRUE; + something_changed = TRUE; + if (verbose) + printf ("d - %s\n", + *files_to_delete); + *current_ptr_ptr = ((*current_ptr_ptr)->archive_next); + goto next_file; + } + } + + current_ptr_ptr = &((*current_ptr_ptr)->archive_next); + } + + if (verbose && !found) + { + /* xgettext:c-format */ + printf (_("No member named `%s'\n"), *files_to_delete); + } + next_file: + ; + } + + if (something_changed) + write_archive (arch); + else + output_filename = NULL; + + if (tmp != NULL) + free ((char *) tmp); +} + + +/* Reposition existing members within an archive */ + +static void +move_members (bfd *arch, char **files_to_move) +{ + bfd **after_bfd; /* New entries go after this one. */ + bfd **current_ptr_ptr; /* cdr pointer into contents. */ + const char *tmp = NULL; + + for (; *files_to_move; ++files_to_move) + { + current_ptr_ptr = &(arch->archive_next); + while (*current_ptr_ptr) + { + bfd *current_ptr = *current_ptr_ptr; + + if (tmp != NULL) + free ((char *) tmp); + tmp = normalize (*files_to_move, arch); + if (FILENAME_CMP (tmp, current_ptr->filename) == 0) + { + /* Move this file to the end of the list - first cut from + where it is. */ + bfd *link_bfd; + *current_ptr_ptr = current_ptr->archive_next; + + /* Now glue to end */ + after_bfd = get_pos_bfd (&arch->archive_next, pos_end, NULL); + link_bfd = *after_bfd; + *after_bfd = current_ptr; + current_ptr->archive_next = link_bfd; + + if (verbose) + printf ("m - %s\n", *files_to_move); + + goto next_file; + } + + current_ptr_ptr = &((*current_ptr_ptr)->archive_next); + } + /* xgettext:c-format */ + fatal (_("no entry %s in archive %s!"), *files_to_move, arch->filename); + + next_file: + ; + } + + write_archive (arch); + if (tmp != NULL) + free ((char *) tmp); +} + +/* Ought to default to replacing in place, but this is existing practice! */ + +static void +replace_members (bfd *arch, char **files_to_move, bfd_boolean quick) +{ + bfd_boolean changed = FALSE; + bfd **after_bfd; /* New entries go after this one. */ + bfd *current; + bfd **current_ptr; + + while (files_to_move && *files_to_move) + { + if (! quick) + { + current_ptr = &arch->archive_next; + while (*current_ptr) + { + current = *current_ptr; + + /* For compatibility with existing ar programs, we + permit the same file to be added multiple times. */ + if (FILENAME_CMP (normalize (*files_to_move, arch), + normalize (current->filename, arch)) == 0 + && current->arelt_data != NULL) + { + if (newer_only) + { + struct stat fsbuf, asbuf; + + if (stat (*files_to_move, &fsbuf) != 0) + { + if (errno != ENOENT) + bfd_fatal (*files_to_move); + goto next_file; + } + if (bfd_stat_arch_elt (current, &asbuf) != 0) + /* xgettext:c-format */ + fatal (_("internal stat error on %s"), + current->filename); + + if (fsbuf.st_mtime <= asbuf.st_mtime) + goto next_file; + } + + after_bfd = get_pos_bfd (&arch->archive_next, pos_after, + current->filename); + if (ar_emul_replace (after_bfd, *files_to_move, + target, verbose)) + { + /* Snip out this entry from the chain. */ + *current_ptr = (*current_ptr)->archive_next; + changed = TRUE; + } + + goto next_file; + } + current_ptr = &(current->archive_next); + } + } + + /* Add to the end of the archive. */ + after_bfd = get_pos_bfd (&arch->archive_next, pos_end, NULL); + + if (ar_emul_append (after_bfd, *files_to_move, target, + verbose, make_thin_archive)) + changed = TRUE; + + next_file:; + + files_to_move++; + } + + if (changed) + write_archive (arch); + else + output_filename = NULL; +} + +static int +ranlib_only (const char *archname) +{ + bfd *arch; + + if (get_file_size (archname) < 1) + return 1; + write_armap = 1; + arch = open_inarch (archname, (char *) NULL); + if (arch == NULL) + xexit (1); + write_archive (arch); + return 0; +} + +/* Update the timestamp of the symbol map of an archive. */ + +static int +ranlib_touch (const char *archname) +{ +#ifdef __GO32__ + /* I don't think updating works on go32. */ + ranlib_only (archname); +#else + int f; + bfd *arch; + char **matching; + + if (get_file_size (archname) < 1) + return 1; + f = open (archname, O_RDWR | O_BINARY, 0); + if (f < 0) + { + bfd_set_error (bfd_error_system_call); + bfd_fatal (archname); + } + + arch = bfd_fdopenr (archname, (const char *) NULL, f); + if (arch == NULL) + bfd_fatal (archname); + if (! bfd_check_format_matches (arch, bfd_archive, &matching)) + { + bfd_nonfatal (archname); + if (bfd_get_error () == bfd_error_file_ambiguously_recognized) + { + list_matching_formats (matching); + free (matching); + } + xexit (1); + } + + if (! bfd_has_map (arch)) + /* xgettext:c-format */ + fatal (_("%s: no archive map to update"), archname); + + bfd_update_armap_timestamp (arch); + + if (! bfd_close (arch)) + bfd_fatal (archname); +#endif + return 0; +} + +/* Things which are interesting to map over all or some of the files: */ + +static void +print_descr (bfd *abfd) +{ + print_arelt_descr (stdout, abfd, verbose); +}