From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93908 invoked by alias); 25 Jan 2018 21:11:49 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 93896 invoked by uid 89); 25 Jan 2018 21:11:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: hall.aurel32.net Received: from hall.aurel32.net (HELO hall.aurel32.net) (163.172.24.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Jan 2018 21:11:47 +0000 Received: from [2001:bc8:30d7:120:9bb5:8936:7e6a:9e36] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eeooA-0006XG-Um; Thu, 25 Jan 2018 22:11:43 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.90) (envelope-from ) id 1eeoo8-0004mP-Fg; Thu, 25 Jan 2018 22:11:40 +0100 Date: Mon, 01 Jan 2018 00:00:00 -0000 From: Aurelien Jarno To: Renlin Li Cc: Szabolcs Nagy , libc-stable@sourceware.org Subject: Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol Message-ID: <20180125211140.GA17956@aurel32.net> References: <581C57FF.2090901@foss.arm.com> <59E624A8.4010304@arm.com> <59E62FBB.2090508@arm.com> <59E72DA9.2090404@foss.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59E72DA9.2090404@foss.arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00053.txt.bz2 Hi, On 2017-10-18 11:32, Renlin Li wrote: > Hi Szabolcs, > > Here is the C version one which should be portable in all cases. > aarch64 native glibc regression test checked Okay. > > Regards, > Renlin > > ChangeLog: > > 2017-10-18 Renlin Li > > * sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use > _DYNAMIC symbol to calculate load address. > I do not know the exact reason of this patch, but my guess is that its goal is to fix building with recent binutils version. Indeed with a recent snapshot of the binutils 2.30 branch, glibc versions withtout this patch fail to build on aarch64 during the linking of ld.so: ... | aarch64-linux-gnu-gcc-7 -no-pie -fno-PIE -nostdlib -nostartfiles -shared -o /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/ld.so.new \ | -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ | /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os -Wl,--version-script=/home/aurel32/glibc-2.26/build-tree/arm64-libc/ld.map \ | -Wl,-soname=ld-linux-aarch64.so.1 \ | -Wl,-defsym=_begin=0 | /usr/bin/ld: /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: relocation R_AARCH64_ABS32 against `a local symbol' can not be used when making a shared object | /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386 | /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386 | /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: In function `process_envvars': | /home/aurel32/glibc-2.26/elf/rtld.c:2499:(.text+0x108c): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `audit_list_string' defined in COMMON section in /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os | /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386 | /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386 ... Given that binutils 2.30 should be released in the next few days, I believe we should fix that in at least the 2.26 stable branch. Do you mind if I backport this patch to this stable branch? Thanks, Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net