From 6d83d7888db7171220ea3aab7a02908415bd0773 Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Thu, 7 Nov 2024 18:30:28 -0500 Subject: [PATCH] Use nostart-stop-gc instead of link-dead-code Fixes symbol errors when linking code using linkme crate. Reference: - https://github.com/dtolnay/linkme/issues/94 --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 0e1f6bd..2abd0dd 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,7 +5,7 @@ rustflags = [ #"-Z", "pre-link-arg=-static", "-C", "link-arg=--image-base", "-C", "link-arg=0xffffe00000000000", - "-C", "link-dead-code", + "-C", "link-arg=-znostart-stop-gc", #"-C", "link-arg=-z", #"-C", "link-arg=norelro", "-C", "code-model=kernel",