Age | Commit message (Collapse) | Author |
|
|
|
|
|
of the script before resorting to /dev/fd.
|
|
|
|
|
|
(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.
|
|
(DIST_FILES): Remove it from here.
|
|
(struct execdata): Moved here from exec.c.
(std_*): Declare these.
(finish, check_hashbang): Declare them.
|
|
|
|
(LCLHDRS): Add priv.h and execmutations.h.
(exec-MIGSFLAGS): New variable.
(exec): Depend on livtrivfs, libthreads, libshouldbeinlibc.
|
|
|
|
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.
|
|
|
|
completely with OLDTASK.
(do_mach_notify_no_senders): Remove bogus mod_refs call on receive_portset.
|
|
(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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(all, exec): Delete targets.
|
|
|
|
(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.
|
|
|
|
(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.
|
|
Secondarily uses the BFD library #ifdef BFD.
Supports gunzipping only #ifdef GZIP.
|
|
|
|
Open a new BFD on the uncompressed data stream before return.
|
|
(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.
|
|
variable set there.
|
|
(exec): Depend on -lbfd and -liberty.
(CPPFLAGS): Append -DBFD; omit -DA_OUT_H=...
(bfdexec): Target removed.
|
|
(input_room): Always map a page-aligned region.
|
|
|
|
pages.
|
|
|
|
|
|
|
|
|
|
|
|
mach_msg_type_number_t instead of unsigned int. Cast &HOSTINFO to
(natural_t *).
|
|
[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.
|
|
|
|
|
|
(LCLHDRS): Add gzip.h crypt.h tailor.h.
(unzip.o util.o inflate.o): Depend on those.
(CFLAGS): Use +=.
|
|
(load_section): Copy data from U->file_data if that is nonnull.
Use new subfunction `write_to_task' that handles non-page aligned sections.
(input_room): Fix EOF check.
Use io_read if no memory object.
(prepare): New function, broken out of check.
Initialize E->file_data and E->optimal_block.
Set E->stream.__seen bit.
(check): No longer take FILE arg.
Use E->file_data if nonnull; else read from stream if no memory object.
(finish_mapping): Reset members after deallocating resources.
(finish): Likewise. Call fclose. Don't deallocate E->header if it points
to &E->headbuf or E->file_data.
(check_gzip): New function, implements executing gzip'd binaries.
(do_exec): Call prepare before check.
Call check_gzip if file format unrecognized.
|
|
ufs bug.
|
|
(set_active_trans): Declare as void.
|
|
(S_exec_init): Call set_active_trans.
|
|
|