7
#define HAVE_AOUT <a.out.h>
10
#define ADDITIONAL_FEATURES \
11
ADD_FEATURE("IBMRT"); \
13
ADD_FEATURE("BUGGY-CC"); \
16
#define USE_C_EXTENDED_DIV
17
#define USE_C_EXTENDED_MUL
22
#undef SET_REAL_MAXPAGE
23
#define SET_REAL_MAXPAGE \
24
real_maxpage= ulimit(3)/PAGESIZE; \
25
if (real_maxpage > MAXPAGE) \
26
real_maxpage = MAXPAGE;
28
#define N_DATADDR(header)
29
#define DATA_BEGIN (char *)header.a_dbase
32
#undef MEM_SAVE_LOCALS
34
#define MEM_SAVE_LOCALS \
39
#define READ_HEADER fread(&header, sizeof(header), 1, original); \
40
data_begin=DATA_BEGIN; \
41
data_end = core_end; \
42
original_data = header.a_data; \
43
header.a_data = data_end - data_begin; \
45
if (header.a_flags & A_HDREXT) printf("extended header"); \
46
fwrite(&header, sizeof(header), 1, save);
48
/* I don't know why all the bsd versions are subtracting this off
49
I thought the header.a_text was the actual size of the text
50
not including the header */
53
#define FILECPY_HEADER \
54
filecpy(save, original, header.a_text - sizeof(header));
57
#define COPY_TO_SAVE \
58
filecpy(save, original, header.a_syms+header.a_trsize+header.a_drsize +header.a_lnums); \
59
fread(&stsize, sizeof(stsize), 1, original); \
60
fwrite(&stsize, sizeof(stsize), 1, save); \
61
filecpy(save, original, stsize - sizeof(stsize))
64
#define LD_COMMAND(command,main,start,input,ldarg,output) \
65
sprintf(command, "ld -d -x -A %s -T %x %s %s -o %s", \
66
main,start,input,ldarg,output)
67
/* smallest address data can occur */
68
/* #define DBEGIN 0x20000000 */
70
#define SYM_EXTERNAL_P(sym) (((sym)->n_sclass & (~N_SECT)) == C_EXT)
71
#define SYM_UNDEF_P(sym) (((sym)->n_sclass & N_SECT) == N_UNDF)
72
#define NUM_AUX(sym) ((sym)->n_numaux)
73
#define SYM_NAME(p) SYM_NAME1((struct syment *)(p))
74
#define SYM_NAME1(p) \
75
(((p)->_n._n_n._n_zeroes == 0) ? \
76
&my_string_table[(p)->_n._n_n._n_offset] : \
77
((p)->_n._n_name[SYMNMLEN -1] ? \
78
(strncpy(tem,(p)->_n._n_name, \
83
/* the section like N_ABS,N_TEXT,.. */
84
#define N_SECTION(sym) (((struct syment *)sym)->n_sclass & N_SECT )
87
/* the header is regared as part of the text */
88
#define N_RELOFF(header) A_TRELPOS(header)
89
#define N_SYMOFF(header) A_SYMPOS(header)
90
#define N_TXTOFF(header) A_TEXTPOS(header)
93
#define EXT_and_TEXT_BSS_DAT(p) \
94
((SYM_EXTERNAL_P(p)) && ((N_SECTION(p) == N_TEXT) || \
95
(N_SECTION(p) == N_DATA) || \
96
(N_SECTION(p) == N_BSS)))
98
#define N_BADMAG(x) BADMAG(x)
99
/* the beginning of the string table: first long will be size of string
101
#define N_STROFF(x) A_NAMEPOS(x)
103
#define MUST_SEEK_TO_STROFF
105
/* in aix we must use the pointer to the constant pool for the init_code,
106
not the actual pointer to the code. */
108
/* this is no longer valid
109
#define VERIFY_INIT \
110
if (at==0 || *(char **)at!= memory->cfd.cfd_start) \
111
FEerror("init code constant pool bad");
113
/* find the first symbol in the data section:
114
It should begin with with "_init_" and correspond to the
115
beginning of the pcp pool for the init function..*/
117
{ if (*ptr==0 && (N_SECTION(sym) == N_DATA) && sym->n_value ) \
119
char *str=SYM_NAME(sym); \
120
dprintf(find init: %s ,str); \
121
if (str[1]=='i' && str[2]=='n' && str[3]=='i' && str[4]== 't' \
122
&& str[5]=='_' && str[0]== '_' && str[strlen(str)-1] !='X') \
123
*ptr= sym->n_value ; \
124
else {/* printf("The first data symbol was not the init");*/} \
127
#define RELOC_FILE "rel_aix.c"
130
/* the system defines a different getwd */
131
#define getwd ourgetwd
133
/* these two symbols are too long for the rt pl8cc compiler */
135
#define check_type_or_pathname_string_symbol_stream check_type_or_path_or_strm
136
#define check_type_or_Pathname_string_symbol check_type_or_path_sym
137
#define TSor_pathname_string_symbol_stream TSor_path_string_sym_strm
138
#define check_type_or_symbol_string_package check_type_or_sym_str_pack
141
/* If free is likely to be called multiple times on the same block
142
(in contravention of ANSI C) by system functions, don't break on
147
/* Begin for cmpinclude */
150
/* End for cmpinclude */