This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix handling of common symbols with plugins


ping.

On 9 September 2014 19:41, Rafael EspÃndola <rafael.espindola@gmail.com> wrote:
> Currently we don't produce the correct result if a common symbol shows
> up in both ELF and IR. In a previous patch I tried to pass the size
> information back to the plugin, but unfortunately there is no field in
> d_plugin_symbol to pass the alignment.
>
> What I have implemented now is:
>
> * The plugin is expected to handle all common symbols in IR. It can do
> it by merging them or by passing multiple objects to the linker with
> each symbol.
>
> * The linker will not blindly override a common symbol during the
> replacement phase. Instead, the regular logic is applied so that we
> don't discard information in case an ELF file had the largest size or
> alignment.
>
> In addition to "make check" I tested this with a small script and two
> LLVM IR files. The script test all combinations of input order and
> file type (IR or ELF) and checks that we get the same alignment and
> size.
>
> Cheers,
> Rafael
>
>
> gold
> 2014-09-09  Rafael Ãvila de EspÃndola <respindola@mozilla.com>
>
>         * plugin.cc (Sized_pluginobj::do_add_symbols): Ignore isym->size.
>         * resolve.cc (Symbol_table::resolve): Don't override common symbols
>         during the replacement phase.
>
> include
> 2014-09-09  Rafael Ãvila de EspÃndola <respindola@mozilla.com>
>
>         * plugin-api.h (ld_plugin_symbol): Note that size is ignored.
>
> ld
> 2014-09-09  Rafael Ãvila de EspÃndola <respindola@mozilla.com>
>
>         * plugin.c (asymbol_from_plugin_symbol): Ignore ldsym->size.
>         * testplug.c (parse_symdefstr): Ignore sym->size.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]