that return floats must do so in integer registers, as the
pre-SVR4 ABI code did. So in these functions we ignore
__SVR4_ABI__ if __HAVE_68881__ is not also set.
Ensure that the <readline/history.h> link to <readline/readline.h> is
installed too for 'make includes'. Also, avoid creating obj dir.
This is finally real fix for lib/12929.
XXX Is this right?
o Primary mod: alpha and i386 code for .init and .fini section fallthroughs
o Actual fallthru is not yet enabled, see csu/{alpha,i386_elf}/Makefile
o When enabled, should fix bin/12865 & should fix at least one WINE bug,
see http://www.winehq.com/hypermail/wine-devel/2001/05/0021.html
o Also, removed the function pointer hack put in to prevent gcc from
incorrectly attempting to do short calls over section boundaries,
on some architectures, rather, simply simply move ctors() and dtors()
into .init and .fini.
Other notes.
o Our crtbegin.c and crtend.c were completely in C, despite
the fact that .init and .fini section fallthroughs require machine code.
These modules implement the gnu ctors/dtors mechanism directly, eliminating
in part the need for the elf .init/.fini section fallthrough. However,
if we ever want to use the gnu-provided constructor support, we need to
do the fallthrough, at least one program (WINE) apparently uses the
feature independently, and other compilers may depend on the mechanism.
o It is amusing that the previous NetBSD _init() and _fini() were put
into the .init and .fini sections, because nothing is gained over
plain .text if they don't fall through. Cargo cult!
o Other elf ports will need to copy the alpha and i386 example mods.
argument prefrobbing, in particular, it computes max(addr, __minbrk)
and uses that. The code is like this even in the ancient libc/i386 tree,
back to the earliest rev 1.2. I did not see it Lite 1, but I'm not totally
sure what the random site I found was serving up.
*
* However, I do know that it should use jb and not jl.
*
1. use uintptr_t instead of u_long
2. check for overflow in map_pages and malloc_pages
3. bring in fixes from FreeBSD [int -> size_t, and a missing THREAD_UNLOCK]
4. rewrite map_pages to use sbrk() only to grow memory (avoids extra syscall
and elides bug in brk(2) that ross is fixing)
5. restore the break point to its original value if the mmap(2) for the page
directory or the alignment sbrk breaks.
reviewed by: chuq and ross
tested by: make build and reboot
Now memtest nearly works; unfortunately there is no way currently to lower
the break point as we free, so memtest keeps trying to reduce memory when
mlock() fails and that does not work.