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

Timur Safin tsafin at tarantool.org
Tue Apr 14 21:26:09 MSK 2020



: -----Original Message-----
: From: Tarantool-patches <tarantool-patches-bounces at dev.tarantool.org> On
: Behalf Of Timur Safin
: Sent: Tuesday, April 14, 2020 9:01 PM
: To: 'Konstantin Osipov' <kostja.osipov at gmail.com>; 'Vladislav Shpilevoy'
: <v.shpilevoy at tarantool.org>
: Cc: tarantool-patches at dev.tarantool.org
: Subject: Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols
: 
: : 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).
: 
: 
: Timur

Well, as I've realized later (after further discussions with Vlad) ld has not kept explicitly exported symbols after it has collected executable out of list of static libraries we have. That's unfortunate - we need to find out the way to make ld working more link in the case of so. Will look around.

Timur



More information about the Tarantool-patches mailing list