OSDN Git Service

2000-01-12 Robert Lipe <robertl@sco.com>
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / sco5.h
1 /* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5.
2    Copyright (C) 1992, 95-98, 1999 Free Software Foundation, Inc.
3    Contributed by Kean Johnston (hug@netcom.com)
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #include "i386/i386.h"  /* Base i386 target definitions */
23 #include "i386/att.h"   /* Use AT&T i386 assembler syntax */
24
25 #undef TARGET_VERSION
26 #define TARGET_VERSION fprintf (stderr, " (i386, SCO OpenServer 5 Syntax)");
27
28 #undef LPREFIX
29 #define LPREFIX                         ".L"
30
31 #undef ALIGN_ASM_OP
32 #define ALIGN_ASM_OP                    "\t.align"
33
34 #undef ASCII_DATA_ASM_OP
35 #define ASCII_DATA_ASM_OP               "\t.ascii"
36
37 #undef ASM_BYTE_OP
38 #define ASM_BYTE_OP                     "\t.byte"
39
40 #undef IDENT_ASM_OP
41 #define IDENT_ASM_OP                    "\t.ident"
42
43 #undef COMMON_ASM_OP
44 #define COMMON_ASM_OP                   "\t.comm"
45
46 #undef SET_ASM_OP
47 #define SET_ASM_OP                      "\t.set"
48
49 #undef LOCAL_ASM_OP
50 #define LOCAL_ASM_OP                    "\t.local"
51
52 #undef INT_ASM_OP
53 #define INT_ASM_OP                      "\t.long"
54
55 #undef ASM_SHORT
56 #define ASM_SHORT                       "\t.value"
57
58 #undef ASM_LONG
59 #define ASM_LONG                        "\t.long"
60
61 #undef ASM_DOUBLE
62 #define ASM_DOUBLE                      "\t.double"
63
64 #undef TYPE_ASM_OP
65 #define TYPE_ASM_OP                     "\t.type"
66
67 #undef SIZE_ASM_OP
68 #define SIZE_ASM_OP                     "\t.size"
69
70 #undef STRING_ASM_OP
71 #define STRING_ASM_OP                   "\t.string"
72
73 #undef SKIP_ASM_OP
74 #define SKIP_ASM_OP                     "\t.zero"
75
76 #undef GLOBAL_ASM_OP
77 #define GLOBAL_ASM_OP                   "\t.globl"
78
79 #undef EH_FRAME_SECTION_ASM_OP
80 #define EH_FRAME_SECTION_ASM_OP_COFF    "\t.section\t.ehfram, \"x\""
81 #define EH_FRAME_SECTION_ASM_OP_ELF     "\t.section\t.eh_frame, \"aw\""
82 #define EH_FRAME_SECTION_ASM_OP \
83   ((TARGET_ELF) ? EH_FRAME_SECTION_ASM_OP_ELF : EH_FRAME_SECTION_ASM_OP_COFF)
84
85 /* Avoid problems (long sectino names, forward assembler refs) with DWARF
86    exception unwinding when we're generating COFF */
87 #define DWARF2_UNWIND_INFO      \
88   ((TARGET_ELF) ? 1 : 0 )  
89
90 #undef CONST_SECTION_ASM_OP
91 #define CONST_SECTION_ASM_OP_COFF       "\t.section\t.rodata, \"x\""
92 #define CONST_SECTION_ASM_OP_ELF        "\t.section\t.rodata"
93 #define CONST_SECTION_ASM_OP    \
94   ((TARGET_ELF) ? CONST_SECTION_ASM_OP_ELF : CONST_SECTION_ASM_OP_COFF)
95
96 #undef USE_CONST_SECTION
97 #define USE_CONST_SECTION_ELF           1
98 #define USE_CONST_SECTION_COFF          0
99 #define USE_CONST_SECTION       \
100  ((TARGET_ELF) ? USE_CONST_SECTION_ELF : USE_CONST_SECTION_COFF)
101
102 #undef INIT_SECTION_ASM_OP
103 #define INIT_SECTION_ASM_OP_ELF         "\t.section\t.init"
104 /* Rename these for COFF becuase crt1.o will try to run them. */
105 #define INIT_SECTION_ASM_OP_COFF        "\t.section\t.ctor ,\"x\""
106 #define INIT_SECTION_ASM_OP     \
107   ((TARGET_ELF) ? INIT_SECTION_ASM_OP_ELF : INIT_SECTION_ASM_OP_COFF)
108
109 #undef CTORS_SECTION_ASM_OP
110 #define CTORS_SECTION_ASM_OP_ELF        "\t.section\t.ctors,\"aw\""
111 #define CTORS_SECTION_ASM_OP_COFF       INIT_SECTION_ASM_OP_COFF
112 #define CTORS_SECTION_ASM_OP    \
113  ((TARGET_ELF) ? CTORS_SECTION_ASM_OP_ELF : CTORS_SECTION_ASM_OP_COFF)
114
115 #undef DTORS_SECTION_ASM_OP
116 #define DTORS_SECTION_ASM_OP_ELF        "\t.section\t.dtors, \"aw\""
117 #define DTORS_SECTION_ASM_OP_COFF       FINI_SECTION_ASM_OP_COFF
118 #define DTORS_SECTION_ASM_OP    \
119  ((TARGET_ELF) ? DTORS_SECTION_ASM_OP_ELF : DTORS_SECTION_ASM_OP_COFF)
120
121 #undef FINI_SECTION_ASM_OP
122 #define FINI_SECTION_ASM_OP_ELF         "\t.section\t.fini"
123 #define FINI_SECTION_ASM_OP_COFF        "\t.section\t.dtor, \"x\""
124 #define FINI_SECTION_ASM_OP     \
125  ((TARGET_ELF) ? FINI_SECTION_ASM_OP_ELF : FINI_SECTION_ASM_OP_COFF)
126
127 #undef BSS_SECTION_ASM_OP
128 #define BSS_SECTION_ASM_OP              "\t.data"
129
130 #undef TEXT_SECTION_ASM_OP
131 #define TEXT_SECTION_ASM_OP             "\t.text"
132
133 #undef DATA_SECTION_ASM_OP
134 #define DATA_SECTION_ASM_OP             "\t.data"
135
136 #undef TYPE_OPERAND_FMT
137 #define TYPE_OPERAND_FMT                "@%s"
138
139 #undef APPLY_RESULT_SIZE
140 #define APPLY_RESULT_SIZE                                               \
141 (TARGET_ELF) ? size : 116
142
143 #ifndef ASM_DECLARE_RESULT
144 #define ASM_DECLARE_RESULT(FILE, RESULT)
145 #endif
146
147 #define SCO_DEFAULT_ASM_COFF(FILE,NAME)                                 \
148 do {                                                                    \
149       ASM_OUTPUT_LABEL (FILE, NAME);                                    \
150   } while (0)
151
152 #undef ASM_DECLARE_FUNCTION_NAME
153 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                     \
154   do {                                                                  \
155     if (TARGET_ELF) {                                                   \
156       fprintf (FILE, "%s\t ", TYPE_ASM_OP);                             \
157       assemble_name (FILE, NAME);                                       \
158       putc (',', FILE);                                                 \
159       fprintf (FILE, TYPE_OPERAND_FMT, "function");                     \
160       putc ('\n', FILE);                                                \
161       ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));                    \
162       ASM_OUTPUT_LABEL(FILE, NAME);                                     \
163     } else                                                              \
164       SCO_DEFAULT_ASM_COFF(FILE, NAME);                                 \
165 } while (0)
166
167 #undef ASM_DECLARE_FUNCTION_SIZE
168 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)                    \
169   do {                                                                  \
170     if (TARGET_ELF) { if (!flag_inhibit_size_directive)                 \
171       {                                                                 \
172         fprintf (FILE, "%s\t ", SIZE_ASM_OP);                           \
173         assemble_name (FILE, (FNAME));                                  \
174         fprintf (FILE, ",.-");                                          \
175         assemble_name (FILE, (FNAME));                                  \
176         putc ('\n', FILE);                                              \
177       } }                                                               \
178   } while (0)
179
180 #undef ASM_DECLARE_OBJECT_NAME
181 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)                       \
182   do {                                                                  \
183     if (TARGET_ELF) {                                                   \
184       fprintf (FILE, "%s\t ", TYPE_ASM_OP);                             \
185       assemble_name (FILE, NAME);                                       \
186       putc (',', FILE);                                                 \
187       fprintf (FILE, TYPE_OPERAND_FMT, "object");                       \
188       putc ('\n', FILE);                                                \
189       size_directive_output = 0;                                        \
190       if (!flag_inhibit_size_directive && DECL_SIZE (DECL))             \
191         {                                                               \
192         size_directive_output = 1;                                      \
193         fprintf (FILE, "%s\t ", SIZE_ASM_OP);                           \
194         assemble_name (FILE, NAME);                                     \
195         fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
196         }                                                               \
197       ASM_OUTPUT_LABEL(FILE, NAME);                                     \
198     } else                                                              \
199       SCO_DEFAULT_ASM_COFF(FILE, NAME);                                 \
200   } while (0)
201
202 #undef ASM_FILE_START_1
203 #define ASM_FILE_START_1(FILE)
204
205 #undef ASM_FILE_START
206 #define ASM_FILE_START(FILE)                                            \
207 do {                                                                    \
208   output_file_directive((FILE),main_input_filename);                    \
209   fprintf ((FILE), "\t.version\t\"01.01\"\n");                          \
210 } while (0)
211
212 #undef ASM_FILE_END
213 #define ASM_FILE_END(FILE)                                              \
214 do {                                                                    \
215      if (!flag_no_ident)                                                \
216         fprintf ((FILE), "%s\t\"GCC: (GNU) %s\"\n",                     \
217                  IDENT_ASM_OP, version_string);                         \
218 } while (0)
219
220 #undef ASM_FINISH_DECLARE_OBJECT
221 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)         \
222 do {                                                                     \
223   if (TARGET_ELF) {                                                     \
224      char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);                   \
225      if (!flag_inhibit_size_directive && DECL_SIZE (DECL)                \
226          && ! AT_END && TOP_LEVEL                                        \
227          && DECL_INITIAL (DECL) == error_mark_node                       \
228          && !size_directive_output)                                      \
229        {                                                                 \
230          size_directive_output = 1;                                      \
231          fprintf (FILE, "%s\t ", SIZE_ASM_OP);                           \
232          assemble_name (FILE, name);                                     \
233          fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
234        }                                                                 \
235     }                                                                    \
236 } while (0)
237
238 #undef ASM_GENERATE_INTERNAL_LABEL
239 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)                 \
240 do {                                                                    \
241   if (TARGET_ELF)                                                       \
242     sprintf (LABEL, "*.%s%d", (PREFIX), (NUM));                         \
243   else                                                                  \
244     sprintf (LABEL, ".%s%d", (PREFIX), (NUM));                          \
245 } while (0)
246
247 #undef ASM_OUTPUT_ADDR_DIFF_ELT
248 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
249 do {                                                                    \
250   if (TARGET_ELF)                                                       \
251     fprintf (FILE, "%s _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", ASM_LONG, LPREFIX, VALUE); \
252   else                                                                  \
253     fprintf (FILE, "\t.word %s%d-%s%d\n", LPREFIX,VALUE,LPREFIX,REL);   \
254 } while (0)
255
256 #undef ASM_OUTPUT_ALIGNED_COMMON
257 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)              \
258 do {                                                                    \
259   fprintf ((FILE), "%s\t", COMMON_ASM_OP);                              \
260   assemble_name ((FILE), (NAME));                                       \
261   if (TARGET_ELF)                                                       \
262     fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);      \
263   else                                                                  \
264     fprintf ((FILE), ",%u\n", (SIZE));                                  \
265 } while (0)
266
267 #undef ASM_OUTPUT_ALIGNED_LOCAL
268 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
269 do {                                                                    \
270   if (TARGET_ELF) {                                                     \
271     fprintf ((FILE), "%s\t", LOCAL_ASM_OP);                             \
272     assemble_name ((FILE), (NAME));                                     \
273     fprintf ((FILE), "\n");                                             \
274     ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN);                \
275   } else {                                                              \
276     int align = exact_log2 (ALIGN);                                     \
277     if (align > 2) align = 2;                                           \
278     if (TARGET_SVR3_SHLIB)                                              \
279       data_section ();                                                  \
280     else                                                                \
281       bss_section ();                                                   \
282     ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align);                 \
283     fprintf ((FILE), "%s\t", "\t.lcomm");                               \
284     assemble_name ((FILE), (NAME));                                     \
285     fprintf ((FILE), ",%u\n", (SIZE));                                  \
286    }                                                                    \
287 } while (0)
288
289 /* A C statement (sans semicolon) to output to the stdio stream
290    FILE the assembler definition of uninitialized global DECL named
291    NAME whose size is SIZE bytes and alignment is ALIGN bytes.
292    Try to use asm_output_aligned_bss to implement this macro.  */
293
294 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
295 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
296
297 #undef ESCAPES
298 #define ESCAPES \
299 "\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
300 \0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
301 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
302 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
303 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
304 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
305 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
306 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
307
308 #undef STRING_LIMIT
309 #define STRING_LIMIT    ((unsigned) 256)
310
311 #undef ASM_OUTPUT_LIMITED_STRING
312 #define ASM_OUTPUT_LIMITED_STRING(FILE, STR)                            \
313   do                                                                    \
314     {                                                                   \
315       register unsigned char *_limited_str = (unsigned char *) (STR);   \
316       register unsigned ch;                                             \
317       fprintf ((FILE), "%s\t\"", STRING_ASM_OP);                        \
318       for (; (ch = *_limited_str); _limited_str++)                      \
319         {                                                               \
320           register int escape;                                          \
321           switch (escape = ESCAPES[ch])                                 \
322             {                                                           \
323             case 0:                                                     \
324               putc (ch, (FILE));                                        \
325               break;                                                    \
326             case 1:                                                     \
327               fprintf ((FILE), "\\%03o", ch);                           \
328               break;                                                    \
329             default:                                                    \
330               putc ('\\', (FILE));                                      \
331               putc (escape, (FILE));                                    \
332               break;                                                    \
333             }                                                           \
334         }                                                               \
335       fprintf ((FILE), "\"\n");                                         \
336     }                                                                   \
337   while (0)
338
339
340 #undef ASM_OUTPUT_ASCII
341 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                             \
342 do {                                                                    \
343       register unsigned char *_ascii_bytes = (unsigned char *) (STR);   \
344       register unsigned char *limit = _ascii_bytes + (LENGTH);          \
345       register unsigned bytes_in_chunk = 0;                             \
346       for (; _ascii_bytes < limit; _ascii_bytes++)                      \
347         {                                                               \
348           register unsigned char *p;                                    \
349           if (bytes_in_chunk >= 64)                                     \
350             {                                                           \
351               fputc ('\n', (FILE));                                     \
352               bytes_in_chunk = 0;                                       \
353             }                                                           \
354           for (p = _ascii_bytes; p < limit && *p != '\0'; p++)          \
355             continue;                                                   \
356           if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT)          \
357             {                                                           \
358               if (bytes_in_chunk > 0)                                   \
359                 {                                                       \
360                   fputc ('\n', (FILE));                                 \
361                   bytes_in_chunk = 0;                                   \
362                 }                                                       \
363               ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes);         \
364               _ascii_bytes = p;                                         \
365             }                                                           \
366           else                                                          \
367             {                                                           \
368               if (bytes_in_chunk == 0)                                  \
369                 fprintf ((FILE), "%s\t", ASM_BYTE_OP);                  \
370               else                                                      \
371                 fputc (',', (FILE));                                    \
372               fprintf ((FILE), "0x%02x", *_ascii_bytes);                \
373               bytes_in_chunk += 5;                                      \
374             }                                                           \
375         }                                                               \
376       if (bytes_in_chunk > 0)                                           \
377         fprintf ((FILE), "\n");                                         \
378 } while (0) 
379
380 /* Must use data section for relocatable constants when pic.  */
381 #undef SELECT_RTX_SECTION
382 #define SELECT_RTX_SECTION(MODE,RTX)                                    \
383 {                                                                       \
384   if (TARGET_ELF) {                                                     \
385     if (flag_pic && symbolic_operand (RTX, VOIDmode))                   \
386       data_section ();                                                  \
387     else                                                                \
388       const_section ();                                                 \
389   } else                                                                \
390     readonly_data_section();                                            \
391 }
392
393 #undef ASM_OUTPUT_CASE_LABEL
394 #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE)                \
395 do {                                                                    \
396   if (TARGET_ELF)                                                       \
397     ASM_OUTPUT_ALIGN ((FILE), 2);                                       \
398   ASM_OUTPUT_INTERNAL_LABEL((FILE),(PREFIX),(NUM));                     \
399 } while (0)
400
401
402 #undef ASM_OUTPUT_CONSTRUCTOR
403 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
404 do {                                                                    \
405   if (TARGET_ELF) {                                                     \
406      ctors_section ();                                                  \
407      fprintf (FILE, "%s\t ", INT_ASM_OP);                               \
408      assemble_name (FILE, NAME);                                        \
409      fprintf (FILE, "\n");                                              \
410   } else {                                                              \
411     init_section ();                                                    \
412     fprintf (FILE, "\tpushl $");                                        \
413     assemble_name (FILE, NAME);                                         \
414     fprintf (FILE, "\n"); }                                             \
415   } while (0)
416
417 #undef ASM_OUTPUT_DESTRUCTOR
418 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
419 do {                                                                    \
420   if (TARGET_ELF) {                                                     \
421     dtors_section ();                                                   \
422     fprintf (FILE, "%s\t ", INT_ASM_OP);                                \
423     assemble_name (FILE, NAME);                                         \
424     fprintf (FILE, "\n");                                               \
425   } else {                                                              \
426     fini_section ();                                                    \
427     fprintf (FILE, "%s\t ", ASM_LONG);                                  \
428     assemble_name (FILE, NAME);                                         \
429     fprintf (FILE, "\n"); }                                             \
430   } while (0)
431
432
433 #undef ASM_OUTPUT_IDENT
434 #define ASM_OUTPUT_IDENT(FILE, NAME) \
435   fprintf (FILE, "%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
436
437 #undef ASM_GLOBALIZE_LABEL
438 #define ASM_GLOBALIZE_LABEL(FILE,NAME)  \
439   (fprintf ((FILE), "%s ", GLOBAL_ASM_OP), assemble_name (FILE, NAME), fputs ("\n", FILE))
440
441 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
442 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                          \
443   if (TARGET_ELF) ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
444
445 #undef ASM_OUTPUT_INTERNAL_LABEL
446 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)                      \
447   fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
448
449 /* The prefix to add to user-visible assembler symbols. */
450
451 #undef USER_LABEL_PREFIX
452 #define USER_LABEL_PREFIX ""
453
454 /* 
455  * Compensate for the difference between ELF and COFF assembler syntax.
456  * Otherwise, this is cribbed from ../svr4.h.
457  * We rename 'gcc_except_table' to the shorter name in preparation
458  * for the day when we're ready to do DWARF2 eh unwinding under COFF 
459  */
460 #undef ASM_OUTPUT_SECTION_NAME
461 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
462 do {                                                                    \
463   static struct section_info                                            \
464     {                                                                   \
465       struct section_info *next;                                        \
466       char *name;                                                       \
467       enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type;                \
468     } *sections;                                                        \
469   struct section_info *s;                                               \
470   char *mode;                                                           \
471   enum sect_enum type;                                                  \
472   char *sname = NAME ;                                                  \
473   if (strcmp(NAME, ".gcc_except_table") == 0) sname = ".gccexc" ;       \
474                                                                         \
475   for (s = sections; s; s = s->next)                                    \
476     if (!strcmp (NAME, s->name))                                        \
477       break;                                                            \
478                                                                         \
479   if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)                        \
480     type = SECT_EXEC, mode = (TARGET_ELF) ? "ax" : "x" ;                \
481   else if (DECL && DECL_READONLY_SECTION (DECL, RELOC))                 \
482     type = SECT_RO, mode = "a";                                         \
483   else                                                                  \
484     type = SECT_RW, mode = (TARGET_ELF) ? "aw" : "w" ;                  \
485                                                                         \
486   if (s == 0)                                                           \
487     {                                                                   \
488       s = (struct section_info *) xmalloc (sizeof (struct section_info));  \
489       s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME));         \
490       strcpy (s->name, NAME);                                           \
491       s->type = type;                                                   \
492       s->next = sections;                                               \
493       sections = s;                                                     \
494       fprintf (FILE, ".section\t%s,\"%s\"%s\n", sname, mode,            \
495                 (TARGET_ELF) ? ",@progbits" : "" );                     \
496     }                                                                   \
497   else                                                                  \
498     {                                                                   \
499       if (DECL && s->type != type)                                      \
500         error_with_decl (DECL, "%s causes a section type conflict");    \
501                                                                         \
502       fprintf (FILE, ".section\t%s\n", sname);                          \
503     }                                                                   \
504 } while (0)
505
506 #undef ASM_OUTPUT_SKIP
507 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
508 do {                                                                    \
509   if (TARGET_ELF)                                                       \
510     fprintf (FILE, "%s\t%u\n", SKIP_ASM_OP, (SIZE));                    \
511   else                                                                  \
512     fprintf ((FILE), "%s\t.,.+%u\n", SET_ASM_OP, (SIZE));               \
513 } while (0)
514
515
516 #undef CTOR_LIST_BEGIN
517 #define CTOR_LIST_BEGIN                                                 \
518 do {                                                                    \
519   asm (CTORS_SECTION_ASM_OP);                                           \
520   if (TARGET_ELF)                                                       \
521     STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };             \
522   else                                                                  \
523     asm ("pushl $0");                                                   \
524 } while (0)
525
526 #undef CTOR_LIST_END
527 #define CTOR_LIST_END                                                   \
528 do {                                                                    \
529   if (TARGET_ELF) {                                                     \
530     asm (CTORS_SECTION_ASM_OP);                                         \
531     STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (0) };              \
532   } else {                                                              \
533     CTOR_LIST_BEGIN;                                                    \
534   }                                                                     \
535 } while (0)
536
537 #undef DBX_BLOCKS_FUNCTION_RELATIVE
538 #define DBX_BLOCKS_FUNCTION_RELATIVE 1
539
540 #undef DBX_FUNCTION_FIRST
541 #define DBX_FUNCTION_FIRST 1
542
543 #undef DBX_REGISTER_NUMBER
544 #define DBX_REGISTER_NUMBER(n)                                          \
545 ((TARGET_ELF) ?                                                         \
546  ((n) == 0 ? 0                                                          \
547   : (n) == 1 ? 2                                                        \
548   : (n) == 2 ? 1                                                        \
549   : (n) == 3 ? 3                                                        \
550   : (n) == 4 ? 6                                                        \
551   : (n) == 5 ? 7                                                        \
552   : (n) == 6 ? 5                                                        \
553   : (n) == 7 ? 4                                                        \
554   : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3           \
555   : (-1))                                                               \
556  :                                                                      \
557  ((n) == 0 ? 0 :                                                        \
558   (n) == 1 ? 2 :                                                        \
559   (n) == 2 ? 1 :                                                        \
560   (n) == 3 ? 3 :                                                        \
561   (n) == 4 ? 6 :                                                        \
562   (n) == 5 ? 7 :                                                        \
563   (n) == 6 ? 4 :                                                        \
564   (n) == 7 ? 5 :                                                        \
565   (n) + 4))
566
567 #undef DWARF_DEBUGGING_INFO
568 #undef SDB_DEBUGGING_INFO
569 #undef DBX_DEBUGGING_INFO
570 #undef PREFERRED_DEBUGGING_TYPE
571
572 #define DWARF_DEBUGGING_INFO 1
573 #define SDB_DEBUGGING_INFO   1
574 #define DBX_DEBUGGING_INFO   1
575 #define PREFERRED_DEBUGGING_TYPE                                        \
576   ((TARGET_ELF) ? DWARF_DEBUG: SDB_DEBUG)
577
578 #undef EXTRA_SECTIONS
579 #define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors
580
581 #undef EXTRA_SECTION_FUNCTIONS
582 #define EXTRA_SECTION_FUNCTIONS                                         \
583   CONST_SECTION_FUNCTION                                                \
584   INIT_SECTION_FUNCTION                                                 \
585   FINI_SECTION_FUNCTION                                                 \
586   CTORS_SECTION_FUNCTION                                                \
587   DTORS_SECTION_FUNCTION
588
589 #undef CONST_SECTION_FUNCTION
590 #define CONST_SECTION_FUNCTION                                          \
591 void                                                                    \
592 const_section ()                                                        \
593 {                                                                       \
594   if (!USE_CONST_SECTION)                                               \
595     text_section();                                                     \
596   else if (in_section != in_const)                                      \
597     {                                                                   \
598       fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP);             \
599       in_section = in_const;                                            \
600     }                                                                   \
601 }
602
603 #undef FINI_SECTION_FUNCTION
604 #define FINI_SECTION_FUNCTION                                           \
605 void                                                                    \
606 fini_section ()                                                         \
607 {                                                                       \
608   if ((!TARGET_ELF) && in_section != in_fini)                           \
609     {                                                                   \
610       fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP);              \
611       in_section = in_fini;                                             \
612     }                                                                   \
613 }
614
615 #undef INIT_SECTION_FUNCTION
616 #define INIT_SECTION_FUNCTION                                           \
617 void                                                                    \
618 init_section ()                                                         \
619 {                                                                       \
620   if ((!TARGET_ELF) && in_section != in_init)                           \
621     {                                                                   \
622       fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP);              \
623       in_section = in_init;                                             \
624     }                                                                   \
625 }
626
627 #undef CTORS_SECTION_FUNCTION
628 #define CTORS_SECTION_FUNCTION                                          \
629 void                                                                    \
630 ctors_section ()                                                        \
631 {                                                                       \
632   if (in_section != in_ctors)                                           \
633     {                                                                   \
634       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);             \
635       in_section = in_ctors;                                            \
636     }                                                                   \
637 }
638
639 #undef DTORS_SECTION_FUNCTION
640 #define DTORS_SECTION_FUNCTION                                          \
641 void                                                                    \
642 dtors_section ()                                                        \
643 {                                                                       \
644   if (in_section != in_dtors)                                           \
645     {                                                                   \
646       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);             \
647       in_section = in_dtors;                                            \
648     }                                                                   \
649 }
650
651 #undef FRAME_POINTER_REQUIRED
652 #define FRAME_POINTER_REQUIRED                                          \
653   ((TARGET_ELF) ? 0 :                                                   \
654    (current_function_calls_setjmp || current_function_calls_longjmp))
655
656 #undef JUMP_TABLES_IN_TEXT_SECTION
657 #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ELF && flag_pic)
658
659 #undef LOCAL_LABEL_PREFIX
660 #define LOCAL_LABEL_PREFIX                                              \
661  ((TARGET_ELF) ? "" : ".")
662
663 #undef MD_EXEC_PREFIX
664 #undef MD_STARTFILE_PREFIX
665 #define MD_EXEC_PREFIX "/usr/ccs/bin/"
666 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
667
668 #undef NON_SAVING_SETJMP
669 #define NON_SAVING_SETJMP                                               \
670   ((TARGET_ELF) ? 0 :                                                   \
671    (current_function_calls_setjmp && current_function_calls_longjmp))
672
673 #undef NO_IMPLICIT_EXTERN_C
674 #define NO_IMPLICIT_EXTERN_C 1
675
676 /* JKJ FIXME - examine the ramifications of RETURN_IN_MEMORY and
677    RETURN_POPS_ARGS */
678
679 #undef RETURN_POPS_ARGS
680 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE)                          \
681  ((TARGET_ELF) ?                                                        \
682   (ix86_return_pops_args (FUNDECL, FUNTYPE, SIZE)) :                    \
683   (((FUNDECL) && (TREE_CODE (FUNDECL) == IDENTIFIER_NODE)) ? 0          \
684    : (TARGET_RTD                                                        \
685       && (TYPE_ARG_TYPES (FUNTYPE) == 0                                 \
686           || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE)))         \
687               == void_type_node))) ? (SIZE)                             \
688    : 0))
689
690 #undef SELECT_SECTION
691 #define SELECT_SECTION(DECL,RELOC)                                      \
692 {                                                                       \
693   if (TARGET_ELF && flag_pic && RELOC)                                  \
694      data_section ();                                                   \
695   else if (TREE_CODE (DECL) == STRING_CST)                              \
696     {                                                                   \
697       if (! flag_writable_strings)                                      \
698         const_section ();                                               \
699       else                                                              \
700         data_section ();                                                \
701     }                                                                   \
702   else if (TREE_CODE (DECL) == VAR_DECL)                                \
703     {                                                                   \
704       if (! DECL_READONLY_SECTION (DECL, RELOC))                        \
705         data_section ();                                                \
706       else                                                              \
707         const_section ();                                               \
708     }                                                                   \
709   else                                                                  \
710     const_section ();                                                   \
711 }
712
713 #undef SWITCH_TAKES_ARG
714 #define SWITCH_TAKES_ARG(CHAR)                                          \
715   (DEFAULT_SWITCH_TAKES_ARG(CHAR)                                       \
716    || (CHAR) == 'h'                                                     \
717    || (CHAR) == 'R'                                                     \
718    || (CHAR) == 'Y'                                                     \
719    || (CHAR) == 'z')
720
721 #undef WORD_SWITCH_TAKES_ARG
722 #define WORD_SWITCH_TAKES_ARG(STR)                                      \
723  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                                   \
724   && strcmp (STR, "Tdata") && strcmp (STR, "Ttext")                     \
725   && strcmp (STR, "Tbss"))
726
727 #undef TARGET_DEFAULT
728 #define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
729
730 #undef HANDLE_SYSV_PRAGMA
731 #define HANDLE_SYSV_PRAGMA 1
732
733 /* Though OpenServer support .weak in COFF, g++ doesn't play nice with it
734  * so we'll punt on it for now
735  */
736 #define SUPPORTS_WEAK (TARGET_ELF)
737 #define ASM_WEAKEN_LABEL(FILE,NAME) \
738   do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME);           \
739         fputc ('\n', FILE); } while (0)
740
741 #undef SCCS_DIRECTIVE
742 #define SCCS_DIRECTIVE 1
743
744 /*
745  * Define sizes and types
746  */
747 #undef SIZE_TYPE
748 #undef PTRDIFF_TYPE
749 #undef WCHAR_TYPE
750 #undef WCHAR_TYPE_SIZE
751 #undef LONG_DOUBLE_TYPE_SIZE
752 #define LONG_DOUBLE_TYPE_SIZE   96
753 #define SIZE_TYPE               "unsigned int"
754 #define PTRDIFF_TYPE            "int"
755 #define WCHAR_TYPE              "long int"
756 #define WCHAR_TYPE_SIZE         BITS_PER_WORD
757
758 /*
759  * New for multilib support. Set the default switches for multilib,
760  * which is -melf.
761  */
762 #define MULTILIB_DEFAULTS { "melf" }
763
764 \f
765 /* Please note that these specs may look messy but they are required in
766    order to emulate the SCO Development system as closely as possible.
767    With SCO Open Server 5.0, you now get the linker and assembler free,
768    so that is what these specs are targeted for. These utilities are
769    very argument sensitive: a space in the wrong place breaks everything.
770    So RMS, please forgive this mess. It works.
771
772    Parameters which can be passed to gcc, and their SCO equivalents:
773    GCC Parameter                SCO Equivalent
774    -ansi                        -a ansi
775    -posix                       -a posix
776    -Xpg4                        -a xpg4
777    -Xpg4plus                    -a xpg4plus
778    -Xods30                      -a ods30
779
780    As with SCO, the default is XPG4 plus mode. SCO also allows you to
781    specify a C dialect with -Xt, -Xa, -Xc, -Xk and -Xm. These are passed
782    on to the assembler and linker in the same way that the SCO compiler
783    does.
784
785    SCO also allows you to compile, link and generate either ELF or COFF
786    binaries. With gcc, unlike the SCO compiler, the default is ELF.
787    Specify -mcoff to gcc to produce COFF binaries. -fpic will get the
788    assembler and linker to produce PIC code.
789 */
790
791 /* Set up assembler flags for PIC and ELF compilations */
792 #undef ASM_SPEC
793
794 #if USE_GAS
795   /* Leave ASM_SPEC undefined so we pick up the master copy from gcc.c 
796    * Undef MD_EXEC_PREFIX becuase we don't know where GAS is, but it's not
797    * likely in /usr/ccs/bin/ 
798    */
799 #undef MD_EXEC_PREFIX 
800 #else
801
802 #define ASM_SPEC \
803    "-b %{!mcoff:elf}%{mcoff:coff \
804      %{static:%e-static not valid with -mcoff} \
805      %{shared:%e-shared not valid with -mcoff} \
806      %{symbolic:%e-symbolic not valid with -mcoff}} \
807     %{Ym,*} %{Yd,*} %{Wa,*:%*} \
808     %{!mcoff:-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF %{Qn:} %{!Qy:-Qn}}"
809 #endif
810
811 /* Use crt1.o as a startup file and crtn.o as a closing file.  */
812
813 #undef STARTFILE_SPEC
814 #define STARTFILE_SPEC \
815  "%{shared: %{!mcoff: crti.o%s}} \
816   %{!shared:\
817    %{!symbolic: \
818     %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \
819   %{ansi:values-Xc.o%s} \
820   %{!ansi: \
821    %{traditional:values-Xt.o%s} \
822     %{!traditional: \
823      %{Xa:values-Xa.o%s} \
824       %{!Xa:%{Xc:values-Xc.o%s} \
825        %{!Xc:%{Xk:values-Xk.o%s} \
826         %{!Xk:%{Xt:values-Xt.o%s} \
827          %{!Xt:values-Xa.o%s}}}}}} \
828   %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"
829
830 #undef ENDFILE_SPEC
831 #define ENDFILE_SPEC \
832  "%{!mcoff:crtend.o%s} \
833   %{mcoff:crtendS.o%s} \
834   %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
835
836 #undef CPP_PREDEFINES
837 #define CPP_PREDEFINES \
838  "-Asystem(svr3)"
839
840 /* You are in a maze of GCC specs ... all alike */
841
842 #undef CPP_SPEC
843 #define CPP_SPEC "%(cpp_cpu) \
844   %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \
845   %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \
846   -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \
847   %{!Xods30:-D_STRICT_NAMES} \
848   %{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \
849   %{ansi:-isystem include/ansi%s -isystem /usr/include/ansi -D_STRICT_ANSI} \
850   %{!ansi: \
851    %{posix:-isystem include/posix%s -isystem /usr/include/posix \
852            -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=1} \
853     %{!posix:%{Xpg4:-isystem include/xpg4%s -isystem /usr/include/xpg4 \
854                     -D_XOPEN_SOURCE=1} \
855      %{!Xpg4:-D_M_I86 -D_M_I86SM -D_M_INTERNAT -D_M_SDATA -D_M_STEXT \
856              -D_M_BITFIELDS -D_M_SYS5 -D_M_SYSV -D_M_SYSIII \
857              -D_M_WORDSWAP -Dunix -DM_I386 -DM_UNIX -DM_XENIX \
858              %{Xods30:-isystem include/ods_30_compat%s \
859                       -isystem /usr/include/ods_30_compat \
860                       -D_SCO_ODS_30 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT \
861                       -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \
862                       -DM_WORDSWAP}}}} \
863   %{scointl:-DM_INTERNAT -D_M_INTERNAT} \
864   %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE} \
865   %{!mcoff:-D_SCO_ELF} \
866   %{mcoff:-D_M_COFF -D_SCO_COFF} \
867   %{!mcoff:%{fpic:-D__PIC__ -D__pic__} \
868          %{fPIC:%{!fpic:-D__PIC__ -D__pic__}}} \
869   %{Xa:-D_SCO_C_DIALECT=1} \
870   %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \
871    %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \
872     %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \
873      %{!Xt:-D_SCO_C_DIALECT=1}}}} \
874   %{traditional:-traditional -D_KR -D_NO_PROTOTYPE}"
875
876 #undef LINK_SPEC
877 #define LINK_SPEC \
878  "-b %{!mcoff:elf}%{mcoff:coff \
879    %{static:%e-static not valid with -mcoff} \
880    %{shared:%e-shared not valid with -mcoff} \
881    %{symbolic:%e-symbolic not valid with -mcoff} \
882    %{fpic:%e-fpic not valid with -mcoff} \
883    %{fPIC:%e-fPIC not valid with -mcoff}} \
884   -R%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},%{mcoff:COFF}%{!mcoff:ELF} \
885   %{Wl,*%*} %{YP,*} %{YL,*} %{YU,*} \
886   %{!YP,*:%{p:-YP,/usr/ccs/libp:/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib} \
887    %{!p:-YP,/usr/ccs/lib:/lib:/usr/lib}} \
888   %{h*} %{static:-dn -Bstatic} %{shared:-G -dy %{!z*:-z text}} \
889   %{symbolic:-Bsymbolic -G -dy %{!z*:-z text}} %{z*} %{R*} %{Y*} \
890   %{G:-G} %{!mcoff:%{Qn:} %{!Qy:-Qn}}"
891
892 /* The SCO COFF linker gets confused on the difference between "-ofoo"
893    and "-o foo".   So we just always force a single space. */
894
895 #define SWITCHES_NEED_SPACES "o"
896
897 /* Library spec. If we are not building a shared library, provide the
898    standard libraries, as per the SCO compiler.  */
899
900 #undef LIB_SPEC
901 #define LIB_SPEC \
902  "%{shared:pic/libgcc.a%s}%{!shared:%{!symbolic:-lcrypt -lgen -lc}}"
903
904 #undef LIBGCC_SPEC
905 #define LIBGCC_SPEC \
906  "%{!shared:-lgcc}"
907
908 #define MASK_COFF               010000000000    /* Mask for elf generation */
909 #define TARGET_COFF             (target_flags & MASK_COFF)
910 #define TARGET_ELF              (!(target_flags & MASK_COFF))
911
912 #undef SUBTARGET_SWITCHES
913 #define SUBTARGET_SWITCHES              \
914         { "coff", MASK_COFF, "Generate COFF output" },          \
915         { "elf", -MASK_COFF, "Generate ELF output"  },
916
917 #define NO_DOLLAR_IN_LABEL
918
919 /* Implicit library calls should use memcpy, not bcopy, etc.  They are 
920    faster on OpenServer libraries. */
921
922 #define TARGET_MEM_FUNCTIONS
923
924 /* Biggest alignment supported by the object file format of this
925    machine.  Use this macro to limit the alignment which can be
926    specified using the `__attribute__ ((aligned (N)))' construct.  If
927    not defined, the default value is `BIGGEST_ALIGNMENT'.  */
928
929 #define MAX_OFILE_ALIGNMENT (32768*8)
930
931 /* Define the `__builtin_va_list' type for the ABI.  On OpenServer, this
932    type is `char *'.  */
933 #undef BUILD_VA_LIST_TYPE
934 #define BUILD_VA_LIST_TYPE(VALIST) \
935   (VALIST) = build_pointer_type (char_type_node)
936
937
938 /*
939 Here comes some major hackery to get the crt stuff to compile properly.
940 Since we can (and do) compile for both COFF and ELF environments, we
941 set things up accordingly, based on the pre-processor defines for ELF
942 and COFF. This is insane, but then I guess having one compiler with a
943 single back-end supporting two vastly different file format types is
944 a little insane too. But it is not impossible and we get a useful
945 compiler at the end of the day. Onward we go ...
946 */
947
948 #if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)
949 # undef OBJECT_FORMAT_ELF
950 # undef INIT_SECTION_ASM_OP
951 # undef FINI_SECTION_ASM_OP
952 # undef CTORS_SECTION_ASM_OP
953 # undef DTORS_SECTION_ASM_OP
954 # undef EH_FRAME_SECTION_ASM_OP
955 # undef CTOR_LIST_BEGIN
956 # undef CTOR_LIST_END
957 # undef DO_GLOBAL_CTORS_BODY
958
959 # if defined (_SCO_ELF)
960 #  define OBJECT_FORMAT_ELF
961 #  define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF
962 #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF
963 #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF
964 #  define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_ELF
965 #  define EH_FRAME_SECTION_ASM_OP EH_FRAME_SECTION_ASM_OP_ELF
966 # else /* ! _SCO_ELF */
967 #  define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_COFF
968 #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF
969 #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF
970 #  define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF
971 #  define EH_FRAME_SECTION_ASM_OP EH_FRAME_SECTION_ASM_OP_COFF
972 #  define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")
973 #  define CTOR_LIST_END CTOR_LIST_BEGIN
974 #  define DO_GLOBAL_CTORS_BODY                                          \
975 do {                                                                    \
976      func_ptr *p, *beg = alloca(0);                                     \
977      for (p = beg; *p;)                                                 \
978       (*p++) ();                                                        \
979 } while (0)
980 # endif /* ! _SCO_ELF */
981 #endif /* CRT_BEGIN !! CRT_END */