20
#ifdef COFF_ENCAPSULATE
24
#include "a.out.encap.h"
43
/* is aouthdr.h one always here on sysv
44
Interactive systems needs it now at least. I am not sure if
45
the others used to include this...
48
#define MAXPATHLEN 200
49
#define N_BADMAG(x) !(ISCOFF(x.f_magic))
50
#define N_SYMOFF(x) (x).f_symptr
51
#define NSYMS(x) (x).f_nsyms
64
#define reloc relocation_info
67
#define NSYMS(f) ((unsigned int )((f).a_syms/(sizeof(struct nlist))))
74
#define SYMESZ (sizeof(struct nlist))
78
/* no symbols are directly in the table */
82
#ifndef EXT_and_TEXT_BSS_DAT
83
#define EXT_and_TEXT_BSS_DAT(p) (((p)->n_type & N_EXT) && \
84
((p)->n_type & (N_TEXT | N_DATA | N_BSS)))
88
#define SYM_NAME(x) (my_string_table+(x)->n_un.n_strx)
96
#define N_RELOFF(p) (N_TXTOFF(p) +(p).a_text+(p).a_data )
99
#define NTYPE(sym) ((sym)->n_type & N_TYPE)
102
#define N_SECTION(sym) (sym->n_type & N_TYPE & ~N_EXT)
105
#define N_UNDEF N_UNDF
113
unsigned char n_type;
114
unsigned char n_length;
117
union { long n_strx;} n_un;
122
#ifdef COFF /* sys v */
123
#ifndef EXT_and_TEXT_BSS_DAT
124
#define EXT_and_TEXT_BSS_DAT(p) \
125
((1 <= (p)->n_scnum) && ((p)->n_scnum <= 3 ) && (p)->n_sclass == C_EXT)
127
#define NUM_AUX(p) (p)->n_numaux
128
#define N_TXTOFF(p) section[1].s_scnptr
129
#define SYM_NAME(p) \
130
(((p)->n_zeroes == 0) ? \
131
&my_string_table[(p)->n_offset] : \
132
((p)->n_name[SYMNMLEN -1] ? \
133
(strncpy(tem,(p)->n_name, \
138
#define NTYPE(sym) (sym)->n_scnum