From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 69E0C4696C3 for ; Tue, 14 Apr 2020 23:41:30 +0300 (MSK) Received: by mail-lf1-f66.google.com with SMTP id t11so881919lfe.4 for ; Tue, 14 Apr 2020 13:41:30 -0700 (PDT) Date: Tue, 14 Apr 2020 23:41:27 +0300 From: 'Konstantin Osipov' Message-ID: <20200414204127.GA32171@atlas> References: <20200412113423.GA28681@atlas> <84069240-b5a4-9e61-09f4-a347fe53d54c@tarantool.org> <20200413094004.GB16266@atlas> <20200413094230.GC16266@atlas> <533bd68c-4bbb-446a-6265-da4f47d451f1@tarantool.org> <20200413194931.GB1734@tarantool.org> <8b7bcee8-b2db-8f2c-d241-687f6b6d6f4b@tarantool.org> <20200413213801.GB12552@atlas> <13d501d61286$af32d4b0$0d987e10$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13d501d61286$af32d4b0$0d987e10$@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Timur Safin Cc: tarantool-patches@dev.tarantool.org, 'Vladislav Shpilevoy' * Timur Safin [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