From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 58EBA4696C3 for ; Mon, 13 Apr 2020 16:53:30 +0300 (MSK) References: <20200412113423.GA28681@atlas> <84069240-b5a4-9e61-09f4-a347fe53d54c@tarantool.org> <20200413094004.GB16266@atlas> <20200413094230.GC16266@atlas> From: Vladislav Shpilevoy Message-ID: <533bd68c-4bbb-446a-6265-da4f47d451f1@tarantool.org> Date: Mon, 13 Apr 2020 15:53:27 +0200 MIME-Version: 1.0 In-Reply-To: <20200413094230.GC16266@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Konstantin Osipov , tarantool-patches@dev.tarantool.org On 13/04/2020 11:42, Konstantin Osipov wrote: > * Konstantin Osipov [20/04/13 12:40]: >>> It was never autogenerated. We always patched extra/exports file. >>> That makes almost all your comments irrelevant. >> >> 4c4c1ccbe422e1420ce0c0b36194fc61bb857ed4 adds exports >> >> It also adds explicit -Wl,exported_symbols_list > > Basically the right fix is to remove this link option, not come up > with 43 patches. It is not enough. Static library symbols are not exported, if they are not used. Linker drops them. It means almost all needed symbols are removed when you just remove the option. Alternative is to use option all_load on clang (and whole-archive on gcc), but that exports *all* symbols and *all* functions. Even the ones which really are not needed, but are just a part of some library, which we don't want to trim. The decision was made to go for the former option.