]> git.ipfire.org Git - thirdparty/gcc.git/blob
7a18f0439ae9358eb6e1d149ad068068509a5bf5
[thirdparty/gcc.git] /
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: assembler format, output of assembler code
7
8 .. _file-framework:
9
10 The Overall Framework of an Assembler File
11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 .. prevent bad page break with this line
14
15 This describes the overall framework of an assembly file.
16
17 .. index:: default_file_start
18
19 .. include:: ../tm.rst.in
20 :start-after: [TARGET_ASM_FILE_START]
21 :end-before: [TARGET_ASM_FILE_START]
22
23
24 .. include:: ../tm.rst.in
25 :start-after: [TARGET_ASM_FILE_START_APP_OFF]
26 :end-before: [TARGET_ASM_FILE_START_APP_OFF]
27
28
29 .. include:: ../tm.rst.in
30 :start-after: [TARGET_ASM_FILE_START_FILE_DIRECTIVE]
31 :end-before: [TARGET_ASM_FILE_START_FILE_DIRECTIVE]
32
33
34 .. include:: ../tm.rst.in
35 :start-after: [TARGET_ASM_FILE_END]
36 :end-before: [TARGET_ASM_FILE_END]
37
38
39 .. function:: void file_end_indicate_exec_stack ()
40
41 Some systems use a common convention, the :samp:`.note.GNU-stack`
42 special section, to indicate whether or not an object file relies on
43 the stack being executable. If your system uses this convention, you
44 should define ``TARGET_ASM_FILE_END`` to this function. If you
45 need to do other things in that hook, have your hook function call
46 this function.
47
48 .. include:: ../tm.rst.in
49 :start-after: [TARGET_ASM_LTO_START]
50 :end-before: [TARGET_ASM_LTO_START]
51
52
53 .. include:: ../tm.rst.in
54 :start-after: [TARGET_ASM_LTO_END]
55 :end-before: [TARGET_ASM_LTO_END]
56
57
58 .. include:: ../tm.rst.in
59 :start-after: [TARGET_ASM_CODE_END]
60 :end-before: [TARGET_ASM_CODE_END]
61
62
63 .. c:macro:: ASM_COMMENT_START
64
65 A C string constant describing how to begin a comment in the target
66 assembler language. The compiler assumes that the comment will end at
67 the end of the line.
68
69 .. c:macro:: ASM_APP_ON
70
71 A C string constant for text to be output before each ``asm``
72 statement or group of consecutive ones. Normally this is
73 ``"#APP"``, which is a comment that has no effect on most
74 assemblers but tells the GNU assembler that it must check the lines
75 that follow for all valid assembler constructs.
76
77 .. c:macro:: ASM_APP_OFF
78
79 A C string constant for text to be output after each ``asm``
80 statement or group of consecutive ones. Normally this is
81 ``"#NO_APP"``, which tells the GNU assembler to resume making the
82 time-saving assumptions that are valid for ordinary compiler output.
83
84 .. c:macro:: ASM_OUTPUT_SOURCE_FILENAME (stream, name)
85
86 A C statement to output COFF information or DWARF debugging information
87 which indicates that filename :samp:`{name}` is the current source file to
88 the stdio stream :samp:`{stream}`.
89
90 This macro need not be defined if the standard form of output
91 for the file format in use is appropriate.
92
93 .. include:: ../tm.rst.in
94 :start-after: [TARGET_ASM_OUTPUT_SOURCE_FILENAME]
95 :end-before: [TARGET_ASM_OUTPUT_SOURCE_FILENAME]
96
97
98 .. include:: ../tm.rst.in
99 :start-after: [TARGET_ASM_OUTPUT_IDENT]
100 :end-before: [TARGET_ASM_OUTPUT_IDENT]
101
102
103 .. c:macro:: OUTPUT_QUOTED_STRING (stream, string)
104
105 A C statement to output the string :samp:`{string}` to the stdio stream
106 :samp:`{stream}`. If you do not call the function ``output_quoted_string``
107 in your config files, GCC will only call it to output filenames to
108 the assembler source. So you can use it to canonicalize the format
109 of the filename using this macro.
110
111 .. include:: ../tm.rst.in
112 :start-after: [TARGET_ASM_NAMED_SECTION]
113 :end-before: [TARGET_ASM_NAMED_SECTION]
114
115
116 .. include:: ../tm.rst.in
117 :start-after: [TARGET_ASM_ELF_FLAGS_NUMERIC]
118 :end-before: [TARGET_ASM_ELF_FLAGS_NUMERIC]
119
120
121 .. include:: ../tm.rst.in
122 :start-after: [TARGET_ASM_FUNCTION_SECTION]
123 :end-before: [TARGET_ASM_FUNCTION_SECTION]
124
125
126 .. include:: ../tm.rst.in
127 :start-after: [TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS]
128 :end-before: [TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS]
129
130
131 .. include:: ../tm.rst.in
132 :start-after: [TARGET_HAVE_NAMED_SECTIONS]
133 :end-before: [TARGET_HAVE_NAMED_SECTIONS]
134
135
136 This flag is true if the target supports ``TARGET_ASM_NAMED_SECTION``.
137 It must not be modified by command-line option processing.
138
139 .. _target_have_switchable_bss_sections:
140
141 .. include:: ../tm.rst.in
142 :start-after: [TARGET_HAVE_SWITCHABLE_BSS_SECTIONS]
143 :end-before: [TARGET_HAVE_SWITCHABLE_BSS_SECTIONS]
144
145
146 .. include:: ../tm.rst.in
147 :start-after: [TARGET_SECTION_TYPE_FLAGS]
148 :end-before: [TARGET_SECTION_TYPE_FLAGS]
149
150
151 .. include:: ../tm.rst.in
152 :start-after: [TARGET_ASM_RECORD_GCC_SWITCHES]
153 :end-before: [TARGET_ASM_RECORD_GCC_SWITCHES]
154
155
156 .. include:: ../tm.rst.in
157 :start-after: [TARGET_ASM_RECORD_GCC_SWITCHES_SECTION]
158 :end-before: [TARGET_ASM_RECORD_GCC_SWITCHES_SECTION]