Age | Commit message (Collapse) | Author |
|
* priv.h (struct execdata.info.elf): New field `phdr_addr'.
* exec.c (check_elf): Set E->info.elf.phdr_addr here from e_phoff.
(check_elf_phdr): Don't check for PT_PHDR, remove last two args.
(do_exec): Update callers. Set BOOT->phdr_addr and BOOT->phdr_size
using info saved by check_elf.
|
|
* priv.h (struct execdata.info.elf): Add `execstack' flag.
* exec.c (check_elf_phdr): Set it according to PT_GNU_STACK's PF_X
flag bit. If no PT_GNU_STACK, default to set.
(do_exec): If flag is clear, remove execute permission from stack.
|
|
* priv.h (trivfs_protid_t): Type removed (now in trivfs.h).
|
|
* priv.h: Include <link.h> to get ElfW macro.
* priv.h, exec.c, main.c, hostarch.c: Use `ElfW(TYPE)' in place
of `Elf32_TYPE' throughout.
|
|
* priv.h (EXECDATA_STREAM): Define this only #ifdef BFD.
The non-BFD exec server is now completely independent of stdio magic;
it uses only those interfaces documented in the C library manual,
which are provided both by old GNU stdio and by GNU libio.
Resurrecting the BFD exec server will require using magic again,
for which libio-specific magic needs to be written.
|
|
* priv.h (EXECDATA_STREAM): New macro, always defined for now.
(struct execdata) [! EXECDATA_STREAM]: Add members
map_buffer, map_bsize, map_fsize, map_filepos in place of stream.
(map_buffer, map_filepos, map_set_fsize): New macros for accessing
those or stream.
[! EXECDATA_STREAM] (map_fsize, map_vsize): Define using new members.
* exec.c (map): Rewritten purely using those accessor macros.
(input_room): Set the __target, __bufp, __error, and __eof members,
which are no longer set by map.
[! EXECDATA_STREAM] (prepare_stream, prepare_in_memory): Make no-ops.
(input_room, close_exec_stream, fake_seek, prepare_stream,
prepare_in_memory): Conditionalize these defns on [EXECDATA_STREAM].
(load_section): Always use map instead of stdio.
Replace bcopy with memcpy.
(check_gzip: zipread): Rewrite using map instead of stdio.
(check_bzip2: zipread): Likewise.
|
|
* exec.c (map): Made global.
* priv.h: Declare it.
(map_fsize, map_vsize): New macros for accessing state set up by map.
* hashexec.c (check_hashbang): Use map and copying operations rather
than stdio to extract the first line from the file. Move finish call
to immediately after reading the line.
|
|
* exec.c (check_elf): Call elf_machine_matches_host instead of
comparing against elf_machine.
(load_section): #if 0 out no-op code that uses elf_machine.
* priv.h (elf_machine_matches_host): Declare it.
(elf_machine, mach_host_elf_machine): Remove decls.
* main.c (main) [!BFD]: Don't call mach_host_elf_machine.
(elf_machine): Variable removed.
* priv.h: Add #include <sys/mman.h> for munmap decl.
|
|
* priv.h (mach_host_elf_machine): New prototype.
* hostarch.c: Include "priv.h".
|
|
|
|
|
|
(struct execdata): Moved here from exec.c.
(std_*): Declare these.
(finish, check_hashbang): Declare them.
|
|
|