Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/android:master commit in: sys-devel/binutils/, sys-devel/binutils/files/
Date: Thu, 26 May 2016 04:05:08
Message-Id: 1463904485.fdc51f766c151894a9b9d048d9e580389ad7c9d5.heroxbd@gentoo
1 commit: fdc51f766c151894a9b9d048d9e580389ad7c9d5
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 22 08:08:05 2016 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Sun May 22 08:08:05 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=fdc51f76
7
8 sys-devel/binutils: tricks merged into profiles.
9
10 sys-devel/binutils/ChangeLog | 2281 ----------------
11 sys-devel/binutils/Manifest | 57 -
12 sys-devel/binutils/binutils-2.20.1-r1.ebuild | 30 -
13 sys-devel/binutils/binutils-2.21.1-r1.ebuild | 30 -
14 sys-devel/binutils/binutils-2.22-r1.ebuild | 60 -
15 sys-devel/binutils/binutils-2.23.51.0.3.ebuild | 60 -
16 sys-devel/binutils/binutils-2.23.51.0.5.ebuild | 60 -
17 sys-devel/binutils/binutils-2.23.51.0.6.ebuild | 60 -
18 sys-devel/binutils/binutils-2.23.51.0.8.ebuild | 60 -
19 sys-devel/binutils/binutils-2.23.ebuild | 65 -
20 sys-devel/binutils/binutils-2.24-r3.ebuild | 22 -
21 sys-devel/binutils/files/2.18-bfd-alloca.patch | 130 -
22 sys-devel/binutils/files/2.18-bfd-bufsz.patch | 38 -
23 sys-devel/binutils/files/2.18-bfd-ia64elf.patch | 96 -
24 sys-devel/binutils/files/2.18-gprof-fabs.patch | 151 --
25 sys-devel/binutils/files/2.18-ldwrap-interix.sh | 82 -
26 sys-devel/binutils/files/2.18-solarisx86_64.patch | 32 -
27 sys-devel/binutils/files/2.21-ldwrap-interix.sh | 94 -
28 sys-devel/binutils/files/binutils-2.16-gcc4.patch | 11 -
29 .../binutils/files/binutils-2.16-solaris10.patch | 34 -
30 .../binutils/files/binutils-2.18.50.0.7-mint.patch | 2503 ------------------
31 .../files/binutils-2.18.50.0.7-mint2.patch | 94 -
32 .../files/binutils-2.18.50.0.9-reloc.patch | 20 -
33 .../binutils-2.18.50.0.9-solaris-eh-frame.patch | 183 --
34 .../binutils/files/binutils-2.19.1-hppa-hpux.patch | 444 ----
35 .../binutils/files/binutils-2.19.1-hpux.patch | 22 -
36 .../binutils/files/binutils-2.19.1-parallel.patch | 12 -
37 .../binutils/files/binutils-2.19.50.0.1-mint.patch | 66 -
38 .../binutils-2.20.51.0.1-linux-x86-on-amd64.patch | 13 -
39 .../binutils/files/binutils-2.21.51.0.6-mint.patch | 2775 --------------------
40 .../binutils/files/binutils-2.21.53.0.2-mint.patch | 2667 -------------------
41 sys-devel/binutils/files/binutils-2.22-mint.patch | 2656 -------------------
42 .../files/binutils-2.23-ar-ranlib-truncate.patch | 37 -
43 .../binutils/files/binutils-2.23-mbstate_t.patch | 184 --
44 .../files/binutils-2.23-no-ld-script-sysroot.patch | 13 -
45 .../files/binutils-2.23-no-rpath-sysroot.patch | 44 -
46 .../files/binutils-2.23-runtime-sysroot.patch | 211 --
47 .../binutils/files/binutils-2.24-native-lib.patch | 13 -
48 .../files/binutils-2.24-runtime-sysroot.patch | 202 --
49 sys-devel/binutils/metadata.xml | 9 -
50 40 files changed, 15621 deletions(-)
51
52 diff --git a/sys-devel/binutils/ChangeLog b/sys-devel/binutils/ChangeLog
53 deleted file mode 100644
54 index ae4c66e..0000000
55 --- a/sys-devel/binutils/ChangeLog
56 +++ /dev/null
57 @@ -1,2281 +0,0 @@
58 -# ChangeLog for sys-devel/binutils
59 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
60 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/ChangeLog,v 1.476 2012/12/29 20:58:39 vapier Exp $
61 -
62 -*binutils-2.23.51.0.8 (29 Dec 2012)
63 -
64 - 29 Dec 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.8.ebuild:
65 - Version bump #449124 by Arfrever Frehtes Taifersar Arahesis.
66 -
67 -*binutils-2.23.51.0.7 (20 Dec 2012)
68 -
69 - 20 Dec 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.7.ebuild:
70 - Version bump.
71 -
72 - 05 Dec 2012; Fabian Groffen <grobian@g.o>
73 - +files/binutils-2.23-mbstate_t.patch, binutils-2.23.ebuild:
74 - Add upstream mbstate_t patch, bug #445326
75 -
76 -*binutils-2.23.51.0.6 (26 Nov 2012)
77 -
78 - 26 Nov 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.6.ebuild:
79 - Version bump.
80 -
81 -*binutils-2.23.1 (15 Nov 2012)
82 -
83 - 15 Nov 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.1.ebuild:
84 - Version bump.
85 -
86 -*binutils-2.23.51.0.5 (13 Nov 2012)
87 -
88 - 13 Nov 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.5.ebuild:
89 - Version bump.
90 -
91 - 02 Nov 2012; Mike Frysinger <vapier@g.o> binutils-2.23.51.0.3.ebuild,
92 - binutils-2.23.ebuild:
93 - Drop ld sysroot patch since upstream has merged a proper fix.
94 -
95 -*binutils-2.23 (24 Oct 2012)
96 -
97 - 24 Oct 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.ebuild:
98 - Version bump.
99 -
100 - 29 Sep 2012; Raúl Porcel <armin76@g.o> binutils-2.22-r1.ebuild:
101 - alpha/ia64/sh/sparc stable wrt #414865
102 -
103 -*binutils-2.23.51.0.3 (19 Sep 2012)
104 -
105 - 19 Sep 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.3.ebuild:
106 - Version bump.
107 -
108 -*binutils-2.23.51.0.2 (11 Sep 2012)
109 -
110 - 11 Sep 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.2.ebuild:
111 - Version bump.
112 -
113 - 22 Aug 2012; Michael Weber <xmw@g.o> binutils-2.22-r1.ebuild:
114 - ppc stable (bug 414865).
115 -
116 - 10 Aug 2012; Mike Frysinger <vapier@g.o> binutils-2.22-r1.ebuild:
117 - Build with -fPIC on s390x #430554 by Raúl Porcel.
118 -
119 - 08 Aug 2012; Mike Frysinger <vapier@g.o> binutils-2.23.51.0.1.ebuild:
120 - Fix applying of lib32 patch as reported by Arfrever.
121 -
122 -*binutils-2.23.51.0.1 (07 Aug 2012)
123 -
124 - 07 Aug 2012; Mike Frysinger <vapier@g.o> +binutils-2.23.51.0.1.ebuild:
125 - Version bump.
126 -
127 - 07 Aug 2012; Mike Frysinger <vapier@g.o> -binutils-2.16.1-r3.ebuild,
128 - -binutils-2.16.91.0.6.ebuild, -binutils-2.18-r3.ebuild,
129 - -binutils-2.18-r4.ebuild, -binutils-2.22.52.0.1.ebuild,
130 - -binutils-2.22.52.0.2.ebuild, -binutils-2.22.52.0.3.ebuild:
131 - Move older versions to toolchain overlay.
132 -
133 - 07 Aug 2012; Brent Baude <ranger@g.o> binutils-2.22-r1.ebuild:
134 - Marking binutils-2.22-r1 ppc64 for bug 414865
135 -
136 - 07 Aug 2012; Agostino Sarubbo <ago@g.o> binutils-2.22-r1.ebuild:
137 - Stable for X86, wrt bug #414865
138 -
139 - 07 Aug 2012; Agostino Sarubbo <ago@g.o> binutils-2.22-r1.ebuild:
140 - Stable for amd64, wrt bug #424865
141 -
142 - 07 Aug 2012; Raúl Porcel <armin76@g.o> binutils-2.22-r1.ebuild:
143 - s390 stable wrt #414865
144 -
145 - 06 Aug 2012; Brent Baude <ranger@g.o> binutils-2.22-r1.ebuild:
146 - Marking binutils-2.22-r1 ppc64 for bug 414865
147 -
148 - 05 Aug 2012; Markus Meier <maekke@g.o> binutils-2.22-r1.ebuild:
149 - arm stable, bug #414865
150 -
151 - 02 Aug 2012; Richard Yao <ryao@g.o> binutils-2.22.90.ebuild:
152 - Set -*-fbsd keywords due to -ldl issue
153 -
154 - 01 Aug 2012; Jeroen Roovers <jer@g.o> binutils-2.22-r1.ebuild:
155 - Stable for HPPA (bug #414865).
156 -
157 - 28 Jul 2012; Mike Frysinger <vapier@g.o> binutils-2.22.90.ebuild:
158 - Fix applying of lib32 patch #428366 by Alexandre.
159 -
160 -*binutils-2.22.90 (27 Jul 2012)
161 -
162 - 27 Jul 2012; Mike Frysinger <vapier@g.o> +binutils-2.22.90.ebuild:
163 - Version bump.
164 -
165 -*binutils-2.22.52.0.4 (06 Jul 2012)
166 -
167 - 06 Jul 2012; Mike Frysinger <vapier@g.o> +binutils-2.22.52.0.4.ebuild:
168 - Version bump.
169 -
170 - 15 Jun 2012; Naohiro Aota <naota@g.o> binutils-2.22-r1.ebuild:
171 - Add ~x86-fbsd.
172 -
173 - 15 Jun 2012; Richard Yao <ryao@g.o> binutils-2.22-r1.ebuild:
174 - Modify FBSD patch to include update to ./configure script, bug #421069
175 -
176 - 13 Jun 2012; Richard Yao <ryao@g.o> binutils-2.22-r1.ebuild:
177 - Push out fix for build failure on FreeBSD (bug #347931) by Naohiro Aota and keyword ~amd64-fbsd
178 -
179 - 31 May 2012; Mike Frysinger <vapier@g.o> binutils-2.20.1-r1.ebuild:
180 - Push out fix for POSIX test behavior #417549 by Richard Yao.
181 -
182 - 22 May 2012; Mike Frysinger <vapier@g.o> binutils-2.22-r1.ebuild,
183 - binutils-2.22.52.0.1.ebuild, binutils-2.22.52.0.2.ebuild,
184 - binutils-2.22.52.0.3.ebuild:
185 - Drop patch-2.6 requirement now that the profile pulls it in.
186 -
187 -*binutils-2.22.52.0.3 (09 May 2012)
188 -
189 - 09 May 2012; Mike Frysinger <vapier@g.o> +binutils-2.22.52.0.3.ebuild:
190 - Version bump.
191 -
192 - 26 Apr 2012; Alexis Ballier <aballier@g.o> binutils-2.20.1-r1.ebuild:
193 - keyword ~amd64-fbsd
194 -
195 - 26 Apr 2012; Mike Frysinger <vapier@g.o> -binutils-2.21.1.ebuild,
196 - -binutils-2.21.52.0.1.ebuild, -binutils-2.21.52.0.2.ebuild,
197 - -binutils-2.21.53.0.1.ebuild, -binutils-2.21.53.0.2.ebuild,
198 - -binutils-2.21.ebuild, -binutils-2.22.ebuild:
199 - Move older versions to the toolchain overlay.
200 -
201 -*binutils-2.22.52.0.2 (26 Apr 2012)
202 -
203 - 26 Apr 2012; Mike Frysinger <vapier@g.o> +binutils-2.22.52.0.2.ebuild:
204 - Version bump.
205 -
206 - 04 Mar 2012; Mike Frysinger <vapier@g.o> binutils-2.22-r1.ebuild:
207 - Add fix from upstream for hppa/plt handling #406349 by Jeroen Roovers.
208 -
209 - 06 Feb 2012; Mike Frysinger <vapier@g.o> binutils-2.22.52.0.1.ebuild:
210 - Drop KEYWORDS -- didn't mean to add those.
211 -
212 -*binutils-2.22.52.0.1 (05 Feb 2012)
213 -
214 - 05 Feb 2012; Mike Frysinger <vapier@g.o> +binutils-2.22.52.0.1.ebuild:
215 - Version bump.
216 -
217 -*binutils-9999 (05 Feb 2012)
218 -
219 - 05 Feb 2012; Mike Frysinger <vapier@g.o> +binutils-9999.ebuild:
220 - Add live git version.
221 -
222 - 28 Dec 2011; Mark Loeser <halcy0n@g.o> binutils-2.21.1-r1.ebuild:
223 - Stable for ppc/ppc64; bug #378485
224 -
225 -*binutils-2.22-r1 (11 Dec 2011)
226 -
227 - 11 Dec 2011; Mike Frysinger <vapier@g.o> +binutils-2.22-r1.ebuild:
228 - Add fixes from upstream for ppc/hppa/s390x, and a hardened fix for static
229 - linking.
230 -
231 - 11 Dec 2011; Raúl Porcel <armin76@g.o> binutils-2.21.1-r1.ebuild:
232 - sparc stable wrt #378485
233 -
234 - 09 Dec 2011; Fabian Groffen <grobian@g.o>
235 - +files/binutils-2.22-mint.patch, binutils-2.22.ebuild:
236 - Add updated patch for FreeMiNT by Alan Hourihane, bug #394151
237 -
238 - 05 Dec 2011; Mike Frysinger <vapier@g.o> Manifest:
239 - Update patch tarball digests to match published one #393233 by Jerome Kurtz.
240 -
241 - 05 Dec 2011; Mike Frysinger <vapier@g.o> binutils-2.21.1-r1.ebuild:
242 - Fix building on s390x systems #391431 by Raúl Porcel.
243 -
244 - 23 Nov 2011; Diego E. Pettenò <flameeyes@g.o> binutils-2.22.ebuild:
245 - QA: make sure to depend on a patch(1) version that actually applies all the
246 - patches.
247 -
248 -*binutils-2.22 (21 Nov 2011)
249 -
250 - 21 Nov 2011; Mike Frysinger <vapier@g.o> +binutils-2.22.ebuild:
251 - Version bump.
252 -
253 - 19 Nov 2011; Mike Frysinger <vapier@g.o> binutils-2.21.1-r1.ebuild:
254 - Mark alpha/arm/ia64/m68k/s390/sh stable #378485.
255 -
256 - 17 Nov 2011; Pawel Hajdan jr <phajdan.jr@g.o>
257 - binutils-2.21.1-r1.ebuild:
258 - x86 stable wrt bug #378485
259 -
260 - 16 Oct 2011; Mike Frysinger <vapier@g.o> binutils-2.21.1-r1.ebuild:
261 - Add fix from upstream for mips ld segfaults #387055 by Matt Turner.
262 -
263 - 06 Oct 2011; Jeroen Roovers <jer@g.o> binutils-2.21.1-r1.ebuild:
264 - Stable for HPPA (bug #378485).
265 -
266 - 22 Sep 2011; Mike Frysinger <vapier@g.o> binutils-2.18-r3.ebuild,
267 - binutils-2.18-r4.ebuild, binutils-2.19.1-r1.ebuild,
268 - binutils-2.20.1-r1.ebuild, binutils-2.21.1.ebuild, binutils-2.21.1-r1.ebuild:
269 - Drop mirror restrict now that most should be synced.
270 -
271 - 19 Sep 2011; Mike Frysinger <vapier@g.o> binutils-2.21.1-r1.ebuild:
272 - Fix up most test failures #379105.
273 -
274 - 18 Sep 2011; Mike Frysinger <vapier@g.o> binutils-2.18-r3.ebuild,
275 - binutils-2.18-r4.ebuild, binutils-2.19.1-r1.ebuild,
276 - binutils-2.20.1-r1.ebuild, binutils-2.21.1.ebuild, binutils-2.21.1-r1.ebuild:
277 - Temporarily set some ebuilds to ignore Gentoo mirrors since upstream
278 - regenerated their tarballs #381831 by Randy Barlow.
279 -
280 - 25 Aug 2011; Markos Chandras <hwoarang@g.o> binutils-2.21.1.ebuild,
281 - binutils-2.21.1-r1.ebuild:
282 - Restore ~amd64 to 2.21.1 and stabilize 2.21.1-r1 instead. Bug #378485
283 -
284 - 22 Aug 2011; Tony Vroon <chainsaw@g.o> binutils-2.21.1.ebuild:
285 - Marked stable on AMD64 based on arch testing by Ian "idella4" Delaney &
286 - Agostino "ago" Sarubbo in bug #378485. The test suite has gained a failure,
287 - but the package was deemed functional.
288 -
289 -*binutils-2.21.1-r1 (22 Aug 2011)
290 -
291 - 22 Aug 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.1-r1.ebuild:
292 - Fix up pax patch due to local variable renames #379321 by Sven Vermeulen.
293 -
294 - 22 Aug 2011; Mike Frysinger <vapier@g.o> -binutils-2.21.51.0.1.ebuild,
295 - -binutils-2.21.51.0.2.ebuild, -binutils-2.21.51.0.3.ebuild,
296 - -binutils-2.21.51.0.4.ebuild, -binutils-2.21.51.0.5.ebuild,
297 - -binutils-2.21.51.0.6.ebuild, -binutils-2.21.51.0.7.ebuild,
298 - -binutils-2.21.51.0.8.ebuild, -binutils-2.21.51.0.9.ebuild:
299 - Move old ebuilds to toolchain overlay.
300 -
301 -*binutils-2.21.53.0.2 (11 Aug 2011)
302 -*binutils-2.21.53.0.1 (11 Aug 2011)
303 -
304 - 11 Aug 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.53.0.1.ebuild,
305 - +binutils-2.21.53.0.2.ebuild:
306 - Version bumps.
307 -
308 -*binutils-2.21.1 (28 Jun 2011)
309 -
310 - 28 Jun 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.1.ebuild:
311 - Version bump.
312 -
313 -*binutils-2.21.52.0.2 (17 Jun 2011)
314 -
315 - 17 Jun 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.52.0.2.ebuild:
316 - Version bump.
317 -
318 - 11 Jun 2011; Alexis Ballier <aballier@g.o> binutils-2.21.ebuild:
319 - keyword -x86-fbsd and -sparc-fbsd until bug #347931 is solved; it doesnt
320 - build
321 -
322 -*binutils-2.21.52.0.1 (09 Jun 2011)
323 -
324 - 09 Jun 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.52.0.1.ebuild:
325 - Version bump.
326 -
327 -*binutils-2.21.51.0.9 (09 May 2011)
328 -
329 - 09 May 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.51.0.9.ebuild:
330 - Version bump.
331 -
332 -*binutils-2.21.51.0.8 (10 Apr 2011)
333 -
334 - 10 Apr 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.51.0.8.ebuild:
335 - Version bump.
336 -
337 -*binutils-2.21.51.0.7 (14 Mar 2011)
338 -
339 - 14 Mar 2011; Mike Frysinger <vapier@g.o> +binutils-2.21.51.0.7.ebuild:
340 - Version bump.
341 -
342 - 06 Feb 2011; Mart Raudsepp <leio@g.o> binutils-2.16.1-r3.ebuild:
343 - Drop to ~mips
344 -
345 -*binutils-2.21.51.0.6 (20 Jan 2011)
346 -
347 - 20 Jan 2011; Mike Frysinger <vapier@g.o>
348 - +binutils-2.21.51.0.6.ebuild:
349 - Version bump.
350 -
351 -*binutils-2.21.51.0.5 (12 Jan 2011)
352 -
353 - 12 Jan 2011; Mike Frysinger <vapier@g.o>
354 - +binutils-2.21.51.0.5.ebuild:
355 - Version bump.
356 -
357 -*binutils-2.21.51.0.4 (17 Dec 2010)
358 -
359 - 17 Dec 2010; Mike Frysinger <vapier@g.o>
360 - +binutils-2.21.51.0.4.ebuild:
361 - Version bump.
362 -
363 -*binutils-2.21.51.0.3 (16 Dec 2010)
364 -
365 - 16 Dec 2010; Mike Frysinger <vapier@g.o>
366 - +binutils-2.21.51.0.3.ebuild:
367 - Version bump.
368 -
369 -*binutils-2.21 (09 Dec 2010)
370 -
371 - 09 Dec 2010; Mike Frysinger <vapier@g.o> +binutils-2.21.ebuild:
372 - Version bump.
373 -
374 -*binutils-2.21.51.0.2 (07 Dec 2010)
375 -
376 - 07 Dec 2010; Mike Frysinger <vapier@g.o>
377 - +binutils-2.21.51.0.2.ebuild:
378 - Version bump.
379 -
380 -*binutils-2.21.51.0.1 (13 Nov 2010)
381 -*binutils-2.20.51.0.12 (13 Nov 2010)
382 -
383 - 13 Nov 2010; Mike Frysinger <vapier@g.o>
384 - +binutils-2.20.51.0.12.ebuild, +binutils-2.21.51.0.1.ebuild:
385 - Version bumps.
386 -
387 - 30 Aug 2010; Mike Frysinger <vapier@g.o> binutils-2.20.1-r1.ebuild:
388 - Mark s390 stable #298571.
389 -
390 -*binutils-2.20.51.0.11 (14 Aug 2010)
391 -
392 - 14 Aug 2010; Mike Frysinger <vapier@g.o>
393 - +binutils-2.20.51.0.11.ebuild:
394 - Version bump.
395 -
396 -*binutils-2.20.51.0.10 (27 Jul 2010)
397 -
398 - 27 Jul 2010; Mike Frysinger <vapier@g.o>
399 - +binutils-2.20.51.0.10.ebuild:
400 - Version bump #329023 by Arfrever Frehtes Taifersar Arahesis.
401 -
402 - 18 Jul 2010; Raúl Porcel <armin76@g.o> binutils-2.20.1-r1.ebuild:
403 - sh/sparc stable wrt #298571
404 -
405 - 11 Jul 2010; Tobias Klausmann <klausman@g.o>
406 - binutils-2.20.1-r1.ebuild:
407 - Stable on alpha, bug #298571
408 -
409 - 05 Jul 2010; Samuli Suominen <ssuominen@g.o>
410 - binutils-2.20.1-r1.ebuild:
411 - ppc64 stable wrt #298571
412 -
413 - 27 Jun 2010; <nixnut@g.o> binutils-2.20.1-r1.ebuild:
414 - ppc stable #298571
415 -
416 - 25 Jun 2010; Mike Frysinger <vapier@g.o> binutils-2.20.1-r1.ebuild:
417 - Mark ia64 stable #298571.
418 -
419 - 24 Jun 2010; Jeroen Roovers <jer@g.o> binutils-2.20.1-r1.ebuild:
420 - Stable for HPPA (bug #298571).
421 -
422 - 21 Jun 2010; Markus Meier <maekke@g.o> binutils-2.20.1-r1.ebuild:
423 - arm stable, bug #298571
424 -
425 - 13 Jun 2010; Christoph Mende <angelos@g.o>
426 - binutils-2.20.1-r1.ebuild:
427 - Stable on amd64 wrt bug #298571
428 -
429 - 08 Jun 2010; Pawel Hajdan jr <phajdan.jr@g.o>
430 - binutils-2.20.1-r1.ebuild:
431 - x86 stable wrt bug #298571
432 -
433 -*binutils-2.20.51.0.9 (28 May 2010)
434 -
435 - 28 May 2010; Mike Frysinger <vapier@g.o>
436 - +binutils-2.20.51.0.9.ebuild:
437 - Version bump.
438 -
439 -*binutils-2.20.1-r1 (09 May 2010)
440 -
441 - 09 May 2010; Mike Frysinger <vapier@g.o>
442 - +binutils-2.20.1-r1.ebuild:
443 - Add fix from upstream for ld internal error #317549, add fix from upstream
444 - for dynamic PIEs #311081, and fix patching on mips systems #310279.
445 -
446 -*binutils-2.20.51.0.8 (14 Apr 2010)
447 -
448 - 14 Apr 2010; Mike Frysinger <vapier@g.o>
449 - +binutils-2.20.51.0.8.ebuild:
450 - Version bump.
451 -
452 -*binutils-2.20.51.0.7 (11 Apr 2010)
453 -
454 - 11 Apr 2010; Mike Frysinger <vapier@g.o>
455 - +binutils-2.20.51.0.7.ebuild:
456 - Version bump #312303.
457 -
458 -*binutils-2.20.1 (08 Mar 2010)
459 -
460 - 08 Mar 2010; Mike Frysinger <vapier@g.o> +binutils-2.20.1.ebuild:
461 - Version bump.
462 -
463 - 08 Mar 2010; Mike Frysinger <vapier@g.o> binutils-2.20-r1.ebuild:
464 - Fix random test failures due to our patches #242104 #245124 #267131 #292750.
465 -
466 -*binutils-2.20-r1 (26 Feb 2010)
467 -
468 - 26 Feb 2010; Mark Loeser <halcy0n@g.o> -binutils-2.20.ebuild,
469 - +binutils-2.20-r1.ebuild:
470 - Bump for new patchset which fixes bug #302696
471 -
472 -*binutils-2.20.51.0.6 (07 Feb 2010)
473 -
474 - 07 Feb 2010; Mike Frysinger <vapier@g.o>
475 - +binutils-2.20.51.0.6.ebuild:
476 - Version bump.
477 -
478 - 03 Feb 2010; Jeroen Roovers <jer@g.o> binutils-2.19.1-r1.ebuild:
479 - Stable for HPPA too.
480 -
481 - 28 Jan 2010; Mike Frysinger <vapier@g.o> metadata.xml:
482 - Drop USE=gold per #301480 -- gold is always enabled as a secondary linker
483 - now (ld.gold).
484 -
485 -*binutils-2.20.51.0.5 (16 Jan 2010)
486 -
487 - 16 Jan 2010; Mike Frysinger <vapier@g.o>
488 - +binutils-2.20.51.0.5.ebuild:
489 - Version bump.
490 -
491 - 11 Jan 2010; Raúl Porcel <armin76@g.o> binutils-2.19.1-r1.ebuild:
492 - arm stable
493 -
494 -*binutils-2.20.51.0.4 (18 Dec 2009)
495 -
496 - 18 Dec 2009; Mike Frysinger <vapier@g.o>
497 - +binutils-2.20.51.0.4.ebuild:
498 - Version bump.
499 -
500 - 01 Dec 2009; Tom Gall <tgall@g.o> binutils-2.19.1-r1.ebuild:
501 - stable on ppc64
502 -
503 -*binutils-2.20.51.0.3 (21 Nov 2009)
504 -
505 - 21 Nov 2009; Mike Frysinger <vapier@g.o>
506 - +binutils-2.20.51.0.3.ebuild:
507 - Version bump #293141.
508 -
509 - 14 Nov 2009; Mike Frysinger <vapier@g.o> binutils-2.20.ebuild:
510 - Add fix from upstream for USE=multitarget #289756 by Rafał Mużyło.
511 -
512 -*binutils-2.20 (19 Oct 2009)
513 -
514 - 19 Oct 2009; Mike Frysinger <vapier@g.o> +binutils-2.20.ebuild:
515 - Version bump #289673 by Lars Wendler.
516 -
517 -*binutils-2.20.51.0.2 (10 Oct 2009)
518 -
519 - 10 Oct 2009; Mike Frysinger <vapier@g.o>
520 - +binutils-2.20.51.0.2.ebuild:
521 - Version bump.
522 -
523 - 14 Sep 2009; Raúl Porcel <armin76@g.o> binutils-2.19.1-r1.ebuild:
524 - s390 stable
525 -
526 - 09 Sep 2009; Mike Frysinger <vapier@g.o> binutils-2.19.1-r1.ebuild:
527 - Fix gold build with gcc-4.4 #269260.
528 -
529 -*binutils-2.20.51.0.1 (09 Sep 2009)
530 -
531 - 09 Sep 2009; Mike Frysinger <vapier@g.o>
532 - +binutils-2.20.51.0.1.ebuild:
533 - Version bump.
534 -
535 -*binutils-2.19.51.0.14 (23 Jul 2009)
536 -
537 - 23 Jul 2009; Mark Loeser <halcy0n@g.o>
538 - -binutils-2.19.51.0.12.ebuild, +binutils-2.19.51.0.14.ebuild:
539 - Version bump, remove old
540 -
541 -*binutils-2.19.51.0.13 (22 Jul 2009)
542 -
543 - 22 Jul 2009; Mark Loeser <halcy0n@g.o>
544 - -binutils-2.19.51.0.10.ebuild, -binutils-2.19.51.0.11.ebuild,
545 - +binutils-2.19.51.0.13.ebuild:
546 - Version bump
547 -
548 -*binutils-2.19.51.0.12 (20 Jul 2009)
549 -
550 - 20 Jul 2009; Mike Frysinger <vapier@g.o>
551 - +binutils-2.19.51.0.12.ebuild:
552 - Version bump.
553 -
554 -*binutils-2.19.51.0.11 (12 Jul 2009)
555 -
556 - 12 Jul 2009; Mark Loeser <halcy0n@g.o>
557 - +binutils-2.19.51.0.11.ebuild:
558 - Version bump; bug #276498
559 -
560 -*binutils-2.19.51.0.10 (19 Jun 2009)
561 -
562 - 19 Jun 2009; Mike Frysinger <vapier@g.o>
563 - +binutils-2.19.51.0.10.ebuild:
564 - Version bump.
565 -
566 -*binutils-2.19.51.0.9 (07 Jun 2009)
567 -
568 - 07 Jun 2009; Mike Frysinger <vapier@g.o>
569 - +binutils-2.19.51.0.9.ebuild:
570 - Version bump.
571 -
572 -*binutils-2.19.51.0.8 (03 Jun 2009)
573 -
574 - 03 Jun 2009; Mike Frysinger <vapier@g.o>
575 - +binutils-2.19.51.0.8.ebuild:
576 - Version bump.
577 -
578 -*binutils-2.19.51.0.7 (01 Jun 2009)
579 -
580 - 01 Jun 2009; Mike Frysinger <vapier@g.o>
581 - +binutils-2.19.51.0.7.ebuild:
582 - Version bump.
583 -
584 -*binutils-2.19.51.0.6 (30 May 2009)
585 -
586 - 30 May 2009; Mike Frysinger <vapier@g.o>
587 - +binutils-2.19.51.0.6.ebuild:
588 - Version bump.
589 -
590 - 26 May 2009; Diego E. Pettenò <flameeyes@g.o>
591 - binutils-2.19.51.0.5.ebuild:
592 - Update patchlevel to pick up the new patch to update ld(1) wrt
593 - --enable-new-dtags.
594 -
595 -*binutils-2.19.51.0.5 (26 May 2009)
596 -
597 - 26 May 2009; Mike Frysinger <vapier@g.o>
598 - +binutils-2.19.51.0.5.ebuild:
599 - Version bump.
600 -
601 - 14 May 2009; Ryan Hill <dirtyepic@g.o> metadata.xml:
602 - Set proper expectations for the gold linker.
603 -
604 - 09 May 2009; Mike Frysinger <vapier@g.o> metadata.xml:
605 - Add new USE=gold flag #266282 by Dror Levin.
606 -
607 -*binutils-2.19.51.0.4 (09 May 2009)
608 -
609 - 09 May 2009; Mike Frysinger <vapier@g.o>
610 - +binutils-2.19.51.0.4.ebuild:
611 - Version bump #267297 by Arfrever Frehtes Taifersar Arahesis.
612 -
613 -*binutils-2.19.1-r1 (14 Mar 2009)
614 -
615 - 14 Mar 2009; Mike Frysinger <vapier@g.o>
616 - +binutils-2.19.1-r1.ebuild:
617 - Add strip fixes from upstream for #183725 by Harald van Dijk and #257783
618 - by Alexey Shvetsov and Raúl Porcel.
619 -
620 -*binutils-2.19.51.0.3 (10 Mar 2009)
621 -
622 - 10 Mar 2009; Mike Frysinger <vapier@g.o>
623 - +binutils-2.19.51.0.3.ebuild:
624 - Version bump.
625 -
626 -*binutils-2.19.51.0.2 (05 Feb 2009)
627 -
628 - 05 Feb 2009; Mike Frysinger <vapier@g.o>
629 - +binutils-2.19.51.0.2.ebuild:
630 - Version bump.
631 -
632 -*binutils-2.19.1 (05 Feb 2009)
633 -
634 - 05 Feb 2009; Mike Frysinger <vapier@g.o> +binutils-2.19.1.ebuild:
635 - Version bump.
636 -
637 -*binutils-2.19.51.0.1 (10 Jan 2009)
638 -
639 - 10 Jan 2009; Mike Frysinger <vapier@g.o>
640 - +binutils-2.19.51.0.1.ebuild:
641 - Version bump.
642 -
643 - 08 Jan 2009; Javier Villavicencio <the_paya@g.o>
644 - binutils-2.19.ebuild:
645 - Keyworded ~x86-fbsd.
646 -
647 - 14 Dec 2008; Alexis Ballier <aballier@g.o> binutils-2.19.ebuild:
648 - keyword ~sparc-fbsd
649 -
650 - 28 Nov 2008; Mike Frysinger <vapier@g.o> binutils-2.19.ebuild,
651 - binutils-2.19.50.0.1.ebuild:
652 - Fix a bunch of PaX test failures #245124 and fix cross-compiling #245478.
653 -
654 - 17 Nov 2008; Joshua Kinard <kumba@g.o> binutils-2.19.ebuild:
655 - Add ~mips to KEYWORDS for binutils-2.19.
656 -
657 - 05 Nov 2008; Jeroen Roovers <jer@g.o> binutils-2.19.ebuild:
658 - Marked ~hppa too.
659 -
660 - 02 Nov 2008; Mike Frysinger <vapier@g.o> binutils-2.19.ebuild:
661 - Add ~alpha/~sparc love.
662 -
663 -*binutils-2.19 (01 Nov 2008)
664 -
665 - 01 Nov 2008; Mike Frysinger <vapier@g.o> +binutils-2.19.ebuild:
666 - Version bump.
667 -
668 -*binutils-2.19.50.0.1 (26 Oct 2008)
669 -
670 - 26 Oct 2008; Mike Frysinger <vapier@g.o>
671 - +binutils-2.19.50.0.1.ebuild:
672 - Version bump #241482.
673 -
674 -*binutils-2.18-r4 (25 Oct 2008)
675 -
676 - 25 Oct 2008; Mark Loeser <halcy0n@g.o> +binutils-2.18-r4.ebuild:
677 - Patchset bump to fix usage on mips; bug #223229
678 -
679 -*binutils-2.18.50.0.9 (21 Sep 2008)
680 -
681 - 21 Sep 2008; Mike Frysinger <vapier@g.o>
682 - +binutils-2.18.50.0.9.ebuild:
683 - Version bump #236197.
684 -
685 - 20 Aug 2008; Mike Frysinger <vapier@g.o> binutils-2.18-r3.ebuild:
686 - Disable gnu hash for mips #233233.
687 -
688 -*binutils-2.18.50.0.8 (20 Aug 2008)
689 -
690 - 20 Aug 2008; Mike Frysinger <vapier@g.o>
691 - +binutils-2.18.50.0.8.ebuild:
692 - Version bump #231687.
693 -
694 - 02 Aug 2008; Panagiotis Christopoulos <pchrist@g.o> metadata.xml:
695 - Update metadata.xml to include USE flag descriptions. Entries taken from
696 - profiles/use.local.desc. GLEP 56
697 -
698 - 20 Jul 2008; Ryan Hill <dirtyepic@g.o> binutils-2.18-r3.ebuild:
699 - Bump patchset for bug #194949.
700 -
701 - 07 Jul 2008; Markus Meier <maekke@g.o> binutils-2.18-r3.ebuild:
702 - amd64 stable, bug #230593
703 -
704 - 07 Jul 2008; Raúl Porcel <armin76@g.o> binutils-2.18-r3.ebuild:
705 - alpha/ia64/sparc stable wrt security #230593
706 -
707 - 07 Jul 2008; Christian Faulhammer <opfer@g.o>
708 - binutils-2.18-r3.ebuild:
709 - stable x86, security bug 230593
710 -
711 - 07 Jul 2008; Brent Baude <ranger@g.o> binutils-2.18-r3.ebuild:
712 - Marking binutils-2.18-r3 ppc64 and ppc for bug 230593
713 -
714 - 06 Jul 2008; Jeroen Roovers <jer@g.o> binutils-2.18-r3.ebuild:
715 - Stable for HPPA (bug #230593).
716 -
717 -*binutils-2.18-r3 (05 Jul 2008)
718 -
719 - 05 Jul 2008; Mark Loeser <halcy0n@g.o> +binutils-2.18-r3.ebuild:
720 - Version bump for bug #230593
721 -
722 -*binutils-2.18-r2 (23 Jun 2008)
723 -
724 - 23 Jun 2008; Mike Frysinger <vapier@g.o> +binutils-2.18-r2.ebuild:
725 - Drop gnu hash patch for mips #211680 and backport freebsd fixups #223249.
726 -
727 -*binutils-2.18.50.0.7 (10 May 2008)
728 -
729 - 10 May 2008; Mike Frysinger <vapier@g.o>
730 - +binutils-2.18.50.0.7.ebuild:
731 - Version bump.
732 -
733 -*binutils-2.18.50.0.6 (03 Apr 2008)
734 -
735 - 03 Apr 2008; Mike Frysinger <vapier@g.o>
736 - +binutils-2.18.50.0.6.ebuild:
737 - Version bump.
738 -
739 -*binutils-2.18.50.0.5 (17 Mar 2008)
740 -
741 - 17 Mar 2008; Mike Frysinger <vapier@g.o>
742 - +binutils-2.18.50.0.5.ebuild:
743 - Version bump #213618 by Arfrever Frehtes Taifersar Arahesis.
744 -
745 -*binutils-2.18.50.0.4 (09 Feb 2008)
746 -
747 - 09 Feb 2008; Mike Frysinger <vapier@g.o>
748 - +binutils-2.18.50.0.4.ebuild:
749 - Version bump.
750 -
751 - 20 Nov 2007; Joshua Kinard <kumba@g.o> binutils-2.18-r1.ebuild:
752 - Stable on mips, per #195511.
753 -
754 - 14 Nov 2007; Jeroen Roovers <jer@g.o> binutils-2.18-r1.ebuild:
755 - Stable for HPPA too (not quite bug #195511).
756 -
757 -*binutils-2.18.50.0.3 (04 Nov 2007)
758 -
759 - 04 Nov 2007; Mike Frysinger <vapier@g.o>
760 - +binutils-2.18.50.0.3.ebuild:
761 - Version bump.
762 -
763 - 17 Oct 2007; Raúl Porcel <armin76@g.o> binutils-2.18-r1.ebuild:
764 - alpha/ia64/sparc stable wrt #195511
765 -
766 - 16 Oct 2007; Christoph Mende <angelos@g.o> binutils-2.18-r1.ebuild:
767 - Stable on amd64 wrt bug #195511
768 -
769 - 15 Oct 2007; Markus Rothe <corsair@g.o> binutils-2.18-r1.ebuild:
770 - Stable on ppc64; bug #195511
771 -
772 - 14 Oct 2007; Christian Faulhammer <opfer@g.o>
773 - binutils-2.18-r1.ebuild:
774 - stable x86, bug 195511
775 -
776 - 12 Oct 2007; Lars Weiler <pylon@g.o> binutils-2.18-r1.ebuild:
777 - stable ppc, bug #195511
778 -
779 - 08 Oct 2007; Mike Frysinger <vapier@g.o> binutils-2.18-r1.ebuild:
780 - Fix makeinfo version check to work with texinfo-4.11 #195074.
781 -
782 - 07 Oct 2007; Mike Frysinger <vapier@g.o> binutils-2.17-r2.ebuild:
783 - Add support for DragonFly BSD #189079.
784 -
785 - 06 Oct 2007; Mike Frysinger <vapier@g.o> binutils-2.17-r2.ebuild,
786 - binutils-2.18-r1.ebuild:
787 - Fix incorrect CFLAGS being used for build utils #192959 by Woodward Crim
788 - Hoffman.
789 -
790 - 06 Oct 2007; Mike Frysinger <vapier@g.o> binutils-2.18-r1.ebuild:
791 - Prevent makeinfo from being run #193364.
792 -
793 -*binutils-2.18-r1 (06 Oct 2007)
794 -
795 - 06 Oct 2007; Mike Frysinger <vapier@g.o> +binutils-2.18-r1.ebuild:
796 - Fix from upstream for GNU RELRO stripping, disable false positive tests,
797 - and add fix from upstream for multitarget on x86_64.
798 -
799 -*binutils-2.17-r2 (06 Oct 2007)
800 -
801 - 06 Oct 2007; Mike Frysinger <vapier@g.o> +binutils-2.17-r2.ebuild:
802 - Add backwards compat support for GNU_HASH for a few anal targets, disable
803 - false positive tests, and add fix from upstream for multitarget on x86_64.
804 -
805 -*binutils-2.18.50.0.2 (06 Oct 2007)
806 -
807 - 06 Oct 2007; Mike Frysinger <vapier@g.o>
808 - +binutils-2.18.50.0.2.ebuild:
809 - Version bump.
810 -
811 - 26 Sep 2007; Raúl Porcel <armin76@g.o> binutils-2.17-r1.ebuild:
812 - sparc stable wrt #192258
813 -
814 - 26 Sep 2007; Joshua Kinard <kumba@g.o> binutils-2.17-r1.ebuild:
815 - Stable on mips, per #192258.
816 -
817 - 17 Sep 2007; Lars Weiler <pylon@g.o> binutils-2.17-r1.ebuild:
818 - Stable on ppc; bug #192258.
819 -
820 - 16 Sep 2007; Christoph Mende <angelos@g.o> binutils-2.17-r1.ebuild:
821 - Stable on amd64 wrt bug #192258
822 -
823 - 13 Sep 2007; Raúl Porcel <armin76@g.o> binutils-2.17-r1.ebuild:
824 - ia64/x86 stable wrt #192258
825 -
826 - 12 Sep 2007; Mike Frysinger <vapier@g.o>
827 - binutils-2.18.50.0.1.ebuild:
828 - Ack mein leapen! This shouldnt be in ~arch.
829 -
830 -*binutils-2.18.50.0.1 (09 Sep 2007)
831 -
832 - 09 Sep 2007; Mike Frysinger <vapier@g.o>
833 - +binutils-2.18.50.0.1.ebuild:
834 - Version bump.
835 -
836 - 04 Sep 2007; Joshua Kinard <kumba@g.o> binutils-2.18.ebuild:
837 - Update the patchset to 1.1 to pull in a patch for mips to enable support for
838 - .gnu.hash capabilities, and mark unstable on mips.
839 -
840 -*binutils-2.18 (29 Aug 2007)
841 -
842 - 29 Aug 2007; Mike Frysinger <vapier@g.o> +binutils-2.18.ebuild:
843 - Version bump.
844 -
845 - 17 Aug 2007; Christoph Mende <angelos@g.o>
846 - binutils-2.17.50.0.18.ebuild:
847 - Keyworded ~amd64 to fix PIC generation with gcc-4.2, bug #186089
848 -
849 -*binutils-2.17.50.0.18 (01 Aug 2007)
850 -
851 - 01 Aug 2007; Mike Frysinger <vapier@g.o>
852 - +binutils-2.17.50.0.18.ebuild:
853 - Version bump.
854 -
855 -*binutils-2.17-r1 (29 Jul 2007)
856 -
857 - 29 Jul 2007; Mike Frysinger <vapier@g.o> +binutils-2.17-r1.ebuild:
858 - Fix building with sanitized linux-headers, fix stripping of .o objects, and
859 - discard GNU debuglink sections.
860 -
861 - 03 Jul 2007; Tom Gall <tgall@g.o> binutils-2.17.50.0.17.ebuild:
862 - stable on ppc64, addresses power6, ps3 and other gcc issues
863 -
864 - 01 Jul 2007; Jose Luis Rivero <yoswink@g.o>
865 - binutils-2.17.50.0.16.ebuild:
866 - Stable on alpha. This fixes the compilation error (CFI related) when
867 - compiling glibc. Details in bug #179353
868 -
869 - 25 Jun 2007; Christian Faulhammer <opfer@g.o> binutils-2.17.ebuild:
870 - stable x86, security bug 134112
871 -
872 - 24 Jun 2007; Christoph Mende <angelos@g.o> binutils-2.17.ebuild:
873 - Stable on amd64 wrt security bug 134112
874 -
875 - 24 Jun 2007; Piotr Jaroszyński <peper@g.o>
876 - binutils-2.17.50.0.9.ebuild, binutils-2.17.50.0.10.ebuild,
877 - binutils-2.17.50.0.11.ebuild, binutils-2.17.50.0.13.ebuild,
878 - binutils-2.17.50.0.14.ebuild, binutils-2.17.50.0.15.ebuild:
879 - (QA) Don't use KEYWORDS="-*". bug #160519.
880 -
881 -*binutils-2.17.50.0.17 (19 Jun 2007)
882 -
883 - 19 Jun 2007; Mike Frysinger <vapier@g.o>
884 - +binutils-2.17.50.0.17.ebuild:
885 - Version bump.
886 -
887 - 14 May 2007; Bryan Østergaard <kloeri@g.o>
888 - binutils-2.17.50.0.16.ebuild:
889 - Add ~alpha keyword as .15 and newer fixes an ugly bug in ld on Alpha.
890 -
891 - 13 May 2007; Joshua Kinard <kumba@g.o> binutils-2.17.ebuild:
892 - Stable on mips.
893 -
894 -*binutils-2.17.50.0.16 (12 May 2007)
895 -
896 - 12 May 2007; Mike Frysinger <vapier@g.o>
897 - +binutils-2.17.50.0.16.ebuild:
898 - Version bump.
899 -
900 - 23 Apr 2007; Jeroen Roovers <jer@g.o> binutils-2.17.50.0.12.ebuild:
901 - Stable for HPPA (bug #168131).
902 -
903 -*binutils-2.17.50.0.15 (20 Apr 2007)
904 -
905 - 20 Apr 2007; Mike Frysinger <vapier@g.o>
906 - +binutils-2.17.50.0.15.ebuild:
907 - Version bump.
908 -
909 - 28 Mar 2007; Jeroen Roovers <jer@g.o> binutils-2.17.50.0.12.ebuild:
910 - Marked ~hppa (bug #168131).
911 -
912 -*binutils-2.17.50.0.14 (24 Mar 2007)
913 -
914 - 24 Mar 2007; Mike Frysinger <vapier@g.o>
915 - +binutils-2.17.50.0.14.ebuild:
916 - Version bump.
917 -
918 -*binutils-2.17.50.0.13 (16 Mar 2007)
919 -
920 - 16 Mar 2007; Mike Frysinger <vapier@g.o>
921 - +binutils-2.17.50.0.13.ebuild:
922 - Version bump.
923 -
924 - 13 Feb 2007; Bryan Østergaard <kloeri@g.o> binutils-2.17.ebuild:
925 - Stable on Alpha.
926 -
927 -*binutils-2.17.50.0.12 (28 Jan 2007)
928 -
929 - 28 Jan 2007; Mike Frysinger <vapier@g.o>
930 - +binutils-2.17.50.0.12.ebuild:
931 - Version bump.
932 -
933 -*binutils-2.17.50.0.11 (26 Jan 2007)
934 -
935 - 26 Jan 2007; Mike Frysinger <vapier@g.o>
936 - +binutils-2.17.50.0.11.ebuild:
937 - Version bump.
938 -
939 -*binutils-2.17.50.0.10 (23 Jan 2007)
940 -
941 - 23 Jan 2007; Mike Frysinger <vapier@g.o>
942 - +binutils-2.17.50.0.10.ebuild:
943 - Version bump.
944 -
945 -*binutils-2.17.50.0.9 (04 Jan 2007)
946 -
947 - 04 Jan 2007; Mike Frysinger <vapier@g.o>
948 - +binutils-2.17.50.0.9.ebuild:
949 - Version bump.
950 -
951 - 18 Dec 2006; Tom Gall <tgall@g.o>
952 - binutils-2.17.ebuild:
953 - stable on ppc64
954 -
955 -*binutils-2.17.50.0.8 (03 Dec 2006)
956 -
957 - 03 Dec 2006; Mike Frysinger <vapier@g.o>
958 - +binutils-2.17.50.0.8.ebuild:
959 - Version bump.
960 -
961 -*binutils-2.17.50.0.7 (29 Nov 2006)
962 -
963 - 29 Nov 2006; Mike Frysinger <vapier@g.o>
964 - +binutils-2.17.50.0.7.ebuild:
965 - Version bump.
966 -
967 -*binutils-2.17.50.0.6 (21 Oct 2006)
968 -
969 - 21 Oct 2006; Mike Frysinger <vapier@g.o>
970 - +binutils-2.17.50.0.6.ebuild:
971 - Version bump.
972 -
973 - 19 Oct 2006; Gustavo Zacarias <gustavoz@g.o> binutils-2.17.ebuild:
974 - Stable on sparc
975 -
976 - 19 Oct 2006; Luca Barbato <lu_zero@g.o> binutils-2.17.ebuild:
977 - Marked ppc
978 -
979 - 17 Oct 2006; Roy Marples <uberlord@g.o> binutils-2.17.ebuild:
980 - Added ~sparc-fbsd keyword.
981 -
982 - 10 Oct 2006; Joel Martin <kanaka@g.o> binutils-2.17.ebuild:
983 - Add ~mips to binutils-2.17
984 -
985 -*binutils-2.17.50.0.5 (27 Sep 2006)
986 -
987 - 27 Sep 2006; Mike Frysinger <vapier@g.o>
988 - +binutils-2.17.50.0.5.ebuild:
989 - Version bump.
990 -
991 -*binutils-2.17.50.0.4 (24 Sep 2006)
992 -
993 - 24 Sep 2006; Mike Frysinger <vapier@g.o>
994 - +binutils-2.17.50.0.4.ebuild:
995 - Version bump.
996 -
997 - 28 Jul 2006; <plasmaroo@g.o> binutils-2.16.1-r3.ebuild:
998 - Stable on IA64; fix bug #141681.
999 -
1000 -*binutils-2.17.50.0.3 (17 Jul 2006)
1001 -
1002 - 17 Jul 2006; Mike Frysinger <vapier@g.o>
1003 - +binutils-2.17.50.0.3.ebuild:
1004 - Version bump.
1005 -
1006 - 04 Jul 2006; Bryan Østergaard <kloeri@g.o>
1007 - binutils-2.16.1-r3.ebuild:
1008 - Stable on alpha.
1009 -
1010 -*binutils-2.16.1-r3 (30 Jun 2006)
1011 -
1012 - 30 Jun 2006; Mike Frysinger <vapier@g.o>
1013 - +binutils-2.16.1-r3.ebuild:
1014 - Backport -z lazy patch to make solar happy #134514.
1015 -
1016 - 27 Jun 2006; Gustavo Zacarias <gustavoz@g.o> binutils-2.17.ebuild:
1017 - Keyworded ~sparc
1018 -
1019 - 27 Jun 2006; Diego Pettenò <flameeyes@g.o> binutils-2.17.ebuild:
1020 - Add ~x86-fbsd keyword.
1021 -
1022 - 25 Jun 2006; Markus Rothe <corsair@g.o> binutils-2.17.ebuild:
1023 - Added ~ppc64
1024 -
1025 -*binutils-2.17 (24 Jun 2006)
1026 -
1027 - 24 Jun 2006; Mike Frysinger <vapier@g.o> +binutils-2.17.ebuild:
1028 - Version bump.
1029 -
1030 -*binutils-2.16.94 (15 Jun 2006)
1031 -
1032 - 15 Jun 2006; Mike Frysinger <vapier@g.o> +binutils-2.16.94.ebuild:
1033 - Version bump #136553 by Cory Grunden.
1034 -
1035 -*binutils-2.17.50.0.2 (10 Jun 2006)
1036 -
1037 - 10 Jun 2006; Mike Frysinger <vapier@g.o>
1038 - +binutils-2.17.50.0.2.ebuild:
1039 - Version bump.
1040 -
1041 - 10 Jun 2006; Michael Hanselmann <hansmi@g.o>
1042 - binutils-2.16.1-r2.ebuild:
1043 - Stable on ppc.
1044 -
1045 - 09 Jun 2006; Markus Rothe <corsair@g.o> binutils-2.16.1-r2.ebuild:
1046 - Stable on ppc64
1047 -
1048 - 01 Jun 2006; Joshua Kinard <kumba@g.o> binutils-2.16.1-r2.ebuild:
1049 - Marked stable on mips.
1050 -
1051 - 29 May 2006; Mark Loeser <halcy0n@g.o> binutils-2.16.1-r2.ebuild:
1052 - Stable on x86
1053 -
1054 - 26 May 2006; Danny van Dyk <kugelfang@g.o>
1055 - binutils-2.16.1-r2.ebuild:
1056 - Marked stable on amd64.
1057 -
1058 -*binutils-2.16.93 (22 May 2006)
1059 -
1060 - 22 May 2006; Mike Frysinger <vapier@g.o> +binutils-2.16.93.ebuild:
1061 - Version bump.
1062 -
1063 - 25 Apr 2006; Gustavo Zacarias <gustavoz@g.o>
1064 - binutils-2.16.1-r2.ebuild:
1065 - Stable on sparc
1066 -
1067 -*binutils-2.16.92 (17 Apr 2006)
1068 -
1069 - 17 Apr 2006; Mike Frysinger <vapier@g.o> +binutils-2.16.92.ebuild:
1070 - Version bump.
1071 -
1072 - 11 Apr 2006; Diego Pettenò <flameeyes@g.o>
1073 - binutils-2.16.1-r2.ebuild:
1074 - Add ~x86-fbsd keyword.
1075 -
1076 - 30 Mar 2006; Diego Pettenò <flameeyes@g.o> binutils-2.15.ebuild:
1077 - Add ~x86-fbsd keyword to binutils 2.15 that has FreeBSD patches.
1078 -
1079 -*binutils-2.16.91.0.7 (18 Mar 2006)
1080 -
1081 - 18 Mar 2006; Mike Frysinger <vapier@g.o>
1082 - +binutils-2.16.91.0.7.ebuild:
1083 - Version bump.
1084 -
1085 -*binutils-2.16.1-r2 (02 Mar 2006)
1086 -
1087 - 02 Mar 2006; Mike Frysinger <vapier@g.o>
1088 - +binutils-2.16.1-r2.ebuild:
1089 - Grab some fixes from upstream for PIE, lib search paths, and ld speedups.
1090 -
1091 -*binutils-2.16.91.0.6 (15 Feb 2006)
1092 -
1093 - 15 Feb 2006; Mike Frysinger <vapier@g.o>
1094 - +binutils-2.16.91.0.6.ebuild:
1095 - Version bump.
1096 -
1097 -*binutils-2.16.91.0.5 (21 Dec 2005)
1098 -
1099 - 21 Dec 2005; Mike Frysinger <vapier@g.o>
1100 - +binutils-2.16.91.0.5.ebuild:
1101 - Version bump.
1102 -
1103 - 07 Dec 2005; Guy Martin <gmsoft@g.o> binutils-2.16.1.ebuild:
1104 - Stable on hppa.
1105 -
1106 -*binutils-2.16.1-r1 (03 Dec 2005)
1107 -
1108 - 03 Dec 2005; Mike Frysinger <vapier@g.o>
1109 - +binutils-2.16.1-r1.ebuild:
1110 - Add support for -Bdirect #114008.
1111 -
1112 - 23 Nov 2005; Luis Medinas <metalgod@g.o> binutils-2.16.1.ebuild:
1113 - Stable on amd64.
1114 -
1115 - 23 Nov 2005; Gustavo Zacarias <gustavoz@g.o>
1116 - binutils-2.16.1.ebuild:
1117 - Stable on sparc
1118 -
1119 - 23 Nov 2005; Mark Loeser <halcy0n@g.o> binutils-2.16.1.ebuild:
1120 - Stable on x86; bug #112666
1121 -
1122 - 18 Nov 2005; Joshua Kinard <kumba@g.o> binutils-2.16.90.0.3.ebuild,
1123 - binutils-2.16.91.0.2.ebuild:
1124 - -mips to binutils-2.16.90.0.3, as it has unfixable quirks; ~mips to
1125 - binutils-2.16.91.0.2 for testing.
1126 -
1127 -*binutils-2.16.91.0.4 (13 Nov 2005)
1128 -
1129 - 13 Nov 2005; Mike Frysinger <vapier@g.o>
1130 - +binutils-2.16.91.0.4.ebuild:
1131 - Version bump.
1132 -
1133 - 18 Oct 2005; Joseph Jezak <josejx@g.o> binutils-2.16.1.ebuild:
1134 - Marked ppc stable.
1135 -
1136 - 06 Sep 2005; Markus Rothe <corsair@g.o> binutils-2.16.1.ebuild:
1137 - Stable on ppc64
1138 -
1139 - 28 Aug 2005; Joshua Kinard <kumba@g.o> binutils-2.16.1.ebuild,
1140 - binutils-2.16.90.0.3.ebuild:
1141 - Bump 2.16.1 to stable on mips, and 2.16.90.0.3 to unstable.
1142 -
1143 -*binutils-2.16.91.0.3 (23 Aug 2005)
1144 -
1145 - 23 Aug 2005; Mike Frysinger <vapier@g.o>
1146 - +binutils-2.16.91.0.3.ebuild:
1147 - Version bump.
1148 -
1149 -*binutils-2.16.91.0.2 (02 Aug 2005)
1150 -
1151 - 02 Aug 2005; Mike Frysinger <vapier@g.o>
1152 - +binutils-2.16.91.0.2.ebuild:
1153 - Version bump.
1154 -
1155 - 13 Jul 2005; MATSUU Takuto <matsuu@g.o>
1156 - binutils-2.15.92.0.2-r10.ebuild:
1157 - Stable on sh.
1158 -
1159 - 13 Jul 2005; bret curtis <psi29a@g.o> binutils-2.16.1.ebuild,
1160 - binutils-2.16-r1.ebuild:
1161 - added to ~mips
1162 -
1163 - 12 Jul 2005; MATSUU Takuto <matsuu@g.o>
1164 - binutils-2.15.92.0.2-r10.ebuild:
1165 - Added ~sh to KEYWORDS.
1166 -
1167 - 07 Jul 2005; Hardave Riar <hardave@g.o>
1168 - binutils-2.15.92.0.2-r10.ebuild:
1169 - Stable on mips.
1170 -
1171 - 28 Jun 2005; Markus Rothe <corsair@g.o> binutils-2.16-r1.ebuild:
1172 - Back to ~ppc64; ld problem with current stable glibc :-/
1173 -
1174 - 28 Jun 2005; Markus Rothe <corsair@g.o> binutils-2.16-r1.ebuild:
1175 - Stable on ppc64
1176 -
1177 -*binutils-2.16.91.0.1 (28 Jun 2005)
1178 -
1179 - 28 Jun 2005; Mike Frysinger <vapier@g.o>
1180 - +binutils-2.16.91.0.1.ebuild:
1181 - Version bump.
1182 -
1183 -*binutils-2.16.1 (12 Jun 2005)
1184 -
1185 - 12 Jun 2005; Mike Frysinger <vapier@g.o> +binutils-2.16.1.ebuild:
1186 - Version bump.
1187 -
1188 - 31 May 2005; Gustavo Zacarias <gustavoz@g.o>
1189 - binutils-2.15.92.0.2-r10.ebuild:
1190 - Stable on sparc wrt #91398
1191 -
1192 - 31 May 2005; Markus Rothe <corsair@g.o> binutils-2.16.ebuild,
1193 - binutils-2.16-r1.ebuild:
1194 - Added ~ppc64 to KEYWORDS
1195 -
1196 - 29 May 2005; Bryan Østergaard <kloeri@g.o>
1197 - binutils-2.14.90.0.8-r3.ebuild:
1198 - Stable on ia64, bug 91398.
1199 -
1200 - 29 May 2005; Bryan Østergaard <kloeri@g.o>
1201 - binutils-2.14.90.0.8-r3.ebuild:
1202 - Stable on alpha, bug 91398.
1203 -
1204 - 28 May 2005; Rene Nussbaumer <killerfox@g.o>
1205 - binutils-2.15.92.0.2-r10.ebuild:
1206 - Stable on hppa; bug #91398
1207 -
1208 - 28 May 2005; Markus Rothe <corsair@g.o>
1209 - binutils-2.15.90.0.3-r5.ebuild:
1210 - Stable on ppc64
1211 -
1212 - 28 May 2005; <dang@g.o> binutils-2.15.92.0.2-r10.ebuild:
1213 - Mark amd64 stable per bug #91398
1214 -
1215 - 28 May 2005; Luca Barbato <lu_zero@g.o>
1216 - binutils-2.15.90.0.3-r5.ebuild:
1217 - Marked ppc
1218 -
1219 -*binutils-2.16-r1 (28 May 2005)
1220 -*binutils-2.15.92.0.2-r10 (28 May 2005)
1221 -*binutils-2.15.91.0.2-r2 (28 May 2005)
1222 -*binutils-2.15.90.0.3-r5 (28 May 2005)
1223 -*binutils-2.15.90.0.1.1-r5 (28 May 2005)
1224 -*binutils-2.14.90.0.8-r3 (28 May 2005)
1225 -
1226 - 28 May 2005; Mike Frysinger <vapier@g.o>
1227 - +binutils-2.14.90.0.8-r3.ebuild, binutils-2.15.ebuild,
1228 - +binutils-2.15.90.0.1.1-r5.ebuild, +binutils-2.15.90.0.3-r5.ebuild,
1229 - +binutils-2.15.91.0.2-r2.ebuild, +binutils-2.15.92.0.2-r10.ebuild,
1230 - +binutils-2.16-r1.ebuild, binutils-2.16.90.0.3.ebuild:
1231 - Add some more bfd checks and fix tls stripping.
1232 -
1233 -*binutils-2.15.92.0.2-r9 (17 May 2005)
1234 -
1235 - 17 May 2005; Mike Frysinger <vapier@g.o>
1236 - +binutils-2.15.92.0.2-r9.ebuild:
1237 - Add patches to fix security issues #91398.
1238 -
1239 -*binutils-2.16.90.0.3 (11 May 2005)
1240 -
1241 - 11 May 2005; Mike Frysinger <vapier@g.o>
1242 - +binutils-2.16.90.0.3.ebuild:
1243 - Version bump.
1244 -
1245 - 10 May 2005; Lars Weiler <pylon@g.o>
1246 - binutils-2.15.92.0.2-r1.ebuild, binutils-2.15.92.0.2-r7.ebuild,
1247 - binutils-2.15.92.0.2-r8.ebuild:
1248 - Downgrading and masking on ppc due to compile errors; bug #91887.
1249 -
1250 - 07 May 2005; Michael Hanselmann <hansmi@g.o>
1251 - binutils-2.15.92.0.2-r8.ebuild:
1252 - Stable on hppa.
1253 -
1254 - 07 May 2005; Jan Brinkmann <luckyduck@g.o>
1255 - binutils-2.15.92.0.2-r8.ebuild:
1256 - stable on amd64 wrt security bug #91813
1257 -
1258 - 07 May 2005; Michael Hanselmann <hansmi@g.o>
1259 - binutils-2.15.92.0.2-r8.ebuild:
1260 - Stable on ppc.
1261 -
1262 -*binutils-2.16 (04 May 2005)
1263 -
1264 - 04 May 2005; Mike Frysinger <vapier@g.o> +binutils-2.16.ebuild:
1265 - Version bump.
1266 -
1267 -*binutils-2.16.90.0.2 (30 Apr 2005)
1268 -
1269 - 30 Apr 2005; Mike Frysinger <vapier@g.o>
1270 - +binutils-2.16.90.0.2.ebuild:
1271 - Version bump.
1272 -
1273 -*binutils-2.15.97 (21 Apr 2005)
1274 -
1275 - 21 Apr 2005; Mike Frysinger <vapier@g.o> +binutils-2.15.97.ebuild:
1276 - Version bump.
1277 -
1278 -*binutils-2.14 (17 Apr 2005)
1279 -
1280 - 17 Apr 2005; Mike Frysinger <vapier@g.o> +binutils-2.14.ebuild:
1281 - Add older version for ps2 support.
1282 -
1283 -*binutils-2.16.90.0.1 (12 Apr 2005)
1284 -
1285 - 12 Apr 2005; Mike Frysinger <vapier@g.o>
1286 - +binutils-2.16.90.0.1.ebuild:
1287 - Version bump.
1288 -
1289 - 11 Apr 2005; Markus Rothe <corsair@g.o>
1290 - -binutils-2.15.91.0.1-r1.ebuild:
1291 - removed for bug #88678
1292 -
1293 - 09 Apr 2005; Markus Rothe <corsair@g.o>
1294 - binutils-2.15.92.0.2-r8.ebuild, binutils-2.15.94.0.2.2.ebuild:
1295 - Added ~ppc64 to KEYWORDS
1296 -
1297 -*binutils-2.15.92.0.2-r8 (06 Apr 2005)
1298 -
1299 - 06 Apr 2005; Mike Frysinger <vapier@g.o>
1300 - +binutils-2.15.92.0.2-r8.ebuild:
1301 - Add ld speedup / readelf buffer fix patches from redhat and a better
1302 - unlink() patch from solar/upstream.
1303 -
1304 - 30 Mar 2005; Joshua Kinard <kumba@g.o>
1305 - binutils-2.14.90.0.8-r2.ebuild, binutils-2.15.91.0.2-r1.ebuild,
1306 - binutils-2.15.94.0.2.2.ebuild:
1307 - Marked 2.14.90.0.8-r2 and 2.15.91.0.2-r1 as stable on mips, and moved
1308 - 2.15.94.0.2.2 to unstable.
1309 -
1310 -*binutils-2.15.92.0.2-r7 (22 Mar 2005)
1311 -
1312 - 22 Mar 2005; Mike Frysinger <vapier@g.o>
1313 - +binutils-2.15.92.0.2-r7.ebuild:
1314 - Add a TEXTREL fix for arm and warn about TEXTRELs in ld.
1315 -
1316 -*binutils-2.15.92.0.2-r6 (11 Mar 2005)
1317 -
1318 - 11 Mar 2005; Mike Frysinger <vapier@g.o>
1319 - +binutils-2.15.92.0.2-r6.ebuild:
1320 - Delete old/duplicated patches and add newer/spiffier ones. See the
1321 - patchtarball and/or CVS commits for more info :P. Just be happy this one
1322 - passes make check on amd64.
1323 -
1324 - 09 Mar 2005; <solar@g.o> binutils-2.15.92.0.2-r5.ebuild:
1325 - - uClibc supports relro now. remove exception from ebuild
1326 -
1327 -*binutils-2.15.92.0.2-r5 (08 Mar 2005)
1328 -
1329 - 08 Mar 2005; Mike Frysinger <vapier@g.o>
1330 - +binutils-2.15.92.0.2-r5.ebuild:
1331 - Fix up gcc-4 support for real #82907 by richard juckes.
1332 -
1333 -*binutils-2.15.92.0.2-r4 (23 Feb 2005)
1334 -
1335 - 23 Feb 2005; Mike Frysinger <vapier@g.o>
1336 - -binutils-2.15.92.0.2-r3.ebuild, +binutils-2.15.92.0.2-r4.ebuild:
1337 - Fix gcc-4 patch to not break gcc-3 #83047.
1338 -
1339 - 23 Feb 2005; Jon Portnoy <avenj@g.o> binutils-2.15.92.0.2-r3.ebuild :
1340 - Reverted PATCHVER=1.4 to PATCHVER=1.3 due to bug
1341 - #83047
1342 -
1343 -*binutils-2.15.92.0.2-r3 (20 Feb 2005)
1344 -
1345 - 20 Feb 2005; <solar@g.o> +binutils-2.15.92.0.2-r3.ebuild:
1346 - - bump the binutils-patches 1.2 -> 1.3. New option ld -z nonow/-Wl,-z,nonow
1347 -
1348 -*binutils-2.15.94.0.2.2 (19 Feb 2005)
1349 -
1350 - 19 Feb 2005; Mike Frysinger <vapier@g.o>
1351 - +binutils-2.15.94.0.2.2.ebuild:
1352 - Version bump.
1353 -
1354 - 23 Jan 2005; Jeremy Huddleston <eradicator@g.o>
1355 - binutils-2.15.92.0.2-r1.ebuild:
1356 - Stable on amd64.
1357 -
1358 - 22 Jan 2005; <plasmaroo@g.o> binutils-2.15.92.0.2-r1.ebuild,
1359 - binutils-2.15.92.0.2-r2.ebuild:
1360 - Converting 2.1.95 ~IA64 KEYWORDS into -IA64 KEYWORDS as kernels as well as
1361 - gnu-efi fail to compile with these versions...
1362 -
1363 - 11 Jan 2005; Gustavo Zacarias <gustavoz@g.o>
1364 - binutils-2.15.92.0.2-r1.ebuild:
1365 - Stable on sparc, it's about time
1366 -
1367 - 03 Jan 2005; Ciaran McCreesh <ciaranm@g.o> :
1368 - Change encoding to UTF-8 for GLEP 31 compliance
1369 -
1370 -*binutils-2.15.91.0.2-r1 (28 Dec 2004)
1371 -
1372 - 28 Dec 2004; Mike Frysinger <vapier@g.o>
1373 - +binutils-2.15.91.0.2-r1.ebuild:
1374 - New versions to support binutils-config.
1375 -
1376 -*binutils-2.15.91.0.1-r1 (28 Dec 2004)
1377 -
1378 - 28 Dec 2004; Mike Frysinger <vapier@g.o>
1379 - +binutils-2.15.91.0.1-r1.ebuild:
1380 - New versions to support binutils-config.
1381 -
1382 -*binutils-2.15.90.0.3-r4 (28 Dec 2004)
1383 -
1384 - 28 Dec 2004; Mike Frysinger <vapier@g.o>
1385 - +binutils-2.15.90.0.3-r4.ebuild:
1386 - New versions to support binutils-config.
1387 -
1388 - 28 Dec 2004; Jeremy Huddleston <eradicator@g.o>
1389 - binutils-2.15.92.0.2-r2.ebuild:
1390 - Added to ~sparc.
1391 -
1392 - 26 Dec 2004; Jeremy Huddleston <eradicator@g.o>
1393 - binutils-2.15.92.0.2-r1.ebuild:
1394 - Removing sparc64-multilib stuff as we're just using the superior
1395 - binutils-config versions in that profile.
1396 -
1397 -*binutils-2.15.94.0.2 (21 Dec 2004)
1398 -
1399 - 21 Dec 2004; Mike Frysinger <vapier@g.o>
1400 - +binutils-2.15.94.0.2.ebuild:
1401 - Version bump.
1402 -
1403 - 13 Dec 2004; Jeremy Huddleston <eradicator@g.o>
1404 - binutils-2.15.92.0.2-r1.ebuild:
1405 - Updated sparc64-multilib to use MULTILIB_CHOSTS example.
1406 -
1407 -*binutils-2.14.90.0.8-r2 (12 Dec 2004)
1408 -
1409 - 12 Dec 2004; Mike Frysinger <vapier@g.o>
1410 - +binutils-2.14.90.0.8-r2.ebuild:
1411 - Use toolchain eclass.
1412 -
1413 - 10 Dec 2004; Jeremy Huddleston <eradicator@g.o>
1414 - binutils-2.15.92.0.2-r1.ebuild:
1415 - Updated for sparc64-multilib.
1416 -
1417 -*binutils-2.15.90.0.1.1-r4 (04 Dec 2004)
1418 -
1419 - 04 Dec 2004; Mike Frysinger <vapier@g.o>
1420 - +binutils-2.15.90.0.1.1-r4.ebuild:
1421 - Version bump for toolchain-binutils support.
1422 -
1423 -*binutils-2.14.90.0.6-r8 (02 Dec 2004)
1424 -
1425 - 02 Dec 2004; Mike Frysinger <vapier@g.o>
1426 - +binutils-2.14.90.0.6-r8.ebuild:
1427 - Use toolchain eclass.
1428 -
1429 - 30 Nov 2004; Guy Martin <gmsoft@g.o> binutils-2.15.92.0.2-r1.ebuild:
1430 - Stable on hppa. Fix problems with libxml2 and others.
1431 -
1432 - 24 Nov 2004; Gustavo Zacarias <gustavoz@g.o>
1433 - binutils-2.15.92.0.2-r1.ebuild:
1434 - Keyworded ~sparc
1435 -
1436 -*binutils-2.15.94.0.1 (23 Nov 2004)
1437 -
1438 - 23 Nov 2004; Mike Frysinger <vapier@g.o>
1439 - +binutils-2.15.94.0.1.ebuild:
1440 - Version bump.
1441 -
1442 - 21 Nov 2004; Mike Frysinger <vapier@g.o>
1443 - binutils-2.15.90.0.1.1-r3.ebuild:
1444 - Move to x86 stable finally.
1445 -
1446 - 21 Nov 2004; Mike Frysinger <vapier@g.o>
1447 - binutils-2.15.90.0.1.1-r3.ebuild:
1448 - Move to x86 stable finally.
1449 -
1450 -*binutils-2.15.92.0.2-r2 (20 Oct 2004)
1451 -
1452 - 20 Oct 2004; Mike Frysinger <vapier@g.o>
1453 - +binutils-2.15.92.0.2-r2.ebuild:
1454 - Clean up ebuild. Try to handle $CTARGET/$CHOST correctly. Use symlinks
1455 - instead of hard links in src_install().
1456 -
1457 - 18 Oct 2004; Guy Martin <gmsoft@g.o> binutils-2.15.92.0.2-r1.ebuild:
1458 - Added ~hppa.
1459 -
1460 -*binutils-2.15.92.0.2-r1 (11 Oct 2004)
1461 -
1462 - 11 Oct 2004; Travis Tilley <lv@g.o> +binutils-2.15.92.0.2-r1.ebuild:
1463 - removed a few unused patches from the tarball. removed an old ppc -fPIC patch
1464 - that was causing the compile to fail, closes bug 66738. updated a few patches
1465 - borrowed from fedora to their latest versions, closes bug 66871. updated pax
1466 - patch to the latest version available on pax.grsecurity.net, version
1467 - 2.15.91.0.2-200410091215
1468 -
1469 - 06 Oct 2004; Travis Tilley <lv@g.o> binutils-2.15.92.0.2.ebuild:
1470 - added ~x86 keyword, as requested in bug 66555
1471 -
1472 - 03 Oct 2004; Travis Tilley <lv@g.o> binutils-2.15.92.0.2.ebuild:
1473 - added ~amd64 keyword. among other things, this release fixes an x86-64 linker
1474 - warning while building the Linux kernel.
1475 -
1476 -*binutils-2.15.92.0.2 (01 Oct 2004)
1477 -
1478 - 01 Oct 2004; Joshua Kinard <kumba@g.o> +binutils-2.15.92.0.2.ebuild:
1479 - Version bump.
1480 -
1481 - 01 Oct 2004; Joshua Kinard <kumba@g.o> binutils-2.15.91.0.2.ebuild:
1482 - Added ~sparc to KEYWORDS.
1483 -
1484 - 01 Oct 2004; Joshua Kinard <kumba@g.o> binutils-2.15.91.0.2.ebuild:
1485 - Marked ~mips. Works great for o32, n32 has problems, and is thus masked in
1486 - cascade profiles.
1487 -
1488 - 28 Sep 2004; Mike Frysinger <vapier@g.o>
1489 - +files/2.15/40_all_binutils-uclibc-linker.patch,
1490 - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r3.ebuild:
1491 - Add a patch to fix uclibc linking/ld.so.con.
1492 -
1493 - 08 Sep 2004; Mike Frysinger <vapier@g.o>
1494 - binutils-2.14.90.0.8-r1.ebuild, -binutils-2.14.90.0.8-r2.ebuild:
1495 - Merge the changes from -r2 back into -r1 since it was just uclibc specific.
1496 -
1497 - 06 Sep 2004; <solar@g.o>
1498 - +files/2.15/binutils-2.15-elf32-arm-textrel.patch,
1499 - binutils-2.15.90.0.1.1-r3.ebuild:
1500 - added patch from RH which allows ARCH=arm to compile & link correctly with
1501 - binutils-2.15
1502 -
1503 - 06 Sep 2004; Luca Barbato <lu_zero@g.o>
1504 - binutils-2.15.90.0.3-r3.ebuild:
1505 - Marked ppc
1506 -
1507 - 02 Sep 2004; Mike Frysinger <vapier@g.o>
1508 - binutils-2.14.90.0.8-r1.ebuild, binutils-2.14.90.0.8-r2.ebuild,
1509 - binutils-2.15.90.0.3-r3.ebuild:
1510 - Versions 2.15 <= x <= 2.15.91.0.2 are known to produce bad code for arm under
1511 - certain circumstances.
1512 -
1513 - 01 Sep 2004; <solar@g.o> binutils-2.15.90.0.1.1-r1.ebuild,
1514 - binutils-2.15.90.0.1.1-r3.ebuild:
1515 - marking binutils-2.15.91.0.1 ~x86 again
1516 -
1517 - 31 Aug 2004; Gustavo Zacarias <gustavoz@g.o>
1518 - binutils-2.14.90.0.8-r1.ebuild:
1519 - Stable on sparc
1520 -
1521 - 26 Aug 2004; Rob Holland <tigger@g.o> binutils-2.14.90.0.8-r2.ebuild,
1522 - binutils-2.15.91.0.1-r2.ebuild, binutils-2.15.91.0.2.ebuild:
1523 - gnuconfig_update belongs in src_unpack, not src_compile
1524 -
1525 - 11 Aug 2004; Travis Tilley <lv@g.o> binutils-2.15.91.0.2.ebuild:
1526 - masking this release -amd64. most software builds fine, but on mozilla firefox
1527 - and occasionally glibc this release will segfault
1528 -
1529 - 09 Aug 2004; Travis Tilley <lv@g.o> binutils-2.15.91.0.2.ebuild:
1530 - adding ~amd64 keyword for testing
1531 -
1532 -*binutils-2.15.91.0.2 (02 Aug 2004)
1533 -
1534 - 02 Aug 2004; Joshua Kinard <kumba@g.o> +binutils-2.15.91.0.2.ebuild:
1535 - New revision of binutils. Doesn't include 51* or 52* uclibc patches.
1536 -
1537 - 27 Jul 2004; Mike Frysinger <vapier@g.o>
1538 - +files/2.14/binutils-2.14.90.0.6-build_modules.patch,
1539 - +files/2.14/binutils-2.14.90.0.6-cflags.patch,
1540 - +files/2.14/binutils-2.14.90.0.6-conf.patch,
1541 - +files/2.14/binutils-2.14.90.0.6-debian.patch,
1542 - binutils-2.14.90.0.6-r7.ebuild:
1543 - Add patches from uClibc build root.
1544 -
1545 - 24 Jul 2004; Travis Tilley <lv@g.o> binutils-2.15.91.0.1-r1.ebuild:
1546 - removing ~amd64 keyword
1547 -
1548 - 22 Jul 2004; <solar@g.o> binutils-2.14.90.0.8-r2.ebuild:
1549 - uclibc update
1550 -
1551 - 08 Jul 2004; Travis Tilley <lv@g.o> binutils-2.15.91.0.1-r1.ebuild:
1552 - adding ~amd64 keyword for wider testing
1553 -
1554 - 08 Jul 2004; Alexander Gabert <pappy@g.o>
1555 - binutils-2.14.90.0.8-r2.ebuild:
1556 - added filter-flags for freduce-all-givs (bug id 27456)
1557 -
1558 - 03 Jul 2004; Bryan Østergaard <kloeri@g.o>
1559 - binutils-2.14.90.0.8-r1.ebuild:
1560 - Stable on alpha.
1561 -
1562 - 02 Jul 2004; Jeremy Huddleston <eradicator@g.o>
1563 - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild,
1564 - binutils-2.12.90.0.15.ebuild, binutils-2.13.90.0.16-r1.ebuild,
1565 - binutils-2.13.90.0.18-r1.ebuild, binutils-2.13.90.0.18.ebuild,
1566 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild,
1567 - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild,
1568 - binutils-2.14.90.0.6-r3.ebuild, binutils-2.14.90.0.6-r6.ebuild,
1569 - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r4.ebuild,
1570 - binutils-2.14.90.0.7.ebuild, binutils-2.14.90.0.8-r1.ebuild,
1571 - binutils-2.14.90.0.8-r2.ebuild, binutils-2.14.90.0.8.ebuild,
1572 - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r3.ebuild,
1573 - binutils-2.15.90.0.3-r3.ebuild, binutils-2.15.91.0.1-r1.ebuild,
1574 - binutils-2.15.91.0.1-r2.ebuild, binutils-2.15.91.0.1.ebuild:
1575 - virtual/glibc -> virtual/libc
1576 -
1577 - 27 Jun 2004; <solar@g.o> binutils-2.15.91.0.1-r2.ebuild:
1578 - remove unused patches from tarball an no_rel_ro patches
1579 -
1580 - 23 Jun 2004; Aron Griffis <agriffis@g.o>
1581 - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild,
1582 - binutils-2.12.90.0.15.ebuild, binutils-2.13.90.0.16-r1.ebuild,
1583 - binutils-2.13.90.0.18-r1.ebuild, binutils-2.13.90.0.18.ebuild,
1584 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild,
1585 - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild,
1586 - binutils-2.14.90.0.6-r3.ebuild, binutils-2.14.90.0.6-r6.ebuild,
1587 - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r4.ebuild,
1588 - binutils-2.14.90.0.7.ebuild, binutils-2.14.90.0.8-r1.ebuild,
1589 - binutils-2.14.90.0.8.ebuild:
1590 - QA - fix use invocation
1591 -
1592 - 20 Jun 2004; Daniel Black <dragonheart@g.o>
1593 - binutils-2.14.90.0.8-r2.ebuild, binutils-2.15.91.0.1-r2.ebuild:
1594 - Fix unpacks for bugs #54316 and #54059. Added sample test routine to
1595 - binutils-2.15.91.0.1-r2
1596 -
1597 - 15 Jun 2004; Travis Tilley <lv@g.o> binutils-2.14.90.0.8-r2.ebuild:
1598 - changed the ebuild to not have "use uclibc ... || die", but it still doesnt
1599 - patch cleanly so it is still masked
1600 -
1601 - 15 Jun 2004; Travis Tilley <lv@g.o> binutils-2.14.90.0.8-r2.ebuild:
1602 - masking -* due to bug 54059
1603 -
1604 -*binutils-2.15.91.0.1-r2 (16 Jun 2004)
1605 -
1606 - 16 Jun 2004; Daniel Black <dragonheart@g.o>
1607 - +binutils-2.14.90.0.8-r2.ebuild, +binutils-2.15.91.0.1-r2.ebuild:
1608 - uclibc fixes thanks to Peter S. Mazinger <ps.m@×××.net>
1609 -
1610 - 13 Jun 2004; Luca Barbato <lu_zero@g.o>
1611 - binutils-2.15.90.0.3-r3.ebuild:
1612 - Fixes a problem with kdeutils not linking
1613 -
1614 - 08 Jun 2004; Mike Frysinger <vapier@g.o>
1615 - binutils-2.15.91.0.1-r1.ebuild:
1616 - This version breaks pretty bad on ppc/altivec ... cant build kernel/gcc/etc...
1617 - :(
1618 -
1619 - 05 Jun 2004; Ilya A. Volynets-Evenbach <iluxa@g.o>
1620 - binutils-2.14.90.0.8-r1.ebuild:
1621 - Mark binutils-2.14.90.0.8-r1 ~mips
1622 -
1623 -*binutils-2.15.91.0.1-r1 (04 Jun 2004)
1624 -
1625 - 04 Jun 2004; Travis Tilley <lv@g.o> +files/libiberty-pic.patch,
1626 - +binutils-2.15.91.0.1-r1.ebuild:
1627 - new ebuild with patch updates from Peter Mazinger
1628 -
1629 - 03 Jun 2004; Tom Gall <tgall@g.o> binutils-2.15.90.0.3-r3.ebuild,
1630 - binutils-2.15.91.0.1.ebuild:
1631 - binutils-2.15.90.0.3-r3.ebuild stable on ppc64, binutils-2.15.91.0.1.ebuild
1632 - ~ppc64
1633 -
1634 - 02 Jun 2004; Travis Tilley <lv@g.o> binutils-2.15.90.0.1.1-r3.ebuild:
1635 - stable on amd64
1636 -
1637 -*binutils-2.15.91.0.1 (28 May 2004)
1638 -
1639 - 28 May 2004; Joshua Kinard <kumba@g.o>
1640 - binutils-2.15.90.0.3-r3.ebuild, +binutils-2.15.91.0.1.ebuild:
1641 - New revision, keyword masked for now, needs testing.
1642 -
1643 - 26 May 2004; Luca Barbato <lu_zero@g.o>
1644 - binutils-2.15.90.0.1.1-r3.ebuild, binutils-2.15.90.0.3-r3.ebuild:
1645 - Marked ~ppc
1646 -
1647 -*binutils-2.15.90.0.1.1-r3 (23 May 2004)
1648 -
1649 - 23 May 2004; Travis Tilley <lv@g.o>
1650 - -binutils-2.15.90.0.1.1-r2.ebuild, +binutils-2.15.90.0.1.1-r3.ebuild:
1651 - make patchset apply all patches on all archs and re-added hppa keyword since
1652 - the relro backport should apply cleanly now
1653 -
1654 - 16 May 2004; <solar@g.o> binutils-2.14.90.0.8-r1.ebuild,
1655 - binutils-2.15.90.0.1.1-r1.ebuild, binutils-2.15.90.0.1.1-r2.ebuild,
1656 - binutils-2.15.90.0.1.1.ebuild, binutils-2.15.90.0.3-r3.ebuild:
1657 - added gprof/bbconv.pl install phase of >=binutils-2.14.90.0.8-r1, added
1658 - multitarget USE flag for canadian cross compiling bug #49934 also
1659 - >=binutils-2.14.90.0.8-r1. marked 2.14.90.0.8-r1 stable on x86
1660 -
1661 - 13 May 2004; <solar@g.o> binutils-2.15.90.0.3-r3.ebuild:
1662 - bbconv.pl script is needed to convert profiling information in bb.out files to
1663 - format understood by gprof. reported by pasi valminen bug 50911
1664 -
1665 -*binutils-2.15.90.0.3-r3 (11 May 2004)
1666 -
1667 - 11 May 2004; <solar@g.o> binutils-2.15.90.0.3-r2.ebuild,
1668 - binutils-2.15.90.0.3-r3.ebuild:
1669 - updated patches to match upstream fixes. Includes fix s390{,x} .{,b,p2}align
1670 - handling, ppc/ppc64 testsuite fixes. -z relro ppc/ppc64/ia64 fixes, change
1671 - x86-64 .plt symbol st_size handling to match ia32, prettify objdump -d output,
1672 - several SPARC fixes. Submitted by Peter S. Mazinger
1673 -
1674 -*binutils-2.15.90.0.3-r2 (10 May 2004)
1675 -
1676 - 10 May 2004; <solar@g.o> binutils-2.15.90.0.3-r1.ebuild,
1677 - binutils-2.15.90.0.3-r2.ebuild:
1678 - Fix .tbss handling
1679 -
1680 - 08 May 2004; Joshua Kinard <kumba@g.o>
1681 - binutils-2.14.90.0.8-r1.ebuild:
1682 - Originally masked because these binutils would produce non-booting kernels on
1683 - mips. That problem has been resolved in the kernel sources now, so it's safe
1684 - to put these into unstable (2.15 needs more testing).
1685 -
1686 -*binutils-2.15.90.0.1.1-r2 (10 May 2004)
1687 -
1688 - 10 May 2004; Travis Tilley <lv@g.o>
1689 - +binutils-2.15.90.0.1.1-r2.ebuild:
1690 - added backports of the tbss fix and relro patch
1691 -
1692 -*binutils-2.15.90.0.1.1-r1 (04 May 2004)
1693 -
1694 - 04 May 2004; Travis Tilley <lv@g.o>
1695 - +binutils-2.15.90.0.1.1-r1.ebuild:
1696 - added a more amd64-friendly revision of 2.15.90.0.1.1. besides the patches
1697 - included in the previous ebuild, the following have been added:
1698 - 34_all_binutils-2.15.90.0.3-place-orphan.patch,
1699 - 70_amd64_binutils_x86_64_testsuite.patch,
1700 - 71_ppc_binutils-2.13-ppc32-fPIC.patch, 72_all_fde-alignment.patch,
1701 - 73_amd64_x86-64-gotpcrel.patch, 74_all_gcc34-no-unit-at-a-time.patch,
1702 - 75_amd64_sysenter-sysexit-are-valid-IA32e-assembly.patch,
1703 - 76_all_use-new-ld-dtags.patch, 77_x86_via-padlock-gas.patch, and
1704 - 78_x86_via-padlock-tests.patch. this ebuild /should/ work with gcc 3.4 more
1705 - consistantly than the previous one.
1706 -
1707 - 24 Apr 2004; Travis Tilley <lv@g.o> binutils-2.14.90.0.7-r1.ebuild,
1708 - binutils-2.14.90.0.7-r2.ebuild, binutils-2.14.90.0.7-r3.ebuild,
1709 - binutils-2.14.90.0.7-r4.ebuild, binutils-2.14.90.0.7.ebuild,
1710 - binutils-2.14.90.0.8-r1.ebuild, binutils-2.14.90.0.8.ebuild,
1711 - binutils-2.15.90.0.1.1.ebuild, binutils-2.15.90.0.3-r1.ebuild,
1712 - binutils-2.15.90.0.3.ebuild:
1713 - GCC 3.4 breaks binutils if CFLAGS arent conservative. Adding fix for bug #47581
1714 -
1715 - 23 Apr 2004; Travis Tilley <lv@g.o> binutils-2.15.90.0.1.1.ebuild:
1716 - added ~amd64 keyword for testing
1717 -
1718 -*binutils-2.15.90.0.3-r1 (19 Apr 2004)
1719 -
1720 - 19 Apr 2004; <solar@g.o> binutils-2.15.90.0.3-r1.ebuild:
1721 - - the patches 03,04,07 were replaced w/ the redhat ones - the patch 01 was
1722 - moved to apply after the uclibc patches (59) - the 20 patch got a replacement
1723 - 64 for the case relro is used (default in ebuild) - the 90 patch (pt_pax) has
1724 - also a replacement as 63 to apply after relro - the patches 3x_ are from
1725 - redhat having the same patch number 3x coresponds in redhat to x, (unmodified
1726 - patches) - the patches 5x_ are uclibc related coming from buildroot (51 and 52
1727 - are ports of the buildroot versions to this binutils, 51 is generic, only 52
1728 - is uclibc specific), the 59 patch is really the 01 one, but the 52 patch is so
1729 - big, that I didn't want to patch it again, it applies correctly in the reverse
1730 - order - the patches 6x_ are from me: 61_ I had a situation on cross-compiling
1731 - where I needed it 62_ is an uclibc addon (missing configure stuff to recognize
1732 - uclibc) 63_ pt_pax patch to apply after relro 64_ is a 20_ patch replacement
1733 - for amd64.
1734 - I have left in all the patches, so that some can build w/ and w/o relro. The
1735 - ebuild offers this possibility, see comment inside.
1736 - The uclibc stuff shouldn't disturb normal functionality, mainly the configure
1737 - stuff is enabled to recognize uclibc systems. Peter S. Mazinger <ps.m@×××.net>
1738 -
1739 -*binutils-2.15.90.0.3 (15 Apr 2004)
1740 -
1741 - 15 Apr 2004; Joshua Kinard <kumba@g.o> binutils-2.12.90.0.15.ebuild,
1742 - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.18-r1.ebuild,
1743 - binutils-2.13.90.0.18.ebuild, binutils-2.14.90.0.2.ebuild,
1744 - binutils-2.14.90.0.4.1-r1.ebuild, binutils-2.14.90.0.5-r1.ebuild,
1745 - binutils-2.14.90.0.6-r2.ebuild, binutils-2.14.90.0.6-r3.ebuild,
1746 - binutils-2.14.90.0.6-r6.ebuild, binutils-2.14.90.0.6-r7.ebuild,
1747 - binutils-2.15.90.0.3.ebuild:
1748 - New ebuild for binutils-2.15.90.0.3, and removed portage from DEPEND in older
1749 - ebuilds as it caused repoman troubles.
1750 -
1751 - 14 Mar 2004; Joshua Kinard <kumba@g.o> :
1752 - Added a patch to the patchball for mips that reverses a patch added in
1753 - Dec-2003 that seemingly makes unbootable kernels. The issue needs to be
1754 - investigated further to make sure that this doesn't not affect 2.6 kernels as
1755 - well (tested with 2.4 kernels for now).
1756 -
1757 -*binutils-2.15.90.0.1.1 (06 Mar 2004)
1758 -
1759 - 06 Mar 2004; Joshua Kinard <kumba@g.o> binutils-2.15.90.0.1.1.ebuild,
1760 - binutils-2.15.90.0.1.ebuild:
1761 - New minor revision that fixes the as.1 manpage issue and an ia64 linker bug.
1762 -
1763 -*binutils-2.15.90.0.1 (04 Mar 2004)
1764 -
1765 - 04 Mar 2004; Joshua Kinard <kumba@g.o> binutils-2.15.90.0.1.ebuild:
1766 - New Version + fix for generating as.1 manpage. Keyword masked on all archs,
1767 - test and keyword as necessary.
1768 -
1769 - 21 Feb 2004; Brad House <brad_mssw@g.o>
1770 - binutils-2.14.90.0.8-r1.ebuild:
1771 - stable on amd64 for 2004.0 release
1772 -
1773 - 17 Feb 2004; Martin Schlemmer <azarah@g.o>
1774 - binutils-2.14.90.0.8-r1.ebuild:
1775 - Move to unstable to give the PAX_FLAGS stuff a test run.
1776 -
1777 - 10 Feb 2004; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.8.ebuild:
1778 - Masked on mips because this version of binutils won't produce bootable kernel
1779 - images. could be a missing patch or such.
1780 -
1781 -*binutils-2.14.90.0.8-r1 (27 Jan 2004)
1782 -
1783 - 27 Jan 2004; <solar@g.o> binutils-2.14.90.0.8-r1.ebuild:
1784 - Added support for new PT_PAX_FLAGS markings for program headers.
1785 -
1786 - 19 Jan 2004; <agriffis@g.o> binutils-2.14.90.0.7-r4.ebuild:
1787 - stable on alpha and ia64 for bug 37033
1788 -
1789 -*binutils-2.14.90.0.8 (18 Jan 2004)
1790 -
1791 - 18 Jan 2004; Martin Schlemmer <azarah@g.o>
1792 - binutils-2.14.90.0.8.ebuild:
1793 - Update version. Move patches to tarball. Many thanks to
1794 - Kumba <kumba@g.o> for updating the pni (prescott support) patch
1795 - and the mips-brswap patch.
1796 -
1797 -*binutils-2.14.90.0.7-r4 (18 Jan 2004)
1798 -
1799 - 18 Jan 2004; Martin Schlemmer <azarah@g.o>
1800 - binutils-2.14.90.0.7-r4.ebuild,
1801 - files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch:
1802 - Do not add sections to a PT_GNU_STACK segment, which might be
1803 - a possible security issue, bug #37033.
1804 -
1805 - http://sources.redhat.com/ml/binutils/2003-12/msg00205.html
1806 -
1807 - Also bump x86 to stable, and do not drop already stable archs from
1808 - -r3 to testing, as it is a crusial patch.
1809 -
1810 - 07 Jan 2004; Jason Wever <weeve@g.o> binutils-2.14.90.0.7-r3.ebuild:
1811 - Marked stable on sparc.
1812 -
1813 - 30 Dec 2003; Sven Blumenstein <bazik@g.o>
1814 - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild,
1815 - binutils-2.14.90.0.6-r6.ebuild:
1816 - Marked stable on sparc.
1817 -
1818 - 28 Dec 2003; Joshua Kinard <kumba@g.o>
1819 - binutils-2.14.90.0.7-r3.ebuild:
1820 - Move to mips stable (~mips -> mips)
1821 -
1822 - 29 Nov 2003; Brad House <brad_mssw@g.o>
1823 - binutils-2.14.90.0.7-r3.ebuild:
1824 - mark stable on amd64
1825 -
1826 -*binutils-2.14.90.0.7-r3 (09 Nov 2003)
1827 -
1828 - 08 Dec 2003; Guy Martin <gmsoft@g.o> binutils-2.14.90.0.7-r3.ebuild:
1829 - Marked stable on hppa.
1830 -
1831 - 09 Nov 2003; Martin Schlemmer <azarah@g.o>
1832 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild,
1833 - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7-r1.ebuild,
1834 - binutils-2.14.90.0.7-r2.ebuild, binutils-2.14.90.0.7-r3.ebuild,
1835 - binutils-2.14.90.0.7.ebuild:
1836 - Fix sparc64/mips64 symlinks to point to /usr/sparc-*/bin/*. Do not apply
1837 - -ppc-reloc.patch to sparc as ld quits with SIGBUS.
1838 -
1839 - 08 Nov 2003; Jason Wever <weeve@g.o> binutils-2.14.90.0.7-r2.ebuild:
1840 - Masked on sparc until ld issue is fixed.
1841 -
1842 -*binutils-2.14.90.0.7-r2 (08 Nov 2003)
1843 -
1844 - 08 Nov 2003; Martin Schlemmer <azarah@g.o>
1845 - binutils-2.14.90.0.7-r2.ebuild,
1846 - files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch,
1847 - files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch:
1848 - Cleanup -ppc-reloc.patch (had cruft like .orig in) and apply for all, as it
1849 - fixes dynamic relocs for more archs than ppc.
1850 - Add -tls-section-alignment.patch and put into testing for all.
1851 -
1852 -*binutils-2.14.90.0.7-r1 (07 Nov 2003)
1853 -
1854 - 07 Nov 2003; Luca Barbato <lu_zero@g.o>
1855 - binutils-2.14.90.0.7-r1.ebuild,
1856 - files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch:
1857 - Fix to bug #32755
1858 -
1859 - 05 Nov 2003; Luca Barbato <lu_zero@g.o> binutils-2.14.90.0.7.ebuild:
1860 - Maked -ppc :seems to have too many issues
1861 -
1862 - 04 Nov 2003; Brad House <brad_mssw@g.o>
1863 - binutils-2.14.90.0.6-r7.ebuild:
1864 - mark as stable on amd64
1865 -
1866 - 04 Nov 2003; Martin Schlemmer <azarah@g.o>
1867 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild,
1868 - binutils-2.14.90.0.6-r7.ebuild, binutils-2.14.90.0.7.ebuild:
1869 - Enable building of 64bit apps on Sparc and Mips, closing bug #24631.
1870 - Fix is an modified one from Jason Wever <weeve@g.o>.
1871 -
1872 -*binutils-2.14.90.0.7 (01 Nov 2003)
1873 -
1874 - 08 Nov 2003; Guy Martin <gmsoft@g.o> binutils-2.14.90.0.7.ebuild,
1875 - binutils-2.14.90.0.7-r1.ebuild : Marked -hppa as it can't even compile glibc.
1876 -
1877 - 01 Nov 2003; Martin Schlemmer <azarah@g.o>
1878 - binutils-2.14.90.0.7.ebuild:
1879 - Update version.
1880 -
1881 -*binutils-2.14.90.0.6-r7 (26 Oct 2003)
1882 -
1883 - 26 Oct 2003; Martin Schlemmer <azarah@g.o>
1884 - binutils-2.14.90.0.6-r7.ebuild,
1885 - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch:
1886 - Add the official binutils-2.14.90.0.6-bfd-elf-interp.patch patch.
1887 -
1888 - 26 Oct 2003; Martin Schlemmer <azarah@g.o>
1889 - binutils-2.14.90.0.6-r6.ebuild:
1890 - Bump ppc to stable, as the .interp fix in -r5 is wrong. Bump x86, amd64 and
1891 - ia64 to stable.
1892 -
1893 - 22 Oct 2003; Aron Griffis <agriffis@g.o>
1894 - binutils-2.14.90.0.6-r6.ebuild:
1895 - Stable on alpha
1896 -
1897 - 22 Oct 2003; Bartosch Pixa <darkspecter@g.o>
1898 - binutils-2.14.90.0.6-r5.ebuild:
1899 - set ppc in keywords
1900 -
1901 -*binutils-2.14.90.0.6-r6 (07 Oct 2003)
1902 -
1903 - 07 Oct 2003; Martin Schlemmer <azarah@g.o>
1904 - binutils-2.14.90.0.6-r6.ebuild,
1905 - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch:
1906 - Add correct patch to fix attributes on .interp section, thanks to feedback
1907 - from pipcas <pageexec@××××××××.hu> and Ned Ludd <solar@g.o>.
1908 -
1909 -*binutils-2.14.90.0.6-r5 (05 Oct 2003)
1910 -
1911 - 05 Oct 2003; Martin Schlemmer <azarah@g.o>
1912 - binutils-2.14.90.0.6-r5.ebuild,
1913 - files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch:
1914 - Add ppc-bfd.patch to fix ppc issues, bug #28011. Remove bfd-elf-interp.patch,
1915 - as it breaks section attibutes as in
1916 - http://gcc.gnu.org/ml/gcc/2003-10/msg00141.html.
1917 -
1918 -*binutils-2.14.90.0.6-r4 (05 Oct 2003)
1919 -
1920 - 05 Oct 2003; Martin Schlemmer <azarah@g.o>
1921 - binutils-2.14.90.0.6-r4.ebuild,
1922 - files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch,
1923 - files/2.14/binutils-2.14.90.0.6-ia64-howto.patch,
1924 - files/2.14/binutils-2.14.90.0.6-ia64-sdata.patch,
1925 - files/2.14/binutils-2.14.90.0.6-ia64-speedup.patch,
1926 - files/2.14/binutils-2.14.90.0.6-merge-speedup.patch,
1927 - files/2.14/binutils-2.14.90.0.6-sparc-cfi.patch:
1928 - Update eh-frame-ro patch - seems as if I might have missed a needed change or
1929 - two. Also update merge patch, as well as add some ia64 and sparc patches.
1930 -
1931 - 03 Oct 2003; Brad House <brad_mssw@g.o>
1932 - binutils-2.14.90.0.6-r3.ebuild,
1933 - files/binutils-2.14.amd64-32bit-path-fix.patch:
1934 - 32bit search path for amd64 was /lib and /usr/lib. That is obviously wrong.
1935 - Make the search path /lib32 and /usr/lib32 instead, which should be symlinks
1936 - to the real location of your 32bit install. This patch is amd64 ONLY
1937 -
1938 -*binutils-2.14.90.0.6-r3 (13 Sep 2003)
1939 -
1940 - 20 Sep 2003; Alexander Gabert <pappy@g.o>
1941 - binutils-2.14.90.0.6-r3.ebuild:
1942 - added hppa static fpic bugfix by tausq
1943 -
1944 - 20 Sep 2003; <solar@g.o> binutils-2.14.90.0.6-r3.ebuild,
1945 - files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch:
1946 - A change that defines expected section attributes for a select set of
1947 - hardcoded section names was incorrectly added to binutils by redhat. This fix
1948 - is for bfd/elf.c for the .interp entry which should have SHF_ALLOC instead of 0
1949 -
1950 - 17 Sep 2003; Jon Portnoy <avenj@g.o> binutils-2.14.90.0.6-r3.ebuild :
1951 - ia64 keywords.
1952 -
1953 - 13 Sep 2003; Martin Schlemmer <azarah@g.o>
1954 - binutils-2.14.90.0.6-r3.ebuild,
1955 - files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch:
1956 - Add patch that speedup C++ linking. Originally submitted by
1957 - <holger-gentoo@××××××.net> (got from Nove Hrady KDE hackfest), updated to
1958 - latest binutls by Chris Lee <clee@×××.org>, bug #27540.
1959 -
1960 -*binutils-2.14.90.0.6-r2 (01 Sep 2003)
1961 -
1962 - 21 Sep 2003; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.6-r2.ebuild:
1963 - Changed ~mips to mips in KEYWORDS
1964 -
1965 - 03 Sep 2003; Stefan Jones <cretin@g.o>
1966 - binutils-2.14.90.0.6-r2.ebuild :
1967 - Move to stable for x86, to fix bug #27440
1968 -
1969 - 01 Sep 2003; Martin Schlemmer <azarah@g.o>
1970 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1-r1.ebuild,
1971 - binutils-2.14.90.0.5-r1.ebuild, binutils-2.14.90.0.6-r2.ebuild,
1972 - files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch:
1973 - There is a bug in binutils 2.14.* which causes a segfault in certain
1974 - circumstances when linking. This bug does not exist in binutils 2.11.*.
1975 -
1976 - More details on the bug can be found here:
1977 - http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00559.html
1978 - http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00735.html
1979 -
1980 - Bug #27492, thanks to Adam Chodorowski <adam@×××××××××××.com> for reporting.
1981 -
1982 -*binutils-2.14.90.0.6-r1 (26 Aug 2003)
1983 -
1984 - 26 Aug 2003; Martin Schlemmer <azarah@g.o>
1985 - binutils-2.14.90.0.6-r1.ebuild:
1986 - Remove the place-orphan.patch patch, as it causes failures in sash and
1987 - util-linux-2.12 (bug #27330)
1988 -
1989 -*binutils-2.14.90.0.6 (24 Aug 2003)
1990 -
1991 - 24 Aug 2003; Martin Schlemmer <azarah@g.o>
1992 - binutils-2.14.90.0.6.ebuild,
1993 - files/2.14/binutils-2.14.90.0.5-place-orphan.patch,
1994 - files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch:
1995 - Update version.
1996 -
1997 - 20 Aug 2003; Luca Barbato <lu_zero@g.o> binutils-2.14.90.0.5-r1.ebuild:
1998 - Marked ~ppc
1999 -
2000 -*binutils-2.14.90.0.5-r1 (10 Aug 2003)
2001 -
2002 - 10 Aug 2003; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.5-r1.ebuild:
2003 - Moved binutils-2.14.90.0.5-r1 to mips unstable, since latest CVS this comes
2004 - from includes major mips updates. And to test it in Stager.
2005 - Also moved it to sparc unstable for testing.
2006 -
2007 -
2008 -*binutils-2.14.90.0.5 (23 Jul 2003)
2009 -
2010 - 23 Jul 2003; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.5.ebuild:
2011 - Changed "mips" to "-mips" in KEYWORDS until further testing can be done.
2012 -
2013 - 23 Jul 2003; Martin Schlemmer <azarah@g.o>
2014 - binutils-2.14.90.0.5.ebuild:
2015 - New release.
2016 -
2017 -*binutils-2.14.90.0.4.1-r1 (28 Jun 2003)
2018 -
2019 - 12 Jul 2003; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.4.1-r1.ebuild:
2020 - Changed -mips to ~mips in KEYWORDS. Experimentation seems to prove that
2021 - binutils-2.14.90.0.2 has some issue triggered at random in which a compile
2022 - errors out claiming "linking abicalls to non-abicalls". Some google searching
2023 - indicates binutils-2.14.90.0.4 or greater fixes this issue.
2024 - Has been tested in a mips stage1 rebuild and is currently used in building a
2025 - mipsel stage1 for Cobalt servers.
2026 -
2027 - 28 Jun 2003; Martin Schlemmer <azarah@g.o>
2028 - binutils-2.14.90.0.4.1-r1.ebuild, files/2.14/binutils-2.14.90.0.4-cfi.patch,
2029 - files/2.14/binutils-2.14.90.0.4-cfi2.patch,
2030 - files/2.14/binutils-2.14.90.0.4-cfi3.patch,
2031 - files/2.14/binutils-2.14.90.0.4-cfi4.patch,
2032 - files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch,
2033 - files/2.14/binutils-2.14.90.0.4-gas-execstack.patch,
2034 - files/2.14/binutils-2.14.90.0.4-gas-pred.patch,
2035 - files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch,
2036 - files/2.14/binutils-2.14.90.0.4-pie.patch,
2037 - files/2.14/binutils-2.14.90.0.4-pie2.patch,
2038 - files/2.14/binutils-2.14.90.0.4-pni.patch,
2039 - files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch,
2040 - files/2.14/binutils-2.14.90.0.4-ppc64-ctors.patch,
2041 - files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch,
2042 - files/2.14/binutils-2.14.90.0.4-pt-gnu-stack.patch,
2043 - files/2.14/binutils-2.14.90.0.4-sparc-nonpic.patch:
2044 - Add patches from Redhat. Add fix for libtool borkage.
2045 -
2046 -*binutils-2.14.90.0.4.1 (25 Jun 2003)
2047 -
2048 - 25 Jun 2003; Martin Schlemmer <azarah@g.o>
2049 - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.13.90.0.20-r1.ebuild,
2050 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.1.ebuild,
2051 - binutils-2.14.90.0.4.ebuild:
2052 - New version with some amd64 fixes. Also fix SRC_URI for some of the newer
2053 - ebuilds.
2054 -
2055 - 14 Jun 2003; Joshua Kinard <kmba@g.o> binutils-2.14.90.0.2.ebuild:
2056 - Changes ~mips to mips in KEYWORDS
2057 -
2058 - 08 Jun 2003; Luca Barbato <lu_zero@g.o>
2059 - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.2.ebuild:
2060 - marked stable on ppc.
2061 -
2062 -*binutils-2.14.90.0.4 (26 May 2003)
2063 -
2064 - 07 Jun 2003; Joshua Kinard <kumba@g.o> binutils-2.14.90.0.4.ebuild:
2065 - Changed ~mips to -mips. This package should stay masked until dragon
2066 - can release a fixed version that fixes the bad libbfd linkage.
2067 -
2068 - 26 May 2003; Joshua Kinard <kumba@g.o>
2069 - binutils-2.14.90.0.4.ebuild:
2070 - New Version. Masked for all archs except unstable/testing on mips.
2071 -
2072 - 26 May 2003; Joshua Kinard <kumba@g.o>
2073 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.ebuild:
2074 - Added a patch for MIPS arch which fixes binutils so that it does not generate
2075 - a broken dynamic relocation table for the OpenSSL libs. This happens because
2076 - the global GOT entry count is too low. The bug itself was introduced in
2077 - binutils CVS by the following patch:
2078 - http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elfxx-mips.c.diff?r1=1.38
2079 - &r2=1.39&cvsroot=src
2080 -
2081 - 26 May 2003; Joshua Kinard <kumba@g.o>
2082 - binutils-2.14.90.0.2.ebuild, binutils-2.14.90.0.4.ebuild:
2083 - Corrected a minor error in SRC_URI so that the
2084 - package is found in the right location on the kernel.org website.
2085 -
2086 -*binutils-2.11.92.0.7 (25 May 2003)
2087 -
2088 - 25 May 2003; Martin Holzer <mholzer@g.o>
2089 - binutils-2.11.92.0.12.3-r2.ebuild, binutils-2.11.92.0.7.ebuild,
2090 - binutils-2.12.90.0.15.ebuild, binutils-2.12.90.0.7.ebuild,
2091 - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.18-r1.ebuild,
2092 - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.20-r1.ebuild,
2093 - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.2.ebuild:
2094 - now uses mirror://kernel
2095 -
2096 -*binutils-2.14.90.0.2 (17 May 2003)
2097 -
2098 - 16 Jul 2003; Jay Pfeifer <pfeifer@g.o> binutils-2.14.90.0.2.ebuild:
2099 - set stable on x86
2100 -
2101 - 01 Jul 2003; Todd Sunderlin <todd@g.o> binutils-2.14.90.0.2.ebuild:
2102 - set stable on sparc
2103 -
2104 - 17 May 2003; Martin Schlemmer <azarah@g.o>
2105 - binutils-2.14.90.0.2.ebuild:
2106 - New version.
2107 -
2108 - 17 May 2003; Martin Schlemmer <azarah@g.o>
2109 - binutils-2.13.90.0.10.ebuild, binutils-2.13.90.0.10.ebuild,
2110 - binutils-2.13.90.0.14.ebuild, binutils-2.13.90.0.14.ebuild,
2111 - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.16.ebuild,
2112 - binutils-2.13.90.0.16.ebuild, binutils-2.13.90.0.18-r1.ebuild,
2113 - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.20-r1.ebuild,
2114 - binutils-2.13.90.0.4.ebuild, binutils-2.13.90.0.4.ebuild,
2115 - binutils-2.14.90.0.1-r1.ebuild, binutils-2.14.90.0.1.ebuild,
2116 - binutils-2.14.90.0.1.ebuild :
2117 - Add c++filt back in anticipation for gcc-3.3. Cleanup.
2118 -
2119 -*binutils-2.14.90.0.1-r1 (08 May 2003)
2120 -
2121 - 09 May 2003; Joshua Kinard <kumba@g.o>
2122 - binutils-2.14.90.0.1-r1.ebuild:
2123 - Changed -sparc to ~sparc. Merges fine on sparc,
2124 - but further testing to be done. With mips, edited out the
2125 - gas-mips-gprel from binutils-2.13.90.0.20, as this patch already
2126 - appears to be included in 2.14.90.0.1 (emerge failed on attempting to
2127 - patch it). Mips testing is underway via "emerge system".
2128 -
2129 - 08 May 2003; Nicholas Wourms <dragon@g.o>
2130 - binutils-2.14.90.0.1-r1.ebuild:
2131 - Fix a small typo in the patch section.
2132 -
2133 - 08 May 2003; Nicholas Wourms <dragon@g.o>
2134 - binutils-2.14.90.0.1-r1.ebuild,
2135 - files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch,
2136 - files/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch:
2137 - Added patch to resync with CVS head, bumped revision to reflect this. This
2138 - version should resolve any outstanding testsuite & weak symbol issues. I
2139 - have also added the previous patches back into the ebuild, compiles and
2140 - passes the testsuite on x86 w/o any regressions.
2141 -
2142 -*binutils-2.14.90.0.1 (06 May 2003)
2143 -
2144 - 06 May 2003; Luca Barbato <lu_zero@g.o>
2145 - binutils-2.14.90.0.1.ebuild:
2146 - New version, seems to solve the ppc relocation issues.
2147 -
2148 -*binutils-2.13.90.0.20-r1 (09 Apr 2003)
2149 -
2150 - 09 Apr 2003; Nicholas Wourms <dragon@g.o>
2151 - binutils-2.13.90.0.20-r1.ebuild:
2152 - Added cvs update patch to (hopefully) address the problems reported in
2153 - bugs #16363, #17986, & #18873. This also includes the fix from Alan
2154 - Modra for the problem where ld would segfault when building kde on
2155 - ppc. In addition to that, it also has some more mips/mips64 updates
2156 - which should address a few of the current problems we were experiencing
2157 - initially. As with the previous version, "Handle With Care..." That
2158 - being said, testing would be greatly appreciated and arches unmasked
2159 - as they are confirmed stable. I removed the previous ebuild since it
2160 - has been causing lots of trouble.
2161 -
2162 - 23 Mar 2003; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.20.ebuild :
2163 - Add '~x86' to KEYWORDS.
2164 -
2165 -*binutils-2.13.90.0.20 (22 Mar 2003)
2166 -
2167 - 22 Mar 2003; Nicholas Wourms <dragon@g.o>
2168 - binutils-2.13.90.0.20.ebuild,
2169 - files/2.13/binutils-2.13.90.0.10-x86_64-gotpcrel.patch,
2170 - files/2.13/binutils-2.13.90.0.18-testsuite-Wall-fixes.patch,
2171 - files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch,
2172 - files/2.13/binutils-2.13.90.0.20-gas-mips-gprel.patch:
2173 - Bump to new beta version. This release contains a boatload of fixes for
2174 - a wide variety of platforms. It also fixes a critical bug in the previous
2175 - version for the mips platform. Due to the beta nature of this version and
2176 - the proximity to a new gentoo release, I have set keywords to "-arch" for
2177 - all platforms except mips. However, it should be tested on these other
2178 - platforms and keywords modified as necessary.
2179 -
2180 -*binutils-2.13.90.0.18-r1 (08 Mar 2003)
2181 -
2182 - 31 Mar 2003; Christian Birchinger <joker@g.o>
2183 - binutils-2.13.90.0.18-r1.ebuild:
2184 - Commented out sparc-nonpic.patch and added ~sparc keyword
2185 -
2186 - 27 Mar 2003; Seemant Kulleen <seemant@g.o>
2187 - binutils-2.13.90.0.18-r1.ebuild:
2188 - masked for sparc, it breaks, dunno why. see bug #17193
2189 -
2190 - 08 Mar 2003; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.18-r1.ebuild :
2191 - Update patches from Redhat.
2192 -
2193 - 18 Feb 2003; Zach Welch <zwelch@g.o> :
2194 - Added arm to keywords.
2195 -
2196 -
2197 -*binutils-2.13.90.0.18 (26 Jan 2003)
2198 -
2199 - 27 May 2003; Guy Martin <gmsoft@g.o> binutils-2.13.90.0.18.ebuild:
2200 - Remasking binutils 2.13.90.0.18 for hppa which cause random segfault on
2201 - hppa1.1 stations.
2202 -
2203 - 29 Mar 2003; Christian Birchinger <joker@g.o>
2204 - binutils-2.13.90.0.18.ebuild:
2205 - Added sparc stable keyword
2206 -
2207 - 01 Mar 2003; Brandon Low <lostlogic@g.o>
2208 - binutils-2.13.90.0.10.ebuild, binutils-2.13.90.0.14.ebuild,
2209 - binutils-2.13.90.0.16-r1.ebuild, binutils-2.13.90.0.16.ebuild,
2210 - binutils-2.13.90.0.18.ebuild, binutils-2.13.90.0.4.ebuild:
2211 - Filter another flag that was causing problems
2212 -
2213 - 26 Feb 2003; Zach Welch <zwelch@g.o> binutils-2.13.90.0.18.ebuild :
2214 - filter -O2 from ARM builds to prevent gcc ICE
2215 -
2216 - 24 Feb 2003; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.18.ebuild :
2217 - Mark stable for x86. Rip out static stuff as it anyhow do not work.
2218 -
2219 - 22 Feb 2003; Guy Martin <gmsoft@g.o> binutils-2.13.90.0.18.ebuild :
2220 - Commited stable for hppa.
2221 -
2222 - 21 Feb 2003; Aron Griffis <agriffis@g.o> binutils-2.13.90.0.18.ebuild :
2223 - Mark stable on alpha
2224 -
2225 - 08 Feb 2003; Guy Martin <gmsoft@g.o> binutils-2.13.90.0.18.ebuild :
2226 - Added hppa to keywords.
2227 -
2228 - 01 Feb 2003; Jon Nall <nall@g.o> binutils-2.13.90.0.18.ebuild :
2229 - made stable for ppc. this is to allow kde to compile happily and closes bug
2230 - #14776
2231 -
2232 - 29 Jan 2003; Nicholas Wourms <dragon@g.o> binutils-2.13.90.0.18.ebuild :
2233 - Fixed Jakub's eh-frame-ro patch to apply and compile cleanly against
2234 - binutils-2.13.90.0.18. Passed all tests locally on x86, but please test on
2235 - other platforms.
2236 -
2237 - 26 Jan 2003; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.18.ebuild :
2238 - New version. Some cleanups + patches. This closes bug #14518.
2239 -
2240 -*binutils-2.13.90.0.16-r1 (30 Dec 2002)
2241 -
2242 - 08 Jan 2003; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.16-r1.ebuild :
2243 - Mark stable.
2244 -
2245 - 19 Jan 2003; Jan Seidel <tuxus@g.o> :
2246 - Add patches for mips
2247 - Added mips to keywords
2248 -
2249 - 30 Dec 2002; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.16-r1.ebuild :
2250 - Update with patches from Redhat/Mandrake for various issues.
2251 -
2252 - 13 Dec 2002; Mark Guertin <gerk@g.o> binutils-2.13.90.0.16.ebuild :
2253 - Marked stable for ppc.
2254 -
2255 - 10 Dec 2002; Martin Schlemmer <azarah@g.o> binutils-2.13.90.0.16.ebuild :
2256 - Mark as stable for x86.
2257 -
2258 - 06 Dec 2002; Rodney Rees <manson@g.o>:
2259 - Changed sparc ~sparc keywords
2260 -
2261 -*binutils-2.13.90.0.16 (29 Nov 2002)
2262 -
2263 - 07 Jan 2003: Jan Seidel <tuxus@g.o> binutils-2.13.90.0.16.ebuild :
2264 - Add patches for mips
2265 - Added mips to keywords.
2266 -
2267 - 29 Nov 2002; Nick Hadaway <raker@g.o>
2268 - binutils-2.13.90.0.16.ebuild, files/digest-binutils-2.13.90.0.16 :
2269 - Version bump. No changes in the ebuild. Solves bug #11088
2270 -
2271 -*binutils-2.13.90.0.14 (18 Nov 2002)
2272 -
2273 - 18 Nov 2002; Stefan Jones <cretin@g.o> :
2274 - Version update, masked for testing.
2275 -
2276 -*binutils-2.13.90.0.10 (14 Oct 2002)
2277 -
2278 - 14 Oct 2002; Martin Schlemmer <azarah@g.o> :
2279 -
2280 - Version update. Remove sparc until further testing
2281 - from Seemant.
2282 -
2283 -*binutils-2.13.90.0.8 (10 Oct 2002)
2284 -
2285 - 10 Oct 2002; Martin Schlemmer <azarah@g.o> :
2286 -
2287 - New version. PPC and SPARC elf linkage fixes. More
2288 - TLS support code added.
2289 -
2290 -*binutils-2.13.90.0.4 (15 Aug 2002)
2291 -
2292 - 15 Aug 2002; Martin Schlemmer <azarah@g.o> :
2293 -
2294 - Update to latest version.
2295 -
2296 - 1 Aug 2002; Martin Schlemmer <azarah@g.o> :
2297 -
2298 - Updated DEPEND not to use if statements, but rather
2299 - new syntax of portage-2.0.21 and up.
2300 -
2301 -*binutils-2.12.90.0.15 (30 Jul 2002)
2302 -
2303 - 30 Jul 2002; Mark Guertin <gerk@g.o>:
2304 - Added ppc to keywords
2305 -
2306 -*binutils-2.12.90.0.14 (6 Jul 2002)
2307 -
2308 - 6 Jul 2002; Martin Schlemmer <azarah@g.o> :
2309 - Version update.
2310 -
2311 -*binutils-2.12.90.0.9 (10 Jun 2002)
2312 -
2313 - 9 Jun 2002; Martin Schlemmer <azarah@g.o> :
2314 - Version update.
2315 -
2316 -*binutils-2.12.90.0.7 (25 Apr 2002)
2317 -
2318 -*binutils-2.12.90.0.4 (16 Apr 2002)
2319 -
2320 -*binutils-2.12.90.0.3 (7 Apr 2002)
2321 -
2322 -*binutils-2.12.90.0.1 (21 Mar 2002)
2323 -
2324 -*binutils-2.11.92.0.12.3-r2 (12 Mar 2002)
2325 -
2326 - 12 Mar 2002; Seemant Kulleen <seemant@g.o> ChangeLog :
2327 -
2328 - Updated copyright year, and added USE dependent nls compilation.
2329 -
2330 -*binutils-2.11.92.0.12.3-r1 (1 Feb 2002)
2331 -
2332 - 1 Feb 2002; G.Bevin <gbevin@g.o> ChangeLog :
2333 -
2334 - Added initial ChangeLog which should be updated whenever the package is
2335 - updated in any way. This changelog is targetted to users. This means that the
2336 - comments should well explained and written in clean English. The details about
2337 - writing correct changelogs are explained in the skel.ChangeLog file which you
2338 - can find in the root directory of the portage repository.
2339
2340 diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
2341 deleted file mode 100644
2342 index 558ba1f..0000000
2343 --- a/sys-devel/binutils/Manifest
2344 +++ /dev/null
2345 @@ -1,57 +0,0 @@
2346 -AUX 2.18-bfd-alloca.patch 4259 SHA256 31cbc7537b472f19585a7bc7a27526c460100024637f4bd090a9cf9f54cfffa3 SHA512 5672617cc12cad677429730f7c2ddbdf12051e21bcfcade8c47f4be1e5c9dbd1cc4797cf87f60bc450aec2ec5f0a9e17ac73316aa8228944d3908362c93802e7 WHIRLPOOL 496d51a64a72d48f8336ec097808b52c28f79c7f126d8957b94e7f3f55c4d15aa661aa9b35913242c98f7174dd76d25cccd09fcc981c86128a6578f9f683dd24
2347 -AUX 2.18-bfd-bufsz.patch 1129 SHA256 63aa7c6340b1365ab36bd88a6eb014ec5fa79893900f7e5bdd7cdc3ecbde4b54 SHA512 9ccc82bd9f4ff1d5bb9e6d2d721a74ad67f020e3f216e4d32811a83dd23a4d3cde41a8ebd04cf199b008b9f61d279285ed395e8041dd905210e779260a717cda WHIRLPOOL 7564c44ab0df60f02dab6944e880ff20c04d45c6c44bdbbd776f679e57d7b2cfde18598bacdfb3898e47d17aa4552e871cecc0ab658e897175faf75ccdbc5593
2348 -AUX 2.18-bfd-ia64elf.patch 3279 SHA256 5a278a9afbe393e2585b5637bd561b20a924baaa08449e55f5ccc59b00176406 SHA512 c2df8e7c83751cb39c3d5765c3a7cd917e9a3b5798fa0153d2da0effb9b33237bf8055cd69dc52c09d9de271831a9abc96384d80fae0a2f86e2bdef83451880b WHIRLPOOL 7ae7ef4380615217b7c462a2417b6e862f8db3e2d66b704466b242ba3559f6314dba9be31c4f78a60e0166252db19bd0db9ff4acf932456f6af9ee27968d08a1
2349 -AUX 2.18-gprof-fabs.patch 4309 SHA256 fedd47d69b385576d1bc8f72031ec16305c027f2f8eb88b883b595abf17e74ac SHA512 f05c907537157b119c9a5e9bd29faebd2ca98d47f1b9c98702a5446b145f4b9047f131b23b34e9016ef6b5a8596581d3ca5c9e2bcbc54868a6924dba33e76de8 WHIRLPOOL 44adbefd4cbb46c628f4b367fdb17de84d4909dcb47bda4a7f2a8ea8f0cce6ca90085332488c39cbdc00be0e116fbc9d8cde174a21ec39d0a4678fdbaf4871e0
2350 -AUX 2.18-ldwrap-interix.sh 2453 SHA256 2d9417b5e77f217ca79735705280ce6432cdacbea108919dc7aea5950dc59f73 SHA512 a0529a7793b27860c497efcf0dbc2da2081add1cfc48dcb8f7e8287fe4494cfe6d682e882a8d2eb241c205a597e29a5c00a23af9bca8ac7959207105c7930e36 WHIRLPOOL 897645cc135f38213b9c798561e47b840678f892cabbb54c2b35069c7035d8a7a95501a0b8c21d9769ce8427e4c0a1873f0d985522eb06a7eae0445fd55cd0a4
2351 -AUX 2.18-solarisx86_64.patch 953 SHA256 f3b0ddd50d77c68b7a9eea47e0f5df4a5051b14a806e579f2e401f30152b24ce SHA512 822ca7be565ff2ec1907c93868e199ab1a895e372ae02b7e5ed0cee0a4a35925edd2f6824b307fe5c16e56c61d894a9d7d67456e142ad044dabc771eaccc7839 WHIRLPOOL 8335a6770ff576d4a50b8948099406d183b08de5f6d6fedd125b07ce2aed1f8aea138c1df3020f00cfba14a6093d59e21b608d70095c2137d786c6b7b4be38c1
2352 -AUX 2.21-ldwrap-interix.sh 2731 SHA256 40e166611d31e92c72f322af53cf90fde6a1c8291a662c08ac0b3c9197381d9d SHA512 ae419628f9ffccb98aa42215365aff1839b03930eb9d60f8b9de0d042d018d34a7c069ced7476fe1b391a925faf0206206882659062ffc691046dfafffbafdbb WHIRLPOOL b97b6a032093dda9d7c69d1c0845fa5814b2dd8c5dbbd20019a1f4685423a94063f9561443c14e1f377229d20e838c8a9842c6dad2e54cd98cf347eb09db308d
2353 -AUX binutils-2.16-gcc4.patch 320 SHA256 9a0780f33ba42826262976d1fd278888156edc680b530753455f15ea367cedd5 SHA512 79eb26d211d807ef7dc8455ca64111681cf9b30e7c9b000d892f98e16e1b2dde1d79131fd2c530f07a38512f05e650389cc1c48260f2ef55efb6421badc89827 WHIRLPOOL ec9cf9808df0bba251a3c8bbc609cbb7e20bd0cc13149984455e2ac92995a1db1b44793b4c210bd7af49f848f58b8d28cc3b24ddf5c0d4207d9aca5d64ca7583
2354 -AUX binutils-2.16-solaris10.patch 1348 SHA256 a4b0d9130326310a31bacafc6a3c8059469372db829da821d4b321d05c45ca9d SHA512 319ce9030f72272d3ff51bdd914c6d5a0476ba1171a9287a963d1650fe321da5d630c011547c913ba7d6633b548935367d5179314043f42d38c91002638fa43a WHIRLPOOL ec4fecbd226ed1f7d17d7d02d4c85e6b4fa297949dfec33f03ccd9c0b34ffd19240343cc70a8e2f25b520886f6b85b0fd023043435c43f5b1a1280e31cbe0c2f
2355 -AUX binutils-2.18.50.0.7-mint.patch 87482 SHA256 a104f8aa3944277e34cd8c821426e10e6038173a91e9e02a24d4adacfeab2af8 SHA512 827aa204c9ceedf29a85a4419df2a32b3105373f76edabc54408eda14bc83b9385a7ed9109f7b6c699911054ba5034affa5c6fa0d343a23aef69ed87ab484e66 WHIRLPOOL 132bb72e845aa8fa91382a2fc693ef952b5b1a7fbb1e2793efed777dfa0d9c3780a34502f08565eed0bc0c814f890c79ec5e2dfad430049660a96546c07fa7ea
2356 -AUX binutils-2.18.50.0.7-mint2.patch 4078 SHA256 be69ae495218985ed44d9aca75d9854f3442c5fe010026531a5fa4a0201d93f2 SHA512 09fa5cc116bdd3808019487ffa9529af9ebdd317fe6b12a12df798c9e5458d9185bffe72cd02a1920167fdf1f7d1dc4978c04baef44d814f91d42f3cb4c71986 WHIRLPOOL 6010a2116956b62ac4dc91159c514f29c8a63b5c3274cfa4f503c51853fee06f9dd5c4d7b6ffeeb053c15caf88eda31258fbdf0dc4d2ed9c94eaf7b2113098c5
2357 -AUX binutils-2.18.50.0.9-reloc.patch 801 SHA256 2aa7cb08418d10df5fdd640169484540a821f88a26254b4d203c420a0278dc8b SHA512 3726b6684dd08e6c422790d86fdb3699db0330377408b8b1d7e57685a03b551f750735dbeaf6f78a7064026e2db5191633eac07752461faa485ae3c3bd1d4a21 WHIRLPOOL 4b8bf6f97ef0991a7cafc9cd2fdd6b819562b3b3b51299568b7892b5be7215867cf4531923f13bab6e46849b27fb11bb756a8185a219d1846833074246d9e430
2358 -AUX binutils-2.18.50.0.9-solaris-eh-frame.patch 7372 SHA256 ba5c83f673fdddd88f0c9f2123cd27f56823fc5076ad5e3bd014e39d8f02fd25 SHA512 95b39767a1bbac06506faa8e431889480f3960f9443dbfa1b76b3765a3ca93e1001f1a9743ea4d7d90efba0dc7cfc1be8a2df531297a632dee24601dc0b75bb7 WHIRLPOOL 37f353c4e86003b7e967b605ccda860a706fd9a498ce44a91cc345108b02414938001c179e835e6edf6471b683a28984c35f1423861139e95aa08fdf96fa4034
2359 -AUX binutils-2.19.1-hppa-hpux.patch 15637 SHA256 93f464ddf3d1b5762b383f9850db994ec0aaa568448659faf27ae122968f47e2 SHA512 07e70f31f2818fd6afc5654186c57e024292fbdc4f5ae4e119ffcb772713e2a639d6a5020feba461112ae41f5b54bf80dca699947532c53964d31ab5bad498bb WHIRLPOOL ca8979aa709b2b6b9e81334de1a3fef475eec28c3fe6692c5258af6709cde749eec79fbde4166e8c3433d1714cba7b51917019a4a50b8cc8e2b28a37f607bebe
2360 -AUX binutils-2.19.1-hpux.patch 753 SHA256 25a0332702d9ae262d579c3ab05245af21b6f1afa2d9e604fa592ee8efe7b935 SHA512 3ea1a90bd9612f1d46449337e38e68ef3ee668cab6de87fd96531a2867370c1c59a54088ea4e0eb7817e807af9b512ba8f2e6d20039c6c9876b465a40eaba4fd WHIRLPOOL 6fc1a1890b806dd67209a5c098efbaada9ad0abd5863c59a804d97ac86fccba6af55ae0e062ec17e81159219f9de3096ebb55802a9e8cb104476113b458d8848
2361 -AUX binutils-2.19.1-parallel.patch 406 SHA256 8c258167fa3189b9d1c179d180761d7d4af55a0701efa646de54be6dc0925e04 SHA512 0eba643dd43344a1198f08221dd69b425883c2c2ef45fb3310aad8244679e025b4984f9bff1ec89900271da29cd5938bb354bed54b19b1f3159bb63bb84cdac7 WHIRLPOOL caac5aff5d2d10f469f44f2e4682e74f1e75833478fe692ad2d8a03242b11d298bf53ae827c0d0278e7c9d6c89da49b9fb0238921eb48703a4704c03958c6521
2362 -AUX binutils-2.19.50.0.1-mint.patch 2240 SHA256 e92582eb69f4c281164de145cad29fd8191c0e779bcf349bc937336ea6436444 SHA512 aa372b5c74cab5b7d984fdb4979519d33b752693e467b195a7332e5ff5b67f1643c30200227e79f79ca1e617a53757182bbc7b6fe047fb28d03c2fd08c147adf WHIRLPOOL b7245c012e0eb85fadc97f14db36599a3f3cfe188ccf5f7d734afa8f577dbaf5ded77b879d5cbb1a51847c4e4ac01c2afe1aed5a31ad46d26d4fdc59f86f6564
2363 -AUX binutils-2.20.51.0.1-linux-x86-on-amd64.patch 487 SHA256 77b3172f79506805229da44d968b1e87ee42be9c55dc92dc87fa8d130cf33c90 SHA512 6587aa359cb70e6f411aeefd082bbcaab6a51363e1032c0316a898c9ec9b0809ccabea47c774b837f3dae674366a522909a17c167996b3bb9f88498a76fbe3fd WHIRLPOOL c796c944373156369597b6fa0d82eceb4cdaf26d5f23aae306fbd57e76691325e6537ef4de8cb3edcb18bd344c4c6fcc8b042128794f38d693315cb11ca7e101
2364 -AUX binutils-2.21.51.0.6-mint.patch 97602 SHA256 b1ef74ec295af411d40f0125483c84a19a717d8b3a0a4ec6de3a2d3a33b44488 SHA512 b0fd02ac1a192e48273ad6784599240d50e695c88bff12b4b249a3707b1857a09f5e013e45eeb3c757be4b17ce3c8cce72c3cb7dd33271d4f459b3d86374ee36 WHIRLPOOL 05c58da966ef2d09faa1bcc9a84d4d586f91a9da5a3a012d063714d164ffa50a9a70c8c766b3e63e7e1fe784be96ea5d15d0b900f2cfc0ecc4705bc8770018a3
2365 -AUX binutils-2.21.53.0.2-mint.patch 94652 SHA256 4570bf69f57b334aea6ba2717488d059a26f7570dd6a2445aa20b10f22bbd531 SHA512 4069feaa57694c5440cc465eb102ad008754908d05bd9c37e4da545812c48a8ea19cc5aa01361c29297433ddd22f054f3dd35e3a0307893546d461169962a425 WHIRLPOOL e7443af33a519208ca006011d4589866051ba2ad235d177ad5d0b0248fa38782fb86e0852e3312ae34cca6d21bc5d58a46def01bf4fd737d12274b2ad34514b5
2366 -AUX binutils-2.22-mint.patch 94045 SHA256 fa438b0810a0d6056f703ac087e76c1ffed467300025f13ba1f7f7593e947170 SHA512 dc2cd2301b7f413af9c15a664adc43ba0474584d81f3158e527a0e6063d31030c1db4953943bd1ca699ee5de69c71a1739113cd463516d42dc9bf7cd83bfc84d WHIRLPOOL 60421e6ea562716848eeefc15f8d264774265022b7294c65efa9581379793c735ffeba705b3965f2f03f5f79f34b0ba784189fcad978ff1dd4b6d190ea94279c
2367 -AUX binutils-2.23-ar-ranlib-truncate.patch 1095 SHA256 6d09ce8e2fbf370fd73f9ff619656ab1ecd62bea05b70092e32356a0ff8598ba SHA512 78649fff9266175d773abbb44005b8d43aaf82d24ec71db1e965dfac207156984f71f69d121c9f6311971d44f707a3501dee97e9bf45009ca41be313e10f96dd WHIRLPOOL d1e6055d2a4ebdafebd339af9a72fbdb071627bc3ff00dc9497d3903d2d7e966060b88223ada4d9883b0d76bd3b51a8fa405d0498a347cbaecfd6afbbe26af7d
2368 -AUX binutils-2.23-mbstate_t.patch 5739 SHA256 ec17ce4d4e47d861f2300dcbdf4f4143c38c7919af9bdb8dd82350e8f0f332e7 SHA512 33eff1d30b93f13dbd11959c9110bf0f787b1e2318f2cd03f9918f8089c136aa6a5188d759825e8b0bb819000ab552234dd18568b121cc6ea9b537538a97e79b WHIRLPOOL 3da5ad51d0a13d0028570cf61b8b60ea19722073a70af6b5d9d07f5845b9970243a65d3359ae91ce58f4167e47837439eecec94db5d3f86a0e3fab03736bfcd0
2369 -AUX binutils-2.23-no-ld-script-sysroot.patch 376 SHA256 0439bfa86a1f4dfd18b56b0104e78a3c670584424ebb6205c673fc6f5015b7e0 SHA512 4624f2ceebba47c2656430d1923c72a6a20cff2c57b58ecb001fd4e67e3a34c7054f1f0f12be7ef21f4789298800106219f4a5dd19cafadf9858ba0d4bee5f43 WHIRLPOOL 40de5dc12ca11855188fe16b85d892085e64cbaedcb04a266085502f2cea9de3d94d2c61036548ed3248f7d48b986ac5748aed7bf750f0f9f78c53af515d3329
2370 -AUX binutils-2.23-no-rpath-sysroot.patch 1008 SHA256 9c35d21c8a5ac0edf8812ea126b6cc7f8ed630a73f4c91db3cc27652b638d8b6 SHA512 d5b311f18f3f6b0e21fbb3da355cd99e98e9ed10d23b9b684a2f0de263966c959b39d22866f93cefb1d81814fd1a7ade14302338c57a12614fd9d64c5b390710 WHIRLPOOL 10b832f32a0f9acc9924bd0d5d81ee99cc13549309691025e8d90a874bf99dfde0efe9a0a357c9c924edf2cd34a2f3371c43a79ea8375d7377507fa5c961d34c
2371 -AUX binutils-2.23-runtime-sysroot.patch 7447 SHA256 8fcda46e89f7870e1feb6264e767f960f213c32e079ff557183a63e51466271d SHA512 23f5865ce55923c41fa92cc83611887037b773a08cb57b6b94bfba090bffdf4ed7fe0e6d8a85f882ef936afd0e1bad0d07b11a568671ddf047ec6113fc1a1bfa WHIRLPOOL 954b228b14950eaac28f322c5d53638c4e1a5a362f0cccae3d355beb354dc916188d9b33fd003802ebfd00336f5da00c83e524255637fe164c2ef216166e2535
2372 -AUX binutils-2.24-native-lib.patch 418 SHA256 c0c1e8c0f9ae28371ed20ef9f91fabe3d0b2d3e1ca46394317a632ea2be190f6 SHA512 0f4d4d747ec80bc71091ac3a2128e9404615b42503d716f25cb9517dbbee6d2f63e16214c554f7533658df722f7a1530866d12f6ed0fdc91c15bb88d1ebd33c5 WHIRLPOOL 96f31cb6c262acc233b48f079d908b7ea160845fc20acbb0496a178609e61300ada2f44485d1a3085a400975e304fb872f2255205ea4efe43cffeb521bc4ed76
2373 -AUX binutils-2.24-runtime-sysroot.patch 7184 SHA256 d26ca9377ba579bae77ae3a40eb3839cd52c7935f3e8d3ca97cd679b9b5252e8 SHA512 e6ce483898c1277e22ee846b2d5e521fe2e6e9e382a619d6205ae3c37c697eef05ff1fda9fc0a8568c7bb961fd73ba7ae4952d859b60753ccc6aa0e636f12213 WHIRLPOOL d521615eef5f267786b1b44c13f09f528bad426af0812b25a45238dcd3ae994a8b3e03eabac118373296de57faa1bd54295463d99892562baae84dfb3adcc661
2374 -DIST binutils-2.20.1-patches-1.2.tar.bz2 15747 SHA256 30738e18f492bd653421d4bc4d52b841680fe4b17a69524e081d9befadef6d3b SHA512 23c1026db7748f9f958d32f6bfd2b362dae3bdee33612fb6a0cc4277fcb360a55c5618dc748a7119b12794a1bc22ea70af92c04f5283c0041bc681e5db4266b4 WHIRLPOOL fc73133cbd0aaf9447296425dd22907d3b984a9d8c0631be5155cd887ca44932b5d3651d538783ac10e520c6b43a077fb045ea720d95855f04b4ba47cb9076a2
2375 -DIST binutils-2.20.1.tar.bz2 17591527 SHA256 71d37c96451333c5c0b84b170169fdcb138bbb27397dc06281905d9717c8ed64 SHA512 b05c93eb9ba8db344fbdee3c5b36ed5a7ad1366f948d41af43286715c7345a2477e0808d25f7bbf81b54ab06c4d46356d44318d56efcdbef42236d1a694411fc WHIRLPOOL 6166462fce695914a32c3295dadb6782716bb6693ee0a2a5543cc925e4967f5bccf38a5a2c244703bb9990acd229d0588a9463c62cec042f24107854c631518e
2376 -DIST binutils-2.21.1-patches-1.4.tar.bz2 20033 SHA256 51e50584a7364549649cc6c59f4a678b07595979811e8e2150264318c3b4493d SHA512 66b71031a782f9708dc5f8ac9171b2be0bbca102b44705155b292329e0664cc71b649f4d8fa50ad0d9123436c03b994da5a0fddc32e43bf2d50e74c68609e508 WHIRLPOOL 2bdc11027b3dcd27c766b4ca5f578a32838d15b3370b4093f1c30887200b82bfaa732df9af23f545d58bbbf373c9967a31fcbb19b3f9b855f0923143e77fa9f5
2377 -DIST binutils-2.21.1.tar.bz2 18997755 SHA256 cdecfa69f02aa7b05fbcdf678e33137151f361313b2f3e48aba925f64eabf654 SHA512 3f550f6833a41e9b17d1f515eea0de8dc14aefb7dd69c65b821aa1336aea4c3f55b4457a1781ab7b32bda049798fef3cf989148e4acb0fca8baca5af74766f31 WHIRLPOOL 1025ac3714f2406ee5afcda3f7a23f788a35e354b928f4b11c7448150a5613f793c2aa471f4612c5015e89d5abbb61522a7a0265286fcf2788fbf1194fb60201
2378 -DIST binutils-2.22-patches-1.5.tar.bz2 37350 SHA256 51cad7b3c2d18db0f7d2e4a3e46e37f00eb720cfa663ea396e16dcfbba12a07c SHA512 407490be54fec09faf26e8062cf28d2ea2d58df669642e7582fe51776726f00af8c18194a17438e18068c91b7634fca2d0f33c7231e847ba5141f901d9743ad7 WHIRLPOOL d62be803705d4e526324719fae69c06c303cc2500aeac04cb711eff383a2732ec3f47f9d91deef954c60877e08fed2c2659636dad07086ceaf12c8b899b075f1
2379 -DIST binutils-2.22.tar.bz2 19973532 SHA256 6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9 SHA512 ffe8ef263ef99183e8cc823fe8487ff7d0f7bf9a8efd2853b5f4636aca0023850d13de4eac7d77a5f69413d8a50e6f95bb14569be53df86c0bce38034525ab74 WHIRLPOOL 8bea2f2082600587649a5f9fffada9c6cf14f42ebddd1e6a4b4d7be25446d7ad76e1335cf8cefe30c812ced408c9dacb55d0033e4b0eaff83efbbfb5ea5f60dc
2380 -DIST binutils-2.23-patches-1.1.tar.xz 13424 SHA256 ef6cbc34251c655d7fb0126c11a0211eb825438fd27de9aaf9bad0d2f264b8a9 SHA512 ccf44284da4e29803beab5630d63588f76f94b53c29a17c7a2a989a9ae7ed4c3083348baa8546700dbdf5da40787443d7019dc5ab613e5f46545e83523ff37fd WHIRLPOOL 3761e5a312dd105fc2cfd873416e3597e801305a18870c618deeb723af7cf65c3dc2102a83412b1191fd2169cde4fee29501e50a282edd267103af460eeb5e43
2381 -DIST binutils-2.23.51.0.3-patches-1.1.tar.xz 13484 SHA256 f81f93324d7afdbd33496a17ab5a362515b21bb4b3ca8740fce6c299df56521c SHA512 8d1c5dbc0ab990ebc1c24abfc33b9e77cd3d257d68f87411a8ae8a2d9063b03e9b24ef8a99dc5cc9dc52b57a38be78ff4c9900d1f79602988da781bd0efbf86f WHIRLPOOL 975f8926ae2a79b5c51791035bcebe354ee51dda27337549e0445525054b151da6c312d071b4d2fdef662b42b609c6879b4917cb7ce7a1ef67d900ddb6193722
2382 -DIST binutils-2.23.51.0.3.tar.xz 13831120 SHA256 2162905dabf191a2a803eab8d31e7be52d96d6ccd1e0ce42e25d82c6be918cd0 SHA512 bd79d662471bb1602a85933ce7560f6a0cfbc854feabb1353c7f4a8642eace6fdf7d1d24c6e75babe5a7fbe932fa3077f0d417263d3a1d0e5692dd7b2cca2dd1 WHIRLPOOL 624cdac6856a67f8bec3bb95bf29d619b5dcbe7da70cbbf557cf19057cd0776c5b4d8eed6f1b64db3b7e30d24791b141e87ed4a8b1d241b2d94ceaddb55c56da
2383 -DIST binutils-2.23.51.0.5-patches-1.0.tar.xz 10928 SHA256 9889366e64fbf04bbc6a2962bc2b6f200c4ad95c009706b9ea3b9745886ca35b SHA512 f9ad9c35af37b95c3576d4c2b5a12a2798ba6da0d6ef25715a5b7bfa421905ce78ad056c2ff36cd36e1ecc143dc0df99238687405216c0acf6ba96a0d17c4391 WHIRLPOOL 89c81ebf496c902f3e882dacc0af2afb9580f2f84335ee1ca78e4196fea2ab1f84a815842d0445d2ea475f5a93bd19d029a8dedaf17b2dcca83ff8abcbfac338
2384 -DIST binutils-2.23.51.0.5.tar.xz 13883528 SHA256 db3cab6fa59b4dc14760066db2fa8db49531494806e243601c7f433f1fc366ed SHA512 c1d35761d09f4d6a0844198dba0cafa40091bc7cc100bb154bf780cc38e03bdcb83ab33279b4504c22c5b77153548cc5a60fcda6158cded80da6aa330f51404c WHIRLPOOL 9d1b876bfe1ddb23e279b4ba86ee74ebcdd38bee712fe547b6a4966914b22f5dbb0653d35b7ae54fcf37d6cf54a0bbecda0da909dc92b93d443126b4e8e6b256
2385 -DIST binutils-2.23.51.0.6-patches-1.0.tar.xz 10720 SHA256 cb4f6f67a69e19ab53591ff17ff0132e5367eff8630524183b043f7f98c604dd SHA512 de39edf6e69768877ac431fb663a00015d7603a4f40f9d11e0735475438c79662bf9bb7c3ae237d02d5cb8b7ee6dd63f24752e503162371027a088a5b79ce159 WHIRLPOOL 58a68d8de273fcad786829ee18b56e61e5d010051aaddfee310ac0a201d858147863d5762ad51332943d963df68509676a8cfedc2f769b905a017a990df59904
2386 -DIST binutils-2.23.51.0.6.tar.xz 13907008 SHA256 0a2468ef7f99bf8162ebe5317dc3366f3555e9a453d0974fb96469d1122b0ce0 SHA512 8f3eed935dbc0e6fde55a420833835db8c4bfdd43047046da0bc30b2faee83701ddd78f24ac41ef236641f38465e282ec65d18e93da3f848034b2d5b335150af WHIRLPOOL 1c0c7985140c81b6b3d51048d8b94fedd710d995ecd0ed13daaa17f6a14658c812c683d45440040d215fce948e75df41a5f46e73ca0e7410fa92a663d7ddca4e
2387 -DIST binutils-2.23.51.0.8-patches-1.0.tar.xz 10712 SHA256 1a0bd1500c87089e6609e97697912bd00fd44ac35fd9711c9c7b4267ede34cc0 SHA512 47f22c94fc387409c04d826db7592e1bddb991a990af108e21126ba5dc117740d1e87fa2178f51cc5c73c1b3f0fef55eda36308a722d1d9673a5ba639115995e WHIRLPOOL 2efba9385d71c07055be90c9aedfcd0180d47197a08563df1ba6abd5802852624ec4e6837c86e8f809ce485f90d2644038b35c0d6a366e4712038eebc117e3a9
2388 -DIST binutils-2.23.51.0.8.tar.xz 13922836 SHA256 e345d7b7a14eb903074311a986d2a93af849b83799e3a5aa13308615a01eaf1e SHA512 8124974114398cc1fc88eb5681bfea8369371a2636da5d0ed7993cba43462edea9cc3ddfed30bf7bf7d13c2981cfece39da30a019093a5f9d7935b5b57373aad WHIRLPOOL adfe57a30fd72544a8e7ece1cf6a40f19ff08d237964c40591a3f50eb81acbb687b53d94ab3f491807cb599a691575ca77c3171fc67b9effc959d04490ca26e3
2389 -DIST binutils-2.23.tar.bz2 21402046 SHA256 5f975e744a0fd4a4ab0b28dd6d0921685b3279207823226df92429389dbee452 SHA512 079939e1000e358e830c4563543f2a00ae127ef6e18306eda55a775254509951114d24647cf2c3fef49ac4409c8e9895085efb85cc71566a5b4fe0106b8375bd WHIRLPOOL 3713090b5f0d2b6fec14664ce862e0c7c7eeb0bf37bde19e4d07a48bafb61d388929e6ae993a6954aa6432fea9484b4646bc2938df308bcbf6142a0d5dfc1f69
2390 -DIST binutils-2.24-patches-1.4.tar.xz 17488 SHA256 f018f140a52cddb1e4619b5caf4b4a37a27dfb29e8bf29ea5161ab13b33eed13 SHA512 dfd7c38cd978b7d6627579c338bf67641c799ce39936e3475dca3ecf5bade417e3f090253a2326582c64d5743a24f9078794f44e8fd41b6af728f1f375c91d3b WHIRLPOOL d6b414d5e5607fd8b2d0f52b508763110448cfbdcc08be6d7c1412043797bde8ed5fbd9a5ea4c141b7394b2cae0ac2ef24827f67813231129a507f49cbc40245
2391 -DIST binutils-2.24.tar.bz2 22716802 SHA256 e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 SHA512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 WHIRLPOOL 619634dfdc73b8f6e9933b4642f5f9faf147c388a6d39283cd7639d83f3d7a601981cf49a787c43c17a942c563f24dc8dcc682138b5d3102a5650e1b9d15bd50
2392 -EBUILD binutils-2.20.1-r1.ebuild 845 SHA256 24d8b288c7150859eedabf4057ce0fa04e0e99e74846765ad8a6aaed99b1f426 SHA512 ec132ab4e572516be09782402ccbf3c186d58df06aaa815c5e95b8f1ea5dcefefd161965746357dfdd7a8f440be5f6dc59464c43d8f1245582ec7fcfaf3128fc WHIRLPOOL 1a32947193ad2fbab320a9b8f87a10279c8ea3c0c9aa59fbb05023832c7bdfe5e46dbd3eee01ce1b9b89027eeb42acc5b05cd39fea1e8eae6f87b8c1dd3b60aa
2393 -EBUILD binutils-2.21.1-r1.ebuild 846 SHA256 6fdeaebd7d0a0e82eab0c3a50a2c10efe1346e15da823b1e610e886fde763031 SHA512 1da92588b09122337af6c979b3aa22ce0172d481fe4c53aacc35aa36280cffea3deaa4f209b542b58fa1d47c722169281682a8d01350aad6764865ca2185b9d6 WHIRLPOOL eedd63b0a18269cb51e34ecadeff2b471bec7a8ce74e9359325762ea9df946f557fdab7867b69faee837082a439c66d01ef5795c5d7b970801e7051c6edbc965
2394 -EBUILD binutils-2.22-r1.ebuild 1923 SHA256 f5f11b300441bd0a800cf02f34bd8b827621fb524d23e942cbf8240dede2c736 SHA512 6562fb4e0004732061a776ca76087471f5790490e1ac9f720737b68ffcfdcf8cff67bde6acfba365768235ac73cc6091893e238651b74faf59b5bd14e2d0c45c WHIRLPOOL af8e96c7551541b350c62dc5505e6ca7b351ffc343b14742753c773a6f2639fda1f23daf820d05b174a4b3980b7b836146ad3bbc40e563b6b9be87f440a8193d
2395 -EBUILD binutils-2.23.51.0.3.ebuild 1926 SHA256 d0ced61c78ac4b32e1d2ba5d4175ede6ffe1e34c13fa51db0ef8cc874f680a56 SHA512 3079a79ad13ae4037e9cd58e2d2fdbb0342723184dd37312170fbe5b64f32f905d72c6708cc09fa3b6555b255a8f02aace3f34c098f048b6afaa4b4c4ee0810a WHIRLPOOL 3675a219ba9d0cbca95c8532a1ed457a3f05094ec1c7dee121acfec028afee26c64f704997777e40d71e945d8f0668a34c1ac3dfcd7c98d3d9beed7eaa14cc17
2396 -EBUILD binutils-2.23.51.0.5.ebuild 1926 SHA256 5acbc0b45224ef8cadfa29ab59dbf656db8a68c5399b5b60bcd392144b1c1b6d SHA512 d16696d16e8fcb39f66daf6a7b6a5b1fc9361e75a5a3d432c0ba828f29d6f12230124b6d9d8cd175c9530a3ff8d59998c3e74080fe5fa39f8a3976ac9eafd0bf WHIRLPOOL adb0754bb3cb1a52137905c32149d281fab69a2e860ccbbbd610b0647b319777bdf6c6ff1a45d6123d41787d25c0d7310e3702f950aea470aaa45234ef974b2f
2397 -EBUILD binutils-2.23.51.0.6.ebuild 1926 SHA256 dc592c519f9b3eae5587db82029c61f2377eff12680362d4c611895a21e259bd SHA512 2a3c053484c4edee75aeec65310088046ca53e978a23705a432db57f08ee2f064af7d71548f16dbb38c053586881b1d2d39497a892a31d7f7ab8e49b548108c0 WHIRLPOOL f1ee641ed30639264904d3fc0db5bca3ec9efb5c890eabff79fd400c92558ed6b5a80898bc6b349d110ac7290f39dcd23c8a7fc02533ebfe79896cb9b2a91636
2398 -EBUILD binutils-2.23.51.0.8.ebuild 1926 SHA256 108ad27215ebb8602193ead950a3962c724f1b24e5e14e05277b96a189d63876 SHA512 7a1b7840aa428ee2e52446c8082c16db07f61b7434ba9562d48e1b9e68e3bf449c0a54c31d250ece8fd371f09bb694162a6ed5bdf9f6c8539710c5295601ad20 WHIRLPOOL ed01c0234f6da5f75d700184ded119106d66462c5327b48b9d7ed6d0dd74aec70f866dbc043aaf6bc5bc2d9f98cf313eb11a7df96ae28f7f1ec6dccb9ba3b645
2399 -EBUILD binutils-2.23.ebuild 2145 SHA256 e5778981837d3b6b987ca26c9bf9d0f1d71b408b3ca444e7762c46c38e46885e SHA512 9e45acb3abcfd4ed126a24aacc500522f6c2ea7915c59f993e66db8b66fef96062fb97127fb22a044b424486e4a75228d16507c4eb599105c532b9d47eef7f96 WHIRLPOOL df268e60b3e2a9642faabaa16e92adda81064122a3d009087e7d260ecdf92403a189fee1ac4f749c91b542bb0313432e2cbd50f28c211532d20ec416e5e04633
2400 -EBUILD binutils-2.24-r3.ebuild 536 SHA256 dcc2613071a77c2a3f7ff524bf2065919eeeee9ed5b37254e99a00095bb8f410 SHA512 763e33009ffd146d78deb511805e5458131aa512612ef12a5862172f8e21db1308b8d335a3648fe563fdc41db826c2f3e3daf2bac4f100072bebac203c501378 WHIRLPOOL e74e702d610869acc188ea872c3afc5b66c8f6cfbc3da3fdb55ffbd7d709f0ac0818a4bc0b868a6a45da18381485549be1ed3fdc20e0211310e445d7782ca313
2401 -MISC ChangeLog 79130 SHA256 eec9a2c9c8eaed424daddcbe78677d8512ebe8072ab5828d6c329cbaf4c74557 SHA512 c0b47a76155c56dcc25863cc8174a379470e1d2620602b34dd452c1b56b9b818af545bed30cabc8e8f4d68f019aa5c87bd10081784bb5c4c9cb6e2adaf1a9f44 WHIRLPOOL fbf0a664cd49d9faa29006768342890ff4906580aedbb4ebfeacba4dd32754badab6c941700f078a8bc020456c985dc255eeb26a9144d7f72a30bdd7b64398a9
2402 -MISC metadata.xml 386 SHA256 58db91727c014c22db0fde315c25cb22c59dc5c15af5d30ee4c01a248500b67c SHA512 f5c6d289f0018d0eeb4ebb2fbbfda7c08aa70a98771f1c0795838137a0e3b848fc9e2b2355cbc7367a72dc00dd5e0a946c0eb5349a86eb3796af43918961733a WHIRLPOOL 92b3371b27092dbaed212837f544b059d5b0b2c547ef8c965836ac1dab1cdee198bb6ab63ab495eccdd1be1c1f5ce9e93624722a9ffd433a7615be202134336a
2403
2404 diff --git a/sys-devel/binutils/binutils-2.20.1-r1.ebuild b/sys-devel/binutils/binutils-2.20.1-r1.ebuild
2405 deleted file mode 100644
2406 index 7511e9c..0000000
2407 --- a/sys-devel/binutils/binutils-2.20.1-r1.ebuild
2408 +++ /dev/null
2409 @@ -1,30 +0,0 @@
2410 -# Copyright 1999-2012 Gentoo Foundation
2411 -# Distributed under the terms of the GNU General Public License v2
2412 -# $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 $
2413 -
2414 -PATCHVER="1.2"
2415 -ELF2FLT_VER=""
2416 -inherit toolchain-binutils
2417 -
2418 -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"
2419 -
2420 -src_compile() {
2421 - if has noinfo "${FEATURES}" \
2422 - || ! type -p makeinfo >/dev/null
2423 - then
2424 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2425 - export EXTRA_EMAKE="MAKEINFO=true"
2426 - fi
2427 -
2428 - toolchain-binutils_src_compile
2429 -}
2430 -
2431 -src_install() {
2432 - toolchain-binutils_src_install
2433 -
2434 - case "${CTARGET}" in
2435 - *-hpux*)
2436 - ln -s /usr/ccs/bin/ld "${ED}${BINPATH}"/ld || die "Cannot create ld symlink"
2437 - ;;
2438 - esac
2439 -}
2440
2441 diff --git a/sys-devel/binutils/binutils-2.21.1-r1.ebuild b/sys-devel/binutils/binutils-2.21.1-r1.ebuild
2442 deleted file mode 100644
2443 index ca983b8..0000000
2444 --- a/sys-devel/binutils/binutils-2.21.1-r1.ebuild
2445 +++ /dev/null
2446 @@ -1,30 +0,0 @@
2447 -# Copyright 1999-2011 Gentoo Foundation
2448 -# Distributed under the terms of the GNU General Public License v2
2449 -# $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 $
2450 -
2451 -PATCHVER="1.4"
2452 -ELF2FLT_VER=""
2453 -inherit toolchain-binutils
2454 -
2455 -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"
2456 -
2457 -src_compile() {
2458 - if has noinfo "${FEATURES}" \
2459 - || ! type -p makeinfo >/dev/null
2460 - then
2461 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2462 - export EXTRA_EMAKE="MAKEINFO=true"
2463 - fi
2464 -
2465 - toolchain-binutils_src_compile
2466 -}
2467 -
2468 -src_install() {
2469 - toolchain-binutils_src_install
2470 -
2471 - case "${CTARGET}" in
2472 - *-hpux*)
2473 - ln -s /usr/ccs/bin/ld "${ED}${BINPATH}"/ld || die "Cannot create ld symlink"
2474 - ;;
2475 - esac
2476 -}
2477
2478 diff --git a/sys-devel/binutils/binutils-2.22-r1.ebuild b/sys-devel/binutils/binutils-2.22-r1.ebuild
2479 deleted file mode 100644
2480 index d38dc68..0000000
2481 --- a/sys-devel/binutils/binutils-2.22-r1.ebuild
2482 +++ /dev/null
2483 @@ -1,60 +0,0 @@
2484 -# Copyright 1999-2012 Gentoo Foundation
2485 -# Distributed under the terms of the GNU General Public License v2
2486 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.22-r1.ebuild,v 1.16 2012/09/29 16:06:32 armin76 Exp $
2487 -
2488 -PATCHVER="1.5"
2489 -ELF2FLT_VER=""
2490 -inherit toolchain-binutils
2491 -
2492 -KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2493 -
2494 -src_unpack() {
2495 - toolchain-binutils_src_unpack
2496 - cd "${S}"
2497 - [[ $SYMLINK_LIB == yes ]] &&
2498 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2499 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2500 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2501 -}
2502 -
2503 -src_compile() {
2504 - if has noinfo "${FEATURES}" \
2505 - || ! type -p makeinfo >/dev/null
2506 - then
2507 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2508 - export EXTRA_EMAKE="MAKEINFO=true"
2509 - fi
2510 -
2511 - case "${CTARGET}" in
2512 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2513 - esac
2514 -
2515 - toolchain-binutils_src_compile
2516 -}
2517 -
2518 -src_install() {
2519 - toolchain-binutils_src_install
2520 -
2521 - case "${CTARGET}" in
2522 - *-interix*)
2523 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2524 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2525 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2526 - > "${ED}${BINPATH}"/ld \
2527 - || die "Cannot create ld wrapper"
2528 - chmod a+x "${ED}${BINPATH}"/ld
2529 -
2530 - dodir "${LIBPATH}"/ldscripts
2531 -
2532 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2533 - # additionally insert the prefix as absolute top search dir...
2534 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2535 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2536 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2537 - < $x \
2538 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2539 - || die "Cannot occupy ldscripts"
2540 - done
2541 - ;;
2542 - esac
2543 -}
2544
2545 diff --git a/sys-devel/binutils/binutils-2.23.51.0.3.ebuild b/sys-devel/binutils/binutils-2.23.51.0.3.ebuild
2546 deleted file mode 100644
2547 index 058569f..0000000
2548 --- a/sys-devel/binutils/binutils-2.23.51.0.3.ebuild
2549 +++ /dev/null
2550 @@ -1,60 +0,0 @@
2551 -# Copyright 1999-2012 Gentoo Foundation
2552 -# Distributed under the terms of the GNU General Public License v2
2553 -# $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 $
2554 -
2555 -PATCHVER="1.1"
2556 -ELF2FLT_VER=""
2557 -inherit toolchain-binutils
2558 -
2559 -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2560 -
2561 -src_unpack() {
2562 - toolchain-binutils_src_unpack
2563 - cd "${S}"
2564 - [[ $SYMLINK_LIB == yes ]] &&
2565 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2566 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2567 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2568 -}
2569 -
2570 -src_compile() {
2571 - if has noinfo "${FEATURES}" \
2572 - || ! type -p makeinfo >/dev/null
2573 - then
2574 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2575 - export EXTRA_EMAKE="MAKEINFO=true"
2576 - fi
2577 -
2578 - case "${CTARGET}" in
2579 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2580 - esac
2581 -
2582 - toolchain-binutils_src_compile
2583 -}
2584 -
2585 -src_install() {
2586 - toolchain-binutils_src_install
2587 -
2588 - case "${CTARGET}" in
2589 - *-interix*)
2590 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2591 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2592 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2593 - > "${ED}${BINPATH}"/ld \
2594 - || die "Cannot create ld wrapper"
2595 - chmod a+x "${ED}${BINPATH}"/ld
2596 -
2597 - dodir "${LIBPATH}"/ldscripts
2598 -
2599 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2600 - # additionally insert the prefix as absolute top search dir...
2601 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2602 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2603 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2604 - < $x \
2605 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2606 - || die "Cannot occupy ldscripts"
2607 - done
2608 - ;;
2609 - esac
2610 -}
2611
2612 diff --git a/sys-devel/binutils/binutils-2.23.51.0.5.ebuild b/sys-devel/binutils/binutils-2.23.51.0.5.ebuild
2613 deleted file mode 100644
2614 index 819175a..0000000
2615 --- a/sys-devel/binutils/binutils-2.23.51.0.5.ebuild
2616 +++ /dev/null
2617 @@ -1,60 +0,0 @@
2618 -# Copyright 1999-2012 Gentoo Foundation
2619 -# Distributed under the terms of the GNU General Public License v2
2620 -# $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 $
2621 -
2622 -PATCHVER="1.0"
2623 -ELF2FLT_VER=""
2624 -inherit toolchain-binutils
2625 -
2626 -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2627 -
2628 -src_unpack() {
2629 - toolchain-binutils_src_unpack
2630 - cd "${S}"
2631 - [[ $SYMLINK_LIB == yes ]] &&
2632 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2633 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2634 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2635 -}
2636 -
2637 -src_compile() {
2638 - if has noinfo "${FEATURES}" \
2639 - || ! type -p makeinfo >/dev/null
2640 - then
2641 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2642 - export EXTRA_EMAKE="MAKEINFO=true"
2643 - fi
2644 -
2645 - case "${CTARGET}" in
2646 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2647 - esac
2648 -
2649 - toolchain-binutils_src_compile
2650 -}
2651 -
2652 -src_install() {
2653 - toolchain-binutils_src_install
2654 -
2655 - case "${CTARGET}" in
2656 - *-interix*)
2657 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2658 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2659 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2660 - > "${ED}${BINPATH}"/ld \
2661 - || die "Cannot create ld wrapper"
2662 - chmod a+x "${ED}${BINPATH}"/ld
2663 -
2664 - dodir "${LIBPATH}"/ldscripts
2665 -
2666 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2667 - # additionally insert the prefix as absolute top search dir...
2668 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2669 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2670 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2671 - < $x \
2672 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2673 - || die "Cannot occupy ldscripts"
2674 - done
2675 - ;;
2676 - esac
2677 -}
2678
2679 diff --git a/sys-devel/binutils/binutils-2.23.51.0.6.ebuild b/sys-devel/binutils/binutils-2.23.51.0.6.ebuild
2680 deleted file mode 100644
2681 index a108e4e..0000000
2682 --- a/sys-devel/binutils/binutils-2.23.51.0.6.ebuild
2683 +++ /dev/null
2684 @@ -1,60 +0,0 @@
2685 -# Copyright 1999-2012 Gentoo Foundation
2686 -# Distributed under the terms of the GNU General Public License v2
2687 -# $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 $
2688 -
2689 -PATCHVER="1.0"
2690 -ELF2FLT_VER=""
2691 -inherit toolchain-binutils
2692 -
2693 -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2694 -
2695 -src_unpack() {
2696 - toolchain-binutils_src_unpack
2697 - cd "${S}"
2698 - [[ $SYMLINK_LIB == yes ]] &&
2699 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2700 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2701 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2702 -}
2703 -
2704 -src_compile() {
2705 - if has noinfo "${FEATURES}" \
2706 - || ! type -p makeinfo >/dev/null
2707 - then
2708 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2709 - export EXTRA_EMAKE="MAKEINFO=true"
2710 - fi
2711 -
2712 - case "${CTARGET}" in
2713 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2714 - esac
2715 -
2716 - toolchain-binutils_src_compile
2717 -}
2718 -
2719 -src_install() {
2720 - toolchain-binutils_src_install
2721 -
2722 - case "${CTARGET}" in
2723 - *-interix*)
2724 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2725 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2726 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2727 - > "${ED}${BINPATH}"/ld \
2728 - || die "Cannot create ld wrapper"
2729 - chmod a+x "${ED}${BINPATH}"/ld
2730 -
2731 - dodir "${LIBPATH}"/ldscripts
2732 -
2733 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2734 - # additionally insert the prefix as absolute top search dir...
2735 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2736 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2737 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2738 - < $x \
2739 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2740 - || die "Cannot occupy ldscripts"
2741 - done
2742 - ;;
2743 - esac
2744 -}
2745
2746 diff --git a/sys-devel/binutils/binutils-2.23.51.0.8.ebuild b/sys-devel/binutils/binutils-2.23.51.0.8.ebuild
2747 deleted file mode 100644
2748 index b31c91d..0000000
2749 --- a/sys-devel/binutils/binutils-2.23.51.0.8.ebuild
2750 +++ /dev/null
2751 @@ -1,60 +0,0 @@
2752 -# Copyright 1999-2012 Gentoo Foundation
2753 -# Distributed under the terms of the GNU General Public License v2
2754 -# $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 $
2755 -
2756 -PATCHVER="1.0"
2757 -ELF2FLT_VER=""
2758 -inherit toolchain-binutils
2759 -
2760 -#KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2761 -
2762 -src_unpack() {
2763 - toolchain-binutils_src_unpack
2764 - cd "${S}"
2765 - [[ $SYMLINK_LIB == yes ]] &&
2766 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2767 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2768 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2769 -}
2770 -
2771 -src_compile() {
2772 - if has noinfo "${FEATURES}" \
2773 - || ! type -p makeinfo >/dev/null
2774 - then
2775 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2776 - export EXTRA_EMAKE="MAKEINFO=true"
2777 - fi
2778 -
2779 - case "${CTARGET}" in
2780 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2781 - esac
2782 -
2783 - toolchain-binutils_src_compile
2784 -}
2785 -
2786 -src_install() {
2787 - toolchain-binutils_src_install
2788 -
2789 - case "${CTARGET}" in
2790 - *-interix*)
2791 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2792 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2793 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2794 - > "${ED}${BINPATH}"/ld \
2795 - || die "Cannot create ld wrapper"
2796 - chmod a+x "${ED}${BINPATH}"/ld
2797 -
2798 - dodir "${LIBPATH}"/ldscripts
2799 -
2800 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2801 - # additionally insert the prefix as absolute top search dir...
2802 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2803 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2804 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2805 - < $x \
2806 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2807 - || die "Cannot occupy ldscripts"
2808 - done
2809 - ;;
2810 - esac
2811 -}
2812
2813 diff --git a/sys-devel/binutils/binutils-2.23.ebuild b/sys-devel/binutils/binutils-2.23.ebuild
2814 deleted file mode 100644
2815 index 2fb8674..0000000
2816 --- a/sys-devel/binutils/binutils-2.23.ebuild
2817 +++ /dev/null
2818 @@ -1,65 +0,0 @@
2819 -# Copyright 1999-2012 Gentoo Foundation
2820 -# Distributed under the terms of the GNU General Public License v2
2821 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.23.ebuild,v 1.2 2012/11/02 22:44:29 vapier Exp $
2822 -
2823 -PATCHVER="1.1"
2824 -ELF2FLT_VER=""
2825 -inherit toolchain-binutils
2826 -
2827 -KEYWORDS="~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2828 -
2829 -src_unpack() {
2830 - toolchain-binutils_src_unpack
2831 - cd "${S}"
2832 - [[ $SYMLINK_LIB == yes ]] &&
2833 - epatch "${FILESDIR}"/${PN}-2.20.51.0.1-linux-x86-on-amd64.patch
2834 - epatch "${FILESDIR}"/${PN}-2.22-mint.patch
2835 - epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
2836 - epatch "${FILESDIR}"/${PN}-2.23-mbstate_t.patch
2837 - epatch "${FILESDIR}"/${PN}-2.23-ar-ranlib-truncate.patch
2838 - epatch "${FILESDIR}"/${PN}-2.23-runtime-sysroot.patch
2839 -}
2840 -
2841 -src_compile() {
2842 - if has noinfo "${FEATURES}" \
2843 - || ! type -p makeinfo >/dev/null
2844 - then
2845 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
2846 - export EXTRA_EMAKE="MAKEINFO=true"
2847 - fi
2848 -
2849 - case "${CTARGET}" in
2850 - *-interix*) EXTRA_ECONF="${EXTRA_ECONF} --without-gnu-ld --without-gnu-as" ;;
2851 - esac
2852 -
2853 - is_cross || EXTRA_ECONF+=" $(use_enable !rap runtime-sysroot)"
2854 -
2855 - toolchain-binutils_src_compile
2856 -}
2857 -
2858 -src_install() {
2859 - toolchain-binutils_src_install
2860 -
2861 - case "${CTARGET}" in
2862 - *-interix*)
2863 - ln -s /opt/gcc.3.3/bin/as "${ED}${BINPATH}"/as || die "Cannot create as symlink"
2864 - sed -e "s,@SCRIPTDIR@,${EPREFIX}${LIBPATH}/ldscripts," \
2865 - < "${FILESDIR}"/2.21-ldwrap-interix.sh \
2866 - > "${ED}${BINPATH}"/ld \
2867 - || die "Cannot create ld wrapper"
2868 - chmod a+x "${ED}${BINPATH}"/ld
2869 -
2870 - dodir "${LIBPATH}"/ldscripts
2871 -
2872 - # yes, this is "i586-pc-interix3" for SFU 3.5, SUA 5.2 and SUA 6.0
2873 - # additionally insert the prefix as absolute top search dir...
2874 - for x in /opt/gcc.3.3/i586-pc-interix3/lib/ldscripts/i386pe_posix.*; do
2875 - sed -e 's, SEARCH_DIR("/usr/local/lib"); , SEARCH_DIR("/usr/lib/x86"); ,' \
2876 - -e "s,^\(SEARCH_DIR(\),SEARCH_DIR(\"${EPREFIX}/lib\"); SEARCH_DIR(\"${EPREFIX}/usr/lib\"); \1," \
2877 - < $x \
2878 - > "${ED}${LIBPATH}"/ldscripts/${x##*/} \
2879 - || die "Cannot occupy ldscripts"
2880 - done
2881 - ;;
2882 - esac
2883 -}
2884
2885 diff --git a/sys-devel/binutils/binutils-2.24-r3.ebuild b/sys-devel/binutils/binutils-2.24-r3.ebuild
2886 deleted file mode 100644
2887 index 663eb8c..0000000
2888 --- a/sys-devel/binutils/binutils-2.24-r3.ebuild
2889 +++ /dev/null
2890 @@ -1,22 +0,0 @@
2891 -# Copyright 1999-2014 Gentoo Foundation
2892 -# Distributed under the terms of the GNU General Public License v2
2893 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.24-r3.ebuild,v 1.8 2014/11/04 09:26:08 ago Exp $
2894 -
2895 -EAPI=4
2896 -
2897 -PATCHVER="1.4"
2898 -ELF2FLT_VER=""
2899 -inherit toolchain-binutils
2900 -
2901 -KEYWORDS="~amd64 ~arm ~x86"
2902 -
2903 -src_prepare() {
2904 - epatch "${FILESDIR}"/${P}-runtime-sysroot.patch
2905 - toolchain-binutils_src_prepare
2906 -}
2907 -
2908 -src_configure() {
2909 - is_cross || EXTRA_ECONF+=" $(use_enable !rap runtime-sysroot)"
2910 - toolchain-binutils_src_configure
2911 -}
2912 -
2913
2914 diff --git a/sys-devel/binutils/files/2.18-bfd-alloca.patch b/sys-devel/binutils/files/2.18-bfd-alloca.patch
2915 deleted file mode 100644
2916 index 32d8b59..0000000
2917 --- a/sys-devel/binutils/files/2.18-bfd-alloca.patch
2918 +++ /dev/null
2919 @@ -1,130 +0,0 @@
2920 -bfd needs to declare alloca differently, see
2921 -http://sourceware.org/bugzilla/show_bug.cgi?id=5146
2922 -
2923 ---- bfd/configure.in.orig 2007-10-09 09:35:46.626269000 +0200
2924 -+++ bfd/configure.in 2007-10-09 09:36:41.264676000 +0200
2925 -@@ -159,7 +159,7 @@
2926 -
2927 - BFD_CC_FOR_BUILD
2928 -
2929 --AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
2930 -+AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h)
2931 - AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
2932 - GCC_HEADER_STDINT(bfd_stdint.h)
2933 - AC_HEADER_TIME
2934 ---- bfd/configure.orig 2007-10-09 09:02:42.293763000 +0200
2935 -+++ bfd/configure 2007-10-09 09:04:01.331465000 +0200
2936 -@@ -12574,7 +12574,7 @@
2937 -
2938 -
2939 -
2940 --for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h
2941 -+for ac_header in alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h
2942 - do
2943 - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2944 - if eval "test \"\${$as_ac_Header+set}\" = set"; then
2945 ---- bfd/config.in.orig 2007-10-09 09:13:33.604874000 +0200
2946 -+++ bfd/config.in 2007-10-09 09:05:29.528913000 +0200
2947 -@@ -4,6 +4,9 @@
2948 - language is requested. */
2949 - #undef ENABLE_NLS
2950 -
2951 -+/* Define to 1 if you have the <alloca.h> header file. */
2952 -+#undef HAVE_ALLOCA_H
2953 -+
2954 - /* Define to 1 if you have the declaration of `basename', and to 0 if you
2955 - don't. */
2956 - #undef HAVE_DECL_BASENAME
2957 ---- bfd/som.c.orig 2007-10-24 09:45:12.000000000 +0200
2958 -+++ bfd/som.c 2007-10-24 09:47:32.000000000 +0200
2959 -@@ -23,7 +23,6 @@
2960 - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2961 - 02110-1301, USA. */
2962 -
2963 --#include "alloca-conf.h"
2964 - #include "sysdep.h"
2965 - #include "bfd.h"
2966 -
2967 -@@ -38,6 +37,35 @@
2968 - #include <machine/reg.h>
2969 - #include <sys/file.h>
2970 -
2971 -+/* This is the code recommended in the autoconf documentation, almost
2972 -+ verbatim. If it doesn't work for you, let me know, and notify
2973 -+ djm@××××××××××.edu as well. */
2974 -+/* Added void* version for STDC case. This is to be compatible with
2975 -+ the declaration in bison.simple, used for m68k operand parsing.
2976 -+ --KR 1995.08.08 */
2977 -+/* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */
2978 -+
2979 -+#ifndef __GNUC__
2980 -+# if HAVE_ALLOCA_H
2981 -+# include <alloca.h>
2982 -+# else
2983 -+# ifdef _AIX
2984 -+/* Indented so that pre-ansi C compilers will ignore it, rather than
2985 -+ choke on it. Some versions of AIX require this to be the first
2986 -+ thing in the file. */
2987 -+ #pragma alloca
2988 -+# else
2989 -+# ifndef alloca /* predefined by HP cc +Olibcalls */
2990 -+# if !defined (__STDC__) && !defined (__hpux)
2991 -+extern char *alloca ();
2992 -+# else
2993 -+extern void *alloca ();
2994 -+# endif /* __STDC__, __hpux */
2995 -+# endif /* alloca */
2996 -+# endif /* _AIX */
2997 -+# endif /* HAVE_ALLOCA_H */
2998 -+#endif /* __GNUC__ */
2999 -+
3000 - static bfd_reloc_status_type hppa_som_reloc
3001 - (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
3002 - static bfd_boolean som_mkobject (bfd *);
3003 ---- bfd/elf64-hppa.c.orig 2007-10-24 09:45:28.000000000 +0200
3004 -+++ bfd/elf64-hppa.c 2007-10-24 09:48:16.000000000 +0200
3005 -@@ -19,7 +19,6 @@
3006 - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
3007 - MA 02110-1301, USA. */
3008 -
3009 --#include "alloca-conf.h"
3010 - #include "sysdep.h"
3011 - #include "bfd.h"
3012 - #include "libbfd.h"
3013 -@@ -27,6 +26,36 @@
3014 - #include "elf/hppa.h"
3015 - #include "libhppa.h"
3016 - #include "elf64-hppa.h"
3017 -+
3018 -+/* This is the code recommended in the autoconf documentation, almost
3019 -+ verbatim. If it doesn't work for you, let me know, and notify
3020 -+ djm@××××××××××.edu as well. */
3021 -+/* Added void* version for STDC case. This is to be compatible with
3022 -+ the declaration in bison.simple, used for m68k operand parsing.
3023 -+ --KR 1995.08.08 */
3024 -+/* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */
3025 -+
3026 -+#ifndef __GNUC__
3027 -+# if HAVE_ALLOCA_H
3028 -+# include <alloca.h>
3029 -+# else
3030 -+# ifdef _AIX
3031 -+/* Indented so that pre-ansi C compilers will ignore it, rather than
3032 -+ choke on it. Some versions of AIX require this to be the first
3033 -+ thing in the file. */
3034 -+ #pragma alloca
3035 -+# else
3036 -+# ifndef alloca /* predefined by HP cc +Olibcalls */
3037 -+# if !defined (__STDC__) && !defined (__hpux)
3038 -+extern char *alloca ();
3039 -+# else
3040 -+extern void *alloca ();
3041 -+# endif /* __STDC__, __hpux */
3042 -+# endif /* alloca */
3043 -+# endif /* _AIX */
3044 -+# endif /* HAVE_ALLOCA_H */
3045 -+#endif /* __GNUC__ */
3046 -+
3047 - #define ARCH_SIZE 64
3048 -
3049 - #define PLT_ENTRY_SIZE 0x10
3050
3051 diff --git a/sys-devel/binutils/files/2.18-bfd-bufsz.patch b/sys-devel/binutils/files/2.18-bfd-bufsz.patch
3052 deleted file mode 100644
3053 index db0a0be..0000000
3054 --- a/sys-devel/binutils/files/2.18-bfd-bufsz.patch
3055 +++ /dev/null
3056 @@ -1,38 +0,0 @@
3057 -'const int' is not const enough for arraysize before C99, see
3058 -http://sourceware.org/bugzilla/show_bug.cgi?id=5160
3059 -
3060 ---- bfd/elflink.c 2007-10-22 22:14:29.000000000 +0200
3061 -+++ bfd/elflink.c 2007-10-22 22:36:09.000000000 +0200
3062 -@@ -7387,19 +7387,18 @@
3063 - size_t locsymcount,
3064 - int signed_p)
3065 - {
3066 -- int len;
3067 -- int symlen;
3068 -+ size_t len;
3069 -+ size_t symlen;
3070 - bfd_vma a;
3071 - bfd_vma b;
3072 -- const int bufsz = 4096;
3073 -- char symbuf [bufsz];
3074 -+ char symbuf [4096];
3075 - const char * symend;
3076 - bfd_boolean symbol_is_section = FALSE;
3077 -
3078 - len = strlen (sym);
3079 - symend = sym + len;
3080 -
3081 -- if (len < 1 || len > bufsz)
3082 -+ if (len < 1 || len > sizeof (symbuf))
3083 - {
3084 - bfd_set_error (bfd_error_invalid_operation);
3085 - return FALSE;
3086 -@@ -7424,7 +7423,7 @@
3087 - symlen = strtol (sym, &sym, 10);
3088 - ++ sym; /* Skip the trailing ':'. */
3089 -
3090 -- if ((symend < sym) || ((symlen + 1) > bufsz))
3091 -+ if ((symend < sym) || ((symlen + 1) > sizeof(symbuf)))
3092 - {
3093 - bfd_set_error (bfd_error_invalid_operation);
3094 - return FALSE;
3095
3096 diff --git a/sys-devel/binutils/files/2.18-bfd-ia64elf.patch b/sys-devel/binutils/files/2.18-bfd-ia64elf.patch
3097 deleted file mode 100644
3098 index 5aa0aee..0000000
3099 --- a/sys-devel/binutils/files/2.18-bfd-ia64elf.patch
3100 +++ /dev/null
3101 @@ -1,96 +0,0 @@
3102 -2007-12-14 H.J. Lu <hongjiu.lu@×××××.com>
3103 -
3104 - PR binutils/5449
3105 - * elf.c (rewrite_elf_program_header): Don't adjust p_paddr if
3106 - p_paddr is set to 0.
3107 - (copy_private_bfd_data): Call rewrite_elf_program_header if
3108 - p_paddr is set to 0.
3109 -
3110 - * elfcode.h (elf_swap_phdr_out): Set p_paddr to 0 if needed.
3111 -
3112 - * elfxx-ia64.c (ELF_MAXPAGESIZE): Don't redefine it for HPUX.
3113 -
3114 ---- binutils-2.18/bfd/elf.c.zero 2007-12-17 10:58:04.761792000 +0100
3115 -+++ binutils-2.18/bfd/elf.c 2007-12-17 11:49:16.381795000 +0100
3116 -@@ -5272,9 +5272,13 @@
3117 - matching_lma = 0;
3118 - suggested_lma = 0;
3119 -
3120 -- for (j = 0, section = ibfd->sections;
3121 -+ for (section = ibfd->sections;
3122 - section != NULL;
3123 - section = section->next)
3124 -+ if (section == first_section)
3125 -+ break;
3126 -+
3127 -+ for (j = 0; section != NULL; section = section->next)
3128 - {
3129 - if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
3130 - {
3131 -@@ -5319,6 +5323,9 @@
3132 - else if (suggested_lma == 0)
3133 - suggested_lma = output_section->lma;
3134 - }
3135 -+
3136 -+ if (j == section_count)
3137 -+ break;
3138 - }
3139 -
3140 - BFD_ASSERT (j == section_count);
3141 -@@ -5335,7 +5342,8 @@
3142 - *pointer_to_map = map;
3143 - pointer_to_map = &map->next;
3144 -
3145 -- if (matching_lma != map->p_paddr
3146 -+ if (!bed->want_p_paddr_set_to_zero
3147 -+ && matching_lma != map->p_paddr
3148 - && !map->includes_filehdr && !map->includes_phdrs)
3149 - /* There is some padding before the first section in the
3150 - segment. So, we must account for that in the output
3151 -@@ -5675,6 +5683,13 @@
3152 - asection *section, *osec;
3153 - unsigned int i, num_segments;
3154 - Elf_Internal_Shdr *this_hdr;
3155 -+ const struct elf_backend_data *bed;
3156 -+
3157 -+ bed = get_elf_backend_data (ibfd);
3158 -+
3159 -+ /* Regenerate the segment map if p_paddr is set to 0. */
3160 -+ if (bed->want_p_paddr_set_to_zero)
3161 -+ goto rewrite;
3162 -
3163 - /* Initialize the segment mark field. */
3164 - for (section = obfd->sections; section != NULL;
3165 ---- binutils-2.18/bfd/elfcode.h.zero 2007-10-30 11:48:34.000000000 -0700
3166 -+++ binutils-2.18/bfd/elfcode.h 2007-12-14 10:49:00.000000000 -0800
3167 -@@ -370,11 +370,17 @@ elf_swap_phdr_out (bfd *abfd,
3168 - const Elf_Internal_Phdr *src,
3169 - Elf_External_Phdr *dst)
3170 - {
3171 -+ const struct elf_backend_data *bed;
3172 -+ bfd_vma p_paddr;
3173 -+
3174 -+ bed = get_elf_backend_data (abfd);
3175 -+ p_paddr = bed->want_p_paddr_set_to_zero ? 0 : src->p_paddr;
3176 -+
3177 - /* note that all elements of dst are *arrays of unsigned char* already... */
3178 - H_PUT_32 (abfd, src->p_type, dst->p_type);
3179 - H_PUT_WORD (abfd, src->p_offset, dst->p_offset);
3180 - H_PUT_WORD (abfd, src->p_vaddr, dst->p_vaddr);
3181 -- H_PUT_WORD (abfd, src->p_paddr, dst->p_paddr);
3182 -+ H_PUT_WORD (abfd, p_paddr, dst->p_paddr);
3183 - H_PUT_WORD (abfd, src->p_filesz, dst->p_filesz);
3184 - H_PUT_WORD (abfd, src->p_memsz, dst->p_memsz);
3185 - H_PUT_32 (abfd, src->p_flags, dst->p_flags);
3186 ---- binutils-2.18/bfd/elfxx-ia64.c.zero 2007-12-14 08:46:35.000000000 -0800
3187 -+++ binutils-2.18/bfd/elfxx-ia64.c 2007-12-14 08:46:35.000000000 -0800
3188 -@@ -5729,8 +5729,6 @@ elfNN_hpux_backend_symbol_processing (bf
3189 - #undef elf_backend_want_p_paddr_set_to_zero
3190 - #define elf_backend_want_p_paddr_set_to_zero 1
3191 -
3192 --#undef ELF_MAXPAGESIZE
3193 --#define ELF_MAXPAGESIZE 0x1000 /* 4K */
3194 - #undef ELF_COMMONPAGESIZE
3195 - #undef ELF_OSABI
3196 - #define ELF_OSABI ELFOSABI_HPUX
3197 -
3198
3199 diff --git a/sys-devel/binutils/files/2.18-gprof-fabs.patch b/sys-devel/binutils/files/2.18-gprof-fabs.patch
3200 deleted file mode 100644
3201 index cf45efd..0000000
3202 --- a/sys-devel/binutils/files/2.18-gprof-fabs.patch
3203 +++ /dev/null
3204 @@ -1,151 +0,0 @@
3205 -gprof needs to check for where to get fabs() from, reported as
3206 -http://sourceware.org/bugzilla/show_bug.cgi?id=5147
3207 -
3208 ---- gprof/configure.in.orig 2007-10-09 09:22:17.289705000 +0200
3209 -+++ gprof/configure.in 2007-10-09 09:24:26.745972000 +0200
3210 -@@ -44,6 +44,9 @@
3211 - [Is the prototype for getopt in <unistd.h> in the expected format?])
3212 - fi
3213 -
3214 -+# Some systems have fabs only in -lm, not in -lc.
3215 -+AC_SEARCH_LIBS(fabs, m)
3216 -+
3217 - AM_BINUTILS_WARNINGS
3218 -
3219 - dnl Required by html and install-html
3220 ---- gprof/configure.orig 2007-10-09 09:22:11.089879000 +0200
3221 -+++ gprof/configure 2007-10-09 09:25:54.513419000 +0200
3222 -@@ -11073,6 +11073,133 @@
3223 -
3224 - fi
3225 -
3226 -+# Some systems have fabs only in -lm, not in -lc.
3227 -+echo "$as_me:$LINENO: checking for library containing fabs" >&5
3228 -+echo $ECHO_N "checking for library containing fabs... $ECHO_C" >&6
3229 -+if test "${ac_cv_search_fabs+set}" = set; then
3230 -+ echo $ECHO_N "(cached) $ECHO_C" >&6
3231 -+else
3232 -+ ac_func_search_save_LIBS=$LIBS
3233 -+ac_cv_search_fabs=no
3234 -+cat >conftest.$ac_ext <<_ACEOF
3235 -+/* confdefs.h. */
3236 -+_ACEOF
3237 -+cat confdefs.h >>conftest.$ac_ext
3238 -+cat >>conftest.$ac_ext <<_ACEOF
3239 -+/* end confdefs.h. */
3240 -+
3241 -+/* Override any gcc2 internal prototype to avoid an error. */
3242 -+#ifdef __cplusplus
3243 -+extern "C"
3244 -+#endif
3245 -+/* We use char because int might match the return type of a gcc2
3246 -+ builtin and then its argument prototype would still apply. */
3247 -+char fabs ();
3248 -+int
3249 -+main ()
3250 -+{
3251 -+fabs ();
3252 -+ ;
3253 -+ return 0;
3254 -+}
3255 -+_ACEOF
3256 -+rm -f conftest.$ac_objext conftest$ac_exeext
3257 -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3258 -+ (eval $ac_link) 2>conftest.er1
3259 -+ ac_status=$?
3260 -+ grep -v '^ *+' conftest.er1 >conftest.err
3261 -+ rm -f conftest.er1
3262 -+ cat conftest.err >&5
3263 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264 -+ (exit $ac_status); } &&
3265 -+ { ac_try='test -z "$ac_c_werror_flag"
3266 -+ || test ! -s conftest.err'
3267 -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3268 -+ (eval $ac_try) 2>&5
3269 -+ ac_status=$?
3270 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3271 -+ (exit $ac_status); }; } &&
3272 -+ { ac_try='test -s conftest$ac_exeext'
3273 -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3274 -+ (eval $ac_try) 2>&5
3275 -+ ac_status=$?
3276 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277 -+ (exit $ac_status); }; }; then
3278 -+ ac_cv_search_fabs="none required"
3279 -+else
3280 -+ echo "$as_me: failed program was:" >&5
3281 -+sed 's/^/| /' conftest.$ac_ext >&5
3282 -+
3283 -+fi
3284 -+rm -f conftest.err conftest.$ac_objext \
3285 -+ conftest$ac_exeext conftest.$ac_ext
3286 -+if test "$ac_cv_search_fabs" = no; then
3287 -+ for ac_lib in m; do
3288 -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3289 -+ cat >conftest.$ac_ext <<_ACEOF
3290 -+/* confdefs.h. */
3291 -+_ACEOF
3292 -+cat confdefs.h >>conftest.$ac_ext
3293 -+cat >>conftest.$ac_ext <<_ACEOF
3294 -+/* end confdefs.h. */
3295 -+
3296 -+/* Override any gcc2 internal prototype to avoid an error. */
3297 -+#ifdef __cplusplus
3298 -+extern "C"
3299 -+#endif
3300 -+/* We use char because int might match the return type of a gcc2
3301 -+ builtin and then its argument prototype would still apply. */
3302 -+char fabs ();
3303 -+int
3304 -+main ()
3305 -+{
3306 -+fabs ();
3307 -+ ;
3308 -+ return 0;
3309 -+}
3310 -+_ACEOF
3311 -+rm -f conftest.$ac_objext conftest$ac_exeext
3312 -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3313 -+ (eval $ac_link) 2>conftest.er1
3314 -+ ac_status=$?
3315 -+ grep -v '^ *+' conftest.er1 >conftest.err
3316 -+ rm -f conftest.er1
3317 -+ cat conftest.err >&5
3318 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3319 -+ (exit $ac_status); } &&
3320 -+ { ac_try='test -z "$ac_c_werror_flag"
3321 -+ || test ! -s conftest.err'
3322 -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3323 -+ (eval $ac_try) 2>&5
3324 -+ ac_status=$?
3325 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3326 -+ (exit $ac_status); }; } &&
3327 -+ { ac_try='test -s conftest$ac_exeext'
3328 -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3329 -+ (eval $ac_try) 2>&5
3330 -+ ac_status=$?
3331 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 -+ (exit $ac_status); }; }; then
3333 -+ ac_cv_search_fabs="-l$ac_lib"
3334 -+break
3335 -+else
3336 -+ echo "$as_me: failed program was:" >&5
3337 -+sed 's/^/| /' conftest.$ac_ext >&5
3338 -+
3339 -+fi
3340 -+rm -f conftest.err conftest.$ac_objext \
3341 -+ conftest$ac_exeext conftest.$ac_ext
3342 -+ done
3343 -+fi
3344 -+LIBS=$ac_func_search_save_LIBS
3345 -+fi
3346 -+echo "$as_me:$LINENO: result: $ac_cv_search_fabs" >&5
3347 -+echo "${ECHO_T}$ac_cv_search_fabs" >&6
3348 -+if test "$ac_cv_search_fabs" != no; then
3349 -+ test "$ac_cv_search_fabs" = "none required" || LIBS="$ac_cv_search_fabs $LIBS"
3350 -+
3351 -+fi
3352 -+
3353 -
3354 - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
3355 -
3356
3357 diff --git a/sys-devel/binutils/files/2.18-ldwrap-interix.sh b/sys-devel/binutils/files/2.18-ldwrap-interix.sh
3358 deleted file mode 100644
3359 index 3c455f8..0000000
3360 --- a/sys-devel/binutils/files/2.18-ldwrap-interix.sh
3361 +++ /dev/null
3362 @@ -1,82 +0,0 @@
3363 -#!/usr/bin/env bash
3364 -
3365 -# Wrapper for interix to avoid /usr/local/*. This is done
3366 -# by using our own linker scripts. These scripts are copied
3367 -# over from interix' gcc 3.3 and modified to not include
3368 -# /usr/local/lib for library search. Still we have to tell
3369 -# ld to use those scripts....
3370 -
3371 -ScriptDir=@SCRIPTDIR@
3372 -ScriptPlatform=i386pe_posix
3373 -ScriptExt=x
3374 -
3375 -Opt_Ur=no
3376 -Opt_r=no
3377 -Opt_N=no
3378 -Opt_n=no
3379 -Opt_shared=no
3380 -Opt_ldl="-ldl"
3381 -Args=
3382 -
3383 -for arg in "$@"; do
3384 - case $arg in
3385 - -Ur) Opt_Ur=yes ;;
3386 - -r) Opt_r=yes ;;
3387 - -N) Opt_N=yes ;;
3388 - -n) Opt_n=yes ;;
3389 - --shared) Opt_shared=yes ;;
3390 - -Bstatic) Opt_ldl= ;;
3391 - esac
3392 -
3393 - # manpages states '-soname', but '-h' seems to work better !?
3394 - OptArg=
3395 -
3396 - case $arg in
3397 - -soname) arg="-h" ;;
3398 - -soname=*) OptArg="${arg#-soname=}"; arg="-h" ;;
3399 - --version-script=*) continue ;; # ignore. this only make troubles!
3400 - -L/usr/lib/x86) continue ;; # fuck off, bloody bastard see below:
3401 - # gcc needs to know about /usr/lib/x86 to find startfiles, but
3402 - # knowing it, makes gcc add this path with -L on the linker
3403 - # command line. since the linker is a binutils-config extwrapper,
3404 - # it removes all -L${EPREFIX}/{lib,usr/lib} from the command line
3405 - # (and the linker itself adds them again later on). This makes us
3406 - # end up with /usr/lib/x86 up front of the prefix, making the linker
3407 - # find _WRONG_ libraries, resulting in damaged binaries and/or failed
3408 - # links.
3409 - esac
3410 -
3411 - Args="$Args '$arg'"
3412 - [ -z "$OptArg" ] || Args="$Args '$OptArg'"
3413 -done
3414 -
3415 -if [ $Opt_Ur = "yes" ]; then
3416 - ScriptExt=xu
3417 -elif [ $Opt_r = "yes" ]; then
3418 - ScriptExt=xr
3419 -elif [ $Opt_N = "yes" ]; then
3420 - ScriptExt=xbn
3421 -elif [ $Opt_n = "yes" ]; then
3422 - ScriptExt=xn
3423 -elif [ $Opt_shared = "yes" ]; then
3424 - ScriptExt=xs
3425 -fi
3426 -
3427 -#
3428 -# WARNING: --script is the last here intentionally, since all library paths given
3429 -# in the file are added dependant to the position where the --script option appears
3430 -# on the command line. this means that if not given last, libraries from /opt/gcc...
3431 -# and /usr/lib will allways get linked in before any library from our prefix (which
3432 -# we *definitly* don't want...
3433 -#
3434 -# There is some nasty redirection trick here, which enables this script to remove
3435 -# dumb assertions from stderr without touching the rest.
3436 -#
3437 -exec 3>&1
3438 -eval "/opt/gcc.3.3/bin/ld $Args $Opt_ldl --script '$ScriptDir/$ScriptPlatform.$ScriptExt'" 2>&1 >&3 3>&- \
3439 - | grep -v -E 'assertion fail .*/cofflink.c:5211' 3>&- 1>&2 2>/dev/null
3440 -_st=${PIPESTATUS[0]}
3441 -exec 3>&-
3442 -
3443 -exit ${_st}
3444 -
3445
3446 diff --git a/sys-devel/binutils/files/2.18-solarisx86_64.patch b/sys-devel/binutils/files/2.18-solarisx86_64.patch
3447 deleted file mode 100644
3448 index a486283..0000000
3449 --- a/sys-devel/binutils/files/2.18-solarisx86_64.patch
3450 +++ /dev/null
3451 @@ -1,32 +0,0 @@
3452 -* add recognition for x86_64-pc-solaris2*
3453 -
3454 ---- bfd/config.bfd
3455 -+++ bfd/config.bfd
3456 -@@ -489,6 +489,13 @@
3457 - targ64_selvecs=bfd_elf64_x86_64_vec
3458 - want64=true
3459 - ;;
3460 -+#ifdef BFD64
3461 -+ x86_64-*-solaris2*)
3462 -+ targ_defvec=bfd_elf32_i386_vec
3463 -+ targ_selvecs="bfd_elf64_x86_64_vec i386coff_vec"
3464 -+ want64=true
3465 -+ ;;
3466 -+#endif
3467 - i[3-7]86-*-kaos*)
3468 - targ_defvec=bfd_elf32_i386_vec
3469 - targ_selvecs=bfd_elf32_i386_vec
3470 ---- ld/configure.tgt
3471 -+++ ld/configure.tgt
3472 -@@ -206,6 +206,11 @@
3473 - targ_extra_emuls="elf_i386 elf_x86_64"
3474 - targ_extra_libpath=$targ_extra_emuls
3475 - ;;
3476 -+x86_64-*-solaris2*)
3477 -+ targ_emul=elf_x86_64
3478 -+ targ_extra_emuls="elf_i386 elf_i386_ldso"
3479 -+ targ_extra_libpath=elf_i386
3480 -+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
3481 - i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
3482 - i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
3483 - targ_extra_emuls="elf_i386"
3484
3485 diff --git a/sys-devel/binutils/files/2.21-ldwrap-interix.sh b/sys-devel/binutils/files/2.21-ldwrap-interix.sh
3486 deleted file mode 100644
3487 index 44570f0..0000000
3488 --- a/sys-devel/binutils/files/2.21-ldwrap-interix.sh
3489 +++ /dev/null
3490 @@ -1,94 +0,0 @@
3491 -#!/usr/bin/env bash
3492 -
3493 -# Wrapper for interix to avoid /usr/local/*. This is done
3494 -# by using our own linker scripts. These scripts are copied
3495 -# over from interix' gcc 3.3 and modified to not include
3496 -# /usr/local/lib for library search. Still we have to tell
3497 -# ld to use those scripts....
3498 -
3499 -ScriptDir=@SCRIPTDIR@
3500 -ScriptPlatform=i386pe_posix
3501 -ScriptExt=x
3502 -
3503 -Opt_Ur=no
3504 -Opt_r=no
3505 -Opt_N=no
3506 -Opt_n=no
3507 -Opt_shared=no
3508 -Opt_ldl="-ldl"
3509 -Args=
3510 -
3511 -Opt_v_seen=no
3512 -Opt_file_seen=no
3513 -
3514 -for arg in "$@"; do
3515 - case $arg in
3516 - -Ur) Opt_Ur=yes ;;
3517 - -r) Opt_r=yes ;;
3518 - -N) Opt_N=yes ;;
3519 - -n) Opt_n=yes ;;
3520 - --shared) Opt_shared=yes ;;
3521 - -Bstatic) Opt_ldl= ;;
3522 - -v) Opt_v_seen=yes ;;
3523 - *) [[ -e "$1" ]] && Opt_file_seen=yes ;;
3524 - esac
3525 -
3526 - # manpages states '-soname', but '-h' seems to work better !?
3527 - OptArg=
3528 -
3529 - case $arg in
3530 - -soname) arg="-h" ;;
3531 - -soname=*) OptArg="${arg#-soname=}"; arg="-h" ;;
3532 - --version-script=*) continue ;; # ignore. this only make troubles!
3533 - -L/usr/lib/x86) continue ;; # fuck off, bloody bastard see below:
3534 - # gcc needs to know about /usr/lib/x86 to find startfiles, but
3535 - # knowing it, makes gcc add this path with -L on the linker
3536 - # command line. since the linker is a binutils-config extwrapper,
3537 - # it removes all -L${EPREFIX}/{lib,usr/lib} from the command line
3538 - # (and the linker itself adds them again later on). This makes us
3539 - # end up with /usr/lib/x86 up front of the prefix, making the linker
3540 - # find _WRONG_ libraries, resulting in damaged binaries and/or failed
3541 - # links.
3542 - esac
3543 -
3544 - Args="$Args '$arg'"
3545 - [ -z "$OptArg" ] || Args="$Args '$OptArg'"
3546 -done
3547 -
3548 -if [ $Opt_Ur = "yes" ]; then
3549 - ScriptExt=xu
3550 -elif [ $Opt_r = "yes" ]; then
3551 - ScriptExt=xr
3552 -elif [ $Opt_N = "yes" ]; then
3553 - ScriptExt=xbn
3554 -elif [ $Opt_n = "yes" ]; then
3555 - ScriptExt=xn
3556 -elif [ $Opt_shared = "yes" ]; then
3557 - ScriptExt=xs
3558 -fi
3559 -
3560 -#
3561 -# If just calling ld -v, we definitely DON'T want to add -ldl, as it makes the
3562 -# linker crash ... :*(
3563 -#
3564 -[[ ${Opt_v_seen} == yes && ${Opt_file_seen} == no ]] && \
3565 - Opt_ldl=
3566 -
3567 -#
3568 -# WARNING: --script is the last here intentionally, since all library paths given
3569 -# in the file are added dependant to the position where the --script option appears
3570 -# on the command line. this means that if not given last, libraries from /opt/gcc...
3571 -# and /usr/lib will allways get linked in before any library from our prefix (which
3572 -# we *definitly* don't want...
3573 -#
3574 -# There is some nasty redirection trick here, which enables this script to remove
3575 -# dumb assertions from stderr without touching the rest.
3576 -#
3577 -exec 3>&1
3578 -eval "/opt/gcc.3.3/bin/ld $Args $Opt_ldl --script '$ScriptDir/$ScriptPlatform.$ScriptExt'" 2>&1 >&3 3>&- \
3579 - | grep -v -E 'assertion fail .*/cofflink.c:5211' 3>&- 1>&2 2>/dev/null
3580 -_st=${PIPESTATUS[0]}
3581 -exec 3>&-
3582 -
3583 -exit ${_st}
3584 -
3585
3586 diff --git a/sys-devel/binutils/files/binutils-2.16-gcc4.patch b/sys-devel/binutils/files/binutils-2.16-gcc4.patch
3587 deleted file mode 100644
3588 index 2308e66..0000000
3589 --- a/sys-devel/binutils/files/binutils-2.16-gcc4.patch
3590 +++ /dev/null
3591 @@ -1,11 +0,0 @@
3592 ---- bfd/aix5ppc-core.c
3593 -+++ bfd/aix5ppc-core.c
3594 -@@ -117,7 +117,7 @@
3595 - return return_value;
3596 -
3597 - memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx));
3598 -- core_hdr(abfd) = (char *)new_core_hdr;
3599 -+ abfd->tdata.any = (char *)new_core_hdr;
3600 -
3601 - /* .stack section. */
3602 - sec = bfd_make_section_anyway (abfd, ".stack");
3603
3604 diff --git a/sys-devel/binutils/files/binutils-2.16-solaris10.patch b/sys-devel/binutils/files/binutils-2.16-solaris10.patch
3605 deleted file mode 100644
3606 index 3689cf5..0000000
3607 --- a/sys-devel/binutils/files/binutils-2.16-solaris10.patch
3608 +++ /dev/null
3609 @@ -1,34 +0,0 @@
3610 ---- bfd/elflink.c
3611 -+++ bfd/elflink.c
3612 -@@ -3683,11 +3683,12 @@
3613 -
3614 - /* If this is a hidden symbol, or if it is not version
3615 - 1, we append the version name to the symbol name.
3616 -- However, we do not modify a non-hidden absolute
3617 -- symbol, because it might be the version symbol
3618 -- itself. FIXME: What if it isn't? */
3619 -+ However, we do not modify a non-hidden absolute symbol
3620 -+ if it is not a function, because it might be the version
3621 -+ symbol itself. FIXME: What if it isn't? */
3622 - if ((iver.vs_vers & VERSYM_HIDDEN) != 0
3623 -- || (vernum > 1 && ! bfd_is_abs_section (sec)))
3624 -+ || (vernum > 1 && (! bfd_is_abs_section (sec)
3625 -+ || ELF_ST_TYPE (isym->st_info) == STT_FUNC)))
3626 - {
3627 - const char *verstr;
3628 - size_t namelen, verlen, newlen;
3629 ---- ld/configure.tgt
3630 -+++ ld/configure.tgt
3631 -@@ -171,10 +171,12 @@
3632 - i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;;
3633 - i[3-7]86-*-solaris2*) targ_emul=elf_i386_ldso
3634 - targ_extra_emuls="elf_i386 elf_x86_64"
3635 -+ targ_extra_libpath=$targ_extra_emuls
3636 - ;;
3637 - i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
3638 - i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
3639 - targ_extra_emuls="elf_i386"
3640 -+ targ_extra_libpath=$targ_extra_emuls
3641 - ;;
3642 - i[3-7]86-*-netbsdelf* | \
3643 - i[3-7]86-*-netbsd*-gnu* | \
3644
3645 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
3646 deleted file mode 100644
3647 index 127dcac..0000000
3648 --- a/sys-devel/binutils/files/binutils-2.18.50.0.7-mint.patch
3649 +++ /dev/null
3650 @@ -1,2503 +0,0 @@
3651 -diff -aurN binutils-2.18/bfd/Makefile.am binutils-2.18-mint-20080228/bfd/Makefile.am
3652 ---- binutils-2.18/bfd/Makefile.am 2007-08-28 22:20:14.000000000 +0200
3653 -+++ binutils-2.18-mint-20080228/bfd/Makefile.am 2008-02-28 09:46:59.109375000 +0100
3654 -@@ -351,6 +351,7 @@
3655 - pei-mips.lo \
3656 - peigen.lo \
3657 - ppcboot.lo \
3658 -+ prg-mint.lo \
3659 - reloc16.lo \
3660 - riscix.lo \
3661 - sparclinux.lo \
3662 -@@ -529,6 +530,7 @@
3663 - pe-mips.c \
3664 - pei-mips.c \
3665 - ppcboot.c \
3666 -+ prg-mint.c \
3667 - reloc16.c \
3668 - riscix.c \
3669 - sparclinux.c \
3670 -@@ -1754,6 +1756,9 @@
3671 - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
3672 - ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
3673 - $(INCDIR)/hashtab.h
3674 -+prg-mint.lo: prg-mint.c $(INCDIR)/aout/aout64.h \
3675 -+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
3676 -+ $(INCDIR)/bfdlink.h libaout.h aoutx.h aout-target.h
3677 - reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
3678 - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
3679 - libcoff.h
3680 -diff -aurN binutils-2.18/bfd/Makefile.in binutils-2.18-mint-20080228/bfd/Makefile.in
3681 ---- binutils-2.18/bfd/Makefile.in 2007-08-28 22:20:12.000000000 +0200
3682 -+++ binutils-2.18-mint-20080228/bfd/Makefile.in 2008-02-28 09:46:59.156250000 +0100
3683 -@@ -601,6 +601,7 @@
3684 - pei-mips.lo \
3685 - peigen.lo \
3686 - ppcboot.lo \
3687 -+ prg-mint.lo \
3688 - reloc16.lo \
3689 - riscix.lo \
3690 - sparclinux.lo \
3691 -@@ -779,6 +780,7 @@
3692 - pe-mips.c \
3693 - pei-mips.c \
3694 - ppcboot.c \
3695 -+ prg-mint.c \
3696 - reloc16.c \
3697 - riscix.c \
3698 - sparclinux.c \
3699 -@@ -2334,6 +2336,9 @@
3700 - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
3701 - ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
3702 - $(INCDIR)/hashtab.h
3703 -+prg-mint.lo: prg-mint.c $(INCDIR)/aout/aout64.h \
3704 -+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
3705 -+ $(INCDIR)/bfdlink.h libaout.h aoutx.h aout-target.h
3706 - reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
3707 - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
3708 - libcoff.h
3709 -diff -aurN binutils-2.18/bfd/acinclude.m4 binutils-2.18-mint-20080228/bfd/acinclude.m4
3710 ---- binutils-2.18/bfd/acinclude.m4 2007-08-06 21:59:13.000000000 +0200
3711 -+++ binutils-2.18-mint-20080228/bfd/acinclude.m4 2008-02-28 09:46:59.171875000 +0100
3712 -@@ -3,7 +3,7 @@
3713 - [AC_REQUIRE([AC_CANONICAL_TARGET])
3714 - case "${host}" in
3715 - changequote(,)dnl
3716 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
3717 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
3718 - changequote([,])dnl
3719 - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
3720 - esac])dnl
3721 -diff -aurN binutils-2.18/bfd/aoutx.h binutils-2.18-mint-20080228/bfd/aoutx.h
3722 ---- binutils-2.18/bfd/aoutx.h 2007-08-06 21:59:13.000000000 +0200
3723 -+++ binutils-2.18-mint-20080228/bfd/aoutx.h 2008-02-28 09:46:59.218750000 +0100
3724 -@@ -1832,6 +1832,11 @@
3725 - bfd_byte buffer[BYTES_IN_WORD];
3726 - bfd_size_type amt = BYTES_IN_WORD;
3727 -
3728 -+ /* The MiNT backend writes past the string table. It therefore has to
3729 -+ know about the table size. */
3730 -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) +
3731 -+ BYTES_IN_WORD;
3732 -+
3733 - /* The string table starts with the size. */
3734 - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
3735 - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt)
3736 -diff -aurN binutils-2.18/bfd/bfd-in.h binutils-2.18-mint-20080228/bfd/bfd-in.h
3737 ---- binutils-2.18/bfd/bfd-in.h 2007-08-06 21:59:14.000000000 +0200
3738 -+++ binutils-2.18-mint-20080228/bfd/bfd-in.h 2008-02-28 09:46:59.250000000 +0100
3739 -@@ -791,6 +791,12 @@
3740 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
3741 - (bfd *, struct bfd_link_info *);
3742 -
3743 -+/* MiNT executable support routines for the linker. */
3744 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
3745 -+ (bfd *, flagword);
3746 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
3747 -+ (bfd *abfd, bfd_vma address);
3748 -+
3749 - /* mmap hacks */
3750 -
3751 - struct _bfd_window_internal;
3752 -diff -aurN binutils-2.18/bfd/bfd-in2.h binutils-2.18-mint-20080228/bfd/bfd-in2.h
3753 ---- binutils-2.18/bfd/bfd-in2.h 2007-08-06 21:59:15.000000000 +0200
3754 -+++ binutils-2.18-mint-20080228/bfd/bfd-in2.h 2008-02-28 09:46:59.328125000 +0100
3755 -@@ -798,6 +798,12 @@
3756 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
3757 - (bfd *, struct bfd_link_info *);
3758 -
3759 -+/* MiNT executable support routines for the linker. */
3760 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
3761 -+ (bfd *, flagword);
3762 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
3763 -+ (bfd *abfd, bfd_vma address);
3764 -+
3765 - /* mmap hacks */
3766 -
3767 - struct _bfd_window_internal;
3768 -diff -aurN binutils-2.18/bfd/config.bfd binutils-2.18-mint-20080228/bfd/config.bfd
3769 ---- binutils-2.18/bfd/config.bfd 2007-08-28 19:19:33.000000000 +0200
3770 -+++ binutils-2.18-mint-20080228/bfd/config.bfd 2008-02-28 09:46:59.375000000 +0100
3771 -@@ -777,6 +777,11 @@
3772 - # targ_selvecs=m68kmach3_vec
3773 - # targ_cflags=-DSTAT_FOR_EXEC
3774 - ;;
3775 -+ m68*-*-mint*)
3776 -+ targ_defvec=aout0_big_vec
3777 -+ targ_selvecs=m68kmint_prg_vec
3778 -+ targ_underscore=yes
3779 -+ ;;
3780 - m68*-hp*-netbsd*)
3781 - targ_defvec=m68k4knetbsd_vec
3782 - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
3783 -diff -aurN binutils-2.18/bfd/configure binutils-2.18-mint-20080228/bfd/configure
3784 ---- binutils-2.18/bfd/configure 2007-08-28 22:19:51.000000000 +0200
3785 -+++ binutils-2.18-mint-20080228/bfd/configure 2008-02-28 09:48:33.234375000 +0100
3786 -@@ -16753,7 +16753,7 @@
3787 -
3788 -
3789 - case "${host}" in
3790 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
3791 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
3792 -
3793 - cat >>confdefs.h <<\_ACEOF
3794 - #define USE_BINARY_FOPEN 1
3795 -@@ -19222,6 +19222,7 @@
3796 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
3797 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
3798 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
3799 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
3800 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
3801 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
3802 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
3803 -diff -aurN binutils-2.18/bfd/configure.in binutils-2.18-mint-20080228/bfd/configure.in
3804 ---- binutils-2.18/bfd/configure.in 2007-08-28 22:19:56.000000000 +0200
3805 -+++ binutils-2.18-mint-20080228/bfd/configure.in 2008-02-28 09:48:22.671875000 +0100
3806 -@@ -800,6 +800,7 @@
3807 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
3808 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
3809 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
3810 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
3811 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
3812 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
3813 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
3814 -diff -aurN binutils-2.18/bfd/libaout.h binutils-2.18-mint-20080228/bfd/libaout.h
3815 ---- binutils-2.18/bfd/libaout.h 2007-08-06 21:59:36.000000000 +0200
3816 -+++ binutils-2.18-mint-20080228/bfd/libaout.h 2008-02-28 09:47:00.031250000 +0100
3817 -@@ -420,6 +420,10 @@
3818 - table, used when linking on SunOS. This is indexed by the symbol
3819 - index. */
3820 - bfd_vma *local_got_offsets;
3821 -+
3822 -+ /* A pointer for data used by aout extensions. (Currently only used
3823 -+ by MiNT executables (see prg-mint.c). */
3824 -+ void *ext;
3825 - };
3826 -
3827 - struct aout_data_struct
3828 -@@ -447,6 +451,7 @@
3829 - #define obj_aout_string_window(bfd) (adata (bfd).string_window)
3830 - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
3831 - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
3832 -+#define obj_aout_ext(bfd) (adata (bfd).ext)
3833 -
3834 - /* We take the address of the first element of an asymbol to ensure that the
3835 - macro is only ever applied to an asymbol. */
3836 -diff -aurN binutils-2.18/bfd/prg-mint.c binutils-2.18-mint-20080228/bfd/prg-mint.c
3837 ---- binutils-2.18/bfd/prg-mint.c 1970-01-01 01:00:00.000000000 +0100
3838 -+++ binutils-2.18-mint-20080228/bfd/prg-mint.c 2008-02-28 09:47:00.046875000 +0100
3839 -@@ -0,0 +1,1718 @@
3840 -+/* BFD backend for traditional MiNT executables.
3841 -+ Copyright 1998, 2007 Free Software Foundation, Inc.
3842 -+ Originally written by Guido Flohr (guido@××××××××.de).
3843 -+ Modified by Vincent Riviere (vincent.riviere@××××××××.fr).
3844 -+
3845 -+ This file is part of BFD, the Binary File Descriptor library.
3846 -+
3847 -+ This program is free software; you can redistribute it and/or modify
3848 -+ it under the terms of the GNU General Public License as published by
3849 -+ the Free Software Foundation; either version 3 of the License, or
3850 -+ (at your option) any later version.
3851 -+
3852 -+ This program is distributed in the hope that it will be useful,
3853 -+ but WITHOUT ANY WARRANTY; without even the implied warranty of
3854 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3855 -+ GNU General Public License for more details.
3856 -+
3857 -+ You should have received a copy of the GNU General Public License
3858 -+ along with this program; if not, write to the Free Software
3859 -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
3860 -+ MA 02110-1301, USA. */
3861 -+
3862 -+/* The format of executables on Atari is actually not a.out, it is
3863 -+ only chosen as an approach which comes close enough. The layout of a
3864 -+ program image on disk looked like this:
3865 -+
3866 -+ +-----------------+
3867 -+ | 28 Bytes Header |
3868 -+ +-----------------+
3869 -+ | Text segment |
3870 -+ +-----------------+
3871 -+ | Data segment |
3872 -+ +-----------------+
3873 -+ | BSS |
3874 -+ +-----------------+
3875 -+ | Symbol table |
3876 -+ +-----------------+
3877 -+ | TPA relocation |
3878 -+ +-----------------+
3879 -+
3880 -+ The 28 byte exec header used to look like this:
3881 -+
3882 -+ struct old_exec_header
3883 -+ {
3884 -+ bfd_byte a_magic[2];
3885 -+ bfd_byte a_text[4];
3886 -+ bfd_byte a_data[4];
3887 -+ bfd_byte a_bss[4];
3888 -+ bfd_byte a_syms[4];
3889 -+ bfd_byte a_resvd[4];
3890 -+ bfd_byte a_abs[2];
3891 -+ };
3892 -+
3893 -+ The first two bytes (A_MAGIC) contained an assembler branch
3894 -+ instruction to the beginning of the text segment. Because the
3895 -+ exec header had a fixed size and the text entry point was constant
3896 -+ this assembler instruction also had a constant value (0x601a).
3897 -+ In fact the operating system never really executed the branch
3898 -+ instruction but used this value (0x601a) as a magic value.
3899 -+
3900 -+ TEXT, DATA and BSS were as one would expect them. The symbol
3901 -+ table wasn't. Several different formats were in use, none of them
3902 -+ very efficient, none of them powerful enough to support source
3903 -+ level debugging. I've changed that and the GNU symbol table will
3904 -+ now be used instead (unless the --traditional-format option was
3905 -+ given to the linker).
3906 -+
3907 -+ If the last member A_ABS of the exec header is zero the program
3908 -+ image contains an additional table with relocation information
3909 -+ at the end of the image. The kernel can load program images at
3910 -+ virtually any address in the address space. In fact it will load
3911 -+ it at the start of the biggest block of free memory. This block
3912 -+ is then called the Transient Program Area TPA and the image has
3913 -+ to be relocated against the TPA at runtime. The relocation info
3914 -+ itself is in a simply way compressed: It starts with a four-byte
3915 -+ value, the first address within the image to be relocated. Now
3916 -+ following are one-byte offsets to the last address. The special
3917 -+ value of 1 (which is impossible as an offset) signifies that 254
3918 -+ has to be added to the next offset. The table is finished with
3919 -+ a zero-byte.
3920 -+
3921 -+ I now simply extended the header from its old 28 bytes to 256
3922 -+ bytes. The first 28 bytes give home to a standard Atari header,
3923 -+ the rest is for extensions. The extension header starts with
3924 -+ a ``real'' assembler instruction, a far jump to the text entry
3925 -+ point. The extension header gives home to a standard a.out
3926 -+ exec header (currently NMAGIC or OMAGIC only) plus some extra
3927 -+ more or less useful fields plus space to future extensions.
3928 -+ For the OS the extension header will already belong to the text
3929 -+ segment, for BFD backends the text segment is 228 (or 0xe4)
3930 -+ bytes smaller than for the OS. This explains for example the
3931 -+ funny TEXT_START_ADDR 0xe4.
3932 -+
3933 -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently
3934 -+ no such thing as memory paging on the Atari (and this is why
3935 -+ ZMAGICs are disabled for now to allow for future enhancements).
3936 -+
3937 -+ If you think that this whole file looks quite like a big hack
3938 -+ you're probably right. But the results (mainly the output of
3939 -+ the linker) seem to work and they allow to use up-to-date
3940 -+ binutils on the Atari until a better executable format (maybe
3941 -+ ELF) has been established for this machine. */
3942 -+
3943 -+#include "sysdep.h"
3944 -+#include "bfd.h"
3945 -+
3946 -+#define N_HEADER_IN_TEXT(x) 0
3947 -+#define BYTES_IN_WORD 4
3948 -+#define ENTRY_CAN_BE_ZERO
3949 -+#define N_SHARED_LIB(x) 0
3950 -+#define TEXT_START_ADDR 0xe4
3951 -+#define TARGET_PAGE_SIZE 2
3952 -+#define TARGET_IS_BIG_ENDIAN_P
3953 -+#define DEFAULT_ARCH bfd_arch_m68k
3954 -+#define N_TXTADDR(x) TEXT_START_ADDR
3955 -+
3956 -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
3957 -+ remove whitespace added here, and thus will fail to concatenate
3958 -+ the tokens. */
3959 -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP)
3960 -+#define TARGETNAME "a.out-mintprg"
3961 -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y)
3962 -+
3963 -+/* The only location that the macro ZMAGIC_DISK_BLOCK_SIZE seems to
3964 -+ be needed is in aout-target.h where the file position of the text
3965 -+ segment is determined. Our target page size of 2 is actually just a
3966 -+ joke (no paging on Atari, we simply short-word-align sections) so
3967 -+ we have to explicitely tell aout-target here. Nonetheless, this
3968 -+ doesn't seem clean to me. Does aoutx.h (adjust_n_magic) has to
3969 -+ be modified? */
3970 -+#define ZMAGIC_DISK_BLOCK_SIZE EXEC_BYTES_SIZE
3971 -+
3972 -+/* If --traditional-format was given to the linker an old-style DRI
3973 -+ symbol table is written into the executable. This is with respect
3974 -+ to many old debugging tools or disassemblers which expect this format.
3975 -+ Although created by the linker, these executables will not be recognized
3976 -+ as a valid bfd input file. It is too much effort to evaluate the
3977 -+ symbols from such files. */
3978 -+#define _MINT_SYMBOL_FORMAT_GNU 0
3979 -+#define _MINT_SYMBOL_FORMAT_DRI 1
3980 -+
3981 -+/* Forward declarations. */
3982 -+struct bfd_link_info;
3983 -+struct reloc_std_external;
3984 -+
3985 -+/* Data structure that holds some private information for us. */
3986 -+struct mint_internal_info
3987 -+{
3988 -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */
3989 -+ bfd_boolean traditional_format; /* Saved from link info. */
3990 -+ int symbol_format; /* Format of the symbol table. */
3991 -+ void *tparel; /* Data for TPA relative relocation
3992 -+ information. */
3993 -+ file_ptr tparel_pos; /* File position of TPA relative
3994 -+ relocation information. */
3995 -+ bfd_size_type tparel_size; /* Size of TPA relative relocation
3996 -+ information. */
3997 -+ bfd_size_type symtab_size; /* Size of traditional symbol table. */
3998 -+
3999 -+#define MINT_RELOC_CHUNKSIZE 0x1000
4000 -+ bfd_vma *relocs; /* Array of address relocations. */
4001 -+ unsigned long relocs_used; /* Number of relocation entries
4002 -+ already used up. */
4003 -+ unsigned long relocs_allocated; /* Number of relocation entries
4004 -+ allocated. */
4005 -+
4006 -+ bfd_vma stkpos; /* File offset to value of _stksize. */
4007 -+
4008 -+ flagword prg_flags; /* Standard GEMDOS flags. */
4009 -+
4010 -+ bfd_boolean reloc_error; /* True if an unhandled error during
4011 -+ relocation occured. */
4012 -+};
4013 -+
4014 -+/* We have to do quite a lot of magic to make the Atari format
4015 -+ for GEMDOS executables fit into the standard a.out format.
4016 -+ We start with the original header. */
4017 -+#define external_exec mint_external_exec
4018 -+struct mint_external_exec
4019 -+{
4020 -+ bfd_byte g_branch[2]; /* 0x601a (or 0xdead for relocatable
4021 -+ linker output). */
4022 -+ bfd_byte g_text[4]; /* Length of text section. */
4023 -+ bfd_byte g_data[4]; /* Length of data section. */
4024 -+ bfd_byte g_bss[4]; /* Length of bss section. */
4025 -+ bfd_byte g_syms[4]; /* Length of symbol table. */
4026 -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54
4027 -+ (in ASCII: ``MiNT''). */
4028 -+ bfd_byte g_flags[4]; /* Atari special flags. */
4029 -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation
4030 -+ info. */
4031 -+
4032 -+ /* We extend this header now to provide the information that the
4033 -+ binutils want to see. Everything following will actually be part
4034 -+ of the text segment (from MiNT's point of view). As a
4035 -+ consequence the text section has 228 bytes of redundancy.
4036 -+
4037 -+ The following eight bytes should be treated as opaque.
4038 -+ If the word ``opaque'' always attracts your curiosity in
4039 -+ typedefs and structs, here's the explanation: These eight bytes
4040 -+ are really two assembler instructions. The first one moves
4041 -+ the contents of e_entry into register d0, the second one
4042 -+ jumps (pc-relative) to the entry point. See swap_exec_header_out
4043 -+ for details. */
4044 -+ bfd_byte g_jump_entry[8];
4045 -+
4046 -+ /* Now following a standard a.out header. Note that the values
4047 -+ may differ from the one given on top. The traditional header
4048 -+ contains the values that the OS wants to see, the values below
4049 -+ are the values that make the binutils work. */
4050 -+ bfd_byte e_info[4]; /* Magic number and stuff. */
4051 -+ bfd_byte e_text[4]; /* Length of text section in bytes. */
4052 -+ bfd_byte e_data[4]; /* Length of data section. */
4053 -+ bfd_byte e_bss[4]; /* Length of standard symbol
4054 -+ table. */
4055 -+ bfd_byte e_syms[4]; /* Length of symbol table. */
4056 -+ bfd_byte e_entry[4]; /* Start address. */
4057 -+ bfd_byte e_trsize[4]; /* Length of text relocation
4058 -+ info. */
4059 -+ bfd_byte e_drsize[4]; /* Length of data relocation
4060 -+ info. */
4061 -+
4062 -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative
4063 -+ relocation info. */
4064 -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation
4065 -+ info. */
4066 -+
4067 -+ /* This is for extensions. */
4068 -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into
4069 -+ the executable you will find it
4070 -+ at file offset g_stkpos. If
4071 -+ not this is NULL. */
4072 -+
4073 -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See
4074 -+ definitions for _MINT_SYMBOL_FORMAT*
4075 -+ above. */
4076 -+
4077 -+ /* Pad with zeros. */
4078 -+ bfd_byte g_pad0[172];
4079 -+};
4080 -+
4081 -+#define EXEC_BYTES_SIZE 256
4082 -+
4083 -+/* Code indicating object file or impure executable. */
4084 -+#define OMAGIC 0407
4085 -+/* Code indicating pure executable. */
4086 -+#define NMAGIC 0410
4087 -+/* Code indicating demand-paged executable. */
4088 -+#define ZMAGIC 0413
4089 -+
4090 -+#ifndef N_BADMAG
4091 -+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
4092 -+ && N_MAGIC(x) != NMAGIC \
4093 -+ && N_MAGIC(x) != ZMAGIC)
4094 -+#endif
4095 -+
4096 -+/* For DRI symbol table format. */
4097 -+struct dri_symbol
4098 -+{
4099 -+ bfd_byte a_name[8]; /* Symbol name */
4100 -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */
4101 -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */
4102 -+};
4103 -+#define DRI_SYMBOL_SIZE 14
4104 -+
4105 -+/* Simple values for a_type. */
4106 -+#define A_UNDF 0
4107 -+#define A_BSS 0x0100
4108 -+#define A_TEXT 0x0200
4109 -+#define A_DATA 0x0400
4110 -+#define A_EXT 0x0800 /* External. */
4111 -+#define A_EQREG 0x1000 /* Equated register. */
4112 -+#define A_GLOBL 0x2000 /* Global. */
4113 -+#define A_EQU 0x4000 /* Equated. */
4114 -+#define A_DEF 0x8000 /* Defined. */
4115 -+#define A_LNAM 0x0048 /* GST compatible long name. */
4116 -+ /* File symbols ala aln. */
4117 -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */
4118 -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this
4119 -+ conflicts with the bits in A_LNAM. */
4120 -+
4121 -+static bfd_reloc_status_type
4122 -+m68kmint_prg_final_link_relocate (reloc_howto_type *howto,
4123 -+ bfd *input_bfd,
4124 -+ asection *input_section,
4125 -+ bfd_byte *contents,
4126 -+ bfd_vma address,
4127 -+ bfd_vma value,
4128 -+ bfd_vma addend,
4129 -+ struct reloc_std_external *rel);
4130 -+
4131 -+/* This is a hack. We have to retrieve the symbol name. But
4132 -+ to do achieve this with reasonable effort we need an extra
4133 -+ parameter. */
4134 -+#define MY_final_link_relocate(howto, input_bfd, input_section, contents, \
4135 -+ address, value, addend) \
4136 -+m68kmint_prg_final_link_relocate (howto, input_bfd, input_section, contents, \
4137 -+ address, value, addend, \
4138 -+ (struct reloc_std_external *) rel)
4139 -+
4140 -+/* aoutx.h requires definitions for BMAGIC and QMAGIC. Other
4141 -+ implementations have either chosen OMAGIC or zero for BMAGIC if
4142 -+ not available. We try it with 0777 which is hopefully impossible. */
4143 -+#define BMAGIC 0777
4144 -+#define QMAGIC 0314
4145 -+
4146 -+#include "aoutx.h"
4147 -+
4148 -+/* libaout doesn't use NAME for these ... */
4149 -+
4150 -+#define MY_get_section_contents aout_32_get_section_contents
4151 -+
4152 -+/* The following variables and functions
4153 -+ will be provided by aout-target.h. */
4154 -+
4155 -+static const bfd_target *
4156 -+m68kmint_prg_callback (bfd *abfd);
4157 -+
4158 -+static void
4159 -+MY_final_link_callback (bfd *abfd,
4160 -+ file_ptr *ptreloff,
4161 -+ file_ptr *pdreloff,
4162 -+ file_ptr *psymoff);
4163 -+
4164 -+extern const bfd_target m68kmint_prg_vec;
4165 -+
4166 -+/* Finish up the reading of an a.out file header. */
4167 -+
4168 -+#define MY_object_p m68kmint_prg_object_p
4169 -+
4170 -+static const bfd_target *
4171 -+m68kmint_prg_object_p (bfd *abfd)
4172 -+{
4173 -+ struct external_exec exec_bytes; /* Raw exec header from file. */
4174 -+ struct internal_exec exec; /* Cleaned-up exec header. */
4175 -+ const bfd_target *target;
4176 -+ bfd_size_type amt = EXEC_BYTES_SIZE;
4177 -+ struct mint_internal_info *myinfo;
4178 -+ bfd_boolean is_executable = TRUE;
4179 -+
4180 -+ if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
4181 -+ {
4182 -+ if (bfd_get_error () != bfd_error_system_call)
4183 -+ bfd_set_error (bfd_error_wrong_format);
4184 -+ return 0;
4185 -+ }
4186 -+
4187 -+ /* Instead of byte-swapping we compare bytes. */
4188 -+ if (exec_bytes.g_branch[0] == 0xde
4189 -+ && exec_bytes.g_branch[1] == 0xad)
4190 -+ {
4191 -+ /* This is the result of an invalid objcopy operation. */
4192 -+ is_executable = FALSE;
4193 -+ }
4194 -+ else if (exec_bytes.g_branch[0] != 0x60
4195 -+ || exec_bytes.g_branch[1] != 0x1a)
4196 -+ {
4197 -+ bfd_set_error (bfd_error_wrong_format);
4198 -+ return 0;
4199 -+ }
4200 -+
4201 -+ if (exec_bytes.g_branch[0] != 0x60
4202 -+ || exec_bytes.g_branch[1] != 0x1a
4203 -+ || exec_bytes.g_extmagic[0] != 'M'
4204 -+ || exec_bytes.g_extmagic[1] != 'i'
4205 -+ || exec_bytes.g_extmagic[2] != 'N'
4206 -+ || exec_bytes.g_extmagic[3] != 'T'
4207 -+ || exec_bytes.g_symbol_format[0] != 0
4208 -+ || exec_bytes.g_symbol_format[1] != 0
4209 -+ || exec_bytes.g_symbol_format[2] != 0
4210 -+ || exec_bytes.g_symbol_format[3] != 0)
4211 -+ {
4212 -+ bfd_set_error (bfd_error_wrong_format);
4213 -+ return 0;
4214 -+ }
4215 -+
4216 -+#ifdef SWAP_MAGIC
4217 -+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
4218 -+#else
4219 -+ exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
4220 -+#endif
4221 -+
4222 -+ if (N_BADMAG (exec))
4223 -+ return 0;
4224 -+
4225 -+#ifdef MACHTYPE_OK
4226 -+ if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
4227 -+ return 0;
4228 -+#endif
4229 -+
4230 -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
4231 -+
4232 -+#ifdef SWAP_MAGIC
4233 -+ /* Swap_exec_header_in read in a_info with the wrong byte order. */
4234 -+ exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
4235 -+#endif
4236 -+
4237 -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback);
4238 -+
4239 -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info));
4240 -+
4241 -+ if (myinfo == NULL)
4242 -+ {
4243 -+ /* Error is already set to "out of memory". */
4244 -+ return 0;
4245 -+ }
4246 -+
4247 -+ obj_aout_ext (abfd) = myinfo;
4248 -+
4249 -+ /* Now get the missing information. */
4250 -+ myinfo->tparel_pos = GET_WORD (abfd, exec_bytes.g_tparel_pos);
4251 -+ myinfo->tparel_size = GET_WORD (abfd, exec_bytes.g_tparel_size);
4252 -+
4253 -+ /* FIXME: Currently we always read the TPA relative relocation
4254 -+ information. This is suboptimal because often times there
4255 -+ is no need for it. Read it only if need be! Maybe this should
4256 -+ also depend on abfd->cacheable? */
4257 -+ if (myinfo->tparel_size == 0)
4258 -+ myinfo->tparel = bfd_zalloc (abfd, 4);
4259 -+ else
4260 -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size);
4261 -+
4262 -+ if (myinfo->tparel == NULL)
4263 -+ return 0;
4264 -+
4265 -+ if (myinfo->tparel_size == 0)
4266 -+ {
4267 -+ myinfo->tparel_size = 4;
4268 -+ }
4269 -+ else
4270 -+ {
4271 -+ /* Read the information from the bfd. */
4272 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0
4273 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd)
4274 -+ != myinfo->tparel_size))
4275 -+ {
4276 -+ return 0;
4277 -+ }
4278 -+ }
4279 -+
4280 -+ myinfo->stkpos = GET_WORD (abfd, exec_bytes.g_stkpos);
4281 -+ myinfo->prg_flags = GET_WORD (abfd, exec_bytes.g_flags);
4282 -+
4283 -+ /* We don't support other formats for the symbol table actively. */
4284 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
4285 -+
4286 -+ return target;
4287 -+}
4288 -+
4289 -+/* Free all information we have cached for this BFD. We can always
4290 -+ read it again later if we need it. */
4291 -+
4292 -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info
4293 -+
4294 -+static bfd_boolean
4295 -+m68kmint_prg_bfd_free_cached_info (bfd *abfd)
4296 -+{
4297 -+ if (obj_aout_ext (abfd) != NULL)
4298 -+ {
4299 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
4300 -+ if (myinfo != NULL)
4301 -+ {
4302 -+ if (myinfo->relocs != NULL)
4303 -+ {
4304 -+ free (myinfo->relocs);
4305 -+ myinfo->relocs = NULL;
4306 -+ }
4307 -+ }
4308 -+ }
4309 -+
4310 -+ return NAME (aout, bfd_free_cached_info) (abfd);
4311 -+}
4312 -+
4313 -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the
4314 -+ symbol exceeds 8 characters write a long symbol. If it
4315 -+ exceeds 22 characters truncate the name. */
4316 -+
4317 -+static int
4318 -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value)
4319 -+{
4320 -+ struct dri_symbol sym;
4321 -+ char *ptr = (char*)sym.a_name;
4322 -+ const char *str = name;
4323 -+ char more_name[DRI_SYMBOL_SIZE];
4324 -+ int i = sizeof (sym.a_name);
4325 -+ int written_bytes = 0;
4326 -+
4327 -+ bfd_put_16 (abfd, type, sym.a_type);
4328 -+ bfd_put_32 (abfd, value, sym.a_value);
4329 -+
4330 -+ while (--i >= 0 && ('\0' != (*ptr++ = *str)))
4331 -+ str++;
4332 -+
4333 -+ /* If i >= 0 then *str == '\0' and if i == 0 there is nothing to fill. */
4334 -+ if (i > 0)
4335 -+ { /* We are done - fill it with 0. */
4336 -+ do
4337 -+ *ptr++ = '\0';
4338 -+ while (--i > 0);
4339 -+ }
4340 -+ else if (*str)
4341 -+ { /* If more to write. */
4342 -+ type |= A_LNAM;
4343 -+ bfd_put_16 (abfd, type, sym.a_type);
4344 -+ i = sizeof sym;
4345 -+ }
4346 -+
4347 -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
4348 -+ return -1;
4349 -+ written_bytes += DRI_SYMBOL_SIZE;
4350 -+
4351 -+ if (i > 0)
4352 -+ {
4353 -+ ptr = more_name;
4354 -+ i = sizeof more_name;
4355 -+ while (--i >= 0 && ('\0' != (*ptr++ = *str)))
4356 -+ str++;
4357 -+
4358 -+ if (bfd_bwrite (more_name, sizeof more_name, abfd)
4359 -+ != sizeof more_name)
4360 -+ return -1;
4361 -+ written_bytes += sizeof more_name;
4362 -+ }
4363 -+
4364 -+ return written_bytes;
4365 -+}
4366 -+
4367 -+/* Emit a traditional DRI symbol table while linking.
4368 -+ Most of this code come from aout_link_write_symbols() in aoutx.h. */
4369 -+
4370 -+static bfd_boolean
4371 -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info)
4372 -+{
4373 -+ bfd *input_bfd;
4374 -+ enum bfd_link_strip strip = info->strip;
4375 -+ enum bfd_link_discard discard = info->discard;
4376 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
4377 -+ bfd *last_archive = NULL;
4378 -+
4379 -+ /* Position file pointer. */
4380 -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
4381 -+ return FALSE;
4382 -+
4383 -+ myinfo->symtab_size = 0;
4384 -+
4385 -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next)
4386 -+ {
4387 -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd);
4388 -+ char *strings = obj_aout_external_strings (input_bfd);
4389 -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd);
4390 -+ struct external_nlist *sym_end = sym + sym_count;
4391 -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd);
4392 -+ bfd_boolean pass = FALSE;
4393 -+ bfd_boolean skip = FALSE;
4394 -+ bfd_boolean skip_next = FALSE;
4395 -+ int written_bytes;
4396 -+ int a_type;
4397 -+ bfd_boolean write_archive_name = FALSE;
4398 -+ bfd_vma val = 0;
4399 -+
4400 -+ /* First write out a symbol for the archive if we do not
4401 -+ strip these symbols and if it differs from the last
4402 -+ one. */
4403 -+ if (input_bfd->my_archive != last_archive
4404 -+ && input_bfd->my_archive != NULL)
4405 -+ {
4406 -+ write_archive_name = TRUE;
4407 -+ last_archive = input_bfd->my_archive;
4408 -+ }
4409 -+
4410 -+ if (write_archive_name
4411 -+ && strip != strip_all
4412 -+ && (strip != strip_some
4413 -+ || bfd_hash_lookup (info->keep_hash,
4414 -+ input_bfd->my_archive->filename,
4415 -+ FALSE, FALSE) != NULL)
4416 -+ && discard != discard_all)
4417 -+ {
4418 -+ val = bfd_get_section_vma (abfd,
4419 -+ obj_textsec (input_bfd)->output_section)
4420 -+ + obj_textsec (input_bfd)->output_offset;
4421 -+
4422 -+ written_bytes = write_dri_symbol (abfd,
4423 -+ input_bfd->my_archive->filename,
4424 -+ A_TFILE, val);
4425 -+
4426 -+ if (written_bytes < 0)
4427 -+ return FALSE;
4428 -+ else
4429 -+ myinfo->symtab_size += written_bytes;
4430 -+ }
4431 -+
4432 -+ /* Now write out a symbol for the object file if we do not
4433 -+ strip these symbols. */
4434 -+ if (strip != strip_all
4435 -+ && (strip != strip_some
4436 -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename,
4437 -+ FALSE, FALSE) != NULL)
4438 -+ && discard != discard_all)
4439 -+ {
4440 -+ val = bfd_get_section_vma (abfd,
4441 -+ obj_textsec (input_bfd)->output_section)
4442 -+ + obj_textsec (input_bfd)->output_offset;
4443 -+
4444 -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename,
4445 -+ A_TFILE, val);
4446 -+ if (written_bytes < 0)
4447 -+ return FALSE;
4448 -+ else
4449 -+ myinfo->symtab_size += written_bytes;
4450 -+ }
4451 -+
4452 -+ /* Now we have a problem. All symbols that we see have already
4453 -+ been marked written (because we write them a second time
4454 -+ here. If we would do it the clean way we would have
4455 -+ to traverse the entire symbol map and reset the written
4456 -+ flag. We hack here instead... */
4457 -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1)
4458 -+#define is_written(h) ((int) h->written == (int) TRUE + 1)
4459 -+ for (; sym < sym_end; sym++, sym_hash++)
4460 -+ {
4461 -+ const char *name;
4462 -+ int type;
4463 -+ struct aout_link_hash_entry *h;
4464 -+ asection *symsec;
4465 -+ val = 0;
4466 -+
4467 -+ type = H_GET_8 (input_bfd, sym->e_type);
4468 -+ name = strings + GET_WORD (input_bfd, sym->e_strx);
4469 -+
4470 -+ h = NULL;
4471 -+
4472 -+ if (pass)
4473 -+ {
4474 -+ /* Pass this symbol through. It is the target of an
4475 -+ indirect or warning symbol. */
4476 -+ val = GET_WORD (input_bfd, sym->e_value);
4477 -+ pass = FALSE;
4478 -+ }
4479 -+ else if (skip_next)
4480 -+ {
4481 -+ /* Skip this symbol, which is the target of an indirect
4482 -+ symbol that we have changed to no longer be an indirect
4483 -+ symbol. */
4484 -+ skip_next = FALSE;
4485 -+ continue;
4486 -+ }
4487 -+ else
4488 -+ {
4489 -+ struct aout_link_hash_entry *hresolve = *sym_hash;
4490 -+
4491 -+ /* We have saved the hash table entry for this symbol, if
4492 -+ there is one. Note that we could just look it up again
4493 -+ in the hash table, provided we first check that it is an
4494 -+ external symbol. */
4495 -+ h = *sym_hash;
4496 -+
4497 -+ /* Use the name from the hash table, in case the symbol was
4498 -+ wrapped. */
4499 -+ if (h != NULL
4500 -+ && h->root.type != bfd_link_hash_warning)
4501 -+ name = h->root.root.string;
4502 -+
4503 -+ /* If this is an indirect or warning symbol, then change
4504 -+ hresolve to the base symbol. */
4505 -+ hresolve = h;
4506 -+ if (h != (struct aout_link_hash_entry *) NULL
4507 -+ && (h->root.type == bfd_link_hash_indirect
4508 -+ || h->root.type == bfd_link_hash_warning))
4509 -+ {
4510 -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link;
4511 -+ while (hresolve->root.type == bfd_link_hash_indirect
4512 -+ || hresolve->root.type == bfd_link_hash_warning)
4513 -+ hresolve = ((struct aout_link_hash_entry*)
4514 -+ hresolve->root.u.i.link);
4515 -+ }
4516 -+
4517 -+ /* If the symbol has already been written out skip it. */
4518 -+ if (h != NULL
4519 -+ && is_written (h))
4520 -+ {
4521 -+ if ((type & N_TYPE) == N_INDR
4522 -+ || type == N_WARNING)
4523 -+ skip_next = TRUE;
4524 -+ continue;
4525 -+ }
4526 -+
4527 -+ /* See if we are stripping this symbol. */
4528 -+ skip = FALSE;
4529 -+
4530 -+ /* Skip all debugger symbols. No way to output them in
4531 -+ DRI format. This will also reduce a lot of headaches. */
4532 -+ if ((type & N_STAB) != 0)
4533 -+ skip = TRUE;
4534 -+
4535 -+ switch (strip)
4536 -+ {
4537 -+ case strip_none:
4538 -+ case strip_debugger:
4539 -+ break;
4540 -+ case strip_some:
4541 -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE)
4542 -+ == NULL)
4543 -+ skip = TRUE;
4544 -+ break;
4545 -+ case strip_all:
4546 -+ skip = TRUE;
4547 -+ break;
4548 -+ }
4549 -+
4550 -+ if (skip)
4551 -+ {
4552 -+ if (h != NULL)
4553 -+ mark_written (h);
4554 -+ continue;
4555 -+ }
4556 -+
4557 -+ /* Get the value of the symbol. */
4558 -+ if ((type & N_TYPE) == N_TEXT
4559 -+ || type == N_WEAKT)
4560 -+ symsec = obj_textsec (input_bfd);
4561 -+ else if ((type & N_TYPE) == N_DATA
4562 -+ || type == N_WEAKD)
4563 -+ symsec = obj_datasec (input_bfd);
4564 -+ else if ((type & N_TYPE) == N_BSS
4565 -+ || type == N_WEAKB)
4566 -+ symsec = obj_bsssec (input_bfd);
4567 -+ else if ((type & N_TYPE) == N_ABS
4568 -+ || type == N_WEAKA)
4569 -+ symsec = bfd_abs_section_ptr;
4570 -+ else if (((type & N_TYPE) == N_INDR
4571 -+ && (hresolve == NULL
4572 -+ || (hresolve->root.type != bfd_link_hash_defined
4573 -+ && hresolve->root.type != bfd_link_hash_defweak
4574 -+ && hresolve->root.type != bfd_link_hash_common)))
4575 -+ || type == N_WARNING)
4576 -+ {
4577 -+ /* Pass the next symbol through unchanged. The
4578 -+ condition above for indirect symbols is so that if
4579 -+ the indirect symbol was defined, we output it with
4580 -+ the correct definition so the debugger will
4581 -+ understand it. */
4582 -+ pass = TRUE;
4583 -+ val = GET_WORD (input_bfd, sym->e_value);
4584 -+ symsec = NULL;
4585 -+ }
4586 -+ else
4587 -+ {
4588 -+ /* If we get here with an indirect symbol, it means that
4589 -+ we are outputting it with a real definition. In such
4590 -+ a case we do not want to output the next symbol,
4591 -+ which is the target of the indirection. */
4592 -+ if ((type & N_TYPE) == N_INDR)
4593 -+ skip_next = TRUE;
4594 -+
4595 -+ symsec = NULL;
4596 -+
4597 -+ /* We need to get the value from the hash table. We use
4598 -+ hresolve so that if we have defined an indirect
4599 -+ symbol we output the final definition. */
4600 -+ if (h == NULL)
4601 -+ {
4602 -+ switch (type & N_TYPE)
4603 -+ {
4604 -+ case N_SETT:
4605 -+ symsec = obj_textsec (input_bfd);
4606 -+ break;
4607 -+ case N_SETD:
4608 -+ symsec = obj_datasec (input_bfd);
4609 -+ break;
4610 -+ case N_SETB:
4611 -+ symsec = obj_bsssec (input_bfd);
4612 -+ break;
4613 -+ case N_SETA:
4614 -+ symsec = bfd_abs_section_ptr;
4615 -+ break;
4616 -+ default:
4617 -+ val = 0;
4618 -+ break;
4619 -+ }
4620 -+ }
4621 -+ else if (hresolve->root.type == bfd_link_hash_defined
4622 -+ || hresolve->root.type == bfd_link_hash_defweak)
4623 -+ {
4624 -+ asection *input_section;
4625 -+ asection *output_section;
4626 -+
4627 -+ /* This case usually means a common symbol which was
4628 -+ turned into a defined symbol. */
4629 -+ input_section = hresolve->root.u.def.section;
4630 -+ output_section = input_section->output_section;
4631 -+ BFD_ASSERT (bfd_is_abs_section (output_section)
4632 -+ || output_section->owner == abfd);
4633 -+
4634 -+ /* The following reference to the output section VMA
4635 -+ is commented out because DRI symbols are relative
4636 -+ to the beginning of the section. */
4637 -+ val = (hresolve->root.u.def.value
4638 -+ /*+ bfd_get_section_vma (abfd, output_section)*/
4639 -+ + input_section->output_offset);
4640 -+
4641 -+ /* TEXT symbols values must be adjusted
4642 -+ by adding the size of the extended header. */
4643 -+ if (output_section == obj_textsec (abfd))
4644 -+ val += TEXT_START_ADDR;
4645 -+
4646 -+ /* Get the correct type based on the section. If
4647 -+ this is a constructed set, force it to be
4648 -+ globally visible. */
4649 -+ if (type == N_SETT
4650 -+ || type == N_SETD
4651 -+ || type == N_SETB
4652 -+ || type == N_SETA)
4653 -+ type |= N_EXT;
4654 -+
4655 -+ type &=~ N_TYPE;
4656 -+
4657 -+ if (output_section == obj_textsec (abfd))
4658 -+ type |= N_TEXT;
4659 -+ else if (output_section == obj_datasec (abfd))
4660 -+ type |= N_DATA;
4661 -+ else if (output_section == obj_bsssec (abfd))
4662 -+ type |= N_BSS;
4663 -+ else
4664 -+ type |= N_ABS;
4665 -+ }
4666 -+ else if (hresolve->root.type == bfd_link_hash_common)
4667 -+ val = hresolve->root.u.c.size;
4668 -+ else if (hresolve->root.type == bfd_link_hash_undefweak)
4669 -+ {
4670 -+ val = 0;
4671 -+ type = N_UNDF;
4672 -+ }
4673 -+ else
4674 -+ val = 0;
4675 -+ }
4676 -+ if (symsec != NULL)
4677 -+ {
4678 -+ /* The following reference to the output section VMA
4679 -+ is commented out because DRI symbols are relative
4680 -+ to the beginning of the section. */
4681 -+ val = (/*symsec->output_section->vma
4682 -+ +*/ symsec->output_offset
4683 -+ + (GET_WORD (input_bfd, sym->e_value)
4684 -+ - symsec->vma));
4685 -+
4686 -+ /* TEXT symbols values must be adjusted
4687 -+ by adding the size of the extended header. */
4688 -+ if (symsec == obj_textsec (input_bfd))
4689 -+ val += TEXT_START_ADDR;
4690 -+ }
4691 -+
4692 -+ /* If this is a global symbol set the written flag, and if
4693 -+ it is a local symbol see if we should discard it. */
4694 -+ if (h != NULL)
4695 -+ {
4696 -+ mark_written (h);
4697 -+ }
4698 -+ else if ((type & N_TYPE) != N_SETT
4699 -+ && (type & N_TYPE) != N_SETD
4700 -+ && (type & N_TYPE) != N_SETB
4701 -+ && (type & N_TYPE) != N_SETA)
4702 -+ {
4703 -+ switch (discard)
4704 -+ {
4705 -+ case discard_none:
4706 -+ case discard_sec_merge:
4707 -+ break;
4708 -+ case discard_l:
4709 -+ if (bfd_is_local_label_name (input_bfd, name))
4710 -+ skip = TRUE;
4711 -+ break;
4712 -+ default:
4713 -+ case discard_all:
4714 -+ skip = TRUE;
4715 -+ break;
4716 -+ }
4717 -+ if (skip)
4718 -+ {
4719 -+ pass = FALSE;
4720 -+ continue;
4721 -+ }
4722 -+ }
4723 -+ }
4724 -+
4725 -+ /* Now find the nearest type in DRI format. */
4726 -+ switch (type)
4727 -+ {
4728 -+ case N_ABS:
4729 -+ case N_ABS | N_EXT:
4730 -+ case N_SETA:
4731 -+ case N_SETA | N_EXT:
4732 -+ case N_WEAKA:
4733 -+ a_type = A_EQU | A_DEF | A_GLOBL;
4734 -+ break;
4735 -+ case N_TEXT:
4736 -+ case N_TEXT | N_EXT:
4737 -+ case N_SETT:
4738 -+ case N_SETT | N_EXT:
4739 -+ case N_WEAKT:
4740 -+ a_type = A_TEXT | A_DEF | A_GLOBL;
4741 -+ break;
4742 -+ case N_DATA:
4743 -+ case N_DATA | N_EXT:
4744 -+ case N_SETD:
4745 -+ case N_SETD | N_EXT:
4746 -+ case N_WEAKD:
4747 -+ a_type = A_DATA | A_DEF | A_GLOBL;
4748 -+ break;
4749 -+ case N_BSS:
4750 -+ case N_BSS | N_EXT:
4751 -+ case N_SETB:
4752 -+ case N_SETB | N_EXT:
4753 -+ case N_WEAKB:
4754 -+ a_type = A_BSS | A_DEF | A_GLOBL;
4755 -+ break;
4756 -+ default:
4757 -+ continue;
4758 -+ }
4759 -+
4760 -+ written_bytes = write_dri_symbol (abfd, name, a_type, val);
4761 -+ if (written_bytes < 0)
4762 -+ return FALSE;
4763 -+
4764 -+ myinfo->symtab_size += written_bytes;
4765 -+ }
4766 -+ }
4767 -+
4768 -+ obj_aout_external_string_size (abfd) = 0;
4769 -+ return TRUE;
4770 -+}
4771 -+
4772 -+/* This is used for qsort to sort addresses
4773 -+ for the TPA relocation table. */
4774 -+
4775 -+static int
4776 -+vma_cmp (const void *v1, const void *v2)
4777 -+{
4778 -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2)));
4779 -+}
4780 -+
4781 -+/* Alloc and fill the TPA relocation table. */
4782 -+
4783 -+static bfd_boolean
4784 -+fill_tparel (bfd *abfd)
4785 -+{
4786 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
4787 -+ unsigned long i;
4788 -+ bfd_size_type bytes;
4789 -+ unsigned char *ptr;
4790 -+
4791 -+ /* Sort the relocation info. */
4792 -+ if (myinfo->relocs != NULL)
4793 -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma),
4794 -+ vma_cmp);
4795 -+
4796 -+ /* Now calculate the number of bytes we need. The relocation info
4797 -+ is encoded as follows: The first entry is a 32-bit value
4798 -+ denoting the first offset to relocate. All following entries
4799 -+ are relative to the preceding one. For relative offsets of
4800 -+ more than 254 bytes a value of 1 is used. The OS will then
4801 -+ add 254 bytes to the current offset. The list is then terminated
4802 -+ with the byte 0. */
4803 -+ bytes = 4; /* First entry is a long. */
4804 -+ for (i = 1; i < myinfo->relocs_used; i++)
4805 -+ {
4806 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
4807 -+ BFD_ASSERT(diff > 0);
4808 -+ bytes += (diff + 253) / 254;
4809 -+ }
4810 -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */
4811 -+ if (myinfo->relocs_used > 0)
4812 -+ bytes++;
4813 -+
4814 -+ myinfo->tparel_size = bytes;
4815 -+ myinfo->tparel = bfd_alloc (abfd, bytes);
4816 -+ if (myinfo->tparel == NULL)
4817 -+ return FALSE;
4818 -+
4819 -+ /* Now fill the array. */
4820 -+ ptr = (bfd_byte*) myinfo->tparel;
4821 -+ if (myinfo->relocs != NULL)
4822 -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr);
4823 -+ else
4824 -+ bfd_put_32 (abfd, 0, ptr);
4825 -+ ptr += 4;
4826 -+
4827 -+ for (i = 1; i < myinfo->relocs_used; i++)
4828 -+ {
4829 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
4830 -+ while (diff > 254)
4831 -+ {
4832 -+ *ptr++ = 1;
4833 -+ diff -= 254;
4834 -+ }
4835 -+ *ptr++ = (bfd_byte) diff;
4836 -+ }
4837 -+
4838 -+ if (myinfo->relocs_used > 0)
4839 -+ *ptr = 0;
4840 -+
4841 -+ return TRUE;
4842 -+}
4843 -+
4844 -+/* Final link routine. We need to use a call back to get the correct
4845 -+ offsets in the output file. And we need to malloc some internal
4846 -+ buffers. */
4847 -+
4848 -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link
4849 -+
4850 -+static bfd_boolean
4851 -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
4852 -+{
4853 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
4854 -+ struct bfd_link_hash_table *hash = info->hash;
4855 -+ enum bfd_link_strip original_strip = info->strip;
4856 -+
4857 -+ if (myinfo == NULL)
4858 -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info));
4859 -+
4860 -+ if (myinfo == NULL)
4861 -+ {
4862 -+ /* The internal function bfd_zalloc has already set the error
4863 -+ state to "out of memory". */
4864 -+ return FALSE;
4865 -+ }
4866 -+
4867 -+ obj_aout_ext (abfd) = myinfo;
4868 -+
4869 -+ myinfo->linkinfo = info;
4870 -+
4871 -+ /* Make sure that for now we never write zmagics. */
4872 -+ abfd->flags &= ~D_PAGED;
4873 -+
4874 -+ /* Find the __stksize symbol. This symbol is used for a MiNT
4875 -+ special kludge. The libc defines this symbol in an object file
4876 -+ initialized to a default value to make sure it is defined in
4877 -+ every output file. The start-up code in crtinit() then simply
4878 -+ sets the stacksize accordingly. In your programs (if they need
4879 -+ an unusual stacksize) you can then simply code:
4880 -+
4881 -+ long _stksize = 0x2000;
4882 -+
4883 -+ This will create a program stack of 2k. Since MiNT cannot detect
4884 -+ a stack overflow this is the only way to prevent program crashes
4885 -+ caused by a stack that is too small.
4886 -+
4887 -+ The ancient linker ignored this feature, the ancient strip
4888 -+ program paid heed to it. By default, strip never stripped this
4889 -+ special symbol from the binary.
4890 -+
4891 -+ Another program called ``printstk'' and its colleague ``fixstk''
4892 -+ could be used to either print the current value of the stacksize
4893 -+ or to modify it without recompiling and rebuilding. These
4894 -+ programs traversed the symbol table and then took the appropriate
4895 -+ measures if the symbol was found.
4896 -+
4897 -+ Here we do a different approach. Since we already expanded the
4898 -+ standard executable header we now hardcode the address (as a file
4899 -+ offset) that the __stksize symbol points to into the header. We
4900 -+ can now let strip safely remove the entry from the symbol table
4901 -+ and we're not dependent on a special format of the symbol table.
4902 -+ Because the address is kept in the header we will always be able
4903 -+ to manipulate the stacksize value later. */
4904 -+ if (hash != NULL)
4905 -+ {
4906 -+ struct aout_link_hash_entry *h =
4907 -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize",
4908 -+ FALSE, FALSE, FALSE);
4909 -+ asection *sec;
4910 -+
4911 -+ if (h != NULL)
4912 -+ {
4913 -+ switch (h->root.type)
4914 -+ {
4915 -+ case bfd_link_hash_defined:
4916 -+ case bfd_link_hash_defweak:
4917 -+ sec = h->root.u.def.section->output_section;
4918 -+ BFD_ASSERT (bfd_is_abs_section (sec)
4919 -+ || sec->owner == abfd);
4920 -+
4921 -+ myinfo->stkpos = (h->root.u.def.value + sec->vma
4922 -+ + h->root.u.def.section->output_offset
4923 -+ + 0x1c);
4924 -+ break;
4925 -+ case bfd_link_hash_common:
4926 -+ myinfo->stkpos = h->root.u.c.size + 0x1c;
4927 -+ break;
4928 -+ default: /* Ignore other types. */
4929 -+ break;
4930 -+ }
4931 -+ }
4932 -+ }
4933 -+
4934 -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
4935 -+ {
4936 -+ if (info->relocatable)
4937 -+ {
4938 -+ _bfd_error_handler ("warning: traditional format not supported for relocatable output");
4939 -+ }
4940 -+ else
4941 -+ {
4942 -+ myinfo->traditional_format = TRUE;
4943 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI;
4944 -+ }
4945 -+ }
4946 -+
4947 -+ /* Unconditionally unset the traditional flag. The only effect in
4948 -+ the a.out code is to disable string hashing (with respect to
4949 -+ SunOS gdx). This is not necessary for us. */
4950 -+
4951 -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT;
4952 -+
4953 -+ /* Do not write GNU symbols in traditional format. */
4954 -+ if (myinfo->traditional_format)
4955 -+ info->strip = strip_all;
4956 -+
4957 -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback)
4958 -+ != TRUE)
4959 -+ return FALSE;
4960 -+
4961 -+ if (myinfo->reloc_error)
4962 -+ return FALSE;
4963 -+
4964 -+ /* Restore the strip status for the traditional symbols. */
4965 -+ info->strip = original_strip;
4966 -+
4967 -+ if (myinfo->traditional_format
4968 -+ && link_write_traditional_syms (abfd, info) != TRUE)
4969 -+ return FALSE;
4970 -+
4971 -+ if (fill_tparel (abfd) != TRUE)
4972 -+ return FALSE;
4973 -+
4974 -+ return TRUE;
4975 -+}
4976 -+
4977 -+/* Copy backend specific data from one object module to another. */
4978 -+
4979 -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data
4980 -+
4981 -+static bfd_boolean
4982 -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *input_bfd, bfd *output_bfd)
4983 -+{
4984 -+ /* Our routine only makes sense if both the input and the output
4985 -+ bfd are MiNT program files. FIXME: It is not absolutely clear
4986 -+ to me if this function is a method of the input or the output
4987 -+ bfd. One part of the following AND relation is not redundant,
4988 -+ but which one? */
4989 -+ if (input_bfd->xvec == &m68kmint_prg_vec && output_bfd->xvec == &m68kmint_prg_vec)
4990 -+ {
4991 -+ struct mint_internal_info *myinfo_in = obj_aout_ext (input_bfd);
4992 -+ struct mint_internal_info *myinfo_out = obj_aout_ext (output_bfd);
4993 -+
4994 -+ BFD_ASSERT (myinfo_in != NULL);
4995 -+
4996 -+ if (myinfo_out == NULL)
4997 -+ {
4998 -+ myinfo_out = bfd_zalloc (output_bfd, sizeof (struct mint_internal_info));
4999 -+
5000 -+ if (myinfo_out == NULL)
5001 -+ {
5002 -+ /* The internal function bfd_zalloc has already set the error
5003 -+ state to "out of memory". */
5004 -+ return FALSE;
5005 -+ }
5006 -+
5007 -+ memcpy (myinfo_out, myinfo_in, sizeof (struct mint_internal_info));
5008 -+ myinfo_out->tparel = NULL;
5009 -+ obj_aout_ext (output_bfd) = myinfo_out;
5010 -+ }
5011 -+
5012 -+ if (myinfo_out->tparel != NULL)
5013 -+ free (myinfo_out->tparel);
5014 -+
5015 -+ if (myinfo_in->tparel != NULL)
5016 -+ {
5017 -+ if (bfd_seek (input_bfd, myinfo_in->tparel_pos, SEEK_SET) != 0)
5018 -+ return FALSE;
5019 -+
5020 -+ if (bfd_bread (myinfo_in->tparel, myinfo_in->tparel_size, input_bfd)
5021 -+ != myinfo_in->tparel_size)
5022 -+ return FALSE;
5023 -+ }
5024 -+ myinfo_out->tparel = bfd_alloc (output_bfd, myinfo_out->tparel_size);
5025 -+ if (myinfo_out->tparel == NULL)
5026 -+ return FALSE;
5027 -+
5028 -+ memcpy (myinfo_out->tparel, myinfo_in->tparel,
5029 -+ myinfo_out->tparel_size);
5030 -+ }
5031 -+ else if (input_bfd->xvec != &m68kmint_prg_vec)
5032 -+ {
5033 -+ /* Can this ever happen? FIXME! */
5034 -+ _bfd_error_handler ("error: the input file ``%s'' contains no", input_bfd->filename);
5035 -+ _bfd_error_handler ("TPA-relative relocation info.");
5036 -+
5037 -+ /* We will invalidate the output file so that no attempt is
5038 -+ made to actually run the image. Maybe we should return
5039 -+ FALSE instead but it is possible that some curious soul has
5040 -+ tried to objcopy onto our format for research reasons. */
5041 -+ _bfd_error_handler ("Will mark output file ``%s''");
5042 -+ _bfd_error_handler ("as non-executable.");
5043 -+ output_bfd->flags &= (~EXEC_P);
5044 -+ }
5045 -+
5046 -+ return TRUE; /*_bfd_generic_bfd_copy_private_bfd_data (input_bfd, output_bfd);*/
5047 -+}
5048 -+
5049 -+/* Find out the symbol name. */
5050 -+
5051 -+static const char *
5052 -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd,
5053 -+ bfd_byte *location, struct reloc_std_external *rel)
5054 -+{
5055 -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd);
5056 -+ char *strings = obj_aout_external_strings (input_bfd);
5057 -+ struct aout_link_hash_entry **sym_hashes
5058 -+ = obj_aout_sym_hashes (input_bfd);
5059 -+ struct aout_link_hash_entry *h = NULL;
5060 -+ const char *name;
5061 -+ bfd_size_type r_index;
5062 -+ int r_extern;
5063 -+
5064 -+ if (bfd_get_reloc_size (howto) != 4)
5065 -+ return "(not a symbol)";
5066 -+
5067 -+ /* The input bfd is always big-endian. There is no need to
5068 -+ call bfd_header_big_endian (input_bfd). */
5069 -+ r_index = ((rel->r_index[0] << 16)
5070 -+ | (rel->r_index[1] << 8)
5071 -+ | (rel->r_index[2]));
5072 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
5073 -+
5074 -+ if (sym_hashes != NULL)
5075 -+ h = sym_hashes[r_index];
5076 -+
5077 -+ if (!r_extern)
5078 -+ {
5079 -+ bfd_size_type i;
5080 -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location);
5081 -+
5082 -+ name = NULL;
5083 -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++)
5084 -+ {
5085 -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value);
5086 -+
5087 -+ if (this_value == wanted_value)
5088 -+ {
5089 -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type);
5090 -+
5091 -+ /* Skip debug symbols and the like. */
5092 -+ if ((symtype & N_STAB) != 0)
5093 -+ continue;
5094 -+
5095 -+ /* This is dirty but preferable to a plethoria of
5096 -+ single comparisons. */
5097 -+ if (symtype <= (N_BSS | N_EXT)
5098 -+ || (symtype >= N_WEAKU && symtype <= N_COMM))
5099 -+ {
5100 -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx);
5101 -+ break;
5102 -+ }
5103 -+ }
5104 -+ }
5105 -+
5106 -+ /* FIXME: If the relocation is against a section there is
5107 -+ probably a symbol for that section floating around somewhere
5108 -+ in the bfd jungle. */
5109 -+ if (name == NULL)
5110 -+ {
5111 -+ switch ((r_index & N_TYPE) & ~N_EXT)
5112 -+ {
5113 -+ case N_TEXT:
5114 -+ name = "text section";
5115 -+ break;
5116 -+ case N_DATA:
5117 -+ name = "data section";
5118 -+ break;
5119 -+ case N_BSS:
5120 -+ name = "bss section";
5121 -+ break;
5122 -+ case N_ABS:
5123 -+ name = "absolute section";
5124 -+ break;
5125 -+ default:
5126 -+ name = "unknown section";
5127 -+ break;
5128 -+ }
5129 -+ }
5130 -+ }
5131 -+ else if (h != NULL)
5132 -+ name = h->root.root.string;
5133 -+ else if (r_index >= obj_aout_external_sym_count (input_bfd))
5134 -+ name = "(unknown symbol)"; /* Shouldn't happen. */
5135 -+ else
5136 -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
5137 -+
5138 -+ return name;
5139 -+}
5140 -+
5141 -+/* This relocation routine is used by some of the backend linkers.
5142 -+ They do not construct asymbol or arelent structures, so there is no
5143 -+ reason for them to use bfd_perform_relocation. Also,
5144 -+ bfd_perform_relocation is so hacked up it is easier to write a new
5145 -+ function than to try to deal with it.
5146 -+
5147 -+ This routine does a final relocation. Whether it is useful for a
5148 -+ relocatable link depends upon how the object format defines
5149 -+ relocations.
5150 -+
5151 -+ FIXME: This routine ignores any special_function in the HOWTO,
5152 -+ since the existing special_function values have been written for
5153 -+ bfd_perform_relocation.
5154 -+
5155 -+ HOWTO is the reloc howto information.
5156 -+ INPUT_BFD is the BFD which the reloc applies to.
5157 -+ INPUT_SECTION is the section which the reloc applies to.
5158 -+ CONTENTS is the contents of the section.
5159 -+ ADDRESS is the address of the reloc within INPUT_SECTION.
5160 -+ VALUE is the value of the symbol the reloc refers to.
5161 -+ ADDEND is the addend of the reloc. */
5162 -+
5163 -+/* The additional parameter REL is specific to this backend.
5164 -+ This function is derived from _bfd_final_link_relocate()
5165 -+ found in reloc.c. It adds additional checking for dangerous
5166 -+ relocations in MiNT sharable text sections, then it records
5167 -+ the relocated offset in myinfo->relocs[] for further processing. */
5168 -+
5169 -+static bfd_reloc_status_type
5170 -+m68kmint_prg_final_link_relocate (reloc_howto_type *howto,
5171 -+ bfd *input_bfd,
5172 -+ asection *input_section,
5173 -+ bfd_byte *contents,
5174 -+ bfd_vma address,
5175 -+ bfd_vma value,
5176 -+ bfd_vma addend,
5177 -+ struct reloc_std_external *rel)
5178 -+{
5179 -+ bfd_vma relocation;
5180 -+ bfd *output_bfd = input_section->output_section->owner;
5181 -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd);
5182 -+ bfd_reloc_status_type retval;
5183 -+ int r_index;
5184 -+ int r_extern;
5185 -+ bfd_boolean need_tpa_relocation;
5186 -+
5187 -+ /* The input bfd is always big-endian. There is no need to
5188 -+ call bfd_header_big_endian (input_bfd). */
5189 -+ r_index = ((rel->r_index[0] << 16)
5190 -+ | (rel->r_index[1] << 8)
5191 -+ | (rel->r_index[2]));
5192 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
5193 -+
5194 -+#define _MINT_F_SHTEXT 0x800
5195 -+
5196 -+ /* Sanity check the address. */
5197 -+ if (address > bfd_get_section_limit (input_bfd, input_section))
5198 -+ return bfd_reloc_outofrange;
5199 -+
5200 -+ /* This function assumes that we are dealing with a basic relocation
5201 -+ against a symbol. We want to compute the value of the symbol to
5202 -+ relocate to. This is just VALUE, the value of the symbol, plus
5203 -+ ADDEND, any addend associated with the reloc. */
5204 -+ relocation = value + addend;
5205 -+
5206 -+ /* Check for dangerous relocations in images with a sharable
5207 -+ text section. */
5208 -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0
5209 -+ && bfd_get_reloc_size (howto) == 4)
5210 -+ {
5211 -+ bfd_boolean error_found = FALSE;
5212 -+ const char *name = NULL;
5213 -+
5214 -+ if (input_section == obj_textsec (input_bfd))
5215 -+ {
5216 -+ if (!r_extern)
5217 -+ {
5218 -+ /* This is a relocation against another section. Only
5219 -+ relocations against the text section are allowed. */
5220 -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT))
5221 -+ error_found = TRUE;
5222 -+ }
5223 -+ else if (relocation > (input_section->output_section->vma
5224 -+ + input_section->output_section->size))
5225 -+ {
5226 -+ error_found = TRUE;
5227 -+ }
5228 -+ else if (relocation == (input_section->output_section->vma
5229 -+ + input_section->output_section->size))
5230 -+ {
5231 -+ name = find_symbol_name (howto, input_bfd,
5232 -+ contents + address,
5233 -+ rel);
5234 -+ if (strcmp (name, "_etext") == 0)
5235 -+ error_found = FALSE;
5236 -+ }
5237 -+ }
5238 -+
5239 -+ if (error_found)
5240 -+ {
5241 -+ const struct bfd_link_callbacks *callbacks
5242 -+ = myinfo->linkinfo->callbacks;
5243 -+
5244 -+ myinfo->reloc_error = TRUE;
5245 -+
5246 -+ if (callbacks->reloc_dangerous != NULL)
5247 -+ {
5248 -+ if (name == NULL)
5249 -+ name = find_symbol_name (howto, input_bfd,
5250 -+ contents + address,
5251 -+ rel);
5252 -+
5253 -+ callbacks->reloc_dangerous (myinfo->linkinfo, name,
5254 -+ input_bfd,
5255 -+ input_section, address);
5256 -+ }
5257 -+ }
5258 -+ }
5259 -+
5260 -+ /* If the relocation is PC relative, we want to set RELOCATION to
5261 -+ the distance between the symbol (currently in RELOCATION) and the
5262 -+ location we are relocating. Some targets (e.g., i386-aout)
5263 -+ arrange for the contents of the section to be the negative of the
5264 -+ offset of the location within the section; for such targets
5265 -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF)
5266 -+ simply leave the contents of the section as zero; for such
5267 -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not
5268 -+ need to subtract out the offset of the location within the
5269 -+ section (which is just ADDRESS). */
5270 -+ if (howto->pc_relative)
5271 -+ {
5272 -+ relocation -= (input_section->output_section->vma
5273 -+ + input_section->output_offset);
5274 -+ if (howto->pcrel_offset)
5275 -+ relocation -= address;
5276 -+ }
5277 -+
5278 -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation,
5279 -+ contents + address);
5280 -+
5281 -+ /* The symbol has to be relocated again iff the length of the relocation
5282 -+ is 2 words and it is not pc relative. */
5283 -+ need_tpa_relocation = FALSE;
5284 -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4)
5285 -+ {
5286 -+ if (r_extern)
5287 -+ {
5288 -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd);
5289 -+ struct aout_link_hash_entry *h = sym_hashes[r_index];
5290 -+ asection *output_section = h->root.u.def.section->output_section;
5291 -+
5292 -+ /* Do not relocate absolute symbols. */
5293 -+ if (output_section == obj_textsec (output_bfd)
5294 -+ || output_section == obj_datasec (output_bfd)
5295 -+ || output_section == obj_bsssec (output_bfd))
5296 -+ {
5297 -+ need_tpa_relocation = TRUE;
5298 -+ }
5299 -+ }
5300 -+ else
5301 -+ {
5302 -+ need_tpa_relocation = TRUE;
5303 -+ }
5304 -+ }
5305 -+
5306 -+ /* Here we add the TPA relocation entries for the address references
5307 -+ located inside the input sections. Note that if some references
5308 -+ to addresses are generated using data statements in the linker
5309 -+ script, they will not be relocated here because they do not
5310 -+ belong to any input section. */
5311 -+ if (need_tpa_relocation)
5312 -+ {
5313 -+ bfd_vma tpa_address = input_section->output_section->vma
5314 -+ + input_section->output_offset + address;
5315 -+
5316 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address))
5317 -+ return bfd_reloc_other;
5318 -+ }
5319 -+
5320 -+ return retval;
5321 -+}
5322 -+
5323 -+/* Write out the TPA relocation table. */
5324 -+
5325 -+static bfd_boolean
5326 -+write_tparel (bfd *abfd, struct internal_exec *execp)
5327 -+{
5328 -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd);
5329 -+
5330 -+ if (myinfo->symtab_size == 0)
5331 -+ myinfo->tparel_pos = N_STROFF (*execp)
5332 -+ + obj_aout_external_string_size (abfd);
5333 -+ else
5334 -+ myinfo->tparel_pos = N_SYMOFF (*execp)
5335 -+ + myinfo->symtab_size;
5336 -+
5337 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0)
5338 -+ return FALSE;
5339 -+
5340 -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd)
5341 -+ != myinfo->tparel_size)
5342 -+ return FALSE;
5343 -+
5344 -+ return TRUE;
5345 -+}
5346 -+
5347 -+/* Write the full exec header.
5348 -+ This function must be called last to ensure that we have all the
5349 -+ information needed to fill the MiNT-specific header fields. */
5350 -+
5351 -+static bfd_boolean
5352 -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes)
5353 -+{
5354 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
5355 -+
5356 -+ if ((abfd->flags & EXEC_P) == 0)
5357 -+ bfd_h_put_16 (abfd, 0xdead, exec_bytes->g_branch);
5358 -+ else
5359 -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch);
5360 -+
5361 -+ /* The OS will load our extension header fields into the text segment. */
5362 -+ PUT_WORD (abfd, execp->a_text + EXEC_BYTES_SIZE - 28,
5363 -+ exec_bytes->g_text);
5364 -+ PUT_WORD (abfd, execp->a_data, exec_bytes->g_data);
5365 -+ PUT_WORD (abfd, execp->a_bss, exec_bytes->g_bss);
5366 -+
5367 -+ /* The OS' notion of the size of the symbol table is another than
5368 -+ the bfd library's. We have to fill in the size of the table
5369 -+ itself plus the size of the string table but only if we have not written
5370 -+ a traditional symbol table. If we have written a traditional symbol
5371 -+ table we know the size. */
5372 -+ if (myinfo->symtab_size != 0)
5373 -+ PUT_WORD (abfd, myinfo->symtab_size, exec_bytes->g_syms);
5374 -+ else
5375 -+ PUT_WORD (abfd, myinfo->tparel_pos - N_SYMOFF (*execp),
5376 -+ exec_bytes->g_syms);
5377 -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic);
5378 -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags);
5379 -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs);
5380 -+
5381 -+ /* Generate the jump instruction to the entry point. In m68k
5382 -+ assembler mnemnonics it looks more or less like this:
5383 -+
5384 -+ move.l exec_bytes->e_entry(pc),d0
5385 -+ jmp -6(pc,d0.l)
5386 -+
5387 -+ Sorry for the wrong syntax. As a real assembler addict I
5388 -+ never actually use an assembler. I edit my binaries manually
5389 -+ with a hex editor, looks much cooler and it strengthens your
5390 -+ abstraction abilities. */
5391 -+
5392 -+ exec_bytes->g_jump_entry[0] = 0x20;
5393 -+ exec_bytes->g_jump_entry[1] = 0x3a;
5394 -+ exec_bytes->g_jump_entry[2] = 0x00;
5395 -+ exec_bytes->g_jump_entry[3] = 0x1a;
5396 -+ exec_bytes->g_jump_entry[4] = 0x4e;
5397 -+ exec_bytes->g_jump_entry[5] = 0xfb;
5398 -+ exec_bytes->g_jump_entry[6] = 0x08;
5399 -+ exec_bytes->g_jump_entry[7] = 0xfa;
5400 -+
5401 -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos);
5402 -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size);
5403 -+
5404 -+ PUT_WORD (abfd, myinfo->stkpos, exec_bytes->g_stkpos);
5405 -+ PUT_WORD (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format);
5406 -+
5407 -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0));
5408 -+
5409 -+ /* The standard stuff. */
5410 -+ NAME(aout,swap_exec_header_out) (abfd, execp, exec_bytes);
5411 -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU)
5412 -+ PUT_WORD (abfd, 0, exec_bytes->e_syms);
5413 -+
5414 -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
5415 -+ return FALSE;
5416 -+
5417 -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd)
5418 -+ != EXEC_BYTES_SIZE)
5419 -+ return FALSE;
5420 -+
5421 -+ return TRUE;
5422 -+}
5423 -+
5424 -+/* Write an object file.
5425 -+ Section contents have already been written. We write the
5426 -+ file header, symbols, and relocation. */
5427 -+
5428 -+#define MY_write_object_contents m68kmint_prg_write_object_contents
5429 -+
5430 -+static bfd_boolean
5431 -+m68kmint_prg_write_object_contents (bfd *abfd)
5432 -+{
5433 -+ struct external_exec exec_bytes;
5434 -+ struct internal_exec *execp = exec_hdr (abfd);
5435 -+ bfd_size_type text_size;
5436 -+ file_ptr text_end;
5437 -+
5438 -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
5439 -+
5440 -+ /* Most of the following code come from the WRITE_HEADERS macro
5441 -+ found in libaout.h. */
5442 -+
5443 -+ if (adata(abfd).magic == undecided_magic)
5444 -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
5445 -+
5446 -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
5447 -+ execp->a_entry = bfd_get_start_address (abfd);
5448 -+
5449 -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) *
5450 -+ obj_reloc_entry_size (abfd));
5451 -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
5452 -+ obj_reloc_entry_size (abfd));
5453 -+
5454 -+ /* Now write out reloc info, followed by syms and strings. */
5455 -+
5456 -+ if (bfd_get_outsymbols (abfd) != NULL
5457 -+ && bfd_get_symcount (abfd) != 0)
5458 -+ {
5459 -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
5460 -+ return FALSE;
5461 -+
5462 -+ if (! NAME (aout, write_syms) (abfd))
5463 -+ return FALSE;
5464 -+ }
5465 -+
5466 -+ if (write_tparel (abfd, execp) != TRUE)
5467 -+ return FALSE;
5468 -+
5469 -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE)
5470 -+ return FALSE;
5471 -+
5472 -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
5473 -+ return FALSE;
5474 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
5475 -+ return FALSE;
5476 -+
5477 -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
5478 -+ return FALSE;
5479 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
5480 -+ return FALSE;
5481 -+
5482 -+ return TRUE;
5483 -+}
5484 -+
5485 -+#include "aout-target.h"
5486 -+
5487 -+/* Set the executable flags.
5488 -+ It is called by the linker emulation script. */
5489 -+
5490 -+bfd_boolean
5491 -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags)
5492 -+{
5493 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
5494 -+
5495 -+ BFD_ASSERT(abfd != NULL && abfd->xvec == &m68kmint_prg_vec);
5496 -+
5497 -+ if (myinfo == NULL)
5498 -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info));
5499 -+
5500 -+ if (myinfo == NULL)
5501 -+ {
5502 -+ /* The internal function bfd_zalloc has already set the error
5503 -+ state to "out of memory". */
5504 -+ return FALSE;
5505 -+ }
5506 -+
5507 -+ obj_aout_ext (abfd) = myinfo;
5508 -+
5509 -+ myinfo->prg_flags = prg_flags;
5510 -+
5511 -+ return TRUE;
5512 -+}
5513 -+
5514 -+/* Add a TPA relocation entry.
5515 -+ It is called by BFD when linking the input sections, and by the
5516 -+ linker when it generates a reference to an address (in particular,
5517 -+ when building the constructors list). */
5518 -+
5519 -+bfd_boolean
5520 -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address)
5521 -+{
5522 -+ struct mint_internal_info *myinfo;
5523 -+
5524 -+ BFD_ASSERT(abfd != NULL && abfd->xvec == &m68kmint_prg_vec);
5525 -+
5526 -+ /* Ensure that myinfo is set up. */
5527 -+ myinfo = obj_aout_ext (abfd);
5528 -+ if (myinfo == NULL)
5529 -+ {
5530 -+ myinfo = bfd_zalloc (abfd, sizeof (struct mint_internal_info));
5531 -+ if (myinfo == NULL)
5532 -+ return FALSE;
5533 -+
5534 -+ obj_aout_ext (abfd) = myinfo;
5535 -+ }
5536 -+
5537 -+ /* Enlarge the buffer if necessary. */
5538 -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated)
5539 -+ {
5540 -+ bfd_vma *newbuf;
5541 -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE;
5542 -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated);
5543 -+ if (newbuf == NULL)
5544 -+ return FALSE;
5545 -+
5546 -+ myinfo->relocs = newbuf;
5547 -+ }
5548 -+
5549 -+ /* The TPA relative relocation actually just adds the address of
5550 -+ the text segment (i. e. beginning of the executable in memory)
5551 -+ to the addresses at the specified locations. This allows an
5552 -+ executable to be loaded everywhere in the address space without
5553 -+ memory management. */
5554 -+ myinfo->relocs[myinfo->relocs_used++] = address;
5555 -+
5556 -+ return TRUE;
5557 -+}
5558 -diff -aurN binutils-2.18/bfd/targets.c binutils-2.18-mint-20080228/bfd/targets.c
5559 ---- binutils-2.18/bfd/targets.c 2007-08-06 21:59:42.000000000 +0200
5560 -+++ binutils-2.18-mint-20080228/bfd/targets.c 2008-02-28 09:47:00.062500000 +0100
5561 -@@ -731,6 +731,7 @@
5562 - extern const bfd_target m68kcoff_vec;
5563 - extern const bfd_target m68kcoffun_vec;
5564 - extern const bfd_target m68klinux_vec;
5565 -+extern const bfd_target m68kmint_prg_vec;
5566 - extern const bfd_target m68knetbsd_vec;
5567 - extern const bfd_target m68ksysvcoff_vec;
5568 - extern const bfd_target m88kbcs_vec;
5569 -diff -aurN binutils-2.18/binutils/configure binutils-2.18-mint-20080228/binutils/configure
5570 ---- binutils-2.18/binutils/configure 2007-08-06 22:29:42.000000000 +0200
5571 -+++ binutils-2.18-mint-20080228/binutils/configure 2008-02-28 09:47:00.312500000 +0100
5572 -@@ -13459,7 +13459,7 @@
5573 -
5574 -
5575 - case "${host}" in
5576 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
5577 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
5578 -
5579 - cat >>confdefs.h <<\_ACEOF
5580 - #define USE_BINARY_FOPEN 1
5581 -diff -aurN binutils-2.18/binutils/dlltool.c binutils-2.18-mint-20080228/binutils/dlltool.c
5582 ---- binutils-2.18/binutils/dlltool.c 2007-08-06 21:55:10.000000000 +0200
5583 -+++ binutils-2.18-mint-20080228/binutils/dlltool.c 2008-02-28 09:47:00.328125000 +0100
5584 -@@ -3520,7 +3520,7 @@
5585 - if (*cp == '-')
5586 - dash = cp;
5587 - if (
5588 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
5589 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
5590 - *cp == ':' || *cp == '\\' ||
5591 - #endif
5592 - *cp == '/')
5593 -diff -aurN binutils-2.18/binutils/dllwrap.c binutils-2.18-mint-20080228/binutils/dllwrap.c
5594 ---- binutils-2.18/binutils/dllwrap.c 2007-08-06 21:55:10.000000000 +0200
5595 -+++ binutils-2.18-mint-20080228/binutils/dllwrap.c 2008-02-28 09:47:00.328125000 +0100
5596 -@@ -251,7 +251,7 @@
5597 - dash = cp;
5598 -
5599 - if (
5600 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
5601 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
5602 - *cp == ':' || *cp == '\\' ||
5603 - #endif
5604 - *cp == '/')
5605 -diff -aurN binutils-2.18/binutils/resrc.c binutils-2.18-mint-20080228/binutils/resrc.c
5606 ---- binutils-2.18/binutils/resrc.c 2007-08-06 21:56:14.000000000 +0200
5607 -+++ binutils-2.18-mint-20080228/binutils/resrc.c 2008-02-28 09:47:00.328125000 +0100
5608 -@@ -396,7 +396,7 @@
5609 - *space = 0;
5610 -
5611 - if (
5612 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32)
5613 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__)
5614 - strchr (cmd, '\\') ||
5615 - #endif
5616 - strchr (cmd, '/'))
5617 -@@ -507,7 +507,7 @@
5618 - if (*cp == '-')
5619 - dash = cp;
5620 - if (
5621 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32)
5622 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__)
5623 - *cp == ':' || *cp == '\\' ||
5624 - #endif
5625 - *cp == '/')
5626 -diff -aurN binutils-2.18/gas/config/tc-m68k.c binutils-2.18-mint-20080228/gas/config/tc-m68k.c
5627 ---- binutils-2.18/gas/config/tc-m68k.c 2007-08-06 22:00:00.000000000 +0200
5628 -+++ binutils-2.18-mint-20080228/gas/config/tc-m68k.c 2008-02-28 09:47:00.781250000 +0100
5629 -@@ -799,7 +799,7 @@
5630 - {"even", s_even, 0},
5631 - {"skip", s_space, 0},
5632 - {"proc", s_proc, 0},
5633 --#if defined (TE_SUN3) || defined (OBJ_ELF)
5634 -+#if defined (TE_SUN3) || defined (TE_MINT) || defined (OBJ_ELF)
5635 - {"align", s_align_bytes, 0},
5636 - #endif
5637 - #ifdef OBJ_ELF
5638 -diff -aurN binutils-2.18/gas/config/te-mint.h binutils-2.18-mint-20080228/gas/config/te-mint.h
5639 ---- binutils-2.18/gas/config/te-mint.h 1970-01-01 01:00:00.000000000 +0100
5640 -+++ binutils-2.18-mint-20080228/gas/config/te-mint.h 2008-02-28 09:47:00.781250000 +0100
5641 -@@ -0,0 +1,30 @@
5642 -+/* Copyright 2008 Free Software Foundation, Inc.
5643 -+
5644 -+ This file is part of GAS, the GNU Assembler.
5645 -+
5646 -+ GAS is free software; you can redistribute it and/or modify
5647 -+ it under the terms of the GNU General Public License as
5648 -+ published by the Free Software Foundation; either version 3,
5649 -+ or (at your option) any later version.
5650 -+
5651 -+ GAS is distributed in the hope that it will be useful, but
5652 -+ WITHOUT ANY WARRANTY; without even the implied warranty of
5653 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
5654 -+ the GNU General Public License for more details.
5655 -+
5656 -+ You should have received a copy of the GNU General Public License
5657 -+ along with GAS; see the file COPYING. If not, write to the Free
5658 -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
5659 -+ 02110-1301, USA. */
5660 -+
5661 -+#define TE_MINT
5662 -+
5663 -+#define LOCAL_LABELS_DOLLAR 1
5664 -+#define LOCAL_LABELS_FB 1
5665 -+
5666 -+/* These define interfaces. */
5667 -+#ifdef OBJ_HEADER
5668 -+#include OBJ_HEADER
5669 -+#else
5670 -+#include "obj-format.h"
5671 -+#endif
5672 -diff -aurN binutils-2.18/gas/configure.tgt binutils-2.18-mint-20080228/gas/configure.tgt
5673 ---- binutils-2.18/gas/configure.tgt 2007-08-28 19:19:36.000000000 +0200
5674 -+++ binutils-2.18-mint-20080228/gas/configure.tgt 2008-02-28 09:47:00.796875000 +0100
5675 -@@ -254,6 +254,7 @@
5676 - m68k-*-linux-*) fmt=elf em=linux ;;
5677 - m68k-*-uclinux*) fmt=elf ;;
5678 - m68k-*-gnu*) fmt=elf ;;
5679 -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;;
5680 - m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
5681 - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
5682 - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
5683 -diff -aurN binutils-2.18/include/filenames.h binutils-2.18-mint-20080228/include/filenames.h
5684 ---- binutils-2.18/include/filenames.h 2007-03-29 23:03:43.000000000 +0200
5685 -+++ binutils-2.18-mint-20080228/include/filenames.h 2008-02-28 09:47:00.796875000 +0100
5686 -@@ -26,7 +26,7 @@
5687 - #ifndef FILENAMES_H
5688 - #define FILENAMES_H
5689 -
5690 --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
5691 -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__)
5692 -
5693 - #ifndef HAVE_DOS_BASED_FILE_SYSTEM
5694 - #define HAVE_DOS_BASED_FILE_SYSTEM 1
5695 -diff -aurN binutils-2.18/include/getopt.h binutils-2.18-mint-20080228/include/getopt.h
5696 ---- binutils-2.18/include/getopt.h 2005-05-10 12:21:08.000000000 +0200
5697 -+++ binutils-2.18-mint-20080228/include/getopt.h 2008-02-28 09:47:00.812500000 +0100
5698 -@@ -106,7 +106,7 @@
5699 - to find the declaration so provide a fully prototyped one. If it
5700 - is 1, we found it so don't provide any declaration at all. */
5701 - #if !HAVE_DECL_GETOPT
5702 --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
5703 -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT)
5704 - /* Many other libraries have conflicting prototypes for getopt, with
5705 - differences in the consts, in unistd.h. To avoid compilation
5706 - errors, only prototype getopt for the GNU C library. */
5707 -diff -aurN binutils-2.18/ld/Makefile.am binutils-2.18-mint-20080228/ld/Makefile.am
5708 ---- binutils-2.18/ld/Makefile.am 2007-08-06 22:00:17.000000000 +0200
5709 -+++ binutils-2.18-mint-20080228/ld/Makefile.am 2008-02-28 09:47:00.843750000 +0100
5710 -@@ -266,6 +266,7 @@
5711 - em68kelf.o \
5712 - em68kelfnbsd.o \
5713 - em68klinux.o \
5714 -+ em68kmint.o \
5715 - em68knbsd.o \
5716 - em68kpsos.o \
5717 - em88kbcs.o \
5718 -@@ -1194,6 +1195,10 @@
5719 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
5720 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
5721 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
5722 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
5723 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
5724 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
5725 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
5726 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
5727 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
5728 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
5729 -diff -aurN binutils-2.18/ld/Makefile.in binutils-2.18-mint-20080228/ld/Makefile.in
5730 ---- binutils-2.18/ld/Makefile.in 2007-08-06 22:29:54.000000000 +0200
5731 -+++ binutils-2.18-mint-20080228/ld/Makefile.in 2008-02-28 09:47:00.859375000 +0100
5732 -@@ -513,6 +513,7 @@
5733 - em68kelf.o \
5734 - em68kelfnbsd.o \
5735 - em68klinux.o \
5736 -+ em68kmint.o \
5737 - em68knbsd.o \
5738 - em68kpsos.o \
5739 - em88kbcs.o \
5740 -@@ -2020,6 +2021,10 @@
5741 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
5742 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
5743 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
5744 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
5745 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
5746 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
5747 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
5748 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
5749 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
5750 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
5751 -diff -aurN binutils-2.18/ld/configure binutils-2.18-mint-20080228/ld/configure
5752 ---- binutils-2.18/ld/configure 2007-08-12 20:53:33.000000000 +0200
5753 -+++ binutils-2.18-mint-20080228/ld/configure 2008-02-28 09:47:01.203125000 +0100
5754 -@@ -11885,7 +11885,7 @@
5755 -
5756 -
5757 - case "${host}" in
5758 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
5759 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
5760 -
5761 - cat >>confdefs.h <<\_ACEOF
5762 - #define USE_BINARY_FOPEN 1
5763 -diff -aurN binutils-2.18/ld/configure.tgt binutils-2.18-mint-20080228/ld/configure.tgt
5764 ---- binutils-2.18/ld/configure.tgt 2007-08-28 19:19:42.000000000 +0200
5765 -+++ binutils-2.18-mint-20080228/ld/configure.tgt 2008-02-28 09:47:01.203125000 +0100
5766 -@@ -326,6 +326,7 @@
5767 - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
5768 - m68k-*-uclinux*) targ_emul=m68kelf ;;
5769 - m68*-*-gnu*) targ_emul=m68kelf ;;
5770 -+m68*-*-mint*) targ_emul=m68kmint ;;
5771 - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
5772 - targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
5773 - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
5774 -diff -aurN binutils-2.18/ld/emulparams/m68kmint.sh binutils-2.18-mint-20080228/ld/emulparams/m68kmint.sh
5775 ---- binutils-2.18/ld/emulparams/m68kmint.sh 1970-01-01 01:00:00.000000000 +0100
5776 -+++ binutils-2.18-mint-20080228/ld/emulparams/m68kmint.sh 2008-02-28 09:47:01.218750000 +0100
5777 -@@ -0,0 +1,5 @@
5778 -+SCRIPT_NAME=m68kmint
5779 -+OUTPUT_FORMAT="a.out-mintprg"
5780 -+TEXT_START_ADDR=0xe4
5781 -+ARCH=m68k
5782 -+EXTRA_EM_FILE=mint
5783 -diff -aurN binutils-2.18/ld/emultempl/generic.em binutils-2.18-mint-20080228/ld/emultempl/generic.em
5784 ---- binutils-2.18/ld/emultempl/generic.em 2007-08-06 22:00:22.000000000 +0200
5785 -+++ binutils-2.18-mint-20080228/ld/emultempl/generic.em 2008-02-28 09:47:01.218750000 +0100
5786 -@@ -138,8 +138,8 @@
5787 - ${LDEMUL_PLACE_ORPHAN-NULL},
5788 - ${LDEMUL_SET_SYMBOLS-NULL},
5789 - ${LDEMUL_PARSE_ARGS-NULL},
5790 -- NULL, /* add_options */
5791 -- NULL, /* handle_option */
5792 -+ ${LDEMUL_ADD_OPTIONS-NULL},
5793 -+ ${LDEMUL_HANDLE_OPTION-NULL},
5794 - ${LDEMUL_UNRECOGNIZED_FILE-NULL},
5795 - ${LDEMUL_LIST_OPTIONS-NULL},
5796 - ${LDEMUL_RECOGNIZED_FILE-NULL},
5797 -diff -aurN binutils-2.18/ld/emultempl/mint.em binutils-2.18-mint-20080228/ld/emultempl/mint.em
5798 ---- binutils-2.18/ld/emultempl/mint.em 1970-01-01 01:00:00.000000000 +0100
5799 -+++ binutils-2.18-mint-20080228/ld/emultempl/mint.em 2008-02-28 09:47:01.234375000 +0100
5800 -@@ -0,0 +1,294 @@
5801 -+# This shell script emits a C file. -*- C -*-
5802 -+# Copyright 2006, 2007 Free Software Foundation, Inc.
5803 -+#
5804 -+# This file is part of the GNU Binutils.
5805 -+#
5806 -+# This program is free software; you can redistribute it and/or modify
5807 -+# it under the terms of the GNU General Public License as published by
5808 -+# the Free Software Foundation; either version 3 of the License, or
5809 -+# (at your option) any later version.
5810 -+#
5811 -+# This program is distributed in the hope that it will be useful,
5812 -+# but WITHOUT ANY WARRANTY; without even the implied warranty of
5813 -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5814 -+# GNU General Public License for more details.
5815 -+#
5816 -+# You should have received a copy of the GNU General Public License
5817 -+# along with this program; if not, write to the Free Software
5818 -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
5819 -+# MA 02110-1301, USA.
5820 -+#
5821 -+
5822 -+# This file is sourced from generic.em
5823 -+#
5824 -+fragment <<EOF
5825 -+
5826 -+#include "ldgram.h"
5827 -+
5828 -+/* Standard GEMDOS program flags. */
5829 -+#define _MINT_F_FASTLOAD 0x01 /* Don't clear heap. */
5830 -+#define _MINT_F_ALTLOAD 0x02 /* OK to load in alternate RAM. */
5831 -+#define _MINT_F_ALTALLOC 0x04 /* OK to malloc from alt. RAM. */
5832 -+#define _MINT_F_BESTFIT 0x08 /* Load with optimal heap size. */
5833 -+/* The memory flags are mutually exclusive. */
5834 -+#define _MINT_F_MEMPROTECTION 0xf0 /* Masks out protection bits. */
5835 -+#define _MINT_F_MEMPRIVATE 0x00 /* Memory is private. */
5836 -+#define _MINT_F_MEMGLOBAL 0x10 /* Read/write access to mem allowed. */
5837 -+#define _MINT_F_MEMSUPER 0x20 /* Only supervisor access allowed. */
5838 -+#define _MINT_F_MEMREADABLE 0x30 /* Any read access OK. */
5839 -+#define _MINT_F_SHTEXT 0x800 /* Program's text may be shared */
5840 -+
5841 -+/* Option flags. */
5842 -+static flagword prg_flags = (_MINT_F_FASTLOAD | _MINT_F_ALTLOAD
5843 -+ | _MINT_F_ALTALLOC | _MINT_F_MEMPRIVATE);
5844 -+
5845 -+/* MiNT format extra command line options. */
5846 -+
5847 -+/* Used for setting flags in the MiNT header. */
5848 -+#define OPTION_FASTLOAD (300)
5849 -+#define OPTION_NO_FASTLOAD (OPTION_FASTLOAD + 1)
5850 -+#define OPTION_FASTRAM (OPTION_NO_FASTLOAD + 1)
5851 -+#define OPTION_NO_FASTRAM (OPTION_FASTRAM + 1)
5852 -+#define OPTION_FASTALLOC (OPTION_NO_FASTRAM + 1)
5853 -+#define OPTION_NO_FASTALLOC (OPTION_FASTALLOC + 1)
5854 -+#define OPTION_BESTFIT (OPTION_NO_FASTALLOC + 1)
5855 -+#define OPTION_NO_BESTFIT (OPTION_BESTFIT + 1)
5856 -+#define OPTION_BASEREL (OPTION_NO_BESTFIT + 1)
5857 -+#define OPTION_NO_BASEREL (OPTION_BASEREL + 1)
5858 -+#define OPTION_MEM_PRIVATE (OPTION_NO_BASEREL + 1)
5859 -+#define OPTION_MEM_GLOBAL (OPTION_MEM_PRIVATE + 1)
5860 -+#define OPTION_MEM_SUPER (OPTION_MEM_GLOBAL + 1)
5861 -+#define OPTION_MEM_READONLY (OPTION_MEM_SUPER + 1)
5862 -+#define OPTION_PRG_FLAGS (OPTION_MEM_READONLY + 1)
5863 -+
5864 -+static void
5865 -+gld${EMULATION_NAME}_add_options
5866 -+ (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
5867 -+ struct option **longopts, int nrl ATTRIBUTE_UNUSED,
5868 -+ struct option **really_longopts ATTRIBUTE_UNUSED)
5869 -+{
5870 -+ static const struct option xtra_long[] = {
5871 -+ {"mfastload", no_argument, NULL, OPTION_FASTLOAD},
5872 -+ {"mno-fastload", no_argument, NULL, OPTION_NO_FASTLOAD},
5873 -+ {"mfastram", no_argument, NULL, OPTION_FASTRAM},
5874 -+ {"mno-fastram", no_argument, NULL, OPTION_NO_FASTRAM},
5875 -+ {"maltram", no_argument, NULL, OPTION_FASTRAM},
5876 -+ {"mno-altram", no_argument, NULL, OPTION_NO_FASTRAM},
5877 -+ {"mfastalloc", no_argument, NULL, OPTION_FASTALLOC},
5878 -+ {"mno-fastalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
5879 -+ {"maltalloc", no_argument, NULL, OPTION_FASTALLOC},
5880 -+ {"mno-altalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
5881 -+ {"mbest-fit", no_argument, NULL, OPTION_BESTFIT},
5882 -+ {"mno-best-fit", no_argument, NULL, OPTION_NO_BESTFIT},
5883 -+ {"mbaserel", no_argument, NULL, OPTION_BASEREL},
5884 -+ {"mno-baserel", no_argument, NULL, OPTION_NO_BASEREL},
5885 -+ {"mshared-text", no_argument, NULL, OPTION_BASEREL},
5886 -+ {"mno-shared-text", no_argument, NULL, OPTION_NO_BASEREL},
5887 -+ {"msharable-text", no_argument, NULL, OPTION_BASEREL},
5888 -+ {"mno-sharable-text", no_argument, NULL, OPTION_NO_BASEREL},
5889 -+ /* Memory protection bits. */
5890 -+ {"mprivate-memory", no_argument, NULL, OPTION_MEM_PRIVATE },
5891 -+ {"mglobal-memory", no_argument, NULL, OPTION_MEM_GLOBAL},
5892 -+ {"msuper-memory", no_argument, NULL, OPTION_MEM_SUPER},
5893 -+ {"mreadable-memory", no_argument, NULL, OPTION_MEM_READONLY},
5894 -+ {"mreadonly-memory", no_argument, NULL, OPTION_MEM_READONLY},
5895 -+ {"mprg-flags", required_argument, NULL, OPTION_PRG_FLAGS},
5896 -+ {NULL, no_argument, NULL, 0}
5897 -+ };
5898 -+
5899 -+ *longopts = (struct option *)
5900 -+ xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
5901 -+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
5902 -+}
5903 -+
5904 -+static bfd_boolean
5905 -+gld${EMULATION_NAME}_handle_option (int optc)
5906 -+{
5907 -+ switch (optc)
5908 -+ {
5909 -+ default:
5910 -+ return FALSE;
5911 -+
5912 -+ case OPTION_FASTLOAD:
5913 -+ prg_flags |= _MINT_F_FASTLOAD;
5914 -+ break;
5915 -+
5916 -+ case OPTION_NO_FASTLOAD:
5917 -+ prg_flags &= ~_MINT_F_FASTLOAD;
5918 -+ break;
5919 -+
5920 -+ case OPTION_FASTRAM:
5921 -+ prg_flags |= _MINT_F_ALTLOAD;
5922 -+ break;
5923 -+
5924 -+ case OPTION_NO_FASTRAM:
5925 -+ prg_flags &= ~_MINT_F_ALTLOAD;
5926 -+ break;
5927 -+
5928 -+ case OPTION_FASTALLOC:
5929 -+ prg_flags |= _MINT_F_ALTALLOC;
5930 -+ break;
5931 -+
5932 -+ case OPTION_NO_FASTALLOC:
5933 -+ prg_flags &= ~_MINT_F_ALTALLOC;
5934 -+ break;
5935 -+
5936 -+ case OPTION_BESTFIT:
5937 -+ prg_flags |= _MINT_F_BESTFIT;
5938 -+ break;
5939 -+
5940 -+ case OPTION_NO_BESTFIT:
5941 -+ prg_flags &= ~_MINT_F_BESTFIT;
5942 -+ break;
5943 -+
5944 -+ case OPTION_BASEREL:
5945 -+ prg_flags |= _MINT_F_SHTEXT;
5946 -+ break;
5947 -+
5948 -+ case OPTION_NO_BASEREL:
5949 -+ prg_flags &= ~_MINT_F_SHTEXT;
5950 -+ break;
5951 -+
5952 -+ case OPTION_MEM_PRIVATE:
5953 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
5954 -+ break;
5955 -+
5956 -+ case OPTION_MEM_GLOBAL:
5957 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
5958 -+ prg_flags |= _MINT_F_MEMPRIVATE;
5959 -+ break;
5960 -+
5961 -+ case OPTION_MEM_SUPER:
5962 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
5963 -+ prg_flags |= _MINT_F_MEMSUPER;
5964 -+ break;
5965 -+
5966 -+ case OPTION_MEM_READONLY:
5967 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
5968 -+ prg_flags |= _MINT_F_MEMREADABLE;
5969 -+ break;
5970 -+
5971 -+ case OPTION_PRG_FLAGS:
5972 -+ {
5973 -+ char* tail;
5974 -+ unsigned long flag_value = strtoul (optarg, &tail, 0);
5975 -+ if (*tail != '\0')
5976 -+ {
5977 -+ einfo (_("%P: warning: ignoring invalid program flags %s\n"), optarg);
5978 -+ }
5979 -+ else
5980 -+ {
5981 -+ prg_flags = flag_value;
5982 -+ }
5983 -+ break;
5984 -+ }
5985 -+ }
5986 -+ return TRUE;
5987 -+}
5988 -+
5989 -+/* This callback is called when ld is invoked
5990 -+ with the --help and --target-help options. */
5991 -+
5992 -+static void
5993 -+gld_${EMULATION_NAME}_list_options (FILE *file)
5994 -+{
5995 -+ fprintf (file, _(" --m[no-]fastload Enable/Disable not cleaning the heap on startup\n"));
5996 -+ fprintf (file, _(" --m[no-]altram, --m[no-]fastram\n"));
5997 -+ fprintf (file, _(" Enable/Disable loading into alternate RAM\n"));
5998 -+ fprintf (file, _(" --m[no-]altalloc, --m[no-]fastalloc\n"));
5999 -+ fprintf (file, _(" Enable/Disable malloc from alternate RAM\n"));
6000 -+ fprintf (file, _(" --m[no-]best-fit Enable/Disable loading with optimal heap size\n"));
6001 -+ fprintf (file, _(" --m[no-]sharable-text, --m[no-]shared-text, --m[no-]baserel\n"));
6002 -+ fprintf (file, _(" Enable/Disable sharing the text segment\n"));
6003 -+ fprintf (file, "\n");
6004 -+ fprintf (file, _("The following memory options are mutually exclusive:\n"));
6005 -+ fprintf (file, _(" --mprivate-memory Process memory is not accessible\n"));
6006 -+ fprintf (file, _(" --mglobal-memory Process memory is readable and writable\n"));
6007 -+ fprintf (file, _(" --msuper-memory Process memory is accessible in supervisor mode\n"));
6008 -+ fprintf (file, _(" --mreadonly-memory, --mreadable-memory\n"));
6009 -+ fprintf (file, _(" Process memory is readable but not writable\n"));
6010 -+ fprintf (file, "\n");
6011 -+ fprintf (file, _(" --mprg-flags <value> Set all the flags with an integer raw value\n"));
6012 -+}
6013 -+
6014 -+/* This callback is called by lang_for_each_statement. It checks that the
6015 -+ output sections speficied in the linker script are compatible with the MiNT
6016 -+ executable format. */
6017 -+
6018 -+static void
6019 -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s)
6020 -+{
6021 -+ if (s->header.type == lang_output_section_statement_enum)
6022 -+ {
6023 -+ lang_output_section_statement_type *oss = &s->output_section_statement;
6024 -+
6025 -+ ASSERT(oss->processed_vma);
6026 -+
6027 -+ if (strcmp(oss->bfd_section->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR})
6028 -+ einfo ("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n",
6029 -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma);
6030 -+ else if (strcmp(oss->bfd_section->name, ".data") == 0 && oss->addr_tree != NULL)
6031 -+ einfo ("%F%P: the VMA of section %A must not be specified\n",
6032 -+ oss->bfd_section);
6033 -+ else if (strcmp(oss->bfd_section->name, ".bss") == 0 && oss->addr_tree != NULL)
6034 -+ einfo ("%F%P: the VMA of section %A must not be specified\n",
6035 -+ oss->bfd_section);
6036 -+ }
6037 -+}
6038 -+
6039 -+/* This callback is called by lang_for_each_statement. It looks for the data
6040 -+ statements of type REL generated by the linker, and adds a TPA relocation
6041 -+ entry for them. This is used by the CONSTRUCTORS list. */
6042 -+
6043 -+static void
6044 -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s)
6045 -+{
6046 -+ if (s->header.type == lang_data_statement_enum)
6047 -+ {
6048 -+ lang_data_statement_type *ds = &s->data_statement;
6049 -+
6050 -+ if (ds->exp->type.node_code == REL)
6051 -+ {
6052 -+ if (ds->type == LONG)
6053 -+ {
6054 -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset;
6055 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address))
6056 -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd);
6057 -+ }
6058 -+ else
6059 -+ {
6060 -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"),
6061 -+ link_info.output_bfd, ds->output_section, ds->output_offset);
6062 -+ }
6063 -+ }
6064 -+ }
6065 -+}
6066 -+
6067 -+/* Final emulation specific call. */
6068 -+
6069 -+static void
6070 -+gld${EMULATION_NAME}_finish (void)
6071 -+{
6072 -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */
6073 -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0)
6074 -+ return;
6075 -+
6076 -+ /* Check the output sections. */
6077 -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections);
6078 -+
6079 -+ /* Set the MiNT executable header flags. */
6080 -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags))
6081 -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd);
6082 -+
6083 -+ /* Generate TPA relocation entries for the data statements. */
6084 -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs);
6085 -+}
6086 -+
6087 -+EOF
6088 -+
6089 -+# Put these extra routines in ld_${EMULATION_NAME}_emulation
6090 -+#
6091 -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options
6092 -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option
6093 -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options
6094 -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
6095 -diff -aurN binutils-2.18/ld/scripttempl/m68kmint.sc binutils-2.18-mint-20080228/ld/scripttempl/m68kmint.sc
6096 ---- binutils-2.18/ld/scripttempl/m68kmint.sc 1970-01-01 01:00:00.000000000 +0100
6097 -+++ binutils-2.18-mint-20080228/ld/scripttempl/m68kmint.sc 2008-02-28 09:47:01.250000000 +0100
6098 -@@ -0,0 +1,31 @@
6099 -+cat <<EOF
6100 -+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
6101 -+${RELOCATING+${LIB_SEARCH_DIRS}}
6102 -+SECTIONS
6103 -+{
6104 -+ /* The VMA of the .text segment is ${TEXT_START_ADDR} instead of 0
6105 -+ because the extended MiNT header is just before. */
6106 -+ .text ${TEXT_START_ADDR} :
6107 -+ {
6108 -+ CREATE_OBJECT_SYMBOLS
6109 -+ *(.text)
6110 -+ ${CONSTRUCTING+CONSTRUCTORS}
6111 -+ ${RELOCATING+_etext = .;}
6112 -+ ${RELOCATING+__etext = .;}
6113 -+ }
6114 -+ .data :
6115 -+ {
6116 -+ *(.data)
6117 -+ ${RELOCATING+_edata = .;}
6118 -+ ${RELOCATING+__edata = .;}
6119 -+ }
6120 -+ .bss :
6121 -+ {
6122 -+ ${RELOCATING+__bss_start = .;}
6123 -+ *(.bss)
6124 -+ *(COMMON)
6125 -+ ${RELOCATING+_end = .;}
6126 -+ ${RELOCATING+__end = .;}
6127 -+ }
6128 -+}
6129 -+EOF
6130 -diff -aurN binutils-2.18/libiberty/hex.c binutils-2.18-mint-20080228/libiberty/hex.c
6131 ---- binutils-2.18/libiberty/hex.c 2007-01-31 21:25:23.000000000 +0100
6132 -+++ binutils-2.18-mint-20080228/libiberty/hex.c 2008-02-28 09:47:01.265625000 +0100
6133 -@@ -24,7 +24,7 @@
6134 - #include "libiberty.h"
6135 - #include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
6136 -
6137 --#if EOF != -1
6138 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
6139 - #error "hex.c requires EOF == -1"
6140 - #endif
6141 -
6142 -diff -aurN binutils-2.18/libiberty/safe-ctype.c binutils-2.18-mint-20080228/libiberty/safe-ctype.c
6143 ---- binutils-2.18/libiberty/safe-ctype.c 2005-05-10 17:33:33.000000000 +0200
6144 -+++ binutils-2.18-mint-20080228/libiberty/safe-ctype.c 2008-02-28 09:47:01.281250000 +0100
6145 -@@ -119,7 +119,7 @@
6146 - #include <safe-ctype.h>
6147 - #include <stdio.h> /* for EOF */
6148 -
6149 --#if EOF != -1
6150 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
6151 - #error "<safe-ctype.h> requires EOF == -1"
6152 - #endif
6153 -
6154
6155 diff --git a/sys-devel/binutils/files/binutils-2.18.50.0.7-mint2.patch b/sys-devel/binutils/files/binutils-2.18.50.0.7-mint2.patch
6156 deleted file mode 100644
6157 index 0e83571..0000000
6158 --- a/sys-devel/binutils/files/binutils-2.18.50.0.7-mint2.patch
6159 +++ /dev/null
6160 @@ -1,94 +0,0 @@
6161 -diff -aurN binutils-2.18.50.0.5/bfd/configure binutils-2.18.50.0.5.mint/bfd/configure
6162 ---- binutils-2.18.50.0.5/bfd/configure Wed Apr 2 11:51:30 2008
6163 -+++ binutils-2.18.50.0.5.mint/bfd/configure Wed Apr 2 12:11:16 2008
6164 -@@ -6925,7 +6925,7 @@
6165 - # Instead, we relocate shared libraries at runtime.
6166 - ;;
6167 -
6168 -- msdosdjgpp*)
6169 -+ msdosdjgpp* | mint*)
6170 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6171 - # on systems that don't support them.
6172 - lt_prog_compiler_can_build_shared=no
6173 -diff -aurN binutils-2.18.50.0.5/binutils/configure binutils-2.18.50.0.5.mint/binutils/configure
6174 ---- binutils-2.18.50.0.5/binutils/configure Wed Apr 2 11:51:34 2008
6175 -+++ binutils-2.18.50.0.5.mint/binutils/configure Wed Apr 2 12:09:40 2008
6176 -@@ -6755,7 +6755,7 @@
6177 - # Instead, we relocate shared libraries at runtime.
6178 - ;;
6179 -
6180 -- msdosdjgpp*)
6181 -+ msdosdjgpp* | mint*)
6182 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6183 - # on systems that don't support them.
6184 - lt_prog_compiler_can_build_shared=no
6185 -diff -aurN binutils-2.18.50.0.5/gas/configure binutils-2.18.50.0.5.mint/gas/configure
6186 ---- binutils-2.18.50.0.5/gas/configure Fri Mar 14 19:23:02 2008
6187 -+++ binutils-2.18.50.0.5.mint/gas/configure Wed Apr 2 12:12:36 2008
6188 -@@ -6753,7 +6753,7 @@
6189 - # Instead, we relocate shared libraries at runtime.
6190 - ;;
6191 -
6192 -- msdosdjgpp*)
6193 -+ msdosdjgpp* | mint*)
6194 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6195 - # on systems that don't support them.
6196 - lt_prog_compiler_can_build_shared=no
6197 -diff -aurN binutils-2.18.50.0.5/gprof/configure binutils-2.18.50.0.5.mint/gprof/configure
6198 ---- binutils-2.18.50.0.5/gprof/configure Fri Mar 14 19:23:02 2008
6199 -+++ binutils-2.18.50.0.5.mint/gprof/configure Wed Apr 2 12:10:04 2008
6200 -@@ -6833,7 +6833,7 @@
6201 - # Instead, we relocate shared libraries at runtime.
6202 - ;;
6203 -
6204 -- msdosdjgpp*)
6205 -+ msdosdjgpp* | mint*)
6206 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6207 - # on systems that don't support them.
6208 - lt_prog_compiler_can_build_shared=no
6209 -diff -aurN binutils-2.18.50.0.5/ld/configure binutils-2.18.50.0.5.mint/ld/configure
6210 ---- binutils-2.18.50.0.5/ld/configure Wed Apr 2 11:51:44 2008
6211 -+++ binutils-2.18.50.0.5.mint/ld/configure Wed Apr 2 12:16:22 2008
6212 -@@ -6987,7 +6987,7 @@
6213 - # Instead, we relocate shared libraries at runtime.
6214 - ;;
6215 -
6216 -- msdosdjgpp*)
6217 -+ msdosdjgpp* | mint*)
6218 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6219 - # on systems that don't support them.
6220 - lt_prog_compiler_can_build_shared=no
6221 -diff -aurN binutils-2.18.50.0.5/libiberty/configure binutils-2.18.50.0.5.mint/libiberty/configure
6222 ---- binutils-2.18.50.0.5/libiberty/configure Wed Aug 1 14:11:52 2007
6223 -+++ binutils-2.18.50.0.5.mint/libiberty/configure Wed Apr 2 12:08:36 2008
6224 -@@ -3715,6 +3715,7 @@
6225 - frag=
6226 - case "${host}" in
6227 - *-*-cygwin*) ;;
6228 -+ *-*-mint*) ;;
6229 - alpha*-*-linux*) PICFLAG=-fPIC ;;
6230 - arm*-*-*) PICFLAG=-fPIC ;;
6231 - hppa*-*-*) PICFLAG=-fPIC ;;
6232 -diff -aurN binutils-2.18.50.0.5/libiberty/configure.ac binutils-2.18.50.0.5.mint/libiberty/configure.ac
6233 ---- binutils-2.18.50.0.5/libiberty/configure.ac Wed Aug 1 14:11:52 2007
6234 -+++ binutils-2.18.50.0.5.mint/libiberty/configure.ac Wed Apr 2 12:08:12 2008
6235 -@@ -203,6 +203,7 @@
6236 - frag=
6237 - case "${host}" in
6238 - *-*-cygwin*) ;;
6239 -+ *-*-mint*) ;;
6240 - alpha*-*-linux*) PICFLAG=-fPIC ;;
6241 - arm*-*-*) PICFLAG=-fPIC ;;
6242 - hppa*-*-*) PICFLAG=-fPIC ;;
6243 -diff -aurN binutils-2.18.50.0.5/opcodes/configure binutils-2.18.50.0.5.mint/opcodes/configure
6244 ---- binutils-2.18.50.0.5/opcodes/configure Fri Mar 14 19:23:02 2008
6245 -+++ binutils-2.18.50.0.5.mint/opcodes/configure Wed Apr 2 12:15:24 2008
6246 -@@ -6921,7 +6921,7 @@
6247 - # Instead, we relocate shared libraries at runtime.
6248 - ;;
6249 -
6250 -- msdosdjgpp*)
6251 -+ msdosdjgpp* | mint*)
6252 - # Just because we use GCC doesn't mean we suddenly get shared libraries
6253 - # on systems that don't support them.
6254 - lt_prog_compiler_can_build_shared=no
6255
6256 diff --git a/sys-devel/binutils/files/binutils-2.18.50.0.9-reloc.patch b/sys-devel/binutils/files/binutils-2.18.50.0.9-reloc.patch
6257 deleted file mode 100644
6258 index f839798..0000000
6259 --- a/sys-devel/binutils/files/binutils-2.18.50.0.9-reloc.patch
6260 +++ /dev/null
6261 @@ -1,20 +0,0 @@
6262 -http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/write.c.diff?cvsroot=src&r1=1.118&r2=1.119
6263 -
6264 -===================================================================
6265 -RCS file: /cvs/src/src/gas/write.c,v
6266 -retrieving revision 1.118
6267 -retrieving revision 1.119
6268 -diff -u -r1.118 -r1.119
6269 ---- src/gas/write.c 2008/08/20 13:43:32 1.118
6270 -+++ src/gas/write.c 2008/09/15 13:53:17 1.119
6271 -@@ -1090,8 +1090,8 @@
6272 - && (sym = *reloc->sym_ptr_ptr) != NULL
6273 - && (sym->flags & BSF_KEEP) == 0
6274 - && ((sym->flags & BSF_SECTION_SYM) == 0
6275 -- || !EMIT_SECTION_SYMBOLS
6276 -- || !bfd_is_abs_section (sym->section)))
6277 -+ || (EMIT_SECTION_SYMBOLS
6278 -+ && !bfd_is_abs_section (sym->section))))
6279 - as_bad_where (file, line, _("redefined symbol cannot be used on reloc"));
6280 -
6281 - s = bfd_install_relocation (stdoutput, reloc,
6282
6283 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
6284 deleted file mode 100644
6285 index ad7a74a..0000000
6286 --- a/sys-devel/binutils/files/binutils-2.18.50.0.9-solaris-eh-frame.patch
6287 +++ /dev/null
6288 @@ -1,183 +0,0 @@
6289 -From binutils-return-56479-listarch-binutils=sources dot redhat dot com at sourceware dot org Thu Sep 25 17:25:25 2008
6290 -Return-Path: <binutils-return-56479-listarch-binutils=sources dot redhat dot com at sourceware dot org>
6291 -Delivered-To: listarch-binutils at sources dot redhat dot com
6292 -Received: (qmail 10710 invoked by alias); 25 Sep 2008 17:25:25 -0000
6293 -Received: (qmail 10674 invoked by uid 22791); 25 Sep 2008 17:25:24 -0000
6294 -X-Spam-Check-By: sourceware.org
6295 -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
6296 -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)
6297 -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)
6298 -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 <binutils@××××××××××.org>; Thu, 25 Sep 2008 19:24:21 +0200 (CEST)
6299 -From: Eric Botcazou <ebotcazou at adacore dot com>
6300 -To: binutils at sourceware dot org
6301 -Subject: [PATCH] Fix EH frame problem on Solaris
6302 -Date: Thu, 25 Sep 2008 19:25:16 +0200
6303 -User-Agent: KMail/1.9.6 (enterprise 20070904.708012)
6304 -MIME-Version: 1.0
6305 -Content-Type: Multipart/Mixed; boundary="Boundary-00=_8l82Iz/Ftp2txSB"
6306 -Message-Id: <200809251925.16322.ebotcazou@×××××××.com>
6307 -Mailing-List: contact binutils-help at sourceware dot org; run by ezmlm
6308 -Precedence: bulk
6309 -List-Id: <binutils.sourceware.org>
6310 -List-Subscribe: <mailto:binutils-subscribe at sourceware dot org>
6311 -List-Archive: <http://sourceware.org/ml/binutils/>
6312 -List-Post: <mailto:binutils at sourceware dot org>
6313 -List-Help: <mailto:binutils-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
6314 -Sender: binutils-owner at sourceware dot org
6315 -Delivered-To: mailing list binutils at sourceware dot org
6316 -
6317 -
6318 ---Boundary-00=_8l82Iz/Ftp2txSB
6319 -Content-Type: text/plain;
6320 - charset="us-ascii"
6321 -Content-Transfer-Encoding: 7bit
6322 -Content-Disposition: inline
6323 -
6324 -Hi,
6325 -
6326 -EH is broken with GCC mainline on Solaris (both SPARC and x86) if you use the
6327 -combination GCC + GAS + Sun ld: FDEs from libgcc_eh.a are not found in the
6328 -final executable by the unwinder; therefore it immediately aborts.
6329 -
6330 -The problem is that the Sun linker doesn't merge read-only and read-write
6331 -sections into a single read-write section. This was working fine when GCC
6332 -was emitting the EH frame itself because GCC features a configure check,
6333 -namely HAVE_LD_RO_RW_SECTION_MIXING, that forces the section to be writable
6334 -if it fails. Now GAS is emitting the EH frame, sometimes read-only and
6335 -sometimes read-write depending on the relocations, and this breaks.
6336 -
6337 -Fixed by defining DWARF2_EH_FRAME_READ_ONLY to 0 on Solaris, tested both on
6338 -SPARC and x86. OK for mainline and 2.19 branch?
6339 -
6340 -
6341 -2008-09-25 Eric Botcazou <ebotcazou@×××××××.com>
6342 -
6343 -gas/
6344 - * Makefile.am (TARG_ENV_HFILES): Add config/te-solaris.h.
6345 - * Makefile.in (TARG_ENV_HFILES): Likewise.
6346 - * configure.tgt (Solaris targets): Set em=solaris.
6347 - * config/te-solaris.h: New file.
6348 -
6349 -
6350 ---
6351 -Eric Botcazou
6352 -
6353 ---Boundary-00=_8l82Iz/Ftp2txSB
6354 -Content-Type: text/x-diff;
6355 - charset="us-ascii";
6356 - name="p.diff"
6357 -Content-Transfer-Encoding: 7bit
6358 -Content-Disposition: attachment;
6359 - filename="p.diff"
6360 -
6361 -? config/te-solaris.h
6362 -Index: Makefile.am
6363 -===================================================================
6364 -RCS file: /cvs/src/src/gas/Makefile.am,v
6365 -retrieving revision 1.159.2.1
6366 -diff -u -r1.159.2.1 Makefile.am
6367 ---- Makefile.am 9 Sep 2008 08:02:18 -0000 1.159.2.1
6368 -+++ Makefile.am 25 Sep 2008 14:48:03 -0000
6369 -@@ -406,6 +406,7 @@
6370 - config/te-pe.h \
6371 - config/te-psos.h \
6372 - config/te-riscix.h \
6373 -+ config/te-solaris.h \
6374 - config/te-sparcaout.h \
6375 - config/te-sun3.h \
6376 - config/te-svr4.h \
6377 -Index: Makefile.in
6378 -===================================================================
6379 -RCS file: /cvs/src/src/gas/Makefile.in,v
6380 -retrieving revision 1.177.2.1
6381 -diff -u -r1.177.2.1 Makefile.in
6382 ---- Makefile.in 9 Sep 2008 08:02:18 -0000 1.177.2.1
6383 -+++ Makefile.in 25 Sep 2008 14:48:03 -0000
6384 -@@ -653,6 +653,7 @@
6385 - config/te-pe.h \
6386 - config/te-psos.h \
6387 - config/te-riscix.h \
6388 -+ config/te-solaris.h \
6389 - config/te-sparcaout.h \
6390 - config/te-sun3.h \
6391 - config/te-svr4.h \
6392 -Index: configure.tgt
6393 -===================================================================
6394 -RCS file: /cvs/src/src/gas/configure.tgt,v
6395 -retrieving revision 1.41
6396 -diff -u -r1.41 configure.tgt
6397 ---- configure.tgt 7 Jul 2008 16:43:06 -0000 1.41
6398 -+++ configure.tgt 25 Sep 2008 14:48:03 -0000
6399 -@@ -198,7 +198,7 @@
6400 - i386-*-linux-*) fmt=elf em=linux ;;
6401 - i386-*-lynxos*) fmt=elf em=lynx ;;
6402 - i386-*-sysv[45]*) fmt=elf ;;
6403 -- i386-*-solaris*) fmt=elf ;;
6404 -+ i386-*-solaris*) fmt=elf em=solaris ;;
6405 - i386-*-freebsdaout*) fmt=aout em=386bsd ;;
6406 - i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
6407 - i386-*-freebsd[12]) fmt=aout em=386bsd ;;
6408 -@@ -322,7 +322,7 @@
6409 - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
6410 - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
6411 - ppc-*-linux-*) fmt=elf em=linux ;;
6412 -- ppc-*-solaris*) fmt=elf ;;
6413 -+ ppc-*-solaris*) fmt=elf em=solaris ;;
6414 - ppc-*-rtems*) fmt=elf ;;
6415 - ppc-*-macos*) fmt=coff em=macos ;;
6416 - ppc-*-nto*) fmt=elf ;;
6417 -@@ -362,7 +362,7 @@
6418 - sparc-fujitsu-none) fmt=aout ;;
6419 - sparc-*-elf) fmt=elf ;;
6420 - sparc-*-sysv4*) fmt=elf ;;
6421 -- sparc-*-solaris*) fmt=elf ;;
6422 -+ sparc-*-solaris*) fmt=elf em=solaris ;;
6423 - sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
6424 - sparc-*-netbsd*)
6425 - case ${cpu} in
6426 -@@ -408,7 +408,8 @@
6427 - *-*-generic) fmt=generic ;;
6428 - *-*-xray | *-*-hms) fmt=coff ;;
6429 - *-*-sim) fmt=coff ;;
6430 -- *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf ;;
6431 -+ *-*-elf | *-*-sysv4*) fmt=elf ;;
6432 -+ *-*-solaris*) fmt=elf em=solaris ;;
6433 - *-*-aros*) fmt=elf em=linux ;;
6434 - *-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;;
6435 - *-*-netware) fmt=elf em=netware ;;
6436 ---- /dev/null 2007-09-21 21:12:45.000000000 +0200
6437 -+++ config/te-solaris.h 2008-09-25 12:18:57.000000000 +0200
6438 -@@ -0,0 +1,30 @@
6439 -+/* Copyright 2008 Free Software Foundation, Inc.
6440 -+
6441 -+ This file is part of GAS, the GNU Assembler.
6442 -+
6443 -+ GAS is free software; you can redistribute it and/or modify
6444 -+ it under the terms of the GNU General Public License as
6445 -+ published by the Free Software Foundation; either version 3,
6446 -+ or (at your option) any later version.
6447 -+
6448 -+ GAS is distributed in the hope that it will be useful, but
6449 -+ WITHOUT ANY WARRANTY; without even the implied warranty of
6450 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
6451 -+ the GNU General Public License for more details.
6452 -+
6453 -+ You should have received a copy of the GNU General Public License
6454 -+ along with GAS; see the file COPYING. If not, write to the Free
6455 -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
6456 -+ 02110-1301, USA. */
6457 -+
6458 -+#define TE_SOLARIS
6459 -+
6460 -+#define LOCAL_LABELS_DOLLAR 1
6461 -+#define LOCAL_LABELS_FB 1
6462 -+
6463 -+/* The Sun linker doesn't merge read-only and read-write sections into
6464 -+ a single read-write section so we must force all EH frame sections
6465 -+ to be read-write. */
6466 -+#define DWARF2_EH_FRAME_READ_ONLY 0
6467 -+
6468 -+#include "obj-format.h"
6469 -
6470 ---Boundary-00=_8l82Iz/Ftp2txSB--
6471 -
6472
6473 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
6474 deleted file mode 100644
6475 index 8b67f27..0000000
6476 --- a/sys-devel/binutils/files/binutils-2.19.1-hppa-hpux.patch
6477 +++ /dev/null
6478 @@ -1,444 +0,0 @@
6479 ---- ./bfd/configure.orig 2009-06-10 15:13:14.000000000 +0200
6480 -+++ ./bfd/configure 2009-06-10 15:14:58.000000000 +0200
6481 -@@ -8373,20 +8373,20 @@
6482 -
6483 - hpux10*)
6484 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6485 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6486 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6487 - else
6488 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6489 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6490 -+ hardcode_libdir_flag_spec_ld='+b $libdir'
6491 - fi
6492 - if test "$with_gnu_ld" = no; then
6493 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6494 -- hardcode_libdir_flag_spec_ld='+b $libdir'
6495 - hardcode_libdir_separator=:
6496 - hardcode_direct=yes
6497 - hardcode_direct_absolute=yes
6498 - export_dynamic_flag_spec='${wl}-E'
6499 - # hardcode_minus_L: Not really in the search PATH,
6500 - # but as the default location of the library.
6501 -- hardcode_minus_L=yes
6502 -+ hardcode_minus_L=no
6503 - fi
6504 - ;;
6505 -
6506 -@@ -8400,7 +8400,7 @@
6507 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6508 - ;;
6509 - *)
6510 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6511 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6512 - ;;
6513 - esac
6514 - else
6515 -@@ -8412,7 +8412,7 @@
6516 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6517 - ;;
6518 - *)
6519 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6520 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6521 - ;;
6522 - esac
6523 - fi
6524 -@@ -8423,7 +8423,6 @@
6525 - case $host_cpu in
6526 - hppa*64*|ia64*)
6527 - hardcode_direct=no
6528 -- hardcode_shlibpath_var=no
6529 - ;;
6530 - *)
6531 - hardcode_direct=yes
6532 -@@ -8432,7 +8431,7 @@
6533 -
6534 - # hardcode_minus_L: Not really in the search PATH,
6535 - # but as the default location of the library.
6536 -- hardcode_minus_L=yes
6537 -+ hardcode_minus_L=no
6538 - ;;
6539 - esac
6540 - fi
6541 -@@ -9307,6 +9306,9 @@
6542 - ;;
6543 - *)
6544 - shrext_cmds='.sl'
6545 -+ case $host_os in hpux9*) ;;
6546 -+ *) hardcode_into_libs=yes ;;
6547 -+ esac
6548 - dynamic_linker="$host_os dld.sl"
6549 - shlibpath_var=SHLIB_PATH
6550 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6551 ---- ./gas/configure.orig 2009-06-10 11:10:54.000000000 +0200
6552 -+++ ./gas/configure 2009-06-10 11:38:05.000000000 +0200
6553 -@@ -8202,20 +8202,20 @@
6554 -
6555 - hpux10*)
6556 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6557 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6558 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6559 - else
6560 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6561 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6562 -+ hardcode_libdir_flag_spec_ld='+b $libdir'
6563 - fi
6564 - if test "$with_gnu_ld" = no; then
6565 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6566 -- hardcode_libdir_flag_spec_ld='+b $libdir'
6567 - hardcode_libdir_separator=:
6568 - hardcode_direct=yes
6569 - hardcode_direct_absolute=yes
6570 - export_dynamic_flag_spec='${wl}-E'
6571 - # hardcode_minus_L: Not really in the search PATH,
6572 - # but as the default location of the library.
6573 -- hardcode_minus_L=yes
6574 -+ hardcode_minus_L=no
6575 - fi
6576 - ;;
6577 -
6578 -@@ -8229,7 +8229,7 @@
6579 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6580 - ;;
6581 - *)
6582 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6583 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6584 - ;;
6585 - esac
6586 - else
6587 -@@ -8241,7 +8241,7 @@
6588 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6589 - ;;
6590 - *)
6591 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6592 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6593 - ;;
6594 - esac
6595 - fi
6596 -@@ -8252,7 +8252,6 @@
6597 - case $host_cpu in
6598 - hppa*64*|ia64*)
6599 - hardcode_direct=no
6600 -- hardcode_shlibpath_var=no
6601 - ;;
6602 - *)
6603 - hardcode_direct=yes
6604 -@@ -8261,7 +8260,7 @@
6605 -
6606 - # hardcode_minus_L: Not really in the search PATH,
6607 - # but as the default location of the library.
6608 -- hardcode_minus_L=yes
6609 -+ hardcode_minus_L=no
6610 - ;;
6611 - esac
6612 - fi
6613 -@@ -9136,6 +9135,9 @@
6614 - ;;
6615 - *)
6616 - shrext_cmds='.sl'
6617 -+ case $host_os in hpux9*) ;;
6618 -+ *) hardcode_into_libs=yes ;;
6619 -+ esac
6620 - dynamic_linker="$host_os dld.sl"
6621 - shlibpath_var=SHLIB_PATH
6622 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6623 ---- ./opcodes/configure.orig 2009-06-10 11:10:54.000000000 +0200
6624 -+++ ./opcodes/configure 2009-06-10 11:39:06.000000000 +0200
6625 -@@ -8369,12 +8369,12 @@
6626 -
6627 - hpux10*)
6628 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6629 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6630 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6631 - else
6632 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6633 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6634 -+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6635 - fi
6636 - if test "$with_gnu_ld" = no; then
6637 -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6638 - hardcode_libdir_flag_spec_ld='+b $libdir'
6639 - hardcode_libdir_separator=:
6640 - hardcode_direct=yes
6641 -@@ -8382,7 +8382,7 @@
6642 - export_dynamic_flag_spec='${wl}-E'
6643 - # hardcode_minus_L: Not really in the search PATH,
6644 - # but as the default location of the library.
6645 -- hardcode_minus_L=yes
6646 -+ hardcode_minus_L=no
6647 - fi
6648 - ;;
6649 -
6650 -@@ -8396,7 +8396,7 @@
6651 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6652 - ;;
6653 - *)
6654 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6655 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6656 - ;;
6657 - esac
6658 - else
6659 -@@ -8408,7 +8408,7 @@
6660 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6661 - ;;
6662 - *)
6663 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6664 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6665 - ;;
6666 - esac
6667 - fi
6668 -@@ -8419,7 +8419,6 @@
6669 - case $host_cpu in
6670 - hppa*64*|ia64*)
6671 - hardcode_direct=no
6672 -- hardcode_shlibpath_var=no
6673 - ;;
6674 - *)
6675 - hardcode_direct=yes
6676 -@@ -8428,7 +8427,7 @@
6677 -
6678 - # hardcode_minus_L: Not really in the search PATH,
6679 - # but as the default location of the library.
6680 -- hardcode_minus_L=yes
6681 -+ hardcode_minus_L=no
6682 - ;;
6683 - esac
6684 - fi
6685 -@@ -9303,6 +9302,9 @@
6686 - ;;
6687 - *)
6688 - shrext_cmds='.sl'
6689 -+ case $host_os in hpux9*) ;;
6690 -+ *) hardcode_into_libs=yes ;;
6691 -+ esac
6692 - dynamic_linker="$host_os dld.sl"
6693 - shlibpath_var=SHLIB_PATH
6694 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6695 ---- ./ld/configure.orig 2009-06-10 11:10:54.000000000 +0200
6696 -+++ ./ld/configure 2009-06-10 11:40:23.000000000 +0200
6697 -@@ -8493,20 +8493,20 @@
6698 -
6699 - hpux10*)
6700 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6701 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6702 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6703 - else
6704 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6705 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6706 -+ hardcode_libdir_flag_spec_ld='+b $libdir'
6707 - fi
6708 - if test "$with_gnu_ld" = no; then
6709 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6710 -- hardcode_libdir_flag_spec_ld='+b $libdir'
6711 - hardcode_libdir_separator=:
6712 - hardcode_direct=yes
6713 - hardcode_direct_absolute=yes
6714 - export_dynamic_flag_spec='${wl}-E'
6715 - # hardcode_minus_L: Not really in the search PATH,
6716 - # but as the default location of the library.
6717 -- hardcode_minus_L=yes
6718 -+ hardcode_minus_L=no
6719 - fi
6720 - ;;
6721 -
6722 -@@ -8520,7 +8520,7 @@
6723 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6724 - ;;
6725 - *)
6726 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6727 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6728 - ;;
6729 - esac
6730 - else
6731 -@@ -8532,7 +8532,7 @@
6732 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6733 - ;;
6734 - *)
6735 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6736 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6737 - ;;
6738 - esac
6739 - fi
6740 -@@ -8552,7 +8552,7 @@
6741 -
6742 - # hardcode_minus_L: Not really in the search PATH,
6743 - # but as the default location of the library.
6744 -- hardcode_minus_L=yes
6745 -+ hardcode_minus_L=no
6746 - ;;
6747 - esac
6748 - fi
6749 -@@ -9427,6 +9427,9 @@
6750 - ;;
6751 - *)
6752 - shrext_cmds='.sl'
6753 -+ case $host_os in hpux9*) ;;
6754 -+ *) hardcode_into_libs=yes ;;
6755 -+ esac
6756 - dynamic_linker="$host_os dld.sl"
6757 - shlibpath_var=SHLIB_PATH
6758 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6759 ---- ./gprof/configure.orig 2009-06-10 11:10:54.000000000 +0200
6760 -+++ ./gprof/configure 2009-06-10 11:41:47.000000000 +0200
6761 -@@ -8293,20 +8293,20 @@
6762 -
6763 - hpux10*)
6764 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6765 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6766 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6767 - else
6768 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6769 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6770 -+ hardcode_libdir_flag_spec_ld='+b $libdir'
6771 - fi
6772 - if test "$with_gnu_ld" = no; then
6773 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6774 -- hardcode_libdir_flag_spec_ld='+b $libdir'
6775 - hardcode_libdir_separator=:
6776 - hardcode_direct=yes
6777 - hardcode_direct_absolute=yes
6778 - export_dynamic_flag_spec='${wl}-E'
6779 - # hardcode_minus_L: Not really in the search PATH,
6780 - # but as the default location of the library.
6781 -- hardcode_minus_L=yes
6782 -+ hardcode_minus_L=no
6783 - fi
6784 - ;;
6785 -
6786 -@@ -8320,7 +8320,7 @@
6787 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6788 - ;;
6789 - *)
6790 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6791 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6792 - ;;
6793 - esac
6794 - else
6795 -@@ -8332,7 +8332,7 @@
6796 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6797 - ;;
6798 - *)
6799 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6800 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6801 - ;;
6802 - esac
6803 - fi
6804 -@@ -8343,7 +8343,6 @@
6805 - case $host_cpu in
6806 - hppa*64*|ia64*)
6807 - hardcode_direct=no
6808 -- hardcode_shlibpath_var=no
6809 - ;;
6810 - *)
6811 - hardcode_direct=yes
6812 -@@ -8352,7 +8351,7 @@
6813 -
6814 - # hardcode_minus_L: Not really in the search PATH,
6815 - # but as the default location of the library.
6816 -- hardcode_minus_L=yes
6817 -+ hardcode_minus_L=no
6818 - ;;
6819 - esac
6820 - fi
6821 -@@ -9227,6 +9226,9 @@
6822 - ;;
6823 - *)
6824 - shrext_cmds='.sl'
6825 -+ case $host_os in hpux9*) ;;
6826 -+ *) hardcode_into_libs=yes ;;
6827 -+ esac
6828 - dynamic_linker="$host_os dld.sl"
6829 - shlibpath_var=SHLIB_PATH
6830 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6831 ---- ./binutils/configure.orig 2009-06-10 11:10:54.000000000 +0200
6832 -+++ ./binutils/configure 2009-06-10 11:25:22.000000000 +0200
6833 -@@ -8204,20 +8204,20 @@
6834 -
6835 - hpux10*)
6836 - if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6837 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6838 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6839 - else
6840 -- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6841 -+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6842 -+ hardcode_libdir_flag_spec_ld='+b $libdir'
6843 - fi
6844 - if test "$with_gnu_ld" = no; then
6845 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6846 -- hardcode_libdir_flag_spec_ld='+b $libdir'
6847 - hardcode_libdir_separator=:
6848 - hardcode_direct=yes
6849 - hardcode_direct_absolute=yes
6850 - export_dynamic_flag_spec='${wl}-E'
6851 - # hardcode_minus_L: Not really in the search PATH,
6852 - # but as the default location of the library.
6853 -- hardcode_minus_L=yes
6854 -+ hardcode_minus_L=no
6855 - fi
6856 - ;;
6857 -
6858 -@@ -8231,7 +8231,7 @@
6859 - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6860 - ;;
6861 - *)
6862 -- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6863 -+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6864 - ;;
6865 - esac
6866 - else
6867 -@@ -8243,7 +8243,7 @@
6868 - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6869 - ;;
6870 - *)
6871 -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6872 -+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6873 - ;;
6874 - esac
6875 - fi
6876 -@@ -8254,7 +8254,6 @@
6877 - case $host_cpu in
6878 - hppa*64*|ia64*)
6879 - hardcode_direct=no
6880 -- hardcode_shlibpath_var=no
6881 - ;;
6882 - *)
6883 - hardcode_direct=yes
6884 -@@ -8263,7 +8262,7 @@
6885 -
6886 - # hardcode_minus_L: Not really in the search PATH,
6887 - # but as the default location of the library.
6888 -- hardcode_minus_L=yes
6889 -+ hardcode_minus_L=no
6890 - ;;
6891 - esac
6892 - fi
6893 -@@ -9138,6 +9137,9 @@
6894 - ;;
6895 - *)
6896 - shrext_cmds='.sl'
6897 -+ case $host_os in hpux9*) ;;
6898 -+ *) hardcode_into_libs=yes ;;
6899 -+ esac
6900 - dynamic_linker="$host_os dld.sl"
6901 - shlibpath_var=SHLIB_PATH
6902 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6903 ---- ./config.rpath.orig 2009-06-10 12:16:47.000000000 +0200
6904 -+++ ./config.rpath 2009-06-10 12:17:36.000000000 +0200
6905 -@@ -320,7 +320,7 @@
6906 - hardcode_direct=no
6907 - # hardcode_minus_L: Not really in the search PATH,
6908 - # but as the default location of the library.
6909 -- hardcode_minus_L=yes
6910 -+ hardcode_minus_L=no
6911 - ;;
6912 - *)
6913 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6914 -@@ -328,7 +328,7 @@
6915 - hardcode_direct=yes
6916 - # hardcode_minus_L: Not really in the search PATH,
6917 - # but as the default location of the library.
6918 -- hardcode_minus_L=yes
6919 -+ hardcode_minus_L=no
6920 - ;;
6921 - esac
6922 - fi
6923
6924 diff --git a/sys-devel/binutils/files/binutils-2.19.1-hpux.patch b/sys-devel/binutils/files/binutils-2.19.1-hpux.patch
6925 deleted file mode 100644
6926 index 89e50df..0000000
6927 --- a/sys-devel/binutils/files/binutils-2.19.1-hpux.patch
6928 +++ /dev/null
6929 @@ -1,22 +0,0 @@
6930 -http://sourceware.org/ml/binutils/2008-11/msg00310.html
6931 ---- bfd/hpux-core.c.orig 2009-06-09 17:00:47.000000000 +0200
6932 -+++ bfd/hpux-core.c 2009-06-09 17:00:56.000000000 +0200
6933 -@@ -66,7 +66,6 @@
6934 - #ifdef HPUX_CORE
6935 - #include <machine/reg.h>
6936 - #endif
6937 --#include <sys/user.h> /* After a.out.h */
6938 - #include <sys/file.h>
6939 -
6940 - /* Kludge: There's no explicit mechanism provided by sys/core.h to
6941 ---- opcodes/configure.orig 2009-06-10 15:55:06.000000000 +0200
6942 -+++ opcodes/configure 2009-06-10 15:55:31.000000000 +0200
6943 -@@ -11757,7 +11757,7 @@
6944 - *)
6945 - case "$host_vendor" in
6946 - hp)
6947 -- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl"
6948 -+ SHARED_LIBADD="../bfd/libbfd.la"
6949 - ;;
6950 - *)
6951 - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so"
6952
6953 diff --git a/sys-devel/binutils/files/binutils-2.19.1-parallel.patch b/sys-devel/binutils/files/binutils-2.19.1-parallel.patch
6954 deleted file mode 100644
6955 index f529f9d..0000000
6956 --- a/sys-devel/binutils/files/binutils-2.19.1-parallel.patch
6957 +++ /dev/null
6958 @@ -1,12 +0,0 @@
6959 -chew is built multiple times in parallel, which may result in:
6960 - mv chew.1234 chew: text file busy
6961 ---- bfd/doc/Makefile.in.orig 2009-06-09 17:01:42.000000000 +0200
6962 -+++ bfd/doc/Makefile.in 2009-06-09 17:01:51.000000000 +0200
6963 -@@ -12,6 +12,7 @@
6964 - # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
6965 - # PARTICULAR PURPOSE.
6966 -
6967 -+.NOTPARALLEL:
6968 - @SET_MAKE@
6969 - srcdir = @srcdir@
6970 - top_srcdir = @top_srcdir@
6971
6972 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
6973 deleted file mode 100644
6974 index 419a3b9..0000000
6975 --- a/sys-devel/binutils/files/binutils-2.19.50.0.1-mint.patch
6976 +++ /dev/null
6977 @@ -1,66 +0,0 @@
6978 ---- opcodes/configure.old 2008-11-03 14:11:02.000000000 +0000
6979 -+++ opcodes/configure 2008-11-03 14:13:42.000000000 +0000
6980 -@@ -5399,7 +5399,7 @@
6981 - lt_cv_sys_max_cmd_len=8192;
6982 - ;;
6983 -
6984 -- amigaos*)
6985 -+ mint* | amigaos*)
6986 - # On AmigaOS with pdksh, this test takes hours, literally.
6987 - # So we just punt and use a minimum line length of 8192.
6988 - lt_cv_sys_max_cmd_len=8192;
6989 ---- bfd/configure.old 2008-11-03 17:51:45.000000000 +0000
6990 -+++ bfd/configure 2008-11-03 17:52:00.000000000 +0000
6991 -@@ -5768,7 +5768,7 @@
6992 - lt_cv_sys_max_cmd_len=8192;
6993 - ;;
6994 -
6995 -- amigaos*)
6996 -+ mint* | amigaos*)
6997 - # On AmigaOS with pdksh, this test takes hours, literally.
6998 - # So we just punt and use a minimum line length of 8192.
6999 - lt_cv_sys_max_cmd_len=8192;
7000 ---- binutils/configure.old 2008-11-03 19:54:52.000000000 +0000
7001 -+++ binutils/configure 2008-11-03 19:54:54.000000000 +0000
7002 -@@ -5569,7 +5569,7 @@
7003 - lt_cv_sys_max_cmd_len=8192;
7004 - ;;
7005 -
7006 -- amigaos*)
7007 -+ mint* | amigaos*)
7008 - # On AmigaOS with pdksh, this test takes hours, literally.
7009 - # So we just punt and use a minimum line length of 8192.
7010 - lt_cv_sys_max_cmd_len=8192;
7011 ---- gas/configure.old 2008-11-13 22:12:31.000000000 +0000
7012 -+++ gas/configure 2008-11-13 22:13:57.000000000 +0000
7013 -@@ -5567,7 +5567,7 @@
7014 - lt_cv_sys_max_cmd_len=8192;
7015 - ;;
7016 -
7017 -- amigaos*)
7018 -+ mint* | amigaos*)
7019 - # On AmigaOS with pdksh, this test takes hours, literally.
7020 - # So we just punt and use a minimum line length of 8192.
7021 - lt_cv_sys_max_cmd_len=8192;
7022 ---- gprof/configure.old 2008-11-14 01:06:33.000000000 +0000
7023 -+++ gprof/configure 2008-11-14 01:17:24.000000000 +0000
7024 -@@ -5658,7 +5658,7 @@
7025 - lt_cv_sys_max_cmd_len=8192;
7026 - ;;
7027 -
7028 -- amigaos*)
7029 -+ mint* | amigaos*)
7030 - # On AmigaOS with pdksh, this test takes hours, literally.
7031 - # So we just punt and use a minimum line length of 8192.
7032 - lt_cv_sys_max_cmd_len=8192;
7033 ---- ld/configure.old 2008-11-14 01:06:36.000000000 +0000
7034 -+++ ld/configure 2008-11-14 01:16:21.000000000 +0000
7035 -@@ -5858,7 +5858,7 @@
7036 - lt_cv_sys_max_cmd_len=8192;
7037 - ;;
7038 -
7039 -- amigaos*)
7040 -+ mint* | amigaos*)
7041 - # On AmigaOS with pdksh, this test takes hours, literally.
7042 - # So we just punt and use a minimum line length of 8192.
7043 - lt_cv_sys_max_cmd_len=8192;
7044
7045 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
7046 deleted file mode 100644
7047 index 4a2097b..0000000
7048 --- a/sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch
7049 +++ /dev/null
7050 @@ -1,13 +0,0 @@
7051 -allow building plain x86-linux-ld for x86_64-linux host
7052 -with 32bit in /lib32 and 64bit in /lib.
7053 ---- ld/emulparams/elf_i386.sh.orig 2009-09-17 15:22:55.485863095 +0200
7054 -+++ ld/emulparams/elf_i386.sh 2009-09-17 15:23:57.944566323 +0200
7055 -@@ -17,7 +17,7 @@
7056 - # In Gentoo, we install 32bit libs into /lib32 in an
7057 - # ABI setup with amd64/x86
7058 - case "$target" in
7059 -- x86_64*-linux*)
7060 -+ x86_64*-linux*|i[34567]86*-linux*)
7061 - case "$EMULATION_NAME" in
7062 - *i386*) LIBPATH_SUFFIX=32 ;;
7063 - esac
7064
7065 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
7066 deleted file mode 100644
7067 index 515243f..0000000
7068 --- a/sys-devel/binutils/files/binutils-2.21.51.0.6-mint.patch
7069 +++ /dev/null
7070 @@ -1,2775 +0,0 @@
7071 -http://bugs.gentoo.org/show_bug.cgi?id=353410
7072 -
7073 -diff -aurN binutils-2.21/bfd/Makefile.am binutils-2.21-mint-20110206/bfd/Makefile.am
7074 ---- binutils-2.21/bfd/Makefile.am 2010-12-08 09:37:33.000000000 +0100
7075 -+++ binutils-2.21-mint-20110206/bfd/Makefile.am 2011-02-06 16:27:48.500000000 +0100
7076 -@@ -379,6 +379,7 @@
7077 - peigen.lo \
7078 - plugin.lo \
7079 - ppcboot.lo \
7080 -+ prg-mint.lo \
7081 - reloc16.lo \
7082 - riscix.lo \
7083 - som.lo \
7084 -@@ -559,6 +560,7 @@
7085 - pei-sh.c \
7086 - plugin.c \
7087 - ppcboot.c \
7088 -+ prg-mint.c \
7089 - reloc16.c \
7090 - riscix.c \
7091 - som.c \
7092 -diff -aurN binutils-2.21/bfd/Makefile.in binutils-2.21-mint-20110206/bfd/Makefile.in
7093 ---- binutils-2.21/bfd/Makefile.in 2010-12-08 09:37:36.000000000 +0100
7094 -+++ binutils-2.21-mint-20110206/bfd/Makefile.in 2011-02-06 16:27:48.515625000 +0100
7095 -@@ -679,6 +679,7 @@
7096 - peigen.lo \
7097 - plugin.lo \
7098 - ppcboot.lo \
7099 -+ prg-mint.lo \
7100 - reloc16.lo \
7101 - riscix.lo \
7102 - som.lo \
7103 -@@ -859,6 +860,7 @@
7104 - pei-sh.c \
7105 - plugin.c \
7106 - ppcboot.c \
7107 -+ prg-mint.c \
7108 - reloc16.c \
7109 - riscix.c \
7110 - som.c \
7111 -diff -aurN binutils-2.21/bfd/acinclude.m4 binutils-2.21-mint-20110206/bfd/acinclude.m4
7112 ---- binutils-2.21/bfd/acinclude.m4 2009-11-24 23:47:19.000000000 +0100
7113 -+++ binutils-2.21-mint-20110206/bfd/acinclude.m4 2011-02-06 16:27:48.531250000 +0100
7114 -@@ -5,7 +5,7 @@
7115 - [AC_REQUIRE([AC_CANONICAL_TARGET])
7116 - case "${host}" in
7117 - changequote(,)dnl
7118 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
7119 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
7120 - changequote([,])dnl
7121 - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
7122 - esac])dnl
7123 -diff -aurN binutils-2.21/bfd/aoutx.h binutils-2.21-mint-20110206/bfd/aoutx.h
7124 ---- binutils-2.21/bfd/aoutx.h 2010-10-14 03:31:26.000000000 +0200
7125 -+++ binutils-2.21-mint-20110206/bfd/aoutx.h 2011-02-06 16:27:48.546875000 +0100
7126 -@@ -1841,6 +1841,11 @@
7127 - bfd_byte buffer[BYTES_IN_WORD];
7128 - bfd_size_type amt = BYTES_IN_WORD;
7129 -
7130 -+ /* The MiNT backend writes past the string table. It therefore has to
7131 -+ know about the table size. */
7132 -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) +
7133 -+ BYTES_IN_WORD;
7134 -+
7135 - /* The string table starts with the size. */
7136 - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
7137 - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt)
7138 -@@ -4210,10 +4215,17 @@
7139 - return FALSE;
7140 - }
7141 -
7142 -+#ifdef MY_final_link_relocate_rel
7143 -+ r = MY_final_link_relocate_rel (howto,
7144 -+ input_bfd, input_section,
7145 -+ contents, r_addr, relocation,
7146 -+ (bfd_vma) 0, rel);
7147 -+#else
7148 - r = MY_final_link_relocate (howto,
7149 - input_bfd, input_section,
7150 - contents, r_addr, relocation,
7151 - (bfd_vma) 0);
7152 -+#endif
7153 - }
7154 -
7155 - if (r != bfd_reloc_ok)
7156 -diff -aurN binutils-2.21/bfd/bfd-in.h binutils-2.21-mint-20110206/bfd/bfd-in.h
7157 ---- binutils-2.21/bfd/bfd-in.h 2010-04-21 18:32:26.000000000 +0200
7158 -+++ binutils-2.21-mint-20110206/bfd/bfd-in.h 2011-02-06 16:27:48.546875000 +0100
7159 -@@ -738,6 +738,15 @@
7160 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
7161 - (bfd *, struct bfd_link_info *);
7162 -
7163 -+/* MiNT executable support routines for the linker. */
7164 -+
7165 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
7166 -+ (bfd *, flagword);
7167 -+extern bfd_boolean bfd_m68kmint_set_stack_size
7168 -+ (bfd *, bfd_signed_vma);
7169 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
7170 -+ (bfd *, bfd_vma);
7171 -+
7172 - /* mmap hacks */
7173 -
7174 - struct _bfd_window_internal;
7175 -diff -aurN binutils-2.21/bfd/bfd-in2.h binutils-2.21-mint-20110206/bfd/bfd-in2.h
7176 ---- binutils-2.21/bfd/bfd-in2.h 2010-11-03 03:31:02.000000000 +0100
7177 -+++ binutils-2.21-mint-20110206/bfd/bfd-in2.h 2011-02-06 16:27:48.562500000 +0100
7178 -@@ -745,6 +745,15 @@
7179 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
7180 - (bfd *, struct bfd_link_info *);
7181 -
7182 -+/* MiNT executable support routines for the linker. */
7183 -+
7184 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
7185 -+ (bfd *, flagword);
7186 -+extern bfd_boolean bfd_m68kmint_set_stack_size
7187 -+ (bfd *, bfd_signed_vma);
7188 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
7189 -+ (bfd *, bfd_vma);
7190 -+
7191 - /* mmap hacks */
7192 -
7193 - struct _bfd_window_internal;
7194 -diff -aurN binutils-2.21/bfd/config.bfd binutils-2.21-mint-20110206/bfd/config.bfd
7195 ---- binutils-2.21/bfd/config.bfd 2010-12-01 12:03:10.000000000 +0100
7196 -+++ binutils-2.21-mint-20110206/bfd/config.bfd 2011-02-06 16:27:48.578125000 +0100
7197 -@@ -823,6 +823,11 @@
7198 - # targ_selvecs=m68kmach3_vec
7199 - # targ_cflags=-DSTAT_FOR_EXEC
7200 - ;;
7201 -+ m68*-*-mint*)
7202 -+ targ_defvec=aout0_big_vec
7203 -+ targ_selvecs=m68kmint_prg_vec
7204 -+ targ_underscore=yes
7205 -+ ;;
7206 - m68*-hp*-netbsd*)
7207 - targ_defvec=m68k4knetbsd_vec
7208 - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
7209 -diff -aurN binutils-2.21/bfd/configure binutils-2.21-mint-20110206/bfd/configure
7210 ---- binutils-2.21/bfd/configure 2010-12-08 09:37:34.000000000 +0100
7211 -+++ binutils-2.21-mint-20110206/bfd/configure 2011-02-06 16:29:39.593750000 +0100
7212 -@@ -13631,7 +13631,7 @@
7213 -
7214 -
7215 - case "${host}" in
7216 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
7217 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
7218 -
7219 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
7220 - ;;
7221 -@@ -15238,6 +15238,7 @@
7222 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
7223 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
7224 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
7225 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
7226 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
7227 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
7228 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
7229 -diff -aurN binutils-2.21/bfd/configure.in binutils-2.21-mint-20110206/bfd/configure.in
7230 ---- binutils-2.21/bfd/configure.in 2010-12-08 09:37:33.000000000 +0100
7231 -+++ binutils-2.21-mint-20110206/bfd/configure.in 2011-02-06 16:29:56.250000000 +0100
7232 -@@ -873,6 +873,7 @@
7233 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
7234 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
7235 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
7236 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
7237 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
7238 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
7239 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
7240 -diff -aurN binutils-2.21/bfd/libaout.h binutils-2.21-mint-20110206/bfd/libaout.h
7241 ---- binutils-2.21/bfd/libaout.h 2009-09-09 23:38:58.000000000 +0200
7242 -+++ binutils-2.21-mint-20110206/bfd/libaout.h 2011-02-06 16:27:49.484375000 +0100
7243 -@@ -422,6 +422,10 @@
7244 - table, used when linking on SunOS. This is indexed by the symbol
7245 - index. */
7246 - bfd_vma *local_got_offsets;
7247 -+
7248 -+ /* A pointer for data used by aout extensions. (Currently only used
7249 -+ by MiNT executables (see prg-mint.c). */
7250 -+ void *ext;
7251 - };
7252 -
7253 - struct aout_data_struct
7254 -@@ -449,6 +453,7 @@
7255 - #define obj_aout_string_window(bfd) (adata (bfd).string_window)
7256 - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
7257 - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
7258 -+#define obj_aout_ext(bfd) (adata (bfd).ext)
7259 -
7260 - /* We take the address of the first element of an asymbol to ensure that the
7261 - macro is only ever applied to an asymbol. */
7262 -diff -aurN binutils-2.21/bfd/prg-mint.c binutils-2.21-mint-20110206/bfd/prg-mint.c
7263 ---- binutils-2.21/bfd/prg-mint.c 1970-01-01 01:00:00.000000000 +0100
7264 -+++ binutils-2.21-mint-20110206/bfd/prg-mint.c 2011-02-06 16:27:49.500000000 +0100
7265 -@@ -0,0 +1,1732 @@
7266 -+/* BFD backend for traditional MiNT executables.
7267 -+ Copyright 1998, 2007, 2008, 2009 Free Software Foundation, Inc.
7268 -+ Originally written by Guido Flohr (guido@××××××××.de).
7269 -+ Modified by Vincent Riviere (vincent.riviere@××××××××.fr).
7270 -+
7271 -+ This file is part of BFD, the Binary File Descriptor library.
7272 -+
7273 -+ This program is free software; you can redistribute it and/or modify
7274 -+ it under the terms of the GNU General Public License as published by
7275 -+ the Free Software Foundation; either version 3 of the License, or
7276 -+ (at your option) any later version.
7277 -+
7278 -+ This program is distributed in the hope that it will be useful,
7279 -+ but WITHOUT ANY WARRANTY; without even the implied warranty of
7280 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7281 -+ GNU General Public License for more details.
7282 -+
7283 -+ You should have received a copy of the GNU General Public License
7284 -+ along with this program; if not, write to the Free Software
7285 -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
7286 -+ MA 02110-1301, USA. */
7287 -+
7288 -+/* The format of executables on Atari is actually not a.out, it is
7289 -+ only chosen as an approach which comes close enough. The layout of a
7290 -+ program image on disk looked like this:
7291 -+
7292 -+ +-----------------+
7293 -+ | 28 Bytes Header |
7294 -+ +-----------------+
7295 -+ | Text segment |
7296 -+ +-----------------+
7297 -+ | Data segment |
7298 -+ +-----------------+
7299 -+ | BSS |
7300 -+ +-----------------+
7301 -+ | Symbol table |
7302 -+ +-----------------+
7303 -+ | TPA relocation |
7304 -+ +-----------------+
7305 -+
7306 -+ The 28 byte exec header used to look like this:
7307 -+
7308 -+ struct old_exec_header
7309 -+ {
7310 -+ bfd_byte a_magic[2];
7311 -+ bfd_byte a_text[4];
7312 -+ bfd_byte a_data[4];
7313 -+ bfd_byte a_bss[4];
7314 -+ bfd_byte a_syms[4];
7315 -+ bfd_byte a_resvd[4];
7316 -+ bfd_byte a_abs[2];
7317 -+ };
7318 -+
7319 -+ The first two bytes (A_MAGIC) contained an assembler branch
7320 -+ instruction to the beginning of the text segment. Because the
7321 -+ exec header had a fixed size and the text entry point was constant
7322 -+ this assembler instruction also had a constant value (0x601a).
7323 -+ In fact the operating system never really executed the branch
7324 -+ instruction but used this value (0x601a) as a magic value.
7325 -+
7326 -+ TEXT, DATA and BSS were as one would expect them. The symbol
7327 -+ table wasn't. Several different formats were in use, none of them
7328 -+ very efficient, none of them powerful enough to support source
7329 -+ level debugging. I've changed that and the GNU symbol table will
7330 -+ now be used instead (unless the --traditional-format option was
7331 -+ given to the linker).
7332 -+
7333 -+ If the last member A_ABS of the exec header is zero the program
7334 -+ image contains an additional table with relocation information
7335 -+ at the end of the image. The kernel can load program images at
7336 -+ virtually any address in the address space. In fact it will load
7337 -+ it at the start of the biggest block of free memory. This block
7338 -+ is then called the Transient Program Area TPA and the image has
7339 -+ to be relocated against the TPA at runtime. The relocation info
7340 -+ itself is in a simply way compressed: It starts with a four-byte
7341 -+ value, the first address within the image to be relocated. Now
7342 -+ following are one-byte offsets to the last address. The special
7343 -+ value of 1 (which is impossible as an offset) signifies that 254
7344 -+ has to be added to the next offset. The table is finished with
7345 -+ a zero-byte.
7346 -+
7347 -+ I now simply extended the header from its old 28 bytes to 256
7348 -+ bytes. The first 28 bytes give home to a standard Atari header,
7349 -+ the rest is for extensions. The extension header starts with
7350 -+ a ``real'' assembler instruction, a far jump to the text entry
7351 -+ point. The extension header gives home to a standard a.out
7352 -+ exec header (currently NMAGIC) plus some extra
7353 -+ more or less useful fields plus space to future extensions.
7354 -+ For the OS the extension header will already belong to the text
7355 -+ segment, for BFD backends the text segment is 228 (or 0xe4)
7356 -+ bytes smaller than for the OS. This explains for example the
7357 -+ funny TEXT_START_ADDR 0xe4.
7358 -+
7359 -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently
7360 -+ no such thing as memory paging on the Atari (and this is why
7361 -+ ZMAGICs are disabled for now to allow for future enhancements).
7362 -+
7363 -+ If you think that this whole file looks quite like a big hack
7364 -+ you're probably right. But the results (mainly the output of
7365 -+ the linker) seem to work and they allow to use up-to-date
7366 -+ binutils on the Atari until a better executable format (maybe
7367 -+ ELF) has been established for this machine. */
7368 -+
7369 -+#include "sysdep.h"
7370 -+#include "bfd.h"
7371 -+
7372 -+#define N_HEADER_IN_TEXT(x) 0
7373 -+#define BYTES_IN_WORD 4
7374 -+#define ENTRY_CAN_BE_ZERO
7375 -+#define N_SHARED_LIB(x) 0
7376 -+#define TEXT_START_ADDR 0xe4
7377 -+#define TARGET_PAGE_SIZE 2
7378 -+#define TARGET_IS_BIG_ENDIAN_P
7379 -+#define DEFAULT_ARCH bfd_arch_m68k
7380 -+#define N_TXTADDR(x) TEXT_START_ADDR
7381 -+
7382 -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
7383 -+ remove whitespace added here, and thus will fail to concatenate
7384 -+ the tokens. */
7385 -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP)
7386 -+#define TARGETNAME "a.out-mintprg"
7387 -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y)
7388 -+
7389 -+/* We have to do quite a lot of magic to make the Atari format
7390 -+ for GEMDOS executables fit into the standard a.out format.
7391 -+ We start with the original header. */
7392 -+#define external_exec mint_external_exec
7393 -+struct mint_external_exec
7394 -+{
7395 -+ bfd_byte g_branch[2]; /* 0x601a. */
7396 -+ bfd_byte g_text[4]; /* Length of text section. */
7397 -+ bfd_byte g_data[4]; /* Length of data section. */
7398 -+ bfd_byte g_bss[4]; /* Length of bss section. */
7399 -+ bfd_byte g_syms[4]; /* Length of symbol table. */
7400 -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54
7401 -+ (in ASCII: ``MiNT''). */
7402 -+ bfd_byte g_flags[4]; /* Atari special flags. */
7403 -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation
7404 -+ info. */
7405 -+
7406 -+ /* We extend this header now to provide the information that the
7407 -+ binutils want to see. Everything following will actually be part
7408 -+ of the text segment (from MiNT's point of view). As a
7409 -+ consequence the text section has 228 bytes of redundancy.
7410 -+
7411 -+ The following eight bytes should be treated as opaque.
7412 -+ If the word ``opaque'' always attracts your curiosity in
7413 -+ typedefs and structs, here's the explanation: These eight bytes
7414 -+ are really two assembler instructions. The first one moves
7415 -+ the contents of e_entry into register d0, the second one
7416 -+ jumps (pc-relative) to the entry point. See swap_exec_header_out
7417 -+ for details. */
7418 -+ bfd_byte g_jump_entry[8];
7419 -+
7420 -+ /* Now following a standard a.out header. Note that the values
7421 -+ may differ from the one given on top. The traditional header
7422 -+ contains the values that the OS wants to see, the values below
7423 -+ are the values that make the binutils work. */
7424 -+ bfd_byte e_info[4]; /* Magic number and stuff. */
7425 -+ bfd_byte e_text[4]; /* Length of text section in bytes. */
7426 -+ bfd_byte e_data[4]; /* Length of data section. */
7427 -+ bfd_byte e_bss[4]; /* Length of standard symbol
7428 -+ table. */
7429 -+ bfd_byte e_syms[4]; /* Length of symbol table. */
7430 -+ bfd_byte e_entry[4]; /* Start address. */
7431 -+ bfd_byte e_trsize[4]; /* Length of text relocation
7432 -+ info. */
7433 -+ bfd_byte e_drsize[4]; /* Length of data relocation
7434 -+ info. */
7435 -+
7436 -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative
7437 -+ relocation info. */
7438 -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation
7439 -+ info. */
7440 -+
7441 -+ /* This is for extensions. */
7442 -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into
7443 -+ the executable you will find it
7444 -+ at file offset g_stkpos. If
7445 -+ not this is NULL. */
7446 -+
7447 -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See
7448 -+ definitions for _MINT_SYMBOL_FORMAT*
7449 -+ above. */
7450 -+
7451 -+ /* Pad with zeros. */
7452 -+ bfd_byte g_pad0[172];
7453 -+};
7454 -+#define EXEC_BYTES_SIZE 256
7455 -+#define GEMDOS_HEADER_SIZE 28
7456 -+
7457 -+/* The following defines are required by aoutx.h.
7458 -+ They are not automatically defined in aout/aout64.h
7459 -+ if external_exec is defined. */
7460 -+
7461 -+#define OMAGIC 0407 /* Object file or impure executable. */
7462 -+#define NMAGIC 0410 /* Code indicating pure executable. */
7463 -+#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
7464 -+#define BMAGIC 0415 /* Used by a b.out object. */
7465 -+#define QMAGIC 0314 /* Like ZMAGIC but with N_HEADER_IN_TEXT true. */
7466 -+
7467 -+/* Files using the following magic flags will not be loaded. */
7468 -+#define N_BADMAG(x) (N_MAGIC(x) != NMAGIC)
7469 -+
7470 -+/* For DRI symbol table format. */
7471 -+struct dri_symbol
7472 -+{
7473 -+ bfd_byte a_name[8]; /* Symbol name */
7474 -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */
7475 -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */
7476 -+};
7477 -+#define DRI_SYMBOL_SIZE 14
7478 -+
7479 -+/* Simple values for a_type. */
7480 -+#define A_UNDF 0
7481 -+#define A_BSS 0x0100
7482 -+#define A_TEXT 0x0200
7483 -+#define A_DATA 0x0400
7484 -+#define A_EXT 0x0800 /* External. */
7485 -+#define A_EQREG 0x1000 /* Equated register. */
7486 -+#define A_GLOBL 0x2000 /* Global. */
7487 -+#define A_EQU 0x4000 /* Equated. */
7488 -+#define A_DEF 0x8000 /* Defined. */
7489 -+#define A_LNAM 0x0048 /* GST compatible long name. */
7490 -+ /* File symbols ala aln. */
7491 -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */
7492 -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this
7493 -+ conflicts with the bits in A_LNAM. */
7494 -+
7495 -+/* The following include contains the definitions for internal a.out structures
7496 -+ as well as the prototypes for the NAME(...) functions defined in aoutx.h. */
7497 -+
7498 -+#include "libaout.h"
7499 -+
7500 -+/* The following function is similar to _bfd_final_link_relocate, except it
7501 -+ adds the reloc structure as an additional parameter.
7502 -+ It will be used int aoutx.h. */
7503 -+
7504 -+static bfd_reloc_status_type
7505 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
7506 -+ bfd *input_bfd,
7507 -+ asection *input_section,
7508 -+ bfd_byte *contents,
7509 -+ bfd_vma address,
7510 -+ bfd_vma value,
7511 -+ bfd_vma addend,
7512 -+ struct reloc_std_external *rel);
7513 -+
7514 -+#define MY_final_link_relocate_rel m68kmint_prg_final_link_relocate_rel
7515 -+
7516 -+/* The following include contains the definitions for the NAME(...) functions. */
7517 -+
7518 -+#include "aoutx.h"
7519 -+
7520 -+/* Data structure that holds some private information for us. */
7521 -+struct mint_internal_info
7522 -+{
7523 -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */
7524 -+ bfd_boolean traditional_format; /* Saved from link info. */
7525 -+ int symbol_format; /* Format of the symbol table. */
7526 -+ void *tparel; /* Data for TPA relative relocation
7527 -+ information. */
7528 -+ file_ptr tparel_pos; /* File position of TPA relative
7529 -+ relocation information. */
7530 -+ bfd_size_type tparel_size; /* Size of TPA relative relocation
7531 -+ information. */
7532 -+ bfd_size_type dri_symtab_size; /* Size of traditional symbol table. */
7533 -+
7534 -+#define MINT_RELOC_CHUNKSIZE 0x1000
7535 -+ bfd_vma *relocs; /* Array of address relocations. */
7536 -+ unsigned long relocs_used; /* Number of relocation entries
7537 -+ already used up. */
7538 -+ unsigned long relocs_allocated; /* Number of relocation entries
7539 -+ allocated. */
7540 -+
7541 -+ bfd_vma stkpos; /* File offset to value of _stksize. */
7542 -+
7543 -+ flagword prg_flags; /* Standard GEMDOS flags. */
7544 -+
7545 -+ bfd_boolean override_stack_size; /* TRUE if the executable stack size
7546 -+ must be overriden with stack_size. */
7547 -+ bfd_signed_vma stack_size;
7548 -+
7549 -+ bfd_boolean reloc_error; /* TRUE if an unhandled error during
7550 -+ relocation occured. */
7551 -+};
7552 -+
7553 -+/* If --traditional-format was given to the linker an old-style DRI
7554 -+ symbol table is written into the executable. This is with respect
7555 -+ to many old debugging tools or disassemblers which expect this format.
7556 -+ Although created by the linker, these symbols will be ignored from
7557 -+ input files. */
7558 -+#define _MINT_SYMBOL_FORMAT_GNU 0
7559 -+#define _MINT_SYMBOL_FORMAT_DRI 1
7560 -+
7561 -+/* Declarations for the variables and functions
7562 -+ defined later in aout-target.h. */
7563 -+
7564 -+static const bfd_target *
7565 -+m68kmint_prg_callback (bfd *abfd);
7566 -+
7567 -+static void
7568 -+MY_final_link_callback (bfd *abfd,
7569 -+ file_ptr *ptreloff,
7570 -+ file_ptr *pdreloff,
7571 -+ file_ptr *psymoff);
7572 -+
7573 -+extern const bfd_target m68kmint_prg_vec;
7574 -+
7575 -+/* Initialize a new BFD using our file format. */
7576 -+
7577 -+#define MY_mkobject m68kmint_prg_mkobject
7578 -+
7579 -+static bfd_boolean
7580 -+m68kmint_prg_mkobject (bfd *abfd)
7581 -+{
7582 -+ struct mint_internal_info *myinfo;
7583 -+
7584 -+ if (!NAME (aout, mkobject (abfd)))
7585 -+ return FALSE;
7586 -+
7587 -+ /* Allocate our private BFD data. */
7588 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
7589 -+ if (myinfo == NULL)
7590 -+ return FALSE;
7591 -+ obj_aout_ext (abfd) = myinfo;
7592 -+
7593 -+ return TRUE;
7594 -+}
7595 -+
7596 -+/* Finish up the reading of an a.out file header. */
7597 -+
7598 -+#define MY_object_p m68kmint_prg_object_p
7599 -+
7600 -+static const bfd_target *
7601 -+m68kmint_prg_object_p (bfd *abfd)
7602 -+{
7603 -+ struct external_exec exec_bytes; /* Raw exec header from file. */
7604 -+ struct internal_exec exec; /* Cleaned-up exec header. */
7605 -+ const bfd_target *target;
7606 -+ bfd_size_type amt = EXEC_BYTES_SIZE;
7607 -+ struct mint_internal_info *myinfo;
7608 -+
7609 -+ /* Read the exec bytesd from the file. */
7610 -+ if (bfd_bread (&exec_bytes, amt, abfd) != amt)
7611 -+ {
7612 -+ if (bfd_get_error () != bfd_error_system_call)
7613 -+ bfd_set_error (bfd_error_wrong_format);
7614 -+ return NULL;
7615 -+ }
7616 -+
7617 -+ /* Instead of byte-swapping we compare bytes. */
7618 -+ if (exec_bytes.g_branch[0] != 0x60
7619 -+ || exec_bytes.g_branch[1] != 0x1a
7620 -+ || exec_bytes.g_extmagic[0] != 'M'
7621 -+ || exec_bytes.g_extmagic[1] != 'i'
7622 -+ || exec_bytes.g_extmagic[2] != 'N'
7623 -+ || exec_bytes.g_extmagic[3] != 'T')
7624 -+ {
7625 -+ bfd_set_error (bfd_error_wrong_format);
7626 -+ return NULL;
7627 -+ }
7628 -+
7629 -+ /* Swap the standard a.out fields. */
7630 -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
7631 -+
7632 -+ /* Check a.out magic value. */
7633 -+ if (N_BADMAG (exec))
7634 -+ {
7635 -+ bfd_set_error (bfd_error_wrong_format);
7636 -+ return NULL;
7637 -+ }
7638 -+
7639 -+ /* Initialize this BFD with the exec values. */
7640 -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback);
7641 -+
7642 -+ /* Allocate our private BFD data. */
7643 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
7644 -+ if (myinfo == NULL)
7645 -+ return NULL;
7646 -+ obj_aout_ext (abfd) = myinfo;
7647 -+
7648 -+ /* Now get the missing information. */
7649 -+ myinfo->prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags);
7650 -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos);
7651 -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format);
7652 -+
7653 -+ /* TPA relocation information. */
7654 -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos);
7655 -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size);
7656 -+
7657 -+ /* FIXME: Currently we always read the TPA relative relocation
7658 -+ information. This is suboptimal because often times there
7659 -+ is no need for it. Read it only if need be! Maybe this should
7660 -+ also depend on abfd->cacheable? */
7661 -+ if (myinfo->tparel_size == 0)
7662 -+ myinfo->tparel = bfd_zalloc (abfd, 4);
7663 -+ else
7664 -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size);
7665 -+
7666 -+ if (myinfo->tparel == NULL)
7667 -+ return NULL;
7668 -+
7669 -+ if (myinfo->tparel_size == 0)
7670 -+ {
7671 -+ myinfo->tparel_size = 4;
7672 -+ }
7673 -+ else
7674 -+ {
7675 -+ /* Read the information from the bfd. */
7676 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0
7677 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd)
7678 -+ != myinfo->tparel_size))
7679 -+ return NULL;
7680 -+ }
7681 -+
7682 -+ return target;
7683 -+}
7684 -+
7685 -+/* Free all information we have cached for this BFD. We can always
7686 -+ read it again later if we need it. */
7687 -+
7688 -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info
7689 -+
7690 -+static bfd_boolean
7691 -+m68kmint_prg_bfd_free_cached_info (bfd *abfd)
7692 -+{
7693 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
7694 -+
7695 -+ if (myinfo != NULL && myinfo->relocs != NULL)
7696 -+ {
7697 -+ free (myinfo->relocs);
7698 -+ myinfo->relocs = NULL;
7699 -+ }
7700 -+
7701 -+ /* myinfo itself has been allocated by bfd_zalloc()
7702 -+ so will be automatically freed along with the BFD.
7703 -+ Same for myinfo->tparel. */
7704 -+
7705 -+ return NAME (aout, bfd_free_cached_info) (abfd);
7706 -+}
7707 -+
7708 -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the
7709 -+ symbol exceeds 8 characters write a long symbol. If it
7710 -+ exceeds 22 characters truncate the name. */
7711 -+
7712 -+static int
7713 -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value)
7714 -+{
7715 -+ int written_bytes = 0;
7716 -+ struct dri_symbol sym;
7717 -+ int is_long_name = strlen (name) > sizeof (sym.a_name);
7718 -+
7719 -+ if (is_long_name)
7720 -+ type |= A_LNAM;
7721 -+
7722 -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name));
7723 -+ bfd_put_16 (abfd, type, sym.a_type);
7724 -+ bfd_put_32 (abfd, value, sym.a_value);
7725 -+
7726 -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
7727 -+ return -1;
7728 -+ written_bytes += DRI_SYMBOL_SIZE;
7729 -+
7730 -+ if (is_long_name)
7731 -+ {
7732 -+ char more_name[DRI_SYMBOL_SIZE];
7733 -+
7734 -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE);
7735 -+
7736 -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
7737 -+ return -1;
7738 -+ written_bytes += DRI_SYMBOL_SIZE;
7739 -+ }
7740 -+
7741 -+ return written_bytes;
7742 -+}
7743 -+
7744 -+/* Emit a traditional DRI symbol table while linking.
7745 -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */
7746 -+
7747 -+static bfd_boolean
7748 -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info)
7749 -+{
7750 -+ bfd *input_bfd;
7751 -+ enum bfd_link_strip strip = info->strip;
7752 -+ enum bfd_link_discard discard = info->discard;
7753 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
7754 -+ bfd *last_archive = NULL;
7755 -+
7756 -+ /* Position file pointer. */
7757 -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
7758 -+ return FALSE;
7759 -+
7760 -+ myinfo->dri_symtab_size = 0;
7761 -+
7762 -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next)
7763 -+ {
7764 -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd);
7765 -+ char *strings = obj_aout_external_strings (input_bfd);
7766 -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd);
7767 -+ struct external_nlist *sym_end = sym + sym_count;
7768 -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd);
7769 -+ bfd_boolean pass = FALSE;
7770 -+ bfd_boolean skip = FALSE;
7771 -+ bfd_boolean skip_next = FALSE;
7772 -+ int written_bytes;
7773 -+ int a_type;
7774 -+ bfd_boolean write_archive_name = FALSE;
7775 -+ bfd_vma val = 0;
7776 -+
7777 -+ /* First write out a symbol for the archive if we do not
7778 -+ strip these symbols and if it differs from the last
7779 -+ one. */
7780 -+ if (input_bfd->my_archive != last_archive
7781 -+ && input_bfd->my_archive != NULL)
7782 -+ {
7783 -+ write_archive_name = TRUE;
7784 -+ last_archive = input_bfd->my_archive;
7785 -+ }
7786 -+
7787 -+ if (write_archive_name
7788 -+ && strip != strip_all
7789 -+ && (strip != strip_some
7790 -+ || bfd_hash_lookup (info->keep_hash,
7791 -+ input_bfd->my_archive->filename,
7792 -+ FALSE, FALSE) != NULL)
7793 -+ && discard != discard_all)
7794 -+ {
7795 -+ val = bfd_get_section_vma (abfd,
7796 -+ obj_textsec (input_bfd)->output_section)
7797 -+ + obj_textsec (input_bfd)->output_offset;
7798 -+
7799 -+ written_bytes = write_dri_symbol (abfd,
7800 -+ input_bfd->my_archive->filename,
7801 -+ A_TFILE, val);
7802 -+
7803 -+ if (written_bytes < 0)
7804 -+ return FALSE;
7805 -+ else
7806 -+ myinfo->dri_symtab_size += written_bytes;
7807 -+ }
7808 -+
7809 -+ /* Now write out a symbol for the object file if we do not
7810 -+ strip these symbols. */
7811 -+ if (strip != strip_all
7812 -+ && (strip != strip_some
7813 -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename,
7814 -+ FALSE, FALSE) != NULL)
7815 -+ && discard != discard_all)
7816 -+ {
7817 -+ val = bfd_get_section_vma (abfd,
7818 -+ obj_textsec (input_bfd)->output_section)
7819 -+ + obj_textsec (input_bfd)->output_offset;
7820 -+
7821 -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename,
7822 -+ A_TFILE, val);
7823 -+ if (written_bytes < 0)
7824 -+ return FALSE;
7825 -+ else
7826 -+ myinfo->dri_symtab_size += written_bytes;
7827 -+ }
7828 -+
7829 -+ /* Now we have a problem. All symbols that we see have already
7830 -+ been marked written (because we write them a second time
7831 -+ here. If we would do it the clean way we would have
7832 -+ to traverse the entire symbol map and reset the written
7833 -+ flag. We hack here instead... */
7834 -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1)
7835 -+#define is_written(h) ((int) h->written == (int) TRUE + 1)
7836 -+ for (; sym < sym_end; sym++, sym_hash++)
7837 -+ {
7838 -+ const char *name;
7839 -+ int type;
7840 -+ struct aout_link_hash_entry *h;
7841 -+ asection *symsec;
7842 -+ val = 0;
7843 -+
7844 -+ type = H_GET_8 (input_bfd, sym->e_type);
7845 -+ name = strings + GET_WORD (input_bfd, sym->e_strx);
7846 -+
7847 -+ h = NULL;
7848 -+
7849 -+ if (pass)
7850 -+ {
7851 -+ /* Pass this symbol through. It is the target of an
7852 -+ indirect or warning symbol. */
7853 -+ val = GET_WORD (input_bfd, sym->e_value);
7854 -+ pass = FALSE;
7855 -+ }
7856 -+ else if (skip_next)
7857 -+ {
7858 -+ /* Skip this symbol, which is the target of an indirect
7859 -+ symbol that we have changed to no longer be an indirect
7860 -+ symbol. */
7861 -+ skip_next = FALSE;
7862 -+ continue;
7863 -+ }
7864 -+ else
7865 -+ {
7866 -+ struct aout_link_hash_entry *hresolve = *sym_hash;
7867 -+
7868 -+ /* We have saved the hash table entry for this symbol, if
7869 -+ there is one. Note that we could just look it up again
7870 -+ in the hash table, provided we first check that it is an
7871 -+ external symbol. */
7872 -+ h = *sym_hash;
7873 -+
7874 -+ /* Use the name from the hash table, in case the symbol was
7875 -+ wrapped. */
7876 -+ if (h != NULL
7877 -+ && h->root.type != bfd_link_hash_warning)
7878 -+ name = h->root.root.string;
7879 -+
7880 -+ /* If this is an indirect or warning symbol, then change
7881 -+ hresolve to the base symbol. */
7882 -+ hresolve = h;
7883 -+ if (h != (struct aout_link_hash_entry *) NULL
7884 -+ && (h->root.type == bfd_link_hash_indirect
7885 -+ || h->root.type == bfd_link_hash_warning))
7886 -+ {
7887 -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link;
7888 -+ while (hresolve->root.type == bfd_link_hash_indirect
7889 -+ || hresolve->root.type == bfd_link_hash_warning)
7890 -+ hresolve = ((struct aout_link_hash_entry*)
7891 -+ hresolve->root.u.i.link);
7892 -+ }
7893 -+
7894 -+ /* If the symbol has already been written out skip it. */
7895 -+ if (h != NULL
7896 -+ && is_written (h))
7897 -+ {
7898 -+ if ((type & N_TYPE) == N_INDR
7899 -+ || type == N_WARNING)
7900 -+ skip_next = TRUE;
7901 -+ continue;
7902 -+ }
7903 -+
7904 -+ /* See if we are stripping this symbol. */
7905 -+ skip = FALSE;
7906 -+
7907 -+ /* Skip all debugger symbols. No way to output them in
7908 -+ DRI format. This will also reduce a lot of headaches. */
7909 -+ if ((type & N_STAB) != 0)
7910 -+ skip = TRUE;
7911 -+
7912 -+ switch (strip)
7913 -+ {
7914 -+ case strip_none:
7915 -+ case strip_debugger:
7916 -+ break;
7917 -+ case strip_some:
7918 -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE)
7919 -+ == NULL)
7920 -+ skip = TRUE;
7921 -+ break;
7922 -+ case strip_all:
7923 -+ skip = TRUE;
7924 -+ break;
7925 -+ }
7926 -+
7927 -+ if (skip)
7928 -+ {
7929 -+ if (h != NULL)
7930 -+ mark_written (h);
7931 -+ continue;
7932 -+ }
7933 -+
7934 -+ /* Get the value of the symbol. */
7935 -+ if ((type & N_TYPE) == N_TEXT
7936 -+ || type == N_WEAKT)
7937 -+ symsec = obj_textsec (input_bfd);
7938 -+ else if ((type & N_TYPE) == N_DATA
7939 -+ || type == N_WEAKD)
7940 -+ symsec = obj_datasec (input_bfd);
7941 -+ else if ((type & N_TYPE) == N_BSS
7942 -+ || type == N_WEAKB)
7943 -+ symsec = obj_bsssec (input_bfd);
7944 -+ else if ((type & N_TYPE) == N_ABS
7945 -+ || type == N_WEAKA)
7946 -+ symsec = bfd_abs_section_ptr;
7947 -+ else if (((type & N_TYPE) == N_INDR
7948 -+ && (hresolve == NULL
7949 -+ || (hresolve->root.type != bfd_link_hash_defined
7950 -+ && hresolve->root.type != bfd_link_hash_defweak
7951 -+ && hresolve->root.type != bfd_link_hash_common)))
7952 -+ || type == N_WARNING)
7953 -+ {
7954 -+ /* Pass the next symbol through unchanged. The
7955 -+ condition above for indirect symbols is so that if
7956 -+ the indirect symbol was defined, we output it with
7957 -+ the correct definition so the debugger will
7958 -+ understand it. */
7959 -+ pass = TRUE;
7960 -+ val = GET_WORD (input_bfd, sym->e_value);
7961 -+ symsec = NULL;
7962 -+ }
7963 -+ else
7964 -+ {
7965 -+ /* If we get here with an indirect symbol, it means that
7966 -+ we are outputting it with a real definition. In such
7967 -+ a case we do not want to output the next symbol,
7968 -+ which is the target of the indirection. */
7969 -+ if ((type & N_TYPE) == N_INDR)
7970 -+ skip_next = TRUE;
7971 -+
7972 -+ symsec = NULL;
7973 -+
7974 -+ /* We need to get the value from the hash table. We use
7975 -+ hresolve so that if we have defined an indirect
7976 -+ symbol we output the final definition. */
7977 -+ if (h == NULL)
7978 -+ {
7979 -+ switch (type & N_TYPE)
7980 -+ {
7981 -+ case N_SETT:
7982 -+ symsec = obj_textsec (input_bfd);
7983 -+ break;
7984 -+ case N_SETD:
7985 -+ symsec = obj_datasec (input_bfd);
7986 -+ break;
7987 -+ case N_SETB:
7988 -+ symsec = obj_bsssec (input_bfd);
7989 -+ break;
7990 -+ case N_SETA:
7991 -+ symsec = bfd_abs_section_ptr;
7992 -+ break;
7993 -+ default:
7994 -+ val = 0;
7995 -+ break;
7996 -+ }
7997 -+ }
7998 -+ else if (hresolve->root.type == bfd_link_hash_defined
7999 -+ || hresolve->root.type == bfd_link_hash_defweak)
8000 -+ {
8001 -+ asection *input_section;
8002 -+ asection *output_section;
8003 -+
8004 -+ /* This case usually means a common symbol which was
8005 -+ turned into a defined symbol. */
8006 -+ input_section = hresolve->root.u.def.section;
8007 -+ output_section = input_section->output_section;
8008 -+ BFD_ASSERT (bfd_is_abs_section (output_section)
8009 -+ || output_section->owner == abfd);
8010 -+
8011 -+ /* The following reference to the output section VMA
8012 -+ is commented out because DRI symbols are relative
8013 -+ to the beginning of the section. */
8014 -+ val = (hresolve->root.u.def.value
8015 -+ /*+ bfd_get_section_vma (abfd, output_section)*/
8016 -+ + input_section->output_offset);
8017 -+
8018 -+ /* TEXT symbols values must be adjusted
8019 -+ by adding the size of the extended header. */
8020 -+ if (output_section == obj_textsec (abfd))
8021 -+ val += TEXT_START_ADDR;
8022 -+
8023 -+ /* Get the correct type based on the section. If
8024 -+ this is a constructed set, force it to be
8025 -+ globally visible. */
8026 -+ if (type == N_SETT
8027 -+ || type == N_SETD
8028 -+ || type == N_SETB
8029 -+ || type == N_SETA)
8030 -+ type |= N_EXT;
8031 -+
8032 -+ type &=~ N_TYPE;
8033 -+
8034 -+ if (output_section == obj_textsec (abfd))
8035 -+ type |= N_TEXT;
8036 -+ else if (output_section == obj_datasec (abfd))
8037 -+ type |= N_DATA;
8038 -+ else if (output_section == obj_bsssec (abfd))
8039 -+ type |= N_BSS;
8040 -+ else
8041 -+ type |= N_ABS;
8042 -+ }
8043 -+ else if (hresolve->root.type == bfd_link_hash_common)
8044 -+ val = hresolve->root.u.c.size;
8045 -+ else if (hresolve->root.type == bfd_link_hash_undefweak)
8046 -+ {
8047 -+ val = 0;
8048 -+ type = N_UNDF;
8049 -+ }
8050 -+ else
8051 -+ val = 0;
8052 -+ }
8053 -+ if (symsec != NULL)
8054 -+ {
8055 -+ /* The following reference to the output section VMA
8056 -+ is commented out because DRI symbols are relative
8057 -+ to the beginning of the section. */
8058 -+ val = (/*symsec->output_section->vma
8059 -+ +*/ symsec->output_offset
8060 -+ + (GET_WORD (input_bfd, sym->e_value)
8061 -+ - symsec->vma));
8062 -+
8063 -+ /* TEXT symbols values must be adjusted
8064 -+ by adding the size of the extended header. */
8065 -+ if (symsec == obj_textsec (input_bfd))
8066 -+ val += TEXT_START_ADDR;
8067 -+ }
8068 -+
8069 -+ /* If this is a global symbol set the written flag, and if
8070 -+ it is a local symbol see if we should discard it. */
8071 -+ if (h != NULL)
8072 -+ {
8073 -+ mark_written (h);
8074 -+ }
8075 -+ else if ((type & N_TYPE) != N_SETT
8076 -+ && (type & N_TYPE) != N_SETD
8077 -+ && (type & N_TYPE) != N_SETB
8078 -+ && (type & N_TYPE) != N_SETA)
8079 -+ {
8080 -+ switch (discard)
8081 -+ {
8082 -+ case discard_none:
8083 -+ case discard_sec_merge:
8084 -+ break;
8085 -+ case discard_l:
8086 -+ if (bfd_is_local_label_name (input_bfd, name))
8087 -+ skip = TRUE;
8088 -+ break;
8089 -+ default:
8090 -+ case discard_all:
8091 -+ skip = TRUE;
8092 -+ break;
8093 -+ }
8094 -+ if (skip)
8095 -+ {
8096 -+ pass = FALSE;
8097 -+ continue;
8098 -+ }
8099 -+ }
8100 -+ }
8101 -+
8102 -+ /* Now find the nearest type in DRI format. */
8103 -+ switch (type)
8104 -+ {
8105 -+ case N_ABS:
8106 -+ case N_ABS | N_EXT:
8107 -+ case N_SETA:
8108 -+ case N_SETA | N_EXT:
8109 -+ case N_WEAKA:
8110 -+ a_type = A_EQU | A_DEF | A_GLOBL;
8111 -+ break;
8112 -+ case N_TEXT:
8113 -+ case N_TEXT | N_EXT:
8114 -+ case N_SETT:
8115 -+ case N_SETT | N_EXT:
8116 -+ case N_WEAKT:
8117 -+ a_type = A_TEXT | A_DEF | A_GLOBL;
8118 -+ break;
8119 -+ case N_DATA:
8120 -+ case N_DATA | N_EXT:
8121 -+ case N_SETD:
8122 -+ case N_SETD | N_EXT:
8123 -+ case N_WEAKD:
8124 -+ a_type = A_DATA | A_DEF | A_GLOBL;
8125 -+ break;
8126 -+ case N_BSS:
8127 -+ case N_BSS | N_EXT:
8128 -+ case N_SETB:
8129 -+ case N_SETB | N_EXT:
8130 -+ case N_WEAKB:
8131 -+ a_type = A_BSS | A_DEF | A_GLOBL;
8132 -+ break;
8133 -+ default:
8134 -+ continue;
8135 -+ }
8136 -+
8137 -+ written_bytes = write_dri_symbol (abfd, name, a_type, val);
8138 -+ if (written_bytes < 0)
8139 -+ return FALSE;
8140 -+
8141 -+ myinfo->dri_symtab_size += written_bytes;
8142 -+ }
8143 -+ }
8144 -+
8145 -+ obj_aout_external_string_size (abfd) = 0;
8146 -+ return TRUE;
8147 -+}
8148 -+
8149 -+/* This is used for qsort() to sort addresses
8150 -+ for the TPA relocation table. */
8151 -+
8152 -+static int
8153 -+vma_cmp (const void *v1, const void *v2)
8154 -+{
8155 -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2)));
8156 -+}
8157 -+
8158 -+/* Alloc and fill the TPA relocation table. */
8159 -+
8160 -+static bfd_boolean
8161 -+fill_tparel (bfd *abfd)
8162 -+{
8163 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
8164 -+ unsigned long i;
8165 -+ bfd_size_type bytes;
8166 -+ unsigned char *ptr;
8167 -+
8168 -+ /* Sort the relocation info. */
8169 -+ if (myinfo->relocs != NULL)
8170 -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma),
8171 -+ vma_cmp);
8172 -+
8173 -+ /* Now calculate the number of bytes we need. The relocation info
8174 -+ is encoded as follows: The first entry is a 32-bit value
8175 -+ denoting the first offset to relocate. All following entries
8176 -+ are relative to the preceding one. For relative offsets of
8177 -+ more than 254 bytes a value of 1 is used. The OS will then
8178 -+ add 254 bytes to the current offset. The list is then terminated
8179 -+ with the byte 0. */
8180 -+ bytes = 4; /* First entry is a long. */
8181 -+ for (i = 1; i < myinfo->relocs_used; i++)
8182 -+ {
8183 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
8184 -+ BFD_ASSERT(diff > 0);
8185 -+ bytes += (diff + 253) / 254;
8186 -+ }
8187 -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */
8188 -+ if (myinfo->relocs_used > 0)
8189 -+ bytes++;
8190 -+
8191 -+ myinfo->tparel_size = bytes;
8192 -+ myinfo->tparel = bfd_alloc (abfd, bytes);
8193 -+ if (myinfo->tparel == NULL)
8194 -+ return FALSE;
8195 -+
8196 -+ /* Now fill the array. */
8197 -+ ptr = (bfd_byte*) myinfo->tparel;
8198 -+ if (myinfo->relocs != NULL)
8199 -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr);
8200 -+ else
8201 -+ bfd_put_32 (abfd, 0, ptr);
8202 -+ ptr += 4;
8203 -+
8204 -+ for (i = 1; i < myinfo->relocs_used; i++)
8205 -+ {
8206 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
8207 -+ while (diff > 254)
8208 -+ {
8209 -+ *ptr++ = 1;
8210 -+ diff -= 254;
8211 -+ }
8212 -+ *ptr++ = (bfd_byte) diff;
8213 -+ }
8214 -+
8215 -+ if (myinfo->relocs_used > 0)
8216 -+ *ptr = 0;
8217 -+
8218 -+ return TRUE;
8219 -+}
8220 -+
8221 -+/* Final link routine. We need to use a call back to get the correct
8222 -+ offsets in the output file. And we need to malloc some internal
8223 -+ buffers. */
8224 -+
8225 -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link
8226 -+
8227 -+static bfd_boolean
8228 -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
8229 -+{
8230 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
8231 -+ struct bfd_link_hash_table *hash = info->hash;
8232 -+ enum bfd_link_strip original_strip = info->strip;
8233 -+
8234 -+ if (info->relocatable)
8235 -+ {
8236 -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s",
8237 -+ abfd, bfd_get_target (abfd));
8238 -+ bfd_set_error (bfd_error_invalid_operation);
8239 -+ return FALSE;
8240 -+ }
8241 -+
8242 -+ myinfo->linkinfo = info;
8243 -+
8244 -+ /* Make sure that for now we never write zmagics. */
8245 -+ abfd->flags &= ~D_PAGED;
8246 -+
8247 -+ /* Find the __stksize symbol. This symbol is used for a MiNT
8248 -+ special kludge. The libc defines this symbol in an object file
8249 -+ initialized to a default value to make sure it is defined in
8250 -+ every output file. The start-up code in crtinit() then simply
8251 -+ sets the stacksize accordingly. In your programs (if they need
8252 -+ an unusual stacksize) you can then simply code:
8253 -+
8254 -+ long _stksize = 0x2000;
8255 -+
8256 -+ This will create a program stack of 2k. Since MiNT cannot detect
8257 -+ a stack overflow this is the only way to prevent program crashes
8258 -+ caused by a stack that is too small.
8259 -+
8260 -+ The ancient linker ignored this feature, the ancient strip
8261 -+ program paid heed to it. By default, strip never stripped this
8262 -+ special symbol from the binary.
8263 -+
8264 -+ Another program called ``printstk'' and its colleague ``fixstk''
8265 -+ could be used to either print the current value of the stacksize
8266 -+ or to modify it without recompiling and rebuilding. These
8267 -+ programs traversed the symbol table and then took the appropriate
8268 -+ measures if the symbol was found.
8269 -+
8270 -+ Here we do a different approach. Since we already expanded the
8271 -+ standard executable header we now hardcode the address (as a file
8272 -+ offset) that the __stksize symbol points to into the header. We
8273 -+ can now let strip safely remove the entry from the symbol table
8274 -+ and we're not dependent on a special format of the symbol table.
8275 -+ Because the address is kept in the header we will always be able
8276 -+ to manipulate the stacksize value later. */
8277 -+ if (hash != NULL)
8278 -+ {
8279 -+ struct aout_link_hash_entry *h =
8280 -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize",
8281 -+ FALSE, FALSE, FALSE);
8282 -+ asection *sec;
8283 -+
8284 -+ if (h != NULL)
8285 -+ {
8286 -+ switch (h->root.type)
8287 -+ {
8288 -+ case bfd_link_hash_defined:
8289 -+ case bfd_link_hash_defweak:
8290 -+ sec = h->root.u.def.section->output_section;
8291 -+ BFD_ASSERT (sec->owner == abfd);
8292 -+
8293 -+ myinfo->stkpos = (h->root.u.def.value + sec->vma
8294 -+ + h->root.u.def.section->output_offset
8295 -+ + GEMDOS_HEADER_SIZE);
8296 -+ break;
8297 -+ default: /* Ignore other types. */
8298 -+ break;
8299 -+ }
8300 -+ }
8301 -+ }
8302 -+
8303 -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
8304 -+ {
8305 -+ myinfo->traditional_format = TRUE;
8306 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI;
8307 -+ }
8308 -+
8309 -+ /* Unconditionally unset the traditional flag. The only effect in
8310 -+ the a.out code is to disable string hashing (with respect to
8311 -+ SunOS gdx). This is not necessary for us. */
8312 -+
8313 -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT;
8314 -+
8315 -+ /* Do not write GNU symbols in traditional format. */
8316 -+ if (myinfo->traditional_format)
8317 -+ info->strip = strip_all;
8318 -+
8319 -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback)
8320 -+ != TRUE)
8321 -+ return FALSE;
8322 -+
8323 -+ if (myinfo->reloc_error)
8324 -+ return FALSE;
8325 -+
8326 -+ /* Restore the strip status for the traditional symbols. */
8327 -+ info->strip = original_strip;
8328 -+
8329 -+ if (myinfo->traditional_format
8330 -+ && link_write_traditional_syms (abfd, info) != TRUE)
8331 -+ return FALSE;
8332 -+
8333 -+ if (fill_tparel (abfd) != TRUE)
8334 -+ return FALSE;
8335 -+
8336 -+ return TRUE;
8337 -+}
8338 -+
8339 -+/* Copy private BFD header information from the input BFD. */
8340 -+
8341 -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data
8342 -+
8343 -+static bfd_boolean
8344 -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd)
8345 -+{
8346 -+ (void)obfd; /* Unused. */
8347 -+
8348 -+ /* We can only copy BFD files using our own file format. */
8349 -+ if (ibfd->xvec != &m68kmint_prg_vec)
8350 -+ {
8351 -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s",
8352 -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd));
8353 -+ bfd_set_error (bfd_error_invalid_operation);
8354 -+ return FALSE;
8355 -+ }
8356 -+
8357 -+ return TRUE;
8358 -+}
8359 -+
8360 -+/* Copy backend specific data from one object module to another.
8361 -+ This function is used by objcopy and strip. */
8362 -+
8363 -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data
8364 -+
8365 -+static bfd_boolean
8366 -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
8367 -+{
8368 -+ struct mint_internal_info *myinfo_in;
8369 -+ struct mint_internal_info *myinfo_out;
8370 -+
8371 -+ /* obfd uses our file format, ibfd may be foreign. */
8372 -+ if (ibfd->xvec != &m68kmint_prg_vec)
8373 -+ return TRUE;
8374 -+
8375 -+ myinfo_in = obj_aout_ext (ibfd);
8376 -+ BFD_ASSERT (myinfo_in != NULL);
8377 -+
8378 -+ myinfo_out = obj_aout_ext (obfd);
8379 -+ BFD_ASSERT (myinfo_out != NULL);
8380 -+
8381 -+ /* Copy myinfo. */
8382 -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out));
8383 -+
8384 -+ /* Copy tparel. */
8385 -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size);
8386 -+ if (myinfo_out->tparel == NULL)
8387 -+ return FALSE;
8388 -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size);
8389 -+
8390 -+ /* Normalize the type of empty symbols. */
8391 -+ if (bfd_get_symcount (obfd) == 0)
8392 -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
8393 -+
8394 -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */
8395 -+}
8396 -+
8397 -+/* Merge private BFD information from an input BFD to the output BFD when linking. */
8398 -+
8399 -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data
8400 -+
8401 -+static bfd_boolean
8402 -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
8403 -+{
8404 -+ (void)obfd; /* Unused. */
8405 -+
8406 -+ /* Our file format cannot be used as linker input. */
8407 -+ if (ibfd->xvec == &m68kmint_prg_vec)
8408 -+ {
8409 -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input",
8410 -+ ibfd, bfd_get_target (ibfd));
8411 -+ bfd_set_error (bfd_error_invalid_operation);
8412 -+ return FALSE;
8413 -+ }
8414 -+
8415 -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */
8416 -+}
8417 -+
8418 -+/* Find out the symbol name. */
8419 -+
8420 -+static const char *
8421 -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd,
8422 -+ bfd_byte *location, struct reloc_std_external *rel)
8423 -+{
8424 -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd);
8425 -+ char *strings = obj_aout_external_strings (input_bfd);
8426 -+ struct aout_link_hash_entry **sym_hashes
8427 -+ = obj_aout_sym_hashes (input_bfd);
8428 -+ struct aout_link_hash_entry *h = NULL;
8429 -+ const char *name;
8430 -+ bfd_size_type r_index;
8431 -+ int r_extern;
8432 -+
8433 -+ if (bfd_get_reloc_size (howto) != 4)
8434 -+ return "(not a symbol)";
8435 -+
8436 -+ /* The input bfd is always big-endian. There is no need to
8437 -+ call bfd_header_big_endian (input_bfd). */
8438 -+ r_index = ((rel->r_index[0] << 16)
8439 -+ | (rel->r_index[1] << 8)
8440 -+ | (rel->r_index[2]));
8441 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
8442 -+
8443 -+ if (sym_hashes != NULL)
8444 -+ h = sym_hashes[r_index];
8445 -+
8446 -+ if (!r_extern)
8447 -+ {
8448 -+ bfd_size_type i;
8449 -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location);
8450 -+
8451 -+ name = NULL;
8452 -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++)
8453 -+ {
8454 -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value);
8455 -+
8456 -+ if (this_value == wanted_value)
8457 -+ {
8458 -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type);
8459 -+
8460 -+ /* Skip debug symbols and the like. */
8461 -+ if ((symtype & N_STAB) != 0)
8462 -+ continue;
8463 -+
8464 -+ /* This is dirty but preferable to a plethoria of
8465 -+ single comparisons. */
8466 -+ if (symtype <= (N_BSS | N_EXT)
8467 -+ || (symtype >= N_WEAKU && symtype <= N_COMM))
8468 -+ {
8469 -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx);
8470 -+ break;
8471 -+ }
8472 -+ }
8473 -+ }
8474 -+
8475 -+ /* FIXME: If the relocation is against a section there is
8476 -+ probably a symbol for that section floating around somewhere
8477 -+ in the bfd jungle. */
8478 -+ if (name == NULL)
8479 -+ {
8480 -+ switch ((r_index & N_TYPE) & ~N_EXT)
8481 -+ {
8482 -+ case N_TEXT:
8483 -+ name = "text section";
8484 -+ break;
8485 -+ case N_DATA:
8486 -+ name = "data section";
8487 -+ break;
8488 -+ case N_BSS:
8489 -+ name = "bss section";
8490 -+ break;
8491 -+ case N_ABS:
8492 -+ name = "absolute section";
8493 -+ break;
8494 -+ default:
8495 -+ name = "unknown section";
8496 -+ break;
8497 -+ }
8498 -+ }
8499 -+ }
8500 -+ else if (h != NULL)
8501 -+ name = h->root.root.string;
8502 -+ else if (r_index >= obj_aout_external_sym_count (input_bfd))
8503 -+ name = "(unknown symbol)"; /* Shouldn't happen. */
8504 -+ else
8505 -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
8506 -+
8507 -+ return name;
8508 -+}
8509 -+
8510 -+/* This relocation routine is used by some of the backend linkers.
8511 -+ They do not construct asymbol or arelent structures, so there is no
8512 -+ reason for them to use bfd_perform_relocation. Also,
8513 -+ bfd_perform_relocation is so hacked up it is easier to write a new
8514 -+ function than to try to deal with it.
8515 -+
8516 -+ This routine does a final relocation. Whether it is useful for a
8517 -+ relocatable link depends upon how the object format defines
8518 -+ relocations.
8519 -+
8520 -+ FIXME: This routine ignores any special_function in the HOWTO,
8521 -+ since the existing special_function values have been written for
8522 -+ bfd_perform_relocation.
8523 -+
8524 -+ HOWTO is the reloc howto information.
8525 -+ INPUT_BFD is the BFD which the reloc applies to.
8526 -+ INPUT_SECTION is the section which the reloc applies to.
8527 -+ CONTENTS is the contents of the section.
8528 -+ ADDRESS is the address of the reloc within INPUT_SECTION.
8529 -+ VALUE is the value of the symbol the reloc refers to.
8530 -+ ADDEND is the addend of the reloc. */
8531 -+
8532 -+/* The additional parameter REL is specific to this backend.
8533 -+ This function is derived from _bfd_final_link_relocate()
8534 -+ found in reloc.c. It adds additional checking for dangerous
8535 -+ relocations in MiNT sharable text sections, then it records
8536 -+ the relocated offset in myinfo->relocs[] for further processing. */
8537 -+
8538 -+static bfd_reloc_status_type
8539 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
8540 -+ bfd *input_bfd,
8541 -+ asection *input_section,
8542 -+ bfd_byte *contents,
8543 -+ bfd_vma address,
8544 -+ bfd_vma value,
8545 -+ bfd_vma addend,
8546 -+ struct reloc_std_external *rel)
8547 -+{
8548 -+ bfd_vma relocation;
8549 -+ bfd *output_bfd = input_section->output_section->owner;
8550 -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd);
8551 -+ bfd_reloc_status_type retval;
8552 -+ int r_index;
8553 -+ int r_extern;
8554 -+ bfd_boolean need_tpa_relocation;
8555 -+
8556 -+ /* The input bfd is always big-endian. There is no need to
8557 -+ call bfd_header_big_endian (input_bfd). */
8558 -+ r_index = ((rel->r_index[0] << 16)
8559 -+ | (rel->r_index[1] << 8)
8560 -+ | (rel->r_index[2]));
8561 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
8562 -+
8563 -+#define _MINT_F_SHTEXT 0x800
8564 -+
8565 -+ /* Sanity check the address. */
8566 -+ if (address > bfd_get_section_limit (input_bfd, input_section))
8567 -+ return bfd_reloc_outofrange;
8568 -+
8569 -+ /* This function assumes that we are dealing with a basic relocation
8570 -+ against a symbol. We want to compute the value of the symbol to
8571 -+ relocate to. This is just VALUE, the value of the symbol, plus
8572 -+ ADDEND, any addend associated with the reloc. */
8573 -+ relocation = value + addend;
8574 -+
8575 -+ /* Check for dangerous relocations in images with a sharable
8576 -+ text section. */
8577 -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0
8578 -+ && bfd_get_reloc_size (howto) == 4)
8579 -+ {
8580 -+ bfd_boolean error_found = FALSE;
8581 -+ const char *name = NULL;
8582 -+
8583 -+ if (input_section == obj_textsec (input_bfd))
8584 -+ {
8585 -+ if (!r_extern)
8586 -+ {
8587 -+ /* This is a relocation against another section. Only
8588 -+ relocations against the text section are allowed. */
8589 -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT))
8590 -+ error_found = TRUE;
8591 -+ }
8592 -+ else if (relocation > (input_section->output_section->vma
8593 -+ + input_section->output_section->size))
8594 -+ {
8595 -+ error_found = TRUE;
8596 -+ }
8597 -+ else if (relocation == (input_section->output_section->vma
8598 -+ + input_section->output_section->size))
8599 -+ {
8600 -+ name = find_symbol_name (howto, input_bfd,
8601 -+ contents + address,
8602 -+ rel);
8603 -+ if (strcmp (name, "_etext") == 0)
8604 -+ error_found = FALSE;
8605 -+ }
8606 -+ }
8607 -+
8608 -+ if (error_found)
8609 -+ {
8610 -+ const struct bfd_link_callbacks *callbacks
8611 -+ = myinfo->linkinfo->callbacks;
8612 -+
8613 -+ myinfo->reloc_error = TRUE;
8614 -+
8615 -+ if (callbacks->reloc_dangerous != NULL)
8616 -+ {
8617 -+ if (name == NULL)
8618 -+ name = find_symbol_name (howto, input_bfd,
8619 -+ contents + address,
8620 -+ rel);
8621 -+
8622 -+ callbacks->reloc_dangerous (myinfo->linkinfo, name,
8623 -+ input_bfd,
8624 -+ input_section, address);
8625 -+ }
8626 -+ }
8627 -+ }
8628 -+
8629 -+ /* If the relocation is PC relative, we want to set RELOCATION to
8630 -+ the distance between the symbol (currently in RELOCATION) and the
8631 -+ location we are relocating. Some targets (e.g., i386-aout)
8632 -+ arrange for the contents of the section to be the negative of the
8633 -+ offset of the location within the section; for such targets
8634 -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF)
8635 -+ simply leave the contents of the section as zero; for such
8636 -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not
8637 -+ need to subtract out the offset of the location within the
8638 -+ section (which is just ADDRESS). */
8639 -+ if (howto->pc_relative)
8640 -+ {
8641 -+ relocation -= (input_section->output_section->vma
8642 -+ + input_section->output_offset);
8643 -+ if (howto->pcrel_offset)
8644 -+ relocation -= address;
8645 -+ }
8646 -+
8647 -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation,
8648 -+ contents + address);
8649 -+
8650 -+ /* The symbol has to be relocated again iff the length of the relocation
8651 -+ is 2 words and it is not pc relative. */
8652 -+ need_tpa_relocation = FALSE;
8653 -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4)
8654 -+ {
8655 -+ if (r_extern)
8656 -+ {
8657 -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd);
8658 -+ struct aout_link_hash_entry *h = sym_hashes[r_index];
8659 -+ asection *output_section = h->root.u.def.section->output_section;
8660 -+
8661 -+ /* Do not relocate absolute symbols. */
8662 -+ if (output_section == obj_textsec (output_bfd)
8663 -+ || output_section == obj_datasec (output_bfd)
8664 -+ || output_section == obj_bsssec (output_bfd))
8665 -+ {
8666 -+ need_tpa_relocation = TRUE;
8667 -+ }
8668 -+ }
8669 -+ else
8670 -+ {
8671 -+ need_tpa_relocation = TRUE;
8672 -+ }
8673 -+ }
8674 -+
8675 -+ /* Here we add the TPA relocation entries for the address references
8676 -+ located inside the input sections. Note that if some references
8677 -+ to addresses are generated using data statements in the linker
8678 -+ script, they will not be relocated here because they do not
8679 -+ belong to any input section. */
8680 -+ if (need_tpa_relocation)
8681 -+ {
8682 -+ bfd_vma tpa_address = input_section->output_section->vma
8683 -+ + input_section->output_offset + address;
8684 -+
8685 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address))
8686 -+ return bfd_reloc_other;
8687 -+ }
8688 -+
8689 -+ return retval;
8690 -+}
8691 -+
8692 -+/* Write out the TPA relocation table. */
8693 -+
8694 -+static bfd_boolean
8695 -+write_tparel (bfd *abfd, struct internal_exec *execp)
8696 -+{
8697 -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd);
8698 -+
8699 -+ if (myinfo->dri_symtab_size == 0)
8700 -+ myinfo->tparel_pos = N_STROFF (*execp)
8701 -+ + obj_aout_external_string_size (abfd);
8702 -+ else
8703 -+ myinfo->tparel_pos = N_SYMOFF (*execp)
8704 -+ + myinfo->dri_symtab_size;
8705 -+
8706 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0)
8707 -+ return FALSE;
8708 -+
8709 -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd)
8710 -+ != myinfo->tparel_size)
8711 -+ return FALSE;
8712 -+
8713 -+ return TRUE;
8714 -+}
8715 -+
8716 -+/* Write the full exec header.
8717 -+ This function must be called last to ensure that we have all the
8718 -+ information needed to fill the MiNT-specific header fields. */
8719 -+
8720 -+static bfd_boolean
8721 -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes)
8722 -+{
8723 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
8724 -+ bfd_size_type symtab_size;
8725 -+
8726 -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch);
8727 -+
8728 -+ /* The OS will load our extension header fields into the text segment. */
8729 -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE),
8730 -+ exec_bytes->g_text);
8731 -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data);
8732 -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss);
8733 -+
8734 -+ /* The OS' notion of the size of the symbol table is another than
8735 -+ the bfd library's. We have to fill in the size of the table
8736 -+ itself plus the size of the string table but only if we have not written
8737 -+ a traditional symbol table. If we have written a traditional symbol
8738 -+ table we know the size. */
8739 -+ if (myinfo->dri_symtab_size != 0)
8740 -+ symtab_size = myinfo->dri_symtab_size;
8741 -+ else
8742 -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp);
8743 -+
8744 -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms);
8745 -+
8746 -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic);
8747 -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags);
8748 -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs);
8749 -+
8750 -+ /* Generate the jump instruction to the entry point. In m68k
8751 -+ assembler mnemnonics it looks more or less like this:
8752 -+
8753 -+ move.l exec_bytes->e_entry(pc),d0
8754 -+ jmp -6(pc,d0.l)
8755 -+
8756 -+ Sorry for the wrong syntax. As a real assembler addict I
8757 -+ never actually use an assembler. I edit my binaries manually
8758 -+ with a hex editor, looks much cooler and it strengthens your
8759 -+ abstraction abilities. */
8760 -+
8761 -+ exec_bytes->g_jump_entry[0] = 0x20;
8762 -+ exec_bytes->g_jump_entry[1] = 0x3a;
8763 -+ exec_bytes->g_jump_entry[2] = 0x00;
8764 -+ exec_bytes->g_jump_entry[3] = 0x1a;
8765 -+ exec_bytes->g_jump_entry[4] = 0x4e;
8766 -+ exec_bytes->g_jump_entry[5] = 0xfb;
8767 -+ exec_bytes->g_jump_entry[6] = 0x08;
8768 -+ exec_bytes->g_jump_entry[7] = 0xfa;
8769 -+
8770 -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos);
8771 -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size);
8772 -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos);
8773 -+
8774 -+ /* If there are no symbols, pretend they are in GNU format. */
8775 -+ if (symtab_size == 0)
8776 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
8777 -+
8778 -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format);
8779 -+
8780 -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0));
8781 -+
8782 -+ /* The standard stuff. */
8783 -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes);
8784 -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU)
8785 -+ PUT_WORD (abfd, 0, exec_bytes->e_syms);
8786 -+
8787 -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
8788 -+ return FALSE;
8789 -+
8790 -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd)
8791 -+ != EXEC_BYTES_SIZE)
8792 -+ return FALSE;
8793 -+
8794 -+ /* Override the stack size. */
8795 -+ if (myinfo->override_stack_size && myinfo->stkpos)
8796 -+ {
8797 -+ bfd_byte big_endian_stack_size[4];
8798 -+
8799 -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size);
8800 -+
8801 -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0)
8802 -+ return FALSE;
8803 -+
8804 -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4)
8805 -+ return FALSE;
8806 -+ }
8807 -+
8808 -+ return TRUE;
8809 -+}
8810 -+
8811 -+/* Write an object file.
8812 -+ Section contents have already been written. We write the
8813 -+ file header, symbols, and relocation. */
8814 -+
8815 -+#define MY_write_object_contents m68kmint_prg_write_object_contents
8816 -+
8817 -+static bfd_boolean
8818 -+m68kmint_prg_write_object_contents (bfd *abfd)
8819 -+{
8820 -+ struct external_exec exec_bytes;
8821 -+ struct internal_exec *execp = exec_hdr (abfd);
8822 -+ bfd_size_type text_size;
8823 -+ file_ptr text_end;
8824 -+
8825 -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL);
8826 -+
8827 -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
8828 -+
8829 -+ /* Most of the following code come from the WRITE_HEADERS macro
8830 -+ found in libaout.h. */
8831 -+
8832 -+ if (adata(abfd).magic == undecided_magic)
8833 -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
8834 -+
8835 -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
8836 -+ execp->a_entry = bfd_get_start_address (abfd);
8837 -+
8838 -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) *
8839 -+ obj_reloc_entry_size (abfd));
8840 -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
8841 -+ obj_reloc_entry_size (abfd));
8842 -+
8843 -+ /* Now write out reloc info, followed by syms and strings. */
8844 -+
8845 -+ if (bfd_get_outsymbols (abfd) != NULL
8846 -+ && bfd_get_symcount (abfd) != 0)
8847 -+ {
8848 -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
8849 -+ return FALSE;
8850 -+
8851 -+ if (! NAME (aout, write_syms) (abfd))
8852 -+ return FALSE;
8853 -+ }
8854 -+
8855 -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
8856 -+ return FALSE;
8857 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
8858 -+ return FALSE;
8859 -+
8860 -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
8861 -+ return FALSE;
8862 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
8863 -+ return FALSE;
8864 -+
8865 -+ if (write_tparel (abfd, execp) != TRUE)
8866 -+ return FALSE;
8867 -+
8868 -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE)
8869 -+ return FALSE;
8870 -+
8871 -+ return TRUE;
8872 -+}
8873 -+
8874 -+/* Print private BFD data. Used by objdump -p. */
8875 -+
8876 -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data
8877 -+
8878 -+static bfd_boolean
8879 -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr)
8880 -+{
8881 -+ FILE *file = (FILE *) ptr;
8882 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
8883 -+ const char* symbol_format;
8884 -+ long stksize = 0;
8885 -+
8886 -+ fprintf (file, "\n");
8887 -+
8888 -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags);
8889 -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd));
8890 -+
8891 -+ /* Stack size. */
8892 -+ if (myinfo->stkpos != 0)
8893 -+ {
8894 -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0
8895 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long)))
8896 -+ return FALSE;
8897 -+
8898 -+ stksize = bfd_get_signed_32 (abfd, &stksize);
8899 -+ }
8900 -+ fprintf (file, " Stack size: %ld\n", stksize);
8901 -+
8902 -+ /* Symbol format. */
8903 -+ switch (myinfo->symbol_format)
8904 -+ {
8905 -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break;
8906 -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break;
8907 -+ default: symbol_format = "?"; break;
8908 -+ }
8909 -+ fprintf (file, "Symbol format: %s\n", symbol_format);
8910 -+
8911 -+ return TRUE;
8912 -+}
8913 -+
8914 -+/* Special case for NAME (aout, get_section_contents)
8915 -+ It is not declared in libaout.h, neither implemented in aoutx.h.
8916 -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h.
8917 -+ So the default value of MY_get_section_contents provided by aout-target.h
8918 -+ is not correct, it has to be defined here with the right value. */
8919 -+
8920 -+#define MY_get_section_contents aout_32_get_section_contents
8921 -+
8922 -+/* The following include will define m68kmint_prg_vec
8923 -+ and a default implementation for all the MY_ functions
8924 -+ not overriden here. */
8925 -+
8926 -+#include "aout-target.h"
8927 -+
8928 -+/* Set the GEMDOS executable flags.
8929 -+ It is called by the linker emulation script. */
8930 -+
8931 -+bfd_boolean
8932 -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags)
8933 -+{
8934 -+ struct mint_internal_info *myinfo;
8935 -+
8936 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
8937 -+ myinfo = obj_aout_ext (abfd);
8938 -+ BFD_ASSERT(myinfo != NULL);
8939 -+
8940 -+ myinfo->prg_flags = prg_flags;
8941 -+
8942 -+ return TRUE;
8943 -+}
8944 -+
8945 -+/* Override the stack size.
8946 -+ It is called by the linker emulation script. */
8947 -+
8948 -+bfd_boolean
8949 -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size)
8950 -+{
8951 -+ struct mint_internal_info *myinfo;
8952 -+
8953 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
8954 -+ myinfo = obj_aout_ext (abfd);
8955 -+ BFD_ASSERT(myinfo != NULL);
8956 -+
8957 -+ myinfo->stack_size = stack_size;
8958 -+ myinfo->override_stack_size = TRUE;
8959 -+
8960 -+ return TRUE;
8961 -+}
8962 -+
8963 -+/* Add a TPA relocation entry.
8964 -+ It is called by BFD when linking the input sections, and by the
8965 -+ linker when it generates a reference to an address (in particular,
8966 -+ when building the constructors list). */
8967 -+
8968 -+bfd_boolean
8969 -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address)
8970 -+{
8971 -+ struct mint_internal_info *myinfo;
8972 -+
8973 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
8974 -+ myinfo = obj_aout_ext (abfd);
8975 -+ BFD_ASSERT(myinfo != NULL);
8976 -+
8977 -+ /* Enlarge the buffer if necessary. */
8978 -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated)
8979 -+ {
8980 -+ bfd_vma *newbuf;
8981 -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE;
8982 -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated);
8983 -+ if (newbuf == NULL)
8984 -+ return FALSE;
8985 -+
8986 -+ myinfo->relocs = newbuf;
8987 -+ }
8988 -+
8989 -+ /* The TPA relative relocation actually just adds the address of
8990 -+ the text segment (i. e. beginning of the executable in memory)
8991 -+ to the addresses at the specified locations. This allows an
8992 -+ executable to be loaded everywhere in the address space without
8993 -+ memory management. */
8994 -+ myinfo->relocs[myinfo->relocs_used++] = address;
8995 -+
8996 -+ return TRUE;
8997 -+}
8998 -diff -aurN binutils-2.21/bfd/targets.c binutils-2.21-mint-20110206/bfd/targets.c
8999 ---- binutils-2.21/bfd/targets.c 2010-10-22 14:08:28.000000000 +0200
9000 -+++ binutils-2.21-mint-20110206/bfd/targets.c 2011-02-06 16:27:49.515625000 +0100
9001 -@@ -763,6 +763,7 @@
9002 - extern const bfd_target m68kcoff_vec;
9003 - extern const bfd_target m68kcoffun_vec;
9004 - extern const bfd_target m68klinux_vec;
9005 -+extern const bfd_target m68kmint_prg_vec;
9006 - extern const bfd_target m68knetbsd_vec;
9007 - extern const bfd_target m68ksysvcoff_vec;
9008 - extern const bfd_target m88kbcs_vec;
9009 -diff -aurN binutils-2.21/binutils/configure binutils-2.21-mint-20110206/binutils/configure
9010 ---- binutils-2.21/binutils/configure 2010-11-05 11:32:55.000000000 +0100
9011 -+++ binutils-2.21-mint-20110206/binutils/configure 2011-02-06 16:27:50.000000000 +0100
9012 -@@ -13049,7 +13049,7 @@
9013 -
9014 -
9015 - case "${host}" in
9016 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
9017 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
9018 -
9019 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
9020 - ;;
9021 -diff -aurN binutils-2.21/binutils/dlltool.c binutils-2.21-mint-20110206/binutils/dlltool.c
9022 ---- binutils-2.21/binutils/dlltool.c 2010-10-30 19:14:02.000000000 +0200
9023 -+++ binutils-2.21-mint-20110206/binutils/dlltool.c 2011-02-06 16:27:50.203125000 +0100
9024 -@@ -4347,7 +4347,7 @@
9025 - if (*cp == '-')
9026 - dash = cp;
9027 - if (
9028 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
9029 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
9030 - *cp == ':' || *cp == '\\' ||
9031 - #endif
9032 - *cp == '/')
9033 -diff -aurN binutils-2.21/binutils/dllwrap.c binutils-2.21-mint-20110206/binutils/dllwrap.c
9034 ---- binutils-2.21/binutils/dllwrap.c 2010-07-15 09:58:47.000000000 +0200
9035 -+++ binutils-2.21-mint-20110206/binutils/dllwrap.c 2011-02-06 16:27:50.203125000 +0100
9036 -@@ -263,7 +263,7 @@
9037 - dash = cp;
9038 -
9039 - if (
9040 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
9041 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
9042 - *cp == ':' || *cp == '\\' ||
9043 - #endif
9044 - *cp == '/')
9045 -diff -aurN binutils-2.21/binutils/readelf.c binutils-2.21-mint-20110206/binutils/readelf.c
9046 ---- binutils-2.21/binutils/readelf.c 2010-11-02 15:36:35.000000000 +0100
9047 -+++ binutils-2.21-mint-20110206/binutils/readelf.c 2011-02-06 16:27:50.218750000 +0100
9048 -@@ -9879,7 +9879,11 @@
9049 - #ifndef __MSVCRT__
9050 - /* PR 11128: Use two separate invocations in order to work
9051 - around bugs in the Solaris 8 implementation of printf. */
9052 -+#if GCC_VERSION < 3000
9053 -+ printf (" [%6lx] ", (unsigned long) (data - start));
9054 -+#else
9055 - printf (" [%6tx] ", data - start);
9056 -+#endif
9057 - printf ("%s\n", data);
9058 - #else
9059 - printf (" [%6Ix] %s\n", (size_t) (data - start), data);
9060 -diff -aurN binutils-2.21/binutils/resrc.c binutils-2.21-mint-20110206/binutils/resrc.c
9061 ---- binutils-2.21/binutils/resrc.c 2009-12-11 14:42:06.000000000 +0100
9062 -+++ binutils-2.21-mint-20110206/binutils/resrc.c 2011-02-06 16:27:50.234375000 +0100
9063 -@@ -396,7 +396,7 @@
9064 - *space = 0;
9065 -
9066 - if (
9067 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32)
9068 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__)
9069 - strchr (cmd, '\\') ||
9070 - #endif
9071 - strchr (cmd, '/'))
9072 -@@ -514,7 +514,7 @@
9073 - if (*cp == '-')
9074 - dash = cp;
9075 - if (
9076 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32)
9077 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__)
9078 - *cp == ':' || *cp == '\\' ||
9079 - #endif
9080 - *cp == '/')
9081 -diff -aurN binutils-2.21/gas/config/te-mint.h binutils-2.21-mint-20110206/gas/config/te-mint.h
9082 ---- binutils-2.21/gas/config/te-mint.h 1970-01-01 01:00:00.000000000 +0100
9083 -+++ binutils-2.21-mint-20110206/gas/config/te-mint.h 2011-02-06 16:27:50.312500000 +0100
9084 -@@ -0,0 +1,30 @@
9085 -+/* Copyright 2008 Free Software Foundation, Inc.
9086 -+
9087 -+ This file is part of GAS, the GNU Assembler.
9088 -+
9089 -+ GAS is free software; you can redistribute it and/or modify
9090 -+ it under the terms of the GNU General Public License as
9091 -+ published by the Free Software Foundation; either version 3,
9092 -+ or (at your option) any later version.
9093 -+
9094 -+ GAS is distributed in the hope that it will be useful, but
9095 -+ WITHOUT ANY WARRANTY; without even the implied warranty of
9096 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
9097 -+ the GNU General Public License for more details.
9098 -+
9099 -+ You should have received a copy of the GNU General Public License
9100 -+ along with GAS; see the file COPYING. If not, write to the Free
9101 -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
9102 -+ 02110-1301, USA. */
9103 -+
9104 -+#define TE_MINT
9105 -+
9106 -+#define LOCAL_LABELS_DOLLAR 1
9107 -+#define LOCAL_LABELS_FB 1
9108 -+
9109 -+/* These define interfaces. */
9110 -+#ifdef OBJ_HEADER
9111 -+#include OBJ_HEADER
9112 -+#else
9113 -+#include "obj-format.h"
9114 -+#endif
9115 -diff -aurN binutils-2.21/gas/configure.tgt binutils-2.21-mint-20110206/gas/configure.tgt
9116 ---- binutils-2.21/gas/configure.tgt 2010-12-01 12:03:20.000000000 +0100
9117 -+++ binutils-2.21-mint-20110206/gas/configure.tgt 2011-02-06 16:27:50.312500000 +0100
9118 -@@ -266,6 +266,7 @@
9119 - m68k-*-linux-*) fmt=elf em=linux ;;
9120 - m68k-*-uclinux*) fmt=elf em=uclinux ;;
9121 - m68k-*-gnu*) fmt=elf ;;
9122 -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;;
9123 - m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
9124 - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
9125 - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
9126 -diff -aurN binutils-2.21/gas/testsuite/gas/all/weakref1u.d binutils-2.21-mint-20110206/gas/testsuite/gas/all/weakref1u.d
9127 ---- binutils-2.21/gas/testsuite/gas/all/weakref1u.d 2009-10-18 09:43:04.000000000 +0200
9128 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/all/weakref1u.d 2011-02-06 16:27:50.328125000 +0100
9129 -@@ -3,7 +3,7 @@
9130 - #source: weakref1.s
9131 - # aout turns undefined into *ABS* symbols.
9132 - # see weakref1.d for comments on the other not-targets
9133 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
9134 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
9135 -
9136 - # the rest of this file is generated with the following script:
9137 - # # script begin
9138 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/all.exp binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/all.exp
9139 ---- binutils-2.21/gas/testsuite/gas/m68k/all.exp 2010-09-23 14:15:55.000000000 +0200
9140 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/all.exp 2011-02-06 16:27:50.343750000 +0100
9141 -@@ -71,9 +71,10 @@
9142 -
9143 - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
9144 -
9145 -- if { [istarget *-*-netbsd] } then {
9146 -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then {
9147 - run_dump_test p3041
9148 - run_dump_test p3041data
9149 -+ run_dump_test p3041pcrel
9150 - }
9151 -
9152 - set testname "68000 operands"
9153 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isaa.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isaa.d
9154 ---- binutils-2.21/gas/testsuite/gas/m68k/br-isaa.d 2009-10-18 09:43:04.000000000 +0200
9155 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isaa.d 2011-02-06 16:27:50.359375000 +0100
9156 -@@ -1,7 +1,7 @@
9157 - #name: br-isaa.d
9158 - #objdump: -dr
9159 - #as: -march=isaa -pcrel
9160 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
9161 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
9162 -
9163 - .*: file format .*
9164 -
9165 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isab.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isab.d
9166 ---- binutils-2.21/gas/testsuite/gas/m68k/br-isab.d 2009-10-18 09:43:04.000000000 +0200
9167 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isab.d 2011-02-06 16:27:50.375000000 +0100
9168 -@@ -1,7 +1,7 @@
9169 - #name: br-isab.d
9170 - #objdump: -dr
9171 - #as: -march=isab -pcrel
9172 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
9173 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
9174 -
9175 - .*: file format .*
9176 -
9177 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/br-isac.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isac.d
9178 ---- binutils-2.21/gas/testsuite/gas/m68k/br-isac.d 2009-10-18 09:43:04.000000000 +0200
9179 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/br-isac.d 2011-02-06 16:27:50.375000000 +0100
9180 -@@ -1,7 +1,7 @@
9181 - #name: br-isac.d
9182 - #objdump: -dr
9183 - #as: -march=isac -pcrel
9184 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
9185 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
9186 -
9187 - .*: file format .*
9188 -
9189 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/cpu32.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/cpu32.d
9190 ---- binutils-2.21/gas/testsuite/gas/m68k/cpu32.d 2007-05-15 11:21:24.000000000 +0200
9191 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/cpu32.d 2011-02-06 16:27:50.390625000 +0100
9192 -@@ -1,5 +1,5 @@
9193 - #name: cpu32
9194 --#objdump: -d
9195 -+#objdump: --architecture=m68k:cpu32 -d
9196 - #as: -mcpu32
9197 -
9198 - .*: file format .*
9199 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/mcf-coproc.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-coproc.d
9200 ---- binutils-2.21/gas/testsuite/gas/m68k/mcf-coproc.d 2007-07-03 09:54:19.000000000 +0200
9201 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-coproc.d 2011-02-06 16:27:50.390625000 +0100
9202 -@@ -1,4 +1,4 @@
9203 --#objdump: -d
9204 -+#objdump: --architecture=m68k:547x -d
9205 - #as: -mcpu=5475
9206 -
9207 - .*: file format .*
9208 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/mcf-wdebug.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-wdebug.d
9209 ---- binutils-2.21/gas/testsuite/gas/m68k/mcf-wdebug.d 2007-06-18 18:10:27.000000000 +0200
9210 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/mcf-wdebug.d 2011-02-06 16:27:50.406250000 +0100
9211 -@@ -1,5 +1,5 @@
9212 - #name: mcf-wdebug
9213 --#objdump: -d
9214 -+#objdump: --architecture=m68k:5200 -d
9215 - #as: -m5208
9216 -
9217 - .*: file format .*
9218 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.d binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.d
9219 ---- binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.d 1970-01-01 01:00:00.000000000 +0100
9220 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.d 2011-02-06 16:27:50.421875000 +0100
9221 -@@ -0,0 +1,38 @@
9222 -+#name: PR 3041 pcrel
9223 -+#as: -m68000
9224 -+#objdump: -tdr
9225 -+
9226 -+.*: file format .*
9227 -+
9228 -+SYMBOL TABLE:
9229 -+00000024 w \.text 0000 00 0f mytext
9230 -+0000002e w \.data 0000 00 10 mydata
9231 -+0000003a w \.bss 0000 00 11 mybss
9232 -+
9233 -+Disassembly of section \.text:
9234 -+
9235 -+00000000 <.*>:
9236 -+ 0: 41fa fffe lea %pc@\(0 <.*>\),%a0
9237 -+ 2: DISP16 mytext
9238 -+ 4: 41fa fffc lea %pc@\(2 <.*>\),%a0
9239 -+ 6: DISP16 mytext
9240 -+ 8: 41fa fff2 lea %pc@\(fffffffc <.*>\),%a0
9241 -+ a: DISP16 mytext
9242 -+ c: 41fa fff2 lea %pc@\(0 <.*>\),%a0
9243 -+ e: DISP16 mydata
9244 -+ 10: 41fa fff1 lea %pc@\(3 <.*>\),%a0
9245 -+ 12: DISP16 mydata
9246 -+ 14: 41fa ffe9 lea %pc@\(ffffffff <.*>\),%a0
9247 -+ 16: DISP16 mydata
9248 -+ 18: 41fa ffe6 lea %pc@\(0 <.*>\),%a0
9249 -+ 1a: DISP16 mybss
9250 -+ 1c: 41fa ffe3 lea %pc@\(1 <.*>\),%a0
9251 -+ 1e: DISP16 mybss
9252 -+ 20: 41fa ffdc lea %pc@\(fffffffe <.*>\),%a0
9253 -+ 22: DISP16 mybss
9254 -+
9255 -+00000024 <mytext>:
9256 -+ 24: 4e71 nop
9257 -+ 26: 4e71 nop
9258 -+ 28: 4e71 nop
9259 -+ 2a: 4e71 nop
9260 -diff -aurN binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.s binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.s
9261 ---- binutils-2.21/gas/testsuite/gas/m68k/p3041pcrel.s 1970-01-01 01:00:00.000000000 +0100
9262 -+++ binutils-2.21-mint-20110206/gas/testsuite/gas/m68k/p3041pcrel.s 2011-02-06 16:27:50.437500000 +0100
9263 -@@ -0,0 +1,28 @@
9264 -+ lea mytext(%pc),%a0
9265 -+ lea mytext+2(%pc),%a0
9266 -+ lea mytext-4(%pc),%a0
9267 -+ lea mydata(%pc),%a0
9268 -+ lea mydata+3(%pc),%a0
9269 -+ lea mydata-1(%pc),%a0
9270 -+ lea mybss(%pc),%a0
9271 -+ lea mybss+1(%pc),%a0
9272 -+ lea mybss-2(%pc),%a0
9273 -+ .weak mytext
9274 -+mytext:
9275 -+ nop
9276 -+ nop
9277 -+ nop
9278 -+ nop
9279 -+
9280 -+ .data
9281 -+ .word 0x8081
9282 -+ .weak mydata
9283 -+mydata:
9284 -+ .word 0x8283
9285 -+ .word 0x8485
9286 -+
9287 -+ .bss
9288 -+ .skip 6
9289 -+ .weak mybss
9290 -+mybss:
9291 -+ .skip 2
9292 -diff -aurN binutils-2.21/gprof/corefile.c binutils-2.21-mint-20110206/gprof/corefile.c
9293 ---- binutils-2.21/gprof/corefile.c 2010-07-16 16:52:15.000000000 +0200
9294 -+++ binutils-2.21-mint-20110206/gprof/corefile.c 2011-02-06 16:30:48.015625000 +0100
9295 -@@ -678,7 +678,7 @@
9296 - }
9297 - }
9298 -
9299 -- symtab.limit->is_func = (core_syms[i]->flags & BSF_FUNCTION) != 0;
9300 -+ symtab.limit->is_func = TRUE;
9301 - symtab.limit->is_bb_head = TRUE;
9302 -
9303 - if (cxxclass == 't')
9304 -diff -aurN binutils-2.21/include/filenames.h binutils-2.21-mint-20110206/include/filenames.h
9305 ---- binutils-2.21/include/filenames.h 2010-04-26 20:04:23.000000000 +0200
9306 -+++ binutils-2.21-mint-20110206/include/filenames.h 2011-02-06 16:27:50.453125000 +0100
9307 -@@ -30,7 +30,7 @@
9308 - extern "C" {
9309 - #endif
9310 -
9311 --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
9312 -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__)
9313 - # ifndef HAVE_DOS_BASED_FILE_SYSTEM
9314 - # define HAVE_DOS_BASED_FILE_SYSTEM 1
9315 - # endif
9316 -diff -aurN binutils-2.21/include/getopt.h binutils-2.21-mint-20110206/include/getopt.h
9317 ---- binutils-2.21/include/getopt.h 2005-05-10 12:21:08.000000000 +0200
9318 -+++ binutils-2.21-mint-20110206/include/getopt.h 2011-02-06 16:27:50.453125000 +0100
9319 -@@ -106,7 +106,7 @@
9320 - to find the declaration so provide a fully prototyped one. If it
9321 - is 1, we found it so don't provide any declaration at all. */
9322 - #if !HAVE_DECL_GETOPT
9323 --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
9324 -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT)
9325 - /* Many other libraries have conflicting prototypes for getopt, with
9326 - differences in the consts, in unistd.h. To avoid compilation
9327 - errors, only prototype getopt for the GNU C library. */
9328 -diff -aurN binutils-2.21/ld/Makefile.am binutils-2.21-mint-20110206/ld/Makefile.am
9329 ---- binutils-2.21/ld/Makefile.am 2010-11-03 04:22:01.000000000 +0100
9330 -+++ binutils-2.21-mint-20110206/ld/Makefile.am 2011-02-06 16:27:50.671875000 +0100
9331 -@@ -300,6 +300,7 @@
9332 - em68kelf.c \
9333 - em68kelfnbsd.c \
9334 - em68klinux.c \
9335 -+ em68kmint.c \
9336 - em68knbsd.c \
9337 - em68kpsos.c \
9338 - em88kbcs.c \
9339 -@@ -1394,6 +1395,10 @@
9340 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
9341 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
9342 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
9343 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
9344 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
9345 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
9346 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
9347 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
9348 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
9349 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
9350 -diff -aurN binutils-2.21/ld/Makefile.in binutils-2.21-mint-20110206/ld/Makefile.in
9351 ---- binutils-2.21/ld/Makefile.in 2010-11-05 11:34:22.000000000 +0100
9352 -+++ binutils-2.21-mint-20110206/ld/Makefile.in 2011-02-06 16:27:50.718750000 +0100
9353 -@@ -600,6 +600,7 @@
9354 - em68kelf.c \
9355 - em68kelfnbsd.c \
9356 - em68klinux.c \
9357 -+ em68kmint.c \
9358 - em68knbsd.c \
9359 - em68kpsos.c \
9360 - em88kbcs.c \
9361 -@@ -1199,6 +1200,7 @@
9362 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@
9363 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@
9364 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@
9365 -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@
9366 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@
9367 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@
9368 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@
9369 -@@ -2817,6 +2819,10 @@
9370 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
9371 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
9372 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
9373 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
9374 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
9375 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
9376 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
9377 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
9378 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
9379 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
9380 -diff -aurN binutils-2.21/ld/configure binutils-2.21-mint-20110206/ld/configure
9381 ---- binutils-2.21/ld/configure 2010-11-23 14:50:32.000000000 +0100
9382 -+++ binutils-2.21-mint-20110206/ld/configure 2011-02-06 16:27:51.234375000 +0100
9383 -@@ -12978,7 +12978,7 @@
9384 -
9385 -
9386 - case "${host}" in
9387 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
9388 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
9389 -
9390 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
9391 - ;;
9392 -diff -aurN binutils-2.21/ld/configure.tgt binutils-2.21-mint-20110206/ld/configure.tgt
9393 ---- binutils-2.21/ld/configure.tgt 2010-12-01 12:03:47.000000000 +0100
9394 -+++ binutils-2.21-mint-20110206/ld/configure.tgt 2011-02-06 16:27:51.437500000 +0100
9395 -@@ -343,6 +343,7 @@
9396 - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
9397 - m68k-*-uclinux*) targ_emul=m68kelf ;;
9398 - m68*-*-gnu*) targ_emul=m68kelf ;;
9399 -+m68*-*-mint*) targ_emul=m68kmint ;;
9400 - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
9401 - targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
9402 - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
9403 -diff -aurN binutils-2.21/ld/emulparams/m68kmint.sh binutils-2.21-mint-20110206/ld/emulparams/m68kmint.sh
9404 ---- binutils-2.21/ld/emulparams/m68kmint.sh 1970-01-01 01:00:00.000000000 +0100
9405 -+++ binutils-2.21-mint-20110206/ld/emulparams/m68kmint.sh 2011-02-06 16:27:51.437500000 +0100
9406 -@@ -0,0 +1,6 @@
9407 -+SCRIPT_NAME=m68kmint
9408 -+OUTPUT_FORMAT="a.out-mintprg"
9409 -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big"
9410 -+TEXT_START_ADDR=0xe4
9411 -+ARCH=m68k
9412 -+EXTRA_EM_FILE=mint
9413 -diff -aurN binutils-2.21/ld/emultempl/generic.em binutils-2.21-mint-20110206/ld/emultempl/generic.em
9414 ---- binutils-2.21/ld/emultempl/generic.em 2009-09-02 09:25:35.000000000 +0200
9415 -+++ binutils-2.21-mint-20110206/ld/emultempl/generic.em 2011-02-06 16:27:51.453125000 +0100
9416 -@@ -138,8 +138,8 @@
9417 - ${LDEMUL_PLACE_ORPHAN-NULL},
9418 - ${LDEMUL_SET_SYMBOLS-NULL},
9419 - ${LDEMUL_PARSE_ARGS-NULL},
9420 -- NULL, /* add_options */
9421 -- NULL, /* handle_option */
9422 -+ ${LDEMUL_ADD_OPTIONS-NULL},
9423 -+ ${LDEMUL_HANDLE_OPTION-NULL},
9424 - ${LDEMUL_UNRECOGNIZED_FILE-NULL},
9425 - ${LDEMUL_LIST_OPTIONS-NULL},
9426 - ${LDEMUL_RECOGNIZED_FILE-NULL},
9427 -diff -aurN binutils-2.21/ld/emultempl/mint.em binutils-2.21-mint-20110206/ld/emultempl/mint.em
9428 ---- binutils-2.21/ld/emultempl/mint.em 1970-01-01 01:00:00.000000000 +0100
9429 -+++ binutils-2.21-mint-20110206/ld/emultempl/mint.em 2011-02-06 16:27:51.468750000 +0100
9430 -@@ -0,0 +1,330 @@
9431 -+# This shell script emits a C file. -*- C -*-
9432 -+# Copyright 2006, 2007 Free Software Foundation, Inc.
9433 -+#
9434 -+# This file is part of the GNU Binutils.
9435 -+#
9436 -+# This program is free software; you can redistribute it and/or modify
9437 -+# it under the terms of the GNU General Public License as published by
9438 -+# the Free Software Foundation; either version 3 of the License, or
9439 -+# (at your option) any later version.
9440 -+#
9441 -+# This program is distributed in the hope that it will be useful,
9442 -+# but WITHOUT ANY WARRANTY; without even the implied warranty of
9443 -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9444 -+# GNU General Public License for more details.
9445 -+#
9446 -+# You should have received a copy of the GNU General Public License
9447 -+# along with this program; if not, write to the Free Software
9448 -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
9449 -+# MA 02110-1301, USA.
9450 -+#
9451 -+
9452 -+# This file is sourced from generic.em
9453 -+#
9454 -+fragment <<EOF
9455 -+
9456 -+#include "getopt.h"
9457 -+#include "ldgram.h"
9458 -+
9459 -+/* Standard GEMDOS program flags. */
9460 -+#define _MINT_F_FASTLOAD 0x01 /* Don't clear heap. */
9461 -+#define _MINT_F_ALTLOAD 0x02 /* OK to load in alternate RAM. */
9462 -+#define _MINT_F_ALTALLOC 0x04 /* OK to malloc from alt. RAM. */
9463 -+#define _MINT_F_BESTFIT 0x08 /* Load with optimal heap size. */
9464 -+/* The memory flags are mutually exclusive. */
9465 -+#define _MINT_F_MEMPROTECTION 0xf0 /* Masks out protection bits. */
9466 -+#define _MINT_F_MEMPRIVATE 0x00 /* Memory is private. */
9467 -+#define _MINT_F_MEMGLOBAL 0x10 /* Read/write access to mem allowed. */
9468 -+#define _MINT_F_MEMSUPER 0x20 /* Only supervisor access allowed. */
9469 -+#define _MINT_F_MEMREADABLE 0x30 /* Any read access OK. */
9470 -+#define _MINT_F_SHTEXT 0x800 /* Program's text may be shared */
9471 -+
9472 -+/* Option flags. */
9473 -+static flagword prg_flags = (_MINT_F_FASTLOAD | _MINT_F_ALTLOAD
9474 -+ | _MINT_F_ALTALLOC | _MINT_F_MEMPRIVATE);
9475 -+
9476 -+/* If override_stack_size is TRUE, then the executable stack size
9477 -+ * must be overriden with the value of stack_size. */
9478 -+static bfd_boolean override_stack_size = FALSE;
9479 -+static bfd_signed_vma stack_size;
9480 -+
9481 -+/* MiNT format extra command line options. */
9482 -+
9483 -+/* Used for setting flags in the MiNT header. */
9484 -+#define OPTION_FASTLOAD (300)
9485 -+#define OPTION_NO_FASTLOAD (OPTION_FASTLOAD + 1)
9486 -+#define OPTION_FASTRAM (OPTION_NO_FASTLOAD + 1)
9487 -+#define OPTION_NO_FASTRAM (OPTION_FASTRAM + 1)
9488 -+#define OPTION_FASTALLOC (OPTION_NO_FASTRAM + 1)
9489 -+#define OPTION_NO_FASTALLOC (OPTION_FASTALLOC + 1)
9490 -+#define OPTION_BESTFIT (OPTION_NO_FASTALLOC + 1)
9491 -+#define OPTION_NO_BESTFIT (OPTION_BESTFIT + 1)
9492 -+#define OPTION_BASEREL (OPTION_NO_BESTFIT + 1)
9493 -+#define OPTION_NO_BASEREL (OPTION_BASEREL + 1)
9494 -+#define OPTION_MEM_PRIVATE (OPTION_NO_BASEREL + 1)
9495 -+#define OPTION_MEM_GLOBAL (OPTION_MEM_PRIVATE + 1)
9496 -+#define OPTION_MEM_SUPER (OPTION_MEM_GLOBAL + 1)
9497 -+#define OPTION_MEM_READONLY (OPTION_MEM_SUPER + 1)
9498 -+#define OPTION_PRG_FLAGS (OPTION_MEM_READONLY + 1)
9499 -+#define OPTION_STACK (OPTION_PRG_FLAGS + 1)
9500 -+
9501 -+static void
9502 -+gld${EMULATION_NAME}_add_options
9503 -+ (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
9504 -+ struct option **longopts, int nrl ATTRIBUTE_UNUSED,
9505 -+ struct option **really_longopts ATTRIBUTE_UNUSED)
9506 -+{
9507 -+ static const struct option xtra_long[] = {
9508 -+ {"mfastload", no_argument, NULL, OPTION_FASTLOAD},
9509 -+ {"mno-fastload", no_argument, NULL, OPTION_NO_FASTLOAD},
9510 -+ {"mfastram", no_argument, NULL, OPTION_FASTRAM},
9511 -+ {"mno-fastram", no_argument, NULL, OPTION_NO_FASTRAM},
9512 -+ {"maltram", no_argument, NULL, OPTION_FASTRAM},
9513 -+ {"mno-altram", no_argument, NULL, OPTION_NO_FASTRAM},
9514 -+ {"mfastalloc", no_argument, NULL, OPTION_FASTALLOC},
9515 -+ {"mno-fastalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
9516 -+ {"maltalloc", no_argument, NULL, OPTION_FASTALLOC},
9517 -+ {"mno-altalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
9518 -+ {"mbest-fit", no_argument, NULL, OPTION_BESTFIT},
9519 -+ {"mno-best-fit", no_argument, NULL, OPTION_NO_BESTFIT},
9520 -+ {"mbaserel", no_argument, NULL, OPTION_BASEREL},
9521 -+ {"mno-baserel", no_argument, NULL, OPTION_NO_BASEREL},
9522 -+ {"mshared-text", no_argument, NULL, OPTION_BASEREL},
9523 -+ {"mno-shared-text", no_argument, NULL, OPTION_NO_BASEREL},
9524 -+ {"msharable-text", no_argument, NULL, OPTION_BASEREL},
9525 -+ {"mno-sharable-text", no_argument, NULL, OPTION_NO_BASEREL},
9526 -+ /* Memory protection bits. */
9527 -+ {"mprivate-memory", no_argument, NULL, OPTION_MEM_PRIVATE },
9528 -+ {"mglobal-memory", no_argument, NULL, OPTION_MEM_GLOBAL},
9529 -+ {"msuper-memory", no_argument, NULL, OPTION_MEM_SUPER},
9530 -+ {"mreadable-memory", no_argument, NULL, OPTION_MEM_READONLY},
9531 -+ {"mreadonly-memory", no_argument, NULL, OPTION_MEM_READONLY},
9532 -+ {"mprg-flags", required_argument, NULL, OPTION_PRG_FLAGS},
9533 -+ {"stack", required_argument, NULL, OPTION_STACK},
9534 -+ {NULL, no_argument, NULL, 0}
9535 -+ };
9536 -+
9537 -+ *longopts = (struct option *)
9538 -+ xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
9539 -+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
9540 -+}
9541 -+
9542 -+static bfd_boolean
9543 -+gld${EMULATION_NAME}_handle_option (int optc)
9544 -+{
9545 -+ switch (optc)
9546 -+ {
9547 -+ default:
9548 -+ return FALSE;
9549 -+
9550 -+ case OPTION_FASTLOAD:
9551 -+ prg_flags |= _MINT_F_FASTLOAD;
9552 -+ break;
9553 -+
9554 -+ case OPTION_NO_FASTLOAD:
9555 -+ prg_flags &= ~_MINT_F_FASTLOAD;
9556 -+ break;
9557 -+
9558 -+ case OPTION_FASTRAM:
9559 -+ prg_flags |= _MINT_F_ALTLOAD;
9560 -+ break;
9561 -+
9562 -+ case OPTION_NO_FASTRAM:
9563 -+ prg_flags &= ~_MINT_F_ALTLOAD;
9564 -+ break;
9565 -+
9566 -+ case OPTION_FASTALLOC:
9567 -+ prg_flags |= _MINT_F_ALTALLOC;
9568 -+ break;
9569 -+
9570 -+ case OPTION_NO_FASTALLOC:
9571 -+ prg_flags &= ~_MINT_F_ALTALLOC;
9572 -+ break;
9573 -+
9574 -+ case OPTION_BESTFIT:
9575 -+ prg_flags |= _MINT_F_BESTFIT;
9576 -+ break;
9577 -+
9578 -+ case OPTION_NO_BESTFIT:
9579 -+ prg_flags &= ~_MINT_F_BESTFIT;
9580 -+ break;
9581 -+
9582 -+ case OPTION_BASEREL:
9583 -+ prg_flags |= _MINT_F_SHTEXT;
9584 -+ break;
9585 -+
9586 -+ case OPTION_NO_BASEREL:
9587 -+ prg_flags &= ~_MINT_F_SHTEXT;
9588 -+ break;
9589 -+
9590 -+ case OPTION_MEM_PRIVATE:
9591 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
9592 -+ break;
9593 -+
9594 -+ case OPTION_MEM_GLOBAL:
9595 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
9596 -+ prg_flags |= _MINT_F_MEMPRIVATE;
9597 -+ break;
9598 -+
9599 -+ case OPTION_MEM_SUPER:
9600 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
9601 -+ prg_flags |= _MINT_F_MEMSUPER;
9602 -+ break;
9603 -+
9604 -+ case OPTION_MEM_READONLY:
9605 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
9606 -+ prg_flags |= _MINT_F_MEMREADABLE;
9607 -+ break;
9608 -+
9609 -+ case OPTION_PRG_FLAGS:
9610 -+ {
9611 -+ char* tail;
9612 -+ unsigned long flag_value = strtoul (optarg, &tail, 0);
9613 -+
9614 -+ if (*tail != '\0')
9615 -+ einfo (_("%P: warning: ignoring invalid program flags %s\n"), optarg);
9616 -+ else
9617 -+ prg_flags = flag_value;
9618 -+
9619 -+ break;
9620 -+ }
9621 -+ case OPTION_STACK:
9622 -+ {
9623 -+ char* tail;
9624 -+ long size = strtol (optarg, &tail, 0);
9625 -+
9626 -+ if (*tail == 'K' || *tail == 'k')
9627 -+ {
9628 -+ size *= 1024;
9629 -+ ++tail;
9630 -+ }
9631 -+ else if (*tail == 'M' || *tail == 'm')
9632 -+ {
9633 -+ size *= 1024*1024;
9634 -+ ++tail;
9635 -+ }
9636 -+
9637 -+ if (*tail != '\0')
9638 -+ einfo (_("%P: warning: ignoring invalid stack size %s\n"), optarg);
9639 -+ else
9640 -+ {
9641 -+ stack_size = (bfd_signed_vma) size;
9642 -+ override_stack_size = TRUE;
9643 -+ }
9644 -+
9645 -+ break;
9646 -+ }
9647 -+ }
9648 -+ return TRUE;
9649 -+}
9650 -+
9651 -+/* This callback is called when ld is invoked
9652 -+ with the --help and --target-help options. */
9653 -+
9654 -+static void
9655 -+gld_${EMULATION_NAME}_list_options (FILE *file)
9656 -+{
9657 -+ fprintf (file, _(" --m[no-]fastload Enable/Disable not cleaning the heap on startup\n"));
9658 -+ fprintf (file, _(" --m[no-]altram, --m[no-]fastram\n"));
9659 -+ fprintf (file, _(" Enable/Disable loading into alternate RAM\n"));
9660 -+ fprintf (file, _(" --m[no-]altalloc, --m[no-]fastalloc\n"));
9661 -+ fprintf (file, _(" Enable/Disable malloc from alternate RAM\n"));
9662 -+ fprintf (file, _(" --m[no-]best-fit Enable/Disable loading with optimal heap size\n"));
9663 -+ fprintf (file, _(" --m[no-]sharable-text, --m[no-]shared-text, --m[no-]baserel\n"));
9664 -+ fprintf (file, _(" Enable/Disable sharing the text segment\n"));
9665 -+ fprintf (file, "\n");
9666 -+ fprintf (file, _("The following memory options are mutually exclusive:\n"));
9667 -+ fprintf (file, _(" --mprivate-memory Process memory is not accessible\n"));
9668 -+ fprintf (file, _(" --mglobal-memory Process memory is readable and writable\n"));
9669 -+ fprintf (file, _(" --msuper-memory Process memory is accessible in supervisor mode\n"));
9670 -+ fprintf (file, _(" --mreadonly-memory, --mreadable-memory\n"));
9671 -+ fprintf (file, _(" Process memory is readable but not writable\n"));
9672 -+ fprintf (file, "\n");
9673 -+ fprintf (file, _(" --mprg-flags <value> Set all the flags with an integer raw value\n"));
9674 -+ fprintf (file, _(" --stack <size> Override the stack size (suffix k or M allowed)\n"));
9675 -+}
9676 -+
9677 -+/* This callback is called by lang_for_each_statement. It checks that the
9678 -+ output sections speficied in the linker script are compatible with the MiNT
9679 -+ executable format. */
9680 -+
9681 -+static void
9682 -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s)
9683 -+{
9684 -+ if (s->header.type == lang_output_section_statement_enum)
9685 -+ {
9686 -+ lang_output_section_statement_type *oss = &s->output_section_statement;
9687 -+
9688 -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR})
9689 -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"),
9690 -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma);
9691 -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL)
9692 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
9693 -+ oss->bfd_section);
9694 -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL)
9695 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
9696 -+ oss->bfd_section);
9697 -+ }
9698 -+}
9699 -+
9700 -+/* This callback is called by lang_for_each_statement. It looks for the data
9701 -+ statements of type REL generated by the linker, and adds a TPA relocation
9702 -+ entry for them. This is used by the CONSTRUCTORS list. */
9703 -+
9704 -+static void
9705 -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s)
9706 -+{
9707 -+ if (s->header.type == lang_data_statement_enum)
9708 -+ {
9709 -+ lang_data_statement_type *ds = &s->data_statement;
9710 -+
9711 -+ if (ds->exp->type.node_code == REL)
9712 -+ {
9713 -+ if (ds->type == LONG)
9714 -+ {
9715 -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset;
9716 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address))
9717 -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd);
9718 -+ }
9719 -+ else
9720 -+ {
9721 -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"),
9722 -+ link_info.output_bfd, ds->output_section, ds->output_offset);
9723 -+ }
9724 -+ }
9725 -+ }
9726 -+}
9727 -+
9728 -+/* Final emulation specific call. */
9729 -+
9730 -+static void
9731 -+gld${EMULATION_NAME}_finish (void)
9732 -+{
9733 -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */
9734 -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0)
9735 -+ return;
9736 -+
9737 -+ /* Check the output sections. */
9738 -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections);
9739 -+
9740 -+ /* Set the GEMDOS executable header flags. */
9741 -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags))
9742 -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd);
9743 -+
9744 -+ /* Override the stack size. */
9745 -+ if (override_stack_size)
9746 -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size))
9747 -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd);
9748 -+
9749 -+ /* Generate TPA relocation entries for the data statements. */
9750 -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs);
9751 -+}
9752 -+
9753 -+EOF
9754 -+
9755 -+# Put these extra routines in ld_${EMULATION_NAME}_emulation
9756 -+#
9757 -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options
9758 -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option
9759 -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options
9760 -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
9761 -diff -aurN binutils-2.21/ld/scripttempl/m68kmint.sc binutils-2.21-mint-20110206/ld/scripttempl/m68kmint.sc
9762 ---- binutils-2.21/ld/scripttempl/m68kmint.sc 1970-01-01 01:00:00.000000000 +0100
9763 -+++ binutils-2.21-mint-20110206/ld/scripttempl/m68kmint.sc 2011-02-06 16:27:51.484375000 +0100
9764 -@@ -0,0 +1,35 @@
9765 -+cat <<EOF
9766 -+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
9767 -+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
9768 -+${RELOCATING+${LIB_SEARCH_DIRS}}
9769 -+SECTIONS
9770 -+{
9771 -+ ${RELOCATING+/* The VMA of the .text section is ${TEXT_START_ADDR} instead of 0
9772 -+ because the extended MiNT header is just before,
9773 -+ at the beginning of the TEXT segment. */}
9774 -+ .text ${RELOCATING+${TEXT_START_ADDR}}:
9775 -+ {
9776 -+ CREATE_OBJECT_SYMBOLS
9777 -+ *(.text)
9778 -+ ${CONSTRUCTING+CONSTRUCTORS}
9779 -+ ${RELOCATING+_etext = .;}
9780 -+ ${RELOCATING+__etext = .;}
9781 -+ }
9782 -+
9783 -+ .data :
9784 -+ {
9785 -+ *(.data)
9786 -+ ${RELOCATING+_edata = .;}
9787 -+ ${RELOCATING+__edata = .;}
9788 -+ }
9789 -+
9790 -+ .bss :
9791 -+ {
9792 -+ ${RELOCATING+__bss_start = .;}
9793 -+ *(.bss)
9794 -+ *(COMMON)
9795 -+ ${RELOCATING+_end = .;}
9796 -+ ${RELOCATING+__end = .;}
9797 -+ }
9798 -+}
9799 -+EOF
9800 -diff -aurN binutils-2.21/libiberty/hex.c binutils-2.21-mint-20110206/libiberty/hex.c
9801 ---- binutils-2.21/libiberty/hex.c 2007-01-31 21:25:23.000000000 +0100
9802 -+++ binutils-2.21-mint-20110206/libiberty/hex.c 2011-02-06 16:27:51.484375000 +0100
9803 -@@ -24,7 +24,7 @@
9804 - #include "libiberty.h"
9805 - #include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
9806 -
9807 --#if EOF != -1
9808 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
9809 - #error "hex.c requires EOF == -1"
9810 - #endif
9811 -
9812 -diff -aurN binutils-2.21/libiberty/safe-ctype.c binutils-2.21-mint-20110206/libiberty/safe-ctype.c
9813 ---- binutils-2.21/libiberty/safe-ctype.c 2005-05-10 17:33:33.000000000 +0200
9814 -+++ binutils-2.21-mint-20110206/libiberty/safe-ctype.c 2011-02-06 16:27:51.500000000 +0100
9815 -@@ -119,7 +119,7 @@
9816 - #include <safe-ctype.h>
9817 - #include <stdio.h> /* for EOF */
9818 -
9819 --#if EOF != -1
9820 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
9821 - #error "<safe-ctype.h> requires EOF == -1"
9822 - #endif
9823 -
9824 -diff -aurN binutils-2.21/libiberty/configure binutils-2.21-mint-20110206/libiberty/configure
9825 ---- binutils-2.21/libiberty/configure 2009-09-08 18:11:46.000000000 +0100
9826 -+++ binutils-2.21-mint-20110206/libiberty/configure 2009-10-22 16:39:46.000000000 +0100
9827 -@@ -4844,6 +4844,7 @@
9828 - if [ "${shared}" = "yes" ]; then
9829 - case "${host}" in
9830 - *-*-cygwin*) ;;
9831 -+ *-*-mint*) ;;
9832 - alpha*-*-linux*) PICFLAG=-fPIC ;;
9833 - arm*-*-*) PICFLAG=-fPIC ;;
9834 - hppa*-*-*) PICFLAG=-fPIC ;;
9835 -diff -aurN binutils-2.21/libiberty/configure.ac binutils-2.21-mint-20110206/libiberty/configure.ac
9836 ---- binutils-2.21/libiberty/configure.ac 2009-09-08 18:11:46.000000000 +0100
9837 -+++ binutils-2.21-mint-20110206/libiberty/configure.ac 2009-10-22 16:39:46.000000000 +0100
9838 -@@ -201,6 +201,7 @@
9839 - if [[ "${shared}" = "yes" ]]; then
9840 - case "${host}" in
9841 - *-*-cygwin*) ;;
9842 -+ *-*-mint*) ;;
9843 - alpha*-*-linux*) PICFLAG=-fPIC ;;
9844 - arm*-*-*) PICFLAG=-fPIC ;;
9845 - hppa*-*-*) PICFLAG=-fPIC ;;
9846
9847 diff --git a/sys-devel/binutils/files/binutils-2.21.53.0.2-mint.patch b/sys-devel/binutils/files/binutils-2.21.53.0.2-mint.patch
9848 deleted file mode 100644
9849 index ba41a35..0000000
9850 --- a/sys-devel/binutils/files/binutils-2.21.53.0.2-mint.patch
9851 +++ /dev/null
9852 @@ -1,2667 +0,0 @@
9853 -http://bugs.gentoo.org/show_bug.cgi?id=362559
9854 -
9855 -diff -ur --new-file binutils-2.21.51.0.7/bfd/Makefile.am binutils-2.21.51.0.7-mint/bfd/Makefile.am
9856 ---- binutils-2.21.51.0.7/bfd/Makefile.am 2010-12-06 14:23:53.000000000 +0000
9857 -+++ binutils-2.21.51.0.7-mint/bfd/Makefile.am 2011-04-08 10:07:06.000000000 +0000
9858 -@@ -379,6 +379,7 @@
9859 - peigen.lo \
9860 - plugin.lo \
9861 - ppcboot.lo \
9862 -+ prg-mint.lo \
9863 - reloc16.lo \
9864 - riscix.lo \
9865 - som.lo \
9866 -@@ -559,6 +560,7 @@
9867 - pei-sh.c \
9868 - plugin.c \
9869 - ppcboot.c \
9870 -+ prg-mint.c \
9871 - reloc16.c \
9872 - riscix.c \
9873 - som.c \
9874 -diff -ur --new-file binutils-2.21.51.0.7/bfd/Makefile.in binutils-2.21.51.0.7-mint/bfd/Makefile.in
9875 ---- binutils-2.21.51.0.7/bfd/Makefile.in 2010-12-06 14:23:53.000000000 +0000
9876 -+++ binutils-2.21.51.0.7-mint/bfd/Makefile.in 2011-04-08 10:07:06.000000000 +0000
9877 -@@ -679,6 +679,7 @@
9878 - peigen.lo \
9879 - plugin.lo \
9880 - ppcboot.lo \
9881 -+ prg-mint.lo \
9882 - reloc16.lo \
9883 - riscix.lo \
9884 - som.lo \
9885 -@@ -859,6 +860,7 @@
9886 - pei-sh.c \
9887 - plugin.c \
9888 - ppcboot.c \
9889 -+ prg-mint.c \
9890 - reloc16.c \
9891 - riscix.c \
9892 - som.c \
9893 -diff -ur --new-file binutils-2.21.51.0.7/bfd/acinclude.m4 binutils-2.21.51.0.7-mint/bfd/acinclude.m4
9894 ---- binutils-2.21.51.0.7/bfd/acinclude.m4 2009-12-14 15:46:47.000000000 +0000
9895 -+++ binutils-2.21.51.0.7-mint/bfd/acinclude.m4 2011-04-08 10:07:06.000000000 +0000
9896 -@@ -5,7 +5,7 @@
9897 - [AC_REQUIRE([AC_CANONICAL_TARGET])
9898 - case "${host}" in
9899 - changequote(,)dnl
9900 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
9901 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
9902 - changequote([,])dnl
9903 - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
9904 - esac])dnl
9905 -diff -ur --new-file binutils-2.21.51.0.7/bfd/aoutx.h binutils-2.21.51.0.7-mint/bfd/aoutx.h
9906 ---- binutils-2.21.51.0.7/bfd/aoutx.h 2011-03-07 18:05:31.000000000 +0000
9907 -+++ binutils-2.21.51.0.7-mint/bfd/aoutx.h 2011-04-08 10:07:06.000000000 +0000
9908 -@@ -1841,6 +1841,11 @@
9909 - bfd_byte buffer[BYTES_IN_WORD];
9910 - bfd_size_type amt = BYTES_IN_WORD;
9911 -
9912 -+ /* The MiNT backend writes past the string table. It therefore has to
9913 -+ know about the table size. */
9914 -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) +
9915 -+ BYTES_IN_WORD;
9916 -+
9917 - /* The string table starts with the size. */
9918 - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
9919 - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt)
9920 -@@ -4220,10 +4225,17 @@
9921 - return FALSE;
9922 - }
9923 -
9924 -+#ifdef MY_final_link_relocate_rel
9925 -+ r = MY_final_link_relocate_rel (howto,
9926 -+ input_bfd, input_section,
9927 -+ contents, r_addr, relocation,
9928 -+ (bfd_vma) 0, rel);
9929 -+#else
9930 - r = MY_final_link_relocate (howto,
9931 - input_bfd, input_section,
9932 - contents, r_addr, relocation,
9933 - (bfd_vma) 0);
9934 -+#endif
9935 - }
9936 -
9937 - if (r != bfd_reloc_ok)
9938 -diff -ur --new-file binutils-2.21.51.0.7/bfd/bfd-in.h binutils-2.21.51.0.7-mint/bfd/bfd-in.h
9939 ---- binutils-2.21.51.0.7/bfd/bfd-in.h 2010-11-12 17:32:58.000000000 +0000
9940 -+++ binutils-2.21.51.0.7-mint/bfd/bfd-in.h 2011-04-08 10:07:06.000000000 +0000
9941 -@@ -742,6 +742,15 @@
9942 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
9943 - (bfd *, struct bfd_link_info *);
9944 -
9945 -+/* MiNT executable support routines for the linker. */
9946 -+
9947 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
9948 -+ (bfd *, flagword);
9949 -+extern bfd_boolean bfd_m68kmint_set_stack_size
9950 -+ (bfd *, bfd_signed_vma);
9951 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
9952 -+ (bfd *, bfd_vma);
9953 -+
9954 - /* mmap hacks */
9955 -
9956 - struct _bfd_window_internal;
9957 -diff -ur --new-file binutils-2.21.51.0.7/bfd/bfd-in2.h binutils-2.21.51.0.7-mint/bfd/bfd-in2.h
9958 ---- binutils-2.21.51.0.7/bfd/bfd-in2.h 2011-03-07 18:05:57.000000000 +0000
9959 -+++ binutils-2.21.51.0.7-mint/bfd/bfd-in2.h 2011-04-08 10:07:06.000000000 +0000
9960 -@@ -749,6 +749,15 @@
9961 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
9962 - (bfd *, struct bfd_link_info *);
9963 -
9964 -+/* MiNT executable support routines for the linker. */
9965 -+
9966 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
9967 -+ (bfd *, flagword);
9968 -+extern bfd_boolean bfd_m68kmint_set_stack_size
9969 -+ (bfd *, bfd_signed_vma);
9970 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
9971 -+ (bfd *, bfd_vma);
9972 -+
9973 - /* mmap hacks */
9974 -
9975 - struct _bfd_window_internal;
9976 -diff -ur --new-file binutils-2.21.51.0.7/bfd/config.bfd binutils-2.21.51.0.7-mint/bfd/config.bfd
9977 ---- binutils-2.21.51.0.7/bfd/config.bfd 2011-01-04 17:51:04.000000000 +0000
9978 -+++ binutils-2.21.51.0.7-mint/bfd/config.bfd 2011-04-08 10:07:06.000000000 +0000
9979 -@@ -823,6 +823,11 @@
9980 - # targ_selvecs=m68kmach3_vec
9981 - # targ_cflags=-DSTAT_FOR_EXEC
9982 - ;;
9983 -+ m68*-*-mint*)
9984 -+ targ_defvec=aout0_big_vec
9985 -+ targ_selvecs=m68kmint_prg_vec
9986 -+ targ_underscore=yes
9987 -+ ;;
9988 - m68*-hp*-netbsd*)
9989 - targ_defvec=m68k4knetbsd_vec
9990 - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
9991 -diff -ur --new-file binutils-2.21.51.0.7/bfd/configure binutils-2.21.51.0.7-mint/bfd/configure
9992 ---- binutils-2.21.51.0.7/bfd/configure 2011-03-07 18:05:31.000000000 +0000
9993 -+++ binutils-2.21.51.0.7-mint/bfd/configure 2011-04-08 10:07:07.000000000 +0000
9994 -@@ -13623,7 +13623,7 @@
9995 -
9996 -
9997 - case "${host}" in
9998 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
9999 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
10000 -
10001 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
10002 - ;;
10003 -@@ -15237,6 +15237,7 @@
10004 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
10005 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
10006 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
10007 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
10008 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
10009 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
10010 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
10011 -diff -ur --new-file binutils-2.21.51.0.7/bfd/configure.in binutils-2.21.51.0.7-mint/bfd/configure.in
10012 ---- binutils-2.21.51.0.7/bfd/configure.in 2011-03-07 18:05:31.000000000 +0000
10013 -+++ binutils-2.21.51.0.7-mint/bfd/configure.in 2011-04-08 10:07:07.000000000 +0000
10014 -@@ -880,6 +880,7 @@
10015 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
10016 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
10017 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
10018 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
10019 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
10020 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
10021 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
10022 -diff -ur --new-file binutils-2.21.51.0.7/bfd/libaout.h binutils-2.21.51.0.7-mint/bfd/libaout.h
10023 ---- binutils-2.21.51.0.7/bfd/libaout.h 2009-10-09 22:25:42.000000000 +0000
10024 -+++ binutils-2.21.51.0.7-mint/bfd/libaout.h 2011-04-08 10:07:08.000000000 +0000
10025 -@@ -422,6 +422,10 @@
10026 - table, used when linking on SunOS. This is indexed by the symbol
10027 - index. */
10028 - bfd_vma *local_got_offsets;
10029 -+
10030 -+ /* A pointer for data used by aout extensions. (Currently only used
10031 -+ by MiNT executables (see prg-mint.c). */
10032 -+ void *ext;
10033 - };
10034 -
10035 - struct aout_data_struct
10036 -@@ -449,6 +453,7 @@
10037 - #define obj_aout_string_window(bfd) (adata (bfd).string_window)
10038 - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
10039 - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
10040 -+#define obj_aout_ext(bfd) (adata (bfd).ext)
10041 -
10042 - /* We take the address of the first element of an asymbol to ensure that the
10043 - macro is only ever applied to an asymbol. */
10044 -diff -ur --new-file binutils-2.21.51.0.7/bfd/prg-mint.c binutils-2.21.51.0.7-mint/bfd/prg-mint.c
10045 ---- binutils-2.21.51.0.7/bfd/prg-mint.c 1970-01-01 00:00:00.000000000 +0000
10046 -+++ binutils-2.21.51.0.7-mint/bfd/prg-mint.c 2011-04-08 10:07:08.000000000 +0000
10047 -@@ -0,0 +1,1732 @@
10048 -+/* BFD backend for traditional MiNT executables.
10049 -+ Copyright 1998, 2007, 2008, 2009 Free Software Foundation, Inc.
10050 -+ Originally written by Guido Flohr (guido@××××××××.de).
10051 -+ Modified by Vincent Riviere (vincent.riviere@××××××××.fr).
10052 -+
10053 -+ This file is part of BFD, the Binary File Descriptor library.
10054 -+
10055 -+ This program is free software; you can redistribute it and/or modify
10056 -+ it under the terms of the GNU General Public License as published by
10057 -+ the Free Software Foundation; either version 3 of the License, or
10058 -+ (at your option) any later version.
10059 -+
10060 -+ This program is distributed in the hope that it will be useful,
10061 -+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10062 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10063 -+ GNU General Public License for more details.
10064 -+
10065 -+ You should have received a copy of the GNU General Public License
10066 -+ along with this program; if not, write to the Free Software
10067 -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
10068 -+ MA 02110-1301, USA. */
10069 -+
10070 -+/* The format of executables on Atari is actually not a.out, it is
10071 -+ only chosen as an approach which comes close enough. The layout of a
10072 -+ program image on disk looked like this:
10073 -+
10074 -+ +-----------------+
10075 -+ | 28 Bytes Header |
10076 -+ +-----------------+
10077 -+ | Text segment |
10078 -+ +-----------------+
10079 -+ | Data segment |
10080 -+ +-----------------+
10081 -+ | BSS |
10082 -+ +-----------------+
10083 -+ | Symbol table |
10084 -+ +-----------------+
10085 -+ | TPA relocation |
10086 -+ +-----------------+
10087 -+
10088 -+ The 28 byte exec header used to look like this:
10089 -+
10090 -+ struct old_exec_header
10091 -+ {
10092 -+ bfd_byte a_magic[2];
10093 -+ bfd_byte a_text[4];
10094 -+ bfd_byte a_data[4];
10095 -+ bfd_byte a_bss[4];
10096 -+ bfd_byte a_syms[4];
10097 -+ bfd_byte a_resvd[4];
10098 -+ bfd_byte a_abs[2];
10099 -+ };
10100 -+
10101 -+ The first two bytes (A_MAGIC) contained an assembler branch
10102 -+ instruction to the beginning of the text segment. Because the
10103 -+ exec header had a fixed size and the text entry point was constant
10104 -+ this assembler instruction also had a constant value (0x601a).
10105 -+ In fact the operating system never really executed the branch
10106 -+ instruction but used this value (0x601a) as a magic value.
10107 -+
10108 -+ TEXT, DATA and BSS were as one would expect them. The symbol
10109 -+ table wasn't. Several different formats were in use, none of them
10110 -+ very efficient, none of them powerful enough to support source
10111 -+ level debugging. I've changed that and the GNU symbol table will
10112 -+ now be used instead (unless the --traditional-format option was
10113 -+ given to the linker).
10114 -+
10115 -+ If the last member A_ABS of the exec header is zero the program
10116 -+ image contains an additional table with relocation information
10117 -+ at the end of the image. The kernel can load program images at
10118 -+ virtually any address in the address space. In fact it will load
10119 -+ it at the start of the biggest block of free memory. This block
10120 -+ is then called the Transient Program Area TPA and the image has
10121 -+ to be relocated against the TPA at runtime. The relocation info
10122 -+ itself is in a simply way compressed: It starts with a four-byte
10123 -+ value, the first address within the image to be relocated. Now
10124 -+ following are one-byte offsets to the last address. The special
10125 -+ value of 1 (which is impossible as an offset) signifies that 254
10126 -+ has to be added to the next offset. The table is finished with
10127 -+ a zero-byte.
10128 -+
10129 -+ I now simply extended the header from its old 28 bytes to 256
10130 -+ bytes. The first 28 bytes give home to a standard Atari header,
10131 -+ the rest is for extensions. The extension header starts with
10132 -+ a ``real'' assembler instruction, a far jump to the text entry
10133 -+ point. The extension header gives home to a standard a.out
10134 -+ exec header (currently NMAGIC) plus some extra
10135 -+ more or less useful fields plus space to future extensions.
10136 -+ For the OS the extension header will already belong to the text
10137 -+ segment, for BFD backends the text segment is 228 (or 0xe4)
10138 -+ bytes smaller than for the OS. This explains for example the
10139 -+ funny TEXT_START_ADDR 0xe4.
10140 -+
10141 -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently
10142 -+ no such thing as memory paging on the Atari (and this is why
10143 -+ ZMAGICs are disabled for now to allow for future enhancements).
10144 -+
10145 -+ If you think that this whole file looks quite like a big hack
10146 -+ you're probably right. But the results (mainly the output of
10147 -+ the linker) seem to work and they allow to use up-to-date
10148 -+ binutils on the Atari until a better executable format (maybe
10149 -+ ELF) has been established for this machine. */
10150 -+
10151 -+#include "sysdep.h"
10152 -+#include "bfd.h"
10153 -+
10154 -+#define N_HEADER_IN_TEXT(x) 0
10155 -+#define BYTES_IN_WORD 4
10156 -+#define ENTRY_CAN_BE_ZERO
10157 -+#define N_SHARED_LIB(x) 0
10158 -+#define TEXT_START_ADDR 0xe4
10159 -+#define TARGET_PAGE_SIZE 2
10160 -+#define TARGET_IS_BIG_ENDIAN_P
10161 -+#define DEFAULT_ARCH bfd_arch_m68k
10162 -+#define N_TXTADDR(x) TEXT_START_ADDR
10163 -+
10164 -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
10165 -+ remove whitespace added here, and thus will fail to concatenate
10166 -+ the tokens. */
10167 -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP)
10168 -+#define TARGETNAME "a.out-mintprg"
10169 -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y)
10170 -+
10171 -+/* We have to do quite a lot of magic to make the Atari format
10172 -+ for GEMDOS executables fit into the standard a.out format.
10173 -+ We start with the original header. */
10174 -+#define external_exec mint_external_exec
10175 -+struct mint_external_exec
10176 -+{
10177 -+ bfd_byte g_branch[2]; /* 0x601a. */
10178 -+ bfd_byte g_text[4]; /* Length of text section. */
10179 -+ bfd_byte g_data[4]; /* Length of data section. */
10180 -+ bfd_byte g_bss[4]; /* Length of bss section. */
10181 -+ bfd_byte g_syms[4]; /* Length of symbol table. */
10182 -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54
10183 -+ (in ASCII: ``MiNT''). */
10184 -+ bfd_byte g_flags[4]; /* Atari special flags. */
10185 -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation
10186 -+ info. */
10187 -+
10188 -+ /* We extend this header now to provide the information that the
10189 -+ binutils want to see. Everything following will actually be part
10190 -+ of the text segment (from MiNT's point of view). As a
10191 -+ consequence the text section has 228 bytes of redundancy.
10192 -+
10193 -+ The following eight bytes should be treated as opaque.
10194 -+ If the word ``opaque'' always attracts your curiosity in
10195 -+ typedefs and structs, here's the explanation: These eight bytes
10196 -+ are really two assembler instructions. The first one moves
10197 -+ the contents of e_entry into register d0, the second one
10198 -+ jumps (pc-relative) to the entry point. See swap_exec_header_out
10199 -+ for details. */
10200 -+ bfd_byte g_jump_entry[8];
10201 -+
10202 -+ /* Now following a standard a.out header. Note that the values
10203 -+ may differ from the one given on top. The traditional header
10204 -+ contains the values that the OS wants to see, the values below
10205 -+ are the values that make the binutils work. */
10206 -+ bfd_byte e_info[4]; /* Magic number and stuff. */
10207 -+ bfd_byte e_text[4]; /* Length of text section in bytes. */
10208 -+ bfd_byte e_data[4]; /* Length of data section. */
10209 -+ bfd_byte e_bss[4]; /* Length of standard symbol
10210 -+ table. */
10211 -+ bfd_byte e_syms[4]; /* Length of symbol table. */
10212 -+ bfd_byte e_entry[4]; /* Start address. */
10213 -+ bfd_byte e_trsize[4]; /* Length of text relocation
10214 -+ info. */
10215 -+ bfd_byte e_drsize[4]; /* Length of data relocation
10216 -+ info. */
10217 -+
10218 -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative
10219 -+ relocation info. */
10220 -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation
10221 -+ info. */
10222 -+
10223 -+ /* This is for extensions. */
10224 -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into
10225 -+ the executable you will find it
10226 -+ at file offset g_stkpos. If
10227 -+ not this is NULL. */
10228 -+
10229 -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See
10230 -+ definitions for _MINT_SYMBOL_FORMAT*
10231 -+ above. */
10232 -+
10233 -+ /* Pad with zeros. */
10234 -+ bfd_byte g_pad0[172];
10235 -+};
10236 -+#define EXEC_BYTES_SIZE 256
10237 -+#define GEMDOS_HEADER_SIZE 28
10238 -+
10239 -+/* The following defines are required by aoutx.h.
10240 -+ They are not automatically defined in aout/aout64.h
10241 -+ if external_exec is defined. */
10242 -+
10243 -+#define OMAGIC 0407 /* Object file or impure executable. */
10244 -+#define NMAGIC 0410 /* Code indicating pure executable. */
10245 -+#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
10246 -+#define BMAGIC 0415 /* Used by a b.out object. */
10247 -+#define QMAGIC 0314 /* Like ZMAGIC but with N_HEADER_IN_TEXT true. */
10248 -+
10249 -+/* Files using the following magic flags will not be loaded. */
10250 -+#define N_BADMAG(x) (N_MAGIC(x) != NMAGIC)
10251 -+
10252 -+/* For DRI symbol table format. */
10253 -+struct dri_symbol
10254 -+{
10255 -+ bfd_byte a_name[8]; /* Symbol name */
10256 -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */
10257 -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */
10258 -+};
10259 -+#define DRI_SYMBOL_SIZE 14
10260 -+
10261 -+/* Simple values for a_type. */
10262 -+#define A_UNDF 0
10263 -+#define A_BSS 0x0100
10264 -+#define A_TEXT 0x0200
10265 -+#define A_DATA 0x0400
10266 -+#define A_EXT 0x0800 /* External. */
10267 -+#define A_EQREG 0x1000 /* Equated register. */
10268 -+#define A_GLOBL 0x2000 /* Global. */
10269 -+#define A_EQU 0x4000 /* Equated. */
10270 -+#define A_DEF 0x8000 /* Defined. */
10271 -+#define A_LNAM 0x0048 /* GST compatible long name. */
10272 -+ /* File symbols ala aln. */
10273 -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */
10274 -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this
10275 -+ conflicts with the bits in A_LNAM. */
10276 -+
10277 -+/* The following include contains the definitions for internal a.out structures
10278 -+ as well as the prototypes for the NAME(...) functions defined in aoutx.h. */
10279 -+
10280 -+#include "libaout.h"
10281 -+
10282 -+/* The following function is similar to _bfd_final_link_relocate, except it
10283 -+ adds the reloc structure as an additional parameter.
10284 -+ It will be used int aoutx.h. */
10285 -+
10286 -+static bfd_reloc_status_type
10287 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
10288 -+ bfd *input_bfd,
10289 -+ asection *input_section,
10290 -+ bfd_byte *contents,
10291 -+ bfd_vma address,
10292 -+ bfd_vma value,
10293 -+ bfd_vma addend,
10294 -+ struct reloc_std_external *rel);
10295 -+
10296 -+#define MY_final_link_relocate_rel m68kmint_prg_final_link_relocate_rel
10297 -+
10298 -+/* The following include contains the definitions for the NAME(...) functions. */
10299 -+
10300 -+#include "aoutx.h"
10301 -+
10302 -+/* Data structure that holds some private information for us. */
10303 -+struct mint_internal_info
10304 -+{
10305 -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */
10306 -+ bfd_boolean traditional_format; /* Saved from link info. */
10307 -+ int symbol_format; /* Format of the symbol table. */
10308 -+ void *tparel; /* Data for TPA relative relocation
10309 -+ information. */
10310 -+ file_ptr tparel_pos; /* File position of TPA relative
10311 -+ relocation information. */
10312 -+ bfd_size_type tparel_size; /* Size of TPA relative relocation
10313 -+ information. */
10314 -+ bfd_size_type dri_symtab_size; /* Size of traditional symbol table. */
10315 -+
10316 -+#define MINT_RELOC_CHUNKSIZE 0x1000
10317 -+ bfd_vma *relocs; /* Array of address relocations. */
10318 -+ unsigned long relocs_used; /* Number of relocation entries
10319 -+ already used up. */
10320 -+ unsigned long relocs_allocated; /* Number of relocation entries
10321 -+ allocated. */
10322 -+
10323 -+ bfd_vma stkpos; /* File offset to value of _stksize. */
10324 -+
10325 -+ flagword prg_flags; /* Standard GEMDOS flags. */
10326 -+
10327 -+ bfd_boolean override_stack_size; /* TRUE if the executable stack size
10328 -+ must be overriden with stack_size. */
10329 -+ bfd_signed_vma stack_size;
10330 -+
10331 -+ bfd_boolean reloc_error; /* TRUE if an unhandled error during
10332 -+ relocation occured. */
10333 -+};
10334 -+
10335 -+/* If --traditional-format was given to the linker an old-style DRI
10336 -+ symbol table is written into the executable. This is with respect
10337 -+ to many old debugging tools or disassemblers which expect this format.
10338 -+ Although created by the linker, these symbols will be ignored from
10339 -+ input files. */
10340 -+#define _MINT_SYMBOL_FORMAT_GNU 0
10341 -+#define _MINT_SYMBOL_FORMAT_DRI 1
10342 -+
10343 -+/* Declarations for the variables and functions
10344 -+ defined later in aout-target.h. */
10345 -+
10346 -+static const bfd_target *
10347 -+m68kmint_prg_callback (bfd *abfd);
10348 -+
10349 -+static void
10350 -+MY_final_link_callback (bfd *abfd,
10351 -+ file_ptr *ptreloff,
10352 -+ file_ptr *pdreloff,
10353 -+ file_ptr *psymoff);
10354 -+
10355 -+extern const bfd_target m68kmint_prg_vec;
10356 -+
10357 -+/* Initialize a new BFD using our file format. */
10358 -+
10359 -+#define MY_mkobject m68kmint_prg_mkobject
10360 -+
10361 -+static bfd_boolean
10362 -+m68kmint_prg_mkobject (bfd *abfd)
10363 -+{
10364 -+ struct mint_internal_info *myinfo;
10365 -+
10366 -+ if (!NAME (aout, mkobject (abfd)))
10367 -+ return FALSE;
10368 -+
10369 -+ /* Allocate our private BFD data. */
10370 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
10371 -+ if (myinfo == NULL)
10372 -+ return FALSE;
10373 -+ obj_aout_ext (abfd) = myinfo;
10374 -+
10375 -+ return TRUE;
10376 -+}
10377 -+
10378 -+/* Finish up the reading of an a.out file header. */
10379 -+
10380 -+#define MY_object_p m68kmint_prg_object_p
10381 -+
10382 -+static const bfd_target *
10383 -+m68kmint_prg_object_p (bfd *abfd)
10384 -+{
10385 -+ struct external_exec exec_bytes; /* Raw exec header from file. */
10386 -+ struct internal_exec exec; /* Cleaned-up exec header. */
10387 -+ const bfd_target *target;
10388 -+ bfd_size_type amt = EXEC_BYTES_SIZE;
10389 -+ struct mint_internal_info *myinfo;
10390 -+
10391 -+ /* Read the exec bytesd from the file. */
10392 -+ if (bfd_bread (&exec_bytes, amt, abfd) != amt)
10393 -+ {
10394 -+ if (bfd_get_error () != bfd_error_system_call)
10395 -+ bfd_set_error (bfd_error_wrong_format);
10396 -+ return NULL;
10397 -+ }
10398 -+
10399 -+ /* Instead of byte-swapping we compare bytes. */
10400 -+ if (exec_bytes.g_branch[0] != 0x60
10401 -+ || exec_bytes.g_branch[1] != 0x1a
10402 -+ || exec_bytes.g_extmagic[0] != 'M'
10403 -+ || exec_bytes.g_extmagic[1] != 'i'
10404 -+ || exec_bytes.g_extmagic[2] != 'N'
10405 -+ || exec_bytes.g_extmagic[3] != 'T')
10406 -+ {
10407 -+ bfd_set_error (bfd_error_wrong_format);
10408 -+ return NULL;
10409 -+ }
10410 -+
10411 -+ /* Swap the standard a.out fields. */
10412 -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
10413 -+
10414 -+ /* Check a.out magic value. */
10415 -+ if (N_BADMAG (exec))
10416 -+ {
10417 -+ bfd_set_error (bfd_error_wrong_format);
10418 -+ return NULL;
10419 -+ }
10420 -+
10421 -+ /* Initialize this BFD with the exec values. */
10422 -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback);
10423 -+
10424 -+ /* Allocate our private BFD data. */
10425 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
10426 -+ if (myinfo == NULL)
10427 -+ return NULL;
10428 -+ obj_aout_ext (abfd) = myinfo;
10429 -+
10430 -+ /* Now get the missing information. */
10431 -+ myinfo->prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags);
10432 -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos);
10433 -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format);
10434 -+
10435 -+ /* TPA relocation information. */
10436 -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos);
10437 -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size);
10438 -+
10439 -+ /* FIXME: Currently we always read the TPA relative relocation
10440 -+ information. This is suboptimal because often times there
10441 -+ is no need for it. Read it only if need be! Maybe this should
10442 -+ also depend on abfd->cacheable? */
10443 -+ if (myinfo->tparel_size == 0)
10444 -+ myinfo->tparel = bfd_zalloc (abfd, 4);
10445 -+ else
10446 -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size);
10447 -+
10448 -+ if (myinfo->tparel == NULL)
10449 -+ return NULL;
10450 -+
10451 -+ if (myinfo->tparel_size == 0)
10452 -+ {
10453 -+ myinfo->tparel_size = 4;
10454 -+ }
10455 -+ else
10456 -+ {
10457 -+ /* Read the information from the bfd. */
10458 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0
10459 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd)
10460 -+ != myinfo->tparel_size))
10461 -+ return NULL;
10462 -+ }
10463 -+
10464 -+ return target;
10465 -+}
10466 -+
10467 -+/* Free all information we have cached for this BFD. We can always
10468 -+ read it again later if we need it. */
10469 -+
10470 -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info
10471 -+
10472 -+static bfd_boolean
10473 -+m68kmint_prg_bfd_free_cached_info (bfd *abfd)
10474 -+{
10475 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
10476 -+
10477 -+ if (myinfo != NULL && myinfo->relocs != NULL)
10478 -+ {
10479 -+ free (myinfo->relocs);
10480 -+ myinfo->relocs = NULL;
10481 -+ }
10482 -+
10483 -+ /* myinfo itself has been allocated by bfd_zalloc()
10484 -+ so will be automatically freed along with the BFD.
10485 -+ Same for myinfo->tparel. */
10486 -+
10487 -+ return NAME (aout, bfd_free_cached_info) (abfd);
10488 -+}
10489 -+
10490 -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the
10491 -+ symbol exceeds 8 characters write a long symbol. If it
10492 -+ exceeds 22 characters truncate the name. */
10493 -+
10494 -+static int
10495 -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value)
10496 -+{
10497 -+ int written_bytes = 0;
10498 -+ struct dri_symbol sym;
10499 -+ int is_long_name = strlen (name) > sizeof (sym.a_name);
10500 -+
10501 -+ if (is_long_name)
10502 -+ type |= A_LNAM;
10503 -+
10504 -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name));
10505 -+ bfd_put_16 (abfd, type, sym.a_type);
10506 -+ bfd_put_32 (abfd, value, sym.a_value);
10507 -+
10508 -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
10509 -+ return -1;
10510 -+ written_bytes += DRI_SYMBOL_SIZE;
10511 -+
10512 -+ if (is_long_name)
10513 -+ {
10514 -+ char more_name[DRI_SYMBOL_SIZE];
10515 -+
10516 -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE);
10517 -+
10518 -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
10519 -+ return -1;
10520 -+ written_bytes += DRI_SYMBOL_SIZE;
10521 -+ }
10522 -+
10523 -+ return written_bytes;
10524 -+}
10525 -+
10526 -+/* Emit a traditional DRI symbol table while linking.
10527 -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */
10528 -+
10529 -+static bfd_boolean
10530 -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info)
10531 -+{
10532 -+ bfd *input_bfd;
10533 -+ enum bfd_link_strip strip = info->strip;
10534 -+ enum bfd_link_discard discard = info->discard;
10535 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
10536 -+ bfd *last_archive = NULL;
10537 -+
10538 -+ /* Position file pointer. */
10539 -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
10540 -+ return FALSE;
10541 -+
10542 -+ myinfo->dri_symtab_size = 0;
10543 -+
10544 -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next)
10545 -+ {
10546 -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd);
10547 -+ char *strings = obj_aout_external_strings (input_bfd);
10548 -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd);
10549 -+ struct external_nlist *sym_end = sym + sym_count;
10550 -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd);
10551 -+ bfd_boolean pass = FALSE;
10552 -+ bfd_boolean skip = FALSE;
10553 -+ bfd_boolean skip_next = FALSE;
10554 -+ int written_bytes;
10555 -+ int a_type;
10556 -+ bfd_boolean write_archive_name = FALSE;
10557 -+ bfd_vma val = 0;
10558 -+
10559 -+ /* First write out a symbol for the archive if we do not
10560 -+ strip these symbols and if it differs from the last
10561 -+ one. */
10562 -+ if (input_bfd->my_archive != last_archive
10563 -+ && input_bfd->my_archive != NULL)
10564 -+ {
10565 -+ write_archive_name = TRUE;
10566 -+ last_archive = input_bfd->my_archive;
10567 -+ }
10568 -+
10569 -+ if (write_archive_name
10570 -+ && strip != strip_all
10571 -+ && (strip != strip_some
10572 -+ || bfd_hash_lookup (info->keep_hash,
10573 -+ input_bfd->my_archive->filename,
10574 -+ FALSE, FALSE) != NULL)
10575 -+ && discard != discard_all)
10576 -+ {
10577 -+ val = bfd_get_section_vma (abfd,
10578 -+ obj_textsec (input_bfd)->output_section)
10579 -+ + obj_textsec (input_bfd)->output_offset;
10580 -+
10581 -+ written_bytes = write_dri_symbol (abfd,
10582 -+ input_bfd->my_archive->filename,
10583 -+ A_TFILE, val);
10584 -+
10585 -+ if (written_bytes < 0)
10586 -+ return FALSE;
10587 -+ else
10588 -+ myinfo->dri_symtab_size += written_bytes;
10589 -+ }
10590 -+
10591 -+ /* Now write out a symbol for the object file if we do not
10592 -+ strip these symbols. */
10593 -+ if (strip != strip_all
10594 -+ && (strip != strip_some
10595 -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename,
10596 -+ FALSE, FALSE) != NULL)
10597 -+ && discard != discard_all)
10598 -+ {
10599 -+ val = bfd_get_section_vma (abfd,
10600 -+ obj_textsec (input_bfd)->output_section)
10601 -+ + obj_textsec (input_bfd)->output_offset;
10602 -+
10603 -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename,
10604 -+ A_TFILE, val);
10605 -+ if (written_bytes < 0)
10606 -+ return FALSE;
10607 -+ else
10608 -+ myinfo->dri_symtab_size += written_bytes;
10609 -+ }
10610 -+
10611 -+ /* Now we have a problem. All symbols that we see have already
10612 -+ been marked written (because we write them a second time
10613 -+ here. If we would do it the clean way we would have
10614 -+ to traverse the entire symbol map and reset the written
10615 -+ flag. We hack here instead... */
10616 -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1)
10617 -+#define is_written(h) ((int) h->written == (int) TRUE + 1)
10618 -+ for (; sym < sym_end; sym++, sym_hash++)
10619 -+ {
10620 -+ const char *name;
10621 -+ int type;
10622 -+ struct aout_link_hash_entry *h;
10623 -+ asection *symsec;
10624 -+ val = 0;
10625 -+
10626 -+ type = H_GET_8 (input_bfd, sym->e_type);
10627 -+ name = strings + GET_WORD (input_bfd, sym->e_strx);
10628 -+
10629 -+ h = NULL;
10630 -+
10631 -+ if (pass)
10632 -+ {
10633 -+ /* Pass this symbol through. It is the target of an
10634 -+ indirect or warning symbol. */
10635 -+ val = GET_WORD (input_bfd, sym->e_value);
10636 -+ pass = FALSE;
10637 -+ }
10638 -+ else if (skip_next)
10639 -+ {
10640 -+ /* Skip this symbol, which is the target of an indirect
10641 -+ symbol that we have changed to no longer be an indirect
10642 -+ symbol. */
10643 -+ skip_next = FALSE;
10644 -+ continue;
10645 -+ }
10646 -+ else
10647 -+ {
10648 -+ struct aout_link_hash_entry *hresolve = *sym_hash;
10649 -+
10650 -+ /* We have saved the hash table entry for this symbol, if
10651 -+ there is one. Note that we could just look it up again
10652 -+ in the hash table, provided we first check that it is an
10653 -+ external symbol. */
10654 -+ h = *sym_hash;
10655 -+
10656 -+ /* Use the name from the hash table, in case the symbol was
10657 -+ wrapped. */
10658 -+ if (h != NULL
10659 -+ && h->root.type != bfd_link_hash_warning)
10660 -+ name = h->root.root.string;
10661 -+
10662 -+ /* If this is an indirect or warning symbol, then change
10663 -+ hresolve to the base symbol. */
10664 -+ hresolve = h;
10665 -+ if (h != (struct aout_link_hash_entry *) NULL
10666 -+ && (h->root.type == bfd_link_hash_indirect
10667 -+ || h->root.type == bfd_link_hash_warning))
10668 -+ {
10669 -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link;
10670 -+ while (hresolve->root.type == bfd_link_hash_indirect
10671 -+ || hresolve->root.type == bfd_link_hash_warning)
10672 -+ hresolve = ((struct aout_link_hash_entry*)
10673 -+ hresolve->root.u.i.link);
10674 -+ }
10675 -+
10676 -+ /* If the symbol has already been written out skip it. */
10677 -+ if (h != NULL
10678 -+ && is_written (h))
10679 -+ {
10680 -+ if ((type & N_TYPE) == N_INDR
10681 -+ || type == N_WARNING)
10682 -+ skip_next = TRUE;
10683 -+ continue;
10684 -+ }
10685 -+
10686 -+ /* See if we are stripping this symbol. */
10687 -+ skip = FALSE;
10688 -+
10689 -+ /* Skip all debugger symbols. No way to output them in
10690 -+ DRI format. This will also reduce a lot of headaches. */
10691 -+ if ((type & N_STAB) != 0)
10692 -+ skip = TRUE;
10693 -+
10694 -+ switch (strip)
10695 -+ {
10696 -+ case strip_none:
10697 -+ case strip_debugger:
10698 -+ break;
10699 -+ case strip_some:
10700 -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE)
10701 -+ == NULL)
10702 -+ skip = TRUE;
10703 -+ break;
10704 -+ case strip_all:
10705 -+ skip = TRUE;
10706 -+ break;
10707 -+ }
10708 -+
10709 -+ if (skip)
10710 -+ {
10711 -+ if (h != NULL)
10712 -+ mark_written (h);
10713 -+ continue;
10714 -+ }
10715 -+
10716 -+ /* Get the value of the symbol. */
10717 -+ if ((type & N_TYPE) == N_TEXT
10718 -+ || type == N_WEAKT)
10719 -+ symsec = obj_textsec (input_bfd);
10720 -+ else if ((type & N_TYPE) == N_DATA
10721 -+ || type == N_WEAKD)
10722 -+ symsec = obj_datasec (input_bfd);
10723 -+ else if ((type & N_TYPE) == N_BSS
10724 -+ || type == N_WEAKB)
10725 -+ symsec = obj_bsssec (input_bfd);
10726 -+ else if ((type & N_TYPE) == N_ABS
10727 -+ || type == N_WEAKA)
10728 -+ symsec = bfd_abs_section_ptr;
10729 -+ else if (((type & N_TYPE) == N_INDR
10730 -+ && (hresolve == NULL
10731 -+ || (hresolve->root.type != bfd_link_hash_defined
10732 -+ && hresolve->root.type != bfd_link_hash_defweak
10733 -+ && hresolve->root.type != bfd_link_hash_common)))
10734 -+ || type == N_WARNING)
10735 -+ {
10736 -+ /* Pass the next symbol through unchanged. The
10737 -+ condition above for indirect symbols is so that if
10738 -+ the indirect symbol was defined, we output it with
10739 -+ the correct definition so the debugger will
10740 -+ understand it. */
10741 -+ pass = TRUE;
10742 -+ val = GET_WORD (input_bfd, sym->e_value);
10743 -+ symsec = NULL;
10744 -+ }
10745 -+ else
10746 -+ {
10747 -+ /* If we get here with an indirect symbol, it means that
10748 -+ we are outputting it with a real definition. In such
10749 -+ a case we do not want to output the next symbol,
10750 -+ which is the target of the indirection. */
10751 -+ if ((type & N_TYPE) == N_INDR)
10752 -+ skip_next = TRUE;
10753 -+
10754 -+ symsec = NULL;
10755 -+
10756 -+ /* We need to get the value from the hash table. We use
10757 -+ hresolve so that if we have defined an indirect
10758 -+ symbol we output the final definition. */
10759 -+ if (h == NULL)
10760 -+ {
10761 -+ switch (type & N_TYPE)
10762 -+ {
10763 -+ case N_SETT:
10764 -+ symsec = obj_textsec (input_bfd);
10765 -+ break;
10766 -+ case N_SETD:
10767 -+ symsec = obj_datasec (input_bfd);
10768 -+ break;
10769 -+ case N_SETB:
10770 -+ symsec = obj_bsssec (input_bfd);
10771 -+ break;
10772 -+ case N_SETA:
10773 -+ symsec = bfd_abs_section_ptr;
10774 -+ break;
10775 -+ default:
10776 -+ val = 0;
10777 -+ break;
10778 -+ }
10779 -+ }
10780 -+ else if (hresolve->root.type == bfd_link_hash_defined
10781 -+ || hresolve->root.type == bfd_link_hash_defweak)
10782 -+ {
10783 -+ asection *input_section;
10784 -+ asection *output_section;
10785 -+
10786 -+ /* This case usually means a common symbol which was
10787 -+ turned into a defined symbol. */
10788 -+ input_section = hresolve->root.u.def.section;
10789 -+ output_section = input_section->output_section;
10790 -+ BFD_ASSERT (bfd_is_abs_section (output_section)
10791 -+ || output_section->owner == abfd);
10792 -+
10793 -+ /* The following reference to the output section VMA
10794 -+ is commented out because DRI symbols are relative
10795 -+ to the beginning of the section. */
10796 -+ val = (hresolve->root.u.def.value
10797 -+ /*+ bfd_get_section_vma (abfd, output_section)*/
10798 -+ + input_section->output_offset);
10799 -+
10800 -+ /* TEXT symbols values must be adjusted
10801 -+ by adding the size of the extended header. */
10802 -+ if (output_section == obj_textsec (abfd))
10803 -+ val += TEXT_START_ADDR;
10804 -+
10805 -+ /* Get the correct type based on the section. If
10806 -+ this is a constructed set, force it to be
10807 -+ globally visible. */
10808 -+ if (type == N_SETT
10809 -+ || type == N_SETD
10810 -+ || type == N_SETB
10811 -+ || type == N_SETA)
10812 -+ type |= N_EXT;
10813 -+
10814 -+ type &=~ N_TYPE;
10815 -+
10816 -+ if (output_section == obj_textsec (abfd))
10817 -+ type |= N_TEXT;
10818 -+ else if (output_section == obj_datasec (abfd))
10819 -+ type |= N_DATA;
10820 -+ else if (output_section == obj_bsssec (abfd))
10821 -+ type |= N_BSS;
10822 -+ else
10823 -+ type |= N_ABS;
10824 -+ }
10825 -+ else if (hresolve->root.type == bfd_link_hash_common)
10826 -+ val = hresolve->root.u.c.size;
10827 -+ else if (hresolve->root.type == bfd_link_hash_undefweak)
10828 -+ {
10829 -+ val = 0;
10830 -+ type = N_UNDF;
10831 -+ }
10832 -+ else
10833 -+ val = 0;
10834 -+ }
10835 -+ if (symsec != NULL)
10836 -+ {
10837 -+ /* The following reference to the output section VMA
10838 -+ is commented out because DRI symbols are relative
10839 -+ to the beginning of the section. */
10840 -+ val = (/*symsec->output_section->vma
10841 -+ +*/ symsec->output_offset
10842 -+ + (GET_WORD (input_bfd, sym->e_value)
10843 -+ - symsec->vma));
10844 -+
10845 -+ /* TEXT symbols values must be adjusted
10846 -+ by adding the size of the extended header. */
10847 -+ if (symsec == obj_textsec (input_bfd))
10848 -+ val += TEXT_START_ADDR;
10849 -+ }
10850 -+
10851 -+ /* If this is a global symbol set the written flag, and if
10852 -+ it is a local symbol see if we should discard it. */
10853 -+ if (h != NULL)
10854 -+ {
10855 -+ mark_written (h);
10856 -+ }
10857 -+ else if ((type & N_TYPE) != N_SETT
10858 -+ && (type & N_TYPE) != N_SETD
10859 -+ && (type & N_TYPE) != N_SETB
10860 -+ && (type & N_TYPE) != N_SETA)
10861 -+ {
10862 -+ switch (discard)
10863 -+ {
10864 -+ case discard_none:
10865 -+ case discard_sec_merge:
10866 -+ break;
10867 -+ case discard_l:
10868 -+ if (bfd_is_local_label_name (input_bfd, name))
10869 -+ skip = TRUE;
10870 -+ break;
10871 -+ default:
10872 -+ case discard_all:
10873 -+ skip = TRUE;
10874 -+ break;
10875 -+ }
10876 -+ if (skip)
10877 -+ {
10878 -+ pass = FALSE;
10879 -+ continue;
10880 -+ }
10881 -+ }
10882 -+ }
10883 -+
10884 -+ /* Now find the nearest type in DRI format. */
10885 -+ switch (type)
10886 -+ {
10887 -+ case N_ABS:
10888 -+ case N_ABS | N_EXT:
10889 -+ case N_SETA:
10890 -+ case N_SETA | N_EXT:
10891 -+ case N_WEAKA:
10892 -+ a_type = A_EQU | A_DEF | A_GLOBL;
10893 -+ break;
10894 -+ case N_TEXT:
10895 -+ case N_TEXT | N_EXT:
10896 -+ case N_SETT:
10897 -+ case N_SETT | N_EXT:
10898 -+ case N_WEAKT:
10899 -+ a_type = A_TEXT | A_DEF | A_GLOBL;
10900 -+ break;
10901 -+ case N_DATA:
10902 -+ case N_DATA | N_EXT:
10903 -+ case N_SETD:
10904 -+ case N_SETD | N_EXT:
10905 -+ case N_WEAKD:
10906 -+ a_type = A_DATA | A_DEF | A_GLOBL;
10907 -+ break;
10908 -+ case N_BSS:
10909 -+ case N_BSS | N_EXT:
10910 -+ case N_SETB:
10911 -+ case N_SETB | N_EXT:
10912 -+ case N_WEAKB:
10913 -+ a_type = A_BSS | A_DEF | A_GLOBL;
10914 -+ break;
10915 -+ default:
10916 -+ continue;
10917 -+ }
10918 -+
10919 -+ written_bytes = write_dri_symbol (abfd, name, a_type, val);
10920 -+ if (written_bytes < 0)
10921 -+ return FALSE;
10922 -+
10923 -+ myinfo->dri_symtab_size += written_bytes;
10924 -+ }
10925 -+ }
10926 -+
10927 -+ obj_aout_external_string_size (abfd) = 0;
10928 -+ return TRUE;
10929 -+}
10930 -+
10931 -+/* This is used for qsort() to sort addresses
10932 -+ for the TPA relocation table. */
10933 -+
10934 -+static int
10935 -+vma_cmp (const void *v1, const void *v2)
10936 -+{
10937 -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2)));
10938 -+}
10939 -+
10940 -+/* Alloc and fill the TPA relocation table. */
10941 -+
10942 -+static bfd_boolean
10943 -+fill_tparel (bfd *abfd)
10944 -+{
10945 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
10946 -+ unsigned long i;
10947 -+ bfd_size_type bytes;
10948 -+ unsigned char *ptr;
10949 -+
10950 -+ /* Sort the relocation info. */
10951 -+ if (myinfo->relocs != NULL)
10952 -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma),
10953 -+ vma_cmp);
10954 -+
10955 -+ /* Now calculate the number of bytes we need. The relocation info
10956 -+ is encoded as follows: The first entry is a 32-bit value
10957 -+ denoting the first offset to relocate. All following entries
10958 -+ are relative to the preceding one. For relative offsets of
10959 -+ more than 254 bytes a value of 1 is used. The OS will then
10960 -+ add 254 bytes to the current offset. The list is then terminated
10961 -+ with the byte 0. */
10962 -+ bytes = 4; /* First entry is a long. */
10963 -+ for (i = 1; i < myinfo->relocs_used; i++)
10964 -+ {
10965 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
10966 -+ BFD_ASSERT(diff > 0);
10967 -+ bytes += (diff + 253) / 254;
10968 -+ }
10969 -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */
10970 -+ if (myinfo->relocs_used > 0)
10971 -+ bytes++;
10972 -+
10973 -+ myinfo->tparel_size = bytes;
10974 -+ myinfo->tparel = bfd_alloc (abfd, bytes);
10975 -+ if (myinfo->tparel == NULL)
10976 -+ return FALSE;
10977 -+
10978 -+ /* Now fill the array. */
10979 -+ ptr = (bfd_byte*) myinfo->tparel;
10980 -+ if (myinfo->relocs != NULL)
10981 -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr);
10982 -+ else
10983 -+ bfd_put_32 (abfd, 0, ptr);
10984 -+ ptr += 4;
10985 -+
10986 -+ for (i = 1; i < myinfo->relocs_used; i++)
10987 -+ {
10988 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
10989 -+ while (diff > 254)
10990 -+ {
10991 -+ *ptr++ = 1;
10992 -+ diff -= 254;
10993 -+ }
10994 -+ *ptr++ = (bfd_byte) diff;
10995 -+ }
10996 -+
10997 -+ if (myinfo->relocs_used > 0)
10998 -+ *ptr = 0;
10999 -+
11000 -+ return TRUE;
11001 -+}
11002 -+
11003 -+/* Final link routine. We need to use a call back to get the correct
11004 -+ offsets in the output file. And we need to malloc some internal
11005 -+ buffers. */
11006 -+
11007 -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link
11008 -+
11009 -+static bfd_boolean
11010 -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
11011 -+{
11012 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
11013 -+ struct bfd_link_hash_table *hash = info->hash;
11014 -+ enum bfd_link_strip original_strip = info->strip;
11015 -+
11016 -+ if (info->relocatable)
11017 -+ {
11018 -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s",
11019 -+ abfd, bfd_get_target (abfd));
11020 -+ bfd_set_error (bfd_error_invalid_operation);
11021 -+ return FALSE;
11022 -+ }
11023 -+
11024 -+ myinfo->linkinfo = info;
11025 -+
11026 -+ /* Make sure that for now we never write zmagics. */
11027 -+ abfd->flags &= ~D_PAGED;
11028 -+
11029 -+ /* Find the __stksize symbol. This symbol is used for a MiNT
11030 -+ special kludge. The libc defines this symbol in an object file
11031 -+ initialized to a default value to make sure it is defined in
11032 -+ every output file. The start-up code in crtinit() then simply
11033 -+ sets the stacksize accordingly. In your programs (if they need
11034 -+ an unusual stacksize) you can then simply code:
11035 -+
11036 -+ long _stksize = 0x2000;
11037 -+
11038 -+ This will create a program stack of 2k. Since MiNT cannot detect
11039 -+ a stack overflow this is the only way to prevent program crashes
11040 -+ caused by a stack that is too small.
11041 -+
11042 -+ The ancient linker ignored this feature, the ancient strip
11043 -+ program paid heed to it. By default, strip never stripped this
11044 -+ special symbol from the binary.
11045 -+
11046 -+ Another program called ``printstk'' and its colleague ``fixstk''
11047 -+ could be used to either print the current value of the stacksize
11048 -+ or to modify it without recompiling and rebuilding. These
11049 -+ programs traversed the symbol table and then took the appropriate
11050 -+ measures if the symbol was found.
11051 -+
11052 -+ Here we do a different approach. Since we already expanded the
11053 -+ standard executable header we now hardcode the address (as a file
11054 -+ offset) that the __stksize symbol points to into the header. We
11055 -+ can now let strip safely remove the entry from the symbol table
11056 -+ and we're not dependent on a special format of the symbol table.
11057 -+ Because the address is kept in the header we will always be able
11058 -+ to manipulate the stacksize value later. */
11059 -+ if (hash != NULL)
11060 -+ {
11061 -+ struct aout_link_hash_entry *h =
11062 -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize",
11063 -+ FALSE, FALSE, FALSE);
11064 -+ asection *sec;
11065 -+
11066 -+ if (h != NULL)
11067 -+ {
11068 -+ switch (h->root.type)
11069 -+ {
11070 -+ case bfd_link_hash_defined:
11071 -+ case bfd_link_hash_defweak:
11072 -+ sec = h->root.u.def.section->output_section;
11073 -+ BFD_ASSERT (sec->owner == abfd);
11074 -+
11075 -+ myinfo->stkpos = (h->root.u.def.value + sec->vma
11076 -+ + h->root.u.def.section->output_offset
11077 -+ + GEMDOS_HEADER_SIZE);
11078 -+ break;
11079 -+ default: /* Ignore other types. */
11080 -+ break;
11081 -+ }
11082 -+ }
11083 -+ }
11084 -+
11085 -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
11086 -+ {
11087 -+ myinfo->traditional_format = TRUE;
11088 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI;
11089 -+ }
11090 -+
11091 -+ /* Unconditionally unset the traditional flag. The only effect in
11092 -+ the a.out code is to disable string hashing (with respect to
11093 -+ SunOS gdx). This is not necessary for us. */
11094 -+
11095 -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT;
11096 -+
11097 -+ /* Do not write GNU symbols in traditional format. */
11098 -+ if (myinfo->traditional_format)
11099 -+ info->strip = strip_all;
11100 -+
11101 -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback)
11102 -+ != TRUE)
11103 -+ return FALSE;
11104 -+
11105 -+ if (myinfo->reloc_error)
11106 -+ return FALSE;
11107 -+
11108 -+ /* Restore the strip status for the traditional symbols. */
11109 -+ info->strip = original_strip;
11110 -+
11111 -+ if (myinfo->traditional_format
11112 -+ && link_write_traditional_syms (abfd, info) != TRUE)
11113 -+ return FALSE;
11114 -+
11115 -+ if (fill_tparel (abfd) != TRUE)
11116 -+ return FALSE;
11117 -+
11118 -+ return TRUE;
11119 -+}
11120 -+
11121 -+/* Copy private BFD header information from the input BFD. */
11122 -+
11123 -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data
11124 -+
11125 -+static bfd_boolean
11126 -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd)
11127 -+{
11128 -+ (void)obfd; /* Unused. */
11129 -+
11130 -+ /* We can only copy BFD files using our own file format. */
11131 -+ if (ibfd->xvec != &m68kmint_prg_vec)
11132 -+ {
11133 -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s",
11134 -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd));
11135 -+ bfd_set_error (bfd_error_invalid_operation);
11136 -+ return FALSE;
11137 -+ }
11138 -+
11139 -+ return TRUE;
11140 -+}
11141 -+
11142 -+/* Copy backend specific data from one object module to another.
11143 -+ This function is used by objcopy and strip. */
11144 -+
11145 -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data
11146 -+
11147 -+static bfd_boolean
11148 -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
11149 -+{
11150 -+ struct mint_internal_info *myinfo_in;
11151 -+ struct mint_internal_info *myinfo_out;
11152 -+
11153 -+ /* obfd uses our file format, ibfd may be foreign. */
11154 -+ if (ibfd->xvec != &m68kmint_prg_vec)
11155 -+ return TRUE;
11156 -+
11157 -+ myinfo_in = obj_aout_ext (ibfd);
11158 -+ BFD_ASSERT (myinfo_in != NULL);
11159 -+
11160 -+ myinfo_out = obj_aout_ext (obfd);
11161 -+ BFD_ASSERT (myinfo_out != NULL);
11162 -+
11163 -+ /* Copy myinfo. */
11164 -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out));
11165 -+
11166 -+ /* Copy tparel. */
11167 -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size);
11168 -+ if (myinfo_out->tparel == NULL)
11169 -+ return FALSE;
11170 -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size);
11171 -+
11172 -+ /* Normalize the type of empty symbols. */
11173 -+ if (bfd_get_symcount (obfd) == 0)
11174 -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
11175 -+
11176 -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */
11177 -+}
11178 -+
11179 -+/* Merge private BFD information from an input BFD to the output BFD when linking. */
11180 -+
11181 -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data
11182 -+
11183 -+static bfd_boolean
11184 -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
11185 -+{
11186 -+ (void)obfd; /* Unused. */
11187 -+
11188 -+ /* Our file format cannot be used as linker input. */
11189 -+ if (ibfd->xvec == &m68kmint_prg_vec)
11190 -+ {
11191 -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input",
11192 -+ ibfd, bfd_get_target (ibfd));
11193 -+ bfd_set_error (bfd_error_invalid_operation);
11194 -+ return FALSE;
11195 -+ }
11196 -+
11197 -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */
11198 -+}
11199 -+
11200 -+/* Find out the symbol name. */
11201 -+
11202 -+static const char *
11203 -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd,
11204 -+ bfd_byte *location, struct reloc_std_external *rel)
11205 -+{
11206 -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd);
11207 -+ char *strings = obj_aout_external_strings (input_bfd);
11208 -+ struct aout_link_hash_entry **sym_hashes
11209 -+ = obj_aout_sym_hashes (input_bfd);
11210 -+ struct aout_link_hash_entry *h = NULL;
11211 -+ const char *name;
11212 -+ bfd_size_type r_index;
11213 -+ int r_extern;
11214 -+
11215 -+ if (bfd_get_reloc_size (howto) != 4)
11216 -+ return "(not a symbol)";
11217 -+
11218 -+ /* The input bfd is always big-endian. There is no need to
11219 -+ call bfd_header_big_endian (input_bfd). */
11220 -+ r_index = ((rel->r_index[0] << 16)
11221 -+ | (rel->r_index[1] << 8)
11222 -+ | (rel->r_index[2]));
11223 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
11224 -+
11225 -+ if (sym_hashes != NULL)
11226 -+ h = sym_hashes[r_index];
11227 -+
11228 -+ if (!r_extern)
11229 -+ {
11230 -+ bfd_size_type i;
11231 -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location);
11232 -+
11233 -+ name = NULL;
11234 -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++)
11235 -+ {
11236 -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value);
11237 -+
11238 -+ if (this_value == wanted_value)
11239 -+ {
11240 -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type);
11241 -+
11242 -+ /* Skip debug symbols and the like. */
11243 -+ if ((symtype & N_STAB) != 0)
11244 -+ continue;
11245 -+
11246 -+ /* This is dirty but preferable to a plethoria of
11247 -+ single comparisons. */
11248 -+ if (symtype <= (N_BSS | N_EXT)
11249 -+ || (symtype >= N_WEAKU && symtype <= N_COMM))
11250 -+ {
11251 -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx);
11252 -+ break;
11253 -+ }
11254 -+ }
11255 -+ }
11256 -+
11257 -+ /* FIXME: If the relocation is against a section there is
11258 -+ probably a symbol for that section floating around somewhere
11259 -+ in the bfd jungle. */
11260 -+ if (name == NULL)
11261 -+ {
11262 -+ switch ((r_index & N_TYPE) & ~N_EXT)
11263 -+ {
11264 -+ case N_TEXT:
11265 -+ name = "text section";
11266 -+ break;
11267 -+ case N_DATA:
11268 -+ name = "data section";
11269 -+ break;
11270 -+ case N_BSS:
11271 -+ name = "bss section";
11272 -+ break;
11273 -+ case N_ABS:
11274 -+ name = "absolute section";
11275 -+ break;
11276 -+ default:
11277 -+ name = "unknown section";
11278 -+ break;
11279 -+ }
11280 -+ }
11281 -+ }
11282 -+ else if (h != NULL)
11283 -+ name = h->root.root.string;
11284 -+ else if (r_index >= obj_aout_external_sym_count (input_bfd))
11285 -+ name = "(unknown symbol)"; /* Shouldn't happen. */
11286 -+ else
11287 -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
11288 -+
11289 -+ return name;
11290 -+}
11291 -+
11292 -+/* This relocation routine is used by some of the backend linkers.
11293 -+ They do not construct asymbol or arelent structures, so there is no
11294 -+ reason for them to use bfd_perform_relocation. Also,
11295 -+ bfd_perform_relocation is so hacked up it is easier to write a new
11296 -+ function than to try to deal with it.
11297 -+
11298 -+ This routine does a final relocation. Whether it is useful for a
11299 -+ relocatable link depends upon how the object format defines
11300 -+ relocations.
11301 -+
11302 -+ FIXME: This routine ignores any special_function in the HOWTO,
11303 -+ since the existing special_function values have been written for
11304 -+ bfd_perform_relocation.
11305 -+
11306 -+ HOWTO is the reloc howto information.
11307 -+ INPUT_BFD is the BFD which the reloc applies to.
11308 -+ INPUT_SECTION is the section which the reloc applies to.
11309 -+ CONTENTS is the contents of the section.
11310 -+ ADDRESS is the address of the reloc within INPUT_SECTION.
11311 -+ VALUE is the value of the symbol the reloc refers to.
11312 -+ ADDEND is the addend of the reloc. */
11313 -+
11314 -+/* The additional parameter REL is specific to this backend.
11315 -+ This function is derived from _bfd_final_link_relocate()
11316 -+ found in reloc.c. It adds additional checking for dangerous
11317 -+ relocations in MiNT sharable text sections, then it records
11318 -+ the relocated offset in myinfo->relocs[] for further processing. */
11319 -+
11320 -+static bfd_reloc_status_type
11321 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
11322 -+ bfd *input_bfd,
11323 -+ asection *input_section,
11324 -+ bfd_byte *contents,
11325 -+ bfd_vma address,
11326 -+ bfd_vma value,
11327 -+ bfd_vma addend,
11328 -+ struct reloc_std_external *rel)
11329 -+{
11330 -+ bfd_vma relocation;
11331 -+ bfd *output_bfd = input_section->output_section->owner;
11332 -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd);
11333 -+ bfd_reloc_status_type retval;
11334 -+ int r_index;
11335 -+ int r_extern;
11336 -+ bfd_boolean need_tpa_relocation;
11337 -+
11338 -+ /* The input bfd is always big-endian. There is no need to
11339 -+ call bfd_header_big_endian (input_bfd). */
11340 -+ r_index = ((rel->r_index[0] << 16)
11341 -+ | (rel->r_index[1] << 8)
11342 -+ | (rel->r_index[2]));
11343 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
11344 -+
11345 -+#define _MINT_F_SHTEXT 0x800
11346 -+
11347 -+ /* Sanity check the address. */
11348 -+ if (address > bfd_get_section_limit (input_bfd, input_section))
11349 -+ return bfd_reloc_outofrange;
11350 -+
11351 -+ /* This function assumes that we are dealing with a basic relocation
11352 -+ against a symbol. We want to compute the value of the symbol to
11353 -+ relocate to. This is just VALUE, the value of the symbol, plus
11354 -+ ADDEND, any addend associated with the reloc. */
11355 -+ relocation = value + addend;
11356 -+
11357 -+ /* Check for dangerous relocations in images with a sharable
11358 -+ text section. */
11359 -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0
11360 -+ && bfd_get_reloc_size (howto) == 4)
11361 -+ {
11362 -+ bfd_boolean error_found = FALSE;
11363 -+ const char *name = NULL;
11364 -+
11365 -+ if (input_section == obj_textsec (input_bfd))
11366 -+ {
11367 -+ if (!r_extern)
11368 -+ {
11369 -+ /* This is a relocation against another section. Only
11370 -+ relocations against the text section are allowed. */
11371 -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT))
11372 -+ error_found = TRUE;
11373 -+ }
11374 -+ else if (relocation > (input_section->output_section->vma
11375 -+ + input_section->output_section->size))
11376 -+ {
11377 -+ error_found = TRUE;
11378 -+ }
11379 -+ else if (relocation == (input_section->output_section->vma
11380 -+ + input_section->output_section->size))
11381 -+ {
11382 -+ name = find_symbol_name (howto, input_bfd,
11383 -+ contents + address,
11384 -+ rel);
11385 -+ if (strcmp (name, "_etext") == 0)
11386 -+ error_found = FALSE;
11387 -+ }
11388 -+ }
11389 -+
11390 -+ if (error_found)
11391 -+ {
11392 -+ const struct bfd_link_callbacks *callbacks
11393 -+ = myinfo->linkinfo->callbacks;
11394 -+
11395 -+ myinfo->reloc_error = TRUE;
11396 -+
11397 -+ if (callbacks->reloc_dangerous != NULL)
11398 -+ {
11399 -+ if (name == NULL)
11400 -+ name = find_symbol_name (howto, input_bfd,
11401 -+ contents + address,
11402 -+ rel);
11403 -+
11404 -+ callbacks->reloc_dangerous (myinfo->linkinfo, name,
11405 -+ input_bfd,
11406 -+ input_section, address);
11407 -+ }
11408 -+ }
11409 -+ }
11410 -+
11411 -+ /* If the relocation is PC relative, we want to set RELOCATION to
11412 -+ the distance between the symbol (currently in RELOCATION) and the
11413 -+ location we are relocating. Some targets (e.g., i386-aout)
11414 -+ arrange for the contents of the section to be the negative of the
11415 -+ offset of the location within the section; for such targets
11416 -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF)
11417 -+ simply leave the contents of the section as zero; for such
11418 -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not
11419 -+ need to subtract out the offset of the location within the
11420 -+ section (which is just ADDRESS). */
11421 -+ if (howto->pc_relative)
11422 -+ {
11423 -+ relocation -= (input_section->output_section->vma
11424 -+ + input_section->output_offset);
11425 -+ if (howto->pcrel_offset)
11426 -+ relocation -= address;
11427 -+ }
11428 -+
11429 -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation,
11430 -+ contents + address);
11431 -+
11432 -+ /* The symbol has to be relocated again iff the length of the relocation
11433 -+ is 2 words and it is not pc relative. */
11434 -+ need_tpa_relocation = FALSE;
11435 -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4)
11436 -+ {
11437 -+ if (r_extern)
11438 -+ {
11439 -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd);
11440 -+ struct aout_link_hash_entry *h = sym_hashes[r_index];
11441 -+ asection *output_section = h->root.u.def.section->output_section;
11442 -+
11443 -+ /* Do not relocate absolute symbols. */
11444 -+ if (output_section == obj_textsec (output_bfd)
11445 -+ || output_section == obj_datasec (output_bfd)
11446 -+ || output_section == obj_bsssec (output_bfd))
11447 -+ {
11448 -+ need_tpa_relocation = TRUE;
11449 -+ }
11450 -+ }
11451 -+ else
11452 -+ {
11453 -+ need_tpa_relocation = TRUE;
11454 -+ }
11455 -+ }
11456 -+
11457 -+ /* Here we add the TPA relocation entries for the address references
11458 -+ located inside the input sections. Note that if some references
11459 -+ to addresses are generated using data statements in the linker
11460 -+ script, they will not be relocated here because they do not
11461 -+ belong to any input section. */
11462 -+ if (need_tpa_relocation)
11463 -+ {
11464 -+ bfd_vma tpa_address = input_section->output_section->vma
11465 -+ + input_section->output_offset + address;
11466 -+
11467 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address))
11468 -+ return bfd_reloc_other;
11469 -+ }
11470 -+
11471 -+ return retval;
11472 -+}
11473 -+
11474 -+/* Write out the TPA relocation table. */
11475 -+
11476 -+static bfd_boolean
11477 -+write_tparel (bfd *abfd, struct internal_exec *execp)
11478 -+{
11479 -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd);
11480 -+
11481 -+ if (myinfo->dri_symtab_size == 0)
11482 -+ myinfo->tparel_pos = N_STROFF (*execp)
11483 -+ + obj_aout_external_string_size (abfd);
11484 -+ else
11485 -+ myinfo->tparel_pos = N_SYMOFF (*execp)
11486 -+ + myinfo->dri_symtab_size;
11487 -+
11488 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0)
11489 -+ return FALSE;
11490 -+
11491 -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd)
11492 -+ != myinfo->tparel_size)
11493 -+ return FALSE;
11494 -+
11495 -+ return TRUE;
11496 -+}
11497 -+
11498 -+/* Write the full exec header.
11499 -+ This function must be called last to ensure that we have all the
11500 -+ information needed to fill the MiNT-specific header fields. */
11501 -+
11502 -+static bfd_boolean
11503 -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes)
11504 -+{
11505 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
11506 -+ bfd_size_type symtab_size;
11507 -+
11508 -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch);
11509 -+
11510 -+ /* The OS will load our extension header fields into the text segment. */
11511 -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE),
11512 -+ exec_bytes->g_text);
11513 -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data);
11514 -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss);
11515 -+
11516 -+ /* The OS' notion of the size of the symbol table is another than
11517 -+ the bfd library's. We have to fill in the size of the table
11518 -+ itself plus the size of the string table but only if we have not written
11519 -+ a traditional symbol table. If we have written a traditional symbol
11520 -+ table we know the size. */
11521 -+ if (myinfo->dri_symtab_size != 0)
11522 -+ symtab_size = myinfo->dri_symtab_size;
11523 -+ else
11524 -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp);
11525 -+
11526 -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms);
11527 -+
11528 -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic);
11529 -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags);
11530 -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs);
11531 -+
11532 -+ /* Generate the jump instruction to the entry point. In m68k
11533 -+ assembler mnemnonics it looks more or less like this:
11534 -+
11535 -+ move.l exec_bytes->e_entry(pc),d0
11536 -+ jmp -6(pc,d0.l)
11537 -+
11538 -+ Sorry for the wrong syntax. As a real assembler addict I
11539 -+ never actually use an assembler. I edit my binaries manually
11540 -+ with a hex editor, looks much cooler and it strengthens your
11541 -+ abstraction abilities. */
11542 -+
11543 -+ exec_bytes->g_jump_entry[0] = 0x20;
11544 -+ exec_bytes->g_jump_entry[1] = 0x3a;
11545 -+ exec_bytes->g_jump_entry[2] = 0x00;
11546 -+ exec_bytes->g_jump_entry[3] = 0x1a;
11547 -+ exec_bytes->g_jump_entry[4] = 0x4e;
11548 -+ exec_bytes->g_jump_entry[5] = 0xfb;
11549 -+ exec_bytes->g_jump_entry[6] = 0x08;
11550 -+ exec_bytes->g_jump_entry[7] = 0xfa;
11551 -+
11552 -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos);
11553 -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size);
11554 -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos);
11555 -+
11556 -+ /* If there are no symbols, pretend they are in GNU format. */
11557 -+ if (symtab_size == 0)
11558 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
11559 -+
11560 -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format);
11561 -+
11562 -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0));
11563 -+
11564 -+ /* The standard stuff. */
11565 -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes);
11566 -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU)
11567 -+ PUT_WORD (abfd, 0, exec_bytes->e_syms);
11568 -+
11569 -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
11570 -+ return FALSE;
11571 -+
11572 -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd)
11573 -+ != EXEC_BYTES_SIZE)
11574 -+ return FALSE;
11575 -+
11576 -+ /* Override the stack size. */
11577 -+ if (myinfo->override_stack_size && myinfo->stkpos)
11578 -+ {
11579 -+ bfd_byte big_endian_stack_size[4];
11580 -+
11581 -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size);
11582 -+
11583 -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0)
11584 -+ return FALSE;
11585 -+
11586 -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4)
11587 -+ return FALSE;
11588 -+ }
11589 -+
11590 -+ return TRUE;
11591 -+}
11592 -+
11593 -+/* Write an object file.
11594 -+ Section contents have already been written. We write the
11595 -+ file header, symbols, and relocation. */
11596 -+
11597 -+#define MY_write_object_contents m68kmint_prg_write_object_contents
11598 -+
11599 -+static bfd_boolean
11600 -+m68kmint_prg_write_object_contents (bfd *abfd)
11601 -+{
11602 -+ struct external_exec exec_bytes;
11603 -+ struct internal_exec *execp = exec_hdr (abfd);
11604 -+ bfd_size_type text_size;
11605 -+ file_ptr text_end;
11606 -+
11607 -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL);
11608 -+
11609 -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
11610 -+
11611 -+ /* Most of the following code come from the WRITE_HEADERS macro
11612 -+ found in libaout.h. */
11613 -+
11614 -+ if (adata(abfd).magic == undecided_magic)
11615 -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
11616 -+
11617 -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
11618 -+ execp->a_entry = bfd_get_start_address (abfd);
11619 -+
11620 -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) *
11621 -+ obj_reloc_entry_size (abfd));
11622 -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
11623 -+ obj_reloc_entry_size (abfd));
11624 -+
11625 -+ /* Now write out reloc info, followed by syms and strings. */
11626 -+
11627 -+ if (bfd_get_outsymbols (abfd) != NULL
11628 -+ && bfd_get_symcount (abfd) != 0)
11629 -+ {
11630 -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
11631 -+ return FALSE;
11632 -+
11633 -+ if (! NAME (aout, write_syms) (abfd))
11634 -+ return FALSE;
11635 -+ }
11636 -+
11637 -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
11638 -+ return FALSE;
11639 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
11640 -+ return FALSE;
11641 -+
11642 -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
11643 -+ return FALSE;
11644 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
11645 -+ return FALSE;
11646 -+
11647 -+ if (write_tparel (abfd, execp) != TRUE)
11648 -+ return FALSE;
11649 -+
11650 -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE)
11651 -+ return FALSE;
11652 -+
11653 -+ return TRUE;
11654 -+}
11655 -+
11656 -+/* Print private BFD data. Used by objdump -p. */
11657 -+
11658 -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data
11659 -+
11660 -+static bfd_boolean
11661 -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr)
11662 -+{
11663 -+ FILE *file = (FILE *) ptr;
11664 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
11665 -+ const char* symbol_format;
11666 -+ long stksize = 0;
11667 -+
11668 -+ fprintf (file, "\n");
11669 -+
11670 -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags);
11671 -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd));
11672 -+
11673 -+ /* Stack size. */
11674 -+ if (myinfo->stkpos != 0)
11675 -+ {
11676 -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0
11677 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long)))
11678 -+ return FALSE;
11679 -+
11680 -+ stksize = bfd_get_signed_32 (abfd, &stksize);
11681 -+ }
11682 -+ fprintf (file, " Stack size: %ld\n", stksize);
11683 -+
11684 -+ /* Symbol format. */
11685 -+ switch (myinfo->symbol_format)
11686 -+ {
11687 -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break;
11688 -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break;
11689 -+ default: symbol_format = "?"; break;
11690 -+ }
11691 -+ fprintf (file, "Symbol format: %s\n", symbol_format);
11692 -+
11693 -+ return TRUE;
11694 -+}
11695 -+
11696 -+/* Special case for NAME (aout, get_section_contents)
11697 -+ It is not declared in libaout.h, neither implemented in aoutx.h.
11698 -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h.
11699 -+ So the default value of MY_get_section_contents provided by aout-target.h
11700 -+ is not correct, it has to be defined here with the right value. */
11701 -+
11702 -+#define MY_get_section_contents aout_32_get_section_contents
11703 -+
11704 -+/* The following include will define m68kmint_prg_vec
11705 -+ and a default implementation for all the MY_ functions
11706 -+ not overriden here. */
11707 -+
11708 -+#include "aout-target.h"
11709 -+
11710 -+/* Set the GEMDOS executable flags.
11711 -+ It is called by the linker emulation script. */
11712 -+
11713 -+bfd_boolean
11714 -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags)
11715 -+{
11716 -+ struct mint_internal_info *myinfo;
11717 -+
11718 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
11719 -+ myinfo = obj_aout_ext (abfd);
11720 -+ BFD_ASSERT(myinfo != NULL);
11721 -+
11722 -+ myinfo->prg_flags = prg_flags;
11723 -+
11724 -+ return TRUE;
11725 -+}
11726 -+
11727 -+/* Override the stack size.
11728 -+ It is called by the linker emulation script. */
11729 -+
11730 -+bfd_boolean
11731 -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size)
11732 -+{
11733 -+ struct mint_internal_info *myinfo;
11734 -+
11735 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
11736 -+ myinfo = obj_aout_ext (abfd);
11737 -+ BFD_ASSERT(myinfo != NULL);
11738 -+
11739 -+ myinfo->stack_size = stack_size;
11740 -+ myinfo->override_stack_size = TRUE;
11741 -+
11742 -+ return TRUE;
11743 -+}
11744 -+
11745 -+/* Add a TPA relocation entry.
11746 -+ It is called by BFD when linking the input sections, and by the
11747 -+ linker when it generates a reference to an address (in particular,
11748 -+ when building the constructors list). */
11749 -+
11750 -+bfd_boolean
11751 -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address)
11752 -+{
11753 -+ struct mint_internal_info *myinfo;
11754 -+
11755 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
11756 -+ myinfo = obj_aout_ext (abfd);
11757 -+ BFD_ASSERT(myinfo != NULL);
11758 -+
11759 -+ /* Enlarge the buffer if necessary. */
11760 -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated)
11761 -+ {
11762 -+ bfd_vma *newbuf;
11763 -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE;
11764 -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated);
11765 -+ if (newbuf == NULL)
11766 -+ return FALSE;
11767 -+
11768 -+ myinfo->relocs = newbuf;
11769 -+ }
11770 -+
11771 -+ /* The TPA relative relocation actually just adds the address of
11772 -+ the text segment (i. e. beginning of the executable in memory)
11773 -+ to the addresses at the specified locations. This allows an
11774 -+ executable to be loaded everywhere in the address space without
11775 -+ memory management. */
11776 -+ myinfo->relocs[myinfo->relocs_used++] = address;
11777 -+
11778 -+ return TRUE;
11779 -+}
11780 -diff -ur --new-file binutils-2.21.51.0.7/bfd/targets.c binutils-2.21.51.0.7-mint/bfd/targets.c
11781 ---- binutils-2.21.51.0.7/bfd/targets.c 2011-01-04 17:51:04.000000000 +0000
11782 -+++ binutils-2.21.51.0.7-mint/bfd/targets.c 2011-04-08 10:07:08.000000000 +0000
11783 -@@ -770,6 +770,7 @@
11784 - extern const bfd_target m68kcoff_vec;
11785 - extern const bfd_target m68kcoffun_vec;
11786 - extern const bfd_target m68klinux_vec;
11787 -+extern const bfd_target m68kmint_prg_vec;
11788 - extern const bfd_target m68knetbsd_vec;
11789 - extern const bfd_target m68ksysvcoff_vec;
11790 - extern const bfd_target m88kbcs_vec;
11791 -diff -ur --new-file binutils-2.21.51.0.7/binutils/configure binutils-2.21.51.0.7-mint/binutils/configure
11792 ---- binutils-2.21.51.0.7/binutils/configure 2011-03-07 18:05:31.000000000 +0000
11793 -+++ binutils-2.21.51.0.7-mint/binutils/configure 2011-04-08 10:07:09.000000000 +0000
11794 -@@ -13041,7 +13041,7 @@
11795 -
11796 -
11797 - case "${host}" in
11798 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
11799 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
11800 -
11801 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
11802 - ;;
11803 -diff -ur --new-file binutils-2.21.51.0.7/binutils/dlltool.c binutils-2.21.51.0.7-mint/binutils/dlltool.c
11804 ---- binutils-2.21.51.0.7/binutils/dlltool.c 2010-12-06 14:23:54.000000000 +0000
11805 -+++ binutils-2.21.51.0.7-mint/binutils/dlltool.c 2011-04-08 10:07:09.000000000 +0000
11806 -@@ -4360,7 +4360,7 @@
11807 - if (*cp == '-')
11808 - dash = cp;
11809 - if (
11810 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
11811 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
11812 - *cp == ':' || *cp == '\\' ||
11813 - #endif
11814 - *cp == '/')
11815 -diff -ur --new-file binutils-2.21.51.0.7/binutils/dllwrap.c binutils-2.21.51.0.7-mint/binutils/dllwrap.c
11816 ---- binutils-2.21.51.0.7/binutils/dllwrap.c 2010-08-11 21:51:51.000000000 +0000
11817 -+++ binutils-2.21.51.0.7-mint/binutils/dllwrap.c 2011-04-08 10:07:09.000000000 +0000
11818 -@@ -263,7 +263,7 @@
11819 - dash = cp;
11820 -
11821 - if (
11822 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
11823 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
11824 - *cp == ':' || *cp == '\\' ||
11825 - #endif
11826 - *cp == '/')
11827 -diff -ur --new-file binutils-2.21.51.0.7/binutils/readelf.c binutils-2.21.51.0.7-mint/binutils/readelf.c
11828 ---- binutils-2.21.51.0.7/binutils/readelf.c 2011-04-08 09:37:05.000000000 +0000
11829 -+++ binutils-2.21.51.0.7-mint/binutils/readelf.c 2011-04-08 10:07:10.000000000 +0000
11830 -@@ -9903,7 +9903,11 @@
11831 - #ifndef __MSVCRT__
11832 - /* PR 11128: Use two separate invocations in order to work
11833 - around bugs in the Solaris 8 implementation of printf. */
11834 -+#if GCC_VERSION < 3000
11835 -+ printf (" [%6lx] ", (unsigned long) (data - start));
11836 -+#else
11837 - printf (" [%6tx] ", data - start);
11838 -+#endif
11839 - printf ("%s\n", data);
11840 - #else
11841 - printf (" [%6Ix] %s\n", (size_t) (data - start), data);
11842 -diff -ur --new-file binutils-2.21.51.0.7/binutils/resrc.c binutils-2.21.51.0.7-mint/binutils/resrc.c
11843 ---- binutils-2.21.51.0.7/binutils/resrc.c 2010-12-06 14:23:55.000000000 +0000
11844 -+++ binutils-2.21.51.0.7-mint/binutils/resrc.c 2011-04-08 10:07:10.000000000 +0000
11845 -@@ -396,7 +396,7 @@
11846 - *space = 0;
11847 -
11848 - if (
11849 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32)
11850 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__)
11851 - strchr (cmd, '\\') ||
11852 - #endif
11853 - strchr (cmd, '/'))
11854 -@@ -514,7 +514,7 @@
11855 - if (*cp == '-')
11856 - dash = cp;
11857 - if (
11858 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32)
11859 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__)
11860 - *cp == ':' || *cp == '\\' ||
11861 - #endif
11862 - *cp == '/')
11863 -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
11864 ---- binutils-2.21.51.0.7/gas/config/te-mint.h 1970-01-01 00:00:00.000000000 +0000
11865 -+++ binutils-2.21.51.0.7-mint/gas/config/te-mint.h 2011-04-08 10:07:10.000000000 +0000
11866 -@@ -0,0 +1,30 @@
11867 -+/* Copyright 2008 Free Software Foundation, Inc.
11868 -+
11869 -+ This file is part of GAS, the GNU Assembler.
11870 -+
11871 -+ GAS is free software; you can redistribute it and/or modify
11872 -+ it under the terms of the GNU General Public License as
11873 -+ published by the Free Software Foundation; either version 3,
11874 -+ or (at your option) any later version.
11875 -+
11876 -+ GAS is distributed in the hope that it will be useful, but
11877 -+ WITHOUT ANY WARRANTY; without even the implied warranty of
11878 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11879 -+ the GNU General Public License for more details.
11880 -+
11881 -+ You should have received a copy of the GNU General Public License
11882 -+ along with GAS; see the file COPYING. If not, write to the Free
11883 -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
11884 -+ 02110-1301, USA. */
11885 -+
11886 -+#define TE_MINT
11887 -+
11888 -+#define LOCAL_LABELS_DOLLAR 1
11889 -+#define LOCAL_LABELS_FB 1
11890 -+
11891 -+/* These define interfaces. */
11892 -+#ifdef OBJ_HEADER
11893 -+#include OBJ_HEADER
11894 -+#else
11895 -+#include "obj-format.h"
11896 -+#endif
11897 -diff -ur --new-file binutils-2.21.51.0.7/gas/configure.tgt binutils-2.21.51.0.7-mint/gas/configure.tgt
11898 ---- binutils-2.21.51.0.7/gas/configure.tgt 2011-01-04 17:51:04.000000000 +0000
11899 -+++ binutils-2.21.51.0.7-mint/gas/configure.tgt 2011-04-08 10:07:10.000000000 +0000
11900 -@@ -266,6 +266,7 @@
11901 - m68k-*-linux-*) fmt=elf em=linux ;;
11902 - m68k-*-uclinux*) fmt=elf em=uclinux ;;
11903 - m68k-*-gnu*) fmt=elf ;;
11904 -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;;
11905 - m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
11906 - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
11907 - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
11908 -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
11909 ---- binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d 2009-11-11 16:52:57.000000000 +0000
11910 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d 2011-04-08 10:07:10.000000000 +0000
11911 -@@ -3,7 +3,7 @@
11912 - #source: weakref1.s
11913 - # aout turns undefined into *ABS* symbols.
11914 - # see weakref1.d for comments on the other not-targets
11915 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
11916 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
11917 -
11918 - # the rest of this file is generated with the following script:
11919 - # # script begin
11920 -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
11921 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp 2011-03-07 18:05:32.000000000 +0000
11922 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp 2011-04-08 10:10:06.000000000 +0000
11923 -@@ -71,7 +71,7 @@
11924 -
11925 - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
11926 -
11927 -- if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then {
11928 -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then {
11929 - run_dump_test p3041
11930 - run_dump_test p3041data
11931 - run_dump_test p3041pcrel
11932 -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
11933 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d 2009-11-11 16:52:56.000000000 +0000
11934 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d 2011-04-08 10:07:10.000000000 +0000
11935 -@@ -1,7 +1,7 @@
11936 - #name: br-isaa.d
11937 - #objdump: -dr
11938 - #as: -march=isaa -pcrel
11939 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
11940 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
11941 -
11942 - .*: file format .*
11943 -
11944 -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
11945 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d 2009-11-11 16:52:56.000000000 +0000
11946 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d 2011-04-08 10:07:10.000000000 +0000
11947 -@@ -1,7 +1,7 @@
11948 - #name: br-isab.d
11949 - #objdump: -dr
11950 - #as: -march=isab -pcrel
11951 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
11952 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
11953 -
11954 - .*: file format .*
11955 -
11956 -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
11957 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d 2009-11-11 16:52:56.000000000 +0000
11958 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d 2011-04-08 10:07:10.000000000 +0000
11959 -@@ -1,7 +1,7 @@
11960 - #name: br-isac.d
11961 - #objdump: -dr
11962 - #as: -march=isac -pcrel
11963 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
11964 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
11965 -
11966 - .*: file format .*
11967 -
11968 -diff -ur --new-file binutils-2.21.51.0.7/include/filenames.h binutils-2.21.51.0.7-mint/include/filenames.h
11969 ---- binutils-2.21.51.0.7/include/filenames.h 2011-03-07 18:05:32.000000000 +0000
11970 -+++ binutils-2.21.51.0.7-mint/include/filenames.h 2011-04-08 10:07:27.000000000 +0000
11971 -@@ -30,7 +30,7 @@
11972 - extern "C" {
11973 - #endif
11974 -
11975 --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
11976 -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__)
11977 - # ifndef HAVE_DOS_BASED_FILE_SYSTEM
11978 - # define HAVE_DOS_BASED_FILE_SYSTEM 1
11979 - # endif
11980 -diff -ur --new-file binutils-2.21.51.0.7/include/getopt.h binutils-2.21.51.0.7-mint/include/getopt.h
11981 ---- binutils-2.21.51.0.7/include/getopt.h 2005-05-10 22:46:48.000000000 +0000
11982 -+++ binutils-2.21.51.0.7-mint/include/getopt.h 2011-04-08 10:07:27.000000000 +0000
11983 -@@ -106,7 +106,7 @@
11984 - to find the declaration so provide a fully prototyped one. If it
11985 - is 1, we found it so don't provide any declaration at all. */
11986 - #if !HAVE_DECL_GETOPT
11987 --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
11988 -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT)
11989 - /* Many other libraries have conflicting prototypes for getopt, with
11990 - differences in the consts, in unistd.h. To avoid compilation
11991 - errors, only prototype getopt for the GNU C library. */
11992 -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.am binutils-2.21.51.0.7-mint/ld/Makefile.am
11993 ---- binutils-2.21.51.0.7/ld/Makefile.am 2011-03-07 18:05:32.000000000 +0000
11994 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.am 2011-04-08 10:07:27.000000000 +0000
11995 -@@ -308,6 +308,7 @@
11996 - em68kelf.c \
11997 - em68kelfnbsd.c \
11998 - em68klinux.c \
11999 -+ em68kmint.c \
12000 - em68knbsd.c \
12001 - em68kpsos.c \
12002 - em88kbcs.c \
12003 -@@ -1319,6 +1320,10 @@
12004 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
12005 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
12006 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
12007 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
12008 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
12009 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
12010 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
12011 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
12012 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
12013 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
12014 -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.in binutils-2.21.51.0.7-mint/ld/Makefile.in
12015 ---- binutils-2.21.51.0.7/ld/Makefile.in 2011-03-07 18:05:32.000000000 +0000
12016 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.in 2011-04-08 10:07:27.000000000 +0000
12017 -@@ -614,6 +614,7 @@
12018 - em68kelf.c \
12019 - em68kelfnbsd.c \
12020 - em68klinux.c \
12021 -+ em68kmint.c \
12022 - em68knbsd.c \
12023 - em68kpsos.c \
12024 - em88kbcs.c \
12025 -@@ -1229,6 +1230,7 @@
12026 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@
12027 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@
12028 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@
12029 -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@
12030 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@
12031 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@
12032 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@
12033 -@@ -2762,6 +2764,10 @@
12034 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
12035 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
12036 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
12037 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
12038 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
12039 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
12040 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
12041 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
12042 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
12043 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
12044 -diff -ur --new-file binutils-2.21.51.0.7/ld/configure binutils-2.21.51.0.7-mint/ld/configure
12045 ---- binutils-2.21.51.0.7/ld/configure 2011-03-07 18:05:32.000000000 +0000
12046 -+++ binutils-2.21.51.0.7-mint/ld/configure 2011-04-08 10:07:28.000000000 +0000
12047 -@@ -16557,7 +16557,7 @@
12048 -
12049 -
12050 - case "${host}" in
12051 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
12052 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
12053 -
12054 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
12055 - ;;
12056 -diff -ur --new-file binutils-2.21.51.0.7/ld/configure.tgt binutils-2.21.51.0.7-mint/ld/configure.tgt
12057 ---- binutils-2.21.51.0.7/ld/configure.tgt 2011-01-04 17:51:04.000000000 +0000
12058 -+++ binutils-2.21.51.0.7-mint/ld/configure.tgt 2011-04-08 10:07:28.000000000 +0000
12059 -@@ -344,6 +344,7 @@
12060 - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
12061 - m68k-*-uclinux*) targ_emul=m68kelf ;;
12062 - m68*-*-gnu*) targ_emul=m68kelf ;;
12063 -+m68*-*-mint*) targ_emul=m68kmint ;;
12064 - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
12065 - targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
12066 - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
12067 -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
12068 ---- binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh 1970-01-01 00:00:00.000000000 +0000
12069 -+++ binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh 2011-04-08 10:07:28.000000000 +0000
12070 -@@ -0,0 +1,6 @@
12071 -+SCRIPT_NAME=m68kmint
12072 -+OUTPUT_FORMAT="a.out-mintprg"
12073 -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big"
12074 -+TEXT_START_ADDR=0xe4
12075 -+ARCH=m68k
12076 -+EXTRA_EM_FILE=mint
12077 -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
12078 ---- binutils-2.21.51.0.7/ld/emultempl/mint.em 1970-01-01 00:00:00.000000000 +0000
12079 -+++ binutils-2.21.51.0.7-mint/ld/emultempl/mint.em 2011-04-08 10:07:28.000000000 +0000
12080 -@@ -0,0 +1,330 @@
12081 -+# This shell script emits a C file. -*- C -*-
12082 -+# Copyright 2006, 2007 Free Software Foundation, Inc.
12083 -+#
12084 -+# This file is part of the GNU Binutils.
12085 -+#
12086 -+# This program is free software; you can redistribute it and/or modify
12087 -+# it under the terms of the GNU General Public License as published by
12088 -+# the Free Software Foundation; either version 3 of the License, or
12089 -+# (at your option) any later version.
12090 -+#
12091 -+# This program is distributed in the hope that it will be useful,
12092 -+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12093 -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12094 -+# GNU General Public License for more details.
12095 -+#
12096 -+# You should have received a copy of the GNU General Public License
12097 -+# along with this program; if not, write to the Free Software
12098 -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
12099 -+# MA 02110-1301, USA.
12100 -+#
12101 -+
12102 -+# This file is sourced from generic.em
12103 -+#
12104 -+fragment <<EOF
12105 -+
12106 -+#include "getopt.h"
12107 -+#include "ldgram.h"
12108 -+
12109 -+/* Standard GEMDOS program flags. */
12110 -+#define _MINT_F_FASTLOAD 0x01 /* Don't clear heap. */
12111 -+#define _MINT_F_ALTLOAD 0x02 /* OK to load in alternate RAM. */
12112 -+#define _MINT_F_ALTALLOC 0x04 /* OK to malloc from alt. RAM. */
12113 -+#define _MINT_F_BESTFIT 0x08 /* Load with optimal heap size. */
12114 -+/* The memory flags are mutually exclusive. */
12115 -+#define _MINT_F_MEMPROTECTION 0xf0 /* Masks out protection bits. */
12116 -+#define _MINT_F_MEMPRIVATE 0x00 /* Memory is private. */
12117 -+#define _MINT_F_MEMGLOBAL 0x10 /* Read/write access to mem allowed. */
12118 -+#define _MINT_F_MEMSUPER 0x20 /* Only supervisor access allowed. */
12119 -+#define _MINT_F_MEMREADABLE 0x30 /* Any read access OK. */
12120 -+#define _MINT_F_SHTEXT 0x800 /* Program's text may be shared */
12121 -+
12122 -+/* Option flags. */
12123 -+static flagword prg_flags = (_MINT_F_FASTLOAD | _MINT_F_ALTLOAD
12124 -+ | _MINT_F_ALTALLOC | _MINT_F_MEMPRIVATE);
12125 -+
12126 -+/* If override_stack_size is TRUE, then the executable stack size
12127 -+ * must be overriden with the value of stack_size. */
12128 -+static bfd_boolean override_stack_size = FALSE;
12129 -+static bfd_signed_vma stack_size;
12130 -+
12131 -+/* MiNT format extra command line options. */
12132 -+
12133 -+/* Used for setting flags in the MiNT header. */
12134 -+#define OPTION_FASTLOAD (300)
12135 -+#define OPTION_NO_FASTLOAD (OPTION_FASTLOAD + 1)
12136 -+#define OPTION_FASTRAM (OPTION_NO_FASTLOAD + 1)
12137 -+#define OPTION_NO_FASTRAM (OPTION_FASTRAM + 1)
12138 -+#define OPTION_FASTALLOC (OPTION_NO_FASTRAM + 1)
12139 -+#define OPTION_NO_FASTALLOC (OPTION_FASTALLOC + 1)
12140 -+#define OPTION_BESTFIT (OPTION_NO_FASTALLOC + 1)
12141 -+#define OPTION_NO_BESTFIT (OPTION_BESTFIT + 1)
12142 -+#define OPTION_BASEREL (OPTION_NO_BESTFIT + 1)
12143 -+#define OPTION_NO_BASEREL (OPTION_BASEREL + 1)
12144 -+#define OPTION_MEM_PRIVATE (OPTION_NO_BASEREL + 1)
12145 -+#define OPTION_MEM_GLOBAL (OPTION_MEM_PRIVATE + 1)
12146 -+#define OPTION_MEM_SUPER (OPTION_MEM_GLOBAL + 1)
12147 -+#define OPTION_MEM_READONLY (OPTION_MEM_SUPER + 1)
12148 -+#define OPTION_PRG_FLAGS (OPTION_MEM_READONLY + 1)
12149 -+#define OPTION_STACK (OPTION_PRG_FLAGS + 1)
12150 -+
12151 -+static void
12152 -+gld${EMULATION_NAME}_add_options
12153 -+ (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
12154 -+ struct option **longopts, int nrl ATTRIBUTE_UNUSED,
12155 -+ struct option **really_longopts ATTRIBUTE_UNUSED)
12156 -+{
12157 -+ static const struct option xtra_long[] = {
12158 -+ {"mfastload", no_argument, NULL, OPTION_FASTLOAD},
12159 -+ {"mno-fastload", no_argument, NULL, OPTION_NO_FASTLOAD},
12160 -+ {"mfastram", no_argument, NULL, OPTION_FASTRAM},
12161 -+ {"mno-fastram", no_argument, NULL, OPTION_NO_FASTRAM},
12162 -+ {"maltram", no_argument, NULL, OPTION_FASTRAM},
12163 -+ {"mno-altram", no_argument, NULL, OPTION_NO_FASTRAM},
12164 -+ {"mfastalloc", no_argument, NULL, OPTION_FASTALLOC},
12165 -+ {"mno-fastalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
12166 -+ {"maltalloc", no_argument, NULL, OPTION_FASTALLOC},
12167 -+ {"mno-altalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
12168 -+ {"mbest-fit", no_argument, NULL, OPTION_BESTFIT},
12169 -+ {"mno-best-fit", no_argument, NULL, OPTION_NO_BESTFIT},
12170 -+ {"mbaserel", no_argument, NULL, OPTION_BASEREL},
12171 -+ {"mno-baserel", no_argument, NULL, OPTION_NO_BASEREL},
12172 -+ {"mshared-text", no_argument, NULL, OPTION_BASEREL},
12173 -+ {"mno-shared-text", no_argument, NULL, OPTION_NO_BASEREL},
12174 -+ {"msharable-text", no_argument, NULL, OPTION_BASEREL},
12175 -+ {"mno-sharable-text", no_argument, NULL, OPTION_NO_BASEREL},
12176 -+ /* Memory protection bits. */
12177 -+ {"mprivate-memory", no_argument, NULL, OPTION_MEM_PRIVATE },
12178 -+ {"mglobal-memory", no_argument, NULL, OPTION_MEM_GLOBAL},
12179 -+ {"msuper-memory", no_argument, NULL, OPTION_MEM_SUPER},
12180 -+ {"mreadable-memory", no_argument, NULL, OPTION_MEM_READONLY},
12181 -+ {"mreadonly-memory", no_argument, NULL, OPTION_MEM_READONLY},
12182 -+ {"mprg-flags", required_argument, NULL, OPTION_PRG_FLAGS},
12183 -+ {"stack", required_argument, NULL, OPTION_STACK},
12184 -+ {NULL, no_argument, NULL, 0}
12185 -+ };
12186 -+
12187 -+ *longopts = (struct option *)
12188 -+ xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
12189 -+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
12190 -+}
12191 -+
12192 -+static bfd_boolean
12193 -+gld${EMULATION_NAME}_handle_option (int optc)
12194 -+{
12195 -+ switch (optc)
12196 -+ {
12197 -+ default:
12198 -+ return FALSE;
12199 -+
12200 -+ case OPTION_FASTLOAD:
12201 -+ prg_flags |= _MINT_F_FASTLOAD;
12202 -+ break;
12203 -+
12204 -+ case OPTION_NO_FASTLOAD:
12205 -+ prg_flags &= ~_MINT_F_FASTLOAD;
12206 -+ break;
12207 -+
12208 -+ case OPTION_FASTRAM:
12209 -+ prg_flags |= _MINT_F_ALTLOAD;
12210 -+ break;
12211 -+
12212 -+ case OPTION_NO_FASTRAM:
12213 -+ prg_flags &= ~_MINT_F_ALTLOAD;
12214 -+ break;
12215 -+
12216 -+ case OPTION_FASTALLOC:
12217 -+ prg_flags |= _MINT_F_ALTALLOC;
12218 -+ break;
12219 -+
12220 -+ case OPTION_NO_FASTALLOC:
12221 -+ prg_flags &= ~_MINT_F_ALTALLOC;
12222 -+ break;
12223 -+
12224 -+ case OPTION_BESTFIT:
12225 -+ prg_flags |= _MINT_F_BESTFIT;
12226 -+ break;
12227 -+
12228 -+ case OPTION_NO_BESTFIT:
12229 -+ prg_flags &= ~_MINT_F_BESTFIT;
12230 -+ break;
12231 -+
12232 -+ case OPTION_BASEREL:
12233 -+ prg_flags |= _MINT_F_SHTEXT;
12234 -+ break;
12235 -+
12236 -+ case OPTION_NO_BASEREL:
12237 -+ prg_flags &= ~_MINT_F_SHTEXT;
12238 -+ break;
12239 -+
12240 -+ case OPTION_MEM_PRIVATE:
12241 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
12242 -+ break;
12243 -+
12244 -+ case OPTION_MEM_GLOBAL:
12245 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
12246 -+ prg_flags |= _MINT_F_MEMPRIVATE;
12247 -+ break;
12248 -+
12249 -+ case OPTION_MEM_SUPER:
12250 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
12251 -+ prg_flags |= _MINT_F_MEMSUPER;
12252 -+ break;
12253 -+
12254 -+ case OPTION_MEM_READONLY:
12255 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
12256 -+ prg_flags |= _MINT_F_MEMREADABLE;
12257 -+ break;
12258 -+
12259 -+ case OPTION_PRG_FLAGS:
12260 -+ {
12261 -+ char* tail;
12262 -+ unsigned long flag_value = strtoul (optarg, &tail, 0);
12263 -+
12264 -+ if (*tail != '\0')
12265 -+ einfo (_("%P: warning: ignoring invalid program flags %s\n"), optarg);
12266 -+ else
12267 -+ prg_flags = flag_value;
12268 -+
12269 -+ break;
12270 -+ }
12271 -+ case OPTION_STACK:
12272 -+ {
12273 -+ char* tail;
12274 -+ long size = strtol (optarg, &tail, 0);
12275 -+
12276 -+ if (*tail == 'K' || *tail == 'k')
12277 -+ {
12278 -+ size *= 1024;
12279 -+ ++tail;
12280 -+ }
12281 -+ else if (*tail == 'M' || *tail == 'm')
12282 -+ {
12283 -+ size *= 1024*1024;
12284 -+ ++tail;
12285 -+ }
12286 -+
12287 -+ if (*tail != '\0')
12288 -+ einfo (_("%P: warning: ignoring invalid stack size %s\n"), optarg);
12289 -+ else
12290 -+ {
12291 -+ stack_size = (bfd_signed_vma) size;
12292 -+ override_stack_size = TRUE;
12293 -+ }
12294 -+
12295 -+ break;
12296 -+ }
12297 -+ }
12298 -+ return TRUE;
12299 -+}
12300 -+
12301 -+/* This callback is called when ld is invoked
12302 -+ with the --help and --target-help options. */
12303 -+
12304 -+static void
12305 -+gld_${EMULATION_NAME}_list_options (FILE *file)
12306 -+{
12307 -+ fprintf (file, _(" --m[no-]fastload Enable/Disable not cleaning the heap on startup\n"));
12308 -+ fprintf (file, _(" --m[no-]altram, --m[no-]fastram\n"));
12309 -+ fprintf (file, _(" Enable/Disable loading into alternate RAM\n"));
12310 -+ fprintf (file, _(" --m[no-]altalloc, --m[no-]fastalloc\n"));
12311 -+ fprintf (file, _(" Enable/Disable malloc from alternate RAM\n"));
12312 -+ fprintf (file, _(" --m[no-]best-fit Enable/Disable loading with optimal heap size\n"));
12313 -+ fprintf (file, _(" --m[no-]sharable-text, --m[no-]shared-text, --m[no-]baserel\n"));
12314 -+ fprintf (file, _(" Enable/Disable sharing the text segment\n"));
12315 -+ fprintf (file, "\n");
12316 -+ fprintf (file, _("The following memory options are mutually exclusive:\n"));
12317 -+ fprintf (file, _(" --mprivate-memory Process memory is not accessible\n"));
12318 -+ fprintf (file, _(" --mglobal-memory Process memory is readable and writable\n"));
12319 -+ fprintf (file, _(" --msuper-memory Process memory is accessible in supervisor mode\n"));
12320 -+ fprintf (file, _(" --mreadonly-memory, --mreadable-memory\n"));
12321 -+ fprintf (file, _(" Process memory is readable but not writable\n"));
12322 -+ fprintf (file, "\n");
12323 -+ fprintf (file, _(" --mprg-flags <value> Set all the flags with an integer raw value\n"));
12324 -+ fprintf (file, _(" --stack <size> Override the stack size (suffix k or M allowed)\n"));
12325 -+}
12326 -+
12327 -+/* This callback is called by lang_for_each_statement. It checks that the
12328 -+ output sections speficied in the linker script are compatible with the MiNT
12329 -+ executable format. */
12330 -+
12331 -+static void
12332 -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s)
12333 -+{
12334 -+ if (s->header.type == lang_output_section_statement_enum)
12335 -+ {
12336 -+ lang_output_section_statement_type *oss = &s->output_section_statement;
12337 -+
12338 -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR})
12339 -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"),
12340 -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma);
12341 -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL)
12342 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
12343 -+ oss->bfd_section);
12344 -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL)
12345 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
12346 -+ oss->bfd_section);
12347 -+ }
12348 -+}
12349 -+
12350 -+/* This callback is called by lang_for_each_statement. It looks for the data
12351 -+ statements of type REL generated by the linker, and adds a TPA relocation
12352 -+ entry for them. This is used by the CONSTRUCTORS list. */
12353 -+
12354 -+static void
12355 -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s)
12356 -+{
12357 -+ if (s->header.type == lang_data_statement_enum)
12358 -+ {
12359 -+ lang_data_statement_type *ds = &s->data_statement;
12360 -+
12361 -+ if (ds->exp->type.node_code == REL)
12362 -+ {
12363 -+ if (ds->type == LONG)
12364 -+ {
12365 -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset;
12366 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address))
12367 -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd);
12368 -+ }
12369 -+ else
12370 -+ {
12371 -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"),
12372 -+ link_info.output_bfd, ds->output_section, ds->output_offset);
12373 -+ }
12374 -+ }
12375 -+ }
12376 -+}
12377 -+
12378 -+/* Final emulation specific call. */
12379 -+
12380 -+static void
12381 -+gld${EMULATION_NAME}_finish (void)
12382 -+{
12383 -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */
12384 -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0)
12385 -+ return;
12386 -+
12387 -+ /* Check the output sections. */
12388 -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections);
12389 -+
12390 -+ /* Set the GEMDOS executable header flags. */
12391 -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags))
12392 -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd);
12393 -+
12394 -+ /* Override the stack size. */
12395 -+ if (override_stack_size)
12396 -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size))
12397 -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd);
12398 -+
12399 -+ /* Generate TPA relocation entries for the data statements. */
12400 -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs);
12401 -+}
12402 -+
12403 -+EOF
12404 -+
12405 -+# Put these extra routines in ld_${EMULATION_NAME}_emulation
12406 -+#
12407 -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options
12408 -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option
12409 -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options
12410 -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
12411 -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
12412 ---- binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc 1970-01-01 00:00:00.000000000 +0000
12413 -+++ binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc 2011-04-08 10:07:28.000000000 +0000
12414 -@@ -0,0 +1,35 @@
12415 -+cat <<EOF
12416 -+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
12417 -+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
12418 -+${RELOCATING+${LIB_SEARCH_DIRS}}
12419 -+SECTIONS
12420 -+{
12421 -+ ${RELOCATING+/* The VMA of the .text section is ${TEXT_START_ADDR} instead of 0
12422 -+ because the extended MiNT header is just before,
12423 -+ at the beginning of the TEXT segment. */}
12424 -+ .text ${RELOCATING+${TEXT_START_ADDR}}:
12425 -+ {
12426 -+ CREATE_OBJECT_SYMBOLS
12427 -+ *(.text)
12428 -+ ${CONSTRUCTING+CONSTRUCTORS}
12429 -+ ${RELOCATING+_etext = .;}
12430 -+ ${RELOCATING+__etext = .;}
12431 -+ }
12432 -+
12433 -+ .data :
12434 -+ {
12435 -+ *(.data)
12436 -+ ${RELOCATING+_edata = .;}
12437 -+ ${RELOCATING+__edata = .;}
12438 -+ }
12439 -+
12440 -+ .bss :
12441 -+ {
12442 -+ ${RELOCATING+__bss_start = .;}
12443 -+ *(.bss)
12444 -+ *(COMMON)
12445 -+ ${RELOCATING+_end = .;}
12446 -+ ${RELOCATING+__end = .;}
12447 -+ }
12448 -+}
12449 -+EOF
12450 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/configure binutils-2.21.51.0.7-mint/libiberty/configure
12451 ---- binutils-2.21.51.0.7/libiberty/configure 2010-12-06 14:24:01.000000000 +0000
12452 -+++ binutils-2.21.51.0.7-mint/libiberty/configure 2011-04-08 10:07:29.000000000 +0000
12453 -@@ -4850,6 +4850,7 @@
12454 - if [ "${shared}" = "yes" ]; then
12455 - case "${host}" in
12456 - *-*-cygwin*) ;;
12457 -+ *-*-mint*) ;;
12458 - alpha*-*-linux*) PICFLAG=-fPIC ;;
12459 - arm*-*-*) PICFLAG=-fPIC ;;
12460 - hppa*-*-*) PICFLAG=-fPIC ;;
12461 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/configure.ac binutils-2.21.51.0.7-mint/libiberty/configure.ac
12462 ---- binutils-2.21.51.0.7/libiberty/configure.ac 2010-12-06 14:24:01.000000000 +0000
12463 -+++ binutils-2.21.51.0.7-mint/libiberty/configure.ac 2011-04-08 10:07:29.000000000 +0000
12464 -@@ -201,6 +201,7 @@
12465 - if [[ "${shared}" = "yes" ]]; then
12466 - case "${host}" in
12467 - *-*-cygwin*) ;;
12468 -+ *-*-mint*) ;;
12469 - alpha*-*-linux*) PICFLAG=-fPIC ;;
12470 - arm*-*-*) PICFLAG=-fPIC ;;
12471 - hppa*-*-*) PICFLAG=-fPIC ;;
12472 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/hex.c binutils-2.21.51.0.7-mint/libiberty/hex.c
12473 ---- binutils-2.21.51.0.7/libiberty/hex.c 2007-03-16 15:48:30.000000000 +0000
12474 -+++ binutils-2.21.51.0.7-mint/libiberty/hex.c 2011-04-08 10:07:28.000000000 +0000
12475 -@@ -24,7 +24,7 @@
12476 - #include "libiberty.h"
12477 - #include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
12478 -
12479 --#if EOF != -1
12480 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
12481 - #error "hex.c requires EOF == -1"
12482 - #endif
12483 -
12484 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/safe-ctype.c binutils-2.21.51.0.7-mint/libiberty/safe-ctype.c
12485 ---- binutils-2.21.51.0.7/libiberty/safe-ctype.c 2005-06-22 20:53:36.000000000 +0000
12486 -+++ binutils-2.21.51.0.7-mint/libiberty/safe-ctype.c 2011-04-08 10:07:28.000000000 +0000
12487 -@@ -119,7 +119,7 @@
12488 - #include <safe-ctype.h>
12489 - #include <stdio.h> /* for EOF */
12490 -
12491 --#if EOF != -1
12492 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
12493 - #error "<safe-ctype.h> requires EOF == -1"
12494 - #endif
12495 -
12496 ---- binutils-2.21.51.0.7/ld/lexsup.c 2011-04-08 15:39:47.000000000 +0000
12497 -+++ binutils-2.21.51.0.7-mint/ld/lexsup.c 2011-04-08 15:39:25.000000000 +0000
12498 -@@ -57,6 +57,9 @@
12499 - #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
12500 - #endif
12501 -
12502 -+/* Report plugin symbols. */
12503 -+bfd_boolean report_plugin_symbols;
12504 -+
12505 - static void set_default_dirlist (char *);
12506 - static void set_section_start (char *, char *);
12507 - static void set_segment_start (const char *, char *);
12508 ---- binutils-2.21.53.0.2/ld/plugin.c 2011-08-05 15:31:17.000000000 +0000
12509 -+++ binutils-2.21.53.0.2-mint/ld/plugin.c 2011-09-20 10:34:17.000000000 +0000
12510 -@@ -37,9 +37,6 @@
12511 - #include <windows.h>
12512 - #endif
12513 -
12514 --/* Report plugin symbols. */
12515 --bfd_boolean report_plugin_symbols;
12516 --
12517 - /* Store plugin intermediate files permanently. */
12518 - bfd_boolean plugin_save_temps;
12519 -
12520
12521 diff --git a/sys-devel/binutils/files/binutils-2.22-mint.patch b/sys-devel/binutils/files/binutils-2.22-mint.patch
12522 deleted file mode 100644
12523 index 4c2442e..0000000
12524 --- a/sys-devel/binutils/files/binutils-2.22-mint.patch
12525 +++ /dev/null
12526 @@ -1,2656 +0,0 @@
12527 -http://bugs.gentoo.org/show_bug.cgi?id=362559
12528 -
12529 -diff -ur --new-file binutils-2.21.51.0.7/bfd/Makefile.am binutils-2.21.51.0.7-mint/bfd/Makefile.am
12530 ---- binutils-2.21.51.0.7/bfd/Makefile.am 2010-12-06 14:23:53.000000000 +0000
12531 -+++ binutils-2.21.51.0.7-mint/bfd/Makefile.am 2011-04-08 10:07:06.000000000 +0000
12532 -@@ -379,6 +379,7 @@
12533 - peigen.lo \
12534 - plugin.lo \
12535 - ppcboot.lo \
12536 -+ prg-mint.lo \
12537 - reloc16.lo \
12538 - riscix.lo \
12539 - som.lo \
12540 -@@ -559,6 +560,7 @@
12541 - pei-sh.c \
12542 - plugin.c \
12543 - ppcboot.c \
12544 -+ prg-mint.c \
12545 - reloc16.c \
12546 - riscix.c \
12547 - som.c \
12548 -diff -ur --new-file binutils-2.21.51.0.7/bfd/Makefile.in binutils-2.21.51.0.7-mint/bfd/Makefile.in
12549 ---- binutils-2.21.51.0.7/bfd/Makefile.in 2010-12-06 14:23:53.000000000 +0000
12550 -+++ binutils-2.21.51.0.7-mint/bfd/Makefile.in 2011-04-08 10:07:06.000000000 +0000
12551 -@@ -679,6 +679,7 @@
12552 - peigen.lo \
12553 - plugin.lo \
12554 - ppcboot.lo \
12555 -+ prg-mint.lo \
12556 - reloc16.lo \
12557 - riscix.lo \
12558 - som.lo \
12559 -@@ -859,6 +860,7 @@
12560 - pei-sh.c \
12561 - plugin.c \
12562 - ppcboot.c \
12563 -+ prg-mint.c \
12564 - reloc16.c \
12565 - riscix.c \
12566 - som.c \
12567 -diff -ur --new-file binutils-2.21.51.0.7/bfd/acinclude.m4 binutils-2.21.51.0.7-mint/bfd/acinclude.m4
12568 ---- binutils-2.21.51.0.7/bfd/acinclude.m4 2009-12-14 15:46:47.000000000 +0000
12569 -+++ binutils-2.21.51.0.7-mint/bfd/acinclude.m4 2011-04-08 10:07:06.000000000 +0000
12570 -@@ -5,7 +5,7 @@
12571 - [AC_REQUIRE([AC_CANONICAL_TARGET])
12572 - case "${host}" in
12573 - changequote(,)dnl
12574 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
12575 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
12576 - changequote([,])dnl
12577 - AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
12578 - esac])dnl
12579 -diff -ur --new-file binutils-2.21.51.0.7/bfd/aoutx.h binutils-2.21.51.0.7-mint/bfd/aoutx.h
12580 ---- binutils-2.21.51.0.7/bfd/aoutx.h 2011-03-07 18:05:31.000000000 +0000
12581 -+++ binutils-2.21.51.0.7-mint/bfd/aoutx.h 2011-04-08 10:07:06.000000000 +0000
12582 -@@ -1841,6 +1841,11 @@
12583 - bfd_byte buffer[BYTES_IN_WORD];
12584 - bfd_size_type amt = BYTES_IN_WORD;
12585 -
12586 -+ /* The MiNT backend writes past the string table. It therefore has to
12587 -+ know about the table size. */
12588 -+ obj_aout_external_string_size (abfd) = _bfd_stringtab_size (tab) +
12589 -+ BYTES_IN_WORD;
12590 -+
12591 - /* The string table starts with the size. */
12592 - PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
12593 - if (bfd_bwrite ((void *) buffer, amt, abfd) != amt)
12594 -@@ -4220,10 +4225,17 @@
12595 - return FALSE;
12596 - }
12597 -
12598 -+#ifdef MY_final_link_relocate_rel
12599 -+ r = MY_final_link_relocate_rel (howto,
12600 -+ input_bfd, input_section,
12601 -+ contents, r_addr, relocation,
12602 -+ (bfd_vma) 0, rel);
12603 -+#else
12604 - r = MY_final_link_relocate (howto,
12605 - input_bfd, input_section,
12606 - contents, r_addr, relocation,
12607 - (bfd_vma) 0);
12608 -+#endif
12609 - }
12610 -
12611 - if (r != bfd_reloc_ok)
12612 -diff -ur --new-file binutils-2.21.51.0.7/bfd/bfd-in.h binutils-2.21.51.0.7-mint/bfd/bfd-in.h
12613 ---- binutils-2.21.51.0.7/bfd/bfd-in.h 2010-11-12 17:32:58.000000000 +0000
12614 -+++ binutils-2.21.51.0.7-mint/bfd/bfd-in.h 2011-04-08 10:07:06.000000000 +0000
12615 -@@ -742,6 +742,15 @@
12616 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
12617 - (bfd *, struct bfd_link_info *);
12618 -
12619 -+/* MiNT executable support routines for the linker. */
12620 -+
12621 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
12622 -+ (bfd *, flagword);
12623 -+extern bfd_boolean bfd_m68kmint_set_stack_size
12624 -+ (bfd *, bfd_signed_vma);
12625 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
12626 -+ (bfd *, bfd_vma);
12627 -+
12628 - /* mmap hacks */
12629 -
12630 - struct _bfd_window_internal;
12631 -diff -ur --new-file binutils-2.21.51.0.7/bfd/bfd-in2.h binutils-2.21.51.0.7-mint/bfd/bfd-in2.h
12632 ---- binutils-2.21.51.0.7/bfd/bfd-in2.h 2011-03-07 18:05:57.000000000 +0000
12633 -+++ binutils-2.21.51.0.7-mint/bfd/bfd-in2.h 2011-04-08 10:07:06.000000000 +0000
12634 -@@ -749,6 +749,15 @@
12635 - extern bfd_boolean bfd_sparclinux_size_dynamic_sections
12636 - (bfd *, struct bfd_link_info *);
12637 -
12638 -+/* MiNT executable support routines for the linker. */
12639 -+
12640 -+extern bfd_boolean bfd_m68kmint_set_extended_flags
12641 -+ (bfd *, flagword);
12642 -+extern bfd_boolean bfd_m68kmint_set_stack_size
12643 -+ (bfd *, bfd_signed_vma);
12644 -+extern bfd_boolean bfd_m68kmint_add_tpa_relocation_entry
12645 -+ (bfd *, bfd_vma);
12646 -+
12647 - /* mmap hacks */
12648 -
12649 - struct _bfd_window_internal;
12650 -diff -ur --new-file binutils-2.21.51.0.7/bfd/config.bfd binutils-2.21.51.0.7-mint/bfd/config.bfd
12651 ---- binutils-2.21.51.0.7/bfd/config.bfd 2011-01-04 17:51:04.000000000 +0000
12652 -+++ binutils-2.21.51.0.7-mint/bfd/config.bfd 2011-04-08 10:07:06.000000000 +0000
12653 -@@ -823,6 +823,11 @@
12654 - # targ_selvecs=m68kmach3_vec
12655 - # targ_cflags=-DSTAT_FOR_EXEC
12656 - ;;
12657 -+ m68*-*-mint*)
12658 -+ targ_defvec=aout0_big_vec
12659 -+ targ_selvecs=m68kmint_prg_vec
12660 -+ targ_underscore=yes
12661 -+ ;;
12662 - m68*-hp*-netbsd*)
12663 - targ_defvec=m68k4knetbsd_vec
12664 - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
12665 -diff -ur --new-file binutils-2.21.51.0.7/bfd/configure binutils-2.21.51.0.7-mint/bfd/configure
12666 ---- binutils-2.21.51.0.7/bfd/configure 2011-03-07 18:05:31.000000000 +0000
12667 -+++ binutils-2.21.51.0.7-mint/bfd/configure 2011-04-08 10:07:07.000000000 +0000
12668 -@@ -13623,7 +13623,7 @@
12669 -
12670 -
12671 - case "${host}" in
12672 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
12673 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
12674 -
12675 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
12676 - ;;
12677 -@@ -15237,6 +15237,7 @@
12678 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
12679 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
12680 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
12681 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
12682 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
12683 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
12684 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
12685 -diff -ur --new-file binutils-2.21.51.0.7/bfd/configure.in binutils-2.21.51.0.7-mint/bfd/configure.in
12686 ---- binutils-2.21.51.0.7/bfd/configure.in 2011-03-07 18:05:31.000000000 +0000
12687 -+++ binutils-2.21.51.0.7-mint/bfd/configure.in 2011-04-08 10:07:07.000000000 +0000
12688 -@@ -880,6 +880,7 @@
12689 - m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
12690 - m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
12691 - m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
12692 -+ m68kmint_prg_vec) tb="$tb prg-mint.lo aout32.lo" ;;
12693 - m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
12694 - m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
12695 - m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
12696 -diff -ur --new-file binutils-2.21.51.0.7/bfd/libaout.h binutils-2.21.51.0.7-mint/bfd/libaout.h
12697 ---- binutils-2.21.51.0.7/bfd/libaout.h 2009-10-09 22:25:42.000000000 +0000
12698 -+++ binutils-2.21.51.0.7-mint/bfd/libaout.h 2011-04-08 10:07:08.000000000 +0000
12699 -@@ -422,6 +422,10 @@
12700 - table, used when linking on SunOS. This is indexed by the symbol
12701 - index. */
12702 - bfd_vma *local_got_offsets;
12703 -+
12704 -+ /* A pointer for data used by aout extensions. (Currently only used
12705 -+ by MiNT executables (see prg-mint.c). */
12706 -+ void *ext;
12707 - };
12708 -
12709 - struct aout_data_struct
12710 -@@ -449,6 +453,7 @@
12711 - #define obj_aout_string_window(bfd) (adata (bfd).string_window)
12712 - #define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
12713 - #define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
12714 -+#define obj_aout_ext(bfd) (adata (bfd).ext)
12715 -
12716 - /* We take the address of the first element of an asymbol to ensure that the
12717 - macro is only ever applied to an asymbol. */
12718 -diff -ur --new-file binutils-2.21.51.0.7/bfd/prg-mint.c binutils-2.21.51.0.7-mint/bfd/prg-mint.c
12719 ---- binutils-2.21.51.0.7/bfd/prg-mint.c 1970-01-01 00:00:00.000000000 +0000
12720 -+++ binutils-2.21.51.0.7-mint/bfd/prg-mint.c 2011-04-08 10:07:08.000000000 +0000
12721 -@@ -0,0 +1,1732 @@
12722 -+/* BFD backend for traditional MiNT executables.
12723 -+ Copyright 1998, 2007, 2008, 2009 Free Software Foundation, Inc.
12724 -+ Originally written by Guido Flohr (guido@××××××××.de).
12725 -+ Modified by Vincent Riviere (vincent.riviere@××××××××.fr).
12726 -+
12727 -+ This file is part of BFD, the Binary File Descriptor library.
12728 -+
12729 -+ This program is free software; you can redistribute it and/or modify
12730 -+ it under the terms of the GNU General Public License as published by
12731 -+ the Free Software Foundation; either version 3 of the License, or
12732 -+ (at your option) any later version.
12733 -+
12734 -+ This program is distributed in the hope that it will be useful,
12735 -+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12736 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12737 -+ GNU General Public License for more details.
12738 -+
12739 -+ You should have received a copy of the GNU General Public License
12740 -+ along with this program; if not, write to the Free Software
12741 -+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
12742 -+ MA 02110-1301, USA. */
12743 -+
12744 -+/* The format of executables on Atari is actually not a.out, it is
12745 -+ only chosen as an approach which comes close enough. The layout of a
12746 -+ program image on disk looked like this:
12747 -+
12748 -+ +-----------------+
12749 -+ | 28 Bytes Header |
12750 -+ +-----------------+
12751 -+ | Text segment |
12752 -+ +-----------------+
12753 -+ | Data segment |
12754 -+ +-----------------+
12755 -+ | BSS |
12756 -+ +-----------------+
12757 -+ | Symbol table |
12758 -+ +-----------------+
12759 -+ | TPA relocation |
12760 -+ +-----------------+
12761 -+
12762 -+ The 28 byte exec header used to look like this:
12763 -+
12764 -+ struct old_exec_header
12765 -+ {
12766 -+ bfd_byte a_magic[2];
12767 -+ bfd_byte a_text[4];
12768 -+ bfd_byte a_data[4];
12769 -+ bfd_byte a_bss[4];
12770 -+ bfd_byte a_syms[4];
12771 -+ bfd_byte a_resvd[4];
12772 -+ bfd_byte a_abs[2];
12773 -+ };
12774 -+
12775 -+ The first two bytes (A_MAGIC) contained an assembler branch
12776 -+ instruction to the beginning of the text segment. Because the
12777 -+ exec header had a fixed size and the text entry point was constant
12778 -+ this assembler instruction also had a constant value (0x601a).
12779 -+ In fact the operating system never really executed the branch
12780 -+ instruction but used this value (0x601a) as a magic value.
12781 -+
12782 -+ TEXT, DATA and BSS were as one would expect them. The symbol
12783 -+ table wasn't. Several different formats were in use, none of them
12784 -+ very efficient, none of them powerful enough to support source
12785 -+ level debugging. I've changed that and the GNU symbol table will
12786 -+ now be used instead (unless the --traditional-format option was
12787 -+ given to the linker).
12788 -+
12789 -+ If the last member A_ABS of the exec header is zero the program
12790 -+ image contains an additional table with relocation information
12791 -+ at the end of the image. The kernel can load program images at
12792 -+ virtually any address in the address space. In fact it will load
12793 -+ it at the start of the biggest block of free memory. This block
12794 -+ is then called the Transient Program Area TPA and the image has
12795 -+ to be relocated against the TPA at runtime. The relocation info
12796 -+ itself is in a simply way compressed: It starts with a four-byte
12797 -+ value, the first address within the image to be relocated. Now
12798 -+ following are one-byte offsets to the last address. The special
12799 -+ value of 1 (which is impossible as an offset) signifies that 254
12800 -+ has to be added to the next offset. The table is finished with
12801 -+ a zero-byte.
12802 -+
12803 -+ I now simply extended the header from its old 28 bytes to 256
12804 -+ bytes. The first 28 bytes give home to a standard Atari header,
12805 -+ the rest is for extensions. The extension header starts with
12806 -+ a ``real'' assembler instruction, a far jump to the text entry
12807 -+ point. The extension header gives home to a standard a.out
12808 -+ exec header (currently NMAGIC) plus some extra
12809 -+ more or less useful fields plus space to future extensions.
12810 -+ For the OS the extension header will already belong to the text
12811 -+ segment, for BFD backends the text segment is 228 (or 0xe4)
12812 -+ bytes smaller than for the OS. This explains for example the
12813 -+ funny TEXT_START_ADDR 0xe4.
12814 -+
12815 -+ The TARGET_PAGE_SIZE is 2 which is only fake. There is currently
12816 -+ no such thing as memory paging on the Atari (and this is why
12817 -+ ZMAGICs are disabled for now to allow for future enhancements).
12818 -+
12819 -+ If you think that this whole file looks quite like a big hack
12820 -+ you're probably right. But the results (mainly the output of
12821 -+ the linker) seem to work and they allow to use up-to-date
12822 -+ binutils on the Atari until a better executable format (maybe
12823 -+ ELF) has been established for this machine. */
12824 -+
12825 -+#include "sysdep.h"
12826 -+#include "bfd.h"
12827 -+
12828 -+#define N_HEADER_IN_TEXT(x) 0
12829 -+#define BYTES_IN_WORD 4
12830 -+#define ENTRY_CAN_BE_ZERO
12831 -+#define N_SHARED_LIB(x) 0
12832 -+#define TEXT_START_ADDR 0xe4
12833 -+#define TARGET_PAGE_SIZE 2
12834 -+#define TARGET_IS_BIG_ENDIAN_P
12835 -+#define DEFAULT_ARCH bfd_arch_m68k
12836 -+#define N_TXTADDR(x) TEXT_START_ADDR
12837 -+
12838 -+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
12839 -+ remove whitespace added here, and thus will fail to concatenate
12840 -+ the tokens. */
12841 -+#define MY(OP) CONCAT2 (m68kmint_prg_,OP)
12842 -+#define TARGETNAME "a.out-mintprg"
12843 -+#define NAME(x,y) CONCAT3 (mintprg,_32_,y)
12844 -+
12845 -+/* We have to do quite a lot of magic to make the Atari format
12846 -+ for GEMDOS executables fit into the standard a.out format.
12847 -+ We start with the original header. */
12848 -+#define external_exec mint_external_exec
12849 -+struct mint_external_exec
12850 -+{
12851 -+ bfd_byte g_branch[2]; /* 0x601a. */
12852 -+ bfd_byte g_text[4]; /* Length of text section. */
12853 -+ bfd_byte g_data[4]; /* Length of data section. */
12854 -+ bfd_byte g_bss[4]; /* Length of bss section. */
12855 -+ bfd_byte g_syms[4]; /* Length of symbol table. */
12856 -+ bfd_byte g_extmagic[4]; /* Always 0x4d694e54
12857 -+ (in ASCII: ``MiNT''). */
12858 -+ bfd_byte g_flags[4]; /* Atari special flags. */
12859 -+ bfd_byte g_abs[2]; /* Non-zero if absolute (no relocation
12860 -+ info. */
12861 -+
12862 -+ /* We extend this header now to provide the information that the
12863 -+ binutils want to see. Everything following will actually be part
12864 -+ of the text segment (from MiNT's point of view). As a
12865 -+ consequence the text section has 228 bytes of redundancy.
12866 -+
12867 -+ The following eight bytes should be treated as opaque.
12868 -+ If the word ``opaque'' always attracts your curiosity in
12869 -+ typedefs and structs, here's the explanation: These eight bytes
12870 -+ are really two assembler instructions. The first one moves
12871 -+ the contents of e_entry into register d0, the second one
12872 -+ jumps (pc-relative) to the entry point. See swap_exec_header_out
12873 -+ for details. */
12874 -+ bfd_byte g_jump_entry[8];
12875 -+
12876 -+ /* Now following a standard a.out header. Note that the values
12877 -+ may differ from the one given on top. The traditional header
12878 -+ contains the values that the OS wants to see, the values below
12879 -+ are the values that make the binutils work. */
12880 -+ bfd_byte e_info[4]; /* Magic number and stuff. */
12881 -+ bfd_byte e_text[4]; /* Length of text section in bytes. */
12882 -+ bfd_byte e_data[4]; /* Length of data section. */
12883 -+ bfd_byte e_bss[4]; /* Length of standard symbol
12884 -+ table. */
12885 -+ bfd_byte e_syms[4]; /* Length of symbol table. */
12886 -+ bfd_byte e_entry[4]; /* Start address. */
12887 -+ bfd_byte e_trsize[4]; /* Length of text relocation
12888 -+ info. */
12889 -+ bfd_byte e_drsize[4]; /* Length of data relocation
12890 -+ info. */
12891 -+
12892 -+ bfd_byte g_tparel_pos[4]; /* File position of TPA relative
12893 -+ relocation info. */
12894 -+ bfd_byte g_tparel_size[4]; /* Length of TPA relative relocation
12895 -+ info. */
12896 -+
12897 -+ /* This is for extensions. */
12898 -+ bfd_byte g_stkpos[4]; /* If stacksize is hardcoded into
12899 -+ the executable you will find it
12900 -+ at file offset g_stkpos. If
12901 -+ not this is NULL. */
12902 -+
12903 -+ bfd_byte g_symbol_format[4]; /* Format of the symbol table. See
12904 -+ definitions for _MINT_SYMBOL_FORMAT*
12905 -+ above. */
12906 -+
12907 -+ /* Pad with zeros. */
12908 -+ bfd_byte g_pad0[172];
12909 -+};
12910 -+#define EXEC_BYTES_SIZE 256
12911 -+#define GEMDOS_HEADER_SIZE 28
12912 -+
12913 -+/* The following defines are required by aoutx.h.
12914 -+ They are not automatically defined in aout/aout64.h
12915 -+ if external_exec is defined. */
12916 -+
12917 -+#define OMAGIC 0407 /* Object file or impure executable. */
12918 -+#define NMAGIC 0410 /* Code indicating pure executable. */
12919 -+#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
12920 -+#define BMAGIC 0415 /* Used by a b.out object. */
12921 -+#define QMAGIC 0314 /* Like ZMAGIC but with N_HEADER_IN_TEXT true. */
12922 -+
12923 -+/* Files using the following magic flags will not be loaded. */
12924 -+#define N_BADMAG(x) (N_MAGIC(x) != NMAGIC)
12925 -+
12926 -+/* For DRI symbol table format. */
12927 -+struct dri_symbol
12928 -+{
12929 -+ bfd_byte a_name[8]; /* Symbol name */
12930 -+ bfd_byte a_type[2]; /* Type flag, i.e. A_TEXT etc; see below. */
12931 -+ bfd_byte a_value[4]; /* value of this symbol (or sdb offset). */
12932 -+};
12933 -+#define DRI_SYMBOL_SIZE 14
12934 -+
12935 -+/* Simple values for a_type. */
12936 -+#define A_UNDF 0
12937 -+#define A_BSS 0x0100
12938 -+#define A_TEXT 0x0200
12939 -+#define A_DATA 0x0400
12940 -+#define A_EXT 0x0800 /* External. */
12941 -+#define A_EQREG 0x1000 /* Equated register. */
12942 -+#define A_GLOBL 0x2000 /* Global. */
12943 -+#define A_EQU 0x4000 /* Equated. */
12944 -+#define A_DEF 0x8000 /* Defined. */
12945 -+#define A_LNAM 0x0048 /* GST compatible long name. */
12946 -+ /* File symbols ala aln. */
12947 -+#define A_TFILE 0x0280 /* Text file corresponding to object module. */
12948 -+#define A_TFARC 0x02C0 /* Text file archive. Unfortunately this
12949 -+ conflicts with the bits in A_LNAM. */
12950 -+
12951 -+/* The following include contains the definitions for internal a.out structures
12952 -+ as well as the prototypes for the NAME(...) functions defined in aoutx.h. */
12953 -+
12954 -+#include "libaout.h"
12955 -+
12956 -+/* The following function is similar to _bfd_final_link_relocate, except it
12957 -+ adds the reloc structure as an additional parameter.
12958 -+ It will be used int aoutx.h. */
12959 -+
12960 -+static bfd_reloc_status_type
12961 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
12962 -+ bfd *input_bfd,
12963 -+ asection *input_section,
12964 -+ bfd_byte *contents,
12965 -+ bfd_vma address,
12966 -+ bfd_vma value,
12967 -+ bfd_vma addend,
12968 -+ struct reloc_std_external *rel);
12969 -+
12970 -+#define MY_final_link_relocate_rel m68kmint_prg_final_link_relocate_rel
12971 -+
12972 -+/* The following include contains the definitions for the NAME(...) functions. */
12973 -+
12974 -+#include "aoutx.h"
12975 -+
12976 -+/* Data structure that holds some private information for us. */
12977 -+struct mint_internal_info
12978 -+{
12979 -+ struct bfd_link_info *linkinfo; /* Remembered from final_link. */
12980 -+ bfd_boolean traditional_format; /* Saved from link info. */
12981 -+ int symbol_format; /* Format of the symbol table. */
12982 -+ void *tparel; /* Data for TPA relative relocation
12983 -+ information. */
12984 -+ file_ptr tparel_pos; /* File position of TPA relative
12985 -+ relocation information. */
12986 -+ bfd_size_type tparel_size; /* Size of TPA relative relocation
12987 -+ information. */
12988 -+ bfd_size_type dri_symtab_size; /* Size of traditional symbol table. */
12989 -+
12990 -+#define MINT_RELOC_CHUNKSIZE 0x1000
12991 -+ bfd_vma *relocs; /* Array of address relocations. */
12992 -+ unsigned long relocs_used; /* Number of relocation entries
12993 -+ already used up. */
12994 -+ unsigned long relocs_allocated; /* Number of relocation entries
12995 -+ allocated. */
12996 -+
12997 -+ bfd_vma stkpos; /* File offset to value of _stksize. */
12998 -+
12999 -+ flagword prg_flags; /* Standard GEMDOS flags. */
13000 -+
13001 -+ bfd_boolean override_stack_size; /* TRUE if the executable stack size
13002 -+ must be overriden with stack_size. */
13003 -+ bfd_signed_vma stack_size;
13004 -+
13005 -+ bfd_boolean reloc_error; /* TRUE if an unhandled error during
13006 -+ relocation occured. */
13007 -+};
13008 -+
13009 -+/* If --traditional-format was given to the linker an old-style DRI
13010 -+ symbol table is written into the executable. This is with respect
13011 -+ to many old debugging tools or disassemblers which expect this format.
13012 -+ Although created by the linker, these symbols will be ignored from
13013 -+ input files. */
13014 -+#define _MINT_SYMBOL_FORMAT_GNU 0
13015 -+#define _MINT_SYMBOL_FORMAT_DRI 1
13016 -+
13017 -+/* Declarations for the variables and functions
13018 -+ defined later in aout-target.h. */
13019 -+
13020 -+static const bfd_target *
13021 -+m68kmint_prg_callback (bfd *abfd);
13022 -+
13023 -+static void
13024 -+MY_final_link_callback (bfd *abfd,
13025 -+ file_ptr *ptreloff,
13026 -+ file_ptr *pdreloff,
13027 -+ file_ptr *psymoff);
13028 -+
13029 -+extern const bfd_target m68kmint_prg_vec;
13030 -+
13031 -+/* Initialize a new BFD using our file format. */
13032 -+
13033 -+#define MY_mkobject m68kmint_prg_mkobject
13034 -+
13035 -+static bfd_boolean
13036 -+m68kmint_prg_mkobject (bfd *abfd)
13037 -+{
13038 -+ struct mint_internal_info *myinfo;
13039 -+
13040 -+ if (!NAME (aout, mkobject (abfd)))
13041 -+ return FALSE;
13042 -+
13043 -+ /* Allocate our private BFD data. */
13044 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
13045 -+ if (myinfo == NULL)
13046 -+ return FALSE;
13047 -+ obj_aout_ext (abfd) = myinfo;
13048 -+
13049 -+ return TRUE;
13050 -+}
13051 -+
13052 -+/* Finish up the reading of an a.out file header. */
13053 -+
13054 -+#define MY_object_p m68kmint_prg_object_p
13055 -+
13056 -+static const bfd_target *
13057 -+m68kmint_prg_object_p (bfd *abfd)
13058 -+{
13059 -+ struct external_exec exec_bytes; /* Raw exec header from file. */
13060 -+ struct internal_exec exec; /* Cleaned-up exec header. */
13061 -+ const bfd_target *target;
13062 -+ bfd_size_type amt = EXEC_BYTES_SIZE;
13063 -+ struct mint_internal_info *myinfo;
13064 -+
13065 -+ /* Read the exec bytesd from the file. */
13066 -+ if (bfd_bread (&exec_bytes, amt, abfd) != amt)
13067 -+ {
13068 -+ if (bfd_get_error () != bfd_error_system_call)
13069 -+ bfd_set_error (bfd_error_wrong_format);
13070 -+ return NULL;
13071 -+ }
13072 -+
13073 -+ /* Instead of byte-swapping we compare bytes. */
13074 -+ if (exec_bytes.g_branch[0] != 0x60
13075 -+ || exec_bytes.g_branch[1] != 0x1a
13076 -+ || exec_bytes.g_extmagic[0] != 'M'
13077 -+ || exec_bytes.g_extmagic[1] != 'i'
13078 -+ || exec_bytes.g_extmagic[2] != 'N'
13079 -+ || exec_bytes.g_extmagic[3] != 'T')
13080 -+ {
13081 -+ bfd_set_error (bfd_error_wrong_format);
13082 -+ return NULL;
13083 -+ }
13084 -+
13085 -+ /* Swap the standard a.out fields. */
13086 -+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
13087 -+
13088 -+ /* Check a.out magic value. */
13089 -+ if (N_BADMAG (exec))
13090 -+ {
13091 -+ bfd_set_error (bfd_error_wrong_format);
13092 -+ return NULL;
13093 -+ }
13094 -+
13095 -+ /* Initialize this BFD with the exec values. */
13096 -+ target = NAME (aout, some_aout_object_p) (abfd, &exec, m68kmint_prg_callback);
13097 -+
13098 -+ /* Allocate our private BFD data. */
13099 -+ myinfo = bfd_zalloc (abfd, sizeof (*myinfo));
13100 -+ if (myinfo == NULL)
13101 -+ return NULL;
13102 -+ obj_aout_ext (abfd) = myinfo;
13103 -+
13104 -+ /* Now get the missing information. */
13105 -+ myinfo->prg_flags = bfd_h_get_32 (abfd, exec_bytes.g_flags);
13106 -+ myinfo->stkpos = bfd_h_get_32 (abfd, exec_bytes.g_stkpos);
13107 -+ myinfo->symbol_format = bfd_h_get_32 (abfd, exec_bytes.g_symbol_format);
13108 -+
13109 -+ /* TPA relocation information. */
13110 -+ myinfo->tparel_pos = bfd_h_get_32 (abfd, exec_bytes.g_tparel_pos);
13111 -+ myinfo->tparel_size = bfd_h_get_32 (abfd, exec_bytes.g_tparel_size);
13112 -+
13113 -+ /* FIXME: Currently we always read the TPA relative relocation
13114 -+ information. This is suboptimal because often times there
13115 -+ is no need for it. Read it only if need be! Maybe this should
13116 -+ also depend on abfd->cacheable? */
13117 -+ if (myinfo->tparel_size == 0)
13118 -+ myinfo->tparel = bfd_zalloc (abfd, 4);
13119 -+ else
13120 -+ myinfo->tparel = bfd_alloc (abfd, myinfo->tparel_size);
13121 -+
13122 -+ if (myinfo->tparel == NULL)
13123 -+ return NULL;
13124 -+
13125 -+ if (myinfo->tparel_size == 0)
13126 -+ {
13127 -+ myinfo->tparel_size = 4;
13128 -+ }
13129 -+ else
13130 -+ {
13131 -+ /* Read the information from the bfd. */
13132 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0
13133 -+ || (bfd_bread (myinfo->tparel, myinfo->tparel_size, abfd)
13134 -+ != myinfo->tparel_size))
13135 -+ return NULL;
13136 -+ }
13137 -+
13138 -+ return target;
13139 -+}
13140 -+
13141 -+/* Free all information we have cached for this BFD. We can always
13142 -+ read it again later if we need it. */
13143 -+
13144 -+#define MY_bfd_free_cached_info m68kmint_prg_bfd_free_cached_info
13145 -+
13146 -+static bfd_boolean
13147 -+m68kmint_prg_bfd_free_cached_info (bfd *abfd)
13148 -+{
13149 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
13150 -+
13151 -+ if (myinfo != NULL && myinfo->relocs != NULL)
13152 -+ {
13153 -+ free (myinfo->relocs);
13154 -+ myinfo->relocs = NULL;
13155 -+ }
13156 -+
13157 -+ /* myinfo itself has been allocated by bfd_zalloc()
13158 -+ so will be automatically freed along with the BFD.
13159 -+ Same for myinfo->tparel. */
13160 -+
13161 -+ return NAME (aout, bfd_free_cached_info) (abfd);
13162 -+}
13163 -+
13164 -+/* Write a DRI symbol with TYPE and VALUE. If the NAME of the
13165 -+ symbol exceeds 8 characters write a long symbol. If it
13166 -+ exceeds 22 characters truncate the name. */
13167 -+
13168 -+static int
13169 -+write_dri_symbol (bfd *abfd, const char *name, int type, bfd_vma value)
13170 -+{
13171 -+ int written_bytes = 0;
13172 -+ struct dri_symbol sym;
13173 -+ int is_long_name = strlen (name) > sizeof (sym.a_name);
13174 -+
13175 -+ if (is_long_name)
13176 -+ type |= A_LNAM;
13177 -+
13178 -+ strncpy ((char*)sym.a_name, name, sizeof (sym.a_name));
13179 -+ bfd_put_16 (abfd, type, sym.a_type);
13180 -+ bfd_put_32 (abfd, value, sym.a_value);
13181 -+
13182 -+ if (bfd_bwrite (&sym, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
13183 -+ return -1;
13184 -+ written_bytes += DRI_SYMBOL_SIZE;
13185 -+
13186 -+ if (is_long_name)
13187 -+ {
13188 -+ char more_name[DRI_SYMBOL_SIZE];
13189 -+
13190 -+ strncpy (more_name, name + sizeof (sym.a_name), DRI_SYMBOL_SIZE);
13191 -+
13192 -+ if (bfd_bwrite (more_name, DRI_SYMBOL_SIZE, abfd) != DRI_SYMBOL_SIZE)
13193 -+ return -1;
13194 -+ written_bytes += DRI_SYMBOL_SIZE;
13195 -+ }
13196 -+
13197 -+ return written_bytes;
13198 -+}
13199 -+
13200 -+/* Emit a traditional DRI symbol table while linking.
13201 -+ Most of this code comes from aout_link_write_symbols() in aoutx.h. */
13202 -+
13203 -+static bfd_boolean
13204 -+link_write_traditional_syms (bfd *abfd, struct bfd_link_info *info)
13205 -+{
13206 -+ bfd *input_bfd;
13207 -+ enum bfd_link_strip strip = info->strip;
13208 -+ enum bfd_link_discard discard = info->discard;
13209 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
13210 -+ bfd *last_archive = NULL;
13211 -+
13212 -+ /* Position file pointer. */
13213 -+ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
13214 -+ return FALSE;
13215 -+
13216 -+ myinfo->dri_symtab_size = 0;
13217 -+
13218 -+ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link_next)
13219 -+ {
13220 -+ bfd_size_type sym_count = obj_aout_external_sym_count (input_bfd);
13221 -+ char *strings = obj_aout_external_strings (input_bfd);
13222 -+ struct external_nlist *sym = obj_aout_external_syms (input_bfd);
13223 -+ struct external_nlist *sym_end = sym + sym_count;
13224 -+ struct aout_link_hash_entry **sym_hash = obj_aout_sym_hashes (input_bfd);
13225 -+ bfd_boolean pass = FALSE;
13226 -+ bfd_boolean skip = FALSE;
13227 -+ bfd_boolean skip_next = FALSE;
13228 -+ int written_bytes;
13229 -+ int a_type;
13230 -+ bfd_boolean write_archive_name = FALSE;
13231 -+ bfd_vma val = 0;
13232 -+
13233 -+ /* First write out a symbol for the archive if we do not
13234 -+ strip these symbols and if it differs from the last
13235 -+ one. */
13236 -+ if (input_bfd->my_archive != last_archive
13237 -+ && input_bfd->my_archive != NULL)
13238 -+ {
13239 -+ write_archive_name = TRUE;
13240 -+ last_archive = input_bfd->my_archive;
13241 -+ }
13242 -+
13243 -+ if (write_archive_name
13244 -+ && strip != strip_all
13245 -+ && (strip != strip_some
13246 -+ || bfd_hash_lookup (info->keep_hash,
13247 -+ input_bfd->my_archive->filename,
13248 -+ FALSE, FALSE) != NULL)
13249 -+ && discard != discard_all)
13250 -+ {
13251 -+ val = bfd_get_section_vma (abfd,
13252 -+ obj_textsec (input_bfd)->output_section)
13253 -+ + obj_textsec (input_bfd)->output_offset;
13254 -+
13255 -+ written_bytes = write_dri_symbol (abfd,
13256 -+ input_bfd->my_archive->filename,
13257 -+ A_TFILE, val);
13258 -+
13259 -+ if (written_bytes < 0)
13260 -+ return FALSE;
13261 -+ else
13262 -+ myinfo->dri_symtab_size += written_bytes;
13263 -+ }
13264 -+
13265 -+ /* Now write out a symbol for the object file if we do not
13266 -+ strip these symbols. */
13267 -+ if (strip != strip_all
13268 -+ && (strip != strip_some
13269 -+ || bfd_hash_lookup (info->keep_hash, input_bfd->filename,
13270 -+ FALSE, FALSE) != NULL)
13271 -+ && discard != discard_all)
13272 -+ {
13273 -+ val = bfd_get_section_vma (abfd,
13274 -+ obj_textsec (input_bfd)->output_section)
13275 -+ + obj_textsec (input_bfd)->output_offset;
13276 -+
13277 -+ written_bytes = write_dri_symbol (abfd, input_bfd->filename,
13278 -+ A_TFILE, val);
13279 -+ if (written_bytes < 0)
13280 -+ return FALSE;
13281 -+ else
13282 -+ myinfo->dri_symtab_size += written_bytes;
13283 -+ }
13284 -+
13285 -+ /* Now we have a problem. All symbols that we see have already
13286 -+ been marked written (because we write them a second time
13287 -+ here. If we would do it the clean way we would have
13288 -+ to traverse the entire symbol map and reset the written
13289 -+ flag. We hack here instead... */
13290 -+#define mark_written(h) (* (int *) &h->written = (int) TRUE + 1)
13291 -+#define is_written(h) ((int) h->written == (int) TRUE + 1)
13292 -+ for (; sym < sym_end; sym++, sym_hash++)
13293 -+ {
13294 -+ const char *name;
13295 -+ int type;
13296 -+ struct aout_link_hash_entry *h;
13297 -+ asection *symsec;
13298 -+ val = 0;
13299 -+
13300 -+ type = H_GET_8 (input_bfd, sym->e_type);
13301 -+ name = strings + GET_WORD (input_bfd, sym->e_strx);
13302 -+
13303 -+ h = NULL;
13304 -+
13305 -+ if (pass)
13306 -+ {
13307 -+ /* Pass this symbol through. It is the target of an
13308 -+ indirect or warning symbol. */
13309 -+ val = GET_WORD (input_bfd, sym->e_value);
13310 -+ pass = FALSE;
13311 -+ }
13312 -+ else if (skip_next)
13313 -+ {
13314 -+ /* Skip this symbol, which is the target of an indirect
13315 -+ symbol that we have changed to no longer be an indirect
13316 -+ symbol. */
13317 -+ skip_next = FALSE;
13318 -+ continue;
13319 -+ }
13320 -+ else
13321 -+ {
13322 -+ struct aout_link_hash_entry *hresolve = *sym_hash;
13323 -+
13324 -+ /* We have saved the hash table entry for this symbol, if
13325 -+ there is one. Note that we could just look it up again
13326 -+ in the hash table, provided we first check that it is an
13327 -+ external symbol. */
13328 -+ h = *sym_hash;
13329 -+
13330 -+ /* Use the name from the hash table, in case the symbol was
13331 -+ wrapped. */
13332 -+ if (h != NULL
13333 -+ && h->root.type != bfd_link_hash_warning)
13334 -+ name = h->root.root.string;
13335 -+
13336 -+ /* If this is an indirect or warning symbol, then change
13337 -+ hresolve to the base symbol. */
13338 -+ hresolve = h;
13339 -+ if (h != (struct aout_link_hash_entry *) NULL
13340 -+ && (h->root.type == bfd_link_hash_indirect
13341 -+ || h->root.type == bfd_link_hash_warning))
13342 -+ {
13343 -+ hresolve = (struct aout_link_hash_entry*) h->root.u.i.link;
13344 -+ while (hresolve->root.type == bfd_link_hash_indirect
13345 -+ || hresolve->root.type == bfd_link_hash_warning)
13346 -+ hresolve = ((struct aout_link_hash_entry*)
13347 -+ hresolve->root.u.i.link);
13348 -+ }
13349 -+
13350 -+ /* If the symbol has already been written out skip it. */
13351 -+ if (h != NULL
13352 -+ && is_written (h))
13353 -+ {
13354 -+ if ((type & N_TYPE) == N_INDR
13355 -+ || type == N_WARNING)
13356 -+ skip_next = TRUE;
13357 -+ continue;
13358 -+ }
13359 -+
13360 -+ /* See if we are stripping this symbol. */
13361 -+ skip = FALSE;
13362 -+
13363 -+ /* Skip all debugger symbols. No way to output them in
13364 -+ DRI format. This will also reduce a lot of headaches. */
13365 -+ if ((type & N_STAB) != 0)
13366 -+ skip = TRUE;
13367 -+
13368 -+ switch (strip)
13369 -+ {
13370 -+ case strip_none:
13371 -+ case strip_debugger:
13372 -+ break;
13373 -+ case strip_some:
13374 -+ if (bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE)
13375 -+ == NULL)
13376 -+ skip = TRUE;
13377 -+ break;
13378 -+ case strip_all:
13379 -+ skip = TRUE;
13380 -+ break;
13381 -+ }
13382 -+
13383 -+ if (skip)
13384 -+ {
13385 -+ if (h != NULL)
13386 -+ mark_written (h);
13387 -+ continue;
13388 -+ }
13389 -+
13390 -+ /* Get the value of the symbol. */
13391 -+ if ((type & N_TYPE) == N_TEXT
13392 -+ || type == N_WEAKT)
13393 -+ symsec = obj_textsec (input_bfd);
13394 -+ else if ((type & N_TYPE) == N_DATA
13395 -+ || type == N_WEAKD)
13396 -+ symsec = obj_datasec (input_bfd);
13397 -+ else if ((type & N_TYPE) == N_BSS
13398 -+ || type == N_WEAKB)
13399 -+ symsec = obj_bsssec (input_bfd);
13400 -+ else if ((type & N_TYPE) == N_ABS
13401 -+ || type == N_WEAKA)
13402 -+ symsec = bfd_abs_section_ptr;
13403 -+ else if (((type & N_TYPE) == N_INDR
13404 -+ && (hresolve == NULL
13405 -+ || (hresolve->root.type != bfd_link_hash_defined
13406 -+ && hresolve->root.type != bfd_link_hash_defweak
13407 -+ && hresolve->root.type != bfd_link_hash_common)))
13408 -+ || type == N_WARNING)
13409 -+ {
13410 -+ /* Pass the next symbol through unchanged. The
13411 -+ condition above for indirect symbols is so that if
13412 -+ the indirect symbol was defined, we output it with
13413 -+ the correct definition so the debugger will
13414 -+ understand it. */
13415 -+ pass = TRUE;
13416 -+ val = GET_WORD (input_bfd, sym->e_value);
13417 -+ symsec = NULL;
13418 -+ }
13419 -+ else
13420 -+ {
13421 -+ /* If we get here with an indirect symbol, it means that
13422 -+ we are outputting it with a real definition. In such
13423 -+ a case we do not want to output the next symbol,
13424 -+ which is the target of the indirection. */
13425 -+ if ((type & N_TYPE) == N_INDR)
13426 -+ skip_next = TRUE;
13427 -+
13428 -+ symsec = NULL;
13429 -+
13430 -+ /* We need to get the value from the hash table. We use
13431 -+ hresolve so that if we have defined an indirect
13432 -+ symbol we output the final definition. */
13433 -+ if (h == NULL)
13434 -+ {
13435 -+ switch (type & N_TYPE)
13436 -+ {
13437 -+ case N_SETT:
13438 -+ symsec = obj_textsec (input_bfd);
13439 -+ break;
13440 -+ case N_SETD:
13441 -+ symsec = obj_datasec (input_bfd);
13442 -+ break;
13443 -+ case N_SETB:
13444 -+ symsec = obj_bsssec (input_bfd);
13445 -+ break;
13446 -+ case N_SETA:
13447 -+ symsec = bfd_abs_section_ptr;
13448 -+ break;
13449 -+ default:
13450 -+ val = 0;
13451 -+ break;
13452 -+ }
13453 -+ }
13454 -+ else if (hresolve->root.type == bfd_link_hash_defined
13455 -+ || hresolve->root.type == bfd_link_hash_defweak)
13456 -+ {
13457 -+ asection *input_section;
13458 -+ asection *output_section;
13459 -+
13460 -+ /* This case usually means a common symbol which was
13461 -+ turned into a defined symbol. */
13462 -+ input_section = hresolve->root.u.def.section;
13463 -+ output_section = input_section->output_section;
13464 -+ BFD_ASSERT (bfd_is_abs_section (output_section)
13465 -+ || output_section->owner == abfd);
13466 -+
13467 -+ /* The following reference to the output section VMA
13468 -+ is commented out because DRI symbols are relative
13469 -+ to the beginning of the section. */
13470 -+ val = (hresolve->root.u.def.value
13471 -+ /*+ bfd_get_section_vma (abfd, output_section)*/
13472 -+ + input_section->output_offset);
13473 -+
13474 -+ /* TEXT symbols values must be adjusted
13475 -+ by adding the size of the extended header. */
13476 -+ if (output_section == obj_textsec (abfd))
13477 -+ val += TEXT_START_ADDR;
13478 -+
13479 -+ /* Get the correct type based on the section. If
13480 -+ this is a constructed set, force it to be
13481 -+ globally visible. */
13482 -+ if (type == N_SETT
13483 -+ || type == N_SETD
13484 -+ || type == N_SETB
13485 -+ || type == N_SETA)
13486 -+ type |= N_EXT;
13487 -+
13488 -+ type &=~ N_TYPE;
13489 -+
13490 -+ if (output_section == obj_textsec (abfd))
13491 -+ type |= N_TEXT;
13492 -+ else if (output_section == obj_datasec (abfd))
13493 -+ type |= N_DATA;
13494 -+ else if (output_section == obj_bsssec (abfd))
13495 -+ type |= N_BSS;
13496 -+ else
13497 -+ type |= N_ABS;
13498 -+ }
13499 -+ else if (hresolve->root.type == bfd_link_hash_common)
13500 -+ val = hresolve->root.u.c.size;
13501 -+ else if (hresolve->root.type == bfd_link_hash_undefweak)
13502 -+ {
13503 -+ val = 0;
13504 -+ type = N_UNDF;
13505 -+ }
13506 -+ else
13507 -+ val = 0;
13508 -+ }
13509 -+ if (symsec != NULL)
13510 -+ {
13511 -+ /* The following reference to the output section VMA
13512 -+ is commented out because DRI symbols are relative
13513 -+ to the beginning of the section. */
13514 -+ val = (/*symsec->output_section->vma
13515 -+ +*/ symsec->output_offset
13516 -+ + (GET_WORD (input_bfd, sym->e_value)
13517 -+ - symsec->vma));
13518 -+
13519 -+ /* TEXT symbols values must be adjusted
13520 -+ by adding the size of the extended header. */
13521 -+ if (symsec == obj_textsec (input_bfd))
13522 -+ val += TEXT_START_ADDR;
13523 -+ }
13524 -+
13525 -+ /* If this is a global symbol set the written flag, and if
13526 -+ it is a local symbol see if we should discard it. */
13527 -+ if (h != NULL)
13528 -+ {
13529 -+ mark_written (h);
13530 -+ }
13531 -+ else if ((type & N_TYPE) != N_SETT
13532 -+ && (type & N_TYPE) != N_SETD
13533 -+ && (type & N_TYPE) != N_SETB
13534 -+ && (type & N_TYPE) != N_SETA)
13535 -+ {
13536 -+ switch (discard)
13537 -+ {
13538 -+ case discard_none:
13539 -+ case discard_sec_merge:
13540 -+ break;
13541 -+ case discard_l:
13542 -+ if (bfd_is_local_label_name (input_bfd, name))
13543 -+ skip = TRUE;
13544 -+ break;
13545 -+ default:
13546 -+ case discard_all:
13547 -+ skip = TRUE;
13548 -+ break;
13549 -+ }
13550 -+ if (skip)
13551 -+ {
13552 -+ pass = FALSE;
13553 -+ continue;
13554 -+ }
13555 -+ }
13556 -+ }
13557 -+
13558 -+ /* Now find the nearest type in DRI format. */
13559 -+ switch (type)
13560 -+ {
13561 -+ case N_ABS:
13562 -+ case N_ABS | N_EXT:
13563 -+ case N_SETA:
13564 -+ case N_SETA | N_EXT:
13565 -+ case N_WEAKA:
13566 -+ a_type = A_EQU | A_DEF | A_GLOBL;
13567 -+ break;
13568 -+ case N_TEXT:
13569 -+ case N_TEXT | N_EXT:
13570 -+ case N_SETT:
13571 -+ case N_SETT | N_EXT:
13572 -+ case N_WEAKT:
13573 -+ a_type = A_TEXT | A_DEF | A_GLOBL;
13574 -+ break;
13575 -+ case N_DATA:
13576 -+ case N_DATA | N_EXT:
13577 -+ case N_SETD:
13578 -+ case N_SETD | N_EXT:
13579 -+ case N_WEAKD:
13580 -+ a_type = A_DATA | A_DEF | A_GLOBL;
13581 -+ break;
13582 -+ case N_BSS:
13583 -+ case N_BSS | N_EXT:
13584 -+ case N_SETB:
13585 -+ case N_SETB | N_EXT:
13586 -+ case N_WEAKB:
13587 -+ a_type = A_BSS | A_DEF | A_GLOBL;
13588 -+ break;
13589 -+ default:
13590 -+ continue;
13591 -+ }
13592 -+
13593 -+ written_bytes = write_dri_symbol (abfd, name, a_type, val);
13594 -+ if (written_bytes < 0)
13595 -+ return FALSE;
13596 -+
13597 -+ myinfo->dri_symtab_size += written_bytes;
13598 -+ }
13599 -+ }
13600 -+
13601 -+ obj_aout_external_string_size (abfd) = 0;
13602 -+ return TRUE;
13603 -+}
13604 -+
13605 -+/* This is used for qsort() to sort addresses
13606 -+ for the TPA relocation table. */
13607 -+
13608 -+static int
13609 -+vma_cmp (const void *v1, const void *v2)
13610 -+{
13611 -+ return (int) ((*((bfd_vma *) v1)) - (*((bfd_vma *) v2)));
13612 -+}
13613 -+
13614 -+/* Alloc and fill the TPA relocation table. */
13615 -+
13616 -+static bfd_boolean
13617 -+fill_tparel (bfd *abfd)
13618 -+{
13619 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
13620 -+ unsigned long i;
13621 -+ bfd_size_type bytes;
13622 -+ unsigned char *ptr;
13623 -+
13624 -+ /* Sort the relocation info. */
13625 -+ if (myinfo->relocs != NULL)
13626 -+ qsort (myinfo->relocs, myinfo->relocs_used, sizeof (bfd_vma),
13627 -+ vma_cmp);
13628 -+
13629 -+ /* Now calculate the number of bytes we need. The relocation info
13630 -+ is encoded as follows: The first entry is a 32-bit value
13631 -+ denoting the first offset to relocate. All following entries
13632 -+ are relative to the preceding one. For relative offsets of
13633 -+ more than 254 bytes a value of 1 is used. The OS will then
13634 -+ add 254 bytes to the current offset. The list is then terminated
13635 -+ with the byte 0. */
13636 -+ bytes = 4; /* First entry is a long. */
13637 -+ for (i = 1; i < myinfo->relocs_used; i++)
13638 -+ {
13639 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
13640 -+ BFD_ASSERT(diff > 0);
13641 -+ bytes += (diff + 253) / 254;
13642 -+ }
13643 -+ /* Last entry is (bfd_byte) 0 if there are some relocations. */
13644 -+ if (myinfo->relocs_used > 0)
13645 -+ bytes++;
13646 -+
13647 -+ myinfo->tparel_size = bytes;
13648 -+ myinfo->tparel = bfd_alloc (abfd, bytes);
13649 -+ if (myinfo->tparel == NULL)
13650 -+ return FALSE;
13651 -+
13652 -+ /* Now fill the array. */
13653 -+ ptr = (bfd_byte*) myinfo->tparel;
13654 -+ if (myinfo->relocs != NULL)
13655 -+ bfd_put_32 (abfd, myinfo->relocs[0], ptr);
13656 -+ else
13657 -+ bfd_put_32 (abfd, 0, ptr);
13658 -+ ptr += 4;
13659 -+
13660 -+ for (i = 1; i < myinfo->relocs_used; i++)
13661 -+ {
13662 -+ unsigned long diff = myinfo->relocs[i] - myinfo->relocs[i - 1];
13663 -+ while (diff > 254)
13664 -+ {
13665 -+ *ptr++ = 1;
13666 -+ diff -= 254;
13667 -+ }
13668 -+ *ptr++ = (bfd_byte) diff;
13669 -+ }
13670 -+
13671 -+ if (myinfo->relocs_used > 0)
13672 -+ *ptr = 0;
13673 -+
13674 -+ return TRUE;
13675 -+}
13676 -+
13677 -+/* Final link routine. We need to use a call back to get the correct
13678 -+ offsets in the output file. And we need to malloc some internal
13679 -+ buffers. */
13680 -+
13681 -+#define MY_bfd_final_link m68kmint_prg_bfd_final_link
13682 -+
13683 -+static bfd_boolean
13684 -+m68kmint_prg_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
13685 -+{
13686 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
13687 -+ struct bfd_link_hash_table *hash = info->hash;
13688 -+ enum bfd_link_strip original_strip = info->strip;
13689 -+
13690 -+ if (info->relocatable)
13691 -+ {
13692 -+ _bfd_error_handler ("%B: relocatable output is not supported by format %s",
13693 -+ abfd, bfd_get_target (abfd));
13694 -+ bfd_set_error (bfd_error_invalid_operation);
13695 -+ return FALSE;
13696 -+ }
13697 -+
13698 -+ myinfo->linkinfo = info;
13699 -+
13700 -+ /* Make sure that for now we never write zmagics. */
13701 -+ abfd->flags &= ~D_PAGED;
13702 -+
13703 -+ /* Find the __stksize symbol. This symbol is used for a MiNT
13704 -+ special kludge. The libc defines this symbol in an object file
13705 -+ initialized to a default value to make sure it is defined in
13706 -+ every output file. The start-up code in crtinit() then simply
13707 -+ sets the stacksize accordingly. In your programs (if they need
13708 -+ an unusual stacksize) you can then simply code:
13709 -+
13710 -+ long _stksize = 0x2000;
13711 -+
13712 -+ This will create a program stack of 2k. Since MiNT cannot detect
13713 -+ a stack overflow this is the only way to prevent program crashes
13714 -+ caused by a stack that is too small.
13715 -+
13716 -+ The ancient linker ignored this feature, the ancient strip
13717 -+ program paid heed to it. By default, strip never stripped this
13718 -+ special symbol from the binary.
13719 -+
13720 -+ Another program called ``printstk'' and its colleague ``fixstk''
13721 -+ could be used to either print the current value of the stacksize
13722 -+ or to modify it without recompiling and rebuilding. These
13723 -+ programs traversed the symbol table and then took the appropriate
13724 -+ measures if the symbol was found.
13725 -+
13726 -+ Here we do a different approach. Since we already expanded the
13727 -+ standard executable header we now hardcode the address (as a file
13728 -+ offset) that the __stksize symbol points to into the header. We
13729 -+ can now let strip safely remove the entry from the symbol table
13730 -+ and we're not dependent on a special format of the symbol table.
13731 -+ Because the address is kept in the header we will always be able
13732 -+ to manipulate the stacksize value later. */
13733 -+ if (hash != NULL)
13734 -+ {
13735 -+ struct aout_link_hash_entry *h =
13736 -+ aout_link_hash_lookup (aout_hash_table (info), "__stksize",
13737 -+ FALSE, FALSE, FALSE);
13738 -+ asection *sec;
13739 -+
13740 -+ if (h != NULL)
13741 -+ {
13742 -+ switch (h->root.type)
13743 -+ {
13744 -+ case bfd_link_hash_defined:
13745 -+ case bfd_link_hash_defweak:
13746 -+ sec = h->root.u.def.section->output_section;
13747 -+ BFD_ASSERT (sec->owner == abfd);
13748 -+
13749 -+ myinfo->stkpos = (h->root.u.def.value + sec->vma
13750 -+ + h->root.u.def.section->output_offset
13751 -+ + GEMDOS_HEADER_SIZE);
13752 -+ break;
13753 -+ default: /* Ignore other types. */
13754 -+ break;
13755 -+ }
13756 -+ }
13757 -+ }
13758 -+
13759 -+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
13760 -+ {
13761 -+ myinfo->traditional_format = TRUE;
13762 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_DRI;
13763 -+ }
13764 -+
13765 -+ /* Unconditionally unset the traditional flag. The only effect in
13766 -+ the a.out code is to disable string hashing (with respect to
13767 -+ SunOS gdx). This is not necessary for us. */
13768 -+
13769 -+ abfd->flags &= ~BFD_TRADITIONAL_FORMAT;
13770 -+
13771 -+ /* Do not write GNU symbols in traditional format. */
13772 -+ if (myinfo->traditional_format)
13773 -+ info->strip = strip_all;
13774 -+
13775 -+ if (NAME(aout,final_link) (abfd, info, MY_final_link_callback)
13776 -+ != TRUE)
13777 -+ return FALSE;
13778 -+
13779 -+ if (myinfo->reloc_error)
13780 -+ return FALSE;
13781 -+
13782 -+ /* Restore the strip status for the traditional symbols. */
13783 -+ info->strip = original_strip;
13784 -+
13785 -+ if (myinfo->traditional_format
13786 -+ && link_write_traditional_syms (abfd, info) != TRUE)
13787 -+ return FALSE;
13788 -+
13789 -+ if (fill_tparel (abfd) != TRUE)
13790 -+ return FALSE;
13791 -+
13792 -+ return TRUE;
13793 -+}
13794 -+
13795 -+/* Copy private BFD header information from the input BFD. */
13796 -+
13797 -+#define MY_bfd_copy_private_header_data m68kmint_prg_bfd_copy_private_header_data
13798 -+
13799 -+static bfd_boolean
13800 -+m68kmint_prg_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd)
13801 -+{
13802 -+ (void)obfd; /* Unused. */
13803 -+
13804 -+ /* We can only copy BFD files using our own file format. */
13805 -+ if (ibfd->xvec != &m68kmint_prg_vec)
13806 -+ {
13807 -+ _bfd_error_handler ("%B: cannot convert from format %s to format %s",
13808 -+ ibfd, bfd_get_target (ibfd), bfd_get_target (obfd));
13809 -+ bfd_set_error (bfd_error_invalid_operation);
13810 -+ return FALSE;
13811 -+ }
13812 -+
13813 -+ return TRUE;
13814 -+}
13815 -+
13816 -+/* Copy backend specific data from one object module to another.
13817 -+ This function is used by objcopy and strip. */
13818 -+
13819 -+#define MY_bfd_copy_private_bfd_data m68kmint_prg_bfd_copy_private_bfd_data
13820 -+
13821 -+static bfd_boolean
13822 -+m68kmint_prg_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
13823 -+{
13824 -+ struct mint_internal_info *myinfo_in;
13825 -+ struct mint_internal_info *myinfo_out;
13826 -+
13827 -+ /* obfd uses our file format, ibfd may be foreign. */
13828 -+ if (ibfd->xvec != &m68kmint_prg_vec)
13829 -+ return TRUE;
13830 -+
13831 -+ myinfo_in = obj_aout_ext (ibfd);
13832 -+ BFD_ASSERT (myinfo_in != NULL);
13833 -+
13834 -+ myinfo_out = obj_aout_ext (obfd);
13835 -+ BFD_ASSERT (myinfo_out != NULL);
13836 -+
13837 -+ /* Copy myinfo. */
13838 -+ memcpy (myinfo_out, myinfo_in, sizeof (*myinfo_out));
13839 -+
13840 -+ /* Copy tparel. */
13841 -+ myinfo_out->tparel = bfd_alloc (obfd, myinfo_out->tparel_size);
13842 -+ if (myinfo_out->tparel == NULL)
13843 -+ return FALSE;
13844 -+ memcpy (myinfo_out->tparel, myinfo_in->tparel, myinfo_out->tparel_size);
13845 -+
13846 -+ /* Normalize the type of empty symbols. */
13847 -+ if (bfd_get_symcount (obfd) == 0)
13848 -+ myinfo_out->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
13849 -+
13850 -+ return TRUE; /* _bfd_generic_bfd_copy_private_bfd_data (ibfd, obfd); */
13851 -+}
13852 -+
13853 -+/* Merge private BFD information from an input BFD to the output BFD when linking. */
13854 -+
13855 -+#define MY_bfd_merge_private_bfd_data m68kmint_prg_merge_private_bfd_data
13856 -+
13857 -+static bfd_boolean
13858 -+m68kmint_prg_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
13859 -+{
13860 -+ (void)obfd; /* Unused. */
13861 -+
13862 -+ /* Our file format cannot be used as linker input. */
13863 -+ if (ibfd->xvec == &m68kmint_prg_vec)
13864 -+ {
13865 -+ _bfd_error_handler ("%B: file format %s cannot be used as linker input",
13866 -+ ibfd, bfd_get_target (ibfd));
13867 -+ bfd_set_error (bfd_error_invalid_operation);
13868 -+ return FALSE;
13869 -+ }
13870 -+
13871 -+ return TRUE; /* _bfd_generic_bfd_merge_private_bfd_data (ibfd, obfd); */
13872 -+}
13873 -+
13874 -+/* Find out the symbol name. */
13875 -+
13876 -+static const char *
13877 -+find_symbol_name (reloc_howto_type *howto, bfd *input_bfd,
13878 -+ bfd_byte *location, struct reloc_std_external *rel)
13879 -+{
13880 -+ struct external_nlist *syms = obj_aout_external_syms (input_bfd);
13881 -+ char *strings = obj_aout_external_strings (input_bfd);
13882 -+ struct aout_link_hash_entry **sym_hashes
13883 -+ = obj_aout_sym_hashes (input_bfd);
13884 -+ struct aout_link_hash_entry *h = NULL;
13885 -+ const char *name;
13886 -+ bfd_size_type r_index;
13887 -+ int r_extern;
13888 -+
13889 -+ if (bfd_get_reloc_size (howto) != 4)
13890 -+ return "(not a symbol)";
13891 -+
13892 -+ /* The input bfd is always big-endian. There is no need to
13893 -+ call bfd_header_big_endian (input_bfd). */
13894 -+ r_index = ((rel->r_index[0] << 16)
13895 -+ | (rel->r_index[1] << 8)
13896 -+ | (rel->r_index[2]));
13897 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
13898 -+
13899 -+ if (sym_hashes != NULL)
13900 -+ h = sym_hashes[r_index];
13901 -+
13902 -+ if (!r_extern)
13903 -+ {
13904 -+ bfd_size_type i;
13905 -+ bfd_vma wanted_value = bfd_get_32 (input_bfd, location);
13906 -+
13907 -+ name = NULL;
13908 -+ for (i = 0; i < obj_aout_external_sym_count (input_bfd); i++)
13909 -+ {
13910 -+ bfd_vma this_value = bfd_get_32 (input_bfd, syms[i].e_value);
13911 -+
13912 -+ if (this_value == wanted_value)
13913 -+ {
13914 -+ bfd_byte symtype = bfd_get_8 (input_bfd, syms[i].e_type);
13915 -+
13916 -+ /* Skip debug symbols and the like. */
13917 -+ if ((symtype & N_STAB) != 0)
13918 -+ continue;
13919 -+
13920 -+ /* This is dirty but preferable to a plethoria of
13921 -+ single comparisons. */
13922 -+ if (symtype <= (N_BSS | N_EXT)
13923 -+ || (symtype >= N_WEAKU && symtype <= N_COMM))
13924 -+ {
13925 -+ name = strings + GET_WORD (input_bfd, syms[i].e_strx);
13926 -+ break;
13927 -+ }
13928 -+ }
13929 -+ }
13930 -+
13931 -+ /* FIXME: If the relocation is against a section there is
13932 -+ probably a symbol for that section floating around somewhere
13933 -+ in the bfd jungle. */
13934 -+ if (name == NULL)
13935 -+ {
13936 -+ switch ((r_index & N_TYPE) & ~N_EXT)
13937 -+ {
13938 -+ case N_TEXT:
13939 -+ name = "text section";
13940 -+ break;
13941 -+ case N_DATA:
13942 -+ name = "data section";
13943 -+ break;
13944 -+ case N_BSS:
13945 -+ name = "bss section";
13946 -+ break;
13947 -+ case N_ABS:
13948 -+ name = "absolute section";
13949 -+ break;
13950 -+ default:
13951 -+ name = "unknown section";
13952 -+ break;
13953 -+ }
13954 -+ }
13955 -+ }
13956 -+ else if (h != NULL)
13957 -+ name = h->root.root.string;
13958 -+ else if (r_index >= obj_aout_external_sym_count (input_bfd))
13959 -+ name = "(unknown symbol)"; /* Shouldn't happen. */
13960 -+ else
13961 -+ name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
13962 -+
13963 -+ return name;
13964 -+}
13965 -+
13966 -+/* This relocation routine is used by some of the backend linkers.
13967 -+ They do not construct asymbol or arelent structures, so there is no
13968 -+ reason for them to use bfd_perform_relocation. Also,
13969 -+ bfd_perform_relocation is so hacked up it is easier to write a new
13970 -+ function than to try to deal with it.
13971 -+
13972 -+ This routine does a final relocation. Whether it is useful for a
13973 -+ relocatable link depends upon how the object format defines
13974 -+ relocations.
13975 -+
13976 -+ FIXME: This routine ignores any special_function in the HOWTO,
13977 -+ since the existing special_function values have been written for
13978 -+ bfd_perform_relocation.
13979 -+
13980 -+ HOWTO is the reloc howto information.
13981 -+ INPUT_BFD is the BFD which the reloc applies to.
13982 -+ INPUT_SECTION is the section which the reloc applies to.
13983 -+ CONTENTS is the contents of the section.
13984 -+ ADDRESS is the address of the reloc within INPUT_SECTION.
13985 -+ VALUE is the value of the symbol the reloc refers to.
13986 -+ ADDEND is the addend of the reloc. */
13987 -+
13988 -+/* The additional parameter REL is specific to this backend.
13989 -+ This function is derived from _bfd_final_link_relocate()
13990 -+ found in reloc.c. It adds additional checking for dangerous
13991 -+ relocations in MiNT sharable text sections, then it records
13992 -+ the relocated offset in myinfo->relocs[] for further processing. */
13993 -+
13994 -+static bfd_reloc_status_type
13995 -+m68kmint_prg_final_link_relocate_rel (reloc_howto_type *howto,
13996 -+ bfd *input_bfd,
13997 -+ asection *input_section,
13998 -+ bfd_byte *contents,
13999 -+ bfd_vma address,
14000 -+ bfd_vma value,
14001 -+ bfd_vma addend,
14002 -+ struct reloc_std_external *rel)
14003 -+{
14004 -+ bfd_vma relocation;
14005 -+ bfd *output_bfd = input_section->output_section->owner;
14006 -+ struct mint_internal_info *myinfo = obj_aout_ext (output_bfd);
14007 -+ bfd_reloc_status_type retval;
14008 -+ int r_index;
14009 -+ int r_extern;
14010 -+ bfd_boolean need_tpa_relocation;
14011 -+
14012 -+ /* The input bfd is always big-endian. There is no need to
14013 -+ call bfd_header_big_endian (input_bfd). */
14014 -+ r_index = ((rel->r_index[0] << 16)
14015 -+ | (rel->r_index[1] << 8)
14016 -+ | (rel->r_index[2]));
14017 -+ r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
14018 -+
14019 -+#define _MINT_F_SHTEXT 0x800
14020 -+
14021 -+ /* Sanity check the address. */
14022 -+ if (address > bfd_get_section_limit (input_bfd, input_section))
14023 -+ return bfd_reloc_outofrange;
14024 -+
14025 -+ /* This function assumes that we are dealing with a basic relocation
14026 -+ against a symbol. We want to compute the value of the symbol to
14027 -+ relocate to. This is just VALUE, the value of the symbol, plus
14028 -+ ADDEND, any addend associated with the reloc. */
14029 -+ relocation = value + addend;
14030 -+
14031 -+ /* Check for dangerous relocations in images with a sharable
14032 -+ text section. */
14033 -+ if ((myinfo->prg_flags & _MINT_F_SHTEXT) != 0
14034 -+ && bfd_get_reloc_size (howto) == 4)
14035 -+ {
14036 -+ bfd_boolean error_found = FALSE;
14037 -+ const char *name = NULL;
14038 -+
14039 -+ if (input_section == obj_textsec (input_bfd))
14040 -+ {
14041 -+ if (!r_extern)
14042 -+ {
14043 -+ /* This is a relocation against another section. Only
14044 -+ relocations against the text section are allowed. */
14045 -+ if (r_index != N_TEXT && r_index != (N_TEXT | N_EXT))
14046 -+ error_found = TRUE;
14047 -+ }
14048 -+ else if (relocation > (input_section->output_section->vma
14049 -+ + input_section->output_section->size))
14050 -+ {
14051 -+ error_found = TRUE;
14052 -+ }
14053 -+ else if (relocation == (input_section->output_section->vma
14054 -+ + input_section->output_section->size))
14055 -+ {
14056 -+ name = find_symbol_name (howto, input_bfd,
14057 -+ contents + address,
14058 -+ rel);
14059 -+ if (strcmp (name, "_etext") == 0)
14060 -+ error_found = FALSE;
14061 -+ }
14062 -+ }
14063 -+
14064 -+ if (error_found)
14065 -+ {
14066 -+ const struct bfd_link_callbacks *callbacks
14067 -+ = myinfo->linkinfo->callbacks;
14068 -+
14069 -+ myinfo->reloc_error = TRUE;
14070 -+
14071 -+ if (callbacks->reloc_dangerous != NULL)
14072 -+ {
14073 -+ if (name == NULL)
14074 -+ name = find_symbol_name (howto, input_bfd,
14075 -+ contents + address,
14076 -+ rel);
14077 -+
14078 -+ callbacks->reloc_dangerous (myinfo->linkinfo, name,
14079 -+ input_bfd,
14080 -+ input_section, address);
14081 -+ }
14082 -+ }
14083 -+ }
14084 -+
14085 -+ /* If the relocation is PC relative, we want to set RELOCATION to
14086 -+ the distance between the symbol (currently in RELOCATION) and the
14087 -+ location we are relocating. Some targets (e.g., i386-aout)
14088 -+ arrange for the contents of the section to be the negative of the
14089 -+ offset of the location within the section; for such targets
14090 -+ pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF)
14091 -+ simply leave the contents of the section as zero; for such
14092 -+ targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not
14093 -+ need to subtract out the offset of the location within the
14094 -+ section (which is just ADDRESS). */
14095 -+ if (howto->pc_relative)
14096 -+ {
14097 -+ relocation -= (input_section->output_section->vma
14098 -+ + input_section->output_offset);
14099 -+ if (howto->pcrel_offset)
14100 -+ relocation -= address;
14101 -+ }
14102 -+
14103 -+ retval = _bfd_relocate_contents (howto, input_bfd, relocation,
14104 -+ contents + address);
14105 -+
14106 -+ /* The symbol has to be relocated again iff the length of the relocation
14107 -+ is 2 words and it is not pc relative. */
14108 -+ need_tpa_relocation = FALSE;
14109 -+ if (!howto->pc_relative && bfd_get_reloc_size (howto) == 4)
14110 -+ {
14111 -+ if (r_extern)
14112 -+ {
14113 -+ struct aout_link_hash_entry **sym_hashes = obj_aout_sym_hashes (input_bfd);
14114 -+ struct aout_link_hash_entry *h = sym_hashes[r_index];
14115 -+ asection *output_section = h->root.u.def.section->output_section;
14116 -+
14117 -+ /* Do not relocate absolute symbols. */
14118 -+ if (output_section == obj_textsec (output_bfd)
14119 -+ || output_section == obj_datasec (output_bfd)
14120 -+ || output_section == obj_bsssec (output_bfd))
14121 -+ {
14122 -+ need_tpa_relocation = TRUE;
14123 -+ }
14124 -+ }
14125 -+ else
14126 -+ {
14127 -+ need_tpa_relocation = TRUE;
14128 -+ }
14129 -+ }
14130 -+
14131 -+ /* Here we add the TPA relocation entries for the address references
14132 -+ located inside the input sections. Note that if some references
14133 -+ to addresses are generated using data statements in the linker
14134 -+ script, they will not be relocated here because they do not
14135 -+ belong to any input section. */
14136 -+ if (need_tpa_relocation)
14137 -+ {
14138 -+ bfd_vma tpa_address = input_section->output_section->vma
14139 -+ + input_section->output_offset + address;
14140 -+
14141 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(output_bfd, tpa_address))
14142 -+ return bfd_reloc_other;
14143 -+ }
14144 -+
14145 -+ return retval;
14146 -+}
14147 -+
14148 -+/* Write out the TPA relocation table. */
14149 -+
14150 -+static bfd_boolean
14151 -+write_tparel (bfd *abfd, struct internal_exec *execp)
14152 -+{
14153 -+ struct mint_internal_info* myinfo = obj_aout_ext (abfd);
14154 -+
14155 -+ if (myinfo->dri_symtab_size == 0)
14156 -+ myinfo->tparel_pos = N_STROFF (*execp)
14157 -+ + obj_aout_external_string_size (abfd);
14158 -+ else
14159 -+ myinfo->tparel_pos = N_SYMOFF (*execp)
14160 -+ + myinfo->dri_symtab_size;
14161 -+
14162 -+ if (bfd_seek (abfd, myinfo->tparel_pos, SEEK_SET) != 0)
14163 -+ return FALSE;
14164 -+
14165 -+ if (bfd_bwrite (myinfo->tparel, myinfo->tparel_size, abfd)
14166 -+ != myinfo->tparel_size)
14167 -+ return FALSE;
14168 -+
14169 -+ return TRUE;
14170 -+}
14171 -+
14172 -+/* Write the full exec header.
14173 -+ This function must be called last to ensure that we have all the
14174 -+ information needed to fill the MiNT-specific header fields. */
14175 -+
14176 -+static bfd_boolean
14177 -+write_exec_header (bfd *abfd, struct internal_exec *execp, struct external_exec *exec_bytes)
14178 -+{
14179 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
14180 -+ bfd_size_type symtab_size;
14181 -+
14182 -+ bfd_h_put_16 (abfd, 0x601a, exec_bytes->g_branch);
14183 -+
14184 -+ /* The OS will load our extension header fields into the text segment. */
14185 -+ bfd_h_put_32 (abfd, execp->a_text + (EXEC_BYTES_SIZE - GEMDOS_HEADER_SIZE),
14186 -+ exec_bytes->g_text);
14187 -+ bfd_h_put_32 (abfd, execp->a_data, exec_bytes->g_data);
14188 -+ bfd_h_put_32 (abfd, execp->a_bss, exec_bytes->g_bss);
14189 -+
14190 -+ /* The OS' notion of the size of the symbol table is another than
14191 -+ the bfd library's. We have to fill in the size of the table
14192 -+ itself plus the size of the string table but only if we have not written
14193 -+ a traditional symbol table. If we have written a traditional symbol
14194 -+ table we know the size. */
14195 -+ if (myinfo->dri_symtab_size != 0)
14196 -+ symtab_size = myinfo->dri_symtab_size;
14197 -+ else
14198 -+ symtab_size = myinfo->tparel_pos - N_SYMOFF (*execp);
14199 -+
14200 -+ bfd_h_put_32 (abfd, symtab_size, exec_bytes->g_syms);
14201 -+
14202 -+ bfd_h_put_32 (abfd, 0x4d694e54, exec_bytes->g_extmagic);
14203 -+ bfd_h_put_32 (abfd, myinfo->prg_flags, exec_bytes->g_flags);
14204 -+ bfd_h_put_16 (abfd, 0, exec_bytes->g_abs);
14205 -+
14206 -+ /* Generate the jump instruction to the entry point. In m68k
14207 -+ assembler mnemnonics it looks more or less like this:
14208 -+
14209 -+ move.l exec_bytes->e_entry(pc),d0
14210 -+ jmp -6(pc,d0.l)
14211 -+
14212 -+ Sorry for the wrong syntax. As a real assembler addict I
14213 -+ never actually use an assembler. I edit my binaries manually
14214 -+ with a hex editor, looks much cooler and it strengthens your
14215 -+ abstraction abilities. */
14216 -+
14217 -+ exec_bytes->g_jump_entry[0] = 0x20;
14218 -+ exec_bytes->g_jump_entry[1] = 0x3a;
14219 -+ exec_bytes->g_jump_entry[2] = 0x00;
14220 -+ exec_bytes->g_jump_entry[3] = 0x1a;
14221 -+ exec_bytes->g_jump_entry[4] = 0x4e;
14222 -+ exec_bytes->g_jump_entry[5] = 0xfb;
14223 -+ exec_bytes->g_jump_entry[6] = 0x08;
14224 -+ exec_bytes->g_jump_entry[7] = 0xfa;
14225 -+
14226 -+ bfd_h_put_32 (abfd, myinfo->tparel_pos, exec_bytes->g_tparel_pos);
14227 -+ bfd_h_put_32 (abfd, myinfo->tparel_size, exec_bytes->g_tparel_size);
14228 -+ bfd_h_put_32 (abfd, myinfo->stkpos, exec_bytes->g_stkpos);
14229 -+
14230 -+ /* If there are no symbols, pretend they are in GNU format. */
14231 -+ if (symtab_size == 0)
14232 -+ myinfo->symbol_format = _MINT_SYMBOL_FORMAT_GNU;
14233 -+
14234 -+ bfd_h_put_32 (abfd, myinfo->symbol_format, exec_bytes->g_symbol_format);
14235 -+
14236 -+ memset (&exec_bytes->g_pad0, 0, sizeof (exec_bytes->g_pad0));
14237 -+
14238 -+ /* The standard stuff. */
14239 -+ NAME(aout, swap_exec_header_out) (abfd, execp, exec_bytes);
14240 -+ if (myinfo->symbol_format != _MINT_SYMBOL_FORMAT_GNU)
14241 -+ PUT_WORD (abfd, 0, exec_bytes->e_syms);
14242 -+
14243 -+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
14244 -+ return FALSE;
14245 -+
14246 -+ if (bfd_bwrite (exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd)
14247 -+ != EXEC_BYTES_SIZE)
14248 -+ return FALSE;
14249 -+
14250 -+ /* Override the stack size. */
14251 -+ if (myinfo->override_stack_size && myinfo->stkpos)
14252 -+ {
14253 -+ bfd_byte big_endian_stack_size[4];
14254 -+
14255 -+ bfd_put_32 (abfd, myinfo->stack_size, &big_endian_stack_size);
14256 -+
14257 -+ if (bfd_seek (abfd, (file_ptr) myinfo->stkpos, SEEK_SET) != 0)
14258 -+ return FALSE;
14259 -+
14260 -+ if (bfd_bwrite (big_endian_stack_size, 4, abfd) != 4)
14261 -+ return FALSE;
14262 -+ }
14263 -+
14264 -+ return TRUE;
14265 -+}
14266 -+
14267 -+/* Write an object file.
14268 -+ Section contents have already been written. We write the
14269 -+ file header, symbols, and relocation. */
14270 -+
14271 -+#define MY_write_object_contents m68kmint_prg_write_object_contents
14272 -+
14273 -+static bfd_boolean
14274 -+m68kmint_prg_write_object_contents (bfd *abfd)
14275 -+{
14276 -+ struct external_exec exec_bytes;
14277 -+ struct internal_exec *execp = exec_hdr (abfd);
14278 -+ bfd_size_type text_size;
14279 -+ file_ptr text_end;
14280 -+
14281 -+ BFD_ASSERT (obj_aout_ext (abfd) != NULL);
14282 -+
14283 -+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
14284 -+
14285 -+ /* Most of the following code come from the WRITE_HEADERS macro
14286 -+ found in libaout.h. */
14287 -+
14288 -+ if (adata(abfd).magic == undecided_magic)
14289 -+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
14290 -+
14291 -+ execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
14292 -+ execp->a_entry = bfd_get_start_address (abfd);
14293 -+
14294 -+ execp->a_trsize = ((obj_textsec (abfd)->reloc_count) *
14295 -+ obj_reloc_entry_size (abfd));
14296 -+ execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
14297 -+ obj_reloc_entry_size (abfd));
14298 -+
14299 -+ /* Now write out reloc info, followed by syms and strings. */
14300 -+
14301 -+ if (bfd_get_outsymbols (abfd) != NULL
14302 -+ && bfd_get_symcount (abfd) != 0)
14303 -+ {
14304 -+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
14305 -+ return FALSE;
14306 -+
14307 -+ if (! NAME (aout, write_syms) (abfd))
14308 -+ return FALSE;
14309 -+ }
14310 -+
14311 -+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
14312 -+ return FALSE;
14313 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
14314 -+ return FALSE;
14315 -+
14316 -+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
14317 -+ return FALSE;
14318 -+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
14319 -+ return FALSE;
14320 -+
14321 -+ if (write_tparel (abfd, execp) != TRUE)
14322 -+ return FALSE;
14323 -+
14324 -+ if (write_exec_header (abfd, execp, &exec_bytes) != TRUE)
14325 -+ return FALSE;
14326 -+
14327 -+ return TRUE;
14328 -+}
14329 -+
14330 -+/* Print private BFD data. Used by objdump -p. */
14331 -+
14332 -+#define MY_bfd_print_private_bfd_data m68kmint_prg_print_private_bfd_data
14333 -+
14334 -+static bfd_boolean
14335 -+m68kmint_prg_print_private_bfd_data (bfd *abfd, void *ptr)
14336 -+{
14337 -+ FILE *file = (FILE *) ptr;
14338 -+ struct mint_internal_info *myinfo = obj_aout_ext (abfd);
14339 -+ const char* symbol_format;
14340 -+ long stksize = 0;
14341 -+
14342 -+ fprintf (file, "\n");
14343 -+
14344 -+ fprintf (file, " GEMDOS flags: 0x%08lx\n", (unsigned long) myinfo->prg_flags);
14345 -+ fprintf (file, "Start address: 0x%08lx\n", bfd_get_start_address (abfd));
14346 -+
14347 -+ /* Stack size. */
14348 -+ if (myinfo->stkpos != 0)
14349 -+ {
14350 -+ if (bfd_seek (abfd, myinfo->stkpos, SEEK_SET) != 0
14351 -+ || (bfd_bread (&stksize, sizeof(long), abfd) != sizeof(long)))
14352 -+ return FALSE;
14353 -+
14354 -+ stksize = bfd_get_signed_32 (abfd, &stksize);
14355 -+ }
14356 -+ fprintf (file, " Stack size: %ld\n", stksize);
14357 -+
14358 -+ /* Symbol format. */
14359 -+ switch (myinfo->symbol_format)
14360 -+ {
14361 -+ case _MINT_SYMBOL_FORMAT_GNU: symbol_format = "stabs"; break;
14362 -+ case _MINT_SYMBOL_FORMAT_DRI: symbol_format = "DRI"; break;
14363 -+ default: symbol_format = "?"; break;
14364 -+ }
14365 -+ fprintf (file, "Symbol format: %s\n", symbol_format);
14366 -+
14367 -+ return TRUE;
14368 -+}
14369 -+
14370 -+/* Special case for NAME (aout, get_section_contents)
14371 -+ It is not declared in libaout.h, neither implemented in aoutx.h.
14372 -+ Instead, a macro named aout_32_get_section_contents is defined in libaout.h.
14373 -+ So the default value of MY_get_section_contents provided by aout-target.h
14374 -+ is not correct, it has to be defined here with the right value. */
14375 -+
14376 -+#define MY_get_section_contents aout_32_get_section_contents
14377 -+
14378 -+/* The following include will define m68kmint_prg_vec
14379 -+ and a default implementation for all the MY_ functions
14380 -+ not overriden here. */
14381 -+
14382 -+#include "aout-target.h"
14383 -+
14384 -+/* Set the GEMDOS executable flags.
14385 -+ It is called by the linker emulation script. */
14386 -+
14387 -+bfd_boolean
14388 -+bfd_m68kmint_set_extended_flags (bfd *abfd, flagword prg_flags)
14389 -+{
14390 -+ struct mint_internal_info *myinfo;
14391 -+
14392 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
14393 -+ myinfo = obj_aout_ext (abfd);
14394 -+ BFD_ASSERT(myinfo != NULL);
14395 -+
14396 -+ myinfo->prg_flags = prg_flags;
14397 -+
14398 -+ return TRUE;
14399 -+}
14400 -+
14401 -+/* Override the stack size.
14402 -+ It is called by the linker emulation script. */
14403 -+
14404 -+bfd_boolean
14405 -+bfd_m68kmint_set_stack_size (bfd *abfd, bfd_signed_vma stack_size)
14406 -+{
14407 -+ struct mint_internal_info *myinfo;
14408 -+
14409 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
14410 -+ myinfo = obj_aout_ext (abfd);
14411 -+ BFD_ASSERT(myinfo != NULL);
14412 -+
14413 -+ myinfo->stack_size = stack_size;
14414 -+ myinfo->override_stack_size = TRUE;
14415 -+
14416 -+ return TRUE;
14417 -+}
14418 -+
14419 -+/* Add a TPA relocation entry.
14420 -+ It is called by BFD when linking the input sections, and by the
14421 -+ linker when it generates a reference to an address (in particular,
14422 -+ when building the constructors list). */
14423 -+
14424 -+bfd_boolean
14425 -+bfd_m68kmint_add_tpa_relocation_entry (bfd *abfd, bfd_vma address)
14426 -+{
14427 -+ struct mint_internal_info *myinfo;
14428 -+
14429 -+ BFD_ASSERT(abfd->xvec == &m68kmint_prg_vec);
14430 -+ myinfo = obj_aout_ext (abfd);
14431 -+ BFD_ASSERT(myinfo != NULL);
14432 -+
14433 -+ /* Enlarge the buffer if necessary. */
14434 -+ if (myinfo->relocs_used * sizeof (bfd_vma) >= myinfo->relocs_allocated)
14435 -+ {
14436 -+ bfd_vma *newbuf;
14437 -+ myinfo->relocs_allocated += MINT_RELOC_CHUNKSIZE;
14438 -+ newbuf = bfd_realloc (myinfo->relocs, myinfo->relocs_allocated);
14439 -+ if (newbuf == NULL)
14440 -+ return FALSE;
14441 -+
14442 -+ myinfo->relocs = newbuf;
14443 -+ }
14444 -+
14445 -+ /* The TPA relative relocation actually just adds the address of
14446 -+ the text segment (i. e. beginning of the executable in memory)
14447 -+ to the addresses at the specified locations. This allows an
14448 -+ executable to be loaded everywhere in the address space without
14449 -+ memory management. */
14450 -+ myinfo->relocs[myinfo->relocs_used++] = address;
14451 -+
14452 -+ return TRUE;
14453 -+}
14454 -diff -ur --new-file binutils-2.21.51.0.7/bfd/targets.c binutils-2.21.51.0.7-mint/bfd/targets.c
14455 ---- binutils-2.21.51.0.7/bfd/targets.c 2011-01-04 17:51:04.000000000 +0000
14456 -+++ binutils-2.21.51.0.7-mint/bfd/targets.c 2011-04-08 10:07:08.000000000 +0000
14457 -@@ -770,6 +770,7 @@
14458 - extern const bfd_target m68kcoff_vec;
14459 - extern const bfd_target m68kcoffun_vec;
14460 - extern const bfd_target m68klinux_vec;
14461 -+extern const bfd_target m68kmint_prg_vec;
14462 - extern const bfd_target m68knetbsd_vec;
14463 - extern const bfd_target m68ksysvcoff_vec;
14464 - extern const bfd_target m88kbcs_vec;
14465 -diff -ur --new-file binutils-2.21.51.0.7/binutils/configure binutils-2.21.51.0.7-mint/binutils/configure
14466 ---- binutils-2.21.51.0.7/binutils/configure 2011-03-07 18:05:31.000000000 +0000
14467 -+++ binutils-2.21.51.0.7-mint/binutils/configure 2011-04-08 10:07:09.000000000 +0000
14468 -@@ -13041,7 +13041,7 @@
14469 -
14470 -
14471 - case "${host}" in
14472 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
14473 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
14474 -
14475 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
14476 - ;;
14477 -diff -ur --new-file binutils-2.21.51.0.7/binutils/dlltool.c binutils-2.21.51.0.7-mint/binutils/dlltool.c
14478 ---- binutils-2.21.51.0.7/binutils/dlltool.c 2010-12-06 14:23:54.000000000 +0000
14479 -+++ binutils-2.21.51.0.7-mint/binutils/dlltool.c 2011-04-08 10:07:09.000000000 +0000
14480 -@@ -4360,7 +4360,7 @@
14481 - if (*cp == '-')
14482 - dash = cp;
14483 - if (
14484 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
14485 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
14486 - *cp == ':' || *cp == '\\' ||
14487 - #endif
14488 - *cp == '/')
14489 -diff -ur --new-file binutils-2.21.51.0.7/binutils/dllwrap.c binutils-2.21.51.0.7-mint/binutils/dllwrap.c
14490 ---- binutils-2.21.51.0.7/binutils/dllwrap.c 2010-08-11 21:51:51.000000000 +0000
14491 -+++ binutils-2.21.51.0.7-mint/binutils/dllwrap.c 2011-04-08 10:07:09.000000000 +0000
14492 -@@ -263,7 +263,7 @@
14493 - dash = cp;
14494 -
14495 - if (
14496 --#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
14497 -+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) || defined(__MINT__)
14498 - *cp == ':' || *cp == '\\' ||
14499 - #endif
14500 - *cp == '/')
14501 -diff -ur --new-file binutils-2.21.51.0.7/binutils/readelf.c binutils-2.21.51.0.7-mint/binutils/readelf.c
14502 ---- binutils-2.21.51.0.7/binutils/readelf.c 2011-04-08 09:37:05.000000000 +0000
14503 -+++ binutils-2.21.51.0.7-mint/binutils/readelf.c 2011-04-08 10:07:10.000000000 +0000
14504 -@@ -9903,7 +9903,11 @@
14505 - #ifndef __MSVCRT__
14506 - /* PR 11128: Use two separate invocations in order to work
14507 - around bugs in the Solaris 8 implementation of printf. */
14508 -+#if GCC_VERSION < 3000
14509 -+ printf (" [%6lx] ", (unsigned long) (data - start));
14510 -+#else
14511 - printf (" [%6tx] ", data - start);
14512 -+#endif
14513 - printf ("%s\n", data);
14514 - #else
14515 - printf (" [%6Ix] %s\n", (size_t) (data - start), data);
14516 -diff -ur --new-file binutils-2.21.51.0.7/binutils/resrc.c binutils-2.21.51.0.7-mint/binutils/resrc.c
14517 ---- binutils-2.21.51.0.7/binutils/resrc.c 2010-12-06 14:23:55.000000000 +0000
14518 -+++ binutils-2.21.51.0.7-mint/binutils/resrc.c 2011-04-08 10:07:10.000000000 +0000
14519 -@@ -396,7 +396,7 @@
14520 - *space = 0;
14521 -
14522 - if (
14523 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32)
14524 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__MINT__)
14525 - strchr (cmd, '\\') ||
14526 - #endif
14527 - strchr (cmd, '/'))
14528 -@@ -514,7 +514,7 @@
14529 - if (*cp == '-')
14530 - dash = cp;
14531 - if (
14532 --#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32)
14533 -+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) || defined (__MINT__)
14534 - *cp == ':' || *cp == '\\' ||
14535 - #endif
14536 - *cp == '/')
14537 -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
14538 ---- binutils-2.21.51.0.7/gas/config/te-mint.h 1970-01-01 00:00:00.000000000 +0000
14539 -+++ binutils-2.21.51.0.7-mint/gas/config/te-mint.h 2011-04-08 10:07:10.000000000 +0000
14540 -@@ -0,0 +1,30 @@
14541 -+/* Copyright 2008 Free Software Foundation, Inc.
14542 -+
14543 -+ This file is part of GAS, the GNU Assembler.
14544 -+
14545 -+ GAS is free software; you can redistribute it and/or modify
14546 -+ it under the terms of the GNU General Public License as
14547 -+ published by the Free Software Foundation; either version 3,
14548 -+ or (at your option) any later version.
14549 -+
14550 -+ GAS is distributed in the hope that it will be useful, but
14551 -+ WITHOUT ANY WARRANTY; without even the implied warranty of
14552 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14553 -+ the GNU General Public License for more details.
14554 -+
14555 -+ You should have received a copy of the GNU General Public License
14556 -+ along with GAS; see the file COPYING. If not, write to the Free
14557 -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
14558 -+ 02110-1301, USA. */
14559 -+
14560 -+#define TE_MINT
14561 -+
14562 -+#define LOCAL_LABELS_DOLLAR 1
14563 -+#define LOCAL_LABELS_FB 1
14564 -+
14565 -+/* These define interfaces. */
14566 -+#ifdef OBJ_HEADER
14567 -+#include OBJ_HEADER
14568 -+#else
14569 -+#include "obj-format.h"
14570 -+#endif
14571 -diff -ur --new-file binutils-2.21.51.0.7/gas/configure.tgt binutils-2.21.51.0.7-mint/gas/configure.tgt
14572 ---- binutils-2.21.51.0.7/gas/configure.tgt 2011-01-04 17:51:04.000000000 +0000
14573 -+++ binutils-2.21.51.0.7-mint/gas/configure.tgt 2011-04-08 10:07:10.000000000 +0000
14574 -@@ -266,6 +266,7 @@
14575 - m68k-*-linux-*) fmt=elf em=linux ;;
14576 - m68k-*-uclinux*) fmt=elf em=uclinux ;;
14577 - m68k-*-gnu*) fmt=elf ;;
14578 -+ m68k-*-mint*) fmt=aout em=mint bfd_gas=yes ;;
14579 - m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
14580 - m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
14581 - m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
14582 -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
14583 ---- binutils-2.21.51.0.7/gas/testsuite/gas/all/weakref1u.d 2009-11-11 16:52:57.000000000 +0000
14584 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/all/weakref1u.d 2011-04-08 10:07:10.000000000 +0000
14585 -@@ -3,7 +3,7 @@
14586 - #source: weakref1.s
14587 - # aout turns undefined into *ABS* symbols.
14588 - # see weakref1.d for comments on the other not-targets
14589 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
14590 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint* ns32k-*-netbsd alpha*-*-osf* *-*-ecoff
14591 -
14592 - # the rest of this file is generated with the following script:
14593 - # # script begin
14594 -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
14595 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/all.exp 2011-03-07 18:05:32.000000000 +0000
14596 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/all.exp 2011-04-08 10:10:06.000000000 +0000
14597 -@@ -71,7 +71,7 @@
14598 -
14599 - gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
14600 -
14601 -- if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then {
14602 -+ if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] || [istarget *-*-mint*] } then {
14603 - run_dump_test p3041
14604 - run_dump_test p3041data
14605 - run_dump_test p3041pcrel
14606 -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
14607 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isaa.d 2009-11-11 16:52:56.000000000 +0000
14608 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isaa.d 2011-04-08 10:07:10.000000000 +0000
14609 -@@ -1,7 +1,7 @@
14610 - #name: br-isaa.d
14611 - #objdump: -dr
14612 - #as: -march=isaa -pcrel
14613 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
14614 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
14615 -
14616 - .*: file format .*
14617 -
14618 -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
14619 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isab.d 2009-11-11 16:52:56.000000000 +0000
14620 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isab.d 2011-04-08 10:07:10.000000000 +0000
14621 -@@ -1,7 +1,7 @@
14622 - #name: br-isab.d
14623 - #objdump: -dr
14624 - #as: -march=isab -pcrel
14625 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
14626 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
14627 -
14628 - .*: file format .*
14629 -
14630 -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
14631 ---- binutils-2.21.51.0.7/gas/testsuite/gas/m68k/br-isac.d 2009-11-11 16:52:56.000000000 +0000
14632 -+++ binutils-2.21.51.0.7-mint/gas/testsuite/gas/m68k/br-isac.d 2011-04-08 10:07:10.000000000 +0000
14633 -@@ -1,7 +1,7 @@
14634 - #name: br-isac.d
14635 - #objdump: -dr
14636 - #as: -march=isac -pcrel
14637 --#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd*
14638 -+#not-target: *-*-*aout m68k-*-netbsd m68k-*-openbsd* m68k-*-mint*
14639 -
14640 - .*: file format .*
14641 -
14642 -diff -ur --new-file binutils-2.21.51.0.7/include/filenames.h binutils-2.21.51.0.7-mint/include/filenames.h
14643 ---- binutils-2.21.51.0.7/include/filenames.h 2011-03-07 18:05:32.000000000 +0000
14644 -+++ binutils-2.21.51.0.7-mint/include/filenames.h 2011-04-08 10:07:27.000000000 +0000
14645 -@@ -30,7 +30,7 @@
14646 - extern "C" {
14647 - #endif
14648 -
14649 --#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
14650 -+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) || defined (__MINT__)
14651 - # ifndef HAVE_DOS_BASED_FILE_SYSTEM
14652 - # define HAVE_DOS_BASED_FILE_SYSTEM 1
14653 - # endif
14654 -diff -ur --new-file binutils-2.21.51.0.7/include/getopt.h binutils-2.21.51.0.7-mint/include/getopt.h
14655 ---- binutils-2.21.51.0.7/include/getopt.h 2005-05-10 22:46:48.000000000 +0000
14656 -+++ binutils-2.21.51.0.7-mint/include/getopt.h 2011-04-08 10:07:27.000000000 +0000
14657 -@@ -106,7 +106,7 @@
14658 - to find the declaration so provide a fully prototyped one. If it
14659 - is 1, we found it so don't provide any declaration at all. */
14660 - #if !HAVE_DECL_GETOPT
14661 --#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
14662 -+#if defined (__GNU_LIBRARY__) || defined (__MINT__) || defined (HAVE_DECL_GETOPT)
14663 - /* Many other libraries have conflicting prototypes for getopt, with
14664 - differences in the consts, in unistd.h. To avoid compilation
14665 - errors, only prototype getopt for the GNU C library. */
14666 -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.am binutils-2.21.51.0.7-mint/ld/Makefile.am
14667 ---- binutils-2.21.51.0.7/ld/Makefile.am 2011-03-07 18:05:32.000000000 +0000
14668 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.am 2011-04-08 10:07:27.000000000 +0000
14669 -@@ -308,6 +308,7 @@
14670 - em68kelf.c \
14671 - em68kelfnbsd.c \
14672 - em68klinux.c \
14673 -+ em68kmint.c \
14674 - em68knbsd.c \
14675 - em68kpsos.c \
14676 - em88kbcs.c \
14677 -@@ -1319,6 +1320,10 @@
14678 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
14679 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
14680 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
14681 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
14682 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
14683 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
14684 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
14685 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
14686 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
14687 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
14688 -diff -ur --new-file binutils-2.21.51.0.7/ld/Makefile.in binutils-2.21.51.0.7-mint/ld/Makefile.in
14689 ---- binutils-2.21.51.0.7/ld/Makefile.in 2011-03-07 18:05:32.000000000 +0000
14690 -+++ binutils-2.21.51.0.7-mint/ld/Makefile.in 2011-04-08 10:07:27.000000000 +0000
14691 -@@ -614,6 +614,7 @@
14692 - em68kelf.c \
14693 - em68kelfnbsd.c \
14694 - em68klinux.c \
14695 -+ em68kmint.c \
14696 - em68knbsd.c \
14697 - em68kpsos.c \
14698 - em88kbcs.c \
14699 -@@ -1229,6 +1230,7 @@
14700 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Po@am__quote@
14701 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Po@am__quote@
14702 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68klinux.Po@am__quote@
14703 -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kmint.Po@am__quote@
14704 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68knbsd.Po@am__quote@
14705 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kpsos.Po@am__quote@
14706 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em88kbcs.Po@am__quote@
14707 -@@ -2762,6 +2764,10 @@
14708 - em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
14709 - $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
14710 - ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
14711 -+em68kmint.c: $(srcdir)/emulparams/m68kmint.sh \
14712 -+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mint.em \
14713 -+ $(srcdir)/scripttempl/m68kmint.sc ${GEN_DEPENDS}
14714 -+ ${GENSCRIPTS} m68kmint "$(tdir_m68kmint)"
14715 - em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
14716 - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
14717 - ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
14718 -diff -ur --new-file binutils-2.21.51.0.7/ld/configure binutils-2.21.51.0.7-mint/ld/configure
14719 ---- binutils-2.21.51.0.7/ld/configure 2011-03-07 18:05:32.000000000 +0000
14720 -+++ binutils-2.21.51.0.7-mint/ld/configure 2011-04-08 10:07:28.000000000 +0000
14721 -@@ -16557,7 +16557,7 @@
14722 -
14723 -
14724 - case "${host}" in
14725 --*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
14726 -+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-mint*)
14727 -
14728 - $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
14729 - ;;
14730 -diff -ur --new-file binutils-2.21.51.0.7/ld/configure.tgt binutils-2.21.51.0.7-mint/ld/configure.tgt
14731 ---- binutils-2.21.51.0.7/ld/configure.tgt 2011-01-04 17:51:04.000000000 +0000
14732 -+++ binutils-2.21.51.0.7-mint/ld/configure.tgt 2011-04-08 10:07:28.000000000 +0000
14733 -@@ -344,6 +344,7 @@
14734 - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
14735 - m68k-*-uclinux*) targ_emul=m68kelf ;;
14736 - m68*-*-gnu*) targ_emul=m68kelf ;;
14737 -+m68*-*-mint*) targ_emul=m68kmint ;;
14738 - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
14739 - targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
14740 - m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
14741 -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
14742 ---- binutils-2.21.51.0.7/ld/emulparams/m68kmint.sh 1970-01-01 00:00:00.000000000 +0000
14743 -+++ binutils-2.21.51.0.7-mint/ld/emulparams/m68kmint.sh 2011-04-08 10:07:28.000000000 +0000
14744 -@@ -0,0 +1,6 @@
14745 -+SCRIPT_NAME=m68kmint
14746 -+OUTPUT_FORMAT="a.out-mintprg"
14747 -+RELOCATEABLE_OUTPUT_FORMAT="a.out-zero-big"
14748 -+TEXT_START_ADDR=0xe4
14749 -+ARCH=m68k
14750 -+EXTRA_EM_FILE=mint
14751 -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
14752 ---- binutils-2.21.51.0.7/ld/emultempl/mint.em 1970-01-01 00:00:00.000000000 +0000
14753 -+++ binutils-2.21.51.0.7-mint/ld/emultempl/mint.em 2011-04-08 10:07:28.000000000 +0000
14754 -@@ -0,0 +1,330 @@
14755 -+# This shell script emits a C file. -*- C -*-
14756 -+# Copyright 2006, 2007 Free Software Foundation, Inc.
14757 -+#
14758 -+# This file is part of the GNU Binutils.
14759 -+#
14760 -+# This program is free software; you can redistribute it and/or modify
14761 -+# it under the terms of the GNU General Public License as published by
14762 -+# the Free Software Foundation; either version 3 of the License, or
14763 -+# (at your option) any later version.
14764 -+#
14765 -+# This program is distributed in the hope that it will be useful,
14766 -+# but WITHOUT ANY WARRANTY; without even the implied warranty of
14767 -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14768 -+# GNU General Public License for more details.
14769 -+#
14770 -+# You should have received a copy of the GNU General Public License
14771 -+# along with this program; if not, write to the Free Software
14772 -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
14773 -+# MA 02110-1301, USA.
14774 -+#
14775 -+
14776 -+# This file is sourced from generic.em
14777 -+#
14778 -+fragment <<EOF
14779 -+
14780 -+#include "getopt.h"
14781 -+#include "ldgram.h"
14782 -+
14783 -+/* Standard GEMDOS program flags. */
14784 -+#define _MINT_F_FASTLOAD 0x01 /* Don't clear heap. */
14785 -+#define _MINT_F_ALTLOAD 0x02 /* OK to load in alternate RAM. */
14786 -+#define _MINT_F_ALTALLOC 0x04 /* OK to malloc from alt. RAM. */
14787 -+#define _MINT_F_BESTFIT 0x08 /* Load with optimal heap size. */
14788 -+/* The memory flags are mutually exclusive. */
14789 -+#define _MINT_F_MEMPROTECTION 0xf0 /* Masks out protection bits. */
14790 -+#define _MINT_F_MEMPRIVATE 0x00 /* Memory is private. */
14791 -+#define _MINT_F_MEMGLOBAL 0x10 /* Read/write access to mem allowed. */
14792 -+#define _MINT_F_MEMSUPER 0x20 /* Only supervisor access allowed. */
14793 -+#define _MINT_F_MEMREADABLE 0x30 /* Any read access OK. */
14794 -+#define _MINT_F_SHTEXT 0x800 /* Program's text may be shared */
14795 -+
14796 -+/* Option flags. */
14797 -+static flagword prg_flags = (_MINT_F_FASTLOAD | _MINT_F_ALTLOAD
14798 -+ | _MINT_F_ALTALLOC | _MINT_F_MEMPRIVATE);
14799 -+
14800 -+/* If override_stack_size is TRUE, then the executable stack size
14801 -+ * must be overriden with the value of stack_size. */
14802 -+static bfd_boolean override_stack_size = FALSE;
14803 -+static bfd_signed_vma stack_size;
14804 -+
14805 -+/* MiNT format extra command line options. */
14806 -+
14807 -+/* Used for setting flags in the MiNT header. */
14808 -+#define OPTION_FASTLOAD (300)
14809 -+#define OPTION_NO_FASTLOAD (OPTION_FASTLOAD + 1)
14810 -+#define OPTION_FASTRAM (OPTION_NO_FASTLOAD + 1)
14811 -+#define OPTION_NO_FASTRAM (OPTION_FASTRAM + 1)
14812 -+#define OPTION_FASTALLOC (OPTION_NO_FASTRAM + 1)
14813 -+#define OPTION_NO_FASTALLOC (OPTION_FASTALLOC + 1)
14814 -+#define OPTION_BESTFIT (OPTION_NO_FASTALLOC + 1)
14815 -+#define OPTION_NO_BESTFIT (OPTION_BESTFIT + 1)
14816 -+#define OPTION_BASEREL (OPTION_NO_BESTFIT + 1)
14817 -+#define OPTION_NO_BASEREL (OPTION_BASEREL + 1)
14818 -+#define OPTION_MEM_PRIVATE (OPTION_NO_BASEREL + 1)
14819 -+#define OPTION_MEM_GLOBAL (OPTION_MEM_PRIVATE + 1)
14820 -+#define OPTION_MEM_SUPER (OPTION_MEM_GLOBAL + 1)
14821 -+#define OPTION_MEM_READONLY (OPTION_MEM_SUPER + 1)
14822 -+#define OPTION_PRG_FLAGS (OPTION_MEM_READONLY + 1)
14823 -+#define OPTION_STACK (OPTION_PRG_FLAGS + 1)
14824 -+
14825 -+static void
14826 -+gld${EMULATION_NAME}_add_options
14827 -+ (int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
14828 -+ struct option **longopts, int nrl ATTRIBUTE_UNUSED,
14829 -+ struct option **really_longopts ATTRIBUTE_UNUSED)
14830 -+{
14831 -+ static const struct option xtra_long[] = {
14832 -+ {"mfastload", no_argument, NULL, OPTION_FASTLOAD},
14833 -+ {"mno-fastload", no_argument, NULL, OPTION_NO_FASTLOAD},
14834 -+ {"mfastram", no_argument, NULL, OPTION_FASTRAM},
14835 -+ {"mno-fastram", no_argument, NULL, OPTION_NO_FASTRAM},
14836 -+ {"maltram", no_argument, NULL, OPTION_FASTRAM},
14837 -+ {"mno-altram", no_argument, NULL, OPTION_NO_FASTRAM},
14838 -+ {"mfastalloc", no_argument, NULL, OPTION_FASTALLOC},
14839 -+ {"mno-fastalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
14840 -+ {"maltalloc", no_argument, NULL, OPTION_FASTALLOC},
14841 -+ {"mno-altalloc", no_argument, NULL, OPTION_NO_FASTALLOC},
14842 -+ {"mbest-fit", no_argument, NULL, OPTION_BESTFIT},
14843 -+ {"mno-best-fit", no_argument, NULL, OPTION_NO_BESTFIT},
14844 -+ {"mbaserel", no_argument, NULL, OPTION_BASEREL},
14845 -+ {"mno-baserel", no_argument, NULL, OPTION_NO_BASEREL},
14846 -+ {"mshared-text", no_argument, NULL, OPTION_BASEREL},
14847 -+ {"mno-shared-text", no_argument, NULL, OPTION_NO_BASEREL},
14848 -+ {"msharable-text", no_argument, NULL, OPTION_BASEREL},
14849 -+ {"mno-sharable-text", no_argument, NULL, OPTION_NO_BASEREL},
14850 -+ /* Memory protection bits. */
14851 -+ {"mprivate-memory", no_argument, NULL, OPTION_MEM_PRIVATE },
14852 -+ {"mglobal-memory", no_argument, NULL, OPTION_MEM_GLOBAL},
14853 -+ {"msuper-memory", no_argument, NULL, OPTION_MEM_SUPER},
14854 -+ {"mreadable-memory", no_argument, NULL, OPTION_MEM_READONLY},
14855 -+ {"mreadonly-memory", no_argument, NULL, OPTION_MEM_READONLY},
14856 -+ {"mprg-flags", required_argument, NULL, OPTION_PRG_FLAGS},
14857 -+ {"stack", required_argument, NULL, OPTION_STACK},
14858 -+ {NULL, no_argument, NULL, 0}
14859 -+ };
14860 -+
14861 -+ *longopts = (struct option *)
14862 -+ xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
14863 -+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
14864 -+}
14865 -+
14866 -+static bfd_boolean
14867 -+gld${EMULATION_NAME}_handle_option (int optc)
14868 -+{
14869 -+ switch (optc)
14870 -+ {
14871 -+ default:
14872 -+ return FALSE;
14873 -+
14874 -+ case OPTION_FASTLOAD:
14875 -+ prg_flags |= _MINT_F_FASTLOAD;
14876 -+ break;
14877 -+
14878 -+ case OPTION_NO_FASTLOAD:
14879 -+ prg_flags &= ~_MINT_F_FASTLOAD;
14880 -+ break;
14881 -+
14882 -+ case OPTION_FASTRAM:
14883 -+ prg_flags |= _MINT_F_ALTLOAD;
14884 -+ break;
14885 -+
14886 -+ case OPTION_NO_FASTRAM:
14887 -+ prg_flags &= ~_MINT_F_ALTLOAD;
14888 -+ break;
14889 -+
14890 -+ case OPTION_FASTALLOC:
14891 -+ prg_flags |= _MINT_F_ALTALLOC;
14892 -+ break;
14893 -+
14894 -+ case OPTION_NO_FASTALLOC:
14895 -+ prg_flags &= ~_MINT_F_ALTALLOC;
14896 -+ break;
14897 -+
14898 -+ case OPTION_BESTFIT:
14899 -+ prg_flags |= _MINT_F_BESTFIT;
14900 -+ break;
14901 -+
14902 -+ case OPTION_NO_BESTFIT:
14903 -+ prg_flags &= ~_MINT_F_BESTFIT;
14904 -+ break;
14905 -+
14906 -+ case OPTION_BASEREL:
14907 -+ prg_flags |= _MINT_F_SHTEXT;
14908 -+ break;
14909 -+
14910 -+ case OPTION_NO_BASEREL:
14911 -+ prg_flags &= ~_MINT_F_SHTEXT;
14912 -+ break;
14913 -+
14914 -+ case OPTION_MEM_PRIVATE:
14915 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
14916 -+ break;
14917 -+
14918 -+ case OPTION_MEM_GLOBAL:
14919 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
14920 -+ prg_flags |= _MINT_F_MEMPRIVATE;
14921 -+ break;
14922 -+
14923 -+ case OPTION_MEM_SUPER:
14924 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
14925 -+ prg_flags |= _MINT_F_MEMSUPER;
14926 -+ break;
14927 -+
14928 -+ case OPTION_MEM_READONLY:
14929 -+ prg_flags &= ~_MINT_F_MEMPROTECTION;
14930 -+ prg_flags |= _MINT_F_MEMREADABLE;
14931 -+ break;
14932 -+
14933 -+ case OPTION_PRG_FLAGS:
14934 -+ {
14935 -+ char* tail;
14936 -+ unsigned long flag_value = strtoul (optarg, &tail, 0);
14937 -+
14938 -+ if (*tail != '\0')
14939 -+ einfo (_("%P: warning: ignoring invalid program flags %s\n"), optarg);
14940 -+ else
14941 -+ prg_flags = flag_value;
14942 -+
14943 -+ break;
14944 -+ }
14945 -+ case OPTION_STACK:
14946 -+ {
14947 -+ char* tail;
14948 -+ long size = strtol (optarg, &tail, 0);
14949 -+
14950 -+ if (*tail == 'K' || *tail == 'k')
14951 -+ {
14952 -+ size *= 1024;
14953 -+ ++tail;
14954 -+ }
14955 -+ else if (*tail == 'M' || *tail == 'm')
14956 -+ {
14957 -+ size *= 1024*1024;
14958 -+ ++tail;
14959 -+ }
14960 -+
14961 -+ if (*tail != '\0')
14962 -+ einfo (_("%P: warning: ignoring invalid stack size %s\n"), optarg);
14963 -+ else
14964 -+ {
14965 -+ stack_size = (bfd_signed_vma) size;
14966 -+ override_stack_size = TRUE;
14967 -+ }
14968 -+
14969 -+ break;
14970 -+ }
14971 -+ }
14972 -+ return TRUE;
14973 -+}
14974 -+
14975 -+/* This callback is called when ld is invoked
14976 -+ with the --help and --target-help options. */
14977 -+
14978 -+static void
14979 -+gld_${EMULATION_NAME}_list_options (FILE *file)
14980 -+{
14981 -+ fprintf (file, _(" --m[no-]fastload Enable/Disable not cleaning the heap on startup\n"));
14982 -+ fprintf (file, _(" --m[no-]altram, --m[no-]fastram\n"));
14983 -+ fprintf (file, _(" Enable/Disable loading into alternate RAM\n"));
14984 -+ fprintf (file, _(" --m[no-]altalloc, --m[no-]fastalloc\n"));
14985 -+ fprintf (file, _(" Enable/Disable malloc from alternate RAM\n"));
14986 -+ fprintf (file, _(" --m[no-]best-fit Enable/Disable loading with optimal heap size\n"));
14987 -+ fprintf (file, _(" --m[no-]sharable-text, --m[no-]shared-text, --m[no-]baserel\n"));
14988 -+ fprintf (file, _(" Enable/Disable sharing the text segment\n"));
14989 -+ fprintf (file, "\n");
14990 -+ fprintf (file, _("The following memory options are mutually exclusive:\n"));
14991 -+ fprintf (file, _(" --mprivate-memory Process memory is not accessible\n"));
14992 -+ fprintf (file, _(" --mglobal-memory Process memory is readable and writable\n"));
14993 -+ fprintf (file, _(" --msuper-memory Process memory is accessible in supervisor mode\n"));
14994 -+ fprintf (file, _(" --mreadonly-memory, --mreadable-memory\n"));
14995 -+ fprintf (file, _(" Process memory is readable but not writable\n"));
14996 -+ fprintf (file, "\n");
14997 -+ fprintf (file, _(" --mprg-flags <value> Set all the flags with an integer raw value\n"));
14998 -+ fprintf (file, _(" --stack <size> Override the stack size (suffix k or M allowed)\n"));
14999 -+}
15000 -+
15001 -+/* This callback is called by lang_for_each_statement. It checks that the
15002 -+ output sections speficied in the linker script are compatible with the MiNT
15003 -+ executable format. */
15004 -+
15005 -+static void
15006 -+gld${EMULATION_NAME}_check_output_sections (lang_statement_union_type *s)
15007 -+{
15008 -+ if (s->header.type == lang_output_section_statement_enum)
15009 -+ {
15010 -+ lang_output_section_statement_type *oss = &s->output_section_statement;
15011 -+
15012 -+ if (strcmp(oss->name, ".text") == 0 && oss->bfd_section->vma != ${TEXT_START_ADDR})
15013 -+ einfo (_("%F%P: the VMA of section %A must be 0x%V, but actual value is 0x%V\n"),
15014 -+ oss->bfd_section, ${TEXT_START_ADDR}, oss->bfd_section->vma);
15015 -+ else if (strcmp(oss->name, ".data") == 0 && oss->addr_tree != NULL)
15016 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
15017 -+ oss->bfd_section);
15018 -+ else if (strcmp(oss->name, ".bss") == 0 && oss->addr_tree != NULL)
15019 -+ einfo (_("%F%P: the VMA of section %A must not be specified\n"),
15020 -+ oss->bfd_section);
15021 -+ }
15022 -+}
15023 -+
15024 -+/* This callback is called by lang_for_each_statement. It looks for the data
15025 -+ statements of type REL generated by the linker, and adds a TPA relocation
15026 -+ entry for them. This is used by the CONSTRUCTORS list. */
15027 -+
15028 -+static void
15029 -+gld${EMULATION_NAME}_add_tpa_relocs (lang_statement_union_type *s)
15030 -+{
15031 -+ if (s->header.type == lang_data_statement_enum)
15032 -+ {
15033 -+ lang_data_statement_type *ds = &s->data_statement;
15034 -+
15035 -+ if (ds->exp->type.node_code == REL)
15036 -+ {
15037 -+ if (ds->type == LONG)
15038 -+ {
15039 -+ bfd_vma tpa_address = ds->output_section->vma + ds->output_offset;
15040 -+ if (!bfd_m68kmint_add_tpa_relocation_entry(link_info.output_bfd, tpa_address))
15041 -+ einfo (_("%F%P:%B: unable to add a relocation entry\n"), link_info.output_bfd);
15042 -+ }
15043 -+ else
15044 -+ {
15045 -+ einfo (_("%F%P:%B: invalid size for TPA relocation entry in section %A, offset 0x%V\n"),
15046 -+ link_info.output_bfd, ds->output_section, ds->output_offset);
15047 -+ }
15048 -+ }
15049 -+ }
15050 -+}
15051 -+
15052 -+/* Final emulation specific call. */
15053 -+
15054 -+static void
15055 -+gld${EMULATION_NAME}_finish (void)
15056 -+{
15057 -+ /* Do nothing if we are not generating a MiNT executable (ex: binary). */
15058 -+ if (strcmp (bfd_get_target (link_info.output_bfd), "${OUTPUT_FORMAT}") != 0)
15059 -+ return;
15060 -+
15061 -+ /* Check the output sections. */
15062 -+ lang_for_each_statement (gld${EMULATION_NAME}_check_output_sections);
15063 -+
15064 -+ /* Set the GEMDOS executable header flags. */
15065 -+ if (!bfd_m68kmint_set_extended_flags (link_info.output_bfd, prg_flags))
15066 -+ einfo (_("%F%P:%B: unable to set the header flags\n"), link_info.output_bfd);
15067 -+
15068 -+ /* Override the stack size. */
15069 -+ if (override_stack_size)
15070 -+ if (!bfd_m68kmint_set_stack_size (link_info.output_bfd, stack_size))
15071 -+ einfo (_("%F%P:%B: unable to set the stack size\n"), link_info.output_bfd);
15072 -+
15073 -+ /* Generate TPA relocation entries for the data statements. */
15074 -+ lang_for_each_statement (gld${EMULATION_NAME}_add_tpa_relocs);
15075 -+}
15076 -+
15077 -+EOF
15078 -+
15079 -+# Put these extra routines in ld_${EMULATION_NAME}_emulation
15080 -+#
15081 -+LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options
15082 -+LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option
15083 -+LDEMUL_LIST_OPTIONS=gld_${EMULATION_NAME}_list_options
15084 -+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
15085 -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
15086 ---- binutils-2.21.51.0.7/ld/scripttempl/m68kmint.sc 1970-01-01 00:00:00.000000000 +0000
15087 -+++ binutils-2.21.51.0.7-mint/ld/scripttempl/m68kmint.sc 2011-04-08 10:07:28.000000000 +0000
15088 -@@ -0,0 +1,35 @@
15089 -+cat <<EOF
15090 -+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
15091 -+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
15092 -+${RELOCATING+${LIB_SEARCH_DIRS}}
15093 -+SECTIONS
15094 -+{
15095 -+ ${RELOCATING+/* The VMA of the .text section is ${TEXT_START_ADDR} instead of 0
15096 -+ because the extended MiNT header is just before,
15097 -+ at the beginning of the TEXT segment. */}
15098 -+ .text ${RELOCATING+${TEXT_START_ADDR}}:
15099 -+ {
15100 -+ CREATE_OBJECT_SYMBOLS
15101 -+ *(.text)
15102 -+ ${CONSTRUCTING+CONSTRUCTORS}
15103 -+ ${RELOCATING+_etext = .;}
15104 -+ ${RELOCATING+__etext = .;}
15105 -+ }
15106 -+
15107 -+ .data :
15108 -+ {
15109 -+ *(.data)
15110 -+ ${RELOCATING+_edata = .;}
15111 -+ ${RELOCATING+__edata = .;}
15112 -+ }
15113 -+
15114 -+ .bss :
15115 -+ {
15116 -+ ${RELOCATING+__bss_start = .;}
15117 -+ *(.bss)
15118 -+ *(COMMON)
15119 -+ ${RELOCATING+_end = .;}
15120 -+ ${RELOCATING+__end = .;}
15121 -+ }
15122 -+}
15123 -+EOF
15124 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/hex.c binutils-2.21.51.0.7-mint/libiberty/hex.c
15125 ---- binutils-2.21.51.0.7/libiberty/hex.c 2007-03-16 15:48:30.000000000 +0000
15126 -+++ binutils-2.21.51.0.7-mint/libiberty/hex.c 2011-04-08 10:07:28.000000000 +0000
15127 -@@ -24,7 +24,7 @@
15128 - #include "libiberty.h"
15129 - #include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
15130 -
15131 --#if EOF != -1
15132 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
15133 - #error "hex.c requires EOF == -1"
15134 - #endif
15135 -
15136 -diff -ur --new-file binutils-2.21.51.0.7/libiberty/safe-ctype.c binutils-2.21.51.0.7-mint/libiberty/safe-ctype.c
15137 ---- binutils-2.21.51.0.7/libiberty/safe-ctype.c 2005-06-22 20:53:36.000000000 +0000
15138 -+++ binutils-2.21.51.0.7-mint/libiberty/safe-ctype.c 2011-04-08 10:07:28.000000000 +0000
15139 -@@ -119,7 +119,7 @@
15140 - #include <safe-ctype.h>
15141 - #include <stdio.h> /* for EOF */
15142 -
15143 --#if EOF != -1
15144 -+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
15145 - #error "<safe-ctype.h> requires EOF == -1"
15146 - #endif
15147 -
15148 ---- binutils-2.21.51.0.7/ld/lexsup.c 2011-04-08 15:39:47.000000000 +0000
15149 -+++ binutils-2.21.51.0.7-mint/ld/lexsup.c 2011-04-08 15:39:25.000000000 +0000
15150 -@@ -57,6 +57,9 @@
15151 - #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
15152 - #endif
15153 -
15154 -+/* Report plugin symbols. */
15155 -+bfd_boolean report_plugin_symbols;
15156 -+
15157 - static void set_default_dirlist (char *);
15158 - static void set_section_start (char *, char *);
15159 - static void set_segment_start (const char *, char *);
15160 ---- binutils-2.22/ld/plugin.c 2011-11-21 09:29:39.000000000 +0000
15161 -+++ binutils-2.22-mint/ld/plugin.c 2011-12-07 21:24:05.000000000 +0000
15162 -@@ -36,9 +36,6 @@
15163 - #include <windows.h>
15164 - #endif
15165 -
15166 --/* Report plugin symbols. */
15167 --bfd_boolean report_plugin_symbols;
15168 --
15169 - /* The suffix to append to the name of the real (claimed) object file
15170 - when generating a dummy BFD to hold the IR symbols sent from the
15171 - plugin. For cosmetic use only; appears in maps, crefs etc. */
15172 ---- binutils-2.22/libiberty/configure 2011-12-08 00:17:02.000000000 +0000
15173 -+++ binutils-2.22-mint/libiberty/configure 2011-12-08 00:17:39.000000000 +0000
15174 -@@ -4888,6 +4888,8 @@
15175 - i[34567]86-*-* | x86_64-*-*)
15176 - PICFLAG=-fpic
15177 - ;;
15178 -+ *-*-mint*)
15179 -+ ;;
15180 - m68k-*-*)
15181 - PICFLAG=-fpic
15182 - ;;
15183
15184 diff --git a/sys-devel/binutils/files/binutils-2.23-ar-ranlib-truncate.patch b/sys-devel/binutils/files/binutils-2.23-ar-ranlib-truncate.patch
15185 deleted file mode 100644
15186 index 0c5728d..0000000
15187 --- a/sys-devel/binutils/files/binutils-2.23-ar-ranlib-truncate.patch
15188 +++ /dev/null
15189 @@ -1,37 +0,0 @@
15190 -https://bugs.gentoo.org/show_bug.cgi?id=446642
15191 -
15192 -===================================================================
15193 -RCS file: /cvs/src/src/bfd/archive.c,v
15194 -retrieving revision 1.92
15195 -retrieving revision 1.93
15196 -diff -u -r1.92 -r1.93
15197 ---- src/bfd/archive.c 2012/08/20 14:32:30 1.92
15198 -+++ src/bfd/archive.c 2012/12/09 18:01:39 1.93
15199 -@@ -2424,9 +2424,6 @@
15200 - unsigned int count;
15201 - struct ar_hdr hdr;
15202 - long uid, gid;
15203 -- file_ptr max_first_real = 1;
15204 --
15205 -- max_first_real <<= 31;
15206 -
15207 - firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
15208 -
15209 -@@ -2469,6 +2466,7 @@
15210 -
15211 - for (count = 0; count < orl_count; count++)
15212 - {
15213 -+ unsigned int offset;
15214 - bfd_byte buf[BSD_SYMDEF_SIZE];
15215 -
15216 - if (map[count].u.abfd != last_elt)
15217 -@@ -2488,7 +2486,8 @@
15218 - /* The archive file format only has 4 bytes to store the offset
15219 - of the member. Check to make sure that firstreal has not grown
15220 - too big. */
15221 -- if (firstreal >= max_first_real)
15222 -+ offset = (unsigned int) firstreal;
15223 -+ if (firstreal != (file_ptr) offset)
15224 - {
15225 - bfd_set_error (bfd_error_file_truncated);
15226 - return FALSE;
15227
15228 diff --git a/sys-devel/binutils/files/binutils-2.23-mbstate_t.patch b/sys-devel/binutils/files/binutils-2.23-mbstate_t.patch
15229 deleted file mode 100644
15230 index 9c1c137..0000000
15231 --- a/sys-devel/binutils/files/binutils-2.23-mbstate_t.patch
15232 +++ /dev/null
15233 @@ -1,184 +0,0 @@
15234 -http://sourceware.org/bugzilla/show_bug.cgi?id=14779
15235 -
15236 -Index: binutils/config.in
15237 -===================================================================
15238 -RCS file: /cvs/src/src/binutils/config.in,v
15239 -retrieving revision 1.39
15240 -diff -u -3 -p -r1.39 config.in
15241 ---- binutils/config.in 10 Sep 2012 22:30:54 -0000 1.39
15242 -+++ binutils/config.in 30 Oct 2012 12:00:58 -0000
15243 -@@ -100,6 +100,9 @@
15244 - /* Define to 1 if you have the <locale.h> header file. */
15245 - #undef HAVE_LOCALE_H
15246 -
15247 -+/* Define if mbstate_t exists in wchar.h. */
15248 -+#undef HAVE_MBSTATE_T
15249 -+
15250 - /* Define to 1 if you have the <memory.h> header file. */
15251 - #undef HAVE_MEMORY_H
15252 -
15253 -@@ -160,6 +163,9 @@
15254 - /* Define to 1 if you have the `utimes' function. */
15255 - #undef HAVE_UTIMES
15256 -
15257 -+/* Define to 1 if you have the <wchar.h> header file. */
15258 -+#undef HAVE_WCHAR_H
15259 -+
15260 - /* Define to 1 if you have the <zlib.h> header file. */
15261 - #undef HAVE_ZLIB_H
15262 -
15263 -Index: binutils/configure
15264 -===================================================================
15265 -RCS file: /cvs/src/src/binutils/configure,v
15266 -retrieving revision 1.152
15267 -diff -u -3 -p -r1.152 configure
15268 ---- binutils/configure 26 Oct 2012 15:27:17 -0000 1.152
15269 -+++ binutils/configure 30 Oct 2012 12:00:59 -0000
15270 -@@ -12446,7 +12446,7 @@ case "${host}" in
15271 - esac
15272 -
15273 -
15274 --for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h
15275 -+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
15276 - do :
15277 - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15278 - ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15279 -@@ -12750,6 +12750,32 @@ $as_echo "#define HAVE_MKDTEMP 1" >>conf
15280 -
15281 - fi
15282 -
15283 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15284 -+$as_echo_n "checking for mbstate_t... " >&6; }
15285 -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15286 -+/* end confdefs.h. */
15287 -+#include <wchar.h>
15288 -+int
15289 -+main ()
15290 -+{
15291 -+mbstate_t teststate;
15292 -+ ;
15293 -+ return 0;
15294 -+}
15295 -+_ACEOF
15296 -+if ac_fn_c_try_compile "$LINENO"; then :
15297 -+ have_mbstate_t=yes
15298 -+else
15299 -+ have_mbstate_t=no
15300 -+fi
15301 -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15302 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mbstate_t" >&5
15303 -+$as_echo "$have_mbstate_t" >&6; }
15304 -+ if test x"$have_mbstate_t" = xyes; then
15305 -+
15306 -+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15307 -+
15308 -+ fi
15309 -
15310 - # Some systems have frexp only in -lm, not in -lc.
15311 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing frexp" >&5
15312 -Index: binutils/configure.in
15313 -===================================================================
15314 -RCS file: /cvs/src/src/binutils/configure.in,v
15315 -retrieving revision 1.113
15316 -diff -u -3 -p -r1.113 configure.in
15317 ---- binutils/configure.in 26 Oct 2012 15:27:18 -0000 1.113
15318 -+++ binutils/configure.in 30 Oct 2012 12:01:00 -0000
15319 -@@ -96,7 +96,7 @@ case "${host}" in
15320 - esac
15321 - AC_SUBST(DEMANGLER_NAME)
15322 -
15323 --AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h)
15324 -+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)
15325 - AC_HEADER_SYS_WAIT
15326 - ACX_HEADER_STRING
15327 - AC_FUNC_ALLOCA
15328 -@@ -107,6 +107,14 @@ AC_CHECK_FUNC([mkstemp],
15329 - AC_CHECK_FUNC([mkdtemp],
15330 - AC_DEFINE([HAVE_MKDTEMP], 1,
15331 - [Define to 1 if you have the `mkdtemp' function.]))
15332 -+ AC_MSG_CHECKING([for mbstate_t])
15333 -+ AC_TRY_COMPILE([#include <wchar.h>],
15334 -+ [mbstate_t teststate;],
15335 -+ have_mbstate_t=yes, have_mbstate_t=no)
15336 -+ AC_MSG_RESULT($have_mbstate_t)
15337 -+ if test x"$have_mbstate_t" = xyes; then
15338 -+ AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.])
15339 -+ fi
15340 -
15341 - # Some systems have frexp only in -lm, not in -lc.
15342 - AC_SEARCH_LIBS(frexp, m)
15343 -Index: binutils/readelf.c
15344 -===================================================================
15345 -RCS file: /cvs/src/src/binutils/readelf.c,v
15346 -retrieving revision 1.583
15347 -diff -u -3 -p -r1.583 readelf.c
15348 ---- binutils/readelf.c 24 Oct 2012 01:59:39 -0000 1.583
15349 -+++ binutils/readelf.c 30 Oct 2012 12:01:00 -0000
15350 -@@ -48,7 +48,9 @@
15351 - #ifdef HAVE_ZLIB_H
15352 - #include <zlib.h>
15353 - #endif
15354 -+#ifdef HAVE_WCHAR_H
15355 - #include <wchar.h>
15356 -+#endif
15357 -
15358 - #if __GNUC__ >= 2
15359 - /* Define BFD64 here, even if our default architecture is 32 bit ELF
15360 -@@ -386,7 +388,7 @@ print_vma (bfd_vma vma, print_mode mode)
15361 - }
15362 -
15363 - /* Display a symbol on stdout. Handles the display of control characters and
15364 -- multibye characters.
15365 -+ multibye characters (assuming the host environment supports them).
15366 -
15367 - Display at most abs(WIDTH) characters, truncating as necessary, unless do_wide is true.
15368 -
15369 -@@ -400,7 +402,9 @@ print_symbol (int width, const char *sym
15370 - {
15371 - bfd_boolean extra_padding = FALSE;
15372 - int num_printed = 0;
15373 -+#ifdef HAVE_MBSTATE_T
15374 - mbstate_t state;
15375 -+#endif
15376 - int width_remaining;
15377 -
15378 - if (width < 0)
15379 -@@ -417,13 +421,14 @@ print_symbol (int width, const char *sym
15380 - else
15381 - width_remaining = width;
15382 -
15383 -+#ifdef HAVE_MBSTATE_T
15384 - /* Initialise the multibyte conversion state. */
15385 - memset (& state, 0, sizeof (state));
15386 -+#endif
15387 -
15388 - while (width_remaining)
15389 - {
15390 - size_t n;
15391 -- wchar_t w;
15392 - const char c = *symbol++;
15393 -
15394 - if (c == 0)
15395 -@@ -449,15 +454,22 @@ print_symbol (int width, const char *sym
15396 - }
15397 - else
15398 - {
15399 -+#ifdef HAVE_MBSTATE_T
15400 -+ wchar_t w;
15401 -+#endif
15402 - /* Let printf do the hard work of displaying multibyte characters. */
15403 - printf ("%.1s", symbol - 1);
15404 - width_remaining --;
15405 - num_printed ++;
15406 -
15407 -+#ifdef HAVE_MBSTATE_T
15408 - /* Try to find out how many bytes made up the character that was
15409 - just printed. Advance the symbol pointer past the bytes that
15410 - were displayed. */
15411 - n = mbrtowc (& w, symbol - 1, MB_CUR_MAX, & state);
15412 -+#else
15413 -+ n = 1;
15414 -+#endif
15415 - if (n != (size_t) -1 && n != (size_t) -2 && n > 0)
15416 - symbol += (n - 1);
15417 - }
15418
15419 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
15420 deleted file mode 100644
15421 index 6436192..0000000
15422 --- a/sys-devel/binutils/files/binutils-2.23-no-ld-script-sysroot.patch
15423 +++ /dev/null
15424 @@ -1,13 +0,0 @@
15425 -Index: binutils-2.23/ld/ldfile.c
15426 -===================================================================
15427 ---- binutils-2.23.orig/ld/ldfile.c
15428 -+++ binutils-2.23/ld/ldfile.c
15429 -@@ -463,7 +463,7 @@ try_open (const char *name, bfd_boolean
15430 - result = fopen (name, "r");
15431 -
15432 - if (result != NULL)
15433 -- *sysrooted = is_sysrooted_pathname (name);
15434 -+ *sysrooted = 0;
15435 -
15436 - if (verbose)
15437 - {
15438
15439 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
15440 deleted file mode 100644
15441 index 023c706..0000000
15442 --- a/sys-devel/binutils/files/binutils-2.23-no-rpath-sysroot.patch
15443 +++ /dev/null
15444 @@ -1,44 +0,0 @@
15445 -do not prepend rpath with sysroot
15446 -Index: binutils-2.23/ld/emultempl/elf32.em
15447 -===================================================================
15448 ---- binutils-2.23.orig/ld/emultempl/elf32.em
15449 -+++ binutils-2.23/ld/emultempl/elf32.em
15450 -@@ -524,35 +524,10 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then
15451 - static char *
15452 - gld${EMULATION_NAME}_add_sysroot (const char *path)
15453 - {
15454 -- int len, colons, i;
15455 -- char *ret, *p;
15456 -+ char *ret;
15457 -+ ret = xmalloc (strlen (path) + 1);
15458 -+ strcpy (ret, path);
15459 -
15460 -- len = strlen (path);
15461 -- colons = 0;
15462 -- i = 0;
15463 -- while (path[i])
15464 -- if (path[i++] == config.rpath_separator)
15465 -- colons++;
15466 --
15467 -- if (path[i])
15468 -- colons++;
15469 --
15470 -- len = len + (colons + 1) * strlen (ld_sysroot);
15471 -- ret = xmalloc (len + 1);
15472 -- strcpy (ret, ld_sysroot);
15473 -- p = ret + strlen (ret);
15474 -- i = 0;
15475 -- while (path[i])
15476 -- if (path[i] == config.rpath_separator)
15477 -- {
15478 -- *p++ = path[i++];
15479 -- strcpy (p, ld_sysroot);
15480 -- p = p + strlen (p);
15481 -- }
15482 -- else
15483 -- *p++ = path[i++];
15484 --
15485 -- *p = 0;
15486 - return ret;
15487 - }
15488 -
15489
15490 diff --git a/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch b/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch
15491 deleted file mode 100644
15492 index dd280e3..0000000
15493 --- a/sys-devel/binutils/files/binutils-2.23-runtime-sysroot.patch
15494 +++ /dev/null
15495 @@ -1,211 +0,0 @@
15496 -The feature sysroot originally for cross compiling has two parts. The
15497 -first is to prepend lib path, done in configure phase, which we call
15498 -configure-time sysroot. The second is to prepend rpath in libraries
15499 -and path inside ld scripts when ld is called, which we call runtime
15500 -sysroot.
15501 -
15502 -In the case of cross compilation, both are needed. While in the case
15503 -of native sysroot, which runs userland in a directory prefix natively,
15504 -only configure-time sysroot is needed.
15505 -
15506 -Here we add an additional option of --enable-runtime-sysroot to fine
15507 -control such features.
15508 -
15509 -2013-08-25 Benda Xu <heroxbd@g.o>
15510 -
15511 - * configure.in: add enable-runtime-sysroot to control the
15512 - macro ENABLE_RUNTIME_SYSROOT
15513 - * emultempl/elf32.em: only prepend rpath with sysroot when
15514 - ENABLE_RUNTIME_SYSROOT is defined
15515 - * ldfile.c: only prepend lib path with sysroot when
15516 - ENABLE_RUNTIME_SYSROOT is defined
15517 - * ld.texinfo: document this new behavior for ld script
15518 -
15519 -Index: binutils-2.23/ld/configure.in
15520 -===================================================================
15521 ---- binutils-2.23.orig/ld/configure.in
15522 -+++ binutils-2.23/ld/configure.in
15523 -@@ -70,6 +70,18 @@ AC_SUBST(use_sysroot)
15524 - AC_SUBST(TARGET_SYSTEM_ROOT)
15525 - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
15526 -
15527 -+AC_ARG_ENABLE(runtime-sysroot,
15528 -+[AS_HELP_STRING([--enable-runtime-sysroot],
15529 -+ [prepend sysroot to libpath in ld script and rpath,
15530 -+ only used in addition to --with-sysroot (default is yes)])],
15531 -+[case "${enableval}" in
15532 -+ no) ;;
15533 -+ *) AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \
15534 -+ [prepend sysroot to libpath in ld script and rpath]) ;;
15535 -+esac],
15536 -+AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \
15537 -+ [prepend sysroot to libpath in ld script and rpath]))
15538 -+
15539 - dnl Use --enable-gold to decide if this linker should be the default.
15540 - dnl "install_as_default" is set to false if gold is the default linker.
15541 - dnl "installed_linker" is the installed BFD linker name.
15542 -Index: binutils-2.23/ld/emultempl/elf32.em
15543 -===================================================================
15544 ---- binutils-2.23.orig/ld/emultempl/elf32.em
15545 -+++ binutils-2.23/ld/emultempl/elf32.em
15546 -@@ -525,7 +525,10 @@ static char *
15547 - gld${EMULATION_NAME}_add_sysroot (const char *path)
15548 - {
15549 - int len, colons, i;
15550 -- char *ret, *p;
15551 -+ char *ret;
15552 -+
15553 -+#ifdef ENABLE_RUNTIME_SYSROOT
15554 -+ char *p;
15555 -
15556 - len = strlen (path);
15557 - colons = 0;
15558 -@@ -553,6 +556,11 @@ gld${EMULATION_NAME}_add_sysroot (const
15559 - *p++ = path[i++];
15560 -
15561 - *p = 0;
15562 -+#else
15563 -+ ret = xmalloc (strlen (path) + 1);
15564 -+ strcpy (ret, path);
15565 -+#endif
15566 -+
15567 - return ret;
15568 - }
15569 -
15570 -Index: binutils-2.23/ld/ldfile.c
15571 -===================================================================
15572 ---- binutils-2.23.orig/ld/ldfile.c
15573 -+++ binutils-2.23/ld/ldfile.c
15574 -@@ -463,7 +463,11 @@ try_open (const char *name, bfd_boolean
15575 - result = fopen (name, "r");
15576 -
15577 - if (result != NULL)
15578 -+#ifdef ENABLE_RUNTIME_SYSROOT
15579 - *sysrooted = is_sysrooted_pathname (name);
15580 -+#else
15581 -+ *sysrooted = 0;
15582 -+#endif
15583 -
15584 - if (verbose)
15585 - {
15586 -Index: binutils-2.23/ld/ld.texinfo
15587 -===================================================================
15588 ---- binutils-2.23.orig/ld/ld.texinfo
15589 -+++ binutils-2.23/ld/ld.texinfo
15590 -@@ -3026,13 +3026,14 @@ then you can put @samp{INPUT (subr.o)} i
15591 - In fact, if you like, you can list all of your input files in the linker
15592 - script, and then invoke the linker with nothing but a @samp{-T} option.
15593 -
15594 --In case a @dfn{sysroot prefix} is configured, and the filename starts
15595 --with the @samp{/} character, and the script being processed was
15596 --located inside the @dfn{sysroot prefix}, the filename will be looked
15597 --for in the @dfn{sysroot prefix}. Otherwise, the linker will try to
15598 --open the file in the current directory. If it is not found, the
15599 --linker will search through the archive library search path. See the
15600 --description of @samp{-L} in @ref{Options,,Command Line Options}.
15601 -+In case a @dfn{sysroot prefix} is configured without explict
15602 -+--disable-runtime-sysroot, and the filename starts with the @samp{/}
15603 -+character, and the script being processed was located inside the
15604 -+@dfn{sysroot prefix}, the filename will be looked for in the
15605 -+@dfn{sysroot prefix}. Otherwise, the linker will try to open the file
15606 -+in the current directory. If it is not found, the linker will search
15607 -+through the archive library search path. See the description of
15608 -+@samp{-L} in @ref{Options,,Command Line Options}.
15609 -
15610 - If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
15611 - name to @code{lib@var{file}.a}, as with the command line argument
15612 -Index: binutils-2.23/ld/configure
15613 -===================================================================
15614 ---- binutils-2.23.orig/ld/configure
15615 -+++ binutils-2.23/ld/configure
15616 -@@ -773,6 +773,7 @@ with_lib_path
15617 - enable_targets
15618 - enable_64_bit_bfd
15619 - with_sysroot
15620 -+enable_runtime_sysroot
15621 - enable_gold
15622 - enable_got
15623 - enable_werror
15624 -@@ -1428,6 +1429,10 @@ Optional Features:
15625 - (and sometimes confusing) to the casual installer
15626 - --enable-targets alternative target configurations
15627 - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
15628 -+ --enable-runtime-sysroot
15629 -+ prepend sysroot to libpath in ld script and rpath,
15630 -+ only used in addition to --with-sysroot (default is
15631 -+ yes)
15632 - --enable-gold[=ARG] build gold [ARG={default,yes,no}]
15633 - --enable-got=<type> GOT handling scheme (target, single, negative,
15634 - multigot)
15635 -@@ -4317,6 +4322,21 @@ fi
15636 -
15637 -
15638 -
15639 -+# Check whether --enable-runtime-sysroot was given.
15640 -+if test "${enable_runtime_sysroot+set}" = set; then :
15641 -+ enableval=$enable_runtime_sysroot; case "${enableval}" in
15642 -+ no) ;;
15643 -+ *)
15644 -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h
15645 -+ ;;
15646 -+esac
15647 -+else
15648 -+
15649 -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h
15650 -+
15651 -+fi
15652 -+
15653 -+
15654 - # Check whether --enable-gold was given.
15655 - if test "${enable_gold+set}" = set; then :
15656 - enableval=$enable_gold; case "${enableval}" in
15657 -@@ -6744,7 +6764,7 @@ else
15658 - lt_cv_sys_max_cmd_len=8192;
15659 - ;;
15660 -
15661 -- mint* | amigaos*)
15662 -+ amigaos*)
15663 - # On AmigaOS with pdksh, this test takes hours, literally.
15664 - # So we just punt and use a minimum line length of 8192.
15665 - lt_cv_sys_max_cmd_len=8192;
15666 -@@ -12177,7 +12197,7 @@ else
15667 - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15668 - lt_status=$lt_dlunknown
15669 - cat > conftest.$ac_ext <<_LT_EOF
15670 --#line 12180 "configure"
15671 -+#line 12200 "configure"
15672 - #include "confdefs.h"
15673 -
15674 - #if HAVE_DLFCN_H
15675 -@@ -12283,7 +12303,7 @@ else
15676 - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15677 - lt_status=$lt_dlunknown
15678 - cat > conftest.$ac_ext <<_LT_EOF
15679 --#line 12286 "configure"
15680 -+#line 12306 "configure"
15681 - #include "confdefs.h"
15682 -
15683 - #if HAVE_DLFCN_H
15684 -Index: binutils-2.23/ld/config.in
15685 -===================================================================
15686 ---- binutils-2.23.orig/ld/config.in
15687 -+++ binutils-2.23/ld/config.in
15688 -@@ -2,7 +2,7 @@
15689 -
15690 - /* Check that config.h is #included before system headers
15691 - (this works only for glibc, but that should be enough). */
15692 --#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
15693 -+#if defined(__GLIBC__) && !defined(__CONFIG_H__)
15694 - # error config.h must be #included before system headers
15695 - #endif
15696 - #define __CONFIG_H__ 1
15697 -@@ -11,6 +11,9 @@
15698 - language is requested. */
15699 - #undef ENABLE_NLS
15700 -
15701 -+/* prepend sysroot to libpath in ld script and rpath */
15702 -+#undef ENABLE_RUNTIME_SYSROOT
15703 -+
15704 - /* Additional extension a shared object might have. */
15705 - #undef EXTRA_SHLIB_EXTENSION
15706 -
15707
15708 diff --git a/sys-devel/binutils/files/binutils-2.24-native-lib.patch b/sys-devel/binutils/files/binutils-2.24-native-lib.patch
15709 deleted file mode 100644
15710 index 261b491..0000000
15711 --- a/sys-devel/binutils/files/binutils-2.24-native-lib.patch
15712 +++ /dev/null
15713 @@ -1,13 +0,0 @@
15714 -Index: ld/configure.tgt
15715 -===================================================================
15716 ---- ld.orig/configure.tgt
15717 -+++ ld/configure.tgt
15718 -@@ -769,7 +769,7 @@ z8k-*-coff) targ_emul=z8002; targ_extr
15719 -
15720 - esac
15721 -
15722 --NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
15723 -+NATIVE_LIB_DIRS='@GENTOO_PORTAGE_EPREFIX@/usr/local/lib @GENTOO_PORTAGE_EPREFIX@/lib @GENTOO_PORTAGE_EPREFIX@/usr/lib'
15724 - case "${target}" in
15725 -
15726 - *-*-dragonfly*)
15727
15728 diff --git a/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch b/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch
15729 deleted file mode 100644
15730 index fde8660..0000000
15731 --- a/sys-devel/binutils/files/binutils-2.24-runtime-sysroot.patch
15732 +++ /dev/null
15733 @@ -1,202 +0,0 @@
15734 -The feature sysroot originally for cross compiling has two parts. The
15735 -first is to prepend lib path, done in configure phase, which we call
15736 -configure-time sysroot. The second is to prepend rpath in libraries
15737 -and path inside ld scripts when ld is called, which we call runtime
15738 -sysroot.
15739 -
15740 -In the case of cross compilation, both are needed. While in the case
15741 -of native sysroot, which runs userland in a directory prefix natively,
15742 -only configure-time sysroot is needed.
15743 -
15744 -Here we add an additional option of --enable-runtime-sysroot to fine
15745 -control such features.
15746 -
15747 -2013-08-25 Benda Xu <heroxbd@g.o>
15748 -
15749 - * configure.in: add enable-runtime-sysroot to control the
15750 - macro ENABLE_RUNTIME_SYSROOT
15751 - * emultempl/elf32.em: only prepend rpath with sysroot when
15752 - ENABLE_RUNTIME_SYSROOT is defined
15753 - * ldfile.c: only prepend lib path with sysroot when
15754 - ENABLE_RUNTIME_SYSROOT is defined
15755 - * ld.texinfo: document this new behavior for ld script
15756 -
15757 -Index: binutils-2.24/ld/configure.in
15758 -===================================================================
15759 ---- binutils-2.24.orig/ld/configure.in
15760 -+++ binutils-2.24/ld/configure.in
15761 -@@ -87,6 +87,18 @@ AC_SUBST(use_sysroot)
15762 - AC_SUBST(TARGET_SYSTEM_ROOT)
15763 - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
15764 -
15765 -+AC_ARG_ENABLE(runtime-sysroot,
15766 -+[AS_HELP_STRING([--enable-runtime-sysroot],
15767 -+ [prepend sysroot to libpath in ld script and rpath,
15768 -+ only used in addition to --with-sysroot (default is yes)])],
15769 -+[case "${enableval}" in
15770 -+ no) ;;
15771 -+ *) AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \
15772 -+ [prepend sysroot to libpath in ld script and rpath]) ;;
15773 -+esac],
15774 -+AC_DEFINE(ENABLE_RUNTIME_SYSROOT, [], \
15775 -+ [prepend sysroot to libpath in ld script and rpath]))
15776 -+
15777 - dnl Use --enable-gold to decide if this linker should be the default.
15778 - dnl "install_as_default" is set to false if gold is the default linker.
15779 - dnl "installed_linker" is the installed BFD linker name.
15780 -Index: binutils-2.24/ld/emultempl/elf32.em
15781 -===================================================================
15782 ---- binutils-2.24.orig/ld/emultempl/elf32.em
15783 -+++ binutils-2.24/ld/emultempl/elf32.em
15784 -@@ -529,7 +529,10 @@ static char *
15785 - gld${EMULATION_NAME}_add_sysroot (const char *path)
15786 - {
15787 - int len, colons, i;
15788 -- char *ret, *p;
15789 -+ char *ret;
15790 -+
15791 -+#ifdef ENABLE_RUNTIME_SYSROOT
15792 -+ char *p;
15793 -
15794 - len = strlen (path);
15795 - colons = 0;
15796 -@@ -557,6 +560,11 @@ gld${EMULATION_NAME}_add_sysroot (const
15797 - *p++ = path[i++];
15798 -
15799 - *p = 0;
15800 -+#else
15801 -+ ret = xmalloc (strlen (path) + 1);
15802 -+ strcpy (ret, path);
15803 -+#endif
15804 -+
15805 - return ret;
15806 - }
15807 -
15808 -Index: binutils-2.24/ld/ldfile.c
15809 -===================================================================
15810 ---- binutils-2.24.orig/ld/ldfile.c
15811 -+++ binutils-2.24/ld/ldfile.c
15812 -@@ -463,7 +463,11 @@ try_open (const char *name, bfd_boolean
15813 - result = fopen (name, "r");
15814 -
15815 - if (result != NULL)
15816 -+#ifdef ENABLE_RUNTIME_SYSROOT
15817 - *sysrooted = is_sysrooted_pathname (name);
15818 -+#else
15819 -+ *sysrooted = 0;
15820 -+#endif
15821 -
15822 - if (verbose)
15823 - {
15824 -Index: binutils-2.24/ld/ld.texinfo
15825 -===================================================================
15826 ---- binutils-2.24.orig/ld/ld.texinfo
15827 -+++ binutils-2.24/ld/ld.texinfo
15828 -@@ -3092,13 +3092,14 @@ then you can put @samp{INPUT (subr.o)} i
15829 - In fact, if you like, you can list all of your input files in the linker
15830 - script, and then invoke the linker with nothing but a @samp{-T} option.
15831 -
15832 --In case a @dfn{sysroot prefix} is configured, and the filename starts
15833 --with the @samp{/} character, and the script being processed was
15834 --located inside the @dfn{sysroot prefix}, the filename will be looked
15835 --for in the @dfn{sysroot prefix}. Otherwise, the linker will try to
15836 --open the file in the current directory. If it is not found, the
15837 --linker will search through the archive library search path. See the
15838 --description of @samp{-L} in @ref{Options,,Command Line Options}.
15839 -+In case a @dfn{sysroot prefix} is configured without explict
15840 -+--disable-runtime-sysroot, and the filename starts with the @samp{/}
15841 -+character, and the script being processed was located inside the
15842 -+@dfn{sysroot prefix}, the filename will be looked for in the
15843 -+@dfn{sysroot prefix}. Otherwise, the linker will try to open the file
15844 -+in the current directory. If it is not found, the linker will search
15845 -+through the archive library search path. See the description of
15846 -+@samp{-L} in @ref{Options,,Command Line Options}.
15847 -
15848 - If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
15849 - name to @code{lib@var{file}.a}, as with the command line argument
15850 -Index: binutils-2.24/ld/configure
15851 -===================================================================
15852 ---- binutils-2.24.orig/ld/configure
15853 -+++ binutils-2.24/ld/configure
15854 -@@ -774,6 +774,7 @@ with_lib_path
15855 - enable_targets
15856 - enable_64_bit_bfd
15857 - with_sysroot
15858 -+enable_runtime_sysroot
15859 - enable_gold
15860 - enable_got
15861 - enable_werror
15862 -@@ -1429,6 +1430,10 @@ Optional Features:
15863 - (and sometimes confusing) to the casual installer
15864 - --enable-targets alternative target configurations
15865 - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
15866 -+ --enable-runtime-sysroot
15867 -+ prepend sysroot to libpath in ld script and rpath,
15868 -+ only used in addition to --with-sysroot (default is
15869 -+ yes)
15870 - --enable-gold[=ARG] build gold [ARG={default,yes,no}]
15871 - --enable-got=<type> GOT handling scheme (target, single, negative,
15872 - multigot)
15873 -@@ -4318,6 +4323,21 @@ fi
15874 -
15875 -
15876 -
15877 -+# Check whether --enable-runtime-sysroot was given.
15878 -+if test "${enable_runtime_sysroot+set}" = set; then :
15879 -+ enableval=$enable_runtime_sysroot; case "${enableval}" in
15880 -+ no) ;;
15881 -+ *)
15882 -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h
15883 -+ ;;
15884 -+esac
15885 -+else
15886 -+
15887 -+$as_echo "#define ENABLE_RUNTIME_SYSROOT /**/" >>confdefs.h
15888 -+
15889 -+fi
15890 -+
15891 -+
15892 - # Check whether --enable-gold was given.
15893 - if test "${enable_gold+set}" = set; then :
15894 - enableval=$enable_gold; case "${enableval}" in
15895 -@@ -12192,7 +12212,7 @@ else
15896 - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15897 - lt_status=$lt_dlunknown
15898 - cat > conftest.$ac_ext <<_LT_EOF
15899 --#line 12195 "configure"
15900 -+#line 12215 "configure"
15901 - #include "confdefs.h"
15902 -
15903 - #if HAVE_DLFCN_H
15904 -@@ -12298,7 +12318,7 @@ else
15905 - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15906 - lt_status=$lt_dlunknown
15907 - cat > conftest.$ac_ext <<_LT_EOF
15908 --#line 12301 "configure"
15909 -+#line 12321 "configure"
15910 - #include "confdefs.h"
15911 -
15912 - #if HAVE_DLFCN_H
15913 -Index: binutils-2.24/ld/config.in
15914 -===================================================================
15915 ---- binutils-2.24.orig/ld/config.in
15916 -+++ binutils-2.24/ld/config.in
15917 -@@ -2,7 +2,7 @@
15918 -
15919 - /* Check that config.h is #included before system headers
15920 - (this works only for glibc, but that should be enough). */
15921 --#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
15922 -+#if defined(__GLIBC__) && !defined(__CONFIG_H__)
15923 - # error config.h must be #included before system headers
15924 - #endif
15925 - #define __CONFIG_H__ 1
15926 -@@ -11,6 +11,9 @@
15927 - language is requested. */
15928 - #undef ENABLE_NLS
15929 -
15930 -+/* prepend sysroot to libpath in ld script and rpath */
15931 -+#undef ENABLE_RUNTIME_SYSROOT
15932 -+
15933 - /* Additional extension a shared object might have. */
15934 - #undef EXTRA_SHLIB_EXTENSION
15935 -
15936
15937 diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
15938 deleted file mode 100644
15939 index b756437..0000000
15940 --- a/sys-devel/binutils/metadata.xml
15941 +++ /dev/null
15942 @@ -1,9 +0,0 @@
15943 -<?xml version="1.0" encoding="UTF-8"?>
15944 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
15945 -<pkgmetadata>
15946 -<herd>toolchain</herd>
15947 -<use>
15948 -<flag name='multislot'>Allow for multiple versions of binutils to be emerged at once for same CTARGET</flag>
15949 -<flag name='multitarget'>Adds support to binutils for cross compiling (does not work with gas)</flag>
15950 -</use>
15951 -</pkgmetadata>