[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luajit-FFI suggestions
- From: Mike Pall <mikelu-1106@...>
- Date: Tue, 14 Jun 2011 02:10:38 +0200
Scott Shumaker wrote:
> > If you export them, then they don't get stripped.
> I've tried both: __attribute__((__visibility__("default"))), #pragma
> GCC visibility push(default) - and neither one seems to do the trick.
> Is there some other trick I need to get this to work (gcc version
> 4.4.3 (GCC), cross-compiling for android).
No, that's not how it works on Linux/Android and most ELF systems.
Executables do not export any symbols by default. You need to use
the -Wl,-E option when linking your executable.
Conversely, this means you need to hide the non-static symbols you
don't want exported (e.g. with visibility "hidden").