aboutsummaryrefslogtreecommitdiff
path: root/exec/exec.c
Commit message (Collapse)AuthorAgeFilesLines
* 1998-09-05 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>Thomas Bushnell1999-04-301-0/+118
| | | | | | | | | * do-bunzip2.c: New file. * exec.c (check_bzip2): New function. (BZIP2): New cpp symbol. If defined, bunzip2 engine is enabled. * Makefile (bzip2-objects): New variable. (OBJS): Add bzip2-objects. (CPPFLAGS): Add -DBZIP2.
* 1999-04-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-04-271-2/+26
| | | | * exec.c (do_exec): Implement EXEC_SIGTRAP flag.
* 1998-12-26 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-12-271-1/+1
| | | | | | | * exec.c (do_exec): Fix conditional for cleaning up INTERP, from nonnull E.interp.section to nonnull INTERP.file. If we failed to open the interpreter file, INTERP.file will be null and the rest of INTERP will be uninitialized.
* 1998-07-15 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-07-161-10/+16
| | | | | * exec.c (do_exec): Set boot->phdr_addr and boot->user_entry after loading, to addresses adjusted for actual run-time load address.
* Mon Nov 18 17:45:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-181-1/+2
| | | | | | | | | | | | * exec.c (load_section): If ANYWHERE, then make sure ADDR starts out at least past the first page, so that we don't take it. Then the library can (if desired) make the page no-access. Fri Nov 15 17:34:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * exec.c: Don't include <hurd/shared.h> any more. * main.c (S_exec_init): New arg syntax of trivfs_open.
* Mon Oct 7 21:31:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-10-081-2/+26
| | | | | | | * exec.c (fake_seek): New function. (prepare): Initialize E->stream.__io_funcs.seek to fake_seek; this is called now that stdio doesn't assume it always knows the file position.
* (S_exec_exec): Don't use unsafe MOVE_SEND in call to interruptibleMichael I. Bushnell1996-07-081-12/+20
| | | | exec_exec stub.
* (do_exec): In proc_setowner code, deal with error from auth_getidsMichael I. Bushnell1996-06-201-23/+25
| | | | more loosely.
* fixupMichael I. Bushnell1996-06-201-4/+5
|
* (do_exec): Call proc_setowner *after* possible proc_reassign;Michael I. Bushnell1996-06-201-34/+35
| | | | | otherwise it modifies the stub process's state and not the real process's.
* (do_exec, S_exec_exec): Pass 0 for new LOOKUP arg to hurd_file_name_lookup.Miles Bader1996-06-191-2/+2
|
* (do_exec): Add code missing from last change.Michael I. Bushnell1996-06-131-2/+16
|
* (do_exec): If secure, set the owner with proc_setowner.Michael I. Bushnell1996-06-131-2/+23
|
* (do_exec): Use new auth_user_authenticate interface.Michael I. Bushnell1996-05-101-1/+1
|
* (map): Use F->__offset and F->__target properly.Roland McGrath1996-05-031-7/+7
|
* (map): Fix fencepost error in check of current mapping window.Roland McGrath1996-05-021-2/+3
| | | | Request round_page (LEN) bytes in io_read to avoid many small reads.
* (do_exec): Terminate OLDTASK if we get an error after killing its threadsRoland McGrath1996-05-021-3/+13
| | | | and deallocating its address space.
* (check_gzip) [ziprderr]: Treat all read errors as ENOEXEC. First off,Michael I. Bushnell1996-04-301-9/+10
| | | | | because that's what they are; also because some callers of read_error don't set errno at all.
* Use ports_create_port instead of ports_allocate_port, and notice the error.Roland McGrath1996-04-271-2/+2
|
* (prepare):Miles Bader1996-04-081-66/+72
| | | | | | If io_map returns EOPNOTSUPP, suppress the error, and still setup E's stream. (prepare_and_check): If prepare returns an error, do no more.
* (S_exec_exec):Miles Bader1996-01-301-9/+21
| | | | | Use strdupa(). Update use of hurd_file_name_lookup() [still probably not right though].
* (S_exec_exec): Use envz_get() to search the environment.Miles Bader1996-01-111-14/+7
|
* (safe_bzero): Rewritten using hurd_catch_signal.Roland McGrath1996-01-041-24/+4
|
* (do_exec):Miles Bader1995-12-291-5/+12
| | | | | | Be careful not to look at BOOT after we release our reference on it. Correctly initialize BOOT->intarray in the case where NINTS < INIT_INT_MAX but we don't alloc a new array.
* (map): Rearrange code to fix some bugs and not remap unless necessary.Roland McGrath1995-12-151-32/+23
| | | | | | (input_room): Simplify. (check_elf): Extract all information from file header before calling `map' for program headers.
* (safe_bzero): New function, broken out of load_section.Roland McGrath1995-11-211-27/+33
| | | | (load_section): Call it.
* (load_section): Undo boneheaded last change.Roland McGrath1995-11-211-2/+2
|
* (load_section): Declare ADDR and VM_PROT volatile.Michael I. Bushnell1995-11-211-2/+2
|
* (S_exec_startup): Compatibility RPC removed.Roland McGrath1995-11-131-24/+0
|
* (load_section): Catch faults while zeroing partial bss page.Roland McGrath1995-11-131-22/+47
|
* (S_exec_startup_get_info): New function, modified from S_exec_startup.Roland McGrath1995-10-251-29/+67
| | | | (S_exec_startup): Just call it.
* (struct execdata): Moved to priv.h.Roland McGrath1995-10-181-115/+97
| | | | | | | | | | | (std_*, finish): Make global. (do_exec): Only reset CWDIR when null, even if secure. Actually call check_hashbang and return success if it does. Use new hurd_file_name_lookup protocol with private callbacks to open interpreter file on behalf of client. Remove `bootout' label; use `stdout' or `out' as appropriate instead. At `out' label always deref BOOT, which cleans it up iff necessary. (S_exec_exec): #if 0 out $EXECSERVERS processing for time being.
* Server mechanics removed; now uses libtrivfs/libports.Roland McGrath1995-10-111-498/+96
| | | | | | | Main program split out into main.c. (std_lock): New variable (rwlock). (do_exec): Acquire reader lock to access std_ints and std_ports. (S_exec_setexecdata): Acquire writer lock to change them.
* (do_exec): Doc fix.Michael I. Bushnell1995-10-021-0/+4
|
* (do_exec): Don't set NEWTASK's bootstrap port until after we have finishedRoland McGrath1995-09-271-18/+8
| | | | | completely with OLDTASK. (do_mach_notify_no_senders): Remove bogus mod_refs call on receive_portset.
* (struct bootinfo): New members `phdr_addr', `phdr_size', `user_entry'.Roland McGrath1995-09-201-257/+321
| | | | | | (do_exec): Set them. Code rearranged to construct bootinfo before looking up interpreter file, keep proper track of port rights and VM copied into bootinfo (there were leaks).
* (S_fsys_forward): New stub function.Roland McGrath1995-08-281-2/+6
|
* (load_section): Remove assignments from if tests.Michael I. Bushnell1995-06-271-50/+68
| | | | | | | | | | | (map): Likewise. (prepare): Likewise. (load): Likewise. (servercopy): Likewise. (do_exec): Likewise. (S_exec_setexecdata): Likewise. (S_exec_exec): Put extra parens around assignment inside while test.
* (struct execdata.info.elf): Add members `anywhere' and `loadbase'.Roland McGrath1995-06-081-123/+167
| | | | | | | | | | | | (load_section): Use them; if `anywhere' set, load the section anywhere. Record load address in `loadbase'. (check_elf): Initialize `anywhere' and `loadbase'. (postload): Merged into load. (load): Perform postload functionality here, after calling finish_mapping. (finish): Take new flag arg; deallocate file port only if set. (do_exec): Pass flag to finish appropriately. Don't call finish_mapping and postload after load. KLUDGE: Load the interpreter before the program instead of after.
* Majorly revamped: Now supports the ELF format directly.Roland McGrath1995-06-051-297/+396
| | | | | Secondarily uses the BFD library #ifdef BFD. Supports gunzipping only #ifdef GZIP.
* Add fsys_set_options, replacing fsys_mod_readonly.Miles Bader1995-05-121-3/+3
|
* (check_gzip): Rewind the stream before calling `get_method'.Roland McGrath1995-04-211-1/+3
| | | | Open a new BFD on the uncompressed data stream before return.
* (struct execdata) [BFD]: New member `interp_section'.Roland McGrath1995-04-101-69/+186
| | | | | | | | | | | | (check_section): Notice section named ".interp" and set that pointer. (load_section): Do nothing if the section is zero size. When reading into our copy of the overlap page, don't read past the end of the section. (do_exec): Consolidate new subfunction `check_maybe_gzip'. If there is an interpreter section, load the interpreter file too, and use its entry point instead of the user program's. Cleaned up and made more robust deallocation of BOOT info on error. (deadboot): New function, split out of do_mach_port_notify_no_senders.
* (load_section): fseek to desired position before freading.Roland McGrath1995-04-091-2/+12
| | | | (input_room): Always map a page-aligned region.
* (check_section): Don't check SEC_RELOC flag.Roland McGrath1995-02-091-8/+2
|
* (load_section): Don't check SEC_HAS_CONTENTS for clearing overlap bssMichael I. Bushnell1995-02-091-5/+1
| | | | pages.
* (prepare): Fix braino in last change.Roland McGrath1995-01-281-1/+1
|
* (prepare): Give the stream a seek function.Roland McGrath1995-01-281-0/+2
|
* Update BFD code; it works now.Roland McGrath1995-01-221-29/+40
|
* [BFD] (bfd_mach_host_arch_mach): In decl, MACHINE arg is `long int *' now.Roland McGrath1995-01-151-8/+11
| | | | | | | | | [BFD] (host_bfd_arch_info): New variable. [BFD] (host_bfd): Initialize `arch_info' member to its address. (check) [BFD]: Use bfd_arch_get_compatible properly, rather than the nonexistent bfd_arch_compatible. (main) [BFD]: Fill in host_bfd.arch_info instead of old `obj_machine' and `obj_archiecture' members, which BFD no longer has.