bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13557] Undef. ref. err. when linking with slim LTO obj. in stati


From: lrn1986 at gmail dot com
Subject: [Bug ld/13557] Undef. ref. err. when linking with slim LTO obj. in static lib. (mingw32 target)
Date: Tue, 29 Apr 2014 12:08:25 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=13557



--- Comment #6 from LRN <lrn1986 at gmail dot com> ---

Created attachment 7566

  --> https://sourceware.org/bugzilla/attachment.cgi?id=7566&action=edit

A hack to fix lto linking



Built binutils with debuginfo on Debian, compared with what runs on Windows.



elf_link_add_archive_symbols() just loops through all archive symbols and c
alls

>         if (!(*info->callbacks

>               ->add_archive_element) (info, element, symdef->name, &element))

for each one of them. It only needs element to be non-NULL, and to have the

bfd_object format.



_bfd_generic_link_add_archive_symbols(), on the other hand, does the checks

detailed above AND calls

>         if (! (*checkfn) (element, info, &needed))

>           goto error_return;

*checkfn is coff_link_check_archive_element(), it calls

coff_link_check_ar_symbols(), which i've examined earlier.



Here's a hack that forces coff_link_check_ar_symbols() to recognize gnu lto

symbol names. My guess is that a non-hacky version should consult the plugin

(maybe call claim_file() over element or something?).



-- 

You are receiving this mail because:

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]