2 Copyright (C) 1987, 1992 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GAS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 * At this point I'm sure this file is right for i960 and I'm pretty sure it's
22 * right for a29k, although it hasn't been tested rigorously. Please feel free
23 * to add your own machine's description here. Without that info, it isn't
24 * possible to build cross development tools from elsewhere nor is it easy to
25 * continue to support your machines format.
27 * The TC_foo ifdef's are mine. They are what gas uses. The other ifdef's
28 * remain for documentation from other scavenged files. xoxorich.
31 /********************** FILE HEADER **********************/
35 unsigned short f_magic; /* magic number */
36 unsigned short f_nscns; /* number of sections */
37 long f_timdat; /* time & date stamp */
38 long f_symptr; /* file pointer to symtab */
39 long f_nsyms; /* number of symtab entries */
40 unsigned short f_opthdr; /* sizeof(optional hdr) */
41 unsigned short f_flags; /* flags */
45 * F_RELFLG relocation info stripped from file
46 * F_EXEC file is executable (no unresolved externel references)
47 * F_LNNO line nunbers stripped from file
48 * F_LSYMS local symbols stripped from file
49 * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
51 #define F_RELFLG (0x0001)
52 #define F_EXEC (0x0002)
53 #define F_LNNO (0x0004)
54 #define F_LSYMS (0x0008)
57 #define F_AR32WR (0x0010)/* File has 32 bits per word, least
58 significant byte first. */
60 #define F_AR32WR (0x0100)
63 #define F_MINMAL (0x0010)/* ??? */
64 #define F_UPDATE (0x0020)/* ??? */
65 #define F_SWABD (0x0040)/* ??? */
66 #define F_AR16WR (0x0080)/* File has the byte ordering used by
67 the PDP*-11/70 processor. */
68 #define F_AR32W (0x0200)/* File has 32 bits per word, most
69 significant byte first. */
72 * Intel 80960 (I960) processor flags.
73 * F_I960TYPE == mask for processor type field.
76 #define F_I960TYPE (0xf000)
77 #define F_I960CORE (0x1000)
78 #define F_I960KB (0x2000)
79 #define F_I960SB (0x2000)
80 #define F_I960MC (0x3000)
81 #define F_I960XA (0x4000)
82 #define F_I960CA (0x5000)
83 #define F_I960KA (0x6000)
84 #define F_I960SA (0x6000)
87 * i80960 Magic Numbers
90 #define I960ROMAGIC (0x160) /* read-only text segments */
91 #define I960RWMAGIC (0x161) /* read-write text segments */
93 #define I960BADMAG(x) (((x).f_magic != I960ROMAGIC) && ((x).f_magic != I960RWMAGIC))
95 #define SIPFBOMAGIC (0x17a) /* Am29000 (Byte 0 is MSB - Big Endian) */
96 #define SIPRBOMAGIC (0x17b) /* Am29000 (Byte 0 is LSB - Little Endian) */
98 #define A29KBADMAG(x) (((x).f_magic != SIPFBOMAGIC) && ((x).f_magic != SIPRBOMAGIC))
101 # define I386MAGIC (0x175) /* Danbury AIX C compiler */
102 # define I386SVMAGIC (0x14c) /* System V C Compiler */
103 # define I386BADMAG(x) (((x).f_magic!=I386MAGIC) && \
104 ((x).f_magic!=I386SVMAGIC))
105 #else /* not TE_I386AIX */
106 # define I386MAGIC 0x14c
107 # define I386BADMAG(x) (((x).f_magic!=I386MAGIC))
108 #endif /* not TE_I386AIX */
111 #define FILHDR struct filehdr
112 #define FILHSZ sizeof(FILHDR)
115 /********************** AOUT "OPTIONAL HEADER" **********************/
119 unsigned long phys_addr;
120 unsigned long bitarray;
125 /* These appear to be used only by exec(2). I don't know who cares
126 about them in a cross development environment. In any case, this
127 is my collection after researching the issue for a few hours.
128 Apparently, most have these have remained essentially unchanged
129 since v7 days, although a few new ones have been added. xoxorich. */
131 #define BAD0MAGIC (0401) /* (?) "lpd (UNIX/RT)" */
132 #define BAD1MAGIC (0405) /* (?) overlay */
133 #define OMAGIC (0407) /* old impure format. data immediately
134 follows text. both sections are rw. */
135 #define NMAGIC (0410) /* split i&d, read-only text */
136 #define A_MAGIC3 (0411) /* (?) "separated I&D" */
137 #define ZMAGIC (0413) /* like NMAGIC, but demand loaded */
138 #define PAGEMAGIC2 (0414) /* (?) like ZMAGIC, but address zero
139 explicitly unmapped. */
140 #define REGMAGIC (0414) /* (?) a PAGEMAGIC2 alias? */
141 #define PAGEMAGIC3 (0415) /* (?) like ZMAGIC, but address zero mapped. */
142 #define A_MAGIC5 (0437) /* (?) "system overlay, separated I&D" */
143 /* intended for non-unix cross development */
144 #define SASMAGIC (010000)/* Single Address Space */
145 #define MASMAGIC (020000)/* (?) "Multiple (separate I & D) Address Spaces" */
147 typedef struct aouthdr
149 short magic; /* type of file */
150 short vstamp; /* version stamp */
151 unsigned long tsize; /* text size in bytes, padded to FW bdry*/
152 unsigned long dsize; /* initialized data " " */
153 unsigned long bsize; /* uninitialized data " " */
156 unsigned long dum2; /* pad to entry point */
158 unsigned long entry; /* entry pt. */
159 unsigned long text_start; /* base of text used for this file */
160 unsigned long data_start; /* base of data used for this file */
161 /* CAREFUL: some formats omit the tagentries member. */
162 unsigned long tagentries; /* number of tag entries to
163 follow (always zero for i960) */
168 /* return a pointer to the tag bits array */
170 #define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
172 /* compute size of a header */
174 /*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/
175 #define AOUTSZ (sizeof(AOUTHDR))
178 /********************** STORAGE CLASSES **********************/
180 #define C_EFCN -1 /* physical end of function */
182 #define C_AUTO 1 /* automatic variable */
183 #define C_EXT 2 /* external symbol */
184 #define C_STAT 3 /* static */
185 #define C_REG 4 /* register variable */
186 #define C_EXTDEF 5 /* external definition */
187 #define C_LABEL 6 /* label */
188 #define C_ULABEL 7 /* undefined label */
189 #define C_MOS 8 /* member of structure */
190 #define C_ARG 9 /* function argument */
191 #define C_STRTAG 10 /* structure tag */
192 #define C_MOU 11 /* member of union */
193 #define C_UNTAG 12 /* union tag */
194 #define C_TPDEF 13 /* type definition */
195 #define C_USTATIC 14 /* undefined static */
196 #define C_ENTAG 15 /* enumeration tag */
197 #define C_MOE 16 /* member of enumeration */
198 #define C_REGPARM 17 /* register parameter */
199 #define C_FIELD 18 /* bit field */
202 #define C_AUTOARG 19 /* auto argument */
203 #define C_LASTENT 20 /* dummy entry (end of block) */
207 #define C_GLBLREG 19 /* global register */
208 #define C_EXTREG 20 /* external global register */
209 #define C_DEFREG 21 /* ext. def. of global register */
210 #define C_STARTOF 22 /* as29 $SIZEOF and $STARTOF symbols */
213 #define C_BLOCK 100 /* ".bb" or ".eb" */
214 #define C_FCN 101 /* ".bf" or ".ef" */
215 #define C_EOS 102 /* end of structure */
216 #define C_FILE 103 /* file name */
217 #define C_LINE 104 /* line # reformatted as symbol table entry */
218 #define C_ALIAS 105 /* duplicate tag */
219 #define C_HIDDEN 106 /* ext symbol in dmert public lib. like static,
220 used to avoid name conflicts. */
223 /* New storage classes for 80960 */
224 #define C_SCALL 107 /* Procedure reachable via system call */
225 /* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */
226 #define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
227 #define C_LEAFEXT 108
228 #define C_OPTVAR 109 /* Optimized variable */
229 #define C_DEFINE 110 /* Preprocessor #define */
230 #define C_PRAGMA 111 /* Advice to compiler or linker */
231 #define C_SEGMENT 112 /* 80960 segment name */
232 #define C_LEAFSTAT 113 /* Static leaf */
236 #define C_SHADOW 107 /* shadow symbol */
239 /********************** SECTION HEADER **********************/
243 char s_name[8]; /* section name */
244 long s_paddr; /* physical address, aliased s_nlib */
245 long s_vaddr; /* virtual address */
246 long s_size; /* section size */
247 long s_scnptr; /* file ptr to raw data for section */
248 long s_relptr; /* file ptr to relocation */
249 long s_lnnoptr; /* file ptr to line numbers */
250 unsigned short s_nreloc; /* number of relocation entries */
251 unsigned short s_nlnno; /* number of line number entries */
252 long s_flags; /* flags */
255 unsigned long s_align; /* section alignment */
259 #define SCNHDR struct scnhdr
260 #define SCNHSZ sizeof(SCNHDR)
263 * names of "special" sections
265 #define _TEXT ".text" /* executable code section */
266 #define _DATA ".data" /* initialized data */
267 #define _BSS ".bss" /* un-initialized data */
268 #define _DEBUG ".debug" /* special section used by dbx */
269 #define _COMMENT ".comment" /* version info */
270 #define _LIB ".lib" /* shared lib info section */
278 * In instances where it is necessary for a linker to
279 * produce an output file which contains text or data not
280 * based at virtual address 0, e.g. for a ROM, then the
281 * linker should accept address base information as command
282 * input and use PAD sections to skip over unused addresses.
283 * (at least for a29k. Maybe others.)
286 #define STYP_REG (0x0000) /* "regular" section: allocated, relocated, loaded */
287 #define STYP_DSECT (0x0001) /* "dummy" section: not allocated, relocated, not loaded */
288 #define STYP_NOLOAD (0x0002) /* "noload" section: allocated, relocated, not loaded */
289 #define STYP_GROUP (0x0004) /* "grouped" section: formed of input sections */
290 #define STYP_PAD (0x0008) /* "padding" section: not allocated, not relocated, loaded */
291 #define STYP_COPY (0x0010) /* "copy" section: for decision function used by field update; not allocated, not relocated,
292 loaded; reloc & lineno entries processed normally */
293 #define STYP_TEXT (0x0020) /* section contains text only */
294 #define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile
295 will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will
296 update all process invocations. */
297 #define STYP_DATA (0x0040) /* section contains data only */
298 #define STYP_BSS (0x0080) /* section contains bss only */
299 #define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */
300 #define STYP_INFO (0x0200) /* comment section : not allocated not relocated, not loaded */
301 #define STYP_OVER (0x0400) /* overlay section : relocated not allocated or loaded */
302 #define STYP_LIB (0x0800) /* for .lib section : same as INFO */
303 #define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
304 #define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a
305 word of contiguous bytes beginning on a word boundary. */
308 /* NOTE: The use of STYP_BSSREG for relocation is not yet defined. */
309 #define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
310 #define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
311 #define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
312 #define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
315 /********************** LINE NUMBERS **********************/
317 /* 1 line number entry for every "breakpointable" source line in a section.
318 * Line numbers are grouped on a per function basis; first entry in a function
319 * grouping will have l_lnno = 0 and in place of physical address will be the
320 * symbol table index of the function name.
326 long l_symndx; /* symbol index of function name, iff l_lnno == 0*/
327 long l_paddr; /* (physical) address of line number */
330 unsigned short l_lnno; /* line number */
332 /* not used on a29k */
333 char padding[2]; /* force alignment */
337 #define LINENO struct lineno
338 #define LINESZ sizeof(LINENO)
341 /********************** SYMBOLS **********************/
343 #define SYMNMLEN 8 /* # characters in a symbol name */
344 #define FILNMLEN 14 /* # characters in a file name */
345 #define DIMNUM 4 /* # array dimensions in auxiliary entry */
351 char _n_name[SYMNMLEN]; /* old COFF version */
354 long _n_zeroes; /* new == 0 */
355 long _n_offset; /* offset into string table */
358 char *_n_nptr[2]; /* allows for overlaying */
361 long n_value; /* value of symbol */
362 short n_scnum; /* section number */
365 /* This isn't yet used on the i960. In some formats this
366 is two bytes of padding. In others, it is missing entirely. */
367 unsigned short n_flags; /* copy of flags from filhdr */
371 unsigned short n_type; /* type and derived type */
373 /* at least i960 uses long */
374 unsigned long n_type; /* type and derived type */
377 char n_sclass; /* storage class */
378 char n_numaux; /* number of aux. entries */
381 char pad2[2]; /* force alignment */
385 #define SYMENT struct syment
386 #define SYMESZ sizeof(SYMENT) /* This had better also be sizeof(AUXENT) */
388 #define n_name _n._n_name
389 #define n_ptr _n._n_nptr[1]
390 #define n_zeroes _n._n_n._n_zeroes
391 #define n_offset _n._n_n._n_offset
394 * Relocatable symbols have number of the section in which they are defined,
395 * or one of the following:
398 #define N_SCNUM ((short) 1-65535) /* section num where symbol defined */
399 #define N_UNDEF ((short)0) /* undefined symbol */
400 #define N_ABS ((short)-1) /* value of symbol is absolute */
401 #define N_DEBUG ((short)-2) /* debugging symbol -- symbol value is meaningless */
402 #define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
403 #define P_TV ((short)-4) /* indicates symbol needs transfer vector (postload) */
406 * Type of a symbol, in low 4 bits of the word
408 #define T_NULL 0 /* type not assigned */
409 #define T_VOID 1 /* function argument (only used by compiler) (but now real void). */
410 #define T_CHAR 2 /* character */
411 #define T_SHORT 3 /* short integer */
412 #define T_INT 4 /* integer */
413 #define T_LONG 5 /* long integer */
414 #define T_FLOAT 6 /* floating point */
415 #define T_DOUBLE 7 /* double word */
416 #define T_STRUCT 8 /* structure */
417 #define T_UNION 9 /* union */
418 #define T_ENUM 10 /* enumeration */
419 #define T_MOE 11 /* member of enumeration */
420 #define T_UCHAR 12 /* unsigned character */
421 #define T_USHORT 13 /* unsigned short */
422 #define T_UINT 14 /* unsigned integer */
423 #define T_ULONG 15 /* unsigned long */
426 #define T_LNGDBL 16 /* long double */
430 * derived types, in n_type
432 #define DT_NON (0) /* no derived type */
433 #define DT_PTR (1) /* pointer */
434 #define DT_FCN (2) /* function */
435 #define DT_ARY (3) /* array */
439 #define N_BTMASK (0x0f)
440 #define N_TMASK (0x30)
446 #define N_BTMASK (0x1f)
447 #define N_TMASK (0x60)
453 #define BTYPE(x) ((x) & N_BTMASK)
455 #define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
456 #define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
457 #define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
459 #define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
465 long x_tagndx; /* str, un, or enum tag indx */
470 unsigned short x_lnno; /* declaration line number */
471 unsigned short x_size; /* str/union/array size */
474 long x_fsize; /* size of function */
480 { /* if ISFCN, tag, or .bb */
481 long x_lnnoptr; /* ptr to fcn line # */
482 long x_endndx; /* entry ndx past block end */
486 { /* if ISARY, up to 4 dimen. */
487 unsigned short x_dimen[DIMNUM];
492 unsigned short x_tvndx; /* tv index */
496 /* This was just a struct x_file with x_fname only in a29k. xoxorich. */
499 char x_fname[FILNMLEN];
511 long x_scnlen; /* section length */
512 unsigned short x_nreloc;/* # relocation entries */
513 unsigned short x_nlinno;/* # line numbers */
519 long x_tvfill; /* tv fill value */
520 unsigned short x_tvlen; /* length of .tv */
522 /* This field was typo'd x_tvrna on a29k. xoxorich. */
523 unsigned short x_tvran[2]; /* tv range */
525 x_tv; /* info about .tv section (in auxent of symbol .tv)) */
528 /******************************************
529 * I960-specific *2nd* aux. entry formats
530 ******************************************/
533 /* This is a very old typo that keeps getting propogated. */
534 #define x_stdindx x_stindx
535 long x_stindx; /* sys. table entry */
537 x_sc; /* system call entry */
541 unsigned long x_balntry;/* BAL entry point */
543 x_bal; /* BAL-callable function */
547 unsigned long x_timestamp; /* time stamp */
548 char x_idstring[20]; /* producer identity string */
550 x_ident; /* Producer ident info */
552 char a[sizeof (struct syment)]; /* force auxent/syment sizes to match */
556 #define AUXENT union auxent
557 #define AUXESZ sizeof(AUXENT) /* This had better also be sizeof(SYMENT) */
560 # define _ETEXT "_etext"
562 # define _ETEXT "etext"
565 /********************** RELOCATION DIRECTIVES **********************/
569 long r_vaddr; /* Virtual address of reference */
570 long r_symndx; /* Index into symbol table */
571 unsigned short r_type; /* Relocation type */
573 /* not used for a29k */
574 char pad[2]; /* Unused */
578 #define RELOC struct reloc
579 #define RELSZ sizeof(RELOC)
581 #define R_ABS (0x00) /* reference is absolute */
584 #define RM_DIR32 (0x06)
585 #define R_IPAIR (0x1c)
586 #define R_N10PAIR (0x1d)
587 #define R_N10HIGH (0x1e)
588 #define R_N10LOW0 (0x1f)
589 #define R_N10LOW1 (0x20)
590 #define R_N10LOW2 (0x21)
591 #define R_N10LOW3 (0x22)
592 #define R_N10LOW4 (0x23)
593 #define R_N10SPLIT0 (0x24)
594 #define R_N10SPLIT1 (0x25)
595 #define R_N10SPLIT2 (0x26)
596 #define R_N10HIGHADJ (0x27)
597 #define R_N10BRADDR (0x28)
601 #define R_RELLONG (0x11) /* Direct 32-bit relocation */
602 #define R_IPRSHORT (0x18)
603 #define R_IPRMED (0x19) /* 24-bit ip-relative relocation */
604 #define R_IPRLONG (0x1a)
605 #define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */
606 #define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */
607 #define R_GETSEG (0x1d)
608 #define R_GETPA (0x1e)
609 #define R_TAGWORD (0x1f)
614 * NOTE: All the "I" forms refer to Am29000 instruction
615 * formats. The linker is expected to know how the numeric
616 * information is split and/or aligned within the
617 * instruction word(s). R_BYTE works for instructions, too.
619 * If the parameter to a CONSTH instruction is a relocatable
620 * type, two relocation records are written. The first has
621 * an r_type of R_IHIHALF (33 octal) and a normal r_vaddr
622 * and r_symndx. The second relocation record has an r_type
623 * of R_IHCONST (34 octal), a normal r_vaddr (which is
624 * redundant), and an r_symndx containing the 32-bit
625 * constant offset to the relocation instead of the actual
626 * symbol table index. This second record is always
627 * written, even if the constant offset is zero. The
628 * constant fields of the instruction are set to zero.
631 #define R_IREL (0x18) /* instruction relative (jmp/call) */
632 #define R_IABS (0x19) /* instruction absolute (jmp/call) */
633 #define R_ILOHALF (0x1a) /* instruction low half (const) */
634 #define R_IHIHALF (0x1b) /* instruction high half (consth) part 1 */
635 #define R_IHCONST (0x1c) /* instruction high half (consth) part 2
636 constant offset of R_IHIHALF relocation */
637 #define R_BYTE (0x1d) /* relocatable byte value */
638 #define R_HWORD (0x1e) /* relocatable halfword value */
639 #define R_WORD (0x1f) /* relocatable word value */
640 #define R_IGLBLRC (0x20) /* instruction global register RC */
641 #define R_IGLBLRA (0x21) /* instruction global register RA */
642 #define R_IGLBLRB (0x22) /* instruction global register RB */
646 #define DEFAULT_DATA_SECTION_ALIGNMENT 4
647 #define DEFAULT_BSS_SECTION_ALIGNMENT 4
648 #define DEFAULT_TEXT_SECTION_ALIGNMENT 16
649 /* For new sections we haven't heard of before */
650 #define DEFAULT_SECTION_ALIGNMENT 4
655 * 8-bit offset reference in 8-bits
656 * 8-bit offset reference in 16-bits
657 * 12-bit segment reference
658 * auxiliary relocation entry
666 * B16 and X86 generics
667 * 16-bit direct reference
668 * 16-bit "relative" reference
669 * 16-bit "indirect" (TV) reference
677 * 24-bit direct reference
678 * 24-bit "relative" reference
679 * 16-bit optimized "indirect" TV reference
680 * 24-bit "indirect" TV reference
681 * 32-bit "indirect" TV reference
691 * 10-bit direct reference
692 * 10-bit "relative" reference
693 * 32-bit "relative" reference
700 * 3B and M32 generics
701 * 32-bit direct reference
707 * 32-bit direct reference with bytes swapped
713 #if defined(TE_I386AIX)
715 #define UINFOSIZ 64 /* size of user info buffer */
716 typedef char uinfo_t[UINFOSIZ];
720 unsigned short control;
722 unsigned short status;
727 unsigned short code_seg;
728 unsigned short opcode;
729 unsigned long operand;
730 unsigned short operand_seg;
732 unsigned char regs[8][10];
735 #define CD_NAMELEN 16 /* length of most names in this header */
736 #define CORHDRSIZ 2048 /* size to which header is padded out */
737 #define MAX_CORE_SEGS 32 /* maximum segments in a core dump */
738 #define NUM_FREGS 1 /* # of saved FP regs */
741 * These are defined such that 286 and 386 kernels can produce
763 # define SPATHLEN 16 /* sys/param.h */
766 # define NSIG 63 /* sys/signal.h */
767 # define SIGSETSZ ((NSIG+31)/32)
768 typedef struct ksigmask
770 unsigned long sigs[SIGSETSZ];
778 char cd_magic[4]; /* COR_MAGIC = "core" */
780 /* general information about the dump itself */
782 { /* table of contents for dump */
783 long cs_type; /* seg. type; see below */
784 long cs_len; /* length (in bytes) of segment */
785 long cs_offset; /* offset (in dump) of segment */
786 long cs_address; /* address segment had in mem */
788 cd_segs[MAX_CORE_SEGS];
790 /* general information about the process */
791 char cd_comm[CD_NAMELEN]; /* command being run */
792 char cd_mach[CD_NAMELEN]; /* type of machine it ran on */
793 char cd_site[CD_NAMELEN]; /* name of site it ran on */
794 long cd_ldtype; /* type of load module running */
795 char cd_intsize; /* sizeof(int) */
796 char cd_dptrsize; /* sizeof(char *) */
797 char cd_tptrsize; /* sizeof(int (*)()) */
800 /* user-mode program state */
801 long cd_regs[NUM_REGS]; /* user-mode general registers */
802 struct env387 cd_fpregs; /* user-mode floating-point state */
804 /* kernel-mode program state */
805 int (*cd_sig[NSIG]) (); /* disposition of signals */
806 ksigmask_t cd_sigmask; /* signals to be blocked */
807 ksigmask_t cd_sigpend; /* signals currently pending */
808 long cd_cursig; /* signal that caused the dump */
810 long cd_pid; /* process ID of the corpse */
811 long cd_ppid; /* parent process ID of corpse */
812 short cd_uid; /* process effective user ID */
813 short cd_ruid; /* process real user ID */
814 short cd_gid; /* process effective group ID */
815 short cd_rgid; /* process real group ID */
817 uinfo_t cd_uinfo; /* buffer of user information */
818 char cd_locname[32]; /* name of /local */
819 char cd_uvers[CD_NAMELEN]; /* user version string */
820 unsigned short cd_spath[SPATHLEN]; /* sitepath */
824 /* this will generate an error if sizeof(struct corehdr) > CORHDRSIZ */
827 char xxcdxx[CORHDRSIZ + 1 - sizeof (struct corehdr)];
830 #endif /* ! NOCHECKS */
833 * segment types (in cs_type)
834 * each segment in the address space appears here, whether or not it
835 * is actually dumped. Read/only segments will not actually be dumped.
836 * A segment that is not in the dump will have a cs_offset of zero.
838 #define COR_TYPE_CODE 'x' /* process code - NOT IN DUMP */
839 #define COR_TYPE_DATA 'd' /* process data segment */
840 #define COR_TYPE_STACK 's' /* process stack segment */
841 #define COR_TYPE_LIBCODE 'X' /* shared lib code - NOT IN DUMP*/
842 #define COR_TYPE_LIBDATA 'D' /* shared lib data */
843 #define COR_TYPE_READ 'r' /* other read/only - NOT IN DUMP*/
844 #define COR_TYPE_WRITE 'w' /* other writeable */
845 #define COR_TYPE_MSC '?' /* other, mapped in segment */
847 #endif /* TE_I386AIX */
855 /* end of coff_gnu.h */