OSDN Git Service

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