compile errors on x86_64

"Markus Wichmann" <[email protected]>
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
Hi all,

I just have a problem compiling the latest CVS of dietlibc on x86_64.

One problem is in x86_64/strnlen.S. That file says

call memchr

What it should say is

#ifdef __DYN_LIB
    call memchr@PLT
#else
    call memchr
#endif

Otherwise the assembler applies the wrong relocation type on that symbol
and ld complains when linking the dynamic lib.

The next thing is an undefined reference to fallocate. Now fallocate is a
syscall, and I don't know where to embed the syscalls. The only difference
is pretty much the value put in %rax and, if the function takes more than
3 arguments, the move of arguments from %rcx to %r10. After that, the
syscall sequence remains just doing the syscall, and if the return value
is negative, putting the absolute value of it in errno and returning -1.
So I figure the code already went somewhere, I just don't seem to find it.

One more thing: The above bugs only affect the dynamic lib. The static one
compiles just fine for some or other reason.

And at last: The libm for x86_64 is a bit... thin. Any idea where I could
get the missing parts? (For heaven's sake the libm even has undefined
references to log() which should clearly be in libm.) I tried the cephes
math library, but that one is a bit buggy and a bit old. And it does
everything with approximations using SSE even though the results provided
by the FPU are far more accurate.

Regards,
Markus
-- 
Progress (n.): Process through which USENET evolved from smart people in
front of dumb terminals to dumb people in front of smart terminals.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.