Andrew Kelley
e85a46cb84
Merge pull request #16656 from ziglang/issue-16628
...
macho: track unwind/dwarf cfi records by symbol rather than atom
2023-08-02 22:28:02 -07:00
Jacob Young
a61495a988
cmake: fix early issues when bootstrapping on mingw
...
This gets all the way to the final link, where `libssp` symbols are
undefined, referenced by `libzstd.a`.
2023-08-02 22:13:04 -07:00
Mitchell Hashimoto
76f7b40e15
build: dupe library, rpath, and framework LazyPaths
...
Without duping, users could get some unexpected behavior if they used a
string with a lifetime that didn't persist throughout the full build,
i.e. if it wasn't heap allocated, or if it was explicitly freed.
2023-08-02 20:20:48 -07:00
Jacob Young
89d660c3eb
Sema: improve new error messages related to naked functions
...
* pass a source location to all safety checks
* add notes about what is disallowed in naked functions
Closes #16651
2023-08-02 16:12:30 -07:00
Jacob G-W
d0fbfd3c9f
Plan 9: add more features to std.os.plan9
...
* Replaces the exit assembly with the function from std.
* Reads the top-of-stack struct at program startup that can get information
like the pid.
* Changes the read and write functions to use the Pread and Pwrite syscalls
instead of the depreciated _READ and _WRITE
* Changes the openat function to use flags instead of perms.
Plan9 does not support perms when opening, just when creating.
* Adds an errstr function to read the errstr buf created by the kernel
2023-08-02 18:19:07 -04:00
Jakub Konka
26adbf2cb7
macho: set first and last atom indexes to 0 when marking section for pruning
2023-08-03 00:12:30 +02:00
Jacob G-W
841b54f5e3
std: add SbrkAllocator and use it for Plan 9
...
Implements issue #6451 .
This was needed to support allocation on Plan 9 and now other operating
systems like DOS can also use it.
It is a modified version of the WasmAllocator since wasm also uses a
sbrk-esque allocation system.
This commit also adds the necessary system bits for sbrk to work on plan 9.
2023-08-02 17:39:52 -04:00
Jacob G-W
4d711e8edd
Plan 9 linker: don't try to calculate the vaddr before we know it
...
Previously, this worked on small codebases, but it is not correct.
Unconditionally emitting a reloc fixes it (and it might be more performant).
2023-08-02 17:39:52 -04:00
Jacob G-W
b9aa1dcaf1
plan 9: filesystem support
2023-08-02 17:39:52 -04:00
Jacob G-W
6293a646e3
Plan9: support linking to external 'special' symbols
2023-08-02 17:39:52 -04:00
Jacob G-W
4d22bae27e
langref: fix documentation for @extern
2023-08-02 17:39:52 -04:00
Jakub Konka
16f09127b5
link-test: add matching test case for unwind info when MH_SUBSECTIONS_VIA_SYMBOLS is not set
2023-08-02 22:12:26 +02:00
Jakub Konka
d6e095de2c
macho: track unwind/dwarf cfi records by symbol rather than atom
...
This solves the nuance case of compiling hand-crafted assembly files
which do not feature `MH_SUBSECTIONS_VIA_SYMBOLS` flag resulting in
input `Atom`s encompassing multiple symbols each with unique unwind
information.
2023-08-02 21:45:33 +02:00
Adam Goertz
9e19969e09
Remove math.ln in favor of @log
2023-08-02 12:00:14 -07:00
Andrew Kelley
4d7dd1689f
CLI: stop special-casing LLVM, LLD, and Clang
...
Before:
-fLLVM, -fLLD, -fClang, -flibLLVM
-fno-LLVM, -fno-LLD, -fno-Clang, -fno-libLLVM
After:
-fllvm, -flld, -fclang, -flibllvm
-fno-llvm, -fno-lld, -fno-clang, -fno-libllvm
2023-08-01 20:32:54 -07:00
Kitty-Cricket Piapiac
d370005d34
std.process.totalSystemMemory: return correct error type on FreeBSD
2023-08-01 19:27:04 -07:00
Jacob Young
9e0a34f329
llvm: fix data layout calculation for experimental llvm targets
...
Closes #16616
2023-08-01 19:20:22 -07:00
Andrew Kelley
4f6013bf50
add behavior test for sub-aligned field access
...
The workaround in std.zig.Server remains because the C backend is not
passing the new test.
see #14904
2023-08-01 00:39:30 -07:00
Andrew Kelley
e84cda0ebf
Merge pull request #16622 from jacobly0/cbe-asm-compat
...
CBE: fix regressions and get new targets passing behavior tests
2023-07-31 15:34:32 -07:00
Andrew Kelley
8f5c333ebe
Merge pull request #16636 from ziglang/audit-devnexen
...
audit all contributions by @devnexen for correctness and delete unnecessary libc ABI bits
2023-07-31 15:33:54 -07:00
antlilja
928d43f61a
Fix integer overflow in field padding calculation
...
The old code was iterating and generating symbols
for fields in their declared order instead of the
memory optimized order while getting offsets in
the memory optimized order.
2023-07-31 15:14:31 -07:00
Andrew Kelley
04d5e07d40
std.c.openbsd: remove "msg_" prefixes from structs
...
Reapplies 8f14431bc883898aaf78cc985e2d90716187e882 which was reverted in
95e2605d30c15963c4d6bc9e39751031b0f52007.
2023-07-31 11:57:48 -07:00
Andrew Kelley
479fd2f721
std.c.openbsd: add PTHREAD_STACK_MIN
...
@semarie audited this definition.
2023-07-31 11:54:27 -07:00
Andrew Kelley
b1bde35651
std.c.openbsd: add ucontext_t for aarch64
...
Reapplies 1585ed637d101ed16adb6b9ebdfa465299bfdb13 which was reverted in
f3adbe249b0dfad91318916142a33619232a968f.
I removed use of `usingnamespace` in this commit.
@semarie audited this struct definition.
2023-07-31 11:51:08 -07:00
Andrew Kelley
235b9fc28a
Revert "std: add FreeBSD's procctl api."
...
This reverts commit 2e2d37917d4227d6ab9c8e43b3619bc47ce56417.
2023-07-31 11:24:21 -07:00
Andrew Kelley
99c70ec24f
Revert "std: add kinfo_vmentry for FreeBSD"
...
This reverts commit 4a0508e56c06456c367c57a7565b9f757f2ff663.
2023-07-31 11:24:14 -07:00
Andrew Kelley
68134e56cb
Revert "std add getrandom to solato solaris based systems"
...
This reverts commit 56d800ff7e65897d8ff9ede8e8194af4d08f0df5.
2023-07-31 11:24:09 -07:00
Andrew Kelley
a18a116bda
Revert "std: add shm_create_largepage for FreeBSD, completing MFD* constants."
...
This reverts commit 7b908e173fa6034dc92e6b73c4264dc44706bd32.
2023-07-31 11:24:04 -07:00
Andrew Kelley
c0ac1411db
Revert "std: freebsd update proposal"
...
This reverts commit 2568da2f41d3403b2cd91bbb84862c86932b63e6.
2023-07-31 11:23:56 -07:00
Andrew Kelley
26777d98fe
Revert "std: adding freebsd's elf_aux_info api"
...
This reverts commit 83970b6d916a1526869aba2680d5017d495df12a.
2023-07-31 11:23:49 -07:00
Andrew Kelley
b5df1bfcdb
Revert "os: expand sched_getaffinity wrapper and update freebsd's cpuset api flags."
...
This reverts commit dbdafb6cc503ce5820713dfa79cc956438b7957a.
2023-07-31 11:23:38 -07:00
Andrew Kelley
14353590f2
Revert "std: adding netbsd's pthread to cpu affinity api"
...
This reverts commit 3f259d35502ed5a8bdb6bbc22f9adb39d610b006.
2023-07-31 11:23:33 -07:00
Andrew Kelley
a2439e161b
Revert "std: enriching malloc api on freebsd."
...
This reverts commit 9140249d2993d9d9f4c92b2892db421e1e0fb7ae.
2023-07-31 11:21:50 -07:00
Andrew Kelley
c7f2a7ea82
Revert "std: add a subset of the macOs's libproc api."
...
This reverts commit 7b0e015eb42272d84396f44fc904ab79f38dd696.
2023-07-31 11:20:57 -07:00
Andrew Kelley
aa5808c26c
Revert "std: add accept_filter struct to make use of SO_ACCEPTFILTER socket option"
...
This reverts commit 1d322fe5102368f80fd4d00dcbbe3dca9e6306f8.
2023-07-31 11:20:53 -07:00
Andrew Kelley
62deaaacd5
Revert "std: mcontext layout for x86 and fixing few x86_64 fields types for"
...
This reverts commit 9691cded95afa53f17bfc50edc371d4fe673b56a.
2023-07-31 11:20:49 -07:00
Andrew Kelley
963b2a2a4d
Revert "std: adding FreeBSD's sched wrappers"
...
This reverts commit 9ef615104acb0f7cfed8f871404679a7df5571fe.
2023-07-31 11:20:44 -07:00
Andrew Kelley
5f101b253e
Revert "std: adding sigevent to supported platforms."
...
This reverts commit 23c4f55a612842d8544a9dfe604a9caf1ca39697.
2023-07-31 11:20:39 -07:00
Andrew Kelley
86388e3c32
Revert "std.os: sysctl* wrappers, better warning at compile time"
...
This reverts commit c66151a22619b4f3ce028076c67f495ff5f99d2c.
2023-07-31 11:20:31 -07:00
Andrew Kelley
70d1bb8049
Revert "std.process: further totalSystemMemory portage"
...
This reverts commit 5c70d7bc723a8e0e47018d3606285005c280ddb8.
2023-07-31 11:20:21 -07:00
Andrew Kelley
c6ec217e23
Revert "std.c: add find_path for haiku"
...
This reverts commit 1084590ec4939ed0aba5574eb835a07783301a8c.
2023-07-31 11:18:19 -07:00
Andrew Kelley
6bb776bb73
Revert "std.os: selfExePath implementation for haiku"
...
This reverts commit 7439eb5e99ba98bbdb2a0d0d71535e57d13f3c6e.
2023-07-31 11:18:15 -07:00
Andrew Kelley
ddd7b0ea9e
Revert "std.c: adding mincore for freebsd"
...
This reverts commit 8d88dcdc61c61e3410138f4402482131f5074a80.
2023-07-31 11:18:07 -07:00
Andrew Kelley
1f9161a9c6
Revert "std.c: add mincore api to darwin."
...
This reverts commit 05f9608115a48fb7312ebf38c1240ae10b770c88.
2023-07-31 11:17:57 -07:00
Andrew Kelley
c9de5304ab
Revert "std.c:complete further more netbsd's mmap flags"
...
This reverts commit 4f248e1b519b001cee67e461068245c142d38e73.
2023-07-31 11:17:25 -07:00
Andrew Kelley
70a7210e92
Revert "std.c: freebsd add procctl exclusive x86_64 flags"
...
This reverts commit 3fb93fc8f2d3e755492a495fa69f65ae6615cab6.
2023-07-31 11:17:20 -07:00
Andrew Kelley
1d4e6e6c73
Revert "std.c: add essential freebsd's capsicum api subset."
...
This reverts commit 6ae19fa48d7853430ba45f2de90550cd48cf5b4c.
2023-07-31 11:17:11 -07:00
Andrew Kelley
f96f57930c
Revert "std.c: adding freebsd's CPU_COUNT macro portage."
...
This reverts commit b9841750f91604020268549fc5e2c6b10c1f8477.
2023-07-31 11:14:03 -07:00
Andrew Kelley
a397952932
Revert "std.c: add os_proc_available_memory for darwin"
...
This reverts commit 012f9a97eb74c63921ce7f3a036c71816fb59a24.
2023-07-31 11:13:40 -07:00
Andrew Kelley
a92be49851
Revert "Merge pull request #15317 from devnexen/darwin_rand_nativegen"
...
This reverts commit a11113097730693fb915114cec79df9cb4adcc93, reversing
changes made to 9f3f9fb40f605de2f2bdcd0ce7a396e06b8b8c0d.
2023-07-31 11:13:27 -07:00