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