[Tarantool-patches] [PATCH 00/43] Unhide symbols

'Konstantin Osipov' kostja.osipov at gmail.com
Tue Apr 14 23:41:27 MSK 2020


* Timur Safin <tsafin at tarantool.org> [20/04/14 21:01]:
> : Mons will be happy simply if we switch back to default gcc linking
> : options, -fvisibility=default, which is basically dropping
> : -exported_symbols_list.
> : 
> : --
> : Konstantin Osipov, Moscow, Russia
> 
> Nope, this won't work the desired way - linker will get rid of symbol if it's default visible and unreferenced in the executable.
> 
> We used to have FFI hack for such case, which was deleted
> because explicitly exported symbol (via loader list) will be
> retained in the binary. If we explicitly export them in the code
> - we will get to the same result - unreferenced/"unused" symbol
> will be available for external access (e.g. from LuaJIT ffi). 

This is unrelated. 1.5 didn't have plugin api and no ffi exports 
and mons was hacking into it.

In fact he wasn't hacking into functions at all, he was hacking
into global state, such as cord_ptr->fiber, and it was not (and I
believe is not) removed from the visibility list by linker.

In short:
When trying to understand how this "feature" worked before, look
at 1.5, not 1.6+.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list