Fix Solaris bootstrap with GNU ld/LTO
[official-gcc.git] / lto-plugin / ChangeLog
blob73688cd1cfcc261d3544f6a0931a97e7bee60ff0
1 2014-03-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3         * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
4         for gcc.
5         * configure: Regenerate.
6         * Makefile.am (AM_LDFLAGS): New variable.
7         (liblto_plugin_la_LDFLAGS): Add it.
8         * Makefile.in: Regenerate.
10 2013-09-20  Alan Modra  <amodra@gmail.com>
12         * configure: Regenerate.
14 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
16         * configure: Regenerated.
18 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
20         * lto-plugin.c: Fix typo.
22 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
24         * configure: Regenerated.
26 2012-02-22  Kai Tietz  <ktietz@redhat.com>
28         PR lto/50616
29         * lto-plugin.c (PRI_LL): New macro.
30         (dump_symtab): Use PRI_LL instead of ll in print.
31         (process_symtab): Use PRI_LL instead of ll in scan.
33 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
35         * configure: Regenerate.
37 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
39         * configure: Regenerate.
41 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
43         * configure: Regenerate.
45 2011-10-02  Jan Hubicka  <jh@suse.cz>
47         PR lto/47247
48         * lto-plugin.c (get_symbols_v2): New variable.
49         (write_resolution): Use V2 API when available.
50         (onload): Handle LDPT_GET_SYMBOLS_V2.
52 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
53             Andi Kleen  <ak@linux.intel.com>
55         PR lto/50568
56         * lto-plugin.c (sym_aux): Change id to unsigned long long.
57         (plugin_symtab): Likewise.
58         (dump_symtab): Likewise.
59         (resolve_conflicts): Likewise.
60         (process_symtab): Likewise.
62 2011-08-10  Richard Guenther  <rguenther@suse.de>
64         PR bootstrap/49907
65         lto-plugin/
66         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
67         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
68         * configure: Regenerate.
69         * Makefile.in: Likewise.
70         * aclocal.m4: Likewise.
72 2011-04-20  Jim Meyering  <meyering@redhat.com>
74         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
76 2011-04-05  Richard Guenther  <rguenther@suse.de>
78         PR bootstrap/48431
79         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
81 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
83         * Makefile.in: Regenerate.
84         * aclocal.m4: Regenerate.
85         * configure: Regenerate.
87 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
89         * Makefile.am (all-local): Rename from 'all'.
90         * Makefile.in: Regenerate.
92 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
94         PR lto/47225
95         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
96         (liblto_plugin_la_LDFLAGS): Add -module.
97         (copy_lto_plugin): Renamed to...
98         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
99         of static modules.
100         * Makefile.in: Rebuild.
102 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
104         PR lto/47225
105         * Makefile.am (Wc): New helper for encoding -Wc,.
106         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
107         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
108         * Makefile.in: Regenerated.
110 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
112         Revert:
114         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
116         PR lto/47225
117         * Makefile.am (Wl): New helper for encoding -Wl,.
118         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
119         * Makefile.in: Regenerated.
121 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
123         PR lto/47225
124         * Makefile.am (Wl): New helper for encoding -Wl,.
125         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
126         * Makefile.in: Regenerated.
128 2011-01-25  Ian Lance Taylor  <iant@google.com>
130         * lto-plugin.c (gold_version): New static variable.
131         (all_symbols_read_handler): Don't check pass_through_items if
132         using gold 1.11 or later.
133         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
135 2011-01-12  Richard Guenther  <rguenther@suse.de>
137         PR lto/47264
138         * lto-plugin.c (parse_table_entry): Use memcpy to access
139         unaligned fields.
141 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
143         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
144         * Makefile.in: Regenerate.
146 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
148         Revert last change.
150 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
152         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
153         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
154         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
155         * Makefile.in: Regenerate.
157 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
159         PR middle-end/46674
160         PR lto/43157
161         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
162         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
163         * configure: Regenerate.
164         * config.h.in: Likewise.
166 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
168         PR target/40125
169         PR lto/46695
170         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
171         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
172         override -bindir setting.
173         * aclocal.m4: Regenerate.
174         * configure: Regenerate.
175         * Makefile.in: Regenerate.
177 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
179         * config.h.in: Regenerated.
180         * configure: Regenerated.
181         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
182         * lto-plugin.c (WIFEXITED): Define default.
183         (WEXITSTATUS): Likeiwse.
185 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
187         * config.h.in: Regenerated.
188         * configure: Regenerated.
189         * Makefile.in: Regenerated.
190         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
191         * lto-plugin.c:  Include sys/wait.h conditionally.
192         * aclocal.m4: Regenerated.
194 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
196         * lto-plugin.c (add_output_files): Fix memory leak.
198 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
200         PR bootstrap/46397
201         PR bootstrap/46362
202         * configure.ac: Add AC_TYPE_INT64_T test.
203         * config.h.in: Regenerate.
204         * configure: Likewise.
205         * lto-plugin.c (debug): Use char not bool.
206         (nop): Likewise.
207         (check_1): Rename from check, and use int not bool for gate argument.
208         (check): Macro wrapper for the above to coerce gate argument into
209         boolean-valued integer in case it has pointer type.
210         (parse_table_entry): Use 0 not false.
211         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
212         into two 32-bit parts and printing as hex ints.
214 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
216         PR lto/46291
217         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
219 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
221         PR lto/46273
222         * lto-plugin.h: Delete.
223         * lto-plugin-elf.c: Likewise.
224         * lto-plugin-coff.c: Likewise.
225         * configure.ac: Don't use libelf, don't source config.gcc.
226         (LIBELFLIBS): Delete.
227         (LIBELFINC): Delete.
228         (LTO_FORMAT): Delete.
229         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
230         (config.h): Add AC_CONFIG_HEADERS directive.
231         * Makefile.am (LIBELFLIBS): Delete.
232         (LIBELFINC): Delete.
233         (LTO_FORMAT): Delete.
234         (DEFS): Import.
235         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
236         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
237         any object-format-specific source file in the link.
238         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
239         * config.h.in: Generate.
240         * configure: Regenerate.
241         * Makefile.in: Likewise.
242         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
243         (LTO_SEGMENT_NAME): New definition.
244         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
245         (LTO_SECTION_PREFIX_LEN): New definition.
246         (struct sym_aux): Struct definition moved here from lto-plugin.h.
247         (struct plugin_symtab): Likewise.
248         (struct plugin_objfile): Likewise.
249         (struct plugin_objfile): New struct def.
250         (enum symbol_style): New enum type.
251         (add_symbols): Make static.
252         (claimed_files): Likewise.
253         (num_claimed_files): Likewise.
254         (sym_style): New global.
255         (check): Make static.
256         (parse_table_entry): Likewise.  Respect sym_style when extracting
257         symbol from symtab entry.
258         (translate): Make static.
259         (resolve_conflicts): Likewise.
260         (process_symtab): New function, per-section callback version of
261         old object-format-specific handling from deleted lto-plugin-elf.c.
262         (claim_file_handler): Convert ELF-specific version from deleted
263         lto-plugin-elf.c to simple_object interface and move here.
264         (process_options): Allow new '-sym-style=' option.
265         (onload): Don't call deleted onload_format_checks hook.
267 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
269         * lto-plugin.c (dump_symtab): Correct printf argument type.
270         (finish_conflict_resolution): Initialize resolution.
272 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
274         PR bootstrap/45951
275         * configure.ac: Add AC_CANONICAL_SYSTEM.
276         * configure: Regenerated.
278 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
280         * configure.ac: Source config.gcc to determine lto_binary_reader.
281         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
282         * Makefile.am (LTO_FORMAT): Import.
283         (liblto_plugin_la_SOURCES): Add object format dependent module
284         defined by LTO_FORMAT.
285         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
286         and work around libtool warning.
287         * configure: Regenerate.
288         * Makefile.in: Likewise.
289         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
290         (struct sym_aux): Likewise.
291         (struct plugin_symtab): Likewise.
292         (struct plugin_file_info): Likewise.
293         (LTO_SECTION_PREFIX): Likewise.
294         (add_symbols):  Make non-static.
295         (claimed_files): Likewise.
296         (num_claimed_files): Likewise.
297         (check): Likewise.
298         (parse_table_entry): Likewise.
299         (translate): Likewise.
300         (resolve_conflicts): Likewise.
301         (process_symtab): Move to new lto-plugin-elf.c object format dependent
302         source file.
303         (claim_file_handler): Likewise, and make non-static.
304         (onload): Call new onload_format_checks function.
305         * lto-plugin.h: New file.
306         (LTO_SECTION_PREFIX): Move here.
307         (struct sym_aux): Likewise.
308         (struct plugin_symtab): Likewise.
309         (struct plugin_file_info): Likewise.
310         (claim_file_handler): Add new function prototype.
311         (onload_format_checks): Likewise.
312         (check): Declare extern.
313         (translate): Likewise.
314         (parse_table_entry): Likewise.
315         (resolve_conflicts): Likewise.
316         (add_symbols):  Likewise.
317         (claimed_files): Likewise.
318         (num_claimed_files): Likewise.
319         * lto-plugin-elf.c (process_symtab): Move here.
320         (claim_file_handler): Likewise, and make non-static.
321         (onload_format_checks): New function factored out from onload.
322         * lto-plugin-coff.c (claim_file_handler): New function stub.
323         (onload_format_checks): Likewise.
325 2010-08-05  Andi Kleen  <ak@linux.intel.com>
327         * lto-plugin.c: Include <hashtab.h>
328         (sym_aux): Add next_conflict field to save conflict chains.
329         (plugin_file_info): Add conflicts symtab.
330         (parse_table_entry): Initialize aux->next_conflict.
331         (process_symtab): Increment found.
332         (dump_symtab): Add.
333         (finish_conflict_resolution): Add.
334         (free_symtab): Add.
335         (write_resolution): Remove symbols loop and move into
336         dump_symtab. Call dump_symtab for main symbol and conflicts table.
337         Call free_symtab to free conflicts table.
338         (SWAP): Add.
339         (eq_sym): Add.
340         (hash_sym): Add.
341         (symbol_strength): Add.
342         (resolve_conflicts): Add.
343         (claim_file_handler): Add n variable. Check return value of
344         process_symtab. Call resolve_conflicts.
346 2010-07-27  Andi Kleen  <ak@linux.intel.com>
348         * lto-plugin.c (translate): Remove debug fprintf.
350 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
352         PR bootstrap/45042
353         * lto-plugin.c (translate): Cast to unsigned long.
355 2010-07-23   Andi Kleen  <ak@linux.intel.com>
357         PR lto/44992
358         * lto-plugin.c (sym_aux): Add.
359         (plugin_symtab): Remove slots. Add aux and id.
360         (parse_table_entry): Change to use aux instead of slots.
361         (LTO_SECTION_PREFIX): Add.
362         (translate): Improve buffer allocation. Change to append
363         symbols to existing out buffer.
364         (get_section): Remove.
365         (process_symtab): Add.
366         (free_2): Free symtab->aux.
367         (write_resolution): Handle aux instead of slots.
368         Print sub id to resolution file.
369         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
370         calls with call to process_symtab.
372 2010-07-22  Richard Guenther  <rguenther@suse.de>
374         * Makefile.am: New copy_lto_plugin rule to install the plugin
375         into ../gcc.
376         * Makefile.in: Regenerated.
378 2010-05-21  Richard Guenther  <rguenther@suse.de>
380         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
382 2010-05-07  Richard Guenther <rguenther@suse.de>
384         * lto-plugin.c (free_2): Do not free resolution_file.
385         (write_resolution): Check that we were passed a resolution file.
386         (all_symbols_read_handler): Adjust.
387         (cleanup_handler): Do not remove the resolution file.
388         (process_option): Handle -fresolution=.
390 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
392         PR other/43620
393         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
394         * Makefile.in: Regenerate.
396 2010-04-23  Richard Guenther  <rguenther@suse.de>
398         PR lto/41550
399         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
400         (translate): Likewise.
401         (all_symbols_read_handler): Likewise.
402         (claim_file_handler): Likewise.
403         (process_option): Likewise.
404         (add_output_files): Likewise.  Remove filename length limit.
406 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
408         * Makefile.in: Regenerate.
409         * aclocal.m4: Regenerate.
411 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
413         PR lto/43336
414         * lto-plugin.c (cleanup_handler): Delete temporary output files.
416 2010-01-11  Richard Guenther  <rguenther@suse.de>
418         PR lto/41569
419         * Makefile.am: Disable dependencies.
420         * Makefile.in: Regenerated.
422 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
424         PR lto/42520
425         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
426         if -v is passed.
428 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
430         PR bootstrap/42306
431         * configure: Regenerated.
432         * Makefile.in: Likewise.
434 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
436         PR bootstrap/42096
437         * lto-plugin.c (claim_file_handler): Print offsets in hex.
439 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
441         * lto-plugin.c (write_resolution): Assume resolution_file is set.
442         Print the symbol name.
443         (all_symbols_read_handler): Create a resolution file.
444         Pass it to gcc.
445         (cleanup_handler): Remove the resolution file.
446         (process_option): Drop the -resolution option.
448 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
450         * lto-plugin.c (temp_obj_dir_name): Remove.
451         (arguments_file_name): New.
452         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
453         (exec_lto_wrapper):  Create arguments file with make_temp_file.
454         (cleanup_handler): Don't remove the temporary directory. Remove the
455         arguments file.
456         (onload): Don't create the temporary directory.
458 2009-11-04  Richard Guenther  <rguenther@suse.de>
459             Rafael Avila de Espindola  <espindola@google.com>
461         * lto-plugin.c (plugin_file_info): Remove temp field.
462         (cleanup_handler): Don't delete temporary objects.
463         (claim_file_handler): Don't create temporary objects.
465 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
467         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
469 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
471         PR41871
472         * lto-plugin.c (claim_file_handler): Close files that we created.
474 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
476         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
477         LDPL_ERROR
479 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
481         PR lto/41652
482         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
483         * configure: Regenerate.
485 2009-10-26  Richard Guenther  <rguenther@suse.de>
487         * configure.ac: Use AM_MAINTAINER_MODE.
488         * acinclude.m4: Remove.
489         * configure: Re-generate.
490         * Makefile.in: Likewise.
491         * aclocal.m4: Likewise.
493 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
494     
495         PR40790
496         * configure: Regenerate.
497         * configure.ac: Add AC_TYPE_UINT64_T.
499 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
501         * lto-plugin.c (message): New variable.
502         (check): New function.
503         (parse_table_entry, translate, write_resolution,add_output_files,
504         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
505         assert.
506         (cleanup_handler): Use check instead of assert. Remove the arguments
507         file if it exists.
509 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
511         * lto-plugin.c (resolution_file): New.
512         (free_1): Update comment.
513         (free_2): Free resolution_file.
514         (write_resolution): Write resolution to specified file. Use the
515         syms array from the symbol table.
516         (all_symbols_read_handler): Delay call to free_1 past call to
517         write_resolution.
518         (process_option): Add a -resolution option.
520 2009-10-13  Richard Guenther  <rguenther@suse.de>
522         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
523         correct libiberty.
524         * Makefile.in: Regenerated.
526 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
528         * lto-plugin.c (add_input_library): New.
529         (all_symbols_read_handler): Use add_input_library for items that
530         start with -l.
531         (process_option): Fit in 80 columns.
532         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
534 2009-10-02  Diego Novillo  <dnovillo@google.com>
536         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
537         and -D_FILE_OFFSET_BITS=64.
538         * configure.ac: Add AC_SYS_LARGEFILE.
539         * configure: Regenerate.
540         * Makefile.in: Regenerate.
541         * lto-plugin.c: Fix copyright boilerplate.
543 2009-10-02  Diego Novillo  <dnovillo@google.com>
545         * Makefile.am (ACLOCAL_AMFLAGS): Define.
546         * aclocal.m4: Regenerate with aclocal-2.64
547         * acinclude.m4: Remove.
548         * Makefile.in: Regenerate with automake-1.11
549         * configure.ac (AC_PREREQ): Update to 2.64.
550         * configure: Regenerate.
552 2009-10-02  Diego Novillo  <dnovillo@google.com>
554         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
555         and -D_FILE_OFFSET_BITS=64.
556         * configure.ac: Add AC_SYS_LARGEFILE.
557         * configure: Regenerate.
558         * Makefile.in: Regenerate.
559         * lto-plugin.c: Fix copyright boilerplate.
561 2009-10-02  Diego Novillo  <dnovillo@google.com>
563         * Makefile.am (ACLOCAL_AMFLAGS): Define.
564         * aclocal.m4: Regenerate with aclocal-2.64
565         * acinclude.m4: Remove.
566         * Makefile.in: Regenerate with automake-1.11
567         * configure.ac (AC_PREREQ): Update to 2.64.
568         * configure: Regenerate.
570 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
572         * Makefile.am (liblto_plugin_la_SOURCES): Remove
573         $(top_srcdir)/../gcc/lto/common.c
574         * Makefile.in: Regenerate.
576 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
578         * lto-plugin.c (pass_through_items): New.
579         (num_pass_through_items): New.
580         (all_symbols_read_handler): Update to use the -pass-through option.
581         (process_option): Replace -libgcc with -pass-through.
582         
583 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
585         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
586         register_cleanup to be set.
588 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
590         * Makefile.am: Remove all reference to ltosymtab.
591         * Makefile.in: Regenerate.
592         * lto-symtab.c: Remove.
594 2009-05-21  Diego Novillo  <dnovillo@google.com>
596         * configure.ac: Remove call to AC_CHECK_GELF.
597         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
598         * acinclude.m4: Do not include ../config/libelf.m4
599         * Makefile.am (LIBELFLIBS): Define.
600         (LIBELFINC): Define.
601         (AM_CPPFLAGS): Add $(LIBELFINC).
602         (ltosymtab_LDADD): Add $(LIBELFLIBS).
603         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
604         * lto-plugin.c: Always include <gelf.h>
605         * lto-symtab.c: Likewise.
606         * configure: Regenerate.
607         * Makefile.in: Regenerate.
609 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
611         * lto-plugin.c (libgcc_filename): New.
612         (all_symbols_read_handler): Pass libgcc to the linker.
613         (all_symbols_read_handler): Parse -libgcc
615 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
617         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
618         * Makefile.in: Regenerate.
619         * lto-plugin.c (add_output_files): Argument is now a FILE.
620         (exec_lto_wrapper): Use writeargv and pex.
622 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
624         Revert:
625         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
626         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
629 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
631         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
633 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
635         * lto-plugin.c: Include libiberty.h.
636         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
637         snprintf.
639 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
641         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
642         file to lto-wrapper.
644 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
646         * lto-plugin.c (plugin_file_info): Remove fd and elf.
647         (parse_table_entry): strdup entry->name and entry->comdat_key.
648         (free_1): Free name and comdat_key. Don't close the file. Don't call
649         elf_end.
650         (claim_file_handler): Always call elf_end.
652 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
654         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
655         -D_FILE_OFFSET_BITS=64
656         * Makefile.in: Regenerate
658 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
660         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
661         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
662         * Makefile.in: Regenerate.
663         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
664         * configure: Regenerate.
665         * configure.ac: Add AC_SUBST(target_noncanonical).
667 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
669         * lto-plugin.c: Include stdbool.h.
670         (debug, nop): Declare as bool.
672 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
674         * lto-plugin.c (nop): New.
675         (use_original_files): New.
676         (all_symbols_read_handler): Call use_original_files if nop is true.
677         (process_option): Parse the -nop option.
679 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
681         * lto-plugin.c (debug): New.
682         (exec_lto_wrapper): Print argv if debug is true.
683         (process_option): Process the -debug command line option.
685 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
687         * lto-plugin.c (process_option): The argument is now a single option,
688         not a space separated list.
690 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
692         * lto-plugin.c: Include sys/types.h and sys/wait.h
693         (output_files, num_output_files, lto_wrapper_argv,
694         lto_wrapper_num_args): New.
695         (free_2): Free output_files.
696         (write_resolution): Disable.
697         (add_output_files): New.
698         (exec_lto_wrapper): New.
699         (all_symbols_read_handler): Run lto-wrapper.
700         (claim_file_handler): Free lto_file.name and call elf_end.
701         (process_option): New.
703 2008-11-26  Rafael Espindola  <espindola@google.com>
705         * lto-plugin.c (add_input_file): New.
706         (get_section): Return NULL if get_section fails.
707         (write_resolution): New.
708         (all_symbols_read_handler): Call add_input_file.
709         (claim_file_handler): Unlink the correct file.
710         (onload): Record add_input_file.
712 2008-09-23 Rafael Espindola  <espindola@google.com>
714         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
715         Update the location of common.c.
716         * Makefile.in: Regenerate.
717         * common.c: Moved to gcc/lto.
718         * common.h: Moved to gcc/lto.
719         * lto-plugin.c: Update the location of common.h.
720         * lto-symtab.c: Update the location of common.h.
722 2008-09-23 Rafael Espindola  <espindola@google.com>
724         * common.c: Include common.h.
725         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
726         sizes.
727         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
728         explicit sizes.
730 2008-09-23 Rafael Espindola  <espindola@google.com>
732         * lto-plugin.c (plugin_file_info): Add temp.
733         (cleanup_handler): Only delete temporary files.
734         (claim_file_handler): Initialize lto_file.temp.
736 2008-09-23  Rafael Espindola  <espindola@google.com>
738         * plugin-api.h: Moved to include.
740 2008-09-23 Rafael Espindola  <espindola@google.com>
742         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
743         format.
745 2008-09-22 Rafael Espindola  <espindola@google.com>
747         * plugin-api.h: Copy from binutils' cvs.
749 2008-09-22 Rafael Espindola  <espindola@google.com>
751         * lto-symtab.c (get_symbols, add_symbols): Update signature.
752         * plugin-api.h: Copy from binutils' cvs.
754 2008-09-22 Rafael Espindola  <espindola@google.com>
756         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
757         Make extern
759 2008-09-10 Rafael Espindola  <espindola@google.com>
761         * lto-plugin.c (onload): add missing break statements and asserts.
762         * lto-symtab.c (claim_file_handler): Make it static.
763         (all_symbols_read_handler): Make it static.
764         (all_file_handles): Make it static.
765         (num_file_handles): Make it static.
766         (register_claim_file): Make it static.
767         (register_object): Indent properly.
769 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
771         * Makefile.am (ltosymtab_LDADD): Add -lelf.
772         * Makefiel.in: Regenerate.
773         * lto-plugin.c: Include ar.h.
774         (claim_file_handler): Handle file->offset != 0.
775         * lto-symtab.c: Include gelf.h.
776         (all_file_handles): Change type.
777         (register_object): New.
778         (register_file): Add support for archives.
779         (resolve): Update to new type of all_file_handles.
780         (print): Update to new type of all_file_handles.
781         (free_all): Update to new type of all_file_handles.
782         (main): Update to new type of all_file_handles.
784 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
786         * lto-plugin.c (get_string_table): Remove.
787         (get_section): Use elf_strptr instead of get_string_table.
789 2008-09-08  Doug Kwan  <dougkwan@google.com>
791         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
792         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
794 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
796         * Makefile.am (ltosymtab_SOURCES): add common.c.
797         (ltosymtab_CFLAGS): New.
798         (liblto_plugin_la_SOURCES): Add common.c.
799         * Makefile.in: Regenerate.
800         * common.c: New.
801         * common.h: New.
802         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
803         (plugin_symtab): New.
804         (plugin_file_info): New.
805         (register_all_symbols_read): New.
806         (get_symbols): New.
807         (claimed_files): New.
808         (num_claimed_files): New.
809         (translate): Don't drop the slot number.
810         (free_1): New.
811         (free_2): New.
812         (all_symbols_read_handler): New.
813         (claim_file_handler): Record every claimed file.
814         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
815         LDPT_GET_SYMBOLS.
816         * lto-symtab.c: Include stdlib.h, string.h and common.h.
817         (current_file_handle): Remove.
818         (ld_plugin_all_symbols_read_handler): New.
819         (plugin_handle): New.
820         (file_handle): New.
821         (all_file_handles): New.
822         (num_file_handles): New.
823         (get_symbols): New.
824         (register_all_symbols_read): New.
825         (add_symbols): Don't print the symbols, just record them.
826         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
827         LDPT_GET_SYMBOLS.
828         (load_plugin): Use plugin_handle.
829         (register_file): Add the file handle to all_file_handles.
830         (resolve): New.
831         (print): New.
832         (unload_plugin): New.
833         (free_all): New.
834         (main): Call all_symbols_read_handler and free resources.
836 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
838         * Makefile.am (AM_CFLAGS): New.
839         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
840         (lib_LTLIBRARIES): New.
841         (liblto_plugin_la_SOURCES): New.
842         (liblto_plugin_la_LIBADD): New.
843         * Makefile.in: Regenerate.
844         * acinclude.m4: Don't include ../config/acx.m4 and
845         ../config/no-executables.m4.
846         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
847         ../libtool.m4.
848         * aclocal.m4: Regenerate.
849         * configure: Regenerate.
850         * configure.ac: Use AM_PROG_LIBTOOL.
851         * lto-plugin.c: New.
852         * lto-symtab.c: Rewrite to use the plugin.
853         * plugin-api.h: New.
855 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
857         * configure: Regenerate.
858         * configure.ac: Use AC_CHECK_GELF.
859         * lto-symtab.c: Include gelf.h.
860         (get_string_table): Use size independent API.
861         (printTable): Use lld to print 64 bit integers.
863 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
865         * lto-symtab.c (parse_table_entry): Assert entry->kind and
866         entry->visibility are valid.
868 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
869         * lto-symtab.c (table_entry): Add comdat.
870         (parse_table_entry): Read comdat.
872 2008-08-21  Rafael Espindola  <espindola@google.com>
874         * Makefile.am: New.
875         * Makefile.in: New.
876         * acinclude.m4: New.
877         * aclocal.m4: New.
878         * configure: New.
879         * configure.ac: New.
880         * lto-symtab.c: New.