00001 #define _S_(name) name ## _64
00002
00003
00004
00005
00006
00007
00008 #define TOBJ_SAME 0x80
00009 #define TOBJ_COM 0x40
00010
00011 #define TOBJ_EMULATE 0x20
00012
00013
00014
00015 #define TOBJ_COMPAT 0x10
00016
00017
00018
00019
00020
00021
00022
00023 #define TCPU_INVALID 0
00024 #define TCPU_PPC 1
00025 #define TCPU_PPC64 2
00026 #define TCPU_COM 3
00027 #define TCPU_PWR 4
00028 #define TCPU_ANY 5
00029
00030 #define TCPU_601 6
00031 #define TCPU_603 7
00032 #define TCPU_604 8
00033 #define TCPU_PWR1 10
00034 #define TCPU_620 16
00035 #define TCPU_A35 17
00036 #define TCPU_PWRX 224
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 typedef struct aouthdr {
00052 uint16_t o_mflag;
00053
00054 uint16_t o_vstamp;
00055
00056 uint32_t o_tsize;
00057 uint32_t o_dsize;
00058 uint32_t o_bsize;
00059 uint32_t o_entry;
00060 uint32_t o_text_start;
00061 uint32_t o_data_start;
00062
00063
00064 uint32_t o_toc;
00065 uint16_t o_snentry;
00066 uint16_t o_sntext;
00067 uint16_t o_sndata;
00068 uint16_t o_sntoc;
00069 uint16_t o_snloader;
00070 uint16_t o_snbss;
00071 uint16_t o_algntext;
00072 uint16_t o_algndata;
00073 uint8_t o_modtype[2];
00074 uint8_t o_cpuflag;
00075 uint8_t o_cputype;
00076 uint32_t o_maxstack;
00077 uint32_t o_maxdata;
00078 uint32_t o_debugger;
00079
00080 uint32_t o_resv2[2];
00081 } AOUTHDR;
00082
00083 typedef struct aouthdr_64 {
00084 uint16_t o_mflag;
00085
00086 uint16_t o_vstamp;
00087
00088 uint32_t o_debugger;
00089
00090 uint64_t o_text_start;
00091 uint64_t o_data_start;
00092 uint64_t o_toc;
00093 uint16_t o_snentry;
00094 uint16_t o_sntext;
00095 uint16_t o_sndata;
00096 uint16_t o_sntoc;
00097 uint16_t o_snloader;
00098 uint16_t o_snbss;
00099 uint16_t o_algntext;
00100 uint16_t o_algndata;
00101 uint8_t o_modtype[2];
00102 uint8_t o_cpuflag;
00103 uint8_t o_cputype;
00104 uint32_t o_resv2[1];
00105 uint64_t o_tsize;
00106 uint64_t o_dsize;
00107 uint64_t o_bsize;
00108 uint64_t o_entry;
00109 uint64_t o_maxstack;
00110 uint64_t o_maxdata;
00111 uint32_t o_resv3[4];
00112 } AOUTHDR_64;
00113
00114 #define _AOUTHSZ_SHORT (size_t)&(((AOUTHDR *)0)->o_toc)
00115 #define _AOUTHSZ_EXEC sizeof(AOUTHDR)
00116 #define _AOUTHSZ_EXEC_64 sizeof(AOUTHDR_64)
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 #define F_RELFLG 0x0001
00146 #define F_EXEC 0x0002
00147 #define F_LNNO 0x0004
00148 #define F_LSYMS 0x0008
00149 #define F_FDPR_PROF 0x0010
00150 #define F_FDPR_OPTI 0x0020
00151 #define F_DSA 0x0040
00152 #define F_LPTEXT 0x0400
00153 #define F_LPDATA 0x0800
00154 #define F_DYNLOAD 0x1000
00155 #define F_SHROBJ 0x2000
00156 #define F_LOADONLY 0x4000
00157
00158
00159 #define F_AR16WR 0x0080
00160 #define F_AR32WR 0x0100
00161 #define F_AR32W 0x0200
00162
00163
00164
00165
00166
00167
00168 #define U802TOCMAGIC 0737
00169 #define U803TOCMAGIC 0747
00170 #define U803XTOCMAGIC 0757
00171 #define U64_TOCMAGIC 0767
00172
00173
00174 #define X386MAGIC 0514
00175 #define U802WRMAGIC 0730
00176 #define U802ROMAGIC 0735
00177
00178
00179 #define U800TOCMAGIC 0637
00180 #define U800WRMAGIC 0630
00181 #define U800ROMAGIC 0635
00182
00183 typedef struct filehdr {
00184 uint16_t f_magic;
00185 uint16_t f_nscns;
00186 uint32_t f_timdat;
00187
00188
00189
00190
00191 uint32_t f_symptr;
00192 uint32_t f_nsyms;
00193
00194
00195
00196 uint16_t f_opthdr;
00197 uint16_t f_flags;
00198 } FILHDR;
00199
00200 typedef struct _S_(filehdr) {
00201 uint16_t f_magic;
00202 uint16_t f_nscns;
00203 uint32_t f_timdat;
00204
00205
00206
00207
00208 uint64_t f_symptr;
00209 uint16_t f_opthdr;
00210 uint16_t f_flags;
00211 uint32_t f_nsyms;
00212
00213
00214
00215 } _S_(FILHDR);
00216
00217 #define FILHSZ sizeof(FILHDR)
00218 #define FILHSZ_64 sizeof(FILHDR_64)
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228 typedef struct lineno {
00229 union {
00230 uint32_t l_symndx;
00231 uint32_t l_paddr;
00232 } l_addr;
00233 uint16_t l_lnno;
00234 } LINENO;
00235
00236 typedef struct _S_(lineno) {
00237 union {
00238 uint32_t l_symndx;
00239 uint64_t l_paddr;
00240 } l_addr;
00241 uint32_t l_lnno;
00242 } _S_(LINENO);
00243
00244 #define LINESZ (6)
00245 #define LINESZ_64 (12)
00246
00247
00248 #define SYMNMLEN 8
00249 #define FILNMLEN 14
00250 #define DIMNUM 4
00251
00252 #define LDHDRSZ sizeof(LDHDR)
00253 #define LDHDRSZ_64 sizeof(LDHDR_64)
00254
00255 #define LDSYMSZ sizeof(LDSYM)
00256 #define LDSYMSZ_64 sizeof(LDSYM_64)
00257
00258 #define LDRELSZ sizeof(LDREL)
00259 #define LDRELSZ_64 sizeof(LDREL_64)
00260
00261 typedef struct ldhdr {
00262 #define _CURRENT_LDR_VERSION (1)
00263 uint32_t l_version;
00264 uint32_t l_nsyms;
00265 uint32_t l_nreloc;
00266 uint32_t l_istlen;
00267 uint32_t l_nimpid;
00268 uint32_t l_impoff;
00269 uint32_t l_stlen;
00270 uint32_t l_stoff;
00271 } LDHDR;
00272
00273 typedef struct _S_(ldhdr) {
00274 #define _CURRENT_LDR_VERSION_64 (2)
00275 uint32_t l_version;
00276 uint32_t l_nsyms;
00277 uint32_t l_nreloc;
00278 uint32_t l_istlen;
00279 uint32_t l_nimpid;
00280 uint32_t l_stlen;
00281 uint64_t l_impoff;
00282 uint64_t l_stoff;
00283 uint64_t l_symoff;
00284 uint64_t l_rldoff;
00285 } _S_(LDHDR);
00286
00287 #define l_name _l._l_name
00288 #define l_zeroes _l._l_l._l_zeroes
00289 #define l_offset _l._l_l._l_offset
00290 #define l_nptr _l._l_nptr
00291
00292 typedef struct ldsym {
00293 union {
00294 char _l_name[SYMNMLEN];
00295 struct {
00296 uint32_t _l_zeroes;
00297 uint32_t _l_offset;
00298 } _l_l;
00299 uint32_t _l_nptr[2];
00300 } _l;
00301 uint32_t l_value;
00302 uint16_t l_scnum;
00303 uint8_t l_smtype;
00304
00305
00306
00307
00308
00309
00310 uint8_t l_smclas;
00311 uint32_t l_ifile;
00312 uint32_t l_parm;
00313 } LDSYM;
00314
00315 typedef struct _S_(ldsym) {
00316 uint64_t l_value;
00317 union {
00318 struct {
00319 uint32_t _l_offset;
00320 } _l_l;
00321 uint32_t _l_nptr;
00322 } _l;
00323 uint16_t l_scnum;
00324 uint8_t l_smtype;
00325
00326
00327
00328
00329
00330
00331 uint8_t l_smclas;
00332 uint32_t l_ifile;
00333 uint32_t l_parm;
00334 } _S_(LDSYM);
00335
00336
00337 #define L_WEAK 0x08
00338 #define L_EXPORT 0x10
00339 #define L_ENTRY 0x20
00340 #define L_IMPORT 0x40
00341
00342 #define LDR_WEAK(x) ((x).l_smtype & L_WEAK)
00343 #define LDR_EXPORT(x) ((x).l_smtype & L_EXPORT)
00344 #define LDR_ENTRY(x) ((x).l_smtype & L_ENTRY)
00345 #define LDR_IMPORT(x) ((x).l_smtype & L_IMPORT)
00346 #define LDR_TYPE(x) ((x).l_smtype & 0x07)
00347
00348
00349 typedef struct ldrel
00350 {
00351 uint32_t l_vaddr;
00352 uint32_t l_symndx;
00353
00354
00355
00356
00357 uint16_t l_rtype;
00358 uint16_t l_rsecnm;
00359
00360 } LDREL;
00361
00362 typedef struct _S_(ldrel)
00363 {
00364 uint64_t l_vaddr;
00365 uint16_t l_rtype;
00366 uint16_t l_rsecnm;
00367
00368 uint32_t l_symndx;
00369
00370
00371
00372
00373 } _S_(LDREL);
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384 typedef struct exceptab {
00385 union {
00386 uint32_t e_symndx;
00387 uint32_t e_paddr;
00388 } e_addr;
00389 uint8_t e_lang;
00390 uint8_t e_reason;
00391 } EXCEPTAB;
00392
00393 typedef struct _S_(exceptab) {
00394 union {
00395 uint32_t e_symndx;
00396 uint64_t e_paddr;
00397 } e_addr;
00398 uint8_t e_lang;
00399 uint8_t e_reason;
00400 } _S_(EXCEPTAB);
00401
00402 #define EXCEPTSZ (6)
00403 #define EXCEPTSZ_64 (10)
00404
00405 #define RELSZ (10)
00406 #define RELSZ_64 (14)
00407
00408 typedef struct reloc {
00409 uint32_t r_vaddr;
00410 uint32_t r_symndx;
00411 union {
00412 uint16_t _r_type;
00413 struct {
00414 uint8_t _r_rsize;
00415 uint8_t _r_rtype;
00416 } _r_r;
00417 } _r;
00418 } RELOC;
00419
00420 typedef struct _S_(reloc) {
00421 uint64_t r_vaddr;
00422 uint32_t r_symndx;
00423 union {
00424 uint16_t _r_type;
00425 struct {
00426 uint8_t _r_rsize;
00427 uint8_t _r_rtype;
00428 } _r_r;
00429 } _r;
00430 } _S_(RELOC);
00431
00432 #define r_type _r._r_type
00433 #define r_rsize _r._r_r._r_rsize
00434 #define r_rtype _r._r_r._r_rtype
00435
00436 #define R_LEN 0x3F
00437 #define R_SIGN 0x80
00438 #define R_FIXUP 0x40
00439
00440 #define RELOC_RLEN(x) ((x)._r._r_r._r_rsize & R_LEN)
00441 #define RELOC_RSIGN(x) ((x)._r._r_r._r_rsize & R_SIGN)
00442 #define RELOC_RFIXUP(x) ((x)._r._r_r._r_rsize & R_FIXUP)
00443 #define RELOC_RTYPE(x) ((x)._r._r_r._r_rtype)
00444
00445
00446
00447
00448 #define R_POS 0x00
00449 #define R_NEG 0x01
00450 #define R_REL 0x02
00451 #define R_TOC 0x03
00452 #define R_TRL 0x12
00453 #define R_TRLA 0x13
00454 #define R_GL 0x05
00455 #define R_TCL 0x06
00456 #define R_RL 0x0C
00457 #define R_RLA 0x0D
00458 #define R_REF 0x0F
00459 #define R_BA 0x08
00460 #define R_RBA 0x18
00461 #define R_BR 0x0A
00462 #define R_RBR 0x1A
00463
00464
00465 #define R_RBAC 0x19
00466 #define R_RBRC 0x1B
00467 #define R_RTB 0x04
00468 #define R_RRTBI 0x14
00469 #define R_RRTBA 0x15
00470
00471
00472
00473
00474
00475 #define R_ABS 0
00476 #define R_OFF8 07
00477 #define R_OFF16 010
00478 #define R_SEG12 011
00479 #define R_AUX 013
00480 #define R_DIR16 01
00481 #define R_REL16 02
00482 #define R_IND16 03
00483 #define R_DIR24 04
00484 #define R_REL24 05
00485 #define R_OPT16 014
00486 #define R_IND24 015
00487 #define R_IND32 016
00488 #define R_DIR10 025
00489 #define R_REL10 026
00490 #define R_REL32 027
00491 #define R_DIR32S 012
00492 #define R_RELBYTE 017
00493 #define R_RELWORD 020
00494 #define R_RELLONG 021
00495 #define R_PCRBYTE 022
00496 #define R_PCRWORD 023
00497 #define R_PCRLONG 024
00498
00499 #define SCNHSZ sizeof(SCNHDR)
00500 #define SCNHSZ_64 sizeof(SCNHDR_64)
00501
00502
00503
00504
00505 #define _OVERFLOW_MARKER (65535)
00506 #define _OVERFLOW_MARKER_64 (4294967295)
00507
00508 typedef struct scnhdr {
00509 char s_name[8];
00510 uint32_t s_paddr;
00511 uint32_t s_vaddr;
00512 uint32_t s_size;
00513 uint32_t s_scnptr;
00514 uint32_t s_relptr;
00515 uint32_t s_lnnoptr;
00516 uint16_t s_nreloc;
00517 uint16_t s_nlnno;
00518 uint32_t s_flags;
00519 } SCNHDR;
00520
00521 typedef struct _S_(scnhdr) {
00522 char s_name[8];
00523 uint64_t s_paddr;
00524 uint64_t s_vaddr;
00525 uint64_t s_size;
00526 uint64_t s_scnptr;
00527 uint64_t s_relptr;
00528 uint64_t s_lnnoptr;
00529 uint32_t s_nreloc;
00530 uint32_t s_nlnno;
00531 uint32_t s_flags;
00532 } _S_(SCNHDR);
00533
00534
00535
00536
00537
00538 #define _TEXT ".text"
00539 #define _DATA ".data"
00540 #define _BSS ".bss"
00541 #define _PAD ".pad"
00542 #define _INFO ".info"
00543 #define _LOADER ".loader"
00544 #define _TYPCHK ".typchk"
00545 #define _DEBUG ".debug"
00546 #define _EXCEPT ".except"
00547 #define _OVRFLO ".ovrflo"
00548
00549
00550
00551
00552
00553 #define STYP_REG 0x00
00554 #define STYP_PAD 0x08
00555 #define STYP_TEXT 0x20
00556 #define STYP_DATA 0x40
00557 #define STYP_BSS 0x80
00558 #define STYP_EXCEPT 0x0100
00559 #define STYP_INFO 0x0200
00560 #define STYP_LOADER 0x1000
00561 #define STYP_DEBUG 0x2000
00562 #define STYP_TYPCHK 0x4000
00563 #define STYP_OVRFLO 0x8000
00564
00565 #define SYMESZ (18)
00566 #define SYMESZ_64 (18)
00567
00568 #define SYMNMLEN 8
00569 #define FILNMLEN 14
00570 #define DIMNUM 4
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591 typedef struct syment {
00592 union {
00593 char _n_name[SYMNMLEN];
00594 struct {
00595 uint32_t _n_zeroes;
00596 uint32_t _n_offset;
00597 } _n_n;
00598 uint32_t _n_nptr[2];
00599 } _n;
00600 uint32_t n_value;
00601 int16_t n_scnum;
00602 union {
00603 uint16_t _n_type;
00604 struct {
00605 uint8_t _n_lang;
00606 uint8_t _n_cpu;
00607 }_n_lc;
00608 } _n_tylc;
00609 uint8_t n_sclass;
00610 uint8_t n_numaux;
00611 } SYMENT;
00612
00613 #define n_name _n._n_name
00614 #define n_zeroes _n._n_n._n_zeroes
00615 #define n_nptr _n._n_nptr[1]
00616
00617 typedef struct _S_(syment) {
00618 uint64_t n_value;
00619 union {
00620 struct {
00621 uint32_t _n_offset;
00622 } _n_n;
00623 uint32_t _n_nptr;
00624 } _n;
00625 int16_t n_scnum;
00626 union {
00627 uint16_t _n_type;
00628 struct {
00629 uint8_t _n_lang;
00630 uint8_t _n_cpu;
00631 }_n_lc;
00632 } _n_tylc;
00633
00634 uint8_t n_sclass;
00635 uint8_t n_numaux;
00636 } _S_(SYMENT);
00637
00638 #define n_offset _n._n_n._n_offset
00639
00640 #ifndef n_type
00641 #define n_type _n_tylc._n_type
00642 #endif
00643
00644 #define n_cputype _n_tylc._n_lc._n_cpu
00645 #define n_lang _n_tylc._n_lc._n_lang
00646
00647
00648
00649
00650
00651
00652
00653 #define N_UNDEF 0
00654 #define N_ABS -1
00655 #define N_DEBUG -2
00656
00657
00658
00659
00660
00661
00662
00663 #define T_NULL 0
00664 #define T_ARG 1
00665 #define T_CHAR 2
00666 #define T_SHORT 3
00667 #define T_INT 4
00668 #define T_LONG 5
00669 #define T_FLOAT 6
00670 #define T_DOUBLE 7
00671 #define T_STRUCT 8
00672 #define T_UNION 9
00673 #define T_ENUM 10
00674 #define T_MOE 11
00675 #define T_UCHAR 12
00676 #define T_USHORT 13
00677 #define T_UINT 14
00678 #define T_ULONG 15
00679
00680
00681
00682
00683 #define DT_NON 0
00684 #define DT_PTR 1
00685 #define DT_FCN 2
00686 #define DT_ARY 3
00687
00688
00689
00690
00691 #define N_BTMASK 017
00692 #define N_TMASK 060
00693 #define N_TMASK1 0300
00694 #define N_TMASK2 0360
00695 #define N_BTSHFT 4
00696 #define N_TSHIFT 2
00697
00698 #ifndef _COMPILER
00699
00700
00701
00702 #define BTYPE(x) ((x) & N_BTMASK)
00703 #define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
00704 #define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
00705 #define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
00706 #define ISTAG(x) ((x)==C_STRTAG || (x)==C_UNTAG || (x)==C_ENTAG)
00707 #define INCREF(x) ((((x)&~N_BTMASK)<<N_TSHIFT)|(DT_PTR<<N_BTSHFT)|(x&N_BTMASK))
00708 #define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
00709 #endif
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720 #define AUXESZ (18)
00721 #define AUXESZ_64 (18)
00722
00723 typedef union auxent {
00724 struct {
00725 uint32_t x_tagndx;
00726
00727 #define x_exptr x_tagndx
00728 union {
00729 struct {
00730 uint16_t x_lnno;
00731 uint16_t x_size;
00732 } x_lnsz;
00733 uint32_t x_fsize;
00734 } x_misc;
00735 union {
00736 struct {
00737 uint32_t x_lnnoptr;
00738 uint32_t x_endndx;
00739 } x_fcn;
00740 struct {
00741 uint16_t x_dimen[DIMNUM];
00742 } x_ary;
00743 } x_fcnary;
00744 uint16_t x_tvndx;
00745 } x_sym;
00746
00747 union {
00748 char x_fname[FILNMLEN];
00749 struct {
00750 uint32_t x_zeroes;
00751 uint32_t x_offset;
00752 char x_pad[FILNMLEN-8];
00753 uint8_t x_ftype;
00754 } _x;
00755 } x_file;
00756
00757 struct {
00758 uint32_t x_scnlen;
00759 uint16_t x_nreloc;
00760 uint16_t x_nlinno;
00761 } x_scn;
00762
00763
00764 struct {
00765 uint32_t x_scnlen;
00766 uint32_t x_parmhash;
00767 uint16_t x_snhash;
00768 uint8_t x_smtyp;
00769
00770
00771 uint8_t x_smclas;
00772 uint32_t x_stab;
00773 uint16_t x_snstab;
00774 } x_csect;
00775 } AUXENT;
00776
00777 typedef union _S_(auxent) {
00778 struct {
00779 struct {
00780 struct {
00781 uint32_t x_lnno;
00782 } x_lnsz;
00783 } x_misc;
00784 char pad[13];
00785 uint8_t x_auxtype;
00786 } x_sym;
00787
00788 union {
00789 char x_fname[FILNMLEN];
00790 struct {
00791 uint32_t x_zeroes;
00792 uint32_t x_offset;
00793 char x_pad[FILNMLEN-8];
00794 uint8_t x_ftype;
00795 char pad[2];
00796 uint8_t x_auxtype;
00797 } _x;
00798 } x_file;
00799
00800
00801 struct {
00802 uint32_t x_scnlen_lo;
00803 uint32_t x_parmhash;
00804 uint16_t x_snhash;
00805 uint8_t x_smtyp;
00806
00807
00808 uint8_t x_smclas;
00809 uint32_t x_scnlen_hi;
00810 char pad;
00811 uint8_t x_auxtype;
00812 } x_csect;
00813 struct {
00814 uint64_t x_exptr;
00815 uint32_t x_fsize;
00816 uint32_t x_endndx;
00817 char pad;
00818 uint8_t x_auxtype;
00819 } x_except;
00820 struct {
00821 uint64_t x_lnnoptr;
00822 uint32_t x_fsize;
00823 uint32_t x_endndx;
00824 char pad;
00825 uint8_t x_auxtype;
00826 } x_fcn;
00827 struct {
00828 char x_pad[AUXESZ-1];
00829 uint8_t x_auxtype;
00830 } x_auxtype;
00831 } _S_(AUXENT);
00832
00833
00834 #define _AUX_EXCEPT 255
00835 #define _AUX_FCN 254
00836 #define _AUX_SYM 253
00837 #define _AUX_FILE 252
00838 #define _AUX_CSECT 251
00839
00840
00841
00842 #define XFT_FN 0
00843 #define XFT_CT 1
00844 #define XFT_CV 2
00845 #define XFT_CD 128
00846
00847
00848
00849 #define XTY_ER 0
00850 #define XTY_SD 1
00851 #define XTY_LD 2
00852 #define XTY_CM 3
00853
00854
00855 #define XTY_HL 6
00856 #define XTY_US 5
00857 #define XTY_EM 4
00858
00859
00860
00861 #define XMC_PR 0
00862 #define XMC_RO 1
00863 #define XMC_DB 2
00864 #define XMC_GL 6
00865 #define XMC_XO 7
00866 #define XMC_SV 8
00867 #define XMC_SV64 17
00868 #define XMC_SV3264 18
00869 #define XMC_TI 12
00870 #define XMC_TB 13
00871
00872 #define XMC_RW 5
00873 #define XMC_TC0 15
00874 #define XMC_TC 3
00875 #define XMC_TD 16
00876 #define XMC_DS 10
00877 #define XMC_UA 4
00878 #define XMC_BS 9
00879 #define XMC_UC 11
00880
00881
00882
00883 #define _ETEXT "etext"
00884 #define _EDATA "edata"
00885 #define _END "end"
00886 #define _EF ".ef"
00887 #define _START "__start"
00888
00889
00890
00891
00892
00893 #define C_EFCN 255
00894 #define C_NULL 0
00895 #define C_AUTO 1
00896 #define C_EXT 2
00897 #define C_STAT 3
00898 #define C_REG 4
00899 #define C_EXTDEF 5
00900 #define C_LABEL 6
00901 #define C_ULABEL 7
00902 #define C_MOS 8
00903 #define C_ARG 9
00904 #define C_STRTAG 10
00905 #define C_MOU 11
00906 #define C_UNTAG 12
00907 #define C_TPDEF 13
00908 #define C_USTATIC 14
00909 #define C_ENTAG 15
00910 #define C_MOE 16
00911 #define C_REGPARM 17
00912 #define C_FIELD 18
00913 #define C_BLOCK 100
00914 #define C_FCN 101
00915 #define C_EOS 102
00916 #define C_FILE 103
00917 #define C_LINE 104
00918 #define C_ALIAS 105
00919 #define C_HIDDEN 106
00920
00921 #define C_HIDEXT 107
00922 #define C_BINCL 108
00923 #define C_EINCL 109
00924 #define C_INFO 110
00925 #define C_WEAKEXT 111
00926
00927
00928
00929 #define C_NULL_VALUE 0x00DE1E00
00930
00931
00932
00933 #ifndef TB_C
00934
00935 #define TB_C 0
00936 #define TB_FORTRAN 1
00937 #define TB_PASCAL 2
00938 #define TB_ADA 3
00939 #define TB_PLI 4
00940 #define TB_BASIC 5
00941 #define TB_LISP 6
00942 #define TB_COBOL 7
00943 #define TB_MODULA2 8
00944 #define TB_CPLUSPLUS 9
00945 #define TB_RPG 10
00946 #define TB_PL8 11
00947 #define TB_ASM 12
00948 #define TB_HPJ 13
00949 #define TB_RESERVED_1 251
00950 #define TB_RESERVED_2 252
00951 #define TB_RESERVED_3 253
00952 #define TB_RESERVED_4 254
00953 #define TB_RESERVED_5 255
00954 #endif
00955
00956 #define TB_OBJECT 248
00957 #define TB_FRONT 249
00958 #define TB_BACK 250
00959
00960
00961
00962
00963 #define DBXMASK 0x80
00964
00965 #define C_GSYM 0x80
00966 #define C_LSYM 0x81
00967 #define C_PSYM 0x82
00968 #define C_RSYM 0x83
00969 #define C_RPSYM 0x84
00970 #define C_STSYM 0x85
00971 #define C_TCSYM 0x86
00972 #define C_BCOMM 0x87
00973 #define C_ECOML 0x88
00974 #define C_ECOMM 0x89
00975 #define C_DECL 0x8c
00976 #define C_ENTRY 0x8d
00977 #define C_FUN 0x8e
00978 #define C_BSTAT 0x8f
00979 #define C_ESTAT 0x90
00980
00981 #define TP_ARRAY {\
00982 "int:t-1=r-1;-2147483648;2147483647",\
00983 "char:t-2=@s8;r-2;0;255",\
00984 "short:t-3=@s16;r-3;-32768;32767",\
00985 "long:t-4=-1",\
00986 "unsigned char:t-5=@s8;r-5;0;255",\
00987 "signed char:t-6=@s8;r-6;-128;127",\
00988 "unsigned short:t-7=@s16;r-7;0;65535",\
00989 "unsigned int:t-8=r-8;0;4294967295",\
00990 "unsigned:t-9=-8",\
00991 "unsigned long:t-10=-8",\
00992 "void:t-11=r-11;0;0",\
00993 "float:t-12=g-12;4",\
00994 "double:t-13=g-12;8",\
00995 "long double:t-14=g-12;16",\
00996 "integer:t-15=-1",\
00997 "boolean:t-16=efalse:0,true:1,;",\
00998 "shortreal:t-17=g-12;4",\
00999 "real:t-18=g-12;8",\
01000 "stringptr:t-19=N-19",\
01001 "character:t-20=@s8;r-20;0;255",\
01002 "logical*1:t-21=@s8;r-21;0;255",\
01003 "logical*2:t-22=@s16;r-22;0;65535",\
01004 "logical*4:t-23=r-23;0;4294967295",\
01005 "logical:t-24=-23",\
01006 "complex:t-25=c-25;8",\
01007 "double complex:t-26=c-25;16",\
01008 "integer*1:t-27=-6",\
01009 "integer*2:t-28=-3",\
01010 "integer*4:t-29=-1",\
01011 "wchar:t-30=@s16;r-30;0;65535", \
01012 "long long:t-31=r-31;-9223372036854775808;9223372036854775807", \
01013 "unsigned long long:t-32=r-32;0;18446744073709551615", \
01014 "logical*8:t-33=r-33;0;18446744073709551615",\
01015 "integer*8:t-34=-31",\
01016 "long:t-35=r-35;-9223372036854775808;9223372036854775807", \
01017 "unsigned long:t-36=r-36;0;18446744073709551615", \
01018 }
01019
01020 #define TP_INT (-1)
01021 #define TP_CHAR (-2)
01022 #define TP_SHORT (-3)
01023 #define TP_LONG (-4)
01024 #define TP_UCHAR (-5)
01025 #define TP_SCHAR (-6)
01026 #define TP_USHORT (-7)
01027 #define TP_UINT (-8)
01028 #define TP_UNSIGNED (-9)
01029 #define TP_ULONG (-10)
01030 #define TP_VOID (-11)
01031 #define TP_FLOAT (-12)
01032 #define TP_DOUBLE (-13)
01033 #define TP_LDOUBLE (-14)
01034 #define TP_PASINT (-15)
01035 #define TP_BOOL (-16)
01036 #define TP_SHRTREAL (-17)
01037 #define TP_REAL (-18)
01038 #define TP_STRNGPTR (-19)
01039 #define TP_FCHAR (-20)
01040 #define TP_LOGICAL1 (-21)
01041 #define TP_LOGICAL2 (-22)
01042 #define TP_LOGICAL4 (-23)
01043 #define TP_LOGICAL (-24)
01044 #define TP_COMPLEX (-25)
01045 #define TP_DCOMPLEX (-26)
01046 #define TP_INTEGER1 (-27)
01047 #define TP_INTEGER2 (-28)
01048 #define TP_INTEGER4 (-29)
01049 #define TP_WCHAR (-30)
01050 #define TP_LLONG (-31)
01051 #define TP_ULLONG (-32)
01052 #define TP_LOGICAL8 (-33)
01053 #define TP_INTEGER8 (-34)
01054 #define TP_LONG_64 (-35)
01055 #define TP_ULONG_64 (-36)
01056 #define TP_NTYPES 36