1 2010-07-23 H.J. Lu <hongjiu.lu@intel.com>
4 * lto-plugin.c (translate): Cast to unsigned long.
6 2010-07-23 Andi Kleen <ak@linux.intel.com>
9 * lto-plugin.c (sym_aux): Add.
10 (plugin_symtab): Remove slots. Add aux and id.
11 (parse_table_entry): Change to use aux instead of slots.
12 (LTO_SECTION_PREFIX): Add.
13 (translate): Improve buffer allocation. Change to append
14 symbols to existing out buffer.
15 (get_section): Remove.
16 (process_symtab): Add.
17 (free_2): Free symtab->aux.
18 (write_resolution): Handle aux instead of slots.
19 Print sub id to resolution file.
20 (claim_file_handler): Clear lto_file. Replace get_symtab/translate
21 calls with call to process_symtab.
23 2010-07-22 Richard Guenther <rguenther@suse.de>
25 * Makefile.am: New copy_lto_plugin rule to install the plugin
27 * Makefile.in: Regenerated.
29 2010-05-21 Richard Guenther <rguenther@suse.de>
31 * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
33 2010-05-07 Richard Guenther <rguenther@suse.de>
35 * lto-plugin.c (free_2): Do not free resolution_file.
36 (write_resolution): Check that we were passed a resolution file.
37 (all_symbols_read_handler): Adjust.
38 (cleanup_handler): Do not remove the resolution file.
39 (process_option): Handle -fresolution=.
41 2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
44 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
45 * Makefile.in: Regenerate.
47 2010-04-23 Richard Guenther <rguenther@suse.de>
50 * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
51 (translate): Likewise.
52 (all_symbols_read_handler): Likewise.
53 (claim_file_handler): Likewise.
54 (process_option): Likewise.
55 (add_output_files): Likewise. Remove filename length limit.
57 2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
59 * Makefile.in: Regenerate.
60 * aclocal.m4: Regenerate.
62 2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
65 * lto-plugin.c (cleanup_handler): Delete temporary output files.
67 2010-01-11 Richard Guenther <rguenther@suse.de>
70 * Makefile.am: Disable dependencies.
71 * Makefile.in: Regenerated.
73 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
76 * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
79 2009-12-05 H.J. Lu <hongjiu.lu@intel.com>
82 * configure: Regenerated.
83 * Makefile.in: Likewise.
85 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
88 * lto-plugin.c (claim_file_handler): Print offsets in hex.
90 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
92 * lto-plugin.c (write_resolution): Assume resolution_file is set.
93 Print the symbol name.
94 (all_symbols_read_handler): Create a resolution file.
96 (cleanup_handler): Remove the resolution file.
97 (process_option): Drop the -resolution option.
99 2009-11-05 Rafael Avila de Espindola <espindola@google.com>
101 * lto-plugin.c (temp_obj_dir_name): Remove.
102 (arguments_file_name): New.
103 (free_2): Free arguments_file_name instead of temp_obj_dir_name.
104 (exec_lto_wrapper): Create arguments file with make_temp_file.
105 (cleanup_handler): Don't remove the temporary directory. Remove the
107 (onload): Don't create the temporary directory.
109 2009-11-04 Richard Guenther <rguenther@suse.de>
110 Rafael Avila de Espindola <espindola@google.com>
112 * lto-plugin.c (plugin_file_info): Remove temp field.
113 (cleanup_handler): Don't delete temporary objects.
114 (claim_file_handler): Don't create temporary objects.
116 2009-11-04 Rafael Avila de Espindola <espindola@google.com>
118 * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
120 2009-10-30 Rafael Avila de Espindola <espindola@google.com>
123 * lto-plugin.c (claim_file_handler): Close files that we created.
125 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
127 * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
130 2009-10-27 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
133 * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
134 * configure: Regenerate.
136 2009-10-26 Richard Guenther <rguenther@suse.de>
138 * configure.ac: Use AM_MAINTAINER_MODE.
139 * acinclude.m4: Remove.
140 * configure: Re-generate.
141 * Makefile.in: Likewise.
142 * aclocal.m4: Likewise.
144 2009-10-19 Rafael Avila de Espindola <espindola@google.com>
147 * configure: Regenerate.
148 * configure.ac: Add AC_TYPE_UINT64_T.
150 2009-10-16 Rafael Avila de Espindola <espindola@google.com>
152 * lto-plugin.c (message): New variable.
153 (check): New function.
154 (parse_table_entry, translate, write_resolution,add_output_files,
155 exec_lto_wrapper,claim_file_handler, onload): Use check instead of
157 (cleanup_handler): Use check instead of assert. Remove the arguments
160 2009-10-15 Rafael Avila de Espindola <espindola@google.com>
162 * lto-plugin.c (resolution_file): New.
163 (free_1): Update comment.
164 (free_2): Free resolution_file.
165 (write_resolution): Write resolution to specified file. Use the
166 syms array from the symbol table.
167 (all_symbols_read_handler): Delay call to free_1 past call to
169 (process_option): Add a -resolution option.
171 2009-10-13 Richard Guenther <rguenther@suse.de>
173 * Makefile.am (liblto_plugin_la_LIBADD): Link against the
175 * Makefile.in: Regenerated.
177 2009-10-08 Rafael Avila de Espindola <espindola@google.com>
179 * lto-plugin.c (add_input_library): New.
180 (all_symbols_read_handler): Use add_input_library for items that
182 (process_option): Fit in 80 columns.
183 (onload): Handle LDPT_ADD_INPUT_LIBRARY.
185 2009-10-02 Diego Novillo <dnovillo@google.com>
187 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
188 and -D_FILE_OFFSET_BITS=64.
189 * configure.ac: Add AC_SYS_LARGEFILE.
190 * configure: Regenerate.
191 * Makefile.in: Regenerate.
192 * lto-plugin.c: Fix copyright boilerplate.
194 2009-10-02 Diego Novillo <dnovillo@google.com>
196 * Makefile.am (ACLOCAL_AMFLAGS): Define.
197 * aclocal.m4: Regenerate with aclocal-2.64
198 * acinclude.m4: Remove.
199 * Makefile.in: Regenerate with automake-1.11
200 * configure.ac (AC_PREREQ): Update to 2.64.
201 * configure: Regenerate.
203 2009-10-02 Diego Novillo <dnovillo@google.com>
205 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
206 and -D_FILE_OFFSET_BITS=64.
207 * configure.ac: Add AC_SYS_LARGEFILE.
208 * configure: Regenerate.
209 * Makefile.in: Regenerate.
210 * lto-plugin.c: Fix copyright boilerplate.
212 2009-10-02 Diego Novillo <dnovillo@google.com>
214 * Makefile.am (ACLOCAL_AMFLAGS): Define.
215 * aclocal.m4: Regenerate with aclocal-2.64
216 * acinclude.m4: Remove.
217 * Makefile.in: Regenerate with automake-1.11
218 * configure.ac (AC_PREREQ): Update to 2.64.
219 * configure: Regenerate.
221 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
223 * Makefile.am (liblto_plugin_la_SOURCES): Remove
224 $(top_srcdir)/../gcc/lto/common.c
225 * Makefile.in: Regenerate.
227 2009-10-01 Rafael Avila de Espindola <espindola@google.com>
229 * lto-plugin.c (pass_through_items): New.
230 (num_pass_through_items): New.
231 (all_symbols_read_handler): Update to use the -pass-through option.
232 (process_option): Replace -libgcc with -pass-through.
234 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
236 * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
237 register_cleanup to be set.
239 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
241 * Makefile.am: Remove all reference to ltosymtab.
242 * Makefile.in: Regenerate.
243 * lto-symtab.c: Remove.
245 2009-05-21 Diego Novillo <dnovillo@google.com>
247 * configure.ac: Remove call to AC_CHECK_GELF.
248 Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
249 * acinclude.m4: Do not include ../config/libelf.m4
250 * Makefile.am (LIBELFLIBS): Define.
252 (AM_CPPFLAGS): Add $(LIBELFINC).
253 (ltosymtab_LDADD): Add $(LIBELFLIBS).
254 (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
255 * lto-plugin.c: Always include <gelf.h>
256 * lto-symtab.c: Likewise.
257 * configure: Regenerate.
258 * Makefile.in: Regenerate.
260 2009-03-23 Rafael Avila de Espindola <espindola@google.com>
262 * lto-plugin.c (libgcc_filename): New.
263 (all_symbols_read_handler): Pass libgcc to the linker.
264 (all_symbols_read_handler): Parse -libgcc
266 2009-02-05 Rafael Avila de Espindola <espindola@google.com>
268 * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
269 * Makefile.in: Regenerate.
270 * lto-plugin.c (add_output_files): Argument is now a FILE.
271 (exec_lto_wrapper): Use writeargv and pex.
273 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
276 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
277 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
280 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
282 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
284 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
286 * lto-plugin.c: Include libiberty.h.
287 (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
290 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
292 * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
295 2009-01-28 Rafael Avila de Espindola <espindola@google.com>
297 * lto-plugin.c (plugin_file_info): Remove fd and elf.
298 (parse_table_entry): strdup entry->name and entry->comdat_key.
299 (free_1): Free name and comdat_key. Don't close the file. Don't call
301 (claim_file_handler): Always call elf_end.
303 2008-12-23 Rafael Avila de Espindola <espindola@google.com>
305 * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
306 -D_FILE_OFFSET_BITS=64
307 * Makefile.in: Regenerate
309 2008-12-22 Rafael Avila de Espindola <espindola@google.com>
311 * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
312 (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
313 * Makefile.in: Regenerate.
314 * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
315 * configure: Regenerate.
316 * configure.ac: Add AC_SUBST(target_noncanonical).
318 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
320 * lto-plugin.c: Include stdbool.h.
321 (debug, nop): Declare as bool.
323 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
325 * lto-plugin.c (nop): New.
326 (use_original_files): New.
327 (all_symbols_read_handler): Call use_original_files if nop is true.
328 (process_option): Parse the -nop option.
330 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
332 * lto-plugin.c (debug): New.
333 (exec_lto_wrapper): Print argv if debug is true.
334 (process_option): Process the -debug command line option.
336 2008-12-03 Rafael Avila de Espindola <espindola@google.com>
338 * lto-plugin.c (process_option): The argument is now a single option,
339 not a space separated list.
341 2008-12-02 Rafael Avila de Espindola <espindola@google.com>
343 * lto-plugin.c: Include sys/types.h and sys/wait.h
344 (output_files, num_output_files, lto_wrapper_argv,
345 lto_wrapper_num_args): New.
346 (free_2): Free output_files.
347 (write_resolution): Disable.
348 (add_output_files): New.
349 (exec_lto_wrapper): New.
350 (all_symbols_read_handler): Run lto-wrapper.
351 (claim_file_handler): Free lto_file.name and call elf_end.
352 (process_option): New.
354 2008-11-26 Rafael Espindola <espindola@google.com>
356 * lto-plugin.c (add_input_file): New.
357 (get_section): Return NULL if get_section fails.
358 (write_resolution): New.
359 (all_symbols_read_handler): Call add_input_file.
360 (claim_file_handler): Unlink the correct file.
361 (onload): Record add_input_file.
363 2008-09-23 Rafael Espindola <espindola@google.com>
365 * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
366 Update the location of common.c.
367 * Makefile.in: Regenerate.
368 * common.c: Moved to gcc/lto.
369 * common.h: Moved to gcc/lto.
370 * lto-plugin.c: Update the location of common.h.
371 * lto-symtab.c: Update the location of common.h.
373 2008-09-23 Rafael Espindola <espindola@google.com>
375 * common.c: Include common.h.
376 (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
378 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
381 2008-09-23 Rafael Espindola <espindola@google.com>
383 * lto-plugin.c (plugin_file_info): Add temp.
384 (cleanup_handler): Only delete temporary files.
385 (claim_file_handler): Initialize lto_file.temp.
387 2008-09-23 Rafael Espindola <espindola@google.com>
389 * plugin-api.h: Moved to include.
391 2008-09-23 Rafael Espindola <espindola@google.com>
393 * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
396 2008-09-22 Rafael Espindola <espindola@google.com>
398 * plugin-api.h: Copy from binutils' cvs.
400 2008-09-22 Rafael Espindola <espindola@google.com>
402 * lto-symtab.c (get_symbols, add_symbols): Update signature.
403 * plugin-api.h: Copy from binutils' cvs.
405 2008-09-22 Rafael Espindola <espindola@google.com>
407 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
410 2008-09-10 Rafael Espindola <espindola@google.com>
412 * lto-plugin.c (onload): add missing break statements and asserts.
413 * lto-symtab.c (claim_file_handler): Make it static.
414 (all_symbols_read_handler): Make it static.
415 (all_file_handles): Make it static.
416 (num_file_handles): Make it static.
417 (register_claim_file): Make it static.
418 (register_object): Indent properly.
420 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
422 * Makefile.am (ltosymtab_LDADD): Add -lelf.
423 * Makefiel.in: Regenerate.
424 * lto-plugin.c: Include ar.h.
425 (claim_file_handler): Handle file->offset != 0.
426 * lto-symtab.c: Include gelf.h.
427 (all_file_handles): Change type.
428 (register_object): New.
429 (register_file): Add support for archives.
430 (resolve): Update to new type of all_file_handles.
431 (print): Update to new type of all_file_handles.
432 (free_all): Update to new type of all_file_handles.
433 (main): Update to new type of all_file_handles.
435 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
437 * lto-plugin.c (get_string_table): Remove.
438 (get_section): Use elf_strptr instead of get_string_table.
440 2008-09-08 Doug Kwan <dougkwan@google.com>
442 * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
443 to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
445 2008-09-08 Rafael Avila de Espindola <espindola@google.com>
447 * Makefile.am (ltosymtab_SOURCES): add common.c.
448 (ltosymtab_CFLAGS): New.
449 (liblto_plugin_la_SOURCES): Add common.c.
450 * Makefile.in: Regenerate.
453 * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
454 (plugin_symtab): New.
455 (plugin_file_info): New.
456 (register_all_symbols_read): New.
458 (claimed_files): New.
459 (num_claimed_files): New.
460 (translate): Don't drop the slot number.
463 (all_symbols_read_handler): New.
464 (claim_file_handler): Record every claimed file.
465 (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
467 * lto-symtab.c: Include stdlib.h, string.h and common.h.
468 (current_file_handle): Remove.
469 (ld_plugin_all_symbols_read_handler): New.
470 (plugin_handle): New.
472 (all_file_handles): New.
473 (num_file_handles): New.
475 (register_all_symbols_read): New.
476 (add_symbols): Don't print the symbols, just record them.
477 (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
479 (load_plugin): Use plugin_handle.
480 (register_file): Add the file handle to all_file_handles.
483 (unload_plugin): New.
485 (main): Call all_symbols_read_handler and free resources.
487 2008-09-03 Rafael Avila de Espindola <espindola@google.com>
489 * Makefile.am (AM_CFLAGS): New.
490 (ltosymtab_LDADD): Remove -lelf. Add -ldl.
491 (lib_LTLIBRARIES): New.
492 (liblto_plugin_la_SOURCES): New.
493 (liblto_plugin_la_LIBADD): New.
494 * Makefile.in: Regenerate.
495 * acinclude.m4: Don't include ../config/acx.m4 and
496 ../config/no-executables.m4.
497 Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
499 * aclocal.m4: Regenerate.
500 * configure: Regenerate.
501 * configure.ac: Use AM_PROG_LIBTOOL.
503 * lto-symtab.c: Rewrite to use the plugin.
506 2008-08-25 Rafael Avila de Espindola <espindola@google.com>
508 * configure: Regenerate.
509 * configure.ac: Use AC_CHECK_GELF.
510 * lto-symtab.c: Include gelf.h.
511 (get_string_table): Use size independent API.
512 (printTable): Use lld to print 64 bit integers.
514 2008-08-22 Rafael Avila de Espindola <espindola@google.com>
516 * lto-symtab.c (parse_table_entry): Assert entry->kind and
517 entry->visibility are valid.
519 2008-07-22 Rafael Avila de Espindola <espindola@google.com>
520 * lto-symtab.c (table_entry): Add comdat.
521 (parse_table_entry): Read comdat.
523 2008-08-21 Rafael Espindola <espindola@google.com>