Skip to content

Commit 7ddf263

Browse files
committed
linuxkm/Kbuild: add support for FORCE_GLOBAL_OBJTOOL_OFF.
1 parent 72ae012 commit 7ddf263

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

linuxkm/Kbuild

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
131131
# using inline retpolines leads to "unannotated intra-function call"
132132
# warnings from objtool without this:
133133
$(WOLFCRYPT_PIE_FILES): OBJECT_FILES_NON_STANDARD := y
134+
ifdef FORCE_GLOBAL_OBJTOOL_OFF
135+
undefine CONFIG_OBJTOOL
136+
endif
134137
endif
135138

136139
ifdef KERNEL_EXTRA_CFLAGS_REMOVE
@@ -194,7 +197,7 @@ endif
194197
@cd "$(obj)" || exit $$?
195198
$(LD) -relocatable -o wolfcrypt_test_link.o $(WOLFCRYPT_PIE_FILES) || exit $$?
196199
undefined=$$($(NM) --undefined-only wolfcrypt_test_link.o) || exit $$?
197-
GOT_relocs=$$($(READELF) --relocs --wide wolfcrypt_test_link.o | egrep '^[^ ]+ +[^ ]+ +[^ ]*GOT[^ ]* ') || [ $$? = 1 ] || exit 2
200+
GOT_relocs=$$($(READELF) --relocs --wide wolfcrypt_test_link.o | grep -E '^[^ ]+ +[^ ]+ +[^ ]*GOT[^ ]* ') || [ $$? = 1 ] || exit 2
198201
rm wolfcrypt_test_link.o
199202
if [ -n "$$undefined" ]; then
200203
echo "wolfCrypt container has unresolved symbols:" 1>&2

0 commit comments

Comments
 (0)