| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do a few things here:
- Move search_path to the scope where it is used to make dependencies
more clear.
- Have a separate variable to store the file name we eventually need to
free and move the free logic to happen in a single place.
Both of this allows us to still free the name even if a fault is generated and
also avoids a compiler warning as we try to assign a 'const char*'
file_name_exec to a 'char *', making it more clear to what exactly we
need to free. I also believe 'error' in line 245 was not initialized in
case 'file_name_exec' is used and this fixes that too.
Message-ID: <20240121210757.1900938-1-flaviocruz@gmail.com>
|
|
|
|
|
| |
mach_open_devstream creates a fully-buffered stream by default.
This prevents from seeing various messages.
|
|
|
|
|
|
| |
This reverts commit db46ea2eb9dc84959fbf9b1819facac3d6078ba1.
This is making the hurd startup hang.
|
|
|
|
|
|
|
|
|
| |
This maps to EM_AARCH64. Just like the x86_64 branch, we only compile
this code if CPU_TYPE_ARM64 is defined in Mach headers, to avoid
raising Mach version requirement on other architectures; and we
explicitly enable the branch when building for AArch64 itself, to get
a build error if CPU_TYPE_ARM64 is somehow not defined.
Message-ID: <20240323115322.69075-7-bugaevc@gmail.com>
|
|
|
|
| |
Message-ID: <20240323115322.69075-8-bugaevc@gmail.com>
|
|
|
|
|
|
|
| |
The code here just wants to deallocate the whole address space, and Mach
already contains the logic to limit the passed-in range to the vm_map's
actual bounds (see VM_MAP_RANGE_CHECK).
Message-ID: <20240323115322.69075-6-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous logic had two independent issues:
* We need to make the stack executable if either the program or its ELF
interpreter requires executable stack. In practice, it's common for
the program itself to not require executable stack, but ld.so (glibc)
needs it.
* mach_setup_thread () allocates stacks with a simple vm_allocate (),
which creates non-executable memory. So if an executable stack is
required, the stack has to be vm_protect'ed to enable execution, not
the other way around. As the comment suggest, it would've been better
to use vm_map () with the desired protection directly.
Message-ID: <20240323115322.69075-2-bugaevc@gmail.com>
|
|
|
|
| |
Message-ID: <20231229161211.312389-2-flaviocruz@gmail.com>
|
| |
|
|
|
|
| |
To get mach_msg_type_number_t everywhere
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code mapped the first PT_LOAD segment using anywhere=1,
letting Mach pick an arbitrary location, and then uses anywhere=0 for
all the remaining segments to place them next to the first one, as
expected by the program.
This, however, runs into many issues, primarily because of conflicts
between interpreter and executable mappings. Some of those the existing
code tried to work around. Instead, do it the way it's implemented in
glibc: calculate upfront how much space the overall mapping will need,
and ask Mach to preallocate this much address space. Then we deallocate
it back, and instead map the program segments onto this very same place.
Message-Id: <20230625231137.403096-4-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
We want to map the whole lower 4 GB of address space inaccessible to
catch accidental pointer truncation. We can only do this when the
executable (as well as the interpreter, if any) is compiled as PIC/PIE,
since otherwise we would violate the ABI requirement. Fortunately most
distributions have already switched to using PIE by default, so this
should not be an issue.
Message-Id: <20230625231137.403096-3-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Since we don't support mixing i386 and x86_64 binaries on the same
system (as running them requires different build-time gnumach
configurations), the exec server can simply require the binary being
loaded to have been built for the same architecture as the exec server
itself.
Message-Id: <20230515073600.1350072-1-bugaevc@gmail.com>
|
|
|
|
| |
Message-Id: <20230508213136.608575-21-bugaevc@gmail.com>
|
|
|
|
| |
Message-Id: <20230508213136.608575-20-bugaevc@gmail.com>
|
|
|
|
|
| |
A follow up to 92fad38a043b75ed6b435b3efa574ede91dbe9ee in gnumach.
Message-Id: <ZFCNasf9bJ9qj+CG@jupiter.tail36e24.ts.net>
|
|
|
|
|
| |
mach_port_t are mach_port_name_t and thus require %u instead of %lu.
Message-Id: <Y42RELMbulK4xaKM@reue>
|
|
|
|
| |
For coherency with the existing RPCs
|
|
|
|
| |
And add proc_complete_reauthentication ()
|
|
|
|
|
| |
This lets the exec server atomically replace the old task with the new task
while raising its privileges.
|
|
|
|
|
| |
So users get a "Cannot exec a shared library directly" error message instead
of a segfault.
|
|
|
|
|
| |
Now that the RPCs have const, this forces us cleaning our const-meant
functions.
|
|
|
|
|
| |
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server
side")
|
|
|
|
| |
No actual behavior change.
|
|
|
|
|
| |
PIE programs do not need bitmask constraints, only the ELF interpreter
needs to leave room for a non-PIE program.
|
|
|
|
|
|
|
| |
Gnumach's 0650a4ee30e3 implements support for high bits being set in the
mask parameter of vm_map. This allowed to remove the rmh kludge in the
dynamic linker. Exec now can and should use the mask for excluding parts of
the memory layout.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which will be the default in gcc-10.
* acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier.
* boot/private.h (verbose): Likewise.
* eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise.
* eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise.
* exec/priv.h (port_bucket, execboot_portclass): Likewise.
* ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size,
log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block,
zeroblock, frag_size, frags_per_block, inodes_per_block,
itb_per_group, db_per_group, desc_per_block, addr_per_block,
groups_count, node_to_page_lock, generation_lock, next_generation,
group_desc_image, global_pokel, modified_global_blocks,
use_xattr_translator_records): Likewise.
* hostmux/hostmux.h (hostmux_maptime): Likewise.
* isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len,
logical_block_size, sblock): Likewise.
* libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev,
diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock,
diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise.
* libnetfs/callbacks.h (_netfs_translator_callback1,
_netfs_translator_callback2): Likewise.
* libnetfs/priv.h (netfs_mtime): Likewise.
* libpager/priv.h (_pager_class): Likewise.
* libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook,
trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook,
trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook,
trivfs_getroot_hook): Likewise.
* lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class,
shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses,
lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner,
lwip_group): Likewise.
* lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class):
Likewise.
* nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise.
* nfsd/nfsd.h (mapped_time, authserver): Likewise.
* pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise.
* pci-arbiter/startup.h (pci_shutdown_notify_class,
arrange_shutdown_notification): Likewise.
* pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class,
fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise.
* pflocal/sserver.h (sock_port_bucket): Likewise.
* proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket,
proc_class, generic_port_class, exc_class, generic_port, kernel_proc,
global_lock): Likewise.
* term/term.h (termstate, termflags, global_lock, carrier_alert,
select_alert, pty_select_alert, term_bucket, tty_cntl_class,
tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl,
inputq, rawq, outputq, remote_input_mode, external_processing,
term_owner, term_group, term_mode, bottom): Likewise.
* usermux/usermux.h (usermux_maptime): Likewise.
* utils/msgids.h (msgid_argp): Likewise.
* libdiskfs/priv.h (_diskfs_mtime): Remove definition.
* lwip/options.h (lwip_argp): Add prototype.
* mach-defpager/priv.h (partitions): Name structure.
(all_partitions): Add extern qualifier.
* acpi/main.c (acpifs_maptime, fs): New variables.
* exec/main.c (port_bucket, execboot_portclass): Likewise.
* ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size,
log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block,
frag_size, frags_per_block, inodes_per_block, itb_per_group,
db_per_group, desc_per_block, addr_per_block, groups_count,
next_generation, group_desc_image, global_pokel,
use_xattr_translator_records): Likewise.
* isofs/main.c (host_name, mounted_on, logical_block_size, sblock):
Likewise.
* libpager/pager-create.c (_pager_class): Likewise.
* lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class):
Likewise.
* mach-defpager/default_pager.c (all_partitions): Likewise.
* nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise.
* nfsd/main.c (mapped_time, authserver): Likewise.
* pci-arbiter/main.c (fs, pcifs_maptime): Likewise.
* pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise.
* pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket,
addrport_class, socketport_class, fsys_identity): Likewise.
* proc/main.c (authserver, self_proc, init_proc, startup_proc,
proc_bucket, proc_class, generic_port_class, exc_class, generic_port,
kernel_proc, global_lock): Likewise.
* term/main.c (termstate, termflags, global_lock, carrier_alert,
select_alert, pty_select_alert, term_bucket, tty_cntl_class,
tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl,
outputq, remote_input_mode, external_processing, term_owner,
term_group, term_mode, bottom): Likewise.
* usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime.
* lwip/main.c: Include "options.h".
(lwip_argp, netif_list): Remove declarations.
(lwip_bucket, socketport_class, addrport_class, shutdown_notify_class,
lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group,
fsys_identity, lwipcntl): New variables.
* eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable.
* hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime
* libdiskfs/extra-version.c: Rename file to...
* libdiskfs/priv.c: ... new file.
(diskfs_shortcut_symlink, diskfs_shortcut_chrdev,
diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock,
diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak
variables.
* libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c.
* libtrivfs/priv.c: New file.
* libtrivfs/Makefile (OTHERSRCS): Add priv.c
* libcons/extra-version.c: Rename file to...
* libcons/priv.c: ... new file.
* libcons/Makefile (SRCS): Replace extra-version.c with priv.c.
Fix build with #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* boot/boot.c: Replace char* with data_t.
* console-client/trans.c: Likewise.
* exec/exec.c: Likewise.
* ext2fs/storeinfo.c: Likewise.
* fatfs/inode.c: Likewise.
* fatfs/main.c: Likewise.
* isofs/inode.c: Likewise.
* libdiskfs/boot-start.c: Likewise.
* libdiskfs/dir-readdir.c: Likewise.
* libdiskfs/file-exec.c: Likewise.
* libdiskfs/file-get-fs-opts.c: Likewise.
* libdiskfs/file-get-trans.c: Likewise.
* libdiskfs/file-getfh.c: Likewise.
* libdiskfs/file-set-trans.c: Likewise.
* libdiskfs/fsys-forward.c: Likewise.
* libdiskfs/fsys-getfile.c: Likewise.
* libdiskfs/fsys-options.c: Likewise.
* libdiskfs/io-read.c: Likewise.
* libdiskfs/io-write.c: Likewise.
* libnetfs/dir-readdir.c: Likewise.
* libnetfs/file-exec.c: Likewise.
* libnetfs/file-get-fs-options.c: Likewise.
* libnetfs/file-get-storage-info.c: Likewise.
* libnetfs/file-get-translator.c: Likewise.
* libnetfs/file-set-translator.c: Likewise.
* libnetfs/fsstubs.c: Likewise.
* libnetfs/fsys-get-options.c: Likewise.
* libnetfs/fsys-set-options.c: Likewise.
* libnetfs/fsysstubs.c: Likewise.
* libnetfs/io-read.c: Likewise.
* libnetfs/io-write.c: Likewise.
* libtrivfs/dir-readdir.c: Likewise.
* libtrivfs/file-get-fs-options.c: Likewise.
* libtrivfs/file-get-storage-info.c: Likewise.
* libtrivfs/file-get-trans.c: Likewise.
* libtrivfs/file-getfh.c: Likewise.
* libtrivfs/file-set-trans.c: Likewise.
* libtrivfs/fsys-forward.c: Likewise.
* libtrivfs/fsys-get-options.c: Likewise.
* libtrivfs/fsys-set-options.c: Likewise.
* libtrivfs/fsys-stubs.c: Likewise.
* libtrivfs/io-read.c: Likewise.
* libtrivfs/io-write.c: Likewise.
* pfinet/io-ops.c: Likewise.
* pfinet/pfinet-ops.c: Likewise.
* pfinet/socket-ops.c: Likewise.
* pfinet/tunnel.c: Likewise.
* pflocal/io.c: Likewise.
* pflocal/pf.c: Likewise.
* pflocal/socket.c: Likewise.
* proc/info.c: Likewise.
* startup/startup.c: Likewise.
* storeio/io.c: Likewise.
* term/users.c: Likewise.
* tmpfs/node.c: Likewise.
* trans/crash.c: Likewise.
* trans/fakeroot.c: Likewise.
* trans/fifo.c: Likewise.
* trans/firmlink.c: Likewise.
* trans/hello-mt.c: Likewise.
* trans/hello.c: Likewise.
* trans/mtab.c: Likewise.
* trans/new-fifo.c: Likewise.
* trans/null.c: Likewise.
* trans/proxy-defpager.c: Likewise.
* trans/streamio.c: Likewise.
|
|
|
|
|
|
|
|
| |
otherwise there might not even be enough room to run RPCs during rtld
bootstrap.
* exec/exec.c (do_exec): Add 128MiB to anywhere_start before loading
program.
|
|
|
|
|
|
|
| |
which happened to have no nefarious consequences by luck.
* exec/exec.c (load_section): Add braces around commented code to fix
else branch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Fix printf format.
* libfshelp/delegate.c: Include <alloca.h> and <stdlib.h>.
* libfshelp/start-translator-long.c: Include <stdlib.h>.
* libshouldbeinlibc/ugids-verify-auth.c (server_verify_make_auth): Fix
prototypes for password_check_group and password_check_user.
* libstore/argp.c: Include <stdlib.h>.
* libstore/task.c: Include <stdlib.h>.
* exec/exec.c: Include <mach/vm_param.h>.
* libbpf/bpf_impl.c: Include <stdlib.h>.
* proc/info.c (S_proc_getloginpids): Remove local variables leader_task
and leader_sub.
* proc/main.c (main): Remove local variable original_argv.
* boot/boot.c (task_died, S_mach_notify_new_task): Fix printf format.
* exec/elfcore.c: Include <alloca.h> and <mach/vm_param.h>.
* trans/crash.c: Include <hurd/msg.h>.
* trans/random.c: Include <signal.h>.
* utils/login.c: Include <signal.h>.
* utils/id.c: Include <hurd/msg.h>.
* utils/devprobe.c: Include <stdlib.h>.
* utils/addauth.c: Include <hurd/msg.h>.
* utils/frobauth-mod.c: Include <hurd/msg.h>.
* utils/storeread.c: Include <stdlib.h>.
* utils/msgport.c: Include <hurd/msg.h>.
* sutils/clookup.c (file_name_lookup_carefully): Fix lookup function
prototype, make head and tail const.
* utils/rpcscan.c: Include <stdlib.h>.
* sutils/bless.c: Include <stdlib.h>.
* fstests/fstests.c: Include <stdlib.h>.
* startup/startup.c (argz_task_insert_right): Fix printf format.
* init/init.c: Include <stdlib.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by adding proc_set/get_exe to the proc server, making
exec call proc_set_exe, and libps call proc_get_exe. procfs can then just
retrieve the information to make the "exe" symlink.
* hurd/process.defs (proc_set_exe, proc_get_exe): New RPCs.
* hurd/process_request.defs: Likewise.
* hurd/process_reply.defs: Add skips for proc_set_exe and proc_get_exe RPCs.
* proc/proc.h (struct proc): Add `exe' field.
* proc/info.c (S_proc_set_exe, S_proc_get_exe): New functions.
* proc/mgt.c (process_has_exited): Free p->exe.
(S_proc_child): Duplicate parent `exe' into child's `exe'.
* exec/exec.c (do_exec): Call proc_set_exe when a filename is available.
* libps/ps.h (struct proc_stat): Add `exe_vm_alloced', `exe', and `exe_len'
field.
(PSTAT_EXE): New macro.
(PSTAT_USER_BASE): Change value to make room.
(proc_stat_exe, proc_stat_exe_len): New macros.
* libps/procstat.c (proc_stat_set_flags): Handle PSTAT_EXE case by calling
proc_get_exe.
* libps/spec.c (ps_get_exe): New function.
(ps_exe_getter): New structure.
(ps_fmt_spec): Add "Exe" specification.
* procfs/process.c (process_file_symlink_make_node, process_file_gc_exe): New
functions.
(procfs_dir_entry): Add "exe" entry.
* startup/startup.c (launch_core_servers): Set exe paths for startup, auth,
proc, and fs servers.
(frob_kernel_process): Set exe path for kernel task.
(S_startup_essential_task): Set exe path for exec server.
|
|
|
|
|
| |
* exec/exec.c (do_exec): When abspath is absolute, record its dirname
into the LD_ORIGIN_PATH environment variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If file_name_exec is not given, check_hashbang will try to locate the
file. If argv[0] contains a '/', the file path is assumed to be
absolute and it will try to open the file. Otherwise, the file is
searched in the PATH. In either case, the resulting file identity port
is compared to the identity port of the original file handle passed to
check_hashbang.
exec_paths_exec.patch explicitly provides the script files path in
file_name_exec. According to the comment, if this path is provided, it
is assumed to be the path to the script file and no attempt at
locating the script file is done. However, the identity ports are
still compared. This cannot succeed if fakeroot or chroot is used,
because the process doing the exec and thus the initial file lookup is
running in the chrooted environment, while the exec server is not.
Fix this by skipping the identity test if file_name_exec is provided.
* exec/hashexec.c (check_hashbang): Skip the file identity test if the
file_name_exec is provided.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hurd/fs.defs (file_exec): Deprecate in favor of...
(file_exec_paths): ...this new RPC.
* TODO: Update.
* doc/hurd.texi: Update RPC name.
* hurd/hurd_types.h: Update RPC name.
* libdiskfs/boot-start.c: Update RPC name.
* configure.ac: Check for presence of RPC stubs file_exec_paths exec_exec_paths.
* exec/hashexec.c (check_hashbang): When file_exec_paths is available, use it
instead of file_exec.
* startup/startup.c (run, run_for_real, start_child): Likewise.
* utils/login.c (main): Likewise.
* libfshelp/start-translator-long.c (fshelp_start_translator_long): Likewise.
* libdiskfs/file-exec.c (diskfs_S_file_exec): Move code to
new function diskfs_S_file_exec_paths and call it.
(diskfs_S_file_exec_paths): New function, use exec_exec_paths when available
instead of exec_exec
* libnetfs/file-exec.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise.
* trans/fakeroot.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise.
* libtrivfs/file-exec.c (trivfs_S_file_exec_paths): New function.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hurd/exec.defs (exec_exec): Label as deprecated.
(exec_exec_paths): New RPC.
* doc/hurd.texi: Update accordingly.
* exec/hashexec.c (check_hashbang): Add file_name_exec argument.
Don't guess the file name if file_name_exec is set.
* exec/priv.h (check_hashbang): Add path argument.
* exec/exec.c (S_exec_exec): Label as deprecated.
(S_exec_exec_paths): New function.
(do_exec): Add path and abspath arguments, pass path to check_hashbang.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hurd/process.defs (proc_set_entry, proc_get_entry): New RPCs.
* hurd/process_reply.defs: Add skips for proc_set_entry, proc_get_entry.
* hurd/process_request.defs: Likewise.
* exec/exec.c (do_exec): Call proc_set_entry.
* proc/proc.h (proc): Add p_entry field.
* proc/mgt.c (S_proc_set_entry, S_proc_get_entry): New RPC
implementations.
* exec/elfcore.c (dump_core): Add at_entry note, call proc_get_entry to
get it, and write it with WRITE_NOTE.
|
|
|
|
|
|
| |
mmap is supposed to return an error on passing a zero size.
* exec/exec.c (servercopy): Immediately return NULL if argsize is 0.
|
|
|
|
|
|
|
|
|
|
|
| |
* boot/boot.c: Replace bcopy with memcpy or memmove as appropriate.
* exec/hashexec.c: Likewise.
* libps/proclist.c: Likewise, but also fix the amount of data copied.
* libps/procstat.c: Likewise.
* libps/spec.c: Likewise.
* libshouldbeinlibc/cacheq.c: Likewise.
* libshouldbeinlibc/idvec.c: Likewise.
* libshouldbeinlibc/timefmt.c: Likewise.
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
|
|
|
|
|
| |
Falling back from the io_map method needs to handle the "anywhere" flag too
by updating MAPSTART.
* exec/exec.c (write_to_task): Turn MAPSTART parameter into a reference to
the address. Fix usage accordingly.
(load_section): Pass address of MAPSTART to write_to_task so it can update
it.
|
|
|
|
|
|
|
|
|
| |
or called with a small array.
This notably happens when using a sub-exec, see BZ #48919.
* exec/hashexec.c (check_hashbang): Check std_nports before accessing
std_ports.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It happens that the link script for ld.so contains a hole, which might thus
leave an empty page between the text and the data. When loading a small pic
program, its text would then fit in there, and loading the data right after
it would fail. We here rather force all pic loads to be mapped
contiguously, starting from the place that was allocated for the first pic
load.
* exec/exec.c (load_section): Return the address of the end of the section.
(load): Take the address to be used for loading pic objects as parameter,
force pic objects there if it is not zero, and compute and return the
address to be used for the next pic object.
(do_exec): Pass addresses for pic loads between calls to load().
|
|
|
|
|
|
|
|
|
| |
This reverts part of commit 05c3ffac543052c8d0b171a5f77bb977d5316a61. These
type casts are no longer needed after the commit
e914bfc3d6e5ddf6f8c5e93a4334873a48a24ddf changes.
* exec/elfcore.c: Revert type casts added in commit
05c3ffac543052c8d0b171a5f77bb977d5316a61.
|
|
|
|
|
| |
* exec/main.c (main) Remove second call to trivfs_startup
from commit a5d384c.
|
|
|
|
| |
* exec/Makefile (targets): Rename to target.
|
|
|
|
|
|
| |
Which can be more convenient than using ld.so to boot the Hurd
* exec/Makefile (targets): Add exec.static
|