OSDN Git Service

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