aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
AgeCommit message (Collapse)Author
2025-10-29Elf2: start implementing dynamic linkingJacob Young
2025-10-29std.Io.Threaded: install and cleanup signal handlersAndrew Kelley
rather than in start code. delete std.options.keep_sig_io and std.options.keep_sig_pipe
2025-10-29std: remove awareness of POLL signalAndrew Kelley
this signal seems to be deprecated and/or useless on every target
2025-10-29std: make signal numbers into an enumAndrew Kelley
fixes start logic for checking whether IO/POLL exist
2025-10-29start: fix logic for signal hanlding when SIG.POLL does not existAndrew Kelley
fixes a compilation failure on FreeBSD
2025-10-29std: back out the StackTrace byval changesAndrew Kelley
Let's keep passing this thing by pointer
2025-10-29std.Io.Threaded: implement dirAccess for WindowsAndrew Kelley
2025-10-29Io: implement sleep and fix cancel bugsJacob Young
2025-10-27remove all Oracle Solaris supportAlex Rønne Petersen
There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it. As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway. For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations. Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s. For these reasons, this commit removes all Oracle Solaris support. Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.
2025-10-23std.start: add sh supportAlex Rønne Petersen
2025-10-23std.start: add microblaze supportAlex Rønne Petersen
2025-10-23std.start: add alpha supportAlex Rønne Petersen
2025-10-23std.Target: add arceb and xtensaeb Cpu.Arch tagsAlex Rønne Petersen
2025-10-19Merge pull request #25623 from alexrp/or1kAlex Rønne Petersen
Add `or1k-linux` support (via CBE)
2025-10-18fix(std): don't add the default `_start` and `panic` in homebrew targetsGasInfinity
* even if std supported those targets, they're not posixy to be in that codepath.
2025-10-18std.start: align stack pointer according to ARC v3 ABIAlex Rønne Petersen
2025-10-18std.start: add or1k supportAlex Rønne Petersen
2025-10-18std.start: fix _start for mipsn32Alex Rønne Petersen
This is more similar to O32 than N64.
2025-10-18std: make all MIPS inline asm safe for MIPS IAlex Rønne Petersen
MIPS I has load hazards so we need to insert nops in a few places. This is not a problem for MIPS II and later. While doing this, I also touched up all the inline asm to use ABI register aliases and a consistent formatting convention. Also fixed a few places that didn't properly check if the syscall return value should be negated.
2025-09-30std.start: also don't print error trace targeting `.other`mlugg
This only matters if `callMain` is called by a user, since `std.start` will never itself call `callMain` when `target.os.tag == .other`. However, it *is* a valid use case for a user to call `std.start.callMain` in their own startup logic, so this makes sense.
2025-09-30fix compile errors and minor bugsmlugg
2025-09-30std: fixesmlugg
2025-08-25start adding big endian RISC-V supportAlex Rønne Petersen
The big endian RISC-V effort is mostly driven by MIPS (the company) which is pivoting to RISC-V, and presumably needs a big endian variant to fill the niche that big endian MIPS (the ISA) did. GCC already supports these targets, but LLVM support will only appear in 22; this commit just adds the necessary target knowledge and checks on our end.
2025-08-20wasi-libc: update to c89896107d7b57aef69dcadede47409ee4f702eeAlex Rønne Petersen
2025-07-30std: Add serenity to more OS checksLinus Groh
2025-07-28aarch64: workaround some optional/union issuesJacob Young
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-07-16remove condition codesAndrew Kelley
LLVM always assumes these are on. Zig backends do not observe them. If Zig backends want to start using them, they can be introduced, one arch at a time, with proper documentation.
2025-07-16zig fmtAndrew Kelley
2025-07-04start: Only issue fninit for x86(_64)-windowsAlex Rønne Petersen
Closes #24263.
2025-06-19x86_64: increase passing test coverage on windowsJacob Young
Now that codegen has no references to linker state this is much easier. Closes #24153
2025-06-16rename spirv backend nameAli Cheraghi
`stage2_spirv64` -> `stage2_spirv`
2025-06-06x86_64: add support for pie executablesJacob Young
2025-05-20compiler: Scaffold stage2_powerpc backend.Alex Rønne Petersen
Nothing interesting here; literally just the bare minimum so I can work on this on and off in a branch without worrying about merge conflicts in the non-backend code.
2025-05-18start: Don't artificially limit some posixCallMainAndExit() logic to Linux.Alex Rønne Petersen
This code applies to ~any POSIX OS where we don't link libc. For example, it'll be useful for FreeBSD and NetBSD. As part of this, move std.os.linux.pie to std.pie since there's really nothing Linux-specific about what that file is doing.
2025-04-30sigset_t: sigemptyset() and sigfillset() are functions that return sigset_tPat Tullmann
By returning an initialized sigset (instead of taking the set as an output parameter), these functions can be used to directly initialize the `mask` parameter of a `Sigaction` instance.
2025-04-30posix: remove empty_sigsetPat Tullmann
When linking a libc, Zig should defer to the C library for sigset operations. The pre-filled constants signal sets (empty_sigset, filled_sigset) are not compatible with C library initialization, so remove them and use the runtime `sigemptyset` and `sigfillset` methods to initialize any sigset.
2025-04-07start: Reduce stack alignment for hexagon.Alex Rønne Petersen
The ABI requires 8-byte alignment, not 16.
2025-04-07start: Align the stack on m68k.Alex Rønne Petersen
2025-04-07start: fix pc register syntax for m68kStefan Weigl-Bosker
2025-04-01std.start: allow return uefi error union in main (#23425)Carmen
2025-02-06adjust runtime page size APIsAndrew Kelley
* fix merge conflicts * rename the declarations * reword documentation * extract FixedBufferAllocator to separate file * take advantage of locals * remove the assertion about max alignment in Allocator API, leaving it Allocator implementation defined * fix non-inline function call in start logic The GeneralPurposeAllocator implementation is totally broken because it uses global state but I didn't address that in this commit.
2025-02-06runtime page size detectionArchbirdplus
heap.zig: define new default page sizes heap.zig: add min/max_page_size and their options lib/std/c: add miscellaneous declarations heap.zig: add pageSize() and its options switch to new page sizes, especially in GPA/stdlib mem.zig: remove page_size
2025-01-19start: Don't emit CFI directives if unwind tables are disabled.Alex Rønne Petersen
2024-12-11start: Extend DWARF unwinding protection to more architectures.Alex Rønne Petersen
The function is not marked .cantunwind for Arm/Thumb because of an LLVM assembler bug: https://github.com/llvm/llvm-project/issues/115891
2024-12-11start: Zero the link and frame pointer registers on all architectures.Alex Rønne Petersen
2024-11-03Merge pull request #21843 from alexrp/callconv-followupAlex Rønne Petersen
Some follow-up work for #21697
2024-11-03std.Target: Replace isARM() with isArmOrThumb() and rename it to isArm().Alex Rønne Petersen
The old isARM() function was a portability trap. With the name it had, it seemed like the obviously correct function to use, but it didn't include Thumb. In the vast majority of cases where someone wants to ask "is the target Arm?", Thumb *should* be included. There are exactly 3 cases in the codebase where we do actually need to exclude Thumb, although one of those is in Aro and mirrors a check in Clang that is itself likely a bug. These rare cases can just add an extra isThumb() check.
2024-11-02start: Fix callconv for the wWinMainCRTStartup symbol.Alex Rønne Petersen
This just uses the C calling convention in the vcruntime sources.
2024-11-02start: Fix a calling convention check to use eql().Alex Rønne Petersen
Also modernize some callconv uses. Closes #21813.