aboutsummaryrefslogtreecommitdiff
path: root/gas/NOTES.config
blob: 79832e64d7a0834cf2d2f3677fafe387284ba65e (plain)
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

		      The GAS Configuration Plan

Theory:

The goal of the new configuration scheme is to bury all object format
and target processor dependancies in object and target specific files.
That is, to move all #ifdef's out of the gas common code.

Here's how it works.  There is a .h and a .c file for each object file
format and a .h and a .c file for each target processor.  The
configure script creates symlinks in the current directory to the
appropriate files in the config directory.  configure also serves as a
list of triplets {host, target, object-format} that have been tested
at one time or another.  I also recommend that configure be used to
document triplet specific notes as to purpose of the triplet, etc.

Implementation:

obj-format.h is a {sym}link to .../config/obj-something.h.  It is intended

All gas .c files include as.h.

as.h #define's "gas", includes host.h, defines a number of gas
specific structures and types, and then includes tp.h, obj.h, and
target-environment.h.

target-environment.h defines a target environment specific
preprocessor flag, eg, TE_SUN, and then includes obj-format.h.

obj-format.h defines an object format specific preprocessor flag, eg,
OBJ_AOUT, OBJ_BOUT, OBJ_COFF, includes "target-processor.h", and then
defines the object specific macros, functions, types, and structures.

target-processor.h 

target-processor.

Porting:

There appear to be four major types of ports; new hosts, new target
processors, new object file formats, and new target environments.