From: Ulf Samuelsson <binutils@emagii.com>
To: binutils@sourceware.org
Subject: Re: usage of the libdep plugin of LD
Date: Mon, 13 Feb 2023 18:13:29 +0100 [thread overview]
Message-ID: <4f783261-7079-751b-0a52-a731cf77b394@emagii.com> (raw)
In-Reply-To: <z0Lr3_d8ZN9NWya8URdCDkWDrb9icc0uBryDMk-Xpif2QeFIcaPGP7YzeE23C7buzeXxxOh9Konq5CZkD-zNaFjKBHfPKpmRXYOTW-kMuPc=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
Den 2023-02-13 kl. 17:55, skrev Marco Frigerio via Binutils:
> Hi,
> Is there a way of making sure that the libdep plugin of LD is used?
I think you need to supply an option to the LD command --plugin libdep
or something similar.
|-plugin |name
Involve a plugin in the linking process. The name parameter is the
absolute filename of the plugin.
Usually this parameter is automatically added by the complier, when
using link time optimization,
but users can also add their own plugins if they so wish.
Note that the location of the compiler originated plugins is
different from the place where the ar, nm and ranlib programs search
for their plugins.
In order for those commands to make use of a compiler based plugin
it must first be copied into the ${libdir}/bfd-plugins directory.
All gcc based linker plugins are backward compatible, so it is
sufficient to just copy in the newest one.
Best Regards
Ulf Samuelsson
>
> I have a static .a library with the __.LIBDEP section, but linking it to an executable raises linking errors.
>
> All the errors go away if I specify manually the same '-lXXX' which is written in __.LIBDEP, suggesting that the latter is ignored.
>
> GNU Binutils v 2.38, gcc 11.3.0, on Ubuntu Linux.
>
> I could not find anything in the man pages, and the LD docs (section 4) do not say anything about enabling/loading plugins.
>
> I hope this is the right place for this kind of questions, my apologies otherwise.
> Thanks
> - MF
prev parent reply other threads:[~2023-02-13 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 16:55 Marco Frigerio
2023-02-13 17:12 ` Howard Chu
2023-02-13 17:28 ` Howard Chu
2023-02-14 9:45 ` Marco Frigerio
2023-02-14 12:03 ` Nick Clifton
2023-02-13 17:13 ` Ulf Samuelsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f783261-7079-751b-0a52-a731cf77b394@emagii.com \
--to=binutils@emagii.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).