Closed pmmccorm closed 1 year ago
Your GCC was compiled with -enable-pie
so PIC is always enabled. The kernel model doesn't support PIC so you will need to add a flag such as -fno-pic
or -fno-pie
.
Thanks for the quick reply! I think this will work now with this change:
diff --git a/Makefile.am b/Makefile.am
index 40027d1..ab291f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,7 +115,7 @@ LIBC_OBJS = libc.a libpthread.a libm.a librt.a libcrypt.a crt1.o crti.o crtn.o
noinst_DATA += $(LIBC_OBJS)
-GLIBC_CFLAGS = -g -O2 -fthread-jumps -mcmodel=kernel -mno-red-zone
+GLIBC_CFLAGS = -g -O2 -fthread-jumps -mcmodel=kernel -mno-red-zone -fno-pie
if ENABLE_BYPASS
GLIBC_CFLAGS += -DUKL_BP
else
See #24 for a temporary solution and #25 for when we have fixed it.
I am following the instructions from the readme, and with gcc version:
I get this error when compiling glibc:
Which boils down to (using hello-world from the repo as an example):
I also tried with gcc 10 and 11: same error.
clang seems to work fine however, but glibc seems to only support being compiled with gcc.
What am I doing wrong here?