From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7790 Path: news.gmane.org!not-for-mail From: Alex Dowad Newsgroups: gmane.linux.lib.musl.general Subject: Re: Question re: dynamic linking in musl Date: Wed, 27 May 2015 15:15:03 +0200 Message-ID: <5565C357.1070508@gmail.com> References: <20150527100844.GA306@alex-ThinkPad-L530> <5565A812.9090004@gmail.com> <20150527160955.1bda26cf@vostro> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1432732528 11953 80.91.229.3 (27 May 2015 13:15:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2015 13:15:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7802-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 27 15:15:28 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YxbB8-0004zG-7P for gllmg-musl@m.gmane.org; Wed, 27 May 2015 15:15:26 +0200 Original-Received: (qmail 3116 invoked by uid 550); 27 May 2015 13:15:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3090 invoked from network); 27 May 2015 13:15:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=wKEjV5TEUwzo8McWJ8K3Ca1XPsQQigzj1zl39VZUcCQ=; b=pxjMReOOq1BOBJtKxsS0K4Hn6Lla8OXI5PP7BMcqIe9JPbr+0g6Rgs3YnWwU5GAMEj hVqxbI4lK4FxmPnOC+pt4nhfJ6JLARDzjykQkhKiQZmxDJh0dZSPxPPJp785vLdfzjoR v8AV1kZwhLZqoGVn10GRWZIA9DCpj78zb/5uzRd6ij/W9M6dFbiM3Sqoag07PbeGH9vU eLLnMytJsCwI0KWA1mZcInyR+tgeztiXjagupKiRQHCKcm/RAdYctDGECAbjyG90+OkT BFRbFU76PvEsB53beO428iHv9ix+pmpnlYGlqxXXtCm0rzCObOLOyCAnyOgN8FCFJCkx Qh4g== X-Received: by 10.194.222.137 with SMTP id qm9mr59584838wjc.43.1432732507715; Wed, 27 May 2015 06:15:07 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <20150527160955.1bda26cf@vostro> Xref: news.gmane.org gmane.linux.lib.musl.general:7790 Archived-At: On 27/05/15 15:09, Timo Teras wrote: > On Wed, 27 May 2015 16:01:50 +0300 (MSK) > Alexander Monakov wrote: > >> On Wed, 27 May 2015, Alex Dowad wrote: >>>> Can you also provide exact figures? For example your callgrind >>>> logs? Or just >>>> 'time' statistics for executables that spend much time in the >>>> dynamic linker. >>> Callgrind data attached. >> Oh. The profile makes it evident that most of the libraries >> lack .gnu.hash, and the lookup is almost always using SysV lookup. >> With many dependencies SysV lookup is slower: in my testing with >> Clang/LLVM I got something like 420 ms (compared to 240 ms unpatched >> or 110 ms patched musl with .gnu.hash lookup). >> >> I'm not familiar with Alpine. Hopefully someone else can chime in >> whether .gnu.hash is deliberately disabled. > We have not touched, so we are using the gcc default. Which apparently > then is sysv only (bummer). > Yes, that callgrind profile was from a program installed from Alpine repos. Use --hash-style=both in LD_FLAGS when building the APKs, and dynamic linking will become much faster! Alex