[klibc] [klibc:master] support llvm's lld for arm64

klibc-bot for Andrew Delgadillo adelg at google.com
Sat Dec 12 15:27:06 PST 2020

Commit-ID:  71174e47a075f4be87e8f9e98253a6699679d79a
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=71174e47a075f4be87e8f9e98253a6699679d79a
Author:     Andrew Delgadillo <adelg at google.com>
AuthorDate: Tue, 13 Oct 2020 21:37:04 +0000
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 12 Dec 2020 22:41:21 +0100

[klibc] support llvm's lld for arm64

Use $(LD_IMAGE_BASE_OPT) instead of hardcoding --Ttext-segment,
which lld does not support. This allows either --Ttext-segment
or -image-base to be emitted based on the linker.

Signed-off-by: Andrew Delgadillo <adelg at google.com>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

 usr/klibc/arch/arm64/MCONFIG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/klibc/arch/arm64/MCONFIG b/usr/klibc/arch/arm64/MCONFIG
index e31ffea7..f8741ff2 100644
--- a/usr/klibc/arch/arm64/MCONFIG
+++ b/usr/klibc/arch/arm64/MCONFIG
@@ -20,7 +20,7 @@ KLIBCREQFLAGS += -fno-exceptions -mgeneral-regs-only
 # On arm64, binaries are normally loaded at 4MB. Place klibc.so
 # a little before that at 2MB to prevent overlap.
-KLIBCSHAREDFLAGS = -Ttext-segment 0x0200000
 # Kernel has never used stack trampolines

More information about the klibc mailing list