Commit b2702903 authored by Kevin Wolf's avatar Kevin Wolf

libc: Mit -fPIC kompilieren

* libc: Wenn man mit -fPIC kompiliert, sind statt über 3300 Relokationen
  nur noch knapp 650 übrig. Und für echte Shared Libraries will man das
  früher oder später sowieso, weil damit dann alle Relokationen direkt
  nebeneinander liegen und man nicht überall COW machen muss.
Signed-off-by: Kevin Wolf's avatarKevin Wolf <kevin@tyndur.org>
parent 11973a7f
......@@ -81,7 +81,6 @@ if [ -f "user-$LOST_ARCH.ld" ]; then
fi
CC_FLAGS=
CC_FLAGS_APPEND=
if [ -f Makefile.conf ]; then
source Makefile.conf
fi
......
export CC_FLAGS_APPEND="-fPIC"
......@@ -280,7 +280,7 @@ ssize_t lio_readf(lio_stream_t s, uint64_t offset, size_t bytes,
"int $0x30;"
"add $0x18, %%esp;"
: : "i" (SYSCALL_LIO_READ), "r" (&s), "r" (&offset), "r" (bytes),
"r" (buf), "r" (flags), "r" (&result) : "memory");
"r" (buf), "r" (flags), "g" (&result) : "memory");
return result;
}
......@@ -333,7 +333,7 @@ static ssize_t write_syscall(lio_stream_t s, uint64_t offset, size_t bytes,
"int $0x30;"
"add $0x18, %%esp;"
: : "i" (SYSCALL_LIO_WRITE), "r" (&s), "r" (&offset), "r" (bytes),
"r" (buf), "r" (updatepos), "r" (&result) : "memory");
"r" (buf), "r" (updatepos), "g" (&result) : "memory");
return result;
}
......@@ -570,7 +570,7 @@ lio_resource_t lio_mksymlink(lio_resource_t parent,
"int $0x30;"
"add $0x18, %%esp;"
: : "i" (SYSCALL_LIO_MKSYMLINK), "r" (&parent), "r" (name), "r" (name_len),
"r" (target), "r" (target_len), "r" (&result) : "memory");
"r" (target), "r" (target_len), "g" (&result) : "memory");
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment