From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50274 invoked by alias); 9 Nov 2016 22:02:45 -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 50263 invoked by uid 89); 9 Nov 2016 22:02:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy= X-HELO: topped-with-meat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Szabolcs Nagy Cc: , Renlin Li , , Marcus Shawcroft , Richard Earnshaw Subject: Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol In-Reply-To: Szabolcs Nagy's message of Wednesday, 9 November 2016 14:48:21 +0000 <58233735.2050204@arm.com> References: <581C57FF.2090901@foss.arm.com> <20161104212440.A23F42C3AD8@topped-with-meat.com> <58209A8B.5030702@arm.com> <20161108212829.5ABE92C3A0D@topped-with-meat.com> <58233735.2050204@arm.com> Message-Id: <20161109220242.C10FB2C3A24@topped-with-meat.com> Date: Wed, 09 Nov 2016 22:02:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=XYkakuJ5 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=uAx7QO5bhD3MAKyAG0oA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2016-11/txt/msg00365.txt.bz2 > On 08/11/16 21:28, Roland McGrath wrote: > > Show me the code you have in mind using _DYNAMIC. The scheme using a > > linker-defined symbol with value 0 is the only one I'm aware of that > > reduces to the minimal number of assembly instructions, with none of them > > being a load. > > well the current x86_64 code is already doing what i had in mind. And it is more costly than using _BASE. > i assumed GOT[0] is used elsewhere so it has to be computed anyway > and then doing (_DYNAMIC-GOT[0]) should be the same as _BASE using > an extra sub. Of course all the methods that work get the same result! The point is that the _BASE method does it the most efficiently.