aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-section-in.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-07-03 10:36:35 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-07-03 08:36:35 +0000
commit88614dfa2bb5a40566bef00a85b13c4b167dc3c5 (patch)
treec8eb33857108931389e2e1062444b2deb45e6a29 /gcc/lto-section-in.c
parent8ba6ea878fd0965606ba6cfd74cf7097a40ed6c1 (diff)
downloadgcc-88614dfa2bb5a40566bef00a85b13c4b167dc3c5.zip
gcc-88614dfa2bb5a40566bef00a85b13c4b167dc3c5.tar.gz
gcc-88614dfa2bb5a40566bef00a85b13c4b167dc3c5.tar.bz2
Add .gnu.lto_.lto section.
2019-07-03 Martin Liska <mliska@suse.cz> * lto-section-in.c (lto_get_section_data): Add "lto" section. * lto-section-out.c (lto_destroy_simple_output_block): Never compress LTO_section_lto section. * lto-streamer-out.c (produce_asm): Do not set major_version and minor_version. (lto_output_toplevel_asms): Likewise. (produce_lto_section): New function. (lto_output): Call produce_lto_section. (lto_write_mode_table): Do not set major_version and minor_version. (produce_asm_for_decls): Likewise. * lto-streamer.h (enum lto_section_type): Add LTO_section_lto type. (struct lto_header): Remove. (struct lto_section): New struct. (struct lto_simple_header): Do not inherit from lto_header. (struct lto_file_decl_data): Add lto_section_header field. 2019-07-03 Martin Liska <mliska@suse.cz> * lto-common.c: Read LTO section and verify header. From-SVN: r272995
Diffstat (limited to 'gcc/lto-section-in.c')
-rw-r--r--gcc/lto-section-in.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c
index 4cfc0ca..4e7d118 100644
--- a/gcc/lto-section-in.c
+++ b/gcc/lto-section-in.c
@@ -52,10 +52,10 @@ const char *lto_section_name[LTO_N_SECTION_TYPES] =
"icf",
"offload_table",
"mode_table",
- "hsa"
+ "hsa",
+ "lto"
};
-
/* Hooks so that the ipa passes can call into the lto front end to get
sections. */
@@ -146,7 +146,7 @@ lto_get_section_data (struct lto_file_decl_data *file_data,
/* WPA->ltrans streams are not compressed with exception of function bodies
and variable initializers that has been verbatim copied from earlier
compilations. */
- if (!flag_ltrans || decompress)
+ if ((!flag_ltrans || decompress) && section_type != LTO_section_lto)
{
/* Create a mapping header containing the underlying data and length,
and prepend this to the uncompression buffer. The uncompressed data
@@ -167,9 +167,6 @@ lto_get_section_data (struct lto_file_decl_data *file_data,
data = buffer.data + header_length;
}
- lto_check_version (((const lto_header *)data)->major_version,
- ((const lto_header *)data)->minor_version,
- file_data->file_name);
return data;
}