| 1 | const builtin = @import("builtin"); |
| 2 | const std = @import("std"); |
| 3 | |
| 4 | const compiler_rt = @import("../../compiler_rt.zig"); |
| 5 | const symbol = compiler_rt.symbol; |
| 6 | |
| 7 | comptime { |
| 8 | symbol(@ptrCast(&__zig_elf_auxv), "__zig_elf_auxv"); |
| 9 | } |
| 10 | |
| 11 | /// Populated by `std.start` when libc is not linked on targets that provide an ELF auxiliary vector |
| 12 | /// to the process on startup. Provided by compiler-rt so that there is no confusion about where |
| 13 | /// this state lives regardless of how the final artifact (executable or shared library) is |
| 14 | /// compiled. |
| 15 | /// |
| 16 | /// It is expected that this will gradually be replaced with better mechanisms as operating systems |
| 17 | /// improve; see https://codeberg.org/ziglang/zig/issues/31290. |
| 18 | var __zig_elf_auxv: [*]std.elf.Auxv = undefined; |