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 71A3E1F4B4 for ; Tue, 19 Jan 2021 21:39:00 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF40A3836C00; Tue, 19 Jan 2021 21:38:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF40A3836C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611092336; bh=mv9GNXjK4MK+NgzTZtwkFoE7tLeN4CIcPNUbCu3V7Zw=; 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=uu6a77uQMgPdkogYD1wzGVYN1JTavoQmBix0hO0GMkpNZeQptfnu/eGEArHmxHRfo cDtcdyWeXHVE0PG/X/PBhOoD3mDR7d+xGE6ooFfsXcIrdxXuEK8Z7VjPUjsLZqR+yV zmp33e4IbKt3HNkRzkE2pHFJV89fchskEdGIfHRM= Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id 560F13858022 for ; Tue, 19 Jan 2021 21:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 560F13858022 Received: by mail-oi1-x22b.google.com with SMTP id w124so22875779oia.6 for ; Tue, 19 Jan 2021 13:38:54 -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=mv9GNXjK4MK+NgzTZtwkFoE7tLeN4CIcPNUbCu3V7Zw=; b=ZtHllNPCt5+OHgkDsIZ90BpJt0U25AReAGRfYprdMfaAoPEUMGUsRAl0SJuW+F6hNk X38/6PixMHJQxsjwBB6NBQOywLoATdAcDVkU37Jr3YRkvIcwcT0Maw0/XJuwBGiwrpgK yWHR5bll5BXPvmufda5Rww+IGf3sXMWV1dwMYY67xBa86ZRsFINIdqJDURnjA42h+Zlg /l8itKwfBbmwTQmjw4qHDrphoBXlqa8XcHYJec+JLfY9NH77DRfajCQZulrp03WQnnNF llYyh6e64Jgv6/YM4YlgOuJP4LaTsCzkuTbTo3l/TFnk7/LE56yfjw4UztMDP7GmTxB+ kOsA== X-Gm-Message-State: AOAM531ZXnWAxTz34jTcu8CEYEnbJpNrbaFjbH3kWkuYPs1hvr0voE5h kc1Kx7XCNrna7ty54BMDKwc9GbbjYN4rCD040zs= X-Google-Smtp-Source: ABdhPJygg3OQ9VyTmMvzoYgMM0tQCdAQJenEHgrOTRIYwLPPh3Lb6/j1y4/8GoaRdViL0ZoCBT1uMxmJR7OxJrdQP2w= X-Received: by 2002:aca:4d8b:: with SMTP id a133mr1151615oib.79.1611092333753; Tue, 19 Jan 2021 13:38:53 -0800 (PST) MIME-Version: 1.0 References: <9f68b24a-437c-db8e-d1fa-b26d2e06d103@linaro.org> <20210119182504.GG3445@arm.com> <831d6134-b688-9049-5d7c-4092f4a6d968@linaro.org> In-Reply-To: <831d6134-b688-9049-5d7c-4092f4a6d968@linaro.org> Date: Tue, 19 Jan 2021 13:38:16 -0800 Message-ID: Subject: Re: [PATCH v4 00/10] fix ifunc with static pie [BZ #27072] To: Adhemerval Zanella 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 Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Tue, Jan 19, 2021 at 12:16 PM Adhemerval Zanella wrote: > > > > On 19/01/2021 16:41, H.J. Lu wrote: > > On Tue, Jan 19, 2021 at 10:25 AM Szabolcs Nagy via Libc-alpha > > wrote: > >> > >> The 01/18/2021 18:37, Adhemerval Zanella wrote: > >>> As a side note I tried your branch with a build for all support Linux > >>> ABIs and it as least improves by issuing an error on architectures > >>> where previously indicated support static-pie but it is broken in practice > >>> (powerpc for instance [1]) > >>> > >>> So currently static-pie are support for all architectures, however it > >>> fails to build for: > >>> > >>> alpha-linux-gnu > >>> arc-linux-gnuhf > >>> hppa-linux-gnu > >>> ia64-linux-gnu > >>> m68k-linux-gnu > >>> microblaze-linux-gnu > >>> riscv32-linux-gnu-rv32imafdc-ilp32d > >>> riscv64-linux-gnu-rv64imafdc-lp64d > >>> s390-linux-gnu > >>> sparc64-linux-gnu > >>> sparcv9-linux-gnu > >>> > >>> By requiring PI_STATIC_AND_HIDDEN hppa, m68, microblaze, mips, nios2, > >>> and powerpc fail at configure. Some architecture still fails at build: > >>> > >>> alpha-linux-gnu > >>> arc-linux-gnuhf > >>> riscv32-linux-gnu-rv32imafdc-ilp32d > >>> riscv64-linux-gnu-rv64imafdc-lp64d > >>> s390-linux-gnu > >>> sparc64-linux-gnu > >>> sparcv9-linux-gnu > >>> > >>> I haven't checked if mips is currently broken for static-pie (since > >>> as for powerpc, it does not define PI_STATIC_AND_HIDDEN); but I would > >>> expect so. > >>> > >>> It would be good if we could avoid building the broken configuration > >>> and warn it on configure, but I don't think this should be a blocker. > >>> The NEWS for 2.27 states this features is only supported for x86 > >>> and aarch64, so I wonder if would be better to just enable it for > >>> the supported architectures instead of relying on PI_STATIC_AND_HIDDEN. > >> > >> i randomly checked alpha, which fails while linking sln: > >> > >> elf/dl-reloc-static-pie.c:40: undefined reference to `_DYNAMIC' > >> > >> i think this should be possible to configure test in case others > >> targets fail in a similar way. > >> > > > > Linker must be fixed to support static PIE: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=22269 > > https://sourceware.org/bugzilla/show_bug.cgi?id=22263 > > https://sourceware.org/bugzilla/show_bug.cgi?id=21252 > > My question is which is the correct way to check at configure time > for this support? Currently this patchset added the PI_STATIC_AND_HIDDEN, > which is set by each configure snipper within glibc. Add and define SUPPORT_STATIC_PIE for x86 and aarch64. Other targets can opt-in. -- H.J.