Skip to content

Commit 9102fa3

Browse files
masahir0ysuryasaimadhu
authored andcommitted
x86/purgatory: Remove -nostdlib compiler flag
The -nostdlib option requests the compiler to not use the standard system startup files or libraries when linking. It is effective only when $(CC) is used as a linker driver. $(LD) is directly used for linking purgatory.{ro,chk} here, hence -nostdlib is unneeded. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20211107162641.324688-2-masahiroy@kernel.org
1 parent a41f5b7 commit 9102fa3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/purgatory/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS
1616

1717
# When linking purgatory.ro with -r unresolved symbols are not checked,
1818
# also link a purgatory.chk binary without -r to check for unresolved symbols.
19-
PURGATORY_LDFLAGS := -e purgatory_start -nostdlib -z nodefaultlib
19+
PURGATORY_LDFLAGS := -e purgatory_start -z nodefaultlib
2020
LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS)
2121
LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS)
2222
targets += purgatory.ro purgatory.chk

0 commit comments

Comments
 (0)