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