From 73ce4d1ed68a2f4e36c27be604ce35c242048f9d Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Fri, 23 Jul 2010 05:33:51 +0000 Subject: re PR lto/44992 (ld -r breaks LTO) gcc: 2010-07-10 Andi Kleen PR lto/44992 * lto-opts.c (lto_write_options): Add NULL file_data argument to lto_get_section_name. * lto-section-out.c (lto_destroy_simple_output_block): Likewise. * lto-streamer-out.c (produce_asm): Likewise. (copy_function): Likewise. (produce_symtab): Likewise. (produce_asm_for_decls): Likewise. * lto-streamer.c (lto_get_section_name): Add file_data argument. Rewrite to add random postfix to LTO sections. * lto-streamer.h (lto_file_decl_data): Add next, id, resolutions. (lto_get_section_name): Add file_data argument to prototype. lto: 2010-07-10 Andi Kleen PR lto/44992 * lto.c: Include splay-tree.h (lto_resolution_read): Change to walk file_ids tree and parse extra file_id in resolution file. (lto_section_with_id): Add. (create_subid_section_table): Add. (lwstate): Add. (lto_create_files_from_ids): Add. (lto_file_read): Change to handle sub file ids and create list of file_datas. Add output argument for count. (get_section_data): Pass file_data to lto_get_section_name. (lto_flatten_file): Add. (read_cgraph_and_symbols): Handle linked lists of file_datas. lto-plugin: 2010-07-10 Andi Kleen PR lto/44992 * lto-plugin.c (sym_aux): Add. (plugin_symtab): Remove slots. Add aux and id. (parse_table_entry): Change to use aux instead of slots. (LTO_SECTION_PREFIX): Add. (translate): Improve buffer allocation. Change to append symbols to existing out buffer. (get_section): Remove. (process_symtab): Add. (free_2): Free symtab->aux. (write_resolution): Handle aux instead of slots. Print sub id to resolution file. (claim_file_handler): Clear lto_file. Replace get_symtab/translate calls with call to process_symtab. From-SVN: r162443 --- gcc/lto-streamer.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/lto-streamer.h') diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index cc38b22..3304132 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -600,6 +600,15 @@ struct GTY(()) lto_file_decl_data /* Hash new name of renamed global declaration to its original name. */ htab_t GTY((skip)) renaming_hash_table; + + /* Linked list used temporarily in reader */ + struct lto_file_decl_data *next; + + /* Sub ID for merged objects. */ + unsigned id; + + /* Symbol resolutions for this file */ + VEC(ld_plugin_symbol_resolution_t,heap) *resolutions; }; typedef struct lto_file_decl_data *lto_file_decl_data_ptr; @@ -815,7 +824,7 @@ extern void lto_record_function_out_decl_state (tree, extern const char *lto_tag_name (enum LTO_tags); extern bitmap lto_bitmap_alloc (void); extern void lto_bitmap_free (bitmap); -extern char *lto_get_section_name (int, const char *); +extern char *lto_get_section_name (int, const char *, struct lto_file_decl_data *); extern void print_lto_report (void); extern bool lto_streamer_cache_insert (struct lto_streamer_cache_d *, tree, int *, unsigned *); -- cgit v1.1