From fdc51f766c151894a9b9d048d9e580389ad7c9d5 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Sun, 22 May 2016 17:08:05 +0900 Subject: sys-devel/binutils: tricks merged into profiles. --- sys-devel/binutils/ChangeLog | 2281 ---------------- sys-devel/binutils/Manifest | 57 - sys-devel/binutils/binutils-2.20.1-r1.ebuild | 30 - sys-devel/binutils/binutils-2.21.1-r1.ebuild | 30 - sys-devel/binutils/binutils-2.22-r1.ebuild | 60 - sys-devel/binutils/binutils-2.23.51.0.3.ebuild | 60 - sys-devel/binutils/binutils-2.23.51.0.5.ebuild | 60 - sys-devel/binutils/binutils-2.23.51.0.6.ebuild | 60 - sys-devel/binutils/binutils-2.23.51.0.8.ebuild | 60 - sys-devel/binutils/binutils-2.23.ebuild | 65 - sys-devel/binutils/binutils-2.24-r3.ebuild | 22 - sys-devel/binutils/files/2.18-bfd-alloca.patch | 130 - sys-devel/binutils/files/2.18-bfd-bufsz.patch | 38 - sys-devel/binutils/files/2.18-bfd-ia64elf.patch | 96 - sys-devel/binutils/files/2.18-gprof-fabs.patch | 151 -- sys-devel/binutils/files/2.18-ldwrap-interix.sh | 82 - sys-devel/binutils/files/2.18-solarisx86_64.patch | 32 - sys-devel/binutils/files/2.21-ldwrap-interix.sh | 94 - sys-devel/binutils/files/binutils-2.16-gcc4.patch | 11 - .../binutils/files/binutils-2.16-solaris10.patch | 34 - .../binutils/files/binutils-2.18.50.0.7-mint.patch | 2503 ------------------ .../files/binutils-2.18.50.0.7-mint2.patch | 94 - .../files/binutils-2.18.50.0.9-reloc.patch | 20 - .../binutils-2.18.50.0.9-solaris-eh-frame.patch | 183 -- .../binutils/files/binutils-2.19.1-hppa-hpux.patch | 444 ---- .../binutils/files/binutils-2.19.1-hpux.patch | 22 - .../binutils/files/binutils-2.19.1-parallel.patch | 12 - .../binutils/files/binutils-2.19.50.0.1-mint.patch | 66 - .../binutils-2.20.51.0.1-linux-x86-on-amd64.patch | 13 - .../binutils/files/binutils-2.21.51.0.6-mint.patch | 2775 -------------------- .../binutils/files/binutils-2.21.53.0.2-mint.patch | 2667 ------------------- sys-devel/binutils/files/binutils-2.22-mint.patch | 2656 ------------------- .../files/binutils-2.23-ar-ranlib-truncate.patch | 37 - .../binutils/files/binutils-2.23-mbstate_t.patch | 184 -- .../files/binutils-2.23-no-ld-script-sysroot.patch | 13 - .../files/binutils-2.23-no-rpath-sysroot.patch | 44 - .../files/binutils-2.23-runtime-sysroot.patch | 211 -- .../binutils/files/binutils-2.24-native-lib.patch | 13 - .../files/binutils-2.24-runtime-sysroot.patch | 202 -- sys-devel/binutils/metadata.xml | 9 - 40 files changed, 15621 deletions(-) delete mode 100644 sys-devel/binutils/ChangeLog delete mode 100644 sys-devel/binutils/Manifest delete mode 100644 sys-devel/binutils/binutils-2.20.1-r1.ebuild delete mode 100644 sys-devel/binutils/binutils-2.21.1-r1.ebuild delete mode 100644 sys-devel/binutils/binutils-2.22-r1.ebuild delete mode 100644 sys-devel/binutils/binutils-2.23.51.0.3.ebuild delete mode 100644 sys-devel/binutils/binutils-2.23.51.0.5.ebuild delete mode 100644 sys-devel/binutils/binutils-2.23.51.0.6.ebuild delete mode 100644 sys-devel/binutils/binutils-2.23.51.0.8.ebuild delete mode 100644 sys-devel/binutils/binutils-2.23.ebuild delete mode 100644 sys-devel/binutils/binutils-2.24-r3.ebuild delete mode 100644 sys-devel/binutils/files/2.18-bfd-alloca.patch delete mode 100644 sys-devel/binutils/files/2.18-bfd-bufsz.patch delete mode 100644 sys-devel/binutils/files/2.18-bfd-ia64elf.patch delete mode 100644 sys-devel/binutils/files/2.18-gprof-fabs.patch delete mode 100644 sys-devel/binutils/files/2.18-ldwrap-interix.sh delete mode 100644 sys-devel/binutils/files/2.18-solarisx86_64.patch delete mode 100644 sys-devel/binutils/files/2.21-ldwrap-interix.sh delete mode 100644 sys-devel/binutils/files/binutils-2.16-gcc4.patch delete mode 100644 sys-devel/binutils/files/binutils-2.16-solaris10.patch delete mode 100644 sys-devel/binutils/files/binutils-2.18.50.0.7-mint.patch delete mode 100644 sys-devel/binutils/files/binutils-2.18.50.0.7-mint2.patch delete mode 100644 sys-devel/binutils/files/binutils-2.18.50.0.9-reloc.patch delete mode 100644 sys-devel/binutils/files/binutils-2.18.50.0.9-solaris-eh-frame.patch delete mode 100644 sys-devel/binutils/files/binutils-2.19.1-hppa-hpux.patch delete mode 100644 sys-devel/binutils/files/binutils-2.19.1-hpux.patch delete mode 100644 sys-devel/binutils/files/binutils-2.19.1-parallel.patch delete mode 100644 sys-devel/binutils/files/binutils-2.19.50.0.1-mint.patch delete mode 100644 sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch delete mode 100644 sys-devel/binutils/files/binutils-2.21.51.0.6-mint.patch delete mode 100644 sys-devel/binutils/files/binutils-2.21.53.0.2-mint.patch delete mode 100644 sys-devel/binutils/files/binutils-2.22-mint.patch delete mode 100644 sys-devel/binutils/files/binutils-2.23-ar-ranlib-truncate.patch delete mode 100644 sys-devel/binutils/files/binutils-2.23-mbstate_t.patch delete mode 100644 sys-devel/binutils/files/binutils-2.23-no-ld-script-sysroot.patch delete mode 100644 sys-devel/binutils/files/binutils-2.23-no-rpath-sysroot.patch delete mode 100644 sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch delete mode 100644 sys-devel/binutils/files/binutils-2.24-native-lib.patch delete mode 100644 sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch delete mode 100644 sys-devel/binutils/metadata.xml diff --git a/sys-devel/binutils/ChangeLog b/sys-devel/binutils/ChangeLog deleted file mode 100644 index ae4c66e..0000000 --- a/sys-devel/binutils/ChangeLog +++ /dev/null @@ -1,2281 +0,0 @@ -# ChangeLog for sys-devel/binutils -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/ChangeLog,v 1.476 2012/12/29 20:58:39 vapier Exp $ - -*binutils-2.23.51.0.8 (29 Dec 2012) - - 29 Dec 2012; Mike Frysinger +binutils-2.23.51.0.8.ebuild: - Version bump #449124 by Arfrever Frehtes Taifersar Arahesis. - -*binutils-2.23.51.0.7 (20 Dec 2012) - - 20 Dec 2012; Mike Frysinger +binutils-2.23.51.0.7.ebuild: - Version bump. - - 05 Dec 2012; Fabian Groffen - +files/binutils-2.23-mbstate_t.patch, binutils-2.23.ebuild: - Add upstream mbstate_t patch, bug #445326 - -*binutils-2.23.51.0.6 (26 Nov 2012) - - 26 Nov 2012; Mike Frysinger +binutils-2.23.51.0.6.ebuild: - Version bump. - -*binutils-2.23.1 (15 Nov 2012) - - 15 Nov 2012; Mike Frysinger +binutils-2.23.1.ebuild: - Version bump. - -*binutils-2.23.51.0.5 (13 Nov 2012) - - 13 Nov 2012; Mike Frysinger +binutils-2.23.51.0.5.ebuild: - Version bump. - - 02 Nov 2012; Mike Frysinger binutils-2.23.51.0.3.ebuild, - binutils-2.23.ebuild: - Drop ld sysroot patch since upstream has merged a proper fix. - -*binutils-2.23 (24 Oct 2012) - - 24 Oct 2012; Mike Frysinger +binutils-2.23.ebuild: - Version bump. - - 29 Sep 2012; Raúl Porcel binutils-2.22-r1.ebuild: - alpha/ia64/sh/sparc stable wrt #414865 - -*binutils-2.23.51.0.3 (19 Sep 2012) - - 19 Sep 2012; Mike Frysinger +binutils-2.23.51.0.3.ebuild: - Version bump. - -*binutils-2.23.51.0.2 (11 Sep 2012) - - 11 Sep 2012; Mike Frysinger +binutils-2.23.51.0.2.ebuild: - Version bump. - - 22 Aug 2012; Michael Weber binutils-2.22-r1.ebuild: - ppc stable (bug 414865). - - 10 Aug 2012; Mike Frysinger binutils-2.22-r1.ebuild: - Build with -fPIC on s390x #430554 by Raúl Porcel. - - 08 Aug 2012; Mike Frysinger binutils-2.23.51.0.1.ebuild: - Fix applying of lib32 patch as reported by Arfrever. - -*binutils-2.23.51.0.1 (07 Aug 2012) - - 07 Aug 2012; Mike Frysinger +binutils-2.23.51.0.1.ebuild: - Version bump. - - 07 Aug 2012; Mike Frysinger -binutils-2.16.1-r3.ebuild, - -binutils-2.16.91.0.6.ebuild, -binutils-2.18-r3.ebuild, - -binutils-2.18-r4.ebuild, -binutils-2.22.52.0.1.ebuild, - -binutils-2.22.52.0.2.ebuild, -binutils-2.22.52.0.3.ebuild: - Move older versions to toolchain overlay. - - 07 Aug 2012; Brent Baude binutils-2.22-r1.ebuild: - Marking binutils-2.22-r1 ppc64 for bug 414865 - - 07 Aug 2012; Agostino Sarubbo binutils-2.22-r1.ebuild: - Stable for X86, wrt bug #414865 - - 07 Aug 2012; Agostino Sarubbo binutils-2.22-r1.ebuild: - Stable for amd64, wrt bug #424865 - - 07 Aug 2012; Raúl Porcel binutils-2.22-r1.ebuild: - s390 stable wrt #414865 - - 06 Aug 2012; Brent Baude binutils-2.22-r1.ebuild: - Marking binutils-2.22-r1 ppc64 for bug 414865 - - 05 Aug 2012; Markus Meier binutils-2.22-r1.ebuild: - arm stable, bug #414865 - - 02 Aug 2012; Richard Yao binutils-2.22.90.ebuild: - Set -*-fbsd keywords due to -ldl issue - - 01 Aug 2012; Jeroen Roovers binutils-2.22-r1.ebuild: - Stable for HPPA (bug #414865). - - 28 Jul 2012; Mike Frysinger binutils-2.22.90.ebuild: - Fix applying of lib32 patch #428366 by Alexandre. - -*binutils-2.22.90 (27 Jul 2012) - - 27 Jul 2012; Mike Frysinger +binutils-2.22.90.ebuild: - Version bump. - -*binutils-2.22.52.0.4 (06 Jul 2012) - - 06 Jul 2012; Mike Frysinger +binutils-2.22.52.0.4.ebuild: - Version bump. - - 15 Jun 2012; Naohiro Aota binutils-2.22-r1.ebuild: - Add ~x86-fbsd. - - 15 Jun 2012; Richard Yao binutils-2.22-r1.ebuild: - Modify FBSD patch to include update to ./configure script, bug #421069 - - 13 Jun 2012; Richard Yao binutils-2.22-r1.ebuild: - Push out fix for build failure on FreeBSD (bug #347931) by Naohiro Aota and keyword ~amd64-fbsd - - 31 May 2012; Mike Frysinger binutils-2.20.1-r1.ebuild: - Push out fix for POSIX test behavior #417549 by Richard Yao. - - 22 May 2012; Mike Frysinger binutils-2.22-r1.ebuild, - binutils-2.22.52.0.1.ebuild, binutils-2.22.52.0.2.ebuild, - binutils-2.22.52.0.3.ebuild: - Drop patch-2.6 requirement now that the profile pulls it in. - -*binutils-2.22.52.0.3 (09 May 2012) - - 09 May 2012; Mike Frysinger +binutils-2.22.52.0.3.ebuild: - Version bump. - - 26 Apr 2012; Alexis Ballier binutils-2.20.1-r1.ebuild: - keyword ~amd64-fbsd - - 26 Apr 2012; Mike Frysinger -binutils-2.21.1.ebuild, - -binutils-2.21.52.0.1.ebuild, -binutils-2.21.52.0.2.ebuild, - -binutils-2.21.53.0.1.ebuild, -binutils-2.21.53.0.2.ebuild, - -binutils-2.21.ebuild, -binutils-2.22.ebuild: - Move older versions to the toolchain overlay. - -*binutils-2.22.52.0.2 (26 Apr 2012) - - 26 Apr 2012; Mike Frysinger +binutils-2.22.52.0.2.ebuild: - Version bump. - - 04 Mar 2012; Mike Frysinger binutils-2.22-r1.ebuild: - Add fix from upstream for hppa/plt handling #406349 by Jeroen Roovers. - - 06 Feb 2012; Mike Frysinger binutils-2.22.52.0.1.ebuild: - Drop KEYWORDS -- didn't mean to add those. - -*binutils-2.22.52.0.1 (05 Feb 2012) - - 05 Feb 2012; Mike Frysinger +binutils-2.22.52.0.1.ebuild: - Version bump. - -*binutils-9999 (05 Feb 2012) - - 05 Feb 2012; Mike Frysinger +binutils-9999.ebuild: - Add live git version. - - 28 Dec 2011; Mark Loeser binutils-2.21.1-r1.ebuild: - Stable for ppc/ppc64; bug #378485 - -*binutils-2.22-r1 (11 Dec 2011) - - 11 Dec 2011; Mike Frysinger +binutils-2.22-r1.ebuild: - Add fixes from upstream for ppc/hppa/s390x, and a hardened fix for static - linking. - - 11 Dec 2011; Raúl Porcel binutils-2.21.1-r1.ebuild: - sparc stable wrt #378485 - - 09 Dec 2011; Fabian Groffen - +files/binutils-2.22-mint.patch, binutils-2.22.ebuild: - Add updated patch for FreeMiNT by Alan Hourihane, bug #394151 - - 05 Dec 2011; Mike Frysinger Manifest: - Update patch tarball digests to match published one #393233 by Jerome Kurtz. - - 05 Dec 2011; Mike Frysinger binutils-2.21.1-r1.ebuild: - Fix building on s390x systems #391431 by Raúl Porcel. - - 23 Nov 2011; Diego E. Pettenò binutils-2.22.ebuild: - QA: make sure to depend on a patch(1) version that actually applies all the - patches. - -*binutils-2.22 (21 Nov 2011) - - 21 Nov 2011; Mike Frysinger +binutils-2.22.ebuild: - Version bump. - - 19 Nov 2011; Mike Frysinger binutils-2.21.1-r1.ebuild: - Mark alpha/arm/ia64/m68k/s390/sh stable #378485. - - 17 Nov 2011; Pawel Hajdan jr - binutils-2.21.1-r1.ebuild: - x86 stable wrt bug #378485 - - 16 Oct 2011; Mike Frysinger binutils-2.21.1-r1.ebuild: - Add fix from upstream for mips ld segfaults #387055 by Matt Turner. - - 06 Oct 2011; Jeroen Roovers binutils-2.21.1-r1.ebuild: - Stable for HPPA (bug #378485). - - 22 Sep 2011; Mike Frysinger binutils-2.18-r3.ebuild, - binutils-2.18-r4.ebuild, binutils-2.19.1-r1.ebuild, - binutils-2.20.1-r1.ebuild, binutils-2.21.1.ebuild, binutils-2.21.1-r1.ebuild: - Drop mirror restrict now that most should be synced. - - 19 Sep 2011; Mike Frysinger binutils-2.21.1-r1.ebuild: - Fix up most test failures #379105. - - 18 Sep 2011; Mike Frysinger binutils-2.18-r3.ebuild, - binutils-2.18-r4.ebuild, binutils-2.19.1-r1.ebuild, - binutils-2.20.1-r1.ebuild, binutils-2.21.1.ebuild, binutils-2.21.1-r1.ebuild: - Temporarily set some ebuilds to ignore Gentoo mirrors since upstream - regenerated their tarballs #381831 by Randy Barlow. - - 25 Aug 2011; Markos Chandras binutils-2.21.1.ebuild, - binutils-2.21.1-r1.ebuild: - Restore ~amd64 to 2.21.1 and stabilize 2.21.1-r1 instead. Bug #378485 - - 22 Aug 2011; Tony Vroon binutils-2.21.1.ebuild: - Marked stable on AMD64 based on arch testing by Ian "idella4" Delaney & - Agostino "ago" Sarubbo in bug #378485. The test suite has gained a failure, - but the package was deemed functional. - -*binutils-2.21.1-r1 (22 Aug 2011) - - 22 Aug 2011; Mike Frysinger +binutils-2.21.1-r1.ebuild: - Fix up pax patch due to local variable renames #379321 by Sven Vermeulen. - - 22 Aug 2011; Mike Frysinger -binutils-2.21.51.0.1.ebuild, - -binutils-2.21.51.0.2.ebuild, -binutils-2.21.51.0.3.ebuild, - -binutils-2.21.51.0.4.ebuild, -binutils-2.21.51.0.5.ebuild, - -binutils-2.21.51.0.6.ebuild, -binutils-2.21.51.0.7.ebuild, - -binutils-2.21.51.0.8.ebuild, -binutils-2.21.51.0.9.ebuild: - Move old ebuilds to toolchain overlay. - -*binutils-2.21.53.0.2 (11 Aug 2011) -*binutils-2.21.53.0.1 (11 Aug 2011) - - 11 Aug 2011; Mike Frysinger +binutils-2.21.53.0.1.ebuild, - +binutils-2.21.53.0.2.ebuild: - Version bumps. - -*binutils-2.21.1 (28 Jun 2011) - - 28 Jun 2011; Mike Frysinger +binutils-2.21.1.ebuild: - Version bump. - -*binutils-2.21.52.0.2 (17 Jun 2011) - - 17 Jun 2011; Mike Frysinger +binutils-2.21.52.0.2.ebuild: - Version bump. - - 11 Jun 2011; Alexis Ballier binutils-2.21.ebuild: - keyword -x86-fbsd and -sparc-fbsd until bug #347931 is solved; it doesnt - build - -*binutils-2.21.52.0.1 (09 Jun 2011) - - 09 Jun 2011; Mike Frysinger +binutils-2.21.52.0.1.ebuild: - Version bump. - -*binutils-2.21.51.0.9 (09 May 2011) - - 09 May 2011; Mike Frysinger +binutils-2.21.51.0.9.ebuild: - Version bump. - -*binutils-2.21.51.0.8 (10 Apr 2011) - - 10 Apr 2011; Mike Frysinger +binutils-2.21.51.0.8.ebuild: - Version bump. - -*binutils-2.21.51.0.7 (14 Mar 2011) - - 14 Mar 2011; Mike Frysinger +binutils-2.21.51.0.7.ebuild: - Version bump. - - 06 Feb 2011; Mart Raudsepp binutils-2.16.1-r3.ebuild: - Drop to ~mips - -*binutils-2.21.51.0.6 (20 Jan 2011) - - 20 Jan 2011; Mike Frysinger - +binutils-2.21.51.0.6.ebuild: - Version bump. - -*binutils-2.21.51.0.5 (12 Jan 2011) - - 12 Jan 2011; Mike Frysinger - +binutils-2.21.51.0.5.ebuild: - Version bump. - -*binutils-2.21.51.0.4 (17 Dec 2010) - - 17 Dec 2010; Mike Frysinger - +binutils-2.21.51.0.4.ebuild: - Version bump. - -*binutils-2.21.51.0.3 (16 Dec 2010) - - 16 Dec 2010; Mike Frysinger - +binutils-2.21.51.0.3.ebuild: - Version bump. - -*binutils-2.21 (09 Dec 2010) - - 09 Dec 2010; Mike Frysinger +binutils-2.21.ebuild: - Version bump. - -*binutils-2.21.51.0.2 (07 Dec 2010) - - 07 Dec 2010; Mike Frysinger - +binutils-2.21.51.0.2.ebuild: - Version bump. - -*binutils-2.21.51.0.1 (13 Nov 2010) -*binutils-2.20.51.0.12 (13 Nov 2010) - - 13 Nov 2010; Mike Frysinger - +binutils-2.20.51.0.12.ebuild, +binutils-2.21.51.0.1.ebuild: - Version bumps. - - 30 Aug 2010; Mike Frysinger binutils-2.20.1-r1.ebuild: - Mark s390 stable #298571. - -*binutils-2.20.51.0.11 (14 Aug 2010) - - 14 Aug 2010; Mike Frysinger - +binutils-2.20.51.0.11.ebuild: - Version bump. - -*binutils-2.20.51.0.10 (27 Jul 2010) - - 27 Jul 2010; Mike Frysinger - +binutils-2.20.51.0.10.ebuild: - Version bump #329023 by Arfrever Frehtes Taifersar Arahesis. - - 18 Jul 2010; Raúl Porcel binutils-2.20.1-r1.ebuild: - sh/sparc stable wrt #298571 - - 11 Jul 2010; Tobias Klausmann - binutils-2.20.1-r1.ebuild: - Stable on alpha, bug #298571 - - 05 Jul 2010; Samuli Suominen - binutils-2.20.1-r1.ebuild: - ppc64 stable wrt #298571 - - 27 Jun 2010; binutils-2.20.1-r1.ebuild: - ppc stable #298571 - - 25 Jun 2010; Mike Frysinger binutils-2.20.1-r1.ebuild: - Mark ia64 stable #298571. - - 24 Jun 2010; Jeroen Roovers binutils-2.20.1-r1.ebuild: - Stable for HPPA (bug #298571). - - 21 Jun 2010; Markus Meier binutils-2.20.1-r1.ebuild: - arm stable, bug #298571 - - 13 Jun 2010; Christoph Mende - binutils-2.20.1-r1.ebuild: - Stable on amd64 wrt bug #298571 - - 08 Jun 2010; Pawel Hajdan jr - binutils-2.20.1-r1.ebuild: - x86 stable wrt bug #298571 - -*binutils-2.20.51.0.9 (28 May 2010) - - 28 May 2010; Mike Frysinger - +binutils-2.20.51.0.9.ebuild: - Version bump. - -*binutils-2.20.1-r1 (09 May 2010) - - 09 May 2010; Mike Frysinger - +binutils-2.20.1-r1.ebuild: - Add fix from upstream for ld internal error #317549, add fix from upstream - for dynamic PIEs #311081, and fix patching on mips systems #310279. - -*binutils-2.20.51.0.8 (14 Apr 2010) - - 14 Apr 2010; Mike Frysinger - +binutils-2.20.51.0.8.ebuild: - Version bump. - -*binutils-2.20.51.0.7 (11 Apr 2010) - - 11 Apr 2010; Mike Frysinger - +binutils-2.20.51.0.7.ebuild: - Version bump #312303. - -*binutils-2.20.1 (08 Mar 2010) - - 08 Mar 2010; Mike Frysinger +binutils-2.20.1.ebuild: - Version bump. - - 08 Mar 2010; Mike Frysinger binutils-2.20-r1.ebuild: - Fix random test failures due to our patches #242104 #245124 #267131 #292750. - -*binutils-2.20-r1 (26 Feb 2010) - - 26 Feb 2010; Mark Loeser -binutils-2.20.ebuild, - +binutils-2.20-r1.ebuild: - Bump for new patchset which fixes bug #302696 - -*binutils-2.20.51.0.6 (07 Feb 2010) - - 07 Feb 2010; Mike Frysinger - +binutils-2.20.51.0.6.ebuild: - Version bump. - - 03 Feb 2010; Jeroen Roovers binutils-2.19.1-r1.ebuild: - Stable for HPPA too. - - 28 Jan 2010; Mike Frysinger metadata.xml: - Drop USE=gold per #301480 -- gold is always enabled as a secondary linker - now (ld.gold). - -*binutils-2.20.51.0.5 (16 Jan 2010) - - 16 Jan 2010; Mike Frysinger - +binutils-2.20.51.0.5.ebuild: - Version bump. - - 11 Jan 2010; Raúl Porcel binutils-2.19.1-r1.ebuild: - arm stable - -*binutils-2.20.51.0.4 (18 Dec 2009) - - 18 Dec 2009; Mike Frysinger - +binutils-2.20.51.0.4.ebuild: - Version bump. - - 01 Dec 2009; Tom Gall binutils-2.19.1-r1.ebuild: - stable on ppc64 - -*binutils-2.20.51.0.3 (21 Nov 2009) - - 21 Nov 2009; Mike Frysinger - +binutils-2.20.51.0.3.ebuild: - Version bump #293141. - - 14 Nov 2009; Mike Frysinger binutils-2.20.ebuild: - Add fix from upstream for USE=multitarget #289756 by Rafał Mużyło. - -*binutils-2.20 (19 Oct 2009) - - 19 Oct 2009; Mike Frysinger +binutils-2.20.ebuild: - Version bump #289673 by Lars Wendler. - -*binutils-2.20.51.0.2 (10 Oct 2009) - - 10 Oct 2009; Mike Frysinger - +binutils-2.20.51.0.2.ebuild: - Version bump. - - 14 Sep 2009; Raúl Porcel binutils-2.19.1-r1.ebuild: - s390 stable - - 09 Sep 2009; Mike Frysinger binutils-2.19.1-r1.ebuild: - Fix gold build with gcc-4.4 #269260. - -*binutils-2.20.51.0.1 (09 Sep 2009) - - 09 Sep 2009; Mike Frysinger - +binutils-2.20.51.0.1.ebuild: - Version bump. - -*binutils-2.19.51.0.14 (23 Jul 2009) - - 23 Jul 2009; Mark Loeser - -binutils-2.19.51.0.12.ebuild, +binutils-2.19.51.0.14.ebuild: - Version bump, remove old - -*binutils-2.19.51.0.13 (22 Jul 2009) - - 22 Jul 2009; Mark Loeser - -binutils-2.19.51.0.10.ebuild, -binutils-2.19.51.0.11.ebuild, - +binutils-2.19.51.0.13.ebuild: - Version bump - -*binutils-2.19.51.0.12 (20 Jul 2009) - - 20 Jul 2009; Mike Frysinger - +binutils-2.19.51.0.12.ebuild: - Version bump. - -*binutils-2.19.51.0.11 (12 Jul 2009) - - 12 Jul 2009; Mark Loeser - +binutils-2.19.51.0.11.ebuild: - Version bump; bug #276498 - -*binutils-2.19.51.0.10 (19 Jun 2009) - - 19 Jun 2009; Mike Frysinger - +binutils-2.19.51.0.10.ebuild: - Version bump. - -*binutils-2.19.51.0.9 (07 Jun 2009) - - 07 Jun 2009; Mike Frysinger - +binutils-2.19.51.0.9.ebuild: - Version bump. - -*binutils-2.19.51.0.8 (03 Jun 2009) - - 03 Jun 2009; Mike Frysinger - +binutils-2.19.51.0.8.ebuild: - Version bump. - -*binutils-2.19.51.0.7 (01 Jun 2009) - - 01 Jun 2009; Mike Frysinger - +binutils-2.19.51.0.7.ebuild: - Version bump. - -*binutils-2.19.51.0.6 (30 May 2009) - - 30 May 2009; Mike Frysinger - +binutils-2.19.51.0.6.ebuild: - Version bump. - - 26 May 2009; Diego E. Pettenò - binutils-2.19.51.0.5.ebuild: - Update patchlevel to pick up the new patch to update ld(1) wrt - --enable-new-dtags. - -*binutils-2.19.51.0.5 (26 May 2009) - - 26 May 2009; Mike Frysinger - +binutils-2.19.51.0.5.ebuild: - Version bump. - - 14 May 2009; Ryan Hill metadata.xml: - Set proper expectations for the gold linker. - - 09 May 2009; Mike Frysinger metadata.xml: - Add new USE=gold flag #266282 by Dror Levin. - -*binutils-2.19.51.0.4 (09 May 2009) - - 09 May 2009; Mike Frysinger - +binutils-2.19.51.0.4.ebuild: - Version bump #267297 by Arfrever Frehtes Taifersar Arahesis. - -*binutils-2.19.1-r1 (14 Mar 2009) - - 14 Mar 2009; Mike Frysinger - +binutils-2.19.1-r1.ebuild: - Add strip fixes from upstream for #183725 by Harald van Dijk and #257783 - by Alexey Shvetsov and Raúl Porcel. - -*binutils-2.19.51.0.3 (10 Mar 2009) - - 10 Mar 2009; Mike Frysinger - +binutils-2.19.51.0.3.ebuild: - Version bump. - -*binutils-2.19.51.0.2 (05 Feb 2009) - - 05 Feb 2009; Mike Frysinger - +binutils-2.19.51.0.2.ebuild: - Version bump. - -*binutils-2.19.1 (05 Feb 2009) - - 05 Feb 2009; Mike Frysinger +binutils-2.19.1.ebuild: - Version bump. - -*binutils-2.19.51.0.1 (10 Jan 2009) - - 10 Jan 2009; Mike Frysinger - +binutils-2.19.51.0.1.ebuild: - Version bump. - - 08 Jan 2009; Javier Villavicencio - binutils-2.19.ebuild: - Keyworded ~x86-fbsd. - - 14 Dec 2008; Alexis Ballier binutils-2.19.ebuild: - keyword ~sparc-fbsd - - 28 Nov 2008; Mike Frysinger binutils-2.19.ebuild, - binutils-2.19.50.0.1.ebuild: - Fix a bunch of PaX test failures #245124 and fix cross-compiling #245478. - - 17 Nov 2008; Joshua Kinard binutils-2.19.ebuild: - Add ~mips to KEYWORDS for binutils-2.19. - - 05 Nov 2008; Jeroen Roovers binutils-2.19.ebuild: - Marked ~hppa too. - - 02 Nov 2008; Mike Frysinger binutils-2.19.ebuild: - Add ~alpha/~sparc love. - -*binutils-2.19 (01 Nov 2008) - - 01 Nov 2008; Mike Frysinger +binutils-2.19.ebuild: - Version bump. - -*binutils-2.19.50.0.1 (26 Oct 2008) - - 26 Oct 2008; Mike Frysinger - +binutils-2.19.50.0.1.ebuild: - Version bump #241482. - -*binutils-2.18-r4 (25 Oct 2008) - - 25 Oct 2008; Mark Loeser +binutils-2.18-r4.ebuild: - Patchset bump to fix usage on mips; bug #223229 - -*binutils-2.18.50.0.9 (21 Sep 2008) - - 21 Sep 2008; Mike Frysinger - +binutils-2.18.50.0.9.ebuild: - Version bump #236197. - - 20 Aug 2008; Mike Frysinger binutils-2.18-r3.ebuild: - Disable gnu hash for mips #233233. - -*binutils-2.18.50.0.8 (20 Aug 2008) - - 20 Aug 2008; Mike Frysinger - +binutils-2.18.50.0.8.ebuild: - Version bump #231687. - - 02 Aug 2008; Panagiotis Christopoulos metadata.xml: - Update metadata.xml to include USE flag descriptions. Entries taken from - profiles/use.local.desc. GLEP 56 - - 20 Jul 2008; Ryan Hill binutils-2.18-r3.ebuild: - Bump patchset for bug #194949. - - 07 Jul 2008; Markus Meier binutils-2.18-r3.ebuild: - amd64 stable, bug #230593 - - 07 Jul 2008; Raúl Porcel binutils-2.18-r3.ebuild: - alpha/ia64/sparc stable wrt security #230593 - - 07 Jul 2008; Christian Faulhammer - binutils-2.18-r3.ebuild: - stable x86, security bug 230593 - - 07 Jul 2008; Brent Baude binutils-2.18-r3.ebuild: - Marking binutils-2.18-r3 ppc64 and ppc for bug 230593 - - 06 Jul 2008; Jeroen Roovers binutils-2.18-r3.ebuild: - Stable for HPPA (bug #230593). - -*binutils-2.18-r3 (05 Jul 2008) - - 05 Jul 2008; Mark Loeser +binutils-2.18-r3.ebuild: - Version bump for bug #230593 - -*binutils-2.18-r2 (23 Jun 2008) - - 23 Jun 2008; Mike Frysinger +binutils-2.18-r2.ebuild: - Drop gnu hash patch for mips #211680 and backport freebsd fixups #223249. - -*binutils-2.18.50.0.7 (10 May 2008) - - 10 May 2008; Mike Frysinger - +binutils-2.18.50.0.7.ebuild: - Version bump. - -*binutils-2.18.50.0.6 (03 Apr 2008) - - 03 Apr 2008; Mike Frysinger - +binutils-2.18.50.0.6.ebuild: - Version bump. - -*binutils-2.18.50.0.5 (17 Mar 2008) - - 17 Mar 2008; Mike Frysinger - +binutils-2.18.50.0.5.ebuild: - Version bump #213618 by Arfrever Frehtes Taifersar Arahesis. - -*binutils-2.18.50.0.4 (09 Feb 2008) - - 09 Feb 2008; Mike Frysinger - +binutils-2.18.50.0.4.ebuild: - Version bump. - - 20 Nov 2007; Joshua Kinard binutils-2.18-r1.ebuild: - Stable on mips, per #195511. - - 14 Nov 2007; Jeroen Roovers binutils-2.18-r1.ebuild: - Stable for HPPA too (not quite bug #195511). - -*binutils-2.18.50.0.3 (04 Nov 2007) - - 04 Nov 2007; Mike Frysinger - +binutils-2.18.50.0.3.ebuild: - Version bump. - - 17 Oct 2007; Raúl Porcel binutils-2.18-r1.ebuild: - alpha/ia64/sparc stable wrt #195511 - - 16 Oct 2007; Christoph Mende binutils-2.18-r1.ebuild: - Stable on amd64 wrt bug #195511 - - 15 Oct 2007; Markus Rothe binutils-2.18-r1.ebuild: - Stable on ppc64; bug #195511 - - 14 Oct 2007; Christian Faulhammer - binutils-2.18-r1.ebuild: - stable x86, bug 195511 - - 12 Oct 2007; Lars Weiler binutils-2.18-r1.ebuild: - stable ppc, bug #195511 - - 08 Oct 2007; Mike Frysinger binutils-2.18-r1.ebuild: - Fix makeinfo version check to work with texinfo-4.11 #195074. - - 07 Oct 2007; Mike Frysinger binutils-2.17-r2.ebuild: - Add support for DragonFly BSD #189079. - - 06 Oct 2007; Mike Frysinger binutils-2.17-r2.ebuild, - binutils-2.18-r1.ebuild: - Fix incorrect CFLAGS being used for build utils #192959 by Woodward Crim - Hoffman. - - 06 Oct 2007; Mike Frysinger binutils-2.18-r1.ebuild: - Prevent makeinfo from being run #193364. - -*binutils-2.18-r1 (06 Oct 2007) - - 06 Oct 2007; Mike Frysinger +binutils-2.18-r1.ebuild: - Fix from upstream for GNU RELRO stripping, disable false positive tests, - and add fix from upstream for multitarget on x86_64. - -*binutils-2.17-r2 (06 Oct 2007) - - 06 Oct 2007; Mike Frysinger +binutils-2.17-r2.ebuild: - Add backwards compat support for GNU_HASH for a few anal targets, disable - false positive tests, and add fix from upstream for multitarget on x86_64. - -*binutils-2.18.50.0.2 (06 Oct 2007) - - 06 Oct 2007; Mike Frysinger - +binutils-2.18.50.0.2.ebuild: - Version bump. - - 26 Sep 2007; Raúl Porcel binutils-2.17-r1.ebuild: - sparc stable wrt #192258 - - 26 Sep 2007; Joshua Kinard binutils-2.17-r1.ebuild: - Stable on mips, per #192258. - - 17 Sep 2007; Lars Weiler binutils-2.17-r1.ebuild: - Stable on ppc; bug #192258. - - 16 Sep 2007; Christoph Mende binutils-2.17-r1.ebuild: - Stable on amd64 wrt bug #192258 - - 13 Sep 2007; Raúl Porcel binutils-2.17-r1.ebuild: - ia64/x86 stable wrt #192258 - - 12 Sep 2007; Mike Frysinger - binutils-2.18.50.0.1.ebuild: - Ack mein leapen! This shouldnt be in ~arch. - -*binutils-2.18.50.0.1 (09 Sep 2007) - - 09 Sep 2007; Mike Frysinger - +binutils-2.18.50.0.1.ebuild: - Version bump. - - 04 Sep 2007; Joshua Kinard binutils-2.18.ebuild: - Update the patchset to 1.1 to pull in a patch for mips to enable support for - .gnu.hash capabilities, and mark unstable on mips. - -*binutils-2.18 (29 Aug 2007) - - 29 Aug 2007; Mike Frysinger +binutils-2.18.ebuild: - Version bump. - - 17 Aug 2007; Christoph Mende - binutils-2.17.50.0.18.ebuild: - Keyworded ~amd64 to fix PIC generation with gcc-4.2, bug #186089 - -*binutils-2.17.50.0.18 (01 Aug 2007) - - 01 Aug 2007; Mike Frysinger - +binutils-2.17.50.0.18.ebuild: - Version bump. - -*binutils-2.17-r1 (29 Jul 2007) - - 29 Jul 2007; Mike Frysinger +binutils-2.17-r1.ebuild: - Fix building with sanitized linux-headers, fix stripping of .o objects, and - discard GNU debuglink sections. - - 03 Jul 2007; Tom Gall binutils-2.17.50.0.17.ebuild: - stable on ppc64, addresses power6, ps3 and other gcc issues - - 01 Jul 2007; Jose Luis Rivero - binutils-2.17.50.0.16.ebuild: - Stable on alpha. This fixes the compilation error (CFI related) when - compiling glibc. Details in bug #179353 - - 25 Jun 2007; Christian Faulhammer binutils-2.17.ebuild: - stable x86, security bug 134112 - - 24 Jun 2007; Christoph Mende binutils-2.17.ebuild: - Stable on amd64 wrt security bug 134112 - - 24 Jun 2007; Piotr Jaroszyński - binutils-2.17.50.0.9.ebuild, binutils-2.17.50.0.10.ebuild, - binutils-2.17.50.0.11.ebuild, binutils-2.17.50.0.13.ebuild, - binutils-2.17.50.0.14.ebuild, binutils-2.17.50.0.15.ebuild: - (QA) Don't use KEYWORDS="-*". bug #160519. - -*binutils-2.17.50.0.17 (19 Jun 2007) - - 19 Jun 2007; Mike Frysinger - +binutils-2.17.50.0.17.ebuild: - Version bump. - - 14 May 2007; Bryan Østergaard - binutils-2.17.50.0.16.ebuild: - Add ~alpha keyword as .15 and newer fixes an ugly bug in ld on Alpha. - - 13 May 2007; Joshua Kinard binutils-2.17.ebuild: - Stable on mips. - -*binutils-2.17.50.0.16 (12 May 2007) - - 12 May 2007; Mike Frysinger - +binutils-2.17.50.0.16.ebuild: - Version bump. - - 23 Apr 2007; Jeroen Roovers binutils-2.17.50.0.12.ebuild: - Stable for HPPA (bug #168131). - -*binutils-2.17.50.0.15 (20 Apr 2007) - - 20 Apr 2007; Mike Frysinger - +binutils-2.17.50.0.15.ebuild: - Version bump. - - 28 Mar 2007; Jeroen Roovers binutils-2.17.50.0.12.ebuild: - Marked ~hppa (bug #168131). - -*binutils-2.17.50.0.14 (24 Mar 2007) - - 24 Mar 2007; Mike Frysinger - +binutils-2.17.50.0.14.ebuild: - Version bump. - -*binutils-2.17.50.0.13 (16 Mar 2007) - - 16 Mar 2007; Mike Frysinger - +binutils-2.17.50.0.13.ebuild: - Version bump. - - 13 Feb 2007; Bryan Østergaard binutils-2.17.ebuild: - Stable on Alpha. - -*binutils-2.17.50.0.12 (28 Jan 2007) - - 28 Jan 2007; Mike Frysinger - +binutils-2.17.50.0.12.ebuild: - Version bump. - -*binutils-2.17.50.0.11 (26 Jan 2007) - - 26 Jan 2007; Mike Frysinger - +binutils-2.17.50.0.11.ebuild: - Version bump. - -*binutils-2.17.50.0.10 (23 Jan 2007) - - 23 Jan 2007; Mike Frysinger - +binutils-2.17.50.0.10.ebuild: - Version bump. - -*binutils-2.17.50.0.9 (04 Jan 2007) - - 04 Jan 2007; Mike Frysinger - +binutils-2.17.50.0.9.ebuild: - Version bump. - - 18 Dec 2006; Tom Gall - binutils-2.17.ebuild: - stable on ppc64 - -*binutils-2.17.50.0.8 (03 Dec 2006) - - 03 Dec 2006; Mike Frysinger - +binutils-2.17.50.0.8.ebuild: - Version bump. - -*binutils-2.17.50.0.7 (29 Nov 2006) - - 29 Nov 2006; Mike Frysinger - +binutils-2.17.50.0.7.ebuild: - Version bump. - -*binutils-2.17.50.0.6 (21 Oct 2006) - - 21 Oct 2006; Mike Frysinger - +binutils-2.17.50.0.6.ebuild: - Version bump. - - 19 Oct 2006; Gustavo Zacarias binutils-2.17.ebuild: - Stable on sparc - - 19 Oct 2006; Luca Barbato binutils-2.17.ebuild: - Marked ppc - - 17 Oct 2006; Roy Marples binutils-2.17.ebuild: - Added ~sparc-fbsd keyword. - - 10 Oct 2006; Joel Martin binutils-2.17.ebuild: - Add ~mips to binutils-2.17 - -*binutils-2.17.50.0.5 (27 Sep 2006) - - 27 Sep 2006; Mike Frysinger - +binutils-2.17.50.0.5.ebuild: - Version bump. - -*binutils-2.17.50.0.4 (24 Sep 2006) - - 24 Sep 2006; Mike Frysinger - +binutils-2.17.50.0.4.ebuild: - Version bump. - - 28 Jul 2006; binutils-2.16.1-r3.ebuild: - Stable on IA64; fix bug #141681. - -*binutils-2.17.50.0.3 (17 Jul 2006) - - 17 Jul 2006; Mike Frysinger - +binutils-2.17.50.0.3.ebuild: - Version bump. - - 04 Jul 2006; Bryan Østergaard - binutils-2.16.1-r3.ebuild: - Stable on alpha. - -*binutils-2.16.1-r3 (30 Jun 2006) - - 30 Jun 2006; Mike Frysinger - +binutils-2.16.1-r3.ebuild: - Backport -z lazy patch to make solar happy #134514. - - 27 Jun 2006; Gustavo Zacarias binutils-2.17.ebuild: - Keyworded ~sparc - - 27 Jun 2006; Diego Pettenò binutils-2.17.ebuild: - Add ~x86-fbsd keyword. - - 25 Jun 2006; Markus Rothe binutils-2.17.ebuild: - Added ~ppc64 - -*binutils-2.17 (24 Jun 2006) - - 24 Jun 2006; Mike Frysinger +binutils-2.17.ebuild: - Version bump. - -*binutils-2.16.94 (15 Jun 2006) - - 15 Jun 2006; Mike Frysinger +binutils-2.16.94.ebuild: - Version bump #136553 by Cory Grunden. - -*binutils-2.17.50.0.2 (10 Jun 2006) - - 10 Jun 2006; Mike Frysinger - +binutils-2.17.50.0.2.ebuild: - Version bump. - - 10 Jun 2006; Michael Hanselmann - binutils-2.16.1-r2.ebuild: - Stable on ppc. - - 09 Jun 2006; Markus Rothe binutils-2.16.1-r2.ebuild: - Stable on ppc64 - - 01 Jun 2006; Joshua Kinard binutils-2.16.1-r2.ebuild: - Marked stable on mips. - - 29 May 2006; Mark Loeser binutils-2.16.1-r2.ebuild: - Stable on x86 - - 26 May 2006; Danny van Dyk - binutils-2.16.1-r2.ebuild: - Marked stable on amd64. - -*binutils-2.16.93 (22 May 2006) - - 22 May 2006; Mike Frysinger +binutils-2.16.93.ebuild: - Version bump. - - 25 Apr 2006; Gustavo Zacarias - binutils-2.16.1-r2.ebuild: - Stable on sparc - -*binutils-2.16.92 (17 Apr 2006) - - 17 Apr 2006; Mike Frysinger +binutils-2.16.92.ebuild: - Version bump. - - 11 Apr 2006; Diego Pettenò - binutils-2.16.1-r2.ebuild: - Add ~x86-fbsd keyword. - - 30 Mar 2006; Diego Pettenò binutils-2.15.ebuild: - Add ~x86-fbsd keyword to binutils 2.15 that has FreeBSD patches. - -*binutils-2.16.91.0.7 (18 Mar 2006) - - 18 Mar 2006; Mike Frysinger - +binutils-2.16.91.0.7.ebuild: - Version bump. - -*binutils-2.16.1-r2 (02 Mar 2006) - - 02 Mar 2006; Mike Frysinger - +binutils-2.16.1-r2.ebuild: - Grab some fixes from upstream for PIE, lib search paths, and ld speedups. - -*binutils-2.16.91.0.6 (15 Feb 2006) - - 15 Feb 2006; Mike Frysinger - +binutils-2.16.91.0.6.ebuild: - Version bump. - -*binutils-2.16.91.0.5 (21 Dec 2005) - - 21 Dec 2005; Mike Frysinger - +binutils-2.16.91.0.5.ebuild: - Version bump. - - 07 Dec 2005; Guy Martin binutils-2.16.1.ebuild: - Stable on hppa. - -*binutils-2.16.1-r1 (03 Dec 2005) - - 03 Dec 2005; Mike Frysinger - +binutils-2.16.1-r1.ebuild: - Add support for -Bdirect #114008. - - 23 Nov 2005; Luis Medinas binutils-2.16.1.ebuild: - Stable on amd64. - - 23 Nov 2005; Gustavo Zacarias - binutils-2.16.1.ebuild: - Stable on sparc - - 23 Nov 2005; Mark Loeser binutils-2.16.1.ebuild: - Stable on x86; bug #112666 - - 18 Nov 2005; Joshua Kinard binutils-2.16.90.0.3.ebuild, - binutils-2.16.91.0.2.ebuild: - -mips to binutils-2.16.90.0.3, as it has unfixable quirks; ~mips to - binutils-2.16.91.0.2 for testing. - -*binutils-2.16.91.0.4 (13 Nov 2005) - - 13 Nov 2005; Mike Frysinger - +binutils-2.16.91.0.4.ebuild: - Version bump. - - 18 Oct 2005; Joseph Jezak binutils-2.16.1.ebuild: - Marked ppc stable. - - 06 Sep 2005; Markus Rothe binutils-2.16.1.ebuild: - Stable on ppc64 - - 28 Aug 2005; Joshua Kinard binutils-2.16.1.ebuild, - binutils-2.16.90.0.3.ebuild: - Bump 2.16.1 to stable on mips, and 2.16.90.0.3 to unstable. - -*binutils-2.16.91.0.3 (23 Aug 2005) - - 23 Aug 2005; Mike Frysinger - +binutils-2.16.91.0.3.ebuild: - Version bump. - -*binutils-2.16.91.0.2 (02 Aug 2005) - - 02 Aug 2005; Mike Frysinger - +binutils-2.16.91.0.2.ebuild: - Version bump. - - 13 Jul 2005; MATSUU Takuto - binutils-2.15.92.0.2-r10.ebuild: - Stable on sh. - - 13 Jul 2005; bret curtis binutils-2.16.1.ebuild, - binutils-2.16-r1.ebuild: - added to ~mips - - 12 Jul 2005; MATSUU Takuto - binutils-2.15.92.0.2-r10.ebuild: - Added ~sh to KEYWORDS. - - 07 Jul 2005; Hardave Riar - binutils-2.15.92.0.2-r10.ebuild: - Stable on mips. - - 28 Jun 2005; Markus Rothe binutils-2.16-r1.ebuild: - Back to ~ppc64; ld problem with current stable glibc :-/ - - 28 Jun 2005; Markus Rothe binutils-2.16-r1.ebuild: - Stable on ppc64 - -*binutils-2.16.91.0.1 (28 Jun 2005) - - 28 Jun 2005; Mike Frysinger - +binutils-2.16.91.0.1.ebuild: - Version bump. - -*binutils-2.16.1 (12 Jun 2005) - - 12 Jun 2005; Mike Frysinger +binutils-2.16.1.ebuild: - Version bump. - - 31 May 2005; Gustavo Zacarias - binutils-2.15.92.0.2-r10.ebuild: - Stable on sparc wrt #91398 - - 31 May 2005; Markus Rothe binutils-2.16.ebuild, - binutils-2.16-r1.ebuild: - Added ~ppc64 to KEYWORDS - - 29 May 2005; Bryan Østergaard - binutils-2.14.90.0.8-r3.ebuild: - Stable on ia64, bug 91398. - - 29 May 2005; Bryan Østergaard - binutils-2.14.90.0.8-r3.ebuild: - Stable on alpha, bug 91398. - - 28 May 2005; Rene Nussbaumer - binutils-2.15.92.0.2-r10.ebuild: - Stable on hppa; bug #91398 - - 28 May 2005; Markus Rothe - binutils-2.15.90.0.3-r5.ebuild: - Stable on ppc64 - - 28 May 2005; binutils-2.15.92.0.2-r10.ebuild: - Mark amd64 stable per bug #91398 - - 28 May 2005; Luca Barbato - binutils-2.15.90.0.3-r5.ebuild: - Marked ppc - -*binutils-2.16-r1 (28 May 2005) -*binutils-2.15.92.0.2-r10 (28 May 2005) -*binutils-2.15.91.0.2-r2 (28 May 2005) -*binutils-2.15.90.0.3-r5 (28 May 2005) -*binutils-2.15.90.0.1.1-r5 (28 May 2005) -*binutils-2.14.90.0.8-r3 (28 May 2005) - - 28 May 2005; Mike Frysinger - +binutils-2.14.90.0.8-r3.ebuild, binutils-2.15.ebuild, - +binutils-2.15.90.0.1.1-r5.ebuild, +binutils-2.15.90.0.3-r5.ebuild, - +binutils-2.15.91.0.2-r2.ebuild, +binutils-2.15.92.0.2-r10.ebuild, - +binutils-2.16-r1.ebuild, binutils-2.16.90.0.3.ebuild: - Add some more bfd checks and fix tls stripping. - -*binutils-2.15.92.0.2-r9 (17 May 2005) - - 17 May 2005; Mike Frysinger - +binutils-2.15.92.0.2-r9.ebuild: - Add patches to fix security issues #91398. - -*binutils-2.16.90.0.3 (11 May 2005) - - 11 May 2005; Mike Frysinger - +binutils-2.16.90.0.3.ebuild: - Version bump. - - 10 May 2005; Lars Weiler - binutils-2.15.92.0.2-r1.ebuild, binutils-2.15.92.0.2-r7.ebuild, - binutils-2.15.92.0.2-r8.ebuild: - Downgrading and masking on ppc due to compile errors; bug #91887. - - 07 May 2005; Michael Hanselmann - binutils-2.15.92.0.2-r8.ebuild: - Stable on hppa. - - 07 May 2005; Jan Brinkmann - binutils-2.15.92.0.2-r8.ebuild: - stable on amd64 wrt security bug #91813 - - 07 May 2005; Michael Hanselmann - binutils-2.15.92.0.2-r8.ebuild: - Stable on ppc. - -*binutils-2.16 (04 May 2005) - - 04 May 2005; Mike Frysinger +binutils-2.16.ebuild: - Version bump. - -*binutils-2.16.90.0.2 (30 Apr 2005) - - 30 Apr 2005; Mike Frysinger - +binutils-2.16.90.0.2.ebuild: - Version bump. - -*binutils-2.15.97 (21 Apr 2005) - - 21 Apr 2005; Mike Frysinger +binutils-2.15.97.ebuild: - Version bump. - -*binutils-2.14 (17 Apr 2005) - - 17 Apr 2005; Mike Frysinger +binutils-2.14.ebuild: - Add older version for ps2 support. - -*binutils-2.16.90.0.1 (12 Apr 2005) - - 12 Apr 2005; Mike Frysinger - +binutils-2.16.90.0.1.ebuild: - Version bump. - - 11 Apr 2005; Markus Rothe - -binutils-2.15.91.0.1-r1.ebuild: - removed for bug #88678 - - 09 Apr 2005; Markus Rothe - binutils-2.15.92.0.2-r8.ebuild, binutils-2.15.94.0.2.2.ebuild: - Added ~ppc64 to KEYWORDS - -*binutils-2.15.92.0.2-r8 (06 Apr 2005) - - 06 Apr 2005; Mike Frysinger - +binutils-2.15.92.0.2-r8.ebuild: - Add ld speedup / readelf buffer fix patches from redhat and a better - unlink() patch from solar/upstream. - - 30 Mar 2005; Joshua Kinard - binutils-2.14.90.0.8-r2.ebuild, binutils-2.15.91.0.2-r1.ebuild, - binutils-2.15.94.0.2.2.ebuild: - Marked 2.14.90.0.8-r2 and 2.15.91.0.2-r1 as stable on mips, and moved - 2.15.94.0.2.2 to unstable. - -*binutils-2.15.92.0.2-r7 (22 Mar 2005) - - 22 Mar 2005; Mike Frysinger - +binutils-2.15.92.0.2-r7.ebuild: - Add a TEXTREL fix for arm and warn about TEXTRELs in ld. - -*binutils-2.15.92.0.2-r6 (11 Mar 2005) - - 11 Mar 2005; Mike Frysinger - +binutils-2.15.92.0.2-r6.ebuild: - Delete old/duplicated patches and add newer/spiffier ones. See the - patchtarball and/or CVS commits for more info :P. Just be happy this one - passes make check on amd64. - - 09 Mar 2005; binutils-2.15.92.0.2-r5.ebuild: - - uClibc supports relro now. remove exception from ebuild - -*binutils-2.15.92.0.2-r5 (08 Mar 2005) - - 08 Mar 2005; Mike Frysinger - +binutils-2.15.92.0.2-r5.ebuild: - Fix up gcc-4 support for real #82907 by richard juckes. - -*binutils-2.15.92.0.2-r4 (23 Feb 2005) - - 23 Feb 2005; Mike Frysinger - -binutils-2.15.92.0.2-r3.ebuild, +binutils-2.15.92.0.2-r4.ebuild: - Fix gcc-4 patch to not break gcc-3 #83047. - - 23 Feb 2005; Jon Portnoy binutils-2.15.92.0.2-r3.ebuild : - Reverted PATCHVER=1.4 to PATCHVER=1.3 due to bug - #83047 - -*binutils-2.15.92.0.2-r3 (20 Feb 2005) - - 20 Feb 2005; +binutils-2.15.92.0.2-r3.ebuild: - - bump the binutils-patches 1.2 -> 1.3. New option ld -z nonow/-Wl,-z,nonow - -*binutils-2.15.94.0.2.2 (19 Feb 2005) - - 19 Feb 2005; Mike Frysinger - +binutils-2.15.94.0.2.2.ebuild: - Version bump. - - 23 Jan 2005; Jeremy Huddleston - binutils-2.15.92.0.2-r1.ebuild: - Stable on amd64. - - 22 Jan 2005; binutils-2.15.92.0.2-r1.ebuild, - binutils-2.15.92.0.2-r2.ebuild: - Converting 2.1.95 ~IA64 KEYWORDS into -IA64 KEYWORDS as kernels as well as - gnu-efi fail to compile with these versions... - - 11 Jan 2005; Gustavo Zacarias - binutils-2.15.92.0.2-r1.ebuild: - Stable on sparc, it's about time - - 03 Jan 2005; Ciaran McCreesh : - Change encoding to UTF-8 for GLEP 31 compliance - -*binutils-2.15.91.0.2-r1 (28 Dec 2004) - - 28 Dec 2004; Mike Frysinger - +binutils-2.15.91.0.2-r1.ebuild: - New versions to support binutils-config. - -*binutils-2.15.91.0.1-r1 (28 Dec 2004) - - 28 Dec 2004; Mike Frysinger - +binutils-2.15.91.0.1-r1.ebuild: - New versions to support binutils-config. - -*binutils-2.15.90.0.3-r4 (28 Dec 2004) - - 28 Dec 2004; Mike Frysinger - +binutils-2.15.90.0.3-r4.ebuild: - New versions to support binutils-config. - - 28 Dec 2004; Jeremy Huddleston - binutils-2.15.92.0.2-r2.ebuild: - Added to ~sparc. - - 26 Dec 2004; Jeremy Huddleston - binutils-2.15.92.0.2-r1.ebuild: - Removing sparc64-multilib stuff as we're just using the superior - binutils-config versions in that profile. - -*binutils-2.15.94.0.2 (21 Dec 2004) - - 21 Dec 2004; Mike Frysinger - +binutils-2.15.94.0.2.ebuild: - Version bump. - - 13 Dec 2004; Jeremy Huddleston - binutils-2.15.92.0.2-r1.ebuild: - Updated sparc64-multilib to use MULTILIB_CHOSTS example. - -*binutils-2.14.90.0.8-r2 (12 Dec 2004) - - 12 Dec 2004; Mike Frysinger - +binutils-2.14.90.0.8-r2.ebuild: - Use toolchain eclass. - - 10 Dec 2004; Jeremy Huddleston - binutils-2.15.92.0.2-r1.ebuild: - Updated for sparc64-multilib. - -*binutils-2.15.90.0.1.1-r4 (04 Dec 2004) - - 04 Dec 2004; Mike Frysinger - +binutils-2.15.90.0.1.1-r4.ebuild: - Version bump for toolchain-binutils support. - -*binutils-2.14.90.0.6-r8 (02 Dec 2004) - - 02 Dec 2004; Mike Frysinger - +binutils-2.14.90.0.6-r8.ebuild: - Use toolchain eclass. - - 30 Nov 2004; Guy Martin binutils-2.15.92.0.2-r1.ebuild: - Stable on hppa. Fix problems with libxml2 and others. - - 24 Nov 2004; Gustavo Zacarias - binutils-2.15.92.0.2-r1.ebuild: - Keyworded ~sparc - -*binutils-2.15.94.0.1 (23 Nov 2004) - - 23 Nov 2004; Mike Frysinger - +binutils-2.15.94.0.1.ebuild: - Version bump. - - 21 Nov 2004; Mike Frysinger - binutils-2.15.90.0.1.1-r3.ebuild: - Move to x86 stable finally. - - 21 Nov 2004; Mike Frysinger - binutils-2.15.90.0.1.1-r3.ebuild: - Move to x86 stable finally. - -*binutils-2.15.92.0.2-r2 (20 Oct 2004) - - 20 Oct 2004; Mike Frysinger - +binutils-2.15.92.0.2-r2.ebuild: - Clean up ebuild. Try to handle $CTARGET/$CHOST correctly. Use symlinks - instead of hard links in src_install(). - - 18 Oct 2004; Guy Martin binutils-2.15.92.0.2-r1.ebuild: - Added ~hppa. - -*binutils-2.15.92.0.2-r1 (11 Oct 2004) - - 11 Oct 2004; Travis Tilley +binutils-2.15.92.0.2-r1.ebuild: - removed a few unused patches from the tarball. removed an old ppc -fPIC patch - that was causing the compile to fail, closes bug 66738. updated a few patches - borrowed from fedora to their latest versions, closes bug 66871. updated pax - patch to the latest version available on pax.grsecurity.net, version - 2.15.91.0.2-200410091215 - - 06 Oct 2004; Travis Tilley binutils-2.15.92.0.2.ebuild: - added ~x86 keyword, as requested in bug 66555 - - 03 Oct 2004; Travis Tilley binutils-2.15.92.0.2.ebuild: - added ~amd64 keyword. among other things, this release fixes an x86-64 linker - warning while building the Linux kernel. - -*binutils-2.15.92.0.2 (01 Oct 2004) - - 01 Oct 2004; Joshua Kinard +binutils-2.15.92.0.2.ebuild: - Version bump. - - 01 Oct 2004; Joshua Kinard binutils-2.15.91.0.2.ebuild: - Added ~sparc to KEYWORDS. - - 01 Oct 2004; Joshua Kinard binutils-2.15.91.0.2.ebuild: - Marked ~mips. Works great for o32, n32 has problems, and is thus masked in - cascade profiles. - - 28 Sep 2004; Mike Frysinger - +files/2.15/40_all_binutils-uclibc-linker.patch, - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r3.ebuild: - Add a patch to fix uclibc linking/ld.so.con. - - 08 Sep 2004; Mike Frysinger - binutils-2.14.90.0.8-r1.ebuild, -binutils-2.14.90.0.8-r2.ebuild: - Merge the changes from -r2 back into -r1 since it was just uclibc specific. - - 06 Sep 2004; - +files/2.15/binutils-2.15-elf32-arm-textrel.patch, - binutils-2.15.90.0.1.1-r3.ebuild: - added patch from RH which allows ARCH=arm to compile & link correctly with - binutils-2.15 - - 06 Sep 2004; Luca Barbato - binutils-2.15.90.0.3-r3.ebuild: - Marked ppc - - 02 Sep 2004; Mike Frysinger - binutils-2.14.90.0.8-r1.ebuild, binutils-2.14.90.0.8-r2.ebuild, - binutils-2.15.90.0.3-r3.ebuild: - Versions 2.15 <= x <= 2.15.91.0.2 are known to produce bad code for arm under - certain circumstances. - - 01 Sep 2004; binutils-2.15.90.0.1.1-r1.ebuild, - binutils-2.15.90.0.1.1-r3.ebuild: - marking binutils-2.15.91.0.1 ~x86 again - - 31 Aug 2004; Gustavo Zacarias - binutils-2.14.90.0.8-r1.ebuild: - Stable on sparc - - 26 Aug 2004; Rob Holland binutils-2.14.90.0.8-r2.ebuild, - binutils-2.15.91.0.1-r2.ebuild, binutils-2.15.91.0.2.ebuild: - gnuconfig_update belongs in src_unpack, not src_compile - - 11 Aug 2004; Travis Tilley binutils-2.15.91.0.2.ebuild: - masking this release -amd64. most software builds fine, but on mozilla firefox - and occasionally glibc this release will segfault - - 09 Aug 2004; Travis Tilley binutils-2.15.91.0.2.ebuild: - adding ~amd64 keyword for testing - -*binutils-2.15.91.0.2 (02 Aug 2004) - - 02 Aug 2004; Joshua Kinard +binutils-2.15.91.0.2.ebuild: - New revision of binutils. Doesn't include 51* or 52* uclibc patches. - - 27 Jul 2004; Mike Frysinger - +files/2.14/binutils-2.14.90.0.6-build_modules.patch, - +files/2.14/binutils-2.14.90.0.6-cflags.patch, - +files/2.14/binutils-2.14.90.0.6-conf.patch, - +files/2.14/binutils-2.14.90.0.6-debian.patch, - binutils-2.14.90.0.6-r7.ebuild: - Add patches from uClibc build root. - - 24 Jul 2004; Travis Tilley binutils-2.15.91.0.1-r1.ebuild: - removing ~amd64 keyword - - 22 Jul 2004; binutils-2.14.90.0.8-r2.ebuild: - uclibc update - - 08 Jul 2004; Travis Tilley binutils-2.15.91.0.1-r1.ebuild: - adding ~amd64 keyword for wider testing - - 08 Jul 2004; Alexander Gabert - binutils-2.14.90.0.8-r2.ebuild: - added filter-flags for freduce-all-givs (bug id 27456) - - 03 Jul 2004; Bryan Østergaard - binutils-2.14.90.0.8-r1.ebuild: - Stable on alpha. - - 02 Jul 2004; Jeremy Huddleston - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild, - binutils-2.12.90.0.15.ebuild, binutils-2.13.90.0.16-r1.ebuild, - binutils-2.13.90.0.18-r1.ebuild, binutils-2.13.90.0.18.ebuild, - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild, - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild, - binutils-2.14.90.0.6-r3.ebuild, binutils-2.14.90.0.6-r6.ebuild, - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r4.ebuild, - binutils-2.14.90.0.7.ebuild, binutils-2.14.90.0.8-r1.ebuild, - binutils-2.14.90.0.8-r2.ebuild, binutils-2.14.90.0.8.ebuild, - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r3.ebuild, - binutils-2.15.90.0.3-r3.ebuild, binutils-2.15.91.0.1-r1.ebuild, - binutils-2.15.91.0.1-r2.ebuild, binutils-2.15.91.0.1.ebuild: - virtual/glibc -> virtual/libc - - 27 Jun 2004; binutils-2.15.91.0.1-r2.ebuild: - remove unused patches from tarball an no_rel_ro patches - - 23 Jun 2004; Aron Griffis - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild, - binutils-2.12.90.0.15.ebuild, binutils-2.13.90.0.16-r1.ebuild, - binutils-2.13.90.0.18-r1.ebuild, binutils-2.13.90.0.18.ebuild, - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild, - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild, - binutils-2.14.90.0.6-r3.ebuild, binutils-2.14.90.0.6-r6.ebuild, - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r4.ebuild, - binutils-2.14.90.0.7.ebuild, binutils-2.14.90.0.8-r1.ebuild, - binutils-2.14.90.0.8.ebuild: - QA - fix use invocation - - 20 Jun 2004; Daniel Black - binutils-2.14.90.0.8-r2.ebuild, binutils-2.15.91.0.1-r2.ebuild: - Fix unpacks for bugs #54316 and #54059. Added sample test routine to - binutils-2.15.91.0.1-r2 - - 15 Jun 2004; Travis Tilley binutils-2.14.90.0.8-r2.ebuild: - changed the ebuild to not have "use uclibc ... || die", but it still doesnt - patch cleanly so it is still masked - - 15 Jun 2004; Travis Tilley binutils-2.14.90.0.8-r2.ebuild: - masking -* due to bug 54059 - -*binutils-2.15.91.0.1-r2 (16 Jun 2004) - - 16 Jun 2004; Daniel Black - +binutils-2.14.90.0.8-r2.ebuild, +binutils-2.15.91.0.1-r2.ebuild: - uclibc fixes thanks to Peter S. Mazinger - - 13 Jun 2004; Luca Barbato - binutils-2.15.90.0.3-r3.ebuild: - Fixes a problem with kdeutils not linking - - 08 Jun 2004; Mike Frysinger - binutils-2.15.91.0.1-r1.ebuild: - This version breaks pretty bad on ppc/altivec ... cant build kernel/gcc/etc... - :( - - 05 Jun 2004; Ilya A. Volynets-Evenbach - binutils-2.14.90.0.8-r1.ebuild: - Mark binutils-2.14.90.0.8-r1 ~mips - -*binutils-2.15.91.0.1-r1 (04 Jun 2004) - - 04 Jun 2004; Travis Tilley +files/libiberty-pic.patch, - +binutils-2.15.91.0.1-r1.ebuild: - new ebuild with patch updates from Peter Mazinger - - 03 Jun 2004; Tom Gall binutils-2.15.90.0.3-r3.ebuild, - binutils-2.15.91.0.1.ebuild: - binutils-2.15.90.0.3-r3.ebuild stable on ppc64, binutils-2.15.91.0.1.ebuild - ~ppc64 - - 02 Jun 2004; Travis Tilley binutils-2.15.90.0.1.1-r3.ebuild: - stable on amd64 - -*binutils-2.15.91.0.1 (28 May 2004) - - 28 May 2004; Joshua Kinard - binutils-2.15.90.0.3-r3.ebuild, +binutils-2.15.91.0.1.ebuild: - New revision, keyword masked for now, needs testing. - - 26 May 2004; Luca Barbato - binutils-2.15.90.0.1.1-r3.ebuild, binutils-2.15.90.0.3-r3.ebuild: - Marked ~ppc - -*binutils-2.15.90.0.1.1-r3 (23 May 2004) - - 23 May 2004; Travis Tilley - -binutils-2.15.90.0.1.1-r2.ebuild, +binutils-2.15.90.0.1.1-r3.ebuild: - make patchset apply all patches on all archs and re-added hppa keyword since - the relro backport should apply cleanly now - - 16 May 2004; binutils-2.14.90.0.8-r1.ebuild, - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r2.ebuild, - binutils-2.15.90.0.1.1.ebuild, binutils-2.15.90.0.3-r3.ebuild: - added gprof/bbconv.pl install phase of >=binutils-2.14.90.0.8-r1, added - multitarget USE flag for canadian cross compiling bug #49934 also - >=binutils-2.14.90.0.8-r1. marked 2.14.90.0.8-r1 stable on x86 - - 13 May 2004; binutils-2.15.90.0.3-r3.ebuild: - bbconv.pl script is needed to convert profiling information in bb.out files to - format understood by gprof. reported by pasi valminen bug 50911 - -*binutils-2.15.90.0.3-r3 (11 May 2004) - - 11 May 2004; binutils-2.15.90.0.3-r2.ebuild, - binutils-2.15.90.0.3-r3.ebuild: - updated patches to match upstream fixes. Includes fix s390{,x} .{,b,p2}align - handling, ppc/ppc64 testsuite fixes. -z relro ppc/ppc64/ia64 fixes, change - x86-64 .plt symbol st_size handling to match ia32, prettify objdump -d output, - several SPARC fixes. Submitted by Peter S. Mazinger - -*binutils-2.15.90.0.3-r2 (10 May 2004) - - 10 May 2004; binutils-2.15.90.0.3-r1.ebuild, - binutils-2.15.90.0.3-r2.ebuild: - Fix .tbss handling - - 08 May 2004; Joshua Kinard - binutils-2.14.90.0.8-r1.ebuild: - Originally masked because these binutils would produce non-booting kernels on - mips. That problem has been resolved in the kernel sources now, so it's safe - to put these into unstable (2.15 needs more testing). - -*binutils-2.15.90.0.1.1-r2 (10 May 2004) - - 10 May 2004; Travis Tilley - +binutils-2.15.90.0.1.1-r2.ebuild: - added backports of the tbss fix and relro patch - -*binutils-2.15.90.0.1.1-r1 (04 May 2004) - - 04 May 2004; Travis Tilley - +binutils-2.15.90.0.1.1-r1.ebuild: - added a more amd64-friendly revision of 2.15.90.0.1.1. besides the patches - included in the previous ebuild, the following have been added: - 34_all_binutils-2.15.90.0.3-place-orphan.patch, - 70_amd64_binutils_x86_64_testsuite.patch, - 71_ppc_binutils-2.13-ppc32-fPIC.patch, 72_all_fde-alignment.patch, - 73_amd64_x86-64-gotpcrel.patch, 74_all_gcc34-no-unit-at-a-time.patch, - 75_amd64_sysenter-sysexit-are-valid-IA32e-assembly.patch, - 76_all_use-new-ld-dtags.patch, 77_x86_via-padlock-gas.patch, and - 78_x86_via-padlock-tests.patch. this ebuild /should/ work with gcc 3.4 more - consistantly than the previous one. - - 24 Apr 2004; Travis Tilley binutils-2.14.90.0.7-r1.ebuild, - binutils-2.14.90.0.7-r2.ebuild, binutils-2.14.90.0.7-r3.ebuild, - binutils-2.14.90.0.7-r4.ebuild, binutils-2.14.90.0.7.ebuild, - binutils-2.14.90.0.8-r1.ebuild, binutils-2.14.90.0.8.ebuild, - binutils-2.15.90.0.1.1.ebuild, binutils-2.15.90.0.3-r1.ebuild, - binutils-2.15.90.0.3.ebuild: - GCC 3.4 breaks binutils if CFLAGS arent conservative. Adding fix for bug #47581 - - 23 Apr 2004; Travis Tilley binutils-2.15.90.0.1.1.ebuild: - added ~amd64 keyword for testing - -*binutils-2.15.90.0.3-r1 (19 Apr 2004) - - 19 Apr 2004; binutils-2.15.90.0.3-r1.ebuild: - - the patches 03,04,07 were replaced w/ the redhat ones - the patch 01 was - moved to apply after the uclibc patches (59) - the 20 patch got a replacement - 64 for the case relro is used (default in ebuild) - the 90 patch (pt_pax) has - also a replacement as 63 to apply after relro - the patches 3x_ are from - redhat having the same patch number 3x coresponds in redhat to x, (unmodified - patches) - the patches 5x_ are uclibc related coming from buildroot (51 and 52 - are ports of the buildroot versions to this binutils, 51 is generic, only 52 - is uclibc specific), the 59 patch is really the 01 one, but the 52 patch is so - big, that I didn't want to patch it again, it applies correctly in the reverse - order - the patches 6x_ are from me: 61_ I had a situation on cross-compiling - where I needed it 62_ is an uclibc addon (missing configure stuff to recognize - uclibc) 63_ pt_pax patch to apply after relro 64_ is a 20_ patch replacement - for amd64. - I have left in all the patches, so that some can build w/ and w/o relro. The - ebuild offers this possibility, see comment inside. - The uclibc stuff shouldn't disturb normal functionality, mainly the configure - stuff is enabled to recognize uclibc systems. Peter S. Mazinger - -*binutils-2.15.90.0.3 (15 Apr 2004) - - 15 Apr 2004; Joshua Kinard binutils-2.12.90.0.15.ebuild, - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.18-r1.ebuild, - binutils-2.13.90.0.18.ebuild, binutils-2.14.90.0.2.ebuild, - binutils-2.14.90.0.4.1-r1.ebuild, binutils-2.14.90.0.5-r1.ebuild, - binutils-2.14.90.0.6-r2.ebuild, binutils-2.14.90.0.6-r3.ebuild, - binutils-2.14.90.0.6-r6.ebuild, binutils-2.14.90.0.6-r7.ebuild, - binutils-2.15.90.0.3.ebuild: - New ebuild for binutils-2.15.90.0.3, and removed portage from DEPEND in older - ebuilds as it caused repoman troubles. - - 14 Mar 2004; Joshua Kinard : - Added a patch to the patchball for mips that reverses a patch added in - Dec-2003 that seemingly makes unbootable kernels. The issue needs to be - investigated further to make sure that this doesn't not affect 2.6 kernels as - well (tested with 2.4 kernels for now). - -*binutils-2.15.90.0.1.1 (06 Mar 2004) - - 06 Mar 2004; Joshua Kinard binutils-2.15.90.0.1.1.ebuild, - binutils-2.15.90.0.1.ebuild: - New minor revision that fixes the as.1 manpage issue and an ia64 linker bug. - -*binutils-2.15.90.0.1 (04 Mar 2004) - - 04 Mar 2004; Joshua Kinard binutils-2.15.90.0.1.ebuild: - New Version + fix for generating as.1 manpage. Keyword masked on all archs, - test and keyword as necessary. - - 21 Feb 2004; Brad House - binutils-2.14.90.0.8-r1.ebuild: - stable on amd64 for 2004.0 release - - 17 Feb 2004; Martin Schlemmer - binutils-2.14.90.0.8-r1.ebuild: - Move to unstable to give the PAX_FLAGS stuff a test run. - - 10 Feb 2004; Joshua Kinard binutils-2.14.90.0.8.ebuild: - Masked on mips because this version of binutils won't produce bootable kernel - images. could be a missing patch or such. - -*binutils-2.14.90.0.8-r1 (27 Jan 2004) - - 27 Jan 2004; binutils-2.14.90.0.8-r1.ebuild: - Added support for new PT_PAX_FLAGS markings for program headers. - - 19 Jan 2004; binutils-2.14.90.0.7-r4.ebuild: - stable on alpha and ia64 for bug 37033 - -*binutils-2.14.90.0.8 (18 Jan 2004) - - 18 Jan 2004; Martin Schlemmer - binutils-2.14.90.0.8.ebuild: - Update version. Move patches to tarball. Many thanks to - Kumba for updating the pni (prescott support) patch - and the mips-brswap patch. - -*binutils-2.14.90.0.7-r4 (18 Jan 2004) - - 18 Jan 2004; Martin Schlemmer - binutils-2.14.90.0.7-r4.ebuild, - files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch: - Do not add sections to a PT_GNU_STACK segment, which might be - a possible security issue, bug #37033. - - http://sources.redhat.com/ml/binutils/2003-12/msg00205.html - - Also bump x86 to stable, and do not drop already stable archs from - -r3 to testing, as it is a crusial patch. - - 07 Jan 2004; Jason Wever binutils-2.14.90.0.7-r3.ebuild: - Marked stable on sparc. - - 30 Dec 2003; Sven Blumenstein - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild, - binutils-2.14.90.0.6-r6.ebuild: - Marked stable on sparc. - - 28 Dec 2003; Joshua Kinard - binutils-2.14.90.0.7-r3.ebuild: - Move to mips stable (~mips -> mips) - - 29 Nov 2003; Brad House - binutils-2.14.90.0.7-r3.ebuild: - mark stable on amd64 - -*binutils-2.14.90.0.7-r3 (09 Nov 2003) - - 08 Dec 2003; Guy Martin binutils-2.14.90.0.7-r3.ebuild: - Marked stable on hppa. - - 09 Nov 2003; Martin Schlemmer - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild, - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r1.ebuild, - binutils-2.14.90.0.7-r2.ebuild, binutils-2.14.90.0.7-r3.ebuild, - binutils-2.14.90.0.7.ebuild: - Fix sparc64/mips64 symlinks to point to /usr/sparc-*/bin/*. Do not apply - -ppc-reloc.patch to sparc as ld quits with SIGBUS. - - 08 Nov 2003; Jason Wever binutils-2.14.90.0.7-r2.ebuild: - Masked on sparc until ld issue is fixed. - -*binutils-2.14.90.0.7-r2 (08 Nov 2003) - - 08 Nov 2003; Martin Schlemmer - binutils-2.14.90.0.7-r2.ebuild, - files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch, - files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch: - Cleanup -ppc-reloc.patch (had cruft like .orig in) and apply for all, as it - fixes dynamic relocs for more archs than ppc. - Add -tls-section-alignment.patch and put into testing for all. - -*binutils-2.14.90.0.7-r1 (07 Nov 2003) - - 07 Nov 2003; Luca Barbato - binutils-2.14.90.0.7-r1.ebuild, - files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch: - Fix to bug #32755 - - 05 Nov 2003; Luca Barbato binutils-2.14.90.0.7.ebuild: - Maked -ppc :seems to have too many issues - - 04 Nov 2003; Brad House - binutils-2.14.90.0.6-r7.ebuild: - mark as stable on amd64 - - 04 Nov 2003; Martin Schlemmer - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild, - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7.ebuild: - Enable building of 64bit apps on Sparc and Mips, closing bug #24631. - Fix is an modified one from Jason Wever . - -*binutils-2.14.90.0.7 (01 Nov 2003) - - 08 Nov 2003; Guy Martin binutils-2.14.90.0.7.ebuild, - binutils-2.14.90.0.7-r1.ebuild : Marked -hppa as it can't even compile glibc. - - 01 Nov 2003; Martin Schlemmer - binutils-2.14.90.0.7.ebuild: - Update version. - -*binutils-2.14.90.0.6-r7 (26 Oct 2003) - - 26 Oct 2003; Martin Schlemmer - binutils-2.14.90.0.6-r7.ebuild, - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch: - Add the official binutils-2.14.90.0.6-bfd-elf-interp.patch patch. - - 26 Oct 2003; Martin Schlemmer - binutils-2.14.90.0.6-r6.ebuild: - Bump ppc to stable, as the .interp fix in -r5 is wrong. Bump x86, amd64 and - ia64 to stable. - - 22 Oct 2003; Aron Griffis - binutils-2.14.90.0.6-r6.ebuild: - Stable on alpha - - 22 Oct 2003; Bartosch Pixa - binutils-2.14.90.0.6-r5.ebuild: - set ppc in keywords - -*binutils-2.14.90.0.6-r6 (07 Oct 2003) - - 07 Oct 2003; Martin Schlemmer - binutils-2.14.90.0.6-r6.ebuild, - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch: - Add correct patch to fix attributes on .interp section, thanks to feedback - from pipcas and Ned Ludd . - -*binutils-2.14.90.0.6-r5 (05 Oct 2003) - - 05 Oct 2003; Martin Schlemmer - binutils-2.14.90.0.6-r5.ebuild, - files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch: - Add ppc-bfd.patch to fix ppc issues, bug #28011. Remove bfd-elf-interp.patch, - as it breaks section attibutes as in - http://gcc.gnu.org/ml/gcc/2003-10/msg00141.html. - -*binutils-2.14.90.0.6-r4 (05 Oct 2003) - - 05 Oct 2003; Martin Schlemmer - binutils-2.14.90.0.6-r4.ebuild, - files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch, - files/2.14/binutils-2.14.90.0.6-ia64-howto.patch, - files/2.14/binutils-2.14.90.0.6-ia64-sdata.patch, - files/2.14/binutils-2.14.90.0.6-ia64-speedup.patch, - files/2.14/binutils-2.14.90.0.6-merge-speedup.patch, - files/2.14/binutils-2.14.90.0.6-sparc-cfi.patch: - Update eh-frame-ro patch - seems as if I might have missed a needed change or - two. Also update merge patch, as well as add some ia64 and sparc patches. - - 03 Oct 2003; Brad House - binutils-2.14.90.0.6-r3.ebuild, - files/binutils-2.14.amd64-32bit-path-fix.patch: - 32bit search path for amd64 was /lib and /usr/lib. That is obviously wrong. - Make the search path /lib32 and /usr/lib32 instead, which should be symlinks - to the real location of your 32bit install. This patch is amd64 ONLY - -*binutils-2.14.90.0.6-r3 (13 Sep 2003) - - 20 Sep 2003; Alexander Gabert - binutils-2.14.90.0.6-r3.ebuild: - added hppa static fpic bugfix by tausq - - 20 Sep 2003; binutils-2.14.90.0.6-r3.ebuild, - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch: - A change that defines expected section attributes for a select set of - hardcoded section names was incorrectly added to binutils by redhat. This fix - is for bfd/elf.c for the .interp entry which should have SHF_ALLOC instead of 0 - - 17 Sep 2003; Jon Portnoy binutils-2.14.90.0.6-r3.ebuild : - ia64 keywords. - - 13 Sep 2003; Martin Schlemmer - binutils-2.14.90.0.6-r3.ebuild, - files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch: - Add patch that speedup C++ linking. Originally submitted by - (got from Nove Hrady KDE hackfest), updated to - latest binutls by Chris Lee , bug #27540. - -*binutils-2.14.90.0.6-r2 (01 Sep 2003) - - 21 Sep 2003; Joshua Kinard binutils-2.14.90.0.6-r2.ebuild: - Changed ~mips to mips in KEYWORDS - - 03 Sep 2003; Stefan Jones - binutils-2.14.90.0.6-r2.ebuild : - Move to stable for x86, to fix bug #27440 - - 01 Sep 2003; Martin Schlemmer - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild, - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild, - files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch: - There is a bug in binutils 2.14.* which causes a segfault in certain - circumstances when linking. This bug does not exist in binutils 2.11.*. - - More details on the bug can be found here: - http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00559.html - http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00735.html - - Bug #27492, thanks to Adam Chodorowski for reporting. - -*binutils-2.14.90.0.6-r1 (26 Aug 2003) - - 26 Aug 2003; Martin Schlemmer - binutils-2.14.90.0.6-r1.ebuild: - Remove the place-orphan.patch patch, as it causes failures in sash and - util-linux-2.12 (bug #27330) - -*binutils-2.14.90.0.6 (24 Aug 2003) - - 24 Aug 2003; Martin Schlemmer - binutils-2.14.90.0.6.ebuild, - files/2.14/binutils-2.14.90.0.5-place-orphan.patch, - files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch: - Update version. - - 20 Aug 2003; Luca Barbato binutils-2.14.90.0.5-r1.ebuild: - Marked ~ppc - -*binutils-2.14.90.0.5-r1 (10 Aug 2003) - - 10 Aug 2003; Joshua Kinard binutils-2.14.90.0.5-r1.ebuild: - Moved binutils-2.14.90.0.5-r1 to mips unstable, since latest CVS this comes - from includes major mips updates. And to test it in Stager. - Also moved it to sparc unstable for testing. - - -*binutils-2.14.90.0.5 (23 Jul 2003) - - 23 Jul 2003; Joshua Kinard binutils-2.14.90.0.5.ebuild: - Changed "mips" to "-mips" in KEYWORDS until further testing can be done. - - 23 Jul 2003; Martin Schlemmer - binutils-2.14.90.0.5.ebuild: - New release. - -*binutils-2.14.90.0.4.1-r1 (28 Jun 2003) - - 12 Jul 2003; Joshua Kinard binutils-2.14.90.0.4.1-r1.ebuild: - Changed -mips to ~mips in KEYWORDS. Experimentation seems to prove that - binutils-2.14.90.0.2 has some issue triggered at random in which a compile - errors out claiming "linking abicalls to non-abicalls". Some google searching - indicates binutils-2.14.90.0.4 or greater fixes this issue. - Has been tested in a mips stage1 rebuild and is currently used in building a - mipsel stage1 for Cobalt servers. - - 28 Jun 2003; Martin Schlemmer - binutils-2.14.90.0.4.1-r1.ebuild, files/2.14/binutils-2.14.90.0.4-cfi.patch, - files/2.14/binutils-2.14.90.0.4-cfi2.patch, - files/2.14/binutils-2.14.90.0.4-cfi3.patch, - files/2.14/binutils-2.14.90.0.4-cfi4.patch, - files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch, - files/2.14/binutils-2.14.90.0.4-gas-execstack.patch, - files/2.14/binutils-2.14.90.0.4-gas-pred.patch, - files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch, - files/2.14/binutils-2.14.90.0.4-pie.patch, - files/2.14/binutils-2.14.90.0.4-pie2.patch, - files/2.14/binutils-2.14.90.0.4-pni.patch, - files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch, - files/2.14/binutils-2.14.90.0.4-ppc64-ctors.patch, - files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch, - files/2.14/binutils-2.14.90.0.4-pt-gnu-stack.patch, - files/2.14/binutils-2.14.90.0.4-sparc-nonpic.patch: - Add patches from Redhat. Add fix for libtool borkage. - -*binutils-2.14.90.0.4.1 (25 Jun 2003) - - 25 Jun 2003; Martin Schlemmer - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.13.90.0.20-r1.ebuild, - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1.ebuild, - binutils-2.14.90.0.4.ebuild: - New version with some amd64 fixes. Also fix SRC_URI for some of the newer - ebuilds. - - 14 Jun 2003; Joshua Kinard binutils-2.14.90.0.2.ebuild: - Changes ~mips to mips in KEYWORDS - - 08 Jun 2003; Luca Barbato - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.2.ebuild: - marked stable on ppc. - -*binutils-2.14.90.0.4 (26 May 2003) - - 07 Jun 2003; Joshua Kinard binutils-2.14.90.0.4.ebuild: - Changed ~mips to -mips. This package should stay masked until dragon - can release a fixed version that fixes the bad libbfd linkage. - - 26 May 2003; Joshua Kinard - binutils-2.14.90.0.4.ebuild: - New Version. Masked for all archs except unstable/testing on mips. - - 26 May 2003; Joshua Kinard - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.ebuild: - Added a patch for MIPS arch which fixes binutils so that it does not generate - a broken dynamic relocation table for the OpenSSL libs. This happens because - the global GOT entry count is too low. The bug itself was introduced in - binutils CVS by the following patch: - http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elfxx-mips.c.diff?r1=1.38 - &r2=1.39&cvsroot=src - - 26 May 2003; Joshua Kinard - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.ebuild: - Corrected a minor error in SRC_URI so that the - package is found in the right location on the kernel.org website. - -*binutils-2.11.92.0.7 (25 May 2003) - - 25 May 2003; Martin Holzer - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild, - binutils-2.12.90.0.15.ebuild, binutils-2.12.90.0.7.ebuild, - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.18-r1.ebuild, - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.20-r1.ebuild, - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.2.ebuild: - now uses mirror://kernel - -*binutils-2.14.90.0.2 (17 May 2003) - - 16 Jul 2003; Jay Pfeifer binutils-2.14.90.0.2.ebuild: - set stable on x86 - - 01 Jul 2003; Todd Sunderlin binutils-2.14.90.0.2.ebuild: - set stable on sparc - - 17 May 2003; Martin Schlemmer - binutils-2.14.90.0.2.ebuild: - New version. - - 17 May 2003; Martin Schlemmer - binutils-2.13.90.0.10.ebuild, binutils-2.13.90.0.10.ebuild, - binutils-2.13.90.0.14.ebuild, binutils-2.13.90.0.14.ebuild, - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.16.ebuild, - binutils-2.13.90.0.16.ebuild, binutils-2.13.90.0.18-r1.ebuild, - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.20-r1.ebuild, - binutils-2.13.90.0.4.ebuild, binutils-2.13.90.0.4.ebuild, - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.1.ebuild, - binutils-2.14.90.0.1.ebuild : - Add c++filt back in anticipation for gcc-3.3. Cleanup. - -*binutils-2.14.90.0.1-r1 (08 May 2003) - - 09 May 2003; Joshua Kinard - binutils-2.14.90.0.1-r1.ebuild: - Changed -sparc to ~sparc. Merges fine on sparc, - but further testing to be done. With mips, edited out the - gas-mips-gprel from binutils-2.13.90.0.20, as this patch already - appears to be included in 2.14.90.0.1 (emerge failed on attempting to - patch it). Mips testing is underway via "emerge system". - - 08 May 2003; Nicholas Wourms - binutils-2.14.90.0.1-r1.ebuild: - Fix a small typo in the patch section. - - 08 May 2003; Nicholas Wourms - binutils-2.14.90.0.1-r1.ebuild, - files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch, - files/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch: - Added patch to resync with CVS head, bumped revision to reflect this. This - version should resolve any outstanding testsuite & weak symbol issues. I - have also added the previous patches back into the ebuild, compiles and - passes the testsuite on x86 w/o any regressions. - -*binutils-2.14.90.0.1 (06 May 2003) - - 06 May 2003; Luca Barbato - binutils-2.14.90.0.1.ebuild: - New version, seems to solve the ppc relocation issues. - -*binutils-2.13.90.0.20-r1 (09 Apr 2003) - - 09 Apr 2003; Nicholas Wourms - binutils-2.13.90.0.20-r1.ebuild: - Added cvs update patch to (hopefully) address the problems reported in - bugs #16363, #17986, & #18873. This also includes the fix from Alan - Modra for the problem where ld would segfault when building kde on - ppc. In addition to that, it also has some more mips/mips64 updates - which should address a few of the current problems we were experiencing - initially. As with the previous version, "Handle With Care..." That - being said, testing would be greatly appreciated and arches unmasked - as they are confirmed stable. I removed the previous ebuild since it - has been causing lots of trouble. - - 23 Mar 2003; Martin Schlemmer binutils-2.13.90.0.20.ebuild : - Add '~x86' to KEYWORDS. - -*binutils-2.13.90.0.20 (22 Mar 2003) - - 22 Mar 2003; Nicholas Wourms - binutils-2.13.90.0.20.ebuild, - files/2.13/binutils-2.13.90.0.10-x86_64-gotpcrel.patch, - files/2.13/binutils-2.13.90.0.18-testsuite-Wall-fixes.patch, - files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch, - files/2.13/binutils-2.13.90.0.20-gas-mips-gprel.patch: - Bump to new beta version. This release contains a boatload of fixes for - a wide variety of platforms. It also fixes a critical bug in the previous - version for the mips platform. Due to the beta nature of this version and - the proximity to a new gentoo release, I have set keywords to "-arch" for - all platforms except mips. However, it should be tested on these other - platforms and keywords modified as necessary. - -*binutils-2.13.90.0.18-r1 (08 Mar 2003) - - 31 Mar 2003; Christian Birchinger - binutils-2.13.90.0.18-r1.ebuild: - Commented out sparc-nonpic.patch and added ~sparc keyword - - 27 Mar 2003; Seemant Kulleen - binutils-2.13.90.0.18-r1.ebuild: - masked for sparc, it breaks, dunno why. see bug #17193 - - 08 Mar 2003; Martin Schlemmer binutils-2.13.90.0.18-r1.ebuild : - Update patches from Redhat. - - 18 Feb 2003; Zach Welch : - Added arm to keywords. - - -*binutils-2.13.90.0.18 (26 Jan 2003) - - 27 May 2003; Guy Martin binutils-2.13.90.0.18.ebuild: - Remasking binutils 2.13.90.0.18 for hppa which cause random segfault on - hppa1.1 stations. - - 29 Mar 2003; Christian Birchinger - binutils-2.13.90.0.18.ebuild: - Added sparc stable keyword - - 01 Mar 2003; Brandon Low - binutils-2.13.90.0.10.ebuild, binutils-2.13.90.0.14.ebuild, - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.16.ebuild, - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.4.ebuild: - Filter another flag that was causing problems - - 26 Feb 2003; Zach Welch binutils-2.13.90.0.18.ebuild : - filter -O2 from ARM builds to prevent gcc ICE - - 24 Feb 2003; Martin Schlemmer binutils-2.13.90.0.18.ebuild : - Mark stable for x86. Rip out static stuff as it anyhow do not work. - - 22 Feb 2003; Guy Martin binutils-2.13.90.0.18.ebuild : - Commited stable for hppa. - - 21 Feb 2003; Aron Griffis binutils-2.13.90.0.18.ebuild : - Mark stable on alpha - - 08 Feb 2003; Guy Martin binutils-2.13.90.0.18.ebuild : - Added hppa to keywords. - - 01 Feb 2003; Jon Nall binutils-2.13.90.0.18.ebuild : - made stable for ppc. this is to allow kde to compile happily and closes bug - #14776 - - 29 Jan 2003; Nicholas Wourms binutils-2.13.90.0.18.ebuild : - Fixed Jakub's eh-frame-ro patch to apply and compile cleanly against - binutils-2.13.90.0.18. Passed all tests locally on x86, but please test on - other platforms. - - 26 Jan 2003; Martin Schlemmer binutils-2.13.90.0.18.ebuild : - New version. Some cleanups + patches. This closes bug #14518. - -*binutils-2.13.90.0.16-r1 (30 Dec 2002) - - 08 Jan 2003; Martin Schlemmer binutils-2.13.90.0.16-r1.ebuild : - Mark stable. - - 19 Jan 2003; Jan Seidel : - Add patches for mips - Added mips to keywords - - 30 Dec 2002; Martin Schlemmer binutils-2.13.90.0.16-r1.ebuild : - Update with patches from Redhat/Mandrake for various issues. - - 13 Dec 2002; Mark Guertin binutils-2.13.90.0.16.ebuild : - Marked stable for ppc. - - 10 Dec 2002; Martin Schlemmer binutils-2.13.90.0.16.ebuild : - Mark as stable for x86. - - 06 Dec 2002; Rodney Rees : - Changed sparc ~sparc keywords - -*binutils-2.13.90.0.16 (29 Nov 2002) - - 07 Jan 2003: Jan Seidel binutils-2.13.90.0.16.ebuild : - Add patches for mips - Added mips to keywords. - - 29 Nov 2002; Nick Hadaway - binutils-2.13.90.0.16.ebuild, files/digest-binutils-2.13.90.0.16 : - Version bump. No changes in the ebuild. Solves bug #11088 - -*binutils-2.13.90.0.14 (18 Nov 2002) - - 18 Nov 2002; Stefan Jones : - Version update, masked for testing. - -*binutils-2.13.90.0.10 (14 Oct 2002) - - 14 Oct 2002; Martin Schlemmer : - - Version update. Remove sparc until further testing - from Seemant. - -*binutils-2.13.90.0.8 (10 Oct 2002) - - 10 Oct 2002; Martin Schlemmer : - - New version. PPC and SPARC elf linkage fixes. More - TLS support code added. - -*binutils-2.13.90.0.4 (15 Aug 2002) - - 15 Aug 2002; Martin Schlemmer : - - Update to latest version. - - 1 Aug 2002; Martin Schlemmer : - - Updated DEPEND not to use if statements, but rather - new syntax of portage-2.0.21 and up. - -*binutils-2.12.90.0.15 (30 Jul 2002) - - 30 Jul 2002; Mark Guertin : - Added ppc to keywords - -*binutils-2.12.90.0.14 (6 Jul 2002) - - 6 Jul 2002; Martin Schlemmer : - Version update. - -*binutils-2.12.90.0.9 (10 Jun 2002) - - 9 Jun 2002; Martin Schlemmer : - Version update. - -*binutils-2.12.90.0.7 (25 Apr 2002) - -*binutils-2.12.90.0.4 (16 Apr 2002) - -*binutils-2.12.90.0.3 (7 Apr 2002) - -*binutils-2.12.90.0.1 (21 Mar 2002) - -*binutils-2.11.92.0.12.3-r2 (12 Mar 2002) - - 12 Mar 2002; Seemant Kulleen ChangeLog : - - Updated copyright year, and added USE dependent nls compilation. - -*binutils-2.11.92.0.12.3-r1 (1 Feb 2002) - - 1 Feb 2002; G.Bevin ChangeLog : - - Added initial ChangeLog which should be updated whenever the package is - updated in any way. This changelog is targetted to users. This means that the - comments should well explained and written in clean English. The details about - writing correct changelogs are explained in the skel.ChangeLog file which you - can find in the root directory of the portage repository. diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest deleted file mode 100644 index 558ba1f..0000000 --- a/sys-devel/binutils/Manifest +++ /dev/null @@ -1,57 +0,0 @@ -AUX 2.18-bfd-alloca.patch 4259 SHA256 31cbc7537b472f19585a7bc7a27526c460100024637f4bd090a9cf9f54cfffa3 SHA512 5672617cc12cad677429730f7c2ddbdf12051e21bcfcade8c47f4be1e5c9dbd1cc4797cf87f60bc450aec2ec5f0a9e17ac73316aa8228944d3908362c93802e7 WHIRLPOOL 496d51a64a72d48f8336ec097808b52c28f79c7f126d8957b94e7f3f55c4d15aa661aa9b35913242c98f7174dd76d25cccd09fcc981c86128a6578f9f683dd24 -AUX 2.18-bfd-bufsz.patch 1129 SHA256 63aa7c6340b1365ab36bd88a6eb014ec5fa79893900f7e5bdd7cdc3ecbde4b54 SHA512 9ccc82bd9f4ff1d5bb9e6d2d721a74ad67f020e3f216e4d32811a83dd23a4d3cde41a8ebd04cf199b008b9f61d279285ed395e8041dd905210e779260a717cda WHIRLPOOL 7564c44ab0df60f02dab6944e880ff20c04d45c6c44bdbbd776f679e57d7b2cfde18598bacdfb3898e47d17aa4552e871cecc0ab658e897175faf75ccdbc5593 -AUX 2.18-bfd-ia64elf.patch 3279 SHA256 5a278a9afbe393e2585b5637bd561b20a924baaa08449e55f5ccc59b00176406 SHA512 c2df8e7c83751cb39c3d5765c3a7cd917e9a3b5798fa0153d2da0effb9b33237bf8055cd69dc52c09d9de271831a9abc96384d80fae0a2f86e2bdef83451880b WHIRLPOOL 7ae7ef4380615217b7c462a2417b6e862f8db3e2d66b704466b242ba3559f6314dba9be31c4f78a60e0166252db19bd0db9ff4acf932456f6af9ee27968d08a1 -AUX 2.18-gprof-fabs.patch 4309 SHA256 fedd47d69b385576d1bc8f72031ec16305c027f2f8eb88b883b595abf17e74ac SHA512 f05c907537157b119c9a5e9bd29faebd2ca98d47f1b9c98702a5446b145f4b9047f131b23b34e9016ef6b5a8596581d3ca5c9e2bcbc54868a6924dba33e76de8 WHIRLPOOL 44adbefd4cbb46c628f4b367fdb17de84d4909dcb47bda4a7f2a8ea8f0cce6ca90085332488c39cbdc00be0e116fbc9d8cde174a21ec39d0a4678fdbaf4871e0 -AUX 2.18-ldwrap-interix.sh 2453 SHA256 2d9417b5e77f217ca79735705280ce6432cdacbea108919dc7aea5950dc59f73 SHA512 a0529a7793b27860c497efcf0dbc2da2081add1cfc48dcb8f7e8287fe4494cfe6d682e882a8d2eb241c205a597e29a5c00a23af9bca8ac7959207105c7930e36 WHIRLPOOL 897645cc135f38213b9c798561e47b840678f892cabbb54c2b35069c7035d8a7a95501a0b8c21d9769ce8427e4c0a1873f0d985522eb06a7eae0445fd55cd0a4 -AUX 2.18-solarisx86_64.patch 953 SHA256 f3b0ddd50d77c68b7a9eea47e0f5df4a5051b14a806e579f2e401f30152b24ce SHA512 822ca7be565ff2ec1907c93868e199ab1a895e372ae02b7e5ed0cee0a4a35925edd2f6824b307fe5c16e56c61d894a9d7d67456e142ad044dabc771eaccc7839 WHIRLPOOL 8335a6770ff576d4a50b8948099406d183b08de5f6d6fedd125b07ce2aed1f8aea138c1df3020f00cfba14a6093d59e21b608d70095c2137d786c6b7b4be38c1 -AUX 2.21-ldwrap-interix.sh 2731 SHA256 40e166611d31e92c72f322af53cf90fde6a1c8291a662c08ac0b3c9197381d9d SHA512 ae419628f9ffccb98aa42215365aff1839b03930eb9d60f8b9de0d042d018d34a7c069ced7476fe1b391a925faf0206206882659062ffc691046dfafffbafdbb WHIRLPOOL b97b6a032093dda9d7c69d1c0845fa5814b2dd8c5dbbd20019a1f4685423a94063f9561443c14e1f377229d20e838c8a9842c6dad2e54cd98cf347eb09db308d -AUX binutils-2.16-gcc4.patch 320 SHA256 9a0780f33ba42826262976d1fd278888156edc680b530753455f15ea367cedd5 SHA512 79eb26d211d807ef7dc8455ca64111681cf9b30e7c9b000d892f98e16e1b2dde1d79131fd2c530f07a38512f05e650389cc1c48260f2ef55efb6421badc89827 WHIRLPOOL ec9cf9808df0bba251a3c8bbc609cbb7e20bd0cc13149984455e2ac92995a1db1b44793b4c210bd7af49f848f58b8d28cc3b24ddf5c0d4207d9aca5d64ca7583 -AUX binutils-2.16-solaris10.patch 1348 SHA256 a4b0d9130326310a31bacafc6a3c8059469372db829da821d4b321d05c45ca9d SHA512 319ce9030f72272d3ff51bdd914c6d5a0476ba1171a9287a963d1650fe321da5d630c011547c913ba7d6633b548935367d5179314043f42d38c91002638fa43a WHIRLPOOL ec4fecbd226ed1f7d17d7d02d4c85e6b4fa297949dfec33f03ccd9c0b34ffd19240343cc70a8e2f25b520886f6b85b0fd023043435c43f5b1a1280e31cbe0c2f -AUX binutils-2.18.50.0.7-mint.patch 87482 SHA256 a104f8aa3944277e34cd8c821426e10e6038173a91e9e02a24d4adacfeab2af8 SHA512 827aa204c9ceedf29a85a4419df2a32b3105373f76edabc54408eda14bc83b9385a7ed9109f7b6c699911054ba5034affa5c6fa0d343a23aef69ed87ab484e66 WHIRLPOOL 132bb72e845aa8fa91382a2fc693ef952b5b1a7fbb1e2793efed777dfa0d9c3780a34502f08565eed0bc0c814f890c79ec5e2dfad430049660a96546c07fa7ea -AUX binutils-2.18.50.0.7-mint2.patch 4078 SHA256 be69ae495218985ed44d9aca75d9854f3442c5fe010026531a5fa4a0201d93f2 SHA512 09fa5cc116bdd3808019487ffa9529af9ebdd317fe6b12a12df798c9e5458d9185bffe72cd02a1920167fdf1f7d1dc4978c04baef44d814f91d42f3cb4c71986 WHIRLPOOL 6010a2116956b62ac4dc91159c514f29c8a63b5c3274cfa4f503c51853fee06f9dd5c4d7b6ffeeb053c15caf88eda31258fbdf0dc4d2ed9c94eaf7b2113098c5 -AUX binutils-2.18.50.0.9-reloc.patch 801 SHA256 2aa7cb08418d10df5fdd640169484540a821f88a26254b4d203c420a0278dc8b SHA512 3726b6684dd08e6c422790d86fdb3699db0330377408b8b1d7e57685a03b551f750735dbeaf6f78a7064026e2db5191633eac07752461faa485ae3c3bd1d4a21 WHIRLPOOL 4b8bf6f97ef0991a7cafc9cd2fdd6b819562b3b3b51299568b7892b5be7215867cf4531923f13bab6e46849b27fb11bb756a8185a219d1846833074246d9e430 -AUX binutils-2.18.50.0.9-solaris-eh-frame.patch 7372 SHA256 ba5c83f673fdddd88f0c9f2123cd27f56823fc5076ad5e3bd014e39d8f02fd25 SHA512 95b39767a1bbac06506faa8e431889480f3960f9443dbfa1b76b3765a3ca93e1001f1a9743ea4d7d90efba0dc7cfc1be8a2df531297a632dee24601dc0b75bb7 WHIRLPOOL 37f353c4e86003b7e967b605ccda860a706fd9a498ce44a91cc345108b02414938001c179e835e6edf6471b683a28984c35f1423861139e95aa08fdf96fa4034 -AUX binutils-2.19.1-hppa-hpux.patch 15637 SHA256 93f464ddf3d1b5762b383f9850db994ec0aaa568448659faf27ae122968f47e2 SHA512 07e70f31f2818fd6afc5654186c57e024292fbdc4f5ae4e119ffcb772713e2a639d6a5020feba461112ae41f5b54bf80dca699947532c53964d31ab5bad498bb WHIRLPOOL ca8979aa709b2b6b9e81334de1a3fef475eec28c3fe6692c5258af6709cde749eec79fbde4166e8c3433d1714cba7b51917019a4a50b8cc8e2b28a37f607bebe -AUX binutils-2.19.1-hpux.patch 753 SHA256 25a0332702d9ae262d579c3ab05245af21b6f1afa2d9e604fa592ee8efe7b935 SHA512 3ea1a90bd9612f1d46449337e38e68ef3ee668cab6de87fd96531a2867370c1c59a54088ea4e0eb7817e807af9b512ba8f2e6d20039c6c9876b465a40eaba4fd WHIRLPOOL 6fc1a1890b806dd67209a5c098efbaada9ad0abd5863c59a804d97ac86fccba6af55ae0e062ec17e81159219f9de3096ebb55802a9e8cb104476113b458d8848 -AUX binutils-2.19.1-parallel.patch 406 SHA256 8c258167fa3189b9d1c179d180761d7d4af55a0701efa646de54be6dc0925e04 SHA512 0eba643dd43344a1198f08221dd69b425883c2c2ef45fb3310aad8244679e025b4984f9bff1ec89900271da29cd5938bb354bed54b19b1f3159bb63bb84cdac7 WHIRLPOOL caac5aff5d2d10f469f44f2e4682e74f1e75833478fe692ad2d8a03242b11d298bf53ae827c0d0278e7c9d6c89da49b9fb0238921eb48703a4704c03958c6521 -AUX binutils-2.19.50.0.1-mint.patch 2240 SHA256 e92582eb69f4c281164de145cad29fd8191c0e779bcf349bc937336ea6436444 SHA512 aa372b5c74cab5b7d984fdb4979519d33b752693e467b195a7332e5ff5b67f1643c30200227e79f79ca1e617a53757182bbc7b6fe047fb28d03c2fd08c147adf WHIRLPOOL b7245c012e0eb85fadc97f14db36599a3f3cfe188ccf5f7d734afa8f577dbaf5ded77b879d5cbb1a51847c4e4ac01c2afe1aed5a31ad46d26d4fdc59f86f6564 -AUX binutils-2.20.51.0.1-linux-x86-on-amd64.patch 487 SHA256 77b3172f79506805229da44d968b1e87ee42be9c55dc92dc87fa8d130cf33c90 SHA512 6587aa359cb70e6f411aeefd082bbcaab6a51363e1032c0316a898c9ec9b0809ccabea47c774b837f3dae674366a522909a17c167996b3bb9f88498a76fbe3fd WHIRLPOOL c796c944373156369597b6fa0d82eceb4cdaf26d5f23aae306fbd57e76691325e6537ef4de8cb3edcb18bd344c4c6fcc8b042128794f38d693315cb11ca7e101 -AUX binutils-2.21.51.0.6-mint.patch 97602 SHA256 b1ef74ec295af411d40f0125483c84a19a717d8b3a0a4ec6de3a2d3a33b44488 SHA512 b0fd02ac1a192e48273ad6784599240d50e695c88bff12b4b249a3707b1857a09f5e013e45eeb3c757be4b17ce3c8cce72c3cb7dd33271d4f459b3d86374ee36 WHIRLPOOL 05c58da966ef2d09faa1bcc9a84d4d586f91a9da5a3a012d063714d164ffa50a9a70c8c766b3e63e7e1fe784be96ea5d15d0b900f2cfc0ecc4705bc8770018a3 -AUX binutils-2.21.53.0.2-mint.patch 94652 SHA256 4570bf69f57b334aea6ba2717488d059a26f7570dd6a2445aa20b10f22bbd531 SHA512 4069feaa57694c5440cc465eb102ad008754908d05bd9c37e4da545812c48a8ea19cc5aa01361c29297433ddd22f054f3dd35e3a0307893546d461169962a425 WHIRLPOOL e7443af33a519208ca006011d4589866051ba2ad235d177ad5d0b0248fa38782fb86e0852e3312ae34cca6d21bc5d58a46def01bf4fd737d12274b2ad34514b5 -AUX binutils-2.22-mint.patch 94045 SHA256 fa438b0810a0d6056f703ac087e76c1ffed467300025f13ba1f7f7593e947170 SHA512 dc2cd2301b7f413af9c15a664adc43ba0474584d81f3158e527a0e6063d31030c1db4953943bd1ca699ee5de69c71a1739113cd463516d42dc9bf7cd83bfc84d WHIRLPOOL 60421e6ea562716848eeefc15f8d264774265022b7294c65efa9581379793c735ffeba705b3965f2f03f5f79f34b0ba784189fcad978ff1dd4b6d190ea94279c -AUX binutils-2.23-ar-ranlib-truncate.patch 1095 SHA256 6d09ce8e2fbf370fd73f9ff619656ab1ecd62bea05b70092e32356a0ff8598ba SHA512 78649fff9266175d773abbb44005b8d43aaf82d24ec71db1e965dfac207156984f71f69d121c9f6311971d44f707a3501dee97e9bf45009ca41be313e10f96dd WHIRLPOOL d1e6055d2a4ebdafebd339af9a72fbdb071627bc3ff00dc9497d3903d2d7e966060b88223ada4d9883b0d76bd3b51a8fa405d0498a347cbaecfd6afbbe26af7d -AUX binutils-2.23-mbstate_t.patch 5739 SHA256 ec17ce4d4e47d861f2300dcbdf4f4143c38c7919af9bdb8dd82350e8f0f332e7 SHA512 33eff1d30b93f13dbd11959c9110bf0f787b1e2318f2cd03f9918f8089c136aa6a5188d759825e8b0bb819000ab552234dd18568b121cc6ea9b537538a97e79b WHIRLPOOL 3da5ad51d0a13d0028570cf61b8b60ea19722073a70af6b5d9d07f5845b9970243a65d3359ae91ce58f4167e47837439eecec94db5d3f86a0e3fab03736bfcd0 -AUX binutils-2.23-no-ld-script-sysroot.patch 376 SHA256 0439bfa86a1f4dfd18b56b0104e78a3c670584424ebb6205c673fc6f5015b7e0 SHA512 4624f2ceebba47c2656430d1923c72a6a20cff2c57b58ecb001fd4e67e3a34c7054f1f0f12be7ef21f4789298800106219f4a5dd19cafadf9858ba0d4bee5f43 WHIRLPOOL 40de5dc12ca11855188fe16b85d892085e64cbaedcb04a266085502f2cea9de3d94d2c61036548ed3248f7d48b986ac5748aed7bf750f0f9f78c53af515d3329 -AUX binutils-2.23-no-rpath-sysroot.patch 1008 SHA256 9c35d21c8a5ac0edf8812ea126b6cc7f8ed630a73f4c91db3cc27652b638d8b6 SHA512 d5b311f18f3f6b0e21fbb3da355cd99e98e9ed10d23b9b684a2f0de263966c959b39d22866f93cefb1d81814fd1a7ade14302338c57a12614fd9d64c5b390710 WHIRLPOOL 10b832f32a0f9acc9924bd0d5d81ee99cc13549309691025e8d90a874bf99dfde0efe9a0a357c9c924edf2cd34a2f3371c43a79ea8375d7377507fa5c961d34c -AUX binutils-2.23-runtime-sysroot.patch 7447 SHA256 8fcda46e89f7870e1feb6264e767f960f213c32e079ff557183a63e51466271d SHA512 23f5865ce55923c41fa92cc83611887037b773a08cb57b6b94bfba090bffdf4ed7fe0e6d8a85f882ef936afd0e1bad0d07b11a568671ddf047ec6113fc1a1bfa WHIRLPOOL 954b228b14950eaac28f322c5d53638c4e1a5a362f0cccae3d355beb354dc916188d9b33fd003802ebfd00336f5da00c83e524255637fe164c2ef216166e2535 -AUX binutils-2.24-native-lib.patch 418 SHA256 c0c1e8c0f9ae28371ed20ef9f91fabe3d0b2d3e1ca46394317a632ea2be190f6 SHA512 0f4d4d747ec80bc71091ac3a2128e9404615b42503d716f25cb9517dbbee6d2f63e16214c554f7533658df722f7a1530866d12f6ed0fdc91c15bb88d1ebd33c5 WHIRLPOOL 96f31cb6c262acc233b48f079d908b7ea160845fc20acbb0496a178609e61300ada2f44485d1a3085a400975e304fb872f2255205ea4efe43cffeb521bc4ed76 -AUX binutils-2.24-runtime-sysroot.patch 7184 SHA256 d26ca9377ba579bae77ae3a40eb3839cd52c7935f3e8d3ca97cd679b9b5252e8 SHA512 e6ce483898c1277e22ee846b2d5e521fe2e6e9e382a619d6205ae3c37c697eef05ff1fda9fc0a8568c7bb961fd73ba7ae4952d859b60753ccc6aa0e636f12213 WHIRLPOOL d521615eef5f267786b1b44c13f09f528bad426af0812b25a45238dcd3ae994a8b3e03eabac118373296de57faa1bd54295463d99892562baae84dfb3adcc661 -DIST binutils-2.20.1-patches-1.2.tar.bz2 15747 SHA256 30738e18f492bd653421d4bc4d52b841680fe4b17a69524e081d9befadef6d3b SHA512 23c1026db7748f9f958d32f6bfd2b362dae3bdee33612fb6a0cc4277fcb360a55c5618dc748a7119b12794a1bc22ea70af92c04f5283c0041bc681e5db4266b4 WHIRLPOOL fc73133cbd0aaf9447296425dd22907d3b984a9d8c0631be5155cd887ca44932b5d3651d538783ac10e520c6b43a077fb045ea720d95855f04b4ba47cb9076a2 -DIST binutils-2.20.1.tar.bz2 17591527 SHA256 71d37c96451333c5c0b84b170169fdcb138bbb27397dc06281905d9717c8ed64 SHA512 b05c93eb9ba8db344fbdee3c5b36ed5a7ad1366f948d41af43286715c7345a2477e0808d25f7bbf81b54ab06c4d46356d44318d56efcdbef42236d1a694411fc WHIRLPOOL 6166462fce695914a32c3295dadb6782716bb6693ee0a2a5543cc925e4967f5bccf38a5a2c244703bb9990acd229d0588a9463c62cec042f24107854c631518e -DIST binutils-2.21.1-patches-1.4.tar.bz2 20033 SHA256 51e50584a7364549649cc6c59f4a678b07595979811e8e2150264318c3b4493d SHA512 66b71031a782f9708dc5f8ac9171b2be0bbca102b44705155b292329e0664cc71b649f4d8fa50ad0d9123436c03b994da5a0fddc32e43bf2d50e74c68609e508 WHIRLPOOL 2bdc11027b3dcd27c766b4ca5f578a32838d15b3370b4093f1c30887200b82bfaa732df9af23f545d58bbbf373c9967a31fcbb19b3f9b855f0923143e77fa9f5 -DIST binutils-2.21.1.tar.bz2 18997755 SHA256 cdecfa69f02aa7b05fbcdf678e33137151f361313b2f3e48aba925f64eabf654 SHA512 3f550f6833a41e9b17d1f515eea0de8dc14aefb7dd69c65b821aa1336aea4c3f55b4457a1781ab7b32bda049798fef3cf989148e4acb0fca8baca5af74766f31 WHIRLPOOL 1025ac3714f2406ee5afcda3f7a23f788a35e354b928f4b11c7448150a5613f793c2aa471f4612c5015e89d5abbb61522a7a0265286fcf2788fbf1194fb60201 -DIST binutils-2.22-patches-1.5.tar.bz2 37350 SHA256 51cad7b3c2d18db0f7d2e4a3e46e37f00eb720cfa663ea396e16dcfbba12a07c SHA512 407490be54fec09faf26e8062cf28d2ea2d58df669642e7582fe51776726f00af8c18194a17438e18068c91b7634fca2d0f33c7231e847ba5141f901d9743ad7 WHIRLPOOL d62be803705d4e526324719fae69c06c303cc2500aeac04cb711eff383a2732ec3f47f9d91deef954c60877e08fed2c2659636dad07086ceaf12c8b899b075f1 -DIST binutils-2.22.tar.bz2 19973532 SHA256 6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9 SHA512 ffe8ef263ef99183e8cc823fe8487ff7d0f7bf9a8efd2853b5f4636aca0023850d13de4eac7d77a5f69413d8a50e6f95bb14569be53df86c0bce38034525ab74 WHIRLPOOL 8bea2f2082600587649a5f9fffada9c6cf14f42ebddd1e6a4b4d7be25446d7ad76e1335cf8cefe30c812ced408c9dacb55d0033e4b0eaff83efbbfb5ea5f60dc -DIST binutils-2.23-patches-1.1.tar.xz 13424 SHA256 ef6cbc34251c655d7fb0126c11a0211eb825438fd27de9aaf9bad0d2f264b8a9 SHA512 ccf44284da4e29803beab5630d63588f76f94b53c29a17c7a2a989a9ae7ed4c3083348baa8546700dbdf5da40787443d7019dc5ab613e5f46545e83523ff37fd WHIRLPOOL 3761e5a312dd105fc2cfd873416e3597e801305a18870c618deeb723af7cf65c3dc2102a83412b1191fd2169cde4fee29501e50a282edd267103af460eeb5e43 -DIST binutils-2.23.51.0.3-patches-1.1.tar.xz 13484 SHA256 f81f93324d7afdbd33496a17ab5a362515b21bb4b3ca8740fce6c299df56521c SHA512 8d1c5dbc0ab990ebc1c24abfc33b9e77cd3d257d68f87411a8ae8a2d9063b03e9b24ef8a99dc5cc9dc52b57a38be78ff4c9900d1f79602988da781bd0efbf86f WHIRLPOOL 975f8926ae2a79b5c51791035bcebe354ee51dda27337549e0445525054b151da6c312d071b4d2fdef662b42b609c6879b4917cb7ce7a1ef67d900ddb6193722 -DIST binutils-2.23.51.0.3.tar.xz 13831120 SHA256 2162905dabf191a2a803eab8d31e7be52d96d6ccd1e0ce42e25d82c6be918cd0 SHA512 bd79d662471bb1602a85933ce7560f6a0cfbc854feabb1353c7f4a8642eace6fdf7d1d24c6e75babe5a7fbe932fa3077f0d417263d3a1d0e5692dd7b2cca2dd1 WHIRLPOOL 624cdac6856a67f8bec3bb95bf29d619b5dcbe7da70cbbf557cf19057cd0776c5b4d8eed6f1b64db3b7e30d24791b141e87ed4a8b1d241b2d94ceaddb55c56da -DIST binutils-2.23.51.0.5-patches-1.0.tar.xz 10928 SHA256 9889366e64fbf04bbc6a2962bc2b6f200c4ad95c009706b9ea3b9745886ca35b SHA512 f9ad9c35af37b95c3576d4c2b5a12a2798ba6da0d6ef25715a5b7bfa421905ce78ad056c2ff36cd36e1ecc143dc0df99238687405216c0acf6ba96a0d17c4391 WHIRLPOOL 89c81ebf496c902f3e882dacc0af2afb9580f2f84335ee1ca78e4196fea2ab1f84a815842d0445d2ea475f5a93bd19d029a8dedaf17b2dcca83ff8abcbfac338 -DIST binutils-2.23.51.0.5.tar.xz 13883528 SHA256 db3cab6fa59b4dc14760066db2fa8db49531494806e243601c7f433f1fc366ed SHA512 c1d35761d09f4d6a0844198dba0cafa40091bc7cc100bb154bf780cc38e03bdcb83ab33279b4504c22c5b77153548cc5a60fcda6158cded80da6aa330f51404c WHIRLPOOL 9d1b876bfe1ddb23e279b4ba86ee74ebcdd38bee712fe547b6a4966914b22f5dbb0653d35b7ae54fcf37d6cf54a0bbecda0da909dc92b93d443126b4e8e6b256 -DIST binutils-2.23.51.0.6-patches-1.0.tar.xz 10720 SHA256 cb4f6f67a69e19ab53591ff17ff0132e5367eff8630524183b043f7f98c604dd SHA512 de39edf6e69768877ac431fb663a00015d7603a4f40f9d11e0735475438c79662bf9bb7c3ae237d02d5cb8b7ee6dd63f24752e503162371027a088a5b79ce159 WHIRLPOOL 58a68d8de273fcad786829ee18b56e61e5d010051aaddfee310ac0a201d858147863d5762ad51332943d963df68509676a8cfedc2f769b905a017a990df59904 -DIST binutils-2.23.51.0.6.tar.xz 13907008 SHA256 0a2468ef7f99bf8162ebe5317dc3366f3555e9a453d0974fb96469d1122b0ce0 SHA512 8f3eed935dbc0e6fde55a420833835db8c4bfdd43047046da0bc30b2faee83701ddd78f24ac41ef236641f38465e282ec65d18e93da3f848034b2d5b335150af WHIRLPOOL 1c0c7985140c81b6b3d51048d8b94fedd710d995ecd0ed13daaa17f6a14658c812c683d45440040d215fce948e75df41a5f46e73ca0e7410fa92a663d7ddca4e -DIST binutils-2.23.51.0.8-patches-1.0.tar.xz 10712 SHA256 1a0bd1500c87089e6609e97697912bd00fd44ac35fd9711c9c7b4267ede34cc0 SHA512 47f22c94fc387409c04d826db7592e1bddb991a990af108e21126ba5dc117740d1e87fa2178f51cc5c73c1b3f0fef55eda36308a722d1d9673a5ba639115995e WHIRLPOOL 2efba9385d71c07055be90c9aedfcd0180d47197a08563df1ba6abd5802852624ec4e6837c86e8f809ce485f90d2644038b35c0d6a366e4712038eebc117e3a9 -DIST binutils-2.23.51.0.8.tar.xz 13922836 SHA256 e345d7b7a14eb903074311a986d2a93af849b83799e3a5aa13308615a01eaf1e SHA512 8124974114398cc1fc88eb5681bfea8369371a2636da5d0ed7993cba43462edea9cc3ddfed30bf7bf7d13c2981cfece39da30a019093a5f9d7935b5b57373aad WHIRLPOOL adfe57a30fd72544a8e7ece1cf6a40f19ff08d237964c40591a3f50eb81acbb687b53d94ab3f491807cb599a691575ca77c3171fc67b9effc959d04490ca26e3 -DIST binutils-2.23.tar.bz2 21402046 SHA256 5f975e744a0fd4a4ab0b28dd6d0921685b3279207823226df92429389dbee452 SHA512 079939e1000e358e830c4563543f2a00ae127ef6e18306eda55a775254509951114d24647cf2c3fef49ac4409c8e9895085efb85cc71566a5b4fe0106b8375bd WHIRLPOOL 3713090b5f0d2b6fec14664ce862e0c7c7eeb0bf37bde19e4d07a48bafb61d388929e6ae993a6954aa6432fea9484b4646bc2938df308bcbf6142a0d5dfc1f69 -DIST binutils-2.24-patches-1.4.tar.xz 17488 SHA256 f018f140a52cddb1e4619b5caf4b4a37a27dfb29e8bf29ea5161ab13b33eed13 SHA512 dfd7c38cd978b7d6627579c338bf67641c799ce39936e3475dca3ecf5bade417e3f090253a2326582c64d5743a24f9078794f44e8fd41b6af728f1f375c91d3b WHIRLPOOL d6b414d5e5607fd8b2d0f52b508763110448cfbdcc08be6d7c1412043797bde8ed5fbd9a5ea4c141b7394b2cae0ac2ef24827f67813231129a507f49cbc40245 -DIST binutils-2.24.tar.bz2 22716802 SHA256 e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 SHA512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 WHIRLPOOL 619634dfdc73b8f6e9933b4642f5f9faf147c388a6d39283cd7639d83f3d7a601981cf49a787c43c17a942c563f24dc8dcc682138b5d3102a5650e1b9d15bd50 -EBUILD binutils-2.20.1-r1.ebuild 845 SHA256 24d8b288c7150859eedabf4057ce0fa04e0e99e74846765ad8a6aaed99b1f426 SHA512 ec132ab4e572516be09782402ccbf3c186d58df06aaa815c5e95b8f1ea5dcefefd161965746357dfdd7a8f440be5f6dc59464c43d8f1245582ec7fcfaf3128fc WHIRLPOOL 1a32947193ad2fbab320a9b8f87a10279c8ea3c0c9aa59fbb05023832c7bdfe5e46dbd3eee01ce1b9b89027eeb42acc5b05cd39fea1e8eae6f87b8c1dd3b60aa -EBUILD binutils-2.21.1-r1.ebuild 846 SHA256 6fdeaebd7d0a0e82eab0c3a50a2c10efe1346e15da823b1e610e886fde763031 SHA512 1da92588b09122337af6c979b3aa22ce0172d481fe4c53aacc35aa36280cffea3deaa4f209b542b58fa1d47c722169281682a8d01350aad6764865ca2185b9d6 WHIRLPOOL eedd63b0a18269cb51e34ecadeff2b471bec7a8ce74e9359325762ea9df946f557fdab7867b69faee837082a439c66d01ef5795c5d7b970801e7051c6edbc965 -EBUILD binutils-2.22-r1.ebuild 1923 SHA256 f5f11b300441bd0a800cf02f34bd8b827621fb524d23e942cbf8240dede2c736 SHA512 6562fb4e0004732061a776ca76087471f5790490e1ac9f720737b68ffcfdcf8cff67bde6acfba365768235ac73cc6091893e238651b74faf59b5bd14e2d0c45c WHIRLPOOL af8e96c7551541b350c62dc5505e6ca7b351ffc343b14742753c773a6f2639fda1f23daf820d05b174a4b3980b7b836146ad3bbc40e563b6b9be87f440a8193d -EBUILD binutils-2.23.51.0.3.ebuild 1926 SHA256 d0ced61c78ac4b32e1d2ba5d4175ede6ffe1e34c13fa51db0ef8cc874f680a56 SHA512 3079a79ad13ae4037e9cd58e2d2fdbb0342723184dd37312170fbe5b64f32f905d72c6708cc09fa3b6555b255a8f02aace3f34c098f048b6afaa4b4c4ee0810a WHIRLPOOL 3675a219ba9d0cbca95c8532a1ed457a3f05094ec1c7dee121acfec028afee26c64f704997777e40d71e945d8f0668a34c1ac3dfcd7c98d3d9beed7eaa14cc17 -EBUILD binutils-2.23.51.0.5.ebuild 1926 SHA256 5acbc0b45224ef8cadfa29ab59dbf656db8a68c5399b5b60bcd392144b1c1b6d SHA512 d16696d16e8fcb39f66daf6a7b6a5b1fc9361e75a5a3d432c0ba828f29d6f12230124b6d9d8cd175c9530a3ff8d59998c3e74080fe5fa39f8a3976ac9eafd0bf WHIRLPOOL adb0754bb3cb1a52137905c32149d281fab69a2e860ccbbbd610b0647b319777bdf6c6ff1a45d6123d41787d25c0d7310e3702f950aea470aaa45234ef974b2f -EBUILD binutils-2.23.51.0.6.ebuild 1926 SHA256 dc592c519f9b3eae5587db82029c61f2377eff12680362d4c611895a21e259bd SHA512 2a3c053484c4edee75aeec65310088046ca53e978a23705a432db57f08ee2f064af7d71548f16dbb38c053586881b1d2d39497a892a31d7f7ab8e49b548108c0 WHIRLPOOL f1ee641ed30639264904d3fc0db5bca3ec9efb5c890eabff79fd400c92558ed6b5a80898bc6b349d110ac7290f39dcd23c8a7fc02533ebfe79896cb9b2a91636 -EBUILD binutils-2.23.51.0.8.ebuild 1926 SHA256 108ad27215ebb8602193ead950a3962c724f1b24e5e14e05277b96a189d63876 SHA512 7a1b7840aa428ee2e52446c8082c16db07f61b7434ba9562d48e1b9e68e3bf449c0a54c31d250ece8fd371f09bb694162a6ed5bdf9f6c8539710c5295601ad20 WHIRLPOOL ed01c0234f6da5f75d700184ded119106d66462c5327b48b9d7ed6d0dd74aec70f866dbc043aaf6bc5bc2d9f98cf313eb11a7df96ae28f7f1ec6dccb9ba3b645 -EBUILD binutils-2.23.ebuild 2145 SHA256 e5778981837d3b6b987ca26c9bf9d0f1d71b408b3ca444e7762c46c38e46885e SHA512 9e45acb3abcfd4ed126a24aacc500522f6c2ea7915c59f993e66db8b66fef96062fb97127fb22a044b424486e4a75228d16507c4eb599105c532b9d47eef7f96 WHIRLPOOL df268e60b3e2a9642faabaa16e92adda81064122a3d009087e7d260ecdf92403a189fee1ac4f749c91b542bb0313432e2cbd50f28c211532d20ec416e5e04633 -EBUILD binutils-2.24-r3.ebuild 536 SHA256 dcc2613071a77c2a3f7ff524bf2065919eeeee9ed5b37254e99a00095bb8f410 SHA512 763e33009ffd146d78deb511805e5458131aa512612ef12a5862172f8e21db1308b8d335a3648fe563fdc41db826c2f3e3daf2bac4f100072bebac203c501378 WHIRLPOOL e74e702d610869acc188ea872c3afc5b66c8f6cfbc3da3fdb55ffbd7d709f0ac0818a4bc0b868a6a45da18381485549be1ed3fdc20e0211310e445d7782ca313 -MISC ChangeLog 79130 SHA256 eec9a2c9c8eaed424daddcbe78677d8512ebe8072ab5828d6c329cbaf4c74557 SHA512 c0b47a76155c56dcc25863cc8174a379470e1d2620602b34dd452c1b56b9b818af545bed30cabc8e8f4d68f019aa5c87bd10081784bb5c4c9cb6e2adaf1a9f44 WHIRLPOOL fbf0a664cd49d9faa29006768342890ff4906580aedbb4ebfeacba4dd32754badab6c941700f078a8bc020456c985dc255eeb26a9144d7f72a30bdd7b64398a9 -MISC metadata.xml 386 SHA256 58db91727c014c22db0fde315c25cb22c59dc5c15af5d30ee4c01a248500b67c SHA512 f5c6d289f0018d0eeb4ebb2fbbfda7c08aa70a98771f1c0795838137a0e3b848fc9e2b2355cbc7367a72dc00dd5e0a946c0eb5349a86eb3796af43918961733a WHIRLPOOL 92b3371b27092dbaed212837f544b059d5b0b2c547ef8c965836ac1dab1cdee198bb6ab63ab495eccdd1be1c1f5ce9e93624722a9ffd433a7615be202134336a diff --git a/sys-devel/binutils/binutils-2.20.1-r1.ebuild b/sys-devel/binutils/binutils-2.20.1-r1.ebuild deleted file mode 100644 index 7511e9c..0000000 --- a/sys-devel/binutils/binutils-2.20.1-r1.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.20.1-r1.ebuild,v 1.16 2012/05/31 04:45:38 vapier Exp $ - -PATCHVER="1.2" -ELF2FLT_VER="" -inherit toolchain-binutils - -KEYWORDS="~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-hpux*) - ln -s /usr/ccs/bin/ld "${ED}${BINPATH}"/ld || die "Cannot create ld symlink" - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.21.1-r1.ebuild b/sys-devel/binutils/binutils-2.21.1-r1.ebuild deleted file mode 100644 index ca983b8..0000000 --- a/sys-devel/binutils/binutils-2.21.1-r1.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.21.1-r1.ebuild,v 1.12 2011/12/28 20:33:56 halcy0n Exp $ - -PATCHVER="1.4" -ELF2FLT_VER="" -inherit toolchain-binutils - -KEYWORDS="~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-hpux*) - ln -s /usr/ccs/bin/ld "${ED}${BINPATH}"/ld || die "Cannot create ld symlink" - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.22-r1.ebuild b/sys-devel/binutils/binutils-2.22-r1.ebuild deleted file mode 100644 index d38dc68..0000000 --- a/sys-devel/binutils/binutils-2.22-r1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.22-r1.ebuild,v 1.16 2012/09/29 16:06:32 armin76 Exp $ - -PATCHVER="1.5" -ELF2FLT_VER="" -inherit toolchain-binutils - -KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.23.51.0.3.ebuild b/sys-devel/binutils/binutils-2.23.51.0.3.ebuild deleted file mode 100644 index 058569f..0000000 --- a/sys-devel/binutils/binutils-2.23.51.0.3.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.51.0.3.ebuild,v 1.2 2012/11/02 22:44:29 vapier Exp $ - -PATCHVER="1.1" -ELF2FLT_VER="" -inherit toolchain-binutils - -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.23.51.0.5.ebuild b/sys-devel/binutils/binutils-2.23.51.0.5.ebuild deleted file mode 100644 index 819175a..0000000 --- a/sys-devel/binutils/binutils-2.23.51.0.5.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.51.0.5.ebuild,v 1.1 2012/11/13 00:00:39 vapier Exp $ - -PATCHVER="1.0" -ELF2FLT_VER="" -inherit toolchain-binutils - -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.23.51.0.6.ebuild b/sys-devel/binutils/binutils-2.23.51.0.6.ebuild deleted file mode 100644 index a108e4e..0000000 --- a/sys-devel/binutils/binutils-2.23.51.0.6.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.51.0.6.ebuild,v 1.1 2012/11/26 18:01:14 vapier Exp $ - -PATCHVER="1.0" -ELF2FLT_VER="" -inherit toolchain-binutils - -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.23.51.0.8.ebuild b/sys-devel/binutils/binutils-2.23.51.0.8.ebuild deleted file mode 100644 index b31c91d..0000000 --- a/sys-devel/binutils/binutils-2.23.51.0.8.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.51.0.8.ebuild,v 1.1 2012/12/29 20:58:39 vapier Exp $ - -PATCHVER="1.0" -ELF2FLT_VER="" -inherit toolchain-binutils - -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.23.ebuild b/sys-devel/binutils/binutils-2.23.ebuild deleted file mode 100644 index 2fb8674..0000000 --- a/sys-devel/binutils/binutils-2.23.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.ebuild,v 1.2 2012/11/02 22:44:29 vapier Exp $ - -PATCHVER="1.1" -ELF2FLT_VER="" -inherit toolchain-binutils - -KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -src_unpack() { - toolchain-binutils_src_unpack - cd "${S}" - [[ $SYMLINK_LIB == yes ]] && - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch - epatch "${FILESDIR}"/${PN}-2.22-mint.patch - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch - epatch "${FILESDIR}"/${PN}-2.23-mbstate_t.patch - epatch "${FILESDIR}"/${PN}-2.23-ar-ranlib-truncate.patch - epatch "${FILESDIR}"/${PN}-2.23-runtime-sysroot.patch -} - -src_compile() { - if has noinfo "${FEATURES}" \ - || ! type -p makeinfo >/dev/null - then - # binutils >= 2.17 (accidentally?) requires 'makeinfo' - export EXTRA_EMAKE="MAKEINFO=true" - fi - - case "${CTARGET}" in - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;; - esac - - is_cross || EXTRA_ECONF+=" $(use_enable !rap runtime-sysroot)" - - toolchain-binutils_src_compile -} - -src_install() { - toolchain-binutils_src_install - - case "${CTARGET}" in - *-interix*) - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink" - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \ - < "${FILESDIR}"/2.21-ldwrap-interix.sh \ - > "${ED}${BINPATH}"/ld \ - || die "Cannot create ld wrapper" - chmod a+x "${ED}${BINPATH}"/ld - - dodir "${LIBPATH}"/ldscripts - - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0 - # additionally insert the prefix as absolute top search dir... - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \ - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \ - < $x \ - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \ - || die "Cannot occupy ldscripts" - done - ;; - esac -} diff --git a/sys-devel/binutils/binutils-2.24-r3.ebuild b/sys-devel/binutils/binutils-2.24-r3.ebuild deleted file mode 100644 index 663eb8c..0000000 --- a/sys-devel/binutils/binutils-2.24-r3.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.24-r3.ebuild,v 1.8 2014/11/04 09:26:08 ago Exp $ - -EAPI=4 - -PATCHVER="1.4" -ELF2FLT_VER="" -inherit toolchain-binutils - -KEYWORDS="~amd64 ~arm ~x86" - -src_prepare() { - epatch "${FILESDIR}"/${P}-runtime-sysroot.patch - toolchain-binutils_src_prepare -} - -src_configure() { - is_cross || EXTRA_ECONF+=" $(use_enable !rap runtime-sysroot)" - toolchain-binutils_src_configure -} - diff --git a/sys-devel/binutils/files/2.18-bfd-alloca.patch b/sys-devel/binutils/files/2.18-bfd-alloca.patch deleted file mode 100644 index 32d8b59..0000000 --- a/sys-devel/binutils/files/2.18-bfd-alloca.patch +++ /dev/null @@ -1,130 +0,0 @@ -bfd needs to declare alloca differently, see -http://sourceware.org/bugzilla/show_bug.cgi?id=5146 - ---- bfd/configure.in.orig 2007-10-09 09:35:46.626269000 +0200 -+++ bfd/configure.in 2007-10-09 09:36:41.264676000 +0200 -@@ -159,7 +159,7 @@ - - BFD_CC_FOR_BUILD - --AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h) -+AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h) - AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h) - GCC_HEADER_STDINT(bfd_stdint.h) - AC_HEADER_TIME ---- bfd/configure.orig 2007-10-09 09:02:42.293763000 +0200 -+++ bfd/configure 2007-10-09 09:04:01.331465000 +0200 -@@ -12574,7 +12574,7 @@ - - - --for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h -+for ac_header in alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then ---- bfd/config.in.orig 2007-10-09 09:13:33.604874000 +0200 -+++ bfd/config.in 2007-10-09 09:05:29.528913000 +0200 -@@ -4,6 +4,9 @@ - language is requested. */ - #undef ENABLE_NLS - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_ALLOCA_H -+ - /* Define to 1 if you have the declaration of `basename', and to 0 if you - don't. */ - #undef HAVE_DECL_BASENAME ---- bfd/som.c.orig 2007-10-24 09:45:12.000000000 +0200 -+++ bfd/som.c 2007-10-24 09:47:32.000000000 +0200 -@@ -23,7 +23,6 @@ - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ - --#include "alloca-conf.h" - #include "sysdep.h" - #include "bfd.h" - -@@ -38,6 +37,35 @@ - #include - #include - -+/* This is the code recommended in the autoconf documentation, almost -+ verbatim. If it doesn't work for you, let me know, and notify -+ djm@gnu.ai.mit.edu as well. */ -+/* Added void* version for STDC case. This is to be compatible with -+ the declaration in bison.simple, used for m68k operand parsing. -+ --KR 1995.08.08 */ -+/* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */ -+ -+#ifndef __GNUC__ -+# if HAVE_ALLOCA_H -+# include -+# else -+# ifdef _AIX -+/* Indented so that pre-ansi C compilers will ignore it, rather than -+ choke on it. Some versions of AIX require this to be the first -+ thing in the file. */ -+ #pragma alloca -+# else -+# ifndef alloca /* predefined by HP cc +Olibcalls */ -+# if !defined (__STDC__) && !defined (__hpux) -+extern char *alloca (); -+# else -+extern void *alloca (); -+# endif /* __STDC__, __hpux */ -+# endif /* alloca */ -+# endif /* _AIX */ -+# endif /* HAVE_ALLOCA_H */ -+#endif /* __GNUC__ */ -+ - static bfd_reloc_status_type hppa_som_reloc - (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); - static bfd_boolean som_mkobject (bfd *); ---- bfd/elf64-hppa.c.orig 2007-10-24 09:45:28.000000000 +0200 -+++ bfd/elf64-hppa.c 2007-10-24 09:48:16.000000000 +0200 -@@ -19,7 +19,6 @@ - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - --#include "alloca-conf.h" - #include "sysdep.h" - #include "bfd.h" - #include "libbfd.h" -@@ -27,6 +26,36 @@ - #include "elf/hppa.h" - #include "libhppa.h" - #include "elf64-hppa.h" -+ -+/* This is the code recommended in the autoconf documentation, almost -+ verbatim. If it doesn't work for you, let me know, and notify -+ djm@gnu.ai.mit.edu as well. */ -+/* Added void* version for STDC case. This is to be compatible with -+ the declaration in bison.simple, used for m68k operand parsing. -+ --KR 1995.08.08 */ -+/* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */ -+ -+#ifndef __GNUC__ -+# if HAVE_ALLOCA_H -+# include -+# else -+# ifdef _AIX -+/* Indented so that pre-ansi C compilers will ignore it, rather than -+ choke on it. Some versions of AIX require this to be the first -+ thing in the file. */ -+ #pragma alloca -+# else -+# ifndef alloca /* predefined by HP cc +Olibcalls */ -+# if !defined (__STDC__) && !defined (__hpux) -+extern char *alloca (); -+# else -+extern void *alloca (); -+# endif /* __STDC__, __hpux */ -+# endif /* alloca */ -+# endif /* _AIX */ -+# endif /* HAVE_ALLOCA_H */ -+#endif /* __GNUC__ */ -+ - #define ARCH_SIZE 64 - - #define PLT_ENTRY_SIZE 0x10 diff --git a/sys-devel/binutils/files/2.18-bfd-bufsz.patch b/sys-devel/binutils/files/2.18-bfd-bufsz.patch deleted file mode 100644 index db0a0be..0000000 --- a/sys-devel/binutils/files/2.18-bfd-bufsz.patch +++ /dev/null @@ -1,38 +0,0 @@ -'const int' is not const enough for arraysize before C99, see -http://sourceware.org/bugzilla/show_bug.cgi?id=5160 - ---- bfd/elflink.c 2007-10-22 22:14:29.000000000 +0200 -+++ bfd/elflink.c 2007-10-22 22:36:09.000000000 +0200 -@@ -7387,19 +7387,18 @@ - size_t locsymcount, - int signed_p) - { -- int len; -- int symlen; -+ size_t len; -+ size_t symlen; - bfd_vma a; - bfd_vma b; -- const int bufsz = 4096; -- char symbuf [bufsz]; -+ char symbuf [4096]; - const char * symend; - bfd_boolean symbol_is_section = FALSE; - - len = strlen (sym); - symend = sym + len; - -- if (len < 1 || len > bufsz) -+ if (len < 1 || len > sizeof (symbuf)) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; -@@ -7424,7 +7423,7 @@ - symlen = strtol (sym, &sym, 10); - ++ sym; /* Skip the trailing ':'. */ - -- if ((symend < sym) || ((symlen + 1) > bufsz)) -+ if ((symend < sym) || ((symlen + 1) > sizeof(symbuf))) - { - bfd_set_error (bfd_error_invalid_operation); - return FALSE; diff --git a/sys-devel/binutils/files/2.18-bfd-ia64elf.patch b/sys-devel/binutils/files/2.18-bfd-ia64elf.patch deleted file mode 100644 index 5aa0aee..0000000 --- a/sys-devel/binutils/files/2.18-bfd-ia64elf.patch +++ /dev/null @@ -1,96 +0,0 @@ -2007-12-14 H.J. Lu - - PR binutils/5449 - * elf.c (rewrite_elf_program_header): Don't adjust p_paddr if - p_paddr is set to 0. - (copy_private_bfd_data): Call rewrite_elf_program_header if - p_paddr is set to 0. - - * elfcode.h (elf_swap_phdr_out): Set p_paddr to 0 if needed. - - * elfxx-ia64.c (ELF_MAXPAGESIZE): Don't redefine it for HPUX. - ---- binutils-2.18/bfd/elf.c.zero 2007-12-17 10:58:04.761792000 +0100 -+++ binutils-2.18/bfd/elf.c 2007-12-17 11:49:16.381795000 +0100 -@@ -5272,9 +5272,13 @@ - matching_lma = 0; - suggested_lma = 0; - -- for (j = 0, section = ibfd->sections; -+ for (section = ibfd->sections; - section != NULL; - section = section->next) -+ if (section == first_section) -+ break; -+ -+ for (j = 0; section != NULL; section = section->next) - { - if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed)) - { -@@ -5319,6 +5323,9 @@ - else if (suggested_lma == 0) - suggested_lma = output_section->lma; - } -+ -+ if (j == section_count) -+ break; - } - - BFD_ASSERT (j == section_count); -@@ -5335,7 +5342,8 @@ - *pointer_to_map = map; - pointer_to_map = &map->next; - -- if (matching_lma != map->p_paddr -+ if (!bed->want_p_paddr_set_to_zero -+ && matching_lma != map->p_paddr - && !map->includes_filehdr && !map->includes_phdrs) - /* There is some padding before the first section in the - segment. So, we must account for that in the output -@@ -5675,6 +5683,13 @@ - asection *section, *osec; - unsigned int i, num_segments; - Elf_Internal_Shdr *this_hdr; -+ const struct elf_backend_data *bed; -+ -+ bed = get_elf_backend_data (ibfd); -+ -+ /* Regenerate the segment map if p_paddr is set to 0. */ -+ if (bed->want_p_paddr_set_to_zero) -+ goto rewrite; - - /* Initialize the segment mark field. */ - for (section = obfd->sections; section != NULL; ---- binutils-2.18/bfd/elfcode.h.zero 2007-10-30 11:48:34.000000000 -0700 -+++ binutils-2.18/bfd/elfcode.h 2007-12-14 10:49:00.000000000 -0800 -@@ -370,11 +370,17 @@ elf_swap_phdr_out (bfd *abfd, - const Elf_Internal_Phdr *src, - Elf_External_Phdr *dst) - { -+ const struct elf_backend_data *bed; -+ bfd_vma p_paddr; -+ -+ bed = get_elf_backend_data (abfd); -+ p_paddr = bed->want_p_paddr_set_to_zero ? 0 : src->p_paddr; -+ - /* note that all elements of dst are *arrays of unsigned char* already... */ - H_PUT_32 (abfd, src->p_type, dst->p_type); - H_PUT_WORD (abfd, src->p_offset, dst->p_offset); - H_PUT_WORD (abfd, src->p_vaddr, dst->p_vaddr); -- H_PUT_WORD (abfd, src->p_paddr, dst->p_paddr); -+ H_PUT_WORD (abfd, p_paddr, dst->p_paddr); - H_PUT_WORD (abfd, src->p_filesz, dst->p_filesz); - H_PUT_WORD (abfd, src->p_memsz, dst->p_memsz); - H_PUT_32 (abfd, src->p_flags, dst->p_flags); ---- binutils-2.18/bfd/elfxx-ia64.c.zero 2007-12-14 08:46:35.000000000 -0800 -+++ binutils-2.18/bfd/elfxx-ia64.c 2007-12-14 08:46:35.000000000 -0800 -@@ -5729,8 +5729,6 @@ elfNN_hpux_backend_symbol_processing (bf - #undef elf_backend_want_p_paddr_set_to_zero - #define elf_backend_want_p_paddr_set_to_zero 1 - --#undef ELF_MAXPAGESIZE --#define ELF_MAXPAGESIZE 0x1000 /* 4K */ - #undef ELF_COMMONPAGESIZE - #undef ELF_OSABI - #define ELF_OSABI ELFOSABI_HPUX - diff --git a/sys-devel/binutils/files/2.18-gprof-fabs.patch b/sys-devel/binutils/files/2.18-gprof-fabs.patch deleted file mode 100644 index cf45efd..0000000 --- a/sys-devel/binutils/files/2.18-gprof-fabs.patch +++ /dev/null @@ -1,151 +0,0 @@ -gprof needs to check for where to get fabs() from, reported as -http://sourceware.org/bugzilla/show_bug.cgi?id=5147 - ---- gprof/configure.in.orig 2007-10-09 09:22:17.289705000 +0200 -+++ gprof/configure.in 2007-10-09 09:24:26.745972000 +0200 -@@ -44,6 +44,9 @@ - [Is the prototype for getopt in in the expected format?]) - fi - -+# Some systems have fabs only in -lm, not in -lc. -+AC_SEARCH_LIBS(fabs, m) -+ - AM_BINUTILS_WARNINGS - - dnl Required by html and install-html ---- gprof/configure.orig 2007-10-09 09:22:11.089879000 +0200 -+++ gprof/configure 2007-10-09 09:25:54.513419000 +0200 -@@ -11073,6 +11073,133 @@ - - fi - -+# Some systems have fabs only in -lm, not in -lc. -+echo "$as_me:$LINENO: checking for library containing fabs" >&5 -+echo $ECHO_N "checking for library containing fabs... $ECHO_C" >&6 -+if test "${ac_cv_search_fabs+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_func_search_save_LIBS=$LIBS -+ac_cv_search_fabs=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char fabs (); -+int -+main () -+{ -+fabs (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_search_fabs="none required" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+if test "$ac_cv_search_fabs" = no; then -+ for ac_lib in m; do -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char fabs (); -+int -+main () -+{ -+fabs (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_search_fabs="-l$ac_lib" -+break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ done -+fi -+LIBS=$ac_func_search_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_search_fabs" >&5 -+echo "${ECHO_T}$ac_cv_search_fabs" >&6 -+if test "$ac_cv_search_fabs" != no; then -+ test "$ac_cv_search_fabs" = "none required" || LIBS="$ac_cv_search_fabs $LIBS" -+ -+fi -+ - - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - diff --git a/sys-devel/binutils/files/2.18-ldwrap-interix.sh b/sys-devel/binutils/files/2.18-ldwrap-interix.sh deleted file mode 100644 index 3c455f8..0000000 --- a/sys-devel/binutils/files/2.18-ldwrap-interix.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash - -# Wrapper for interix to avoid /usr/local/*. This is done -# by using our own linker scripts. These scripts are copied -# over from interix' gcc 3.3 and modified to not include -# /usr/local/lib for library search. Still we have to tell -# ld to use those scripts.... - -ScriptDir=@SCRIPTDIR@ -ScriptPlatform=i386pe_posix -ScriptExt=x - -Opt_Ur=no -Opt_r=no -Opt_N=no -Opt_n=no -Opt_shared=no -Opt_ldl="-ldl" -Args= - -for arg in "$@"; do - case $arg in - -Ur) Opt_Ur=yes ;; - -r) Opt_r=yes ;; - -N) Opt_N=yes ;; - -n) Opt_n=yes ;; - --shared) Opt_shared=yes ;; - -Bstatic) Opt_ldl= ;; - esac - - # manpages states '-soname', but '-h' seems to work better !? - OptArg= - - case $arg in - -soname) arg="-h" ;; - -soname=*) OptArg="${arg#-soname=}"; arg="-h" ;; - --version-script=*) continue ;; # ignore. this only make troubles! - -L/usr/lib/x86) continue ;; # fuck off, bloody bastard see below: - # gcc needs to know about /usr/lib/x86 to find startfiles, but - # knowing it, makes gcc add this path with -L on the linker - # command line. since the linker is a binutils-config extwrapper, - # it removes all -L${EPREFIX}/{lib,usr/lib} from the command line - # (and the linker itself adds them again later on). This makes us - # end up with /usr/lib/x86 up front of the prefix, making the linker - # find _WRONG_ libraries, resulting in damaged binaries and/or failed - # links. - esac - - Args="$Args '$arg'" - [ -z "$OptArg" ] || Args="$Args '$OptArg'" -done - -if [ $Opt_Ur = "yes" ]; then - ScriptExt=xu -elif [ $Opt_r = "yes" ]; then - ScriptExt=xr -elif [ $Opt_N = "yes" ]; then - ScriptExt=xbn -elif [ $Opt_n = "yes" ]; then - ScriptExt=xn -elif [ $Opt_shared = "yes" ]; then - ScriptExt=xs -fi - -# -# WARNING: --script is the last here intentionally, since all library paths given -# in the file are added dependant to the position where the --script option appears -# on the command line. this means that if not given last, libraries from /opt/gcc... -# and /usr/lib will allways get linked in before any library from our prefix (which -# we *definitly* don't want... -# -# There is some nasty redirection trick here, which enables this script to remove -# dumb assertions from stderr without touching the rest. -# -exec 3>&1 -eval "/opt/gcc.3.3/bin/ld $Args $Opt_ldl --script '$ScriptDir/$ScriptPlatform.$ScriptExt'" 2>&1 >&3 3>&- \ - | grep -v -E 'assertion fail .*/cofflink.c:5211' 3>&- 1>&2 2>/dev/null -_st=${PIPESTATUS[0]} -exec 3>&- - -exit ${_st} - diff --git a/sys-devel/binutils/files/2.18-solarisx86_64.patch b/sys-devel/binutils/files/2.18-solarisx86_64.patch deleted file mode 100644 index a486283..0000000 --- a/sys-devel/binutils/files/2.18-solarisx86_64.patch +++ /dev/null @@ -1,32 +0,0 @@ -* add recognition for x86_64-pc-solaris2* - ---- bfd/config.bfd -+++ bfd/config.bfd -@@ -489,6 +489,13 @@ - targ64_selvecs=bfd_elf64_x86_64_vec - want64=true - ;; -+#ifdef BFD64 -+ x86_64-*-solaris2*) -+ targ_defvec=bfd_elf32_i386_vec -+ targ_selvecs="bfd_elf64_x86_64_vec i386coff_vec" -+ want64=true -+ ;; -+#endif - i[3-7]86-*-kaos*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs=bfd_elf32_i386_vec ---- ld/configure.tgt -+++ ld/configure.tgt -@@ -206,6 +206,11 @@ - targ_extra_emuls="elf_i386 elf_x86_64" - targ_extra_libpath=$targ_extra_emuls - ;; -+x86_64-*-solaris2*) -+ targ_emul=elf_x86_64 -+ targ_extra_emuls="elf_i386 elf_i386_ldso" -+ targ_extra_libpath=elf_i386 -+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;; - i[3-7]86-*-unixware) targ_emul=elf_i386 ;; - i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso - targ_extra_emuls="elf_i386" diff --git a/sys-devel/binutils/files/2.21-ldwrap-interix.sh b/sys-devel/binutils/files/2.21-ldwrap-interix.sh deleted file mode 100644 index 44570f0..0000000 --- a/sys-devel/binutils/files/2.21-ldwrap-interix.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env bash - -# Wrapper for interix to avoid /usr/local/*. This is done -# by using our own linker scripts. These scripts are copied -# over from interix' gcc 3.3 and modified to not include -# /usr/local/lib for library search. Still we have to tell -# ld to use those scripts.... - -ScriptDir=@SCRIPTDIR@ -ScriptPlatform=i386pe_posix -ScriptExt=x - -Opt_Ur=no -Opt_r=no -Opt_N=no -Opt_n=no -Opt_shared=no -Opt_ldl="-ldl" -Args= - -Opt_v_seen=no -Opt_file_seen=no - -for arg in "$@"; do - case $arg in - -Ur) Opt_Ur=yes ;; - -r) Opt_r=yes ;; - -N) Opt_N=yes ;; - -n) Opt_n=yes ;; - --shared) Opt_shared=yes ;; - -Bstatic) Opt_ldl= ;; - -v) Opt_v_seen=yes ;; - *) [[ -e "$1" ]] && Opt_file_seen=yes ;; - esac - - # manpages states '-soname', but '-h' seems to work better !? - OptArg= - - case $arg in - -soname) arg="-h" ;; - -soname=*) OptArg="${arg#-soname=}"; arg="-h" ;; - --version-script=*) continue ;; # ignore. this only make troubles! - -L/usr/lib/x86) continue ;; # fuck off, bloody bastard see below: - # gcc needs to know about /usr/lib/x86 to find startfiles, but - # knowing it, makes gcc add this path with -L on the linker - # command line. since the linker is a binutils-config extwrapper, - # it removes all -L${EPREFIX}/{lib,usr/lib} from the command line - # (and the linker itself adds them again later on). This makes us - # end up with /usr/lib/x86 up front of the prefix, making the linker - # find _WRONG_ libraries, resulting in damaged binaries and/or failed - # links. - esac - - Args="$Args '$arg'" - [ -z "$OptArg" ] || Args="$Args '$OptArg'" -done - -if [ $Opt_Ur = "yes" ]; then - ScriptExt=xu -elif [ $Opt_r = "yes" ]; then - ScriptExt=xr -elif [ $Opt_N = "yes" ]; then - ScriptExt=xbn -elif [ $Opt_n = "yes" ]; then - ScriptExt=xn -elif [ $Opt_shared = "yes" ]; then - ScriptExt=xs -fi - -# -# If just calling ld -v, we definitely DON'T want to add -ldl, as it makes the -# linker crash ... :*( -# -[[ ${Opt_v_seen} == yes && ${Opt_file_seen} == no ]] && \ - Opt_ldl= - -# -# WARNING: --script is the last here intentionally, since all library paths given -# in the file are added dependant to the position where the --script option appears -# on the command line. this means that if not given last, libraries from /opt/gcc... -# and /usr/lib will allways get linked in before any library from our prefix (which -# we *definitly* don't want... -# -# There is some nasty redirection trick here, which enables this script to remove -# dumb assertions from stderr without touching the rest. -# -exec 3>&1 -eval "/opt/gcc.3.3/bin/ld $Args $Opt_ldl --script '$ScriptDir/$ScriptPlatform.$ScriptExt'" 2>&1 >&3 3>&- \ - | grep -v -E 'assertion fail .*/cofflink.c:5211' 3>&- 1>&2 2>/dev/null -_st=${PIPESTATUS[0]} -exec 3>&- - -exit ${_st} - diff --git a/sys-devel/binutils/files/binutils-2.16-gcc4.patch b/sys-devel/binutils/files/binutils-2.16-gcc4.patch deleted file mode 100644 index 2308e66..0000000 --- a/sys-devel/binutils/files/binutils-2.16-gcc4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bfd/aix5ppc-core.c -+++ bfd/aix5ppc-core.c -@@ -117,7 +117,7 @@ - return return_value; - - memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx)); -- core_hdr(abfd) = (char *)new_core_hdr; -+ abfd->tdata.any = (char *)new_core_hdr; - - /* .stack section. */ - sec = bfd_make_section_anyway (abfd, ".stack"); diff --git a/sys-devel/binutils/files/binutils-2.16-solaris10.patch b/sys-devel/binutils/files/binutils-2.16-solaris10.patch deleted file mode 100644 index 3689cf5..0000000 --- a/sys-devel/binutils/files/binutils-2.16-solaris10.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- bfd/elflink.c -+++ bfd/elflink.c -@@ -3683,11 +3683,12 @@ - - /* If this is a hidden symbol, or if it is not version - 1, we append the version name to the symbol name. -- However, we do not modify a non-hidden absolute -- symbol, because it might be the version symbol -- itself. FIXME: What if it isn't? */ -+ However, we do not modify a non-hidden absolute symbol -+ if it is not a function, because it might be the version -+ symbol itself. FIXME: What if it isn't? */ - if ((iver.vs_vers & VERSYM_HIDDEN) != 0 -- || (vernum > 1 && ! bfd_is_abs_section (sec))) -+ || (vernum > 1 && (! bfd_is_abs_section (sec) -+ || ELF_ST_TYPE (isym->st_info) == STT_FUNC))) - { - const char *verstr; - size_t namelen, verlen, newlen; ---- ld/configure.tgt -+++ ld/configure.tgt -@@ -171,10 +171,12 @@ - i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;; - i[3-7]86-*-solaris2*) targ_emul=elf_i386_ldso - targ_extra_emuls="elf_i386 elf_x86_64" -+ targ_extra_libpath=$targ_extra_emuls - ;; - i[3-7]86-*-unixware) targ_emul=elf_i386 ;; - i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso - targ_extra_emuls="elf_i386" -+ targ_extra_libpath=$targ_extra_emuls - ;; - i[3-7]86-*-netbsdelf* | \ - i[3-7]86-*-netbsd*-gnu* | \ diff --git a/sys-devel/binutils/files/binutils-2.18.50.0.7-mint.patch b/sys-devel/binutils/files/binutils-2.18.50.0.7-mint.patch deleted file mode 100644 index 127dcac..0000000 --- a/sys-devel/binutils/files/binutils-2.18.50.0.7-mint.patch +++ /dev/null @@ -1,2503 +0,0 @@ -diff -aurN binutils-2.18/bfd/Makefile.am binutils-2.18-mint-20080228/bfd/Makefile.am ---- binutils-2.18/bfd/Makefile.am 2007-08-28 22:20:14.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/Makefile.am 2008-02-28 09:46:59.109375000 +0100 -@@ -351,6 +351,7 @@ - pei-mips.lo \ - peigen.lo \ - ppcboot.lo \ -+ prg-mint.lo \ - reloc16.lo \ - riscix.lo \ - sparclinux.lo \ -@@ -529,6 +530,7 @@ - pe-mips.c \ - pei-mips.c \ - ppcboot.c \ -+ prg-mint.c \ - reloc16.c \ - riscix.c \ - sparclinux.c \ -@@ -1754,6 +1756,9 @@ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h - ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -+prg-mint.lo: prg-mint.c $(INCDIR)/aout/aout64.h \ -+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ -+ $(INCDIR)/bfdlink.h libaout.h aoutx.h aout-target.h - reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -diff -aurN binutils-2.18/bfd/Makefile.in binutils-2.18-mint-20080228/bfd/Makefile.in ---- binutils-2.18/bfd/Makefile.in 2007-08-28 22:20:12.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/Makefile.in 2008-02-28 09:46:59.156250000 +0100 -@@ -601,6 +601,7 @@ - pei-mips.lo \ - peigen.lo \ - ppcboot.lo \ -+ prg-mint.lo \ - reloc16.lo \ - riscix.lo \ - sparclinux.lo \ -@@ -779,6 +780,7 @@ - pe-mips.c \ - pei-mips.c \ - ppcboot.c \ -+ prg-mint.c \ - reloc16.c \ - riscix.c \ - sparclinux.c \ -@@ -2334,6 +2336,9 @@ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h - ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -+prg-mint.lo: prg-mint.c $(INCDIR)/aout/aout64.h \ -+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ -+ $(INCDIR)/bfdlink.h libaout.h aoutx.h aout-target.h - reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -diff -aurN binutils-2.18/bfd/acinclude.m4 binutils-2.18-mint-20080228/bfd/acinclude.m4 ---- binutils-2.18/bfd/acinclude.m4 2007-08-06 21:59:13.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/acinclude.m4 2008-02-28 09:46:59.171875000 +0100 -@@ -3,7 +3,7 @@ - [AC_REQUIRE([AC_CANONICAL_TARGET]) - case "${host}" in - changequote(,)dnl --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - changequote([,])dnl - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; - esac])dnl -diff -aurN binutils-2.18/bfd/aoutx.h binutils-2.18-mint-20080228/bfd/aoutx.h ---- binutils-2.18/bfd/aoutx.h 2007-08-06 21:59:13.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/aoutx.h 2008-02-28 09:46:59.218750000 +0100 -@@ -1832,6 +1832,11 @@ - bfd_byte buffer[BYTES_IN_WORD]; - bfd_size_type amt = BYTES_IN_WORD; - -+ /* The MiNT backend writes past the string table. It therefore has to -+ know about the table size. */ -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) + -+ BYTES_IN_WORD; -+ - /* The string table starts with the size. */ - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer); - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt) -diff -aurN binutils-2.18/bfd/bfd-in.h binutils-2.18-mint-20080228/bfd/bfd-in.h ---- binutils-2.18/bfd/bfd-in.h 2007-08-06 21:59:14.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/bfd-in.h 2008-02-28 09:46:59.250000000 +0100 -@@ -791,6 +791,12 @@ - extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -+/* MiNT executable support routines for the linker. */ -+extern bfd_boolean bfd_m68kmint_set_extended_flags -+ (bfd *, flagword); -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry -+ (bfd *abfd, bfd_vma address); -+ - /* mmap hacks */ - - struct _bfd_window_internal; -diff -aurN binutils-2.18/bfd/bfd-in2.h binutils-2.18-mint-20080228/bfd/bfd-in2.h ---- binutils-2.18/bfd/bfd-in2.h 2007-08-06 21:59:15.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/bfd-in2.h 2008-02-28 09:46:59.328125000 +0100 -@@ -798,6 +798,12 @@ - extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -+/* MiNT executable support routines for the linker. */ -+extern bfd_boolean bfd_m68kmint_set_extended_flags -+ (bfd *, flagword); -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry -+ (bfd *abfd, bfd_vma address); -+ - /* mmap hacks */ - - struct _bfd_window_internal; -diff -aurN binutils-2.18/bfd/config.bfd binutils-2.18-mint-20080228/bfd/config.bfd ---- binutils-2.18/bfd/config.bfd 2007-08-28 19:19:33.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/config.bfd 2008-02-28 09:46:59.375000000 +0100 -@@ -777,6 +777,11 @@ - # targ_selvecs=m68kmach3_vec - # targ_cflags=-DSTAT_FOR_EXEC - ;; -+ m68*-*-mint*) -+ targ_defvec=aout0_big_vec -+ targ_selvecs=m68kmint_prg_vec -+ targ_underscore=yes -+ ;; - m68*-hp*-netbsd*) - targ_defvec=m68k4knetbsd_vec - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec" -diff -aurN binutils-2.18/bfd/configure binutils-2.18-mint-20080228/bfd/configure ---- binutils-2.18/bfd/configure 2007-08-28 22:19:51.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/configure 2008-02-28 09:48:33.234375000 +0100 -@@ -16753,7 +16753,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - cat >>confdefs.h <<\_ACEOF - #define USE_BINARY_FOPEN 1 -@@ -19222,6 +19222,7 @@ - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;; - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; - m88kbcs_vec) tb="$tb coff-m88k.lo" ;; -diff -aurN binutils-2.18/bfd/configure.in binutils-2.18-mint-20080228/bfd/configure.in ---- binutils-2.18/bfd/configure.in 2007-08-28 22:19:56.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/configure.in 2008-02-28 09:48:22.671875000 +0100 -@@ -800,6 +800,7 @@ - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;; - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; - m88kbcs_vec) tb="$tb coff-m88k.lo" ;; -diff -aurN binutils-2.18/bfd/libaout.h binutils-2.18-mint-20080228/bfd/libaout.h ---- binutils-2.18/bfd/libaout.h 2007-08-06 21:59:36.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/libaout.h 2008-02-28 09:47:00.031250000 +0100 -@@ -420,6 +420,10 @@ - table, used when linking on SunOS. This is indexed by the symbol - index. */ - bfd_vma *local_got_offsets; -+ -+ /* A pointer for data used by aout extensions. (Currently only used -+ by MiNT executables (see prg-mint.c). */ -+ void *ext; - }; - - struct aout_data_struct -@@ -447,6 +451,7 @@ - #define obj_aout_string_window(bfd) (adata (bfd).string_window) - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes) - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info) -+#define obj_aout_ext(bfd) (adata (bfd).ext) - - /* We take the address of the first element of an asymbol to ensure that the - macro is only ever applied to an asymbol. */ -diff -aurN binutils-2.18/bfd/prg-mint.c binutils-2.18-mint-20080228/bfd/prg-mint.c ---- binutils-2.18/bfd/prg-mint.c 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.18-mint-20080228/bfd/prg-mint.c 2008-02-28 09:47:00.046875000 +0100 -@@ -0,0 +1,1718 @@ -+/* BFD backend for traditional MiNT executables. -+ Copyright 1998, 2007 Free Software Foundation, Inc. -+ Originally written by Guido Flohr (guido@freemint.de). -+ Modified by Vincent Riviere (vincent.riviere@freesbee.fr). -+ -+ This file is part of BFD, the Binary File Descriptor library. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+/* The format of executables on Atari is actually not a.out, it is -+ only chosen as an approach which comes close enough. The layout of a -+ program image on disk looked like this: -+ -+ +-----------------+ -+ | 28 Bytes Header | -+ +-----------------+ -+ | Text segment | -+ +-----------------+ -+ | Data segment | -+ +-----------------+ -+ | BSS | -+ +-----------------+ -+ | Symbol table | -+ +-----------------+ -+ | TPA relocation | -+ +-----------------+ -+ -+ The 28 byte exec header used to look like this: -+ -+ struct old_exec_header -+ { -+ bfd_byte a_magic[2]; -+ bfd_byte a_text[4]; -+ bfd_byte a_data[4]; -+ bfd_byte a_bss[4]; -+ bfd_byte a_syms[4]; -+ bfd_byte a_resvd[4]; -+ bfd_byte a_abs[2]; -+ }; -+ -+ The first two bytes (A_MAGIC) contained an assembler branch -+ instruction to the beginning of the text segment. Because the -+ exec header had a fixed size and the text entry point was constant -+ this assembler instruction also had a constant value (0x601a). -+ In fact the operating system never really executed the branch -+ instruction but used this value (0x601a) as a magic value. -+ -+ TEXT, DATA and BSS were as one would expect them. The symbol -+ table wasn't. Several different formats were in use, none of them -+ very efficient, none of them powerful enough to support source -+ level debugging. I've changed that and the GNU symbol table will -+ now be used instead (unless the --traditional-format option was -+ given to the linker). -+ -+ If the last member A_ABS of the exec header is zero the program -+ image contains an additional table with relocation information -+ at the end of the image. The kernel can load program images at -+ virtually any address in the address space. In fact it will load -+ it at the start of the biggest block of free memory. This block -+ is then called the Transient Program Area TPA and the image has -+ to be relocated against the TPA at runtime. The relocation info -+ itself is in a simply way compressed: It starts with a four-byte -+ value, the first address within the image to be relocated. Now -+ following are one-byte offsets to the last address. The special -+ value of 1 (which is impossible as an offset) signifies that 254 -+ has to be added to the next offset. The table is finished with -+ a zero-byte. -+ -+ I now simply extended the header from its old 28 bytes to 256 -+ bytes. The first 28 bytes give home to a standard Atari header, -+ the rest is for extensions. The extension header starts with -+ a ``real'' assembler instruction, a far jump to the text entry -+ point. The extension header gives home to a standard a.out -+ exec header (currently NMAGIC or OMAGIC only) plus some extra -+ more or less useful fields plus space to future extensions. -+ For the OS the extension header will already belong to the text -+ segment, for BFD backends the text segment is 228 (or 0xe4) -+ bytes smaller than for the OS. This explains for example the -+ funny TEXT_START_ADDR 0xe4. -+ -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently -+ no such thing as memory paging on the Atari (and this is why -+ ZMAGICs are disabled for now to allow for future enhancements). -+ -+ If you think that this whole file looks quite like a big hack -+ you're probably right. But the results (mainly the output of -+ the linker) seem to work and they allow to use up-to-date -+ binutils on the Atari until a better executable format (maybe -+ ELF) has been established for this machine. */ -+ -+#include "sysdep.h" -+#include "bfd.h" -+ -+#define N_HEADER_IN_TEXT(x) 0 -+#define BYTES_IN_WORD 4 -+#define ENTRY_CAN_BE_ZERO -+#define N_SHARED_LIB(x) 0 -+#define TEXT_START_ADDR 0xe4 -+#define TARGET_PAGE_SIZE 2 -+#define TARGET_IS_BIG_ENDIAN_P -+#define DEFAULT_ARCH bfd_arch_m68k -+#define N_TXTADDR(x) TEXT_START_ADDR -+ -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not -+ remove whitespace added here, and thus will fail to concatenate -+ the tokens. */ -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP) -+#define TARGETNAME "a.out-mintprg" -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y) -+ -+/* The only location that the macro ZMAGIC_DISK_BLOCK_SIZE seems to -+ be needed is in aout-target.h where the file position of the text -+ segment is determined. Our target page size of 2 is actually just a -+ joke (no paging on Atari, we simply short-word-align sections) so -+ we have to explicitely tell aout-target here. Nonetheless, this -+ doesn't seem clean to me. Does aoutx.h (adjust_n_magic) has to -+ be modified? */ -+#define ZMAGIC_DISK_BLOCK_SIZE EXEC_BYTES_SIZE -+ -+/* If --traditional-format was given to the linker an old-style DRI -+ symbol table is written into the executable. This is with respect -+ to many old debugging tools or disassemblers which expect this format. -+ Although created by the linker, these executables will not be recognized -+ as a valid bfd input file. It is too much effort to evaluate the -+ symbols from such files. */ -+#define _MINT_SYMBOL_FORMAT_GNU 0 -+#define _MINT_SYMBOL_FORMAT_DRI 1 -+ -+/* Forward declarations. */ -+struct bfd_link_info; -+struct reloc_std_external; -+ -+/* Data structure that holds some private information for us. */ -+struct mint_internal_info -+{ -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */ -+ bfd_boolean traditional_format; /* Saved from link info. */ -+ int symbol_format; /* Format of the symbol table. */ -+ void *tparel; /* Data for TPA relative relocation -+ information. */ -+ file_ptr tparel_pos; /* File position of TPA relative -+ relocation information. */ -+ bfd_size_type tparel_size; /* Size of TPA relative relocation -+ information. */ -+ bfd_size_type symtab_size; /* Size of traditional symbol table. */ -+ -+#define MINT_RELOC_CHUNKSIZE 0x1000 -+ bfd_vma *relocs; /* Array of address relocations. */ -+ unsigned long relocs_used; /* Number of relocation entries -+ already used up. */ -+ unsigned long relocs_allocated; /* Number of relocation entries -+ allocated. */ -+ -+ bfd_vma stkpos; /* File offset to value of _stksize. */ -+ -+ flagword prg_flags; /* Standard GEMDOS flags. */ -+ -+ bfd_boolean reloc_error; /* True if an unhandled error during -+ relocation occured. */ -+}; -+ -+/* We have to do quite a lot of magic to make the Atari format -+ for GEMDOS executables fit into the standard a.out format. -+ We start with the original header. */ -+#define external_exec mint_external_exec -+struct mint_external_exec -+{ -+ bfd_byte g_branch[2]; /* 0x601a (or 0xdead for relocatable -+ linker output). */ -+ bfd_byte g_text[4]; /* Length of text section. */ -+ bfd_byte g_data[4]; /* Length of data section. */ -+ bfd_byte g_bss[4]; /* Length of bss section. */ -+ bfd_byte g_syms[4]; /* Length of symbol table. */ -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54 -+ (in ASCII: ``MiNT''). */ -+ bfd_byte g_flags[4]; /* Atari special flags. */ -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation -+ info. */ -+ -+ /* We extend this header now to provide the information that the -+ binutils want to see. Everything following will actually be part -+ of the text segment (from MiNT's point of view). As a -+ consequence the text section has 228 bytes of redundancy. -+ -+ The following eight bytes should be treated as opaque. -+ If the word ``opaque'' always attracts your curiosity in -+ typedefs and structs, here's the explanation: These eight bytes -+ are really two assembler instructions. The first one moves -+ the contents of e_entry into register d0, the second one -+ jumps (pc-relative) to the entry point. See swap_exec_header_out -+ for details. */ -+ bfd_byte g_jump_entry[8]; -+ -+ /* Now following a standard a.out header. Note that the values -+ may differ from the one given on top. The traditional header -+ contains the values that the OS wants to see, the values below -+ are the values that make the binutils work. */ -+ bfd_byte e_info[4]; /* Magic number and stuff. */ -+ bfd_byte e_text[4]; /* Length of text section in bytes. */ -+ bfd_byte e_data[4]; /* Length of data section. */ -+ bfd_byte e_bss[4]; /* Length of standard symbol -+ table. */ -+ bfd_byte e_syms[4]; /* Length of symbol table. */ -+ bfd_byte e_entry[4]; /* Start address. */ -+ bfd_byte e_trsize[4]; /* Length of text relocation -+ info. */ -+ bfd_byte e_drsize[4]; /* Length of data relocation -+ info. */ -+ -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative -+ relocation info. */ -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation -+ info. */ -+ -+ /* This is for extensions. */ -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into -+ the executable you will find it -+ at file offset g_stkpos. If -+ not this is NULL. */ -+ -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See -+ definitions for _MINT_SYMBOL_FORMAT* -+ above. */ -+ -+ /* Pad with zeros. */ -+ bfd_byte g_pad0[172]; -+}; -+ -+#define EXEC_BYTES_SIZE 256 -+ -+/* Code indicating object file or impure executable. */ -+#define OMAGIC 0407 -+/* Code indicating pure executable. */ -+#define NMAGIC 0410 -+/* Code indicating demand-paged executable. */ -+#define ZMAGIC 0413 -+ -+#ifndef N_BADMAG -+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \ -+ && N_MAGIC(x) != NMAGIC \ -+ && N_MAGIC(x) != ZMAGIC) -+#endif -+ -+/* For DRI symbol table format. */ -+struct dri_symbol -+{ -+ bfd_byte a_name[8]; /* Symbol name */ -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */ -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */ -+}; -+#define DRI_SYMBOL_SIZE 14 -+ -+/* Simple values for a_type. */ -+#define A_UNDF 0 -+#define A_BSS 0x0100 -+#define A_TEXT 0x0200 -+#define A_DATA 0x0400 -+#define A_EXT 0x0800 /* External. */ -+#define A_EQREG 0x1000 /* Equated register. */ -+#define A_GLOBL 0x2000 /* Global. */ -+#define A_EQU 0x4000 /* Equated. */ -+#define A_DEF 0x8000 /* Defined. */ -+#define A_LNAM 0x0048 /* GST compatible long name. */ -+ /* File symbols ala aln. */ -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */ -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this -+ conflicts with the bits in A_LNAM. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel); -+ -+/* This is a hack. We have to retrieve the symbol name. But -+ to do achieve this with reasonable effort we need an extra -+ parameter. */ -+#define MY_final_link_relocate(howto, input_bfd, input_section, contents, \ -+ address, value, addend) \ -+m68kmint_prg_final_link_relocate (howto, input_bfd, input_section, contents, \ -+ address, value, addend, \ -+ (struct reloc_std_external *) rel) -+ -+/* aoutx.h requires definitions for BMAGIC and QMAGIC. Other -+ implementations have either chosen OMAGIC or zero for BMAGIC if -+ not available. We try it with 0777 which is hopefully impossible. */ -+#define BMAGIC 0777 -+#define QMAGIC 0314 -+ -+#include "aoutx.h" -+ -+/* libaout doesn't use NAME for these ... */ -+ -+#define MY_get_section_contents aout_32_get_section_contents -+ -+/* The following variables and functions -+ will be provided by aout-target.h. */ -+ -+static const bfd_target * -+m68kmint_prg_callback (bfd *abfd); -+ -+static void -+MY_final_link_callback (bfd *abfd, -+ file_ptr *ptreloff, -+ file_ptr *pdreloff, -+ file_ptr *psymoff); -+ -+extern const bfd_target m68kmint_prg_vec; -+ -+/* Finish up the reading of an a.out file header. */ -+ -+#define MY_object_p m68kmint_prg_object_p -+ -+static const bfd_target * -+m68kmint_prg_object_p (bfd *abfd) -+{ -+ struct external_exec exec_bytes; /* Raw exec header from file. */ -+ struct internal_exec exec; /* Cleaned-up exec header. */ -+ const bfd_target *target; -+ bfd_size_type amt = EXEC_BYTES_SIZE; -+ struct mint_internal_info *myinfo; -+ bfd_boolean is_executable = TRUE; -+ -+ if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt) -+ { -+ if (bfd_get_error () != bfd_error_system_call) -+ bfd_set_error (bfd_error_wrong_format); -+ return 0; -+ } -+ -+ /* Instead of byte-swapping we compare bytes. */ -+ if (exec_bytes.g_branch[0] == 0xde -+ && exec_bytes.g_branch[1] == 0xad) -+ { -+ /* This is the result of an invalid objcopy operation. */ -+ is_executable = FALSE; -+ } -+ else if (exec_bytes.g_branch[0] != 0x60 -+ || exec_bytes.g_branch[1] != 0x1a) -+ { -+ bfd_set_error (bfd_error_wrong_format); -+ return 0; -+ } -+ -+ if (exec_bytes.g_branch[0] != 0x60 -+ || exec_bytes.g_branch[1] != 0x1a -+ || exec_bytes.g_extmagic[0] != 'M' -+ || exec_bytes.g_extmagic[1] != 'i' -+ || exec_bytes.g_extmagic[2] != 'N' -+ || exec_bytes.g_extmagic[3] != 'T' -+ || exec_bytes.g_symbol_format[0] != 0 -+ || exec_bytes.g_symbol_format[1] != 0 -+ || exec_bytes.g_symbol_format[2] != 0 -+ || exec_bytes.g_symbol_format[3] != 0) -+ { -+ bfd_set_error (bfd_error_wrong_format); -+ return 0; -+ } -+ -+#ifdef SWAP_MAGIC -+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info); -+#else -+ exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info); -+#endif -+ -+ if (N_BADMAG (exec)) -+ return 0; -+ -+#ifdef MACHTYPE_OK -+ if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) -+ return 0; -+#endif -+ -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec); -+ -+#ifdef SWAP_MAGIC -+ /* Swap_exec_header_in read in a_info with the wrong byte order. */ -+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info); -+#endif -+ -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback); -+ -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info)); -+ -+ if (myinfo == NULL) -+ { -+ /* Error is already set to "out of memory". */ -+ return 0; -+ } -+ -+ obj_aout_ext (abfd) = myinfo; -+ -+ /* Now get the missing information. */ -+ myinfo->tparel_pos = GET_WORD (abfd, exec_bytes.g_tparel_pos); -+ myinfo->tparel_size = GET_WORD (abfd, exec_bytes.g_tparel_size); -+ -+ /* FIXME: Currently we always read the TPA relative relocation -+ information. This is suboptimal because often times there -+ is no need for it. Read it only if need be! Maybe this should -+ also depend on abfd->cacheable? */ -+ if (myinfo->tparel_size == 0) -+ myinfo->tparel = bfd_zalloc (abfd, 4); -+ else -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size); -+ -+ if (myinfo->tparel == NULL) -+ return 0; -+ -+ if (myinfo->tparel_size == 0) -+ { -+ myinfo->tparel_size = 4; -+ } -+ else -+ { -+ /* Read the information from the bfd. */ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size)) -+ { -+ return 0; -+ } -+ } -+ -+ myinfo->stkpos = GET_WORD (abfd, exec_bytes.g_stkpos); -+ myinfo->prg_flags = GET_WORD (abfd, exec_bytes.g_flags); -+ -+ /* We don't support other formats for the symbol table actively. */ -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ return target; -+} -+ -+/* Free all information we have cached for this BFD. We can always -+ read it again later if we need it. */ -+ -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info -+ -+static bfd_boolean -+m68kmint_prg_bfd_free_cached_info (bfd *abfd) -+{ -+ if (obj_aout_ext (abfd) != NULL) -+ { -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ if (myinfo != NULL) -+ { -+ if (myinfo->relocs != NULL) -+ { -+ free (myinfo->relocs); -+ myinfo->relocs = NULL; -+ } -+ } -+ } -+ -+ return NAME (aout, bfd_free_cached_info) (abfd); -+} -+ -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the -+ symbol exceeds 8 characters write a long symbol. If it -+ exceeds 22 characters truncate the name. */ -+ -+static int -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value) -+{ -+ struct dri_symbol sym; -+ char *ptr = (char*)sym.a_name; -+ const char *str = name; -+ char more_name[DRI_SYMBOL_SIZE]; -+ int i = sizeof (sym.a_name); -+ int written_bytes = 0; -+ -+ bfd_put_16 (abfd, type, sym.a_type); -+ bfd_put_32 (abfd, value, sym.a_value); -+ -+ while (--i >= 0 && ('\0' != (*ptr++ = *str))) -+ str++; -+ -+ /* If i >= 0 then *str == '\0' and if i == 0 there is nothing to fill. */ -+ if (i > 0) -+ { /* We are done - fill it with 0. */ -+ do -+ *ptr++ = '\0'; -+ while (--i > 0); -+ } -+ else if (*str) -+ { /* If more to write. */ -+ type |= A_LNAM; -+ bfd_put_16 (abfd, type, sym.a_type); -+ i = sizeof sym; -+ } -+ -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ -+ if (i > 0) -+ { -+ ptr = more_name; -+ i = sizeof more_name; -+ while (--i >= 0 && ('\0' != (*ptr++ = *str))) -+ str++; -+ -+ if (bfd_bwrite (more_name, sizeof more_name, abfd) -+ != sizeof more_name) -+ return -1; -+ written_bytes += sizeof more_name; -+ } -+ -+ return written_bytes; -+} -+ -+/* Emit a traditional DRI symbol table while linking. -+ Most of this code come from aout_link_write_symbols() in aoutx.h. */ -+ -+static bfd_boolean -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info) -+{ -+ bfd *input_bfd; -+ enum bfd_link_strip strip = info->strip; -+ enum bfd_link_discard discard = info->discard; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd *last_archive = NULL; -+ -+ /* Position file pointer. */ -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) -+ return FALSE; -+ -+ myinfo->symtab_size = 0; -+ -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next) -+ { -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd); -+ struct external_nlist *sym_end = sym + sym_count; -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd); -+ bfd_boolean pass = FALSE; -+ bfd_boolean skip = FALSE; -+ bfd_boolean skip_next = FALSE; -+ int written_bytes; -+ int a_type; -+ bfd_boolean write_archive_name = FALSE; -+ bfd_vma val = 0; -+ -+ /* First write out a symbol for the archive if we do not -+ strip these symbols and if it differs from the last -+ one. */ -+ if (input_bfd->my_archive != last_archive -+ && input_bfd->my_archive != NULL) -+ { -+ write_archive_name = TRUE; -+ last_archive = input_bfd->my_archive; -+ } -+ -+ if (write_archive_name -+ && strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, -+ input_bfd->my_archive->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, -+ input_bfd->my_archive->filename, -+ A_TFILE, val); -+ -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->symtab_size += written_bytes; -+ } -+ -+ /* Now write out a symbol for the object file if we do not -+ strip these symbols. */ -+ if (strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename, -+ A_TFILE, val); -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->symtab_size += written_bytes; -+ } -+ -+ /* Now we have a problem. All symbols that we see have already -+ been marked written (because we write them a second time -+ here. If we would do it the clean way we would have -+ to traverse the entire symbol map and reset the written -+ flag. We hack here instead... */ -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1) -+#define is_written(h) ((int) h->written == (int) TRUE + 1) -+ for (; sym < sym_end; sym++, sym_hash++) -+ { -+ const char *name; -+ int type; -+ struct aout_link_hash_entry *h; -+ asection *symsec; -+ val = 0; -+ -+ type = H_GET_8 (input_bfd, sym->e_type); -+ name = strings + GET_WORD (input_bfd, sym->e_strx); -+ -+ h = NULL; -+ -+ if (pass) -+ { -+ /* Pass this symbol through. It is the target of an -+ indirect or warning symbol. */ -+ val = GET_WORD (input_bfd, sym->e_value); -+ pass = FALSE; -+ } -+ else if (skip_next) -+ { -+ /* Skip this symbol, which is the target of an indirect -+ symbol that we have changed to no longer be an indirect -+ symbol. */ -+ skip_next = FALSE; -+ continue; -+ } -+ else -+ { -+ struct aout_link_hash_entry *hresolve = *sym_hash; -+ -+ /* We have saved the hash table entry for this symbol, if -+ there is one. Note that we could just look it up again -+ in the hash table, provided we first check that it is an -+ external symbol. */ -+ h = *sym_hash; -+ -+ /* Use the name from the hash table, in case the symbol was -+ wrapped. */ -+ if (h != NULL -+ && h->root.type != bfd_link_hash_warning) -+ name = h->root.root.string; -+ -+ /* If this is an indirect or warning symbol, then change -+ hresolve to the base symbol. */ -+ hresolve = h; -+ if (h != (struct aout_link_hash_entry *) NULL -+ && (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning)) -+ { -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link; -+ while (hresolve->root.type == bfd_link_hash_indirect -+ || hresolve->root.type == bfd_link_hash_warning) -+ hresolve = ((struct aout_link_hash_entry*) -+ hresolve->root.u.i.link); -+ } -+ -+ /* If the symbol has already been written out skip it. */ -+ if (h != NULL -+ && is_written (h)) -+ { -+ if ((type & N_TYPE) == N_INDR -+ || type == N_WARNING) -+ skip_next = TRUE; -+ continue; -+ } -+ -+ /* See if we are stripping this symbol. */ -+ skip = FALSE; -+ -+ /* Skip all debugger symbols. No way to output them in -+ DRI format. This will also reduce a lot of headaches. */ -+ if ((type & N_STAB) != 0) -+ skip = TRUE; -+ -+ switch (strip) -+ { -+ case strip_none: -+ case strip_debugger: -+ break; -+ case strip_some: -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) -+ == NULL) -+ skip = TRUE; -+ break; -+ case strip_all: -+ skip = TRUE; -+ break; -+ } -+ -+ if (skip) -+ { -+ if (h != NULL) -+ mark_written (h); -+ continue; -+ } -+ -+ /* Get the value of the symbol. */ -+ if ((type & N_TYPE) == N_TEXT -+ || type == N_WEAKT) -+ symsec = obj_textsec (input_bfd); -+ else if ((type & N_TYPE) == N_DATA -+ || type == N_WEAKD) -+ symsec = obj_datasec (input_bfd); -+ else if ((type & N_TYPE) == N_BSS -+ || type == N_WEAKB) -+ symsec = obj_bsssec (input_bfd); -+ else if ((type & N_TYPE) == N_ABS -+ || type == N_WEAKA) -+ symsec = bfd_abs_section_ptr; -+ else if (((type & N_TYPE) == N_INDR -+ && (hresolve == NULL -+ || (hresolve->root.type != bfd_link_hash_defined -+ && hresolve->root.type != bfd_link_hash_defweak -+ && hresolve->root.type != bfd_link_hash_common))) -+ || type == N_WARNING) -+ { -+ /* Pass the next symbol through unchanged. The -+ condition above for indirect symbols is so that if -+ the indirect symbol was defined, we output it with -+ the correct definition so the debugger will -+ understand it. */ -+ pass = TRUE; -+ val = GET_WORD (input_bfd, sym->e_value); -+ symsec = NULL; -+ } -+ else -+ { -+ /* If we get here with an indirect symbol, it means that -+ we are outputting it with a real definition. In such -+ a case we do not want to output the next symbol, -+ which is the target of the indirection. */ -+ if ((type & N_TYPE) == N_INDR) -+ skip_next = TRUE; -+ -+ symsec = NULL; -+ -+ /* We need to get the value from the hash table. We use -+ hresolve so that if we have defined an indirect -+ symbol we output the final definition. */ -+ if (h == NULL) -+ { -+ switch (type & N_TYPE) -+ { -+ case N_SETT: -+ symsec = obj_textsec (input_bfd); -+ break; -+ case N_SETD: -+ symsec = obj_datasec (input_bfd); -+ break; -+ case N_SETB: -+ symsec = obj_bsssec (input_bfd); -+ break; -+ case N_SETA: -+ symsec = bfd_abs_section_ptr; -+ break; -+ default: -+ val = 0; -+ break; -+ } -+ } -+ else if (hresolve->root.type == bfd_link_hash_defined -+ || hresolve->root.type == bfd_link_hash_defweak) -+ { -+ asection *input_section; -+ asection *output_section; -+ -+ /* This case usually means a common symbol which was -+ turned into a defined symbol. */ -+ input_section = hresolve->root.u.def.section; -+ output_section = input_section->output_section; -+ BFD_ASSERT (bfd_is_abs_section (output_section) -+ || output_section->owner == abfd); -+ -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (hresolve->root.u.def.value -+ /*+ bfd_get_section_vma (abfd, output_section)*/ -+ + input_section->output_offset); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (output_section == obj_textsec (abfd)) -+ val += TEXT_START_ADDR; -+ -+ /* Get the correct type based on the section. If -+ this is a constructed set, force it to be -+ globally visible. */ -+ if (type == N_SETT -+ || type == N_SETD -+ || type == N_SETB -+ || type == N_SETA) -+ type |= N_EXT; -+ -+ type &=~ N_TYPE; -+ -+ if (output_section == obj_textsec (abfd)) -+ type |= N_TEXT; -+ else if (output_section == obj_datasec (abfd)) -+ type |= N_DATA; -+ else if (output_section == obj_bsssec (abfd)) -+ type |= N_BSS; -+ else -+ type |= N_ABS; -+ } -+ else if (hresolve->root.type == bfd_link_hash_common) -+ val = hresolve->root.u.c.size; -+ else if (hresolve->root.type == bfd_link_hash_undefweak) -+ { -+ val = 0; -+ type = N_UNDF; -+ } -+ else -+ val = 0; -+ } -+ if (symsec != NULL) -+ { -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (/*symsec->output_section->vma -+ +*/ symsec->output_offset -+ + (GET_WORD (input_bfd, sym->e_value) -+ - symsec->vma)); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (symsec == obj_textsec (input_bfd)) -+ val += TEXT_START_ADDR; -+ } -+ -+ /* If this is a global symbol set the written flag, and if -+ it is a local symbol see if we should discard it. */ -+ if (h != NULL) -+ { -+ mark_written (h); -+ } -+ else if ((type & N_TYPE) != N_SETT -+ && (type & N_TYPE) != N_SETD -+ && (type & N_TYPE) != N_SETB -+ && (type & N_TYPE) != N_SETA) -+ { -+ switch (discard) -+ { -+ case discard_none: -+ case discard_sec_merge: -+ break; -+ case discard_l: -+ if (bfd_is_local_label_name (input_bfd, name)) -+ skip = TRUE; -+ break; -+ default: -+ case discard_all: -+ skip = TRUE; -+ break; -+ } -+ if (skip) -+ { -+ pass = FALSE; -+ continue; -+ } -+ } -+ } -+ -+ /* Now find the nearest type in DRI format. */ -+ switch (type) -+ { -+ case N_ABS: -+ case N_ABS | N_EXT: -+ case N_SETA: -+ case N_SETA | N_EXT: -+ case N_WEAKA: -+ a_type = A_EQU | A_DEF | A_GLOBL; -+ break; -+ case N_TEXT: -+ case N_TEXT | N_EXT: -+ case N_SETT: -+ case N_SETT | N_EXT: -+ case N_WEAKT: -+ a_type = A_TEXT | A_DEF | A_GLOBL; -+ break; -+ case N_DATA: -+ case N_DATA | N_EXT: -+ case N_SETD: -+ case N_SETD | N_EXT: -+ case N_WEAKD: -+ a_type = A_DATA | A_DEF | A_GLOBL; -+ break; -+ case N_BSS: -+ case N_BSS | N_EXT: -+ case N_SETB: -+ case N_SETB | N_EXT: -+ case N_WEAKB: -+ a_type = A_BSS | A_DEF | A_GLOBL; -+ break; -+ default: -+ continue; -+ } -+ -+ written_bytes = write_dri_symbol (abfd, name, a_type, val); -+ if (written_bytes < 0) -+ return FALSE; -+ -+ myinfo->symtab_size += written_bytes; -+ } -+ } -+ -+ obj_aout_external_string_size (abfd) = 0; -+ return TRUE; -+} -+ -+/* This is used for qsort to sort addresses -+ for the TPA relocation table. */ -+ -+static int -+vma_cmp (const void *v1, const void *v2) -+{ -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2))); -+} -+ -+/* Alloc and fill the TPA relocation table. */ -+ -+static bfd_boolean -+fill_tparel (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ unsigned long i; -+ bfd_size_type bytes; -+ unsigned char *ptr; -+ -+ /* Sort the relocation info. */ -+ if (myinfo->relocs != NULL) -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma), -+ vma_cmp); -+ -+ /* Now calculate the number of bytes we need. The relocation info -+ is encoded as follows: The first entry is a 32-bit value -+ denoting the first offset to relocate. All following entries -+ are relative to the preceding one. For relative offsets of -+ more than 254 bytes a value of 1 is used. The OS will then -+ add 254 bytes to the current offset. The list is then terminated -+ with the byte 0. */ -+ bytes = 4; /* First entry is a long. */ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ BFD_ASSERT(diff > 0); -+ bytes += (diff + 253) / 254; -+ } -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */ -+ if (myinfo->relocs_used > 0) -+ bytes++; -+ -+ myinfo->tparel_size = bytes; -+ myinfo->tparel = bfd_alloc (abfd, bytes); -+ if (myinfo->tparel == NULL) -+ return FALSE; -+ -+ /* Now fill the array. */ -+ ptr = (bfd_byte*) myinfo->tparel; -+ if (myinfo->relocs != NULL) -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr); -+ else -+ bfd_put_32 (abfd, 0, ptr); -+ ptr += 4; -+ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ while (diff > 254) -+ { -+ *ptr++ = 1; -+ diff -= 254; -+ } -+ *ptr++ = (bfd_byte) diff; -+ } -+ -+ if (myinfo->relocs_used > 0) -+ *ptr = 0; -+ -+ return TRUE; -+} -+ -+/* Final link routine. We need to use a call back to get the correct -+ offsets in the output file. And we need to malloc some internal -+ buffers. */ -+ -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link -+ -+static bfd_boolean -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ struct bfd_link_hash_table *hash = info->hash; -+ enum bfd_link_strip original_strip = info->strip; -+ -+ if (myinfo == NULL) -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info)); -+ -+ if (myinfo == NULL) -+ { -+ /* The internal function bfd_zalloc has already set the error -+ state to "out of memory". */ -+ return FALSE; -+ } -+ -+ obj_aout_ext (abfd) = myinfo; -+ -+ myinfo->linkinfo = info; -+ -+ /* Make sure that for now we never write zmagics. */ -+ abfd->flags &= ~D_PAGED; -+ -+ /* Find the __stksize symbol. This symbol is used for a MiNT -+ special kludge. The libc defines this symbol in an object file -+ initialized to a default value to make sure it is defined in -+ every output file. The start-up code in crtinit() then simply -+ sets the stacksize accordingly. In your programs (if they need -+ an unusual stacksize) you can then simply code: -+ -+ long _stksize = 0x2000; -+ -+ This will create a program stack of 2k. Since MiNT cannot detect -+ a stack overflow this is the only way to prevent program crashes -+ caused by a stack that is too small. -+ -+ The ancient linker ignored this feature, the ancient strip -+ program paid heed to it. By default, strip never stripped this -+ special symbol from the binary. -+ -+ Another program called ``printstk'' and its colleague ``fixstk'' -+ could be used to either print the current value of the stacksize -+ or to modify it without recompiling and rebuilding. These -+ programs traversed the symbol table and then took the appropriate -+ measures if the symbol was found. -+ -+ Here we do a different approach. Since we already expanded the -+ standard executable header we now hardcode the address (as a file -+ offset) that the __stksize symbol points to into the header. We -+ can now let strip safely remove the entry from the symbol table -+ and we're not dependent on a special format of the symbol table. -+ Because the address is kept in the header we will always be able -+ to manipulate the stacksize value later. */ -+ if (hash != NULL) -+ { -+ struct aout_link_hash_entry *h = -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize", -+ FALSE, FALSE, FALSE); -+ asection *sec; -+ -+ if (h != NULL) -+ { -+ switch (h->root.type) -+ { -+ case bfd_link_hash_defined: -+ case bfd_link_hash_defweak: -+ sec = h->root.u.def.section->output_section; -+ BFD_ASSERT (bfd_is_abs_section (sec) -+ || sec->owner == abfd); -+ -+ myinfo->stkpos = (h->root.u.def.value + sec->vma -+ + h->root.u.def.section->output_offset -+ + 0x1c); -+ break; -+ case bfd_link_hash_common: -+ myinfo->stkpos = h->root.u.c.size + 0x1c; -+ break; -+ default: /* Ignore other types. */ -+ break; -+ } -+ } -+ } -+ -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ if (info->relocatable) -+ { -+ _bfd_error_handler ("warning: traditional format not supported for relocatable output"); -+ } -+ else -+ { -+ myinfo->traditional_format = TRUE; -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI; -+ } -+ } -+ -+ /* Unconditionally unset the traditional flag. The only effect in -+ the a.out code is to disable string hashing (with respect to -+ SunOS gdx). This is not necessary for us. */ -+ -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT; -+ -+ /* Do not write GNU symbols in traditional format. */ -+ if (myinfo->traditional_format) -+ info->strip = strip_all; -+ -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback) -+ != TRUE) -+ return FALSE; -+ -+ if (myinfo->reloc_error) -+ return FALSE; -+ -+ /* Restore the strip status for the traditional symbols. */ -+ info->strip = original_strip; -+ -+ if (myinfo->traditional_format -+ && link_write_traditional_syms (abfd, info) != TRUE) -+ return FALSE; -+ -+ if (fill_tparel (abfd) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Copy backend specific data from one object module to another. */ -+ -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *input_bfd, bfd *output_bfd) -+{ -+ /* Our routine only makes sense if both the input and the output -+ bfd are MiNT program files. FIXME: It is not absolutely clear -+ to me if this function is a method of the input or the output -+ bfd. One part of the following AND relation is not redundant, -+ but which one? */ -+ if (input_bfd->xvec == &m68kmint_prg_vec && output_bfd->xvec == &m68kmint_prg_vec) -+ { -+ struct mint_internal_info *myinfo_in = obj_aout_ext (input_bfd); -+ struct mint_internal_info *myinfo_out = obj_aout_ext (output_bfd); -+ -+ BFD_ASSERT (myinfo_in != NULL); -+ -+ if (myinfo_out == NULL) -+ { -+ myinfo_out = bfd_zalloc (output_bfd, sizeof (struct mint_internal_info)); -+ -+ if (myinfo_out == NULL) -+ { -+ /* The internal function bfd_zalloc has already set the error -+ state to "out of memory". */ -+ return FALSE; -+ } -+ -+ memcpy (myinfo_out, myinfo_in, sizeof (struct mint_internal_info)); -+ myinfo_out->tparel = NULL; -+ obj_aout_ext (output_bfd) = myinfo_out; -+ } -+ -+ if (myinfo_out->tparel != NULL) -+ free (myinfo_out->tparel); -+ -+ if (myinfo_in->tparel != NULL) -+ { -+ if (bfd_seek (input_bfd, myinfo_in->tparel_pos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bread (myinfo_in->tparel, myinfo_in->tparel_size, input_bfd) -+ != myinfo_in->tparel_size) -+ return FALSE; -+ } -+ myinfo_out->tparel = bfd_alloc (output_bfd, myinfo_out->tparel_size); -+ if (myinfo_out->tparel == NULL) -+ return FALSE; -+ -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, -+ myinfo_out->tparel_size); -+ } -+ else if (input_bfd->xvec != &m68kmint_prg_vec) -+ { -+ /* Can this ever happen? FIXME! */ -+ _bfd_error_handler ("error: the input file ``%s'' contains no", input_bfd->filename); -+ _bfd_error_handler ("TPA-relative relocation info."); -+ -+ /* We will invalidate the output file so that no attempt is -+ made to actually run the image. Maybe we should return -+ FALSE instead but it is possible that some curious soul has -+ tried to objcopy onto our format for research reasons. */ -+ _bfd_error_handler ("Will mark output file ``%s''"); -+ _bfd_error_handler ("as non-executable."); -+ output_bfd->flags &= (~EXEC_P); -+ } -+ -+ return TRUE; /*_bfd_generic_bfd_copy_private_bfd_data (input_bfd, output_bfd);*/ -+} -+ -+/* Find out the symbol name. */ -+ -+static const char * -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd, -+ bfd_byte *location, struct reloc_std_external *rel) -+{ -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct aout_link_hash_entry **sym_hashes -+ = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = NULL; -+ const char *name; -+ bfd_size_type r_index; -+ int r_extern; -+ -+ if (bfd_get_reloc_size (howto) != 4) -+ return "(not a symbol)"; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+ if (sym_hashes != NULL) -+ h = sym_hashes[r_index]; -+ -+ if (!r_extern) -+ { -+ bfd_size_type i; -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location); -+ -+ name = NULL; -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++) -+ { -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value); -+ -+ if (this_value == wanted_value) -+ { -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type); -+ -+ /* Skip debug symbols and the like. */ -+ if ((symtype & N_STAB) != 0) -+ continue; -+ -+ /* This is dirty but preferable to a plethoria of -+ single comparisons. */ -+ if (symtype <= (N_BSS | N_EXT) -+ || (symtype >= N_WEAKU && symtype <= N_COMM)) -+ { -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx); -+ break; -+ } -+ } -+ } -+ -+ /* FIXME: If the relocation is against a section there is -+ probably a symbol for that section floating around somewhere -+ in the bfd jungle. */ -+ if (name == NULL) -+ { -+ switch ((r_index & N_TYPE) & ~N_EXT) -+ { -+ case N_TEXT: -+ name = "text section"; -+ break; -+ case N_DATA: -+ name = "data section"; -+ break; -+ case N_BSS: -+ name = "bss section"; -+ break; -+ case N_ABS: -+ name = "absolute section"; -+ break; -+ default: -+ name = "unknown section"; -+ break; -+ } -+ } -+ } -+ else if (h != NULL) -+ name = h->root.root.string; -+ else if (r_index >= obj_aout_external_sym_count (input_bfd)) -+ name = "(unknown symbol)"; /* Shouldn't happen. */ -+ else -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); -+ -+ return name; -+} -+ -+/* This relocation routine is used by some of the backend linkers. -+ They do not construct asymbol or arelent structures, so there is no -+ reason for them to use bfd_perform_relocation. Also, -+ bfd_perform_relocation is so hacked up it is easier to write a new -+ function than to try to deal with it. -+ -+ This routine does a final relocation. Whether it is useful for a -+ relocatable link depends upon how the object format defines -+ relocations. -+ -+ FIXME: This routine ignores any special_function in the HOWTO, -+ since the existing special_function values have been written for -+ bfd_perform_relocation. -+ -+ HOWTO is the reloc howto information. -+ INPUT_BFD is the BFD which the reloc applies to. -+ INPUT_SECTION is the section which the reloc applies to. -+ CONTENTS is the contents of the section. -+ ADDRESS is the address of the reloc within INPUT_SECTION. -+ VALUE is the value of the symbol the reloc refers to. -+ ADDEND is the addend of the reloc. */ -+ -+/* The additional parameter REL is specific to this backend. -+ This function is derived from _bfd_final_link_relocate() -+ found in reloc.c. It adds additional checking for dangerous -+ relocations in MiNT sharable text sections, then it records -+ the relocated offset in myinfo->relocs[] for further processing. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel) -+{ -+ bfd_vma relocation; -+ bfd *output_bfd = input_section->output_section->owner; -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd); -+ bfd_reloc_status_type retval; -+ int r_index; -+ int r_extern; -+ bfd_boolean need_tpa_relocation; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+#define _MINT_F_SHTEXT 0x800 -+ -+ /* Sanity check the address. */ -+ if (address > bfd_get_section_limit (input_bfd, input_section)) -+ return bfd_reloc_outofrange; -+ -+ /* This function assumes that we are dealing with a basic relocation -+ against a symbol. We want to compute the value of the symbol to -+ relocate to. This is just VALUE, the value of the symbol, plus -+ ADDEND, any addend associated with the reloc. */ -+ relocation = value + addend; -+ -+ /* Check for dangerous relocations in images with a sharable -+ text section. */ -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0 -+ && bfd_get_reloc_size (howto) == 4) -+ { -+ bfd_boolean error_found = FALSE; -+ const char *name = NULL; -+ -+ if (input_section == obj_textsec (input_bfd)) -+ { -+ if (!r_extern) -+ { -+ /* This is a relocation against another section. Only -+ relocations against the text section are allowed. */ -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT)) -+ error_found = TRUE; -+ } -+ else if (relocation > (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ error_found = TRUE; -+ } -+ else if (relocation == (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ if (strcmp (name, "_etext") == 0) -+ error_found = FALSE; -+ } -+ } -+ -+ if (error_found) -+ { -+ const struct bfd_link_callbacks *callbacks -+ = myinfo->linkinfo->callbacks; -+ -+ myinfo->reloc_error = TRUE; -+ -+ if (callbacks->reloc_dangerous != NULL) -+ { -+ if (name == NULL) -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ -+ callbacks->reloc_dangerous (myinfo->linkinfo, name, -+ input_bfd, -+ input_section, address); -+ } -+ } -+ } -+ -+ /* If the relocation is PC relative, we want to set RELOCATION to -+ the distance between the symbol (currently in RELOCATION) and the -+ location we are relocating. Some targets (e.g., i386-aout) -+ arrange for the contents of the section to be the negative of the -+ offset of the location within the section; for such targets -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF) -+ simply leave the contents of the section as zero; for such -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not -+ need to subtract out the offset of the location within the -+ section (which is just ADDRESS). */ -+ if (howto->pc_relative) -+ { -+ relocation -= (input_section->output_section->vma -+ + input_section->output_offset); -+ if (howto->pcrel_offset) -+ relocation -= address; -+ } -+ -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation, -+ contents + address); -+ -+ /* The symbol has to be relocated again iff the length of the relocation -+ is 2 words and it is not pc relative. */ -+ need_tpa_relocation = FALSE; -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4) -+ { -+ if (r_extern) -+ { -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = sym_hashes[r_index]; -+ asection *output_section = h->root.u.def.section->output_section; -+ -+ /* Do not relocate absolute symbols. */ -+ if (output_section == obj_textsec (output_bfd) -+ || output_section == obj_datasec (output_bfd) -+ || output_section == obj_bsssec (output_bfd)) -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ else -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ -+ /* Here we add the TPA relocation entries for the address references -+ located inside the input sections. Note that if some references -+ to addresses are generated using data statements in the linker -+ script, they will not be relocated here because they do not -+ belong to any input section. */ -+ if (need_tpa_relocation) -+ { -+ bfd_vma tpa_address = input_section->output_section->vma -+ + input_section->output_offset + address; -+ -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address)) -+ return bfd_reloc_other; -+ } -+ -+ return retval; -+} -+ -+/* Write out the TPA relocation table. */ -+ -+static bfd_boolean -+write_tparel (bfd *abfd, struct internal_exec *execp) -+{ -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo->symtab_size == 0) -+ myinfo->tparel_pos = N_STROFF (*execp) -+ + obj_aout_external_string_size (abfd); -+ else -+ myinfo->tparel_pos = N_SYMOFF (*execp) -+ + myinfo->symtab_size; -+ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Write the full exec header. -+ This function must be called last to ensure that we have all the -+ information needed to fill the MiNT-specific header fields. */ -+ -+static bfd_boolean -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ -+ if ((abfd->flags & EXEC_P) == 0) -+ bfd_h_put_16 (abfd, 0xdead, exec_bytes->g_branch); -+ else -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch); -+ -+ /* The OS will load our extension header fields into the text segment. */ -+ PUT_WORD (abfd, execp->a_text + EXEC_BYTES_SIZE - 28, -+ exec_bytes->g_text); -+ PUT_WORD (abfd, execp->a_data, exec_bytes->g_data); -+ PUT_WORD (abfd, execp->a_bss, exec_bytes->g_bss); -+ -+ /* The OS' notion of the size of the symbol table is another than -+ the bfd library's. We have to fill in the size of the table -+ itself plus the size of the string table but only if we have not written -+ a traditional symbol table. If we have written a traditional symbol -+ table we know the size. */ -+ if (myinfo->symtab_size != 0) -+ PUT_WORD (abfd, myinfo->symtab_size, exec_bytes->g_syms); -+ else -+ PUT_WORD (abfd, myinfo->tparel_pos - N_SYMOFF (*execp), -+ exec_bytes->g_syms); -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic); -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags); -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs); -+ -+ /* Generate the jump instruction to the entry point. In m68k -+ assembler mnemnonics it looks more or less like this: -+ -+ move.l exec_bytes->e_entry(pc),d0 -+ jmp -6(pc,d0.l) -+ -+ Sorry for the wrong syntax. As a real assembler addict I -+ never actually use an assembler. I edit my binaries manually -+ with a hex editor, looks much cooler and it strengthens your -+ abstraction abilities. */ -+ -+ exec_bytes->g_jump_entry[0] = 0x20; -+ exec_bytes->g_jump_entry[1] = 0x3a; -+ exec_bytes->g_jump_entry[2] = 0x00; -+ exec_bytes->g_jump_entry[3] = 0x1a; -+ exec_bytes->g_jump_entry[4] = 0x4e; -+ exec_bytes->g_jump_entry[5] = 0xfb; -+ exec_bytes->g_jump_entry[6] = 0x08; -+ exec_bytes->g_jump_entry[7] = 0xfa; -+ -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos); -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size); -+ -+ PUT_WORD (abfd, myinfo->stkpos, exec_bytes->g_stkpos); -+ PUT_WORD (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format); -+ -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0)); -+ -+ /* The standard stuff. */ -+ NAME(aout,swap_exec_header_out) (abfd, execp, exec_bytes); -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU) -+ PUT_WORD (abfd, 0, exec_bytes->e_syms); -+ -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd) -+ != EXEC_BYTES_SIZE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Write an object file. -+ Section contents have already been written. We write the -+ file header, symbols, and relocation. */ -+ -+#define MY_write_object_contents m68kmint_prg_write_object_contents -+ -+static bfd_boolean -+m68kmint_prg_write_object_contents (bfd *abfd) -+{ -+ struct external_exec exec_bytes; -+ struct internal_exec *execp = exec_hdr (abfd); -+ bfd_size_type text_size; -+ file_ptr text_end; -+ -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; -+ -+ /* Most of the following code come from the WRITE_HEADERS macro -+ found in libaout.h. */ -+ -+ if (adata(abfd).magic == undecided_magic) -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); -+ -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; -+ execp->a_entry = bfd_get_start_address (abfd); -+ -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ -+ /* Now write out reloc info, followed by syms and strings. */ -+ -+ if (bfd_get_outsymbols (abfd) != NULL -+ && bfd_get_symcount (abfd) != 0) -+ { -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0) -+ return FALSE; -+ -+ if (! NAME (aout, write_syms) (abfd)) -+ return FALSE; -+ } -+ -+ if (write_tparel (abfd, execp) != TRUE) -+ return FALSE; -+ -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE) -+ return FALSE; -+ -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) -+ return FALSE; -+ -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+#include "aout-target.h" -+ -+/* Set the executable flags. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ -+ BFD_ASSERT(abfd != NULL && abfd->xvec == &m68kmint_prg_vec); -+ -+ if (myinfo == NULL) -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info)); -+ -+ if (myinfo == NULL) -+ { -+ /* The internal function bfd_zalloc has already set the error -+ state to "out of memory". */ -+ return FALSE; -+ } -+ -+ obj_aout_ext (abfd) = myinfo; -+ -+ myinfo->prg_flags = prg_flags; -+ -+ return TRUE; -+} -+ -+/* Add a TPA relocation entry. -+ It is called by BFD when linking the input sections, and by the -+ linker when it generates a reference to an address (in particular, -+ when building the constructors list). */ -+ -+bfd_boolean -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd != NULL && abfd->xvec == &m68kmint_prg_vec); -+ -+ /* Ensure that myinfo is set up. */ -+ myinfo = obj_aout_ext (abfd); -+ if (myinfo == NULL) -+ { -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info)); -+ if (myinfo == NULL) -+ return FALSE; -+ -+ obj_aout_ext (abfd) = myinfo; -+ } -+ -+ /* Enlarge the buffer if necessary. */ -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated) -+ { -+ bfd_vma *newbuf; -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE; -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated); -+ if (newbuf == NULL) -+ return FALSE; -+ -+ myinfo->relocs = newbuf; -+ } -+ -+ /* The TPA relative relocation actually just adds the address of -+ the text segment (i. e. beginning of the executable in memory) -+ to the addresses at the specified locations. This allows an -+ executable to be loaded everywhere in the address space without -+ memory management. */ -+ myinfo->relocs[myinfo->relocs_used++] = address; -+ -+ return TRUE; -+} -diff -aurN binutils-2.18/bfd/targets.c binutils-2.18-mint-20080228/bfd/targets.c ---- binutils-2.18/bfd/targets.c 2007-08-06 21:59:42.000000000 +0200 -+++ binutils-2.18-mint-20080228/bfd/targets.c 2008-02-28 09:47:00.062500000 +0100 -@@ -731,6 +731,7 @@ - extern const bfd_target m68kcoff_vec; - extern const bfd_target m68kcoffun_vec; - extern const bfd_target m68klinux_vec; -+extern const bfd_target m68kmint_prg_vec; - extern const bfd_target m68knetbsd_vec; - extern const bfd_target m68ksysvcoff_vec; - extern const bfd_target m88kbcs_vec; -diff -aurN binutils-2.18/binutils/configure binutils-2.18-mint-20080228/binutils/configure ---- binutils-2.18/binutils/configure 2007-08-06 22:29:42.000000000 +0200 -+++ binutils-2.18-mint-20080228/binutils/configure 2008-02-28 09:47:00.312500000 +0100 -@@ -13459,7 +13459,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - cat >>confdefs.h <<\_ACEOF - #define USE_BINARY_FOPEN 1 -diff -aurN binutils-2.18/binutils/dlltool.c binutils-2.18-mint-20080228/binutils/dlltool.c ---- binutils-2.18/binutils/dlltool.c 2007-08-06 21:55:10.000000000 +0200 -+++ binutils-2.18-mint-20080228/binutils/dlltool.c 2008-02-28 09:47:00.328125000 +0100 -@@ -3520,7 +3520,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.18/binutils/dllwrap.c binutils-2.18-mint-20080228/binutils/dllwrap.c ---- binutils-2.18/binutils/dllwrap.c 2007-08-06 21:55:10.000000000 +0200 -+++ binutils-2.18-mint-20080228/binutils/dllwrap.c 2008-02-28 09:47:00.328125000 +0100 -@@ -251,7 +251,7 @@ - dash = cp; - - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.18/binutils/resrc.c binutils-2.18-mint-20080228/binutils/resrc.c ---- binutils-2.18/binutils/resrc.c 2007-08-06 21:56:14.000000000 +0200 -+++ binutils-2.18-mint-20080228/binutils/resrc.c 2008-02-28 09:47:00.328125000 +0100 -@@ -396,7 +396,7 @@ - *space = 0; - - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__) - strchr (cmd, '\\') || - #endif - strchr (cmd, '/')) -@@ -507,7 +507,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.18/gas/config/tc-m68k.c binutils-2.18-mint-20080228/gas/config/tc-m68k.c ---- binutils-2.18/gas/config/tc-m68k.c 2007-08-06 22:00:00.000000000 +0200 -+++ binutils-2.18-mint-20080228/gas/config/tc-m68k.c 2008-02-28 09:47:00.781250000 +0100 -@@ -799,7 +799,7 @@ - {"even", s_even, 0}, - {"skip", s_space, 0}, - {"proc", s_proc, 0}, --#if defined (TE_SUN3) || defined (OBJ_ELF) -+#if defined (TE_SUN3) || defined (TE_MINT) || defined (OBJ_ELF) - {"align", s_align_bytes, 0}, - #endif - #ifdef OBJ_ELF -diff -aurN binutils-2.18/gas/config/te-mint.h binutils-2.18-mint-20080228/gas/config/te-mint.h ---- binutils-2.18/gas/config/te-mint.h 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.18-mint-20080228/gas/config/te-mint.h 2008-02-28 09:47:00.781250000 +0100 -@@ -0,0 +1,30 @@ -+/* Copyright 2008 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#define TE_MINT -+ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+/* These define interfaces. */ -+#ifdef OBJ_HEADER -+#include OBJ_HEADER -+#else -+#include "obj-format.h" -+#endif -diff -aurN binutils-2.18/gas/configure.tgt binutils-2.18-mint-20080228/gas/configure.tgt ---- binutils-2.18/gas/configure.tgt 2007-08-28 19:19:36.000000000 +0200 -+++ binutils-2.18-mint-20080228/gas/configure.tgt 2008-02-28 09:47:00.796875000 +0100 -@@ -254,6 +254,7 @@ - m68k-*-linux-*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf ;; - m68k-*-gnu*) fmt=elf ;; -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; -diff -aurN binutils-2.18/include/filenames.h binutils-2.18-mint-20080228/include/filenames.h ---- binutils-2.18/include/filenames.h 2007-03-29 23:03:43.000000000 +0200 -+++ binutils-2.18-mint-20080228/include/filenames.h 2008-02-28 09:47:00.796875000 +0100 -@@ -26,7 +26,7 @@ - #ifndef FILENAMES_H - #define FILENAMES_H - --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__) - - #ifndef HAVE_DOS_BASED_FILE_SYSTEM - #define HAVE_DOS_BASED_FILE_SYSTEM 1 -diff -aurN binutils-2.18/include/getopt.h binutils-2.18-mint-20080228/include/getopt.h ---- binutils-2.18/include/getopt.h 2005-05-10 12:21:08.000000000 +0200 -+++ binutils-2.18-mint-20080228/include/getopt.h 2008-02-28 09:47:00.812500000 +0100 -@@ -106,7 +106,7 @@ - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ - #if !HAVE_DECL_GETOPT --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT) - /* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in unistd.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -diff -aurN binutils-2.18/ld/Makefile.am binutils-2.18-mint-20080228/ld/Makefile.am ---- binutils-2.18/ld/Makefile.am 2007-08-06 22:00:17.000000000 +0200 -+++ binutils-2.18-mint-20080228/ld/Makefile.am 2008-02-28 09:47:00.843750000 +0100 -@@ -266,6 +266,7 @@ - em68kelf.o \ - em68kelfnbsd.o \ - em68klinux.o \ -+ em68kmint.o \ - em68knbsd.o \ - em68kpsos.o \ - em88kbcs.o \ -@@ -1194,6 +1195,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -aurN binutils-2.18/ld/Makefile.in binutils-2.18-mint-20080228/ld/Makefile.in ---- binutils-2.18/ld/Makefile.in 2007-08-06 22:29:54.000000000 +0200 -+++ binutils-2.18-mint-20080228/ld/Makefile.in 2008-02-28 09:47:00.859375000 +0100 -@@ -513,6 +513,7 @@ - em68kelf.o \ - em68kelfnbsd.o \ - em68klinux.o \ -+ em68kmint.o \ - em68knbsd.o \ - em68kpsos.o \ - em88kbcs.o \ -@@ -2020,6 +2021,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -aurN binutils-2.18/ld/configure binutils-2.18-mint-20080228/ld/configure ---- binutils-2.18/ld/configure 2007-08-12 20:53:33.000000000 +0200 -+++ binutils-2.18-mint-20080228/ld/configure 2008-02-28 09:47:01.203125000 +0100 -@@ -11885,7 +11885,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - cat >>confdefs.h <<\_ACEOF - #define USE_BINARY_FOPEN 1 -diff -aurN binutils-2.18/ld/configure.tgt binutils-2.18-mint-20080228/ld/configure.tgt ---- binutils-2.18/ld/configure.tgt 2007-08-28 19:19:42.000000000 +0200 -+++ binutils-2.18-mint-20080228/ld/configure.tgt 2008-02-28 09:47:01.203125000 +0100 -@@ -326,6 +326,7 @@ - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; - m68k-*-uclinux*) targ_emul=m68kelf ;; - m68*-*-gnu*) targ_emul=m68kelf ;; -+m68*-*-mint*) targ_emul=m68kmint ;; - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd - targ_extra_emuls="m68knbsd m68kelfnbsd" ;; - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd -diff -aurN binutils-2.18/ld/emulparams/m68kmint.sh binutils-2.18-mint-20080228/ld/emulparams/m68kmint.sh ---- binutils-2.18/ld/emulparams/m68kmint.sh 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.18-mint-20080228/ld/emulparams/m68kmint.sh 2008-02-28 09:47:01.218750000 +0100 -@@ -0,0 +1,5 @@ -+SCRIPT_NAME=m68kmint -+OUTPUT_FORMAT="a.out-mintprg" -+TEXT_START_ADDR=0xe4 -+ARCH=m68k -+EXTRA_EM_FILE=mint -diff -aurN binutils-2.18/ld/emultempl/generic.em binutils-2.18-mint-20080228/ld/emultempl/generic.em ---- binutils-2.18/ld/emultempl/generic.em 2007-08-06 22:00:22.000000000 +0200 -+++ binutils-2.18-mint-20080228/ld/emultempl/generic.em 2008-02-28 09:47:01.218750000 +0100 -@@ -138,8 +138,8 @@ - ${LDEMUL_PLACE_ORPHAN-NULL}, - ${LDEMUL_SET_SYMBOLS-NULL}, - ${LDEMUL_PARSE_ARGS-NULL}, -- NULL, /* add_options */ -- NULL, /* handle_option */ -+ ${LDEMUL_ADD_OPTIONS-NULL}, -+ ${LDEMUL_HANDLE_OPTION-NULL}, - ${LDEMUL_UNRECOGNIZED_FILE-NULL}, - ${LDEMUL_LIST_OPTIONS-NULL}, - ${LDEMUL_RECOGNIZED_FILE-NULL}, -diff -aurN binutils-2.18/ld/emultempl/mint.em binutils-2.18-mint-20080228/ld/emultempl/mint.em ---- binutils-2.18/ld/emultempl/mint.em 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.18-mint-20080228/ld/emultempl/mint.em 2008-02-28 09:47:01.234375000 +0100 -@@ -0,0 +1,294 @@ -+# This shell script emits a C file. -*- C -*- -+# Copyright 2006, 2007 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. -+# -+ -+# This file is sourced from generic.em -+# -+fragment < Set all the flags with an integer raw value\n")); -+} -+ -+/* This callback is called by lang_for_each_statement. It checks that the -+ output sections speficied in the linker script are compatible with the MiNT -+ executable format. */ -+ -+static void -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_output_section_statement_enum) -+ { -+ lang_output_section_statement_type *oss = &s->output_section_statement; -+ -+ ASSERT(oss->processed_vma); -+ -+ if (strcmp(oss->bfd_section->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR}) -+ einfo ("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n", -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma); -+ else if (strcmp(oss->bfd_section->name, ".data") == 0 && oss->addr_tree != NULL) -+ einfo ("%F%P: the VMA of section %A must not be specified\n", -+ oss->bfd_section); -+ else if (strcmp(oss->bfd_section->name, ".bss") == 0 && oss->addr_tree != NULL) -+ einfo ("%F%P: the VMA of section %A must not be specified\n", -+ oss->bfd_section); -+ } -+} -+ -+/* This callback is called by lang_for_each_statement. It looks for the data -+ statements of type REL generated by the linker, and adds a TPA relocation -+ entry for them. This is used by the CONSTRUCTORS list. */ -+ -+static void -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_data_statement_enum) -+ { -+ lang_data_statement_type *ds = &s->data_statement; -+ -+ if (ds->exp->type.node_code == REL) -+ { -+ if (ds->type == LONG) -+ { -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset; -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address)) -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd); -+ } -+ else -+ { -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"), -+ link_info.output_bfd, ds->output_section, ds->output_offset); -+ } -+ } -+ } -+} -+ -+/* Final emulation specific call. */ -+ -+static void -+gld${EMULATION_NAME}_finish (void) -+{ -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */ -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0) -+ return; -+ -+ /* Check the output sections. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections); -+ -+ /* Set the MiNT executable header flags. */ -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags)) -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd); -+ -+ /* Generate TPA relocation entries for the data statements. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs); -+} -+ -+EOF -+ -+# Put these extra routines in ld_${EMULATION_NAME}_emulation -+# -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish -diff -aurN binutils-2.18/ld/scripttempl/m68kmint.sc binutils-2.18-mint-20080228/ld/scripttempl/m68kmint.sc ---- binutils-2.18/ld/scripttempl/m68kmint.sc 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.18-mint-20080228/ld/scripttempl/m68kmint.sc 2008-02-28 09:47:01.250000000 +0100 -@@ -0,0 +1,31 @@ -+cat <sym_ptr_ptr) != NULL - && (sym->flags & BSF_KEEP) == 0 - && ((sym->flags & BSF_SECTION_SYM) == 0 -- || !EMIT_SECTION_SYMBOLS -- || !bfd_is_abs_section (sym->section))) -+ || (EMIT_SECTION_SYMBOLS -+ && !bfd_is_abs_section (sym->section)))) - as_bad_where (file, line, _("redefined symbol cannot be used on reloc")); - - s = bfd_install_relocation (stdoutput, reloc, diff --git a/sys-devel/binutils/files/binutils-2.18.50.0.9-solaris-eh-frame.patch b/sys-devel/binutils/files/binutils-2.18.50.0.9-solaris-eh-frame.patch deleted file mode 100644 index ad7a74a..0000000 --- a/sys-devel/binutils/files/binutils-2.18.50.0.9-solaris-eh-frame.patch +++ /dev/null @@ -1,183 +0,0 @@ -From binutils-return-56479-listarch-binutils=sources dot redhat dot com at sourceware dot org Thu Sep 25 17:25:25 2008 -Return-Path: -Delivered-To: listarch-binutils at sources dot redhat dot com -Received: (qmail 10710 invoked by alias); 25 Sep 2008 17:25:25 -0000 -Received: (qmail 10674 invoked by uid 22791); 25 Sep 2008 17:25:24 -0000 -X-Spam-Check-By: sourceware.org -Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 Sep 2008 17:24:27 +0000 -Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0FCD4290020; Thu, 25 Sep 2008 19:24:24 +0200 (CEST) -Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z8OGQ06LgFhb; Thu, 25 Sep 2008 19:24:21 +0200 (CEST) -Received: from [192.168.1.3] (88-122-74-61.rev.libertysurf.net [88.122.74.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 33DFA290011 for ; Thu, 25 Sep 2008 19:24:21 +0200 (CEST) -From: Eric Botcazou -To: binutils at sourceware dot org -Subject: [PATCH] Fix EH frame problem on Solaris -Date: Thu, 25 Sep 2008 19:25:16 +0200 -User-Agent: KMail/1.9.6 (enterprise 20070904.708012) -MIME-Version: 1.0 -Content-Type: Multipart/Mixed; boundary="Boundary-00=_8l82Iz/Ftp2txSB" -Message-Id: <200809251925.16322.ebotcazou@adacore.com> -Mailing-List: contact binutils-help at sourceware dot org; run by ezmlm -Precedence: bulk -List-Id: -List-Subscribe: -List-Archive: -List-Post: -List-Help: , -Sender: binutils-owner at sourceware dot org -Delivered-To: mailing list binutils at sourceware dot org - - ---Boundary-00=_8l82Iz/Ftp2txSB -Content-Type: text/plain; - charset="us-ascii" -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -EH is broken with GCC mainline on Solaris (both SPARC and x86) if you use the -combination GCC + GAS + Sun ld: FDEs from libgcc_eh.a are not found in the -final executable by the unwinder; therefore it immediately aborts. - -The problem is that the Sun linker doesn't merge read-only and read-write -sections into a single read-write section. This was working fine when GCC -was emitting the EH frame itself because GCC features a configure check, -namely HAVE_LD_RO_RW_SECTION_MIXING, that forces the section to be writable -if it fails. Now GAS is emitting the EH frame, sometimes read-only and -sometimes read-write depending on the relocations, and this breaks. - -Fixed by defining DWARF2_EH_FRAME_READ_ONLY to 0 on Solaris, tested both on -SPARC and x86. OK for mainline and 2.19 branch? - - -2008-09-25 Eric Botcazou - -gas/ - * Makefile.am (TARG_ENV_HFILES): Add config/te-solaris.h. - * Makefile.in (TARG_ENV_HFILES): Likewise. - * configure.tgt (Solaris targets): Set em=solaris. - * config/te-solaris.h: New file. - - --- -Eric Botcazou - ---Boundary-00=_8l82Iz/Ftp2txSB -Content-Type: text/x-diff; - charset="us-ascii"; - name="p.diff" -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; - filename="p.diff" - -? config/te-solaris.h -Index: Makefile.am -=================================================================== -RCS file: /cvs/src/src/gas/Makefile.am,v -retrieving revision 1.159.2.1 -diff -u -r1.159.2.1 Makefile.am ---- Makefile.am 9 Sep 2008 08:02:18 -0000 1.159.2.1 -+++ Makefile.am 25 Sep 2008 14:48:03 -0000 -@@ -406,6 +406,7 @@ - config/te-pe.h \ - config/te-psos.h \ - config/te-riscix.h \ -+ config/te-solaris.h \ - config/te-sparcaout.h \ - config/te-sun3.h \ - config/te-svr4.h \ -Index: Makefile.in -=================================================================== -RCS file: /cvs/src/src/gas/Makefile.in,v -retrieving revision 1.177.2.1 -diff -u -r1.177.2.1 Makefile.in ---- Makefile.in 9 Sep 2008 08:02:18 -0000 1.177.2.1 -+++ Makefile.in 25 Sep 2008 14:48:03 -0000 -@@ -653,6 +653,7 @@ - config/te-pe.h \ - config/te-psos.h \ - config/te-riscix.h \ -+ config/te-solaris.h \ - config/te-sparcaout.h \ - config/te-sun3.h \ - config/te-svr4.h \ -Index: configure.tgt -=================================================================== -RCS file: /cvs/src/src/gas/configure.tgt,v -retrieving revision 1.41 -diff -u -r1.41 configure.tgt ---- configure.tgt 7 Jul 2008 16:43:06 -0000 1.41 -+++ configure.tgt 25 Sep 2008 14:48:03 -0000 -@@ -198,7 +198,7 @@ - i386-*-linux-*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=elf em=lynx ;; - i386-*-sysv[45]*) fmt=elf ;; -- i386-*-solaris*) fmt=elf ;; -+ i386-*-solaris*) fmt=elf em=solaris ;; - i386-*-freebsdaout*) fmt=aout em=386bsd ;; - i386-*-freebsd[12].*) fmt=aout em=386bsd ;; - i386-*-freebsd[12]) fmt=aout em=386bsd ;; -@@ -322,7 +322,7 @@ - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; - ppc-*-linux-*) fmt=elf em=linux ;; -- ppc-*-solaris*) fmt=elf ;; -+ ppc-*-solaris*) fmt=elf em=solaris ;; - ppc-*-rtems*) fmt=elf ;; - ppc-*-macos*) fmt=coff em=macos ;; - ppc-*-nto*) fmt=elf ;; -@@ -362,7 +362,7 @@ - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; - sparc-*-sysv4*) fmt=elf ;; -- sparc-*-solaris*) fmt=elf ;; -+ sparc-*-solaris*) fmt=elf em=solaris ;; - sparc-*-netbsdelf*) fmt=elf em=nbsd ;; - sparc-*-netbsd*) - case ${cpu} in -@@ -408,7 +408,8 @@ - *-*-generic) fmt=generic ;; - *-*-xray | *-*-hms) fmt=coff ;; - *-*-sim) fmt=coff ;; -- *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf ;; -+ *-*-elf | *-*-sysv4*) fmt=elf ;; -+ *-*-solaris*) fmt=elf em=solaris ;; - *-*-aros*) fmt=elf em=linux ;; - *-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;; - *-*-netware) fmt=elf em=netware ;; ---- /dev/null 2007-09-21 21:12:45.000000000 +0200 -+++ config/te-solaris.h 2008-09-25 12:18:57.000000000 +0200 -@@ -0,0 +1,30 @@ -+/* Copyright 2008 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#define TE_SOLARIS -+ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+/* The Sun linker doesn't merge read-only and read-write sections into -+ a single read-write section so we must force all EH frame sections -+ to be read-write. */ -+#define DWARF2_EH_FRAME_READ_ONLY 0 -+ -+#include "obj-format.h" - ---Boundary-00=_8l82Iz/Ftp2txSB-- - diff --git a/sys-devel/binutils/files/binutils-2.19.1-hppa-hpux.patch b/sys-devel/binutils/files/binutils-2.19.1-hppa-hpux.patch deleted file mode 100644 index 8b67f27..0000000 --- a/sys-devel/binutils/files/binutils-2.19.1-hppa-hpux.patch +++ /dev/null @@ -1,444 +0,0 @@ ---- ./bfd/configure.orig 2009-06-10 15:13:14.000000000 +0200 -+++ ./bfd/configure 2009-06-10 15:14:58.000000000 +0200 -@@ -8373,20 +8373,20 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec_ld='+b $libdir' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8400,7 +8400,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8412,7 +8412,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8423,7 +8423,6 @@ - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no -- hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes -@@ -8432,7 +8431,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9307,6 +9306,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./gas/configure.orig 2009-06-10 11:10:54.000000000 +0200 -+++ ./gas/configure 2009-06-10 11:38:05.000000000 +0200 -@@ -8202,20 +8202,20 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec_ld='+b $libdir' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8229,7 +8229,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8241,7 +8241,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8252,7 +8252,6 @@ - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no -- hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes -@@ -8261,7 +8260,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9136,6 +9135,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./opcodes/configure.orig 2009-06-10 11:10:54.000000000 +0200 -+++ ./opcodes/configure 2009-06-10 11:39:06.000000000 +0200 -@@ -8369,12 +8369,12 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - fi - if test "$with_gnu_ld" = no; then -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes -@@ -8382,7 +8382,7 @@ - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8396,7 +8396,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8408,7 +8408,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8419,7 +8419,6 @@ - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no -- hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes -@@ -8428,7 +8427,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9303,6 +9302,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./ld/configure.orig 2009-06-10 11:10:54.000000000 +0200 -+++ ./ld/configure 2009-06-10 11:40:23.000000000 +0200 -@@ -8493,20 +8493,20 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec_ld='+b $libdir' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8520,7 +8520,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8532,7 +8532,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8552,7 +8552,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9427,6 +9427,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./gprof/configure.orig 2009-06-10 11:10:54.000000000 +0200 -+++ ./gprof/configure 2009-06-10 11:41:47.000000000 +0200 -@@ -8293,20 +8293,20 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec_ld='+b $libdir' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8320,7 +8320,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8332,7 +8332,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8343,7 +8343,6 @@ - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no -- hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes -@@ -8352,7 +8351,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9227,6 +9226,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./binutils/configure.orig 2009-06-10 11:10:54.000000000 +0200 -+++ ./binutils/configure 2009-06-10 11:25:22.000000000 +0200 -@@ -8204,20 +8204,20 @@ - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' -+ hardcode_libdir_flag_spec_ld='+b $libdir' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -- hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - fi - ;; - -@@ -8231,7 +8231,7 @@ - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else -@@ -8243,7 +8243,7 @@ - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi -@@ -8254,7 +8254,6 @@ - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no -- hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes -@@ -8263,7 +8262,7 @@ - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi -@@ -9138,6 +9137,9 @@ - ;; - *) - shrext_cmds='.sl' -+ case $host_os in hpux9*) ;; -+ *) hardcode_into_libs=yes ;; -+ esac - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ---- ./config.rpath.orig 2009-06-10 12:16:47.000000000 +0200 -+++ ./config.rpath 2009-06-10 12:17:36.000000000 +0200 -@@ -320,7 +320,7 @@ - hardcode_direct=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -@@ -328,7 +328,7 @@ - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -- hardcode_minus_L=yes -+ hardcode_minus_L=no - ;; - esac - fi diff --git a/sys-devel/binutils/files/binutils-2.19.1-hpux.patch b/sys-devel/binutils/files/binutils-2.19.1-hpux.patch deleted file mode 100644 index 89e50df..0000000 --- a/sys-devel/binutils/files/binutils-2.19.1-hpux.patch +++ /dev/null @@ -1,22 +0,0 @@ -http://sourceware.org/ml/binutils/2008-11/msg00310.html ---- bfd/hpux-core.c.orig 2009-06-09 17:00:47.000000000 +0200 -+++ bfd/hpux-core.c 2009-06-09 17:00:56.000000000 +0200 -@@ -66,7 +66,6 @@ - #ifdef HPUX_CORE - #include - #endif --#include /* After a.out.h */ - #include - - /* Kludge: There's no explicit mechanism provided by sys/core.h to ---- opcodes/configure.orig 2009-06-10 15:55:06.000000000 +0200 -+++ opcodes/configure 2009-06-10 15:55:31.000000000 +0200 -@@ -11757,7 +11757,7 @@ - *) - case "$host_vendor" in - hp) -- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl" -+ SHARED_LIBADD="../bfd/libbfd.la" - ;; - *) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so" diff --git a/sys-devel/binutils/files/binutils-2.19.1-parallel.patch b/sys-devel/binutils/files/binutils-2.19.1-parallel.patch deleted file mode 100644 index f529f9d..0000000 --- a/sys-devel/binutils/files/binutils-2.19.1-parallel.patch +++ /dev/null @@ -1,12 +0,0 @@ -chew is built multiple times in parallel, which may result in: - mv chew.1234 chew: text file busy ---- bfd/doc/Makefile.in.orig 2009-06-09 17:01:42.000000000 +0200 -+++ bfd/doc/Makefile.in 2009-06-09 17:01:51.000000000 +0200 -@@ -12,6 +12,7 @@ - # even the implied warranty of MERCHANTABILITY or FITNESS FOR A - # PARTICULAR PURPOSE. - -+.NOTPARALLEL: - @SET_MAKE@ - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ diff --git a/sys-devel/binutils/files/binutils-2.19.50.0.1-mint.patch b/sys-devel/binutils/files/binutils-2.19.50.0.1-mint.patch deleted file mode 100644 index 419a3b9..0000000 --- a/sys-devel/binutils/files/binutils-2.19.50.0.1-mint.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- opcodes/configure.old 2008-11-03 14:11:02.000000000 +0000 -+++ opcodes/configure 2008-11-03 14:13:42.000000000 +0000 -@@ -5399,7 +5399,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; ---- bfd/configure.old 2008-11-03 17:51:45.000000000 +0000 -+++ bfd/configure 2008-11-03 17:52:00.000000000 +0000 -@@ -5768,7 +5768,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; ---- binutils/configure.old 2008-11-03 19:54:52.000000000 +0000 -+++ binutils/configure 2008-11-03 19:54:54.000000000 +0000 -@@ -5569,7 +5569,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; ---- gas/configure.old 2008-11-13 22:12:31.000000000 +0000 -+++ gas/configure 2008-11-13 22:13:57.000000000 +0000 -@@ -5567,7 +5567,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; ---- gprof/configure.old 2008-11-14 01:06:33.000000000 +0000 -+++ gprof/configure 2008-11-14 01:17:24.000000000 +0000 -@@ -5658,7 +5658,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; ---- ld/configure.old 2008-11-14 01:06:36.000000000 +0000 -+++ ld/configure 2008-11-14 01:16:21.000000000 +0000 -@@ -5858,7 +5858,7 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -- amigaos*) -+ mint* | amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; diff --git a/sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch b/sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch deleted file mode 100644 index 4a2097b..0000000 --- a/sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch +++ /dev/null @@ -1,13 +0,0 @@ -allow building plain x86-linux-ld for x86_64-linux host -with 32bit in /lib32 and 64bit in /lib. ---- ld/emulparams/elf_i386.sh.orig 2009-09-17 15:22:55.485863095 +0200 -+++ ld/emulparams/elf_i386.sh 2009-09-17 15:23:57.944566323 +0200 -@@ -17,7 +17,7 @@ - # In Gentoo, we install 32bit libs into /lib32 in an - # ABI setup with amd64/x86 - case "$target" in -- x86_64*-linux*) -+ x86_64*-linux*|i[34567]86*-linux*) - case "$EMULATION_NAME" in - *i386*) LIBPATH_SUFFIX=32 ;; - esac diff --git a/sys-devel/binutils/files/binutils-2.21.51.0.6-mint.patch b/sys-devel/binutils/files/binutils-2.21.51.0.6-mint.patch deleted file mode 100644 index 515243f..0000000 --- a/sys-devel/binutils/files/binutils-2.21.51.0.6-mint.patch +++ /dev/null @@ -1,2775 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=353410 - -diff -aurN binutils-2.21/bfd/Makefile.am binutils-2.21-mint-20110206/bfd/Makefile.am ---- binutils-2.21/bfd/Makefile.am 2010-12-08 09:37:33.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/Makefile.am 2011-02-06 16:27:48.500000000 +0100 -@@ -379,6 +379,7 @@ - peigen.lo \ - plugin.lo \ - ppcboot.lo \ -+ prg-mint.lo \ - reloc16.lo \ - riscix.lo \ - som.lo \ -@@ -559,6 +560,7 @@ - pei-sh.c \ - plugin.c \ - ppcboot.c \ -+ prg-mint.c \ - reloc16.c \ - riscix.c \ - som.c \ -diff -aurN binutils-2.21/bfd/Makefile.in binutils-2.21-mint-20110206/bfd/Makefile.in ---- binutils-2.21/bfd/Makefile.in 2010-12-08 09:37:36.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/Makefile.in 2011-02-06 16:27:48.515625000 +0100 -@@ -679,6 +679,7 @@ - peigen.lo \ - plugin.lo \ - ppcboot.lo \ -+ prg-mint.lo \ - reloc16.lo \ - riscix.lo \ - som.lo \ -@@ -859,6 +860,7 @@ - pei-sh.c \ - plugin.c \ - ppcboot.c \ -+ prg-mint.c \ - reloc16.c \ - riscix.c \ - som.c \ -diff -aurN binutils-2.21/bfd/acinclude.m4 binutils-2.21-mint-20110206/bfd/acinclude.m4 ---- binutils-2.21/bfd/acinclude.m4 2009-11-24 23:47:19.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/acinclude.m4 2011-02-06 16:27:48.531250000 +0100 -@@ -5,7 +5,7 @@ - [AC_REQUIRE([AC_CANONICAL_TARGET]) - case "${host}" in - changequote(,)dnl --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - changequote([,])dnl - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; - esac])dnl -diff -aurN binutils-2.21/bfd/aoutx.h binutils-2.21-mint-20110206/bfd/aoutx.h ---- binutils-2.21/bfd/aoutx.h 2010-10-14 03:31:26.000000000 +0200 -+++ binutils-2.21-mint-20110206/bfd/aoutx.h 2011-02-06 16:27:48.546875000 +0100 -@@ -1841,6 +1841,11 @@ - bfd_byte buffer[BYTES_IN_WORD]; - bfd_size_type amt = BYTES_IN_WORD; - -+ /* The MiNT backend writes past the string table. It therefore has to -+ know about the table size. */ -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) + -+ BYTES_IN_WORD; -+ - /* The string table starts with the size. */ - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer); - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt) -@@ -4210,10 +4215,17 @@ - return FALSE; - } - -+#ifdef MY_final_link_relocate_rel -+ r = MY_final_link_relocate_rel (howto, -+ input_bfd, input_section, -+ contents, r_addr, relocation, -+ (bfd_vma) 0, rel); -+#else - r = MY_final_link_relocate (howto, - input_bfd, input_section, - contents, r_addr, relocation, - (bfd_vma) 0); -+#endif - } - - if (r != bfd_reloc_ok) -diff -aurN binutils-2.21/bfd/bfd-in.h binutils-2.21-mint-20110206/bfd/bfd-in.h ---- binutils-2.21/bfd/bfd-in.h 2010-04-21 18:32:26.000000000 +0200 -+++ binutils-2.21-mint-20110206/bfd/bfd-in.h 2011-02-06 16:27:48.546875000 +0100 -@@ -738,6 +738,15 @@ - extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -+/* MiNT executable support routines for the linker. */ -+ -+extern bfd_boolean bfd_m68kmint_set_extended_flags -+ (bfd *, flagword); -+extern bfd_boolean bfd_m68kmint_set_stack_size -+ (bfd *, bfd_signed_vma); -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry -+ (bfd *, bfd_vma); -+ - /* mmap hacks */ - - struct _bfd_window_internal; -diff -aurN binutils-2.21/bfd/bfd-in2.h binutils-2.21-mint-20110206/bfd/bfd-in2.h ---- binutils-2.21/bfd/bfd-in2.h 2010-11-03 03:31:02.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/bfd-in2.h 2011-02-06 16:27:48.562500000 +0100 -@@ -745,6 +745,15 @@ - extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -+/* MiNT executable support routines for the linker. */ -+ -+extern bfd_boolean bfd_m68kmint_set_extended_flags -+ (bfd *, flagword); -+extern bfd_boolean bfd_m68kmint_set_stack_size -+ (bfd *, bfd_signed_vma); -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry -+ (bfd *, bfd_vma); -+ - /* mmap hacks */ - - struct _bfd_window_internal; -diff -aurN binutils-2.21/bfd/config.bfd binutils-2.21-mint-20110206/bfd/config.bfd ---- binutils-2.21/bfd/config.bfd 2010-12-01 12:03:10.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/config.bfd 2011-02-06 16:27:48.578125000 +0100 -@@ -823,6 +823,11 @@ - # targ_selvecs=m68kmach3_vec - # targ_cflags=-DSTAT_FOR_EXEC - ;; -+ m68*-*-mint*) -+ targ_defvec=aout0_big_vec -+ targ_selvecs=m68kmint_prg_vec -+ targ_underscore=yes -+ ;; - m68*-hp*-netbsd*) - targ_defvec=m68k4knetbsd_vec - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec" -diff -aurN binutils-2.21/bfd/configure binutils-2.21-mint-20110206/bfd/configure ---- binutils-2.21/bfd/configure 2010-12-08 09:37:34.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/configure 2011-02-06 16:29:39.593750000 +0100 -@@ -13631,7 +13631,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -@@ -15238,6 +15238,7 @@ - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;; - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; - m88kbcs_vec) tb="$tb coff-m88k.lo" ;; -diff -aurN binutils-2.21/bfd/configure.in binutils-2.21-mint-20110206/bfd/configure.in ---- binutils-2.21/bfd/configure.in 2010-12-08 09:37:33.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/configure.in 2011-02-06 16:29:56.250000000 +0100 -@@ -873,6 +873,7 @@ - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;; - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; - m88kbcs_vec) tb="$tb coff-m88k.lo" ;; -diff -aurN binutils-2.21/bfd/libaout.h binutils-2.21-mint-20110206/bfd/libaout.h ---- binutils-2.21/bfd/libaout.h 2009-09-09 23:38:58.000000000 +0200 -+++ binutils-2.21-mint-20110206/bfd/libaout.h 2011-02-06 16:27:49.484375000 +0100 -@@ -422,6 +422,10 @@ - table, used when linking on SunOS. This is indexed by the symbol - index. */ - bfd_vma *local_got_offsets; -+ -+ /* A pointer for data used by aout extensions. (Currently only used -+ by MiNT executables (see prg-mint.c). */ -+ void *ext; - }; - - struct aout_data_struct -@@ -449,6 +453,7 @@ - #define obj_aout_string_window(bfd) (adata (bfd).string_window) - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes) - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info) -+#define obj_aout_ext(bfd) (adata (bfd).ext) - - /* We take the address of the first element of an asymbol to ensure that the - macro is only ever applied to an asymbol. */ -diff -aurN binutils-2.21/bfd/prg-mint.c binutils-2.21-mint-20110206/bfd/prg-mint.c ---- binutils-2.21/bfd/prg-mint.c 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/bfd/prg-mint.c 2011-02-06 16:27:49.500000000 +0100 -@@ -0,0 +1,1732 @@ -+/* BFD backend for traditional MiNT executables. -+ Copyright 1998, 2007, 2008, 2009 Free Software Foundation, Inc. -+ Originally written by Guido Flohr (guido@freemint.de). -+ Modified by Vincent Riviere (vincent.riviere@freesbee.fr). -+ -+ This file is part of BFD, the Binary File Descriptor library. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+/* The format of executables on Atari is actually not a.out, it is -+ only chosen as an approach which comes close enough. The layout of a -+ program image on disk looked like this: -+ -+ +-----------------+ -+ | 28 Bytes Header | -+ +-----------------+ -+ | Text segment | -+ +-----------------+ -+ | Data segment | -+ +-----------------+ -+ | BSS | -+ +-----------------+ -+ | Symbol table | -+ +-----------------+ -+ | TPA relocation | -+ +-----------------+ -+ -+ The 28 byte exec header used to look like this: -+ -+ struct old_exec_header -+ { -+ bfd_byte a_magic[2]; -+ bfd_byte a_text[4]; -+ bfd_byte a_data[4]; -+ bfd_byte a_bss[4]; -+ bfd_byte a_syms[4]; -+ bfd_byte a_resvd[4]; -+ bfd_byte a_abs[2]; -+ }; -+ -+ The first two bytes (A_MAGIC) contained an assembler branch -+ instruction to the beginning of the text segment. Because the -+ exec header had a fixed size and the text entry point was constant -+ this assembler instruction also had a constant value (0x601a). -+ In fact the operating system never really executed the branch -+ instruction but used this value (0x601a) as a magic value. -+ -+ TEXT, DATA and BSS were as one would expect them. The symbol -+ table wasn't. Several different formats were in use, none of them -+ very efficient, none of them powerful enough to support source -+ level debugging. I've changed that and the GNU symbol table will -+ now be used instead (unless the --traditional-format option was -+ given to the linker). -+ -+ If the last member A_ABS of the exec header is zero the program -+ image contains an additional table with relocation information -+ at the end of the image. The kernel can load program images at -+ virtually any address in the address space. In fact it will load -+ it at the start of the biggest block of free memory. This block -+ is then called the Transient Program Area TPA and the image has -+ to be relocated against the TPA at runtime. The relocation info -+ itself is in a simply way compressed: It starts with a four-byte -+ value, the first address within the image to be relocated. Now -+ following are one-byte offsets to the last address. The special -+ value of 1 (which is impossible as an offset) signifies that 254 -+ has to be added to the next offset. The table is finished with -+ a zero-byte. -+ -+ I now simply extended the header from its old 28 bytes to 256 -+ bytes. The first 28 bytes give home to a standard Atari header, -+ the rest is for extensions. The extension header starts with -+ a ``real'' assembler instruction, a far jump to the text entry -+ point. The extension header gives home to a standard a.out -+ exec header (currently NMAGIC) plus some extra -+ more or less useful fields plus space to future extensions. -+ For the OS the extension header will already belong to the text -+ segment, for BFD backends the text segment is 228 (or 0xe4) -+ bytes smaller than for the OS. This explains for example the -+ funny TEXT_START_ADDR 0xe4. -+ -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently -+ no such thing as memory paging on the Atari (and this is why -+ ZMAGICs are disabled for now to allow for future enhancements). -+ -+ If you think that this whole file looks quite like a big hack -+ you're probably right. But the results (mainly the output of -+ the linker) seem to work and they allow to use up-to-date -+ binutils on the Atari until a better executable format (maybe -+ ELF) has been established for this machine. */ -+ -+#include "sysdep.h" -+#include "bfd.h" -+ -+#define N_HEADER_IN_TEXT(x) 0 -+#define BYTES_IN_WORD 4 -+#define ENTRY_CAN_BE_ZERO -+#define N_SHARED_LIB(x) 0 -+#define TEXT_START_ADDR 0xe4 -+#define TARGET_PAGE_SIZE 2 -+#define TARGET_IS_BIG_ENDIAN_P -+#define DEFAULT_ARCH bfd_arch_m68k -+#define N_TXTADDR(x) TEXT_START_ADDR -+ -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not -+ remove whitespace added here, and thus will fail to concatenate -+ the tokens. */ -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP) -+#define TARGETNAME "a.out-mintprg" -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y) -+ -+/* We have to do quite a lot of magic to make the Atari format -+ for GEMDOS executables fit into the standard a.out format. -+ We start with the original header. */ -+#define external_exec mint_external_exec -+struct mint_external_exec -+{ -+ bfd_byte g_branch[2]; /* 0x601a. */ -+ bfd_byte g_text[4]; /* Length of text section. */ -+ bfd_byte g_data[4]; /* Length of data section. */ -+ bfd_byte g_bss[4]; /* Length of bss section. */ -+ bfd_byte g_syms[4]; /* Length of symbol table. */ -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54 -+ (in ASCII: ``MiNT''). */ -+ bfd_byte g_flags[4]; /* Atari special flags. */ -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation -+ info. */ -+ -+ /* We extend this header now to provide the information that the -+ binutils want to see. Everything following will actually be part -+ of the text segment (from MiNT's point of view). As a -+ consequence the text section has 228 bytes of redundancy. -+ -+ The following eight bytes should be treated as opaque. -+ If the word ``opaque'' always attracts your curiosity in -+ typedefs and structs, here's the explanation: These eight bytes -+ are really two assembler instructions. The first one moves -+ the contents of e_entry into register d0, the second one -+ jumps (pc-relative) to the entry point. See swap_exec_header_out -+ for details. */ -+ bfd_byte g_jump_entry[8]; -+ -+ /* Now following a standard a.out header. Note that the values -+ may differ from the one given on top. The traditional header -+ contains the values that the OS wants to see, the values below -+ are the values that make the binutils work. */ -+ bfd_byte e_info[4]; /* Magic number and stuff. */ -+ bfd_byte e_text[4]; /* Length of text section in bytes. */ -+ bfd_byte e_data[4]; /* Length of data section. */ -+ bfd_byte e_bss[4]; /* Length of standard symbol -+ table. */ -+ bfd_byte e_syms[4]; /* Length of symbol table. */ -+ bfd_byte e_entry[4]; /* Start address. */ -+ bfd_byte e_trsize[4]; /* Length of text relocation -+ info. */ -+ bfd_byte e_drsize[4]; /* Length of data relocation -+ info. */ -+ -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative -+ relocation info. */ -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation -+ info. */ -+ -+ /* This is for extensions. */ -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into -+ the executable you will find it -+ at file offset g_stkpos. If -+ not this is NULL. */ -+ -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See -+ definitions for _MINT_SYMBOL_FORMAT* -+ above. */ -+ -+ /* Pad with zeros. */ -+ bfd_byte g_pad0[172]; -+}; -+#define EXEC_BYTES_SIZE 256 -+#define GEMDOS_HEADER_SIZE 28 -+ -+/* The following defines are required by aoutx.h. -+ They are not automatically defined in aout/aout64.h -+ if external_exec is defined. */ -+ -+#define OMAGIC 0407 /* Object file or impure executable. */ -+#define NMAGIC 0410 /* Code indicating pure executable. */ -+#define ZMAGIC 0413 /* Code indicating demand-paged executable. */ -+#define BMAGIC 0415 /* Used by a b.out object. */ -+#define QMAGIC 0314 /* Like ZMAGIC but with N_HEADER_IN_TEXT true. */ -+ -+/* Files using the following magic flags will not be loaded. */ -+#define N_BADMAG(x) (N_MAGIC(x) != NMAGIC) -+ -+/* For DRI symbol table format. */ -+struct dri_symbol -+{ -+ bfd_byte a_name[8]; /* Symbol name */ -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */ -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */ -+}; -+#define DRI_SYMBOL_SIZE 14 -+ -+/* Simple values for a_type. */ -+#define A_UNDF 0 -+#define A_BSS 0x0100 -+#define A_TEXT 0x0200 -+#define A_DATA 0x0400 -+#define A_EXT 0x0800 /* External. */ -+#define A_EQREG 0x1000 /* Equated register. */ -+#define A_GLOBL 0x2000 /* Global. */ -+#define A_EQU 0x4000 /* Equated. */ -+#define A_DEF 0x8000 /* Defined. */ -+#define A_LNAM 0x0048 /* GST compatible long name. */ -+ /* File symbols ala aln. */ -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */ -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this -+ conflicts with the bits in A_LNAM. */ -+ -+/* The following include contains the definitions for internal a.out structures -+ as well as the prototypes for the NAME(...) functions defined in aoutx.h. */ -+ -+#include "libaout.h" -+ -+/* The following function is similar to _bfd_final_link_relocate, except it -+ adds the reloc structure as an additional parameter. -+ It will be used int aoutx.h. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel); -+ -+#define MY_final_link_relocate_rel m68kmint_prg_final_link_relocate_rel -+ -+/* The following include contains the definitions for the NAME(...) functions. */ -+ -+#include "aoutx.h" -+ -+/* Data structure that holds some private information for us. */ -+struct mint_internal_info -+{ -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */ -+ bfd_boolean traditional_format; /* Saved from link info. */ -+ int symbol_format; /* Format of the symbol table. */ -+ void *tparel; /* Data for TPA relative relocation -+ information. */ -+ file_ptr tparel_pos; /* File position of TPA relative -+ relocation information. */ -+ bfd_size_type tparel_size; /* Size of TPA relative relocation -+ information. */ -+ bfd_size_type dri_symtab_size; /* Size of traditional symbol table. */ -+ -+#define MINT_RELOC_CHUNKSIZE 0x1000 -+ bfd_vma *relocs; /* Array of address relocations. */ -+ unsigned long relocs_used; /* Number of relocation entries -+ already used up. */ -+ unsigned long relocs_allocated; /* Number of relocation entries -+ allocated. */ -+ -+ bfd_vma stkpos; /* File offset to value of _stksize. */ -+ -+ flagword prg_flags; /* Standard GEMDOS flags. */ -+ -+ bfd_boolean override_stack_size; /* TRUE if the executable stack size -+ must be overriden with stack_size. */ -+ bfd_signed_vma stack_size; -+ -+ bfd_boolean reloc_error; /* TRUE if an unhandled error during -+ relocation occured. */ -+}; -+ -+/* If --traditional-format was given to the linker an old-style DRI -+ symbol table is written into the executable. This is with respect -+ to many old debugging tools or disassemblers which expect this format. -+ Although created by the linker, these symbols will be ignored from -+ input files. */ -+#define _MINT_SYMBOL_FORMAT_GNU 0 -+#define _MINT_SYMBOL_FORMAT_DRI 1 -+ -+/* Declarations for the variables and functions -+ defined later in aout-target.h. */ -+ -+static const bfd_target * -+m68kmint_prg_callback (bfd *abfd); -+ -+static void -+MY_final_link_callback (bfd *abfd, -+ file_ptr *ptreloff, -+ file_ptr *pdreloff, -+ file_ptr *psymoff); -+ -+extern const bfd_target m68kmint_prg_vec; -+ -+/* Initialize a new BFD using our file format. */ -+ -+#define MY_mkobject m68kmint_prg_mkobject -+ -+static bfd_boolean -+m68kmint_prg_mkobject (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo; -+ -+ if (!NAME (aout, mkobject (abfd))) -+ return FALSE; -+ -+ /* Allocate our private BFD data. */ -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo)); -+ if (myinfo == NULL) -+ return FALSE; -+ obj_aout_ext (abfd) = myinfo; -+ -+ return TRUE; -+} -+ -+/* Finish up the reading of an a.out file header. */ -+ -+#define MY_object_p m68kmint_prg_object_p -+ -+static const bfd_target * -+m68kmint_prg_object_p (bfd *abfd) -+{ -+ struct external_exec exec_bytes; /* Raw exec header from file. */ -+ struct internal_exec exec; /* Cleaned-up exec header. */ -+ const bfd_target *target; -+ bfd_size_type amt = EXEC_BYTES_SIZE; -+ struct mint_internal_info *myinfo; -+ -+ /* Read the exec bytesd from the file. */ -+ if (bfd_bread (&exec_bytes, amt, abfd) != amt) -+ { -+ if (bfd_get_error () != bfd_error_system_call) -+ bfd_set_error (bfd_error_wrong_format); -+ return NULL; -+ } -+ -+ /* Instead of byte-swapping we compare bytes. */ -+ if (exec_bytes.g_branch[0] != 0x60 -+ || exec_bytes.g_branch[1] != 0x1a -+ || exec_bytes.g_extmagic[0] != 'M' -+ || exec_bytes.g_extmagic[1] != 'i' -+ || exec_bytes.g_extmagic[2] != 'N' -+ || exec_bytes.g_extmagic[3] != 'T') -+ { -+ bfd_set_error (bfd_error_wrong_format); -+ return NULL; -+ } -+ -+ /* Swap the standard a.out fields. */ -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec); -+ -+ /* Check a.out magic value. */ -+ if (N_BADMAG (exec)) -+ { -+ bfd_set_error (bfd_error_wrong_format); -+ return NULL; -+ } -+ -+ /* Initialize this BFD with the exec values. */ -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback); -+ -+ /* Allocate our private BFD data. */ -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo)); -+ if (myinfo == NULL) -+ return NULL; -+ obj_aout_ext (abfd) = myinfo; -+ -+ /* Now get the missing information. */ -+ myinfo->prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags); -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos); -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format); -+ -+ /* TPA relocation information. */ -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos); -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size); -+ -+ /* FIXME: Currently we always read the TPA relative relocation -+ information. This is suboptimal because often times there -+ is no need for it. Read it only if need be! Maybe this should -+ also depend on abfd->cacheable? */ -+ if (myinfo->tparel_size == 0) -+ myinfo->tparel = bfd_zalloc (abfd, 4); -+ else -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size); -+ -+ if (myinfo->tparel == NULL) -+ return NULL; -+ -+ if (myinfo->tparel_size == 0) -+ { -+ myinfo->tparel_size = 4; -+ } -+ else -+ { -+ /* Read the information from the bfd. */ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size)) -+ return NULL; -+ } -+ -+ return target; -+} -+ -+/* Free all information we have cached for this BFD. We can always -+ read it again later if we need it. */ -+ -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info -+ -+static bfd_boolean -+m68kmint_prg_bfd_free_cached_info (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo != NULL && myinfo->relocs != NULL) -+ { -+ free (myinfo->relocs); -+ myinfo->relocs = NULL; -+ } -+ -+ /* myinfo itself has been allocated by bfd_zalloc() -+ so will be automatically freed along with the BFD. -+ Same for myinfo->tparel. */ -+ -+ return NAME (aout, bfd_free_cached_info) (abfd); -+} -+ -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the -+ symbol exceeds 8 characters write a long symbol. If it -+ exceeds 22 characters truncate the name. */ -+ -+static int -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value) -+{ -+ int written_bytes = 0; -+ struct dri_symbol sym; -+ int is_long_name = strlen (name) > sizeof (sym.a_name); -+ -+ if (is_long_name) -+ type |= A_LNAM; -+ -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name)); -+ bfd_put_16 (abfd, type, sym.a_type); -+ bfd_put_32 (abfd, value, sym.a_value); -+ -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ -+ if (is_long_name) -+ { -+ char more_name[DRI_SYMBOL_SIZE]; -+ -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE); -+ -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ } -+ -+ return written_bytes; -+} -+ -+/* Emit a traditional DRI symbol table while linking. -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */ -+ -+static bfd_boolean -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info) -+{ -+ bfd *input_bfd; -+ enum bfd_link_strip strip = info->strip; -+ enum bfd_link_discard discard = info->discard; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd *last_archive = NULL; -+ -+ /* Position file pointer. */ -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size = 0; -+ -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next) -+ { -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd); -+ struct external_nlist *sym_end = sym + sym_count; -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd); -+ bfd_boolean pass = FALSE; -+ bfd_boolean skip = FALSE; -+ bfd_boolean skip_next = FALSE; -+ int written_bytes; -+ int a_type; -+ bfd_boolean write_archive_name = FALSE; -+ bfd_vma val = 0; -+ -+ /* First write out a symbol for the archive if we do not -+ strip these symbols and if it differs from the last -+ one. */ -+ if (input_bfd->my_archive != last_archive -+ && input_bfd->my_archive != NULL) -+ { -+ write_archive_name = TRUE; -+ last_archive = input_bfd->my_archive; -+ } -+ -+ if (write_archive_name -+ && strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, -+ input_bfd->my_archive->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, -+ input_bfd->my_archive->filename, -+ A_TFILE, val); -+ -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now write out a symbol for the object file if we do not -+ strip these symbols. */ -+ if (strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename, -+ A_TFILE, val); -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now we have a problem. All symbols that we see have already -+ been marked written (because we write them a second time -+ here. If we would do it the clean way we would have -+ to traverse the entire symbol map and reset the written -+ flag. We hack here instead... */ -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1) -+#define is_written(h) ((int) h->written == (int) TRUE + 1) -+ for (; sym < sym_end; sym++, sym_hash++) -+ { -+ const char *name; -+ int type; -+ struct aout_link_hash_entry *h; -+ asection *symsec; -+ val = 0; -+ -+ type = H_GET_8 (input_bfd, sym->e_type); -+ name = strings + GET_WORD (input_bfd, sym->e_strx); -+ -+ h = NULL; -+ -+ if (pass) -+ { -+ /* Pass this symbol through. It is the target of an -+ indirect or warning symbol. */ -+ val = GET_WORD (input_bfd, sym->e_value); -+ pass = FALSE; -+ } -+ else if (skip_next) -+ { -+ /* Skip this symbol, which is the target of an indirect -+ symbol that we have changed to no longer be an indirect -+ symbol. */ -+ skip_next = FALSE; -+ continue; -+ } -+ else -+ { -+ struct aout_link_hash_entry *hresolve = *sym_hash; -+ -+ /* We have saved the hash table entry for this symbol, if -+ there is one. Note that we could just look it up again -+ in the hash table, provided we first check that it is an -+ external symbol. */ -+ h = *sym_hash; -+ -+ /* Use the name from the hash table, in case the symbol was -+ wrapped. */ -+ if (h != NULL -+ && h->root.type != bfd_link_hash_warning) -+ name = h->root.root.string; -+ -+ /* If this is an indirect or warning symbol, then change -+ hresolve to the base symbol. */ -+ hresolve = h; -+ if (h != (struct aout_link_hash_entry *) NULL -+ && (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning)) -+ { -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link; -+ while (hresolve->root.type == bfd_link_hash_indirect -+ || hresolve->root.type == bfd_link_hash_warning) -+ hresolve = ((struct aout_link_hash_entry*) -+ hresolve->root.u.i.link); -+ } -+ -+ /* If the symbol has already been written out skip it. */ -+ if (h != NULL -+ && is_written (h)) -+ { -+ if ((type & N_TYPE) == N_INDR -+ || type == N_WARNING) -+ skip_next = TRUE; -+ continue; -+ } -+ -+ /* See if we are stripping this symbol. */ -+ skip = FALSE; -+ -+ /* Skip all debugger symbols. No way to output them in -+ DRI format. This will also reduce a lot of headaches. */ -+ if ((type & N_STAB) != 0) -+ skip = TRUE; -+ -+ switch (strip) -+ { -+ case strip_none: -+ case strip_debugger: -+ break; -+ case strip_some: -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) -+ == NULL) -+ skip = TRUE; -+ break; -+ case strip_all: -+ skip = TRUE; -+ break; -+ } -+ -+ if (skip) -+ { -+ if (h != NULL) -+ mark_written (h); -+ continue; -+ } -+ -+ /* Get the value of the symbol. */ -+ if ((type & N_TYPE) == N_TEXT -+ || type == N_WEAKT) -+ symsec = obj_textsec (input_bfd); -+ else if ((type & N_TYPE) == N_DATA -+ || type == N_WEAKD) -+ symsec = obj_datasec (input_bfd); -+ else if ((type & N_TYPE) == N_BSS -+ || type == N_WEAKB) -+ symsec = obj_bsssec (input_bfd); -+ else if ((type & N_TYPE) == N_ABS -+ || type == N_WEAKA) -+ symsec = bfd_abs_section_ptr; -+ else if (((type & N_TYPE) == N_INDR -+ && (hresolve == NULL -+ || (hresolve->root.type != bfd_link_hash_defined -+ && hresolve->root.type != bfd_link_hash_defweak -+ && hresolve->root.type != bfd_link_hash_common))) -+ || type == N_WARNING) -+ { -+ /* Pass the next symbol through unchanged. The -+ condition above for indirect symbols is so that if -+ the indirect symbol was defined, we output it with -+ the correct definition so the debugger will -+ understand it. */ -+ pass = TRUE; -+ val = GET_WORD (input_bfd, sym->e_value); -+ symsec = NULL; -+ } -+ else -+ { -+ /* If we get here with an indirect symbol, it means that -+ we are outputting it with a real definition. In such -+ a case we do not want to output the next symbol, -+ which is the target of the indirection. */ -+ if ((type & N_TYPE) == N_INDR) -+ skip_next = TRUE; -+ -+ symsec = NULL; -+ -+ /* We need to get the value from the hash table. We use -+ hresolve so that if we have defined an indirect -+ symbol we output the final definition. */ -+ if (h == NULL) -+ { -+ switch (type & N_TYPE) -+ { -+ case N_SETT: -+ symsec = obj_textsec (input_bfd); -+ break; -+ case N_SETD: -+ symsec = obj_datasec (input_bfd); -+ break; -+ case N_SETB: -+ symsec = obj_bsssec (input_bfd); -+ break; -+ case N_SETA: -+ symsec = bfd_abs_section_ptr; -+ break; -+ default: -+ val = 0; -+ break; -+ } -+ } -+ else if (hresolve->root.type == bfd_link_hash_defined -+ || hresolve->root.type == bfd_link_hash_defweak) -+ { -+ asection *input_section; -+ asection *output_section; -+ -+ /* This case usually means a common symbol which was -+ turned into a defined symbol. */ -+ input_section = hresolve->root.u.def.section; -+ output_section = input_section->output_section; -+ BFD_ASSERT (bfd_is_abs_section (output_section) -+ || output_section->owner == abfd); -+ -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (hresolve->root.u.def.value -+ /*+ bfd_get_section_vma (abfd, output_section)*/ -+ + input_section->output_offset); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (output_section == obj_textsec (abfd)) -+ val += TEXT_START_ADDR; -+ -+ /* Get the correct type based on the section. If -+ this is a constructed set, force it to be -+ globally visible. */ -+ if (type == N_SETT -+ || type == N_SETD -+ || type == N_SETB -+ || type == N_SETA) -+ type |= N_EXT; -+ -+ type &=~ N_TYPE; -+ -+ if (output_section == obj_textsec (abfd)) -+ type |= N_TEXT; -+ else if (output_section == obj_datasec (abfd)) -+ type |= N_DATA; -+ else if (output_section == obj_bsssec (abfd)) -+ type |= N_BSS; -+ else -+ type |= N_ABS; -+ } -+ else if (hresolve->root.type == bfd_link_hash_common) -+ val = hresolve->root.u.c.size; -+ else if (hresolve->root.type == bfd_link_hash_undefweak) -+ { -+ val = 0; -+ type = N_UNDF; -+ } -+ else -+ val = 0; -+ } -+ if (symsec != NULL) -+ { -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (/*symsec->output_section->vma -+ +*/ symsec->output_offset -+ + (GET_WORD (input_bfd, sym->e_value) -+ - symsec->vma)); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (symsec == obj_textsec (input_bfd)) -+ val += TEXT_START_ADDR; -+ } -+ -+ /* If this is a global symbol set the written flag, and if -+ it is a local symbol see if we should discard it. */ -+ if (h != NULL) -+ { -+ mark_written (h); -+ } -+ else if ((type & N_TYPE) != N_SETT -+ && (type & N_TYPE) != N_SETD -+ && (type & N_TYPE) != N_SETB -+ && (type & N_TYPE) != N_SETA) -+ { -+ switch (discard) -+ { -+ case discard_none: -+ case discard_sec_merge: -+ break; -+ case discard_l: -+ if (bfd_is_local_label_name (input_bfd, name)) -+ skip = TRUE; -+ break; -+ default: -+ case discard_all: -+ skip = TRUE; -+ break; -+ } -+ if (skip) -+ { -+ pass = FALSE; -+ continue; -+ } -+ } -+ } -+ -+ /* Now find the nearest type in DRI format. */ -+ switch (type) -+ { -+ case N_ABS: -+ case N_ABS | N_EXT: -+ case N_SETA: -+ case N_SETA | N_EXT: -+ case N_WEAKA: -+ a_type = A_EQU | A_DEF | A_GLOBL; -+ break; -+ case N_TEXT: -+ case N_TEXT | N_EXT: -+ case N_SETT: -+ case N_SETT | N_EXT: -+ case N_WEAKT: -+ a_type = A_TEXT | A_DEF | A_GLOBL; -+ break; -+ case N_DATA: -+ case N_DATA | N_EXT: -+ case N_SETD: -+ case N_SETD | N_EXT: -+ case N_WEAKD: -+ a_type = A_DATA | A_DEF | A_GLOBL; -+ break; -+ case N_BSS: -+ case N_BSS | N_EXT: -+ case N_SETB: -+ case N_SETB | N_EXT: -+ case N_WEAKB: -+ a_type = A_BSS | A_DEF | A_GLOBL; -+ break; -+ default: -+ continue; -+ } -+ -+ written_bytes = write_dri_symbol (abfd, name, a_type, val); -+ if (written_bytes < 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ } -+ -+ obj_aout_external_string_size (abfd) = 0; -+ return TRUE; -+} -+ -+/* This is used for qsort() to sort addresses -+ for the TPA relocation table. */ -+ -+static int -+vma_cmp (const void *v1, const void *v2) -+{ -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2))); -+} -+ -+/* Alloc and fill the TPA relocation table. */ -+ -+static bfd_boolean -+fill_tparel (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ unsigned long i; -+ bfd_size_type bytes; -+ unsigned char *ptr; -+ -+ /* Sort the relocation info. */ -+ if (myinfo->relocs != NULL) -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma), -+ vma_cmp); -+ -+ /* Now calculate the number of bytes we need. The relocation info -+ is encoded as follows: The first entry is a 32-bit value -+ denoting the first offset to relocate. All following entries -+ are relative to the preceding one. For relative offsets of -+ more than 254 bytes a value of 1 is used. The OS will then -+ add 254 bytes to the current offset. The list is then terminated -+ with the byte 0. */ -+ bytes = 4; /* First entry is a long. */ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ BFD_ASSERT(diff > 0); -+ bytes += (diff + 253) / 254; -+ } -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */ -+ if (myinfo->relocs_used > 0) -+ bytes++; -+ -+ myinfo->tparel_size = bytes; -+ myinfo->tparel = bfd_alloc (abfd, bytes); -+ if (myinfo->tparel == NULL) -+ return FALSE; -+ -+ /* Now fill the array. */ -+ ptr = (bfd_byte*) myinfo->tparel; -+ if (myinfo->relocs != NULL) -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr); -+ else -+ bfd_put_32 (abfd, 0, ptr); -+ ptr += 4; -+ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ while (diff > 254) -+ { -+ *ptr++ = 1; -+ diff -= 254; -+ } -+ *ptr++ = (bfd_byte) diff; -+ } -+ -+ if (myinfo->relocs_used > 0) -+ *ptr = 0; -+ -+ return TRUE; -+} -+ -+/* Final link routine. We need to use a call back to get the correct -+ offsets in the output file. And we need to malloc some internal -+ buffers. */ -+ -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link -+ -+static bfd_boolean -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ struct bfd_link_hash_table *hash = info->hash; -+ enum bfd_link_strip original_strip = info->strip; -+ -+ if (info->relocatable) -+ { -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s", -+ abfd, bfd_get_target (abfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ myinfo->linkinfo = info; -+ -+ /* Make sure that for now we never write zmagics. */ -+ abfd->flags &= ~D_PAGED; -+ -+ /* Find the __stksize symbol. This symbol is used for a MiNT -+ special kludge. The libc defines this symbol in an object file -+ initialized to a default value to make sure it is defined in -+ every output file. The start-up code in crtinit() then simply -+ sets the stacksize accordingly. In your programs (if they need -+ an unusual stacksize) you can then simply code: -+ -+ long _stksize = 0x2000; -+ -+ This will create a program stack of 2k. Since MiNT cannot detect -+ a stack overflow this is the only way to prevent program crashes -+ caused by a stack that is too small. -+ -+ The ancient linker ignored this feature, the ancient strip -+ program paid heed to it. By default, strip never stripped this -+ special symbol from the binary. -+ -+ Another program called ``printstk'' and its colleague ``fixstk'' -+ could be used to either print the current value of the stacksize -+ or to modify it without recompiling and rebuilding. These -+ programs traversed the symbol table and then took the appropriate -+ measures if the symbol was found. -+ -+ Here we do a different approach. Since we already expanded the -+ standard executable header we now hardcode the address (as a file -+ offset) that the __stksize symbol points to into the header. We -+ can now let strip safely remove the entry from the symbol table -+ and we're not dependent on a special format of the symbol table. -+ Because the address is kept in the header we will always be able -+ to manipulate the stacksize value later. */ -+ if (hash != NULL) -+ { -+ struct aout_link_hash_entry *h = -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize", -+ FALSE, FALSE, FALSE); -+ asection *sec; -+ -+ if (h != NULL) -+ { -+ switch (h->root.type) -+ { -+ case bfd_link_hash_defined: -+ case bfd_link_hash_defweak: -+ sec = h->root.u.def.section->output_section; -+ BFD_ASSERT (sec->owner == abfd); -+ -+ myinfo->stkpos = (h->root.u.def.value + sec->vma -+ + h->root.u.def.section->output_offset -+ + GEMDOS_HEADER_SIZE); -+ break; -+ default: /* Ignore other types. */ -+ break; -+ } -+ } -+ } -+ -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ myinfo->traditional_format = TRUE; -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI; -+ } -+ -+ /* Unconditionally unset the traditional flag. The only effect in -+ the a.out code is to disable string hashing (with respect to -+ SunOS gdx). This is not necessary for us. */ -+ -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT; -+ -+ /* Do not write GNU symbols in traditional format. */ -+ if (myinfo->traditional_format) -+ info->strip = strip_all; -+ -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback) -+ != TRUE) -+ return FALSE; -+ -+ if (myinfo->reloc_error) -+ return FALSE; -+ -+ /* Restore the strip status for the traditional symbols. */ -+ info->strip = original_strip; -+ -+ if (myinfo->traditional_format -+ && link_write_traditional_syms (abfd, info) != TRUE) -+ return FALSE; -+ -+ if (fill_tparel (abfd) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Copy private BFD header information from the input BFD. */ -+ -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* We can only copy BFD files using our own file format. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s", -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Copy backend specific data from one object module to another. -+ This function is used by objcopy and strip. */ -+ -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ struct mint_internal_info *myinfo_in; -+ struct mint_internal_info *myinfo_out; -+ -+ /* obfd uses our file format, ibfd may be foreign. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ return TRUE; -+ -+ myinfo_in = obj_aout_ext (ibfd); -+ BFD_ASSERT (myinfo_in != NULL); -+ -+ myinfo_out = obj_aout_ext (obfd); -+ BFD_ASSERT (myinfo_out != NULL); -+ -+ /* Copy myinfo. */ -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out)); -+ -+ /* Copy tparel. */ -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size); -+ if (myinfo_out->tparel == NULL) -+ return FALSE; -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size); -+ -+ /* Normalize the type of empty symbols. */ -+ if (bfd_get_symcount (obfd) == 0) -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Merge private BFD information from an input BFD to the output BFD when linking. */ -+ -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* Our file format cannot be used as linker input. */ -+ if (ibfd->xvec == &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input", -+ ibfd, bfd_get_target (ibfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Find out the symbol name. */ -+ -+static const char * -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd, -+ bfd_byte *location, struct reloc_std_external *rel) -+{ -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct aout_link_hash_entry **sym_hashes -+ = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = NULL; -+ const char *name; -+ bfd_size_type r_index; -+ int r_extern; -+ -+ if (bfd_get_reloc_size (howto) != 4) -+ return "(not a symbol)"; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+ if (sym_hashes != NULL) -+ h = sym_hashes[r_index]; -+ -+ if (!r_extern) -+ { -+ bfd_size_type i; -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location); -+ -+ name = NULL; -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++) -+ { -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value); -+ -+ if (this_value == wanted_value) -+ { -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type); -+ -+ /* Skip debug symbols and the like. */ -+ if ((symtype & N_STAB) != 0) -+ continue; -+ -+ /* This is dirty but preferable to a plethoria of -+ single comparisons. */ -+ if (symtype <= (N_BSS | N_EXT) -+ || (symtype >= N_WEAKU && symtype <= N_COMM)) -+ { -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx); -+ break; -+ } -+ } -+ } -+ -+ /* FIXME: If the relocation is against a section there is -+ probably a symbol for that section floating around somewhere -+ in the bfd jungle. */ -+ if (name == NULL) -+ { -+ switch ((r_index & N_TYPE) & ~N_EXT) -+ { -+ case N_TEXT: -+ name = "text section"; -+ break; -+ case N_DATA: -+ name = "data section"; -+ break; -+ case N_BSS: -+ name = "bss section"; -+ break; -+ case N_ABS: -+ name = "absolute section"; -+ break; -+ default: -+ name = "unknown section"; -+ break; -+ } -+ } -+ } -+ else if (h != NULL) -+ name = h->root.root.string; -+ else if (r_index >= obj_aout_external_sym_count (input_bfd)) -+ name = "(unknown symbol)"; /* Shouldn't happen. */ -+ else -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); -+ -+ return name; -+} -+ -+/* This relocation routine is used by some of the backend linkers. -+ They do not construct asymbol or arelent structures, so there is no -+ reason for them to use bfd_perform_relocation. Also, -+ bfd_perform_relocation is so hacked up it is easier to write a new -+ function than to try to deal with it. -+ -+ This routine does a final relocation. Whether it is useful for a -+ relocatable link depends upon how the object format defines -+ relocations. -+ -+ FIXME: This routine ignores any special_function in the HOWTO, -+ since the existing special_function values have been written for -+ bfd_perform_relocation. -+ -+ HOWTO is the reloc howto information. -+ INPUT_BFD is the BFD which the reloc applies to. -+ INPUT_SECTION is the section which the reloc applies to. -+ CONTENTS is the contents of the section. -+ ADDRESS is the address of the reloc within INPUT_SECTION. -+ VALUE is the value of the symbol the reloc refers to. -+ ADDEND is the addend of the reloc. */ -+ -+/* The additional parameter REL is specific to this backend. -+ This function is derived from _bfd_final_link_relocate() -+ found in reloc.c. It adds additional checking for dangerous -+ relocations in MiNT sharable text sections, then it records -+ the relocated offset in myinfo->relocs[] for further processing. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel) -+{ -+ bfd_vma relocation; -+ bfd *output_bfd = input_section->output_section->owner; -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd); -+ bfd_reloc_status_type retval; -+ int r_index; -+ int r_extern; -+ bfd_boolean need_tpa_relocation; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+#define _MINT_F_SHTEXT 0x800 -+ -+ /* Sanity check the address. */ -+ if (address > bfd_get_section_limit (input_bfd, input_section)) -+ return bfd_reloc_outofrange; -+ -+ /* This function assumes that we are dealing with a basic relocation -+ against a symbol. We want to compute the value of the symbol to -+ relocate to. This is just VALUE, the value of the symbol, plus -+ ADDEND, any addend associated with the reloc. */ -+ relocation = value + addend; -+ -+ /* Check for dangerous relocations in images with a sharable -+ text section. */ -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0 -+ && bfd_get_reloc_size (howto) == 4) -+ { -+ bfd_boolean error_found = FALSE; -+ const char *name = NULL; -+ -+ if (input_section == obj_textsec (input_bfd)) -+ { -+ if (!r_extern) -+ { -+ /* This is a relocation against another section. Only -+ relocations against the text section are allowed. */ -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT)) -+ error_found = TRUE; -+ } -+ else if (relocation > (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ error_found = TRUE; -+ } -+ else if (relocation == (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ if (strcmp (name, "_etext") == 0) -+ error_found = FALSE; -+ } -+ } -+ -+ if (error_found) -+ { -+ const struct bfd_link_callbacks *callbacks -+ = myinfo->linkinfo->callbacks; -+ -+ myinfo->reloc_error = TRUE; -+ -+ if (callbacks->reloc_dangerous != NULL) -+ { -+ if (name == NULL) -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ -+ callbacks->reloc_dangerous (myinfo->linkinfo, name, -+ input_bfd, -+ input_section, address); -+ } -+ } -+ } -+ -+ /* If the relocation is PC relative, we want to set RELOCATION to -+ the distance between the symbol (currently in RELOCATION) and the -+ location we are relocating. Some targets (e.g., i386-aout) -+ arrange for the contents of the section to be the negative of the -+ offset of the location within the section; for such targets -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF) -+ simply leave the contents of the section as zero; for such -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not -+ need to subtract out the offset of the location within the -+ section (which is just ADDRESS). */ -+ if (howto->pc_relative) -+ { -+ relocation -= (input_section->output_section->vma -+ + input_section->output_offset); -+ if (howto->pcrel_offset) -+ relocation -= address; -+ } -+ -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation, -+ contents + address); -+ -+ /* The symbol has to be relocated again iff the length of the relocation -+ is 2 words and it is not pc relative. */ -+ need_tpa_relocation = FALSE; -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4) -+ { -+ if (r_extern) -+ { -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = sym_hashes[r_index]; -+ asection *output_section = h->root.u.def.section->output_section; -+ -+ /* Do not relocate absolute symbols. */ -+ if (output_section == obj_textsec (output_bfd) -+ || output_section == obj_datasec (output_bfd) -+ || output_section == obj_bsssec (output_bfd)) -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ else -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ -+ /* Here we add the TPA relocation entries for the address references -+ located inside the input sections. Note that if some references -+ to addresses are generated using data statements in the linker -+ script, they will not be relocated here because they do not -+ belong to any input section. */ -+ if (need_tpa_relocation) -+ { -+ bfd_vma tpa_address = input_section->output_section->vma -+ + input_section->output_offset + address; -+ -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address)) -+ return bfd_reloc_other; -+ } -+ -+ return retval; -+} -+ -+/* Write out the TPA relocation table. */ -+ -+static bfd_boolean -+write_tparel (bfd *abfd, struct internal_exec *execp) -+{ -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo->dri_symtab_size == 0) -+ myinfo->tparel_pos = N_STROFF (*execp) -+ + obj_aout_external_string_size (abfd); -+ else -+ myinfo->tparel_pos = N_SYMOFF (*execp) -+ + myinfo->dri_symtab_size; -+ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Write the full exec header. -+ This function must be called last to ensure that we have all the -+ information needed to fill the MiNT-specific header fields. */ -+ -+static bfd_boolean -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd_size_type symtab_size; -+ -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch); -+ -+ /* The OS will load our extension header fields into the text segment. */ -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE), -+ exec_bytes->g_text); -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data); -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss); -+ -+ /* The OS' notion of the size of the symbol table is another than -+ the bfd library's. We have to fill in the size of the table -+ itself plus the size of the string table but only if we have not written -+ a traditional symbol table. If we have written a traditional symbol -+ table we know the size. */ -+ if (myinfo->dri_symtab_size != 0) -+ symtab_size = myinfo->dri_symtab_size; -+ else -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp); -+ -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms); -+ -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic); -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags); -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs); -+ -+ /* Generate the jump instruction to the entry point. In m68k -+ assembler mnemnonics it looks more or less like this: -+ -+ move.l exec_bytes->e_entry(pc),d0 -+ jmp -6(pc,d0.l) -+ -+ Sorry for the wrong syntax. As a real assembler addict I -+ never actually use an assembler. I edit my binaries manually -+ with a hex editor, looks much cooler and it strengthens your -+ abstraction abilities. */ -+ -+ exec_bytes->g_jump_entry[0] = 0x20; -+ exec_bytes->g_jump_entry[1] = 0x3a; -+ exec_bytes->g_jump_entry[2] = 0x00; -+ exec_bytes->g_jump_entry[3] = 0x1a; -+ exec_bytes->g_jump_entry[4] = 0x4e; -+ exec_bytes->g_jump_entry[5] = 0xfb; -+ exec_bytes->g_jump_entry[6] = 0x08; -+ exec_bytes->g_jump_entry[7] = 0xfa; -+ -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos); -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size); -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos); -+ -+ /* If there are no symbols, pretend they are in GNU format. */ -+ if (symtab_size == 0) -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format); -+ -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0)); -+ -+ /* The standard stuff. */ -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes); -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU) -+ PUT_WORD (abfd, 0, exec_bytes->e_syms); -+ -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd) -+ != EXEC_BYTES_SIZE) -+ return FALSE; -+ -+ /* Override the stack size. */ -+ if (myinfo->override_stack_size && myinfo->stkpos) -+ { -+ bfd_byte big_endian_stack_size[4]; -+ -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size); -+ -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Write an object file. -+ Section contents have already been written. We write the -+ file header, symbols, and relocation. */ -+ -+#define MY_write_object_contents m68kmint_prg_write_object_contents -+ -+static bfd_boolean -+m68kmint_prg_write_object_contents (bfd *abfd) -+{ -+ struct external_exec exec_bytes; -+ struct internal_exec *execp = exec_hdr (abfd); -+ bfd_size_type text_size; -+ file_ptr text_end; -+ -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL); -+ -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; -+ -+ /* Most of the following code come from the WRITE_HEADERS macro -+ found in libaout.h. */ -+ -+ if (adata(abfd).magic == undecided_magic) -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); -+ -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; -+ execp->a_entry = bfd_get_start_address (abfd); -+ -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ -+ /* Now write out reloc info, followed by syms and strings. */ -+ -+ if (bfd_get_outsymbols (abfd) != NULL -+ && bfd_get_symcount (abfd) != 0) -+ { -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0) -+ return FALSE; -+ -+ if (! NAME (aout, write_syms) (abfd)) -+ return FALSE; -+ } -+ -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) -+ return FALSE; -+ -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) -+ return FALSE; -+ -+ if (write_tparel (abfd, execp) != TRUE) -+ return FALSE; -+ -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Print private BFD data. Used by objdump -p. */ -+ -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr) -+{ -+ FILE *file = (FILE *) ptr; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ const char* symbol_format; -+ long stksize = 0; -+ -+ fprintf (file, "\n"); -+ -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags); -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd)); -+ -+ /* Stack size. */ -+ if (myinfo->stkpos != 0) -+ { -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long))) -+ return FALSE; -+ -+ stksize = bfd_get_signed_32 (abfd, &stksize); -+ } -+ fprintf (file, " Stack size: %ld\n", stksize); -+ -+ /* Symbol format. */ -+ switch (myinfo->symbol_format) -+ { -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break; -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break; -+ default: symbol_format = "?"; break; -+ } -+ fprintf (file, "Symbol format: %s\n", symbol_format); -+ -+ return TRUE; -+} -+ -+/* Special case for NAME (aout, get_section_contents) -+ It is not declared in libaout.h, neither implemented in aoutx.h. -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h. -+ So the default value of MY_get_section_contents provided by aout-target.h -+ is not correct, it has to be defined here with the right value. */ -+ -+#define MY_get_section_contents aout_32_get_section_contents -+ -+/* The following include will define m68kmint_prg_vec -+ and a default implementation for all the MY_ functions -+ not overriden here. */ -+ -+#include "aout-target.h" -+ -+/* Set the GEMDOS executable flags. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->prg_flags = prg_flags; -+ -+ return TRUE; -+} -+ -+/* Override the stack size. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->stack_size = stack_size; -+ myinfo->override_stack_size = TRUE; -+ -+ return TRUE; -+} -+ -+/* Add a TPA relocation entry. -+ It is called by BFD when linking the input sections, and by the -+ linker when it generates a reference to an address (in particular, -+ when building the constructors list). */ -+ -+bfd_boolean -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ /* Enlarge the buffer if necessary. */ -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated) -+ { -+ bfd_vma *newbuf; -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE; -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated); -+ if (newbuf == NULL) -+ return FALSE; -+ -+ myinfo->relocs = newbuf; -+ } -+ -+ /* The TPA relative relocation actually just adds the address of -+ the text segment (i. e. beginning of the executable in memory) -+ to the addresses at the specified locations. This allows an -+ executable to be loaded everywhere in the address space without -+ memory management. */ -+ myinfo->relocs[myinfo->relocs_used++] = address; -+ -+ return TRUE; -+} -diff -aurN binutils-2.21/bfd/targets.c binutils-2.21-mint-20110206/bfd/targets.c ---- binutils-2.21/bfd/targets.c 2010-10-22 14:08:28.000000000 +0200 -+++ binutils-2.21-mint-20110206/bfd/targets.c 2011-02-06 16:27:49.515625000 +0100 -@@ -763,6 +763,7 @@ - extern const bfd_target m68kcoff_vec; - extern const bfd_target m68kcoffun_vec; - extern const bfd_target m68klinux_vec; -+extern const bfd_target m68kmint_prg_vec; - extern const bfd_target m68knetbsd_vec; - extern const bfd_target m68ksysvcoff_vec; - extern const bfd_target m88kbcs_vec; -diff -aurN binutils-2.21/binutils/configure binutils-2.21-mint-20110206/binutils/configure ---- binutils-2.21/binutils/configure 2010-11-05 11:32:55.000000000 +0100 -+++ binutils-2.21-mint-20110206/binutils/configure 2011-02-06 16:27:50.000000000 +0100 -@@ -13049,7 +13049,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -aurN binutils-2.21/binutils/dlltool.c binutils-2.21-mint-20110206/binutils/dlltool.c ---- binutils-2.21/binutils/dlltool.c 2010-10-30 19:14:02.000000000 +0200 -+++ binutils-2.21-mint-20110206/binutils/dlltool.c 2011-02-06 16:27:50.203125000 +0100 -@@ -4347,7 +4347,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.21/binutils/dllwrap.c binutils-2.21-mint-20110206/binutils/dllwrap.c ---- binutils-2.21/binutils/dllwrap.c 2010-07-15 09:58:47.000000000 +0200 -+++ binutils-2.21-mint-20110206/binutils/dllwrap.c 2011-02-06 16:27:50.203125000 +0100 -@@ -263,7 +263,7 @@ - dash = cp; - - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.21/binutils/readelf.c binutils-2.21-mint-20110206/binutils/readelf.c ---- binutils-2.21/binutils/readelf.c 2010-11-02 15:36:35.000000000 +0100 -+++ binutils-2.21-mint-20110206/binutils/readelf.c 2011-02-06 16:27:50.218750000 +0100 -@@ -9879,7 +9879,11 @@ - #ifndef __MSVCRT__ - /* PR 11128: Use two separate invocations in order to work - around bugs in the Solaris 8 implementation of printf. */ -+#if GCC_VERSION < 3000 -+ printf (" [%6lx] ", (unsigned long) (data - start)); -+#else - printf (" [%6tx] ", data - start); -+#endif - printf ("%s\n", data); - #else - printf (" [%6Ix] %s\n", (size_t) (data - start), data); -diff -aurN binutils-2.21/binutils/resrc.c binutils-2.21-mint-20110206/binutils/resrc.c ---- binutils-2.21/binutils/resrc.c 2009-12-11 14:42:06.000000000 +0100 -+++ binutils-2.21-mint-20110206/binutils/resrc.c 2011-02-06 16:27:50.234375000 +0100 -@@ -396,7 +396,7 @@ - *space = 0; - - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__) - strchr (cmd, '\\') || - #endif - strchr (cmd, '/')) -@@ -514,7 +514,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -aurN binutils-2.21/gas/config/te-mint.h binutils-2.21-mint-20110206/gas/config/te-mint.h ---- binutils-2.21/gas/config/te-mint.h 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/gas/config/te-mint.h 2011-02-06 16:27:50.312500000 +0100 -@@ -0,0 +1,30 @@ -+/* Copyright 2008 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#define TE_MINT -+ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+/* These define interfaces. */ -+#ifdef OBJ_HEADER -+#include OBJ_HEADER -+#else -+#include "obj-format.h" -+#endif -diff -aurN binutils-2.21/gas/configure.tgt binutils-2.21-mint-20110206/gas/configure.tgt ---- binutils-2.21/gas/configure.tgt 2010-12-01 12:03:20.000000000 +0100 -+++ binutils-2.21-mint-20110206/gas/configure.tgt 2011-02-06 16:27:50.312500000 +0100 -@@ -266,6 +266,7 @@ - m68k-*-linux-*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf em=uclinux ;; - m68k-*-gnu*) fmt=elf ;; -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; -diff -aurN binutils-2.21/gas/testsuite/gas/all/weakref1u.d binutils-2.21-mint-20110206/gas/testsuite/gas/all/weakref1u.d ---- binutils-2.21/gas/testsuite/gas/all/weakref1u.d 2009-10-18 09:43:04.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/all/weakref1u.d 2011-02-06 16:27:50.328125000 +0100 -@@ -3,7 +3,7 @@ - #source: weakref1.s - # aout turns undefined into *ABS* symbols. - # see weakref1.d for comments on the other not-targets --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff - - # the rest of this file is generated with the following script: - # # script begin -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/all.exp binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/all.exp ---- binutils-2.21/gas/testsuite/gas/m68k/all.exp 2010-09-23 14:15:55.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/all.exp 2011-02-06 16:27:50.343750000 +0100 -@@ -71,9 +71,10 @@ - - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab" - -- if { [istarget *-*-netbsd] } then { -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then { - run_dump_test p3041 - run_dump_test p3041data -+ run_dump_test p3041pcrel - } - - set testname "68000 operands" -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isaa.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isaa.d ---- binutils-2.21/gas/testsuite/gas/m68k/br-isaa.d 2009-10-18 09:43:04.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isaa.d 2011-02-06 16:27:50.359375000 +0100 -@@ -1,7 +1,7 @@ - #name: br-isaa.d - #objdump: -dr - #as: -march=isaa -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isab.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isab.d ---- binutils-2.21/gas/testsuite/gas/m68k/br-isab.d 2009-10-18 09:43:04.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isab.d 2011-02-06 16:27:50.375000000 +0100 -@@ -1,7 +1,7 @@ - #name: br-isab.d - #objdump: -dr - #as: -march=isab -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isac.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isac.d ---- binutils-2.21/gas/testsuite/gas/m68k/br-isac.d 2009-10-18 09:43:04.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isac.d 2011-02-06 16:27:50.375000000 +0100 -@@ -1,7 +1,7 @@ - #name: br-isac.d - #objdump: -dr - #as: -march=isac -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/cpu32.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/cpu32.d ---- binutils-2.21/gas/testsuite/gas/m68k/cpu32.d 2007-05-15 11:21:24.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/cpu32.d 2011-02-06 16:27:50.390625000 +0100 -@@ -1,5 +1,5 @@ - #name: cpu32 --#objdump: -d -+#objdump: --architecture=m68k:cpu32 -d - #as: -mcpu32 - - .*: file format .* -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/mcf-coproc.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-coproc.d ---- binutils-2.21/gas/testsuite/gas/m68k/mcf-coproc.d 2007-07-03 09:54:19.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-coproc.d 2011-02-06 16:27:50.390625000 +0100 -@@ -1,4 +1,4 @@ --#objdump: -d -+#objdump: --architecture=m68k:547x -d - #as: -mcpu=5475 - - .*: file format .* -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/mcf-wdebug.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-wdebug.d ---- binutils-2.21/gas/testsuite/gas/m68k/mcf-wdebug.d 2007-06-18 18:10:27.000000000 +0200 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-wdebug.d 2011-02-06 16:27:50.406250000 +0100 -@@ -1,5 +1,5 @@ - #name: mcf-wdebug --#objdump: -d -+#objdump: --architecture=m68k:5200 -d - #as: -m5208 - - .*: file format .* -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.d ---- binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.d 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.d 2011-02-06 16:27:50.421875000 +0100 -@@ -0,0 +1,38 @@ -+#name: PR 3041 pcrel -+#as: -m68000 -+#objdump: -tdr -+ -+.*: file format .* -+ -+SYMBOL TABLE: -+00000024 w \.text 0000 00 0f mytext -+0000002e w \.data 0000 00 10 mydata -+0000003a w \.bss 0000 00 11 mybss -+ -+Disassembly of section \.text: -+ -+00000000 <.*>: -+ 0: 41fa fffe lea %pc@\(0 <.*>\),%a0 -+ 2: DISP16 mytext -+ 4: 41fa fffc lea %pc@\(2 <.*>\),%a0 -+ 6: DISP16 mytext -+ 8: 41fa fff2 lea %pc@\(fffffffc <.*>\),%a0 -+ a: DISP16 mytext -+ c: 41fa fff2 lea %pc@\(0 <.*>\),%a0 -+ e: DISP16 mydata -+ 10: 41fa fff1 lea %pc@\(3 <.*>\),%a0 -+ 12: DISP16 mydata -+ 14: 41fa ffe9 lea %pc@\(ffffffff <.*>\),%a0 -+ 16: DISP16 mydata -+ 18: 41fa ffe6 lea %pc@\(0 <.*>\),%a0 -+ 1a: DISP16 mybss -+ 1c: 41fa ffe3 lea %pc@\(1 <.*>\),%a0 -+ 1e: DISP16 mybss -+ 20: 41fa ffdc lea %pc@\(fffffffe <.*>\),%a0 -+ 22: DISP16 mybss -+ -+00000024 : -+ 24: 4e71 nop -+ 26: 4e71 nop -+ 28: 4e71 nop -+ 2a: 4e71 nop -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.s binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.s ---- binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.s 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.s 2011-02-06 16:27:50.437500000 +0100 -@@ -0,0 +1,28 @@ -+ lea mytext(%pc),%a0 -+ lea mytext+2(%pc),%a0 -+ lea mytext-4(%pc),%a0 -+ lea mydata(%pc),%a0 -+ lea mydata+3(%pc),%a0 -+ lea mydata-1(%pc),%a0 -+ lea mybss(%pc),%a0 -+ lea mybss+1(%pc),%a0 -+ lea mybss-2(%pc),%a0 -+ .weak mytext -+mytext: -+ nop -+ nop -+ nop -+ nop -+ -+ .data -+ .word 0x8081 -+ .weak mydata -+mydata: -+ .word 0x8283 -+ .word 0x8485 -+ -+ .bss -+ .skip 6 -+ .weak mybss -+mybss: -+ .skip 2 -diff -aurN binutils-2.21/gprof/corefile.c binutils-2.21-mint-20110206/gprof/corefile.c ---- binutils-2.21/gprof/corefile.c 2010-07-16 16:52:15.000000000 +0200 -+++ binutils-2.21-mint-20110206/gprof/corefile.c 2011-02-06 16:30:48.015625000 +0100 -@@ -678,7 +678,7 @@ - } - } - -- symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0; -+ symtab.limit->is_func = TRUE; - symtab.limit->is_bb_head = TRUE; - - if (cxxclass == 't') -diff -aurN binutils-2.21/include/filenames.h binutils-2.21-mint-20110206/include/filenames.h ---- binutils-2.21/include/filenames.h 2010-04-26 20:04:23.000000000 +0200 -+++ binutils-2.21-mint-20110206/include/filenames.h 2011-02-06 16:27:50.453125000 +0100 -@@ -30,7 +30,7 @@ - extern "C" { - #endif - --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__) - # ifndef HAVE_DOS_BASED_FILE_SYSTEM - # define HAVE_DOS_BASED_FILE_SYSTEM 1 - # endif -diff -aurN binutils-2.21/include/getopt.h binutils-2.21-mint-20110206/include/getopt.h ---- binutils-2.21/include/getopt.h 2005-05-10 12:21:08.000000000 +0200 -+++ binutils-2.21-mint-20110206/include/getopt.h 2011-02-06 16:27:50.453125000 +0100 -@@ -106,7 +106,7 @@ - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ - #if !HAVE_DECL_GETOPT --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT) - /* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in unistd.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -diff -aurN binutils-2.21/ld/Makefile.am binutils-2.21-mint-20110206/ld/Makefile.am ---- binutils-2.21/ld/Makefile.am 2010-11-03 04:22:01.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/Makefile.am 2011-02-06 16:27:50.671875000 +0100 -@@ -300,6 +300,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1394,6 +1395,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -aurN binutils-2.21/ld/Makefile.in binutils-2.21-mint-20110206/ld/Makefile.in ---- binutils-2.21/ld/Makefile.in 2010-11-05 11:34:22.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/Makefile.in 2011-02-06 16:27:50.718750000 +0100 -@@ -600,6 +600,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1199,6 +1200,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@ -@@ -2817,6 +2819,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -aurN binutils-2.21/ld/configure binutils-2.21-mint-20110206/ld/configure ---- binutils-2.21/ld/configure 2010-11-23 14:50:32.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/configure 2011-02-06 16:27:51.234375000 +0100 -@@ -12978,7 +12978,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -aurN binutils-2.21/ld/configure.tgt binutils-2.21-mint-20110206/ld/configure.tgt ---- binutils-2.21/ld/configure.tgt 2010-12-01 12:03:47.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/configure.tgt 2011-02-06 16:27:51.437500000 +0100 -@@ -343,6 +343,7 @@ - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; - m68k-*-uclinux*) targ_emul=m68kelf ;; - m68*-*-gnu*) targ_emul=m68kelf ;; -+m68*-*-mint*) targ_emul=m68kmint ;; - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd - targ_extra_emuls="m68knbsd m68kelfnbsd" ;; - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd -diff -aurN binutils-2.21/ld/emulparams/m68kmint.sh binutils-2.21-mint-20110206/ld/emulparams/m68kmint.sh ---- binutils-2.21/ld/emulparams/m68kmint.sh 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/emulparams/m68kmint.sh 2011-02-06 16:27:51.437500000 +0100 -@@ -0,0 +1,6 @@ -+SCRIPT_NAME=m68kmint -+OUTPUT_FORMAT="a.out-mintprg" -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big" -+TEXT_START_ADDR=0xe4 -+ARCH=m68k -+EXTRA_EM_FILE=mint -diff -aurN binutils-2.21/ld/emultempl/generic.em binutils-2.21-mint-20110206/ld/emultempl/generic.em ---- binutils-2.21/ld/emultempl/generic.em 2009-09-02 09:25:35.000000000 +0200 -+++ binutils-2.21-mint-20110206/ld/emultempl/generic.em 2011-02-06 16:27:51.453125000 +0100 -@@ -138,8 +138,8 @@ - ${LDEMUL_PLACE_ORPHAN-NULL}, - ${LDEMUL_SET_SYMBOLS-NULL}, - ${LDEMUL_PARSE_ARGS-NULL}, -- NULL, /* add_options */ -- NULL, /* handle_option */ -+ ${LDEMUL_ADD_OPTIONS-NULL}, -+ ${LDEMUL_HANDLE_OPTION-NULL}, - ${LDEMUL_UNRECOGNIZED_FILE-NULL}, - ${LDEMUL_LIST_OPTIONS-NULL}, - ${LDEMUL_RECOGNIZED_FILE-NULL}, -diff -aurN binutils-2.21/ld/emultempl/mint.em binutils-2.21-mint-20110206/ld/emultempl/mint.em ---- binutils-2.21/ld/emultempl/mint.em 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/emultempl/mint.em 2011-02-06 16:27:51.468750000 +0100 -@@ -0,0 +1,330 @@ -+# This shell script emits a C file. -*- C -*- -+# Copyright 2006, 2007 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. -+# -+ -+# This file is sourced from generic.em -+# -+fragment < Set all the flags with an integer raw value\n")); -+ fprintf (file, _(" --stack Override the stack size (suffix k or M allowed)\n")); -+} -+ -+/* This callback is called by lang_for_each_statement. It checks that the -+ output sections speficied in the linker script are compatible with the MiNT -+ executable format. */ -+ -+static void -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_output_section_statement_enum) -+ { -+ lang_output_section_statement_type *oss = &s->output_section_statement; -+ -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR}) -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"), -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma); -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ } -+} -+ -+/* This callback is called by lang_for_each_statement. It looks for the data -+ statements of type REL generated by the linker, and adds a TPA relocation -+ entry for them. This is used by the CONSTRUCTORS list. */ -+ -+static void -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_data_statement_enum) -+ { -+ lang_data_statement_type *ds = &s->data_statement; -+ -+ if (ds->exp->type.node_code == REL) -+ { -+ if (ds->type == LONG) -+ { -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset; -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address)) -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd); -+ } -+ else -+ { -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"), -+ link_info.output_bfd, ds->output_section, ds->output_offset); -+ } -+ } -+ } -+} -+ -+/* Final emulation specific call. */ -+ -+static void -+gld${EMULATION_NAME}_finish (void) -+{ -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */ -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0) -+ return; -+ -+ /* Check the output sections. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections); -+ -+ /* Set the GEMDOS executable header flags. */ -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags)) -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd); -+ -+ /* Override the stack size. */ -+ if (override_stack_size) -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size)) -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd); -+ -+ /* Generate TPA relocation entries for the data statements. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs); -+} -+ -+EOF -+ -+# Put these extra routines in ld_${EMULATION_NAME}_emulation -+# -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish -diff -aurN binutils-2.21/ld/scripttempl/m68kmint.sc binutils-2.21-mint-20110206/ld/scripttempl/m68kmint.sc ---- binutils-2.21/ld/scripttempl/m68kmint.sc 1970-01-01 01:00:00.000000000 +0100 -+++ binutils-2.21-mint-20110206/ld/scripttempl/m68kmint.sc 2011-02-06 16:27:51.484375000 +0100 -@@ -0,0 +1,35 @@ -+cat <prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags); -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos); -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format); -+ -+ /* TPA relocation information. */ -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos); -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size); -+ -+ /* FIXME: Currently we always read the TPA relative relocation -+ information. This is suboptimal because often times there -+ is no need for it. Read it only if need be! Maybe this should -+ also depend on abfd->cacheable? */ -+ if (myinfo->tparel_size == 0) -+ myinfo->tparel = bfd_zalloc (abfd, 4); -+ else -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size); -+ -+ if (myinfo->tparel == NULL) -+ return NULL; -+ -+ if (myinfo->tparel_size == 0) -+ { -+ myinfo->tparel_size = 4; -+ } -+ else -+ { -+ /* Read the information from the bfd. */ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size)) -+ return NULL; -+ } -+ -+ return target; -+} -+ -+/* Free all information we have cached for this BFD. We can always -+ read it again later if we need it. */ -+ -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info -+ -+static bfd_boolean -+m68kmint_prg_bfd_free_cached_info (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo != NULL && myinfo->relocs != NULL) -+ { -+ free (myinfo->relocs); -+ myinfo->relocs = NULL; -+ } -+ -+ /* myinfo itself has been allocated by bfd_zalloc() -+ so will be automatically freed along with the BFD. -+ Same for myinfo->tparel. */ -+ -+ return NAME (aout, bfd_free_cached_info) (abfd); -+} -+ -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the -+ symbol exceeds 8 characters write a long symbol. If it -+ exceeds 22 characters truncate the name. */ -+ -+static int -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value) -+{ -+ int written_bytes = 0; -+ struct dri_symbol sym; -+ int is_long_name = strlen (name) > sizeof (sym.a_name); -+ -+ if (is_long_name) -+ type |= A_LNAM; -+ -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name)); -+ bfd_put_16 (abfd, type, sym.a_type); -+ bfd_put_32 (abfd, value, sym.a_value); -+ -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ -+ if (is_long_name) -+ { -+ char more_name[DRI_SYMBOL_SIZE]; -+ -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE); -+ -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ } -+ -+ return written_bytes; -+} -+ -+/* Emit a traditional DRI symbol table while linking. -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */ -+ -+static bfd_boolean -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info) -+{ -+ bfd *input_bfd; -+ enum bfd_link_strip strip = info->strip; -+ enum bfd_link_discard discard = info->discard; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd *last_archive = NULL; -+ -+ /* Position file pointer. */ -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size = 0; -+ -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next) -+ { -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd); -+ struct external_nlist *sym_end = sym + sym_count; -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd); -+ bfd_boolean pass = FALSE; -+ bfd_boolean skip = FALSE; -+ bfd_boolean skip_next = FALSE; -+ int written_bytes; -+ int a_type; -+ bfd_boolean write_archive_name = FALSE; -+ bfd_vma val = 0; -+ -+ /* First write out a symbol for the archive if we do not -+ strip these symbols and if it differs from the last -+ one. */ -+ if (input_bfd->my_archive != last_archive -+ && input_bfd->my_archive != NULL) -+ { -+ write_archive_name = TRUE; -+ last_archive = input_bfd->my_archive; -+ } -+ -+ if (write_archive_name -+ && strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, -+ input_bfd->my_archive->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, -+ input_bfd->my_archive->filename, -+ A_TFILE, val); -+ -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now write out a symbol for the object file if we do not -+ strip these symbols. */ -+ if (strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename, -+ A_TFILE, val); -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now we have a problem. All symbols that we see have already -+ been marked written (because we write them a second time -+ here. If we would do it the clean way we would have -+ to traverse the entire symbol map and reset the written -+ flag. We hack here instead... */ -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1) -+#define is_written(h) ((int) h->written == (int) TRUE + 1) -+ for (; sym < sym_end; sym++, sym_hash++) -+ { -+ const char *name; -+ int type; -+ struct aout_link_hash_entry *h; -+ asection *symsec; -+ val = 0; -+ -+ type = H_GET_8 (input_bfd, sym->e_type); -+ name = strings + GET_WORD (input_bfd, sym->e_strx); -+ -+ h = NULL; -+ -+ if (pass) -+ { -+ /* Pass this symbol through. It is the target of an -+ indirect or warning symbol. */ -+ val = GET_WORD (input_bfd, sym->e_value); -+ pass = FALSE; -+ } -+ else if (skip_next) -+ { -+ /* Skip this symbol, which is the target of an indirect -+ symbol that we have changed to no longer be an indirect -+ symbol. */ -+ skip_next = FALSE; -+ continue; -+ } -+ else -+ { -+ struct aout_link_hash_entry *hresolve = *sym_hash; -+ -+ /* We have saved the hash table entry for this symbol, if -+ there is one. Note that we could just look it up again -+ in the hash table, provided we first check that it is an -+ external symbol. */ -+ h = *sym_hash; -+ -+ /* Use the name from the hash table, in case the symbol was -+ wrapped. */ -+ if (h != NULL -+ && h->root.type != bfd_link_hash_warning) -+ name = h->root.root.string; -+ -+ /* If this is an indirect or warning symbol, then change -+ hresolve to the base symbol. */ -+ hresolve = h; -+ if (h != (struct aout_link_hash_entry *) NULL -+ && (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning)) -+ { -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link; -+ while (hresolve->root.type == bfd_link_hash_indirect -+ || hresolve->root.type == bfd_link_hash_warning) -+ hresolve = ((struct aout_link_hash_entry*) -+ hresolve->root.u.i.link); -+ } -+ -+ /* If the symbol has already been written out skip it. */ -+ if (h != NULL -+ && is_written (h)) -+ { -+ if ((type & N_TYPE) == N_INDR -+ || type == N_WARNING) -+ skip_next = TRUE; -+ continue; -+ } -+ -+ /* See if we are stripping this symbol. */ -+ skip = FALSE; -+ -+ /* Skip all debugger symbols. No way to output them in -+ DRI format. This will also reduce a lot of headaches. */ -+ if ((type & N_STAB) != 0) -+ skip = TRUE; -+ -+ switch (strip) -+ { -+ case strip_none: -+ case strip_debugger: -+ break; -+ case strip_some: -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) -+ == NULL) -+ skip = TRUE; -+ break; -+ case strip_all: -+ skip = TRUE; -+ break; -+ } -+ -+ if (skip) -+ { -+ if (h != NULL) -+ mark_written (h); -+ continue; -+ } -+ -+ /* Get the value of the symbol. */ -+ if ((type & N_TYPE) == N_TEXT -+ || type == N_WEAKT) -+ symsec = obj_textsec (input_bfd); -+ else if ((type & N_TYPE) == N_DATA -+ || type == N_WEAKD) -+ symsec = obj_datasec (input_bfd); -+ else if ((type & N_TYPE) == N_BSS -+ || type == N_WEAKB) -+ symsec = obj_bsssec (input_bfd); -+ else if ((type & N_TYPE) == N_ABS -+ || type == N_WEAKA) -+ symsec = bfd_abs_section_ptr; -+ else if (((type & N_TYPE) == N_INDR -+ && (hresolve == NULL -+ || (hresolve->root.type != bfd_link_hash_defined -+ && hresolve->root.type != bfd_link_hash_defweak -+ && hresolve->root.type != bfd_link_hash_common))) -+ || type == N_WARNING) -+ { -+ /* Pass the next symbol through unchanged. The -+ condition above for indirect symbols is so that if -+ the indirect symbol was defined, we output it with -+ the correct definition so the debugger will -+ understand it. */ -+ pass = TRUE; -+ val = GET_WORD (input_bfd, sym->e_value); -+ symsec = NULL; -+ } -+ else -+ { -+ /* If we get here with an indirect symbol, it means that -+ we are outputting it with a real definition. In such -+ a case we do not want to output the next symbol, -+ which is the target of the indirection. */ -+ if ((type & N_TYPE) == N_INDR) -+ skip_next = TRUE; -+ -+ symsec = NULL; -+ -+ /* We need to get the value from the hash table. We use -+ hresolve so that if we have defined an indirect -+ symbol we output the final definition. */ -+ if (h == NULL) -+ { -+ switch (type & N_TYPE) -+ { -+ case N_SETT: -+ symsec = obj_textsec (input_bfd); -+ break; -+ case N_SETD: -+ symsec = obj_datasec (input_bfd); -+ break; -+ case N_SETB: -+ symsec = obj_bsssec (input_bfd); -+ break; -+ case N_SETA: -+ symsec = bfd_abs_section_ptr; -+ break; -+ default: -+ val = 0; -+ break; -+ } -+ } -+ else if (hresolve->root.type == bfd_link_hash_defined -+ || hresolve->root.type == bfd_link_hash_defweak) -+ { -+ asection *input_section; -+ asection *output_section; -+ -+ /* This case usually means a common symbol which was -+ turned into a defined symbol. */ -+ input_section = hresolve->root.u.def.section; -+ output_section = input_section->output_section; -+ BFD_ASSERT (bfd_is_abs_section (output_section) -+ || output_section->owner == abfd); -+ -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (hresolve->root.u.def.value -+ /*+ bfd_get_section_vma (abfd, output_section)*/ -+ + input_section->output_offset); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (output_section == obj_textsec (abfd)) -+ val += TEXT_START_ADDR; -+ -+ /* Get the correct type based on the section. If -+ this is a constructed set, force it to be -+ globally visible. */ -+ if (type == N_SETT -+ || type == N_SETD -+ || type == N_SETB -+ || type == N_SETA) -+ type |= N_EXT; -+ -+ type &=~ N_TYPE; -+ -+ if (output_section == obj_textsec (abfd)) -+ type |= N_TEXT; -+ else if (output_section == obj_datasec (abfd)) -+ type |= N_DATA; -+ else if (output_section == obj_bsssec (abfd)) -+ type |= N_BSS; -+ else -+ type |= N_ABS; -+ } -+ else if (hresolve->root.type == bfd_link_hash_common) -+ val = hresolve->root.u.c.size; -+ else if (hresolve->root.type == bfd_link_hash_undefweak) -+ { -+ val = 0; -+ type = N_UNDF; -+ } -+ else -+ val = 0; -+ } -+ if (symsec != NULL) -+ { -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (/*symsec->output_section->vma -+ +*/ symsec->output_offset -+ + (GET_WORD (input_bfd, sym->e_value) -+ - symsec->vma)); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (symsec == obj_textsec (input_bfd)) -+ val += TEXT_START_ADDR; -+ } -+ -+ /* If this is a global symbol set the written flag, and if -+ it is a local symbol see if we should discard it. */ -+ if (h != NULL) -+ { -+ mark_written (h); -+ } -+ else if ((type & N_TYPE) != N_SETT -+ && (type & N_TYPE) != N_SETD -+ && (type & N_TYPE) != N_SETB -+ && (type & N_TYPE) != N_SETA) -+ { -+ switch (discard) -+ { -+ case discard_none: -+ case discard_sec_merge: -+ break; -+ case discard_l: -+ if (bfd_is_local_label_name (input_bfd, name)) -+ skip = TRUE; -+ break; -+ default: -+ case discard_all: -+ skip = TRUE; -+ break; -+ } -+ if (skip) -+ { -+ pass = FALSE; -+ continue; -+ } -+ } -+ } -+ -+ /* Now find the nearest type in DRI format. */ -+ switch (type) -+ { -+ case N_ABS: -+ case N_ABS | N_EXT: -+ case N_SETA: -+ case N_SETA | N_EXT: -+ case N_WEAKA: -+ a_type = A_EQU | A_DEF | A_GLOBL; -+ break; -+ case N_TEXT: -+ case N_TEXT | N_EXT: -+ case N_SETT: -+ case N_SETT | N_EXT: -+ case N_WEAKT: -+ a_type = A_TEXT | A_DEF | A_GLOBL; -+ break; -+ case N_DATA: -+ case N_DATA | N_EXT: -+ case N_SETD: -+ case N_SETD | N_EXT: -+ case N_WEAKD: -+ a_type = A_DATA | A_DEF | A_GLOBL; -+ break; -+ case N_BSS: -+ case N_BSS | N_EXT: -+ case N_SETB: -+ case N_SETB | N_EXT: -+ case N_WEAKB: -+ a_type = A_BSS | A_DEF | A_GLOBL; -+ break; -+ default: -+ continue; -+ } -+ -+ written_bytes = write_dri_symbol (abfd, name, a_type, val); -+ if (written_bytes < 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ } -+ -+ obj_aout_external_string_size (abfd) = 0; -+ return TRUE; -+} -+ -+/* This is used for qsort() to sort addresses -+ for the TPA relocation table. */ -+ -+static int -+vma_cmp (const void *v1, const void *v2) -+{ -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2))); -+} -+ -+/* Alloc and fill the TPA relocation table. */ -+ -+static bfd_boolean -+fill_tparel (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ unsigned long i; -+ bfd_size_type bytes; -+ unsigned char *ptr; -+ -+ /* Sort the relocation info. */ -+ if (myinfo->relocs != NULL) -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma), -+ vma_cmp); -+ -+ /* Now calculate the number of bytes we need. The relocation info -+ is encoded as follows: The first entry is a 32-bit value -+ denoting the first offset to relocate. All following entries -+ are relative to the preceding one. For relative offsets of -+ more than 254 bytes a value of 1 is used. The OS will then -+ add 254 bytes to the current offset. The list is then terminated -+ with the byte 0. */ -+ bytes = 4; /* First entry is a long. */ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ BFD_ASSERT(diff > 0); -+ bytes += (diff + 253) / 254; -+ } -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */ -+ if (myinfo->relocs_used > 0) -+ bytes++; -+ -+ myinfo->tparel_size = bytes; -+ myinfo->tparel = bfd_alloc (abfd, bytes); -+ if (myinfo->tparel == NULL) -+ return FALSE; -+ -+ /* Now fill the array. */ -+ ptr = (bfd_byte*) myinfo->tparel; -+ if (myinfo->relocs != NULL) -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr); -+ else -+ bfd_put_32 (abfd, 0, ptr); -+ ptr += 4; -+ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ while (diff > 254) -+ { -+ *ptr++ = 1; -+ diff -= 254; -+ } -+ *ptr++ = (bfd_byte) diff; -+ } -+ -+ if (myinfo->relocs_used > 0) -+ *ptr = 0; -+ -+ return TRUE; -+} -+ -+/* Final link routine. We need to use a call back to get the correct -+ offsets in the output file. And we need to malloc some internal -+ buffers. */ -+ -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link -+ -+static bfd_boolean -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ struct bfd_link_hash_table *hash = info->hash; -+ enum bfd_link_strip original_strip = info->strip; -+ -+ if (info->relocatable) -+ { -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s", -+ abfd, bfd_get_target (abfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ myinfo->linkinfo = info; -+ -+ /* Make sure that for now we never write zmagics. */ -+ abfd->flags &= ~D_PAGED; -+ -+ /* Find the __stksize symbol. This symbol is used for a MiNT -+ special kludge. The libc defines this symbol in an object file -+ initialized to a default value to make sure it is defined in -+ every output file. The start-up code in crtinit() then simply -+ sets the stacksize accordingly. In your programs (if they need -+ an unusual stacksize) you can then simply code: -+ -+ long _stksize = 0x2000; -+ -+ This will create a program stack of 2k. Since MiNT cannot detect -+ a stack overflow this is the only way to prevent program crashes -+ caused by a stack that is too small. -+ -+ The ancient linker ignored this feature, the ancient strip -+ program paid heed to it. By default, strip never stripped this -+ special symbol from the binary. -+ -+ Another program called ``printstk'' and its colleague ``fixstk'' -+ could be used to either print the current value of the stacksize -+ or to modify it without recompiling and rebuilding. These -+ programs traversed the symbol table and then took the appropriate -+ measures if the symbol was found. -+ -+ Here we do a different approach. Since we already expanded the -+ standard executable header we now hardcode the address (as a file -+ offset) that the __stksize symbol points to into the header. We -+ can now let strip safely remove the entry from the symbol table -+ and we're not dependent on a special format of the symbol table. -+ Because the address is kept in the header we will always be able -+ to manipulate the stacksize value later. */ -+ if (hash != NULL) -+ { -+ struct aout_link_hash_entry *h = -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize", -+ FALSE, FALSE, FALSE); -+ asection *sec; -+ -+ if (h != NULL) -+ { -+ switch (h->root.type) -+ { -+ case bfd_link_hash_defined: -+ case bfd_link_hash_defweak: -+ sec = h->root.u.def.section->output_section; -+ BFD_ASSERT (sec->owner == abfd); -+ -+ myinfo->stkpos = (h->root.u.def.value + sec->vma -+ + h->root.u.def.section->output_offset -+ + GEMDOS_HEADER_SIZE); -+ break; -+ default: /* Ignore other types. */ -+ break; -+ } -+ } -+ } -+ -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ myinfo->traditional_format = TRUE; -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI; -+ } -+ -+ /* Unconditionally unset the traditional flag. The only effect in -+ the a.out code is to disable string hashing (with respect to -+ SunOS gdx). This is not necessary for us. */ -+ -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT; -+ -+ /* Do not write GNU symbols in traditional format. */ -+ if (myinfo->traditional_format) -+ info->strip = strip_all; -+ -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback) -+ != TRUE) -+ return FALSE; -+ -+ if (myinfo->reloc_error) -+ return FALSE; -+ -+ /* Restore the strip status for the traditional symbols. */ -+ info->strip = original_strip; -+ -+ if (myinfo->traditional_format -+ && link_write_traditional_syms (abfd, info) != TRUE) -+ return FALSE; -+ -+ if (fill_tparel (abfd) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Copy private BFD header information from the input BFD. */ -+ -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* We can only copy BFD files using our own file format. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s", -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Copy backend specific data from one object module to another. -+ This function is used by objcopy and strip. */ -+ -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ struct mint_internal_info *myinfo_in; -+ struct mint_internal_info *myinfo_out; -+ -+ /* obfd uses our file format, ibfd may be foreign. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ return TRUE; -+ -+ myinfo_in = obj_aout_ext (ibfd); -+ BFD_ASSERT (myinfo_in != NULL); -+ -+ myinfo_out = obj_aout_ext (obfd); -+ BFD_ASSERT (myinfo_out != NULL); -+ -+ /* Copy myinfo. */ -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out)); -+ -+ /* Copy tparel. */ -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size); -+ if (myinfo_out->tparel == NULL) -+ return FALSE; -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size); -+ -+ /* Normalize the type of empty symbols. */ -+ if (bfd_get_symcount (obfd) == 0) -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Merge private BFD information from an input BFD to the output BFD when linking. */ -+ -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* Our file format cannot be used as linker input. */ -+ if (ibfd->xvec == &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input", -+ ibfd, bfd_get_target (ibfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Find out the symbol name. */ -+ -+static const char * -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd, -+ bfd_byte *location, struct reloc_std_external *rel) -+{ -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct aout_link_hash_entry **sym_hashes -+ = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = NULL; -+ const char *name; -+ bfd_size_type r_index; -+ int r_extern; -+ -+ if (bfd_get_reloc_size (howto) != 4) -+ return "(not a symbol)"; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+ if (sym_hashes != NULL) -+ h = sym_hashes[r_index]; -+ -+ if (!r_extern) -+ { -+ bfd_size_type i; -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location); -+ -+ name = NULL; -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++) -+ { -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value); -+ -+ if (this_value == wanted_value) -+ { -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type); -+ -+ /* Skip debug symbols and the like. */ -+ if ((symtype & N_STAB) != 0) -+ continue; -+ -+ /* This is dirty but preferable to a plethoria of -+ single comparisons. */ -+ if (symtype <= (N_BSS | N_EXT) -+ || (symtype >= N_WEAKU && symtype <= N_COMM)) -+ { -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx); -+ break; -+ } -+ } -+ } -+ -+ /* FIXME: If the relocation is against a section there is -+ probably a symbol for that section floating around somewhere -+ in the bfd jungle. */ -+ if (name == NULL) -+ { -+ switch ((r_index & N_TYPE) & ~N_EXT) -+ { -+ case N_TEXT: -+ name = "text section"; -+ break; -+ case N_DATA: -+ name = "data section"; -+ break; -+ case N_BSS: -+ name = "bss section"; -+ break; -+ case N_ABS: -+ name = "absolute section"; -+ break; -+ default: -+ name = "unknown section"; -+ break; -+ } -+ } -+ } -+ else if (h != NULL) -+ name = h->root.root.string; -+ else if (r_index >= obj_aout_external_sym_count (input_bfd)) -+ name = "(unknown symbol)"; /* Shouldn't happen. */ -+ else -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); -+ -+ return name; -+} -+ -+/* This relocation routine is used by some of the backend linkers. -+ They do not construct asymbol or arelent structures, so there is no -+ reason for them to use bfd_perform_relocation. Also, -+ bfd_perform_relocation is so hacked up it is easier to write a new -+ function than to try to deal with it. -+ -+ This routine does a final relocation. Whether it is useful for a -+ relocatable link depends upon how the object format defines -+ relocations. -+ -+ FIXME: This routine ignores any special_function in the HOWTO, -+ since the existing special_function values have been written for -+ bfd_perform_relocation. -+ -+ HOWTO is the reloc howto information. -+ INPUT_BFD is the BFD which the reloc applies to. -+ INPUT_SECTION is the section which the reloc applies to. -+ CONTENTS is the contents of the section. -+ ADDRESS is the address of the reloc within INPUT_SECTION. -+ VALUE is the value of the symbol the reloc refers to. -+ ADDEND is the addend of the reloc. */ -+ -+/* The additional parameter REL is specific to this backend. -+ This function is derived from _bfd_final_link_relocate() -+ found in reloc.c. It adds additional checking for dangerous -+ relocations in MiNT sharable text sections, then it records -+ the relocated offset in myinfo->relocs[] for further processing. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel) -+{ -+ bfd_vma relocation; -+ bfd *output_bfd = input_section->output_section->owner; -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd); -+ bfd_reloc_status_type retval; -+ int r_index; -+ int r_extern; -+ bfd_boolean need_tpa_relocation; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+#define _MINT_F_SHTEXT 0x800 -+ -+ /* Sanity check the address. */ -+ if (address > bfd_get_section_limit (input_bfd, input_section)) -+ return bfd_reloc_outofrange; -+ -+ /* This function assumes that we are dealing with a basic relocation -+ against a symbol. We want to compute the value of the symbol to -+ relocate to. This is just VALUE, the value of the symbol, plus -+ ADDEND, any addend associated with the reloc. */ -+ relocation = value + addend; -+ -+ /* Check for dangerous relocations in images with a sharable -+ text section. */ -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0 -+ && bfd_get_reloc_size (howto) == 4) -+ { -+ bfd_boolean error_found = FALSE; -+ const char *name = NULL; -+ -+ if (input_section == obj_textsec (input_bfd)) -+ { -+ if (!r_extern) -+ { -+ /* This is a relocation against another section. Only -+ relocations against the text section are allowed. */ -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT)) -+ error_found = TRUE; -+ } -+ else if (relocation > (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ error_found = TRUE; -+ } -+ else if (relocation == (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ if (strcmp (name, "_etext") == 0) -+ error_found = FALSE; -+ } -+ } -+ -+ if (error_found) -+ { -+ const struct bfd_link_callbacks *callbacks -+ = myinfo->linkinfo->callbacks; -+ -+ myinfo->reloc_error = TRUE; -+ -+ if (callbacks->reloc_dangerous != NULL) -+ { -+ if (name == NULL) -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ -+ callbacks->reloc_dangerous (myinfo->linkinfo, name, -+ input_bfd, -+ input_section, address); -+ } -+ } -+ } -+ -+ /* If the relocation is PC relative, we want to set RELOCATION to -+ the distance between the symbol (currently in RELOCATION) and the -+ location we are relocating. Some targets (e.g., i386-aout) -+ arrange for the contents of the section to be the negative of the -+ offset of the location within the section; for such targets -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF) -+ simply leave the contents of the section as zero; for such -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not -+ need to subtract out the offset of the location within the -+ section (which is just ADDRESS). */ -+ if (howto->pc_relative) -+ { -+ relocation -= (input_section->output_section->vma -+ + input_section->output_offset); -+ if (howto->pcrel_offset) -+ relocation -= address; -+ } -+ -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation, -+ contents + address); -+ -+ /* The symbol has to be relocated again iff the length of the relocation -+ is 2 words and it is not pc relative. */ -+ need_tpa_relocation = FALSE; -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4) -+ { -+ if (r_extern) -+ { -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = sym_hashes[r_index]; -+ asection *output_section = h->root.u.def.section->output_section; -+ -+ /* Do not relocate absolute symbols. */ -+ if (output_section == obj_textsec (output_bfd) -+ || output_section == obj_datasec (output_bfd) -+ || output_section == obj_bsssec (output_bfd)) -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ else -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ -+ /* Here we add the TPA relocation entries for the address references -+ located inside the input sections. Note that if some references -+ to addresses are generated using data statements in the linker -+ script, they will not be relocated here because they do not -+ belong to any input section. */ -+ if (need_tpa_relocation) -+ { -+ bfd_vma tpa_address = input_section->output_section->vma -+ + input_section->output_offset + address; -+ -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address)) -+ return bfd_reloc_other; -+ } -+ -+ return retval; -+} -+ -+/* Write out the TPA relocation table. */ -+ -+static bfd_boolean -+write_tparel (bfd *abfd, struct internal_exec *execp) -+{ -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo->dri_symtab_size == 0) -+ myinfo->tparel_pos = N_STROFF (*execp) -+ + obj_aout_external_string_size (abfd); -+ else -+ myinfo->tparel_pos = N_SYMOFF (*execp) -+ + myinfo->dri_symtab_size; -+ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Write the full exec header. -+ This function must be called last to ensure that we have all the -+ information needed to fill the MiNT-specific header fields. */ -+ -+static bfd_boolean -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd_size_type symtab_size; -+ -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch); -+ -+ /* The OS will load our extension header fields into the text segment. */ -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE), -+ exec_bytes->g_text); -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data); -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss); -+ -+ /* The OS' notion of the size of the symbol table is another than -+ the bfd library's. We have to fill in the size of the table -+ itself plus the size of the string table but only if we have not written -+ a traditional symbol table. If we have written a traditional symbol -+ table we know the size. */ -+ if (myinfo->dri_symtab_size != 0) -+ symtab_size = myinfo->dri_symtab_size; -+ else -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp); -+ -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms); -+ -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic); -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags); -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs); -+ -+ /* Generate the jump instruction to the entry point. In m68k -+ assembler mnemnonics it looks more or less like this: -+ -+ move.l exec_bytes->e_entry(pc),d0 -+ jmp -6(pc,d0.l) -+ -+ Sorry for the wrong syntax. As a real assembler addict I -+ never actually use an assembler. I edit my binaries manually -+ with a hex editor, looks much cooler and it strengthens your -+ abstraction abilities. */ -+ -+ exec_bytes->g_jump_entry[0] = 0x20; -+ exec_bytes->g_jump_entry[1] = 0x3a; -+ exec_bytes->g_jump_entry[2] = 0x00; -+ exec_bytes->g_jump_entry[3] = 0x1a; -+ exec_bytes->g_jump_entry[4] = 0x4e; -+ exec_bytes->g_jump_entry[5] = 0xfb; -+ exec_bytes->g_jump_entry[6] = 0x08; -+ exec_bytes->g_jump_entry[7] = 0xfa; -+ -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos); -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size); -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos); -+ -+ /* If there are no symbols, pretend they are in GNU format. */ -+ if (symtab_size == 0) -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format); -+ -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0)); -+ -+ /* The standard stuff. */ -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes); -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU) -+ PUT_WORD (abfd, 0, exec_bytes->e_syms); -+ -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd) -+ != EXEC_BYTES_SIZE) -+ return FALSE; -+ -+ /* Override the stack size. */ -+ if (myinfo->override_stack_size && myinfo->stkpos) -+ { -+ bfd_byte big_endian_stack_size[4]; -+ -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size); -+ -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Write an object file. -+ Section contents have already been written. We write the -+ file header, symbols, and relocation. */ -+ -+#define MY_write_object_contents m68kmint_prg_write_object_contents -+ -+static bfd_boolean -+m68kmint_prg_write_object_contents (bfd *abfd) -+{ -+ struct external_exec exec_bytes; -+ struct internal_exec *execp = exec_hdr (abfd); -+ bfd_size_type text_size; -+ file_ptr text_end; -+ -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL); -+ -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; -+ -+ /* Most of the following code come from the WRITE_HEADERS macro -+ found in libaout.h. */ -+ -+ if (adata(abfd).magic == undecided_magic) -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); -+ -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; -+ execp->a_entry = bfd_get_start_address (abfd); -+ -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ -+ /* Now write out reloc info, followed by syms and strings. */ -+ -+ if (bfd_get_outsymbols (abfd) != NULL -+ && bfd_get_symcount (abfd) != 0) -+ { -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0) -+ return FALSE; -+ -+ if (! NAME (aout, write_syms) (abfd)) -+ return FALSE; -+ } -+ -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) -+ return FALSE; -+ -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) -+ return FALSE; -+ -+ if (write_tparel (abfd, execp) != TRUE) -+ return FALSE; -+ -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Print private BFD data. Used by objdump -p. */ -+ -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr) -+{ -+ FILE *file = (FILE *) ptr; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ const char* symbol_format; -+ long stksize = 0; -+ -+ fprintf (file, "\n"); -+ -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags); -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd)); -+ -+ /* Stack size. */ -+ if (myinfo->stkpos != 0) -+ { -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long))) -+ return FALSE; -+ -+ stksize = bfd_get_signed_32 (abfd, &stksize); -+ } -+ fprintf (file, " Stack size: %ld\n", stksize); -+ -+ /* Symbol format. */ -+ switch (myinfo->symbol_format) -+ { -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break; -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break; -+ default: symbol_format = "?"; break; -+ } -+ fprintf (file, "Symbol format: %s\n", symbol_format); -+ -+ return TRUE; -+} -+ -+/* Special case for NAME (aout, get_section_contents) -+ It is not declared in libaout.h, neither implemented in aoutx.h. -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h. -+ So the default value of MY_get_section_contents provided by aout-target.h -+ is not correct, it has to be defined here with the right value. */ -+ -+#define MY_get_section_contents aout_32_get_section_contents -+ -+/* The following include will define m68kmint_prg_vec -+ and a default implementation for all the MY_ functions -+ not overriden here. */ -+ -+#include "aout-target.h" -+ -+/* Set the GEMDOS executable flags. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->prg_flags = prg_flags; -+ -+ return TRUE; -+} -+ -+/* Override the stack size. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->stack_size = stack_size; -+ myinfo->override_stack_size = TRUE; -+ -+ return TRUE; -+} -+ -+/* Add a TPA relocation entry. -+ It is called by BFD when linking the input sections, and by the -+ linker when it generates a reference to an address (in particular, -+ when building the constructors list). */ -+ -+bfd_boolean -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ /* Enlarge the buffer if necessary. */ -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated) -+ { -+ bfd_vma *newbuf; -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE; -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated); -+ if (newbuf == NULL) -+ return FALSE; -+ -+ myinfo->relocs = newbuf; -+ } -+ -+ /* The TPA relative relocation actually just adds the address of -+ the text segment (i. e. beginning of the executable in memory) -+ to the addresses at the specified locations. This allows an -+ executable to be loaded everywhere in the address space without -+ memory management. */ -+ myinfo->relocs[myinfo->relocs_used++] = address; -+ -+ return TRUE; -+} -diff -ur --new-file binutils-2.21.51.0.7/bfd/targets.c binutils-2.21.51.0.7-mint/bfd/targets.c ---- binutils-2.21.51.0.7/bfd/targets.c 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/bfd/targets.c 2011-04-08 10:07:08.000000000 +0000 -@@ -770,6 +770,7 @@ - extern const bfd_target m68kcoff_vec; - extern const bfd_target m68kcoffun_vec; - extern const bfd_target m68klinux_vec; -+extern const bfd_target m68kmint_prg_vec; - extern const bfd_target m68knetbsd_vec; - extern const bfd_target m68ksysvcoff_vec; - extern const bfd_target m88kbcs_vec; -diff -ur --new-file binutils-2.21.51.0.7/binutils/configure binutils-2.21.51.0.7-mint/binutils/configure ---- binutils-2.21.51.0.7/binutils/configure 2011-03-07 18:05:31.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/configure 2011-04-08 10:07:09.000000000 +0000 -@@ -13041,7 +13041,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -ur --new-file binutils-2.21.51.0.7/binutils/dlltool.c binutils-2.21.51.0.7-mint/binutils/dlltool.c ---- binutils-2.21.51.0.7/binutils/dlltool.c 2010-12-06 14:23:54.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/dlltool.c 2011-04-08 10:07:09.000000000 +0000 -@@ -4360,7 +4360,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/binutils/dllwrap.c binutils-2.21.51.0.7-mint/binutils/dllwrap.c ---- binutils-2.21.51.0.7/binutils/dllwrap.c 2010-08-11 21:51:51.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/dllwrap.c 2011-04-08 10:07:09.000000000 +0000 -@@ -263,7 +263,7 @@ - dash = cp; - - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/binutils/readelf.c binutils-2.21.51.0.7-mint/binutils/readelf.c ---- binutils-2.21.51.0.7/binutils/readelf.c 2011-04-08 09:37:05.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/readelf.c 2011-04-08 10:07:10.000000000 +0000 -@@ -9903,7 +9903,11 @@ - #ifndef __MSVCRT__ - /* PR 11128: Use two separate invocations in order to work - around bugs in the Solaris 8 implementation of printf. */ -+#if GCC_VERSION < 3000 -+ printf (" [%6lx] ", (unsigned long) (data - start)); -+#else - printf (" [%6tx] ", data - start); -+#endif - printf ("%s\n", data); - #else - printf (" [%6Ix] %s\n", (size_t) (data - start), data); -diff -ur --new-file binutils-2.21.51.0.7/binutils/resrc.c binutils-2.21.51.0.7-mint/binutils/resrc.c ---- binutils-2.21.51.0.7/binutils/resrc.c 2010-12-06 14:23:55.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/resrc.c 2011-04-08 10:07:10.000000000 +0000 -@@ -396,7 +396,7 @@ - *space = 0; - - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__) - strchr (cmd, '\\') || - #endif - strchr (cmd, '/')) -@@ -514,7 +514,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/gas/config/te-mint.h binutils-2.21.51.0.7-mint/gas/config/te-mint.h ---- binutils-2.21.51.0.7/gas/config/te-mint.h 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/config/te-mint.h 2011-04-08 10:07:10.000000000 +0000 -@@ -0,0 +1,30 @@ -+/* Copyright 2008 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#define TE_MINT -+ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+/* These define interfaces. */ -+#ifdef OBJ_HEADER -+#include OBJ_HEADER -+#else -+#include "obj-format.h" -+#endif -diff -ur --new-file binutils-2.21.51.0.7/gas/configure.tgt binutils-2.21.51.0.7-mint/gas/configure.tgt ---- binutils-2.21.51.0.7/gas/configure.tgt 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/configure.tgt 2011-04-08 10:07:10.000000000 +0000 -@@ -266,6 +266,7 @@ - m68k-*-linux-*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf em=uclinux ;; - m68k-*-gnu*) fmt=elf ;; -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d 2009-11-11 16:52:57.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d 2011-04-08 10:07:10.000000000 +0000 -@@ -3,7 +3,7 @@ - #source: weakref1.s - # aout turns undefined into *ABS* symbols. - # see weakref1.d for comments on the other not-targets --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff - - # the rest of this file is generated with the following script: - # # script begin -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp 2011-04-08 10:10:06.000000000 +0000 -@@ -71,7 +71,7 @@ - - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab" - -- if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then { -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then { - run_dump_test p3041 - run_dump_test p3041data - run_dump_test p3041pcrel -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isaa.d - #objdump: -dr - #as: -march=isaa -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isab.d - #objdump: -dr - #as: -march=isab -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isac.d - #objdump: -dr - #as: -march=isac -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/include/filenames.h binutils-2.21.51.0.7-mint/include/filenames.h ---- binutils-2.21.51.0.7/include/filenames.h 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/include/filenames.h 2011-04-08 10:07:27.000000000 +0000 -@@ -30,7 +30,7 @@ - extern "C" { - #endif - --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__) - # ifndef HAVE_DOS_BASED_FILE_SYSTEM - # define HAVE_DOS_BASED_FILE_SYSTEM 1 - # endif -diff -ur --new-file binutils-2.21.51.0.7/include/getopt.h binutils-2.21.51.0.7-mint/include/getopt.h ---- binutils-2.21.51.0.7/include/getopt.h 2005-05-10 22:46:48.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/include/getopt.h 2011-04-08 10:07:27.000000000 +0000 -@@ -106,7 +106,7 @@ - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ - #if !HAVE_DECL_GETOPT --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT) - /* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in unistd.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.am binutils-2.21.51.0.7-mint/ld/Makefile.am ---- binutils-2.21.51.0.7/ld/Makefile.am 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.am 2011-04-08 10:07:27.000000000 +0000 -@@ -308,6 +308,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1319,6 +1320,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.in binutils-2.21.51.0.7-mint/ld/Makefile.in ---- binutils-2.21.51.0.7/ld/Makefile.in 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.in 2011-04-08 10:07:27.000000000 +0000 -@@ -614,6 +614,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1229,6 +1230,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@ -@@ -2762,6 +2764,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -ur --new-file binutils-2.21.51.0.7/ld/configure binutils-2.21.51.0.7-mint/ld/configure ---- binutils-2.21.51.0.7/ld/configure 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/configure 2011-04-08 10:07:28.000000000 +0000 -@@ -16557,7 +16557,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -ur --new-file binutils-2.21.51.0.7/ld/configure.tgt binutils-2.21.51.0.7-mint/ld/configure.tgt ---- binutils-2.21.51.0.7/ld/configure.tgt 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/configure.tgt 2011-04-08 10:07:28.000000000 +0000 -@@ -344,6 +344,7 @@ - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; - m68k-*-uclinux*) targ_emul=m68kelf ;; - m68*-*-gnu*) targ_emul=m68kelf ;; -+m68*-*-mint*) targ_emul=m68kmint ;; - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd - targ_extra_emuls="m68knbsd m68kelfnbsd" ;; - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd -diff -ur --new-file binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh ---- binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,6 @@ -+SCRIPT_NAME=m68kmint -+OUTPUT_FORMAT="a.out-mintprg" -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big" -+TEXT_START_ADDR=0xe4 -+ARCH=m68k -+EXTRA_EM_FILE=mint -diff -ur --new-file binutils-2.21.51.0.7/ld/emultempl/mint.em binutils-2.21.51.0.7-mint/ld/emultempl/mint.em ---- binutils-2.21.51.0.7/ld/emultempl/mint.em 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/emultempl/mint.em 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,330 @@ -+# This shell script emits a C file. -*- C -*- -+# Copyright 2006, 2007 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. -+# -+ -+# This file is sourced from generic.em -+# -+fragment < Set all the flags with an integer raw value\n")); -+ fprintf (file, _(" --stack Override the stack size (suffix k or M allowed)\n")); -+} -+ -+/* This callback is called by lang_for_each_statement. It checks that the -+ output sections speficied in the linker script are compatible with the MiNT -+ executable format. */ -+ -+static void -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_output_section_statement_enum) -+ { -+ lang_output_section_statement_type *oss = &s->output_section_statement; -+ -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR}) -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"), -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma); -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ } -+} -+ -+/* This callback is called by lang_for_each_statement. It looks for the data -+ statements of type REL generated by the linker, and adds a TPA relocation -+ entry for them. This is used by the CONSTRUCTORS list. */ -+ -+static void -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_data_statement_enum) -+ { -+ lang_data_statement_type *ds = &s->data_statement; -+ -+ if (ds->exp->type.node_code == REL) -+ { -+ if (ds->type == LONG) -+ { -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset; -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address)) -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd); -+ } -+ else -+ { -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"), -+ link_info.output_bfd, ds->output_section, ds->output_offset); -+ } -+ } -+ } -+} -+ -+/* Final emulation specific call. */ -+ -+static void -+gld${EMULATION_NAME}_finish (void) -+{ -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */ -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0) -+ return; -+ -+ /* Check the output sections. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections); -+ -+ /* Set the GEMDOS executable header flags. */ -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags)) -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd); -+ -+ /* Override the stack size. */ -+ if (override_stack_size) -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size)) -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd); -+ -+ /* Generate TPA relocation entries for the data statements. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs); -+} -+ -+EOF -+ -+# Put these extra routines in ld_${EMULATION_NAME}_emulation -+# -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish -diff -ur --new-file binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc ---- binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,35 @@ -+cat <prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags); -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos); -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format); -+ -+ /* TPA relocation information. */ -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos); -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size); -+ -+ /* FIXME: Currently we always read the TPA relative relocation -+ information. This is suboptimal because often times there -+ is no need for it. Read it only if need be! Maybe this should -+ also depend on abfd->cacheable? */ -+ if (myinfo->tparel_size == 0) -+ myinfo->tparel = bfd_zalloc (abfd, 4); -+ else -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size); -+ -+ if (myinfo->tparel == NULL) -+ return NULL; -+ -+ if (myinfo->tparel_size == 0) -+ { -+ myinfo->tparel_size = 4; -+ } -+ else -+ { -+ /* Read the information from the bfd. */ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size)) -+ return NULL; -+ } -+ -+ return target; -+} -+ -+/* Free all information we have cached for this BFD. We can always -+ read it again later if we need it. */ -+ -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info -+ -+static bfd_boolean -+m68kmint_prg_bfd_free_cached_info (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo != NULL && myinfo->relocs != NULL) -+ { -+ free (myinfo->relocs); -+ myinfo->relocs = NULL; -+ } -+ -+ /* myinfo itself has been allocated by bfd_zalloc() -+ so will be automatically freed along with the BFD. -+ Same for myinfo->tparel. */ -+ -+ return NAME (aout, bfd_free_cached_info) (abfd); -+} -+ -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the -+ symbol exceeds 8 characters write a long symbol. If it -+ exceeds 22 characters truncate the name. */ -+ -+static int -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value) -+{ -+ int written_bytes = 0; -+ struct dri_symbol sym; -+ int is_long_name = strlen (name) > sizeof (sym.a_name); -+ -+ if (is_long_name) -+ type |= A_LNAM; -+ -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name)); -+ bfd_put_16 (abfd, type, sym.a_type); -+ bfd_put_32 (abfd, value, sym.a_value); -+ -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ -+ if (is_long_name) -+ { -+ char more_name[DRI_SYMBOL_SIZE]; -+ -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE); -+ -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE) -+ return -1; -+ written_bytes += DRI_SYMBOL_SIZE; -+ } -+ -+ return written_bytes; -+} -+ -+/* Emit a traditional DRI symbol table while linking. -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */ -+ -+static bfd_boolean -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info) -+{ -+ bfd *input_bfd; -+ enum bfd_link_strip strip = info->strip; -+ enum bfd_link_discard discard = info->discard; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd *last_archive = NULL; -+ -+ /* Position file pointer. */ -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size = 0; -+ -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next) -+ { -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd); -+ struct external_nlist *sym_end = sym + sym_count; -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd); -+ bfd_boolean pass = FALSE; -+ bfd_boolean skip = FALSE; -+ bfd_boolean skip_next = FALSE; -+ int written_bytes; -+ int a_type; -+ bfd_boolean write_archive_name = FALSE; -+ bfd_vma val = 0; -+ -+ /* First write out a symbol for the archive if we do not -+ strip these symbols and if it differs from the last -+ one. */ -+ if (input_bfd->my_archive != last_archive -+ && input_bfd->my_archive != NULL) -+ { -+ write_archive_name = TRUE; -+ last_archive = input_bfd->my_archive; -+ } -+ -+ if (write_archive_name -+ && strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, -+ input_bfd->my_archive->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, -+ input_bfd->my_archive->filename, -+ A_TFILE, val); -+ -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now write out a symbol for the object file if we do not -+ strip these symbols. */ -+ if (strip != strip_all -+ && (strip != strip_some -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename, -+ FALSE, FALSE) != NULL) -+ && discard != discard_all) -+ { -+ val = bfd_get_section_vma (abfd, -+ obj_textsec (input_bfd)->output_section) -+ + obj_textsec (input_bfd)->output_offset; -+ -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename, -+ A_TFILE, val); -+ if (written_bytes < 0) -+ return FALSE; -+ else -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ -+ /* Now we have a problem. All symbols that we see have already -+ been marked written (because we write them a second time -+ here. If we would do it the clean way we would have -+ to traverse the entire symbol map and reset the written -+ flag. We hack here instead... */ -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1) -+#define is_written(h) ((int) h->written == (int) TRUE + 1) -+ for (; sym < sym_end; sym++, sym_hash++) -+ { -+ const char *name; -+ int type; -+ struct aout_link_hash_entry *h; -+ asection *symsec; -+ val = 0; -+ -+ type = H_GET_8 (input_bfd, sym->e_type); -+ name = strings + GET_WORD (input_bfd, sym->e_strx); -+ -+ h = NULL; -+ -+ if (pass) -+ { -+ /* Pass this symbol through. It is the target of an -+ indirect or warning symbol. */ -+ val = GET_WORD (input_bfd, sym->e_value); -+ pass = FALSE; -+ } -+ else if (skip_next) -+ { -+ /* Skip this symbol, which is the target of an indirect -+ symbol that we have changed to no longer be an indirect -+ symbol. */ -+ skip_next = FALSE; -+ continue; -+ } -+ else -+ { -+ struct aout_link_hash_entry *hresolve = *sym_hash; -+ -+ /* We have saved the hash table entry for this symbol, if -+ there is one. Note that we could just look it up again -+ in the hash table, provided we first check that it is an -+ external symbol. */ -+ h = *sym_hash; -+ -+ /* Use the name from the hash table, in case the symbol was -+ wrapped. */ -+ if (h != NULL -+ && h->root.type != bfd_link_hash_warning) -+ name = h->root.root.string; -+ -+ /* If this is an indirect or warning symbol, then change -+ hresolve to the base symbol. */ -+ hresolve = h; -+ if (h != (struct aout_link_hash_entry *) NULL -+ && (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning)) -+ { -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link; -+ while (hresolve->root.type == bfd_link_hash_indirect -+ || hresolve->root.type == bfd_link_hash_warning) -+ hresolve = ((struct aout_link_hash_entry*) -+ hresolve->root.u.i.link); -+ } -+ -+ /* If the symbol has already been written out skip it. */ -+ if (h != NULL -+ && is_written (h)) -+ { -+ if ((type & N_TYPE) == N_INDR -+ || type == N_WARNING) -+ skip_next = TRUE; -+ continue; -+ } -+ -+ /* See if we are stripping this symbol. */ -+ skip = FALSE; -+ -+ /* Skip all debugger symbols. No way to output them in -+ DRI format. This will also reduce a lot of headaches. */ -+ if ((type & N_STAB) != 0) -+ skip = TRUE; -+ -+ switch (strip) -+ { -+ case strip_none: -+ case strip_debugger: -+ break; -+ case strip_some: -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) -+ == NULL) -+ skip = TRUE; -+ break; -+ case strip_all: -+ skip = TRUE; -+ break; -+ } -+ -+ if (skip) -+ { -+ if (h != NULL) -+ mark_written (h); -+ continue; -+ } -+ -+ /* Get the value of the symbol. */ -+ if ((type & N_TYPE) == N_TEXT -+ || type == N_WEAKT) -+ symsec = obj_textsec (input_bfd); -+ else if ((type & N_TYPE) == N_DATA -+ || type == N_WEAKD) -+ symsec = obj_datasec (input_bfd); -+ else if ((type & N_TYPE) == N_BSS -+ || type == N_WEAKB) -+ symsec = obj_bsssec (input_bfd); -+ else if ((type & N_TYPE) == N_ABS -+ || type == N_WEAKA) -+ symsec = bfd_abs_section_ptr; -+ else if (((type & N_TYPE) == N_INDR -+ && (hresolve == NULL -+ || (hresolve->root.type != bfd_link_hash_defined -+ && hresolve->root.type != bfd_link_hash_defweak -+ && hresolve->root.type != bfd_link_hash_common))) -+ || type == N_WARNING) -+ { -+ /* Pass the next symbol through unchanged. The -+ condition above for indirect symbols is so that if -+ the indirect symbol was defined, we output it with -+ the correct definition so the debugger will -+ understand it. */ -+ pass = TRUE; -+ val = GET_WORD (input_bfd, sym->e_value); -+ symsec = NULL; -+ } -+ else -+ { -+ /* If we get here with an indirect symbol, it means that -+ we are outputting it with a real definition. In such -+ a case we do not want to output the next symbol, -+ which is the target of the indirection. */ -+ if ((type & N_TYPE) == N_INDR) -+ skip_next = TRUE; -+ -+ symsec = NULL; -+ -+ /* We need to get the value from the hash table. We use -+ hresolve so that if we have defined an indirect -+ symbol we output the final definition. */ -+ if (h == NULL) -+ { -+ switch (type & N_TYPE) -+ { -+ case N_SETT: -+ symsec = obj_textsec (input_bfd); -+ break; -+ case N_SETD: -+ symsec = obj_datasec (input_bfd); -+ break; -+ case N_SETB: -+ symsec = obj_bsssec (input_bfd); -+ break; -+ case N_SETA: -+ symsec = bfd_abs_section_ptr; -+ break; -+ default: -+ val = 0; -+ break; -+ } -+ } -+ else if (hresolve->root.type == bfd_link_hash_defined -+ || hresolve->root.type == bfd_link_hash_defweak) -+ { -+ asection *input_section; -+ asection *output_section; -+ -+ /* This case usually means a common symbol which was -+ turned into a defined symbol. */ -+ input_section = hresolve->root.u.def.section; -+ output_section = input_section->output_section; -+ BFD_ASSERT (bfd_is_abs_section (output_section) -+ || output_section->owner == abfd); -+ -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (hresolve->root.u.def.value -+ /*+ bfd_get_section_vma (abfd, output_section)*/ -+ + input_section->output_offset); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (output_section == obj_textsec (abfd)) -+ val += TEXT_START_ADDR; -+ -+ /* Get the correct type based on the section. If -+ this is a constructed set, force it to be -+ globally visible. */ -+ if (type == N_SETT -+ || type == N_SETD -+ || type == N_SETB -+ || type == N_SETA) -+ type |= N_EXT; -+ -+ type &=~ N_TYPE; -+ -+ if (output_section == obj_textsec (abfd)) -+ type |= N_TEXT; -+ else if (output_section == obj_datasec (abfd)) -+ type |= N_DATA; -+ else if (output_section == obj_bsssec (abfd)) -+ type |= N_BSS; -+ else -+ type |= N_ABS; -+ } -+ else if (hresolve->root.type == bfd_link_hash_common) -+ val = hresolve->root.u.c.size; -+ else if (hresolve->root.type == bfd_link_hash_undefweak) -+ { -+ val = 0; -+ type = N_UNDF; -+ } -+ else -+ val = 0; -+ } -+ if (symsec != NULL) -+ { -+ /* The following reference to the output section VMA -+ is commented out because DRI symbols are relative -+ to the beginning of the section. */ -+ val = (/*symsec->output_section->vma -+ +*/ symsec->output_offset -+ + (GET_WORD (input_bfd, sym->e_value) -+ - symsec->vma)); -+ -+ /* TEXT symbols values must be adjusted -+ by adding the size of the extended header. */ -+ if (symsec == obj_textsec (input_bfd)) -+ val += TEXT_START_ADDR; -+ } -+ -+ /* If this is a global symbol set the written flag, and if -+ it is a local symbol see if we should discard it. */ -+ if (h != NULL) -+ { -+ mark_written (h); -+ } -+ else if ((type & N_TYPE) != N_SETT -+ && (type & N_TYPE) != N_SETD -+ && (type & N_TYPE) != N_SETB -+ && (type & N_TYPE) != N_SETA) -+ { -+ switch (discard) -+ { -+ case discard_none: -+ case discard_sec_merge: -+ break; -+ case discard_l: -+ if (bfd_is_local_label_name (input_bfd, name)) -+ skip = TRUE; -+ break; -+ default: -+ case discard_all: -+ skip = TRUE; -+ break; -+ } -+ if (skip) -+ { -+ pass = FALSE; -+ continue; -+ } -+ } -+ } -+ -+ /* Now find the nearest type in DRI format. */ -+ switch (type) -+ { -+ case N_ABS: -+ case N_ABS | N_EXT: -+ case N_SETA: -+ case N_SETA | N_EXT: -+ case N_WEAKA: -+ a_type = A_EQU | A_DEF | A_GLOBL; -+ break; -+ case N_TEXT: -+ case N_TEXT | N_EXT: -+ case N_SETT: -+ case N_SETT | N_EXT: -+ case N_WEAKT: -+ a_type = A_TEXT | A_DEF | A_GLOBL; -+ break; -+ case N_DATA: -+ case N_DATA | N_EXT: -+ case N_SETD: -+ case N_SETD | N_EXT: -+ case N_WEAKD: -+ a_type = A_DATA | A_DEF | A_GLOBL; -+ break; -+ case N_BSS: -+ case N_BSS | N_EXT: -+ case N_SETB: -+ case N_SETB | N_EXT: -+ case N_WEAKB: -+ a_type = A_BSS | A_DEF | A_GLOBL; -+ break; -+ default: -+ continue; -+ } -+ -+ written_bytes = write_dri_symbol (abfd, name, a_type, val); -+ if (written_bytes < 0) -+ return FALSE; -+ -+ myinfo->dri_symtab_size += written_bytes; -+ } -+ } -+ -+ obj_aout_external_string_size (abfd) = 0; -+ return TRUE; -+} -+ -+/* This is used for qsort() to sort addresses -+ for the TPA relocation table. */ -+ -+static int -+vma_cmp (const void *v1, const void *v2) -+{ -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2))); -+} -+ -+/* Alloc and fill the TPA relocation table. */ -+ -+static bfd_boolean -+fill_tparel (bfd *abfd) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ unsigned long i; -+ bfd_size_type bytes; -+ unsigned char *ptr; -+ -+ /* Sort the relocation info. */ -+ if (myinfo->relocs != NULL) -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma), -+ vma_cmp); -+ -+ /* Now calculate the number of bytes we need. The relocation info -+ is encoded as follows: The first entry is a 32-bit value -+ denoting the first offset to relocate. All following entries -+ are relative to the preceding one. For relative offsets of -+ more than 254 bytes a value of 1 is used. The OS will then -+ add 254 bytes to the current offset. The list is then terminated -+ with the byte 0. */ -+ bytes = 4; /* First entry is a long. */ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ BFD_ASSERT(diff > 0); -+ bytes += (diff + 253) / 254; -+ } -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */ -+ if (myinfo->relocs_used > 0) -+ bytes++; -+ -+ myinfo->tparel_size = bytes; -+ myinfo->tparel = bfd_alloc (abfd, bytes); -+ if (myinfo->tparel == NULL) -+ return FALSE; -+ -+ /* Now fill the array. */ -+ ptr = (bfd_byte*) myinfo->tparel; -+ if (myinfo->relocs != NULL) -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr); -+ else -+ bfd_put_32 (abfd, 0, ptr); -+ ptr += 4; -+ -+ for (i = 1; i < myinfo->relocs_used; i++) -+ { -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1]; -+ while (diff > 254) -+ { -+ *ptr++ = 1; -+ diff -= 254; -+ } -+ *ptr++ = (bfd_byte) diff; -+ } -+ -+ if (myinfo->relocs_used > 0) -+ *ptr = 0; -+ -+ return TRUE; -+} -+ -+/* Final link routine. We need to use a call back to get the correct -+ offsets in the output file. And we need to malloc some internal -+ buffers. */ -+ -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link -+ -+static bfd_boolean -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ struct bfd_link_hash_table *hash = info->hash; -+ enum bfd_link_strip original_strip = info->strip; -+ -+ if (info->relocatable) -+ { -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s", -+ abfd, bfd_get_target (abfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ myinfo->linkinfo = info; -+ -+ /* Make sure that for now we never write zmagics. */ -+ abfd->flags &= ~D_PAGED; -+ -+ /* Find the __stksize symbol. This symbol is used for a MiNT -+ special kludge. The libc defines this symbol in an object file -+ initialized to a default value to make sure it is defined in -+ every output file. The start-up code in crtinit() then simply -+ sets the stacksize accordingly. In your programs (if they need -+ an unusual stacksize) you can then simply code: -+ -+ long _stksize = 0x2000; -+ -+ This will create a program stack of 2k. Since MiNT cannot detect -+ a stack overflow this is the only way to prevent program crashes -+ caused by a stack that is too small. -+ -+ The ancient linker ignored this feature, the ancient strip -+ program paid heed to it. By default, strip never stripped this -+ special symbol from the binary. -+ -+ Another program called ``printstk'' and its colleague ``fixstk'' -+ could be used to either print the current value of the stacksize -+ or to modify it without recompiling and rebuilding. These -+ programs traversed the symbol table and then took the appropriate -+ measures if the symbol was found. -+ -+ Here we do a different approach. Since we already expanded the -+ standard executable header we now hardcode the address (as a file -+ offset) that the __stksize symbol points to into the header. We -+ can now let strip safely remove the entry from the symbol table -+ and we're not dependent on a special format of the symbol table. -+ Because the address is kept in the header we will always be able -+ to manipulate the stacksize value later. */ -+ if (hash != NULL) -+ { -+ struct aout_link_hash_entry *h = -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize", -+ FALSE, FALSE, FALSE); -+ asection *sec; -+ -+ if (h != NULL) -+ { -+ switch (h->root.type) -+ { -+ case bfd_link_hash_defined: -+ case bfd_link_hash_defweak: -+ sec = h->root.u.def.section->output_section; -+ BFD_ASSERT (sec->owner == abfd); -+ -+ myinfo->stkpos = (h->root.u.def.value + sec->vma -+ + h->root.u.def.section->output_offset -+ + GEMDOS_HEADER_SIZE); -+ break; -+ default: /* Ignore other types. */ -+ break; -+ } -+ } -+ } -+ -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ myinfo->traditional_format = TRUE; -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI; -+ } -+ -+ /* Unconditionally unset the traditional flag. The only effect in -+ the a.out code is to disable string hashing (with respect to -+ SunOS gdx). This is not necessary for us. */ -+ -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT; -+ -+ /* Do not write GNU symbols in traditional format. */ -+ if (myinfo->traditional_format) -+ info->strip = strip_all; -+ -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback) -+ != TRUE) -+ return FALSE; -+ -+ if (myinfo->reloc_error) -+ return FALSE; -+ -+ /* Restore the strip status for the traditional symbols. */ -+ info->strip = original_strip; -+ -+ if (myinfo->traditional_format -+ && link_write_traditional_syms (abfd, info) != TRUE) -+ return FALSE; -+ -+ if (fill_tparel (abfd) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Copy private BFD header information from the input BFD. */ -+ -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* We can only copy BFD files using our own file format. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s", -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Copy backend specific data from one object module to another. -+ This function is used by objcopy and strip. */ -+ -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ struct mint_internal_info *myinfo_in; -+ struct mint_internal_info *myinfo_out; -+ -+ /* obfd uses our file format, ibfd may be foreign. */ -+ if (ibfd->xvec != &m68kmint_prg_vec) -+ return TRUE; -+ -+ myinfo_in = obj_aout_ext (ibfd); -+ BFD_ASSERT (myinfo_in != NULL); -+ -+ myinfo_out = obj_aout_ext (obfd); -+ BFD_ASSERT (myinfo_out != NULL); -+ -+ /* Copy myinfo. */ -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out)); -+ -+ /* Copy tparel. */ -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size); -+ if (myinfo_out->tparel == NULL) -+ return FALSE; -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size); -+ -+ /* Normalize the type of empty symbols. */ -+ if (bfd_get_symcount (obfd) == 0) -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Merge private BFD information from an input BFD to the output BFD when linking. */ -+ -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ (void)obfd; /* Unused. */ -+ -+ /* Our file format cannot be used as linker input. */ -+ if (ibfd->xvec == &m68kmint_prg_vec) -+ { -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input", -+ ibfd, bfd_get_target (ibfd)); -+ bfd_set_error (bfd_error_invalid_operation); -+ return FALSE; -+ } -+ -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */ -+} -+ -+/* Find out the symbol name. */ -+ -+static const char * -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd, -+ bfd_byte *location, struct reloc_std_external *rel) -+{ -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd); -+ char *strings = obj_aout_external_strings (input_bfd); -+ struct aout_link_hash_entry **sym_hashes -+ = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = NULL; -+ const char *name; -+ bfd_size_type r_index; -+ int r_extern; -+ -+ if (bfd_get_reloc_size (howto) != 4) -+ return "(not a symbol)"; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+ if (sym_hashes != NULL) -+ h = sym_hashes[r_index]; -+ -+ if (!r_extern) -+ { -+ bfd_size_type i; -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location); -+ -+ name = NULL; -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++) -+ { -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value); -+ -+ if (this_value == wanted_value) -+ { -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type); -+ -+ /* Skip debug symbols and the like. */ -+ if ((symtype & N_STAB) != 0) -+ continue; -+ -+ /* This is dirty but preferable to a plethoria of -+ single comparisons. */ -+ if (symtype <= (N_BSS | N_EXT) -+ || (symtype >= N_WEAKU && symtype <= N_COMM)) -+ { -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx); -+ break; -+ } -+ } -+ } -+ -+ /* FIXME: If the relocation is against a section there is -+ probably a symbol for that section floating around somewhere -+ in the bfd jungle. */ -+ if (name == NULL) -+ { -+ switch ((r_index & N_TYPE) & ~N_EXT) -+ { -+ case N_TEXT: -+ name = "text section"; -+ break; -+ case N_DATA: -+ name = "data section"; -+ break; -+ case N_BSS: -+ name = "bss section"; -+ break; -+ case N_ABS: -+ name = "absolute section"; -+ break; -+ default: -+ name = "unknown section"; -+ break; -+ } -+ } -+ } -+ else if (h != NULL) -+ name = h->root.root.string; -+ else if (r_index >= obj_aout_external_sym_count (input_bfd)) -+ name = "(unknown symbol)"; /* Shouldn't happen. */ -+ else -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); -+ -+ return name; -+} -+ -+/* This relocation routine is used by some of the backend linkers. -+ They do not construct asymbol or arelent structures, so there is no -+ reason for them to use bfd_perform_relocation. Also, -+ bfd_perform_relocation is so hacked up it is easier to write a new -+ function than to try to deal with it. -+ -+ This routine does a final relocation. Whether it is useful for a -+ relocatable link depends upon how the object format defines -+ relocations. -+ -+ FIXME: This routine ignores any special_function in the HOWTO, -+ since the existing special_function values have been written for -+ bfd_perform_relocation. -+ -+ HOWTO is the reloc howto information. -+ INPUT_BFD is the BFD which the reloc applies to. -+ INPUT_SECTION is the section which the reloc applies to. -+ CONTENTS is the contents of the section. -+ ADDRESS is the address of the reloc within INPUT_SECTION. -+ VALUE is the value of the symbol the reloc refers to. -+ ADDEND is the addend of the reloc. */ -+ -+/* The additional parameter REL is specific to this backend. -+ This function is derived from _bfd_final_link_relocate() -+ found in reloc.c. It adds additional checking for dangerous -+ relocations in MiNT sharable text sections, then it records -+ the relocated offset in myinfo->relocs[] for further processing. */ -+ -+static bfd_reloc_status_type -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ bfd_vma address, -+ bfd_vma value, -+ bfd_vma addend, -+ struct reloc_std_external *rel) -+{ -+ bfd_vma relocation; -+ bfd *output_bfd = input_section->output_section->owner; -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd); -+ bfd_reloc_status_type retval; -+ int r_index; -+ int r_extern; -+ bfd_boolean need_tpa_relocation; -+ -+ /* The input bfd is always big-endian. There is no need to -+ call bfd_header_big_endian (input_bfd). */ -+ r_index = ((rel->r_index[0] << 16) -+ | (rel->r_index[1] << 8) -+ | (rel->r_index[2])); -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); -+ -+#define _MINT_F_SHTEXT 0x800 -+ -+ /* Sanity check the address. */ -+ if (address > bfd_get_section_limit (input_bfd, input_section)) -+ return bfd_reloc_outofrange; -+ -+ /* This function assumes that we are dealing with a basic relocation -+ against a symbol. We want to compute the value of the symbol to -+ relocate to. This is just VALUE, the value of the symbol, plus -+ ADDEND, any addend associated with the reloc. */ -+ relocation = value + addend; -+ -+ /* Check for dangerous relocations in images with a sharable -+ text section. */ -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0 -+ && bfd_get_reloc_size (howto) == 4) -+ { -+ bfd_boolean error_found = FALSE; -+ const char *name = NULL; -+ -+ if (input_section == obj_textsec (input_bfd)) -+ { -+ if (!r_extern) -+ { -+ /* This is a relocation against another section. Only -+ relocations against the text section are allowed. */ -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT)) -+ error_found = TRUE; -+ } -+ else if (relocation > (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ error_found = TRUE; -+ } -+ else if (relocation == (input_section->output_section->vma -+ + input_section->output_section->size)) -+ { -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ if (strcmp (name, "_etext") == 0) -+ error_found = FALSE; -+ } -+ } -+ -+ if (error_found) -+ { -+ const struct bfd_link_callbacks *callbacks -+ = myinfo->linkinfo->callbacks; -+ -+ myinfo->reloc_error = TRUE; -+ -+ if (callbacks->reloc_dangerous != NULL) -+ { -+ if (name == NULL) -+ name = find_symbol_name (howto, input_bfd, -+ contents + address, -+ rel); -+ -+ callbacks->reloc_dangerous (myinfo->linkinfo, name, -+ input_bfd, -+ input_section, address); -+ } -+ } -+ } -+ -+ /* If the relocation is PC relative, we want to set RELOCATION to -+ the distance between the symbol (currently in RELOCATION) and the -+ location we are relocating. Some targets (e.g., i386-aout) -+ arrange for the contents of the section to be the negative of the -+ offset of the location within the section; for such targets -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF) -+ simply leave the contents of the section as zero; for such -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not -+ need to subtract out the offset of the location within the -+ section (which is just ADDRESS). */ -+ if (howto->pc_relative) -+ { -+ relocation -= (input_section->output_section->vma -+ + input_section->output_offset); -+ if (howto->pcrel_offset) -+ relocation -= address; -+ } -+ -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation, -+ contents + address); -+ -+ /* The symbol has to be relocated again iff the length of the relocation -+ is 2 words and it is not pc relative. */ -+ need_tpa_relocation = FALSE; -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4) -+ { -+ if (r_extern) -+ { -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd); -+ struct aout_link_hash_entry *h = sym_hashes[r_index]; -+ asection *output_section = h->root.u.def.section->output_section; -+ -+ /* Do not relocate absolute symbols. */ -+ if (output_section == obj_textsec (output_bfd) -+ || output_section == obj_datasec (output_bfd) -+ || output_section == obj_bsssec (output_bfd)) -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ else -+ { -+ need_tpa_relocation = TRUE; -+ } -+ } -+ -+ /* Here we add the TPA relocation entries for the address references -+ located inside the input sections. Note that if some references -+ to addresses are generated using data statements in the linker -+ script, they will not be relocated here because they do not -+ belong to any input section. */ -+ if (need_tpa_relocation) -+ { -+ bfd_vma tpa_address = input_section->output_section->vma -+ + input_section->output_offset + address; -+ -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address)) -+ return bfd_reloc_other; -+ } -+ -+ return retval; -+} -+ -+/* Write out the TPA relocation table. */ -+ -+static bfd_boolean -+write_tparel (bfd *abfd, struct internal_exec *execp) -+{ -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd); -+ -+ if (myinfo->dri_symtab_size == 0) -+ myinfo->tparel_pos = N_STROFF (*execp) -+ + obj_aout_external_string_size (abfd); -+ else -+ myinfo->tparel_pos = N_SYMOFF (*execp) -+ + myinfo->dri_symtab_size; -+ -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd) -+ != myinfo->tparel_size) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Write the full exec header. -+ This function must be called last to ensure that we have all the -+ information needed to fill the MiNT-specific header fields. */ -+ -+static bfd_boolean -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes) -+{ -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ bfd_size_type symtab_size; -+ -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch); -+ -+ /* The OS will load our extension header fields into the text segment. */ -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE), -+ exec_bytes->g_text); -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data); -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss); -+ -+ /* The OS' notion of the size of the symbol table is another than -+ the bfd library's. We have to fill in the size of the table -+ itself plus the size of the string table but only if we have not written -+ a traditional symbol table. If we have written a traditional symbol -+ table we know the size. */ -+ if (myinfo->dri_symtab_size != 0) -+ symtab_size = myinfo->dri_symtab_size; -+ else -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp); -+ -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms); -+ -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic); -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags); -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs); -+ -+ /* Generate the jump instruction to the entry point. In m68k -+ assembler mnemnonics it looks more or less like this: -+ -+ move.l exec_bytes->e_entry(pc),d0 -+ jmp -6(pc,d0.l) -+ -+ Sorry for the wrong syntax. As a real assembler addict I -+ never actually use an assembler. I edit my binaries manually -+ with a hex editor, looks much cooler and it strengthens your -+ abstraction abilities. */ -+ -+ exec_bytes->g_jump_entry[0] = 0x20; -+ exec_bytes->g_jump_entry[1] = 0x3a; -+ exec_bytes->g_jump_entry[2] = 0x00; -+ exec_bytes->g_jump_entry[3] = 0x1a; -+ exec_bytes->g_jump_entry[4] = 0x4e; -+ exec_bytes->g_jump_entry[5] = 0xfb; -+ exec_bytes->g_jump_entry[6] = 0x08; -+ exec_bytes->g_jump_entry[7] = 0xfa; -+ -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos); -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size); -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos); -+ -+ /* If there are no symbols, pretend they are in GNU format. */ -+ if (symtab_size == 0) -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU; -+ -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format); -+ -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0)); -+ -+ /* The standard stuff. */ -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes); -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU) -+ PUT_WORD (abfd, 0, exec_bytes->e_syms); -+ -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd) -+ != EXEC_BYTES_SIZE) -+ return FALSE; -+ -+ /* Override the stack size. */ -+ if (myinfo->override_stack_size && myinfo->stkpos) -+ { -+ bfd_byte big_endian_stack_size[4]; -+ -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size); -+ -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0) -+ return FALSE; -+ -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Write an object file. -+ Section contents have already been written. We write the -+ file header, symbols, and relocation. */ -+ -+#define MY_write_object_contents m68kmint_prg_write_object_contents -+ -+static bfd_boolean -+m68kmint_prg_write_object_contents (bfd *abfd) -+{ -+ struct external_exec exec_bytes; -+ struct internal_exec *execp = exec_hdr (abfd); -+ bfd_size_type text_size; -+ file_ptr text_end; -+ -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL); -+ -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; -+ -+ /* Most of the following code come from the WRITE_HEADERS macro -+ found in libaout.h. */ -+ -+ if (adata(abfd).magic == undecided_magic) -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); -+ -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; -+ execp->a_entry = bfd_get_start_address (abfd); -+ -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * -+ obj_reloc_entry_size (abfd)); -+ -+ /* Now write out reloc info, followed by syms and strings. */ -+ -+ if (bfd_get_outsymbols (abfd) != NULL -+ && bfd_get_symcount (abfd) != 0) -+ { -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0) -+ return FALSE; -+ -+ if (! NAME (aout, write_syms) (abfd)) -+ return FALSE; -+ } -+ -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) -+ return FALSE; -+ -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0) -+ return FALSE; -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) -+ return FALSE; -+ -+ if (write_tparel (abfd, execp) != TRUE) -+ return FALSE; -+ -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Print private BFD data. Used by objdump -p. */ -+ -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data -+ -+static bfd_boolean -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr) -+{ -+ FILE *file = (FILE *) ptr; -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd); -+ const char* symbol_format; -+ long stksize = 0; -+ -+ fprintf (file, "\n"); -+ -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags); -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd)); -+ -+ /* Stack size. */ -+ if (myinfo->stkpos != 0) -+ { -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long))) -+ return FALSE; -+ -+ stksize = bfd_get_signed_32 (abfd, &stksize); -+ } -+ fprintf (file, " Stack size: %ld\n", stksize); -+ -+ /* Symbol format. */ -+ switch (myinfo->symbol_format) -+ { -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break; -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break; -+ default: symbol_format = "?"; break; -+ } -+ fprintf (file, "Symbol format: %s\n", symbol_format); -+ -+ return TRUE; -+} -+ -+/* Special case for NAME (aout, get_section_contents) -+ It is not declared in libaout.h, neither implemented in aoutx.h. -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h. -+ So the default value of MY_get_section_contents provided by aout-target.h -+ is not correct, it has to be defined here with the right value. */ -+ -+#define MY_get_section_contents aout_32_get_section_contents -+ -+/* The following include will define m68kmint_prg_vec -+ and a default implementation for all the MY_ functions -+ not overriden here. */ -+ -+#include "aout-target.h" -+ -+/* Set the GEMDOS executable flags. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->prg_flags = prg_flags; -+ -+ return TRUE; -+} -+ -+/* Override the stack size. -+ It is called by the linker emulation script. */ -+ -+bfd_boolean -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ myinfo->stack_size = stack_size; -+ myinfo->override_stack_size = TRUE; -+ -+ return TRUE; -+} -+ -+/* Add a TPA relocation entry. -+ It is called by BFD when linking the input sections, and by the -+ linker when it generates a reference to an address (in particular, -+ when building the constructors list). */ -+ -+bfd_boolean -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address) -+{ -+ struct mint_internal_info *myinfo; -+ -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec); -+ myinfo = obj_aout_ext (abfd); -+ BFD_ASSERT(myinfo != NULL); -+ -+ /* Enlarge the buffer if necessary. */ -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated) -+ { -+ bfd_vma *newbuf; -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE; -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated); -+ if (newbuf == NULL) -+ return FALSE; -+ -+ myinfo->relocs = newbuf; -+ } -+ -+ /* The TPA relative relocation actually just adds the address of -+ the text segment (i. e. beginning of the executable in memory) -+ to the addresses at the specified locations. This allows an -+ executable to be loaded everywhere in the address space without -+ memory management. */ -+ myinfo->relocs[myinfo->relocs_used++] = address; -+ -+ return TRUE; -+} -diff -ur --new-file binutils-2.21.51.0.7/bfd/targets.c binutils-2.21.51.0.7-mint/bfd/targets.c ---- binutils-2.21.51.0.7/bfd/targets.c 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/bfd/targets.c 2011-04-08 10:07:08.000000000 +0000 -@@ -770,6 +770,7 @@ - extern const bfd_target m68kcoff_vec; - extern const bfd_target m68kcoffun_vec; - extern const bfd_target m68klinux_vec; -+extern const bfd_target m68kmint_prg_vec; - extern const bfd_target m68knetbsd_vec; - extern const bfd_target m68ksysvcoff_vec; - extern const bfd_target m88kbcs_vec; -diff -ur --new-file binutils-2.21.51.0.7/binutils/configure binutils-2.21.51.0.7-mint/binutils/configure ---- binutils-2.21.51.0.7/binutils/configure 2011-03-07 18:05:31.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/configure 2011-04-08 10:07:09.000000000 +0000 -@@ -13041,7 +13041,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -ur --new-file binutils-2.21.51.0.7/binutils/dlltool.c binutils-2.21.51.0.7-mint/binutils/dlltool.c ---- binutils-2.21.51.0.7/binutils/dlltool.c 2010-12-06 14:23:54.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/dlltool.c 2011-04-08 10:07:09.000000000 +0000 -@@ -4360,7 +4360,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/binutils/dllwrap.c binutils-2.21.51.0.7-mint/binutils/dllwrap.c ---- binutils-2.21.51.0.7/binutils/dllwrap.c 2010-08-11 21:51:51.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/dllwrap.c 2011-04-08 10:07:09.000000000 +0000 -@@ -263,7 +263,7 @@ - dash = cp; - - if ( --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/binutils/readelf.c binutils-2.21.51.0.7-mint/binutils/readelf.c ---- binutils-2.21.51.0.7/binutils/readelf.c 2011-04-08 09:37:05.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/readelf.c 2011-04-08 10:07:10.000000000 +0000 -@@ -9903,7 +9903,11 @@ - #ifndef __MSVCRT__ - /* PR 11128: Use two separate invocations in order to work - around bugs in the Solaris 8 implementation of printf. */ -+#if GCC_VERSION < 3000 -+ printf (" [%6lx] ", (unsigned long) (data - start)); -+#else - printf (" [%6tx] ", data - start); -+#endif - printf ("%s\n", data); - #else - printf (" [%6Ix] %s\n", (size_t) (data - start), data); -diff -ur --new-file binutils-2.21.51.0.7/binutils/resrc.c binutils-2.21.51.0.7-mint/binutils/resrc.c ---- binutils-2.21.51.0.7/binutils/resrc.c 2010-12-06 14:23:55.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/binutils/resrc.c 2011-04-08 10:07:10.000000000 +0000 -@@ -396,7 +396,7 @@ - *space = 0; - - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__) - strchr (cmd, '\\') || - #endif - strchr (cmd, '/')) -@@ -514,7 +514,7 @@ - if (*cp == '-') - dash = cp; - if ( --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__) - *cp == ':' || *cp == '\\' || - #endif - *cp == '/') -diff -ur --new-file binutils-2.21.51.0.7/gas/config/te-mint.h binutils-2.21.51.0.7-mint/gas/config/te-mint.h ---- binutils-2.21.51.0.7/gas/config/te-mint.h 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/config/te-mint.h 2011-04-08 10:07:10.000000000 +0000 -@@ -0,0 +1,30 @@ -+/* Copyright 2008 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#define TE_MINT -+ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+/* These define interfaces. */ -+#ifdef OBJ_HEADER -+#include OBJ_HEADER -+#else -+#include "obj-format.h" -+#endif -diff -ur --new-file binutils-2.21.51.0.7/gas/configure.tgt binutils-2.21.51.0.7-mint/gas/configure.tgt ---- binutils-2.21.51.0.7/gas/configure.tgt 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/configure.tgt 2011-04-08 10:07:10.000000000 +0000 -@@ -266,6 +266,7 @@ - m68k-*-linux-*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf em=uclinux ;; - m68k-*-gnu*) fmt=elf ;; -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d 2009-11-11 16:52:57.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d 2011-04-08 10:07:10.000000000 +0000 -@@ -3,7 +3,7 @@ - #source: weakref1.s - # aout turns undefined into *ABS* symbols. - # see weakref1.d for comments on the other not-targets --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff - - # the rest of this file is generated with the following script: - # # script begin -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp 2011-04-08 10:10:06.000000000 +0000 -@@ -71,7 +71,7 @@ - - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab" - -- if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then { -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then { - run_dump_test p3041 - run_dump_test p3041data - run_dump_test p3041pcrel -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isaa.d - #objdump: -dr - #as: -march=isaa -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isab.d - #objdump: -dr - #as: -march=isab -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d 2009-11-11 16:52:56.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d 2011-04-08 10:07:10.000000000 +0000 -@@ -1,7 +1,7 @@ - #name: br-isac.d - #objdump: -dr - #as: -march=isac -pcrel --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* - - .*: file format .* - -diff -ur --new-file binutils-2.21.51.0.7/include/filenames.h binutils-2.21.51.0.7-mint/include/filenames.h ---- binutils-2.21.51.0.7/include/filenames.h 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/include/filenames.h 2011-04-08 10:07:27.000000000 +0000 -@@ -30,7 +30,7 @@ - extern "C" { - #endif - --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__) - # ifndef HAVE_DOS_BASED_FILE_SYSTEM - # define HAVE_DOS_BASED_FILE_SYSTEM 1 - # endif -diff -ur --new-file binutils-2.21.51.0.7/include/getopt.h binutils-2.21.51.0.7-mint/include/getopt.h ---- binutils-2.21.51.0.7/include/getopt.h 2005-05-10 22:46:48.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/include/getopt.h 2011-04-08 10:07:27.000000000 +0000 -@@ -106,7 +106,7 @@ - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ - #if !HAVE_DECL_GETOPT --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT) - /* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in unistd.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.am binutils-2.21.51.0.7-mint/ld/Makefile.am ---- binutils-2.21.51.0.7/ld/Makefile.am 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.am 2011-04-08 10:07:27.000000000 +0000 -@@ -308,6 +308,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1319,6 +1320,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.in binutils-2.21.51.0.7-mint/ld/Makefile.in ---- binutils-2.21.51.0.7/ld/Makefile.in 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.in 2011-04-08 10:07:27.000000000 +0000 -@@ -614,6 +614,7 @@ - em68kelf.c \ - em68kelfnbsd.c \ - em68klinux.c \ -+ em68kmint.c \ - em68knbsd.c \ - em68kpsos.c \ - em88kbcs.c \ -@@ -1229,6 +1230,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@ -@@ -2762,6 +2764,10 @@ - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \ - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)" -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \ -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \ -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)" - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)" -diff -ur --new-file binutils-2.21.51.0.7/ld/configure binutils-2.21.51.0.7-mint/ld/configure ---- binutils-2.21.51.0.7/ld/configure 2011-03-07 18:05:32.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/configure 2011-04-08 10:07:28.000000000 +0000 -@@ -16557,7 +16557,7 @@ - - - case "${host}" in --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*) - - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h - ;; -diff -ur --new-file binutils-2.21.51.0.7/ld/configure.tgt binutils-2.21.51.0.7-mint/ld/configure.tgt ---- binutils-2.21.51.0.7/ld/configure.tgt 2011-01-04 17:51:04.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/configure.tgt 2011-04-08 10:07:28.000000000 +0000 -@@ -344,6 +344,7 @@ - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;; - m68k-*-uclinux*) targ_emul=m68kelf ;; - m68*-*-gnu*) targ_emul=m68kelf ;; -+m68*-*-mint*) targ_emul=m68kmint ;; - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd - targ_extra_emuls="m68knbsd m68kelfnbsd" ;; - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd -diff -ur --new-file binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh ---- binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,6 @@ -+SCRIPT_NAME=m68kmint -+OUTPUT_FORMAT="a.out-mintprg" -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big" -+TEXT_START_ADDR=0xe4 -+ARCH=m68k -+EXTRA_EM_FILE=mint -diff -ur --new-file binutils-2.21.51.0.7/ld/emultempl/mint.em binutils-2.21.51.0.7-mint/ld/emultempl/mint.em ---- binutils-2.21.51.0.7/ld/emultempl/mint.em 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/emultempl/mint.em 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,330 @@ -+# This shell script emits a C file. -*- C -*- -+# Copyright 2006, 2007 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. -+# -+ -+# This file is sourced from generic.em -+# -+fragment < Set all the flags with an integer raw value\n")); -+ fprintf (file, _(" --stack Override the stack size (suffix k or M allowed)\n")); -+} -+ -+/* This callback is called by lang_for_each_statement. It checks that the -+ output sections speficied in the linker script are compatible with the MiNT -+ executable format. */ -+ -+static void -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_output_section_statement_enum) -+ { -+ lang_output_section_statement_type *oss = &s->output_section_statement; -+ -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR}) -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"), -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma); -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL) -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"), -+ oss->bfd_section); -+ } -+} -+ -+/* This callback is called by lang_for_each_statement. It looks for the data -+ statements of type REL generated by the linker, and adds a TPA relocation -+ entry for them. This is used by the CONSTRUCTORS list. */ -+ -+static void -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s) -+{ -+ if (s->header.type == lang_data_statement_enum) -+ { -+ lang_data_statement_type *ds = &s->data_statement; -+ -+ if (ds->exp->type.node_code == REL) -+ { -+ if (ds->type == LONG) -+ { -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset; -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address)) -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd); -+ } -+ else -+ { -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"), -+ link_info.output_bfd, ds->output_section, ds->output_offset); -+ } -+ } -+ } -+} -+ -+/* Final emulation specific call. */ -+ -+static void -+gld${EMULATION_NAME}_finish (void) -+{ -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */ -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0) -+ return; -+ -+ /* Check the output sections. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections); -+ -+ /* Set the GEMDOS executable header flags. */ -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags)) -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd); -+ -+ /* Override the stack size. */ -+ if (override_stack_size) -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size)) -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd); -+ -+ /* Generate TPA relocation entries for the data statements. */ -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs); -+} -+ -+EOF -+ -+# Put these extra routines in ld_${EMULATION_NAME}_emulation -+# -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish -diff -ur --new-file binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc ---- binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc 1970-01-01 00:00:00.000000000 +0000 -+++ binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc 2011-04-08 10:07:28.000000000 +0000 -@@ -0,0 +1,35 @@ -+cat < header file. */ -+#undef HAVE_WCHAR_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_ZLIB_H - -Index: binutils/configure -=================================================================== -RCS file: /cvs/src/src/binutils/configure,v -retrieving revision 1.152 -diff -u -3 -p -r1.152 configure ---- binutils/configure 26 Oct 2012 15:27:17 -0000 1.152 -+++ binutils/configure 30 Oct 2012 12:00:59 -0000 -@@ -12446,7 +12446,7 @@ case "${host}" in - esac - - --for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h -+for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -@@ -12750,6 +12750,32 @@ $as_echo "#define HAVE_MKDTEMP 1" >>conf - - fi - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -+$as_echo_n "checking for mbstate_t... " >&6; } -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+mbstate_t teststate; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ have_mbstate_t=yes -+else -+ have_mbstate_t=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mbstate_t" >&5 -+$as_echo "$have_mbstate_t" >&6; } -+ if test x"$have_mbstate_t" = xyes; then -+ -+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h -+ -+ fi - - # Some systems have frexp only in -lm, not in -lc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing frexp" >&5 -Index: binutils/configure.in -=================================================================== -RCS file: /cvs/src/src/binutils/configure.in,v -retrieving revision 1.113 -diff -u -3 -p -r1.113 configure.in ---- binutils/configure.in 26 Oct 2012 15:27:18 -0000 1.113 -+++ binutils/configure.in 30 Oct 2012 12:01:00 -0000 -@@ -96,7 +96,7 @@ case "${host}" in - esac - AC_SUBST(DEMANGLER_NAME) - --AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h) -+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h) - AC_HEADER_SYS_WAIT - ACX_HEADER_STRING - AC_FUNC_ALLOCA -@@ -107,6 +107,14 @@ AC_CHECK_FUNC([mkstemp], - AC_CHECK_FUNC([mkdtemp], - AC_DEFINE([HAVE_MKDTEMP], 1, - [Define to 1 if you have the `mkdtemp' function.])) -+ AC_MSG_CHECKING([for mbstate_t]) -+ AC_TRY_COMPILE([#include ], -+ [mbstate_t teststate;], -+ have_mbstate_t=yes, have_mbstate_t=no) -+ AC_MSG_RESULT($have_mbstate_t) -+ if test x"$have_mbstate_t" = xyes; then -+ AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) -+ fi - - # Some systems have frexp only in -lm, not in -lc. - AC_SEARCH_LIBS(frexp, m) -Index: binutils/readelf.c -=================================================================== -RCS file: /cvs/src/src/binutils/readelf.c,v -retrieving revision 1.583 -diff -u -3 -p -r1.583 readelf.c ---- binutils/readelf.c 24 Oct 2012 01:59:39 -0000 1.583 -+++ binutils/readelf.c 30 Oct 2012 12:01:00 -0000 -@@ -48,7 +48,9 @@ - #ifdef HAVE_ZLIB_H - #include - #endif -+#ifdef HAVE_WCHAR_H - #include -+#endif - - #if __GNUC__ >= 2 - /* Define BFD64 here, even if our default architecture is 32 bit ELF -@@ -386,7 +388,7 @@ print_vma (bfd_vma vma, print_mode mode) - } - - /* Display a symbol on stdout. Handles the display of control characters and -- multibye characters. -+ multibye characters (assuming the host environment supports them). - - Display at most abs(WIDTH) characters, truncating as necessary, unless do_wide is true. - -@@ -400,7 +402,9 @@ print_symbol (int width, const char *sym - { - bfd_boolean extra_padding = FALSE; - int num_printed = 0; -+#ifdef HAVE_MBSTATE_T - mbstate_t state; -+#endif - int width_remaining; - - if (width < 0) -@@ -417,13 +421,14 @@ print_symbol (int width, const char *sym - else - width_remaining = width; - -+#ifdef HAVE_MBSTATE_T - /* Initialise the multibyte conversion state. */ - memset (& state, 0, sizeof (state)); -+#endif - - while (width_remaining) - { - size_t n; -- wchar_t w; - const char c = *symbol++; - - if (c == 0) -@@ -449,15 +454,22 @@ print_symbol (int width, const char *sym - } - else - { -+#ifdef HAVE_MBSTATE_T -+ wchar_t w; -+#endif - /* Let printf do the hard work of displaying multibyte characters. */ - printf ("%.1s", symbol - 1); - width_remaining --; - num_printed ++; - -+#ifdef HAVE_MBSTATE_T - /* Try to find out how many bytes made up the character that was - just printed. Advance the symbol pointer past the bytes that - were displayed. */ - n = mbrtowc (& w, symbol - 1, MB_CUR_MAX, & state); -+#else -+ n = 1; -+#endif - if (n != (size_t) -1 && n != (size_t) -2 && n > 0) - symbol += (n - 1); - } diff --git a/sys-devel/binutils/files/binutils-2.23-no-ld-script-sysroot.patch b/sys-devel/binutils/files/binutils-2.23-no-ld-script-sysroot.patch deleted file mode 100644 index 6436192..0000000 --- a/sys-devel/binutils/files/binutils-2.23-no-ld-script-sysroot.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: binutils-2.23/ld/ldfile.c -=================================================================== ---- binutils-2.23.orig/ld/ldfile.c -+++ binutils-2.23/ld/ldfile.c -@@ -463,7 +463,7 @@ try_open (const char *name, bfd_boolean - result = fopen (name, "r"); - - if (result != NULL) -- *sysrooted = is_sysrooted_pathname (name); -+ *sysrooted = 0; - - if (verbose) - { diff --git a/sys-devel/binutils/files/binutils-2.23-no-rpath-sysroot.patch b/sys-devel/binutils/files/binutils-2.23-no-rpath-sysroot.patch deleted file mode 100644 index 023c706..0000000 --- a/sys-devel/binutils/files/binutils-2.23-no-rpath-sysroot.patch +++ /dev/null @@ -1,44 +0,0 @@ -do not prepend rpath with sysroot -Index: binutils-2.23/ld/emultempl/elf32.em -=================================================================== ---- binutils-2.23.orig/ld/emultempl/elf32.em -+++ binutils-2.23/ld/emultempl/elf32.em -@@ -524,35 +524,10 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then - static char * - gld${EMULATION_NAME}_add_sysroot (const char *path) - { -- int len, colons, i; -- char *ret, *p; -+ char *ret; -+ ret = xmalloc (strlen (path) + 1); -+ strcpy (ret, path); - -- len = strlen (path); -- colons = 0; -- i = 0; -- while (path[i]) -- if (path[i++] == config.rpath_separator) -- colons++; -- -- if (path[i]) -- colons++; -- -- len = len + (colons + 1) * strlen (ld_sysroot); -- ret = xmalloc (len + 1); -- strcpy (ret, ld_sysroot); -- p = ret + strlen (ret); -- i = 0; -- while (path[i]) -- if (path[i] == config.rpath_separator) -- { -- *p++ = path[i++]; -- strcpy (p, ld_sysroot); -- p = p + strlen (p); -- } -- else -- *p++ = path[i++]; -- -- *p = 0; - return ret; - } - diff --git a/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch b/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch deleted file mode 100644 index dd280e3..0000000 --- a/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch +++ /dev/null @@ -1,211 +0,0 @@ -The feature sysroot originally for cross compiling has two parts. The -first is to prepend lib path, done in configure phase, which we call -configure-time sysroot. The second is to prepend rpath in libraries -and path inside ld scripts when ld is called, which we call runtime -sysroot. - -In the case of cross compilation, both are needed. While in the case -of native sysroot, which runs userland in a directory prefix natively, -only configure-time sysroot is needed. - -Here we add an additional option of --enable-runtime-sysroot to fine -control such features. - -2013-08-25 Benda Xu - - * configure.in: add enable-runtime-sysroot to control the - macro ENABLE_RUNTIME_SYSROOT - * emultempl/elf32.em: only prepend rpath with sysroot when - ENABLE_RUNTIME_SYSROOT is defined - * ldfile.c: only prepend lib path with sysroot when - ENABLE_RUNTIME_SYSROOT is defined - * ld.texinfo: document this new behavior for ld script - -Index: binutils-2.23/ld/configure.in -=================================================================== ---- binutils-2.23.orig/ld/configure.in -+++ binutils-2.23/ld/configure.in -@@ -70,6 +70,18 @@ AC_SUBST(use_sysroot) - AC_SUBST(TARGET_SYSTEM_ROOT) - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) - -+AC_ARG_ENABLE(runtime-sysroot, -+[AS_HELP_STRING([--enable-runtime-sysroot], -+ [prepend sysroot to libpath in ld script and rpath, -+ only used in addition to --with-sysroot (default is yes)])], -+[case "${enableval}" in -+ no) ;; -+ *) AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \ -+ [prepend sysroot to libpath in ld script and rpath]) ;; -+esac], -+AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \ -+ [prepend sysroot to libpath in ld script and rpath])) -+ - dnl Use --enable-gold to decide if this linker should be the default. - dnl "install_as_default" is set to false if gold is the default linker. - dnl "installed_linker" is the installed BFD linker name. -Index: binutils-2.23/ld/emultempl/elf32.em -=================================================================== ---- binutils-2.23.orig/ld/emultempl/elf32.em -+++ binutils-2.23/ld/emultempl/elf32.em -@@ -525,7 +525,10 @@ static char * - gld${EMULATION_NAME}_add_sysroot (const char *path) - { - int len, colons, i; -- char *ret, *p; -+ char *ret; -+ -+#ifdef ENABLE_RUNTIME_SYSROOT -+ char *p; - - len = strlen (path); - colons = 0; -@@ -553,6 +556,11 @@ gld${EMULATION_NAME}_add_sysroot (const - *p++ = path[i++]; - - *p = 0; -+#else -+ ret = xmalloc (strlen (path) + 1); -+ strcpy (ret, path); -+#endif -+ - return ret; - } - -Index: binutils-2.23/ld/ldfile.c -=================================================================== ---- binutils-2.23.orig/ld/ldfile.c -+++ binutils-2.23/ld/ldfile.c -@@ -463,7 +463,11 @@ try_open (const char *name, bfd_boolean - result = fopen (name, "r"); - - if (result != NULL) -+#ifdef ENABLE_RUNTIME_SYSROOT - *sysrooted = is_sysrooted_pathname (name); -+#else -+ *sysrooted = 0; -+#endif - - if (verbose) - { -Index: binutils-2.23/ld/ld.texinfo -=================================================================== ---- binutils-2.23.orig/ld/ld.texinfo -+++ binutils-2.23/ld/ld.texinfo -@@ -3026,13 +3026,14 @@ then you can put @samp{INPUT (subr.o)} i - In fact, if you like, you can list all of your input files in the linker - script, and then invoke the linker with nothing but a @samp{-T} option. - --In case a @dfn{sysroot prefix} is configured, and the filename starts --with the @samp{/} character, and the script being processed was --located inside the @dfn{sysroot prefix}, the filename will be looked --for in the @dfn{sysroot prefix}. Otherwise, the linker will try to --open the file in the current directory. If it is not found, the --linker will search through the archive library search path. See the --description of @samp{-L} in @ref{Options,,Command Line Options}. -+In case a @dfn{sysroot prefix} is configured without explict -+--disable-runtime-sysroot, and the filename starts with the @samp{/} -+character, and the script being processed was located inside the -+@dfn{sysroot prefix}, the filename will be looked for in the -+@dfn{sysroot prefix}. Otherwise, the linker will try to open the file -+in the current directory. If it is not found, the linker will search -+through the archive library search path. See the description of -+@samp{-L} in @ref{Options,,Command Line Options}. - - If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the - name to @code{lib@var{file}.a}, as with the command line argument -Index: binutils-2.23/ld/configure -=================================================================== ---- binutils-2.23.orig/ld/configure -+++ binutils-2.23/ld/configure -@@ -773,6 +773,7 @@ with_lib_path - enable_targets - enable_64_bit_bfd - with_sysroot -+enable_runtime_sysroot - enable_gold - enable_got - enable_werror -@@ -1428,6 +1429,10 @@ Optional Features: - (and sometimes confusing) to the casual installer - --enable-targets alternative target configurations - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) -+ --enable-runtime-sysroot -+ prepend sysroot to libpath in ld script and rpath, -+ only used in addition to --with-sysroot (default is -+ yes) - --enable-gold[=ARG] build gold [ARG={default,yes,no}] - --enable-got= GOT handling scheme (target, single, negative, - multigot) -@@ -4317,6 +4322,21 @@ fi - - - -+# Check whether --enable-runtime-sysroot was given. -+if test "${enable_runtime_sysroot+set}" = set; then : -+ enableval=$enable_runtime_sysroot; case "${enableval}" in -+ no) ;; -+ *) -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h -+ ;; -+esac -+else -+ -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h -+ -+fi -+ -+ - # Check whether --enable-gold was given. - if test "${enable_gold+set}" = set; then : - enableval=$enable_gold; case "${enableval}" in -@@ -6744,7 +6764,7 @@ else - lt_cv_sys_max_cmd_len=8192; - ;; - -- mint* | amigaos*) -+ amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; -@@ -12177,7 +12197,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12180 "configure" -+#line 12200 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12283,7 +12303,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12286 "configure" -+#line 12306 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -Index: binutils-2.23/ld/config.in -=================================================================== ---- binutils-2.23.orig/ld/config.in -+++ binutils-2.23/ld/config.in -@@ -2,7 +2,7 @@ - - /* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ --#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -+#if defined(__GLIBC__) && !defined(__CONFIG_H__) - # error config.h must be #included before system headers - #endif - #define __CONFIG_H__ 1 -@@ -11,6 +11,9 @@ - language is requested. */ - #undef ENABLE_NLS - -+/* prepend sysroot to libpath in ld script and rpath */ -+#undef ENABLE_RUNTIME_SYSROOT -+ - /* Additional extension a shared object might have. */ - #undef EXTRA_SHLIB_EXTENSION - diff --git a/sys-devel/binutils/files/binutils-2.24-native-lib.patch b/sys-devel/binutils/files/binutils-2.24-native-lib.patch deleted file mode 100644 index 261b491..0000000 --- a/sys-devel/binutils/files/binutils-2.24-native-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ld/configure.tgt -=================================================================== ---- ld.orig/configure.tgt -+++ ld/configure.tgt -@@ -769,7 +769,7 @@ z8k-*-coff) targ_emul=z8002; targ_extr - - esac - --NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib' -+NATIVE_LIB_DIRS='@GENTOO_PORTAGE_EPREFIX@/usr/local/lib @GENTOO_PORTAGE_EPREFIX@/lib @GENTOO_PORTAGE_EPREFIX@/usr/lib' - case "${target}" in - - *-*-dragonfly*) diff --git a/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch b/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch deleted file mode 100644 index fde8660..0000000 --- a/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch +++ /dev/null @@ -1,202 +0,0 @@ -The feature sysroot originally for cross compiling has two parts. The -first is to prepend lib path, done in configure phase, which we call -configure-time sysroot. The second is to prepend rpath in libraries -and path inside ld scripts when ld is called, which we call runtime -sysroot. - -In the case of cross compilation, both are needed. While in the case -of native sysroot, which runs userland in a directory prefix natively, -only configure-time sysroot is needed. - -Here we add an additional option of --enable-runtime-sysroot to fine -control such features. - -2013-08-25 Benda Xu - - * configure.in: add enable-runtime-sysroot to control the - macro ENABLE_RUNTIME_SYSROOT - * emultempl/elf32.em: only prepend rpath with sysroot when - ENABLE_RUNTIME_SYSROOT is defined - * ldfile.c: only prepend lib path with sysroot when - ENABLE_RUNTIME_SYSROOT is defined - * ld.texinfo: document this new behavior for ld script - -Index: binutils-2.24/ld/configure.in -=================================================================== ---- binutils-2.24.orig/ld/configure.in -+++ binutils-2.24/ld/configure.in -@@ -87,6 +87,18 @@ AC_SUBST(use_sysroot) - AC_SUBST(TARGET_SYSTEM_ROOT) - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) - -+AC_ARG_ENABLE(runtime-sysroot, -+[AS_HELP_STRING([--enable-runtime-sysroot], -+ [prepend sysroot to libpath in ld script and rpath, -+ only used in addition to --with-sysroot (default is yes)])], -+[case "${enableval}" in -+ no) ;; -+ *) AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \ -+ [prepend sysroot to libpath in ld script and rpath]) ;; -+esac], -+AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \ -+ [prepend sysroot to libpath in ld script and rpath])) -+ - dnl Use --enable-gold to decide if this linker should be the default. - dnl "install_as_default" is set to false if gold is the default linker. - dnl "installed_linker" is the installed BFD linker name. -Index: binutils-2.24/ld/emultempl/elf32.em -=================================================================== ---- binutils-2.24.orig/ld/emultempl/elf32.em -+++ binutils-2.24/ld/emultempl/elf32.em -@@ -529,7 +529,10 @@ static char * - gld${EMULATION_NAME}_add_sysroot (const char *path) - { - int len, colons, i; -- char *ret, *p; -+ char *ret; -+ -+#ifdef ENABLE_RUNTIME_SYSROOT -+ char *p; - - len = strlen (path); - colons = 0; -@@ -557,6 +560,11 @@ gld${EMULATION_NAME}_add_sysroot (const - *p++ = path[i++]; - - *p = 0; -+#else -+ ret = xmalloc (strlen (path) + 1); -+ strcpy (ret, path); -+#endif -+ - return ret; - } - -Index: binutils-2.24/ld/ldfile.c -=================================================================== ---- binutils-2.24.orig/ld/ldfile.c -+++ binutils-2.24/ld/ldfile.c -@@ -463,7 +463,11 @@ try_open (const char *name, bfd_boolean - result = fopen (name, "r"); - - if (result != NULL) -+#ifdef ENABLE_RUNTIME_SYSROOT - *sysrooted = is_sysrooted_pathname (name); -+#else -+ *sysrooted = 0; -+#endif - - if (verbose) - { -Index: binutils-2.24/ld/ld.texinfo -=================================================================== ---- binutils-2.24.orig/ld/ld.texinfo -+++ binutils-2.24/ld/ld.texinfo -@@ -3092,13 +3092,14 @@ then you can put @samp{INPUT (subr.o)} i - In fact, if you like, you can list all of your input files in the linker - script, and then invoke the linker with nothing but a @samp{-T} option. - --In case a @dfn{sysroot prefix} is configured, and the filename starts --with the @samp{/} character, and the script being processed was --located inside the @dfn{sysroot prefix}, the filename will be looked --for in the @dfn{sysroot prefix}. Otherwise, the linker will try to --open the file in the current directory. If it is not found, the --linker will search through the archive library search path. See the --description of @samp{-L} in @ref{Options,,Command Line Options}. -+In case a @dfn{sysroot prefix} is configured without explict -+--disable-runtime-sysroot, and the filename starts with the @samp{/} -+character, and the script being processed was located inside the -+@dfn{sysroot prefix}, the filename will be looked for in the -+@dfn{sysroot prefix}. Otherwise, the linker will try to open the file -+in the current directory. If it is not found, the linker will search -+through the archive library search path. See the description of -+@samp{-L} in @ref{Options,,Command Line Options}. - - If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the - name to @code{lib@var{file}.a}, as with the command line argument -Index: binutils-2.24/ld/configure -=================================================================== ---- binutils-2.24.orig/ld/configure -+++ binutils-2.24/ld/configure -@@ -774,6 +774,7 @@ with_lib_path - enable_targets - enable_64_bit_bfd - with_sysroot -+enable_runtime_sysroot - enable_gold - enable_got - enable_werror -@@ -1429,6 +1430,10 @@ Optional Features: - (and sometimes confusing) to the casual installer - --enable-targets alternative target configurations - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) -+ --enable-runtime-sysroot -+ prepend sysroot to libpath in ld script and rpath, -+ only used in addition to --with-sysroot (default is -+ yes) - --enable-gold[=ARG] build gold [ARG={default,yes,no}] - --enable-got= GOT handling scheme (target, single, negative, - multigot) -@@ -4318,6 +4323,21 @@ fi - - - -+# Check whether --enable-runtime-sysroot was given. -+if test "${enable_runtime_sysroot+set}" = set; then : -+ enableval=$enable_runtime_sysroot; case "${enableval}" in -+ no) ;; -+ *) -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h -+ ;; -+esac -+else -+ -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h -+ -+fi -+ -+ - # Check whether --enable-gold was given. - if test "${enable_gold+set}" = set; then : - enableval=$enable_gold; case "${enableval}" in -@@ -12192,7 +12212,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12195 "configure" -+#line 12215 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12298,7 +12318,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12301 "configure" -+#line 12321 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -Index: binutils-2.24/ld/config.in -=================================================================== ---- binutils-2.24.orig/ld/config.in -+++ binutils-2.24/ld/config.in -@@ -2,7 +2,7 @@ - - /* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ --#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -+#if defined(__GLIBC__) && !defined(__CONFIG_H__) - # error config.h must be #included before system headers - #endif - #define __CONFIG_H__ 1 -@@ -11,6 +11,9 @@ - language is requested. */ - #undef ENABLE_NLS - -+/* prepend sysroot to libpath in ld script and rpath */ -+#undef ENABLE_RUNTIME_SYSROOT -+ - /* Additional extension a shared object might have. */ - #undef EXTRA_SHLIB_EXTENSION - diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml deleted file mode 100644 index b756437..0000000 --- a/sys-devel/binutils/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - -toolchain - -Allow for multiple versions of binutils to be emerged at once for same CTARGET -Adds support to binutils for cross compiling (does not work with gas) - - -- cgit v1.2.3-65-gdbad