From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id 5A92F3858D1E for ; Tue, 21 May 2024 11:13:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A92F3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A92F3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=78.133.224.34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716290003; cv=none; b=M6br9C1WCGQq4eYRoon69s+M1Mqt7Ekl6cEvD3KcIksdooowb0ll8AOjFZ3C/lEWU5sAepZBttdj0AeS+duYd8kNIN9WCh2tJ1LPahHzBQanU8TbNd87GBHCoye7iOg7zVvXDTxawnyq0nd1W3aSUzz0bnN7TbrKQcf3sTChBV4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716290003; c=relaxed/simple; bh=h8B/12EnGyyFy0rNlpddN5rlVoW5Wj+yfqk9iS7XTZ8=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=mYuO1HKQzJwijSDjzVpYrRo64gXnPoxM/zDLnhPdfHMDiNu0Eb9ceYLbIXgeFqe/bw2X0GXsMj8yF4of6Z+rsZGz7h2VgkZ0aIUA97Op1Lmaji53KoMLLcIysO1x69M07DKB1OTTsR0fC+YmxuqgxGso201lmFRGXGxyB2uVWuY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id E640892009C; Tue, 21 May 2024 13:13:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id DE72592009B; Tue, 21 May 2024 12:13:19 +0100 (BST) Date: Tue, 21 May 2024 12:13:19 +0100 (BST) From: "Maciej W. Rozycki" To: yanzhang.wang@intel.com cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org Subject: Re: [PATCH v3] RISC-V: Enable static-pie. In-Reply-To: <20240102105415.516313-1-yanzhang.wang@intel.com> Message-ID: References: <20230810233348.1214955-1-yanzhang.wang@intel.com> <20240102105415.516313-1-yanzhang.wang@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1163.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2 Jan 2024, yanzhang.wang@intel.com wrote: > This patch referents the commit 374cef3 to add static-pie support. And > because the dummy link map is used when relocating ourselves, so need > not to set __global_pointer$ at this time. > > It will also check whether toolchain supports to build static-pie. Somehow the check fails to trigger here, causing a build error: riscv64-linux-gnu-gcc -o .../support/test-run-command -nostdlib -nostartfiles -static -static-pie .../csu/rcrt1.o .../csu/crti.o `riscv64-linux-gnu-gcc --print-file-name=crtbeginS.o` .../support/test-run-command.o .../elf/static-stubs.o .../support/libsupport_nonshared.a -Wl,--start-group .../libc.a -lgcc -Wl,--end-group `riscv64-linux-gnu-gcc --print-file-name=crtendS.o` .../csu/crtn.o.../bin/../lib/gcc/riscv64-linux-gnu/14.0.0/../../../../riscv64-linux-gnu/bin/ld: read-only segment has dynamic relocations collect2: error: ld returned 1 exit status make[2]: *** [../Rules:290: .../support/test-run-command] Error 1 I have filed BZ #31773. Maciej