bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/17479] Shared object missing symbol explicitly specified in --re


From: predictivestatmech at gmail dot com
Subject: [Bug ld/17479] Shared object missing symbol explicitly specified in --retain-symbols-file
Date: Fri, 17 Oct 2014 18:24:29 +0000

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

--- Comment #3 from David Rogers <predictivestatmech at gmail dot com> ---
On 10/14/14, 5:40 AM, amodra at gmail dot com wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=17479
>
> Alan Modra <amodra at gmail dot com> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |amodra at gmail dot com
>
> --- Comment #2 from Alan Modra <amodra at gmail dot com> ---
> If you omit -Wl,--retain-symbols-file=sym.list does the shared library contain
> the symbols you seem to have misplaced?  I suspect the reason they are missing
> is simply that their object file is not included in the link.  An object 
> within
> an archive library won't be extracted unless it satisfies some undefined 
> symbol
> at the point the archive is searched.  See also the --whole-archive option.
>
No, omitting

-Wl,--retain-symbols-file=sym.list

makes the shared library even smaller, and is still missing the 
functions I'm looking for.

I'm trying to create a shared library containing lots of individual 
functions, so I don't have a single object file that references them.

I did get linking to succeed as you suggest using --whole-archive on two 
specific static ".a" libraries (after removing some useless functions 
that didn't link due to undefined references).  However, I thought the 
retain-symbols-file was supposed to offer more fine-grained control.  
That way, I could cherry pick just the individual functions I need for 
the shared library (and are sure to link).  I suppose another hack would 
be to create an object file that calls each function, but that seems 
unsatisfactory in general.

~ David.

-- 
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]