summaryrefslogtreecommitdiff
path: root/sys/lib
AgeCommit message (Collapse)Author
2002-01-02R5900 short-loop bug.uch
2001-12-28Always provide alloca() as __builtin_alloca().thorpej
2001-12-27we need ffs().shin
2001-12-27don't use .abicalls in kernel.shin
2001-12-27copy from libc/arch/mips/stringshin
2001-12-23The kernel is now built with -ffreestanding, so GCC built-ins arethorpej
disabled. Explicitly re-enable some that we want to use, namely: * memcpy() -> __builtin_memcpy() * memcmp() -> __builtin_memcmp() * memset() -> __builtin_memset() * strcpy() -> __builtin_strcpy() * strcmp() -> __builtin_strcmp() * strlen() -> __builtin_strlen() We might also consider some others for GCC 3.x.
2001-12-12MKfoo=no -> NOfootv
2001-12-04Replace some misuses of "then" with "than".wiz
2001-12-02Disable bzero/memset assembler implementation until the dependencymjl
problem on assym.h is sorted out and TRW to get at CACHELINESIZE in the kernel is determined.
2001-11-30 Add assembler version of strlen.mjl
2001-11-30Outifdef some stuff not needed in the _KERNEL case.mjl
2001-11-29Add assembler versions of ffs, bzero and memset.mjl
2001-11-21Don't make clean and cleandir depend on the lib subdir. Just check for it'sjmc
existance before running the submake. This makes it possible to run a make build (which runs cleandir before make obj) in a r/o source tree
2001-11-20Tidy up some memory copying cruft:chris
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.
2001-11-15don't need <sys/types.h> when including <sys/param.h>lukem
2001-11-14Undefine DESTDIR; we don't want the special DESTDIR <bsd.lib.mk>tv
handling for kernel libraries. XXX this build method should be replaced by something more sane
2001-11-13Sync to libc version of divsi3.S. This is to fix up the stack for 8 byte ↵chris
alignment.
2001-11-09Remove USB copyrights. The coff and elf loading code did not come with BSD4.4.christos
2001-11-09To avoid backwards seeks on sequential devices (eq. QIC tapes), read allscw
the program headers in one operation into an internal buffer.
2001-10-31Make the ELF loadfile routines byte-order independent when used inthorpej
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.
2001-10-31Oops, committed wrong copy of file in previous revision.thorpej
2001-10-31Add standalone 64-bit to/from {big,little}-endian routines.thorpej
2001-10-31Split elf32 vs. elf64 handling in loadfile(), including support forthorpej
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31Build the loadfile() a.out, ECOFF, and ELF back-ends as separatethorpej
objects.
2001-10-30Split the exec formats included by loadfile() into separate files.thorpej
Primary goal: explcitly select which ELF format (elf32 or elf64) to support for a cross tool which uses loadfile().
2001-10-30Add standalone byte-swapping routines that don't require testingthorpej
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.
2001-10-24Add "Red Black +" balanced binary tree routines to libkern. These providematt
O(log(N)) insertation, deletion, and lookup times. However, unlike most red-black implemenations, this one does no additional memory allocations.
2001-10-18Fix compilation on Alpha with ARP_DEBUG.jdolecek
Fixes kern/6440 by R. C. Dowdeswell
2001-10-16R5900 miss-prediction of branch targets for short-loop.uch
2001-09-28Add changedisk_hook().minoura
Machine-dependent code can eject the floppy to prompt the next volume in it. (Or add another method in devsw?)
2001-09-24va_{start,end} audit:wiz
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.
2001-09-21Make new gas happy. Use movzbl instead of xorl + movb.fvdl
2001-09-06On the 68010, don't bother with the by-8-longwords loop, insteadfredette
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.
2001-09-02Add a small version of memmove() for libsa.tsutsui
Mostly identical with libsa/bcopy.c.
2001-08-227450 requires a sync before the the isync (MPC7450UM - 3.4.4.8)matt
2001-08-22sync argument/return type of [hn]to[nh][ls] to XNET 5.2 (uint{16,32}_t).itojun
as discussed on tech-net.
2001-08-12Move _insque()/_remque() to libkern. Once remaining uses wouldjdolecek
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated altogether.
2001-08-09convert to ansi knf, and fix a bug where the last arg was incorrectlylukem
'u_char' instead of 'int' (per the prototype and usage and other scanc implementations)
2001-07-31When loading ELF, zero out:bjh21
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).
2001-07-31G/C "off", since it was just tracking the difference between maxp and elfp.bjh21
2001-07-31Fix a small memory leak when counting the size of the symbol table (shp wasbjh21
ALLOC'ed if (LOAD_SYM|COUNT_SYM), but FREEd if (LOAD_SYM)).
2001-07-31When loading an ELF kernel, don't load all the STRTAB sections. Instead, justbjh21
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.
2001-07-19Avoid warnings about uninitialised usage.fvdl
2001-07-19Fix typo (`information' has an 'r').wiz
2001-07-13Back out previous. The booter will need to find the symbol table itself,christos
as explained in the code.
2001-07-13From Nigel Pearson: Make SYMS and NSYMS work on ELF.christos
The MacOS booter needs them.
2001-07-13Provide bcopy() here.thorpej
2001-07-07restore bzero and bcmp prototypes for now -- this has to be hashed out.perry
2001-07-07Put the prototypes for bcmp() and bzero() back (ifdef _STANDALONE) so thatsimonb
libsa builds again.
2001-07-07Remove bcmp and bzero prototypes. And yes, I actually checked andperry
tested this time. (Slap self repeatedly.)