Commit Graph

23 Commits

Author SHA1 Message Date
hpeyerl f385ef3e0f Probe linux emul before svr4 emul. From Christos. 1997-03-13 02:55:25 +00:00
cgd 60faf5d2ae always provide at least a minimal aux vector. (The minimal version
is one entry long, with the entry's id being AUX_null.)
1996-12-17 22:04:20 +00:00
fvdl ee489171ee Make previous change in interpreter entry point calculation dependant on
a 'mips' define. XXX

Just a temporary patch to get things going again for Linux ELF binaries,
needs to be solved properly.
1996-11-23 11:46:34 +00:00
jonathan bbcd2bb1ef Elf32 fixes for mips shared libraries:
* handle interpreters with nonzero virtual address of entry-point:
   subtract p_vaddr from computed entrypoint, as the mips elf exec did.

 * Add #ifdef ELF_INTERP_NON_RELOCATABLE/#endif around the code
   that tries to choose a `good' address at which to load an interpreter,
   if none was set by the emul probe  function.
   (the address chosen could be improved to avoid  fragmenting the
    process virtual address space).

 * define ELF_INTERP_NON_RELOCATABLE in machine/elf_machdep.h for mips CPUs,
   which currently use a GNU-derived ld.so.

ELF_INTERP_NON_RELOCATABLE is not necessary for native NetBSD/alpha ELF
binaries. It may be required for GNU-derived ELF dynamic loaders (Linux/i386?)
1996-11-11 20:33:10 +00:00
cgd 0e4ddf059b deal more sanely with ELF binaries with only a single program header
section.  Patch come up with by Bob Baron <rvb+@cs.cmu.edu> and myself.
This entire bit of code (the code which sets daddr/dsize and taddr/tsize)
is very bogus, but it's not clear what the 'right' way to fix it is
and this patch fixes a problem preventing some ELF executables from
being run.
1996-10-13 22:54:52 +00:00
cgd 4431ea58a9 replace ELF_ALIGN with ELF_TRUNC (round to lower alignment boundary) and
ELF_ROUND (round to higher alignment boundary), and use them properly.
Also, change a bit of code in elf_load_psection to use the next ELF_ROUND
macro.  This fixes a bug found by Robert Baron <rvb+@cs.cmu.edu> where
elf_load_psection, if given a properly aligned address at which to load
the section, would round actually load it at the next highest alignment
boundary.
1996-10-11 19:44:02 +00:00
cgd 1878cacd45 KNF, de-static the functions that were static (so they'll show up
in ddb, etc.)
1996-10-08 03:40:40 +00:00
cgd 6ab18a1959 don't include <machine/exec.h> explicitly. No other changes needed, since
<sys/exec.h> was already being included.
1996-10-07 21:43:02 +00:00
cgd cd3ab82ec2 clean up a comment added in the last commit 1996-10-07 18:29:24 +00:00
cgd 5d4cf83257 when loading interpreter: check its vnode type, check its mount point
for NOEXEC and NOSUID, and make sure the interpreter file is executable.
The mount point checks are done because, even though the interpreter
is not the program being 'executed', code from the interpreter is being
executed, and so the mount point's flags should be respected.
1996-10-07 18:24:48 +00:00
cgd cc06b3f10f Remove the implicit inclusion of EXEC_ELF32 when COMPAT_LINUX and/or
COMPAT_SVR4 is included.
1996-10-02 05:30:29 +00:00
cgd 3b34cba879 exec vnode locking protocol changes: in a nutshell, don't keep vnodes
locked for any longer than we have to.
1996-09-30 23:18:43 +00:00
cgd 6f5b5cefc7 make the check_header and load_file functions static 1996-09-30 23:02:14 +00:00
cgd 0e097578a2 add and use a machine-dependent header, which currently defines some
macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
1996-09-26 21:50:55 +00:00
cgd 79bd41b179 add support and reorganize for 64-bit ELF, included by EXEC_ELF64
option.  (Also, make EXEC_ELF32 option a way to explicitly include
32-bit ELF support.)
1996-09-26 20:51:03 +00:00
christos e2e0f65050 Merge pagedvn changes from OpenBSD and added mips defines. Also added
ELF_MAP_PAGE_ZERO define. The entry point computation is different than
the one OpenBSD uses.
1996-06-14 18:15:55 +00:00
christos 306987eb37 - Pass the Elf exec header in the emulation dependent probe functions.
- remove static from elf_read_from().
1996-06-13 18:35:25 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
fvdl d6b5a89f90 Use a default, 'safe' address to map the loader to in case the an emulation-
specific probe function did not specify it. It picks the same address
as mmap() does for a non-fixed map at address 0. See also the comment
around a similar line of code in vm/vm_mmap.c.
1996-02-09 13:25:54 +00:00
fvdl 961c294fd5 * Don't rely on the protection bits of segments anymore to decide whether
it's text or data; use the entry point instead (this solves some trouble
  with ELF executables with strange permissions)
* Incorporate some fixes from r_friedl@informatik.uni-kl.de sent to
  netbsd-bugs a while ago
1996-01-16 23:07:18 +00:00
thorpej 7f6d48201f s/memcmp/bcmp/ 1995-09-16 00:28:08 +00:00
christos 1654fca494 Remove unused define 1995-06-30 02:57:20 +00:00
fvdl 8ef93cbcf5 Generic mi ELF loader; delete Linux and Svr4 compat conf entries and
add generic ELF entry to exec_conf.c
1995-06-22 21:29:47 +00:00