1 2021-05-10 Martin Liska <mliska@suse.cz>
3 * lto-plugin.c (LTO_SEGMENT_NAME): Remove.
4 (LTO_SYMTAB_PREFIX): Likewise.
5 (LTO_SYMTAB_PREFIX_LEN): Likewise.
6 (LTO_SYMTAB_EXT_PREFIX): Likewise.
7 (LTO_SYMTAB_EXT_PREFIX_LEN): Likewise.
8 (LTO_LTO_PREFIX): Likewise.
9 (LTO_LTO_PREFIX_LEN): Likewise.
10 (OFFLOAD_SECTION): Likewise.
11 (OFFLOAD_SECTION_LEN): Likewise.
12 (startswith): New function.
13 (all_symbols_read_handler): Use it.
14 (process_symtab): Likewise.
15 (process_symtab_extension): Likewise.
16 (process_offload_section): Likewise.
17 (process_option): Likewise.
19 2021-05-03 H.J. Lu <hjl.tools@gmail.com>
22 * configure: Regenerated.
24 2021-04-21 Martin Liska <mliska@suse.cz>
26 * lto-plugin.c (exec_lto_wrapper): Make a temp variable.
28 2021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
30 * configure: Re-generate.
32 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
34 * configure: Regenerate.
36 2020-11-25 Matthew Malcomson <matthew.malcomson@arm.com>
38 * Makefile.am: Avoid using sanitizer.
39 * Makefile.in: Regenerate.
41 2020-09-10 Jonathan Yong <10walls@gmail.com>
43 * Makefile.am: drop versioning from libtool completely.
44 * Makefile.in: regenerate.
46 2020-09-09 Nick Clifton <nickc@redhat.com>
48 * lto-plugin.c (struct plugin_symtab): Add last_sym field.
49 (parse_symtab_extension): Only read as many entries as are
50 available in the buffer. Store the data read into the symbol
51 table indexed from last_sym. Increment last_sym.
53 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
56 * configure: Regenerated.
58 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
61 * configure: Regenerated.
63 2020-05-26 Alexandre Oliva <oliva@adacore.com>
65 * lto-plugin.c (skip_in_suffix): New.
66 (exec_lto_wrapper): Use skip_in_suffix and concat to build
67 non-temporary output names.
68 (onload): Look for -dumpdir in COLLECT_GCC_OPTIONS, and
69 override link_output_name with it.
71 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
74 * configure: Regenerated.
76 2020-05-05 Eric Botcazou <ebotcazou@adacore.com>
78 * lto-plugin.c: Document -linker-output-auto-notlo-rel option.
79 (linker_output_set): Change type to bool.
80 (linker_output_known): Likewise.
81 (linker_output_auto_nolto_rel): New variable.
82 (all_symbols_read_handler): Take it into account.
83 <LDPO_REL>: Do not issue the warning if it is set.
84 (process_option): Process -linker-output-auto-notlo-rel.
85 (cleanup_handler): Remove unused variable.
86 (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change.
88 2020-04-28 H.J. Lu <hongjiu.lu@intel.com>
91 * configure: Regenerated.
93 2020-04-25 H.J. Lu <hongjiu.lu@intel.com>
96 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
97 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
98 AC_SUBST(CET_HOST_FLAGS).
99 * Makefile.in: Regenerated.
100 * aclocal.m4: Likewise.
101 * configure: Likewise.
103 2020-03-19 Martin Liska <mliska@suse.cz>
105 * lto-plugin.c (LTO_SECTION_PREFIX): Rename to ...
106 (LTO_SYMTAB_PREFIX): ... this.
107 (LTO_SECTION_PREFIX_LEN): Rename to ...
108 (LTO_SYMTAB_PREFIX_LEN): ... this.
109 (LTO_SYMTAB_EXT_PREFIX): New.
110 (LTO_SYMTAB_EXT_PREFIX_LEN): New.
111 (LTO_LTO_PREFIX): New.
112 (LTO_LTO_PREFIX_LEN): New.
113 (parse_table_entry): Fill up unused to zero.
114 (parse_table_entry_extension): New.
115 (parse_symtab_extension): New.
116 (finish_conflict_resolution): Change type
118 (process_symtab): Use new macro name.
119 (process_symtab_extension): New.
120 (claim_file_handler): Parse also process_symtab_extension.
121 (onload): Call new add_symbols_v2.
123 2020-01-01 Jakub Jelinek <jakub@redhat.com>
125 Update copyright years.
127 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
129 * configure: Regenerate.
131 2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
133 * lto-plugin.c (cleanup_handler): Remove unused var.
135 2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
137 * lto-plugin.c (exec_lto_wrapper): Make the wrapper
138 arguments filename more user-friendly.
139 (file_exists, maybe_unlink): New.
140 (cleanup_handler): Use maybe unlink to handle the
141 case when temps should be saved.
142 (process_option): Look for -v, —-version, -save-temps.
143 (onload): Record the linker output file name.
144 Check for -v, —-version, -save-temps in the GCC collect
147 2019-02-26 Martin Liska <mliska@suse.cz>
149 * lto-symtab.c: Remove.
151 2019-01-01 Jakub Jelinek <jakub@redhat.com>
153 Update copyright years.
155 2018-10-31 Joseph Myers <joseph@codesourcery.com>
158 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
159 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
161 2018-05-30 Jan Hubicka <jh@suse.cz>
163 * lto-plugin.c: (non_claimed_files): New static var.
164 (linker_ouput_known): New static var.
165 (all_symbols_read_handler): When user specifies linker output do not
166 imply it; output warning when nonlto-rel mode is forced.
167 (claim_file_header): Record number of nonclaimed files.
168 (process_option): Remember if linker output is known
170 2018-04-18 David Malcolm <dmalcolm@redhat.com>
173 * configure: Regenerate.
175 2018-01-03 Jakub Jelinek <jakub@redhat.com>
177 Update copyright years.
179 2017-07-21 Georg-Johann Lay <avr@gjlay.de>
182 * lto-plugin.c (claim_file_handler): Use xasprintf instead of
184 [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
186 2017-01-17 Jakub Jelinek <jakub@redhat.com>
189 * configure.ac: Add GCC_BASE_VER.
190 * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
191 get version from BASE-VER file.
192 * configure: Regenerated.
193 * Makefile.in: Regenerated.
195 2017-01-04 Jakub Jelinek <jakub@redhat.com>
197 Update copyright years.
199 2016-11-15 Matthias Klose <doko@ubuntu.com>
201 * configure: Regenerate.
203 2016-02-25 Ilya Verbin <ilya.verbin@intel.com>
206 * lto-plugin.c (struct plugin_offload_file): New.
207 (offload_files): Change type.
208 (offload_files_last, offload_files_last_obj): New.
209 (offload_files_last_lto): New.
210 (free_2): Adjust accordingly.
211 (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
212 Don't call free_1 for offload_files. Write names of object files with
213 offloading to the temporary file. Add new option to lto_arg_ptr.
214 (claim_file_handler): Don't claim file if it contains offload sections
215 without LTO sections. If it contains offload sections, add to the list.
217 2016-01-15 Martin Liska <mliska@suse.cz>
219 * lto-plugin.c (all_symbols_read_handler): Assign default
220 value to a string variable.
222 2015-11-25 Jan Hubicka <jh@suse.cz>
225 * lto-plugin.c (linker_output, linker_output_set): New statics.
226 (all_symbols_read_handler): Add -flinker-output option.
227 (onload): Record linker_output info.
229 2015-07-02 Uros Bizjak <ubizjak@gmail.com>
231 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
232 * configure: Regenerate.
233 * config.h.in: Ditto.
235 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
237 * Makefile.am: Drop 'by automake version' from top-level comment.
238 * Makefile.in: Regenerated with automake-1.11.6.
239 * aclocal.m4: Likewise.
240 * configure: Likewise.
242 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
244 * lto-plugin.c (release_input_file): Removed.
245 (claim_file_handler): Don't call release_input_file.
246 (onload): Don't set release_input_file.
248 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
250 * lto-plugin.c (claim_file_handler): Pass handle to
253 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
255 * lto-plugin.c (claim_file_handler): Call release_input_file only
258 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
260 * lto-plugin.c (claim_file_handler): Call release_input_file only
263 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
266 * lto-plugin.c (release_input_file): New.
267 (claim_file_handler): Call release_input_file.
268 (onload): Set release_input_file.
270 2014-12-09 Ilya Verbin <ilya.verbin@intel.com>
272 * lto-plugin.c (offload_files, num_offload_files): New static variables.
273 (free_1): Use arguments instead of global variables.
274 (free_2): Free offload_files.
275 (all_symbols_read_handler): Add names from offload_files to lto-wrapper
277 (claim_file_handler): Do not add file to claimed_files if it contains
278 offload sections without LTO sections. Add it to offload_files instead.
280 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
283 * configure: Regenerated.
285 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
286 Bernd Schmidt <bernds@codesourcery.com>
287 Andrey Turetskiy <andrey.turetskiy@intel.com>
288 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
290 * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
291 (struct plugin_objfile): Add new field "offload".
292 (process_offload_section): New static function.
293 (claim_file_handler): Claim file if it contains offload sections.
295 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
296 Thomas Schwinge <thomas@codesourcery.com>
297 Ilya Verbin <ilya.verbin@intel.com>
298 Andrey Turetskiy <andrey.turetskiy@intel.com>
300 * Makefile.am (libexecsubdir): Tweak for the possibility of being
301 configured for offload compiler.
302 (accel_dir_suffix, real_target_noncanonical): New variables substituted
304 * Makefile.in: Regenerate.
305 * configure: Regenerate.
306 * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
309 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
312 * configure: Regenerate.
314 2014-08-26 H.J. Lu <hongjiu.lu@intel.com>
317 * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
318 * configure.ac (gcc_build_dir): Set and AC_SUBST according to
320 * Makefile.in: Regenerated.
321 * configure: Likewise.
323 2014-06-13 Thomas Schwinge <thomas@codesourcery.com>
325 * configure.ac (--with-libiberty): New configure option.
326 * configure: Regenerate.
327 * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
329 (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
330 (liblto_plugin_la_DEPENDENCIES): Use them.
331 * Makefile.in: Regenerate.
333 2014-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
336 * configure.ac: Check for -static-libgcc.
337 * configure: Regenerate.
339 2014-04-17 Jakub Jelinek <jakub@redhat.com>
342 * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
343 (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
344 liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
345 over ../libiberty/pic/libiberty.a if the former exists.
346 * Makefile.in: Regenerated.
349 * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
350 * Makefile.in: Regenerated.
352 2014-04-02 Richard Biener <rguenther@suse.de>
354 * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
355 is set in COLLECT_GCC_OPTIONS.
357 2014-03-28 Richard Biener <rguenther@suse.de>
359 * lto-plugin.c (process_symtab): Handle EINTR and short reads.
361 2014-03-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
363 * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
365 * configure: Regenerate.
366 * Makefile.am (AM_LDFLAGS): New variable.
367 (liblto_plugin_la_LDFLAGS): Add it.
368 * Makefile.in: Regenerate.
370 2013-09-20 Alan Modra <amodra@gmail.com>
372 * configure: Regenerate.
374 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
376 * configure: Regenerated.
378 2012-05-29 Joseph Myers <joseph@codesourcery.com>
380 * lto-plugin.c: Fix typo.
382 2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
384 * configure: Regenerated.
386 2012-02-22 Kai Tietz <ktietz@redhat.com>
389 * lto-plugin.c (PRI_LL): New macro.
390 (dump_symtab): Use PRI_LL instead of ll in print.
391 (process_symtab): Use PRI_LL instead of ll in scan.
393 2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
395 * configure: Regenerate.
397 2011-12-19 Andreas Schwab <schwab@linux-m68k.org>
399 * configure: Regenerate.
401 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
403 * configure: Regenerate.
405 2011-10-02 Jan Hubicka <jh@suse.cz>
408 * lto-plugin.c (get_symbols_v2): New variable.
409 (write_resolution): Use V2 API when available.
410 (onload): Handle LDPT_GET_SYMBOLS_V2.
412 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
413 Andi Kleen <ak@linux.intel.com>
416 * lto-plugin.c (sym_aux): Change id to unsigned long long.
417 (plugin_symtab): Likewise.
418 (dump_symtab): Likewise.
419 (resolve_conflicts): Likewise.
420 (process_symtab): Likewise.
422 2011-08-10 Richard Guenther <rguenther@suse.de>
426 * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
427 * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror.
428 * configure: Regenerate.
429 * Makefile.in: Likewise.
430 * aclocal.m4: Likewise.
432 2011-04-20 Jim Meyering <meyering@redhat.com>
434 * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
436 2011-04-05 Richard Guenther <rguenther@suse.de>
439 * lto-plugin.c (claim_file_handler): Do not declare vars in code.
441 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
443 * Makefile.in: Regenerate.
444 * aclocal.m4: Regenerate.
445 * configure: Regenerate.
447 2011-02-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
449 * Makefile.am (all-local): Rename from 'all'.
450 * Makefile.in: Regenerate.
452 2011-02-12 Alexandre Oliva <aoliva@redhat.com>
455 * Makefile.am (gcc_build_dir, in_gcc_libs): New.
456 (liblto_plugin_la_LDFLAGS): Add -module.
457 (copy_lto_plugin): Renamed to...
458 ($(in_gcc_libs)): ... this. Add mkinstalldirs. Skip copying
460 * Makefile.in: Rebuild.
462 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
465 * Makefile.am (Wc): New helper for encoding -Wc,.
466 (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
467 (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
468 * Makefile.in: Regenerated.
470 2011-02-07 Paolo Bonzini <bonzini@gnu.org>
474 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
477 * Makefile.am (Wl): New helper for encoding -Wl,.
478 (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
479 * Makefile.in: Regenerated.
481 2011-02-07 Kai Tietz <kai.tietz@onevision.com>
484 * Makefile.am (Wl): New helper for encoding -Wl,.
485 (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
486 * Makefile.in: Regenerated.
488 2011-01-25 Ian Lance Taylor <iant@google.com>
490 * lto-plugin.c (gold_version): New static variable.
491 (all_symbols_read_handler): Don't check pass_through_items if
492 using gold 1.11 or later.
493 (onload): Set gold_version if we see LDPT_GOLD_VERSION.
495 2011-01-12 Richard Guenther <rguenther@suse.de>
498 * lto-plugin.c (parse_table_entry): Use memcpy to access
501 2010-12-20 Dave Korn <dave.korn.cygwin@gmail.com>
503 * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
504 * Makefile.in: Regenerate.
506 2010-12-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
510 2010-12-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
512 * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
513 (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
514 (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
515 * Makefile.in: Regenerate.
517 2010-12-10 Dave Korn <dave.korn.cygwin@gmail.com>
521 * configure.ac (SYM_STYLE): Don't AC_DEFINE.
522 * lto-plugin.c (sym_style): Don't use it; default to ss_none.
523 * configure: Regenerate.
524 * config.h.in: Likewise.
526 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
530 * configure.ac: Invoke ACX_LT_HOST_FLAGS.
531 * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
532 override -bindir setting.
533 * aclocal.m4: Regenerate.
534 * configure: Regenerate.
535 * Makefile.in: Regenerate.
537 2010-12-05 Kai Tietz <kai.tietz@onevision.com>
539 * config.h.in: Regenerated.
540 * configure: Regenerated.
541 * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
542 * lto-plugin.c (WIFEXITED): Define default.
543 (WEXITSTATUS): Likeiwse.
545 2010-12-01 Kai Tietz <kai.tietz@onevision.com>
547 * config.h.in: Regenerated.
548 * configure: Regenerated.
549 * Makefile.in: Regenerated.
550 * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
551 * lto-plugin.c: Include sys/wait.h conditionally.
552 * aclocal.m4: Regenerated.
554 2010-11-13 Kai Tietz <kai.tietz@onevision.com>
556 * lto-plugin.c (add_output_files): Fix memory leak.
558 2010-11-11 Dave Korn <dave.korn.cygwin@gmail.com>
562 * configure.ac: Add AC_TYPE_INT64_T test.
563 * config.h.in: Regenerate.
564 * configure: Likewise.
565 * lto-plugin.c (debug): Use char not bool.
567 (check_1): Rename from check, and use int not bool for gate argument.
568 (check): Macro wrapper for the above to coerce gate argument into
569 boolean-valued integer in case it has pointer type.
570 (parse_table_entry): Use 0 not false.
571 (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
572 into two 32-bit parts and printing as hex ints.
574 2010-11-03 Dave Korn <dave.korn.cygwin@gmail.com>
577 * lto-plugin.c (claim_file_handler): Don't close file descriptor.
579 2010-11-03 Dave Korn <dave.korn.cygwin@gmail.com>
582 * lto-plugin.h: Delete.
583 * lto-plugin-elf.c: Likewise.
584 * lto-plugin-coff.c: Likewise.
585 * configure.ac: Don't use libelf, don't source config.gcc.
586 (LIBELFLIBS): Delete.
588 (LTO_FORMAT): Delete.
589 (SYM_STYLE): Add AC_DEFINE var, set based on $target.
590 (config.h): Add AC_CONFIG_HEADERS directive.
591 * Makefile.am (LIBELFLIBS): Delete.
593 (LTO_FORMAT): Delete.
595 (AM_CPPFLAGS): Use it. Don't use LIBELFINC.
596 (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
597 any object-format-specific source file in the link.
598 (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
599 * config.h.in: Generate.
600 * configure: Regenerate.
601 * Makefile.in: Likewise.
602 * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
603 (LTO_SEGMENT_NAME): New definition.
604 (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
605 (LTO_SECTION_PREFIX_LEN): New definition.
606 (struct sym_aux): Struct definition moved here from lto-plugin.h.
607 (struct plugin_symtab): Likewise.
608 (struct plugin_objfile): Likewise.
609 (struct plugin_objfile): New struct def.
610 (enum symbol_style): New enum type.
611 (add_symbols): Make static.
612 (claimed_files): Likewise.
613 (num_claimed_files): Likewise.
614 (sym_style): New global.
615 (check): Make static.
616 (parse_table_entry): Likewise. Respect sym_style when extracting
617 symbol from symtab entry.
618 (translate): Make static.
619 (resolve_conflicts): Likewise.
620 (process_symtab): New function, per-section callback version of
621 old object-format-specific handling from deleted lto-plugin-elf.c.
622 (claim_file_handler): Convert ELF-specific version from deleted
623 lto-plugin-elf.c to simple_object interface and move here.
624 (process_options): Allow new '-sym-style=' option.
625 (onload): Don't call deleted onload_format_checks hook.
627 2010-10-11 Kai Tietz <kai.tietz@onevision.com>
629 * lto-plugin.c (dump_symtab): Correct printf argument type.
630 (finish_conflict_resolution): Initialize resolution.
632 2010-10-08 H.J. Lu <hongjiu.lu@intel.com>
635 * configure.ac: Add AC_CANONICAL_SYSTEM.
636 * configure: Regenerated.
638 2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
640 * configure.ac: Source config.gcc to determine lto_binary_reader.
641 (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
642 * Makefile.am (LTO_FORMAT): Import.
643 (liblto_plugin_la_SOURCES): Add object format dependent module
644 defined by LTO_FORMAT.
645 (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
646 and work around libtool warning.
647 * configure: Regenerate.
648 * Makefile.in: Likewise.
649 * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
650 (struct sym_aux): Likewise.
651 (struct plugin_symtab): Likewise.
652 (struct plugin_file_info): Likewise.
653 (LTO_SECTION_PREFIX): Likewise.
654 (add_symbols): Make non-static.
655 (claimed_files): Likewise.
656 (num_claimed_files): Likewise.
658 (parse_table_entry): Likewise.
659 (translate): Likewise.
660 (resolve_conflicts): Likewise.
661 (process_symtab): Move to new lto-plugin-elf.c object format dependent
663 (claim_file_handler): Likewise, and make non-static.
664 (onload): Call new onload_format_checks function.
665 * lto-plugin.h: New file.
666 (LTO_SECTION_PREFIX): Move here.
667 (struct sym_aux): Likewise.
668 (struct plugin_symtab): Likewise.
669 (struct plugin_file_info): Likewise.
670 (claim_file_handler): Add new function prototype.
671 (onload_format_checks): Likewise.
672 (check): Declare extern.
673 (translate): Likewise.
674 (parse_table_entry): Likewise.
675 (resolve_conflicts): Likewise.
676 (add_symbols): Likewise.
677 (claimed_files): Likewise.
678 (num_claimed_files): Likewise.
679 * lto-plugin-elf.c (process_symtab): Move here.
680 (claim_file_handler): Likewise, and make non-static.
681 (onload_format_checks): New function factored out from onload.
682 * lto-plugin-coff.c (claim_file_handler): New function stub.
683 (onload_format_checks): Likewise.
685 2010-08-05 Andi Kleen <ak@linux.intel.com>
687 * lto-plugin.c: Include <hashtab.h>
688 (sym_aux): Add next_conflict field to save conflict chains.
689 (plugin_file_info): Add conflicts symtab.
690 (parse_table_entry): Initialize aux->next_conflict.
691 (process_symtab): Increment found.
693 (finish_conflict_resolution): Add.
695 (write_resolution): Remove symbols loop and move into
696 dump_symtab. Call dump_symtab for main symbol and conflicts table.
697 Call free_symtab to free conflicts table.
701 (symbol_strength): Add.
702 (resolve_conflicts): Add.
703 (claim_file_handler): Add n variable. Check return value of
704 process_symtab. Call resolve_conflicts.
706 2010-07-27 Andi Kleen <ak@linux.intel.com>
708 * lto-plugin.c (translate): Remove debug fprintf.
710 2010-07-23 H.J. Lu <hongjiu.lu@intel.com>
713 * lto-plugin.c (translate): Cast to unsigned long.
715 2010-07-23 Andi Kleen <ak@linux.intel.com>
718 * lto-plugin.c (sym_aux): Add.
719 (plugin_symtab): Remove slots. Add aux and id.
720 (parse_table_entry): Change to use aux instead of slots.
721 (LTO_SECTION_PREFIX): Add.
722 (translate): Improve buffer allocation. Change to append
723 symbols to existing out buffer.
724 (get_section): Remove.
725 (process_symtab): Add.
726 (free_2): Free symtab->aux.
727 (write_resolution): Handle aux instead of slots.
728 Print sub id to resolution file.
729 (claim_file_handler): Clear lto_file. Replace get_symtab/translate
730 calls with call to process_symtab.
732 2010-07-22 Richard Guenther <rguenther@suse.de>
734 * Makefile.am: New copy_lto_plugin rule to install the plugin
736 * Makefile.in: Regenerated.
738 2010-05-21 Richard Guenther <rguenther@suse.de>
740 * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
742 2010-05-07 Richard Guenther <rguenther@suse.de>
744 * lto-plugin.c (free_2): Do not free resolution_file.
745 (write_resolution): Check that we were passed a resolution file.
746 (all_symbols_read_handler): Adjust.
747 (cleanup_handler): Do not remove the resolution file.
748 (process_option): Handle -fresolution=.
750 2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
753 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
754 * Makefile.in: Regenerate.
756 2010-04-23 Richard Guenther <rguenther@suse.de>
759 * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
760 (translate): Likewise.
761 (all_symbols_read_handler): Likewise.
762 (claim_file_handler): Likewise.
763 (process_option): Likewise.
764 (add_output_files): Likewise. Remove filename length limit.
766 2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
768 * Makefile.in: Regenerate.
769 * aclocal.m4: Regenerate.
771 2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
774 * lto-plugin.c (cleanup_handler): Delete temporary output files.
776 2010-01-11 Richard Guenther <rguenther@suse.de>
779 * Makefile.am: Disable dependencies.
780 * Makefile.in: Regenerated.
782 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
785 * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
788 2009-12-05 H.J. Lu <hongjiu.lu@intel.com>
791 * configure: Regenerated.
792 * Makefile.in: Likewise.
794 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
797 * lto-plugin.c (claim_file_handler): Print offsets in hex.
799 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
801 * lto-plugin.c (write_resolution): Assume resolution_file is set.
802 Print the symbol name.
803 (all_symbols_read_handler): Create a resolution file.
805 (cleanup_handler): Remove the resolution file.
806 (process_option): Drop the -resolution option.
808 2009-11-05 Rafael Avila de Espindola <espindola@google.com>
810 * lto-plugin.c (temp_obj_dir_name): Remove.
811 (arguments_file_name): New.
812 (free_2): Free arguments_file_name instead of temp_obj_dir_name.
813 (exec_lto_wrapper): Create arguments file with make_temp_file.
814 (cleanup_handler): Don't remove the temporary directory. Remove the
816 (onload): Don't create the temporary directory.
818 2009-11-04 Richard Guenther <rguenther@suse.de>
819 Rafael Avila de Espindola <espindola@google.com>
821 * lto-plugin.c (plugin_file_info): Remove temp field.
822 (cleanup_handler): Don't delete temporary objects.
823 (claim_file_handler): Don't create temporary objects.
825 2009-11-04 Rafael Avila de Espindola <espindola@google.com>
827 * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
829 2009-10-30 Rafael Avila de Espindola <espindola@google.com>
832 * lto-plugin.c (claim_file_handler): Close files that we created.
834 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
836 * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
839 2009-10-27 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
842 * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
843 * configure: Regenerate.
845 2009-10-26 Richard Guenther <rguenther@suse.de>
847 * configure.ac: Use AM_MAINTAINER_MODE.
848 * acinclude.m4: Remove.
849 * configure: Re-generate.
850 * Makefile.in: Likewise.
851 * aclocal.m4: Likewise.
853 2009-10-19 Rafael Avila de Espindola <espindola@google.com>
856 * configure: Regenerate.
857 * configure.ac: Add AC_TYPE_UINT64_T.
859 2009-10-16 Rafael Avila de Espindola <espindola@google.com>
861 * lto-plugin.c (message): New variable.
862 (check): New function.
863 (parse_table_entry, translate, write_resolution,add_output_files,
864 exec_lto_wrapper,claim_file_handler, onload): Use check instead of
866 (cleanup_handler): Use check instead of assert. Remove the arguments
869 2009-10-15 Rafael Avila de Espindola <espindola@google.com>
871 * lto-plugin.c (resolution_file): New.
872 (free_1): Update comment.
873 (free_2): Free resolution_file.
874 (write_resolution): Write resolution to specified file. Use the
875 syms array from the symbol table.
876 (all_symbols_read_handler): Delay call to free_1 past call to
878 (process_option): Add a -resolution option.
880 2009-10-13 Richard Guenther <rguenther@suse.de>
882 * Makefile.am (liblto_plugin_la_LIBADD): Link against the
884 * Makefile.in: Regenerated.
886 2009-10-08 Rafael Avila de Espindola <espindola@google.com>
888 * lto-plugin.c (add_input_library): New.
889 (all_symbols_read_handler): Use add_input_library for items that
891 (process_option): Fit in 80 columns.
892 (onload): Handle LDPT_ADD_INPUT_LIBRARY.
894 2009-10-02 Diego Novillo <dnovillo@google.com>
896 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
897 and -D_FILE_OFFSET_BITS=64.
898 * configure.ac: Add AC_SYS_LARGEFILE.
899 * configure: Regenerate.
900 * Makefile.in: Regenerate.
901 * lto-plugin.c: Fix copyright boilerplate.
903 2009-10-02 Diego Novillo <dnovillo@google.com>
905 * Makefile.am (ACLOCAL_AMFLAGS): Define.
906 * aclocal.m4: Regenerate with aclocal-2.64
907 * acinclude.m4: Remove.
908 * Makefile.in: Regenerate with automake-1.11
909 * configure.ac (AC_PREREQ): Update to 2.64.
910 * configure: Regenerate.
912 2009-10-02 Diego Novillo <dnovillo@google.com>
914 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
915 and -D_FILE_OFFSET_BITS=64.
916 * configure.ac: Add AC_SYS_LARGEFILE.
917 * configure: Regenerate.
918 * Makefile.in: Regenerate.
919 * lto-plugin.c: Fix copyright boilerplate.
921 2009-10-02 Diego Novillo <dnovillo@google.com>
923 * Makefile.am (ACLOCAL_AMFLAGS): Define.
924 * aclocal.m4: Regenerate with aclocal-2.64
925 * acinclude.m4: Remove.
926 * Makefile.in: Regenerate with automake-1.11
927 * configure.ac (AC_PREREQ): Update to 2.64.
928 * configure: Regenerate.
930 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
932 * Makefile.am (liblto_plugin_la_SOURCES): Remove
933 $(top_srcdir)/../gcc/lto/common.c
934 * Makefile.in: Regenerate.
936 2009-10-01 Rafael Avila de Espindola <espindola@google.com>
938 * lto-plugin.c (pass_through_items): New.
939 (num_pass_through_items): New.
940 (all_symbols_read_handler): Update to use the -pass-through option.
941 (process_option): Replace -libgcc with -pass-through.
943 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
945 * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
946 register_cleanup to be set.
948 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
950 * Makefile.am: Remove all reference to ltosymtab.
951 * Makefile.in: Regenerate.
952 * lto-symtab.c: Remove.
954 2009-05-21 Diego Novillo <dnovillo@google.com>
956 * configure.ac: Remove call to AC_CHECK_GELF.
957 Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
958 * acinclude.m4: Do not include ../config/libelf.m4
959 * Makefile.am (LIBELFLIBS): Define.
961 (AM_CPPFLAGS): Add $(LIBELFINC).
962 (ltosymtab_LDADD): Add $(LIBELFLIBS).
963 (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
964 * lto-plugin.c: Always include <gelf.h>
965 * lto-symtab.c: Likewise.
966 * configure: Regenerate.
967 * Makefile.in: Regenerate.
969 2009-03-23 Rafael Avila de Espindola <espindola@google.com>
971 * lto-plugin.c (libgcc_filename): New.
972 (all_symbols_read_handler): Pass libgcc to the linker.
973 (all_symbols_read_handler): Parse -libgcc
975 2009-02-05 Rafael Avila de Espindola <espindola@google.com>
977 * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
978 * Makefile.in: Regenerate.
979 * lto-plugin.c (add_output_files): Argument is now a FILE.
980 (exec_lto_wrapper): Use writeargv and pex.
982 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
985 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
986 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
989 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
991 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
993 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
995 * lto-plugin.c: Include libiberty.h.
996 (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
999 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
1001 * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
1002 file to lto-wrapper.
1004 2009-01-28 Rafael Avila de Espindola <espindola@google.com>
1006 * lto-plugin.c (plugin_file_info): Remove fd and elf.
1007 (parse_table_entry): strdup entry->name and entry->comdat_key.
1008 (free_1): Free name and comdat_key. Don't close the file. Don't call
1010 (claim_file_handler): Always call elf_end.
1012 2008-12-23 Rafael Avila de Espindola <espindola@google.com>
1014 * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
1015 -D_FILE_OFFSET_BITS=64
1016 * Makefile.in: Regenerate
1018 2008-12-22 Rafael Avila de Espindola <espindola@google.com>
1020 * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
1021 (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
1022 * Makefile.in: Regenerate.
1023 * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
1024 * configure: Regenerate.
1025 * configure.ac: Add AC_SUBST(target_noncanonical).
1027 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
1029 * lto-plugin.c: Include stdbool.h.
1030 (debug, nop): Declare as bool.
1032 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
1034 * lto-plugin.c (nop): New.
1035 (use_original_files): New.
1036 (all_symbols_read_handler): Call use_original_files if nop is true.
1037 (process_option): Parse the -nop option.
1039 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
1041 * lto-plugin.c (debug): New.
1042 (exec_lto_wrapper): Print argv if debug is true.
1043 (process_option): Process the -debug command line option.
1045 2008-12-03 Rafael Avila de Espindola <espindola@google.com>
1047 * lto-plugin.c (process_option): The argument is now a single option,
1048 not a space separated list.
1050 2008-12-02 Rafael Avila de Espindola <espindola@google.com>
1052 * lto-plugin.c: Include sys/types.h and sys/wait.h
1053 (output_files, num_output_files, lto_wrapper_argv,
1054 lto_wrapper_num_args): New.
1055 (free_2): Free output_files.
1056 (write_resolution): Disable.
1057 (add_output_files): New.
1058 (exec_lto_wrapper): New.
1059 (all_symbols_read_handler): Run lto-wrapper.
1060 (claim_file_handler): Free lto_file.name and call elf_end.
1061 (process_option): New.
1063 2008-11-26 Rafael Espindola <espindola@google.com>
1065 * lto-plugin.c (add_input_file): New.
1066 (get_section): Return NULL if get_section fails.
1067 (write_resolution): New.
1068 (all_symbols_read_handler): Call add_input_file.
1069 (claim_file_handler): Unlink the correct file.
1070 (onload): Record add_input_file.
1072 2008-09-23 Rafael Espindola <espindola@google.com>
1074 * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
1075 Update the location of common.c.
1076 * Makefile.in: Regenerate.
1077 * common.c: Moved to gcc/lto.
1078 * common.h: Moved to gcc/lto.
1079 * lto-plugin.c: Update the location of common.h.
1080 * lto-symtab.c: Update the location of common.h.
1082 2008-09-23 Rafael Espindola <espindola@google.com>
1084 * common.c: Include common.h.
1085 (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
1087 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
1090 2008-09-23 Rafael Espindola <espindola@google.com>
1092 * lto-plugin.c (plugin_file_info): Add temp.
1093 (cleanup_handler): Only delete temporary files.
1094 (claim_file_handler): Initialize lto_file.temp.
1096 2008-09-23 Rafael Espindola <espindola@google.com>
1098 * plugin-api.h: Moved to include.
1100 2008-09-23 Rafael Espindola <espindola@google.com>
1102 * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
1105 2008-09-22 Rafael Espindola <espindola@google.com>
1107 * plugin-api.h: Copy from binutils' cvs.
1109 2008-09-22 Rafael Espindola <espindola@google.com>
1111 * lto-symtab.c (get_symbols, add_symbols): Update signature.
1112 * plugin-api.h: Copy from binutils' cvs.
1114 2008-09-22 Rafael Espindola <espindola@google.com>
1116 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
1119 2008-09-10 Rafael Espindola <espindola@google.com>
1121 * lto-plugin.c (onload): add missing break statements and asserts.
1122 * lto-symtab.c (claim_file_handler): Make it static.
1123 (all_symbols_read_handler): Make it static.
1124 (all_file_handles): Make it static.
1125 (num_file_handles): Make it static.
1126 (register_claim_file): Make it static.
1127 (register_object): Indent properly.
1129 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
1131 * Makefile.am (ltosymtab_LDADD): Add -lelf.
1132 * Makefiel.in: Regenerate.
1133 * lto-plugin.c: Include ar.h.
1134 (claim_file_handler): Handle file->offset != 0.
1135 * lto-symtab.c: Include gelf.h.
1136 (all_file_handles): Change type.
1137 (register_object): New.
1138 (register_file): Add support for archives.
1139 (resolve): Update to new type of all_file_handles.
1140 (print): Update to new type of all_file_handles.
1141 (free_all): Update to new type of all_file_handles.
1142 (main): Update to new type of all_file_handles.
1144 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
1146 * lto-plugin.c (get_string_table): Remove.
1147 (get_section): Use elf_strptr instead of get_string_table.
1149 2008-09-08 Doug Kwan <dougkwan@google.com>
1151 * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
1152 to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
1154 2008-09-08 Rafael Avila de Espindola <espindola@google.com>
1156 * Makefile.am (ltosymtab_SOURCES): add common.c.
1157 (ltosymtab_CFLAGS): New.
1158 (liblto_plugin_la_SOURCES): Add common.c.
1159 * Makefile.in: Regenerate.
1162 * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1163 (plugin_symtab): New.
1164 (plugin_file_info): New.
1165 (register_all_symbols_read): New.
1167 (claimed_files): New.
1168 (num_claimed_files): New.
1169 (translate): Don't drop the slot number.
1172 (all_symbols_read_handler): New.
1173 (claim_file_handler): Record every claimed file.
1174 (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1176 * lto-symtab.c: Include stdlib.h, string.h and common.h.
1177 (current_file_handle): Remove.
1178 (ld_plugin_all_symbols_read_handler): New.
1179 (plugin_handle): New.
1181 (all_file_handles): New.
1182 (num_file_handles): New.
1184 (register_all_symbols_read): New.
1185 (add_symbols): Don't print the symbols, just record them.
1186 (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1188 (load_plugin): Use plugin_handle.
1189 (register_file): Add the file handle to all_file_handles.
1192 (unload_plugin): New.
1194 (main): Call all_symbols_read_handler and free resources.
1196 2008-09-03 Rafael Avila de Espindola <espindola@google.com>
1198 * Makefile.am (AM_CFLAGS): New.
1199 (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1200 (lib_LTLIBRARIES): New.
1201 (liblto_plugin_la_SOURCES): New.
1202 (liblto_plugin_la_LIBADD): New.
1203 * Makefile.in: Regenerate.
1204 * acinclude.m4: Don't include ../config/acx.m4 and
1205 ../config/no-executables.m4.
1206 Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1208 * aclocal.m4: Regenerate.
1209 * configure: Regenerate.
1210 * configure.ac: Use AM_PROG_LIBTOOL.
1211 * lto-plugin.c: New.
1212 * lto-symtab.c: Rewrite to use the plugin.
1213 * plugin-api.h: New.
1215 2008-08-25 Rafael Avila de Espindola <espindola@google.com>
1217 * configure: Regenerate.
1218 * configure.ac: Use AC_CHECK_GELF.
1219 * lto-symtab.c: Include gelf.h.
1220 (get_string_table): Use size independent API.
1221 (printTable): Use lld to print 64 bit integers.
1223 2008-08-22 Rafael Avila de Espindola <espindola@google.com>
1225 * lto-symtab.c (parse_table_entry): Assert entry->kind and
1226 entry->visibility are valid.
1228 2008-07-22 Rafael Avila de Espindola <espindola@google.com>
1229 * lto-symtab.c (table_entry): Add comdat.
1230 (parse_table_entry): Read comdat.
1232 2008-08-21 Rafael Espindola <espindola@google.com>
1236 * acinclude.m4: New.
1239 * configure.ac: New.
1240 * lto-symtab.c: New.