]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/alpha/elf.h
Merge basic-improvements-branch to trunk
[thirdparty/gcc.git] / gcc / config / alpha / elf.h
CommitLineData
800e920a 1/* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
cea3bd3e 2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
201556f0 3 Free Software Foundation, Inc.
800e920a
RK
4 Contributed by Richard Henderson (rth@tamu.edu).
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
22
800e920a
RK
23#undef OBJECT_FORMAT_COFF
24#undef EXTENDED_COFF
25#define OBJECT_FORMAT_ELF
26
80a8aac6
RH
27/* ??? Move all SDB stuff from alpha.h to osf.h. */
28#undef SDB_DEBUGGING_INFO
29
23532de9
JT
30#define DBX_DEBUGGING_INFO 1
31#define DWARF2_DEBUGGING_INFO 1
800e920a 32
d38d55b4 33#undef PREFERRED_DEBUGGING_TYPE
48adb36e 34#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
800e920a 35
b0435cf4 36#undef ASM_FINAL_SPEC
800e920a 37
cf0005c6
DB
38#undef CPP_SUBTARGET_SPEC
39#define CPP_SUBTARGET_SPEC "-D__ELF__"
40
d38d55b4 41#undef CC1_SPEC
bb8ebb7f
RH
42#define CC1_SPEC "%{G*}"
43
d38d55b4 44#undef ASM_SPEC
48adb36e 45#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
bb8ebb7f 46
800e920a 47/* Output at beginning of assembler file. */
d38d55b4 48#undef ASM_FILE_START
800e920a 49#define ASM_FILE_START(FILE) \
6abc6f40 50do { \
48adb36e 51 if (write_symbols == DBX_DEBUG) \
6abc6f40
RH
52 { \
53 alpha_write_verstamp (FILE); \
54 output_file_directive (FILE, main_input_filename); \
55 } \
800e920a 56 fprintf (FILE, "\t.set noat\n"); \
6abc6f40 57 fprintf (FILE, "\t.set noreorder\n"); \
1eb356b9
RH
58 if (TARGET_EXPLICIT_RELOCS) \
59 fprintf (FILE, "\t.set nomacro\n"); \
de4abb91 60 if (TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX) \
b0435cf4
RH
61 { \
62 fprintf (FILE, "\t.arch %s\n", \
a3b815cb 63 (TARGET_CPU_EV6 ? "ev6" \
b0435cf4
RH
64 : TARGET_MAX ? "pca56" : "ev56")); \
65 } \
6abc6f40 66} while (0)
800e920a 67
74e5aa4b 68#undef IDENT_ASM_OP
8c13c7b3 69#define IDENT_ASM_OP "\t.ident\t"
800e920a 70
800e920a 71/* Output #ident as a .ident. */
94984e91 72#undef ASM_OUTPUT_IDENT
800e920a 73#define ASM_OUTPUT_IDENT(FILE, NAME) \
8202cda0 74 fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
800e920a
RK
75
76/* This is how to allocate empty space in some section. The .zero
77 pseudo-op is used for this on most svr4 assemblers. */
78
74e5aa4b 79#undef SKIP_ASM_OP
8c13c7b3 80#define SKIP_ASM_OP "\t.zero\t"
800e920a 81
d38d55b4
DB
82#undef ASM_OUTPUT_SKIP
83#define ASM_OUTPUT_SKIP(FILE, SIZE) \
8202cda0 84 fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE))
800e920a
RK
85
86/* Output the label which precedes a jumptable. Note that for all svr4
87 systems where we actually generate jumptables (which is to say every
88 svr4 target except i386, where we use casesi instead) we put the jump-
89 tables into the .rodata section and since other stuff could have been
90 put into the .rodata section prior to any given jumptable, we have to
91 make sure that the location counter for the .rodata section gets pro-
92 perly re-aligned prior to the actual beginning of the jump table. */
93
74e5aa4b 94#undef ALIGN_ASM_OP
8c13c7b3 95#define ALIGN_ASM_OP "\t.align\t"
800e920a
RK
96
97#ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
d38d55b4 98#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
800e920a
RK
99 ASM_OUTPUT_ALIGN ((FILE), 2);
100#endif
101
d38d55b4
DB
102#undef ASM_OUTPUT_CASE_LABEL
103#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \
800e920a
RK
104 do { \
105 ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \
4977bab6 106 (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); \
800e920a
RK
107 } while (0)
108
109/* The standard SVR4 assembler seems to require that certain builtin
110 library routines (e.g. .udiv) be explicitly declared as .globl
111 in each assembly file where they are referenced. */
112
74e5aa4b 113#undef ASM_OUTPUT_EXTERNAL_LIBCALL
800e920a 114#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
5eb99654 115 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0))
800e920a
RK
116
117/* This says how to output assembler code to declare an
118 uninitialized external linkage data object. Under SVR4,
119 the linker seems to want the alignment of data objects
120 to depend on their types. We do exactly that here. */
121
74e5aa4b 122#undef COMMON_ASM_OP
8c13c7b3 123#define COMMON_ASM_OP "\t.comm\t"
800e920a 124
d38d55b4 125#undef ASM_OUTPUT_ALIGNED_COMMON
800e920a
RK
126#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
127do { \
8202cda0 128 fprintf ((FILE), "%s", COMMON_ASM_OP); \
800e920a
RK
129 assemble_name ((FILE), (NAME)); \
130 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
131} while (0)
132
133/* This says how to output assembler code to declare an
134 uninitialized internal linkage data object. Under SVR4,
135 the linker seems to want the alignment of data objects
136 to depend on their types. We do exactly that here. */
137
d38d55b4 138#undef ASM_OUTPUT_ALIGNED_LOCAL
800e920a
RK
139#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
140do { \
bb8ebb7f
RH
141 if ((SIZE) <= g_switch_value) \
142 sbss_section(); \
143 else \
144 bss_section(); \
2be2ac70 145 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
bb8ebb7f 146 if (!flag_inhibit_size_directive) \
2be2ac70 147 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
bb8ebb7f
RH
148 ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
149 ASM_OUTPUT_LABEL(FILE, NAME); \
95bfe95f 150 ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
800e920a
RK
151} while (0)
152
3660d217
RH
153/* This says how to output assembler code to declare an
154 uninitialized external linkage data object. */
155
156#undef ASM_OUTPUT_ALIGNED_BSS
157#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
158do { \
5eb99654 159 (*targetm.asm_out.globalize_label) (FILE, NAME); \
3660d217
RH
160 ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
161} while (0)
162
bb8ebb7f
RH
163/* Biggest alignment supported by the object file format of this
164 machine. Use this macro to limit the alignment which can be
165 specified using the `__attribute__ ((aligned (N)))' construct. If
166 not defined, the default value is `BIGGEST_ALIGNMENT'.
167
168 This value is really 2^63. Since gcc figures the alignment in bits,
169 we could only potentially get to 2^60 on suitible hosts. Due to other
170 considerations in varasm, we must restrict this to what fits in an int. */
171
74e5aa4b 172#undef MAX_OFILE_ALIGNMENT
bb8ebb7f
RH
173#define MAX_OFILE_ALIGNMENT \
174 (1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62))
175
800e920a
RK
176/* This is the pseudo-op used to generate a contiguous sequence of byte
177 values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
178 AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */
179
d38d55b4 180#undef ASCII_DATA_ASM_OP
8c13c7b3 181#define ASCII_DATA_ASM_OP "\t.ascii\t"
800e920a 182
d48bc59a
RH
183#undef READONLY_DATA_SECTION_ASM_OP
184#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
74e5aa4b 185#undef BSS_SECTION_ASM_OP
8c13c7b3 186#define BSS_SECTION_ASM_OP "\t.section\t.bss"
74e5aa4b 187#undef SBSS_SECTION_ASM_OP
8c13c7b3 188#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\""
74e5aa4b 189#undef SDATA_SECTION_ASM_OP
8c13c7b3 190#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\""
bb8ebb7f 191
800e920a
RK
192/* On svr4, we *do* have support for the .init and .fini sections, and we
193 can put stuff in there to be executed before and after `main'. We let
194 crtstuff.c and other files know this by defining the following symbols.
195 The definitions say how to change sections to the .init and .fini
196 sections. This is the same for all known svr4 assemblers. */
197
74e5aa4b 198#undef INIT_SECTION_ASM_OP
8c13c7b3 199#define INIT_SECTION_ASM_OP "\t.section\t.init"
74e5aa4b 200#undef FINI_SECTION_ASM_OP
8c13c7b3 201#define FINI_SECTION_ASM_OP "\t.section\t.fini"
800e920a 202
201556f0
JJ
203#ifdef HAVE_GAS_SUBSECTION_ORDERING
204
205#define ASM_SECTION_START_OP "\t.subsection\t-1"
206
207/* Output assembly directive to move to the beginning of current section. */
208#define ASM_OUTPUT_SECTION_START(FILE) \
209 fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
210
211#endif
212
800e920a
RK
213/* A default list of other sections which we might be "in" at any given
214 time. For targets that use additional sections (e.g. .tdesc) you
215 should override this definition in the target-specific file which
216 includes this file. */
217
d38d55b4 218#undef EXTRA_SECTIONS
d48bc59a 219#define EXTRA_SECTIONS in_sbss, in_sdata
800e920a
RK
220
221/* A default list of extra section function definitions. For targets
222 that use additional sections (e.g. .tdesc) you should override this
223 definition in the target-specific file which includes this file. */
224
d38d55b4 225#undef EXTRA_SECTION_FUNCTIONS
800e920a 226#define EXTRA_SECTION_FUNCTIONS \
bb8ebb7f
RH
227 SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
228 SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
800e920a 229
a82c7f05
RH
230extern void sbss_section PARAMS ((void));
231extern void sdata_section PARAMS ((void));
232
74e5aa4b 233#undef SECTION_FUNCTION_TEMPLATE
aa388f29 234#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
aa388f29
RH
235void FN () \
236{ \
237 if (in_section != ENUM) \
238 { \
239 fprintf (asm_out_file, "%s\n", OP); \
240 in_section = ENUM; \
241 } \
800e920a
RK
242}
243
7c262518
RH
244/* Switch into a generic section. */
245#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
ae46c4e0 246#define TARGET_ASM_SELECT_SECTION default_elf_select_section
ef7d91cd 247
01414194
LR
248#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
249
800e920a
RK
250/* Define the strings used for the special svr4 .type and .size directives.
251 These strings generally do not vary from one system running svr4 to
252 another, but if a given system (e.g. m88k running svr) needs to use
253 different pseudo-op names for these, they may be overridden in the
254 file which includes this one. */
255
74e5aa4b 256#undef TYPE_ASM_OP
8c13c7b3 257#define TYPE_ASM_OP "\t.type\t"
74e5aa4b 258#undef SIZE_ASM_OP
8c13c7b3 259#define SIZE_ASM_OP "\t.size\t"
800e920a
RK
260
261/* This is how we tell the assembler that a symbol is weak. */
262
74e5aa4b 263#undef ASM_WEAKEN_LABEL
d38d55b4 264#define ASM_WEAKEN_LABEL(FILE, NAME) \
800e920a
RK
265 do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
266 fputc ('\n', FILE); } while (0)
267
268/* This is how we tell the assembler that two symbols have the same value. */
269
74e5aa4b 270#undef ASM_OUTPUT_DEF
41ba8a20
RH
271#define ASM_OUTPUT_DEF(FILE, ALIAS, NAME) \
272 do { \
273 assemble_name(FILE, ALIAS); \
274 fputs(" = ", FILE); \
275 assemble_name(FILE, NAME); \
276 fputc('\n', FILE); \
277 } while (0)
278
279#undef ASM_OUTPUT_DEF_FROM_DECLS
280#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \
281 do { \
282 const char *alias = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
283 const char *name = IDENTIFIER_POINTER (TARGET); \
284 if (TREE_CODE (DECL) == FUNCTION_DECL) \
285 { \
286 fputc ('$', FILE); \
287 assemble_name (FILE, alias); \
288 fputs ("..ng = $", FILE); \
289 assemble_name (FILE, name); \
290 fputs ("..ng\n", FILE); \
291 } \
292 assemble_name(FILE, alias); \
293 fputs(" = ", FILE); \
294 assemble_name(FILE, name); \
295 fputc('\n', FILE); \
296 } while (0)
800e920a
RK
297
298/* The following macro defines the format used to output the second
299 operand of the .type assembler directive. Different svr4 assemblers
300 expect various different forms for this operand. The one given here
301 is just a default. You may need to override it in your machine-
302 specific tm.h file (depending upon the particulars of your assembler). */
303
74e5aa4b 304#undef TYPE_OPERAND_FMT
800e920a
RK
305#define TYPE_OPERAND_FMT "@%s"
306
307/* Write the extra assembler code needed to declare a function's result.
308 Most svr4 assemblers don't require any special declaration of the
309 result value, but there are exceptions. */
310
311#ifndef ASM_DECLARE_RESULT
312#define ASM_DECLARE_RESULT(FILE, RESULT)
313#endif
314
315/* These macros generate the special .type and .size directives which
316 are used to set the corresponding fields of the linker symbol table
317 entries in an ELF object file under SVR4. These macros also output
318 the starting labels for the relevant functions/objects. */
319
320/* Write the extra assembler code needed to declare an object properly. */
321
74e5aa4b 322#undef ASM_DECLARE_OBJECT_NAME
e2bef702
RH
323#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
324 do { \
325 HOST_WIDE_INT size; \
2be2ac70 326 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
e2bef702
RH
327 size_directive_output = 0; \
328 if (!flag_inhibit_size_directive \
329 && DECL_SIZE (DECL) \
330 && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
331 { \
332 size_directive_output = 1; \
2be2ac70 333 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
e2bef702
RH
334 } \
335 ASM_OUTPUT_LABEL(FILE, NAME); \
800e920a
RK
336 } while (0)
337
338/* Output the size directive for a decl in rest_of_decl_compilation
339 in the case where we did not do so before the initializer.
340 Once we find the error_mark_node, we know that the value of
341 size_directive_output was set
342 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
343
74e5aa4b 344#undef ASM_FINISH_DECLARE_OBJECT
ca7cdae3 345#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
e2bef702 346 do { \
e03c5670 347 const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
e2bef702
RH
348 HOST_WIDE_INT size; \
349 if (!flag_inhibit_size_directive \
350 && DECL_SIZE (DECL) \
351 && ! AT_END && TOP_LEVEL \
352 && DECL_INITIAL (DECL) == error_mark_node \
353 && !size_directive_output \
354 && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
355 { \
356 size_directive_output = 1; \
2be2ac70 357 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
e2bef702
RH
358 } \
359 } while (0)
800e920a
RK
360
361/* A table of bytes codes used by the ASM_OUTPUT_ASCII and
362 ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
363 corresponds to a particular byte value [0..255]. For any
364 given byte value, if the value in the corresponding table
365 position is zero, the given character can be output directly.
366 If the table value is 1, the byte must be output as a \ooo
367 octal escape. If the tables value is anything else, then the
368 byte value should be output as a \ followed by the value
369 in the table. Note that we can use standard UN*X escape
370 sequences for many control characters, but we don't use
371 \a to represent BEL because some svr4 assemblers (e.g. on
372 the i386) don't know about that. Also, we don't use \v
373 since some versions of gas, such as 2.2 did not accept it. */
374
74e5aa4b 375#undef ESCAPES
800e920a
RK
376#define ESCAPES \
377"\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\
378\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\
379\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\
380\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\
381\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\
382\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\
383\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\
384\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"
385
386/* Some svr4 assemblers have a limit on the number of characters which
387 can appear in the operand of a .string directive. If your assembler
388 has such a limitation, you should define STRING_LIMIT to reflect that
389 limit. Note that at least some svr4 assemblers have a limit on the
390 actual number of bytes in the double-quoted string, and that they
391 count each character in an escape sequence as one byte. Thus, an
392 escape sequence like \377 would count as four bytes.
393
394 If your target assembler doesn't support the .string directive, you
b0435cf4 395 should define this to zero. */
800e920a 396
74e5aa4b 397#undef STRING_LIMIT
800e920a 398#define STRING_LIMIT ((unsigned) 256)
74e5aa4b 399#undef STRING_ASM_OP
8c13c7b3 400#define STRING_ASM_OP "\t.string\t"
800e920a 401
b0435cf4 402/* GAS is the only Alpha/ELF assembler. */
d38d55b4 403#undef TARGET_GAS
800e920a
RK
404#define TARGET_GAS (1)
405
b0435cf4
RH
406/* Provide a STARTFILE_SPEC appropriate for ELF. Here we add the
407 (even more) magical crtbegin.o file which provides part of the
ee8d66f7 408 support for getting C++ file-scope static object constructed
2e6c150a 409 before entering `main'. */
800e920a 410
800e920a
RK
411#undef STARTFILE_SPEC
412#define STARTFILE_SPEC \
413 "%{!shared: \
414 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
2e6c150a
RH
415 crti.o%s %{static:crtbeginT.o%s}\
416 %{!static:%{shared:crtbeginS.o%s}%{!shared:crtbegin.o%s}}"
800e920a 417
b0435cf4
RH
418/* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the
419 magical crtend.o file which provides part of the support for
420 getting C++ file-scope static object constructed before entering
421 `main', followed by a normal ELF "finalizer" file, `crtn.o'. */
800e920a
RK
422
423#undef ENDFILE_SPEC
424#define ENDFILE_SPEC \
567d20f0
RH
425 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
426 %{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s"
b0435cf4
RH
427
428/* We support #pragma. */
32f0ffb3 429#define HANDLE_SYSV_PRAGMA 1
6690d24c 430
2a1ee410
RH
431/* Select a format to encode pointers in exception handling data. CODE
432 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
433 true if the symbol may be affected by dynamic relocations.
434
435 Since application size is already constrained to <2GB by the form of
436 the ldgp relocation, we can use a 32-bit pc-relative relocation to
437 static data. Dynamic data is accessed indirectly to allow for read
438 only EH sections. */
439#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
440 (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
1eb356b9
RH
441
442/* If defined, a C statement to be executed just prior to the output of
443 assembler code for INSN. */
444#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
445 (alpha_this_literal_sequence_number = 0, \
446 alpha_this_gpdisp_sequence_number = 0)
447extern int alpha_this_literal_sequence_number;
448extern int alpha_this_gpdisp_sequence_number;
cea3bd3e
RH
449
450/* Since the bits of the _init and _fini function is spread across
451 many object files, each potentially with its own GP, we must assume
452 we need to load our GP. Further, the .init/.fini section can
453 easily be more than 4MB away from the function to call so we can't
454 use bsr. */
455#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
456 asm (SECTION_OP "\n" \
457" br $29,1f\n" \
458"1: ldgp $29,0($29)\n" \
459" unop\n" \
460" jsr $26," USER_LABEL_PREFIX #FUNC "\n" \
461" .align 3\n" \
462" .previous");
463
464/* If we have the capability create headers for efficient EH lookup.
465 As of Jan 2002, only glibc 2.2.4 can actually make use of this, but
466 I imagine that other systems will catch up. In the meantime, it
467 doesn't harm to make sure that the data exists to be used later. */
468#if defined(HAVE_LD_EH_FRAME_HDR)
469#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
470#endif