* Exporting inline functions [not found] <8cd84a5c-4de3-4c00-9bfd-296451fc3593@Spark> @ 2023-09-25 22:46 ` Nima Hamidi 2023-09-26 6:42 ` Paul Iannetta 0 siblings, 1 reply; 2+ messages in thread From: Nima Hamidi @ 2023-09-25 22:46 UTC (permalink / raw) To: gcc [-- Attachment #1: Type: text/plain, Size: 241 bytes --] Hello all, 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? Thanks! ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Exporting inline functions 2023-09-25 22:46 ` Exporting inline functions Nima Hamidi @ 2023-09-26 6:42 ` Paul Iannetta 0 siblings, 0 replies; 2+ messages in thread From: Paul Iannetta @ 2023-09-26 6:42 UTC (permalink / raw) To: Nima Hamidi; +Cc: gcc 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-26 6:42 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <8cd84a5c-4de3-4c00-9bfd-296451fc3593@Spark> 2023-09-25 22:46 ` Exporting inline functions Nima Hamidi 2023-09-26 6:42 ` Paul Iannetta
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).