various: (ab)use the new syscall wrappers and symbols; drop libc entirely

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I19ecd9801cf6e04adcedd3003d9fc59d6a6a6964
This commit is contained in:
raf 2026-03-27 23:45:30 +03:00
commit d6977bafe5
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 55 additions and 35 deletions

View file

@ -1,3 +1,5 @@
# https://github.com/rui314/mold?tab=readme-ov-file#how-to-use
# Link with Mold, and without libc! We use nostartfiles to avoid the C runtime
# See:
# <https://github.com/rui314/mold?tab=readme-ov-file#how-to-use>
[target.'cfg(target_os = "linux")']
rustflags = [ "-C", "link-arg=-fuse-ld=mold", "-C", "link-arg=-lc", "-C", "link-arg=-lgcc_s" ]
rustflags = [ "-C", "link-arg=-fuse-ld=mold", "-C", "link-arg=-nostartfiles" ]