bcopy.S is no longer needed
memmove and memcpy were both stacking r0 and unstacking it to keep the return value, so push this down into _memcpy.
rename _memcpy.S to memcpy.S.
memmove.S is now just a placeholder otherwise the make system automagically adds a memmove.c file to libkern.
memmove is just another entry point for memcpy.
a non-_STANDALONE environment (e.g. installboot(8)): internalize and
externalize the exec, program, and section headers as necessary.
Reviewed and OK'd by Christos.
the system's byte-order:
- host to {big,little}-endian {16,32}
- {big,little}-endian {16,32} to host
These are not intended to be used in libsa directly, but are rather
intended to be used by host tools which may use libsa routines (such
as loadfile()) which need to use explicit byte-ordering.
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
only 16-bit align the region and use loop mode with longwords
to do the bulk of the work.
On the 68020+, fixed an optimization bug where all regions that start
on odd addresses would not be properly longword aligned.
The e_shstrndx field in the ELF header, since we don't load .shstrtab.
The sh_name field in each section header, for the same reason.
The sh_offset field for any section we don't load.
This means the kernel has some chance of knowing what it's being given. It
also means that the behaviour of old kernels with new loaders should be
deterministic (if not terribly useful: they still can't find the symbol
table).
load those STRTAB sections that are referenced by a SYMTAB that we're loading.
The main advantage of this is that (at least with the binaries output by my
ARM ELF linker) this removes the need to seek backwards through the file, which
is a big win when loading a gzipped kernel.
While we're here, don't allocate space for string tables we don't load.
x86-64. Since there's no hardware available yet, this port is only
known to run on the Simics simulator for at the moment, and as such
uses the PC devices that it simulates for now. It will be developed
more (and cleaned up) as the hardware becomes available.