Commit Graph

317 Commits

Author SHA1 Message Date
bjh21 acf574f63e When loading ELF, zero out:
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-31 22:11:57 +00:00
bjh21 30f144749a G/C "off", since it was just tracking the difference between maxp and elfp. 2001-07-31 21:09:52 +00:00
bjh21 67a82e1d4e Fix a small memory leak when counting the size of the symbol table (shp was
ALLOC'ed if (LOAD_SYM|COUNT_SYM), but FREEd if (LOAD_SYM)).
2001-07-31 20:03:03 +00:00
bjh21 1a35da3617 When loading an ELF kernel, don't load all the STRTAB sections. Instead, just
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-31 19:20:29 +00:00
fvdl 3350f68f80 Avoid warnings about uninitialised usage. 2001-07-19 18:55:38 +00:00
wiz 1bc6d2cee9 Fix typo (`information' has an 'r'). 2001-07-19 16:13:00 +00:00
christos 366971a414 Back out previous. The booter will need to find the symbol table itself,
as explained in the code.
2001-07-13 17:43:23 +00:00
christos 6711e49228 From Nigel Pearson: Make SYMS and NSYMS work on ELF.
The MacOS booter needs them.
2001-07-13 17:17:12 +00:00
thorpej 23a3a54650 libkern.h now has the ctype routines. 2001-04-05 04:39:02 +00:00
hubertf 267271c1b2 Explain some SA_* options - reading compressed kernels, netboot
Useful for stripping down bootcode.
2001-03-31 09:45:11 +00:00
sommerfeld 5348dfb6ac Have recursive make invocations depend on the .MAKE pseudo-target so
make knows to handle them specially.
2000-12-05 17:01:19 +00:00
tsutsui 99d2177add Don't try to load a.out header if there is no space for it before text. 2000-12-03 02:53:04 +00:00
simonb cdfbd303f9 Fix tyop in comment. 2000-11-26 03:31:20 +00:00
tsutsui 071bf9bca9 Don't print "]" if loading kernel does not have symbol table. 2000-11-11 09:25:12 +00:00
matt c4e14613b2 dos_unmount is only is dos_close is present but so conditionalize it like
dos_close.
2000-11-09 01:55:31 +00:00
matt 6c15ee2986 avoid pointer addition on void pointers 2000-11-08 19:38:12 +00:00
thorpej 29b685b9f0 Introduce a way for boot programs to modify the behavior of
bootp().  Add a BOOTP_PXE flag which causes bootp() to send
"PXEClient" in the DHCP class field.

Derived from similar code in FreeBSD.
2000-11-02 03:22:23 +00:00
thorpej abf350ddcf Sprinkle some const -- gets things out of the .data segment, which
is important in the i386 boot blocks (grmumble).
2000-11-02 00:34:51 +00:00
thorpej 904d7ceb3c Add a standalone MS-DOS file system reader package, lifted
from FreeBSD, and modified use NetBSD's already-existing
MS-DOS file system data structure definitions, rather than
defining our own.
2000-11-02 00:25:05 +00:00
ragge aeb756f1b5 Add define NO_MID_CHECK that avoids checking of the a.out mid field. 2000-11-01 14:23:04 +00:00
thorpej 9516ee90da Split the UDP routines out of net.c. 2000-10-25 01:49:55 +00:00
takemura c6304c954b Add LIBSA_RENAME_PRINTF to solve conflict with prototype definition of
printf() and etc in header files of Windows CE native compiler.
2000-10-21 13:48:06 +00:00
lukem 2a5013bcd3 show "press return" instead of "type return", since it's a key name and
not the actual word...
2000-10-02 23:35:54 +00:00
castor 5e29a96b48 Make standalone in_cksum work on little-endian machines, too, courtesy of
Jeff Smith, <jeffs@geocast.com>.
2000-03-31 19:55:09 +00:00
augustss 1279e67b6e Kill some more register declarations. 2000-03-30 12:19:46 +00:00
drochner f458367b3f cosmetics: remove double semicolon, whitespace 2000-02-03 19:53:03 +00:00
cgd fbf9177d1b provide stat() and fstat() here for standalone programs' use 2000-02-03 02:00:31 +00:00
tsutsui 11c8f56d48 Revert STRIPPROG -> STRIP 2000-02-01 05:25:24 +00:00
tsutsui e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
hannken 2b8c4ea32e Fix IS_DATA and IS_TEXT. PF_X and PF_W are valid on p_pflags, not p_ptype. 1999-12-29 11:08:02 +00:00
simonb a09d3191a0 Remove leading '/' from pathnames, using same logic as ufs.c. Allows new
style (but not yet committed) pmax bootblocks to open "/boot.pmax" on an
ISO image.  Same problem reported for NFS by Jason Thorpe.
1999-11-23 12:20:53 +00:00
thorpej ee03a4e035 Backout my libsa changes. 1999-11-13 21:29:12 +00:00
thorpej 36ff5d93e8 Backout my libsa changes. 1999-11-13 21:17:56 +00:00
thorpej 1e544cc5eb Backout my libsa changes. 1999-11-13 21:06:46 +00:00
lukem e8dc21a13a add -DNET_DEBUG to the list of commented-out debug options 1999-11-12 13:13:59 +00:00
lukem 053d3c3702 fix pointer size in debug message 1999-11-12 13:12:09 +00:00
simonb 7a03e8cda8 Add memset() prototype. 1999-11-12 12:24:42 +00:00
simonb 3f691021a6 Add strncpy().
Add prototypes for bcmp(), bzero() so the libsa compiles with WARNS=1
1999-11-12 01:26:28 +00:00
thorpej ab395306cd Small, MI strcat() and strcpy(). 1999-11-11 21:23:27 +00:00
thorpej a7abffa1f2 The hack needed to work around gcc lameness. 1999-11-11 20:36:52 +00:00
thorpej 471a3aa8e4 Update for the improvements to libsa, and don't reference libkern.h. 1999-11-11 20:23:16 +00:00
thorpej 38200dd3e4 Networking routines needed for libsa to be self-contained. 1999-11-11 20:21:59 +00:00
thorpej c29af30c3c Minimal quad routines needed for libsa to be self-contained. The compiler
emits a reference to this one in the UFS code.
1999-11-11 20:20:35 +00:00
thorpej cad7e97082 Add small, MI strcmp(), strlen(), and strncmp() functions. Modules within
libsa depend on them, to it seems rather silly to have to build an additional
library (e.g. libkern) to get them.
1999-11-11 18:11:25 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
itohy e72ef17380 - a.out header is not a part of text segment in NMAGIC.
- Fix section alignment code.
Patch supplied by Izumi Tsutsui, PR #8575.
1999-10-08 03:55:06 +00:00
ross 80fd51b82b Fix error flow that was broken 10 days ago in the previous commit.
Fixes the broken i386 boot blocks and closes port-i386/8432.
1999-09-20 11:58:15 +00:00
ross 54ab5cdc54 * Fix the volume zero recognition bug; it was interacting with a
feature to avoid rereads (which was added to work around bugs in
  old SRM versions that wouldn't rewind DATs, but would return no
  error on rewind callbacks)
* Initialize the volzero signature in ustarfs_open(), rather than as a
  side effect of the first read.
* Centralize error retry.
1999-09-10 07:22:03 +00:00
drochner 9b5129f15a add a function to verify a password against an in-core md5 sum 1999-09-09 15:52:37 +00:00
ross ad3beb5695 Fix read retry error case. Closes kern/8300.
While here, add automatic error retry up to 3 times.
1999-09-01 02:32:26 +00:00