OSDN Git Service

* alpha.h (CPP_SPEC): Tidy. Hook to cpp_cpu and cpp_subtarget.
[pf3gnuchains/gcc-fork.git] / gcc / config / alpha / elf.h
1 /* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
2    Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
3    Contributed by Richard Henderson (rth@tamu.edu).
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 #undef OBJECT_FORMAT_COFF
23 #undef EXTENDED_COFF
24 #define OBJECT_FORMAT_ELF
25
26 #define DBX_DEBUGGING_INFO
27
28 #undef PREFERRED_DEBUGGING_TYPE
29 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
30
31 #undef ASM_FINAL_SPEC
32
33 #undef CC1_SPEC
34 #define CC1_SPEC  "%{G*}"
35
36 #undef ASM_SPEC
37 #define ASM_SPEC  "%{G*} %{relax:-relax}"
38
39 #undef LINK_SPEC
40 #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}          \
41   %{O*:-O3} %{!O*:-O1}                                          \
42   %{shared:-shared}                                             \
43   %{!shared:                                                    \
44     %{!static:                                                  \
45       %{rdynamic:-export-dynamic}                               \
46       %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \
47     %{static:-static}}"
48
49 /* Output at beginning of assembler file.  */
50 #undef ASM_FILE_START
51 #define ASM_FILE_START(FILE)                                    \
52 {                                                               \
53   alpha_write_verstamp (FILE);                                  \
54   output_file_directive (FILE, main_input_filename);            \
55   fprintf (FILE, "\t.set noat\n");                              \
56   fprintf (FILE, "\t.set noreorder\n");                         \
57   if (TARGET_BWX | TARGET_MAX | TARGET_CIX)                     \
58     {                                                           \
59       fprintf (FILE, "\t.arch %s\n",                            \
60                (alpha_cpu == PROCESSOR_EV6 ? "ev6"              \
61                 : TARGET_MAX ? "pca56" : "ev56"));              \
62     }                                                           \
63 }
64
65 extern void output_file_directive ();
66
67 /* Attach a special .ident directive to the end of the file to identify
68    the version of GCC which compiled this code.  The format of the
69    .ident string is patterned after the ones produced by native svr4
70    C compilers.  */
71
72 #define IDENT_ASM_OP ".ident"
73
74 #ifdef IDENTIFY_WITH_IDENT
75 #define ASM_IDENTIFY_GCC(FILE) /* nothing */
76 #define ASM_IDENTIFY_LANGUAGE(FILE)                     \
77  fprintf(FILE, "\t%s \"GCC (%s) %s\"\n", IDENT_ASM_OP,  \
78          lang_identify(), version_string)
79 #else
80 #define ASM_FILE_END(FILE)                                      \
81 do {                                                            \
82      fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",              \
83               IDENT_ASM_OP, version_string);                    \
84    } while (0)
85 #endif
86
87 /* Allow #sccs in preprocessor.  */
88 #define SCCS_DIRECTIVE
89
90 /* Output #ident as a .ident.  */
91 #define ASM_OUTPUT_IDENT(FILE, NAME) \
92   fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
93
94 /* This is how to allocate empty space in some section.  The .zero
95    pseudo-op is used for this on most svr4 assemblers.  */
96
97 #define SKIP_ASM_OP     ".zero"
98
99 #undef ASM_OUTPUT_SKIP
100 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
101   fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE))
102
103 /* Output the label which precedes a jumptable.  Note that for all svr4
104    systems where we actually generate jumptables (which is to say every
105    svr4 target except i386, where we use casesi instead) we put the jump-
106    tables into the .rodata section and since other stuff could have been
107    put into the .rodata section prior to any given jumptable, we have to
108    make sure that the location counter for the .rodata section gets pro-
109    perly re-aligned prior to the actual beginning of the jump table.  */
110
111 #define ALIGN_ASM_OP ".align"
112
113 #ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
114 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
115   ASM_OUTPUT_ALIGN ((FILE), 2);
116 #endif
117
118 #undef ASM_OUTPUT_CASE_LABEL
119 #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE)                \
120   do {                                                                  \
121     ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE)         \
122     ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM);                      \
123   } while (0)
124
125 /* The standard SVR4 assembler seems to require that certain builtin
126    library routines (e.g. .udiv) be explicitly declared as .globl
127    in each assembly file where they are referenced.  */
128
129 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                          \
130   ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
131
132 /* This says how to output assembler code to declare an
133    uninitialized external linkage data object.  Under SVR4,
134    the linker seems to want the alignment of data objects
135    to depend on their types.  We do exactly that here.  */
136
137 #define COMMON_ASM_OP   ".comm"
138
139 #undef ASM_OUTPUT_ALIGNED_COMMON
140 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)              \
141 do {                                                                    \
142   fprintf ((FILE), "\t%s\t", COMMON_ASM_OP);                            \
143   assemble_name ((FILE), (NAME));                                       \
144   fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);        \
145 } while (0)
146
147 /* This says how to output assembler code to declare an
148    uninitialized internal linkage data object.  Under SVR4,
149    the linker seems to want the alignment of data objects
150    to depend on their types.  We do exactly that here.  */
151
152 #undef ASM_OUTPUT_ALIGNED_LOCAL
153 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
154 do {                                                                    \
155   if ((SIZE) <= g_switch_value)                                         \
156     sbss_section();                                                     \
157   else                                                                  \
158     bss_section();                                                      \
159   fprintf (FILE, "\t%s\t ", TYPE_ASM_OP);                               \
160   assemble_name (FILE, NAME);                                           \
161   putc (',', FILE);                                                     \
162   fprintf (FILE, TYPE_OPERAND_FMT, "object");                           \
163   putc ('\n', FILE);                                                    \
164   if (!flag_inhibit_size_directive)                                     \
165     {                                                                   \
166       fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                           \
167       assemble_name (FILE, NAME);                                       \
168       fprintf (FILE, ",%d\n", (SIZE));                                  \
169     }                                                                   \
170   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));       \
171   ASM_OUTPUT_LABEL(FILE, NAME);                                         \
172   ASM_OUTPUT_SKIP((FILE), (SIZE));                                      \
173 } while (0)
174
175 /* This is the pseudo-op used to generate a 64-bit word of data with a
176    specific value in some section.  */
177
178 #define INT_ASM_OP              ".quad"
179
180 /* Biggest alignment supported by the object file format of this
181    machine.  Use this macro to limit the alignment which can be
182    specified using the `__attribute__ ((aligned (N)))' construct.  If
183    not defined, the default value is `BIGGEST_ALIGNMENT'. 
184
185    This value is really 2^63.  Since gcc figures the alignment in bits,
186    we could only potentially get to 2^60 on suitible hosts.  Due to other
187    considerations in varasm, we must restrict this to what fits in an int.  */
188
189 #define MAX_OFILE_ALIGNMENT \
190   (1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62))
191
192 /* This is the pseudo-op used to generate a contiguous sequence of byte
193    values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
194    AUTOMATICALLY APPENDED.  This is the same for most svr4 assemblers.  */
195
196 #undef ASCII_DATA_ASM_OP
197 #define ASCII_DATA_ASM_OP       ".ascii"
198
199 /* Support const sections and the ctors and dtors sections for g++.
200    Note that there appears to be two different ways to support const
201    sections at the moment.  You can either #define the symbol
202    READONLY_DATA_SECTION (giving it some code which switches to the
203    readonly data section) or else you can #define the symbols
204    EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
205    SELECT_RTX_SECTION.  We do both here just to be on the safe side.  */
206
207 #define USE_CONST_SECTION       1
208
209 #define CONST_SECTION_ASM_OP    ".section\t.rodata"
210
211 /* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
212
213    Note that we want to give these sections the SHF_WRITE attribute
214    because these sections will actually contain data (i.e. tables of
215    addresses of functions in the current root executable or shared library
216    file) and, in the case of a shared library, the relocatable addresses
217    will have to be properly resolved/relocated (and then written into) by
218    the dynamic linker when it actually attaches the given shared library
219    to the executing process.  (Note that on SVR4, you may wish to use the
220    `-z text' option to the ELF linker, when building a shared library, as
221    an additional check that you are doing everything right.  But if you do
222    use the `-z text' option when building a shared library, you will get
223    errors unless the .ctors and .dtors sections are marked as writable
224    via the SHF_WRITE attribute.)  */
225
226 #define CTORS_SECTION_ASM_OP    ".section\t.ctors,\"aw\""
227 #define DTORS_SECTION_ASM_OP    ".section\t.dtors,\"aw\""
228
229 /* Handle the small data sections.  */
230 #define BSS_SECTION_ASM_OP      ".section\t.bss"
231 #define SBSS_SECTION_ASM_OP     ".section\t.sbss,\"aw\""
232 #define SDATA_SECTION_ASM_OP    ".section\t.sdata,\"aw\""
233
234 /* On svr4, we *do* have support for the .init and .fini sections, and we
235    can put stuff in there to be executed before and after `main'.  We let
236    crtstuff.c and other files know this by defining the following symbols.
237    The definitions say how to change sections to the .init and .fini
238    sections.  This is the same for all known svr4 assemblers.  */
239
240 #define INIT_SECTION_ASM_OP     ".section\t.init"
241 #define FINI_SECTION_ASM_OP     ".section\t.fini"
242
243 /* A default list of other sections which we might be "in" at any given
244    time.  For targets that use additional sections (e.g. .tdesc) you
245    should override this definition in the target-specific file which
246    includes this file.  */
247
248 #undef EXTRA_SECTIONS
249 #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_sbss, in_sdata
250
251 /* A default list of extra section function definitions.  For targets
252    that use additional sections (e.g. .tdesc) you should override this
253    definition in the target-specific file which includes this file.  */
254
255 #undef EXTRA_SECTION_FUNCTIONS
256 #define EXTRA_SECTION_FUNCTIONS                                         \
257   CONST_SECTION_FUNCTION                                                \
258   SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
259   SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP) \
260   SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
261   SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
262
263 #undef READONLY_DATA_SECTION
264 #define READONLY_DATA_SECTION() const_section ()
265
266 extern void text_section ();
267
268 #define CONST_SECTION_FUNCTION                                          \
269 void                                                                    \
270 const_section ()                                                        \
271 {                                                                       \
272   if (!USE_CONST_SECTION)                                               \
273     text_section();                                                     \
274   else if (in_section != in_const)                                      \
275     {                                                                   \
276       fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP);             \
277       in_section = in_const;                                            \
278     }                                                                   \
279 }
280
281 #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP)                         \
282 void FN ()                                                              \
283 {                                                                       \
284   if (in_section != ENUM)                                               \
285     {                                                                   \
286       fprintf (asm_out_file, "%s\n", OP);                               \
287       in_section = ENUM;                                                \
288     }                                                                   \
289 }
290
291
292 /* Switch into a generic section.
293    This is currently only used to support section attributes.
294
295    We make the section read-only and executable for a function decl,
296    read-only for a const data decl, and writable for a non-const data decl.  */
297 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
298   fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, \
299            (DECL) && TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \
300            (DECL) && DECL_READONLY_SECTION (DECL, RELOC) ? "a" : "aw")
301
302
303 /* A C statement (sans semicolon) to output an element in the table of
304    global constructors.  */
305 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
306   do {                                                                  \
307     ctors_section ();                                                   \
308     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
309     assemble_name (FILE, NAME);                                         \
310     fprintf (FILE, "\n");                                               \
311   } while (0)
312
313 /* A C statement (sans semicolon) to output an element in the table of
314    global destructors.  */
315 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
316   do {                                                                  \
317     dtors_section ();                                                   \
318     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
319     assemble_name (FILE, NAME);                                         \
320     fprintf (FILE, "\n");                                               \
321   } while (0)
322
323 /* A C statement or statements to switch to the appropriate
324    section for output of DECL.  DECL is either a `VAR_DECL' node
325    or a constant of some sort.  RELOC indicates whether forming
326    the initial value of DECL requires link-time relocations.  */
327
328 #define SELECT_SECTION(DECL,RELOC)                                      \
329 {                                                                       \
330   if (TREE_CODE (DECL) == STRING_CST)                                   \
331     {                                                                   \
332       if (! flag_writable_strings)                                      \
333         const_section ();                                               \
334       else                                                              \
335         data_section ();                                                \
336     }                                                                   \
337   else if (TREE_CODE (DECL) == VAR_DECL)                                \
338     {                                                                   \
339       if ((flag_pic && RELOC)                                           \
340           || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)          \
341           || !DECL_INITIAL (DECL)                                       \
342           || (DECL_INITIAL (DECL) != error_mark_node                    \
343               && !TREE_CONSTANT (DECL_INITIAL (DECL))))                 \
344         {                                                               \
345           int size = int_size_in_bytes (TREE_TYPE (DECL));              \
346           if (size >= 0 && size <= g_switch_value)                      \
347             sdata_section ();                                           \
348           else                                                          \
349             data_section ();                                            \
350         }                                                               \
351       else                                                              \
352         const_section ();                                               \
353     }                                                                   \
354   else                                                                  \
355     const_section ();                                                   \
356 }
357
358 /* A C statement or statements to switch to the appropriate
359    section for output of RTX in mode MODE.  RTX is some kind
360    of constant in RTL.  The argument MODE is redundant except
361    in the case of a `const_int' rtx.  Currently, these always
362    go into the const section.  */
363
364 #undef SELECT_RTX_SECTION
365 #define SELECT_RTX_SECTION(MODE,RTX) const_section()
366
367 /* Define the strings used for the special svr4 .type and .size directives.
368    These strings generally do not vary from one system running svr4 to
369    another, but if a given system (e.g. m88k running svr) needs to use
370    different pseudo-op names for these, they may be overridden in the
371    file which includes this one.  */
372
373 #define TYPE_ASM_OP     ".type"
374 #define SIZE_ASM_OP     ".size"
375
376 /* This is how we tell the assembler that a symbol is weak.  */
377
378 #define ASM_WEAKEN_LABEL(FILE,NAME) \
379   do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
380        fputc ('\n', FILE); } while (0)
381
382 /* This is how we tell the assembler that two symbols have the same value.  */
383
384 #define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
385   do { assemble_name(FILE, NAME1);       \
386        fputs(" = ", FILE);               \
387        assemble_name(FILE, NAME2);       \
388        fputc('\n', FILE); } while (0)
389
390 /* The following macro defines the format used to output the second
391    operand of the .type assembler directive.  Different svr4 assemblers
392    expect various different forms for this operand.  The one given here
393    is just a default.  You may need to override it in your machine-
394    specific tm.h file (depending upon the particulars of your assembler).  */
395
396 #define TYPE_OPERAND_FMT        "@%s"
397
398 /* Write the extra assembler code needed to declare a function's result.
399    Most svr4 assemblers don't require any special declaration of the
400    result value, but there are exceptions.  */
401
402 #ifndef ASM_DECLARE_RESULT
403 #define ASM_DECLARE_RESULT(FILE, RESULT)
404 #endif
405
406 /* These macros generate the special .type and .size directives which
407    are used to set the corresponding fields of the linker symbol table
408    entries in an ELF object file under SVR4.  These macros also output
409    the starting labels for the relevant functions/objects.  */
410
411 /* Write the extra assembler code needed to declare an object properly.  */
412
413 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)                       \
414   do {                                                                  \
415     fprintf (FILE, "\t%s\t ", TYPE_ASM_OP);                             \
416     assemble_name (FILE, NAME);                                         \
417     putc (',', FILE);                                                   \
418     fprintf (FILE, TYPE_OPERAND_FMT, "object");                         \
419     putc ('\n', FILE);                                                  \
420     size_directive_output = 0;                                          \
421     if (!flag_inhibit_size_directive && DECL_SIZE (DECL))               \
422       {                                                                 \
423         size_directive_output = 1;                                      \
424         fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                         \
425         assemble_name (FILE, NAME);                                     \
426         fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
427       }                                                                 \
428     ASM_OUTPUT_LABEL(FILE, NAME);                                       \
429   } while (0)
430
431 /* Output the size directive for a decl in rest_of_decl_compilation
432    in the case where we did not do so before the initializer.
433    Once we find the error_mark_node, we know that the value of
434    size_directive_output was set
435    by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
436
437 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)         \
438 do {                                                                     \
439      char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);                   \
440      if (!flag_inhibit_size_directive && DECL_SIZE (DECL)                \
441          && ! AT_END && TOP_LEVEL                                        \
442          && DECL_INITIAL (DECL) == error_mark_node                       \
443          && !size_directive_output)                                      \
444        {                                                                 \
445          size_directive_output = 1;                                      \
446          fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                         \
447          assemble_name (FILE, name);                                     \
448          fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
449        }                                                                 \
450    } while (0)
451
452 /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
453    ASM_OUTPUT_LIMITED_STRING macros.  Each byte in the table
454    corresponds to a particular byte value [0..255].  For any
455    given byte value, if the value in the corresponding table
456    position is zero, the given character can be output directly.
457    If the table value is 1, the byte must be output as a \ooo
458    octal escape.  If the tables value is anything else, then the
459    byte value should be output as a \ followed by the value
460    in the table.  Note that we can use standard UN*X escape
461    sequences for many control characters, but we don't use
462    \a to represent BEL because some svr4 assemblers (e.g. on
463    the i386) don't know about that.  Also, we don't use \v
464    since some versions of gas, such as 2.2 did not accept it.  */
465
466 #define ESCAPES \
467 "\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\
468 \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\
469 \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\
470 \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\
471 \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\
472 \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\
473 \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\
474 \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"
475
476 /* Some svr4 assemblers have a limit on the number of characters which
477    can appear in the operand of a .string directive.  If your assembler
478    has such a limitation, you should define STRING_LIMIT to reflect that
479    limit.  Note that at least some svr4 assemblers have a limit on the
480    actual number of bytes in the double-quoted string, and that they
481    count each character in an escape sequence as one byte.  Thus, an
482    escape sequence like \377 would count as four bytes.
483
484    If your target assembler doesn't support the .string directive, you
485    should define this to zero.  */
486
487 #define STRING_LIMIT    ((unsigned) 256)
488 #define STRING_ASM_OP   ".string"
489
490 /* GAS is the only Alpha/ELF assembler.  */
491 #undef TARGET_GAS
492 #define TARGET_GAS      (1)
493
494 /* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
495    (even more) magical crtbegin.o file which provides part of the
496    support for getting C++ file-scope static object constructed before
497    entering `main'. 
498
499    Don't bother seeing crtstuff.c -- there is absolutely no hope of
500    getting that file to understand multiple GPs.  GNU Libc provides a
501    hand-coded version that is used on Linux; it could be copied here
502    if there is ever a need. */
503    
504 #undef  STARTFILE_SPEC
505 #define STARTFILE_SPEC \
506   "%{!shared: \
507      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
508    crti.o%s crtbegin.o%s"
509
510 /* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
511    magical crtend.o file which provides part of the support for
512    getting C++ file-scope static object constructed before entering
513    `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
514
515 #undef  ENDFILE_SPEC
516 #define ENDFILE_SPEC \
517   "crtend.o%s crtn.o%s"
518
519 /* We support #pragma.  */
520 #define HANDLE_SYSV_PRAGMA