[RFC] -rdynamic instead of function pointers for Lua(JIT) scripting?

Dmitry V. Levin ldv at altlinux.org
Sun Sep 3 21:01:16 UTC 2017

On Sun, Sep 03, 2017 at 04:15:06PM +0300, Victor Krapivensky wrote:
> We could make all the functions we currently provide to FFI non-static,
> feed their definitions to ffi.cdef, and build strace with -rdynamic,
> instead of providing function pointers to Lua(JIT).
> This would improve the performance, as LuaJIT's FFI inlines calls to
> such functions, though this is surely not the bottleneck anyway.
> What are the downsides of such approach?

-rdynamic would increase the dynamic symbol table section of strace:

without-rdynamic$ readelf --dyn-syms ./strace |grep contains
Symbol table '.dynsym' contains 136 entries:

with-rdynamic$ readelf --dyn-syms ./strace |grep contains
Symbol table '.dynsym' contains 965 entries:

GNU ld has --dynamic-list option to specify the list of symbols
that should be added to the dynamic symbol table.
This option should be used instead of -rdynamic whenever possible.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170904/36924e26/attachment.bin>

More information about the Strace-devel mailing list