1 2010-08-05 Andi Kleen <ak@linux.intel.com>
3 * lto-plugin.c: Include <hashtab.h>
4 (sym_aux): Add next_conflict field to save conflict chains.
5 (plugin_file_info): Add conflicts symtab.
6 (parse_table_entry): Initialize aux->next_conflict.
7 (process_symtab): Increment found.
9 (finish_conflict_resolution): Add.
11 (write_resolution): Remove symbols loop and move into
12 dump_symtab. Call dump_symtab for main symbol and conflicts table.
13 Call free_symtab to free conflicts table.
17 (symbol_strength): Add.
18 (resolve_conflicts): Add.
19 (claim_file_handler): Add n variable. Check return value of
20 process_symtab. Call resolve_conflicts.
22 2010-07-27 Andi Kleen <ak@linux.intel.com>
24 * lto-plugin.c (translate): Remove debug fprintf.
26 2010-07-23 H.J. Lu <hongjiu.lu@intel.com>
29 * lto-plugin.c (translate): Cast to unsigned long.
31 2010-07-23 Andi Kleen <ak@linux.intel.com>
34 * lto-plugin.c (sym_aux): Add.
35 (plugin_symtab): Remove slots. Add aux and id.
36 (parse_table_entry): Change to use aux instead of slots.
37 (LTO_SECTION_PREFIX): Add.
38 (translate): Improve buffer allocation. Change to append
39 symbols to existing out buffer.
40 (get_section): Remove.
41 (process_symtab): Add.
42 (free_2): Free symtab->aux.
43 (write_resolution): Handle aux instead of slots.
44 Print sub id to resolution file.
45 (claim_file_handler): Clear lto_file. Replace get_symtab/translate
46 calls with call to process_symtab.
48 2010-07-22 Richard Guenther <rguenther@suse.de>
50 * Makefile.am: New copy_lto_plugin rule to install the plugin
52 * Makefile.in: Regenerated.
54 2010-05-21 Richard Guenther <rguenther@suse.de>
56 * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
58 2010-05-07 Richard Guenther <rguenther@suse.de>
60 * lto-plugin.c (free_2): Do not free resolution_file.
61 (write_resolution): Check that we were passed a resolution file.
62 (all_symbols_read_handler): Adjust.
63 (cleanup_handler): Do not remove the resolution file.
64 (process_option): Handle -fresolution=.
66 2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
69 * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
70 * Makefile.in: Regenerate.
72 2010-04-23 Richard Guenther <rguenther@suse.de>
75 * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
76 (translate): Likewise.
77 (all_symbols_read_handler): Likewise.
78 (claim_file_handler): Likewise.
79 (process_option): Likewise.
80 (add_output_files): Likewise. Remove filename length limit.
82 2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
84 * Makefile.in: Regenerate.
85 * aclocal.m4: Regenerate.
87 2010-03-16 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
90 * lto-plugin.c (cleanup_handler): Delete temporary output files.
92 2010-01-11 Richard Guenther <rguenther@suse.de>
95 * Makefile.am: Disable dependencies.
96 * Makefile.in: Regenerated.
98 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
101 * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
104 2009-12-05 H.J. Lu <hongjiu.lu@intel.com>
107 * configure: Regenerated.
108 * Makefile.in: Likewise.
110 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
113 * lto-plugin.c (claim_file_handler): Print offsets in hex.
115 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
117 * lto-plugin.c (write_resolution): Assume resolution_file is set.
118 Print the symbol name.
119 (all_symbols_read_handler): Create a resolution file.
121 (cleanup_handler): Remove the resolution file.
122 (process_option): Drop the -resolution option.
124 2009-11-05 Rafael Avila de Espindola <espindola@google.com>
126 * lto-plugin.c (temp_obj_dir_name): Remove.
127 (arguments_file_name): New.
128 (free_2): Free arguments_file_name instead of temp_obj_dir_name.
129 (exec_lto_wrapper): Create arguments file with make_temp_file.
130 (cleanup_handler): Don't remove the temporary directory. Remove the
132 (onload): Don't create the temporary directory.
134 2009-11-04 Richard Guenther <rguenther@suse.de>
135 Rafael Avila de Espindola <espindola@google.com>
137 * lto-plugin.c (plugin_file_info): Remove temp field.
138 (cleanup_handler): Don't delete temporary objects.
139 (claim_file_handler): Don't create temporary objects.
141 2009-11-04 Rafael Avila de Espindola <espindola@google.com>
143 * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
145 2009-10-30 Rafael Avila de Espindola <espindola@google.com>
148 * lto-plugin.c (claim_file_handler): Close files that we created.
150 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
152 * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
155 2009-10-27 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
158 * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
159 * configure: Regenerate.
161 2009-10-26 Richard Guenther <rguenther@suse.de>
163 * configure.ac: Use AM_MAINTAINER_MODE.
164 * acinclude.m4: Remove.
165 * configure: Re-generate.
166 * Makefile.in: Likewise.
167 * aclocal.m4: Likewise.
169 2009-10-19 Rafael Avila de Espindola <espindola@google.com>
172 * configure: Regenerate.
173 * configure.ac: Add AC_TYPE_UINT64_T.
175 2009-10-16 Rafael Avila de Espindola <espindola@google.com>
177 * lto-plugin.c (message): New variable.
178 (check): New function.
179 (parse_table_entry, translate, write_resolution,add_output_files,
180 exec_lto_wrapper,claim_file_handler, onload): Use check instead of
182 (cleanup_handler): Use check instead of assert. Remove the arguments
185 2009-10-15 Rafael Avila de Espindola <espindola@google.com>
187 * lto-plugin.c (resolution_file): New.
188 (free_1): Update comment.
189 (free_2): Free resolution_file.
190 (write_resolution): Write resolution to specified file. Use the
191 syms array from the symbol table.
192 (all_symbols_read_handler): Delay call to free_1 past call to
194 (process_option): Add a -resolution option.
196 2009-10-13 Richard Guenther <rguenther@suse.de>
198 * Makefile.am (liblto_plugin_la_LIBADD): Link against the
200 * Makefile.in: Regenerated.
202 2009-10-08 Rafael Avila de Espindola <espindola@google.com>
204 * lto-plugin.c (add_input_library): New.
205 (all_symbols_read_handler): Use add_input_library for items that
207 (process_option): Fit in 80 columns.
208 (onload): Handle LDPT_ADD_INPUT_LIBRARY.
210 2009-10-02 Diego Novillo <dnovillo@google.com>
212 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
213 and -D_FILE_OFFSET_BITS=64.
214 * configure.ac: Add AC_SYS_LARGEFILE.
215 * configure: Regenerate.
216 * Makefile.in: Regenerate.
217 * lto-plugin.c: Fix copyright boilerplate.
219 2009-10-02 Diego Novillo <dnovillo@google.com>
221 * Makefile.am (ACLOCAL_AMFLAGS): Define.
222 * aclocal.m4: Regenerate with aclocal-2.64
223 * acinclude.m4: Remove.
224 * Makefile.in: Regenerate with automake-1.11
225 * configure.ac (AC_PREREQ): Update to 2.64.
226 * configure: Regenerate.
228 2009-10-02 Diego Novillo <dnovillo@google.com>
230 * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
231 and -D_FILE_OFFSET_BITS=64.
232 * configure.ac: Add AC_SYS_LARGEFILE.
233 * configure: Regenerate.
234 * Makefile.in: Regenerate.
235 * lto-plugin.c: Fix copyright boilerplate.
237 2009-10-02 Diego Novillo <dnovillo@google.com>
239 * Makefile.am (ACLOCAL_AMFLAGS): Define.
240 * aclocal.m4: Regenerate with aclocal-2.64
241 * acinclude.m4: Remove.
242 * Makefile.in: Regenerate with automake-1.11
243 * configure.ac (AC_PREREQ): Update to 2.64.
244 * configure: Regenerate.
246 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
248 * Makefile.am (liblto_plugin_la_SOURCES): Remove
249 $(top_srcdir)/../gcc/lto/common.c
250 * Makefile.in: Regenerate.
252 2009-10-01 Rafael Avila de Espindola <espindola@google.com>
254 * lto-plugin.c (pass_through_items): New.
255 (num_pass_through_items): New.
256 (all_symbols_read_handler): Update to use the -pass-through option.
257 (process_option): Replace -libgcc with -pass-through.
259 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
261 * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
262 register_cleanup to be set.
264 2009-09-30 Rafael Avila de Espindola <espindola@google.com>
266 * Makefile.am: Remove all reference to ltosymtab.
267 * Makefile.in: Regenerate.
268 * lto-symtab.c: Remove.
270 2009-05-21 Diego Novillo <dnovillo@google.com>
272 * configure.ac: Remove call to AC_CHECK_GELF.
273 Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
274 * acinclude.m4: Do not include ../config/libelf.m4
275 * Makefile.am (LIBELFLIBS): Define.
277 (AM_CPPFLAGS): Add $(LIBELFINC).
278 (ltosymtab_LDADD): Add $(LIBELFLIBS).
279 (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
280 * lto-plugin.c: Always include <gelf.h>
281 * lto-symtab.c: Likewise.
282 * configure: Regenerate.
283 * Makefile.in: Regenerate.
285 2009-03-23 Rafael Avila de Espindola <espindola@google.com>
287 * lto-plugin.c (libgcc_filename): New.
288 (all_symbols_read_handler): Pass libgcc to the linker.
289 (all_symbols_read_handler): Parse -libgcc
291 2009-02-05 Rafael Avila de Espindola <espindola@google.com>
293 * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
294 * Makefile.in: Regenerate.
295 * lto-plugin.c (add_output_files): Argument is now a FILE.
296 (exec_lto_wrapper): Use writeargv and pex.
298 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
301 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
302 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
305 2009-02-04 Rafael Avila de Espindola <espindola@google.com>
307 * lto-plugin.c (exec_lto_wrapper): Use writeargv.
309 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
311 * lto-plugin.c: Include libiberty.h.
312 (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
315 2009-01-29 Rafael Avila de Espindola <espindola@google.com>
317 * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
320 2009-01-28 Rafael Avila de Espindola <espindola@google.com>
322 * lto-plugin.c (plugin_file_info): Remove fd and elf.
323 (parse_table_entry): strdup entry->name and entry->comdat_key.
324 (free_1): Free name and comdat_key. Don't close the file. Don't call
326 (claim_file_handler): Always call elf_end.
328 2008-12-23 Rafael Avila de Espindola <espindola@google.com>
330 * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
331 -D_FILE_OFFSET_BITS=64
332 * Makefile.in: Regenerate
334 2008-12-22 Rafael Avila de Espindola <espindola@google.com>
336 * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
337 (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
338 * Makefile.in: Regenerate.
339 * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
340 * configure: Regenerate.
341 * configure.ac: Add AC_SUBST(target_noncanonical).
343 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
345 * lto-plugin.c: Include stdbool.h.
346 (debug, nop): Declare as bool.
348 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
350 * lto-plugin.c (nop): New.
351 (use_original_files): New.
352 (all_symbols_read_handler): Call use_original_files if nop is true.
353 (process_option): Parse the -nop option.
355 2008-12-08 Rafael Avila de Espindola <espindola@google.com>
357 * lto-plugin.c (debug): New.
358 (exec_lto_wrapper): Print argv if debug is true.
359 (process_option): Process the -debug command line option.
361 2008-12-03 Rafael Avila de Espindola <espindola@google.com>
363 * lto-plugin.c (process_option): The argument is now a single option,
364 not a space separated list.
366 2008-12-02 Rafael Avila de Espindola <espindola@google.com>
368 * lto-plugin.c: Include sys/types.h and sys/wait.h
369 (output_files, num_output_files, lto_wrapper_argv,
370 lto_wrapper_num_args): New.
371 (free_2): Free output_files.
372 (write_resolution): Disable.
373 (add_output_files): New.
374 (exec_lto_wrapper): New.
375 (all_symbols_read_handler): Run lto-wrapper.
376 (claim_file_handler): Free lto_file.name and call elf_end.
377 (process_option): New.
379 2008-11-26 Rafael Espindola <espindola@google.com>
381 * lto-plugin.c (add_input_file): New.
382 (get_section): Return NULL if get_section fails.
383 (write_resolution): New.
384 (all_symbols_read_handler): Call add_input_file.
385 (claim_file_handler): Unlink the correct file.
386 (onload): Record add_input_file.
388 2008-09-23 Rafael Espindola <espindola@google.com>
390 * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
391 Update the location of common.c.
392 * Makefile.in: Regenerate.
393 * common.c: Moved to gcc/lto.
394 * common.h: Moved to gcc/lto.
395 * lto-plugin.c: Update the location of common.h.
396 * lto-symtab.c: Update the location of common.h.
398 2008-09-23 Rafael Espindola <espindola@google.com>
400 * common.c: Include common.h.
401 (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
403 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
406 2008-09-23 Rafael Espindola <espindola@google.com>
408 * lto-plugin.c (plugin_file_info): Add temp.
409 (cleanup_handler): Only delete temporary files.
410 (claim_file_handler): Initialize lto_file.temp.
412 2008-09-23 Rafael Espindola <espindola@google.com>
414 * plugin-api.h: Moved to include.
416 2008-09-23 Rafael Espindola <espindola@google.com>
418 * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
421 2008-09-22 Rafael Espindola <espindola@google.com>
423 * plugin-api.h: Copy from binutils' cvs.
425 2008-09-22 Rafael Espindola <espindola@google.com>
427 * lto-symtab.c (get_symbols, add_symbols): Update signature.
428 * plugin-api.h: Copy from binutils' cvs.
430 2008-09-22 Rafael Espindola <espindola@google.com>
432 * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
435 2008-09-10 Rafael Espindola <espindola@google.com>
437 * lto-plugin.c (onload): add missing break statements and asserts.
438 * lto-symtab.c (claim_file_handler): Make it static.
439 (all_symbols_read_handler): Make it static.
440 (all_file_handles): Make it static.
441 (num_file_handles): Make it static.
442 (register_claim_file): Make it static.
443 (register_object): Indent properly.
445 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
447 * Makefile.am (ltosymtab_LDADD): Add -lelf.
448 * Makefiel.in: Regenerate.
449 * lto-plugin.c: Include ar.h.
450 (claim_file_handler): Handle file->offset != 0.
451 * lto-symtab.c: Include gelf.h.
452 (all_file_handles): Change type.
453 (register_object): New.
454 (register_file): Add support for archives.
455 (resolve): Update to new type of all_file_handles.
456 (print): Update to new type of all_file_handles.
457 (free_all): Update to new type of all_file_handles.
458 (main): Update to new type of all_file_handles.
460 2008-09-10 Rafael Avila de Espindola <espindola@google.com>
462 * lto-plugin.c (get_string_table): Remove.
463 (get_section): Use elf_strptr instead of get_string_table.
465 2008-09-08 Doug Kwan <dougkwan@google.com>
467 * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
468 to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
470 2008-09-08 Rafael Avila de Espindola <espindola@google.com>
472 * Makefile.am (ltosymtab_SOURCES): add common.c.
473 (ltosymtab_CFLAGS): New.
474 (liblto_plugin_la_SOURCES): Add common.c.
475 * Makefile.in: Regenerate.
478 * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
479 (plugin_symtab): New.
480 (plugin_file_info): New.
481 (register_all_symbols_read): New.
483 (claimed_files): New.
484 (num_claimed_files): New.
485 (translate): Don't drop the slot number.
488 (all_symbols_read_handler): New.
489 (claim_file_handler): Record every claimed file.
490 (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
492 * lto-symtab.c: Include stdlib.h, string.h and common.h.
493 (current_file_handle): Remove.
494 (ld_plugin_all_symbols_read_handler): New.
495 (plugin_handle): New.
497 (all_file_handles): New.
498 (num_file_handles): New.
500 (register_all_symbols_read): New.
501 (add_symbols): Don't print the symbols, just record them.
502 (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
504 (load_plugin): Use plugin_handle.
505 (register_file): Add the file handle to all_file_handles.
508 (unload_plugin): New.
510 (main): Call all_symbols_read_handler and free resources.
512 2008-09-03 Rafael Avila de Espindola <espindola@google.com>
514 * Makefile.am (AM_CFLAGS): New.
515 (ltosymtab_LDADD): Remove -lelf. Add -ldl.
516 (lib_LTLIBRARIES): New.
517 (liblto_plugin_la_SOURCES): New.
518 (liblto_plugin_la_LIBADD): New.
519 * Makefile.in: Regenerate.
520 * acinclude.m4: Don't include ../config/acx.m4 and
521 ../config/no-executables.m4.
522 Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
524 * aclocal.m4: Regenerate.
525 * configure: Regenerate.
526 * configure.ac: Use AM_PROG_LIBTOOL.
528 * lto-symtab.c: Rewrite to use the plugin.
531 2008-08-25 Rafael Avila de Espindola <espindola@google.com>
533 * configure: Regenerate.
534 * configure.ac: Use AC_CHECK_GELF.
535 * lto-symtab.c: Include gelf.h.
536 (get_string_table): Use size independent API.
537 (printTable): Use lld to print 64 bit integers.
539 2008-08-22 Rafael Avila de Espindola <espindola@google.com>
541 * lto-symtab.c (parse_table_entry): Assert entry->kind and
542 entry->visibility are valid.
544 2008-07-22 Rafael Avila de Espindola <espindola@google.com>
545 * lto-symtab.c (table_entry): Add comdat.
546 (parse_table_entry): Read comdat.
548 2008-08-21 Rafael Espindola <espindola@google.com>