1 /* elfos.h -- operating system specific defines to be used when
2 targeting GCC for some generic ELF system
3 Copyright (C) 1991, 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
4 Based on svr4.h contributed by Ron Guilmette (rfg@netcom.com).
6 This file is part of GNU CC.
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* For the sake of libgcc2.c, indicate target supports atexit. */
27 #define ENDFILE_SPEC "crtend.o%s"
30 #define STARTFILE_SPEC "%{!shared: \
32 %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
35 /* Attach a special .ident directive to the end of the file to identify
36 the version of GCC which compiled this code. The format of the
37 .ident string is patterned after the ones produced by native svr4
40 #define IDENT_ASM_OP ".ident"
42 #define ASM_FILE_END(FILE) \
45 fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
46 IDENT_ASM_OP, version_string); \
49 /* Output #ident as a .ident. */
51 #define ASM_OUTPUT_IDENT(FILE, NAME) \
52 fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
54 /* Use periods rather than dollar signs in special g++ assembler names. */
56 #define NO_DOLLAR_IN_LABEL
58 /* Writing `int' for a bitfield forces int alignment for the structure. */
60 #define PCC_BITFIELD_TYPE_MATTERS 1
62 /* Implicit library calls should use memcpy, not bcopy, etc. */
64 #define TARGET_MEM_FUNCTIONS
66 /* Handle #pragma weak and #pragma pack. */
68 #define HANDLE_SYSV_PRAGMA
70 /* System V Release 4 uses DWARF debugging info. */
72 #define DWARF_DEBUGGING_INFO
74 /* All ELF targets can support DWARF-2. */
76 #define DWARF2_DEBUGGING_INFO
78 /* Also allow them to support STABS debugging. */
82 /* The GNU tools operate better with stabs. Since we don't have
83 any native tools to be compatible with, default to stabs. */
85 #ifndef PREFERRED_DEBUGGING_TYPE
86 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
90 #define ASM_BYTE_OP ".byte"
93 #define SET_ASM_OP ".set"
95 /* This is how to begin an assembly language file. Most svr4 assemblers want
96 at least a .file directive to come first, and some want to see a .version
97 directive come right after that. Here we just establish a default
98 which generates only the .file directive. If you need a .version
99 directive for any specific target, you should override this definition
100 in the target-specific file which includes this one. */
102 #undef ASM_FILE_START
103 #define ASM_FILE_START(FILE) \
104 output_file_directive ((FILE), main_input_filename)
106 /* This is how to allocate empty space in some section. The .zero
107 pseudo-op is used for this on most svr4 assemblers. */
109 #define SKIP_ASM_OP ".zero"
111 #undef ASM_OUTPUT_SKIP
112 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
113 fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE))
115 /* This is how to output a reference to a user-level label named NAME.
116 `assemble_name' uses this.
118 For System V Release 4 the convention is *not* to prepend a leading
119 underscore onto user-level symbol names. */
121 #undef ASM_OUTPUT_LABELREF
122 #define ASM_OUTPUT_LABELREF(FILE,NAME) fprintf (FILE, "%s", NAME)
124 /* This is how to output an internal numbered label where
125 PREFIX is the class of label and NUM is the number within the class.
127 For most svr4 systems, the convention is that any symbol which begins
128 with a period is not put into the linker symbol table by the assembler. */
130 #undef ASM_OUTPUT_INTERNAL_LABEL
131 #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
133 fprintf (FILE, ".%s%d:\n", PREFIX, NUM); \
136 /* This is how to store into the string LABEL
137 the symbol_ref name of an internal numbered label where
138 PREFIX is the class of label and NUM is the number within the class.
139 This is suitable for output with `assemble_name'.
141 For most svr4 systems, the convention is that any symbol which begins
142 with a period is not put into the linker symbol table by the assembler. */
144 #undef ASM_GENERATE_INTERNAL_LABEL
145 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
147 sprintf (LABEL, "*.%s%d", PREFIX, NUM); \
150 /* Output the label which precedes a jumptable. Note that for all svr4
151 systems where we actually generate jumptables (which is to say every
152 svr4 target except i386, where we use casesi instead) we put the jump-
153 tables into the .rodata section and since other stuff could have been
154 put into the .rodata section prior to any given jumptable, we have to
155 make sure that the location counter for the .rodata section gets pro-
156 perly re-aligned prior to the actual beginning of the jump table. */
158 #define ALIGN_ASM_OP ".align"
160 #ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
161 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
162 ASM_OUTPUT_ALIGN ((FILE), 2);
165 #undef ASM_OUTPUT_CASE_LABEL
166 #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \
168 ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \
169 ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \
172 /* The standard SVR4 assembler seems to require that certain builtin
173 library routines (e.g. .udiv) be explicitly declared as .globl
174 in each assembly file where they are referenced. */
176 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
177 ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
179 /* This says how to output assembler code to declare an
180 uninitialized external linkage data object. Under SVR4,
181 the linker seems to want the alignment of data objects
182 to depend on their types. We do exactly that here. */
184 #define COMMON_ASM_OP ".comm"
186 #undef ASM_OUTPUT_ALIGNED_COMMON
187 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
189 fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \
190 assemble_name ((FILE), (NAME)); \
191 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
194 /* This says how to output assembler code to declare an
195 uninitialized internal linkage data object. Under SVR4,
196 the linker seems to want the alignment of data objects
197 to depend on their types. We do exactly that here. */
199 #define LOCAL_ASM_OP ".local"
201 #undef ASM_OUTPUT_ALIGNED_LOCAL
202 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
204 fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \
205 assemble_name ((FILE), (NAME)); \
206 fprintf ((FILE), "\n"); \
207 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
210 /* This is the pseudo-op used to generate a 32-bit word of data with a
211 specific value in some section. This is the same for all known svr4
214 #define INT_ASM_OP ".long"
216 /* This is the pseudo-op used to generate a contiguous sequence of byte
217 values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
218 AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */
220 #undef ASCII_DATA_ASM_OP
221 #define ASCII_DATA_ASM_OP ".ascii"
223 /* Support const sections and the ctors and dtors sections for g++.
224 Note that there appears to be two different ways to support const
225 sections at the moment. You can either #define the symbol
226 READONLY_DATA_SECTION (giving it some code which switches to the
227 readonly data section) or else you can #define the symbols
228 EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
229 SELECT_RTX_SECTION. We do both here just to be on the safe side. */
231 #define USE_CONST_SECTION 1
233 #define CONST_SECTION_ASM_OP ".section\t.rodata"
235 /* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
237 Note that we want to give these sections the SHF_WRITE attribute
238 because these sections will actually contain data (i.e. tables of
239 addresses of functions in the current root executable or shared library
240 file) and, in the case of a shared library, the relocatable addresses
241 will have to be properly resolved/relocated (and then written into) by
242 the dynamic linker when it actually attaches the given shared library
243 to the executing process. (Note that on SVR4, you may wish to use the
244 `-z text' option to the ELF linker, when building a shared library, as
245 an additional check that you are doing everything right. But if you do
246 use the `-z text' option when building a shared library, you will get
247 errors unless the .ctors and .dtors sections are marked as writable
248 via the SHF_WRITE attribute.) */
250 #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\""
251 #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\""
253 /* On svr4, we *do* have support for the .init and .fini sections, and we
254 can put stuff in there to be executed before and after `main'. We let
255 crtstuff.c and other files know this by defining the following symbols.
256 The definitions say how to change sections to the .init and .fini
257 sections. This is the same for all known svr4 assemblers. */
259 #define INIT_SECTION_ASM_OP ".section\t.init"
260 #define FINI_SECTION_ASM_OP ".section\t.fini"
262 /* A default list of other sections which we might be "in" at any given
263 time. For targets that use additional sections (e.g. .tdesc) you
264 should override this definition in the target-specific file which
265 includes this file. */
267 #undef EXTRA_SECTIONS
268 #define EXTRA_SECTIONS in_const, in_ctors, in_dtors
270 /* A default list of extra section function definitions. For targets
271 that use additional sections (e.g. .tdesc) you should override this
272 definition in the target-specific file which includes this file. */
274 #undef EXTRA_SECTION_FUNCTIONS
275 #define EXTRA_SECTION_FUNCTIONS \
276 CONST_SECTION_FUNCTION \
277 CTORS_SECTION_FUNCTION \
278 DTORS_SECTION_FUNCTION
280 #define READONLY_DATA_SECTION() const_section ()
282 extern void text_section ();
284 #define CONST_SECTION_FUNCTION \
288 if (!USE_CONST_SECTION) \
290 else if (in_section != in_const) \
292 fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \
293 in_section = in_const; \
297 #define CTORS_SECTION_FUNCTION \
301 if (in_section != in_ctors) \
303 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
304 in_section = in_ctors; \
308 #define DTORS_SECTION_FUNCTION \
312 if (in_section != in_dtors) \
314 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
315 in_section = in_dtors; \
319 /* Switch into a generic section.
320 This is currently only used to support section attributes. */
322 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
324 static struct section_info \
326 struct section_info *next; \
328 enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
330 struct section_info *s; \
332 enum sect_enum type; \
334 for (s = sections; s; s = s->next) \
335 if (!strcmp (NAME, s->name)) \
338 if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \
339 type = SECT_EXEC, mode = "ax"; \
340 else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
341 type = SECT_RO, mode = "a"; \
343 type = SECT_RW, mode = "aw"; \
347 s = (struct section_info *) xmalloc (sizeof (struct section_info)); \
348 s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \
349 strcpy (s->name, NAME); \
351 s->next = sections; \
353 fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, mode); \
357 if (DECL && s->type != type) \
358 error_with_decl (DECL, "%s causes a section type conflict"); \
360 fprintf (FILE, ".section\t%s\n", NAME); \
364 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
365 #define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL))
366 #define UNIQUE_SECTION(DECL,RELOC) \
369 char *name, *string, *prefix; \
371 name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
373 if (! DECL_ONE_ONLY (DECL)) \
375 if (TREE_CODE (DECL) == FUNCTION_DECL) \
377 else if (DECL_READONLY_SECTION (DECL, RELOC)) \
378 prefix = ".rodata."; \
382 else if (TREE_CODE (DECL) == FUNCTION_DECL) \
383 prefix = ".gnu.linkonce.t."; \
384 else if (DECL_READONLY_SECTION (DECL, RELOC)) \
385 prefix = ".gnu.linkonce.r."; \
387 prefix = ".gnu.linkonce.d."; \
389 len = strlen (name) + strlen (prefix); \
390 string = alloca (len + 1); \
391 sprintf (string, "%s%s", prefix, name); \
393 DECL_SECTION_NAME (DECL) = build_string (len, string); \
395 /* A C statement (sans semicolon) to output an element in the table of
396 global constructors. */
397 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
400 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
401 assemble_name (FILE, NAME); \
402 fprintf (FILE, "\n"); \
405 /* A C statement (sans semicolon) to output an element in the table of
406 global destructors. */
407 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
410 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
411 assemble_name (FILE, NAME); \
412 fprintf (FILE, "\n"); \
415 /* A C statement or statements to switch to the appropriate
416 section for output of DECL. DECL is either a `VAR_DECL' node
417 or a constant of some sort. RELOC indicates whether forming
418 the initial value of DECL requires link-time relocations. */
420 #define SELECT_SECTION(DECL,RELOC) \
422 if (TREE_CODE (DECL) == STRING_CST) \
424 if (! flag_writable_strings) \
429 else if (TREE_CODE (DECL) == VAR_DECL \
430 || TREE_CODE (DECL) == CONSTRUCTOR) \
432 if ((flag_pic && RELOC) \
433 || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
434 || !DECL_INITIAL (DECL) \
435 || (DECL_INITIAL (DECL) != error_mark_node \
436 && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
445 /* A C statement or statements to switch to the appropriate
446 section for output of RTX in mode MODE. RTX is some kind
447 of constant in RTL. The argument MODE is redundant except
448 in the case of a `const_int' rtx. Currently, these always
449 go into the const section. */
451 #undef SELECT_RTX_SECTION
452 #define SELECT_RTX_SECTION(MODE,RTX) const_section()
454 /* Define the strings used for the special svr4 .type and .size directives.
455 These strings generally do not vary from one system running svr4 to
456 another, but if a given system (e.g. m88k running svr) needs to use
457 different pseudo-op names for these, they may be overridden in the
458 file which includes this one. */
460 #define TYPE_ASM_OP ".type"
461 #define SIZE_ASM_OP ".size"
463 /* This is how we tell the assembler that a symbol is weak. */
465 #define ASM_WEAKEN_LABEL(FILE,NAME) \
466 do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
467 fputc ('\n', FILE); } while (0)
469 /* The following macro defines the format used to output the second
470 operand of the .type assembler directive. Different svr4 assemblers
471 expect various different forms for this operand. The one given here
472 is just a default. You may need to override it in your machine-
473 specific tm.h file (depending upon the particulars of your assembler). */
475 #define TYPE_OPERAND_FMT "@%s"
477 /* Write the extra assembler code needed to declare a function's result.
478 Most svr4 assemblers don't require any special declaration of the
479 result value, but there are exceptions. */
481 #ifndef ASM_DECLARE_RESULT
482 #define ASM_DECLARE_RESULT(FILE, RESULT)
485 /* These macros generate the special .type and .size directives which
486 are used to set the corresponding fields of the linker symbol table
487 entries in an ELF object file under SVR4. These macros also output
488 the starting labels for the relevant functions/objects. */
490 /* Write the extra assembler code needed to declare a function properly.
491 Some svr4 assemblers need to also have something extra said about the
492 function's return value. We allow for that here. */
494 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
496 fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
497 assemble_name (FILE, NAME); \
499 fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
501 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
502 ASM_OUTPUT_LABEL(FILE, NAME); \
505 /* Write the extra assembler code needed to declare an object properly. */
507 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
509 fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
510 assemble_name (FILE, NAME); \
512 fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
514 size_directive_output = 0; \
515 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
517 size_directive_output = 1; \
518 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
519 assemble_name (FILE, NAME); \
520 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
522 ASM_OUTPUT_LABEL(FILE, NAME); \
525 /* Output the size directive for a decl in rest_of_decl_compilation
526 in the case where we did not do so before the initializer.
527 Once we find the error_mark_node, we know that the value of
528 size_directive_output was set
529 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
531 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
533 char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
534 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
535 && ! AT_END && TOP_LEVEL \
536 && DECL_INITIAL (DECL) == error_mark_node \
537 && !size_directive_output) \
539 size_directive_output = 1; \
540 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
541 assemble_name (FILE, name); \
542 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
546 /* This is how to declare the size of a function. */
548 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
550 if (!flag_inhibit_size_directive) \
553 static int labelno; \
555 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
556 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
557 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
558 assemble_name (FILE, (FNAME)); \
559 fprintf (FILE, ","); \
560 assemble_name (FILE, label); \
561 fprintf (FILE, "-"); \
562 assemble_name (FILE, (FNAME)); \
567 /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
568 ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
569 corresponds to a particular byte value [0..255]. For any
570 given byte value, if the value in the corresponding table
571 position is zero, the given character can be output directly.
572 If the table value is 1, the byte must be output as a \ooo
573 octal escape. If the tables value is anything else, then the
574 byte value should be output as a \ followed by the value
575 in the table. Note that we can use standard UN*X escape
576 sequences for many control characters, but we don't use
577 \a to represent BEL because some svr4 assemblers (e.g. on
578 the i386) don't know about that. Also, we don't use \v
579 since some versions of gas, such as 2.2 did not accept it. */
582 "\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\
583 \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\
584 \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\
585 \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\
586 \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\
587 \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\
588 \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\
589 \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"
591 /* Some svr4 assemblers have a limit on the number of characters which
592 can appear in the operand of a .string directive. If your assembler
593 has such a limitation, you should define STRING_LIMIT to reflect that
594 limit. Note that at least some svr4 assemblers have a limit on the
595 actual number of bytes in the double-quoted string, and that they
596 count each character in an escape sequence as one byte. Thus, an
597 escape sequence like \377 would count as four bytes.
599 If your target assembler doesn't support the .string directive, you
600 should define this to zero.
603 #define STRING_LIMIT ((unsigned) 256)
605 #define STRING_ASM_OP ".string"
607 /* The routine used to output NUL terminated strings. We use a special
608 version of this for most svr4 targets because doing so makes the
609 generated assembly code more compact (and thus faster to assemble)
610 as well as more readable, especially for targets like the i386
611 (where the only alternative is to output character sequences as
612 comma separated lists of numbers). */
614 #define ASM_OUTPUT_LIMITED_STRING(FILE, STR) \
617 register unsigned char *_limited_str = (unsigned char *) (STR); \
618 register unsigned ch; \
619 fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP); \
620 for (; ch = *_limited_str; _limited_str++) \
622 register int escape; \
623 switch (escape = ESCAPES[ch]) \
629 fprintf ((FILE), "\\%03o", ch); \
632 putc ('\\', (FILE)); \
633 putc (escape, (FILE)); \
637 fprintf ((FILE), "\"\n"); \
641 /* The routine used to output sequences of byte values. We use a special
642 version of this for most svr4 targets because doing so makes the
643 generated assembly code more compact (and thus faster to assemble)
644 as well as more readable. Note that if we find subparts of the
645 character sequence which end with NUL (and which are shorter than
646 STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */
648 #undef ASM_OUTPUT_ASCII
649 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
652 register unsigned char *_ascii_bytes = (unsigned char *) (STR); \
653 register unsigned char *limit = _ascii_bytes + (LENGTH); \
654 register unsigned bytes_in_chunk = 0; \
655 for (; _ascii_bytes < limit; _ascii_bytes++) \
657 register unsigned char *p; \
658 if (bytes_in_chunk >= 60) \
660 fprintf ((FILE), "\"\n"); \
661 bytes_in_chunk = 0; \
663 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
665 if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT) \
667 if (bytes_in_chunk > 0) \
669 fprintf ((FILE), "\"\n"); \
670 bytes_in_chunk = 0; \
672 ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
677 register int escape; \
678 register unsigned ch; \
679 if (bytes_in_chunk == 0) \
680 fprintf ((FILE), "\t%s\t\"", ASCII_DATA_ASM_OP); \
681 switch (escape = ESCAPES[ch = *_ascii_bytes]) \
688 fprintf ((FILE), "\\%03o", ch); \
689 bytes_in_chunk += 4; \
692 putc ('\\', (FILE)); \
693 putc (escape, (FILE)); \
694 bytes_in_chunk += 2; \
699 if (bytes_in_chunk > 0) \
700 fprintf ((FILE), "\"\n"); \
704 /* All SVR4 targets use the ELF object file format. */
705 #define OBJECT_FORMAT_ELF