[klibc] [PATCH] use "--just-symbols" for compatibility with LLD

Bill Wendling morbo at google.com
Tue Aug 18 14:04:40 PDT 2020


LLD uses "-R" as an alias for "-rpath", while LD uses "-R" as an alias
for "--just-symbols". Use "--just-symbols" so that it's correctly
supported for both linkers.

See Linux commit 3c1918c8f54166598195d938564072664a8275b1 (riscv: fix
vdso build with lld).

Signed-off-by: Bill Wendling <morbo at google.com>
---
 scripts/Kbuild.klibc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index 82c74ea7..bfe6edb3 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -361,7 +361,7 @@ quiet_cmd_ld-shared = KLIBCLD $@
                        $(KLIBCEMAIN) $(KLIBCCRTSHARED)		\
                        --start-group				\
                        $(link-deps)				\
-                       -R $(KLIBCLIBCSHARED)			\
+                       --just-symbols $(KLIBCLIBCSHARED)	\
 	               $(KLIBCLIBGCC)				\
 		       --end-group ;				\
                       cp -f $@ $@.g ;				\
-- 
2.28.0.220.ged08abb693-goog



More information about the klibc mailing list