shared libraries linked into executable when they are not neccessary
Tom Kacvinsky
tkacvins@gmail.com
Fri Oct 24 13:28:53 GMT 2025
On Thu, Oct 23, 2025 at 4:44 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Oct 24, 2025 at 4:15 AM Tom Kacvinsky <tkacvins@gmail.com> wrote:
> >
> > Hi Jose,
> >
> > On Thu, Oct 23, 2025 at 10:56 AM Jose E. Marchesi <
> jose.marchesi@oracle.com> wrote:
> >>
> >>
> >> What DSO is being linked that you don't expect?
> >>
> >> There are some DSOs that are linked in every non-static executable, such
> >> as ld-linux-x86-64.so, linux-vdso.so, and likely libc.so.6, libm etc.
> >
> >
> > These are not the usual glibc shared libraries. These are boost
> libraries that resolve
> > symbols from some of our static libraries. But the thing is, I cannot
> determine why
> > all of the boost libraries we specify on the link line are used, when we
> really need
> > only two.
> >
> > I'd attach my map file, but it's 15 MB. That would be a no-no.
>
> Please try -fuse-ld=bfd
>
This worked after using -Wl,--rpath-link (which we didn't need to use with
-fuse-ld=gold).
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20251024/9cc324c7/attachment.htm>
More information about the Binutils
mailing list