OSDN Git Service

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