2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / lto-plugin / ChangeLog
blobc3a082368311f560611fdc4a840af294591f679d
1 2018-05-30  Jan Hubicka  <jh@suse.cz>
3         * lto-plugin.c: (non_claimed_files): New static var.
4         (linker_ouput_known): New static var.
5         (all_symbols_read_handler): When user specifies linker output do not
6         imply it; output warning when nonlto-rel mode is forced.
7         (claim_file_header): Record number of nonclaimed files.
8         (process_option): Remember if linker output is known
10 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12         PR jit/85384
13         * configure: Regenerate.
15 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17         Update copyright years.
19 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
21         PR lto/81487
22         * lto-plugin.c (claim_file_handler): Use xasprintf instead of
23         asprintf.
24         [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
26 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
28         PR other/79046
29         * configure.ac: Add GCC_BASE_VER.
30         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
31         get version from BASE-VER file.
32         * configure: Regenerated.
33         * Makefile.in: Regenerated.
35 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
37         Update copyright years.
39 2016-11-15  Matthias Klose  <doko@ubuntu.com>
41         * configure: Regenerate.
43 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
45         PR driver/68463
46         * lto-plugin.c (struct plugin_offload_file): New.
47         (offload_files): Change type.
48         (offload_files_last, offload_files_last_obj): New.
49         (offload_files_last_lto): New.
50         (free_2): Adjust accordingly.
51         (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
52         Don't call free_1 for offload_files.  Write names of object files with
53         offloading to the temporary file.  Add new option to lto_arg_ptr.
54         (claim_file_handler): Don't claim file if it contains offload sections
55         without LTO sections.  If it contains offload sections, add to the list.
57 2016-01-15  Martin Liska  <mliska@suse.cz>
59         * lto-plugin.c (all_symbols_read_handler): Assign default
60         value to a string variable.
62 2015-11-25  Jan Hubicka  <jh@suse.cz>
64         PR lto/67548
65         * lto-plugin.c (linker_output, linker_output_set): New statics.
66         (all_symbols_read_handler): Add -flinker-output option.
67         (onload): Record linker_output info.
69 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
71         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
72         * configure: Regenerate.
73         * config.h.in: Ditto.
75 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
77         * Makefile.am: Drop 'by automake version' from top-level comment.
78         * Makefile.in: Regenerated with automake-1.11.6.
79         * aclocal.m4: Likewise.
80         * configure: Likewise.
82 2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
84         * lto-plugin.c (release_input_file): Removed.
85         (claim_file_handler): Don't call release_input_file.
86         (onload): Don't set release_input_file.
88 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
90         * lto-plugin.c (claim_file_handler): Pass handle to
91         release_input_file.
93 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
95         * lto-plugin.c (claim_file_handler): Call release_input_file only
96         if file is claimed.
98 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
100         * lto-plugin.c (claim_file_handler): Call release_input_file only
101         if it is not NULL.
103 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
105         PR lto/64837
106         * lto-plugin.c (release_input_file): New.
107         (claim_file_handler): Call release_input_file.
108         (onload): Set release_input_file.
110 2014-12-09  Ilya Verbin  <ilya.verbin@intel.com>
112         * lto-plugin.c (offload_files, num_offload_files): New static variables.
113         (free_1): Use arguments instead of global variables.
114         (free_2): Free offload_files.
115         (all_symbols_read_handler): Add names from offload_files to lto-wrapper
116         arguments.
117         (claim_file_handler): Do not add file to claimed_files if it contains
118         offload sections without LTO sections.  Add it to offload_files instead.
120 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
122         PR bootstrap/63784
123         * configure: Regenerated.
125 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
126             Bernd Schmidt  <bernds@codesourcery.com>
127             Andrey Turetskiy  <andrey.turetskiy@intel.com>
128             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
130         * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
131         (struct plugin_objfile): Add new field "offload".
132         (process_offload_section): New static function.
133         (claim_file_handler): Claim file if it contains offload sections.
135 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
136             Thomas Schwinge  <thomas@codesourcery.com>
137             Ilya Verbin  <ilya.verbin@intel.com>
138             Andrey Turetskiy  <andrey.turetskiy@intel.com>
140         * Makefile.am (libexecsubdir): Tweak for the possibility of being
141         configured for offload compiler.
142         (accel_dir_suffix, real_target_noncanonical): New variables substituted
143         by configure.
144         * Makefile.in: Regenerate.
145         * configure: Regenerate.
146         * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
147         variables.
149 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
151         PR target/63610
152         * configure: Regenerate.
154 2014-08-26  H.J. Lu  <hongjiu.lu@intel.com>
156         PR bootstrap/62260
157         * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
158         * configure.ac (gcc_build_dir): Set and AC_SUBST according to
159         $host_subdir.
160         * Makefile.in: Regenerated.
161         * configure: Likewise.
163 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
165         * configure.ac (--with-libiberty): New configure option.
166         * configure: Regenerate.
167         * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
168         variables.
169         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
170         (liblto_plugin_la_DEPENDENCIES): Use them.
171         * Makefile.in: Regenerate.
173 2014-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
175         PR lto/60981
176         * configure.ac: Check for -static-libgcc.
177         * configure: Regenerate.
179 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
181         PR sanitizer/56781
182         * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
183         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
184         liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
185         over ../libiberty/pic/libiberty.a if the former exists.
186         * Makefile.in: Regenerated.
188         PR sanitizer/56781
189         * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
190         * Makefile.in: Regenerated.
192 2014-04-02  Richard Biener  <rguenther@suse.de>
194         * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
195         is set in COLLECT_GCC_OPTIONS.
197 2014-03-28  Richard Biener  <rguenther@suse.de>
199         * lto-plugin.c (process_symtab): Handle EINTR and short reads.
201 2014-03-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
203         * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
204         for gcc.
205         * configure: Regenerate.
206         * Makefile.am (AM_LDFLAGS): New variable.
207         (liblto_plugin_la_LDFLAGS): Add it.
208         * Makefile.in: Regenerate.
210 2013-09-20  Alan Modra  <amodra@gmail.com>
212         * configure: Regenerate.
214 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
216         * configure: Regenerated.
218 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
220         * lto-plugin.c: Fix typo.
222 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
224         * configure: Regenerated.
226 2012-02-22  Kai Tietz  <ktietz@redhat.com>
228         PR lto/50616
229         * lto-plugin.c (PRI_LL): New macro.
230         (dump_symtab): Use PRI_LL instead of ll in print.
231         (process_symtab): Use PRI_LL instead of ll in scan.
233 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
235         * configure: Regenerate.
237 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
239         * configure: Regenerate.
241 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
243         * configure: Regenerate.
245 2011-10-02  Jan Hubicka  <jh@suse.cz>
247         PR lto/47247
248         * lto-plugin.c (get_symbols_v2): New variable.
249         (write_resolution): Use V2 API when available.
250         (onload): Handle LDPT_GET_SYMBOLS_V2.
252 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
253             Andi Kleen  <ak@linux.intel.com>
255         PR lto/50568
256         * lto-plugin.c (sym_aux): Change id to unsigned long long.
257         (plugin_symtab): Likewise.
258         (dump_symtab): Likewise.
259         (resolve_conflicts): Likewise.
260         (process_symtab): Likewise.
262 2011-08-10  Richard Guenther  <rguenther@suse.de>
264         PR bootstrap/49907
265         lto-plugin/
266         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
267         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
268         * configure: Regenerate.
269         * Makefile.in: Likewise.
270         * aclocal.m4: Likewise.
272 2011-04-20  Jim Meyering  <meyering@redhat.com>
274         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
276 2011-04-05  Richard Guenther  <rguenther@suse.de>
278         PR bootstrap/48431
279         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
281 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
283         * Makefile.in: Regenerate.
284         * aclocal.m4: Regenerate.
285         * configure: Regenerate.
287 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
289         * Makefile.am (all-local): Rename from 'all'.
290         * Makefile.in: Regenerate.
292 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
294         PR lto/47225
295         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
296         (liblto_plugin_la_LDFLAGS): Add -module.
297         (copy_lto_plugin): Renamed to...
298         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
299         of static modules.
300         * Makefile.in: Rebuild.
302 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
304         PR lto/47225
305         * Makefile.am (Wc): New helper for encoding -Wc,.
306         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
307         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
308         * Makefile.in: Regenerated.
310 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
312         Revert:
314         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
316         PR lto/47225
317         * Makefile.am (Wl): New helper for encoding -Wl,.
318         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
319         * Makefile.in: Regenerated.
321 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
323         PR lto/47225
324         * Makefile.am (Wl): New helper for encoding -Wl,.
325         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
326         * Makefile.in: Regenerated.
328 2011-01-25  Ian Lance Taylor  <iant@google.com>
330         * lto-plugin.c (gold_version): New static variable.
331         (all_symbols_read_handler): Don't check pass_through_items if
332         using gold 1.11 or later.
333         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
335 2011-01-12  Richard Guenther  <rguenther@suse.de>
337         PR lto/47264
338         * lto-plugin.c (parse_table_entry): Use memcpy to access
339         unaligned fields.
341 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
343         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
344         * Makefile.in: Regenerate.
346 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
348         Revert last change.
350 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
352         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
353         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
354         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
355         * Makefile.in: Regenerate.
357 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
359         PR middle-end/46674
360         PR lto/43157
361         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
362         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
363         * configure: Regenerate.
364         * config.h.in: Likewise.
366 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
368         PR target/40125
369         PR lto/46695
370         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
371         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
372         override -bindir setting.
373         * aclocal.m4: Regenerate.
374         * configure: Regenerate.
375         * Makefile.in: Regenerate.
377 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
379         * config.h.in: Regenerated.
380         * configure: Regenerated.
381         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
382         * lto-plugin.c (WIFEXITED): Define default.
383         (WEXITSTATUS): Likeiwse.
385 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
387         * config.h.in: Regenerated.
388         * configure: Regenerated.
389         * Makefile.in: Regenerated.
390         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
391         * lto-plugin.c:  Include sys/wait.h conditionally.
392         * aclocal.m4: Regenerated.
394 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
396         * lto-plugin.c (add_output_files): Fix memory leak.
398 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
400         PR bootstrap/46397
401         PR bootstrap/46362
402         * configure.ac: Add AC_TYPE_INT64_T test.
403         * config.h.in: Regenerate.
404         * configure: Likewise.
405         * lto-plugin.c (debug): Use char not bool.
406         (nop): Likewise.
407         (check_1): Rename from check, and use int not bool for gate argument.
408         (check): Macro wrapper for the above to coerce gate argument into
409         boolean-valued integer in case it has pointer type.
410         (parse_table_entry): Use 0 not false.
411         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
412         into two 32-bit parts and printing as hex ints.
414 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
416         PR lto/46291
417         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
419 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
421         PR lto/46273
422         * lto-plugin.h: Delete.
423         * lto-plugin-elf.c: Likewise.
424         * lto-plugin-coff.c: Likewise.
425         * configure.ac: Don't use libelf, don't source config.gcc.
426         (LIBELFLIBS): Delete.
427         (LIBELFINC): Delete.
428         (LTO_FORMAT): Delete.
429         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
430         (config.h): Add AC_CONFIG_HEADERS directive.
431         * Makefile.am (LIBELFLIBS): Delete.
432         (LIBELFINC): Delete.
433         (LTO_FORMAT): Delete.
434         (DEFS): Import.
435         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
436         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
437         any object-format-specific source file in the link.
438         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
439         * config.h.in: Generate.
440         * configure: Regenerate.
441         * Makefile.in: Likewise.
442         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
443         (LTO_SEGMENT_NAME): New definition.
444         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
445         (LTO_SECTION_PREFIX_LEN): New definition.
446         (struct sym_aux): Struct definition moved here from lto-plugin.h.
447         (struct plugin_symtab): Likewise.
448         (struct plugin_objfile): Likewise.
449         (struct plugin_objfile): New struct def.
450         (enum symbol_style): New enum type.
451         (add_symbols): Make static.
452         (claimed_files): Likewise.
453         (num_claimed_files): Likewise.
454         (sym_style): New global.
455         (check): Make static.
456         (parse_table_entry): Likewise.  Respect sym_style when extracting
457         symbol from symtab entry.
458         (translate): Make static.
459         (resolve_conflicts): Likewise.
460         (process_symtab): New function, per-section callback version of
461         old object-format-specific handling from deleted lto-plugin-elf.c.
462         (claim_file_handler): Convert ELF-specific version from deleted
463         lto-plugin-elf.c to simple_object interface and move here.
464         (process_options): Allow new '-sym-style=' option.
465         (onload): Don't call deleted onload_format_checks hook.
467 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
469         * lto-plugin.c (dump_symtab): Correct printf argument type.
470         (finish_conflict_resolution): Initialize resolution.
472 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
474         PR bootstrap/45951
475         * configure.ac: Add AC_CANONICAL_SYSTEM.
476         * configure: Regenerated.
478 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
480         * configure.ac: Source config.gcc to determine lto_binary_reader.
481         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
482         * Makefile.am (LTO_FORMAT): Import.
483         (liblto_plugin_la_SOURCES): Add object format dependent module
484         defined by LTO_FORMAT.
485         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
486         and work around libtool warning.
487         * configure: Regenerate.
488         * Makefile.in: Likewise.
489         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
490         (struct sym_aux): Likewise.
491         (struct plugin_symtab): Likewise.
492         (struct plugin_file_info): Likewise.
493         (LTO_SECTION_PREFIX): Likewise.
494         (add_symbols):  Make non-static.
495         (claimed_files): Likewise.
496         (num_claimed_files): Likewise.
497         (check): Likewise.
498         (parse_table_entry): Likewise.
499         (translate): Likewise.
500         (resolve_conflicts): Likewise.
501         (process_symtab): Move to new lto-plugin-elf.c object format dependent
502         source file.
503         (claim_file_handler): Likewise, and make non-static.
504         (onload): Call new onload_format_checks function.
505         * lto-plugin.h: New file.
506         (LTO_SECTION_PREFIX): Move here.
507         (struct sym_aux): Likewise.
508         (struct plugin_symtab): Likewise.
509         (struct plugin_file_info): Likewise.
510         (claim_file_handler): Add new function prototype.
511         (onload_format_checks): Likewise.
512         (check): Declare extern.
513         (translate): Likewise.
514         (parse_table_entry): Likewise.
515         (resolve_conflicts): Likewise.
516         (add_symbols):  Likewise.
517         (claimed_files): Likewise.
518         (num_claimed_files): Likewise.
519         * lto-plugin-elf.c (process_symtab): Move here.
520         (claim_file_handler): Likewise, and make non-static.
521         (onload_format_checks): New function factored out from onload.
522         * lto-plugin-coff.c (claim_file_handler): New function stub.
523         (onload_format_checks): Likewise.
525 2010-08-05  Andi Kleen  <ak@linux.intel.com>
527         * lto-plugin.c: Include <hashtab.h>
528         (sym_aux): Add next_conflict field to save conflict chains.
529         (plugin_file_info): Add conflicts symtab.
530         (parse_table_entry): Initialize aux->next_conflict.
531         (process_symtab): Increment found.
532         (dump_symtab): Add.
533         (finish_conflict_resolution): Add.
534         (free_symtab): Add.
535         (write_resolution): Remove symbols loop and move into
536         dump_symtab. Call dump_symtab for main symbol and conflicts table.
537         Call free_symtab to free conflicts table.
538         (SWAP): Add.
539         (eq_sym): Add.
540         (hash_sym): Add.
541         (symbol_strength): Add.
542         (resolve_conflicts): Add.
543         (claim_file_handler): Add n variable. Check return value of
544         process_symtab. Call resolve_conflicts.
546 2010-07-27  Andi Kleen  <ak@linux.intel.com>
548         * lto-plugin.c (translate): Remove debug fprintf.
550 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
552         PR bootstrap/45042
553         * lto-plugin.c (translate): Cast to unsigned long.
555 2010-07-23   Andi Kleen  <ak@linux.intel.com>
557         PR lto/44992
558         * lto-plugin.c (sym_aux): Add.
559         (plugin_symtab): Remove slots. Add aux and id.
560         (parse_table_entry): Change to use aux instead of slots.
561         (LTO_SECTION_PREFIX): Add.
562         (translate): Improve buffer allocation. Change to append
563         symbols to existing out buffer.
564         (get_section): Remove.
565         (process_symtab): Add.
566         (free_2): Free symtab->aux.
567         (write_resolution): Handle aux instead of slots.
568         Print sub id to resolution file.
569         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
570         calls with call to process_symtab.
572 2010-07-22  Richard Guenther  <rguenther@suse.de>
574         * Makefile.am: New copy_lto_plugin rule to install the plugin
575         into ../gcc.
576         * Makefile.in: Regenerated.
578 2010-05-21  Richard Guenther  <rguenther@suse.de>
580         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
582 2010-05-07  Richard Guenther <rguenther@suse.de>
584         * lto-plugin.c (free_2): Do not free resolution_file.
585         (write_resolution): Check that we were passed a resolution file.
586         (all_symbols_read_handler): Adjust.
587         (cleanup_handler): Do not remove the resolution file.
588         (process_option): Handle -fresolution=.
590 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
592         PR other/43620
593         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
594         * Makefile.in: Regenerate.
596 2010-04-23  Richard Guenther  <rguenther@suse.de>
598         PR lto/41550
599         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
600         (translate): Likewise.
601         (all_symbols_read_handler): Likewise.
602         (claim_file_handler): Likewise.
603         (process_option): Likewise.
604         (add_output_files): Likewise.  Remove filename length limit.
606 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
608         * Makefile.in: Regenerate.
609         * aclocal.m4: Regenerate.
611 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
613         PR lto/43336
614         * lto-plugin.c (cleanup_handler): Delete temporary output files.
616 2010-01-11  Richard Guenther  <rguenther@suse.de>
618         PR lto/41569
619         * Makefile.am: Disable dependencies.
620         * Makefile.in: Regenerated.
622 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
624         PR lto/42520
625         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
626         if -v is passed.
628 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
630         PR bootstrap/42306
631         * configure: Regenerated.
632         * Makefile.in: Likewise.
634 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
636         PR bootstrap/42096
637         * lto-plugin.c (claim_file_handler): Print offsets in hex.
639 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
641         * lto-plugin.c (write_resolution): Assume resolution_file is set.
642         Print the symbol name.
643         (all_symbols_read_handler): Create a resolution file.
644         Pass it to gcc.
645         (cleanup_handler): Remove the resolution file.
646         (process_option): Drop the -resolution option.
648 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
650         * lto-plugin.c (temp_obj_dir_name): Remove.
651         (arguments_file_name): New.
652         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
653         (exec_lto_wrapper):  Create arguments file with make_temp_file.
654         (cleanup_handler): Don't remove the temporary directory. Remove the
655         arguments file.
656         (onload): Don't create the temporary directory.
658 2009-11-04  Richard Guenther  <rguenther@suse.de>
659             Rafael Avila de Espindola  <espindola@google.com>
661         * lto-plugin.c (plugin_file_info): Remove temp field.
662         (cleanup_handler): Don't delete temporary objects.
663         (claim_file_handler): Don't create temporary objects.
665 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
667         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
669 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
671         PR41871
672         * lto-plugin.c (claim_file_handler): Close files that we created.
674 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
676         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
677         LDPL_ERROR
679 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
681         PR lto/41652
682         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
683         * configure: Regenerate.
685 2009-10-26  Richard Guenther  <rguenther@suse.de>
687         * configure.ac: Use AM_MAINTAINER_MODE.
688         * acinclude.m4: Remove.
689         * configure: Re-generate.
690         * Makefile.in: Likewise.
691         * aclocal.m4: Likewise.
693 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
694     
695         PR40790
696         * configure: Regenerate.
697         * configure.ac: Add AC_TYPE_UINT64_T.
699 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
701         * lto-plugin.c (message): New variable.
702         (check): New function.
703         (parse_table_entry, translate, write_resolution,add_output_files,
704         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
705         assert.
706         (cleanup_handler): Use check instead of assert. Remove the arguments
707         file if it exists.
709 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
711         * lto-plugin.c (resolution_file): New.
712         (free_1): Update comment.
713         (free_2): Free resolution_file.
714         (write_resolution): Write resolution to specified file. Use the
715         syms array from the symbol table.
716         (all_symbols_read_handler): Delay call to free_1 past call to
717         write_resolution.
718         (process_option): Add a -resolution option.
720 2009-10-13  Richard Guenther  <rguenther@suse.de>
722         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
723         correct libiberty.
724         * Makefile.in: Regenerated.
726 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
728         * lto-plugin.c (add_input_library): New.
729         (all_symbols_read_handler): Use add_input_library for items that
730         start with -l.
731         (process_option): Fit in 80 columns.
732         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
734 2009-10-02  Diego Novillo  <dnovillo@google.com>
736         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
737         and -D_FILE_OFFSET_BITS=64.
738         * configure.ac: Add AC_SYS_LARGEFILE.
739         * configure: Regenerate.
740         * Makefile.in: Regenerate.
741         * lto-plugin.c: Fix copyright boilerplate.
743 2009-10-02  Diego Novillo  <dnovillo@google.com>
745         * Makefile.am (ACLOCAL_AMFLAGS): Define.
746         * aclocal.m4: Regenerate with aclocal-2.64
747         * acinclude.m4: Remove.
748         * Makefile.in: Regenerate with automake-1.11
749         * configure.ac (AC_PREREQ): Update to 2.64.
750         * configure: Regenerate.
752 2009-10-02  Diego Novillo  <dnovillo@google.com>
754         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
755         and -D_FILE_OFFSET_BITS=64.
756         * configure.ac: Add AC_SYS_LARGEFILE.
757         * configure: Regenerate.
758         * Makefile.in: Regenerate.
759         * lto-plugin.c: Fix copyright boilerplate.
761 2009-10-02  Diego Novillo  <dnovillo@google.com>
763         * Makefile.am (ACLOCAL_AMFLAGS): Define.
764         * aclocal.m4: Regenerate with aclocal-2.64
765         * acinclude.m4: Remove.
766         * Makefile.in: Regenerate with automake-1.11
767         * configure.ac (AC_PREREQ): Update to 2.64.
768         * configure: Regenerate.
770 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
772         * Makefile.am (liblto_plugin_la_SOURCES): Remove
773         $(top_srcdir)/../gcc/lto/common.c
774         * Makefile.in: Regenerate.
776 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
778         * lto-plugin.c (pass_through_items): New.
779         (num_pass_through_items): New.
780         (all_symbols_read_handler): Update to use the -pass-through option.
781         (process_option): Replace -libgcc with -pass-through.
782         
783 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
785         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
786         register_cleanup to be set.
788 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
790         * Makefile.am: Remove all reference to ltosymtab.
791         * Makefile.in: Regenerate.
792         * lto-symtab.c: Remove.
794 2009-05-21  Diego Novillo  <dnovillo@google.com>
796         * configure.ac: Remove call to AC_CHECK_GELF.
797         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
798         * acinclude.m4: Do not include ../config/libelf.m4
799         * Makefile.am (LIBELFLIBS): Define.
800         (LIBELFINC): Define.
801         (AM_CPPFLAGS): Add $(LIBELFINC).
802         (ltosymtab_LDADD): Add $(LIBELFLIBS).
803         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
804         * lto-plugin.c: Always include <gelf.h>
805         * lto-symtab.c: Likewise.
806         * configure: Regenerate.
807         * Makefile.in: Regenerate.
809 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
811         * lto-plugin.c (libgcc_filename): New.
812         (all_symbols_read_handler): Pass libgcc to the linker.
813         (all_symbols_read_handler): Parse -libgcc
815 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
817         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
818         * Makefile.in: Regenerate.
819         * lto-plugin.c (add_output_files): Argument is now a FILE.
820         (exec_lto_wrapper): Use writeargv and pex.
822 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
824         Revert:
825         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
826         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
829 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
831         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
833 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
835         * lto-plugin.c: Include libiberty.h.
836         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
837         snprintf.
839 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
841         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
842         file to lto-wrapper.
844 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
846         * lto-plugin.c (plugin_file_info): Remove fd and elf.
847         (parse_table_entry): strdup entry->name and entry->comdat_key.
848         (free_1): Free name and comdat_key. Don't close the file. Don't call
849         elf_end.
850         (claim_file_handler): Always call elf_end.
852 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
854         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
855         -D_FILE_OFFSET_BITS=64
856         * Makefile.in: Regenerate
858 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
860         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
861         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
862         * Makefile.in: Regenerate.
863         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
864         * configure: Regenerate.
865         * configure.ac: Add AC_SUBST(target_noncanonical).
867 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
869         * lto-plugin.c: Include stdbool.h.
870         (debug, nop): Declare as bool.
872 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
874         * lto-plugin.c (nop): New.
875         (use_original_files): New.
876         (all_symbols_read_handler): Call use_original_files if nop is true.
877         (process_option): Parse the -nop option.
879 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
881         * lto-plugin.c (debug): New.
882         (exec_lto_wrapper): Print argv if debug is true.
883         (process_option): Process the -debug command line option.
885 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
887         * lto-plugin.c (process_option): The argument is now a single option,
888         not a space separated list.
890 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
892         * lto-plugin.c: Include sys/types.h and sys/wait.h
893         (output_files, num_output_files, lto_wrapper_argv,
894         lto_wrapper_num_args): New.
895         (free_2): Free output_files.
896         (write_resolution): Disable.
897         (add_output_files): New.
898         (exec_lto_wrapper): New.
899         (all_symbols_read_handler): Run lto-wrapper.
900         (claim_file_handler): Free lto_file.name and call elf_end.
901         (process_option): New.
903 2008-11-26  Rafael Espindola  <espindola@google.com>
905         * lto-plugin.c (add_input_file): New.
906         (get_section): Return NULL if get_section fails.
907         (write_resolution): New.
908         (all_symbols_read_handler): Call add_input_file.
909         (claim_file_handler): Unlink the correct file.
910         (onload): Record add_input_file.
912 2008-09-23 Rafael Espindola  <espindola@google.com>
914         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
915         Update the location of common.c.
916         * Makefile.in: Regenerate.
917         * common.c: Moved to gcc/lto.
918         * common.h: Moved to gcc/lto.
919         * lto-plugin.c: Update the location of common.h.
920         * lto-symtab.c: Update the location of common.h.
922 2008-09-23 Rafael Espindola  <espindola@google.com>
924         * common.c: Include common.h.
925         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
926         sizes.
927         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
928         explicit sizes.
930 2008-09-23 Rafael Espindola  <espindola@google.com>
932         * lto-plugin.c (plugin_file_info): Add temp.
933         (cleanup_handler): Only delete temporary files.
934         (claim_file_handler): Initialize lto_file.temp.
936 2008-09-23  Rafael Espindola  <espindola@google.com>
938         * plugin-api.h: Moved to include.
940 2008-09-23 Rafael Espindola  <espindola@google.com>
942         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
943         format.
945 2008-09-22 Rafael Espindola  <espindola@google.com>
947         * plugin-api.h: Copy from binutils' cvs.
949 2008-09-22 Rafael Espindola  <espindola@google.com>
951         * lto-symtab.c (get_symbols, add_symbols): Update signature.
952         * plugin-api.h: Copy from binutils' cvs.
954 2008-09-22 Rafael Espindola  <espindola@google.com>
956         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
957         Make extern
959 2008-09-10 Rafael Espindola  <espindola@google.com>
961         * lto-plugin.c (onload): add missing break statements and asserts.
962         * lto-symtab.c (claim_file_handler): Make it static.
963         (all_symbols_read_handler): Make it static.
964         (all_file_handles): Make it static.
965         (num_file_handles): Make it static.
966         (register_claim_file): Make it static.
967         (register_object): Indent properly.
969 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
971         * Makefile.am (ltosymtab_LDADD): Add -lelf.
972         * Makefiel.in: Regenerate.
973         * lto-plugin.c: Include ar.h.
974         (claim_file_handler): Handle file->offset != 0.
975         * lto-symtab.c: Include gelf.h.
976         (all_file_handles): Change type.
977         (register_object): New.
978         (register_file): Add support for archives.
979         (resolve): Update to new type of all_file_handles.
980         (print): Update to new type of all_file_handles.
981         (free_all): Update to new type of all_file_handles.
982         (main): Update to new type of all_file_handles.
984 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
986         * lto-plugin.c (get_string_table): Remove.
987         (get_section): Use elf_strptr instead of get_string_table.
989 2008-09-08  Doug Kwan  <dougkwan@google.com>
991         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
992         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
994 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
996         * Makefile.am (ltosymtab_SOURCES): add common.c.
997         (ltosymtab_CFLAGS): New.
998         (liblto_plugin_la_SOURCES): Add common.c.
999         * Makefile.in: Regenerate.
1000         * common.c: New.
1001         * common.h: New.
1002         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1003         (plugin_symtab): New.
1004         (plugin_file_info): New.
1005         (register_all_symbols_read): New.
1006         (get_symbols): New.
1007         (claimed_files): New.
1008         (num_claimed_files): New.
1009         (translate): Don't drop the slot number.
1010         (free_1): New.
1011         (free_2): New.
1012         (all_symbols_read_handler): New.
1013         (claim_file_handler): Record every claimed file.
1014         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1015         LDPT_GET_SYMBOLS.
1016         * lto-symtab.c: Include stdlib.h, string.h and common.h.
1017         (current_file_handle): Remove.
1018         (ld_plugin_all_symbols_read_handler): New.
1019         (plugin_handle): New.
1020         (file_handle): New.
1021         (all_file_handles): New.
1022         (num_file_handles): New.
1023         (get_symbols): New.
1024         (register_all_symbols_read): New.
1025         (add_symbols): Don't print the symbols, just record them.
1026         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1027         LDPT_GET_SYMBOLS.
1028         (load_plugin): Use plugin_handle.
1029         (register_file): Add the file handle to all_file_handles.
1030         (resolve): New.
1031         (print): New.
1032         (unload_plugin): New.
1033         (free_all): New.
1034         (main): Call all_symbols_read_handler and free resources.
1036 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
1038         * Makefile.am (AM_CFLAGS): New.
1039         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1040         (lib_LTLIBRARIES): New.
1041         (liblto_plugin_la_SOURCES): New.
1042         (liblto_plugin_la_LIBADD): New.
1043         * Makefile.in: Regenerate.
1044         * acinclude.m4: Don't include ../config/acx.m4 and
1045         ../config/no-executables.m4.
1046         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1047         ../libtool.m4.
1048         * aclocal.m4: Regenerate.
1049         * configure: Regenerate.
1050         * configure.ac: Use AM_PROG_LIBTOOL.
1051         * lto-plugin.c: New.
1052         * lto-symtab.c: Rewrite to use the plugin.
1053         * plugin-api.h: New.
1055 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
1057         * configure: Regenerate.
1058         * configure.ac: Use AC_CHECK_GELF.
1059         * lto-symtab.c: Include gelf.h.
1060         (get_string_table): Use size independent API.
1061         (printTable): Use lld to print 64 bit integers.
1063 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
1065         * lto-symtab.c (parse_table_entry): Assert entry->kind and
1066         entry->visibility are valid.
1068 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
1069         * lto-symtab.c (table_entry): Add comdat.
1070         (parse_table_entry): Read comdat.
1072 2008-08-21  Rafael Espindola  <espindola@google.com>
1074         * Makefile.am: New.
1075         * Makefile.in: New.
1076         * acinclude.m4: New.
1077         * aclocal.m4: New.
1078         * configure: New.
1079         * configure.ac: New.
1080         * lto-symtab.c: New.