From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 18C193858422 for ; Thu, 22 Sep 2022 09:19:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18C193858422 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1663838388; bh=zM5QQbSSAPrnzb/ek5bstYnQD1PScuJSWVY1J3hHMmg=; h=From:To:Cc:Subject:Date:From; b=X4dBwjM1Jk05eM6z6/gzcgGgCFTjdnTRwZg4oUk/0qYBGGWaY8Wb9mesC/XjzMOqx g7CdhFB9re8398clEFzq9CJw5tvqxa0ZCjTS/shYWugS4KqbkpILu51VV8kXD+K2ZR AiQJju3+sLlFl9OvQmqiY15MWsBhKeCxpY3iuNYg= Received: from xry111-x57s1.. (unknown [IPv6:240e:358:11dd:8700:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9354B667B5; Thu, 22 Sep 2022 05:19:43 -0400 (EDT) From: Xi Ruoyao To: libc-alpha@sourceware.org Cc: caiyinyu , liuzhensong , Lulu Cheng , Wang Xuerui , Chenghua Xu , Xi Ruoyao Subject: [PATCH 0/1] LoongArch: Add static PIE support Date: Thu, 22 Sep 2022 17:19:23 +0800 Message-Id: <20220922091924.3033-1-xry111@xry111.site> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,FROM_SUSPICIOUS_NTLD_FP,KAM_SHORT,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_PDS_OTHER_BAD_TLD 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: Static PIE allows us to extend the ASLR to cover static executables, this patch adds static PIE support for LoongArch. Change from RFC to v1: no change, just remove "RFC" because the GCC [1] and Binutils [2][3] patches are already merged. [1]: https://gcc.gnu.org/r13-2728 [2]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae2e4d4 Summary of test results (with GCC trunk and Binutils trunk): 4592 PASS 22 UNSUPPORTED 12 XFAIL 6 XPASS Use "sln" as an example to show it works: $ file elf/sln elf/sln: ELF 64-bit LSB pie executable, LoongArch, version 1 (SYSV), static-pie linked, for GNU/Linux 5.19.0, with debug_info, not stripped $ touch a $ elf/sln a b $ readlink b a Xi Ruoyao (1): LoongArch: Add static PIE support sysdeps/loongarch/configure | 37 ++++++++++++++++++++++++++++++++++ sysdeps/loongarch/configure.ac | 14 +++++++++++++ sysdeps/loongarch/start.S | 14 ++++++++++--- 3 files changed, 62 insertions(+), 3 deletions(-) -- 2.37.0