OSDN Git Service

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