Fix bad 32->64 conversion in linker.
lseek(fd, -sizeof(X), SEEK_END) fails because sizeof return 32bit while
lseek expects off_t which is 64 bit. The unary operator happens first
returning an unsigned long which is then converted to 64bit without
sign extension.
Unfortunately -Wall wont find this since it's perfectly legal, but
added -Wall anyway to help find other possible issues.
Cleaned up all warnings.
Converted linker.cpp to linker.c by adding "struct" where needed.
Added lfind and lsearch along with test for glibc_compat.
10 files changed