Message ID | 20230323204427.3594372-1-maskray@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp3128752wrt; Thu, 23 Mar 2023 13:55:53 -0700 (PDT) X-Google-Smtp-Source: AKy350b6HQLODItgWV7EdJMK2K+Q/luoZUSwkOkt54+B8sFmk9fNIyUDEp89N6oh5fGW/yh/wjtg X-Received: by 2002:a62:2545:0:b0:628:f0:51d4 with SMTP id l66-20020a622545000000b0062800f051d4mr704369pfl.11.1679604953341; Thu, 23 Mar 2023 13:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679604953; cv=none; d=google.com; s=arc-20160816; b=HNcXOiJyCYraXhRqAJWa6zStIgDpTJ77nkI90P7Gvm2Io28k43pv7Eyr3Kj/5GbC8j 3FgkPqHi0FLPh5gIKULMQOZZ2GQEGcflwcsyd5tyVlCo5jZrP8q7KcthVG2HSFWE0bDw ugDhddVbdmb/3WAxvI+g9V2XKE6SdofEPbsqscTnFBGNelZ4KOcGGmv0ZHsFn7Vk/csy ngp50a7cRgFert7x1EV68Xdw2NhZMN2gUzu3CX6oUMM7hkq4RdjJxqzR0D3FAWEdrtwp zisiHknYql0eB3qJpr7VvCdys0zbaYQKQ7V7/eGRCDmVDH6LC0vgMmSWegSDFqgHSrR7 sCug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=mUfH+Md25yxJlsQyV3Gh/pKDcR3vpRAyfVLlwmvSTm8=; b=BWkbpk3H1OyL8ytPQslNHhZnVcZbla0iTjYn4ybJByGJiAiofuVVAsl15eWM5Dsye1 9xcHPZW5NhHVukxYF9KcL+lDgU6nwzUGYK0x77DDQuBEoGsbEc2oA3k1iepHnET3v4Tv H3omk4S8+LMycn46AlrLTasodWGBL2TT9CRHyZK4mJ1mpGivGDf8Ur/XWXzUngURlcPF ny7Xf3aGlRwjz9ZZVcq1ZVQpB+5VW9ryYqiVHqZ4UIjC5ln0rFgvkWk65Gw9PgjenIYB OoSVnkBpjtOAFlzMtcYo3llNHsER417R+B/nufLXKmblOhkJtLWZPfQml08GaVABFNhI HmXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=r5sFoUsv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a056a0002cf00b00627eca45514si13680989pft.62.2023.03.23.13.55.40; Thu, 23 Mar 2023 13:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=r5sFoUsv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbjCWUop (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 16:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbjCWUom (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 16:44:42 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0940D1422E for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 13:44:34 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id t2-20020a632d02000000b005075b896422so6264269pgt.19 for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 13:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679604273; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=mUfH+Md25yxJlsQyV3Gh/pKDcR3vpRAyfVLlwmvSTm8=; b=r5sFoUsvHJiYHwcBYyaeQ803fagCsoXB1Z7YeDcDG0mUp8kslqinFa8KGSlkzW9EXW NxfOb2OYUZBuswWowzazRO2qyHrCxEPF8naVv+u+mNkRPpdEurDFVJ/goqcUg8snJoeG KY3lCFbrgMlNuenjPczaQz2cyAo+gZpgG0Jpbxza0v0fc2TfqnH3uuA/8M9Cb55QkzbT wX0S8KjgcuxsQ3R9Jgyy67SI2Wll4Q91qgkHTK2zfdlFDO4v+t7OT8BhrmOntmgQEeh/ 0VT/WEVh6xsoziimpAjAGMR6JrmRMTNmlAj6tPwyge0Bo+JvfPqVtpwZDXbRWzGQJSjT 21jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679604273; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=mUfH+Md25yxJlsQyV3Gh/pKDcR3vpRAyfVLlwmvSTm8=; b=k6KujZ86RdF8vF/hVJbBNLxyGhqn1lr3DQtJsaUX1LUcxOAjJoFGcOzanyozl9Vxei 9wB4vXhz3CgM1Ut4Own1cF4g3BSxXHPo9PIigld+GWfwEPJITpbN6ULeWIOnzpUPLvC8 mgZtKLmeXspdQSMl3peZ8iLFJglUW0KtPPdufYliYouv3oQaQ6HEo37Qyhd9mVhS4KZo D8bvj7wELgJM4ivCLYFZhjKHe2su5Ra5FCCya7eWJ6qMQo+Ka1LxAr8Csj0K9iCyeTna XpDkE5N+e1Yvpm0vfYzUFHD86OpSUGxGVOYldtqKZTGdkSWB13FM9cGIWtz6OkUqwQYn AOJA== X-Gm-Message-State: AAQBX9fY6qGb2WypZ2BxP58qHU5jqy8kT/xsktCF0viNnupFYrl3LN8/ WVT6OK9tz9aUeYjWCehXSpHI7MHLyU6l X-Received: from meowing-l.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:3eba]) (user=maskray job=sendgmr) by 2002:a17:903:22c6:b0:1a0:6000:7fd0 with SMTP id y6-20020a17090322c600b001a060007fd0mr94758plg.5.1679604273533; Thu, 23 Mar 2023 13:44:33 -0700 (PDT) Date: Thu, 23 Mar 2023 20:44:27 +0000 Mime-Version: 1.0 Message-ID: <20230323204427.3594372-1-maskray@google.com> Subject: [PATCH] Makefile: use -z pack-relative-relocs From: Fangrui Song <maskray@google.com> To: Masahiro Yamada <masahiroy@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peter Collingbourne <pcc@google.com>, Will Deacon <will@kernel.org>, Fangrui Song <maskray@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761193443799936089?= X-GMAIL-MSGID: =?utf-8?q?1761193443799936089?= |
Series |
Makefile: use -z pack-relative-relocs
|
|
Commit Message
Fangrui Song
March 23, 2023, 8:44 p.m. UTC
Commit 27f2a4db76e8 ("Makefile: fix GDB warning with CONFIG_RELR")
added --use-android-relr-tags to fix a GDB warning
BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn'
The GDB warning has been fixed in version 11.2.
The DT_ANDROID_RELR tag was deprecated since DT_RELR was standardized.
Thus, --use-android-relr-tags should be removed. While making the
change, replace --pack-dyn-relocs=relr with -z pack-relative-relocs,
which is supported since LLD 15.
As of today, GNU ld supports the latter option for x86 and powerpc64
ports and has no intention to support --pack-dyn-relocs=relr. In the
absence of the glibc symbol version GLIBC_ABI_DT_RELR,
--pack-dyn-relocs=relr and -z pack-relative-relocs are identical in
ld.lld.
Link: https://github.com/ClangBuiltLinux/linux/issues/1057
Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a619b58721f0a03fd91c27670d3e4c2fb0d88f1e
Signed-off-by: Fangrui Song <maskray@google.com>
---
Makefile | 2 +-
scripts/tools-support-relr.sh | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Fangrui, Thanks for the patches! On Thu, Mar 23, 2023 at 1:44 PM Fangrui Song <maskray@google.com> wrote: > > Commit 27f2a4db76e8 ("Makefile: fix GDB warning with CONFIG_RELR") > added --use-android-relr-tags to fix a GDB warning > > BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' > > The GDB warning has been fixed in version 11.2. > > The DT_ANDROID_RELR tag was deprecated since DT_RELR was standardized. > Thus, --use-android-relr-tags should be removed. While making the > change, replace --pack-dyn-relocs=relr with -z pack-relative-relocs, > which is supported since LLD 15. Looks like commit 4a8de2832a2a ("[ELF] Add -z pack-relative-relocs") > > As of today, GNU ld supports the latter option for x86 and powerpc64 > ports and has no intention to support --pack-dyn-relocs=relr. In the > absence of the glibc symbol version GLIBC_ABI_DT_RELR, > --pack-dyn-relocs=relr and -z pack-relative-relocs are identical in > ld.lld. Won't this regress support for CONFIG_TOOLS_SUPPORT_RELR for LLD 11-14? (which we still support, see Documentation/process/changes.rst; I guess we don't list LLD explicitly, but it's effectively under the llvm umbrella there). IIUC, looks like lld 7.0+ should support SHT_RELR based on looking at commit 11479daf2f06 ("lld: add experimental support for SHT_RELR sections.") So we might want to invoke the linker twice, once with the new flag, and again with the old if we fail the first time? > > Link: https://github.com/ClangBuiltLinux/linux/issues/1057 > Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a619b58721f0a03fd91c27670d3e4c2fb0d88f1e > Signed-off-by: Fangrui Song <maskray@google.com> > --- > Makefile | 2 +- > scripts/tools-support-relr.sh | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index a2c310df2145..30c2edc35813 100644 > --- a/Makefile > +++ b/Makefile > @@ -1113,7 +1113,7 @@ LDFLAGS_vmlinux += -X > endif > > ifeq ($(CONFIG_RELR),y) > -LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags > +LDFLAGS_vmlinux += -z pack-relative-relocs > endif > > # We never want expected sections to be placed heuristically by the > diff --git a/scripts/tools-support-relr.sh b/scripts/tools-support-relr.sh > index cb55878bd5b8..58c2e8b02ce8 100755 > --- a/scripts/tools-support-relr.sh > +++ b/scripts/tools-support-relr.sh > @@ -7,8 +7,7 @@ trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT > cat << "END" | $CC -c -x c - -o $tmp_file.o >/dev/null 2>&1 > void *p = &p; > END > -$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr \ > - --use-android-relr-tags -o $tmp_file > +$LD $tmp_file.o -shared -Bsymbolic -z pack-relative-relocs -o $tmp_file > > # Despite printing an error message, GNU nm still exits with exit code 0 if it > # sees a relr section. So we need to check that nothing is printed to stderr. > -- > 2.40.0.348.gf938b09366-goog >
On 2023-03-23, Nick Desaulniers wrote: >Hi Fangrui, >Thanks for the patches! > >On Thu, Mar 23, 2023 at 1:44 PM Fangrui Song <maskray@google.com> wrote: >> >> Commit 27f2a4db76e8 ("Makefile: fix GDB warning with CONFIG_RELR") >> added --use-android-relr-tags to fix a GDB warning >> >> BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' >> >> The GDB warning has been fixed in version 11.2. >> >> The DT_ANDROID_RELR tag was deprecated since DT_RELR was standardized. >> Thus, --use-android-relr-tags should be removed. While making the >> change, replace --pack-dyn-relocs=relr with -z pack-relative-relocs, >> which is supported since LLD 15. > >Looks like >commit 4a8de2832a2a ("[ELF] Add -z pack-relative-relocs") > >> >> As of today, GNU ld supports the latter option for x86 and powerpc64 >> ports and has no intention to support --pack-dyn-relocs=relr. In the >> absence of the glibc symbol version GLIBC_ABI_DT_RELR, >> --pack-dyn-relocs=relr and -z pack-relative-relocs are identical in >> ld.lld. > >Won't this regress support for CONFIG_TOOLS_SUPPORT_RELR for LLD >11-14? (which we still support, see Documentation/process/changes.rst; >I guess we don't list LLD explicitly, but it's effectively under the >llvm umbrella there). > >IIUC, looks like lld 7.0+ should support SHT_RELR based on looking at >commit 11479daf2f06 ("lld: add experimental support for SHT_RELR sections.") > >So we might want to invoke the linker twice, once with the new flag, >and again with the old if we fail the first time? Yes, I am aware of the increased linker and debugger requirement and was thinking the CONFIG_RELR=y case with ld.lld<15 did not matter. Since you raised this, it seems that we should ld.lld<15. How about the following diff? diff --git a/Makefile b/Makefile index a2c310df2145..e23a85476d5d 100644 --- a/Makefile +++ b/Makefile @@ -1113,7 +1113,8 @@ LDFLAGS_vmlinux += -X endif ifeq ($(CONFIG_RELR),y) -LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags +# ld.lld before 15 did not support -z pack-relative-relocs. +LDFLAGS_vmlinux += $(call ld-option,--pack-dyn-relocs=relr,-z pack-relative-relocs) endif # We never want expected sections to be placed heuristically by the diff --git a/scripts/tools-support-relr.sh b/scripts/tools-support-relr.sh index cb55878bd5b8..355a9b1eb150 100755 --- a/scripts/tools-support-relr.sh +++ b/scripts/tools-support-relr.sh @@ -7,8 +7,9 @@ trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT cat << "END" | $CC -c -x c - -o $tmp_file.o >/dev/null 2>&1 void *p = &p; END -$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr \ - --use-android-relr-tags -o $tmp_file +# ld.lld before 15 did not support -z pack-relative-relocs. +$LD $tmp_file.o -shared -Bsymbolic -z pack-relative-relocs -o $tmp_file || \ + $LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr -o $tmp_file # Despite printing an error message, GNU nm still exits with exit code 0 if it # sees a relr section. So we need to check that nothing is printed to stderr.
Hi Fangrui, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on masahiroy-kbuild/for-next] [also build test WARNING on masahiroy-kbuild/fixes linus/master v6.3-rc3 next-20230323] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Fangrui-Song/Makefile-use-z-pack-relative-relocs/20230324-044515 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230323204427.3594372-1-maskray%40google.com patch subject: [PATCH] Makefile: use -z pack-relative-relocs config: arm64-randconfig-r022-20230322 (https://download.01.org/0day-ci/archive/20230324/202303241443.0sSziFDY-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/8f47a36faf182f96a2bbf4d3b9305fe9a90c5cde git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Fangrui-Song/Makefile-use-z-pack-relative-relocs/20230324-044515 git checkout 8f47a36faf182f96a2bbf4d3b9305fe9a90c5cde # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303241443.0sSziFDY-lkp@intel.com/ All warnings (new ones prefixed by >>): >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored
On Thu, Mar 23, 2023 at 11:51 PM kernel test robot <lkp@intel.com> wrote: > > Hi Fangrui, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on masahiroy-kbuild/for-next] > [also build test WARNING on masahiroy-kbuild/fixes linus/master v6.3-rc3 next-20230323] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Fangrui-Song/Makefile-use-z-pack-relative-relocs/20230324-044515 > base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next > patch link: https://lore.kernel.org/r/20230323204427.3594372-1-maskray%40google.com > patch subject: [PATCH] Makefile: use -z pack-relative-relocs > config: arm64-randconfig-r022-20230322 (https://download.01.org/0day-ci/archive/20230324/202303241443.0sSziFDY-lkp@intel.com/config) > compiler: aarch64-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/8f47a36faf182f96a2bbf4d3b9305fe9a90c5cde > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Fangrui-Song/Makefile-use-z-pack-relative-relocs/20230324-044515 > git checkout 8f47a36faf182f96a2bbf4d3b9305fe9a90c5cde > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > | Link: https://lore.kernel.org/oe-kbuild-all/202303241443.0sSziFDY-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored > >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored > >> aarch64-linux-ld: warning: -z pack-relative-relocs ignored > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests I forgot to check aarch64-linux-gnu-ld. To address the issue I can use: # ld.lld before 15 did not support -z pack-relative-relocs. if ! $LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr -o $tmp_file 2>/dev/null; then $LD $tmp_file.o -shared -Bsymbolic -z pack-relative-relocs -o $tmp_file 2>&1 | grep -q pack-relative-relocs && exit 1 fi
diff --git a/Makefile b/Makefile index a2c310df2145..30c2edc35813 100644 --- a/Makefile +++ b/Makefile @@ -1113,7 +1113,7 @@ LDFLAGS_vmlinux += -X endif ifeq ($(CONFIG_RELR),y) -LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags +LDFLAGS_vmlinux += -z pack-relative-relocs endif # We never want expected sections to be placed heuristically by the diff --git a/scripts/tools-support-relr.sh b/scripts/tools-support-relr.sh index cb55878bd5b8..58c2e8b02ce8 100755 --- a/scripts/tools-support-relr.sh +++ b/scripts/tools-support-relr.sh @@ -7,8 +7,7 @@ trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT cat << "END" | $CC -c -x c - -o $tmp_file.o >/dev/null 2>&1 void *p = &p; END -$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr \ - --use-android-relr-tags -o $tmp_file +$LD $tmp_file.o -shared -Bsymbolic -z pack-relative-relocs -o $tmp_file # Despite printing an error message, GNU nm still exits with exit code 0 if it # sees a relr section. So we need to check that nothing is printed to stderr.