[PATCH] arm64: vdso: remove -nostdlib compiler flag

1 weergave
Naar het eerste ongelezen bericht

Masahiro Yamada

ongelezen,
7 nov 2021, 11:19:3007-11-2021
aan Will Deacon, Catalin Marinas, linux-ar...@lists.infradead.org, clang-bu...@googlegroups.com, Masahiro Yamada, Kees Cook, Nathan Chancellor, Nick Desaulniers, Peter Collingbourne, Peter Zijlstra (Intel), Sami Tolvanen, Vincenzo Frascino, linux-...@vger.kernel.org
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.

Since commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC)
to link VDSO"), $(LD) is directly used, hence -nostdlib is unneeded.

Signed-off-by: Masahiro Yamada <masa...@kernel.org>
---

arch/arm64/kernel/vdso/Makefile | 2 +-
arch/arm64/kernel/vdso32/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index 945e6bb326e3..700767dfd221 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -23,7 +23,7 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
# potential future proofing if we end up with internal calls to the exported
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
# preparation in build-time C")).
-ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
+ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \
-Bsymbolic --build-id=sha1 -n $(btildflags-y) -T

ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index c8fec493a450..6c01b63ff56d 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -102,7 +102,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__
# From arm vDSO Makefile
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
-VDSO_LDFLAGS += -nostdlib -shared --hash-style=sysv --build-id=sha1
+VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1


# Borrow vdsomunge.c from the arm vDSO
--
2.30.2

Will Deacon

ongelezen,
8 nov 2021, 05:38:0408-11-2021
aan Masahiro Yamada, linux-ar...@lists.infradead.org, Catalin Marinas, kerne...@android.com, Will Deacon, Peter Collingbourne, Vincenzo Frascino, Sami Tolvanen, Nathan Chancellor, Peter Zijlstra (Intel), linux-...@vger.kernel.org, Nick Desaulniers, clang-bu...@googlegroups.com, Kees Cook
On Mon, 8 Nov 2021 01:18:02 +0900, Masahiro Yamada wrote:
> 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.
>
> Since commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC)
> to link VDSO"), $(LD) is directly used, hence -nostdlib is unneeded.
>
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] arm64: vdso: remove -nostdlib compiler flag
https://git.kernel.org/arm64/c/34688c76911e

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten