mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Fully support OpenBSD 7.3
This change (1) upgrades to OpenBSD's newer kernel ABIs, and (2) modifies APE to have a read-only data segment. Doing this required creating APE Loader v1.1, which is backwards and forwards compatible with the previous version. If you've run the following commands in the past to install your APE Loader systemwide, then you need to run them again. Ad-hoc installations shouldn't be impacted. It's also recommended that APE binaries be remade after upgrading, since they embed old versions of the APE Loader. ape/apeuninstall.sh ape/apeinstall.sh This change does more than just fix OpenBSD. The new loader is smarter and more reliable. We're now able create much tinier ELF and Mach-O data structures than we could before. Both APE Loader and execvpe() will now normalize ambiguous argv[0] resolution the same way as the UNIX shell. Badness with TLS linkage has been solved. Fixes #826
This commit is contained in:
parent
963e10b9bf
commit
40eb3b9d5d
48 changed files with 772 additions and 903 deletions
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/cp.internal.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/calls/struct/iovec.internal.h"
|
||||
|
@ -100,8 +101,10 @@ BENCH(write, bench) {
|
|||
ASSERT_SYS(0, 3, open("/dev/null", O_WRONLY));
|
||||
EZBENCH2("write", donothing, write(3, "hello", 5));
|
||||
EZBENCH2("writev", donothing, writev(3, &(struct iovec){"hello", 5}, 1));
|
||||
BEGIN_CANCELLATION_POINT;
|
||||
EZBENCH2("sys_write", donothing, sys_write(3, "hello", 5));
|
||||
EZBENCH2("sys_writev", donothing,
|
||||
sys_writev(3, &(struct iovec){"hello", 5}, 1));
|
||||
END_CANCELLATION_POINT;
|
||||
ASSERT_SYS(0, 0, close(3));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue