RISC-V: Re-enable -msave-restore for shared libraries.
[official-gcc.git] / lto-plugin / ChangeLog
blob739269919b4790423291bbf80e026b9220a333da
1 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
3         * lto-plugin.c (cleanup_handler): Remove unused var.
5 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
7         * lto-plugin.c (exec_lto_wrapper): Make the wrapper
8         arguments filename more user-friendly.
9         (file_exists, maybe_unlink): New.
10         (cleanup_handler): Use maybe unlink to handle the
11         case when temps should be saved.
12         (process_option): Look for -v, —-version, -save-temps.
13         (onload): Record the linker output file name.
14         Check for -v, —-version, -save-temps in the GCC collect
15         options environment.
17 2019-02-26  Martin Liska  <mliska@suse.cz>
19         * lto-symtab.c: Remove.
21 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
23         Update copyright years.
25 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
27         PR bootstrap/82856
28         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
29         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
31 2018-05-30  Jan Hubicka  <jh@suse.cz>
33         * lto-plugin.c: (non_claimed_files): New static var.
34         (linker_ouput_known): New static var.
35         (all_symbols_read_handler): When user specifies linker output do not
36         imply it; output warning when nonlto-rel mode is forced.
37         (claim_file_header): Record number of nonclaimed files.
38         (process_option): Remember if linker output is known
40 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
42         PR jit/85384
43         * configure: Regenerate.
45 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
47         Update copyright years.
49 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
51         PR lto/81487
52         * lto-plugin.c (claim_file_handler): Use xasprintf instead of
53         asprintf.
54         [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
56 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
58         PR other/79046
59         * configure.ac: Add GCC_BASE_VER.
60         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
61         get version from BASE-VER file.
62         * configure: Regenerated.
63         * Makefile.in: Regenerated.
65 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
67         Update copyright years.
69 2016-11-15  Matthias Klose  <doko@ubuntu.com>
71         * configure: Regenerate.
73 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
75         PR driver/68463
76         * lto-plugin.c (struct plugin_offload_file): New.
77         (offload_files): Change type.
78         (offload_files_last, offload_files_last_obj): New.
79         (offload_files_last_lto): New.
80         (free_2): Adjust accordingly.
81         (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
82         Don't call free_1 for offload_files.  Write names of object files with
83         offloading to the temporary file.  Add new option to lto_arg_ptr.
84         (claim_file_handler): Don't claim file if it contains offload sections
85         without LTO sections.  If it contains offload sections, add to the list.
87 2016-01-15  Martin Liska  <mliska@suse.cz>
89         * lto-plugin.c (all_symbols_read_handler): Assign default
90         value to a string variable.
92 2015-11-25  Jan Hubicka  <jh@suse.cz>
94         PR lto/67548
95         * lto-plugin.c (linker_output, linker_output_set): New statics.
96         (all_symbols_read_handler): Add -flinker-output option.
97         (onload): Record linker_output info.
99 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
101         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
102         * configure: Regenerate.
103         * config.h.in: Ditto.
105 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
107         * Makefile.am: Drop 'by automake version' from top-level comment.
108         * Makefile.in: Regenerated with automake-1.11.6.
109         * aclocal.m4: Likewise.
110         * configure: Likewise.
112 2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
114         * lto-plugin.c (release_input_file): Removed.
115         (claim_file_handler): Don't call release_input_file.
116         (onload): Don't set release_input_file.
118 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
120         * lto-plugin.c (claim_file_handler): Pass handle to
121         release_input_file.
123 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
125         * lto-plugin.c (claim_file_handler): Call release_input_file only
126         if file is claimed.
128 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
130         * lto-plugin.c (claim_file_handler): Call release_input_file only
131         if it is not NULL.
133 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
135         PR lto/64837
136         * lto-plugin.c (release_input_file): New.
137         (claim_file_handler): Call release_input_file.
138         (onload): Set release_input_file.
140 2014-12-09  Ilya Verbin  <ilya.verbin@intel.com>
142         * lto-plugin.c (offload_files, num_offload_files): New static variables.
143         (free_1): Use arguments instead of global variables.
144         (free_2): Free offload_files.
145         (all_symbols_read_handler): Add names from offload_files to lto-wrapper
146         arguments.
147         (claim_file_handler): Do not add file to claimed_files if it contains
148         offload sections without LTO sections.  Add it to offload_files instead.
150 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
152         PR bootstrap/63784
153         * configure: Regenerated.
155 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
156             Bernd Schmidt  <bernds@codesourcery.com>
157             Andrey Turetskiy  <andrey.turetskiy@intel.com>
158             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
160         * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
161         (struct plugin_objfile): Add new field "offload".
162         (process_offload_section): New static function.
163         (claim_file_handler): Claim file if it contains offload sections.
165 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
166             Thomas Schwinge  <thomas@codesourcery.com>
167             Ilya Verbin  <ilya.verbin@intel.com>
168             Andrey Turetskiy  <andrey.turetskiy@intel.com>
170         * Makefile.am (libexecsubdir): Tweak for the possibility of being
171         configured for offload compiler.
172         (accel_dir_suffix, real_target_noncanonical): New variables substituted
173         by configure.
174         * Makefile.in: Regenerate.
175         * configure: Regenerate.
176         * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
177         variables.
179 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
181         PR target/63610
182         * configure: Regenerate.
184 2014-08-26  H.J. Lu  <hongjiu.lu@intel.com>
186         PR bootstrap/62260
187         * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
188         * configure.ac (gcc_build_dir): Set and AC_SUBST according to
189         $host_subdir.
190         * Makefile.in: Regenerated.
191         * configure: Likewise.
193 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
195         * configure.ac (--with-libiberty): New configure option.
196         * configure: Regenerate.
197         * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
198         variables.
199         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
200         (liblto_plugin_la_DEPENDENCIES): Use them.
201         * Makefile.in: Regenerate.
203 2014-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
205         PR lto/60981
206         * configure.ac: Check for -static-libgcc.
207         * configure: Regenerate.
209 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
211         PR sanitizer/56781
212         * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
213         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
214         liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
215         over ../libiberty/pic/libiberty.a if the former exists.
216         * Makefile.in: Regenerated.
218         PR sanitizer/56781
219         * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
220         * Makefile.in: Regenerated.
222 2014-04-02  Richard Biener  <rguenther@suse.de>
224         * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
225         is set in COLLECT_GCC_OPTIONS.
227 2014-03-28  Richard Biener  <rguenther@suse.de>
229         * lto-plugin.c (process_symtab): Handle EINTR and short reads.
231 2014-03-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
233         * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
234         for gcc.
235         * configure: Regenerate.
236         * Makefile.am (AM_LDFLAGS): New variable.
237         (liblto_plugin_la_LDFLAGS): Add it.
238         * Makefile.in: Regenerate.
240 2013-09-20  Alan Modra  <amodra@gmail.com>
242         * configure: Regenerate.
244 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
246         * configure: Regenerated.
248 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
250         * lto-plugin.c: Fix typo.
252 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
254         * configure: Regenerated.
256 2012-02-22  Kai Tietz  <ktietz@redhat.com>
258         PR lto/50616
259         * lto-plugin.c (PRI_LL): New macro.
260         (dump_symtab): Use PRI_LL instead of ll in print.
261         (process_symtab): Use PRI_LL instead of ll in scan.
263 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
265         * configure: Regenerate.
267 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
269         * configure: Regenerate.
271 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
273         * configure: Regenerate.
275 2011-10-02  Jan Hubicka  <jh@suse.cz>
277         PR lto/47247
278         * lto-plugin.c (get_symbols_v2): New variable.
279         (write_resolution): Use V2 API when available.
280         (onload): Handle LDPT_GET_SYMBOLS_V2.
282 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
283             Andi Kleen  <ak@linux.intel.com>
285         PR lto/50568
286         * lto-plugin.c (sym_aux): Change id to unsigned long long.
287         (plugin_symtab): Likewise.
288         (dump_symtab): Likewise.
289         (resolve_conflicts): Likewise.
290         (process_symtab): Likewise.
292 2011-08-10  Richard Guenther  <rguenther@suse.de>
294         PR bootstrap/49907
295         lto-plugin/
296         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
297         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
298         * configure: Regenerate.
299         * Makefile.in: Likewise.
300         * aclocal.m4: Likewise.
302 2011-04-20  Jim Meyering  <meyering@redhat.com>
304         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
306 2011-04-05  Richard Guenther  <rguenther@suse.de>
308         PR bootstrap/48431
309         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
311 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
313         * Makefile.in: Regenerate.
314         * aclocal.m4: Regenerate.
315         * configure: Regenerate.
317 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
319         * Makefile.am (all-local): Rename from 'all'.
320         * Makefile.in: Regenerate.
322 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
324         PR lto/47225
325         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
326         (liblto_plugin_la_LDFLAGS): Add -module.
327         (copy_lto_plugin): Renamed to...
328         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
329         of static modules.
330         * Makefile.in: Rebuild.
332 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
334         PR lto/47225
335         * Makefile.am (Wc): New helper for encoding -Wc,.
336         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
337         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
338         * Makefile.in: Regenerated.
340 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
342         Revert:
344         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
346         PR lto/47225
347         * Makefile.am (Wl): New helper for encoding -Wl,.
348         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
349         * Makefile.in: Regenerated.
351 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
353         PR lto/47225
354         * Makefile.am (Wl): New helper for encoding -Wl,.
355         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
356         * Makefile.in: Regenerated.
358 2011-01-25  Ian Lance Taylor  <iant@google.com>
360         * lto-plugin.c (gold_version): New static variable.
361         (all_symbols_read_handler): Don't check pass_through_items if
362         using gold 1.11 or later.
363         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
365 2011-01-12  Richard Guenther  <rguenther@suse.de>
367         PR lto/47264
368         * lto-plugin.c (parse_table_entry): Use memcpy to access
369         unaligned fields.
371 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
373         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
374         * Makefile.in: Regenerate.
376 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
378         Revert last change.
380 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
382         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
383         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
384         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
385         * Makefile.in: Regenerate.
387 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
389         PR middle-end/46674
390         PR lto/43157
391         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
392         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
393         * configure: Regenerate.
394         * config.h.in: Likewise.
396 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
398         PR target/40125
399         PR lto/46695
400         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
401         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
402         override -bindir setting.
403         * aclocal.m4: Regenerate.
404         * configure: Regenerate.
405         * Makefile.in: Regenerate.
407 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
409         * config.h.in: Regenerated.
410         * configure: Regenerated.
411         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
412         * lto-plugin.c (WIFEXITED): Define default.
413         (WEXITSTATUS): Likeiwse.
415 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
417         * config.h.in: Regenerated.
418         * configure: Regenerated.
419         * Makefile.in: Regenerated.
420         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
421         * lto-plugin.c:  Include sys/wait.h conditionally.
422         * aclocal.m4: Regenerated.
424 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
426         * lto-plugin.c (add_output_files): Fix memory leak.
428 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
430         PR bootstrap/46397
431         PR bootstrap/46362
432         * configure.ac: Add AC_TYPE_INT64_T test.
433         * config.h.in: Regenerate.
434         * configure: Likewise.
435         * lto-plugin.c (debug): Use char not bool.
436         (nop): Likewise.
437         (check_1): Rename from check, and use int not bool for gate argument.
438         (check): Macro wrapper for the above to coerce gate argument into
439         boolean-valued integer in case it has pointer type.
440         (parse_table_entry): Use 0 not false.
441         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
442         into two 32-bit parts and printing as hex ints.
444 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
446         PR lto/46291
447         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
449 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
451         PR lto/46273
452         * lto-plugin.h: Delete.
453         * lto-plugin-elf.c: Likewise.
454         * lto-plugin-coff.c: Likewise.
455         * configure.ac: Don't use libelf, don't source config.gcc.
456         (LIBELFLIBS): Delete.
457         (LIBELFINC): Delete.
458         (LTO_FORMAT): Delete.
459         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
460         (config.h): Add AC_CONFIG_HEADERS directive.
461         * Makefile.am (LIBELFLIBS): Delete.
462         (LIBELFINC): Delete.
463         (LTO_FORMAT): Delete.
464         (DEFS): Import.
465         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
466         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
467         any object-format-specific source file in the link.
468         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
469         * config.h.in: Generate.
470         * configure: Regenerate.
471         * Makefile.in: Likewise.
472         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
473         (LTO_SEGMENT_NAME): New definition.
474         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
475         (LTO_SECTION_PREFIX_LEN): New definition.
476         (struct sym_aux): Struct definition moved here from lto-plugin.h.
477         (struct plugin_symtab): Likewise.
478         (struct plugin_objfile): Likewise.
479         (struct plugin_objfile): New struct def.
480         (enum symbol_style): New enum type.
481         (add_symbols): Make static.
482         (claimed_files): Likewise.
483         (num_claimed_files): Likewise.
484         (sym_style): New global.
485         (check): Make static.
486         (parse_table_entry): Likewise.  Respect sym_style when extracting
487         symbol from symtab entry.
488         (translate): Make static.
489         (resolve_conflicts): Likewise.
490         (process_symtab): New function, per-section callback version of
491         old object-format-specific handling from deleted lto-plugin-elf.c.
492         (claim_file_handler): Convert ELF-specific version from deleted
493         lto-plugin-elf.c to simple_object interface and move here.
494         (process_options): Allow new '-sym-style=' option.
495         (onload): Don't call deleted onload_format_checks hook.
497 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
499         * lto-plugin.c (dump_symtab): Correct printf argument type.
500         (finish_conflict_resolution): Initialize resolution.
502 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
504         PR bootstrap/45951
505         * configure.ac: Add AC_CANONICAL_SYSTEM.
506         * configure: Regenerated.
508 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
510         * configure.ac: Source config.gcc to determine lto_binary_reader.
511         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
512         * Makefile.am (LTO_FORMAT): Import.
513         (liblto_plugin_la_SOURCES): Add object format dependent module
514         defined by LTO_FORMAT.
515         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
516         and work around libtool warning.
517         * configure: Regenerate.
518         * Makefile.in: Likewise.
519         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
520         (struct sym_aux): Likewise.
521         (struct plugin_symtab): Likewise.
522         (struct plugin_file_info): Likewise.
523         (LTO_SECTION_PREFIX): Likewise.
524         (add_symbols):  Make non-static.
525         (claimed_files): Likewise.
526         (num_claimed_files): Likewise.
527         (check): Likewise.
528         (parse_table_entry): Likewise.
529         (translate): Likewise.
530         (resolve_conflicts): Likewise.
531         (process_symtab): Move to new lto-plugin-elf.c object format dependent
532         source file.
533         (claim_file_handler): Likewise, and make non-static.
534         (onload): Call new onload_format_checks function.
535         * lto-plugin.h: New file.
536         (LTO_SECTION_PREFIX): Move here.
537         (struct sym_aux): Likewise.
538         (struct plugin_symtab): Likewise.
539         (struct plugin_file_info): Likewise.
540         (claim_file_handler): Add new function prototype.
541         (onload_format_checks): Likewise.
542         (check): Declare extern.
543         (translate): Likewise.
544         (parse_table_entry): Likewise.
545         (resolve_conflicts): Likewise.
546         (add_symbols):  Likewise.
547         (claimed_files): Likewise.
548         (num_claimed_files): Likewise.
549         * lto-plugin-elf.c (process_symtab): Move here.
550         (claim_file_handler): Likewise, and make non-static.
551         (onload_format_checks): New function factored out from onload.
552         * lto-plugin-coff.c (claim_file_handler): New function stub.
553         (onload_format_checks): Likewise.
555 2010-08-05  Andi Kleen  <ak@linux.intel.com>
557         * lto-plugin.c: Include <hashtab.h>
558         (sym_aux): Add next_conflict field to save conflict chains.
559         (plugin_file_info): Add conflicts symtab.
560         (parse_table_entry): Initialize aux->next_conflict.
561         (process_symtab): Increment found.
562         (dump_symtab): Add.
563         (finish_conflict_resolution): Add.
564         (free_symtab): Add.
565         (write_resolution): Remove symbols loop and move into
566         dump_symtab. Call dump_symtab for main symbol and conflicts table.
567         Call free_symtab to free conflicts table.
568         (SWAP): Add.
569         (eq_sym): Add.
570         (hash_sym): Add.
571         (symbol_strength): Add.
572         (resolve_conflicts): Add.
573         (claim_file_handler): Add n variable. Check return value of
574         process_symtab. Call resolve_conflicts.
576 2010-07-27  Andi Kleen  <ak@linux.intel.com>
578         * lto-plugin.c (translate): Remove debug fprintf.
580 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
582         PR bootstrap/45042
583         * lto-plugin.c (translate): Cast to unsigned long.
585 2010-07-23   Andi Kleen  <ak@linux.intel.com>
587         PR lto/44992
588         * lto-plugin.c (sym_aux): Add.
589         (plugin_symtab): Remove slots. Add aux and id.
590         (parse_table_entry): Change to use aux instead of slots.
591         (LTO_SECTION_PREFIX): Add.
592         (translate): Improve buffer allocation. Change to append
593         symbols to existing out buffer.
594         (get_section): Remove.
595         (process_symtab): Add.
596         (free_2): Free symtab->aux.
597         (write_resolution): Handle aux instead of slots.
598         Print sub id to resolution file.
599         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
600         calls with call to process_symtab.
602 2010-07-22  Richard Guenther  <rguenther@suse.de>
604         * Makefile.am: New copy_lto_plugin rule to install the plugin
605         into ../gcc.
606         * Makefile.in: Regenerated.
608 2010-05-21  Richard Guenther  <rguenther@suse.de>
610         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
612 2010-05-07  Richard Guenther <rguenther@suse.de>
614         * lto-plugin.c (free_2): Do not free resolution_file.
615         (write_resolution): Check that we were passed a resolution file.
616         (all_symbols_read_handler): Adjust.
617         (cleanup_handler): Do not remove the resolution file.
618         (process_option): Handle -fresolution=.
620 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
622         PR other/43620
623         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
624         * Makefile.in: Regenerate.
626 2010-04-23  Richard Guenther  <rguenther@suse.de>
628         PR lto/41550
629         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
630         (translate): Likewise.
631         (all_symbols_read_handler): Likewise.
632         (claim_file_handler): Likewise.
633         (process_option): Likewise.
634         (add_output_files): Likewise.  Remove filename length limit.
636 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
638         * Makefile.in: Regenerate.
639         * aclocal.m4: Regenerate.
641 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
643         PR lto/43336
644         * lto-plugin.c (cleanup_handler): Delete temporary output files.
646 2010-01-11  Richard Guenther  <rguenther@suse.de>
648         PR lto/41569
649         * Makefile.am: Disable dependencies.
650         * Makefile.in: Regenerated.
652 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
654         PR lto/42520
655         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
656         if -v is passed.
658 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
660         PR bootstrap/42306
661         * configure: Regenerated.
662         * Makefile.in: Likewise.
664 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
666         PR bootstrap/42096
667         * lto-plugin.c (claim_file_handler): Print offsets in hex.
669 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
671         * lto-plugin.c (write_resolution): Assume resolution_file is set.
672         Print the symbol name.
673         (all_symbols_read_handler): Create a resolution file.
674         Pass it to gcc.
675         (cleanup_handler): Remove the resolution file.
676         (process_option): Drop the -resolution option.
678 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
680         * lto-plugin.c (temp_obj_dir_name): Remove.
681         (arguments_file_name): New.
682         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
683         (exec_lto_wrapper):  Create arguments file with make_temp_file.
684         (cleanup_handler): Don't remove the temporary directory. Remove the
685         arguments file.
686         (onload): Don't create the temporary directory.
688 2009-11-04  Richard Guenther  <rguenther@suse.de>
689             Rafael Avila de Espindola  <espindola@google.com>
691         * lto-plugin.c (plugin_file_info): Remove temp field.
692         (cleanup_handler): Don't delete temporary objects.
693         (claim_file_handler): Don't create temporary objects.
695 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
697         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
699 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
701         PR41871
702         * lto-plugin.c (claim_file_handler): Close files that we created.
704 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
706         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
707         LDPL_ERROR
709 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
711         PR lto/41652
712         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
713         * configure: Regenerate.
715 2009-10-26  Richard Guenther  <rguenther@suse.de>
717         * configure.ac: Use AM_MAINTAINER_MODE.
718         * acinclude.m4: Remove.
719         * configure: Re-generate.
720         * Makefile.in: Likewise.
721         * aclocal.m4: Likewise.
723 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
724     
725         PR40790
726         * configure: Regenerate.
727         * configure.ac: Add AC_TYPE_UINT64_T.
729 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
731         * lto-plugin.c (message): New variable.
732         (check): New function.
733         (parse_table_entry, translate, write_resolution,add_output_files,
734         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
735         assert.
736         (cleanup_handler): Use check instead of assert. Remove the arguments
737         file if it exists.
739 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
741         * lto-plugin.c (resolution_file): New.
742         (free_1): Update comment.
743         (free_2): Free resolution_file.
744         (write_resolution): Write resolution to specified file. Use the
745         syms array from the symbol table.
746         (all_symbols_read_handler): Delay call to free_1 past call to
747         write_resolution.
748         (process_option): Add a -resolution option.
750 2009-10-13  Richard Guenther  <rguenther@suse.de>
752         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
753         correct libiberty.
754         * Makefile.in: Regenerated.
756 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
758         * lto-plugin.c (add_input_library): New.
759         (all_symbols_read_handler): Use add_input_library for items that
760         start with -l.
761         (process_option): Fit in 80 columns.
762         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
764 2009-10-02  Diego Novillo  <dnovillo@google.com>
766         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
767         and -D_FILE_OFFSET_BITS=64.
768         * configure.ac: Add AC_SYS_LARGEFILE.
769         * configure: Regenerate.
770         * Makefile.in: Regenerate.
771         * lto-plugin.c: Fix copyright boilerplate.
773 2009-10-02  Diego Novillo  <dnovillo@google.com>
775         * Makefile.am (ACLOCAL_AMFLAGS): Define.
776         * aclocal.m4: Regenerate with aclocal-2.64
777         * acinclude.m4: Remove.
778         * Makefile.in: Regenerate with automake-1.11
779         * configure.ac (AC_PREREQ): Update to 2.64.
780         * configure: Regenerate.
782 2009-10-02  Diego Novillo  <dnovillo@google.com>
784         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
785         and -D_FILE_OFFSET_BITS=64.
786         * configure.ac: Add AC_SYS_LARGEFILE.
787         * configure: Regenerate.
788         * Makefile.in: Regenerate.
789         * lto-plugin.c: Fix copyright boilerplate.
791 2009-10-02  Diego Novillo  <dnovillo@google.com>
793         * Makefile.am (ACLOCAL_AMFLAGS): Define.
794         * aclocal.m4: Regenerate with aclocal-2.64
795         * acinclude.m4: Remove.
796         * Makefile.in: Regenerate with automake-1.11
797         * configure.ac (AC_PREREQ): Update to 2.64.
798         * configure: Regenerate.
800 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
802         * Makefile.am (liblto_plugin_la_SOURCES): Remove
803         $(top_srcdir)/../gcc/lto/common.c
804         * Makefile.in: Regenerate.
806 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
808         * lto-plugin.c (pass_through_items): New.
809         (num_pass_through_items): New.
810         (all_symbols_read_handler): Update to use the -pass-through option.
811         (process_option): Replace -libgcc with -pass-through.
812         
813 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
815         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
816         register_cleanup to be set.
818 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
820         * Makefile.am: Remove all reference to ltosymtab.
821         * Makefile.in: Regenerate.
822         * lto-symtab.c: Remove.
824 2009-05-21  Diego Novillo  <dnovillo@google.com>
826         * configure.ac: Remove call to AC_CHECK_GELF.
827         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
828         * acinclude.m4: Do not include ../config/libelf.m4
829         * Makefile.am (LIBELFLIBS): Define.
830         (LIBELFINC): Define.
831         (AM_CPPFLAGS): Add $(LIBELFINC).
832         (ltosymtab_LDADD): Add $(LIBELFLIBS).
833         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
834         * lto-plugin.c: Always include <gelf.h>
835         * lto-symtab.c: Likewise.
836         * configure: Regenerate.
837         * Makefile.in: Regenerate.
839 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
841         * lto-plugin.c (libgcc_filename): New.
842         (all_symbols_read_handler): Pass libgcc to the linker.
843         (all_symbols_read_handler): Parse -libgcc
845 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
847         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
848         * Makefile.in: Regenerate.
849         * lto-plugin.c (add_output_files): Argument is now a FILE.
850         (exec_lto_wrapper): Use writeargv and pex.
852 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
854         Revert:
855         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
856         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
859 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
861         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
863 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
865         * lto-plugin.c: Include libiberty.h.
866         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
867         snprintf.
869 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
871         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
872         file to lto-wrapper.
874 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
876         * lto-plugin.c (plugin_file_info): Remove fd and elf.
877         (parse_table_entry): strdup entry->name and entry->comdat_key.
878         (free_1): Free name and comdat_key. Don't close the file. Don't call
879         elf_end.
880         (claim_file_handler): Always call elf_end.
882 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
884         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
885         -D_FILE_OFFSET_BITS=64
886         * Makefile.in: Regenerate
888 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
890         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
891         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
892         * Makefile.in: Regenerate.
893         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
894         * configure: Regenerate.
895         * configure.ac: Add AC_SUBST(target_noncanonical).
897 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
899         * lto-plugin.c: Include stdbool.h.
900         (debug, nop): Declare as bool.
902 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
904         * lto-plugin.c (nop): New.
905         (use_original_files): New.
906         (all_symbols_read_handler): Call use_original_files if nop is true.
907         (process_option): Parse the -nop option.
909 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
911         * lto-plugin.c (debug): New.
912         (exec_lto_wrapper): Print argv if debug is true.
913         (process_option): Process the -debug command line option.
915 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
917         * lto-plugin.c (process_option): The argument is now a single option,
918         not a space separated list.
920 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
922         * lto-plugin.c: Include sys/types.h and sys/wait.h
923         (output_files, num_output_files, lto_wrapper_argv,
924         lto_wrapper_num_args): New.
925         (free_2): Free output_files.
926         (write_resolution): Disable.
927         (add_output_files): New.
928         (exec_lto_wrapper): New.
929         (all_symbols_read_handler): Run lto-wrapper.
930         (claim_file_handler): Free lto_file.name and call elf_end.
931         (process_option): New.
933 2008-11-26  Rafael Espindola  <espindola@google.com>
935         * lto-plugin.c (add_input_file): New.
936         (get_section): Return NULL if get_section fails.
937         (write_resolution): New.
938         (all_symbols_read_handler): Call add_input_file.
939         (claim_file_handler): Unlink the correct file.
940         (onload): Record add_input_file.
942 2008-09-23 Rafael Espindola  <espindola@google.com>
944         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
945         Update the location of common.c.
946         * Makefile.in: Regenerate.
947         * common.c: Moved to gcc/lto.
948         * common.h: Moved to gcc/lto.
949         * lto-plugin.c: Update the location of common.h.
950         * lto-symtab.c: Update the location of common.h.
952 2008-09-23 Rafael Espindola  <espindola@google.com>
954         * common.c: Include common.h.
955         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
956         sizes.
957         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
958         explicit sizes.
960 2008-09-23 Rafael Espindola  <espindola@google.com>
962         * lto-plugin.c (plugin_file_info): Add temp.
963         (cleanup_handler): Only delete temporary files.
964         (claim_file_handler): Initialize lto_file.temp.
966 2008-09-23  Rafael Espindola  <espindola@google.com>
968         * plugin-api.h: Moved to include.
970 2008-09-23 Rafael Espindola  <espindola@google.com>
972         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
973         format.
975 2008-09-22 Rafael Espindola  <espindola@google.com>
977         * plugin-api.h: Copy from binutils' cvs.
979 2008-09-22 Rafael Espindola  <espindola@google.com>
981         * lto-symtab.c (get_symbols, add_symbols): Update signature.
982         * plugin-api.h: Copy from binutils' cvs.
984 2008-09-22 Rafael Espindola  <espindola@google.com>
986         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
987         Make extern
989 2008-09-10 Rafael Espindola  <espindola@google.com>
991         * lto-plugin.c (onload): add missing break statements and asserts.
992         * lto-symtab.c (claim_file_handler): Make it static.
993         (all_symbols_read_handler): Make it static.
994         (all_file_handles): Make it static.
995         (num_file_handles): Make it static.
996         (register_claim_file): Make it static.
997         (register_object): Indent properly.
999 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1001         * Makefile.am (ltosymtab_LDADD): Add -lelf.
1002         * Makefiel.in: Regenerate.
1003         * lto-plugin.c: Include ar.h.
1004         (claim_file_handler): Handle file->offset != 0.
1005         * lto-symtab.c: Include gelf.h.
1006         (all_file_handles): Change type.
1007         (register_object): New.
1008         (register_file): Add support for archives.
1009         (resolve): Update to new type of all_file_handles.
1010         (print): Update to new type of all_file_handles.
1011         (free_all): Update to new type of all_file_handles.
1012         (main): Update to new type of all_file_handles.
1014 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1016         * lto-plugin.c (get_string_table): Remove.
1017         (get_section): Use elf_strptr instead of get_string_table.
1019 2008-09-08  Doug Kwan  <dougkwan@google.com>
1021         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
1022         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
1024 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
1026         * Makefile.am (ltosymtab_SOURCES): add common.c.
1027         (ltosymtab_CFLAGS): New.
1028         (liblto_plugin_la_SOURCES): Add common.c.
1029         * Makefile.in: Regenerate.
1030         * common.c: New.
1031         * common.h: New.
1032         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1033         (plugin_symtab): New.
1034         (plugin_file_info): New.
1035         (register_all_symbols_read): New.
1036         (get_symbols): New.
1037         (claimed_files): New.
1038         (num_claimed_files): New.
1039         (translate): Don't drop the slot number.
1040         (free_1): New.
1041         (free_2): New.
1042         (all_symbols_read_handler): New.
1043         (claim_file_handler): Record every claimed file.
1044         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1045         LDPT_GET_SYMBOLS.
1046         * lto-symtab.c: Include stdlib.h, string.h and common.h.
1047         (current_file_handle): Remove.
1048         (ld_plugin_all_symbols_read_handler): New.
1049         (plugin_handle): New.
1050         (file_handle): New.
1051         (all_file_handles): New.
1052         (num_file_handles): New.
1053         (get_symbols): New.
1054         (register_all_symbols_read): New.
1055         (add_symbols): Don't print the symbols, just record them.
1056         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1057         LDPT_GET_SYMBOLS.
1058         (load_plugin): Use plugin_handle.
1059         (register_file): Add the file handle to all_file_handles.
1060         (resolve): New.
1061         (print): New.
1062         (unload_plugin): New.
1063         (free_all): New.
1064         (main): Call all_symbols_read_handler and free resources.
1066 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
1068         * Makefile.am (AM_CFLAGS): New.
1069         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1070         (lib_LTLIBRARIES): New.
1071         (liblto_plugin_la_SOURCES): New.
1072         (liblto_plugin_la_LIBADD): New.
1073         * Makefile.in: Regenerate.
1074         * acinclude.m4: Don't include ../config/acx.m4 and
1075         ../config/no-executables.m4.
1076         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1077         ../libtool.m4.
1078         * aclocal.m4: Regenerate.
1079         * configure: Regenerate.
1080         * configure.ac: Use AM_PROG_LIBTOOL.
1081         * lto-plugin.c: New.
1082         * lto-symtab.c: Rewrite to use the plugin.
1083         * plugin-api.h: New.
1085 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
1087         * configure: Regenerate.
1088         * configure.ac: Use AC_CHECK_GELF.
1089         * lto-symtab.c: Include gelf.h.
1090         (get_string_table): Use size independent API.
1091         (printTable): Use lld to print 64 bit integers.
1093 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
1095         * lto-symtab.c (parse_table_entry): Assert entry->kind and
1096         entry->visibility are valid.
1098 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
1099         * lto-symtab.c (table_entry): Add comdat.
1100         (parse_table_entry): Read comdat.
1102 2008-08-21  Rafael Espindola  <espindola@google.com>
1104         * Makefile.am: New.
1105         * Makefile.in: New.
1106         * acinclude.m4: New.
1107         * aclocal.m4: New.
1108         * configure: New.
1109         * configure.ac: New.
1110         * lto-symtab.c: New.