From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 997591F4B4 for ; Tue, 19 Jan 2021 17:54:32 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EAFB393C85F; Tue, 19 Jan 2021 17:54:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EAFB393C85F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611078871; bh=VFnwMnb2wvByXvuFAVyBes4XfXDS3yv2LuIl0NM++eU=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UWyYrCLWI0n4q/wVT1da8trx1otcARPVhvc7zWnq+ssg9WEHLQlJmRXhM8G3i3nab 9UMh+OyBzgzUwQFsZm9GaZQoi/8vZbIh13JZ1gh7tnyipIj7Y5XdomDzZCmhOvI59S NRfl9rLLCybi/kt5muDfq676scQcq1sIJPNFFTmY= Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 087C9383F857 for ; Tue, 19 Jan 2021 17:54:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 087C9383F857 Received: by mail-ot1-x333.google.com with SMTP id d1so115196otl.13 for ; Tue, 19 Jan 2021 09:54:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VFnwMnb2wvByXvuFAVyBes4XfXDS3yv2LuIl0NM++eU=; b=IcIbbnQ1DmWHSDv6clESh7McWonO+DlUU1eUIZLx5UAkx07agF/Nz6U8pQrjcl53Ur /mT8J1huhxbq2dS7pjhe5IMHaQ0G7m266ygSLkNkpMzmuYIcn39gIrRasXPLju39AHhf +TNfOgVYVSERL4zTeJVmx7duce8J9ecPYhLXmt/im6mW4x4JL08uRkjBEZK/pEre7Wwz sdiarkCDdVgVzcvGBbAB/wKxzXWJvbmrmFf7OS5dmdKQRqyVYOlstUX9EAnMkIGhxeTj wlatg1TuOsSLlKMECIAqdmzDTaU47y0OULgGSMpXD0km78qTHTANqqkoUC/L2VVymRDg O0nw== X-Gm-Message-State: AOAM533U1iGKqsb/Y4gkrXsk2sXtPla/tRePG+Zrp80aB/0u58o8pDcs pEBD7wsL8kO34bZ2Q4IdSKo5C1SWuGuTl6kByOE= X-Google-Smtp-Source: ABdhPJw15Vwxm8uaxOeYDabJN9IEl+2mNJoB+/MO0LfBFb9gC1cQVskHzlMTejjbiGaKUvLI8QBWTJT0SYERKnyBM3Y= X-Received: by 2002:a9d:6285:: with SMTP id x5mr4260381otk.179.1611078868501; Tue, 19 Jan 2021 09:54:28 -0800 (PST) MIME-Version: 1.0 References: <20210119143500.GA3445@arm.com> <20210119152441.GB3445@arm.com> <20210119170319.GC3445@arm.com> <20210119173832.GD3445@arm.com> <20210119174734.GE3445@arm.com> In-Reply-To: <20210119174734.GE3445@arm.com> Date: Tue, 19 Jan 2021 09:53:52 -0800 Message-ID: Subject: Re: [PATCH v4 08/10] csu: Move static pie self relocation later [BZ #27072] To: Szabolcs Nagy Content-Type: text/plain; charset="UTF-8" X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: GNU C Library , =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Tue, Jan 19, 2021 at 9:47 AM Szabolcs Nagy wrote: > > The 01/19/2021 09:42, H.J. Lu wrote: > > On Tue, Jan 19, 2021 at 9:38 AM Szabolcs Nagy wrote: > > > > > > The 01/19/2021 09:10, H.J. Lu wrote: > > > > On Tue, Jan 19, 2021 at 9:03 AM Szabolcs Nagy wrote: > > > > > > > > > > The 01/19/2021 08:47, H.J. Lu wrote: > > > > > > On Tue, Jan 19, 2021 at 7:32 AM H.J. Lu wrote: > > > > > > > On Tue, Jan 19, 2021 at 7:24 AM Szabolcs Nagy wrote: > > > > > > > > The 01/19/2021 06:48, H.J. Lu wrote: > > > > > > > > > On Tue, Jan 19, 2021 at 6:37 AM Adhemerval Zanella via Libc-alpha > > > > > > > > > wrote: > > > > > > > > > > On 19/01/2021 11:35, Szabolcs Nagy wrote: > > > > > > > > > > > the problem is that _dl_phdr is used in ARCH_SETUP_TLS > > > > > > > > > > > (to get the tls program headers) so the __ehdr_start > > > > > > > > > > > magic should be before that (this only matters if auxv > > > > > > > > > > > lacks AT_PHDR for some reason, which should not happen > > > > > > > > > > > normally on linux, so testing won't show the problem) > > > > > > > > > > > > > > > > > > > > By normally do you mean it might happen on a specific kernel version > > > > > > > > > > or is it architecture specific? > > > > > > > > > > > > > > > > i guess __ehdr_start symbol can be useful and with it > > > > > > > > glibc does not have to depend on auxv (which an elf > > > > > > > > loader like valgrind/qemu-user may get wrong) > > > > > > > > > > > > > > > > however it is only used as a fallback and on linux > > > > > > > > AT_PHDR is always expected to be present. (i don't > > > > > > > > know if this ever triggers) > > > > > > > > > > > > > > Only used on Hurd? > > > > > > > > > > > > Does arm64 linker always define __ehdr_start? If yes, can you drop > > > > > > "weak," to see if RELATIVE goes away? > > > > > > > > > > __ehdr_start support was added in binutils 2.23 > > > > > > > > We may assume binutils >= 2.33 when building for static PIE > > > > since all static PIE linkers should define __ehdr_start. > > > > > > this piece of code is used for both static PIE and non-PIE, > > > but we already require binutils >= 2.25 for building glibc, > > > dropping weak should be fine. > > > > > > > It is safer to check BUILD_PIE_DEFAULT when dropping > > weak. > > ok. > > does static linking have weaker linker version requirement > than building glibc? Very unlikely. But one may be forced to use the older linker for some reason. -- H.J.