aboutsummaryrefslogtreecommitdiff
path: root/lto-plugin/lto-plugin.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-28lto-plugin.c (translate): Remove debug fprintf.Andi Kleen1-2/+0
* lto-plugin.c (translate): Remove debug fprintf. From-SVN: r162630
2010-07-23Cast to unsigned long.H.J. Lu1-1/+2
2010-07-23 H.J. Lu <hongjiu.lu@intel.com> PR bootstrap/45042 * lto-plugin.c (translate): Cast to unsigned long. From-SVN: r162465
2010-07-23re PR lto/44992 (ld -r breaks LTO)Andi Kleen1-62/+66
gcc: 2010-07-10 Andi Kleen <ak@linux.intel.com> 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 <ak@linux.intel.com> 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 <ak@linux.intel.com> 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
2010-05-21lto-plugin.c (write_resolution): Do not assert syms is non-NULL.Richard Guenther1-1/+0
2010-05-21 Richard Guenther <rguenther@suse.de> * lto-plugin.c (write_resolution): Do not assert syms is non-NULL. From-SVN: r159676
2010-05-07re PR lto/43857 (-fresolution causes an ICE)Richard Guenther1-19/+6
2010-05-07 Richard Guenther <rguenther@suse.de> * gcc.c (LINK_COMMAND_SPEC): Provide a resolution file to the linker plugin. (store_arg): Queue temp_filename for deletion instead of the whole argument. lto/ PR lto/43857 PR lto/43371 * lang.opt (fresolution): Change to ... (fresolution=): ... this. * lto-lang.c (lto_handle_option): Adjust. lto-plugin/ * lto-plugin.c (free_2): Do not free resolution_file. (write_resolution): Check that we were passed a resolution file. (all_symbols_read_handler): Adjust. (cleanup_handler): Do not remove the resolution file. (process_option): Handle -fresolution=. From-SVN: r159159
2010-04-23re PR lto/41550 (Fix security and portability issues in lto-plugin)Richard Guenther1-21/+28
2010-04-23 Richard Guenther <rguenther@suse.de> PR lto/41550 * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc. (translate): Likewise. (all_symbols_read_handler): Likewise. (claim_file_handler): Likewise. (process_option): Likewise. (add_output_files): Likewise. Remove filename length limit. From-SVN: r158673
2010-03-16Delete temporary output files.Dmitry Gorbachev1-0/+7
2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com> PR lto/43336 * lto-plugin.c (cleanup_handler): Delete temporary output files. From-SVN: r157483
2010-01-03Pass -m* and -v to -plugin-optH.J. Lu1-2/+13
gcc/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/42520 * gcc.c (LINK_COMMAND_SPEC): Pass -m* and -v to -plugin-opt. lto-plugin/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/42520 * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command if -v is passed. From-SVN: r155601
2009-11-19re PR bootstrap/42096 (lto.c:289:7: error: implicit declaration of function ↵Rafael Avila de Espindola1-1/+1
'strtoll') 2009-11-19 Rafael Avila de Espindola <espindola@google.com> PR bootstrap/42096 * lto-plugin.c (claim_file_handler): Print offsets in hex. 2009-11-19 Rafael Avila de Espindola <espindola@google.com> PR bootstrap/42096 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex. * lto.c (lto_parse_hex): New. (lto_resolution_read): Use lto_parse_hex. * lto.h (lto_parse_hex): New. From-SVN: r154330
2009-11-12lto-plugin.c (write_resolution): Assume resolution_file is set.Rafael Avila de Espindola1-9/+13
2009-11-12 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (write_resolution): Assume resolution_file is set. Print the symbol name. (all_symbols_read_handler): Create a resolution file. Pass it to gcc. (cleanup_handler): Remove the resolution file. (process_option): Drop the -resolution option. 2009-11-12 Rafael Avila de Espindola <espindola@google.com> * lang.opt (fresolution): Renamed from resolution. * lto-lang.c (lto_handle_option): Handle new option name. * lto.c (lto_resolution_read): Add more checks. Discard rest of line. From-SVN: r154118
2009-11-05lto-plugin.c (temp_obj_dir_name): Remove.Rafael Avila de Espindola1-26/+13
2009-11-05 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (temp_obj_dir_name): Remove. (arguments_file_name): New. (free_2): Free arguments_file_name instead of temp_obj_dir_name. (exec_lto_wrapper): Create arguments file with make_temp_file. (cleanup_handler): Don't remove the temporary directory. Remove the arguments file. (onload): Don't create the temporary directory. From-SVN: r153938
2009-11-04gcc.c (process_command): Handle arguments name@offset.Richard Guenther1-53/+22
2009-11-04 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> * gcc.c (process_command): Handle arguments name@offset. 2009-11-04 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> * lto-elf.c (lto_elf_build_section_table): Add the base offset. (lto_elf_file_open): Handle offsets in arguments name@offest. 2009-11-04 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (plugin_file_info): Remove temp field. (cleanup_handler): Don't delete temporary objects. (claim_file_handler): Don't create temporary objects. Co-Authored-By: Rafael Avila de Espindola <espindola@google.com> From-SVN: r153903
2009-11-04lto-plugin.c (cleanup_handler): Don't cleanup if debugging.Rafael Avila de Espindola1-0/+3
2009-11-04 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (cleanup_handler): Don't cleanup if debugging. From-SVN: r153899
2009-10-30re PR lto/41871 (lto-plugin gives: could not open/create temporary file)Rafael Avila de Espindola1-0/+3
2009-10-30 Rafael Avila de Espindola <espindola@google.com> PR41871 * lto-plugin.c (claim_file_handler): Close files that we created. From-SVN: r153764
2009-10-28lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of LDPL_ERRORRafael Avila de Espindola1-6/+4
2009-10-28 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of LDPL_ERROR From-SVN: r153687
2009-10-16lto-plugin.c (message): New variable.Rafael Avila de Espindola1-33/+74
2009-10-16 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (message): New variable. (check): New function. (parse_table_entry, translate, write_resolution,add_output_files, exec_lto_wrapper,claim_file_handler, onload): Use check instead of assert. (cleanup_handler): Use check instead of assert. Remove the arguments file if it exists. From-SVN: r152906
2009-10-15lto-plugin.c (resolution_file): New.Rafael Avila de Espindola1-10/+20
2009-10-15 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (resolution_file): New. (free_1): Update comment. (free_2): Free resolution_file. (write_resolution): Write resolution to specified file. Use the syms array from the symbol table. (all_symbols_read_handler): Delay call to free_1 past call to write_resolution. (process_option): Add a -resolution option. From-SVN: r152846
2009-10-08lto-plugin.c (add_input_library): New.Rafael Avila de Espindola1-3/+12
2009-10-08 Rafael Avila de Espindola <espindola@google.com> * lto-plugin.c (add_input_library): New. (all_symbols_read_handler): Use add_input_library for items that start with -l. (process_option): Fit in 80 columns. (onload): Handle LDPT_ADD_INPUT_LIBRARY. 2009-10-08 Rafael Avila de Espindola <espindola@google.com> * gcc.c (LINK_COMMAND_SPEC): Pass libc with -pass-through if it is being statically linked. From-SVN: r152558
2009-10-03Merge lto branch into trunk.Diego Novillo1-0/+689
From-SVN: r152434