re PR bootstrap/51346 (LTO bootstrap failed with bootstrap-profiled)
[official-gcc.git] / lto-plugin / ChangeLog
blobaa98f64f5a3dddd7a0f4ca2f9f5f80913f0ca983
1 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
3         * configure: Regenerate.
5 2011-10-02  Jan Hubicka  <jh@suse.cz>
7         PR lto/47247
8         * lto-plugin.c (get_symbols_v2): New variable.
9         (write_resolution): Use V2 API when available.
10         (onload): Handle LDPT_GET_SYMBOLS_V2.
12 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
13             Andi Kleen  <ak@linux.intel.com>
15         PR lto/50568
16         * lto-plugin.c (sym_aux): Change id to unsigned long long.
17         (plugin_symtab): Likewise.
18         (dump_symtab): Likewise.
19         (resolve_conflicts): Likewise.
20         (process_symtab): Likewise.
22 2011-08-10  Richard Guenther  <rguenther@suse.de>
24         PR bootstrap/49907
25         lto-plugin/
26         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
27         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
28         * configure: Regenerate.
29         * Makefile.in: Likewise.
30         * aclocal.m4: Likewise.
32 2011-04-20  Jim Meyering  <meyering@redhat.com>
34         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
36 2011-04-05  Richard Guenther  <rguenther@suse.de>
38         PR bootstrap/48431
39         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
41 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
43         * Makefile.in: Regenerate.
44         * aclocal.m4: Regenerate.
45         * configure: Regenerate.
47 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
49         * Makefile.am (all-local): Rename from 'all'.
50         * Makefile.in: Regenerate.
52 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
54         PR lto/47225
55         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
56         (liblto_plugin_la_LDFLAGS): Add -module.
57         (copy_lto_plugin): Renamed to...
58         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
59         of static modules.
60         * Makefile.in: Rebuild.
62 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
64         PR lto/47225
65         * Makefile.am (Wc): New helper for encoding -Wc,.
66         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
67         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
68         * Makefile.in: Regenerated.
70 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
72         Revert:
74         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
76         PR lto/47225
77         * Makefile.am (Wl): New helper for encoding -Wl,.
78         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
79         * Makefile.in: Regenerated.
81 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
83         PR lto/47225
84         * Makefile.am (Wl): New helper for encoding -Wl,.
85         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
86         * Makefile.in: Regenerated.
88 2011-01-25  Ian Lance Taylor  <iant@google.com>
90         * lto-plugin.c (gold_version): New static variable.
91         (all_symbols_read_handler): Don't check pass_through_items if
92         using gold 1.11 or later.
93         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
95 2011-01-12  Richard Guenther  <rguenther@suse.de>
97         PR lto/47264
98         * lto-plugin.c (parse_table_entry): Use memcpy to access
99         unaligned fields.
101 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
103         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
104         * Makefile.in: Regenerate.
106 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
108         Revert last change.
110 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
112         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
113         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
114         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
115         * Makefile.in: Regenerate.
117 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
119         PR middle-end/46674
120         PR lto/43157
121         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
122         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
123         * configure: Regenerate.
124         * config.h.in: Likewise.
126 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
128         PR target/40125
129         PR lto/46695
130         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
131         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
132         override -bindir setting.
133         * aclocal.m4: Regenerate.
134         * configure: Regenerate.
135         * Makefile.in: Regenerate.
137 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
139         * config.h.in: Regenerated.
140         * configure: Regenerated.
141         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
142         * lto-plugin.c (WIFEXITED): Define default.
143         (WEXITSTATUS): Likeiwse.
145 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
147         * config.h.in: Regenerated.
148         * configure: Regenerated.
149         * Makefile.in: Regenerated.
150         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
151         * lto-plugin.c:  Include sys/wait.h conditionally.
152         * aclocal.m4: Regenerated.
154 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
156         * lto-plugin.c (add_output_files): Fix memory leak.
158 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
160         PR bootstrap/46397
161         PR bootstrap/46362
162         * configure.ac: Add AC_TYPE_INT64_T test.
163         * config.h.in: Regenerate.
164         * configure: Likewise.
165         * lto-plugin.c (debug): Use char not bool.
166         (nop): Likewise.
167         (check_1): Rename from check, and use int not bool for gate argument.
168         (check): Macro wrapper for the above to coerce gate argument into
169         boolean-valued integer in case it has pointer type.
170         (parse_table_entry): Use 0 not false.
171         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
172         into two 32-bit parts and printing as hex ints.
174 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
176         PR lto/46291
177         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
179 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
181         PR lto/46273
182         * lto-plugin.h: Delete.
183         * lto-plugin-elf.c: Likewise.
184         * lto-plugin-coff.c: Likewise.
185         * configure.ac: Don't use libelf, don't source config.gcc.
186         (LIBELFLIBS): Delete.
187         (LIBELFINC): Delete.
188         (LTO_FORMAT): Delete.
189         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
190         (config.h): Add AC_CONFIG_HEADERS directive.
191         * Makefile.am (LIBELFLIBS): Delete.
192         (LIBELFINC): Delete.
193         (LTO_FORMAT): Delete.
194         (DEFS): Import.
195         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
196         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
197         any object-format-specific source file in the link.
198         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
199         * config.h.in: Generate.
200         * configure: Regenerate.
201         * Makefile.in: Likewise.
202         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
203         (LTO_SEGMENT_NAME): New definition.
204         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
205         (LTO_SECTION_PREFIX_LEN): New definition.
206         (struct sym_aux): Struct definition moved here from lto-plugin.h.
207         (struct plugin_symtab): Likewise.
208         (struct plugin_objfile): Likewise.
209         (struct plugin_objfile): New struct def.
210         (enum symbol_style): New enum type.
211         (add_symbols): Make static.
212         (claimed_files): Likewise.
213         (num_claimed_files): Likewise.
214         (sym_style): New global.
215         (check): Make static.
216         (parse_table_entry): Likewise.  Respect sym_style when extracting
217         symbol from symtab entry.
218         (translate): Make static.
219         (resolve_conflicts): Likewise.
220         (process_symtab): New function, per-section callback version of
221         old object-format-specific handling from deleted lto-plugin-elf.c.
222         (claim_file_handler): Convert ELF-specific version from deleted
223         lto-plugin-elf.c to simple_object interface and move here.
224         (process_options): Allow new '-sym-style=' option.
225         (onload): Don't call deleted onload_format_checks hook.
227 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
229         * lto-plugin.c (dump_symtab): Correct printf argument type.
230         (finish_conflict_resolution): Initialize resolution.
232 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
234         PR bootstrap/45951
235         * configure.ac: Add AC_CANONICAL_SYSTEM.
236         * configure: Regenerated.
238 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
240         * configure.ac: Source config.gcc to determine lto_binary_reader.
241         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
242         * Makefile.am (LTO_FORMAT): Import.
243         (liblto_plugin_la_SOURCES): Add object format dependent module
244         defined by LTO_FORMAT.
245         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
246         and work around libtool warning.
247         * configure: Regenerate.
248         * Makefile.in: Likewise.
249         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
250         (struct sym_aux): Likewise.
251         (struct plugin_symtab): Likewise.
252         (struct plugin_file_info): Likewise.
253         (LTO_SECTION_PREFIX): Likewise.
254         (add_symbols):  Make non-static.
255         (claimed_files): Likewise.
256         (num_claimed_files): Likewise.
257         (check): Likewise.
258         (parse_table_entry): Likewise.
259         (translate): Likewise.
260         (resolve_conflicts): Likewise.
261         (process_symtab): Move to new lto-plugin-elf.c object format dependent
262         source file.
263         (claim_file_handler): Likewise, and make non-static.
264         (onload): Call new onload_format_checks function.
265         * lto-plugin.h: New file.
266         (LTO_SECTION_PREFIX): Move here.
267         (struct sym_aux): Likewise.
268         (struct plugin_symtab): Likewise.
269         (struct plugin_file_info): Likewise.
270         (claim_file_handler): Add new function prototype.
271         (onload_format_checks): Likewise.
272         (check): Declare extern.
273         (translate): Likewise.
274         (parse_table_entry): Likewise.
275         (resolve_conflicts): Likewise.
276         (add_symbols):  Likewise.
277         (claimed_files): Likewise.
278         (num_claimed_files): Likewise.
279         * lto-plugin-elf.c (process_symtab): Move here.
280         (claim_file_handler): Likewise, and make non-static.
281         (onload_format_checks): New function factored out from onload.
282         * lto-plugin-coff.c (claim_file_handler): New function stub.
283         (onload_format_checks): Likewise.
285 2010-08-05  Andi Kleen  <ak@linux.intel.com>
287         * lto-plugin.c: Include <hashtab.h>
288         (sym_aux): Add next_conflict field to save conflict chains.
289         (plugin_file_info): Add conflicts symtab.
290         (parse_table_entry): Initialize aux->next_conflict.
291         (process_symtab): Increment found.
292         (dump_symtab): Add.
293         (finish_conflict_resolution): Add.
294         (free_symtab): Add.
295         (write_resolution): Remove symbols loop and move into
296         dump_symtab. Call dump_symtab for main symbol and conflicts table.
297         Call free_symtab to free conflicts table.
298         (SWAP): Add.
299         (eq_sym): Add.
300         (hash_sym): Add.
301         (symbol_strength): Add.
302         (resolve_conflicts): Add.
303         (claim_file_handler): Add n variable. Check return value of
304         process_symtab. Call resolve_conflicts.
306 2010-07-27  Andi Kleen <ak@linux.intel.com>
308         * lto-plugin.c (translate): Remove debug fprintf.
310 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
312         PR bootstrap/45042
313         * lto-plugin.c (translate): Cast to unsigned long.
315 2010-07-23   Andi Kleen <ak@linux.intel.com>
317         PR lto/44992
318         * lto-plugin.c (sym_aux): Add.
319         (plugin_symtab): Remove slots. Add aux and id.
320         (parse_table_entry): Change to use aux instead of slots.
321         (LTO_SECTION_PREFIX): Add.
322         (translate): Improve buffer allocation. Change to append
323         symbols to existing out buffer.
324         (get_section): Remove.
325         (process_symtab): Add.
326         (free_2): Free symtab->aux.
327         (write_resolution): Handle aux instead of slots.
328         Print sub id to resolution file.
329         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
330         calls with call to process_symtab.
332 2010-07-22  Richard Guenther  <rguenther@suse.de>
334         * Makefile.am: New copy_lto_plugin rule to install the plugin
335         into ../gcc.
336         * Makefile.in: Regenerated.
338 2010-05-21  Richard Guenther  <rguenther@suse.de>
340         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
342 2010-05-07  Richard Guenther <rguenther@suse.de>
344         * lto-plugin.c (free_2): Do not free resolution_file.
345         (write_resolution): Check that we were passed a resolution file.
346         (all_symbols_read_handler): Adjust.
347         (cleanup_handler): Do not remove the resolution file.
348         (process_option): Handle -fresolution=.
350 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
352         PR other/43620
353         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
354         * Makefile.in: Regenerate.
356 2010-04-23  Richard Guenther  <rguenther@suse.de>
358         PR lto/41550
359         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
360         (translate): Likewise.
361         (all_symbols_read_handler): Likewise.
362         (claim_file_handler): Likewise.
363         (process_option): Likewise.
364         (add_output_files): Likewise.  Remove filename length limit.
366 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
368         * Makefile.in: Regenerate.
369         * aclocal.m4: Regenerate.
371 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
373         PR lto/43336
374         * lto-plugin.c (cleanup_handler): Delete temporary output files.
376 2010-01-11  Richard Guenther  <rguenther@suse.de>
378         PR lto/41569
379         * Makefile.am: Disable dependencies.
380         * Makefile.in: Regenerated.
382 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
384         PR lto/42520
385         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
386         if -v is passed.
388 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
390         PR bootstrap/42306
391         * configure: Regenerated.
392         * Makefile.in: Likewise.
394 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
396         PR bootstrap/42096
397         * lto-plugin.c (claim_file_handler): Print offsets in hex.
399 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
401         * lto-plugin.c (write_resolution): Assume resolution_file is set.
402         Print the symbol name.
403         (all_symbols_read_handler): Create a resolution file.
404         Pass it to gcc.
405         (cleanup_handler): Remove the resolution file.
406         (process_option): Drop the -resolution option.
408 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
410         * lto-plugin.c (temp_obj_dir_name): Remove.
411         (arguments_file_name): New.
412         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
413         (exec_lto_wrapper):  Create arguments file with make_temp_file.
414         (cleanup_handler): Don't remove the temporary directory. Remove the
415         arguments file.
416         (onload): Don't create the temporary directory.
418 2009-11-04  Richard Guenther  <rguenther@suse.de>
419             Rafael Avila de Espindola  <espindola@google.com>
421         * lto-plugin.c (plugin_file_info): Remove temp field.
422         (cleanup_handler): Don't delete temporary objects.
423         (claim_file_handler): Don't create temporary objects.
425 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
427         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
429 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
431         PR41871
432         * lto-plugin.c (claim_file_handler): Close files that we created.
434 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
436         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
437         LDPL_ERROR
439 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
441         PR lto/41652
442         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
443         * configure: Regenerate.
445 2009-10-26  Richard Guenther  <rguenther@suse.de>
447         * configure.ac: Use AM_MAINTAINER_MODE.
448         * acinclude.m4: Remove.
449         * configure: Re-generate.
450         * Makefile.in: Likewise.
451         * aclocal.m4: Likewise.
453 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
454     
455         PR40790
456         * configure: Regenerate.
457         * configure.ac: Add AC_TYPE_UINT64_T.
459 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
461         * lto-plugin.c (message): New variable.
462         (check): New function.
463         (parse_table_entry, translate, write_resolution,add_output_files,
464         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
465         assert.
466         (cleanup_handler): Use check instead of assert. Remove the arguments
467         file if it exists.
469 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
471         * lto-plugin.c (resolution_file): New.
472         (free_1): Update comment.
473         (free_2): Free resolution_file.
474         (write_resolution): Write resolution to specified file. Use the
475         syms array from the symbol table.
476         (all_symbols_read_handler): Delay call to free_1 past call to
477         write_resolution.
478         (process_option): Add a -resolution option.
480 2009-10-13  Richard Guenther  <rguenther@suse.de>
482         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
483         correct libiberty.
484         * Makefile.in: Regenerated.
486 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
488         * lto-plugin.c (add_input_library): New.
489         (all_symbols_read_handler): Use add_input_library for items that
490         start with -l.
491         (process_option): Fit in 80 columns.
492         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
494 2009-10-02  Diego Novillo  <dnovillo@google.com>
496         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
497         and -D_FILE_OFFSET_BITS=64.
498         * configure.ac: Add AC_SYS_LARGEFILE.
499         * configure: Regenerate.
500         * Makefile.in: Regenerate.
501         * lto-plugin.c: Fix copyright boilerplate.
503 2009-10-02  Diego Novillo  <dnovillo@google.com>
505         * Makefile.am (ACLOCAL_AMFLAGS): Define.
506         * aclocal.m4: Regenerate with aclocal-2.64
507         * acinclude.m4: Remove.
508         * Makefile.in: Regenerate with automake-1.11
509         * configure.ac (AC_PREREQ): Update to 2.64.
510         * configure: Regenerate.
512 2009-10-02  Diego Novillo  <dnovillo@google.com>
514         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
515         and -D_FILE_OFFSET_BITS=64.
516         * configure.ac: Add AC_SYS_LARGEFILE.
517         * configure: Regenerate.
518         * Makefile.in: Regenerate.
519         * lto-plugin.c: Fix copyright boilerplate.
521 2009-10-02  Diego Novillo  <dnovillo@google.com>
523         * Makefile.am (ACLOCAL_AMFLAGS): Define.
524         * aclocal.m4: Regenerate with aclocal-2.64
525         * acinclude.m4: Remove.
526         * Makefile.in: Regenerate with automake-1.11
527         * configure.ac (AC_PREREQ): Update to 2.64.
528         * configure: Regenerate.
530 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
532         * Makefile.am (liblto_plugin_la_SOURCES): Remove
533         $(top_srcdir)/../gcc/lto/common.c
534         * Makefile.in: Regenerate.
536 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
538         * lto-plugin.c (pass_through_items): New.
539         (num_pass_through_items): New.
540         (all_symbols_read_handler): Update to use the -pass-through option.
541         (process_option): Replace -libgcc with -pass-through.
542         
543 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
545         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
546         register_cleanup to be set.
548 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
550         * Makefile.am: Remove all reference to ltosymtab.
551         * Makefile.in: Regenerate.
552         * lto-symtab.c: Remove.
554 2009-05-21  Diego Novillo  <dnovillo@google.com>
556         * configure.ac: Remove call to AC_CHECK_GELF.
557         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
558         * acinclude.m4: Do not include ../config/libelf.m4
559         * Makefile.am (LIBELFLIBS): Define.
560         (LIBELFINC): Define.
561         (AM_CPPFLAGS): Add $(LIBELFINC).
562         (ltosymtab_LDADD): Add $(LIBELFLIBS).
563         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
564         * lto-plugin.c: Always include <gelf.h>
565         * lto-symtab.c: Likewise.
566         * configure: Regenerate.
567         * Makefile.in: Regenerate.
569 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
571         * lto-plugin.c (libgcc_filename): New.
572         (all_symbols_read_handler): Pass libgcc to the linker.
573         (all_symbols_read_handler): Parse -libgcc
575 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
577         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
578         * Makefile.in: Regenerate.
579         * lto-plugin.c (add_output_files): Argument is now a FILE.
580         (exec_lto_wrapper): Use writeargv and pex.
582 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
584         Revert:
585         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
586         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
589 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
591         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
593 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
595         * lto-plugin.c: Include libiberty.h.
596         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
597         snprintf.
599 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
601         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
602         file to lto-wrapper.
604 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
606         * lto-plugin.c (plugin_file_info): Remove fd and elf.
607         (parse_table_entry): strdup entry->name and entry->comdat_key.
608         (free_1): Free name and comdat_key. Don't close the file. Don't call
609         elf_end.
610         (claim_file_handler): Always call elf_end.
612 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
614         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
615         -D_FILE_OFFSET_BITS=64
616         * Makefile.in: Regenerate
618 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
620         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
621         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
622         * Makefile.in: Regenerate.
623         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
624         * configure: Regenerate.
625         * configure.ac: Add AC_SUBST(target_noncanonical).
627 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
629         * lto-plugin.c: Include stdbool.h.
630         (debug, nop): Declare as bool.
632 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
634         * lto-plugin.c (nop): New.
635         (use_original_files): New.
636         (all_symbols_read_handler): Call use_original_files if nop is true.
637         (process_option): Parse the -nop option.
639 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
641         * lto-plugin.c (debug): New.
642         (exec_lto_wrapper): Print argv if debug is true.
643         (process_option): Process the -debug command line option.
645 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
647         * lto-plugin.c (process_option): The argument is now a single option,
648         not a space separated list.
650 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
652         * lto-plugin.c: Include sys/types.h and sys/wait.h
653         (output_files, num_output_files, lto_wrapper_argv,
654         lto_wrapper_num_args): New.
655         (free_2): Free output_files.
656         (write_resolution): Disable.
657         (add_output_files): New.
658         (exec_lto_wrapper): New.
659         (all_symbols_read_handler): Run lto-wrapper.
660         (claim_file_handler): Free lto_file.name and call elf_end.
661         (process_option): New.
663 2008-11-26  Rafael Espindola  <espindola@google.com>
665         * lto-plugin.c (add_input_file): New.
666         (get_section): Return NULL if get_section fails.
667         (write_resolution): New.
668         (all_symbols_read_handler): Call add_input_file.
669         (claim_file_handler): Unlink the correct file.
670         (onload): Record add_input_file.
672 2008-09-23 Rafael Espindola  <espindola@google.com>
674         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
675         Update the location of common.c.
676         * Makefile.in: Regenerate.
677         * common.c: Moved to gcc/lto.
678         * common.h: Moved to gcc/lto.
679         * lto-plugin.c: Update the location of common.h.
680         * lto-symtab.c: Update the location of common.h.
682 2008-09-23 Rafael Espindola  <espindola@google.com>
684         * common.c: Include common.h.
685         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
686         sizes.
687         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
688         explicit sizes.
690 2008-09-23 Rafael Espindola  <espindola@google.com>
692         * lto-plugin.c (plugin_file_info): Add temp.
693         (cleanup_handler): Only delete temporary files.
694         (claim_file_handler): Initialize lto_file.temp.
696 2008-09-23  Rafael Espindola  <espindola@google.com>
698         * plugin-api.h: Moved to include.
700 2008-09-23 Rafael Espindola  <espindola@google.com>
702         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
703         format.
705 2008-09-22 Rafael Espindola  <espindola@google.com>
707         * plugin-api.h: Copy from binutils' cvs.
709 2008-09-22 Rafael Espindola  <espindola@google.com>
711         * lto-symtab.c (get_symbols, add_symbols): Update signature.
712         * plugin-api.h: Copy from binutils' cvs.
714 2008-09-22 Rafael Espindola  <espindola@google.com>
716         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
717         Make extern
719 2008-09-10 Rafael Espindola  <espindola@google.com>
721         * lto-plugin.c (onload): add missing break statements and asserts.
722         * lto-symtab.c (claim_file_handler): Make it static.
723         (all_symbols_read_handler): Make it static.
724         (all_file_handles): Make it static.
725         (num_file_handles): Make it static.
726         (register_claim_file): Make it static.
727         (register_object): Indent properly.
729 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
731         * Makefile.am (ltosymtab_LDADD): Add -lelf.
732         * Makefiel.in: Regenerate.
733         * lto-plugin.c: Include ar.h.
734         (claim_file_handler): Handle file->offset != 0.
735         * lto-symtab.c: Include gelf.h.
736         (all_file_handles): Change type.
737         (register_object): New.
738         (register_file): Add support for archives.
739         (resolve): Update to new type of all_file_handles.
740         (print): Update to new type of all_file_handles.
741         (free_all): Update to new type of all_file_handles.
742         (main): Update to new type of all_file_handles.
744 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
746         * lto-plugin.c (get_string_table): Remove.
747         (get_section): Use elf_strptr instead of get_string_table.
749 2008-09-08  Doug Kwan  <dougkwan@google.com>
751         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
752         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
754 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
756         * Makefile.am (ltosymtab_SOURCES): add common.c.
757         (ltosymtab_CFLAGS): New.
758         (liblto_plugin_la_SOURCES): Add common.c.
759         * Makefile.in: Regenerate.
760         * common.c: New.
761         * common.h: New.
762         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
763         (plugin_symtab): New.
764         (plugin_file_info): New.
765         (register_all_symbols_read): New.
766         (get_symbols): New.
767         (claimed_files): New.
768         (num_claimed_files): New.
769         (translate): Don't drop the slot number.
770         (free_1): New.
771         (free_2): New.
772         (all_symbols_read_handler): New.
773         (claim_file_handler): Record every claimed file.
774         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
775         LDPT_GET_SYMBOLS.
776         * lto-symtab.c: Include stdlib.h, string.h and common.h.
777         (current_file_handle): Remove.
778         (ld_plugin_all_symbols_read_handler): New.
779         (plugin_handle): New.
780         (file_handle): New.
781         (all_file_handles): New.
782         (num_file_handles): New.
783         (get_symbols): New.
784         (register_all_symbols_read): New.
785         (add_symbols): Don't print the symbols, just record them.
786         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
787         LDPT_GET_SYMBOLS.
788         (load_plugin): Use plugin_handle.
789         (register_file): Add the file handle to all_file_handles.
790         (resolve): New.
791         (print): New.
792         (unload_plugin): New.
793         (free_all): New.
794         (main): Call all_symbols_read_handler and free resources.
796 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
798         * Makefile.am (AM_CFLAGS): New.
799         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
800         (lib_LTLIBRARIES): New.
801         (liblto_plugin_la_SOURCES): New.
802         (liblto_plugin_la_LIBADD): New.
803         * Makefile.in: Regenerate.
804         * acinclude.m4: Don't include ../config/acx.m4 and
805         ../config/no-executables.m4.
806         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
807         ../libtool.m4.
808         * aclocal.m4: Regenerate.
809         * configure: Regenerate.
810         * configure.ac: Use AM_PROG_LIBTOOL.
811         * lto-plugin.c: New.
812         * lto-symtab.c: Rewrite to use the plugin.
813         * plugin-api.h: New.
815 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
817         * configure: Regenerate.
818         * configure.ac: Use AC_CHECK_GELF.
819         * lto-symtab.c: Include gelf.h.
820         (get_string_table): Use size independent API.
821         (printTable): Use lld to print 64 bit integers.
823 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
825         * lto-symtab.c (parse_table_entry): Assert entry->kind and
826         entry->visibility are valid.
828 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
829         * lto-symtab.c (table_entry): Add comdat.
830         (parse_table_entry): Read comdat.
832 2008-08-21  Rafael Espindola  <espindola@google.com>
834         * Makefile.am: New.
835         * Makefile.in: New.
836         * acinclude.m4: New.
837         * aclocal.m4: New.
838         * configure: New.
839         * configure.ac: New.
840         * lto-symtab.c: New.