diff options
author | Will Deacon <will@kernel.org> | 2021-06-24 15:31:41 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-06-24 15:31:41 +0300 |
commit | 216fe62d6fa85b0a3a6a0e66f11da29db4be7490 (patch) | |
tree | b93d5911f0f2e99a9116236e435b42a8993315d8 | |
parent | e7cf636cba4cf0650169ddbc449645d03a5eedae (diff) | |
parent | 27f2a4db76e8d8a8b601fc1c6a7a17f88bd907ab (diff) | |
download | linux-216fe62d6fa85b0a3a6a0e66f11da29db4be7490.tar.xz |
Merge branch 'for-next/build' into for-next/core
Tweak linker flags so that GDB can understand vmlinux when using RELR
relocations.
* for-next/build:
Makefile: fix GDB warning with CONFIG_RELR
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | scripts/tools-support-relr.sh | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -1031,7 +1031,7 @@ LDFLAGS_vmlinux += $(call ld-option, -X,) endif ifeq ($(CONFIG_RELR),y) -LDFLAGS_vmlinux += --pack-dyn-relocs=relr +LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags 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 45e8aa360b45..cb55878bd5b8 100755 --- a/scripts/tools-support-relr.sh +++ b/scripts/tools-support-relr.sh @@ -7,7 +7,8 @@ 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 -o $tmp_file +$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr \ + --use-android-relr-tags -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. |