GCC Middle and Back End API Reference
lto-section-names.h
Go to the documentation of this file.
1
/* Definitions for LTO section names.
2
Copyright (C) 2013-2025 Free Software Foundation, Inc.
3
4
This file is part of GCC.
5
6
GCC is free software; you can redistribute it and/or modify it under
7
the terms of the GNU General Public License as published by the Free
8
Software Foundation; either version 3, or (at your option) any later
9
version.
10
11
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with GCC; see the file COPYING3. If not see
18
<http://www.gnu.org/licenses/>. */
19
20
#ifndef GCC_LTO_SECTION_NAMES_H
21
#define GCC_LTO_SECTION_NAMES_H
22
23
/* The string that is the prefix on the section names we make for lto.
24
For decls the DECL_ASSEMBLER_NAME is appended to make the section
25
name for the functions and static_initializers. For other types of
26
sections a '.' and the section type are appended. */
27
#define LTO_SECTION_NAME_PREFIX ".gnu.lto_"
28
#if OBJECT_FORMAT_MACHO
29
#define OFFLOAD_SECTION_NAME_PREFIX "__GNU_OFFLD_LTO,"
30
#else
31
#define OFFLOAD_SECTION_NAME_PREFIX ".gnu.offload_lto_"
32
#endif
33
34
/* Can be either OFFLOAD_SECTION_NAME_PREFIX when we stream IR for offload
35
compiler, or LTO_SECTION_NAME_PREFIX for LTO case. */
36
extern
const
char
*
section_name_prefix
;
37
38
/* Segment name for LTO sections. This is only used for Mach-O. */
39
40
#define LTO_SEGMENT_NAME "__GNU_LTO"
41
42
#if OBJECT_FORMAT_MACHO
43
#define OFFLOAD_VAR_TABLE_SECTION_NAME "__GNU_OFFLOAD,__vars"
44
#define OFFLOAD_FUNC_TABLE_SECTION_NAME "__GNU_OFFLOAD,__funcs"
45
#define OFFLOAD_IND_FUNC_TABLE_SECTION_NAME "__GNU_OFFLOAD,__ind_fns"
46
#else
47
#define OFFLOAD_VAR_TABLE_SECTION_NAME ".gnu.offload_vars"
48
#define OFFLOAD_FUNC_TABLE_SECTION_NAME ".gnu.offload_funcs"
49
#define OFFLOAD_IND_FUNC_TABLE_SECTION_NAME ".gnu.offload_ind_funcs"
50
#endif
51
52
#endif
/* GCC_LTO_SECTION_NAMES_H */
section_name_prefix
const char * section_name_prefix
Definition
lto-streamer.cc:38
gcc
lto-section-names.h
Generated by
1.13.2