Skip to content

Commit 216fe62

Browse files
committed
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
2 parents e7cf636 + 27f2a4d commit 216fe62

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ LDFLAGS_vmlinux += $(call ld-option, -X,)
10311031
endif
10321032

10331033
ifeq ($(CONFIG_RELR),y)
1034-
LDFLAGS_vmlinux += --pack-dyn-relocs=relr
1034+
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
10351035
endif
10361036

10371037
# We never want expected sections to be placed heuristically by the

scripts/tools-support-relr.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT
77
cat << "END" | $CC -c -x c - -o $tmp_file.o >/dev/null 2>&1
88
void *p = &p;
99
END
10-
$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr -o $tmp_file
10+
$LD $tmp_file.o -shared -Bsymbolic --pack-dyn-relocs=relr \
11+
--use-android-relr-tags -o $tmp_file
1112

1213
# Despite printing an error message, GNU nm still exits with exit code 0 if it
1314
# sees a relr section. So we need to check that nothing is printed to stderr.

0 commit comments

Comments
 (0)