This patch fixes some of the issues noted on PR 41550. In particular, it changes from using a file with a hard coded name to using a plugin argument. It also fixes a bug: get_symbols reads the syms argument to find if a symbol is a definition or a use. Because of this, we must pass it the original symbols, not a freshly allocated table. I tested this by writing the resolution file for a simple case with 2 files. Is there anyway of adding tests like this to the testsuite? What it has to do is *) Compile two C files with -flto *) Run gold with -plugin-opt=-resolution=foo *) Run grep on foo I will update the gcc driver in a next patch. Since nothing is using the resolution file right now, this shouldn't be a problem. 2009-10-14 Rafael Avila de Espindola * lto-plugin.c (resolution_file): New. (free_1): Update comment. (write_resolution): Write resolution to specified file. Use the syms array from the symbol table. (all_symbols_read_handler): Delay call to free_1 past call to write_resolution. (process_option): Add a -resolution option. Cheers, -- Rafael Ávila de Espíndola