Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader fails to link with LLVM ld #360

Open
nya3jp opened this issue Jul 5, 2023 · 0 comments
Open

Loader fails to link with LLVM ld #360

nya3jp opened this issue Jul 5, 2023 · 0 comments

Comments

@nya3jp
Copy link

nya3jp commented Jul 5, 2023

We use -Ttext=0x600000000000 to link loader, but it fails to link with LLVM ld as it attempts to generate a huge file.

x86_64-pc-linux-gnu-clang  -o loader/loader loader/loader.o loader/assembly.o -static -nostdlib -Wl,--build-id=none,-Ttext=0x600000000000,-z,noexecstack
ld.lld: error: failed to open loader/loader: File too large
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GNUmakefile:275: loader/loader] Error 1
nya3jp added a commit to nya3jp/gentoo that referenced this issue Jul 5, 2023
proot's makefile doesn't support overriding ld/pkg-config command
invocations, so patch it. An upstream patch has been sent:
proot-me/proot#359

proot doesn't link with LLVM ld, so force to use GNU ld.
proot-me/proot#360
nya3jp added a commit to nya3jp/gentoo that referenced this issue Jul 5, 2023
proot's makefile doesn't support overriding ld/pkg-config command
invocations, so patch it. An upstream patch has been sent:
proot-me/proot#359

proot doesn't link with LLVM ld, so force to use GNU ld.
proot-me/proot#360

Signed-off-by: Shuhei Takahashi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants