Fix handling of large arguments passed by value.
[official-gcc.git] / lto-plugin / ChangeLog
blobe703899ca46c729351d4cc93dc4c57108f1dff8d
1 2022-11-23  Marek Polacek  <polacek@redhat.com>
3         Revert:
4         2022-11-23  Marek Polacek  <polacek@redhat.com>
6         * configure.ac (--enable-host-bind-now): New check.  Link with
7         -z,now.
8         * configure: Regenerate.
10 2022-11-23  Marek Polacek  <polacek@redhat.com>
12         * configure.ac (--enable-host-bind-now): New check.  Link with
13         -z,now.
14         * configure: Regenerate.
16 2022-10-12  Martin Liska  <mliska@suse.cz>
18         * configure: Regenerate.
20 2022-10-11  Olivier Hainque  <hainque@adacore.com>
21             Olivier Hainque  <hainque@adacore.com>
23         * configure: Regenerate.
25 2022-08-01  Martin Liska  <mliska@suse.cz>
27         PR lto/106170
28         * configure.ac: Replace $target with $host.
29         * configure: Regenerate.
31 2022-07-14  Martin Liska  <mliska@suse.cz>
33         PR bootstrap/106156
34         * Makefile.am: Use ac_lto_plugin_extra_ldflags for AM_LDFLAGS.
35         * configure.ac: Use AC_SUBST(ac_lto_plugin_extra_ldflags).
36         * Makefile.in: Regenerate.
37         * configure: Regenerate.
39 2022-07-12  Martin Liska  <mliska@suse.cz>
41         * lto-plugin.c (negotiate_api_version): New.
42         (onload): Negotiate API version.
43         * Makefile.am: Add -DBASE_VERSION.
44         * Makefile.in: Regenerate.
46 2022-07-07  Martin Liska  <mliska@suse.cz>
48         PR lto/106170
49         * configure.ac: Configure HAVE_PTHREAD_LOCKING.
50         * lto-plugin.c (LOCK_SECTION): New.
51         (UNLOCK_SECTION): New.
52         (claim_file_handler): Use the newly added macros.
53         (onload): Likewise.
54         * config.h.in: Regenerate.
55         * configure: Regenerate.
57 2022-07-01  Pekka Seppänen  <pexu@gcc.mail.kapsi.fi>
59         PR lto/106118
60         * configure.ac: Move -pthread from here...
61         * Makefile.am: ...to here.
62         * configure: Regenerate.
63         * Makefile.in: Likewise.
65 2022-06-27  Martin Liska  <mliska@suse.cz>
67         * lto-plugin.c (plugin_lock): New lock.
68         (claim_file_handler): Use mutex for critical section.
69         (onload): Initialize mutex.
70         * configure.ac: Check for pthread.h.
71         * configure: Regenerate.
72         * config.h.in: Regenerate.
74 2022-06-20  Martin Liska  <mliska@suse.cz>
76         * lto-plugin.c (struct plugin_file_info): Add skip_file flag.
77         (write_resolution): Write resolution only if get_symbols != LDPS_NO_SYMS.
78         (all_symbols_read_handler): Ignore file if skip_file is true.
79         (onload): Handle LDPT_GET_SYMBOLS_V3.
81 2022-05-04  Martin Liska  <mliska@suse.cz>
83         * lto-plugin.c (struct plugin_objfile): Use bool for offset
84         field.
85         (exec_lto_wrapper): Assign true/false to bool variables.
86         (process_offload_section): Likewise.
87         (claim_file_handler): Likewise.
88         (onload): Likewise.
90 2022-03-22  Jakub Jelinek  <jakub@redhat.com>
92         PR lto/102426
93         * configure.ac (LTO_PLUGIN_USE_SYMVER, LTO_PLUGIN_USE_SYMVER_GNU,
94         LTO_PLUGIN_USE_SYMVER_SUN): New test for symbol versioning support.
95         * Makefile.am (version_arg, version_dep): Set conditionally based
96         on LTO_PLUGIN_USE_SYMVER*.
97         (liblto_plugin_la_LDFLAGS): Use $(version_arg) instead of
98         -export-symbols-regex onload.
99         (liblto_plugin_la_DEPENDENCIES): Depend on $(version_dep).
100         * lto-plugin.map: New file.
101         * configure: Regenerated.
102         * Makefile.in: Regenerated.
104 2022-03-11  Tobias Burnus  <tobias@codesourcery.com>
106         * lto-plugin.c (all_symbols_read_handler): With -save-temps, use
107         link_output_name for -foffload-objects's file name, if available.
109 2022-03-01  Martin Liska  <mliska@suse.cz>
111         * lto-plugin.c (process_offload_section): Use a linker as many
112         comments are connected to gold linker.
113         (process_option): Likewise.
115 2021-12-02  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
117         * lto-plugin.c: Fix -linker-output-auto-notlo-rel ->
118         -linker-output-auto-nolto-rel typo.
119         (process_option): Adjust accordingly, accepting both old and
120         new spelling.
122 2021-09-13  Andrew Pinski  <apinski@marvell.com>
124         PR lto/49664
125         * Makefile.am: Export only onload.
126         * Makefile.in: Regenerate.
128 2021-06-25  Richard Biener  <rguenther@suse.de>
130         * lto-plugin.c (ltrans_objects): New global.
131         (all_symbols_read_handler): If -ltrans-objects was specified,
132         add the output files from the specified file directly.
133         (process_option): Handle -ltrans-objects.
135 2021-05-10  Martin Liska  <mliska@suse.cz>
137         * lto-plugin.c (LTO_SEGMENT_NAME): Remove.
138         (LTO_SYMTAB_PREFIX): Likewise.
139         (LTO_SYMTAB_PREFIX_LEN): Likewise.
140         (LTO_SYMTAB_EXT_PREFIX): Likewise.
141         (LTO_SYMTAB_EXT_PREFIX_LEN): Likewise.
142         (LTO_LTO_PREFIX): Likewise.
143         (LTO_LTO_PREFIX_LEN): Likewise.
144         (OFFLOAD_SECTION): Likewise.
145         (OFFLOAD_SECTION_LEN): Likewise.
146         (startswith): New function.
147         (all_symbols_read_handler): Use it.
148         (process_symtab): Likewise.
149         (process_symtab_extension): Likewise.
150         (process_offload_section): Likewise.
151         (process_option): Likewise.
153 2021-05-03  H.J. Lu  <hjl.tools@gmail.com>
155         PR bootstrap/99703
156         * configure: Regenerated.
158 2021-04-21  Martin Liska  <mliska@suse.cz>
160         * lto-plugin.c (exec_lto_wrapper): Make a temp variable.
162 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
164         * configure: Re-generate.
166 2020-11-29  John David Anglin  <danglin@gcc.gnu.org>
168         * configure: Regenerate.
170 2020-11-25  Matthew Malcomson  <matthew.malcomson@arm.com>
172         * Makefile.am: Avoid using sanitizer.
173         * Makefile.in: Regenerate.
175 2020-09-10  Jonathan Yong  <10walls@gmail.com>
177         * Makefile.am: drop versioning from libtool completely.
178         * Makefile.in: regenerate.
180 2020-09-09  Nick Clifton  <nickc@redhat.com>
182         * lto-plugin.c (struct plugin_symtab): Add last_sym field.
183         (parse_symtab_extension): Only read as many entries as are
184         available in the buffer.  Store the data read into the symbol
185         table indexed from last_sym.  Increment last_sym.
187 2020-07-30  H.J. Lu  <hjl.tools@gmail.com>
189         PR bootstrap/96202
190         * configure: Regenerated.
192 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
194         PR bootstrap/95413
195         * configure: Regenerated.
197 2020-05-26  Alexandre Oliva  <oliva@adacore.com>
199         * lto-plugin.c (skip_in_suffix): New.
200         (exec_lto_wrapper): Use skip_in_suffix and concat to build
201         non-temporary output names.
202         (onload): Look for -dumpdir in COLLECT_GCC_OPTIONS, and
203         override link_output_name with it.
205 2020-05-12  H.J. Lu  <hongjiu.lu@intel.com>
207         PR bootstrap/94998
208         * configure: Regenerated.
210 2020-05-05  Eric Botcazou  <ebotcazou@adacore.com>
212         * lto-plugin.c: Document -linker-output-auto-notlo-rel option.
213         (linker_output_set): Change type to bool.
214         (linker_output_known): Likewise.
215         (linker_output_auto_nolto_rel): New variable.
216         (all_symbols_read_handler): Take it into account.
217         <LDPO_REL>: Do not issue the warning if it is set.
218         (process_option): Process -linker-output-auto-notlo-rel.
219         (cleanup_handler): Remove unused variable.
220         (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change.
222 2020-04-28  H.J. Lu  <hongjiu.lu@intel.com>
224         PR bootstrap/94739
225         * configure: Regenerated.
227 2020-04-25  H.J. Lu  <hongjiu.lu@intel.com>
229         PR bootstrap/94739
230         * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
231         * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
232         AC_SUBST(CET_HOST_FLAGS).
233         * Makefile.in: Regenerated.
234         * aclocal.m4: Likewise.
235         * configure: Likewise.
237 2020-03-19  Martin Liska  <mliska@suse.cz>
239         * lto-plugin.c (LTO_SECTION_PREFIX): Rename to ...
240         (LTO_SYMTAB_PREFIX): ... this.
241         (LTO_SECTION_PREFIX_LEN): Rename to ...
242         (LTO_SYMTAB_PREFIX_LEN): ... this.
243         (LTO_SYMTAB_EXT_PREFIX): New.
244         (LTO_SYMTAB_EXT_PREFIX_LEN): New.
245         (LTO_LTO_PREFIX): New.
246         (LTO_LTO_PREFIX_LEN): New.
247         (parse_table_entry): Fill up unused to zero.
248         (parse_table_entry_extension): New.
249         (parse_symtab_extension): New.
250         (finish_conflict_resolution): Change type
251         for resolution.
252         (process_symtab): Use new macro name.
253         (process_symtab_extension): New.
254         (claim_file_handler): Parse also process_symtab_extension.
255         (onload): Call new add_symbols_v2.
257 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
259         Update copyright years.
261 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
263         * configure: Regenerate.
265 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
267         * lto-plugin.c (cleanup_handler): Remove unused var.
269 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
271         * lto-plugin.c (exec_lto_wrapper): Make the wrapper
272         arguments filename more user-friendly.
273         (file_exists, maybe_unlink): New.
274         (cleanup_handler): Use maybe unlink to handle the
275         case when temps should be saved.
276         (process_option): Look for -v, â€”-version, -save-temps.
277         (onload): Record the linker output file name.
278         Check for -v, â€”-version, -save-temps in the GCC collect
279         options environment.
281 2019-02-26  Martin Liska  <mliska@suse.cz>
283         * lto-symtab.c: Remove.
285 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
287         Update copyright years.
289 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
291         PR bootstrap/82856
292         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
293         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
295 2018-05-30  Jan Hubicka  <jh@suse.cz>
297         * lto-plugin.c: (non_claimed_files): New static var.
298         (linker_ouput_known): New static var.
299         (all_symbols_read_handler): When user specifies linker output do not
300         imply it; output warning when nonlto-rel mode is forced.
301         (claim_file_header): Record number of nonclaimed files.
302         (process_option): Remember if linker output is known
304 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
306         PR jit/85384
307         * configure: Regenerate.
309 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
311         Update copyright years.
313 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
315         PR lto/81487
316         * lto-plugin.c (claim_file_handler): Use xasprintf instead of
317         asprintf.
318         [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
320 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
322         PR other/79046
323         * configure.ac: Add GCC_BASE_VER.
324         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
325         get version from BASE-VER file.
326         * configure: Regenerated.
327         * Makefile.in: Regenerated.
329 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
331         Update copyright years.
333 2016-11-15  Matthias Klose  <doko@ubuntu.com>
335         * configure: Regenerate.
337 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
339         PR driver/68463
340         * lto-plugin.c (struct plugin_offload_file): New.
341         (offload_files): Change type.
342         (offload_files_last, offload_files_last_obj): New.
343         (offload_files_last_lto): New.
344         (free_2): Adjust accordingly.
345         (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
346         Don't call free_1 for offload_files.  Write names of object files with
347         offloading to the temporary file.  Add new option to lto_arg_ptr.
348         (claim_file_handler): Don't claim file if it contains offload sections
349         without LTO sections.  If it contains offload sections, add to the list.
351 2016-01-15  Martin Liska  <mliska@suse.cz>
353         * lto-plugin.c (all_symbols_read_handler): Assign default
354         value to a string variable.
356 2015-11-25  Jan Hubicka  <jh@suse.cz>
358         PR lto/67548
359         * lto-plugin.c (linker_output, linker_output_set): New statics.
360         (all_symbols_read_handler): Add -flinker-output option.
361         (onload): Record linker_output info.
363 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
365         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
366         * configure: Regenerate.
367         * config.h.in: Ditto.
369 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
371         * Makefile.am: Drop 'by automake version' from top-level comment.
372         * Makefile.in: Regenerated with automake-1.11.6.
373         * aclocal.m4: Likewise.
374         * configure: Likewise.
376 2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
378         * lto-plugin.c (release_input_file): Removed.
379         (claim_file_handler): Don't call release_input_file.
380         (onload): Don't set release_input_file.
382 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
384         * lto-plugin.c (claim_file_handler): Pass handle to
385         release_input_file.
387 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
389         * lto-plugin.c (claim_file_handler): Call release_input_file only
390         if file is claimed.
392 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
394         * lto-plugin.c (claim_file_handler): Call release_input_file only
395         if it is not NULL.
397 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
399         PR lto/64837
400         * lto-plugin.c (release_input_file): New.
401         (claim_file_handler): Call release_input_file.
402         (onload): Set release_input_file.
404 2014-12-09  Ilya Verbin  <ilya.verbin@intel.com>
406         * lto-plugin.c (offload_files, num_offload_files): New static variables.
407         (free_1): Use arguments instead of global variables.
408         (free_2): Free offload_files.
409         (all_symbols_read_handler): Add names from offload_files to lto-wrapper
410         arguments.
411         (claim_file_handler): Do not add file to claimed_files if it contains
412         offload sections without LTO sections.  Add it to offload_files instead.
414 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
416         PR bootstrap/63784
417         * configure: Regenerated.
419 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
420             Bernd Schmidt  <bernds@codesourcery.com>
421             Andrey Turetskiy  <andrey.turetskiy@intel.com>
422             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
424         * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
425         (struct plugin_objfile): Add new field "offload".
426         (process_offload_section): New static function.
427         (claim_file_handler): Claim file if it contains offload sections.
429 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
430             Thomas Schwinge  <thomas@codesourcery.com>
431             Ilya Verbin  <ilya.verbin@intel.com>
432             Andrey Turetskiy  <andrey.turetskiy@intel.com>
434         * Makefile.am (libexecsubdir): Tweak for the possibility of being
435         configured for offload compiler.
436         (accel_dir_suffix, real_target_noncanonical): New variables substituted
437         by configure.
438         * Makefile.in: Regenerate.
439         * configure: Regenerate.
440         * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
441         variables.
443 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
445         PR target/63610
446         * configure: Regenerate.
448 2014-08-26  H.J. Lu  <hongjiu.lu@intel.com>
450         PR bootstrap/62260
451         * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
452         * configure.ac (gcc_build_dir): Set and AC_SUBST according to
453         $host_subdir.
454         * Makefile.in: Regenerated.
455         * configure: Likewise.
457 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
459         * configure.ac (--with-libiberty): New configure option.
460         * configure: Regenerate.
461         * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
462         variables.
463         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
464         (liblto_plugin_la_DEPENDENCIES): Use them.
465         * Makefile.in: Regenerate.
467 2014-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
469         PR lto/60981
470         * configure.ac: Check for -static-libgcc.
471         * configure: Regenerate.
473 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
475         PR sanitizer/56781
476         * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
477         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
478         liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
479         over ../libiberty/pic/libiberty.a if the former exists.
480         * Makefile.in: Regenerated.
482         PR sanitizer/56781
483         * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
484         * Makefile.in: Regenerated.
486 2014-04-02  Richard Biener  <rguenther@suse.de>
488         * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
489         is set in COLLECT_GCC_OPTIONS.
491 2014-03-28  Richard Biener  <rguenther@suse.de>
493         * lto-plugin.c (process_symtab): Handle EINTR and short reads.
495 2014-03-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
497         * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
498         for gcc.
499         * configure: Regenerate.
500         * Makefile.am (AM_LDFLAGS): New variable.
501         (liblto_plugin_la_LDFLAGS): Add it.
502         * Makefile.in: Regenerate.
504 2013-09-20  Alan Modra  <amodra@gmail.com>
506         * configure: Regenerate.
508 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
510         * configure: Regenerated.
512 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
514         * lto-plugin.c: Fix typo.
516 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
518         * configure: Regenerated.
520 2012-02-22  Kai Tietz  <ktietz@redhat.com>
522         PR lto/50616
523         * lto-plugin.c (PRI_LL): New macro.
524         (dump_symtab): Use PRI_LL instead of ll in print.
525         (process_symtab): Use PRI_LL instead of ll in scan.
527 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
529         * configure: Regenerate.
531 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
533         * configure: Regenerate.
535 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
537         * configure: Regenerate.
539 2011-10-02  Jan Hubicka  <jh@suse.cz>
541         PR lto/47247
542         * lto-plugin.c (get_symbols_v2): New variable.
543         (write_resolution): Use V2 API when available.
544         (onload): Handle LDPT_GET_SYMBOLS_V2.
546 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
547             Andi Kleen  <ak@linux.intel.com>
549         PR lto/50568
550         * lto-plugin.c (sym_aux): Change id to unsigned long long.
551         (plugin_symtab): Likewise.
552         (dump_symtab): Likewise.
553         (resolve_conflicts): Likewise.
554         (process_symtab): Likewise.
556 2011-08-10  Richard Guenther  <rguenther@suse.de>
558         PR bootstrap/49907
559         lto-plugin/
560         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
561         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
562         * configure: Regenerate.
563         * Makefile.in: Likewise.
564         * aclocal.m4: Likewise.
566 2011-04-20  Jim Meyering  <meyering@redhat.com>
568         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
570 2011-04-05  Richard Guenther  <rguenther@suse.de>
572         PR bootstrap/48431
573         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
575 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
577         * Makefile.in: Regenerate.
578         * aclocal.m4: Regenerate.
579         * configure: Regenerate.
581 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
583         * Makefile.am (all-local): Rename from 'all'.
584         * Makefile.in: Regenerate.
586 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
588         PR lto/47225
589         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
590         (liblto_plugin_la_LDFLAGS): Add -module.
591         (copy_lto_plugin): Renamed to...
592         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
593         of static modules.
594         * Makefile.in: Rebuild.
596 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
598         PR lto/47225
599         * Makefile.am (Wc): New helper for encoding -Wc,.
600         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
601         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
602         * Makefile.in: Regenerated.
604 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
606         Revert:
608         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
610         PR lto/47225
611         * Makefile.am (Wl): New helper for encoding -Wl,.
612         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
613         * Makefile.in: Regenerated.
615 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
617         PR lto/47225
618         * Makefile.am (Wl): New helper for encoding -Wl,.
619         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
620         * Makefile.in: Regenerated.
622 2011-01-25  Ian Lance Taylor  <iant@google.com>
624         * lto-plugin.c (gold_version): New static variable.
625         (all_symbols_read_handler): Don't check pass_through_items if
626         using gold 1.11 or later.
627         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
629 2011-01-12  Richard Guenther  <rguenther@suse.de>
631         PR lto/47264
632         * lto-plugin.c (parse_table_entry): Use memcpy to access
633         unaligned fields.
635 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
637         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
638         * Makefile.in: Regenerate.
640 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
642         Revert last change.
644 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
646         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
647         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
648         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
649         * Makefile.in: Regenerate.
651 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
653         PR middle-end/46674
654         PR lto/43157
655         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
656         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
657         * configure: Regenerate.
658         * config.h.in: Likewise.
660 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
662         PR target/40125
663         PR lto/46695
664         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
665         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
666         override -bindir setting.
667         * aclocal.m4: Regenerate.
668         * configure: Regenerate.
669         * Makefile.in: Regenerate.
671 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
673         * config.h.in: Regenerated.
674         * configure: Regenerated.
675         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
676         * lto-plugin.c (WIFEXITED): Define default.
677         (WEXITSTATUS): Likeiwse.
679 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
681         * config.h.in: Regenerated.
682         * configure: Regenerated.
683         * Makefile.in: Regenerated.
684         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
685         * lto-plugin.c:  Include sys/wait.h conditionally.
686         * aclocal.m4: Regenerated.
688 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
690         * lto-plugin.c (add_output_files): Fix memory leak.
692 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
694         PR bootstrap/46397
695         PR bootstrap/46362
696         * configure.ac: Add AC_TYPE_INT64_T test.
697         * config.h.in: Regenerate.
698         * configure: Likewise.
699         * lto-plugin.c (debug): Use char not bool.
700         (nop): Likewise.
701         (check_1): Rename from check, and use int not bool for gate argument.
702         (check): Macro wrapper for the above to coerce gate argument into
703         boolean-valued integer in case it has pointer type.
704         (parse_table_entry): Use 0 not false.
705         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
706         into two 32-bit parts and printing as hex ints.
708 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
710         PR lto/46291
711         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
713 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
715         PR lto/46273
716         * lto-plugin.h: Delete.
717         * lto-plugin-elf.c: Likewise.
718         * lto-plugin-coff.c: Likewise.
719         * configure.ac: Don't use libelf, don't source config.gcc.
720         (LIBELFLIBS): Delete.
721         (LIBELFINC): Delete.
722         (LTO_FORMAT): Delete.
723         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
724         (config.h): Add AC_CONFIG_HEADERS directive.
725         * Makefile.am (LIBELFLIBS): Delete.
726         (LIBELFINC): Delete.
727         (LTO_FORMAT): Delete.
728         (DEFS): Import.
729         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
730         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
731         any object-format-specific source file in the link.
732         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
733         * config.h.in: Generate.
734         * configure: Regenerate.
735         * Makefile.in: Likewise.
736         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
737         (LTO_SEGMENT_NAME): New definition.
738         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
739         (LTO_SECTION_PREFIX_LEN): New definition.
740         (struct sym_aux): Struct definition moved here from lto-plugin.h.
741         (struct plugin_symtab): Likewise.
742         (struct plugin_objfile): Likewise.
743         (struct plugin_objfile): New struct def.
744         (enum symbol_style): New enum type.
745         (add_symbols): Make static.
746         (claimed_files): Likewise.
747         (num_claimed_files): Likewise.
748         (sym_style): New global.
749         (check): Make static.
750         (parse_table_entry): Likewise.  Respect sym_style when extracting
751         symbol from symtab entry.
752         (translate): Make static.
753         (resolve_conflicts): Likewise.
754         (process_symtab): New function, per-section callback version of
755         old object-format-specific handling from deleted lto-plugin-elf.c.
756         (claim_file_handler): Convert ELF-specific version from deleted
757         lto-plugin-elf.c to simple_object interface and move here.
758         (process_options): Allow new '-sym-style=' option.
759         (onload): Don't call deleted onload_format_checks hook.
761 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
763         * lto-plugin.c (dump_symtab): Correct printf argument type.
764         (finish_conflict_resolution): Initialize resolution.
766 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
768         PR bootstrap/45951
769         * configure.ac: Add AC_CANONICAL_SYSTEM.
770         * configure: Regenerated.
772 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
774         * configure.ac: Source config.gcc to determine lto_binary_reader.
775         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
776         * Makefile.am (LTO_FORMAT): Import.
777         (liblto_plugin_la_SOURCES): Add object format dependent module
778         defined by LTO_FORMAT.
779         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
780         and work around libtool warning.
781         * configure: Regenerate.
782         * Makefile.in: Likewise.
783         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
784         (struct sym_aux): Likewise.
785         (struct plugin_symtab): Likewise.
786         (struct plugin_file_info): Likewise.
787         (LTO_SECTION_PREFIX): Likewise.
788         (add_symbols):  Make non-static.
789         (claimed_files): Likewise.
790         (num_claimed_files): Likewise.
791         (check): Likewise.
792         (parse_table_entry): Likewise.
793         (translate): Likewise.
794         (resolve_conflicts): Likewise.
795         (process_symtab): Move to new lto-plugin-elf.c object format dependent
796         source file.
797         (claim_file_handler): Likewise, and make non-static.
798         (onload): Call new onload_format_checks function.
799         * lto-plugin.h: New file.
800         (LTO_SECTION_PREFIX): Move here.
801         (struct sym_aux): Likewise.
802         (struct plugin_symtab): Likewise.
803         (struct plugin_file_info): Likewise.
804         (claim_file_handler): Add new function prototype.
805         (onload_format_checks): Likewise.
806         (check): Declare extern.
807         (translate): Likewise.
808         (parse_table_entry): Likewise.
809         (resolve_conflicts): Likewise.
810         (add_symbols):  Likewise.
811         (claimed_files): Likewise.
812         (num_claimed_files): Likewise.
813         * lto-plugin-elf.c (process_symtab): Move here.
814         (claim_file_handler): Likewise, and make non-static.
815         (onload_format_checks): New function factored out from onload.
816         * lto-plugin-coff.c (claim_file_handler): New function stub.
817         (onload_format_checks): Likewise.
819 2010-08-05  Andi Kleen  <ak@linux.intel.com>
821         * lto-plugin.c: Include <hashtab.h>
822         (sym_aux): Add next_conflict field to save conflict chains.
823         (plugin_file_info): Add conflicts symtab.
824         (parse_table_entry): Initialize aux->next_conflict.
825         (process_symtab): Increment found.
826         (dump_symtab): Add.
827         (finish_conflict_resolution): Add.
828         (free_symtab): Add.
829         (write_resolution): Remove symbols loop and move into
830         dump_symtab. Call dump_symtab for main symbol and conflicts table.
831         Call free_symtab to free conflicts table.
832         (SWAP): Add.
833         (eq_sym): Add.
834         (hash_sym): Add.
835         (symbol_strength): Add.
836         (resolve_conflicts): Add.
837         (claim_file_handler): Add n variable. Check return value of
838         process_symtab. Call resolve_conflicts.
840 2010-07-27  Andi Kleen  <ak@linux.intel.com>
842         * lto-plugin.c (translate): Remove debug fprintf.
844 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
846         PR bootstrap/45042
847         * lto-plugin.c (translate): Cast to unsigned long.
849 2010-07-23   Andi Kleen  <ak@linux.intel.com>
851         PR lto/44992
852         * lto-plugin.c (sym_aux): Add.
853         (plugin_symtab): Remove slots. Add aux and id.
854         (parse_table_entry): Change to use aux instead of slots.
855         (LTO_SECTION_PREFIX): Add.
856         (translate): Improve buffer allocation. Change to append
857         symbols to existing out buffer.
858         (get_section): Remove.
859         (process_symtab): Add.
860         (free_2): Free symtab->aux.
861         (write_resolution): Handle aux instead of slots.
862         Print sub id to resolution file.
863         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
864         calls with call to process_symtab.
866 2010-07-22  Richard Guenther  <rguenther@suse.de>
868         * Makefile.am: New copy_lto_plugin rule to install the plugin
869         into ../gcc.
870         * Makefile.in: Regenerated.
872 2010-05-21  Richard Guenther  <rguenther@suse.de>
874         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
876 2010-05-07  Richard Guenther <rguenther@suse.de>
878         * lto-plugin.c (free_2): Do not free resolution_file.
879         (write_resolution): Check that we were passed a resolution file.
880         (all_symbols_read_handler): Adjust.
881         (cleanup_handler): Do not remove the resolution file.
882         (process_option): Handle -fresolution=.
884 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
886         PR other/43620
887         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
888         * Makefile.in: Regenerate.
890 2010-04-23  Richard Guenther  <rguenther@suse.de>
892         PR lto/41550
893         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
894         (translate): Likewise.
895         (all_symbols_read_handler): Likewise.
896         (claim_file_handler): Likewise.
897         (process_option): Likewise.
898         (add_output_files): Likewise.  Remove filename length limit.
900 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
902         * Makefile.in: Regenerate.
903         * aclocal.m4: Regenerate.
905 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
907         PR lto/43336
908         * lto-plugin.c (cleanup_handler): Delete temporary output files.
910 2010-01-11  Richard Guenther  <rguenther@suse.de>
912         PR lto/41569
913         * Makefile.am: Disable dependencies.
914         * Makefile.in: Regenerated.
916 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
918         PR lto/42520
919         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
920         if -v is passed.
922 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
924         PR bootstrap/42306
925         * configure: Regenerated.
926         * Makefile.in: Likewise.
928 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
930         PR bootstrap/42096
931         * lto-plugin.c (claim_file_handler): Print offsets in hex.
933 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
935         * lto-plugin.c (write_resolution): Assume resolution_file is set.
936         Print the symbol name.
937         (all_symbols_read_handler): Create a resolution file.
938         Pass it to gcc.
939         (cleanup_handler): Remove the resolution file.
940         (process_option): Drop the -resolution option.
942 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
944         * lto-plugin.c (temp_obj_dir_name): Remove.
945         (arguments_file_name): New.
946         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
947         (exec_lto_wrapper):  Create arguments file with make_temp_file.
948         (cleanup_handler): Don't remove the temporary directory. Remove the
949         arguments file.
950         (onload): Don't create the temporary directory.
952 2009-11-04  Richard Guenther  <rguenther@suse.de>
953             Rafael Avila de Espindola  <espindola@google.com>
955         * lto-plugin.c (plugin_file_info): Remove temp field.
956         (cleanup_handler): Don't delete temporary objects.
957         (claim_file_handler): Don't create temporary objects.
959 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
961         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
963 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
965         PR41871
966         * lto-plugin.c (claim_file_handler): Close files that we created.
968 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
970         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
971         LDPL_ERROR
973 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
975         PR lto/41652
976         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
977         * configure: Regenerate.
979 2009-10-26  Richard Guenther  <rguenther@suse.de>
981         * configure.ac: Use AM_MAINTAINER_MODE.
982         * acinclude.m4: Remove.
983         * configure: Re-generate.
984         * Makefile.in: Likewise.
985         * aclocal.m4: Likewise.
987 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
988     
989         PR40790
990         * configure: Regenerate.
991         * configure.ac: Add AC_TYPE_UINT64_T.
993 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
995         * lto-plugin.c (message): New variable.
996         (check): New function.
997         (parse_table_entry, translate, write_resolution,add_output_files,
998         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
999         assert.
1000         (cleanup_handler): Use check instead of assert. Remove the arguments
1001         file if it exists.
1003 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
1005         * lto-plugin.c (resolution_file): New.
1006         (free_1): Update comment.
1007         (free_2): Free resolution_file.
1008         (write_resolution): Write resolution to specified file. Use the
1009         syms array from the symbol table.
1010         (all_symbols_read_handler): Delay call to free_1 past call to
1011         write_resolution.
1012         (process_option): Add a -resolution option.
1014 2009-10-13  Richard Guenther  <rguenther@suse.de>
1016         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
1017         correct libiberty.
1018         * Makefile.in: Regenerated.
1020 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
1022         * lto-plugin.c (add_input_library): New.
1023         (all_symbols_read_handler): Use add_input_library for items that
1024         start with -l.
1025         (process_option): Fit in 80 columns.
1026         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
1028 2009-10-02  Diego Novillo  <dnovillo@google.com>
1030         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
1031         and -D_FILE_OFFSET_BITS=64.
1032         * configure.ac: Add AC_SYS_LARGEFILE.
1033         * configure: Regenerate.
1034         * Makefile.in: Regenerate.
1035         * lto-plugin.c: Fix copyright boilerplate.
1037 2009-10-02  Diego Novillo  <dnovillo@google.com>
1039         * Makefile.am (ACLOCAL_AMFLAGS): Define.
1040         * aclocal.m4: Regenerate with aclocal-2.64
1041         * acinclude.m4: Remove.
1042         * Makefile.in: Regenerate with automake-1.11
1043         * configure.ac (AC_PREREQ): Update to 2.64.
1044         * configure: Regenerate.
1046 2009-10-02  Diego Novillo  <dnovillo@google.com>
1048         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
1049         and -D_FILE_OFFSET_BITS=64.
1050         * configure.ac: Add AC_SYS_LARGEFILE.
1051         * configure: Regenerate.
1052         * Makefile.in: Regenerate.
1053         * lto-plugin.c: Fix copyright boilerplate.
1055 2009-10-02  Diego Novillo  <dnovillo@google.com>
1057         * Makefile.am (ACLOCAL_AMFLAGS): Define.
1058         * aclocal.m4: Regenerate with aclocal-2.64
1059         * acinclude.m4: Remove.
1060         * Makefile.in: Regenerate with automake-1.11
1061         * configure.ac (AC_PREREQ): Update to 2.64.
1062         * configure: Regenerate.
1064 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
1066         * Makefile.am (liblto_plugin_la_SOURCES): Remove
1067         $(top_srcdir)/../gcc/lto/common.c
1068         * Makefile.in: Regenerate.
1070 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
1072         * lto-plugin.c (pass_through_items): New.
1073         (num_pass_through_items): New.
1074         (all_symbols_read_handler): Update to use the -pass-through option.
1075         (process_option): Replace -libgcc with -pass-through.
1076         
1077 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
1079         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
1080         register_cleanup to be set.
1082 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
1084         * Makefile.am: Remove all reference to ltosymtab.
1085         * Makefile.in: Regenerate.
1086         * lto-symtab.c: Remove.
1088 2009-05-21  Diego Novillo  <dnovillo@google.com>
1090         * configure.ac: Remove call to AC_CHECK_GELF.
1091         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
1092         * acinclude.m4: Do not include ../config/libelf.m4
1093         * Makefile.am (LIBELFLIBS): Define.
1094         (LIBELFINC): Define.
1095         (AM_CPPFLAGS): Add $(LIBELFINC).
1096         (ltosymtab_LDADD): Add $(LIBELFLIBS).
1097         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
1098         * lto-plugin.c: Always include <gelf.h>
1099         * lto-symtab.c: Likewise.
1100         * configure: Regenerate.
1101         * Makefile.in: Regenerate.
1103 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
1105         * lto-plugin.c (libgcc_filename): New.
1106         (all_symbols_read_handler): Pass libgcc to the linker.
1107         (all_symbols_read_handler): Parse -libgcc
1109 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
1111         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
1112         * Makefile.in: Regenerate.
1113         * lto-plugin.c (add_output_files): Argument is now a FILE.
1114         (exec_lto_wrapper): Use writeargv and pex.
1116 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
1118         Revert:
1119         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
1120         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
1123 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
1125         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
1127 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
1129         * lto-plugin.c: Include libiberty.h.
1130         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
1131         snprintf.
1133 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
1135         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
1136         file to lto-wrapper.
1138 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
1140         * lto-plugin.c (plugin_file_info): Remove fd and elf.
1141         (parse_table_entry): strdup entry->name and entry->comdat_key.
1142         (free_1): Free name and comdat_key. Don't close the file. Don't call
1143         elf_end.
1144         (claim_file_handler): Always call elf_end.
1146 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
1148         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
1149         -D_FILE_OFFSET_BITS=64
1150         * Makefile.in: Regenerate
1152 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
1154         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
1155         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
1156         * Makefile.in: Regenerate.
1157         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
1158         * configure: Regenerate.
1159         * configure.ac: Add AC_SUBST(target_noncanonical).
1161 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
1163         * lto-plugin.c: Include stdbool.h.
1164         (debug, nop): Declare as bool.
1166 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
1168         * lto-plugin.c (nop): New.
1169         (use_original_files): New.
1170         (all_symbols_read_handler): Call use_original_files if nop is true.
1171         (process_option): Parse the -nop option.
1173 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
1175         * lto-plugin.c (debug): New.
1176         (exec_lto_wrapper): Print argv if debug is true.
1177         (process_option): Process the -debug command line option.
1179 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
1181         * lto-plugin.c (process_option): The argument is now a single option,
1182         not a space separated list.
1184 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
1186         * lto-plugin.c: Include sys/types.h and sys/wait.h
1187         (output_files, num_output_files, lto_wrapper_argv,
1188         lto_wrapper_num_args): New.
1189         (free_2): Free output_files.
1190         (write_resolution): Disable.
1191         (add_output_files): New.
1192         (exec_lto_wrapper): New.
1193         (all_symbols_read_handler): Run lto-wrapper.
1194         (claim_file_handler): Free lto_file.name and call elf_end.
1195         (process_option): New.
1197 2008-11-26  Rafael Espindola  <espindola@google.com>
1199         * lto-plugin.c (add_input_file): New.
1200         (get_section): Return NULL if get_section fails.
1201         (write_resolution): New.
1202         (all_symbols_read_handler): Call add_input_file.
1203         (claim_file_handler): Unlink the correct file.
1204         (onload): Record add_input_file.
1206 2008-09-23 Rafael Espindola  <espindola@google.com>
1208         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
1209         Update the location of common.c.
1210         * Makefile.in: Regenerate.
1211         * common.c: Moved to gcc/lto.
1212         * common.h: Moved to gcc/lto.
1213         * lto-plugin.c: Update the location of common.h.
1214         * lto-symtab.c: Update the location of common.h.
1216 2008-09-23 Rafael Espindola  <espindola@google.com>
1218         * common.c: Include common.h.
1219         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
1220         sizes.
1221         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
1222         explicit sizes.
1224 2008-09-23 Rafael Espindola  <espindola@google.com>
1226         * lto-plugin.c (plugin_file_info): Add temp.
1227         (cleanup_handler): Only delete temporary files.
1228         (claim_file_handler): Initialize lto_file.temp.
1230 2008-09-23  Rafael Espindola  <espindola@google.com>
1232         * plugin-api.h: Moved to include.
1234 2008-09-23 Rafael Espindola  <espindola@google.com>
1236         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
1237         format.
1239 2008-09-22 Rafael Espindola  <espindola@google.com>
1241         * plugin-api.h: Copy from binutils' cvs.
1243 2008-09-22 Rafael Espindola  <espindola@google.com>
1245         * lto-symtab.c (get_symbols, add_symbols): Update signature.
1246         * plugin-api.h: Copy from binutils' cvs.
1248 2008-09-22 Rafael Espindola  <espindola@google.com>
1250         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
1251         Make extern
1253 2008-09-10 Rafael Espindola  <espindola@google.com>
1255         * lto-plugin.c (onload): add missing break statements and asserts.
1256         * lto-symtab.c (claim_file_handler): Make it static.
1257         (all_symbols_read_handler): Make it static.
1258         (all_file_handles): Make it static.
1259         (num_file_handles): Make it static.
1260         (register_claim_file): Make it static.
1261         (register_object): Indent properly.
1263 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1265         * Makefile.am (ltosymtab_LDADD): Add -lelf.
1266         * Makefiel.in: Regenerate.
1267         * lto-plugin.c: Include ar.h.
1268         (claim_file_handler): Handle file->offset != 0.
1269         * lto-symtab.c: Include gelf.h.
1270         (all_file_handles): Change type.
1271         (register_object): New.
1272         (register_file): Add support for archives.
1273         (resolve): Update to new type of all_file_handles.
1274         (print): Update to new type of all_file_handles.
1275         (free_all): Update to new type of all_file_handles.
1276         (main): Update to new type of all_file_handles.
1278 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1280         * lto-plugin.c (get_string_table): Remove.
1281         (get_section): Use elf_strptr instead of get_string_table.
1283 2008-09-08  Doug Kwan  <dougkwan@google.com>
1285         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
1286         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
1288 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
1290         * Makefile.am (ltosymtab_SOURCES): add common.c.
1291         (ltosymtab_CFLAGS): New.
1292         (liblto_plugin_la_SOURCES): Add common.c.
1293         * Makefile.in: Regenerate.
1294         * common.c: New.
1295         * common.h: New.
1296         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1297         (plugin_symtab): New.
1298         (plugin_file_info): New.
1299         (register_all_symbols_read): New.
1300         (get_symbols): New.
1301         (claimed_files): New.
1302         (num_claimed_files): New.
1303         (translate): Don't drop the slot number.
1304         (free_1): New.
1305         (free_2): New.
1306         (all_symbols_read_handler): New.
1307         (claim_file_handler): Record every claimed file.
1308         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1309         LDPT_GET_SYMBOLS.
1310         * lto-symtab.c: Include stdlib.h, string.h and common.h.
1311         (current_file_handle): Remove.
1312         (ld_plugin_all_symbols_read_handler): New.
1313         (plugin_handle): New.
1314         (file_handle): New.
1315         (all_file_handles): New.
1316         (num_file_handles): New.
1317         (get_symbols): New.
1318         (register_all_symbols_read): New.
1319         (add_symbols): Don't print the symbols, just record them.
1320         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1321         LDPT_GET_SYMBOLS.
1322         (load_plugin): Use plugin_handle.
1323         (register_file): Add the file handle to all_file_handles.
1324         (resolve): New.
1325         (print): New.
1326         (unload_plugin): New.
1327         (free_all): New.
1328         (main): Call all_symbols_read_handler and free resources.
1330 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
1332         * Makefile.am (AM_CFLAGS): New.
1333         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1334         (lib_LTLIBRARIES): New.
1335         (liblto_plugin_la_SOURCES): New.
1336         (liblto_plugin_la_LIBADD): New.
1337         * Makefile.in: Regenerate.
1338         * acinclude.m4: Don't include ../config/acx.m4 and
1339         ../config/no-executables.m4.
1340         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1341         ../libtool.m4.
1342         * aclocal.m4: Regenerate.
1343         * configure: Regenerate.
1344         * configure.ac: Use AM_PROG_LIBTOOL.
1345         * lto-plugin.c: New.
1346         * lto-symtab.c: Rewrite to use the plugin.
1347         * plugin-api.h: New.
1349 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
1351         * configure: Regenerate.
1352         * configure.ac: Use AC_CHECK_GELF.
1353         * lto-symtab.c: Include gelf.h.
1354         (get_string_table): Use size independent API.
1355         (printTable): Use lld to print 64 bit integers.
1357 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
1359         * lto-symtab.c (parse_table_entry): Assert entry->kind and
1360         entry->visibility are valid.
1362 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
1363         * lto-symtab.c (table_entry): Add comdat.
1364         (parse_table_entry): Read comdat.
1366 2008-08-21  Rafael Espindola  <espindola@google.com>
1368         * Makefile.am: New.
1369         * Makefile.in: New.
1370         * acinclude.m4: New.
1371         * aclocal.m4: New.
1372         * configure: New.
1373         * configure.ac: New.
1374         * lto-symtab.c: New.