Optimize r270798, only do the second pass over non-plt relocations
when the first pass found IFUNCs.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Document the whole settings needed to build a debug version of rtld.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Properly handle prefetch only for amd64 and i386 as we do elsewhere.

In general theraven is right that we should factr this out and provide
a general and per-arch implementation that everything can use.

MFC after:	3 days
X-MFC with:	r270755
Properly place #ifdef INET and #ifdef INET6 around variable declarations
and code to make the code compile.

Give the function seems to be slightly mixed with csum and tso,
make it non-fatal if we try to setup thing on a kernel without IP
support.  In practise the printf on the console will probably still
make your machine unhappy.

MFC after:	3 days
X-MFC with:	r270755
These functions are #defined to "osdep" specific names without the "_mem"
extension.  Provide prototypes for the actual implementations.
Correct function arguments to match the implementations.

MFC after:	3 days
X-MFC with:	r270755
Try to also unbreak powerpc complaining about
"cast from pointer to integer of different size".

MFC after:	3 days
X-MFC with:	r270755
Forward declare struct kiocb, which is only used for an unsued function
argument but not actually defined anywhere.

This fixes the compile complaining about
"declaration of 'struct kiocb' will not be visible outside of this function".

MFC after:	2 weeks
X-MFC with:	whatever changed caused the breakage ;-)
Merge remote-tracking branch 'freebsd/master' into hardened/current/master