* stabsread.c (read_cpp_abbrev): Properly construct the names of
[deliverable/binutils-gdb.git] / include / coff / a29k.h
CommitLineData
252b5132 1/* COFF spec for AMD 290*0
4f1d9bd8
NC
2
3 Copyright 2001 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 Contributed by David Wood @ New York University. */
252b5132
RH
20
21#ifndef AMD
22# define AMD
23#endif
24
4f1d9bd8
NC
25#define L_LNNO_SIZE 2
26#include "coff/external.h"
252b5132
RH
27
28/*
29** Magic numbers for Am29000
30** (AT&T will assign the "real" magic number)
31*/
32
33#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */
34#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */
35
252b5132
RH
36#define A29K_MAGIC_BIG SIPFBOMAGIC
37#define A29K_MAGIC_LITTLE SIPRBOMAGIC
4f1d9bd8
NC
38#define A29KBADMAG(x) ( ((x).f_magic != A29K_MAGIC_BIG) && \
39 ((x).f_magic != A29K_MAGIC_LITTLE))
252b5132
RH
40
41#define OMAGIC A29K_MAGIC_BIG
42/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
43
44/*
45** File header flags currently known to us.
46**
47** Am29000 will use the F_AR32WR and F_AR32W flags to indicate
48** the byte ordering in the file.
49*/
50
51/*--------------------------------------------------------------*/
52
252b5132
RH
53
54/* aouthdr magic numbers */
55#define NMAGIC 0410 /* separate i/d executable */
56#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
57 (writable text) */
252b5132
RH
58#define _ETEXT "_etext"
59
60/*--------------------------------------------------------------*/
61
252b5132 62
4f1d9bd8 63/* More names of "special" sections. */
252b5132
RH
64#define _LIT ".lit"
65
66/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
67
68/*
69** Section types - with additional section type for global
70** registers which will be relocatable for the Am29000.
71**
72** In instances where it is necessary for a linker to produce an
73** output file which contains text or data not based at virtual
74** address 0, e.g. for a ROM, then the linker should accept
75** address base information as command input and use PAD sections
76** to skip over unused addresses.
77*/
78
79#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
80#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
81#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
82
83/*--------------------------------------------------------------*/
84
85/*
86** Relocation information declaration and related definitions
87*/
88
4f1d9bd8
NC
89struct external_reloc
90{
252b5132
RH
91 char r_vaddr[4]; /* (virtual) address of reference */
92 char r_symndx[4]; /* index into symbol table */
93 char r_type[2]; /* relocation type */
94};
95
96#define RELOC struct external_reloc
97#define RELSZ 10 /* sizeof (RELOC) */
98
99/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
100
101/*
102** Relocation types for the Am29000
103*/
104
105#define R_ABS 0 /* reference is absolute */
106
107#define R_IREL 030 /* instruction relative (jmp/call) */
108#define R_IABS 031 /* instruction absolute (jmp/call) */
109#define R_ILOHALF 032 /* instruction low half (const) */
110#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
111#define R_IHCONST 034 /* instruction high half (consth) part 2 */
112 /* constant offset of R_IHIHALF relocation */
113#define R_BYTE 035 /* relocatable byte value */
114#define R_HWORD 036 /* relocatable halfword value */
115#define R_WORD 037 /* relocatable word value */
116
117#define R_IGLBLRC 040 /* instruction global register RC */
118#define R_IGLBLRA 041 /* instruction global register RA */
119#define R_IGLBLRB 042 /* instruction global register RB */
120
121/*
122NOTE:
123All the "I" forms refer to 29000 instruction formats. The linker is
124expected to know how the numeric information is split and/or aligned
125within the instruction word(s). R_BYTE works for instructions, too.
126
127If the parameter to a CONSTH instruction is a relocatable type, two
128relocation records are written. The first has an r_type of R_IHIHALF
129(33 octal) and a normal r_vaddr and r_symndx. The second relocation
130record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
131is redundant), and an r_symndx containing the 32-bit constant offset
132to the relocation instead of the actual symbol table index. This
133second record is always written, even if the constant offset is zero.
134The constant fields of the instruction are set to zero.
135*/
136
137/*--------------------------------------------------------------*/
138
252b5132
RH
139/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
140
141/*
142** Storage class definitions - new classes for global registers.
143*/
144
145#define C_GLBLREG 19 /* global register */
146#define C_EXTREG 20 /* external global register */
147#define C_DEFREG 21 /* ext. def. of global register */
This page took 0.069578 seconds and 4 git commands to generate.