From: Paul Iannetta <piannetta@kalrayinc.com>
To: Nima Hamidi <nimaa.hamidi@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Exporting inline functions
Date: Tue, 26 Sep 2023 08:42:10 +0200 [thread overview]
Message-ID: <20230926064210.fol5u3r3ewr36dmm@ws2202.lin.mbt.kalray.eu> (raw)
In-Reply-To: <f64c0eb5-8f26-4d89-a0c2-9587b61cb51b@Spark>
Hi,
On Mon, Sep 25, 2023 at 05:46:36PM -0500, Nima Hamidi via Gcc wrote:
> Is there any flag that I can pass to gcc to make it generate dynamic symbols for inline functions too? Let’s say I need to lookup an inline function via dlopen and call it. Is there an easy way to achieve this?
>
You may want to look at options -fkeep-inline-functions and -fkeep-static-functions. If you use them inline and static functions will be emitted into the object file. Beware that if __attribute__((always_inline)) is used it won't be kept.
Paul
prev parent reply other threads:[~2023-09-26 6:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8cd84a5c-4de3-4c00-9bfd-296451fc3593@Spark>
2023-09-25 22:46 ` Nima Hamidi
2023-09-26 6:42 ` Paul Iannetta [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=20230926064210.fol5u3r3ewr36dmm@ws2202.lin.mbt.kalray.eu \
--to=piannetta@kalrayinc.com \
--cc=gcc@gcc.gnu.org \
--cc=nimaa.hamidi@gmail.com \
/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).