summaryrefslogtreecommitdiff
path: root/sys/boot/common/load_elf.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix module dependency (pre)loading on sparc64 by relocating the variablesJake Burkholder2003-01-211-6/+57
| | | | | | | | | | | read from the raw kld files. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: 46870 Tested on: alpha (obrien), i386, sparc64 Notes: svn path=/head/; revision=109616
* We don't need bootinfo any more, and sparc64 doesn't have it anyways.David E. O'Brien2002-05-101-1/+0
| | | | Notes: svn path=/head/; revision=96310
* Fix another unsigned long used to index the symbol table which should beJake Burkholder2002-04-091-1/+1
| | | | | | | Elf_Hashelt. Notes: svn path=/head/; revision=94248
* Use the correct elf hash table entry type. This matches a similar fixPeter Wemm2002-04-061-6/+6
| | | | | | | | in the kernel side of things some time ago. The hash table entries are always 32 bits wide, even on 64 bit machines. Notes: svn path=/head/; revision=93922
* Implement the long-awaited module->file cache database. A userlandPeter Wemm2001-09-111-24/+16
| | | | | | | | | | tool (kldxref(8)) keeps a cache of what modules and versions are inside what .ko files. I have tested this on both Alpha and i386. Submitted by: bp Notes: svn path=/head/; revision=83321
* Get rid of some constness warnings.David Malone2001-06-241-6/+7
| | | | Notes: svn path=/head/; revision=78696
* Convert the elf loader to the new linker set layout for elf files.Peter Wemm2001-06-191-6/+7
| | | | | | | | | This should make dependencies at load time work like before. Oops. Noticed by: markm Notes: svn path=/head/; revision=78465
* Fix some of the worst formatting bug (seperate commit)Peter Wemm2001-06-191-2/+4
| | | | Notes: svn path=/head/; revision=78463
* Cleanup warnings. Most of these are signed/unsigned warnings, as well asJohn Baldwin2000-08-031-19/+25
| | | | | | | some added const's. Notes: svn path=/head/; revision=64187
* Remove residual printf.Daniel C. Sobral2000-06-071-1/+0
| | | | | | | Prodded by: msmith Notes: svn path=/head/; revision=61353
* long != int on Alphas.Boris Popov2000-05-121-1/+2
| | | | Notes: svn path=/head/; revision=60432
* Update loader logic to distinguish modules vs. files.Boris Popov2000-05-011-83/+255
| | | | | | | | | | Add support for module metadata. The old way of dependancy handling will be supported for a while. Reviewed by: peter Notes: svn path=/head/; revision=59854
* Fix the loader to handle module dependencies properly. More fixesBoris Popov2000-02-251-39/+8
| | | | | | | | | | will be provided after modmetadata appears in the kernel. Reviewed by: msmith Approved by: jkh Notes: svn path=/head/; revision=57468
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Enable load of i386 ELF kernels with larger KVA range (e.g. starting atTor Egge1999-02-151-2/+2
| | | | | | | 0xe0100000u or 0xc0100000u instead of the usual 0xf0100000u). Notes: svn path=/head/; revision=44069
* Don't forget a trailing \n when loading a kernel that has been stripped.Peter Wemm1999-01-041-7/+8
| | | | | | | | (This might make ELF_VERBOSE look funny, but I'm tempted to delete that anyway) Notes: svn path=/head/; revision=42288
* Load the first page of the file and use the headers in it. This shouldPeter Wemm1998-10-171-52/+48
| | | | | | | | avoid the need to seek back to offset zero which is causing trouble on the Alpha with a gzipped kernel. Notes: svn path=/head/; revision=40465
* "fix" the gzipped kernel load problem by having the loader check that itPeter Wemm1998-10-161-22/+33
| | | | | | | | | | can seek back to the first PT_LOAD and doing a close/reopen if it cannot. This is because the first PT_LOAD section includes the ELF headers. This fixes gzipped kernels on the i386, it should solve mike's problem for the Alpha. Notes: svn path=/head/; revision=40429
* Change some printfs so that ELF_VERBOSE prints meaningful values on the alpha.Doug Rabson1998-10-151-3/+3
| | | | Notes: svn path=/head/; revision=40414
* Tweak the output one more time again. The kernel or module pathnamePeter Wemm1998-10-141-2/+3
| | | | | | | is useful, and usually fits all on one line with the load sizes. Notes: svn path=/head/; revision=40327
* Make the ELF load messages cleaner.Peter Wemm1998-10-131-8/+17
| | | | Notes: svn path=/head/; revision=40291
* Only print kernel entry point during load.Peter Wemm1998-10-121-62/+76
| | | | | | | | | | | | | | | | | | | | | | Drastically quieten down the verbose load progress messages. They were more useful for debugging than anything, but are beyond a joke when loading a few dozen modules. Simplify the ELF extended symbol table load format. Just take the main symbol table and the string table that corresponds. This is what we will be getting local symbols from. (needed for the alpha stack tracebacks). Use the (optional) full symbol tables in lookups. This means we have to furhter distinguish between symbols that can come from the dynamic linking table and the complete table. The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use the simpler format. I have not implemented loading the extended symbol tables from the syscall interface yet, just for preloaded modules. I am not sure about the symbol resolution. I *think* it's possible that a local symbol can be found in preference to a global, depending on the search sequence and dependency tree. Notes: svn path=/head/; revision=40254
* Implement preloading for elf modulesPeter Wemm1998-10-091-33/+129
| | | | | | | | | | | - get dependency info from PT_DYNAMIC's DT_NEEDED tags. - store MODINFOMD_DYNAMIC for the kernel's later use setenv kernelname when we have it Fix firstaddr/lastaddr calculation (duh! :-) Explicitly skip string table with section names in it. Notes: svn path=/head/; revision=40143
* First shot at loading elf symbols. Things are a bit strange becausePeter Wemm1998-10-021-13/+126
| | | | | | | | | | | | | | | of the ..umm.. "wierd" way binutils lays out the file. The section headers are nearly at the end of the file and this is a problem when loading from a .gz file which can't seek backwards (or has a limited reverse seek, ~2K from memory). This is intended to be compatable with the ddb/db_elf.c code and the alpha/libalpha/elf_freebsd.c layout. I've studied these (which are NetBSD derived) but did it a bit differently. Naturally the process is similar since it's supposed to end up with the same result. Notes: svn path=/head/; revision=39887
* ELF loader, part 1. It works with ELF kernels generated on the i386Peter Wemm1998-09-301-0/+276
so far, and should probably be able to be made to work for the alpha without too much trouble once it's connected up and my assumptions tested. I think (but have not tested) it will also load "old" ELF kernels that were not linked with DYNAMIC headers. The module glue is yet to come. (oh fun.. :-) It does not explicitly load symbols [yet]. The _DYNAMIC data contains a runtime symbol set that ddb can use via ddb/db_kld.c. It'll be missing some detail that stabs normally provides (eg: number of args to a function, line numbers, etc). On the other hand, those minimal symbols will always be available even on a stripped kernel. This is mostly stolen from load_aout.c with some ideas from alpha/libalpha/elf_freebsd.c. Notes: svn path=/head/; revision=39830