From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8167 invoked by alias); 25 Jun 2019 19:47:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 8156 invoked by uid 89); 25 Jun 2019 19:47:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qt1-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/zk5rJ2sMjBA76kztI16aQLq33kJhmp01K2bRCK90Rw=; b=umbvAvNPkbLV37yCp4f8d/L2J4E8eS4VKgRnV63lxANZRow7QwlRTe88r3HbwuG1fD G5CFOULRwFV9S6LAJaa8u9Sc44P5XEComuSkBM4jfe7X1ql64IXbRbIqEOcoIY7/3S/s AgCHZfrTfXvNWiWsTkg6kqs6o+aoI1rsblri919Vmhd2Y6uXcAo9VEGmTUXg6r8pIfWD dVavKQdtiRXInH9eiHZLne5CSiaz0JCMzzBVn9Yi7s0NCPePrFRNuvfCJUt1cqZKTnG4 ihgOKzqBW0AR5fMY9hJpOF5k6/3TBi7A/E0mPzIos1ZW2vncoSp2PHw3V0t7s+3MxOfy MDVw== Return-Path: Subject: Re: [PATCH 11/12] linux: Consolidate time implementation To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20190614152908.8101-1-adhemerval.zanella@linaro.org> <20190614152908.8101-11-adhemerval.zanella@linaro.org> <871rzhwmk0.fsf@oldenburg2.str.redhat.com> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <59a55ae2-f5d1-367c-1882-08b18550bf92@linaro.org> Date: Tue, 25 Jun 2019 19:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <871rzhwmk0.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-06/txt/msg00696.txt.bz2 On 25/06/2019 15:24, Florian Weimer wrote: > * Adhemerval Zanella: > >> * include/libc-symbols.h (hidden_def_redir): New macro. > > This macro should have documentation in the large common block above it. > Its purpose isn't obvious to me. > >> +#if HAVE_IFUNC && defined USE_TIME_VSYSCALL_IFUNC >> +/* Route externals calls direct to vDSO and static and internal calls to >> + fallback implementation (which also might call the vDSO). */ >> +# ifdef SHARED >> +# define INIT_ARCH() >> +libc_ifunc_redirected (__redirect_time, time, >> + get_vdso_symbol (HAVE_TIME_VSYSCALL) >> + ?: time_syscall); >> +libc_hidden_def_redir (time_syscall, time) >> +# else >> +strong_alias (time_syscall, time) >> +# endif /* SHARED */ > > Does this really work on x86-64? I don't think it's possible to call > IFUNCs through hidden aliases. The idea is to not call an IFUNC in the static case nor on internal hidden case for shared case. Only external calls are routes through iFUNC.