Andrew Delgadillo
2020-Oct-13 21:37 UTC
[klibc] [PATCH] 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> --- 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 e31ffea79b0b9..f8741ff295d5c 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 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x0200000 # Kernel has never used stack trampolines KLIBCEXECSTACK := n -- 2.28.0.1011.ga647a8990f-goog
On Tue, 2020-10-13 at 21:37 +0000, Andrew Delgadillo wrote:> 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>[...] Applied, thanks. Ben. -- Ben Hutchings Design a system any fool can use, and only a fool will want to use it. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: <https://lists.zytor.com/archives/klibc/attachments/20201212/024f1299/attachment.sig>
Possibly Parallel Threads
- [klibc:master] Kbuild: support clang's lld
- [klibc:master] arch: Explicitly disable or enable executable stacks
- [klibc:master] Add LoongArch64 port
- [klibc:riscv64-enable-relax] riscv64: Make linker relaxation work and enable it
- [klibc:riscv64-enable-relax] riscv64: Make linker relaxation work and enable it