1 2020-05-05 Eric Botcazou <ebotcazou@adacore.com>
3 * lto-plugin.c: Document -linker-output-auto-notlo-rel option.
4 (linker_output_set): Change type to bool.
5 (linker_output_known): Likewise.
6 (linker_output_auto_nolto_rel): New variable.
7 (all_symbols_read_handler): Take it into account.
8 <LDPO_REL>: Do not issue the warning if it is set.
9 (process_option): Process -linker-output-auto-notlo-rel.
10 (cleanup_handler): Remove unused variable.
11 (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change.
13 2020-04-28 H.J. Lu <hongjiu.lu@intel.com>
16 * configure: Regenerated.
18 2020-04-25 H.J. Lu <hongjiu.lu@intel.com>
21 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
22 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
23 AC_SUBST(CET_HOST_FLAGS).
24 * Makefile.in: Regenerated.
25 * aclocal.m4: Likewise.
26 * configure: Likewise.
28 2020-03-19 Martin Liska <mliska@suse.cz>
30 * lto-plugin.c (LTO_SECTION_PREFIX): Rename to ...
31 (LTO_SYMTAB_PREFIX): ... this.
32 (LTO_SECTION_PREFIX_LEN): Rename to ...
33 (LTO_SYMTAB_PREFIX_LEN): ... this.
34 (LTO_SYMTAB_EXT_PREFIX): New.
35 (LTO_SYMTAB_EXT_PREFIX_LEN): New.
36 (LTO_LTO_PREFIX): New.
37 (LTO_LTO_PREFIX_LEN): New.
38 (parse_table_entry): Fill up unused to zero.
39 (parse_table_entry_extension): New.
40 (parse_symtab_extension): New.
41 (finish_conflict_resolution): Change type
43 (process_symtab): Use new macro name.
44 (process_symtab_extension): New.
45 (claim_file_handler): Parse also process_symtab_extension.
46 (onload): Call new add_symbols_v2.
48 2020-01-01 Jakub Jelinek <jakub@redhat.com>
50 Update copyright years.
52 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
54 * configure: Regenerate.
56 2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
58 * lto-plugin.c (cleanup_handler): Remove unused var.
60 2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
62 * lto-plugin.c (exec_lto_wrapper): Make the wrapper
63 arguments filename more user-friendly.
64 (file_exists, maybe_unlink): New.
65 (cleanup_handler): Use maybe unlink to handle the
66 case when temps should be saved.
67 (process_option): Look for -v, —-version, -save-temps.
68 (onload): Record the linker output file name.
69 Check for -v, —-version, -save-temps in the GCC collect
72 2019-02-26 Martin Liska <mliska@suse.cz>
74 * lto-symtab.c: Remove.
76 2019-01-01 Jakub Jelinek <jakub@redhat.com>
78 Update copyright years.
80 2018-10-31 Joseph Myers <joseph@codesourcery.com>
83 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
84 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
86 2018-05-30 Jan Hubicka <jh@suse.cz>
88 * lto-plugin.c: (non_claimed_files): New static var.
89 (linker_ouput_known): New static var.
90 (all_symbols_read_handler): When user specifies linker output do not
91 imply it; output warning when nonlto-rel mode is forced.
92 (claim_file_header): Record number of nonclaimed files.
93 (process_option): Remember if linker output is known
95 2018-04-18 David Malcolm <dmalcolm@redhat.com>
98 * configure: Regenerate.
100 2018-01-03 Jakub Jelinek <jakub@redhat.com>
102 Update copyright years.
104 2017-07-21 Georg-Johann Lay <avr@gjlay.de>
107 * lto-plugin.c (claim_file_handler): Use xasprintf instead of
109 [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
111 2017-01-17 Jakub Jelinek <jakub@redhat.com>
114 * configure.ac: Add GCC_BASE_VER.
115 * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
116 get version from BASE-VER file.
117 * configure: Regenerated.
118 * Makefile.in: Regenerated.
120 2017-01-04 Jakub Jelinek <jakub@redhat.com>
122 Update copyright years.
124 2016-11-15 Matthias Klose <doko@ubuntu.com>
126 * configure: Regenerate.
128 2016-02-25 Ilya Verbin <ilya.verbin@intel.com>
131 * lto-plugin.c (struct plugin_offload_file): New.
132 (offload_files): Change type.
133 (offload_files_last, offload_files_last_obj): New.
134 (offload_files_last_lto): New.
135 (free_2): Adjust accordingly.
136 (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
137 Don't call free_1 for offload_files. Write names of object files with
138 offloading to the temporary file. Add new option to lto_arg_ptr.
139 (claim_file_handler): Don't claim file if it contains offload sections
140 without LTO sections. If it contains offload sections, add to the list.
142 2016-01-15 Martin Liska <mliska@suse.cz>
144 * lto-plugin.c (all_symbols_read_handler): Assign default
145 value to a string variable.
147 2015-11-25 Jan Hubicka <jh@suse.cz>
150 * lto-plugin.c (linker_output, linker_output_set): New statics.
151 (all_symbols_read_handler): Add -flinker-output option.
152 (onload): Record linker_output info.
154 2015-07-02 Uros Bizjak <ubizjak@gmail.com>
156 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
157 * configure: Regenerate.
158 * config.h.in: Ditto.
160 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
162 * Makefile.am: Drop 'by automake version' from top-level comment.
163 * Makefile.in: Regenerated with automake-1.11.6.
164 * aclocal.m4: Likewise.
165 * configure: Likewise.
167 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
169 * lto-plugin.c (release_input_file): Removed.
170 (claim_file_handler): Don't call release_input_file.
171 (onload): Don't set release_input_file.
173 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
175 * lto-plugin.c (claim_file_handler): Pass handle to
178 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
180 * lto-plugin.c (claim_file_handler): Call release_input_file only
183 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
185 * lto-plugin.c (claim_file_handler): Call release_input_file only
188 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
191 * lto-plugin.c (release_input_file): New.
192 (claim_file_handler): Call release_input_file.
193 (onload): Set release_input_file.
195 2014-12-09 Ilya Verbin <ilya.verbin@intel.com>
197 * lto-plugin.c (offload_files, num_offload_files): New static variables.
198 (free_1): Use arguments instead of global variables.
199 (free_2): Free offload_files.
200 (all_symbols_read_handler): Add names from offload_files to lto-wrapper
202 (claim_file_handler): Do not add file to claimed_files if it contains
203 offload sections without LTO sections. Add it to offload_files instead.
205 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
208 * configure: Regenerated.
210 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
211 Bernd Schmidt <bernds@codesourcery.com>
212 Andrey Turetskiy <andrey.turetskiy@intel.com>
213 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
215 * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
216 (struct plugin_objfile): Add new field "offload".
217 (process_offload_section): New static function.
218 (claim_file_handler): Claim file if it contains offload sections.
220 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
221 Thomas Schwinge <thomas@codesourcery.com>
222 Ilya Verbin <ilya.verbin@intel.com>
223 Andrey Turetskiy <andrey.turetskiy@intel.com>
225 * Makefile.am (libexecsubdir): Tweak for the possibility of being
226 configured for offload compiler.
227 (accel_dir_suffix, real_target_noncanonical): New variables substituted
229 * Makefile.in: Regenerate.
230 * configure: Regenerate.
231 * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
234 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
237 * configure: Regenerate.
239 2014-08-26 H.J. Lu <hongjiu.lu@intel.com>
242 * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
243 * configure.ac (gcc_build_dir): Set and AC_SUBST according to
245 * Makefile.in: Regenerated.
246 * configure: Likewise.
248 2014-06-13 Thomas Schwinge <thomas@codesourcery.com>
250 * configure.ac (--with-libiberty): New configure option.
251 * configure: Regenerate.
252 * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
254 (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
255 (liblto_plugin_la_DEPENDENCIES): Use them.
256 * Makefile.in: Regenerate.
258 2014-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
261 * configure.ac: Check for -static-libgcc.
262 * configure: Regenerate.
264 2014-04-17 Jakub Jelinek <jakub@redhat.com>
267 * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
268 (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
269 liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
270 over ../libiberty/pic/libiberty.a if the former exists.
271 * Makefile.in: Regenerated.
274 * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
275 * Makefile.in: Regenerated.
277 2014-04-02 Richard Biener <rguenther@suse.de>
279 * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
280 is set in COLLECT_GCC_OPTIONS.
282 2014-03-28 Richard Biener <rguenther@suse.de>
284 * lto-plugin.c (process_symtab): Handle EINTR and short reads.
286 2014-03-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
288 * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
290 * configure: Regenerate.
291 * Makefile.am (AM_LDFLAGS): New variable.
292 (liblto_plugin_la_LDFLAGS): Add it.
293 * Makefile.in: Regenerate.
295 2013-09-20 Alan Modra <amodra@gmail.com>
297 * configure: Regenerate.
299 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
301 * configure: Regenerated.
303 2012-05-29 Joseph Myers <joseph@codesourcery.com>
305 * lto-plugin.c: Fix typo.
307 2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
309 * configure: Regenerated.
311 2012-02-22 Kai Tietz <ktietz@redhat.com>
314 * lto-plugin.c (PRI_LL): New macro.
315 (dump_symtab): Use PRI_LL instead of ll in print.
316 (process_symtab): Use PRI_LL instead of ll in scan.
318 2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
320 * configure: Regenerate.
322 2011-12-19 Andreas Schwab <schwab@linux-m68k.org>
324 * configure: Regenerate.
326 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
328 * configure: Regenerate.
330 2011-10-02 Jan Hubicka <jh@suse.cz>
333 * lto-plugin.c (get_symbols_v2): New variable.
334 (write_resolution): Use V2 API when available.
335 (onload): Handle LDPT_GET_SYMBOLS_V2.
337 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
338 Andi Kleen <ak@linux.intel.com>
341 * lto-plugin.c (sym_aux): Change id to unsigned long long.
342 (plugin_symtab): Likewise.
343 (dump_symtab): Likewise.
344 (resolve_conflicts): Likewise.
345 (process_symtab): Likewise.
347 2011-08-10 Richard Guenther <rguenther@suse.de>
351 * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
352 * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror.
353 * configure: Regenerate.
354 * Makefile.in: Likewise.
355 * aclocal.m4: Likewise.
357 2011-04-20 Jim Meyering <meyering@redhat.com>
359 * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
361 2011-04-05 Richard Guenther <rguenther@suse.de>
364 * lto-plugin.c (claim_file_handler): Do not declare vars in code.
366 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
368 * Makefile.in: Regenerate.
369 * aclocal.m4: Regenerate.
370 * configure: Regenerate.
372 2011-02-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
374 * Makefile.am (all-local): Rename from 'all'.
375 * Makefile.in: Regenerate.
377 2011-02-12 Alexandre Oliva <aoliva@redhat.com>
380 * Makefile.am (gcc_build_dir, in_gcc_libs): New.
381 (liblto_plugin_la_LDFLAGS): Add -module.
382 (copy_lto_plugin): Renamed to...
383 ($(in_gcc_libs)): ... this. Add mkinstalldirs. Skip copying
385 * Makefile.in: Rebuild.
387 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
390 * Makefile.am (Wc): New helper for encoding -Wc,.
391 (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
392 (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
393 * Makefile.in: Regenerated.
395 2011-02-07 Paolo Bonzini <bonzini@gnu.org>
399 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
402 * Makefile.am (Wl): New helper for encoding -Wl,.
403 (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
404 * Makefile.in: Regenerated.
406 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
409 * Makefile.am (Wl): New helper for encoding -Wl,.
410 (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
411 * Makefile.in: Regenerated.
413 2011-01-25 Ian Lance Taylor <iant@google.com>
415 * lto-plugin.c (gold_version): New static variable.
416 (all_symbols_read_handler): Don't check pass_through_items if
417 using gold 1.11 or later.
418 (onload): Set gold_version if we see LDPT_GOLD_VERSION.
420 2011-01-12 Richard Guenther <rguenther@suse.de>
423 * lto-plugin.c (parse_table_entry): Use memcpy to access
426 2010-12-20 Dave Korn <dave.korn.cygwin@gmail.com>
428 * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
429 * Makefile.in: Regenerate.
431 2010-12-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
435 2010-12-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
437 * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
438 (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
439 (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
440 * Makefile.in: Regenerate.
442 2010-12-10 Dave Korn <dave.korn.cygwin@gmail.com>
446 * configure.ac (SYM_STYLE): Don't AC_DEFINE.
447 * lto-plugin.c (sym_style): Don't use it; default to ss_none.
448 * configure: Regenerate.
449 * config.h.in: Likewise.
451 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
455 * configure.ac: Invoke ACX_LT_HOST_FLAGS.
456 * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
457 override -bindir setting.
458 * aclocal.m4: Regenerate.
459 * configure: Regenerate.
460 * Makefile.in: Regenerate.
462 2010-12-05 Kai Tietz <kai.tietz@onevision.com>
464 * config.h.in: Regenerated.
465 * configure: Regenerated.
466 * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
467 * lto-plugin.c (WIFEXITED): Define default.
468 (WEXITSTATUS): Likeiwse.
470 2010-12-01 Kai Tietz <kai.tietz@onevision.com>
472 * config.h.in: Regenerated.
473 * configure: Regenerated.
474 * Makefile.in: Regenerated.
475 * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
476 * lto-plugin.c: Include sys/wait.h conditionally.
477 * aclocal.m4: Regenerated.
479 2010-11-13 Kai Tietz <kai.tietz@onevision.com>
481 * lto-plugin.c (add_output_files): Fix memory leak.
483 2010-11-11 Dave Korn <dave.korn.cygwin@gmail.com>
487 * configure.ac: Add AC_TYPE_INT64_T test.
488 * config.h.in: Regenerate.
489 * configure: Likewise.
490 * lto-plugin.c (debug): Use char not bool.
492 (check_1): Rename from check, and use int not bool for gate argument.
493 (check): Macro wrapper for the above to coerce gate argument into
494 boolean-valued integer in case it has pointer type.
495 (parse_table_entry): Use 0 not false.
496 (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
497 into two 32-bit parts and printing as hex ints.
499 2010-11-03 Dave Korn <dave.korn.cygwin@gmail.com>
502 * lto-plugin.c (claim_file_handler): Don't close file descriptor.
504 2010-11-03 Dave Korn <dave.korn.cygwin@gmail.com>
507 * lto-plugin.h: Delete.
508 * lto-plugin-elf.c: Likewise.
509 * lto-plugin-coff.c: Likewise.
510 * configure.ac: Don't use libelf, don't source config.gcc.
511 (LIBELFLIBS): Delete.
513 (LTO_FORMAT): Delete.
514 (SYM_STYLE): Add AC_DEFINE var, set based on $target.
515 (config.h): Add AC_CONFIG_HEADERS directive.
516 * Makefile.am (LIBELFLIBS): Delete.
518 (LTO_FORMAT): Delete.
520 (AM_CPPFLAGS): Use it. Don't use LIBELFINC.
521 (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
522 any object-format-specific source file in the link.
523 (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
524 * config.h.in: Generate.
525 * configure: Regenerate.
526 * Makefile.in: Likewise.
527 * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
528 (LTO_SEGMENT_NAME): New definition.
529 (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
530 (LTO_SECTION_PREFIX_LEN): New definition.
531 (struct sym_aux): Struct definition moved here from lto-plugin.h.
532 (struct plugin_symtab): Likewise.
533 (struct plugin_objfile): Likewise.
534 (struct plugin_objfile): New struct def.
535 (enum symbol_style): New enum type.
536 (add_symbols): Make static.
537 (claimed_files): Likewise.
538 (num_claimed_files): Likewise.
539 (sym_style): New global.
540 (check): Make static.
541 (parse_table_entry): Likewise. Respect sym_style when extracting
542 symbol from symtab entry.
543 (translate): Make static.
544 (resolve_conflicts): Likewise.
545 (process_symtab): New function, per-section callback version of
546 old object-format-specific handling from deleted lto-plugin-elf.c.
547 (claim_file_handler): Convert ELF-specific version from deleted
548 lto-plugin-elf.c to simple_object interface and move here.
549 (process_options): Allow new '-sym-style=' option.
550 (onload): Don't call deleted onload_format_checks hook.
552 2010-10-11 Kai Tietz <kai.tietz@onevision.com>
554 * lto-plugin.c (dump_symtab): Correct printf argument type.
555 (finish_conflict_resolution): Initialize resolution.
557 2010-10-08 H.J. Lu <hongjiu.lu@intel.com>
560 * configure.ac: Add AC_CANONICAL_SYSTEM.
561 * configure: Regenerated.
563 2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
565 * configure.ac: Source config.gcc to determine lto_binary_reader.
566 (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
567 * Makefile.am (LTO_FORMAT): Import.
568 (liblto_plugin_la_SOURCES): Add object format dependent module
569 defined by LTO_FORMAT.
570 (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
571 and work around libtool warning.
572 * configure: Regenerate.
573 * Makefile.in: Likewise.
574 * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
575 (struct sym_aux): Likewise.
576 (struct plugin_symtab): Likewise.
577 (struct plugin_file_info): Likewise.
578 (LTO_SECTION_PREFIX): Likewise.
579 (add_symbols): Make non-static.
580 (claimed_files): Likewise.
581 (num_claimed_files): Likewise.
583 (parse_table_entry): Likewise.
584 (translate): Likewise.
585 (resolve_conflicts): Likewise.
586 (process_symtab): Move to new lto-plugin-elf.c object format dependent
588 (claim_file_handler): Likewise, and make non-static.
589 (onload): Call new onload_format_checks function.
590 * lto-plugin.h: New file.
591 (LTO_SECTION_PREFIX): Move here.
592 (struct sym_aux): Likewise.
593 (struct plugin_symtab): Likewise.
594 (struct plugin_file_info): Likewise.
595 (claim_file_handler): Add new function prototype.
596 (onload_format_checks): Likewise.
597 (check): Declare extern.
598 (translate): Likewise.
599 (parse_table_entry): Likewise.
600 (resolve_conflicts): Likewise.
601 (add_symbols): Likewise.
602 (claimed_files): Likewise.
603 (num_claimed_files): Likewise.
604 * lto-plugin-elf.c (process_symtab): Move here.
605 (claim_file_handler): Likewise, and make non-static.
606 (onload_format_checks): New function factored out from onload.
607 * lto-plugin-coff.c (claim_file_handler): New function stub.
608 (onload_format_checks): Likewise.
610 2010-08-05 Andi Kleen <ak@linux.intel.com>
612 * lto-plugin.c: Include <hashtab.h>
613 (sym_aux): Add next_conflict field to save conflict chains.
614 (plugin_file_info): Add conflicts symtab.
615 (parse_table_entry): Initialize aux->next_conflict.
616 (process_symtab): Increment found.
618 (finish_conflict_resolution): Add.
620 (write_resolution): Remove symbols loop and move into
621 dump_symtab. Call dump_symtab for main symbol and conflicts table.
622 Call free_symtab to free conflicts table.
626 (symbol_strength): Add.
627 (resolve_conflicts): Add.
628 (claim_file_handler): Add n variable. Check return value of
629 process_symtab. Call resolve_conflicts.
631 2010-07-27 Andi Kleen <ak@linux.intel.com>
633 * lto-plugin.c (translate): Remove debug fprintf.
635 2010-07-23 H.J. Lu <hongjiu.lu@intel.com>
638 * lto-plugin.c (translate): Cast to unsigned long.
640 2010-07-23 Andi Kleen <ak@linux.intel.com>
643 * lto-plugin.c (sym_aux): Add.
644 (plugin_symtab): Remove slots. Add aux and id.
645 (parse_table_entry): Change to use aux instead of slots.
646 (LTO_SECTION_PREFIX): Add.
647 (translate): Improve buffer allocation. Change to append
648 symbols to existing out buffer.
649 (get_section): Remove.
650 (process_symtab): Add.
651 (free_2): Free symtab->aux.
652 (write_resolution): Handle aux instead of slots.
653 Print sub id to resolution file.
654 (claim_file_handler): Clear lto_file. Replace get_symtab/translate
655 calls with call to process_symtab.
657 2010-07-22 Richard Guenther <rguenther@suse.de>
659 * Makefile.am: New copy_lto_plugin rule to install the plugin
661 * Makefile.in: Regenerated.
663 2010-05-21 Richard Guenther <rguenther@suse.de>
665 * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
667 2010-05-07 Richard Guenther <rguenther@suse.de>
669 * lto-plugin.c (free_2): Do not free resolution_file.
670 (write_resolution): Check that we were passed a resolution file.
671 (all_symbols_read_handler): Adjust.
672 (cleanup_handler): Do not remove the resolution file.
673 (process_option): Handle -fresolution=.
675 2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
678 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
679 * Makefile.in: Regenerate.
681 2010-04-23 Richard Guenther <rguenther@suse.de>
684 * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
685 (translate): Likewise.
686 (all_symbols_read_handler): Likewise.
687 (claim_file_handler): Likewise.
688 (process_option): Likewise.
689 (add_output_files): Likewise. Remove filename length limit.
691 2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
693 * Makefile.in: Regenerate.
694 * aclocal.m4: Regenerate.
696 2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
699 * lto-plugin.c (cleanup_handler): Delete temporary output files.
701 2010-01-11 Richard Guenther <rguenther@suse.de>
704 * Makefile.am: Disable dependencies.
705 * Makefile.in: Regenerated.
707 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
710 * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
713 2009-12-05 H.J. Lu <hongjiu.lu@intel.com>
716 * configure: Regenerated.
717 * Makefile.in: Likewise.
719 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
722 * lto-plugin.c (claim_file_handler): Print offsets in hex.
724 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
726 * lto-plugin.c (write_resolution): Assume resolution_file is set.
727 Print the symbol name.
728 (all_symbols_read_handler): Create a resolution file.
730 (cleanup_handler): Remove the resolution file.
731 (process_option): Drop the -resolution option.
733 2009-11-05 Rafael Avila de Espindola <espindola@google.com>
735 * lto-plugin.c (temp_obj_dir_name): Remove.
736 (arguments_file_name): New.
737 (free_2): Free arguments_file_name instead of temp_obj_dir_name.
738 (exec_lto_wrapper): Create arguments file with make_temp_file.
739 (cleanup_handler): Don't remove the temporary directory. Remove the
741 (onload): Don't create the temporary directory.
743 2009-11-04 Richard Guenther <rguenther@suse.de>
744 Rafael Avila de Espindola <espindola@google.com>
746 * lto-plugin.c (plugin_file_info): Remove temp field.
747 (cleanup_handler): Don't delete temporary objects.
748 (claim_file_handler): Don't create temporary objects.
750 2009-11-04 Rafael Avila de Espindola <espindola@google.com>
752 * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
754 2009-10-30 Rafael Avila de Espindola <espindola@google.com>
757 * lto-plugin.c (claim_file_handler): Close files that we created.
759 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
761 * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
764 2009-10-27 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
767 * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
768 * configure: Regenerate.
770 2009-10-26 Richard Guenther <rguenther@suse.de>
772 * configure.ac: Use AM_MAINTAINER_MODE.
773 * acinclude.m4: Remove.
774 * configure: Re-generate.
775 * Makefile.in: Likewise.
776 * aclocal.m4: Likewise.
778 2009-10-19 Rafael Avila de Espindola <espindola@google.com>
781 * configure: Regenerate.
782 * configure.ac: Add AC_TYPE_UINT64_T.
784 2009-10-16 Rafael Avila de Espindola <espindola@google.com>
786 * lto-plugin.c (message): New variable.
787 (check): New function.
788 (parse_table_entry, translate, write_resolution,add_output_files,
789 exec_lto_wrapper,claim_file_handler, onload): Use check instead of
791 (cleanup_handler): Use check instead of assert. Remove the arguments
794 2009-10-15 Rafael Avila de Espindola <espindola@google.com>
796 * lto-plugin.c (resolution_file): New.
797 (free_1): Update comment.
798 (free_2): Free resolution_file.
799 (write_resolution): Write resolution to specified file. Use the
800 syms array from the symbol table.
801 (all_symbols_read_handler): Delay call to free_1 past call to
803 (process_option): Add a -resolution option.
805 2009-10-13 Richard Guenther <rguenther@suse.de>
807 * Makefile.am (liblto_plugin_la_LIBADD): Link against the
809 * Makefile.in: Regenerated.
811 2009-10-08 Rafael Avila de Espindola <espindola@google.com>
813 * lto-plugin.c (add_input_library): New.
814 (all_symbols_read_handler): Use add_input_library for items that
816 (process_option): Fit in 80 columns.
817 (onload): Handle LDPT_ADD_INPUT_LIBRARY.
819 2009-10-02 Diego Novillo <dnovillo@google.com>
821 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
822 and -D_FILE_OFFSET_BITS=64.
823 * configure.ac: Add AC_SYS_LARGEFILE.
824 * configure: Regenerate.
825 * Makefile.in: Regenerate.
826 * lto-plugin.c: Fix copyright boilerplate.
828 2009-10-02 Diego Novillo <dnovillo@google.com>
830 * Makefile.am (ACLOCAL_AMFLAGS): Define.
831 * aclocal.m4: Regenerate with aclocal-2.64
832 * acinclude.m4: Remove.
833 * Makefile.in: Regenerate with automake-1.11
834 * configure.ac (AC_PREREQ): Update to 2.64.
835 * configure: Regenerate.
837 2009-10-02 Diego Novillo <dnovillo@google.com>
839 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
840 and -D_FILE_OFFSET_BITS=64.
841 * configure.ac: Add AC_SYS_LARGEFILE.
842 * configure: Regenerate.
843 * Makefile.in: Regenerate.
844 * lto-plugin.c: Fix copyright boilerplate.
846 2009-10-02 Diego Novillo <dnovillo@google.com>
848 * Makefile.am (ACLOCAL_AMFLAGS): Define.
849 * aclocal.m4: Regenerate with aclocal-2.64
850 * acinclude.m4: Remove.
851 * Makefile.in: Regenerate with automake-1.11
852 * configure.ac (AC_PREREQ): Update to 2.64.
853 * configure: Regenerate.
855 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
857 * Makefile.am (liblto_plugin_la_SOURCES): Remove
858 $(top_srcdir)/../gcc/lto/common.c
859 * Makefile.in: Regenerate.
861 2009-10-01 Rafael Avila de Espindola <espindola@google.com>
863 * lto-plugin.c (pass_through_items): New.
864 (num_pass_through_items): New.
865 (all_symbols_read_handler): Update to use the -pass-through option.
866 (process_option): Replace -libgcc with -pass-through.
868 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
870 * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
871 register_cleanup to be set.
873 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
875 * Makefile.am: Remove all reference to ltosymtab.
876 * Makefile.in: Regenerate.
877 * lto-symtab.c: Remove.
879 2009-05-21 Diego Novillo <dnovillo@google.com>
881 * configure.ac: Remove call to AC_CHECK_GELF.
882 Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
883 * acinclude.m4: Do not include ../config/libelf.m4
884 * Makefile.am (LIBELFLIBS): Define.
886 (AM_CPPFLAGS): Add $(LIBELFINC).
887 (ltosymtab_LDADD): Add $(LIBELFLIBS).
888 (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
889 * lto-plugin.c: Always include <gelf.h>
890 * lto-symtab.c: Likewise.
891 * configure: Regenerate.
892 * Makefile.in: Regenerate.
894 2009-03-23 Rafael Avila de Espindola <espindola@google.com>
896 * lto-plugin.c (libgcc_filename): New.
897 (all_symbols_read_handler): Pass libgcc to the linker.
898 (all_symbols_read_handler): Parse -libgcc
900 2009-02-05 Rafael Avila de Espindola <espindola@google.com>
902 * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
903 * Makefile.in: Regenerate.
904 * lto-plugin.c (add_output_files): Argument is now a FILE.
905 (exec_lto_wrapper): Use writeargv and pex.
907 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
910 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
911 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
914 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
916 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
918 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
920 * lto-plugin.c: Include libiberty.h.
921 (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
924 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
926 * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
929 2009-01-28 Rafael Avila de Espindola <espindola@google.com>
931 * lto-plugin.c (plugin_file_info): Remove fd and elf.
932 (parse_table_entry): strdup entry->name and entry->comdat_key.
933 (free_1): Free name and comdat_key. Don't close the file. Don't call
935 (claim_file_handler): Always call elf_end.
937 2008-12-23 Rafael Avila de Espindola <espindola@google.com>
939 * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
940 -D_FILE_OFFSET_BITS=64
941 * Makefile.in: Regenerate
943 2008-12-22 Rafael Avila de Espindola <espindola@google.com>
945 * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
946 (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
947 * Makefile.in: Regenerate.
948 * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
949 * configure: Regenerate.
950 * configure.ac: Add AC_SUBST(target_noncanonical).
952 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
954 * lto-plugin.c: Include stdbool.h.
955 (debug, nop): Declare as bool.
957 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
959 * lto-plugin.c (nop): New.
960 (use_original_files): New.
961 (all_symbols_read_handler): Call use_original_files if nop is true.
962 (process_option): Parse the -nop option.
964 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
966 * lto-plugin.c (debug): New.
967 (exec_lto_wrapper): Print argv if debug is true.
968 (process_option): Process the -debug command line option.
970 2008-12-03 Rafael Avila de Espindola <espindola@google.com>
972 * lto-plugin.c (process_option): The argument is now a single option,
973 not a space separated list.
975 2008-12-02 Rafael Avila de Espindola <espindola@google.com>
977 * lto-plugin.c: Include sys/types.h and sys/wait.h
978 (output_files, num_output_files, lto_wrapper_argv,
979 lto_wrapper_num_args): New.
980 (free_2): Free output_files.
981 (write_resolution): Disable.
982 (add_output_files): New.
983 (exec_lto_wrapper): New.
984 (all_symbols_read_handler): Run lto-wrapper.
985 (claim_file_handler): Free lto_file.name and call elf_end.
986 (process_option): New.
988 2008-11-26 Rafael Espindola <espindola@google.com>
990 * lto-plugin.c (add_input_file): New.
991 (get_section): Return NULL if get_section fails.
992 (write_resolution): New.
993 (all_symbols_read_handler): Call add_input_file.
994 (claim_file_handler): Unlink the correct file.
995 (onload): Record add_input_file.
997 2008-09-23 Rafael Espindola <espindola@google.com>
999 * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
1000 Update the location of common.c.
1001 * Makefile.in: Regenerate.
1002 * common.c: Moved to gcc/lto.
1003 * common.h: Moved to gcc/lto.
1004 * lto-plugin.c: Update the location of common.h.
1005 * lto-symtab.c: Update the location of common.h.
1007 2008-09-23 Rafael Espindola <espindola@google.com>
1009 * common.c: Include common.h.
1010 (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
1012 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
1015 2008-09-23 Rafael Espindola <espindola@google.com>
1017 * lto-plugin.c (plugin_file_info): Add temp.
1018 (cleanup_handler): Only delete temporary files.
1019 (claim_file_handler): Initialize lto_file.temp.
1021 2008-09-23 Rafael Espindola <espindola@google.com>
1023 * plugin-api.h: Moved to include.
1025 2008-09-23 Rafael Espindola <espindola@google.com>
1027 * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
1030 2008-09-22 Rafael Espindola <espindola@google.com>
1032 * plugin-api.h: Copy from binutils' cvs.
1034 2008-09-22 Rafael Espindola <espindola@google.com>
1036 * lto-symtab.c (get_symbols, add_symbols): Update signature.
1037 * plugin-api.h: Copy from binutils' cvs.
1039 2008-09-22 Rafael Espindola <espindola@google.com>
1041 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
1044 2008-09-10 Rafael Espindola <espindola@google.com>
1046 * lto-plugin.c (onload): add missing break statements and asserts.
1047 * lto-symtab.c (claim_file_handler): Make it static.
1048 (all_symbols_read_handler): Make it static.
1049 (all_file_handles): Make it static.
1050 (num_file_handles): Make it static.
1051 (register_claim_file): Make it static.
1052 (register_object): Indent properly.
1054 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
1056 * Makefile.am (ltosymtab_LDADD): Add -lelf.
1057 * Makefiel.in: Regenerate.
1058 * lto-plugin.c: Include ar.h.
1059 (claim_file_handler): Handle file->offset != 0.
1060 * lto-symtab.c: Include gelf.h.
1061 (all_file_handles): Change type.
1062 (register_object): New.
1063 (register_file): Add support for archives.
1064 (resolve): Update to new type of all_file_handles.
1065 (print): Update to new type of all_file_handles.
1066 (free_all): Update to new type of all_file_handles.
1067 (main): Update to new type of all_file_handles.
1069 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
1071 * lto-plugin.c (get_string_table): Remove.
1072 (get_section): Use elf_strptr instead of get_string_table.
1074 2008-09-08 Doug Kwan <dougkwan@google.com>
1076 * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
1077 to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
1079 2008-09-08 Rafael Avila de Espindola <espindola@google.com>
1081 * Makefile.am (ltosymtab_SOURCES): add common.c.
1082 (ltosymtab_CFLAGS): New.
1083 (liblto_plugin_la_SOURCES): Add common.c.
1084 * Makefile.in: Regenerate.
1087 * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1088 (plugin_symtab): New.
1089 (plugin_file_info): New.
1090 (register_all_symbols_read): New.
1092 (claimed_files): New.
1093 (num_claimed_files): New.
1094 (translate): Don't drop the slot number.
1097 (all_symbols_read_handler): New.
1098 (claim_file_handler): Record every claimed file.
1099 (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1101 * lto-symtab.c: Include stdlib.h, string.h and common.h.
1102 (current_file_handle): Remove.
1103 (ld_plugin_all_symbols_read_handler): New.
1104 (plugin_handle): New.
1106 (all_file_handles): New.
1107 (num_file_handles): New.
1109 (register_all_symbols_read): New.
1110 (add_symbols): Don't print the symbols, just record them.
1111 (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1113 (load_plugin): Use plugin_handle.
1114 (register_file): Add the file handle to all_file_handles.
1117 (unload_plugin): New.
1119 (main): Call all_symbols_read_handler and free resources.
1121 2008-09-03 Rafael Avila de Espindola <espindola@google.com>
1123 * Makefile.am (AM_CFLAGS): New.
1124 (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1125 (lib_LTLIBRARIES): New.
1126 (liblto_plugin_la_SOURCES): New.
1127 (liblto_plugin_la_LIBADD): New.
1128 * Makefile.in: Regenerate.
1129 * acinclude.m4: Don't include ../config/acx.m4 and
1130 ../config/no-executables.m4.
1131 Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1133 * aclocal.m4: Regenerate.
1134 * configure: Regenerate.
1135 * configure.ac: Use AM_PROG_LIBTOOL.
1136 * lto-plugin.c: New.
1137 * lto-symtab.c: Rewrite to use the plugin.
1138 * plugin-api.h: New.
1140 2008-08-25 Rafael Avila de Espindola <espindola@google.com>
1142 * configure: Regenerate.
1143 * configure.ac: Use AC_CHECK_GELF.
1144 * lto-symtab.c: Include gelf.h.
1145 (get_string_table): Use size independent API.
1146 (printTable): Use lld to print 64 bit integers.
1148 2008-08-22 Rafael Avila de Espindola <espindola@google.com>
1150 * lto-symtab.c (parse_table_entry): Assert entry->kind and
1151 entry->visibility are valid.
1153 2008-07-22 Rafael Avila de Espindola <espindola@google.com>
1154 * lto-symtab.c (table_entry): Add comdat.
1155 (parse_table_entry): Read comdat.
1157 2008-08-21 Rafael Espindola <espindola@google.com>
1161 * acinclude.m4: New.
1164 * configure.ac: New.
1165 * lto-symtab.c: New.