diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index bdee2f8..e9c747a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5614,14 +5614,6 @@ Decode @var{sym_name} and store the real name part in @var{var}, sans the characters that encode section info. Define this macro if @code{ENCODE_SECTION_INFO} alters the symbol's name string. -@findex UNIQUE_SECTION_P -@item UNIQUE_SECTION_P (@var{decl}) -A C expression which evaluates to true if @var{decl} should be placed -into a unique section for some target-specific reason. If you do not -define this macro, the default is @samp{0}. Note that the flag -@option{-ffunction-sections} will also cause functions to be placed into -unique sections. - @findex UNIQUE_SECTION @item UNIQUE_SECTION (@var{decl}, @var{reloc}) A C statement to build up a unique section name, expressed as a @@ -5803,21 +5795,6 @@ A C statement to output something to the assembler file to handle a @samp{#ident} directive containing the text @var{string}. If this macro is not defined, nothing is output for a @samp{#ident} directive. -@findex ASM_OUTPUT_SECTION_NAME -@item ASM_OUTPUT_SECTION_NAME (@var{stream}, @var{decl}, @var{name}, @var{reloc}) -A C statement to output something to the assembler file to switch to section -@var{name} for object @var{decl} which is either a @code{FUNCTION_DECL}, a -@code{VAR_DECL} or @code{NULL_TREE}. @var{reloc} -indicates whether the initial value of @var{exp} requires link-time -relocations. The string given by @var{name} will always be the -canonical version stored in the global stringpool. - -Some target formats do not support arbitrary sections. Do not define -this macro in such cases. - -At present this macro is only used to support section attributes. -When this macro is undefined, section attributes are disabled. - @findex OBJC_PROLOGUE @item OBJC_PROLOGUE A C statement to output any assembler statements which are required to @@ -5825,6 +5802,32 @@ precede any Objective-C object definitions or message sending. The statement is executed only when compiling an Objective-C program. @end table +@deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION (const char *@var{name}, unsigned int @var{flags}, unsigned int @var{align}) +Output assembly directives to switch to section @var{name}. The section +should have attributes as specified by @var{flags}, which is a bit mask +of the @code{SECTION_*} flags defined in @file{output.h}. If @var{align} +is non-zero, it contains an alignment in bytes to be used for the section, +otherwise some target default should be used. Only targets that must +specify an alignment within the section directive need pay attention to +@var{align} -- we will still use @code{ASM_OUTPUT_ALIGN}. +@end deftypefn + +@deftypefn {Target Hook} bool TARGET_HAVE_NAMED_SECTIONS +This flag is true if the target supports @code{TARGET_ASM_NAMED_SECTION}. +@end deftypefn + +@deftypefn {Target Hook} {unsigned int} TARGET_SECTION_TYPE_FLAGS (tree @var{decl}, const char *@var{name}, int @var{reloc}) +Choose a set of section attributes for use by @code{TARGET_ASM_NAMED_SECTION} +based on a variable or function decl, a section name, and whether or not the +declaration's initializer may contain runtime relocations. @var{decl} may be + null, in which case read-write data should be assumed. + +The default version if this function handles choosing code vs data, +read-only vs read-write data, and @code{flag_pic}. You should only +need to override this if your target has special flags that might be +set via @code{__attribute__}. +@end deftypefn + @need 2000 @node Data Output @subsection Output of Data @@ -7058,17 +7061,16 @@ This macro need not be defined on most platforms. A C expression to switch to the section in which the main exception table is to be placed (@pxref{Sections}). The default is a section named @code{.gcc_except_table} on machines that support named -sections via @code{ASM_OUTPUT_SECTION_NAME}, otherwise if @option{-fpic} +sections via @code{TARGET_ASM_NAMED_SECTION}, otherwise if @option{-fpic} or @option{-fPIC} is in effect, the @code{data_section}, otherwise the @code{readonly_data_section}. -@findex EH_FRAME_SECTION_ASM_OP -@item EH_FRAME_SECTION_ASM_OP -If defined, a C string constant, including spacing, for the assembler -operation to switch to the section for exception handling frame unwind -information. If not defined, GCC will provide a default definition if the -target supports named sections. @file{crtstuff.c} uses this macro to -switch to the appropriate section. +@findex EH_FRAME_SECTION_NAME +@item EH_FRAME_SECTION_NAME +If defined, a C string constant for the name of the section containing +exception handling frame unwind information. If not defined, GCC will +provide a default definition if the target supports named sections. +@file{crtstuff.c} uses this macro to switch to the appropriate section. You should define this symbol if your target supports DWARF 2 frame unwind information and the default definition does not work. |