-
Notifications
You must be signed in to change notification settings - Fork 15
/
ggx-02-src.patch
404 lines (398 loc) · 14.7 KB
/
ggx-02-src.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
diff -r 8656263dd6bb ChangeLog.ggx
--- a/ChangeLog.ggx Tue Mar 11 14:34:32 2008 -0700
+++ b/ChangeLog.ggx Tue Mar 11 14:34:59 2008 -0700
@@ -1,3 +1,8 @@ 2008-02-20 Anthony Green <green@spinda
+2008-02-20 Anthony Green <[email protected]>
+
+ * configure.ac: Build bfd.
+ * configure: Rebuilt.
+
2008-02-20 Anthony Green <[email protected]>
* config.sub: Add ggx support.
diff -r 8656263dd6bb bfd/ChangeLog.ggx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bfd/ChangeLog.ggx Tue Mar 11 14:34:59 2008 -0700
@@ -0,0 +1,12 @@
+2008-02-20 Anthony Green <[email protected]>
+
+ * targets.c: Add ggx support.
+ * Makefile.am: Ditto.
+ * Makefile.in: Rebuilt.
+ * cpu-ggx.c, elf32-ggx.c: New files.
+ * archures.c: Add ggx support.
+ * configure.in: Add ggx support.
+ * configure: Rebuilt.
+ * config.bfd, archures.c: Add ggx support.
+ * bfd-in2.h: Rebuilt.
+
diff -r 8656263dd6bb bfd/Makefile.am
--- a/bfd/Makefile.am Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/Makefile.am Tue Mar 11 14:34:59 2008 -0700
@@ -73,6 +73,7 @@ ALL_MACHINES = \
cpu-dlx.lo \
cpu-fr30.lo \
cpu-frv.lo \
+ cpu-ggx.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
@@ -139,6 +140,7 @@ ALL_MACHINES_CFILES = \
cpu-dlx.c \
cpu-fr30.c \
cpu-frv.c \
+ cpu-ggx.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
@@ -255,6 +257,7 @@ BFD32_BACKENDS = \
elf32-dlx.lo \
elf32-fr30.lo \
elf32-frv.lo \
+ elf32-ggx.lo \
elf32-gen.lo \
elf32-h8300.lo \
elf32-hppa.lo \
@@ -436,6 +439,7 @@ BFD32_BACKENDS_CFILES = \
elf32-dlx.c \
elf32-fr30.c \
elf32-frv.c \
+ elf32-ggx.c \
elf32-gen.c \
elf32-h8300.c \
elf32-hppa.c \
@@ -1081,6 +1085,7 @@ cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filename
cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ggx.lo: cpu-ggx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1381,6 +1386,11 @@ elf32-frv.lo: elf32-frv.c $(INCDIR)/file
elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
+ elf32-target.h
+elf32-ggx.lo: elf32-ggx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/ggx.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
elf32-target.h
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
diff -r 8656263dd6bb bfd/Makefile.in
--- a/bfd/Makefile.in Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/Makefile.in Tue Mar 11 14:34:59 2008 -0700
@@ -323,6 +323,7 @@ ALL_MACHINES = \
cpu-dlx.lo \
cpu-fr30.lo \
cpu-frv.lo \
+ cpu-ggx.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
@@ -389,6 +390,7 @@ ALL_MACHINES_CFILES = \
cpu-dlx.c \
cpu-fr30.c \
cpu-frv.c \
+ cpu-ggx.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
@@ -506,6 +508,7 @@ BFD32_BACKENDS = \
elf32-dlx.lo \
elf32-fr30.lo \
elf32-frv.lo \
+ elf32-ggx.lo \
elf32-gen.lo \
elf32-h8300.lo \
elf32-hppa.lo \
@@ -687,6 +690,7 @@ BFD32_BACKENDS_CFILES = \
elf32-dlx.c \
elf32-fr30.c \
elf32-frv.c \
+ elf32-ggx.c \
elf32-gen.c \
elf32-h8300.c \
elf32-hppa.c \
@@ -1662,6 +1666,7 @@ cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filename
cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ggx.lo: cpu-ggx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1962,6 +1967,11 @@ elf32-frv.lo: elf32-frv.c $(INCDIR)/file
elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
+ elf32-target.h
+elf32-ggx.lo: elf32-ggx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/ggx.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
elf32-target.h
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
diff -r 8656263dd6bb bfd/archures.c
--- a/bfd/archures.c Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/archures.c Tue Mar 11 14:34:59 2008 -0700
@@ -327,6 +327,8 @@ DESCRIPTION
.#define bfd_mach_frvtomcat 499 {* fr500 prototype *}
.#define bfd_mach_fr500 500
.#define bfd_mach_fr550 550
+. bfd_arch_ggx, {* The ggx processor *}
+.#define bfd_mach_ggx 1
. bfd_arch_mcore,
. bfd_arch_mep,
.#define bfd_mach_mep 1
@@ -454,6 +456,7 @@ extern const bfd_arch_info_type bfd_dlx_
extern const bfd_arch_info_type bfd_dlx_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_frv_arch;
+extern const bfd_arch_info_type bfd_ggx_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
extern const bfd_arch_info_type bfd_h8500_arch;
extern const bfd_arch_info_type bfd_hppa_arch;
@@ -525,6 +528,7 @@ static const bfd_arch_info_type * const
&bfd_dlx_arch,
&bfd_fr30_arch,
&bfd_frv_arch,
+ &bfd_ggx_arch,
&bfd_h8300_arch,
&bfd_h8500_arch,
&bfd_hppa_arch,
diff -r 8656263dd6bb bfd/bfd-in2.h
--- a/bfd/bfd-in2.h Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/bfd-in2.h Tue Mar 11 14:34:59 2008 -0700
@@ -2004,6 +2004,8 @@ enum bfd_architecture
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
#define bfd_mach_fr550 550
+ bfd_arch_ggx, /* The ggx. */
+#define bfd_mach_ggx 1
bfd_arch_mcore,
bfd_arch_mep,
#define bfd_mach_mep 1
diff -r 8656263dd6bb bfd/config.bfd
--- a/bfd/config.bfd Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/config.bfd Tue Mar 11 14:34:59 2008 -0700
@@ -408,6 +408,10 @@ case "${targ}" in
targ_selvecs=bfd_elf32_frv_vec
;;
+ ggx-*-elf)
+ targ_defvec=bfd_elf32_ggx_vec
+ ;;
+
h8300*-*-rtemscoff*)
targ_defvec=h8300coff_vec
targ_underscore=yes
diff -r 8656263dd6bb bfd/configure
--- a/bfd/configure Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/configure Tue Mar 11 14:34:59 2008 -0700
@@ -19050,6 +19050,7 @@ do
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
+ bfd_elf32_ggx_vec) tb="$tb elf32-ggx.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
diff -r 8656263dd6bb bfd/configure.in
--- a/bfd/configure.in Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/configure.in Tue Mar 11 14:34:59 2008 -0700
@@ -659,6 +659,7 @@ do
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
+ bfd_elf32_ggx_vec) tb="$tb elf32-ggx.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
diff -r 8656263dd6bb bfd/cpu-ggx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bfd/cpu-ggx.c Tue Mar 11 14:34:59 2008 -0700
@@ -0,0 +1,40 @@
+/* BFD support for the ggx processor.
+ Copyright 2008 Free Software Foundation, Inc.
+ Written by Anthony Green
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+
+const bfd_arch_info_type bfd_ggx_arch =
+ {
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_ggx, /* enum bfd_architecture arch. */
+ bfd_mach_ggx,
+ "ggx", /* Arch name. */
+ "ggx", /* Printable name. */
+ 2, /* Unsigned int section alignment power. */
+ TRUE, /* The one and only. */
+ bfd_default_compatible,
+ bfd_default_scan ,
+ 0,
+ };
diff -r 8656263dd6bb bfd/elf32-ggx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bfd/elf32-ggx.c Tue Mar 11 14:34:59 2008 -0700
@@ -0,0 +1,35 @@
+/* ggx support for 32-bit ELF
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+#define TARGET_BIG_SYM bfd_elf32_ggx_vec
+#define TARGET_BIG_NAME "elf32-ggx"
+#define ELF_ARCH bfd_arch_ggx
+#define ELF_MACHINE_CODE EM_GGX
+#define ELF_MAXPAGESIZE 1
+#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
+#define elf_info_to_howto _bfd_elf_no_info_to_howto
+
+#include "elf32-target.h"
diff -r 8656263dd6bb bfd/targets.c
--- a/bfd/targets.c Tue Mar 11 14:34:32 2008 -0700
+++ b/bfd/targets.c Tue Mar 11 14:34:59 2008 -0700
@@ -589,6 +589,7 @@ extern const bfd_target bfd_elf32_fr30_v
extern const bfd_target bfd_elf32_fr30_vec;
extern const bfd_target bfd_elf32_frv_vec;
extern const bfd_target bfd_elf32_frvfdpic_vec;
+extern const bfd_target bfd_elf32_ggx_vec;
extern const bfd_target bfd_elf32_h8300_vec;
extern const bfd_target bfd_elf32_hppa_linux_vec;
extern const bfd_target bfd_elf32_hppa_nbsd_vec;
@@ -920,6 +921,7 @@ static const bfd_target * const _bfd_tar
&bfd_elf32_fr30_vec,
&bfd_elf32_frv_vec,
&bfd_elf32_frvfdpic_vec,
+ &bfd_elf32_ggx_vec,
&bfd_elf32_h8300_vec,
&bfd_elf32_hppa_linux_vec,
&bfd_elf32_hppa_nbsd_vec,
diff -r 8656263dd6bb configure
--- a/configure Tue Mar 11 14:34:32 2008 -0700
+++ b/configure Tue Mar 11 14:34:59 2008 -0700
@@ -2327,7 +2327,7 @@ case "${target}" in
;;
ggx-*-*)
noconfigdirs="$noconfigdirs ${libgcj} gdb sim"
- noconfigdirs="$noconfigdirs bfd binutils opcodes gas ld gprof"
+ noconfigdirs="$noconfigdirs binutils opcodes gas ld gprof"
;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
diff -r 8656263dd6bb configure.ac
--- a/configure.ac Tue Mar 11 14:34:32 2008 -0700
+++ b/configure.ac Tue Mar 11 14:34:59 2008 -0700
@@ -605,7 +605,7 @@ case "${target}" in
;;
ggx-*-*)
noconfigdirs="$noconfigdirs ${libgcj} gdb sim"
- noconfigdirs="$noconfigdirs bfd binutils opcodes gas ld gprof"
+ noconfigdirs="$noconfigdirs binutils opcodes gas ld gprof"
;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
diff -r 8656263dd6bb include/elf/ChangeLog.ggx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/elf/ChangeLog.ggx Tue Mar 11 14:34:59 2008 -0700
@@ -0,0 +1,6 @@
+2008-02-20 Anthony Green <[email protected]>
+
+ * common.h (EM_GGX): Define.
+ * ggx.h: New file.
+
+
diff -r 8656263dd6bb include/elf/common.h
--- a/include/elf/common.h Tue Mar 11 14:34:32 2008 -0700
+++ b/include/elf/common.h Tue Mar 11 14:34:59 2008 -0700
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -283,6 +283,8 @@
#define EM_CYGNUS_MEP 0xF00D /* Toshiba MeP */
+#define EM_GGX 0xFEED
+
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */
diff -r 8656263dd6bb include/elf/ggx.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/elf/ggx.h Tue Mar 11 14:34:59 2008 -0700
@@ -0,0 +1,30 @@
+/* gcore ELF support for BFD.
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _ELF_GGX_H
+#define _ELF_GGX_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_ggx_reloc_type)
+ RELOC_NUMBER (R_GGX_NONE, 0)
+END_RELOC_NUMBERS (R_GGX_max)
+
+#endif