fixes to make libc compile

gdb does not work yet