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