OSDN Git Service

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